diff --git a/assets/index-5ff5ea70.js b/assets/index-bba62df3.js similarity index 64% rename from assets/index-5ff5ea70.js rename to assets/index-bba62df3.js index f8eab06..8ad3b4a 100644 --- a/assets/index-5ff5ea70.js +++ b/assets/index-bba62df3.js @@ -1,4 +1,4 @@ -var JQ=Object.defineProperty;var QQ=(t,e,n)=>e in t?JQ(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var eee=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var ro=(t,e,n)=>(QQ(t,typeof e!="symbol"?e+"":e,n),n);var zYe=eee((Ns,Os)=>{function tee(t,e){for(var n=0;nr[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"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var Uc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function lu(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function nee(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}var u$={exports:{}},J2={},c$={exports:{}},$n={};/** +var oee=Object.defineProperty;var aee=(t,e,n)=>e in t?oee(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var see=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var io=(t,e,n)=>(aee(t,typeof e!="symbol"?e+"":e,n),n);var ZYe=see((Ns,Os)=>{function lee(t,e){for(var n=0;nr[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"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var Uc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function su(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function uee(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}var d$={exports:{}},J2={},h$={exports:{}},zn={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ var JQ=Object.defineProperty;var QQ=(t,e,n)=>e in t?JQ(t,e,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var db=Symbol.for("react.element"),ree=Symbol.for("react.portal"),iee=Symbol.for("react.fragment"),oee=Symbol.for("react.strict_mode"),aee=Symbol.for("react.profiler"),see=Symbol.for("react.provider"),lee=Symbol.for("react.context"),uee=Symbol.for("react.forward_ref"),cee=Symbol.for("react.suspense"),fee=Symbol.for("react.memo"),dee=Symbol.for("react.lazy"),cF=Symbol.iterator;function hee(t){return t===null||typeof t!="object"?null:(t=cF&&t[cF]||t["@@iterator"],typeof t=="function"?t:null)}var f$={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},d$=Object.assign,h$={};function hv(t,e,n){this.props=t,this.context=e,this.refs=h$,this.updater=n||f$}hv.prototype.isReactComponent={};hv.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};hv.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function p$(){}p$.prototype=hv.prototype;function gN(t,e,n){this.props=t,this.context=e,this.refs=h$,this.updater=n||f$}var vN=gN.prototype=new p$;vN.constructor=gN;d$(vN,hv.prototype);vN.isPureReactComponent=!0;var fF=Array.isArray,m$=Object.prototype.hasOwnProperty,yN={current:null},g$={key:!0,ref:!0,__self:!0,__source:!0};function v$(t,e,n){var r,i={},o=null,a=null;if(e!=null)for(r in e.ref!==void 0&&(a=e.ref),e.key!==void 0&&(o=""+e.key),e)m$.call(e,r)&&!g$.hasOwnProperty(r)&&(i[r]=e[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1e in t?JQ(t,e,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var yee=H,xee=Symbol.for("react.element"),bee=Symbol.for("react.fragment"),_ee=Object.prototype.hasOwnProperty,wee=yee.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,See={key:!0,ref:!0,__self:!0,__source:!0};function y$(t,e,n){var r,i={},o=null,a=null;n!==void 0&&(o=""+n),e.key!==void 0&&(o=""+e.key),e.ref!==void 0&&(a=e.ref);for(r in e)_ee.call(e,r)&&!See.hasOwnProperty(r)&&(i[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)i[r]===void 0&&(i[r]=e[r]);return{$$typeof:xee,type:t,key:o,ref:a,props:i,_owner:wee.current}}J2.Fragment=bee;J2.jsx=y$;J2.jsxs=y$;u$.exports=J2;var F=u$.exports,ED={},x$={exports:{}},$s={},b$={exports:{}},_$={};/** + */var Mee=H,Cee=Symbol.for("react.element"),Aee=Symbol.for("react.fragment"),Tee=Object.prototype.hasOwnProperty,Dee=Mee.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Ree={key:!0,ref:!0,__self:!0,__source:!0};function _$(t,e,n){var r,i={},o=null,a=null;n!==void 0&&(o=""+n),e.key!==void 0&&(o=""+e.key),e.ref!==void 0&&(a=e.ref);for(r in e)Tee.call(e,r)&&!Ree.hasOwnProperty(r)&&(i[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)i[r]===void 0&&(i[r]=e[r]);return{$$typeof:Cee,type:t,key:o,ref:a,props:i,_owner:Dee.current}}J2.Fragment=Aee;J2.jsx=_$;J2.jsxs=_$;d$.exports=J2;var F=d$.exports,CD={},w$={exports:{}},$s={},S$={exports:{}},E$={};/** * @license React * scheduler.production.min.js * @@ -22,7 +22,7 @@ var JQ=Object.defineProperty;var QQ=(t,e,n)=>e in t?JQ(t,e,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */(function(t){function e(W,U){var te=W.length;W.push(U);e:for(;0>>1,le=W[re];if(0>>1;rei(Re,te))Iei(He,Re)?(W[re]=He,W[Ie]=te,re=Ie):(W[re]=Re,W[Ce]=te,re=Ce);else if(Iei(He,te))W[re]=He,W[Ie]=te,re=Ie;else break e}}return U}function i(W,U){var te=W.sortIndex-U.sortIndex;return te!==0?te:W.id-U.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();t.unstable_now=function(){return a.now()-s}}var l=[],u=[],c=1,f=null,d=3,p=!1,y=!1,x=!1,_=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(W){for(var U=n(u);U!==null;){if(U.callback===null)r(u);else if(U.startTime<=W)r(u),U.sortIndex=U.expirationTime,e(l,U);else break;U=n(u)}}function E(W){if(x=!1,w(W),!y)if(n(l)!==null)y=!0,Y(T);else{var U=n(u);U!==null&&$(E,U.startTime-W)}}function T(W,U){y=!1,x&&(x=!1,v(O),O=-1),p=!0;var te=d;try{for(w(U),f=n(l);f!==null&&(!(f.expirationTime>U)||W&&!k());){var re=f.callback;if(typeof re=="function"){f.callback=null,d=f.priorityLevel;var le=re(f.expirationTime<=U);U=t.unstable_now(),typeof le=="function"?f.callback=le:f===n(l)&&r(l),w(U)}else r(l);f=n(l)}if(f!==null)var ce=!0;else{var Ce=n(u);Ce!==null&&$(E,Ce.startTime-U),ce=!1}return ce}finally{f=null,d=te,p=!1}}var C=!1,D=null,O=-1,P=5,N=-1;function k(){return!(t.unstable_now()-NW||125re?(W.sortIndex=te,e(u,W),n(l)===null&&W===n(u)&&(x?(v(O),O=-1):x=!0,$(E,te-re))):(W.sortIndex=le,e(l,W),y||p||(y=!0,Y(T))),W},t.unstable_shouldYield=k,t.unstable_wrapCallback=function(W){var U=d;return function(){var te=d;d=U;try{return W.apply(this,arguments)}finally{d=te}}}})(_$);b$.exports=_$;var Eee=b$.exports;/** + */(function(t){function e(W,U){var te=W.length;W.push(U);e:for(;0>>1,le=W[re];if(0>>1;rei(Re,te))Iei(He,Re)?(W[re]=He,W[Ie]=te,re=Ie):(W[re]=Re,W[Ce]=te,re=Ce);else if(Iei(He,te))W[re]=He,W[Ie]=te,re=Ie;else break e}}return U}function i(W,U){var te=W.sortIndex-U.sortIndex;return te!==0?te:W.id-U.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();t.unstable_now=function(){return a.now()-s}}var l=[],u=[],c=1,f=null,d=3,p=!1,y=!1,x=!1,_=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(W){for(var U=n(u);U!==null;){if(U.callback===null)r(u);else if(U.startTime<=W)r(u),U.sortIndex=U.expirationTime,e(l,U);else break;U=n(u)}}function E(W){if(x=!1,w(W),!y)if(n(l)!==null)y=!0,Y(T);else{var U=n(u);U!==null&&$(E,U.startTime-W)}}function T(W,U){y=!1,x&&(x=!1,v(O),O=-1),p=!0;var te=d;try{for(w(U),f=n(l);f!==null&&(!(f.expirationTime>U)||W&&!k());){var re=f.callback;if(typeof re=="function"){f.callback=null,d=f.priorityLevel;var le=re(f.expirationTime<=U);U=t.unstable_now(),typeof le=="function"?f.callback=le:f===n(l)&&r(l),w(U)}else r(l);f=n(l)}if(f!==null)var ce=!0;else{var Ce=n(u);Ce!==null&&$(E,Ce.startTime-U),ce=!1}return ce}finally{f=null,d=te,p=!1}}var C=!1,D=null,O=-1,P=5,N=-1;function k(){return!(t.unstable_now()-NW||125re?(W.sortIndex=te,e(u,W),n(l)===null&&W===n(u)&&(x?(v(O),O=-1):x=!0,$(E,te-re))):(W.sortIndex=le,e(l,W),y||p||(y=!0,Y(T))),W},t.unstable_shouldYield=k,t.unstable_wrapCallback=function(W){var U=d;return function(){var te=d;d=U;try{return W.apply(this,arguments)}finally{d=te}}}})(E$);S$.exports=E$;var Pee=S$.exports;/** * @license React * react-dom.production.min.js * @@ -30,14 +30,14 @@ var JQ=Object.defineProperty;var QQ=(t,e,n)=>e in t?JQ(t,e,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var w$=H,Bs=Eee;function ht(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),MD=Object.prototype.hasOwnProperty,Mee=/^[: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]*$/,hF={},pF={};function Cee(t){return MD.call(pF,t)?!0:MD.call(hF,t)?!1:Mee.test(t)?pF[t]=!0:(hF[t]=!0,!1)}function Aee(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function Tee(t,e,n,r){if(e===null||typeof e>"u"||Aee(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function Ma(t,e,n,r,i,o,a){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=o,this.removeEmptyString=a}var To={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){To[t]=new Ma(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];To[e]=new Ma(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){To[t]=new Ma(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){To[t]=new Ma(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){To[t]=new Ma(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){To[t]=new Ma(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){To[t]=new Ma(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){To[t]=new Ma(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){To[t]=new Ma(t,5,!1,t.toLowerCase(),null,!1,!1)});var bN=/[\-:]([a-z])/g;function _N(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(bN,_N);To[e]=new Ma(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(bN,_N);To[e]=new Ma(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(bN,_N);To[e]=new Ma(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){To[t]=new Ma(t,1,!1,t.toLowerCase(),null,!1,!1)});To.xlinkHref=new Ma("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){To[t]=new Ma(t,1,!1,t.toLowerCase(),null,!0,!0)});function wN(t,e,n,r){var i=To.hasOwnProperty(e)?To[e]:null;(i!==null?i.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),AD=Object.prototype.hasOwnProperty,Nee=/^[: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]*$/,pF={},mF={};function Oee(t){return AD.call(mF,t)?!0:AD.call(pF,t)?!1:Nee.test(t)?mF[t]=!0:(pF[t]=!0,!1)}function Iee(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function Fee(t,e,n,r){if(e===null||typeof e>"u"||Iee(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function Ma(t,e,n,r,i,o,a){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=o,this.removeEmptyString=a}var To={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){To[t]=new Ma(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];To[e]=new Ma(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){To[t]=new Ma(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){To[t]=new Ma(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){To[t]=new Ma(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){To[t]=new Ma(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){To[t]=new Ma(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){To[t]=new Ma(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){To[t]=new Ma(t,5,!1,t.toLowerCase(),null,!1,!1)});var wN=/[\-:]([a-z])/g;function SN(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(wN,SN);To[e]=new Ma(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(wN,SN);To[e]=new Ma(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(wN,SN);To[e]=new Ma(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){To[t]=new Ma(t,1,!1,t.toLowerCase(),null,!1,!1)});To.xlinkHref=new Ma("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){To[t]=new Ma(t,1,!1,t.toLowerCase(),null,!0,!0)});function EN(t,e,n,r){var i=To.hasOwnProperty(e)?To[e]:null;(i!==null?i.type!==0:r||!(2s||i[a]!==o[s]){var l=` -`+i[a].replace(" at new "," at ");return t.displayName&&l.includes("")&&(l=l.replace("",t.displayName)),l}while(1<=a&&0<=s);break}}}finally{fT=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?f1(t):""}function Dee(t){switch(t.tag){case 5:return f1(t.type);case 16:return f1("Lazy");case 13:return f1("Suspense");case 19:return f1("SuspenseList");case 0:case 2:case 15:return t=dT(t.type,!1),t;case 11:return t=dT(t.type.render,!1),t;case 1:return t=dT(t.type,!0),t;default:return""}}function DD(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case ng:return"Fragment";case tg:return"Portal";case CD:return"Profiler";case SN:return"StrictMode";case AD:return"Suspense";case TD:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case M$:return(t.displayName||"Context")+".Consumer";case E$:return(t._context.displayName||"Context")+".Provider";case EN:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case MN:return e=t.displayName||null,e!==null?e:DD(t.type)||"Memo";case sd:e=t._payload,t=t._init;try{return DD(t(e))}catch{}}return null}function Ree(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return DD(e);case 8:return e===SN?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Ld(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function A$(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Pee(t){var e=A$(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function uw(t){t._valueTracker||(t._valueTracker=Pee(t))}function T$(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=A$(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function EE(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function RD(t,e){var n=e.checked;return Zr({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function gF(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=Ld(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function D$(t,e){e=e.checked,e!=null&&wN(t,"checked",e,!1)}function PD(t,e){D$(t,e);var n=Ld(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?ND(t,e.type,n):e.hasOwnProperty("defaultValue")&&ND(t,e.type,Ld(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function vF(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function ND(t,e,n){(e!=="number"||EE(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var d1=Array.isArray;function Sg(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=cw.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function ix(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var C1={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Nee=["Webkit","ms","Moz","O"];Object.keys(C1).forEach(function(t){Nee.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),C1[e]=C1[t]})});function O$(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||C1.hasOwnProperty(t)&&C1[t]?(""+e).trim():e+"px"}function I$(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=O$(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}var Oee=Zr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function FD(t,e){if(e){if(Oee[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(ht(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(ht(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(ht(61))}if(e.style!=null&&typeof e.style!="object")throw Error(ht(62))}}function LD(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){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 kD=null;function CN(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var BD=null,Eg=null,Mg=null;function bF(t){if(t=mb(t)){if(typeof BD!="function")throw Error(ht(280));var e=t.stateNode;e&&(e=rM(e),BD(t.stateNode,t.type,e))}}function F$(t){Eg?Mg?Mg.push(t):Mg=[t]:Eg=t}function L$(){if(Eg){var t=Eg,e=Mg;if(Mg=Eg=null,bF(t),e)for(t=0;t>>=0,t===0?32:31-(Wee(t)/Gee|0)|0}var fw=64,dw=4194304;function h1(t){switch(t&-t){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: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 t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function TE(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,o=t.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=h1(s):(o&=a,o!==0&&(r=h1(o)))}else a=n&~i,a!==0?r=h1(a):o!==0&&(r=h1(o));if(r===0)return 0;if(e!==0&&e!==r&&!(e&i)&&(i=r&-r,o=e&-e,i>=o||i===16&&(o&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0n;n++)e.push(t);return e}function hb(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-ru(e),t[e]=n}function Yee(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0=T1),DF=String.fromCharCode(32),RF=!1;function n9(t,e){switch(t){case"keyup":return Ste.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function r9(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var rg=!1;function Mte(t,e){switch(t){case"compositionend":return r9(e);case"keypress":return e.which!==32?null:(RF=!0,DF);case"textInput":return t=e.data,t===DF&&RF?null:t;default:return null}}function Cte(t,e){if(rg)return t==="compositionend"||!IN&&n9(t,e)?(t=e9(),YS=PN=vd=null,rg=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=IF(n)}}function s9(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?s9(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function l9(){for(var t=window,e=EE();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=EE(t.document)}return e}function FN(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function Fte(t){var e=l9(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&s9(n.ownerDocument.documentElement,n)){if(r!==null&&FN(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!t.extend&&o>r&&(i=r,r=o,o=i),i=FF(n,o);var a=FF(n,r);i&&a&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==a.node||t.focusOffset!==a.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),o>r?(t.addRange(e),t.extend(a.node,a.offset)):(e.setEnd(a.node,a.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,ig=null,WD=null,R1=null,GD=!1;function LF(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;GD||ig==null||ig!==EE(r)||(r=ig,"selectionStart"in r&&FN(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),R1&&cx(R1,r)||(R1=r,r=PE(WD,"onSelect"),0sg||(t.current=ZD[sg],ZD[sg]=null,sg--)}function Mr(t,e){sg++,ZD[sg]=t.current,t.current=e}var kd={},Ko=Yd(kd),Va=Yd(!1),Op=kd;function Vg(t,e){var n=t.type.contextTypes;if(!n)return kd;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=e[o];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function Wa(t){return t=t.childContextTypes,t!=null}function OE(){Nr(Va),Nr(Ko)}function VF(t,e,n){if(Ko.current!==kd)throw Error(ht(168));Mr(Ko,e),Mr(Va,n)}function v9(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in e))throw Error(ht(108,Ree(t)||"Unknown",i));return Zr({},n,r)}function IE(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||kd,Op=Ko.current,Mr(Ko,t),Mr(Va,Va.current),!0}function WF(t,e,n){var r=t.stateNode;if(!r)throw Error(ht(169));n?(t=v9(t,e,Op),r.__reactInternalMemoizedMergedChildContext=t,Nr(Va),Nr(Ko),Mr(Ko,t)):Nr(Va),Mr(Va,n)}var kc=null,iM=!1,CT=!1;function y9(t){kc===null?kc=[t]:kc.push(t)}function qte(t){iM=!0,y9(t)}function Kd(){if(!CT&&kc!==null){CT=!0;var t=0,e=sr;try{var n=kc;for(sr=1;t>=a,i-=a,Gc=1<<32-ru(e)+i|n<O?(P=D,D=null):P=D.sibling;var N=d(v,D,w[O],E);if(N===null){D===null&&(D=P);break}t&&D&&N.alternate===null&&e(v,D),S=o(N,S,O),C===null?T=N:C.sibling=N,C=N,D=P}if(O===w.length)return n(v,D),Ur&&ep(v,O),T;if(D===null){for(;OO?(P=D,D=null):P=D.sibling;var k=d(v,D,N.value,E);if(k===null){D===null&&(D=P);break}t&&D&&k.alternate===null&&e(v,D),S=o(k,S,O),C===null?T=k:C.sibling=k,C=k,D=P}if(N.done)return n(v,D),Ur&&ep(v,O),T;if(D===null){for(;!N.done;O++,N=w.next())N=f(v,N.value,E),N!==null&&(S=o(N,S,O),C===null?T=N:C.sibling=N,C=N);return Ur&&ep(v,O),T}for(D=r(v,D);!N.done;O++,N=w.next())N=p(D,v,O,N.value,E),N!==null&&(t&&N.alternate!==null&&D.delete(N.key===null?O:N.key),S=o(N,S,O),C===null?T=N:C.sibling=N,C=N);return t&&D.forEach(function(G){return e(v,G)}),Ur&&ep(v,O),T}function _(v,S,w,E){if(typeof w=="object"&&w!==null&&w.type===ng&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case lw:e:{for(var T=w.key,C=S;C!==null;){if(C.key===T){if(T=w.type,T===ng){if(C.tag===7){n(v,C.sibling),S=i(C,w.props.children),S.return=v,v=S;break e}}else if(C.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===sd&&ZF(T)===C.type){n(v,C.sibling),S=i(C,w.props),S.ref=Iy(v,C,w),S.return=v,v=S;break e}n(v,C);break}else e(v,C);C=C.sibling}w.type===ng?(S=wp(w.props.children,v.mode,E,w.key),S.return=v,v=S):(E=rE(w.type,w.key,w.props,null,v.mode,E),E.ref=Iy(v,S,w),E.return=v,v=E)}return a(v);case tg:e:{for(C=w.key;S!==null;){if(S.key===C)if(S.tag===4&&S.stateNode.containerInfo===w.containerInfo&&S.stateNode.implementation===w.implementation){n(v,S.sibling),S=i(S,w.children||[]),S.return=v,v=S;break e}else{n(v,S);break}else e(v,S);S=S.sibling}S=IT(w,v.mode,E),S.return=v,v=S}return a(v);case sd:return C=w._init,_(v,S,C(w._payload),E)}if(d1(w))return y(v,S,w,E);if(Dy(w))return x(v,S,w,E);xw(v,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,S!==null&&S.tag===6?(n(v,S.sibling),S=i(S,w),S.return=v,v=S):(n(v,S),S=OT(w,v.mode,E),S.return=v,v=S),a(v)):n(v,S)}return _}var Gg=C9(!0),A9=C9(!1),gb={},Hu=Yd(gb),px=Yd(gb),mx=Yd(gb);function hp(t){if(t===gb)throw Error(ht(174));return t}function WN(t,e){switch(Mr(mx,e),Mr(px,t),Mr(Hu,gb),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:ID(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=ID(e,t)}Nr(Hu),Mr(Hu,e)}function jg(){Nr(Hu),Nr(px),Nr(mx)}function T9(t){hp(mx.current);var e=hp(Hu.current),n=ID(e,t.type);e!==n&&(Mr(px,t),Mr(Hu,n))}function GN(t){px.current===t&&(Nr(Hu),Nr(px))}var Xr=Yd(0);function zE(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var AT=[];function jN(){for(var t=0;tn?n:4,t(!0);var r=TT.transition;TT.transition={};try{t(!1),e()}finally{sr=n,TT.transition=r}}function W9(){return bl().memoizedState}function Zte(t,e,n){var r=Cd(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},G9(t))j9(e,n);else if(n=w9(t,e,n,r),n!==null){var i=_a();iu(n,t,r,i),q9(n,e,r)}}function Jte(t,e,n){var r=Cd(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(G9(t))j9(e,i);else{var o=t.alternate;if(t.lanes===0&&(o===null||o.lanes===0)&&(o=e.lastRenderedReducer,o!==null))try{var a=e.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,au(s,a)){var l=e.interleaved;l===null?(i.next=i,HN(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}n=w9(t,e,i,r),n!==null&&(i=_a(),iu(n,t,r,i),q9(n,e,r))}}function G9(t){var e=t.alternate;return t===Kr||e!==null&&e===Kr}function j9(t,e){P1=$E=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function q9(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,TN(t,n)}}var HE={readContext:xl,useCallback:zo,useContext:zo,useEffect:zo,useImperativeHandle:zo,useInsertionEffect:zo,useLayoutEffect:zo,useMemo:zo,useReducer:zo,useRef:zo,useState:zo,useDebugValue:zo,useDeferredValue:zo,useTransition:zo,useMutableSource:zo,useSyncExternalStore:zo,useId:zo,unstable_isNewReconciler:!1},Qte={readContext:xl,useCallback:function(t,e){return Nu().memoizedState=[t,e===void 0?null:e],t},useContext:xl,useEffect:QF,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,QS(4194308,4,U9.bind(null,e,t),n)},useLayoutEffect:function(t,e){return QS(4194308,4,t,e)},useInsertionEffect:function(t,e){return QS(4,2,t,e)},useMemo:function(t,e){var n=Nu();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=Nu();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=Zte.bind(null,Kr,t),[r.memoizedState,t]},useRef:function(t){var e=Nu();return t={current:t},e.memoizedState=t},useState:JF,useDebugValue:ZN,useDeferredValue:function(t){return Nu().memoizedState=t},useTransition:function(){var t=JF(!1),e=t[0];return t=Kte.bind(null,t[1]),Nu().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=Kr,i=Nu();if(Ur){if(n===void 0)throw Error(ht(407));n=n()}else{if(n=e(),po===null)throw Error(ht(349));Fp&30||P9(r,e,n)}i.memoizedState=n;var o={value:n,getSnapshot:e};return i.queue=o,QF(O9.bind(null,r,o,t),[t]),r.flags|=2048,yx(9,N9.bind(null,r,o,n,e),void 0,null),n},useId:function(){var t=Nu(),e=po.identifierPrefix;if(Ur){var n=jc,r=Gc;n=(r&~(1<<32-ru(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=gx++,0")&&(l=l.replace("",t.displayName)),l}while(1<=a&&0<=s);break}}}finally{dT=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?p1(t):""}function Lee(t){switch(t.tag){case 5:return p1(t.type);case 16:return p1("Lazy");case 13:return p1("Suspense");case 19:return p1("SuspenseList");case 0:case 2:case 15:return t=hT(t.type,!1),t;case 11:return t=hT(t.type.render,!1),t;case 1:return t=hT(t.type,!0),t;default:return""}}function PD(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case rg:return"Fragment";case ng:return"Portal";case TD:return"Profiler";case MN:return"StrictMode";case DD:return"Suspense";case RD:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case T$:return(t.displayName||"Context")+".Consumer";case A$:return(t._context.displayName||"Context")+".Provider";case CN:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case AN:return e=t.displayName||null,e!==null?e:PD(t.type)||"Memo";case ld:e=t._payload,t=t._init;try{return PD(t(e))}catch{}}return null}function kee(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return PD(e);case 8:return e===MN?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function kd(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function R$(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Bee(t){var e=R$(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function cw(t){t._valueTracker||(t._valueTracker=Bee(t))}function P$(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=R$(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function EE(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function ND(t,e){var n=e.checked;return Zr({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function vF(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=kd(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function N$(t,e){e=e.checked,e!=null&&EN(t,"checked",e,!1)}function OD(t,e){N$(t,e);var n=kd(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?ID(t,e.type,n):e.hasOwnProperty("defaultValue")&&ID(t,e.type,kd(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function yF(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function ID(t,e,n){(e!=="number"||EE(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var m1=Array.isArray;function Eg(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=fw.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function ax(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var D1={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Uee=["Webkit","ms","Moz","O"];Object.keys(D1).forEach(function(t){Uee.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),D1[e]=D1[t]})});function L$(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||D1.hasOwnProperty(t)&&D1[t]?(""+e).trim():e+"px"}function k$(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=L$(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}var zee=Zr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function kD(t,e){if(e){if(zee[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(ht(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(ht(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(ht(61))}if(e.style!=null&&typeof e.style!="object")throw Error(ht(62))}}function BD(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){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 UD=null;function TN(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var zD=null,Mg=null,Cg=null;function _F(t){if(t=gb(t)){if(typeof zD!="function")throw Error(ht(280));var e=t.stateNode;e&&(e=rM(e),zD(t.stateNode,t.type,e))}}function B$(t){Mg?Cg?Cg.push(t):Cg=[t]:Mg=t}function U$(){if(Mg){var t=Mg,e=Cg;if(Cg=Mg=null,_F(t),e)for(t=0;t>>=0,t===0?32:31-(Zee(t)/Jee|0)|0}var dw=64,hw=4194304;function g1(t){switch(t&-t){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: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 t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function TE(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,o=t.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=g1(s):(o&=a,o!==0&&(r=g1(o)))}else a=n&~i,a!==0?r=g1(a):o!==0&&(r=g1(o));if(r===0)return 0;if(e!==0&&e!==r&&!(e&i)&&(i=r&-r,o=e&-e,i>=o||i===16&&(o&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0n;n++)e.push(t);return e}function pb(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-nu(e),t[e]=n}function nte(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0=P1),RF=String.fromCharCode(32),PF=!1;function o9(t,e){switch(t){case"keyup":return Rte.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function a9(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var ig=!1;function Nte(t,e){switch(t){case"compositionend":return a9(e);case"keypress":return e.which!==32?null:(PF=!0,RF);case"textInput":return t=e.data,t===RF&&PF?null:t;default:return null}}function Ote(t,e){if(ig)return t==="compositionend"||!LN&&o9(t,e)?(t=r9(),YS=ON=yd=null,ig=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=FF(n)}}function c9(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?c9(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function f9(){for(var t=window,e=EE();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=EE(t.document)}return e}function kN(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function Hte(t){var e=f9(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&c9(n.ownerDocument.documentElement,n)){if(r!==null&&kN(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!t.extend&&o>r&&(i=r,r=o,o=i),i=LF(n,o);var a=LF(n,r);i&&a&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==a.node||t.focusOffset!==a.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),o>r?(t.addRange(e),t.extend(a.node,a.offset)):(e.setEnd(a.node,a.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,og=null,jD=null,O1=null,qD=!1;function kF(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;qD||og==null||og!==EE(r)||(r=og,"selectionStart"in r&&kN(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),O1&&dx(O1,r)||(O1=r,r=PE(jD,"onSelect"),0lg||(t.current=QD[lg],QD[lg]=null,lg--)}function Mr(t,e){lg++,QD[lg]=t.current,t.current=e}var Bd={},Ko=Kd(Bd),Va=Kd(!1),Ip=Bd;function Gg(t,e){var n=t.type.contextTypes;if(!n)return Bd;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=e[o];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function Wa(t){return t=t.childContextTypes,t!=null}function OE(){Nr(Va),Nr(Ko)}function WF(t,e,n){if(Ko.current!==Bd)throw Error(ht(168));Mr(Ko,e),Mr(Va,n)}function b9(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in e))throw Error(ht(108,kee(t)||"Unknown",i));return Zr({},n,r)}function IE(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Bd,Ip=Ko.current,Mr(Ko,t),Mr(Va,Va.current),!0}function GF(t,e,n){var r=t.stateNode;if(!r)throw Error(ht(169));n?(t=b9(t,e,Ip),r.__reactInternalMemoizedMergedChildContext=t,Nr(Va),Nr(Ko),Mr(Ko,t)):Nr(Va),Mr(Va,n)}var kc=null,iM=!1,AT=!1;function _9(t){kc===null?kc=[t]:kc.push(t)}function ene(t){iM=!0,_9(t)}function Zd(){if(!AT&&kc!==null){AT=!0;var t=0,e=sr;try{var n=kc;for(sr=1;t>=a,i-=a,Gc=1<<32-nu(e)+i|n<O?(P=D,D=null):P=D.sibling;var N=d(v,D,w[O],E);if(N===null){D===null&&(D=P);break}t&&D&&N.alternate===null&&e(v,D),S=o(N,S,O),C===null?T=N:C.sibling=N,C=N,D=P}if(O===w.length)return n(v,D),Ur&&tp(v,O),T;if(D===null){for(;OO?(P=D,D=null):P=D.sibling;var k=d(v,D,N.value,E);if(k===null){D===null&&(D=P);break}t&&D&&k.alternate===null&&e(v,D),S=o(k,S,O),C===null?T=k:C.sibling=k,C=k,D=P}if(N.done)return n(v,D),Ur&&tp(v,O),T;if(D===null){for(;!N.done;O++,N=w.next())N=f(v,N.value,E),N!==null&&(S=o(N,S,O),C===null?T=N:C.sibling=N,C=N);return Ur&&tp(v,O),T}for(D=r(v,D);!N.done;O++,N=w.next())N=p(D,v,O,N.value,E),N!==null&&(t&&N.alternate!==null&&D.delete(N.key===null?O:N.key),S=o(N,S,O),C===null?T=N:C.sibling=N,C=N);return t&&D.forEach(function(G){return e(v,G)}),Ur&&tp(v,O),T}function _(v,S,w,E){if(typeof w=="object"&&w!==null&&w.type===rg&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case uw:e:{for(var T=w.key,C=S;C!==null;){if(C.key===T){if(T=w.type,T===rg){if(C.tag===7){n(v,C.sibling),S=i(C,w.props.children),S.return=v,v=S;break e}}else if(C.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===ld&&JF(T)===C.type){n(v,C.sibling),S=i(C,w.props),S.ref=ky(v,C,w),S.return=v,v=S;break e}n(v,C);break}else e(v,C);C=C.sibling}w.type===rg?(S=Sp(w.props.children,v.mode,E,w.key),S.return=v,v=S):(E=rE(w.type,w.key,w.props,null,v.mode,E),E.ref=ky(v,S,w),E.return=v,v=E)}return a(v);case ng:e:{for(C=w.key;S!==null;){if(S.key===C)if(S.tag===4&&S.stateNode.containerInfo===w.containerInfo&&S.stateNode.implementation===w.implementation){n(v,S.sibling),S=i(S,w.children||[]),S.return=v,v=S;break e}else{n(v,S);break}else e(v,S);S=S.sibling}S=FT(w,v.mode,E),S.return=v,v=S}return a(v);case ld:return C=w._init,_(v,S,C(w._payload),E)}if(m1(w))return y(v,S,w,E);if(Ny(w))return x(v,S,w,E);bw(v,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,S!==null&&S.tag===6?(n(v,S.sibling),S=i(S,w),S.return=v,v=S):(n(v,S),S=IT(w,v.mode,E),S.return=v,v=S),a(v)):n(v,S)}return _}var qg=D9(!0),R9=D9(!1),vb={},$u=Kd(vb),gx=Kd(vb),vx=Kd(vb);function pp(t){if(t===vb)throw Error(ht(174));return t}function jN(t,e){switch(Mr(vx,e),Mr(gx,t),Mr($u,vb),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:LD(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=LD(e,t)}Nr($u),Mr($u,e)}function Xg(){Nr($u),Nr(gx),Nr(vx)}function P9(t){pp(vx.current);var e=pp($u.current),n=LD(e,t.type);e!==n&&(Mr(gx,t),Mr($u,n))}function qN(t){gx.current===t&&(Nr($u),Nr(gx))}var Xr=Kd(0);function zE(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var TT=[];function XN(){for(var t=0;tn?n:4,t(!0);var r=DT.transition;DT.transition={};try{t(!1),e()}finally{sr=n,DT.transition=r}}function q9(){return bl().memoizedState}function ine(t,e,n){var r=Ad(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},X9(t))Y9(e,n);else if(n=M9(t,e,n,r),n!==null){var i=_a();ru(n,t,r,i),K9(n,e,r)}}function one(t,e,n){var r=Ad(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(X9(t))Y9(e,i);else{var o=t.alternate;if(t.lanes===0&&(o===null||o.lanes===0)&&(o=e.lastRenderedReducer,o!==null))try{var a=e.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,ou(s,a)){var l=e.interleaved;l===null?(i.next=i,WN(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}n=M9(t,e,i,r),n!==null&&(i=_a(),ru(n,t,r,i),K9(n,e,r))}}function X9(t){var e=t.alternate;return t===Kr||e!==null&&e===Kr}function Y9(t,e){I1=$E=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function K9(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,RN(t,n)}}var HE={readContext:xl,useCallback:zo,useContext:zo,useEffect:zo,useImperativeHandle:zo,useInsertionEffect:zo,useLayoutEffect:zo,useMemo:zo,useReducer:zo,useRef:zo,useState:zo,useDebugValue:zo,useDeferredValue:zo,useTransition:zo,useMutableSource:zo,useSyncExternalStore:zo,useId:zo,unstable_isNewReconciler:!1},ane={readContext:xl,useCallback:function(t,e){return Pu().memoizedState=[t,e===void 0?null:e],t},useContext:xl,useEffect:eL,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,QS(4194308,4,H9.bind(null,e,t),n)},useLayoutEffect:function(t,e){return QS(4194308,4,t,e)},useInsertionEffect:function(t,e){return QS(4,2,t,e)},useMemo:function(t,e){var n=Pu();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=Pu();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=ine.bind(null,Kr,t),[r.memoizedState,t]},useRef:function(t){var e=Pu();return t={current:t},e.memoizedState=t},useState:QF,useDebugValue:QN,useDeferredValue:function(t){return Pu().memoizedState=t},useTransition:function(){var t=QF(!1),e=t[0];return t=rne.bind(null,t[1]),Pu().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=Kr,i=Pu();if(Ur){if(n===void 0)throw Error(ht(407));n=n()}else{if(n=e(),mo===null)throw Error(ht(349));Lp&30||I9(r,e,n)}i.memoizedState=n;var o={value:n,getSnapshot:e};return i.queue=o,eL(L9.bind(null,r,o,t),[t]),r.flags|=2048,bx(9,F9.bind(null,r,o,n,e),void 0,null),n},useId:function(){var t=Pu(),e=mo.identifierPrefix;if(Ur){var n=jc,r=Gc;n=(r&~(1<<32-nu(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=yx++,0<\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=a.createElement(n,{is:r.is}):(t=a.createElement(n),n==="select"&&(a=t,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):t=a.createElementNS(t,n),t[ku]=e,t[hx]=r,n7(t,e,!1,!1),e.stateNode=t;e:{switch(a=LD(n,r),n){case"dialog":Tr("cancel",t),Tr("close",t),i=r;break;case"iframe":case"object":case"embed":Tr("load",t),i=r;break;case"video":case"audio":for(i=0;iXg&&(e.flags|=128,r=!0,Fy(o,!1),e.lanes=4194304)}else{if(!r)if(t=zE(a),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),Fy(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!Ur)return $o(e),null}else 2*_i()-o.renderingStartTime>Xg&&n!==1073741824&&(e.flags|=128,r=!0,Fy(o,!1),e.lanes=4194304);o.isBackwards?(a.sibling=e.child,e.child=a):(n=o.last,n!==null?n.sibling=a:e.child=a,o.last=a)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=_i(),e.sibling=null,n=Xr.current,Mr(Xr,r?n&1|2:n&1),e):($o(e),null);case 22:case 23:return rO(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?Es&1073741824&&($o(e),e.subtreeFlags&6&&(e.flags|=8192)):$o(e),null;case 24:return null;case 25:return null}throw Error(ht(156,e.tag))}function sne(t,e){switch(kN(e),e.tag){case 1:return Wa(e.type)&&OE(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return jg(),Nr(Va),Nr(Ko),jN(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return GN(e),null;case 13:if(Nr(Xr),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(ht(340));Wg()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Nr(Xr),null;case 4:return jg(),null;case 10:return $N(e.type._context),null;case 22:case 23:return rO(),null;case 24:return null;default:return null}}var _w=!1,qo=!1,lne=typeof WeakSet=="function"?WeakSet:Set,Ot=null;function fg(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){li(t,e,r)}else n.current=null}function uR(t,e,n){try{n()}catch(r){li(t,e,r)}}var lL=!1;function une(t,e){if(jD=DE,t=l9(),FN(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,u=0,c=0,f=t,d=null;t:for(;;){for(var p;f!==n||i!==0&&f.nodeType!==3||(s=a+i),f!==o||r!==0&&f.nodeType!==3||(l=a+r),f.nodeType===3&&(a+=f.nodeValue.length),(p=f.firstChild)!==null;)d=f,f=p;for(;;){if(f===t)break t;if(d===n&&++u===i&&(s=a),d===o&&++c===r&&(l=a),(p=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=p}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(qD={focusedElem:t,selectionRange:n},DE=!1,Ot=e;Ot!==null;)if(e=Ot,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Ot=t;else for(;Ot!==null;){e=Ot;try{var y=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var x=y.memoizedProps,_=y.memoizedState,v=e.stateNode,S=v.getSnapshotBeforeUpdate(e.elementType===e.type?x:Gl(e.type,x),_);v.__reactInternalSnapshotBeforeUpdate=S}break;case 3:var w=e.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ht(163))}}catch(E){li(e,e.return,E)}if(t=e.sibling,t!==null){t.return=e.return,Ot=t;break}Ot=e.return}return y=lL,lL=!1,y}function N1(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var o=i.destroy;i.destroy=void 0,o!==void 0&&uR(e,n,o)}i=i.next}while(i!==r)}}function sM(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function cR(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function o7(t){var e=t.alternate;e!==null&&(t.alternate=null,o7(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[ku],delete e[hx],delete e[KD],delete e[Gte],delete e[jte])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function a7(t){return t.tag===5||t.tag===3||t.tag===4}function uL(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||a7(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function fR(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=NE));else if(r!==4&&(t=t.child,t!==null))for(fR(t,e,n),t=t.sibling;t!==null;)fR(t,e,n),t=t.sibling}function dR(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(dR(t,e,n),t=t.sibling;t!==null;)dR(t,e,n),t=t.sibling}var wo=null,ql=!1;function Jf(t,e,n){for(n=n.child;n!==null;)s7(t,e,n),n=n.sibling}function s7(t,e,n){if($u&&typeof $u.onCommitFiberUnmount=="function")try{$u.onCommitFiberUnmount(Q2,n)}catch{}switch(n.tag){case 5:qo||fg(n,e);case 6:var r=wo,i=ql;wo=null,Jf(t,e,n),wo=r,ql=i,wo!==null&&(ql?(t=wo,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):wo.removeChild(n.stateNode));break;case 18:wo!==null&&(ql?(t=wo,n=n.stateNode,t.nodeType===8?MT(t.parentNode,n):t.nodeType===1&&MT(t,n),lx(t)):MT(wo,n.stateNode));break;case 4:r=wo,i=ql,wo=n.stateNode.containerInfo,ql=!0,Jf(t,e,n),wo=r,ql=i;break;case 0:case 11:case 14:case 15:if(!qo&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&uR(n,e,a),i=i.next}while(i!==r)}Jf(t,e,n);break;case 1:if(!qo&&(fg(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){li(n,e,s)}Jf(t,e,n);break;case 21:Jf(t,e,n);break;case 22:n.mode&1?(qo=(r=qo)||n.memoizedState!==null,Jf(t,e,n),qo=r):Jf(t,e,n);break;default:Jf(t,e,n)}}function cL(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new lne),e.forEach(function(r){var i=yne.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Bl(t,e){var n=e.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=_i()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*fne(r/1960))-r,10t?16:t,yd===null)var r=!1;else{if(t=yd,yd=null,GE=0,qn&6)throw Error(ht(331));var i=qn;for(qn|=4,Ot=t.current;Ot!==null;){var o=Ot,a=o.child;if(Ot.flags&16){var s=o.deletions;if(s!==null){for(var l=0;l_i()-tO?_p(t,0):eO|=n),Ga(t,e)}function m7(t,e){e===0&&(t.mode&1?(e=dw,dw<<=1,!(dw&130023424)&&(dw=4194304)):e=1);var n=_a();t=nf(t,e),t!==null&&(hb(t,e,n),Ga(t,n))}function vne(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),m7(t,n)}function yne(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(ht(314))}r!==null&&r.delete(e),m7(t,n)}var g7;g7=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||Va.current)Ha=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return Ha=!1,one(t,e,n);Ha=!!(t.flags&131072)}else Ha=!1,Ur&&e.flags&1048576&&x9(e,LE,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;eE(t,e),t=e.pendingProps;var i=Vg(e,Ko.current);Ag(e,n),i=XN(null,e,r,t,i,n);var o=YN();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Wa(r)?(o=!0,IE(e)):o=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,VN(e),i.updater=oM,e.stateNode=i,i._reactInternals=e,nR(e,r,t,n),e=oR(null,e,r,!0,o,n)):(e.tag=0,Ur&&o&&LN(e),ga(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch(eE(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=bne(r),t=Gl(r,t),i){case 0:e=iR(null,e,r,t,n);break e;case 1:e=oL(null,e,r,t,n);break e;case 11:e=rL(null,e,r,t,n);break e;case 14:e=iL(null,e,r,Gl(r.type,t),n);break e}throw Error(ht(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Gl(r,i),iR(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Gl(r,i),oL(t,e,r,i,n);case 3:e:{if(Q9(e),t===null)throw Error(ht(387));r=e.pendingProps,o=e.memoizedState,i=o.element,S9(t,e),UE(e,r,null,n);var a=e.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},e.updateQueue.baseState=o,e.memoizedState=o,e.flags&256){i=qg(Error(ht(423)),e),e=aL(t,e,r,n,i);break e}else if(r!==i){i=qg(Error(ht(424)),e),e=aL(t,e,r,n,i);break e}else for(Ps=Sd(e.stateNode.containerInfo.firstChild),Is=e,Ur=!0,Xl=null,n=A9(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Wg(),r===i){e=rf(t,e,n);break e}ga(t,e,r,n)}e=e.child}return e;case 5:return T9(e),t===null&&QD(e),r=e.type,i=e.pendingProps,o=t!==null?t.memoizedProps:null,a=i.children,XD(r,i)?a=null:o!==null&&XD(r,o)&&(e.flags|=32),J9(t,e),ga(t,e,a,n),e.child;case 6:return t===null&&QD(e),null;case 13:return e7(t,e,n);case 4:return WN(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=Gg(e,null,r,n):ga(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Gl(r,i),rL(t,e,r,i,n);case 7:return ga(t,e,e.pendingProps,n),e.child;case 8:return ga(t,e,e.pendingProps.children,n),e.child;case 12:return ga(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,i=e.pendingProps,o=e.memoizedProps,a=i.value,Mr(kE,r._currentValue),r._currentValue=a,o!==null)if(au(o.value,a)){if(o.children===i.children&&!Va.current){e=rf(t,e,n);break e}}else for(o=e.child,o!==null&&(o.return=e);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=Zc(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),eR(o.return,n,e),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===e.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(ht(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),eR(a,n,e),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===e){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}ga(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,Ag(e,n),i=xl(i),r=r(i),e.flags|=1,ga(t,e,r,n),e.child;case 14:return r=e.type,i=Gl(r,e.pendingProps),i=Gl(r.type,i),iL(t,e,r,i,n);case 15:return K9(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Gl(r,i),eE(t,e),e.tag=1,Wa(r)?(t=!0,IE(e)):t=!1,Ag(e,n),M9(e,r,i),nR(e,r,i,n),oR(null,e,r,!0,t,n);case 19:return t7(t,e,n);case 22:return Z9(t,e,n)}throw Error(ht(156,e.tag))};function v7(t,e){return V$(t,e)}function xne(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function pl(t,e,n,r){return new xne(t,e,n,r)}function oO(t){return t=t.prototype,!(!t||!t.isReactComponent)}function bne(t){if(typeof t=="function")return oO(t)?1:0;if(t!=null){if(t=t.$$typeof,t===EN)return 11;if(t===MN)return 14}return 2}function Ad(t,e){var n=t.alternate;return n===null?(n=pl(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function rE(t,e,n,r,i,o){var a=2;if(r=t,typeof t=="function")oO(t)&&(a=1);else if(typeof t=="string")a=5;else e:switch(t){case ng:return wp(n.children,i,o,e);case SN:a=8,i|=8;break;case CD:return t=pl(12,n,e,i|2),t.elementType=CD,t.lanes=o,t;case AD:return t=pl(13,n,e,i),t.elementType=AD,t.lanes=o,t;case TD:return t=pl(19,n,e,i),t.elementType=TD,t.lanes=o,t;case C$:return uM(n,i,o,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case E$:a=10;break e;case M$:a=9;break e;case EN:a=11;break e;case MN:a=14;break e;case sd:a=16,r=null;break e}throw Error(ht(130,t==null?t:typeof t,""))}return e=pl(a,n,e,i),e.elementType=t,e.type=r,e.lanes=o,e}function wp(t,e,n,r){return t=pl(7,t,r,e),t.lanes=n,t}function uM(t,e,n,r){return t=pl(22,t,r,e),t.elementType=C$,t.lanes=n,t.stateNode={isHidden:!1},t}function OT(t,e,n){return t=pl(6,t,null,e),t.lanes=n,t}function IT(t,e,n){return e=pl(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function _ne(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=pT(0),this.expirationTimes=pT(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=pT(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function aO(t,e,n,r,i,o,a,s,l){return t=new _ne(t,e,n,s,l),e===1?(e=1,o===!0&&(e|=8)):e=0,o=pl(3,null,null,e),t.current=o,o.stateNode=t,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},VN(o),t}function wne(t,e,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(_7)}catch(t){console.error(t)}}_7(),x$.exports=$s;var Zd=x$.exports;const Ew=lu(Zd);var w7,yL=Zd;w7=ED.createRoot=yL.createRoot,ED.hydrateRoot=yL.hydrateRoot;const Ane={black:"#000",white:"#fff"},bx=Ane,Tne={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Qm=Tne,Dne={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},e0=Dne,Rne={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},t0=Rne,Pne={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},n0=Pne,Nne={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},r0=Nne,One={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},ky=One,Ine={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"},Fne=Ine;function Q(){return Q=Object.assign?Object.assign.bind():function(t){for(var e=1;e{e[n]=S7(t[n])}),e}function Xo(t,e,n={clone:!0}){const r=n.clone?Q({},t):t;return zc(t)&&zc(e)&&Object.keys(e).forEach(i=>{i!=="__proto__"&&(zc(e[i])&&i in t&&zc(t[i])?r[i]=Xo(t[i],e[i],n):n.clone?r[i]=zc(e[i])?S7(e[i]):e[i]:r[i]=e[i])}),r}var E7={exports:{}},Lne="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",kne=Lne,Bne=kne;function M7(){}function C7(){}C7.resetWarningCache=M7;var Une=function(){function t(r,i,o,a,s,l){if(l!==Bne){var u=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 u.name="Invariant Violation",u}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:C7,resetWarningCache:M7};return n.PropTypes=n,n};E7.exports=Une();var gv=E7.exports;const st=lu(gv);function Bd(t){let e="https://mui.com/production-error/?code="+t;for(let n=1;n<\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=a.createElement(n,{is:r.is}):(t=a.createElement(n),n==="select"&&(a=t,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):t=a.createElementNS(t,n),t[Lu]=e,t[mx]=r,o7(t,e,!1,!1),e.stateNode=t;e:{switch(a=BD(n,r),n){case"dialog":Tr("cancel",t),Tr("close",t),i=r;break;case"iframe":case"object":case"embed":Tr("load",t),i=r;break;case"video":case"audio":for(i=0;iKg&&(e.flags|=128,r=!0,By(o,!1),e.lanes=4194304)}else{if(!r)if(t=zE(a),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),By(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!Ur)return $o(e),null}else 2*_i()-o.renderingStartTime>Kg&&n!==1073741824&&(e.flags|=128,r=!0,By(o,!1),e.lanes=4194304);o.isBackwards?(a.sibling=e.child,e.child=a):(n=o.last,n!==null?n.sibling=a:e.child=a,o.last=a)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=_i(),e.sibling=null,n=Xr.current,Mr(Xr,r?n&1|2:n&1),e):($o(e),null);case 22:case 23:return oO(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?Es&1073741824&&($o(e),e.subtreeFlags&6&&(e.flags|=8192)):$o(e),null;case 24:return null;case 25:return null}throw Error(ht(156,e.tag))}function pne(t,e){switch(UN(e),e.tag){case 1:return Wa(e.type)&&OE(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Xg(),Nr(Va),Nr(Ko),XN(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return qN(e),null;case 13:if(Nr(Xr),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(ht(340));jg()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Nr(Xr),null;case 4:return Xg(),null;case 10:return VN(e.type._context),null;case 22:case 23:return oO(),null;case 24:return null;default:return null}}var ww=!1,qo=!1,mne=typeof WeakSet=="function"?WeakSet:Set,Ot=null;function dg(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){li(t,e,r)}else n.current=null}function fR(t,e,n){try{n()}catch(r){li(t,e,r)}}var uL=!1;function gne(t,e){if(XD=DE,t=f9(),kN(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,u=0,c=0,f=t,d=null;t:for(;;){for(var p;f!==n||i!==0&&f.nodeType!==3||(s=a+i),f!==o||r!==0&&f.nodeType!==3||(l=a+r),f.nodeType===3&&(a+=f.nodeValue.length),(p=f.firstChild)!==null;)d=f,f=p;for(;;){if(f===t)break t;if(d===n&&++u===i&&(s=a),d===o&&++c===r&&(l=a),(p=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=p}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(YD={focusedElem:t,selectionRange:n},DE=!1,Ot=e;Ot!==null;)if(e=Ot,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Ot=t;else for(;Ot!==null;){e=Ot;try{var y=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var x=y.memoizedProps,_=y.memoizedState,v=e.stateNode,S=v.getSnapshotBeforeUpdate(e.elementType===e.type?x:Wl(e.type,x),_);v.__reactInternalSnapshotBeforeUpdate=S}break;case 3:var w=e.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ht(163))}}catch(E){li(e,e.return,E)}if(t=e.sibling,t!==null){t.return=e.return,Ot=t;break}Ot=e.return}return y=uL,uL=!1,y}function F1(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var o=i.destroy;i.destroy=void 0,o!==void 0&&fR(e,n,o)}i=i.next}while(i!==r)}}function sM(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function dR(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function l7(t){var e=t.alternate;e!==null&&(t.alternate=null,l7(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[Lu],delete e[mx],delete e[JD],delete e[Jte],delete e[Qte])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function u7(t){return t.tag===5||t.tag===3||t.tag===4}function cL(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||u7(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function hR(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=NE));else if(r!==4&&(t=t.child,t!==null))for(hR(t,e,n),t=t.sibling;t!==null;)hR(t,e,n),t=t.sibling}function pR(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(pR(t,e,n),t=t.sibling;t!==null;)pR(t,e,n),t=t.sibling}var So=null,jl=!1;function Jf(t,e,n){for(n=n.child;n!==null;)c7(t,e,n),n=n.sibling}function c7(t,e,n){if(zu&&typeof zu.onCommitFiberUnmount=="function")try{zu.onCommitFiberUnmount(Q2,n)}catch{}switch(n.tag){case 5:qo||dg(n,e);case 6:var r=So,i=jl;So=null,Jf(t,e,n),So=r,jl=i,So!==null&&(jl?(t=So,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):So.removeChild(n.stateNode));break;case 18:So!==null&&(jl?(t=So,n=n.stateNode,t.nodeType===8?CT(t.parentNode,n):t.nodeType===1&&CT(t,n),cx(t)):CT(So,n.stateNode));break;case 4:r=So,i=jl,So=n.stateNode.containerInfo,jl=!0,Jf(t,e,n),So=r,jl=i;break;case 0:case 11:case 14:case 15:if(!qo&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&fR(n,e,a),i=i.next}while(i!==r)}Jf(t,e,n);break;case 1:if(!qo&&(dg(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){li(n,e,s)}Jf(t,e,n);break;case 21:Jf(t,e,n);break;case 22:n.mode&1?(qo=(r=qo)||n.memoizedState!==null,Jf(t,e,n),qo=r):Jf(t,e,n);break;default:Jf(t,e,n)}}function fL(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new mne),e.forEach(function(r){var i=Mne.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Bl(t,e){var n=e.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=_i()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*yne(r/1960))-r,10t?16:t,xd===null)var r=!1;else{if(t=xd,xd=null,GE=0,qn&6)throw Error(ht(331));var i=qn;for(qn|=4,Ot=t.current;Ot!==null;){var o=Ot,a=o.child;if(Ot.flags&16){var s=o.deletions;if(s!==null){for(var l=0;l_i()-rO?wp(t,0):nO|=n),Ga(t,e)}function y7(t,e){e===0&&(t.mode&1?(e=hw,hw<<=1,!(hw&130023424)&&(hw=4194304)):e=1);var n=_a();t=rf(t,e),t!==null&&(pb(t,e,n),Ga(t,n))}function Ene(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),y7(t,n)}function Mne(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(ht(314))}r!==null&&r.delete(e),y7(t,n)}var x7;x7=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||Va.current)Ha=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return Ha=!1,dne(t,e,n);Ha=!!(t.flags&131072)}else Ha=!1,Ur&&e.flags&1048576&&w9(e,LE,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;eE(t,e),t=e.pendingProps;var i=Gg(e,Ko.current);Tg(e,n),i=KN(null,e,r,t,i,n);var o=ZN();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Wa(r)?(o=!0,IE(e)):o=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,GN(e),i.updater=oM,e.stateNode=i,i._reactInternals=e,iR(e,r,t,n),e=sR(null,e,r,!0,o,n)):(e.tag=0,Ur&&o&&BN(e),ga(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch(eE(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=Ane(r),t=Wl(r,t),i){case 0:e=aR(null,e,r,t,n);break e;case 1:e=aL(null,e,r,t,n);break e;case 11:e=iL(null,e,r,t,n);break e;case 14:e=oL(null,e,r,Wl(r.type,t),n);break e}throw Error(ht(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Wl(r,i),aR(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Wl(r,i),aL(t,e,r,i,n);case 3:e:{if(n7(e),t===null)throw Error(ht(387));r=e.pendingProps,o=e.memoizedState,i=o.element,C9(t,e),UE(e,r,null,n);var a=e.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},e.updateQueue.baseState=o,e.memoizedState=o,e.flags&256){i=Yg(Error(ht(423)),e),e=sL(t,e,r,n,i);break e}else if(r!==i){i=Yg(Error(ht(424)),e),e=sL(t,e,r,n,i);break e}else for(Ps=Ed(e.stateNode.containerInfo.firstChild),Is=e,Ur=!0,ql=null,n=R9(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(jg(),r===i){e=of(t,e,n);break e}ga(t,e,r,n)}e=e.child}return e;case 5:return P9(e),t===null&&tR(e),r=e.type,i=e.pendingProps,o=t!==null?t.memoizedProps:null,a=i.children,KD(r,i)?a=null:o!==null&&KD(r,o)&&(e.flags|=32),t7(t,e),ga(t,e,a,n),e.child;case 6:return t===null&&tR(e),null;case 13:return r7(t,e,n);case 4:return jN(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=qg(e,null,r,n):ga(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Wl(r,i),iL(t,e,r,i,n);case 7:return ga(t,e,e.pendingProps,n),e.child;case 8:return ga(t,e,e.pendingProps.children,n),e.child;case 12:return ga(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,i=e.pendingProps,o=e.memoizedProps,a=i.value,Mr(kE,r._currentValue),r._currentValue=a,o!==null)if(ou(o.value,a)){if(o.children===i.children&&!Va.current){e=of(t,e,n);break e}}else for(o=e.child,o!==null&&(o.return=e);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=Zc(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),nR(o.return,n,e),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===e.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(ht(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),nR(a,n,e),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===e){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}ga(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,Tg(e,n),i=xl(i),r=r(i),e.flags|=1,ga(t,e,r,n),e.child;case 14:return r=e.type,i=Wl(r,e.pendingProps),i=Wl(r.type,i),oL(t,e,r,i,n);case 15:return Q9(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Wl(r,i),eE(t,e),e.tag=1,Wa(r)?(t=!0,IE(e)):t=!1,Tg(e,n),T9(e,r,i),iR(e,r,i,n),sR(null,e,r,!0,t,n);case 19:return i7(t,e,n);case 22:return e7(t,e,n)}throw Error(ht(156,e.tag))};function b7(t,e){return j$(t,e)}function Cne(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function pl(t,e,n,r){return new Cne(t,e,n,r)}function sO(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Ane(t){if(typeof t=="function")return sO(t)?1:0;if(t!=null){if(t=t.$$typeof,t===CN)return 11;if(t===AN)return 14}return 2}function Td(t,e){var n=t.alternate;return n===null?(n=pl(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function rE(t,e,n,r,i,o){var a=2;if(r=t,typeof t=="function")sO(t)&&(a=1);else if(typeof t=="string")a=5;else e:switch(t){case rg:return Sp(n.children,i,o,e);case MN:a=8,i|=8;break;case TD:return t=pl(12,n,e,i|2),t.elementType=TD,t.lanes=o,t;case DD:return t=pl(13,n,e,i),t.elementType=DD,t.lanes=o,t;case RD:return t=pl(19,n,e,i),t.elementType=RD,t.lanes=o,t;case D$:return uM(n,i,o,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case A$:a=10;break e;case T$:a=9;break e;case CN:a=11;break e;case AN:a=14;break e;case ld:a=16,r=null;break e}throw Error(ht(130,t==null?t:typeof t,""))}return e=pl(a,n,e,i),e.elementType=t,e.type=r,e.lanes=o,e}function Sp(t,e,n,r){return t=pl(7,t,r,e),t.lanes=n,t}function uM(t,e,n,r){return t=pl(22,t,r,e),t.elementType=D$,t.lanes=n,t.stateNode={isHidden:!1},t}function IT(t,e,n){return t=pl(6,t,null,e),t.lanes=n,t}function FT(t,e,n){return e=pl(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function Tne(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=mT(0),this.expirationTimes=mT(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mT(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function lO(t,e,n,r,i,o,a,s,l){return t=new Tne(t,e,n,s,l),e===1?(e=1,o===!0&&(e|=8)):e=0,o=pl(3,null,null,e),t.current=o,o.stateNode=t,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},GN(o),t}function Dne(t,e,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(E7)}catch(t){console.error(t)}}E7(),w$.exports=$s;var Jd=w$.exports;const Mw=su(Jd);var M7,xL=Jd;M7=CD.createRoot=xL.createRoot,CD.hydrateRoot=xL.hydrateRoot;const Ine={black:"#000",white:"#fff"},wx=Ine,Fne={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},e0=Fne,Lne={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},t0=Lne,kne={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},n0=kne,Bne={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},r0=Bne,Une={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},i0=Une,zne={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},zy=zne,$ne={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"},Hne=$ne;function Q(){return Q=Object.assign?Object.assign.bind():function(t){for(var e=1;e{e[n]=C7(t[n])}),e}function Xo(t,e,n={clone:!0}){const r=n.clone?Q({},t):t;return zc(t)&&zc(e)&&Object.keys(e).forEach(i=>{i!=="__proto__"&&(zc(e[i])&&i in t&&zc(t[i])?r[i]=Xo(t[i],e[i],n):n.clone?r[i]=zc(e[i])?C7(e[i]):e[i]:r[i]=e[i])}),r}var A7={exports:{}},Vne="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Wne=Vne,Gne=Wne;function T7(){}function D7(){}D7.resetWarningCache=T7;var jne=function(){function t(r,i,o,a,s,l){if(l!==Gne){var u=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 u.name="Invariant Violation",u}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:D7,resetWarningCache:T7};return n.PropTypes=n,n};A7.exports=jne();var xv=A7.exports;const st=su(xv);function Ud(t){let e="https://mui.com/production-error/?code="+t;for(let n=1;nn==null?e:function(...i){e.apply(this,i),n.apply(this,i)},()=>{})}function EM(t,e=166){let n;function r(...i){const o=()=>{t.apply(this,i)};clearTimeout(n),n=setTimeout(o,e)}return r.clear=()=>{clearTimeout(n)},r}function Hne(t,e){return()=>null}function F1(t,e){var n,r;return H.isValidElement(t)&&e.indexOf((n=t.type.muiName)!=null?n:(r=t.type)==null||(r=r._payload)==null||(r=r.value)==null?void 0:r.muiName)!==-1}function Yo(t){return t&&t.ownerDocument||document}function Ju(t){return Yo(t).defaultView||window}function Vne(t,e){return()=>null}function _x(t,e){typeof t=="function"?t(e):t&&(t.current=e)}const Wne=typeof window<"u"?H.useLayoutEffect:H.useEffect,_l=Wne;let xL=0;function Gne(t){const[e,n]=H.useState(t),r=t||e;return H.useEffect(()=>{e==null&&(xL+=1,n(`mui-${xL}`))},[e]),r}const bL=SD["useId".toString()];function vv(t){if(bL!==void 0){const e=bL();return t??e}return Gne(t)}function jne(t,e,n,r,i){return null}function Td({controlled:t,default:e,name:n,state:r="value"}){const{current:i}=H.useRef(t!==void 0),[o,a]=H.useState(e),s=i?t:o,l=H.useCallback(u=>{i||a(u)},[]);return[s,l]}function Jl(t){const e=H.useRef(t);return _l(()=>{e.current=t}),H.useRef((...n)=>(0,e.current)(...n)).current}function Jr(...t){return H.useMemo(()=>t.every(e=>e==null)?null:e=>{t.forEach(n=>{_x(n,e)})},t)}let MM=!0,vR=!1,_L;const qne={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function Xne(t){const{type:e,tagName:n}=t;return!!(n==="INPUT"&&qne[e]&&!t.readOnly||n==="TEXTAREA"&&!t.readOnly||t.isContentEditable)}function Yne(t){t.metaKey||t.altKey||t.ctrlKey||(MM=!0)}function FT(){MM=!1}function Kne(){this.visibilityState==="hidden"&&vR&&(MM=!0)}function Zne(t){t.addEventListener("keydown",Yne,!0),t.addEventListener("mousedown",FT,!0),t.addEventListener("pointerdown",FT,!0),t.addEventListener("touchstart",FT,!0),t.addEventListener("visibilitychange",Kne,!0)}function Jne(t){const{target:e}=t;try{return e.matches(":focus-visible")}catch{}return MM||Xne(e)}function T7(){const t=H.useCallback(i=>{i!=null&&Zne(i.ownerDocument)},[]),e=H.useRef(!1);function n(){return e.current?(vR=!0,window.clearTimeout(_L),_L=window.setTimeout(()=>{vR=!1},100),e.current=!1,!0):!1}function r(i){return Jne(i)?(e.current=!0,!0):!1}return{isFocusVisibleRef:e,onFocus:r,onBlur:n,ref:t}}function D7(t){const e=t.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}const Qne=t=>{const e=H.useRef({});return H.useEffect(()=>{e.current=t}),e.current},ere=Qne;function dO(t,e){const n=Q({},e);return Object.keys(t).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=Q({},t[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const i=t[r]||{},o=e[r];n[r]={},!o||!Object.keys(o)?n[r]=i:!i||!Object.keys(i)?n[r]=o:(n[r]=Q({},o),Object.keys(i).forEach(a=>{n[r][a]=dO(i[a],o[a])}))}else n[r]===void 0&&(n[r]=t[r])}),n}function nn(t,e,n=void 0){const r={};return Object.keys(t).forEach(i=>{r[i]=t[i].reduce((o,a)=>{if(a){const s=e(a);s!==""&&o.push(s),n&&n[a]&&o.push(n[a])}return o},[]).join(" ")}),r}const wL=t=>t,tre=()=>{let t=wL;return{configure(e){t=e},generate(e){return t(e)},reset(){t=wL}}},nre=tre(),hO=nre,rre={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 Qt(t,e,n="Mui"){const r=rre[e];return r?`${n}-${r}`:`${hO.generate(t)}-${e}`}function Yt(t,e,n="Mui"){const r={};return e.forEach(i=>{r[i]=Qt(t,i,n)}),r}const vb="$$material";function yt(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o=0)&&(n[i]=t[i]);return n}function R7(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var ire=/^((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|download|draggable|encType|enterKeyHint|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|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)-.*))$/,ore=R7(function(t){return ire.test(t)||t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)<91});function are(t){if(t.sheet)return t.sheet;for(var e=0;e0?So(yv,--Ya):0,Yg--,Pi===10&&(Yg=1,AM--),Pi}function Fs(){return Pi=Ya2||Sx(Pi)>3?"":" "}function xre(t,e){for(;--e&&Fs()&&!(Pi<48||Pi>102||Pi>57&&Pi<65||Pi>70&&Pi<97););return yb(t,iE()+(e<6&&Vu()==32&&Fs()==32))}function xR(t){for(;Fs();)switch(Pi){case t:return Ya;case 34:case 39:t!==34&&t!==39&&xR(Pi);break;case 40:t===41&&xR(t);break;case 92:Fs();break}return Ya}function bre(t,e){for(;Fs()&&t+Pi!==47+10;)if(t+Pi===42+42&&Vu()===47)break;return"/*"+yb(e,Ya-1)+"*"+CM(t===47?t:Fs())}function _re(t){for(;!Sx(Vu());)Fs();return yb(t,Ya)}function wre(t){return L7(aE("",null,null,null,[""],t=F7(t),0,[0],t))}function aE(t,e,n,r,i,o,a,s,l){for(var u=0,c=0,f=a,d=0,p=0,y=0,x=1,_=1,v=1,S=0,w="",E=i,T=o,C=r,D=w;_;)switch(y=S,S=Fs()){case 40:if(y!=108&&So(D,f-1)==58){yR(D+=Qn(oE(S),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:D+=oE(S);break;case 9:case 10:case 13:case 32:D+=yre(y);break;case 92:D+=xre(iE()-1,7);continue;case 47:switch(Vu()){case 42:case 47:Mw(Sre(bre(Fs(),iE()),e,n),l);break;default:D+="/"}break;case 123*x:s[u++]=Iu(D)*v;case 125*x:case 59:case 0:switch(S){case 0:case 125:_=0;case 59+c:v==-1&&(D=Qn(D,/\f/g,"")),p>0&&Iu(D)-f&&Mw(p>32?EL(D+";",r,n,f-1):EL(Qn(D," ","")+";",r,n,f-2),l);break;case 59:D+=";";default:if(Mw(C=SL(D,e,n,u,c,i,s,w,E=[],T=[],f),o),S===123)if(c===0)aE(D,e,C,C,E,o,f,s,T);else switch(d===99&&So(D,3)===110?100:d){case 100:case 108:case 109:case 115:aE(t,C,C,r&&Mw(SL(t,C,C,0,0,i,s,w,i,E=[],f),T),i,T,f,s,r?E:T);break;default:aE(D,C,C,C,[""],T,0,s,T)}}u=c=p=0,x=v=1,w=D="",f=a;break;case 58:f=1+Iu(D),p=y;default:if(x<1){if(S==123)--x;else if(S==125&&x++==0&&vre()==125)continue}switch(D+=CM(S),S*x){case 38:v=c>0?1:(D+="\f",-1);break;case 44:s[u++]=(Iu(D)-1)*v,v=1;break;case 64:Vu()===45&&(D+=oE(Fs())),d=Vu(),c=f=Iu(w=D+=_re(iE())),S++;break;case 45:y===45&&Iu(D)==2&&(x=0)}}return o}function SL(t,e,n,r,i,o,a,s,l,u,c){for(var f=i-1,d=i===0?o:[""],p=gO(d),y=0,x=0,_=0;y0?d[v]+" "+S:Qn(S,/&\f/g,d[v])))&&(l[_++]=w);return TM(t,e,n,i===0?pO:s,l,u,c)}function Sre(t,e,n){return TM(t,e,n,P7,CM(gre()),wx(t,2,-2),0)}function EL(t,e,n,r){return TM(t,e,n,mO,wx(t,0,r),wx(t,r+1,-1),r)}function Dg(t,e){for(var n="",r=gO(t),i=0;i6)switch(So(t,e+1)){case 109:if(So(t,e+4)!==45)break;case 102:return Qn(t,/(.+:)(.+)-([^]+)/,"$1"+Jn+"$2-$3$1"+YE+(So(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~yR(t,"stretch")?k7(Qn(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(So(t,e+1)!==115)break;case 6444:switch(So(t,Iu(t)-3-(~yR(t,"!important")&&10))){case 107:return Qn(t,":",":"+Jn)+t;case 101:return Qn(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Jn+(So(t,14)===45?"inline-":"")+"box$3$1"+Jn+"$2$3$1"+Go+"$2box$3")+t}break;case 5936:switch(So(t,e+11)){case 114:return Jn+t+Go+Qn(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return Jn+t+Go+Qn(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return Jn+t+Go+Qn(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return Jn+t+Go+t+t}return t}var Nre=function(e,n,r,i){if(e.length>-1&&!e.return)switch(e.type){case mO:e.return=k7(e.value,e.length);break;case N7:return Dg([By(e,{value:Qn(e.value,"@","@"+Jn)})],i);case pO:if(e.length)return mre(e.props,function(o){switch(pre(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Dg([By(e,{props:[Qn(o,/:(read-\w+)/,":"+YE+"$1")]})],i);case"::placeholder":return Dg([By(e,{props:[Qn(o,/:(plac\w+)/,":"+Jn+"input-$1")]}),By(e,{props:[Qn(o,/:(plac\w+)/,":"+YE+"$1")]}),By(e,{props:[Qn(o,/:(plac\w+)/,Go+"input-$1")]})],i)}return""})}},Ore=[Nre],Ire=function(e){var n=e.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(x){var _=x.getAttribute("data-emotion");_.indexOf(" ")!==-1&&(document.head.appendChild(x),x.setAttribute("data-s",""))})}var i=e.stylisPlugins||Ore,o={},a,s=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(x){for(var _=x.getAttribute("data-emotion").split(" "),v=1;v<_.length;v++)o[_[v]]=!0;s.push(x)});var l,u=[Rre,Pre];{var c,f=[Ere,Cre(function(x){c.insert(x)})],d=Mre(u.concat(i,f)),p=function(_){return Dg(wre(_),d)};l=function(_,v,S,w){c=S,p(_?_+"{"+v.styles+"}":v.styles),w&&(y.inserted[v.name]=!0)}}var y={key:n,sheet:new lre({key:n,container:a,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:o,registered:{},insert:l};return y.sheet.hydrate(s),y},B7={exports:{}},lr={};/** @license React v16.13.1 + */var dO=Symbol.for("react.element"),hO=Symbol.for("react.portal"),pM=Symbol.for("react.fragment"),mM=Symbol.for("react.strict_mode"),gM=Symbol.for("react.profiler"),vM=Symbol.for("react.provider"),yM=Symbol.for("react.context"),qne=Symbol.for("react.server_context"),xM=Symbol.for("react.forward_ref"),bM=Symbol.for("react.suspense"),_M=Symbol.for("react.suspense_list"),wM=Symbol.for("react.memo"),SM=Symbol.for("react.lazy"),Xne=Symbol.for("react.offscreen"),R7;R7=Symbol.for("react.module.reference");function Cl(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case dO:switch(t=t.type,t){case pM:case gM:case mM:case bM:case _M:return t;default:switch(t=t&&t.$$typeof,t){case qne:case yM:case xM:case SM:case wM:case vM:return t;default:return e}}case hO:return e}}}hr.ContextConsumer=yM;hr.ContextProvider=vM;hr.Element=dO;hr.ForwardRef=xM;hr.Fragment=pM;hr.Lazy=SM;hr.Memo=wM;hr.Portal=hO;hr.Profiler=gM;hr.StrictMode=mM;hr.Suspense=bM;hr.SuspenseList=_M;hr.isAsyncMode=function(){return!1};hr.isConcurrentMode=function(){return!1};hr.isContextConsumer=function(t){return Cl(t)===yM};hr.isContextProvider=function(t){return Cl(t)===vM};hr.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===dO};hr.isForwardRef=function(t){return Cl(t)===xM};hr.isFragment=function(t){return Cl(t)===pM};hr.isLazy=function(t){return Cl(t)===SM};hr.isMemo=function(t){return Cl(t)===wM};hr.isPortal=function(t){return Cl(t)===hO};hr.isProfiler=function(t){return Cl(t)===gM};hr.isStrictMode=function(t){return Cl(t)===mM};hr.isSuspense=function(t){return Cl(t)===bM};hr.isSuspenseList=function(t){return Cl(t)===_M};hr.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===pM||t===gM||t===mM||t===bM||t===_M||t===Xne||typeof t=="object"&&t!==null&&(t.$$typeof===SM||t.$$typeof===wM||t.$$typeof===vM||t.$$typeof===yM||t.$$typeof===xM||t.$$typeof===R7||t.getModuleId!==void 0)};hr.typeOf=Cl;function rt(t){if(typeof t!="string")throw new Error(Ud(7));return t.charAt(0).toUpperCase()+t.slice(1)}function XE(...t){return t.reduce((e,n)=>n==null?e:function(...i){e.apply(this,i),n.apply(this,i)},()=>{})}function EM(t,e=166){let n;function r(...i){const o=()=>{t.apply(this,i)};clearTimeout(n),n=setTimeout(o,e)}return r.clear=()=>{clearTimeout(n)},r}function Yne(t,e){return()=>null}function B1(t,e){var n,r;return H.isValidElement(t)&&e.indexOf((n=t.type.muiName)!=null?n:(r=t.type)==null||(r=r._payload)==null||(r=r.value)==null?void 0:r.muiName)!==-1}function Yo(t){return t&&t.ownerDocument||document}function Zu(t){return Yo(t).defaultView||window}function Kne(t,e){return()=>null}function Sx(t,e){typeof t=="function"?t(e):t&&(t.current=e)}const Zne=typeof window<"u"?H.useLayoutEffect:H.useEffect,_l=Zne;let bL=0;function Jne(t){const[e,n]=H.useState(t),r=t||e;return H.useEffect(()=>{e==null&&(bL+=1,n(`mui-${bL}`))},[e]),r}const _L=MD["useId".toString()];function bv(t){if(_L!==void 0){const e=_L();return t??e}return Jne(t)}function Qne(t,e,n,r,i){return null}function Dd({controlled:t,default:e,name:n,state:r="value"}){const{current:i}=H.useRef(t!==void 0),[o,a]=H.useState(e),s=i?t:o,l=H.useCallback(u=>{i||a(u)},[]);return[s,l]}function Zl(t){const e=H.useRef(t);return _l(()=>{e.current=t}),H.useRef((...n)=>(0,e.current)(...n)).current}function Jr(...t){return H.useMemo(()=>t.every(e=>e==null)?null:e=>{t.forEach(n=>{Sx(n,e)})},t)}let MM=!0,xR=!1,wL;const ere={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function tre(t){const{type:e,tagName:n}=t;return!!(n==="INPUT"&&ere[e]&&!t.readOnly||n==="TEXTAREA"&&!t.readOnly||t.isContentEditable)}function nre(t){t.metaKey||t.altKey||t.ctrlKey||(MM=!0)}function LT(){MM=!1}function rre(){this.visibilityState==="hidden"&&xR&&(MM=!0)}function ire(t){t.addEventListener("keydown",nre,!0),t.addEventListener("mousedown",LT,!0),t.addEventListener("pointerdown",LT,!0),t.addEventListener("touchstart",LT,!0),t.addEventListener("visibilitychange",rre,!0)}function ore(t){const{target:e}=t;try{return e.matches(":focus-visible")}catch{}return MM||tre(e)}function P7(){const t=H.useCallback(i=>{i!=null&&ire(i.ownerDocument)},[]),e=H.useRef(!1);function n(){return e.current?(xR=!0,window.clearTimeout(wL),wL=window.setTimeout(()=>{xR=!1},100),e.current=!1,!0):!1}function r(i){return ore(i)?(e.current=!0,!0):!1}return{isFocusVisibleRef:e,onFocus:r,onBlur:n,ref:t}}function N7(t){const e=t.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}const are=t=>{const e=H.useRef({});return H.useEffect(()=>{e.current=t}),e.current},sre=are;function pO(t,e){const n=Q({},e);return Object.keys(t).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=Q({},t[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const i=t[r]||{},o=e[r];n[r]={},!o||!Object.keys(o)?n[r]=i:!i||!Object.keys(i)?n[r]=o:(n[r]=Q({},o),Object.keys(i).forEach(a=>{n[r][a]=pO(i[a],o[a])}))}else n[r]===void 0&&(n[r]=t[r])}),n}function en(t,e,n=void 0){const r={};return Object.keys(t).forEach(i=>{r[i]=t[i].reduce((o,a)=>{if(a){const s=e(a);s!==""&&o.push(s),n&&n[a]&&o.push(n[a])}return o},[]).join(" ")}),r}const SL=t=>t,lre=()=>{let t=SL;return{configure(e){t=e},generate(e){return t(e)},reset(){t=SL}}},ure=lre(),mO=ure,cre={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 Zt(t,e,n="Mui"){const r=cre[e];return r?`${n}-${r}`:`${mO.generate(t)}-${e}`}function Yt(t,e,n="Mui"){const r={};return e.forEach(i=>{r[i]=Zt(t,i,n)}),r}const yb="$$material";function vt(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o=0)&&(n[i]=t[i]);return n}function O7(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var fre=/^((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|download|draggable|encType|enterKeyHint|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|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)-.*))$/,dre=O7(function(t){return fre.test(t)||t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)<91});function hre(t){if(t.sheet)return t.sheet;for(var e=0;e0?Eo(_v,--Ya):0,Zg--,Pi===10&&(Zg=1,AM--),Pi}function Fs(){return Pi=Ya2||Mx(Pi)>3?"":" "}function Cre(t,e){for(;--e&&Fs()&&!(Pi<48||Pi>102||Pi>57&&Pi<65||Pi>70&&Pi<97););return xb(t,iE()+(e<6&&Hu()==32&&Fs()==32))}function _R(t){for(;Fs();)switch(Pi){case t:return Ya;case 34:case 39:t!==34&&t!==39&&_R(Pi);break;case 40:t===41&&_R(t);break;case 92:Fs();break}return Ya}function Are(t,e){for(;Fs()&&t+Pi!==47+10;)if(t+Pi===42+42&&Hu()===47)break;return"/*"+xb(e,Ya-1)+"*"+CM(t===47?t:Fs())}function Tre(t){for(;!Mx(Hu());)Fs();return xb(t,Ya)}function Dre(t){return U7(aE("",null,null,null,[""],t=B7(t),0,[0],t))}function aE(t,e,n,r,i,o,a,s,l){for(var u=0,c=0,f=a,d=0,p=0,y=0,x=1,_=1,v=1,S=0,w="",E=i,T=o,C=r,D=w;_;)switch(y=S,S=Fs()){case 40:if(y!=108&&Eo(D,f-1)==58){bR(D+=Qn(oE(S),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:D+=oE(S);break;case 9:case 10:case 13:case 32:D+=Mre(y);break;case 92:D+=Cre(iE()-1,7);continue;case 47:switch(Hu()){case 42:case 47:Cw(Rre(Are(Fs(),iE()),e,n),l);break;default:D+="/"}break;case 123*x:s[u++]=Ou(D)*v;case 125*x:case 59:case 0:switch(S){case 0:case 125:_=0;case 59+c:v==-1&&(D=Qn(D,/\f/g,"")),p>0&&Ou(D)-f&&Cw(p>32?ML(D+";",r,n,f-1):ML(Qn(D," ","")+";",r,n,f-2),l);break;case 59:D+=";";default:if(Cw(C=EL(D,e,n,u,c,i,s,w,E=[],T=[],f),o),S===123)if(c===0)aE(D,e,C,C,E,o,f,s,T);else switch(d===99&&Eo(D,3)===110?100:d){case 100:case 108:case 109:case 115:aE(t,C,C,r&&Cw(EL(t,C,C,0,0,i,s,w,i,E=[],f),T),i,T,f,s,r?E:T);break;default:aE(D,C,C,C,[""],T,0,s,T)}}u=c=p=0,x=v=1,w=D="",f=a;break;case 58:f=1+Ou(D),p=y;default:if(x<1){if(S==123)--x;else if(S==125&&x++==0&&Ere()==125)continue}switch(D+=CM(S),S*x){case 38:v=c>0?1:(D+="\f",-1);break;case 44:s[u++]=(Ou(D)-1)*v,v=1;break;case 64:Hu()===45&&(D+=oE(Fs())),d=Hu(),c=f=Ou(w=D+=Tre(iE())),S++;break;case 45:y===45&&Ou(D)==2&&(x=0)}}return o}function EL(t,e,n,r,i,o,a,s,l,u,c){for(var f=i-1,d=i===0?o:[""],p=yO(d),y=0,x=0,_=0;y0?d[v]+" "+S:Qn(S,/&\f/g,d[v])))&&(l[_++]=w);return TM(t,e,n,i===0?gO:s,l,u,c)}function Rre(t,e,n){return TM(t,e,n,I7,CM(Sre()),Ex(t,2,-2),0)}function ML(t,e,n,r){return TM(t,e,n,vO,Ex(t,0,r),Ex(t,r+1,-1),r)}function Rg(t,e){for(var n="",r=yO(t),i=0;i6)switch(Eo(t,e+1)){case 109:if(Eo(t,e+4)!==45)break;case 102:return Qn(t,/(.+:)(.+)-([^]+)/,"$1"+Jn+"$2-$3$1"+YE+(Eo(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~bR(t,"stretch")?z7(Qn(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(Eo(t,e+1)!==115)break;case 6444:switch(Eo(t,Ou(t)-3-(~bR(t,"!important")&&10))){case 107:return Qn(t,":",":"+Jn)+t;case 101:return Qn(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Jn+(Eo(t,14)===45?"inline-":"")+"box$3$1"+Jn+"$2$3$1"+Go+"$2box$3")+t}break;case 5936:switch(Eo(t,e+11)){case 114:return Jn+t+Go+Qn(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return Jn+t+Go+Qn(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return Jn+t+Go+Qn(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return Jn+t+Go+t+t}return t}var Ure=function(e,n,r,i){if(e.length>-1&&!e.return)switch(e.type){case vO:e.return=z7(e.value,e.length);break;case F7:return Rg([$y(e,{value:Qn(e.value,"@","@"+Jn)})],i);case gO:if(e.length)return wre(e.props,function(o){switch(_re(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Rg([$y(e,{props:[Qn(o,/:(read-\w+)/,":"+YE+"$1")]})],i);case"::placeholder":return Rg([$y(e,{props:[Qn(o,/:(plac\w+)/,":"+Jn+"input-$1")]}),$y(e,{props:[Qn(o,/:(plac\w+)/,":"+YE+"$1")]}),$y(e,{props:[Qn(o,/:(plac\w+)/,Go+"input-$1")]})],i)}return""})}},zre=[Ure],$re=function(e){var n=e.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(x){var _=x.getAttribute("data-emotion");_.indexOf(" ")!==-1&&(document.head.appendChild(x),x.setAttribute("data-s",""))})}var i=e.stylisPlugins||zre,o={},a,s=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(x){for(var _=x.getAttribute("data-emotion").split(" "),v=1;v<_.length;v++)o[_[v]]=!0;s.push(x)});var l,u=[kre,Bre];{var c,f=[Pre,Ore(function(x){c.insert(x)})],d=Nre(u.concat(i,f)),p=function(_){return Rg(Dre(_),d)};l=function(_,v,S,w){c=S,p(_?_+"{"+v.styles+"}":v.styles),w&&(y.inserted[v.name]=!0)}}var y={key:n,sheet:new mre({key:n,container:a,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:o,registered:{},insert:l};return y.sheet.hydrate(s),y},$7={exports:{}},lr={};/** @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 mo=typeof Symbol=="function"&&Symbol.for,vO=mo?Symbol.for("react.element"):60103,yO=mo?Symbol.for("react.portal"):60106,DM=mo?Symbol.for("react.fragment"):60107,RM=mo?Symbol.for("react.strict_mode"):60108,PM=mo?Symbol.for("react.profiler"):60114,NM=mo?Symbol.for("react.provider"):60109,OM=mo?Symbol.for("react.context"):60110,xO=mo?Symbol.for("react.async_mode"):60111,IM=mo?Symbol.for("react.concurrent_mode"):60111,FM=mo?Symbol.for("react.forward_ref"):60112,LM=mo?Symbol.for("react.suspense"):60113,Fre=mo?Symbol.for("react.suspense_list"):60120,kM=mo?Symbol.for("react.memo"):60115,BM=mo?Symbol.for("react.lazy"):60116,Lre=mo?Symbol.for("react.block"):60121,kre=mo?Symbol.for("react.fundamental"):60117,Bre=mo?Symbol.for("react.responder"):60118,Ure=mo?Symbol.for("react.scope"):60119;function Vs(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case vO:switch(t=t.type,t){case xO:case IM:case DM:case PM:case RM:case LM:return t;default:switch(t=t&&t.$$typeof,t){case OM:case FM:case BM:case kM:case NM:return t;default:return e}}case yO:return e}}}function U7(t){return Vs(t)===IM}lr.AsyncMode=xO;lr.ConcurrentMode=IM;lr.ContextConsumer=OM;lr.ContextProvider=NM;lr.Element=vO;lr.ForwardRef=FM;lr.Fragment=DM;lr.Lazy=BM;lr.Memo=kM;lr.Portal=yO;lr.Profiler=PM;lr.StrictMode=RM;lr.Suspense=LM;lr.isAsyncMode=function(t){return U7(t)||Vs(t)===xO};lr.isConcurrentMode=U7;lr.isContextConsumer=function(t){return Vs(t)===OM};lr.isContextProvider=function(t){return Vs(t)===NM};lr.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===vO};lr.isForwardRef=function(t){return Vs(t)===FM};lr.isFragment=function(t){return Vs(t)===DM};lr.isLazy=function(t){return Vs(t)===BM};lr.isMemo=function(t){return Vs(t)===kM};lr.isPortal=function(t){return Vs(t)===yO};lr.isProfiler=function(t){return Vs(t)===PM};lr.isStrictMode=function(t){return Vs(t)===RM};lr.isSuspense=function(t){return Vs(t)===LM};lr.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===DM||t===IM||t===PM||t===RM||t===LM||t===Fre||typeof t=="object"&&t!==null&&(t.$$typeof===BM||t.$$typeof===kM||t.$$typeof===NM||t.$$typeof===OM||t.$$typeof===FM||t.$$typeof===kre||t.$$typeof===Bre||t.$$typeof===Ure||t.$$typeof===Lre)};lr.typeOf=Vs;B7.exports=lr;var zre=B7.exports,z7=zre,$re={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Hre={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},$7={};$7[z7.ForwardRef]=$re;$7[z7.Memo]=Hre;var Vre=!0;function Wre(t,e,n){var r="";return n.split(" ").forEach(function(i){t[i]!==void 0?e.push(t[i]+";"):r+=i+" "}),r}var H7=function(e,n,r){var i=e.key+"-"+n.name;(r===!1||Vre===!1)&&e.registered[i]===void 0&&(e.registered[i]=n.styles)},V7=function(e,n,r){H7(e,n,r);var i=e.key+"-"+n.name;if(e.inserted[n.name]===void 0){var o=n;do e.insert(n===o?"."+i:"",o,e.sheet,!0),o=o.next;while(o!==void 0)}};function Gre(t){for(var e=0,n,r=0,i=t.length;i>=4;++r,i-=4)n=t.charCodeAt(r)&255|(t.charCodeAt(++r)&255)<<8|(t.charCodeAt(++r)&255)<<16|(t.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(t.charCodeAt(r+2)&255)<<16;case 2:e^=(t.charCodeAt(r+1)&255)<<8;case 1:e^=t.charCodeAt(r)&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 jre={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,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},qre=/[A-Z]|^ms/g,Xre=/_EMO_([^_]+?)_([^]*?)_EMO_/g,W7=function(e){return e.charCodeAt(1)===45},CL=function(e){return e!=null&&typeof e!="boolean"},LT=R7(function(t){return W7(t)?t:t.replace(qre,"-$&").toLowerCase()}),AL=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(Xre,function(r,i,o){return Fu={name:i,styles:o,next:Fu},i})}return jre[e]!==1&&!W7(e)&&typeof n=="number"&&n!==0?n+"px":n};function Ex(t,e,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return Fu={name:n.name,styles:n.styles,next:Fu},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)Fu={name:r.name,styles:r.styles,next:Fu},r=r.next;var i=n.styles+";";return i}return Yre(t,e,n)}case"function":{if(t!==void 0){var o=Fu,a=n(t);return Fu=o,Ex(t,e,a)}break}}if(e==null)return n;var s=e[n];return s!==void 0?s:n}function Yre(t,e,n){var r="";if(Array.isArray(n))for(var i=0;i96?eie:tie},PL=function(e,n,r){var i;if(n){var o=n.shouldForwardProp;i=e.__emotion_forwardProp&&o?function(a){return e.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&r&&(i=e.__emotion_forwardProp),i},nie=function(e){var n=e.cache,r=e.serialized,i=e.isStringTag;return H7(n,r,i),Zre(function(){return V7(n,r,i)}),null},rie=function t(e,n){var r=e.__emotion_real===e,i=r&&e.__emotion_base||e,o,a;n!==void 0&&(o=n.label,a=n.target);var s=PL(e,n,r),l=s||RL(i),u=!l("as");return function(){var c=arguments,f=r&&e.__emotion_styles!==void 0?e.__emotion_styles.slice(0):[];if(o!==void 0&&f.push("label:"+o+";"),c[0]==null||c[0].raw===void 0)f.push.apply(f,c);else{f.push(c[0][0]);for(var d=c.length,p=1;pe(oie(i)?n:i):e;return F.jsx(Jre,{styles:r})}/** + */var go=typeof Symbol=="function"&&Symbol.for,xO=go?Symbol.for("react.element"):60103,bO=go?Symbol.for("react.portal"):60106,DM=go?Symbol.for("react.fragment"):60107,RM=go?Symbol.for("react.strict_mode"):60108,PM=go?Symbol.for("react.profiler"):60114,NM=go?Symbol.for("react.provider"):60109,OM=go?Symbol.for("react.context"):60110,_O=go?Symbol.for("react.async_mode"):60111,IM=go?Symbol.for("react.concurrent_mode"):60111,FM=go?Symbol.for("react.forward_ref"):60112,LM=go?Symbol.for("react.suspense"):60113,Hre=go?Symbol.for("react.suspense_list"):60120,kM=go?Symbol.for("react.memo"):60115,BM=go?Symbol.for("react.lazy"):60116,Vre=go?Symbol.for("react.block"):60121,Wre=go?Symbol.for("react.fundamental"):60117,Gre=go?Symbol.for("react.responder"):60118,jre=go?Symbol.for("react.scope"):60119;function Vs(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case xO:switch(t=t.type,t){case _O:case IM:case DM:case PM:case RM:case LM:return t;default:switch(t=t&&t.$$typeof,t){case OM:case FM:case BM:case kM:case NM:return t;default:return e}}case bO:return e}}}function H7(t){return Vs(t)===IM}lr.AsyncMode=_O;lr.ConcurrentMode=IM;lr.ContextConsumer=OM;lr.ContextProvider=NM;lr.Element=xO;lr.ForwardRef=FM;lr.Fragment=DM;lr.Lazy=BM;lr.Memo=kM;lr.Portal=bO;lr.Profiler=PM;lr.StrictMode=RM;lr.Suspense=LM;lr.isAsyncMode=function(t){return H7(t)||Vs(t)===_O};lr.isConcurrentMode=H7;lr.isContextConsumer=function(t){return Vs(t)===OM};lr.isContextProvider=function(t){return Vs(t)===NM};lr.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===xO};lr.isForwardRef=function(t){return Vs(t)===FM};lr.isFragment=function(t){return Vs(t)===DM};lr.isLazy=function(t){return Vs(t)===BM};lr.isMemo=function(t){return Vs(t)===kM};lr.isPortal=function(t){return Vs(t)===bO};lr.isProfiler=function(t){return Vs(t)===PM};lr.isStrictMode=function(t){return Vs(t)===RM};lr.isSuspense=function(t){return Vs(t)===LM};lr.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===DM||t===IM||t===PM||t===RM||t===LM||t===Hre||typeof t=="object"&&t!==null&&(t.$$typeof===BM||t.$$typeof===kM||t.$$typeof===NM||t.$$typeof===OM||t.$$typeof===FM||t.$$typeof===Wre||t.$$typeof===Gre||t.$$typeof===jre||t.$$typeof===Vre)};lr.typeOf=Vs;$7.exports=lr;var qre=$7.exports,V7=qre,Xre={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Yre={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},W7={};W7[V7.ForwardRef]=Xre;W7[V7.Memo]=Yre;var Kre=!0;function Zre(t,e,n){var r="";return n.split(" ").forEach(function(i){t[i]!==void 0?e.push(t[i]+";"):r+=i+" "}),r}var G7=function(e,n,r){var i=e.key+"-"+n.name;(r===!1||Kre===!1)&&e.registered[i]===void 0&&(e.registered[i]=n.styles)},j7=function(e,n,r){G7(e,n,r);var i=e.key+"-"+n.name;if(e.inserted[n.name]===void 0){var o=n;do e.insert(n===o?"."+i:"",o,e.sheet,!0),o=o.next;while(o!==void 0)}};function Jre(t){for(var e=0,n,r=0,i=t.length;i>=4;++r,i-=4)n=t.charCodeAt(r)&255|(t.charCodeAt(++r)&255)<<8|(t.charCodeAt(++r)&255)<<16|(t.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(t.charCodeAt(r+2)&255)<<16;case 2:e^=(t.charCodeAt(r+1)&255)<<8;case 1:e^=t.charCodeAt(r)&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 Qre={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,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},eie=/[A-Z]|^ms/g,tie=/_EMO_([^_]+?)_([^]*?)_EMO_/g,q7=function(e){return e.charCodeAt(1)===45},AL=function(e){return e!=null&&typeof e!="boolean"},kT=O7(function(t){return q7(t)?t:t.replace(eie,"-$&").toLowerCase()}),TL=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(tie,function(r,i,o){return Iu={name:i,styles:o,next:Iu},i})}return Qre[e]!==1&&!q7(e)&&typeof n=="number"&&n!==0?n+"px":n};function Cx(t,e,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return Iu={name:n.name,styles:n.styles,next:Iu},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)Iu={name:r.name,styles:r.styles,next:Iu},r=r.next;var i=n.styles+";";return i}return nie(t,e,n)}case"function":{if(t!==void 0){var o=Iu,a=n(t);return Iu=o,Cx(t,e,a)}break}}if(e==null)return n;var s=e[n];return s!==void 0?s:n}function nie(t,e,n){var r="";if(Array.isArray(n))for(var i=0;i96?sie:lie},NL=function(e,n,r){var i;if(n){var o=n.shouldForwardProp;i=e.__emotion_forwardProp&&o?function(a){return e.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&r&&(i=e.__emotion_forwardProp),i},uie=function(e){var n=e.cache,r=e.serialized,i=e.isStringTag;return G7(n,r,i),iie(function(){return j7(n,r,i)}),null},cie=function t(e,n){var r=e.__emotion_real===e,i=r&&e.__emotion_base||e,o,a;n!==void 0&&(o=n.label,a=n.target);var s=NL(e,n,r),l=s||PL(i),u=!l("as");return function(){var c=arguments,f=r&&e.__emotion_styles!==void 0?e.__emotion_styles.slice(0):[];if(o!==void 0&&f.push("label:"+o+";"),c[0]==null||c[0].raw===void 0)f.push.apply(f,c);else{f.push(c[0][0]);for(var d=c.length,p=1;pe(die(i)?n:i):e;return F.jsx(oie,{styles:r})}/** * @mui/styled-engine v5.14.17 * * @license MIT * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */function X7(t,e){return bR(t,e)}const sie=(t,e)=>{Array.isArray(t.__emotion_styles)&&(t.__emotion_styles=e(t.__emotion_styles))},lie=["values","unit","step"],uie=t=>{const e=Object.keys(t).map(n=>({key:n,val:t[n]}))||[];return e.sort((n,r)=>n.val-r.val),e.reduce((n,r)=>Q({},n,{[r.key]:r.val}),{})};function cie(t){const{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=t,i=yt(t,lie),o=uie(e),a=Object.keys(o);function s(d){return`@media (min-width:${typeof e[d]=="number"?e[d]:d}${n})`}function l(d){return`@media (max-width:${(typeof e[d]=="number"?e[d]:d)-r/100}${n})`}function u(d,p){const y=a.indexOf(p);return`@media (min-width:${typeof e[d]=="number"?e[d]:d}${n}) and (max-width:${(y!==-1&&typeof e[a[y]]=="number"?e[a[y]]:p)-r/100}${n})`}function c(d){return a.indexOf(d)+1`@media (min-width:${SO[t]}px)`};function Ka(t,e,n){const r=t.theme||{};if(Array.isArray(e)){const o=r.breakpoints||NL;return e.reduce((a,s,l)=>(a[o.up(o.keys[l])]=n(e[l]),a),{})}if(typeof e=="object"){const o=r.breakpoints||NL;return Object.keys(e).reduce((a,s)=>{if(Object.keys(o.values||SO).indexOf(s)!==-1){const l=o.up(s);a[l]=n(e[s],s)}else{const l=s;a[l]=e[l]}return a},{})}return n(e)}function Y7(t={}){var e;return((e=t.keys)==null?void 0:e.reduce((r,i)=>{const o=t.up(i);return r[o]={},r},{}))||{}}function K7(t,e){return t.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},e)}function hie(t,...e){const n=Y7(t),r=[n,...e].reduce((i,o)=>Xo(i,o),{});return K7(Object.keys(n),r)}function pie(t,e){if(typeof t!="object")return{};const n={},r=Object.keys(e);return Array.isArray(t)?r.forEach((i,o)=>{o{t[i]!=null&&(n[i]=!0)}),n}function Sp({values:t,breakpoints:e,base:n}){const r=n||pie(t,e),i=Object.keys(r);if(i.length===0)return t;let o;return i.reduce((a,s,l)=>(Array.isArray(t)?(a[s]=t[l]!=null?t[l]:t[o],o=l):typeof t=="object"?(a[s]=t[s]!=null?t[s]:t[o],o=s):a[s]=t,a),{})}function UM(t,e,n=!0){if(!e||typeof e!="string")return null;if(t&&t.vars&&n){const r=`vars.${e}`.split(".").reduce((i,o)=>i&&i[o]?i[o]:null,t);if(r!=null)return r}return e.split(".").reduce((r,i)=>r&&r[i]!=null?r[i]:null,t)}function KE(t,e,n,r=n){let i;return typeof t=="function"?i=t(n):Array.isArray(t)?i=t[n]||r:i=UM(t,n)||r,e&&(i=e(i,r,t)),i}function or(t){const{prop:e,cssProperty:n=t.prop,themeKey:r,transform:i}=t,o=a=>{if(a[e]==null)return null;const s=a[e],l=a.theme,u=UM(l,r)||{};return Ka(a,s,f=>{let d=KE(u,i,f);return f===d&&typeof f=="string"&&(d=KE(u,i,`${e}${f==="default"?"":it(f)}`,f)),n===!1?d:{[n]:d}})};return o.propTypes={},o.filterProps=[e],o}function mie(t){const e={};return n=>(e[n]===void 0&&(e[n]=t(n)),e[n])}const gie={m:"margin",p:"padding"},vie={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},OL={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},yie=mie(t=>{if(t.length>2)if(OL[t])t=OL[t];else return[t];const[e,n]=t.split(""),r=gie[e],i=vie[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),EO=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],MO=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...EO,...MO];function xb(t,e,n,r){var i;const o=(i=UM(t,e,!1))!=null?i:n;return typeof o=="number"?a=>typeof a=="string"?a:o*a:Array.isArray(o)?a=>typeof a=="string"?a:o[a]:typeof o=="function"?o:()=>{}}function CO(t){return xb(t,"spacing",8)}function Bp(t,e){if(typeof e=="string"||e==null)return e;const n=Math.abs(e),r=t(n);return e>=0?r:typeof r=="number"?-r:`-${r}`}function xie(t,e){return n=>t.reduce((r,i)=>(r[i]=Bp(e,n),r),{})}function bie(t,e,n,r){if(e.indexOf(n)===-1)return null;const i=yie(n),o=xie(i,r),a=t[n];return Ka(t,a,o)}function Z7(t,e){const n=CO(t.theme);return Object.keys(t).map(r=>bie(t,e,r,n)).reduce(L1,{})}function ai(t){return Z7(t,EO)}ai.propTypes={};ai.filterProps=EO;function si(t){return Z7(t,MO)}si.propTypes={};si.filterProps=MO;function _ie(t=8){if(t.mui)return t;const e=CO({spacing:t}),n=(...r)=>(r.length===0?[1]:r).map(o=>{const a=e(o);return typeof a=="number"?`${a}px`:a}).join(" ");return n.mui=!0,n}function zM(...t){const e=t.reduce((r,i)=>(i.filterProps.forEach(o=>{r[o]=i}),r),{}),n=r=>Object.keys(r).reduce((i,o)=>e[o]?L1(i,e[o](r)):i,{});return n.propTypes={},n.filterProps=t.reduce((r,i)=>r.concat(i.filterProps),[]),n}function Bu(t){return typeof t!="number"?t:`${t}px solid`}const wie=or({prop:"border",themeKey:"borders",transform:Bu}),Sie=or({prop:"borderTop",themeKey:"borders",transform:Bu}),Eie=or({prop:"borderRight",themeKey:"borders",transform:Bu}),Mie=or({prop:"borderBottom",themeKey:"borders",transform:Bu}),Cie=or({prop:"borderLeft",themeKey:"borders",transform:Bu}),Aie=or({prop:"borderColor",themeKey:"palette"}),Tie=or({prop:"borderTopColor",themeKey:"palette"}),Die=or({prop:"borderRightColor",themeKey:"palette"}),Rie=or({prop:"borderBottomColor",themeKey:"palette"}),Pie=or({prop:"borderLeftColor",themeKey:"palette"}),$M=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){const e=xb(t.theme,"shape.borderRadius",4),n=r=>({borderRadius:Bp(e,r)});return Ka(t,t.borderRadius,n)}return null};$M.propTypes={};$M.filterProps=["borderRadius"];zM(wie,Sie,Eie,Mie,Cie,Aie,Tie,Die,Rie,Pie,$M);const HM=t=>{if(t.gap!==void 0&&t.gap!==null){const e=xb(t.theme,"spacing",8),n=r=>({gap:Bp(e,r)});return Ka(t,t.gap,n)}return null};HM.propTypes={};HM.filterProps=["gap"];const VM=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){const e=xb(t.theme,"spacing",8),n=r=>({columnGap:Bp(e,r)});return Ka(t,t.columnGap,n)}return null};VM.propTypes={};VM.filterProps=["columnGap"];const WM=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){const e=xb(t.theme,"spacing",8),n=r=>({rowGap:Bp(e,r)});return Ka(t,t.rowGap,n)}return null};WM.propTypes={};WM.filterProps=["rowGap"];const Nie=or({prop:"gridColumn"}),Oie=or({prop:"gridRow"}),Iie=or({prop:"gridAutoFlow"}),Fie=or({prop:"gridAutoColumns"}),Lie=or({prop:"gridAutoRows"}),kie=or({prop:"gridTemplateColumns"}),Bie=or({prop:"gridTemplateRows"}),Uie=or({prop:"gridTemplateAreas"}),zie=or({prop:"gridArea"});zM(HM,VM,WM,Nie,Oie,Iie,Fie,Lie,kie,Bie,Uie,zie);function Rg(t,e){return e==="grey"?e:t}const $ie=or({prop:"color",themeKey:"palette",transform:Rg}),Hie=or({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Rg}),Vie=or({prop:"backgroundColor",themeKey:"palette",transform:Rg});zM($ie,Hie,Vie);function Ts(t){return t<=1&&t!==0?`${t*100}%`:t}const Wie=or({prop:"width",transform:Ts}),AO=t=>{if(t.maxWidth!==void 0&&t.maxWidth!==null){const e=n=>{var r,i;const o=((r=t.theme)==null||(r=r.breakpoints)==null||(r=r.values)==null?void 0:r[n])||SO[n];return o?((i=t.theme)==null||(i=i.breakpoints)==null?void 0:i.unit)!=="px"?{maxWidth:`${o}${t.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:Ts(n)}};return Ka(t,t.maxWidth,e)}return null};AO.filterProps=["maxWidth"];const Gie=or({prop:"minWidth",transform:Ts}),jie=or({prop:"height",transform:Ts}),qie=or({prop:"maxHeight",transform:Ts}),Xie=or({prop:"minHeight",transform:Ts});or({prop:"size",cssProperty:"width",transform:Ts});or({prop:"size",cssProperty:"height",transform:Ts});const Yie=or({prop:"boxSizing"});zM(Wie,AO,Gie,jie,qie,Xie,Yie);const Kie={border:{themeKey:"borders",transform:Bu},borderTop:{themeKey:"borders",transform:Bu},borderRight:{themeKey:"borders",transform:Bu},borderBottom:{themeKey:"borders",transform:Bu},borderLeft:{themeKey:"borders",transform:Bu},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:$M},color:{themeKey:"palette",transform:Rg},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Rg},backgroundColor:{themeKey:"palette",transform:Rg},p:{style:si},pt:{style:si},pr:{style:si},pb:{style:si},pl:{style:si},px:{style:si},py:{style:si},padding:{style:si},paddingTop:{style:si},paddingRight:{style:si},paddingBottom:{style:si},paddingLeft:{style:si},paddingX:{style:si},paddingY:{style:si},paddingInline:{style:si},paddingInlineStart:{style:si},paddingInlineEnd:{style:si},paddingBlock:{style:si},paddingBlockStart:{style:si},paddingBlockEnd:{style:si},m:{style:ai},mt:{style:ai},mr:{style:ai},mb:{style:ai},ml:{style:ai},mx:{style:ai},my:{style:ai},margin:{style:ai},marginTop:{style:ai},marginRight:{style:ai},marginBottom:{style:ai},marginLeft:{style:ai},marginX:{style:ai},marginY:{style:ai},marginInline:{style:ai},marginInlineStart:{style:ai},marginInlineEnd:{style:ai},marginBlock:{style:ai},marginBlockStart:{style:ai},marginBlockEnd:{style:ai},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:HM},rowGap:{style:WM},columnGap:{style:VM},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Ts},maxWidth:{style:AO},minWidth:{transform:Ts},height:{transform:Ts},maxHeight:{transform:Ts},minHeight:{transform:Ts},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},GM=Kie;function Zie(...t){const e=t.reduce((r,i)=>r.concat(Object.keys(i)),[]),n=new Set(e);return t.every(r=>n.size===Object.keys(r).length)}function Jie(t,e){return typeof t=="function"?t(e):t}function Qie(){function t(n,r,i,o){const a={[n]:r,theme:i},s=o[n];if(!s)return{[n]:r};const{cssProperty:l=n,themeKey:u,transform:c,style:f}=s;if(r==null)return null;if(u==="typography"&&r==="inherit")return{[n]:r};const d=UM(i,u)||{};return f?f(a):Ka(a,r,y=>{let x=KE(d,c,y);return y===x&&typeof y=="string"&&(x=KE(d,c,`${n}${y==="default"?"":it(y)}`,y)),l===!1?x:{[l]:x}})}function e(n){var r;const{sx:i,theme:o={}}=n||{};if(!i)return null;const a=(r=o.unstable_sxConfig)!=null?r:GM;function s(l){let u=l;if(typeof l=="function")u=l(o);else if(typeof l!="object")return l;if(!u)return null;const c=Y7(o.breakpoints),f=Object.keys(c);let d=c;return Object.keys(u).forEach(p=>{const y=Jie(u[p],o);if(y!=null)if(typeof y=="object")if(a[p])d=L1(d,t(p,y,o,a));else{const x=Ka({theme:o},y,_=>({[p]:_}));Zie(x,y)?d[p]=e({sx:y,theme:o}):d=L1(d,x)}else d=L1(d,t(p,y,o,a))}),K7(f,d)}return Array.isArray(i)?i.map(s):s(i)}return e}const J7=Qie();J7.filterProps=["sx"];const jM=J7,eoe=["breakpoints","palette","spacing","shape"];function qM(t={},...e){const{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=t,a=yt(t,eoe),s=cie(n),l=_ie(i);let u=Xo({breakpoints:s,direction:"ltr",components:{},palette:Q({mode:"light"},r),spacing:l,shape:Q({},die,o)},a);return u=e.reduce((c,f)=>Xo(c,f),u),u.unstable_sxConfig=Q({},GM,a==null?void 0:a.unstable_sxConfig),u.unstable_sx=function(f){return jM({sx:f,theme:this})},u}function toe(t){return Object.keys(t).length===0}function Q7(t=null){const e=H.useContext(_O);return!e||toe(e)?t:e}const noe=qM();function XM(t=noe){return Q7(t)}function roe({styles:t,themeId:e,defaultTheme:n={}}){const r=XM(n),i=typeof t=="function"?t(e&&r[e]||r):t;return F.jsx(aie,{styles:i})}const ioe=["sx"],ooe=t=>{var e,n;const r={systemProps:{},otherProps:{}},i=(e=t==null||(n=t.theme)==null?void 0:n.unstable_sxConfig)!=null?e:GM;return Object.keys(t).forEach(o=>{i[o]?r.systemProps[o]=t[o]:r.otherProps[o]=t[o]}),r};function YM(t){const{sx:e}=t,n=yt(t,ioe),{systemProps:r,otherProps:i}=ooe(n);let o;return Array.isArray(e)?o=[r,...e]:typeof e=="function"?o=(...a)=>{const s=e(...a);return zc(s)?Q({},r,s):r}:o=Q({},r,e),Q({},i,{sx:o})}function eH(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;es!=="theme"&&s!=="sx"&&s!=="as"})(jM);return H.forwardRef(function(l,u){const c=XM(n),f=YM(l),{className:d,component:p="div"}=f,y=yt(f,aoe);return F.jsx(o,Q({as:p,ref:u,className:bt(d,i?i(r):r),theme:e&&c[e]||c},y))})}const loe=["variant"];function IL(t){return t.length===0}function tH(t){const{variant:e}=t,n=yt(t,loe);let r=e||"";return Object.keys(n).sort().forEach(i=>{i==="color"?r+=IL(r)?t[i]:it(t[i]):r+=`${IL(r)?i:it(i)}${it(t[i].toString())}`}),r}const uoe=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function coe(t){return Object.keys(t).length===0}function foe(t){return typeof t=="string"&&t.charCodeAt(0)>96}const doe=(t,e)=>e.components&&e.components[t]&&e.components[t].styleOverrides?e.components[t].styleOverrides:null,ZE=t=>{const e={};return t&&t.forEach(n=>{const r=tH(n.props);e[r]=n.style}),e},hoe=(t,e)=>{let n=[];return e&&e.components&&e.components[t]&&e.components[t].variants&&(n=e.components[t].variants),ZE(n)},JE=(t,e,n)=>{const{ownerState:r={}}=t,i=[];return n&&n.forEach(o=>{let a=!0;Object.keys(o.props).forEach(s=>{r[s]!==o.props[s]&&t[s]!==o.props[s]&&(a=!1)}),a&&i.push(e[tH(o.props)])}),i},poe=(t,e,n,r)=>{var i;const o=n==null||(i=n.components)==null||(i=i[r])==null?void 0:i.variants;return JE(t,e,o)};function k1(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const moe=qM(),goe=t=>t&&t.charAt(0).toLowerCase()+t.slice(1);function sE({defaultTheme:t,theme:e,themeId:n}){return coe(e)?t:e[n]||e}function voe(t){return t?(e,n)=>n[t]:null}const FL=({styledArg:t,props:e,defaultTheme:n,themeId:r})=>{const i=t(Q({},e,{theme:sE(Q({},e,{defaultTheme:n,themeId:r}))}));let o;if(i&&i.variants&&(o=i.variants,delete i.variants),o){const a=JE(e,ZE(o),o);return[i,...a]}return i};function nH(t={}){const{themeId:e,defaultTheme:n=moe,rootShouldForwardProp:r=k1,slotShouldForwardProp:i=k1}=t,o=a=>jM(Q({},a,{theme:sE(Q({},a,{defaultTheme:n,themeId:e}))}));return o.__mui_systemSx=!0,(a,s={})=>{sie(a,E=>E.filter(T=>!(T!=null&&T.__mui_systemSx)));const{name:l,slot:u,skipVariantsResolver:c,skipSx:f,overridesResolver:d=voe(goe(u))}=s,p=yt(s,uoe),y=c!==void 0?c:u&&u!=="Root"&&u!=="root"||!1,x=f||!1;let _,v=k1;u==="Root"||u==="root"?v=r:u?v=i:foe(a)&&(v=void 0);const S=X7(a,Q({shouldForwardProp:v,label:_},p)),w=(E,...T)=>{const C=T?T.map(N=>{if(typeof N=="function"&&N.__emotion_real!==N)return k=>FL({styledArg:N,props:k,defaultTheme:n,themeId:e});if(zc(N)){let k=N,G;return N&&N.variants&&(G=N.variants,delete k.variants,k=Z=>{let j=N;return JE(Z,ZE(G),G).forEach(Y=>{j=Xo(j,Y)}),j}),k}return N}):[];let D=E;if(zc(E)){let N;E&&E.variants&&(N=E.variants,delete D.variants,D=k=>{let G=E;return JE(k,ZE(N),N).forEach(j=>{G=Xo(G,j)}),G})}else typeof E=="function"&&E.__emotion_real!==E&&(D=N=>FL({styledArg:E,props:N,defaultTheme:n,themeId:e}));l&&d&&C.push(N=>{const k=sE(Q({},N,{defaultTheme:n,themeId:e})),G=doe(l,k);if(G){const Z={};return Object.entries(G).forEach(([j,K])=>{Z[j]=typeof K=="function"?K(Q({},N,{theme:k})):K}),d(N,Z)}return null}),l&&!y&&C.push(N=>{const k=sE(Q({},N,{defaultTheme:n,themeId:e}));return poe(N,hoe(l,k),k,l)}),x||C.push(o);const O=C.length-T.length;if(Array.isArray(E)&&O>0){const N=new Array(O).fill("");D=[...E,...N],D.raw=[...E.raw,...N]}const P=S(D,...C);return a.muiName&&(P.muiName=a.muiName),P};return S.withConfig&&(w.withConfig=S.withConfig),w}}const yoe=nH(),xoe=yoe;function boe(t){const{theme:e,name:n,props:r}=t;return!e||!e.components||!e.components[n]||!e.components[n].defaultProps?r:dO(e.components[n].defaultProps,r)}function rH({props:t,name:e,defaultTheme:n,themeId:r}){let i=XM(n);return r&&(i=i[r]||i),boe({theme:i,name:e,props:t})}function TO(t,e=0,n=1){return Math.min(Math.max(e,t),n)}function _oe(t){t=t.slice(1);const e=new RegExp(`.{1,${t.length>=6?2:1}}`,"g");let n=t.match(e);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,i)=>i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function Up(t){if(t.type)return t;if(t.charAt(0)==="#")return Up(_oe(t));const e=t.indexOf("("),n=t.substring(0,e);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(Bd(9,t));let r=t.substring(e+1,t.length-1),i;if(n==="color"){if(r=r.split(" "),i=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i)===-1)throw new Error(Bd(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}function KM(t){const{type:e,colorSpace:n}=t;let{values:r}=t;return e.indexOf("rgb")!==-1?r=r.map((i,o)=>o<3?parseInt(i,10):i):e.indexOf("hsl")!==-1&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),e.indexOf("color")!==-1?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${e}(${r})`}function woe(t){t=Up(t);const{values:e}=t,n=e[0],r=e[1]/100,i=e[2]/100,o=r*Math.min(i,1-i),a=(u,c=(u+n/30)%12)=>i-o*Math.max(Math.min(c-3,9-c,1),-1);let s="rgb";const l=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return t.type==="hsla"&&(s+="a",l.push(e[3])),KM({type:s,values:l})}function LL(t){t=Up(t);let e=t.type==="hsl"||t.type==="hsla"?Up(woe(t)).values:t.values;return e=e.map(n=>(t.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3))}function Soe(t,e){const n=LL(t),r=LL(e);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function zn(t,e){return t=Up(t),e=TO(e),(t.type==="rgb"||t.type==="hsl")&&(t.type+="a"),t.type==="color"?t.values[3]=`/${e}`:t.values[3]=e,KM(t)}function iH(t,e){if(t=Up(t),e=TO(e),t.type.indexOf("hsl")!==-1)t.values[2]*=1-e;else if(t.type.indexOf("rgb")!==-1||t.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)t.values[n]*=1-e;return KM(t)}function oH(t,e){if(t=Up(t),e=TO(e),t.type.indexOf("hsl")!==-1)t.values[2]+=(100-t.values[2])*e;else if(t.type.indexOf("rgb")!==-1)for(let n=0;n<3;n+=1)t.values[n]+=(255-t.values[n])*e;else if(t.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)t.values[n]+=(1-t.values[n])*e;return KM(t)}const Eoe=["component","direction","spacing","divider","children","className","useFlexGap"],Moe=qM(),Coe=xoe("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root});function Aoe(t){return rH({props:t,name:"MuiStack",defaultTheme:Moe})}function Toe(t,e){const n=H.Children.toArray(t).filter(Boolean);return n.reduce((r,i,o)=>(r.push(i),o({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[t],Roe=({ownerState:t,theme:e})=>{let n=Q({display:"flex",flexDirection:"column"},Ka({theme:e},Sp({values:t.direction,breakpoints:e.breakpoints.values}),r=>({flexDirection:r})));if(t.spacing){const r=CO(e),i=Object.keys(e.breakpoints.values).reduce((l,u)=>((typeof t.spacing=="object"&&t.spacing[u]!=null||typeof t.direction=="object"&&t.direction[u]!=null)&&(l[u]=!0),l),{}),o=Sp({values:t.direction,base:i}),a=Sp({values:t.spacing,base:i});typeof o=="object"&&Object.keys(o).forEach((l,u,c)=>{if(!o[l]){const d=u>0?o[c[u-1]]:"column";o[l]=d}}),n=Xo(n,Ka({theme:e},a,(l,u)=>t.useFlexGap?{gap:Bp(r,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${Doe(u?o[u]:t.direction)}`]:Bp(r,l)}}))}return n=hie(e.breakpoints,n),n};function aH(t={}){const{createStyledComponent:e=Coe,useThemeProps:n=Aoe,componentName:r="MuiStack"}=t,i=()=>nn({root:["root"]},l=>Qt(r,l),{}),o=e(Roe);return H.forwardRef(function(l,u){const c=n(l),f=YM(c),{component:d="div",direction:p="column",spacing:y=0,divider:x,children:_,className:v,useFlexGap:S=!1}=f,w=yt(f,Eoe),E={direction:p,spacing:y,useFlexGap:S},T=i();return F.jsx(o,Q({as:d,ownerState:E,ref:u,className:bt(T.root,v)},w,{children:x?Toe(_,x):_}))})}const Poe=aH(),Cw=Poe;function Noe(t,e){return Q({toolbar:{minHeight:56,[t.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[t.up("sm")]:{minHeight:64}}},e)}const Ooe=["mode","contrastThreshold","tonalOffset"],kL={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:bx.white,default:bx.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}},kT={text:{primary:bx.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:bx.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}};function BL(t,e,n,r){const i=r.light||r,o=r.dark||r*1.5;t[e]||(t.hasOwnProperty(n)?t[e]=t[n]:e==="light"?t.light=oH(t.main,i):e==="dark"&&(t.dark=iH(t.main,o)))}function Ioe(t="light"){return t==="dark"?{main:t0[200],light:t0[50],dark:t0[400]}:{main:t0[700],light:t0[400],dark:t0[800]}}function Foe(t="light"){return t==="dark"?{main:e0[200],light:e0[50],dark:e0[400]}:{main:e0[500],light:e0[300],dark:e0[700]}}function Loe(t="light"){return t==="dark"?{main:Qm[500],light:Qm[300],dark:Qm[700]}:{main:Qm[700],light:Qm[400],dark:Qm[800]}}function koe(t="light"){return t==="dark"?{main:n0[400],light:n0[300],dark:n0[700]}:{main:n0[700],light:n0[500],dark:n0[900]}}function Boe(t="light"){return t==="dark"?{main:r0[400],light:r0[300],dark:r0[700]}:{main:r0[800],light:r0[500],dark:r0[900]}}function Uoe(t="light"){return t==="dark"?{main:ky[400],light:ky[300],dark:ky[700]}:{main:"#ed6c02",light:ky[500],dark:ky[900]}}function zoe(t){const{mode:e="light",contrastThreshold:n=3,tonalOffset:r=.2}=t,i=yt(t,Ooe),o=t.primary||Ioe(e),a=t.secondary||Foe(e),s=t.error||Loe(e),l=t.info||koe(e),u=t.success||Boe(e),c=t.warning||Uoe(e);function f(x){return Soe(x,kT.text.primary)>=n?kT.text.primary:kL.text.primary}const d=({color:x,name:_,mainShade:v=500,lightShade:S=300,darkShade:w=700})=>{if(x=Q({},x),!x.main&&x[v]&&(x.main=x[v]),!x.hasOwnProperty("main"))throw new Error(Bd(11,_?` (${_})`:"",v));if(typeof x.main!="string")throw new Error(Bd(12,_?` (${_})`:"",JSON.stringify(x.main)));return BL(x,"light",S,r),BL(x,"dark",w,r),x.contrastText||(x.contrastText=f(x.main)),x},p={dark:kT,light:kL};return Xo(Q({common:Q({},bx),mode:e,primary:d({color:o,name:"primary"}),secondary:d({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:d({color:s,name:"error"}),warning:d({color:c,name:"warning"}),info:d({color:l,name:"info"}),success:d({color:u,name:"success"}),grey:Fne,contrastThreshold:n,getContrastText:f,augmentColor:d,tonalOffset:r},p[e]),i)}const $oe=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function Hoe(t){return Math.round(t*1e5)/1e5}const UL={textTransform:"uppercase"},zL='"Roboto", "Helvetica", "Arial", sans-serif';function Voe(t,e){const n=typeof e=="function"?e(t):e,{fontFamily:r=zL,fontSize:i=14,fontWeightLight:o=300,fontWeightRegular:a=400,fontWeightMedium:s=500,fontWeightBold:l=700,htmlFontSize:u=16,allVariants:c,pxToRem:f}=n,d=yt(n,$oe),p=i/14,y=f||(v=>`${v/u*p}rem`),x=(v,S,w,E,T)=>Q({fontFamily:r,fontWeight:v,fontSize:y(S),lineHeight:w},r===zL?{letterSpacing:`${Hoe(E/S)}em`}:{},T,c),_={h1:x(o,96,1.167,-1.5),h2:x(o,60,1.2,-.5),h3:x(a,48,1.167,0),h4:x(a,34,1.235,.25),h5:x(a,24,1.334,0),h6:x(s,20,1.6,.15),subtitle1:x(a,16,1.75,.15),subtitle2:x(s,14,1.57,.1),body1:x(a,16,1.5,.15),body2:x(a,14,1.43,.15),button:x(s,14,1.75,.4,UL),caption:x(a,12,1.66,.4),overline:x(a,12,2.66,1,UL),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Xo(Q({htmlFontSize:u,pxToRem:y,fontFamily:r,fontSize:i,fontWeightLight:o,fontWeightRegular:a,fontWeightMedium:s,fontWeightBold:l},_),d,{clone:!1})}const Woe=.2,Goe=.14,joe=.12;function Ir(...t){return[`${t[0]}px ${t[1]}px ${t[2]}px ${t[3]}px rgba(0,0,0,${Woe})`,`${t[4]}px ${t[5]}px ${t[6]}px ${t[7]}px rgba(0,0,0,${Goe})`,`${t[8]}px ${t[9]}px ${t[10]}px ${t[11]}px rgba(0,0,0,${joe})`].join(",")}const qoe=["none",Ir(0,2,1,-1,0,1,1,0,0,1,3,0),Ir(0,3,1,-2,0,2,2,0,0,1,5,0),Ir(0,3,3,-2,0,3,4,0,0,1,8,0),Ir(0,2,4,-1,0,4,5,0,0,1,10,0),Ir(0,3,5,-1,0,5,8,0,0,1,14,0),Ir(0,3,5,-1,0,6,10,0,0,1,18,0),Ir(0,4,5,-2,0,7,10,1,0,2,16,1),Ir(0,5,5,-3,0,8,10,1,0,3,14,2),Ir(0,5,6,-3,0,9,12,1,0,3,16,2),Ir(0,6,6,-3,0,10,14,1,0,4,18,3),Ir(0,6,7,-4,0,11,15,1,0,4,20,3),Ir(0,7,8,-4,0,12,17,2,0,5,22,4),Ir(0,7,8,-4,0,13,19,2,0,5,24,4),Ir(0,7,9,-4,0,14,21,2,0,5,26,4),Ir(0,8,9,-5,0,15,22,2,0,6,28,5),Ir(0,8,10,-5,0,16,24,2,0,6,30,5),Ir(0,8,11,-5,0,17,26,2,0,6,32,5),Ir(0,9,11,-5,0,18,28,2,0,7,34,6),Ir(0,9,12,-6,0,19,29,2,0,7,36,6),Ir(0,10,13,-6,0,20,31,3,0,8,38,7),Ir(0,10,13,-6,0,21,33,3,0,8,40,7),Ir(0,10,14,-6,0,22,35,3,0,8,42,7),Ir(0,11,14,-7,0,23,36,3,0,9,44,8),Ir(0,11,15,-7,0,24,38,3,0,9,46,8)],Xoe=qoe,Yoe=["duration","easing","delay"],Koe={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)"},Zoe={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function $L(t){return`${Math.round(t)}ms`}function Joe(t){if(!t)return 0;const e=t/36;return Math.round((4+15*e**.25+e/5)*10)}function Qoe(t){const e=Q({},Koe,t.easing),n=Q({},Zoe,t.duration);return Q({getAutoHeightDuration:Joe,create:(i=["all"],o={})=>{const{duration:a=n.standard,easing:s=e.easeInOut,delay:l=0}=o;return yt(o,Yoe),(Array.isArray(i)?i:[i]).map(u=>`${u} ${typeof a=="string"?a:$L(a)} ${s} ${typeof l=="string"?l:$L(l)}`).join(",")}},t,{easing:e,duration:n})}const eae={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},tae=eae,nae=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function sH(t={},...e){const{mixins:n={},palette:r={},transitions:i={},typography:o={}}=t,a=yt(t,nae);if(t.vars)throw new Error(Bd(18));const s=zoe(r),l=qM(t);let u=Xo(l,{mixins:Noe(l.breakpoints,n),palette:s,shadows:Xoe.slice(),typography:Voe(s,o),transitions:Qoe(i),zIndex:Q({},tae)});return u=Xo(u,a),u=e.reduce((c,f)=>Xo(c,f),u),u.unstable_sxConfig=Q({},GM,a==null?void 0:a.unstable_sxConfig),u.unstable_sx=function(f){return jM({sx:f,theme:this})},u}const rae=sH(),ZM=rae;function Jp(){const t=XM(ZM);return t[vb]||t}function an({props:t,name:e}){return rH({props:t,name:e,defaultTheme:ZM,themeId:vb})}const Ro=t=>k1(t)&&t!=="classes",iae=k1,oae=nH({themeId:vb,defaultTheme:ZM,rootShouldForwardProp:Ro}),ut=oae,aae=t=>{let e;return t<1?e=5.11916*t**2:e=4.5*Math.log(t+1)+2,(e/100).toFixed(2)},HL=aae;function sae(t){return Qt("MuiSvgIcon",t)}Yt("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const lae=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],uae=t=>{const{color:e,fontSize:n,classes:r}=t,i={root:["root",e!=="inherit"&&`color${it(e)}`,`fontSize${it(n)}`]};return nn(i,sae,r)},cae=ut("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.color!=="inherit"&&e[`color${it(n.color)}`],e[`fontSize${it(n.fontSize)}`]]}})(({theme:t,ownerState:e})=>{var n,r,i,o,a,s,l,u,c,f,d,p,y;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:e.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(n=t.transitions)==null||(r=n.create)==null?void 0:r.call(n,"fill",{duration:(i=t.transitions)==null||(i=i.duration)==null?void 0:i.shorter}),fontSize:{inherit:"inherit",small:((o=t.typography)==null||(a=o.pxToRem)==null?void 0:a.call(o,20))||"1.25rem",medium:((s=t.typography)==null||(l=s.pxToRem)==null?void 0:l.call(s,24))||"1.5rem",large:((u=t.typography)==null||(c=u.pxToRem)==null?void 0:c.call(u,35))||"2.1875rem"}[e.fontSize],color:(f=(d=(t.vars||t).palette)==null||(d=d[e.color])==null?void 0:d.main)!=null?f:{action:(p=(t.vars||t).palette)==null||(p=p.action)==null?void 0:p.active,disabled:(y=(t.vars||t).palette)==null||(y=y.action)==null?void 0:y.disabled,inherit:void 0}[e.color]}}),lH=H.forwardRef(function(e,n){const r=an({props:e,name:"MuiSvgIcon"}),{children:i,className:o,color:a="inherit",component:s="svg",fontSize:l="medium",htmlColor:u,inheritViewBox:c=!1,titleAccess:f,viewBox:d="0 0 24 24"}=r,p=yt(r,lae),y=H.isValidElement(i)&&i.type==="svg",x=Q({},r,{color:a,component:s,fontSize:l,instanceFontSize:e.fontSize,inheritViewBox:c,viewBox:d,hasSvgAsChild:y}),_={};c||(_.viewBox=d);const v=uae(x);return F.jsxs(cae,Q({as:s,className:bt(v.root,o),focusable:"false",color:u,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:n},_,p,y&&i.props,{ownerState:x,children:[y?i.props.children:i,f?F.jsx("title",{children:f}):null]}))});lH.muiName="SvgIcon";const VL=lH;function hf(t,e){function n(r,i){return F.jsx(VL,Q({"data-testid":`${e}Icon`,ref:i},r,{children:t}))}return n.muiName=VL.muiName,H.memo(H.forwardRef(n))}const fae={configure:t=>{hO.configure(t)}},dae=Object.freeze(Object.defineProperty({__proto__:null,capitalize:it,createChainedFunction:XE,createSvgIcon:hf,debounce:EM,deprecatedPropType:Hne,isMuiElement:F1,ownerDocument:Yo,ownerWindow:Ju,requirePropFactory:Vne,setRef:_x,unstable_ClassNameGenerator:fae,unstable_useEnhancedEffect:_l,unstable_useId:vv,unsupportedProp:jne,useControlled:Td,useEventCallback:Jl,useForkRef:Jr,useIsFocusVisible:T7},Symbol.toStringTag,{value:"Module"}));function _R(t,e){return _R=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},_R(t,e)}function DO(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,_R(t,e)}const WL={disabled:!1},QE=se.createContext(null);var hae=function(e){return e.scrollTop},m1="unmounted",np="exited",rp="entering",I0="entered",wR="exiting",pf=function(t){DO(e,t);function e(r,i){var o;o=t.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=np,o.appearStatus=rp):l=I0:r.unmountOnExit||r.mountOnEnter?l=m1:l=np,o.state={status:l},o.nextCallback=null,o}e.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===m1?{status:np}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==rp&&a!==I0&&(o=rp):(a===rp||a===I0)&&(o=wR)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===rp){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:Ew.findDOMNode(this);a&&hae(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===np&&this.setState({status:m1})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[Ew.findDOMNode(this),s],u=l[0],c=l[1],f=this.getTimeouts(),d=s?f.appear:f.enter;if(!i&&!a||WL.disabled){this.safeSetState({status:I0},function(){o.props.onEntered(u)});return}this.props.onEnter(u,c),this.safeSetState({status:rp},function(){o.props.onEntering(u,c),o.onTransitionEnd(d,function(){o.safeSetState({status:I0},function(){o.props.onEntered(u,c)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:Ew.findDOMNode(this);if(!o||WL.disabled){this.safeSetState({status:np},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:wR},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:np},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:Ew.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=l[0],c=l[1];this.props.addEndListener(u,c)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===m1)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=yt(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return se.createElement(QE.Provider,{value:null},typeof a=="function"?a(i,s):se.cloneElement(se.Children.only(a),s))},e}(se.Component);pf.contextType=QE;pf.propTypes={};function i0(){}pf.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:i0,onEntering:i0,onEntered:i0,onExit:i0,onExiting:i0,onExited:i0};pf.UNMOUNTED=m1;pf.EXITED=np;pf.ENTERING=rp;pf.ENTERED=I0;pf.EXITING=wR;const RO=pf;function pae(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function PO(t,e){var n=function(o){return e&&H.isValidElement(o)?e(o):o},r=Object.create(null);return t&&H.Children.map(t,function(i){return i}).forEach(function(i){r[i.key]=n(i)}),r}function mae(t,e){t=t||{},e=e||{};function n(c){return c in e?e[c]:t[c]}var r=Object.create(null),i=[];for(var o in t)o in e?i.length&&(r[o]=i,i=[]):i.push(o);var a,s={};for(var l in e){if(r[l])for(a=0;at.scrollTop;function Kg(t,e){var n,r;const{timeout:i,easing:o,style:a={}}=t;return{duration:(n=a.transitionDuration)!=null?n:typeof i=="number"?i:i[e.mode]||0,easing:(r=a.transitionTimingFunction)!=null?r:typeof o=="object"?o[e.mode]:o,delay:a.transitionDelay}}function _ae(t){return Qt("MuiPaper",t)}Yt("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 wae=["className","component","elevation","square","variant"],Sae=t=>{const{square:e,elevation:n,variant:r,classes:i}=t,o={root:["root",r,!e&&"rounded",r==="elevation"&&`elevation${n}`]};return nn(o,_ae,i)},Eae=ut("div",{name:"MuiPaper",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],!n.square&&e.rounded,n.variant==="elevation"&&e[`elevation${n.elevation}`]]}})(({theme:t,ownerState:e})=>{var n;return Q({backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow")},!e.square&&{borderRadius:t.shape.borderRadius},e.variant==="outlined"&&{border:`1px solid ${(t.vars||t).palette.divider}`},e.variant==="elevation"&&Q({boxShadow:(t.vars||t).shadows[e.elevation]},!t.vars&&t.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${zn("#fff",HL(e.elevation))}, ${zn("#fff",HL(e.elevation))})`},t.vars&&{backgroundImage:(n=t.vars.overlays)==null?void 0:n[e.elevation]}))}),Mae=H.forwardRef(function(e,n){const r=an({props:e,name:"MuiPaper"}),{className:i,component:o="div",elevation:a=1,square:s=!1,variant:l="elevation"}=r,u=yt(r,wae),c=Q({},r,{component:o,elevation:a,square:s,variant:l}),f=Sae(c);return F.jsx(Eae,Q({as:o,ownerState:c,className:bt(f.root,i),ref:n},u))}),mf=Mae;function Cae(t){const{className:e,classes:n,pulsate:r=!1,rippleX:i,rippleY:o,rippleSize:a,in:s,onExited:l,timeout:u}=t,[c,f]=H.useState(!1),d=bt(e,n.ripple,n.rippleVisible,r&&n.ripplePulsate),p={width:a,height:a,top:-(a/2)+o,left:-(a/2)+i},y=bt(n.child,c&&n.childLeaving,r&&n.childPulsate);return!s&&!c&&f(!0),H.useEffect(()=>{if(!s&&l!=null){const x=setTimeout(l,u);return()=>{clearTimeout(x)}}},[l,s,u]),F.jsx("span",{className:d,style:p,children:F.jsx("span",{className:y})})}const Aae=Yt("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),ul=Aae,Tae=["center","classes","className"];let JM=t=>t,GL,jL,qL,XL;const SR=550,Dae=80,Rae=wO(GL||(GL=JM` + */function Z7(t,e){return wR(t,e)}const pie=(t,e)=>{Array.isArray(t.__emotion_styles)&&(t.__emotion_styles=e(t.__emotion_styles))},mie=["values","unit","step"],gie=t=>{const e=Object.keys(t).map(n=>({key:n,val:t[n]}))||[];return e.sort((n,r)=>n.val-r.val),e.reduce((n,r)=>Q({},n,{[r.key]:r.val}),{})};function vie(t){const{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=t,i=vt(t,mie),o=gie(e),a=Object.keys(o);function s(d){return`@media (min-width:${typeof e[d]=="number"?e[d]:d}${n})`}function l(d){return`@media (max-width:${(typeof e[d]=="number"?e[d]:d)-r/100}${n})`}function u(d,p){const y=a.indexOf(p);return`@media (min-width:${typeof e[d]=="number"?e[d]:d}${n}) and (max-width:${(y!==-1&&typeof e[a[y]]=="number"?e[a[y]]:p)-r/100}${n})`}function c(d){return a.indexOf(d)+1`@media (min-width:${MO[t]}px)`};function Ka(t,e,n){const r=t.theme||{};if(Array.isArray(e)){const o=r.breakpoints||OL;return e.reduce((a,s,l)=>(a[o.up(o.keys[l])]=n(e[l]),a),{})}if(typeof e=="object"){const o=r.breakpoints||OL;return Object.keys(e).reduce((a,s)=>{if(Object.keys(o.values||MO).indexOf(s)!==-1){const l=o.up(s);a[l]=n(e[s],s)}else{const l=s;a[l]=e[l]}return a},{})}return n(e)}function J7(t={}){var e;return((e=t.keys)==null?void 0:e.reduce((r,i)=>{const o=t.up(i);return r[o]={},r},{}))||{}}function Q7(t,e){return t.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},e)}function bie(t,...e){const n=J7(t),r=[n,...e].reduce((i,o)=>Xo(i,o),{});return Q7(Object.keys(n),r)}function _ie(t,e){if(typeof t!="object")return{};const n={},r=Object.keys(e);return Array.isArray(t)?r.forEach((i,o)=>{o{t[i]!=null&&(n[i]=!0)}),n}function Ep({values:t,breakpoints:e,base:n}){const r=n||_ie(t,e),i=Object.keys(r);if(i.length===0)return t;let o;return i.reduce((a,s,l)=>(Array.isArray(t)?(a[s]=t[l]!=null?t[l]:t[o],o=l):typeof t=="object"?(a[s]=t[s]!=null?t[s]:t[o],o=s):a[s]=t,a),{})}function UM(t,e,n=!0){if(!e||typeof e!="string")return null;if(t&&t.vars&&n){const r=`vars.${e}`.split(".").reduce((i,o)=>i&&i[o]?i[o]:null,t);if(r!=null)return r}return e.split(".").reduce((r,i)=>r&&r[i]!=null?r[i]:null,t)}function KE(t,e,n,r=n){let i;return typeof t=="function"?i=t(n):Array.isArray(t)?i=t[n]||r:i=UM(t,n)||r,e&&(i=e(i,r,t)),i}function or(t){const{prop:e,cssProperty:n=t.prop,themeKey:r,transform:i}=t,o=a=>{if(a[e]==null)return null;const s=a[e],l=a.theme,u=UM(l,r)||{};return Ka(a,s,f=>{let d=KE(u,i,f);return f===d&&typeof f=="string"&&(d=KE(u,i,`${e}${f==="default"?"":rt(f)}`,f)),n===!1?d:{[n]:d}})};return o.propTypes={},o.filterProps=[e],o}function wie(t){const e={};return n=>(e[n]===void 0&&(e[n]=t(n)),e[n])}const Sie={m:"margin",p:"padding"},Eie={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},IL={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Mie=wie(t=>{if(t.length>2)if(IL[t])t=IL[t];else return[t];const[e,n]=t.split(""),r=Sie[e],i=Eie[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),CO=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],AO=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...CO,...AO];function bb(t,e,n,r){var i;const o=(i=UM(t,e,!1))!=null?i:n;return typeof o=="number"?a=>typeof a=="string"?a:o*a:Array.isArray(o)?a=>typeof a=="string"?a:o[a]:typeof o=="function"?o:()=>{}}function TO(t){return bb(t,"spacing",8)}function Up(t,e){if(typeof e=="string"||e==null)return e;const n=Math.abs(e),r=t(n);return e>=0?r:typeof r=="number"?-r:`-${r}`}function Cie(t,e){return n=>t.reduce((r,i)=>(r[i]=Up(e,n),r),{})}function Aie(t,e,n,r){if(e.indexOf(n)===-1)return null;const i=Mie(n),o=Cie(i,r),a=t[n];return Ka(t,a,o)}function eH(t,e){const n=TO(t.theme);return Object.keys(t).map(r=>Aie(t,e,r,n)).reduce(U1,{})}function ai(t){return eH(t,CO)}ai.propTypes={};ai.filterProps=CO;function si(t){return eH(t,AO)}si.propTypes={};si.filterProps=AO;function Tie(t=8){if(t.mui)return t;const e=TO({spacing:t}),n=(...r)=>(r.length===0?[1]:r).map(o=>{const a=e(o);return typeof a=="number"?`${a}px`:a}).join(" ");return n.mui=!0,n}function zM(...t){const e=t.reduce((r,i)=>(i.filterProps.forEach(o=>{r[o]=i}),r),{}),n=r=>Object.keys(r).reduce((i,o)=>e[o]?U1(i,e[o](r)):i,{});return n.propTypes={},n.filterProps=t.reduce((r,i)=>r.concat(i.filterProps),[]),n}function ku(t){return typeof t!="number"?t:`${t}px solid`}const Die=or({prop:"border",themeKey:"borders",transform:ku}),Rie=or({prop:"borderTop",themeKey:"borders",transform:ku}),Pie=or({prop:"borderRight",themeKey:"borders",transform:ku}),Nie=or({prop:"borderBottom",themeKey:"borders",transform:ku}),Oie=or({prop:"borderLeft",themeKey:"borders",transform:ku}),Iie=or({prop:"borderColor",themeKey:"palette"}),Fie=or({prop:"borderTopColor",themeKey:"palette"}),Lie=or({prop:"borderRightColor",themeKey:"palette"}),kie=or({prop:"borderBottomColor",themeKey:"palette"}),Bie=or({prop:"borderLeftColor",themeKey:"palette"}),$M=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){const e=bb(t.theme,"shape.borderRadius",4),n=r=>({borderRadius:Up(e,r)});return Ka(t,t.borderRadius,n)}return null};$M.propTypes={};$M.filterProps=["borderRadius"];zM(Die,Rie,Pie,Nie,Oie,Iie,Fie,Lie,kie,Bie,$M);const HM=t=>{if(t.gap!==void 0&&t.gap!==null){const e=bb(t.theme,"spacing",8),n=r=>({gap:Up(e,r)});return Ka(t,t.gap,n)}return null};HM.propTypes={};HM.filterProps=["gap"];const VM=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){const e=bb(t.theme,"spacing",8),n=r=>({columnGap:Up(e,r)});return Ka(t,t.columnGap,n)}return null};VM.propTypes={};VM.filterProps=["columnGap"];const WM=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){const e=bb(t.theme,"spacing",8),n=r=>({rowGap:Up(e,r)});return Ka(t,t.rowGap,n)}return null};WM.propTypes={};WM.filterProps=["rowGap"];const Uie=or({prop:"gridColumn"}),zie=or({prop:"gridRow"}),$ie=or({prop:"gridAutoFlow"}),Hie=or({prop:"gridAutoColumns"}),Vie=or({prop:"gridAutoRows"}),Wie=or({prop:"gridTemplateColumns"}),Gie=or({prop:"gridTemplateRows"}),jie=or({prop:"gridTemplateAreas"}),qie=or({prop:"gridArea"});zM(HM,VM,WM,Uie,zie,$ie,Hie,Vie,Wie,Gie,jie,qie);function Pg(t,e){return e==="grey"?e:t}const Xie=or({prop:"color",themeKey:"palette",transform:Pg}),Yie=or({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Pg}),Kie=or({prop:"backgroundColor",themeKey:"palette",transform:Pg});zM(Xie,Yie,Kie);function Ts(t){return t<=1&&t!==0?`${t*100}%`:t}const Zie=or({prop:"width",transform:Ts}),DO=t=>{if(t.maxWidth!==void 0&&t.maxWidth!==null){const e=n=>{var r,i;const o=((r=t.theme)==null||(r=r.breakpoints)==null||(r=r.values)==null?void 0:r[n])||MO[n];return o?((i=t.theme)==null||(i=i.breakpoints)==null?void 0:i.unit)!=="px"?{maxWidth:`${o}${t.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:Ts(n)}};return Ka(t,t.maxWidth,e)}return null};DO.filterProps=["maxWidth"];const Jie=or({prop:"minWidth",transform:Ts}),Qie=or({prop:"height",transform:Ts}),eoe=or({prop:"maxHeight",transform:Ts}),toe=or({prop:"minHeight",transform:Ts});or({prop:"size",cssProperty:"width",transform:Ts});or({prop:"size",cssProperty:"height",transform:Ts});const noe=or({prop:"boxSizing"});zM(Zie,DO,Jie,Qie,eoe,toe,noe);const roe={border:{themeKey:"borders",transform:ku},borderTop:{themeKey:"borders",transform:ku},borderRight:{themeKey:"borders",transform:ku},borderBottom:{themeKey:"borders",transform:ku},borderLeft:{themeKey:"borders",transform:ku},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:$M},color:{themeKey:"palette",transform:Pg},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Pg},backgroundColor:{themeKey:"palette",transform:Pg},p:{style:si},pt:{style:si},pr:{style:si},pb:{style:si},pl:{style:si},px:{style:si},py:{style:si},padding:{style:si},paddingTop:{style:si},paddingRight:{style:si},paddingBottom:{style:si},paddingLeft:{style:si},paddingX:{style:si},paddingY:{style:si},paddingInline:{style:si},paddingInlineStart:{style:si},paddingInlineEnd:{style:si},paddingBlock:{style:si},paddingBlockStart:{style:si},paddingBlockEnd:{style:si},m:{style:ai},mt:{style:ai},mr:{style:ai},mb:{style:ai},ml:{style:ai},mx:{style:ai},my:{style:ai},margin:{style:ai},marginTop:{style:ai},marginRight:{style:ai},marginBottom:{style:ai},marginLeft:{style:ai},marginX:{style:ai},marginY:{style:ai},marginInline:{style:ai},marginInlineStart:{style:ai},marginInlineEnd:{style:ai},marginBlock:{style:ai},marginBlockStart:{style:ai},marginBlockEnd:{style:ai},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:HM},rowGap:{style:WM},columnGap:{style:VM},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Ts},maxWidth:{style:DO},minWidth:{transform:Ts},height:{transform:Ts},maxHeight:{transform:Ts},minHeight:{transform:Ts},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},GM=roe;function ioe(...t){const e=t.reduce((r,i)=>r.concat(Object.keys(i)),[]),n=new Set(e);return t.every(r=>n.size===Object.keys(r).length)}function ooe(t,e){return typeof t=="function"?t(e):t}function aoe(){function t(n,r,i,o){const a={[n]:r,theme:i},s=o[n];if(!s)return{[n]:r};const{cssProperty:l=n,themeKey:u,transform:c,style:f}=s;if(r==null)return null;if(u==="typography"&&r==="inherit")return{[n]:r};const d=UM(i,u)||{};return f?f(a):Ka(a,r,y=>{let x=KE(d,c,y);return y===x&&typeof y=="string"&&(x=KE(d,c,`${n}${y==="default"?"":rt(y)}`,y)),l===!1?x:{[l]:x}})}function e(n){var r;const{sx:i,theme:o={}}=n||{};if(!i)return null;const a=(r=o.unstable_sxConfig)!=null?r:GM;function s(l){let u=l;if(typeof l=="function")u=l(o);else if(typeof l!="object")return l;if(!u)return null;const c=J7(o.breakpoints),f=Object.keys(c);let d=c;return Object.keys(u).forEach(p=>{const y=ooe(u[p],o);if(y!=null)if(typeof y=="object")if(a[p])d=U1(d,t(p,y,o,a));else{const x=Ka({theme:o},y,_=>({[p]:_}));ioe(x,y)?d[p]=e({sx:y,theme:o}):d=U1(d,x)}else d=U1(d,t(p,y,o,a))}),Q7(f,d)}return Array.isArray(i)?i.map(s):s(i)}return e}const tH=aoe();tH.filterProps=["sx"];const jM=tH,soe=["breakpoints","palette","spacing","shape"];function qM(t={},...e){const{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=t,a=vt(t,soe),s=vie(n),l=Tie(i);let u=Xo({breakpoints:s,direction:"ltr",components:{},palette:Q({mode:"light"},r),spacing:l,shape:Q({},xie,o)},a);return u=e.reduce((c,f)=>Xo(c,f),u),u.unstable_sxConfig=Q({},GM,a==null?void 0:a.unstable_sxConfig),u.unstable_sx=function(f){return jM({sx:f,theme:this})},u}function loe(t){return Object.keys(t).length===0}function nH(t=null){const e=H.useContext(SO);return!e||loe(e)?t:e}const uoe=qM();function XM(t=uoe){return nH(t)}function coe({styles:t,themeId:e,defaultTheme:n={}}){const r=XM(n),i=typeof t=="function"?t(e&&r[e]||r):t;return F.jsx(hie,{styles:i})}const foe=["sx"],doe=t=>{var e,n;const r={systemProps:{},otherProps:{}},i=(e=t==null||(n=t.theme)==null?void 0:n.unstable_sxConfig)!=null?e:GM;return Object.keys(t).forEach(o=>{i[o]?r.systemProps[o]=t[o]:r.otherProps[o]=t[o]}),r};function YM(t){const{sx:e}=t,n=vt(t,foe),{systemProps:r,otherProps:i}=doe(n);let o;return Array.isArray(e)?o=[r,...e]:typeof e=="function"?o=(...a)=>{const s=e(...a);return zc(s)?Q({},r,s):r}:o=Q({},r,e),Q({},i,{sx:o})}function rH(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;es!=="theme"&&s!=="sx"&&s!=="as"})(jM);return H.forwardRef(function(l,u){const c=XM(n),f=YM(l),{className:d,component:p="div"}=f,y=vt(f,hoe);return F.jsx(o,Q({as:p,ref:u,className:xt(d,i?i(r):r),theme:e&&c[e]||c},y))})}const moe=["variant"];function FL(t){return t.length===0}function iH(t){const{variant:e}=t,n=vt(t,moe);let r=e||"";return Object.keys(n).sort().forEach(i=>{i==="color"?r+=FL(r)?t[i]:rt(t[i]):r+=`${FL(r)?i:rt(i)}${rt(t[i].toString())}`}),r}const goe=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function voe(t){return Object.keys(t).length===0}function yoe(t){return typeof t=="string"&&t.charCodeAt(0)>96}const xoe=(t,e)=>e.components&&e.components[t]&&e.components[t].styleOverrides?e.components[t].styleOverrides:null,ZE=t=>{const e={};return t&&t.forEach(n=>{const r=iH(n.props);e[r]=n.style}),e},boe=(t,e)=>{let n=[];return e&&e.components&&e.components[t]&&e.components[t].variants&&(n=e.components[t].variants),ZE(n)},JE=(t,e,n)=>{const{ownerState:r={}}=t,i=[];return n&&n.forEach(o=>{let a=!0;Object.keys(o.props).forEach(s=>{r[s]!==o.props[s]&&t[s]!==o.props[s]&&(a=!1)}),a&&i.push(e[iH(o.props)])}),i},_oe=(t,e,n,r)=>{var i;const o=n==null||(i=n.components)==null||(i=i[r])==null?void 0:i.variants;return JE(t,e,o)};function z1(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const woe=qM(),Soe=t=>t&&t.charAt(0).toLowerCase()+t.slice(1);function sE({defaultTheme:t,theme:e,themeId:n}){return voe(e)?t:e[n]||e}function Eoe(t){return t?(e,n)=>n[t]:null}const LL=({styledArg:t,props:e,defaultTheme:n,themeId:r})=>{const i=t(Q({},e,{theme:sE(Q({},e,{defaultTheme:n,themeId:r}))}));let o;if(i&&i.variants&&(o=i.variants,delete i.variants),o){const a=JE(e,ZE(o),o);return[i,...a]}return i};function oH(t={}){const{themeId:e,defaultTheme:n=woe,rootShouldForwardProp:r=z1,slotShouldForwardProp:i=z1}=t,o=a=>jM(Q({},a,{theme:sE(Q({},a,{defaultTheme:n,themeId:e}))}));return o.__mui_systemSx=!0,(a,s={})=>{pie(a,E=>E.filter(T=>!(T!=null&&T.__mui_systemSx)));const{name:l,slot:u,skipVariantsResolver:c,skipSx:f,overridesResolver:d=Eoe(Soe(u))}=s,p=vt(s,goe),y=c!==void 0?c:u&&u!=="Root"&&u!=="root"||!1,x=f||!1;let _,v=z1;u==="Root"||u==="root"?v=r:u?v=i:yoe(a)&&(v=void 0);const S=Z7(a,Q({shouldForwardProp:v,label:_},p)),w=(E,...T)=>{const C=T?T.map(N=>{if(typeof N=="function"&&N.__emotion_real!==N)return k=>LL({styledArg:N,props:k,defaultTheme:n,themeId:e});if(zc(N)){let k=N,G;return N&&N.variants&&(G=N.variants,delete k.variants,k=Z=>{let j=N;return JE(Z,ZE(G),G).forEach(Y=>{j=Xo(j,Y)}),j}),k}return N}):[];let D=E;if(zc(E)){let N;E&&E.variants&&(N=E.variants,delete D.variants,D=k=>{let G=E;return JE(k,ZE(N),N).forEach(j=>{G=Xo(G,j)}),G})}else typeof E=="function"&&E.__emotion_real!==E&&(D=N=>LL({styledArg:E,props:N,defaultTheme:n,themeId:e}));l&&d&&C.push(N=>{const k=sE(Q({},N,{defaultTheme:n,themeId:e})),G=xoe(l,k);if(G){const Z={};return Object.entries(G).forEach(([j,K])=>{Z[j]=typeof K=="function"?K(Q({},N,{theme:k})):K}),d(N,Z)}return null}),l&&!y&&C.push(N=>{const k=sE(Q({},N,{defaultTheme:n,themeId:e}));return _oe(N,boe(l,k),k,l)}),x||C.push(o);const O=C.length-T.length;if(Array.isArray(E)&&O>0){const N=new Array(O).fill("");D=[...E,...N],D.raw=[...E.raw,...N]}const P=S(D,...C);return a.muiName&&(P.muiName=a.muiName),P};return S.withConfig&&(w.withConfig=S.withConfig),w}}const Moe=oH(),Coe=Moe;function Aoe(t){const{theme:e,name:n,props:r}=t;return!e||!e.components||!e.components[n]||!e.components[n].defaultProps?r:pO(e.components[n].defaultProps,r)}function aH({props:t,name:e,defaultTheme:n,themeId:r}){let i=XM(n);return r&&(i=i[r]||i),Aoe({theme:i,name:e,props:t})}function RO(t,e=0,n=1){return Math.min(Math.max(e,t),n)}function Toe(t){t=t.slice(1);const e=new RegExp(`.{1,${t.length>=6?2:1}}`,"g");let n=t.match(e);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,i)=>i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function zp(t){if(t.type)return t;if(t.charAt(0)==="#")return zp(Toe(t));const e=t.indexOf("("),n=t.substring(0,e);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(Ud(9,t));let r=t.substring(e+1,t.length-1),i;if(n==="color"){if(r=r.split(" "),i=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i)===-1)throw new Error(Ud(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}function KM(t){const{type:e,colorSpace:n}=t;let{values:r}=t;return e.indexOf("rgb")!==-1?r=r.map((i,o)=>o<3?parseInt(i,10):i):e.indexOf("hsl")!==-1&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),e.indexOf("color")!==-1?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${e}(${r})`}function Doe(t){t=zp(t);const{values:e}=t,n=e[0],r=e[1]/100,i=e[2]/100,o=r*Math.min(i,1-i),a=(u,c=(u+n/30)%12)=>i-o*Math.max(Math.min(c-3,9-c,1),-1);let s="rgb";const l=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return t.type==="hsla"&&(s+="a",l.push(e[3])),KM({type:s,values:l})}function kL(t){t=zp(t);let e=t.type==="hsl"||t.type==="hsla"?zp(Doe(t)).values:t.values;return e=e.map(n=>(t.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3))}function Roe(t,e){const n=kL(t),r=kL(e);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function Un(t,e){return t=zp(t),e=RO(e),(t.type==="rgb"||t.type==="hsl")&&(t.type+="a"),t.type==="color"?t.values[3]=`/${e}`:t.values[3]=e,KM(t)}function sH(t,e){if(t=zp(t),e=RO(e),t.type.indexOf("hsl")!==-1)t.values[2]*=1-e;else if(t.type.indexOf("rgb")!==-1||t.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)t.values[n]*=1-e;return KM(t)}function lH(t,e){if(t=zp(t),e=RO(e),t.type.indexOf("hsl")!==-1)t.values[2]+=(100-t.values[2])*e;else if(t.type.indexOf("rgb")!==-1)for(let n=0;n<3;n+=1)t.values[n]+=(255-t.values[n])*e;else if(t.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)t.values[n]+=(1-t.values[n])*e;return KM(t)}const Poe=["component","direction","spacing","divider","children","className","useFlexGap"],Noe=qM(),Ooe=Coe("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root});function Ioe(t){return aH({props:t,name:"MuiStack",defaultTheme:Noe})}function Foe(t,e){const n=H.Children.toArray(t).filter(Boolean);return n.reduce((r,i,o)=>(r.push(i),o({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[t],koe=({ownerState:t,theme:e})=>{let n=Q({display:"flex",flexDirection:"column"},Ka({theme:e},Ep({values:t.direction,breakpoints:e.breakpoints.values}),r=>({flexDirection:r})));if(t.spacing){const r=TO(e),i=Object.keys(e.breakpoints.values).reduce((l,u)=>((typeof t.spacing=="object"&&t.spacing[u]!=null||typeof t.direction=="object"&&t.direction[u]!=null)&&(l[u]=!0),l),{}),o=Ep({values:t.direction,base:i}),a=Ep({values:t.spacing,base:i});typeof o=="object"&&Object.keys(o).forEach((l,u,c)=>{if(!o[l]){const d=u>0?o[c[u-1]]:"column";o[l]=d}}),n=Xo(n,Ka({theme:e},a,(l,u)=>t.useFlexGap?{gap:Up(r,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${Loe(u?o[u]:t.direction)}`]:Up(r,l)}}))}return n=bie(e.breakpoints,n),n};function uH(t={}){const{createStyledComponent:e=Ooe,useThemeProps:n=Ioe,componentName:r="MuiStack"}=t,i=()=>en({root:["root"]},l=>Zt(r,l),{}),o=e(koe);return H.forwardRef(function(l,u){const c=n(l),f=YM(c),{component:d="div",direction:p="column",spacing:y=0,divider:x,children:_,className:v,useFlexGap:S=!1}=f,w=vt(f,Poe),E={direction:p,spacing:y,useFlexGap:S},T=i();return F.jsx(o,Q({as:d,ownerState:E,ref:u,className:xt(T.root,v)},w,{children:x?Foe(_,x):_}))})}const Boe=uH(),BL=Boe;function Uoe(t,e){return Q({toolbar:{minHeight:56,[t.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[t.up("sm")]:{minHeight:64}}},e)}const zoe=["mode","contrastThreshold","tonalOffset"],UL={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:wx.white,default:wx.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}},BT={text:{primary:wx.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:wx.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}};function zL(t,e,n,r){const i=r.light||r,o=r.dark||r*1.5;t[e]||(t.hasOwnProperty(n)?t[e]=t[n]:e==="light"?t.light=lH(t.main,i):e==="dark"&&(t.dark=sH(t.main,o)))}function $oe(t="light"){return t==="dark"?{main:n0[200],light:n0[50],dark:n0[400]}:{main:n0[700],light:n0[400],dark:n0[800]}}function Hoe(t="light"){return t==="dark"?{main:t0[200],light:t0[50],dark:t0[400]}:{main:t0[500],light:t0[300],dark:t0[700]}}function Voe(t="light"){return t==="dark"?{main:e0[500],light:e0[300],dark:e0[700]}:{main:e0[700],light:e0[400],dark:e0[800]}}function Woe(t="light"){return t==="dark"?{main:r0[400],light:r0[300],dark:r0[700]}:{main:r0[700],light:r0[500],dark:r0[900]}}function Goe(t="light"){return t==="dark"?{main:i0[400],light:i0[300],dark:i0[700]}:{main:i0[800],light:i0[500],dark:i0[900]}}function joe(t="light"){return t==="dark"?{main:zy[400],light:zy[300],dark:zy[700]}:{main:"#ed6c02",light:zy[500],dark:zy[900]}}function qoe(t){const{mode:e="light",contrastThreshold:n=3,tonalOffset:r=.2}=t,i=vt(t,zoe),o=t.primary||$oe(e),a=t.secondary||Hoe(e),s=t.error||Voe(e),l=t.info||Woe(e),u=t.success||Goe(e),c=t.warning||joe(e);function f(x){return Roe(x,BT.text.primary)>=n?BT.text.primary:UL.text.primary}const d=({color:x,name:_,mainShade:v=500,lightShade:S=300,darkShade:w=700})=>{if(x=Q({},x),!x.main&&x[v]&&(x.main=x[v]),!x.hasOwnProperty("main"))throw new Error(Ud(11,_?` (${_})`:"",v));if(typeof x.main!="string")throw new Error(Ud(12,_?` (${_})`:"",JSON.stringify(x.main)));return zL(x,"light",S,r),zL(x,"dark",w,r),x.contrastText||(x.contrastText=f(x.main)),x},p={dark:BT,light:UL};return Xo(Q({common:Q({},wx),mode:e,primary:d({color:o,name:"primary"}),secondary:d({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:d({color:s,name:"error"}),warning:d({color:c,name:"warning"}),info:d({color:l,name:"info"}),success:d({color:u,name:"success"}),grey:Hne,contrastThreshold:n,getContrastText:f,augmentColor:d,tonalOffset:r},p[e]),i)}const Xoe=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function Yoe(t){return Math.round(t*1e5)/1e5}const $L={textTransform:"uppercase"},HL='"Roboto", "Helvetica", "Arial", sans-serif';function Koe(t,e){const n=typeof e=="function"?e(t):e,{fontFamily:r=HL,fontSize:i=14,fontWeightLight:o=300,fontWeightRegular:a=400,fontWeightMedium:s=500,fontWeightBold:l=700,htmlFontSize:u=16,allVariants:c,pxToRem:f}=n,d=vt(n,Xoe),p=i/14,y=f||(v=>`${v/u*p}rem`),x=(v,S,w,E,T)=>Q({fontFamily:r,fontWeight:v,fontSize:y(S),lineHeight:w},r===HL?{letterSpacing:`${Yoe(E/S)}em`}:{},T,c),_={h1:x(o,96,1.167,-1.5),h2:x(o,60,1.2,-.5),h3:x(a,48,1.167,0),h4:x(a,34,1.235,.25),h5:x(a,24,1.334,0),h6:x(s,20,1.6,.15),subtitle1:x(a,16,1.75,.15),subtitle2:x(s,14,1.57,.1),body1:x(a,16,1.5,.15),body2:x(a,14,1.43,.15),button:x(s,14,1.75,.4,$L),caption:x(a,12,1.66,.4),overline:x(a,12,2.66,1,$L),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Xo(Q({htmlFontSize:u,pxToRem:y,fontFamily:r,fontSize:i,fontWeightLight:o,fontWeightRegular:a,fontWeightMedium:s,fontWeightBold:l},_),d,{clone:!1})}const Zoe=.2,Joe=.14,Qoe=.12;function Ir(...t){return[`${t[0]}px ${t[1]}px ${t[2]}px ${t[3]}px rgba(0,0,0,${Zoe})`,`${t[4]}px ${t[5]}px ${t[6]}px ${t[7]}px rgba(0,0,0,${Joe})`,`${t[8]}px ${t[9]}px ${t[10]}px ${t[11]}px rgba(0,0,0,${Qoe})`].join(",")}const eae=["none",Ir(0,2,1,-1,0,1,1,0,0,1,3,0),Ir(0,3,1,-2,0,2,2,0,0,1,5,0),Ir(0,3,3,-2,0,3,4,0,0,1,8,0),Ir(0,2,4,-1,0,4,5,0,0,1,10,0),Ir(0,3,5,-1,0,5,8,0,0,1,14,0),Ir(0,3,5,-1,0,6,10,0,0,1,18,0),Ir(0,4,5,-2,0,7,10,1,0,2,16,1),Ir(0,5,5,-3,0,8,10,1,0,3,14,2),Ir(0,5,6,-3,0,9,12,1,0,3,16,2),Ir(0,6,6,-3,0,10,14,1,0,4,18,3),Ir(0,6,7,-4,0,11,15,1,0,4,20,3),Ir(0,7,8,-4,0,12,17,2,0,5,22,4),Ir(0,7,8,-4,0,13,19,2,0,5,24,4),Ir(0,7,9,-4,0,14,21,2,0,5,26,4),Ir(0,8,9,-5,0,15,22,2,0,6,28,5),Ir(0,8,10,-5,0,16,24,2,0,6,30,5),Ir(0,8,11,-5,0,17,26,2,0,6,32,5),Ir(0,9,11,-5,0,18,28,2,0,7,34,6),Ir(0,9,12,-6,0,19,29,2,0,7,36,6),Ir(0,10,13,-6,0,20,31,3,0,8,38,7),Ir(0,10,13,-6,0,21,33,3,0,8,40,7),Ir(0,10,14,-6,0,22,35,3,0,8,42,7),Ir(0,11,14,-7,0,23,36,3,0,9,44,8),Ir(0,11,15,-7,0,24,38,3,0,9,46,8)],tae=eae,nae=["duration","easing","delay"],rae={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)"},iae={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function VL(t){return`${Math.round(t)}ms`}function oae(t){if(!t)return 0;const e=t/36;return Math.round((4+15*e**.25+e/5)*10)}function aae(t){const e=Q({},rae,t.easing),n=Q({},iae,t.duration);return Q({getAutoHeightDuration:oae,create:(i=["all"],o={})=>{const{duration:a=n.standard,easing:s=e.easeInOut,delay:l=0}=o;return vt(o,nae),(Array.isArray(i)?i:[i]).map(u=>`${u} ${typeof a=="string"?a:VL(a)} ${s} ${typeof l=="string"?l:VL(l)}`).join(",")}},t,{easing:e,duration:n})}const sae={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},lae=sae,uae=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function cH(t={},...e){const{mixins:n={},palette:r={},transitions:i={},typography:o={}}=t,a=vt(t,uae);if(t.vars)throw new Error(Ud(18));const s=qoe(r),l=qM(t);let u=Xo(l,{mixins:Uoe(l.breakpoints,n),palette:s,shadows:tae.slice(),typography:Koe(s,o),transitions:aae(i),zIndex:Q({},lae)});return u=Xo(u,a),u=e.reduce((c,f)=>Xo(c,f),u),u.unstable_sxConfig=Q({},GM,a==null?void 0:a.unstable_sxConfig),u.unstable_sx=function(f){return jM({sx:f,theme:this})},u}const cae=cH(),ZM=cae;function Qp(){const t=XM(ZM);return t[yb]||t}function nn({props:t,name:e}){return aH({props:t,name:e,defaultTheme:ZM,themeId:yb})}const Ro=t=>z1(t)&&t!=="classes",fae=z1,dae=oH({themeId:yb,defaultTheme:ZM,rootShouldForwardProp:Ro}),ut=dae,hae=t=>{let e;return t<1?e=5.11916*t**2:e=4.5*Math.log(t+1)+2,(e/100).toFixed(2)},WL=hae;function pae(t){return Zt("MuiSvgIcon",t)}Yt("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const mae=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],gae=t=>{const{color:e,fontSize:n,classes:r}=t,i={root:["root",e!=="inherit"&&`color${rt(e)}`,`fontSize${rt(n)}`]};return en(i,pae,r)},vae=ut("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.color!=="inherit"&&e[`color${rt(n.color)}`],e[`fontSize${rt(n.fontSize)}`]]}})(({theme:t,ownerState:e})=>{var n,r,i,o,a,s,l,u,c,f,d,p,y;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:e.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(n=t.transitions)==null||(r=n.create)==null?void 0:r.call(n,"fill",{duration:(i=t.transitions)==null||(i=i.duration)==null?void 0:i.shorter}),fontSize:{inherit:"inherit",small:((o=t.typography)==null||(a=o.pxToRem)==null?void 0:a.call(o,20))||"1.25rem",medium:((s=t.typography)==null||(l=s.pxToRem)==null?void 0:l.call(s,24))||"1.5rem",large:((u=t.typography)==null||(c=u.pxToRem)==null?void 0:c.call(u,35))||"2.1875rem"}[e.fontSize],color:(f=(d=(t.vars||t).palette)==null||(d=d[e.color])==null?void 0:d.main)!=null?f:{action:(p=(t.vars||t).palette)==null||(p=p.action)==null?void 0:p.active,disabled:(y=(t.vars||t).palette)==null||(y=y.action)==null?void 0:y.disabled,inherit:void 0}[e.color]}}),fH=H.forwardRef(function(e,n){const r=nn({props:e,name:"MuiSvgIcon"}),{children:i,className:o,color:a="inherit",component:s="svg",fontSize:l="medium",htmlColor:u,inheritViewBox:c=!1,titleAccess:f,viewBox:d="0 0 24 24"}=r,p=vt(r,mae),y=H.isValidElement(i)&&i.type==="svg",x=Q({},r,{color:a,component:s,fontSize:l,instanceFontSize:e.fontSize,inheritViewBox:c,viewBox:d,hasSvgAsChild:y}),_={};c||(_.viewBox=d);const v=gae(x);return F.jsxs(vae,Q({as:s,className:xt(v.root,o),focusable:"false",color:u,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:n},_,p,y&&i.props,{ownerState:x,children:[y?i.props.children:i,f?F.jsx("title",{children:f}):null]}))});fH.muiName="SvgIcon";const GL=fH;function pf(t,e){function n(r,i){return F.jsx(GL,Q({"data-testid":`${e}Icon`,ref:i},r,{children:t}))}return n.muiName=GL.muiName,H.memo(H.forwardRef(n))}const yae={configure:t=>{mO.configure(t)}},xae=Object.freeze(Object.defineProperty({__proto__:null,capitalize:rt,createChainedFunction:XE,createSvgIcon:pf,debounce:EM,deprecatedPropType:Yne,isMuiElement:B1,ownerDocument:Yo,ownerWindow:Zu,requirePropFactory:Kne,setRef:Sx,unstable_ClassNameGenerator:yae,unstable_useEnhancedEffect:_l,unstable_useId:bv,unsupportedProp:Qne,useControlled:Dd,useEventCallback:Zl,useForkRef:Jr,useIsFocusVisible:P7},Symbol.toStringTag,{value:"Module"}));function SR(t,e){return SR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},SR(t,e)}function PO(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,SR(t,e)}const jL={disabled:!1},QE=se.createContext(null);var bae=function(e){return e.scrollTop},y1="unmounted",rp="exited",ip="entering",F0="entered",ER="exiting",mf=function(t){PO(e,t);function e(r,i){var o;o=t.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=rp,o.appearStatus=ip):l=F0:r.unmountOnExit||r.mountOnEnter?l=y1:l=rp,o.state={status:l},o.nextCallback=null,o}e.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===y1?{status:rp}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==ip&&a!==F0&&(o=ip):(a===ip||a===F0)&&(o=ER)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===ip){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:Mw.findDOMNode(this);a&&bae(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===rp&&this.setState({status:y1})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[Mw.findDOMNode(this),s],u=l[0],c=l[1],f=this.getTimeouts(),d=s?f.appear:f.enter;if(!i&&!a||jL.disabled){this.safeSetState({status:F0},function(){o.props.onEntered(u)});return}this.props.onEnter(u,c),this.safeSetState({status:ip},function(){o.props.onEntering(u,c),o.onTransitionEnd(d,function(){o.safeSetState({status:F0},function(){o.props.onEntered(u,c)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:Mw.findDOMNode(this);if(!o||jL.disabled){this.safeSetState({status:rp},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:ER},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:rp},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:Mw.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=l[0],c=l[1];this.props.addEndListener(u,c)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===y1)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=vt(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return se.createElement(QE.Provider,{value:null},typeof a=="function"?a(i,s):se.cloneElement(se.Children.only(a),s))},e}(se.Component);mf.contextType=QE;mf.propTypes={};function o0(){}mf.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:o0,onEntering:o0,onEntered:o0,onExit:o0,onExiting:o0,onExited:o0};mf.UNMOUNTED=y1;mf.EXITED=rp;mf.ENTERING=ip;mf.ENTERED=F0;mf.EXITING=ER;const NO=mf;function _ae(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function OO(t,e){var n=function(o){return e&&H.isValidElement(o)?e(o):o},r=Object.create(null);return t&&H.Children.map(t,function(i){return i}).forEach(function(i){r[i.key]=n(i)}),r}function wae(t,e){t=t||{},e=e||{};function n(c){return c in e?e[c]:t[c]}var r=Object.create(null),i=[];for(var o in t)o in e?i.length&&(r[o]=i,i=[]):i.push(o);var a,s={};for(var l in e){if(r[l])for(a=0;at.scrollTop;function Jg(t,e){var n,r;const{timeout:i,easing:o,style:a={}}=t;return{duration:(n=a.transitionDuration)!=null?n:typeof i=="number"?i:i[e.mode]||0,easing:(r=a.transitionTimingFunction)!=null?r:typeof o=="object"?o[e.mode]:o,delay:a.transitionDelay}}function Tae(t){return Zt("MuiPaper",t)}Yt("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 Dae=["className","component","elevation","square","variant"],Rae=t=>{const{square:e,elevation:n,variant:r,classes:i}=t,o={root:["root",r,!e&&"rounded",r==="elevation"&&`elevation${n}`]};return en(o,Tae,i)},Pae=ut("div",{name:"MuiPaper",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],!n.square&&e.rounded,n.variant==="elevation"&&e[`elevation${n.elevation}`]]}})(({theme:t,ownerState:e})=>{var n;return Q({backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow")},!e.square&&{borderRadius:t.shape.borderRadius},e.variant==="outlined"&&{border:`1px solid ${(t.vars||t).palette.divider}`},e.variant==="elevation"&&Q({boxShadow:(t.vars||t).shadows[e.elevation]},!t.vars&&t.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${Un("#fff",WL(e.elevation))}, ${Un("#fff",WL(e.elevation))})`},t.vars&&{backgroundImage:(n=t.vars.overlays)==null?void 0:n[e.elevation]}))}),Nae=H.forwardRef(function(e,n){const r=nn({props:e,name:"MuiPaper"}),{className:i,component:o="div",elevation:a=1,square:s=!1,variant:l="elevation"}=r,u=vt(r,Dae),c=Q({},r,{component:o,elevation:a,square:s,variant:l}),f=Rae(c);return F.jsx(Pae,Q({as:o,ownerState:c,className:xt(f.root,i),ref:n},u))}),gf=Nae;function Oae(t){const{className:e,classes:n,pulsate:r=!1,rippleX:i,rippleY:o,rippleSize:a,in:s,onExited:l,timeout:u}=t,[c,f]=H.useState(!1),d=xt(e,n.ripple,n.rippleVisible,r&&n.ripplePulsate),p={width:a,height:a,top:-(a/2)+o,left:-(a/2)+i},y=xt(n.child,c&&n.childLeaving,r&&n.childPulsate);return!s&&!c&&f(!0),H.useEffect(()=>{if(!s&&l!=null){const x=setTimeout(l,u);return()=>{clearTimeout(x)}}},[l,s,u]),F.jsx("span",{className:d,style:p,children:F.jsx("span",{className:y})})}const Iae=Yt("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),ul=Iae,Fae=["center","classes","className"];let JM=t=>t,qL,XL,YL,KL;const MR=550,Lae=80,kae=EO(qL||(qL=JM` 0% { transform: scale(0); opacity: 0.1; @@ -68,7 +68,7 @@ Error generating stack: `+o.message+` transform: scale(1); opacity: 0.3; } -`)),Pae=wO(jL||(jL=JM` +`)),Bae=EO(XL||(XL=JM` 0% { opacity: 1; } @@ -76,7 +76,7 @@ Error generating stack: `+o.message+` 100% { opacity: 0; } -`)),Nae=wO(qL||(qL=JM` +`)),Uae=EO(YL||(YL=JM` 0% { transform: scale(1); } @@ -88,7 +88,7 @@ Error generating stack: `+o.message+` 100% { transform: scale(1); } -`)),Oae=ut("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),Iae=ut(Cae,{name:"MuiTouchRipple",slot:"Ripple"})(XL||(XL=JM` +`)),zae=ut("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),$ae=ut(Oae,{name:"MuiTouchRipple",slot:"Ripple"})(KL||(KL=JM` opacity: 0; position: absolute; @@ -131,36 +131,36 @@ Error generating stack: `+o.message+` animation-iteration-count: infinite; animation-delay: 200ms; } -`),ul.rippleVisible,Rae,SR,({theme:t})=>t.transitions.easing.easeInOut,ul.ripplePulsate,({theme:t})=>t.transitions.duration.shorter,ul.child,ul.childLeaving,Pae,SR,({theme:t})=>t.transitions.easing.easeInOut,ul.childPulsate,Nae,({theme:t})=>t.transitions.easing.easeInOut),Fae=H.forwardRef(function(e,n){const r=an({props:e,name:"MuiTouchRipple"}),{center:i=!1,classes:o={},className:a}=r,s=yt(r,Tae),[l,u]=H.useState([]),c=H.useRef(0),f=H.useRef(null);H.useEffect(()=>{f.current&&(f.current(),f.current=null)},[l]);const d=H.useRef(!1),p=H.useRef(0),y=H.useRef(null),x=H.useRef(null);H.useEffect(()=>()=>{p.current&&clearTimeout(p.current)},[]);const _=H.useCallback(E=>{const{pulsate:T,rippleX:C,rippleY:D,rippleSize:O,cb:P}=E;u(N=>[...N,F.jsx(Iae,{classes:{ripple:bt(o.ripple,ul.ripple),rippleVisible:bt(o.rippleVisible,ul.rippleVisible),ripplePulsate:bt(o.ripplePulsate,ul.ripplePulsate),child:bt(o.child,ul.child),childLeaving:bt(o.childLeaving,ul.childLeaving),childPulsate:bt(o.childPulsate,ul.childPulsate)},timeout:SR,pulsate:T,rippleX:C,rippleY:D,rippleSize:O},c.current)]),c.current+=1,f.current=P},[o]),v=H.useCallback((E={},T={},C=()=>{})=>{const{pulsate:D=!1,center:O=i||T.pulsate,fakeElement:P=!1}=T;if((E==null?void 0:E.type)==="mousedown"&&d.current){d.current=!1;return}(E==null?void 0:E.type)==="touchstart"&&(d.current=!0);const N=P?null:x.current,k=N?N.getBoundingClientRect():{width:0,height:0,left:0,top:0};let G,Z,j;if(O||E===void 0||E.clientX===0&&E.clientY===0||!E.clientX&&!E.touches)G=Math.round(k.width/2),Z=Math.round(k.height/2);else{const{clientX:K,clientY:Y}=E.touches&&E.touches.length>0?E.touches[0]:E;G=Math.round(K-k.left),Z=Math.round(Y-k.top)}if(O)j=Math.sqrt((2*k.width**2+k.height**2)/3),j%2===0&&(j+=1);else{const K=Math.max(Math.abs((N?N.clientWidth:0)-G),G)*2+2,Y=Math.max(Math.abs((N?N.clientHeight:0)-Z),Z)*2+2;j=Math.sqrt(K**2+Y**2)}E!=null&&E.touches?y.current===null&&(y.current=()=>{_({pulsate:D,rippleX:G,rippleY:Z,rippleSize:j,cb:C})},p.current=setTimeout(()=>{y.current&&(y.current(),y.current=null)},Dae)):_({pulsate:D,rippleX:G,rippleY:Z,rippleSize:j,cb:C})},[i,_]),S=H.useCallback(()=>{v({},{pulsate:!0})},[v]),w=H.useCallback((E,T)=>{if(clearTimeout(p.current),(E==null?void 0:E.type)==="touchend"&&y.current){y.current(),y.current=null,p.current=setTimeout(()=>{w(E,T)});return}y.current=null,u(C=>C.length>0?C.slice(1):C),f.current=T},[]);return H.useImperativeHandle(n,()=>({pulsate:S,start:v,stop:w}),[S,v,w]),F.jsx(Oae,Q({className:bt(ul.root,o.root,a),ref:x},s,{children:F.jsx(bae,{component:null,exit:!0,children:l})}))}),Lae=Fae;function kae(t){return Qt("MuiButtonBase",t)}const Bae=Yt("MuiButtonBase",["root","disabled","focusVisible"]),Uae=Bae,zae=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],$ae=t=>{const{disabled:e,focusVisible:n,focusVisibleClassName:r,classes:i}=t,a=nn({root:["root",e&&"disabled",n&&"focusVisible"]},kae,i);return n&&r&&(a.root+=` ${r}`),a},Hae=ut("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(t,e)=>e.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"},[`&.${Uae.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Vae=H.forwardRef(function(e,n){const r=an({props:e,name:"MuiButtonBase"}),{action:i,centerRipple:o=!1,children:a,className:s,component:l="button",disabled:u=!1,disableRipple:c=!1,disableTouchRipple:f=!1,focusRipple:d=!1,LinkComponent:p="a",onBlur:y,onClick:x,onContextMenu:_,onDragLeave:v,onFocus:S,onFocusVisible:w,onKeyDown:E,onKeyUp:T,onMouseDown:C,onMouseLeave:D,onMouseUp:O,onTouchEnd:P,onTouchMove:N,onTouchStart:k,tabIndex:G=0,TouchRippleProps:Z,touchRippleRef:j,type:K}=r,Y=yt(r,zae),$=H.useRef(null),W=H.useRef(null),U=Jr(W,j),{isFocusVisibleRef:te,onFocus:re,onBlur:le,ref:ce}=T7(),[Ce,Re]=H.useState(!1);u&&Ce&&Re(!1),H.useImperativeHandle(i,()=>({focusVisible:()=>{Re(!0),$.current.focus()}}),[]);const[Ie,He]=H.useState(!1);H.useEffect(()=>{He(!0)},[]);const tt=Ie&&!c&&!u;H.useEffect(()=>{Ce&&d&&!c&&Ie&&W.current.pulsate()},[c,d,Ce,Ie]);function Qe(ve,Se,Pe=f){return Jl(Be=>(Se&&Se(Be),!Pe&&W.current&&W.current[ve](Be),!0))}const ct=Qe("start",C),Xe=Qe("stop",_),ue=Qe("stop",v),De=Qe("stop",O),Ee=Qe("stop",ve=>{Ce&&ve.preventDefault(),D&&D(ve)}),X=Qe("start",k),ne=Qe("stop",P),me=Qe("stop",N),we=Qe("stop",ve=>{le(ve),te.current===!1&&Re(!1),y&&y(ve)},!1),Ne=Jl(ve=>{$.current||($.current=ve.currentTarget),re(ve),te.current===!0&&(Re(!0),w&&w(ve)),S&&S(ve)}),Ue=()=>{const ve=$.current;return l&&l!=="button"&&!(ve.tagName==="A"&&ve.href)},We=H.useRef(!1),lt=Jl(ve=>{d&&!We.current&&Ce&&W.current&&ve.key===" "&&(We.current=!0,W.current.stop(ve,()=>{W.current.start(ve)})),ve.target===ve.currentTarget&&Ue()&&ve.key===" "&&ve.preventDefault(),E&&E(ve),ve.target===ve.currentTarget&&Ue()&&ve.key==="Enter"&&!u&&(ve.preventDefault(),x&&x(ve))}),z=Jl(ve=>{d&&ve.key===" "&&W.current&&Ce&&!ve.defaultPrevented&&(We.current=!1,W.current.stop(ve,()=>{W.current.pulsate(ve)})),T&&T(ve),x&&ve.target===ve.currentTarget&&Ue()&&ve.key===" "&&!ve.defaultPrevented&&x(ve)});let B=l;B==="button"&&(Y.href||Y.to)&&(B=p);const oe={};B==="button"?(oe.type=K===void 0?"button":K,oe.disabled=u):(!Y.href&&!Y.to&&(oe.role="button"),u&&(oe["aria-disabled"]=u));const ge=Jr(n,ce,$),pe=Q({},r,{centerRipple:o,component:l,disabled:u,disableRipple:c,disableTouchRipple:f,focusRipple:d,tabIndex:G,focusVisible:Ce}),de=$ae(pe);return F.jsxs(Hae,Q({as:B,className:bt(de.root,s),ownerState:pe,onBlur:we,onClick:x,onContextMenu:Xe,onFocus:Ne,onKeyDown:lt,onKeyUp:z,onMouseDown:ct,onMouseLeave:Ee,onMouseUp:De,onDragLeave:ue,onTouchEnd:ne,onTouchMove:me,onTouchStart:X,ref:ge,tabIndex:u?-1:G,type:K},oe,Y,{children:[a,tt?F.jsx(Lae,Q({ref:U,center:o},Z)):null]}))}),zp=Vae;function Wae(t){return Qt("MuiIconButton",t)}const Gae=Yt("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),jae=Gae,qae=["edge","children","className","color","disabled","disableFocusRipple","size"],Xae=t=>{const{classes:e,disabled:n,color:r,edge:i,size:o}=t,a={root:["root",n&&"disabled",r!=="default"&&`color${it(r)}`,i&&`edge${it(i)}`,`size${it(o)}`]};return nn(a,Wae,e)},Yae=ut(zp,{name:"MuiIconButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.color!=="default"&&e[`color${it(n.color)}`],n.edge&&e[`edge${it(n.edge)}`],e[`size${it(n.size)}`]]}})(({theme:t,ownerState:e})=>Q({textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(t.vars||t).palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest})},!e.disableRipple&&{"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:zn(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},e.edge==="start"&&{marginLeft:e.size==="small"?-3:-12},e.edge==="end"&&{marginRight:e.size==="small"?-3:-12}),({theme:t,ownerState:e})=>{var n;const r=(n=(t.vars||t).palette)==null?void 0:n[e.color];return Q({},e.color==="inherit"&&{color:"inherit"},e.color!=="inherit"&&e.color!=="default"&&Q({color:r==null?void 0:r.main},!e.disableRipple&&{"&:hover":Q({},r&&{backgroundColor:t.vars?`rgba(${r.mainChannel} / ${t.vars.palette.action.hoverOpacity})`:zn(r.main,t.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),e.size==="small"&&{padding:5,fontSize:t.typography.pxToRem(18)},e.size==="large"&&{padding:12,fontSize:t.typography.pxToRem(28)},{[`&.${jae.disabled}`]:{backgroundColor:"transparent",color:(t.vars||t).palette.action.disabled}})}),Kae=H.forwardRef(function(e,n){const r=an({props:e,name:"MuiIconButton"}),{edge:i=!1,children:o,className:a,color:s="default",disabled:l=!1,disableFocusRipple:u=!1,size:c="medium"}=r,f=yt(r,qae),d=Q({},r,{edge:i,color:s,disabled:l,disableFocusRipple:u,size:c}),p=Xae(d);return F.jsx(Yae,Q({className:bt(p.root,a),centerRipple:!0,focusRipple:!u,disabled:l,ref:n,ownerState:d},f,{children:o}))}),QM=Kae,Zae=hf(F.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"}),"Close");function Jae(t){return Qt("MuiTypography",t)}Yt("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Qae=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],ese=t=>{const{align:e,gutterBottom:n,noWrap:r,paragraph:i,variant:o,classes:a}=t,s={root:["root",o,t.align!=="inherit"&&`align${it(e)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return nn(s,Jae,a)},tse=ut("span",{name:"MuiTypography",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.variant&&e[n.variant],n.align!=="inherit"&&e[`align${it(n.align)}`],n.noWrap&&e.noWrap,n.gutterBottom&&e.gutterBottom,n.paragraph&&e.paragraph]}})(({theme:t,ownerState:e})=>Q({margin:0},e.variant==="inherit"&&{font:"inherit"},e.variant!=="inherit"&&t.typography[e.variant],e.align!=="inherit"&&{textAlign:e.align},e.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},e.gutterBottom&&{marginBottom:"0.35em"},e.paragraph&&{marginBottom:16})),YL={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},nse={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},rse=t=>nse[t]||t,ise=H.forwardRef(function(e,n){const r=an({props:e,name:"MuiTypography"}),i=rse(r.color),o=YM(Q({},r,{color:i})),{align:a="inherit",className:s,component:l,gutterBottom:u=!1,noWrap:c=!1,paragraph:f=!1,variant:d="body1",variantMapping:p=YL}=o,y=yt(o,Qae),x=Q({},o,{align:a,color:i,className:s,component:l,gutterBottom:u,noWrap:c,paragraph:f,variant:d,variantMapping:p}),_=l||(f?"p":p[d]||YL[d])||"span",v=ese(x);return F.jsx(tse,Q({as:_,ref:n,ownerState:x,className:bt(v.root,s)},y))}),tn=ise;function ose(t){return Qt("MuiAppBar",t)}Yt("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const ase=["className","color","enableColorOnDark","position"],sse=t=>{const{color:e,position:n,classes:r}=t,i={root:["root",`color${it(e)}`,`position${it(n)}`]};return nn(i,ose,r)},Aw=(t,e)=>t?`${t==null?void 0:t.replace(")","")}, ${e})`:e,lse=ut(mf,{name:"MuiAppBar",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`position${it(n.position)}`],e[`color${it(n.color)}`]]}})(({theme:t,ownerState:e})=>{const n=t.palette.mode==="light"?t.palette.grey[100]:t.palette.grey[900];return Q({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},e.position==="fixed"&&{position:"fixed",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},e.position==="absolute"&&{position:"absolute",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0},e.position==="sticky"&&{position:"sticky",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0},e.position==="static"&&{position:"static"},e.position==="relative"&&{position:"relative"},!t.vars&&Q({},e.color==="default"&&{backgroundColor:n,color:t.palette.getContrastText(n)},e.color&&e.color!=="default"&&e.color!=="inherit"&&e.color!=="transparent"&&{backgroundColor:t.palette[e.color].main,color:t.palette[e.color].contrastText},e.color==="inherit"&&{color:"inherit"},t.palette.mode==="dark"&&!e.enableColorOnDark&&{backgroundColor:null,color:null},e.color==="transparent"&&Q({backgroundColor:"transparent",color:"inherit"},t.palette.mode==="dark"&&{backgroundImage:"none"})),t.vars&&Q({},e.color==="default"&&{"--AppBar-background":e.enableColorOnDark?t.vars.palette.AppBar.defaultBg:Aw(t.vars.palette.AppBar.darkBg,t.vars.palette.AppBar.defaultBg),"--AppBar-color":e.enableColorOnDark?t.vars.palette.text.primary:Aw(t.vars.palette.AppBar.darkColor,t.vars.palette.text.primary)},e.color&&!e.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":e.enableColorOnDark?t.vars.palette[e.color].main:Aw(t.vars.palette.AppBar.darkBg,t.vars.palette[e.color].main),"--AppBar-color":e.enableColorOnDark?t.vars.palette[e.color].contrastText:Aw(t.vars.palette.AppBar.darkColor,t.vars.palette[e.color].contrastText)},{backgroundColor:"var(--AppBar-background)",color:e.color==="inherit"?"inherit":"var(--AppBar-color)"},e.color==="transparent"&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))}),use=H.forwardRef(function(e,n){const r=an({props:e,name:"MuiAppBar"}),{className:i,color:o="primary",enableColorOnDark:a=!1,position:s="fixed"}=r,l=yt(r,ase),u=Q({},r,{color:o,position:s,enableColorOnDark:a}),c=sse(u);return F.jsx(lse,Q({square:!0,component:"header",ownerState:u,elevation:4,className:bt(c.root,i,s==="fixed"&&"mui-fixed"),ref:n},l))}),cse=use;function Zg(t){return typeof t=="string"}function fse(t,e,n){return t===void 0||Zg(t)?e:Q({},e,{ownerState:Q({},e.ownerState,n)})}const dse={disableDefaultClasses:!1},hse=H.createContext(dse);function pse(t){const{disableDefaultClasses:e}=H.useContext(hse);return n=>e?"":t(n)}function uH(t,e=[]){if(t===void 0)return{};const n={};return Object.keys(t).filter(r=>r.match(/^on[A-Z]/)&&typeof t[r]=="function"&&!e.includes(r)).forEach(r=>{n[r]=t[r]}),n}function mse(t,e,n){return typeof t=="function"?t(e,n):t}function KL(t){if(t===void 0)return{};const e={};return Object.keys(t).filter(n=>!(n.match(/^on[A-Z]/)&&typeof t[n]=="function")).forEach(n=>{e[n]=t[n]}),e}function gse(t){const{getSlotProps:e,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=t;if(!e){const p=bt(n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),y=Q({},n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),x=Q({},n,i,r);return p.length>0&&(x.className=p),Object.keys(y).length>0&&(x.style=y),{props:x,internalRef:void 0}}const a=uH(Q({},i,r)),s=KL(r),l=KL(i),u=e(a),c=bt(u==null?void 0:u.className,n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),f=Q({},u==null?void 0:u.style,n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),d=Q({},u,n,l,s);return c.length>0&&(d.className=c),Object.keys(f).length>0&&(d.style=f),{props:d,internalRef:u.ref}}const vse=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function $p(t){var e;const{elementType:n,externalSlotProps:r,ownerState:i,skipResolvingSlotProps:o=!1}=t,a=yt(t,vse),s=o?{}:mse(r,i),{props:l,internalRef:u}=gse(Q({},a,{externalSlotProps:s})),c=Jr(u,s==null?void 0:s.ref,(e=t.additionalProps)==null?void 0:e.ref);return fse(n,Q({},l,{ref:c}),i)}const yse=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function xse(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 bse(t){if(t.tagName!=="INPUT"||t.type!=="radio"||!t.name)return!1;const e=r=>t.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=e(`[name="${t.name}"]:checked`);return n||(n=e(`[name="${t.name}"]`)),n!==t}function _se(t){return!(t.disabled||t.tagName==="INPUT"&&t.type==="hidden"||bse(t))}function wse(t){const e=[],n=[];return Array.from(t.querySelectorAll(yse)).forEach((r,i)=>{const o=xse(r);o===-1||!_se(r)||(o===0?e.push(r):n.push({documentOrder:i,tabIndex:o,node:r}))}),n.sort((r,i)=>r.tabIndex===i.tabIndex?r.documentOrder-i.documentOrder:r.tabIndex-i.tabIndex).map(r=>r.node).concat(e)}function Sse(){return!0}function Ese(t){const{children:e,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:o=wse,isEnabled:a=Sse,open:s}=t,l=H.useRef(!1),u=H.useRef(null),c=H.useRef(null),f=H.useRef(null),d=H.useRef(null),p=H.useRef(!1),y=H.useRef(null),x=Jr(e.ref,y),_=H.useRef(null);H.useEffect(()=>{!s||!y.current||(p.current=!n)},[n,s]),H.useEffect(()=>{if(!s||!y.current)return;const w=Yo(y.current);return y.current.contains(w.activeElement)||(y.current.hasAttribute("tabIndex")||y.current.setAttribute("tabIndex","-1"),p.current&&y.current.focus()),()=>{i||(f.current&&f.current.focus&&(l.current=!0,f.current.focus()),f.current=null)}},[s]),H.useEffect(()=>{if(!s||!y.current)return;const w=Yo(y.current),E=D=>{_.current=D,!(r||!a()||D.key!=="Tab")&&w.activeElement===y.current&&D.shiftKey&&(l.current=!0,c.current&&c.current.focus())},T=()=>{const D=y.current;if(D===null)return;if(!w.hasFocus()||!a()||l.current){l.current=!1;return}if(D.contains(w.activeElement)||r&&w.activeElement!==u.current&&w.activeElement!==c.current)return;if(w.activeElement!==d.current)d.current=null;else if(d.current!==null)return;if(!p.current)return;let O=[];if((w.activeElement===u.current||w.activeElement===c.current)&&(O=o(y.current)),O.length>0){var P,N;const k=!!((P=_.current)!=null&&P.shiftKey&&((N=_.current)==null?void 0:N.key)==="Tab"),G=O[0],Z=O[O.length-1];typeof G!="string"&&typeof Z!="string"&&(k?Z.focus():G.focus())}else D.focus()};w.addEventListener("focusin",T),w.addEventListener("keydown",E,!0);const C=setInterval(()=>{w.activeElement&&w.activeElement.tagName==="BODY"&&T()},50);return()=>{clearInterval(C),w.removeEventListener("focusin",T),w.removeEventListener("keydown",E,!0)}},[n,r,i,a,s,o]);const v=w=>{f.current===null&&(f.current=w.relatedTarget),p.current=!0,d.current=w.target;const E=e.props.onFocus;E&&E(w)},S=w=>{f.current===null&&(f.current=w.relatedTarget),p.current=!0};return F.jsxs(H.Fragment,{children:[F.jsx("div",{tabIndex:s?0:-1,onFocus:S,ref:u,"data-testid":"sentinelStart"}),H.cloneElement(e,{ref:x,onFocus:v}),F.jsx("div",{tabIndex:s?0:-1,onFocus:S,ref:c,"data-testid":"sentinelEnd"})]})}var ja="top",wl="bottom",Sl="right",qa="left",IO="auto",bb=[ja,wl,Sl,qa],Jg="start",Mx="end",Mse="clippingParents",cH="viewport",Uy="popper",Cse="reference",ZL=bb.reduce(function(t,e){return t.concat([e+"-"+Jg,e+"-"+Mx])},[]),fH=[].concat(bb,[IO]).reduce(function(t,e){return t.concat([e,e+"-"+Jg,e+"-"+Mx])},[]),Ase="beforeRead",Tse="read",Dse="afterRead",Rse="beforeMain",Pse="main",Nse="afterMain",Ose="beforeWrite",Ise="write",Fse="afterWrite",Lse=[Ase,Tse,Dse,Rse,Pse,Nse,Ose,Ise,Fse];function Qu(t){return t?(t.nodeName||"").toLowerCase():null}function Us(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Hp(t){var e=Us(t).Element;return t instanceof e||t instanceof Element}function vl(t){var e=Us(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function FO(t){if(typeof ShadowRoot>"u")return!1;var e=Us(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function kse(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},i=e.attributes[n]||{},o=e.elements[n];!vl(o)||!Qu(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function Bse(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(r){var i=e.elements[r],o=e.attributes[r]||{},a=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),s=a.reduce(function(l,u){return l[u]="",l},{});!vl(i)||!Qu(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const Use={name:"applyStyles",enabled:!0,phase:"write",fn:kse,effect:Bse,requires:["computeStyles"]};function Wu(t){return t.split("-")[0]}var Ep=Math.max,e2=Math.min,Qg=Math.round;function ER(){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 dH(){return!/^((?!chrome|android).)*safari/i.test(ER())}function ev(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var r=t.getBoundingClientRect(),i=1,o=1;e&&vl(t)&&(i=t.offsetWidth>0&&Qg(r.width)/t.offsetWidth||1,o=t.offsetHeight>0&&Qg(r.height)/t.offsetHeight||1);var a=Hp(t)?Us(t):window,s=a.visualViewport,l=!dH()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/i,c=(r.top+(l&&s?s.offsetTop:0))/o,f=r.width/i,d=r.height/o;return{width:f,height:d,top:c,right:u+f,bottom:c+d,left:u,x:u,y:c}}function LO(t){var e=ev(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function hH(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&FO(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function of(t){return Us(t).getComputedStyle(t)}function zse(t){return["table","td","th"].indexOf(Qu(t))>=0}function Jd(t){return((Hp(t)?t.ownerDocument:t.document)||window.document).documentElement}function eC(t){return Qu(t)==="html"?t:t.assignedSlot||t.parentNode||(FO(t)?t.host:null)||Jd(t)}function JL(t){return!vl(t)||of(t).position==="fixed"?null:t.offsetParent}function $se(t){var e=/firefox/i.test(ER()),n=/Trident/i.test(ER());if(n&&vl(t)){var r=of(t);if(r.position==="fixed")return null}var i=eC(t);for(FO(i)&&(i=i.host);vl(i)&&["html","body"].indexOf(Qu(i))<0;){var o=of(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||e&&o.willChange==="filter"||e&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function _b(t){for(var e=Us(t),n=JL(t);n&&zse(n)&&of(n).position==="static";)n=JL(n);return n&&(Qu(n)==="html"||Qu(n)==="body"&&of(n).position==="static")?e:n||$se(t)||e}function kO(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function B1(t,e,n){return Ep(t,e2(e,n))}function Hse(t,e,n){var r=B1(t,e,n);return r>n?n:r}function pH(){return{top:0,right:0,bottom:0,left:0}}function mH(t){return Object.assign({},pH(),t)}function gH(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var Vse=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,mH(typeof e!="number"?e:gH(e,bb))};function Wse(t){var e,n=t.state,r=t.name,i=t.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Wu(n.placement),l=kO(s),u=[qa,Sl].indexOf(s)>=0,c=u?"height":"width";if(!(!o||!a)){var f=Vse(i.padding,n),d=LO(o),p=l==="y"?ja:qa,y=l==="y"?wl:Sl,x=n.rects.reference[c]+n.rects.reference[l]-a[l]-n.rects.popper[c],_=a[l]-n.rects.reference[l],v=_b(o),S=v?l==="y"?v.clientHeight||0:v.clientWidth||0:0,w=x/2-_/2,E=f[p],T=S-d[c]-f[y],C=S/2-d[c]/2+w,D=B1(E,C,T),O=l;n.modifiersData[r]=(e={},e[O]=D,e.centerOffset=D-C,e)}}function Gse(t){var e=t.state,n=t.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||hH(e.elements.popper,i)&&(e.elements.arrow=i))}const jse={name:"arrow",enabled:!0,phase:"main",fn:Wse,effect:Gse,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function tv(t){return t.split("-")[1]}var qse={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Xse(t,e){var n=t.x,r=t.y,i=e.devicePixelRatio||1;return{x:Qg(n*i)/i||0,y:Qg(r*i)/i||0}}function QL(t){var e,n=t.popper,r=t.popperRect,i=t.placement,o=t.variation,a=t.offsets,s=t.position,l=t.gpuAcceleration,u=t.adaptive,c=t.roundOffsets,f=t.isFixed,d=a.x,p=d===void 0?0:d,y=a.y,x=y===void 0?0:y,_=typeof c=="function"?c({x:p,y:x}):{x:p,y:x};p=_.x,x=_.y;var v=a.hasOwnProperty("x"),S=a.hasOwnProperty("y"),w=qa,E=ja,T=window;if(u){var C=_b(n),D="clientHeight",O="clientWidth";if(C===Us(n)&&(C=Jd(n),of(C).position!=="static"&&s==="absolute"&&(D="scrollHeight",O="scrollWidth")),C=C,i===ja||(i===qa||i===Sl)&&o===Mx){E=wl;var P=f&&C===T&&T.visualViewport?T.visualViewport.height:C[D];x-=P-r.height,x*=l?1:-1}if(i===qa||(i===ja||i===wl)&&o===Mx){w=Sl;var N=f&&C===T&&T.visualViewport?T.visualViewport.width:C[O];p-=N-r.width,p*=l?1:-1}}var k=Object.assign({position:s},u&&qse),G=c===!0?Xse({x:p,y:x},Us(n)):{x:p,y:x};if(p=G.x,x=G.y,l){var Z;return Object.assign({},k,(Z={},Z[E]=S?"0":"",Z[w]=v?"0":"",Z.transform=(T.devicePixelRatio||1)<=1?"translate("+p+"px, "+x+"px)":"translate3d("+p+"px, "+x+"px, 0)",Z))}return Object.assign({},k,(e={},e[E]=S?x+"px":"",e[w]=v?p+"px":"",e.transform="",e))}function Yse(t){var e=t.state,n=t.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:Wu(e.placement),variation:tv(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,QL(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,QL(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const Kse={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Yse,data:{}};var Tw={passive:!0};function Zse(t){var e=t.state,n=t.instance,r=t.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=Us(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&u.forEach(function(c){c.addEventListener("scroll",n.update,Tw)}),s&&l.addEventListener("resize",n.update,Tw),function(){o&&u.forEach(function(c){c.removeEventListener("scroll",n.update,Tw)}),s&&l.removeEventListener("resize",n.update,Tw)}}const Jse={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Zse,data:{}};var Qse={left:"right",right:"left",bottom:"top",top:"bottom"};function lE(t){return t.replace(/left|right|bottom|top/g,function(e){return Qse[e]})}var ele={start:"end",end:"start"};function e8(t){return t.replace(/start|end/g,function(e){return ele[e]})}function BO(t){var e=Us(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function UO(t){return ev(Jd(t)).left+BO(t).scrollLeft}function tle(t,e){var n=Us(t),r=Jd(t),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=dH();(u||!u&&e==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+UO(t),y:l}}function nle(t){var e,n=Jd(t),r=BO(t),i=(e=t.ownerDocument)==null?void 0:e.body,o=Ep(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Ep(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+UO(t),l=-r.scrollTop;return of(i||n).direction==="rtl"&&(s+=Ep(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function zO(t){var e=of(t),n=e.overflow,r=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function vH(t){return["html","body","#document"].indexOf(Qu(t))>=0?t.ownerDocument.body:vl(t)&&zO(t)?t:vH(eC(t))}function U1(t,e){var n;e===void 0&&(e=[]);var r=vH(t),i=r===((n=t.ownerDocument)==null?void 0:n.body),o=Us(r),a=i?[o].concat(o.visualViewport||[],zO(r)?r:[]):r,s=e.concat(a);return i?s:s.concat(U1(eC(a)))}function MR(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function rle(t,e){var n=ev(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function t8(t,e,n){return e===cH?MR(tle(t,n)):Hp(e)?rle(e,n):MR(nle(Jd(t)))}function ile(t){var e=U1(eC(t)),n=["absolute","fixed"].indexOf(of(t).position)>=0,r=n&&vl(t)?_b(t):t;return Hp(r)?e.filter(function(i){return Hp(i)&&hH(i,r)&&Qu(i)!=="body"}):[]}function ole(t,e,n,r){var i=e==="clippingParents"?ile(t):[].concat(e),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var c=t8(t,u,r);return l.top=Ep(c.top,l.top),l.right=e2(c.right,l.right),l.bottom=e2(c.bottom,l.bottom),l.left=Ep(c.left,l.left),l},t8(t,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function yH(t){var e=t.reference,n=t.element,r=t.placement,i=r?Wu(r):null,o=r?tv(r):null,a=e.x+e.width/2-n.width/2,s=e.y+e.height/2-n.height/2,l;switch(i){case ja:l={x:a,y:e.y-n.height};break;case wl:l={x:a,y:e.y+e.height};break;case Sl:l={x:e.x+e.width,y:s};break;case qa:l={x:e.x-n.width,y:s};break;default:l={x:e.x,y:e.y}}var u=i?kO(i):null;if(u!=null){var c=u==="y"?"height":"width";switch(o){case Jg:l[u]=l[u]-(e[c]/2-n[c]/2);break;case Mx:l[u]=l[u]+(e[c]/2-n[c]/2);break}}return l}function Cx(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=r===void 0?t.placement:r,o=n.strategy,a=o===void 0?t.strategy:o,s=n.boundary,l=s===void 0?Mse:s,u=n.rootBoundary,c=u===void 0?cH:u,f=n.elementContext,d=f===void 0?Uy:f,p=n.altBoundary,y=p===void 0?!1:p,x=n.padding,_=x===void 0?0:x,v=mH(typeof _!="number"?_:gH(_,bb)),S=d===Uy?Cse:Uy,w=t.rects.popper,E=t.elements[y?S:d],T=ole(Hp(E)?E:E.contextElement||Jd(t.elements.popper),l,c,a),C=ev(t.elements.reference),D=yH({reference:C,element:w,strategy:"absolute",placement:i}),O=MR(Object.assign({},w,D)),P=d===Uy?O:C,N={top:T.top-P.top+v.top,bottom:P.bottom-T.bottom+v.bottom,left:T.left-P.left+v.left,right:P.right-T.right+v.right},k=t.modifiersData.offset;if(d===Uy&&k){var G=k[i];Object.keys(N).forEach(function(Z){var j=[Sl,wl].indexOf(Z)>=0?1:-1,K=[ja,wl].indexOf(Z)>=0?"y":"x";N[Z]+=G[K]*j})}return N}function ale(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?fH:l,c=tv(r),f=c?s?ZL:ZL.filter(function(y){return tv(y)===c}):bb,d=f.filter(function(y){return u.indexOf(y)>=0});d.length===0&&(d=f);var p=d.reduce(function(y,x){return y[x]=Cx(t,{placement:x,boundary:i,rootBoundary:o,padding:a})[Wu(x)],y},{});return Object.keys(p).sort(function(y,x){return p[y]-p[x]})}function sle(t){if(Wu(t)===IO)return[];var e=lE(t);return[e8(t),e,e8(e)]}function lle(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,u=n.padding,c=n.boundary,f=n.rootBoundary,d=n.altBoundary,p=n.flipVariations,y=p===void 0?!0:p,x=n.allowedAutoPlacements,_=e.options.placement,v=Wu(_),S=v===_,w=l||(S||!y?[lE(_)]:sle(_)),E=[_].concat(w).reduce(function(Ce,Re){return Ce.concat(Wu(Re)===IO?ale(e,{placement:Re,boundary:c,rootBoundary:f,padding:u,flipVariations:y,allowedAutoPlacements:x}):Re)},[]),T=e.rects.reference,C=e.rects.popper,D=new Map,O=!0,P=E[0],N=0;N=0,K=j?"width":"height",Y=Cx(e,{placement:k,boundary:c,rootBoundary:f,altBoundary:d,padding:u}),$=j?Z?Sl:qa:Z?wl:ja;T[K]>C[K]&&($=lE($));var W=lE($),U=[];if(o&&U.push(Y[G]<=0),s&&U.push(Y[$]<=0,Y[W]<=0),U.every(function(Ce){return Ce})){P=k,O=!1;break}D.set(k,U)}if(O)for(var te=y?3:1,re=function(Re){var Ie=E.find(function(He){var tt=D.get(He);if(tt)return tt.slice(0,Re).every(function(Qe){return Qe})});if(Ie)return P=Ie,"break"},le=te;le>0;le--){var ce=re(le);if(ce==="break")break}e.placement!==P&&(e.modifiersData[r]._skip=!0,e.placement=P,e.reset=!0)}}const ule={name:"flip",enabled:!0,phase:"main",fn:lle,requiresIfExists:["offset"],data:{_skip:!1}};function n8(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function r8(t){return[ja,Sl,wl,qa].some(function(e){return t[e]>=0})}function cle(t){var e=t.state,n=t.name,r=e.rects.reference,i=e.rects.popper,o=e.modifiersData.preventOverflow,a=Cx(e,{elementContext:"reference"}),s=Cx(e,{altBoundary:!0}),l=n8(a,r),u=n8(s,i,o),c=r8(l),f=r8(u);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:f},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":f})}const fle={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:cle};function dle(t,e,n){var r=Wu(t),i=[qa,ja].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[qa,Sl].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function hle(t){var e=t.state,n=t.options,r=t.name,i=n.offset,o=i===void 0?[0,0]:i,a=fH.reduce(function(c,f){return c[f]=dle(f,e.rects,o),c},{}),s=a[e.placement],l=s.x,u=s.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=u),e.modifiersData[r]=a}const ple={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:hle};function mle(t){var e=t.state,n=t.name;e.modifiersData[n]=yH({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const gle={name:"popperOffsets",enabled:!0,phase:"read",fn:mle,data:{}};function vle(t){return t==="x"?"y":"x"}function yle(t){var e=t.state,n=t.options,r=t.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,u=n.rootBoundary,c=n.altBoundary,f=n.padding,d=n.tether,p=d===void 0?!0:d,y=n.tetherOffset,x=y===void 0?0:y,_=Cx(e,{boundary:l,rootBoundary:u,padding:f,altBoundary:c}),v=Wu(e.placement),S=tv(e.placement),w=!S,E=kO(v),T=vle(E),C=e.modifiersData.popperOffsets,D=e.rects.reference,O=e.rects.popper,P=typeof x=="function"?x(Object.assign({},e.rects,{placement:e.placement})):x,N=typeof P=="number"?{mainAxis:P,altAxis:P}:Object.assign({mainAxis:0,altAxis:0},P),k=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,G={x:0,y:0};if(C){if(o){var Z,j=E==="y"?ja:qa,K=E==="y"?wl:Sl,Y=E==="y"?"height":"width",$=C[E],W=$+_[j],U=$-_[K],te=p?-O[Y]/2:0,re=S===Jg?D[Y]:O[Y],le=S===Jg?-O[Y]:-D[Y],ce=e.elements.arrow,Ce=p&&ce?LO(ce):{width:0,height:0},Re=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:pH(),Ie=Re[j],He=Re[K],tt=B1(0,D[Y],Ce[Y]),Qe=w?D[Y]/2-te-tt-Ie-N.mainAxis:re-tt-Ie-N.mainAxis,ct=w?-D[Y]/2+te+tt+He+N.mainAxis:le+tt+He+N.mainAxis,Xe=e.elements.arrow&&_b(e.elements.arrow),ue=Xe?E==="y"?Xe.clientTop||0:Xe.clientLeft||0:0,De=(Z=k==null?void 0:k[E])!=null?Z:0,Ee=$+Qe-De-ue,X=$+ct-De,ne=B1(p?e2(W,Ee):W,$,p?Ep(U,X):U);C[E]=ne,G[E]=ne-$}if(s){var me,we=E==="x"?ja:qa,Ne=E==="x"?wl:Sl,Ue=C[T],We=T==="y"?"height":"width",lt=Ue+_[we],z=Ue-_[Ne],B=[ja,qa].indexOf(v)!==-1,oe=(me=k==null?void 0:k[T])!=null?me:0,ge=B?lt:Ue-D[We]-O[We]-oe+N.altAxis,pe=B?Ue+D[We]+O[We]-oe-N.altAxis:z,de=p&&B?Hse(ge,Ue,pe):B1(p?ge:lt,Ue,p?pe:z);C[T]=de,G[T]=de-Ue}e.modifiersData[r]=G}}const xle={name:"preventOverflow",enabled:!0,phase:"main",fn:yle,requiresIfExists:["offset"]};function ble(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function _le(t){return t===Us(t)||!vl(t)?BO(t):ble(t)}function wle(t){var e=t.getBoundingClientRect(),n=Qg(e.width)/t.offsetWidth||1,r=Qg(e.height)/t.offsetHeight||1;return n!==1||r!==1}function Sle(t,e,n){n===void 0&&(n=!1);var r=vl(e),i=vl(e)&&wle(e),o=Jd(e),a=ev(t,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Qu(e)!=="body"||zO(o))&&(s=_le(e)),vl(e)?(l=ev(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):o&&(l.x=UO(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Ele(t){var e=new Map,n=new Set,r=[];t.forEach(function(o){e.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=e.get(s);l&&i(l)}}),r.push(o)}return t.forEach(function(o){n.has(o.name)||i(o)}),r}function Mle(t){var e=Ele(t);return Lse.reduce(function(n,r){return n.concat(e.filter(function(i){return i.phase===r}))},[])}function Cle(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function Ale(t){var e=t.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(e).map(function(n){return e[n]})}var i8={placement:"bottom",modifiers:[],strategy:"absolute"};function o8(){for(var t=arguments.length,e=new Array(t),n=0;n{o||s(Ple(i)||document.body)},[i,o]),_l(()=>{if(a&&!o)return _x(n,a),()=>{_x(n,null)}},[n,a,o]),o){if(H.isValidElement(r)){const u={ref:l};return H.cloneElement(r,u)}return F.jsx(H.Fragment,{children:r})}return F.jsx(H.Fragment,{children:a&&Zd.createPortal(r,a)})});function Nle(t){return Qt("MuiPopper",t)}Yt("MuiPopper",["root"]);const Ole=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],Ile=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function Fle(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 CR(t){return typeof t=="function"?t():t}function Lle(t){return t.nodeType!==void 0}const kle=()=>nn({root:["root"]},pse(Nle)),Ble={},Ule=H.forwardRef(function(e,n){var r;const{anchorEl:i,children:o,direction:a,disablePortal:s,modifiers:l,open:u,placement:c,popperOptions:f,popperRef:d,slotProps:p={},slots:y={},TransitionProps:x}=e,_=yt(e,Ole),v=H.useRef(null),S=Jr(v,n),w=H.useRef(null),E=Jr(w,d),T=H.useRef(E);_l(()=>{T.current=E},[E]),H.useImperativeHandle(d,()=>w.current,[]);const C=Fle(c,a),[D,O]=H.useState(C),[P,N]=H.useState(CR(i));H.useEffect(()=>{w.current&&w.current.forceUpdate()}),H.useEffect(()=>{i&&N(CR(i))},[i]),_l(()=>{if(!P||!u)return;const K=W=>{O(W.placement)};let Y=[{name:"preventOverflow",options:{altBoundary:s}},{name:"flip",options:{altBoundary:s}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:W})=>{K(W)}}];l!=null&&(Y=Y.concat(l)),f&&f.modifiers!=null&&(Y=Y.concat(f.modifiers));const $=Rle(P,v.current,Q({placement:C},f,{modifiers:Y}));return T.current($),()=>{$.destroy(),T.current(null)}},[P,s,l,u,f,C]);const k={placement:D};x!==null&&(k.TransitionProps=x);const G=kle(),Z=(r=y.root)!=null?r:"div",j=$p({elementType:Z,externalSlotProps:p.root,externalForwardedProps:_,additionalProps:{role:"tooltip",ref:S},ownerState:e,className:G.root});return F.jsx(Z,Q({},j,{children:typeof o=="function"?o(k):o}))}),zle=H.forwardRef(function(e,n){const{anchorEl:r,children:i,container:o,direction:a="ltr",disablePortal:s=!1,keepMounted:l=!1,modifiers:u,open:c,placement:f="bottom",popperOptions:d=Ble,popperRef:p,style:y,transition:x=!1,slotProps:_={},slots:v={}}=e,S=yt(e,Ile),[w,E]=H.useState(!0),T=()=>{E(!1)},C=()=>{E(!0)};if(!l&&!c&&(!x||w))return null;let D;if(o)D=o;else if(r){const N=CR(r);D=N&&Lle(N)?Yo(N).body:Yo(null).body}const O=!c&&l&&(!x||w)?"none":void 0,P=x?{in:c,onEnter:T,onExited:C}:void 0;return F.jsx(xH,{disablePortal:s,container:D,children:F.jsx(Ule,Q({anchorEl:r,direction:a,disablePortal:s,modifiers:u,ref:n,open:x?!w:c,placement:f,popperOptions:d,popperRef:p,slotProps:_,slots:v},S,{style:Q({position:"fixed",top:0,left:0,display:O},y),TransitionProps:P,children:i}))})});function $le(t){const e=Yo(t);return e.body===t?Ju(t).innerWidth>e.documentElement.clientWidth:t.scrollHeight>t.clientHeight}function z1(t,e){e?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden")}function a8(t){return parseInt(Ju(t).getComputedStyle(t).paddingRight,10)||0}function Hle(t){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(t.tagName)!==-1,r=t.tagName==="INPUT"&&t.getAttribute("type")==="hidden";return n||r}function s8(t,e,n,r,i){const o=[e,n,...r];[].forEach.call(t.children,a=>{const s=o.indexOf(a)===-1,l=!Hle(a);s&&l&&z1(a,i)})}function BT(t,e){let n=-1;return t.some((r,i)=>e(r)?(n=i,!0):!1),n}function Vle(t,e){const n=[],r=t.container;if(!e.disableScrollLock){if($le(r)){const a=D7(Yo(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${a8(r)+a}px`;const s=Yo(r).querySelectorAll(".mui-fixed");[].forEach.call(s,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${a8(l)+a}px`})}let o;if(r.parentNode instanceof DocumentFragment)o=Yo(r).body;else{const a=r.parentElement,s=Ju(r);o=(a==null?void 0:a.nodeName)==="HTML"&&s.getComputedStyle(a).overflowY==="scroll"?a:r}n.push({value:o.style.overflow,property:"overflow",el:o},{value:o.style.overflowX,property:"overflow-x",el:o},{value:o.style.overflowY,property:"overflow-y",el:o}),o.style.overflow="hidden"}return()=>{n.forEach(({value:o,el:a,property:s})=>{o?a.style.setProperty(s,o):a.style.removeProperty(s)})}}function Wle(t){const e=[];return[].forEach.call(t.children,n=>{n.getAttribute("aria-hidden")==="true"&&e.push(n)}),e}class Gle{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,n){let r=this.modals.indexOf(e);if(r!==-1)return r;r=this.modals.length,this.modals.push(e),e.modalRef&&z1(e.modalRef,!1);const i=Wle(n);s8(n,e.mount,e.modalRef,i,!0);const o=BT(this.containers,a=>a.container===n);return o!==-1?(this.containers[o].modals.push(e),r):(this.containers.push({modals:[e],container:n,restore:null,hiddenSiblings:i}),r)}mount(e,n){const r=BT(this.containers,o=>o.modals.indexOf(e)!==-1),i=this.containers[r];i.restore||(i.restore=Vle(i,n))}remove(e,n=!0){const r=this.modals.indexOf(e);if(r===-1)return r;const i=BT(this.containers,a=>a.modals.indexOf(e)!==-1),o=this.containers[i];if(o.modals.splice(o.modals.indexOf(e),1),this.modals.splice(r,1),o.modals.length===0)o.restore&&o.restore(),e.modalRef&&z1(e.modalRef,n),s8(o.container,e.mount,e.modalRef,o.hiddenSiblings,!1),this.containers.splice(i,1);else{const a=o.modals[o.modals.length-1];a.modalRef&&z1(a.modalRef,!1)}return r}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}function jle(t){return typeof t=="function"?t():t}function qle(t){return t?t.props.hasOwnProperty("in"):!1}const Xle=new Gle;function Yle(t){const{container:e,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=Xle,closeAfterTransition:o=!1,onTransitionEnter:a,onTransitionExited:s,children:l,onClose:u,open:c,rootRef:f}=t,d=H.useRef({}),p=H.useRef(null),y=H.useRef(null),x=Jr(y,f),[_,v]=H.useState(!c),S=qle(l);let w=!0;(t["aria-hidden"]==="false"||t["aria-hidden"]===!1)&&(w=!1);const E=()=>Yo(p.current),T=()=>(d.current.modalRef=y.current,d.current.mount=p.current,d.current),C=()=>{i.mount(T(),{disableScrollLock:r}),y.current&&(y.current.scrollTop=0)},D=Jl(()=>{const Y=jle(e)||E().body;i.add(T(),Y),y.current&&C()}),O=H.useCallback(()=>i.isTopModal(T()),[i]),P=Jl(Y=>{p.current=Y,Y&&(c&&O()?C():y.current&&z1(y.current,w))}),N=H.useCallback(()=>{i.remove(T(),w)},[w,i]);H.useEffect(()=>()=>{N()},[N]),H.useEffect(()=>{c?D():(!S||!o)&&N()},[c,N,S,o,D]);const k=Y=>$=>{var W;(W=Y.onKeyDown)==null||W.call(Y,$),!($.key!=="Escape"||$.which===229||!O())&&(n||($.stopPropagation(),u&&u($,"escapeKeyDown")))},G=Y=>$=>{var W;(W=Y.onClick)==null||W.call(Y,$),$.target===$.currentTarget&&u&&u($,"backdropClick")};return{getRootProps:(Y={})=>{const $=uH(t);delete $.onTransitionEnter,delete $.onTransitionExited;const W=Q({},$,Y);return Q({role:"presentation"},W,{onKeyDown:k(W),ref:x})},getBackdropProps:(Y={})=>{const $=Y;return Q({"aria-hidden":!0},$,{onClick:G($),open:c})},getTransitionProps:()=>{const Y=()=>{v(!1),a&&a()},$=()=>{v(!0),s&&s(),o&&N()};return{onEnter:XE(Y,l==null?void 0:l.props.onEnter),onExited:XE($,l==null?void 0:l.props.onExited)}},rootRef:x,portalRef:P,isTopModal:O,exited:_,hasTransition:S}}const Kle=["onChange","maxRows","minRows","style","value"];function Dw(t){return parseInt(t,10)||0}const Zle={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function l8(t){return t==null||Object.keys(t).length===0||t.outerHeightStyle===0&&!t.overflow}const Jle=H.forwardRef(function(e,n){const{onChange:r,maxRows:i,minRows:o=1,style:a,value:s}=e,l=yt(e,Kle),{current:u}=H.useRef(s!=null),c=H.useRef(null),f=Jr(n,c),d=H.useRef(null),p=H.useRef(0),[y,x]=H.useState({outerHeightStyle:0}),_=H.useCallback(()=>{const E=c.current,C=Ju(E).getComputedStyle(E);if(C.width==="0px")return{outerHeightStyle:0};const D=d.current;D.style.width=C.width,D.value=E.value||e.placeholder||"x",D.value.slice(-1)===` -`&&(D.value+=" ");const O=C.boxSizing,P=Dw(C.paddingBottom)+Dw(C.paddingTop),N=Dw(C.borderBottomWidth)+Dw(C.borderTopWidth),k=D.scrollHeight;D.value="x";const G=D.scrollHeight;let Z=k;o&&(Z=Math.max(Number(o)*G,Z)),i&&(Z=Math.min(Number(i)*G,Z)),Z=Math.max(Z,G);const j=Z+(O==="border-box"?P+N:0),K=Math.abs(Z-k)<=1;return{outerHeightStyle:j,overflow:K}},[i,o,e.placeholder]),v=(E,T)=>{const{outerHeightStyle:C,overflow:D}=T;return p.current<20&&(C>0&&Math.abs((E.outerHeightStyle||0)-C)>1||E.overflow!==D)?(p.current+=1,{overflow:D,outerHeightStyle:C}):E},S=H.useCallback(()=>{const E=_();l8(E)||x(T=>v(T,E))},[_]);_l(()=>{const E=()=>{const k=_();l8(k)||Zd.flushSync(()=>{x(G=>v(G,k))})},T=()=>{p.current=0,E()};let C;const D=EM(T),O=c.current,P=Ju(O);P.addEventListener("resize",D);let N;return typeof ResizeObserver<"u"&&(N=new ResizeObserver(T),N.observe(O)),()=>{D.clear(),cancelAnimationFrame(C),P.removeEventListener("resize",D),N&&N.disconnect()}},[_]),_l(()=>{S()}),H.useEffect(()=>{p.current=0},[s]);const w=E=>{p.current=0,u||S(),r&&r(E)};return F.jsxs(H.Fragment,{children:[F.jsx("textarea",Q({value:s,onChange:w,ref:f,rows:o,style:Q({height:y.outerHeightStyle,overflow:y.overflow?"hidden":void 0},a)},l)),F.jsx("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:d,tabIndex:-1,style:Q({},Zle.shadow,a,{paddingTop:0,paddingBottom:0})})]})});function u8(t){return typeof t.normalize<"u"?t.normalize("NFD").replace(/[\u0300-\u036f]/g,""):t}function Qle(t={}){const{ignoreAccents:e=!0,ignoreCase:n=!0,limit:r,matchFrom:i="any",stringify:o,trim:a=!1}=t;return(s,{inputValue:l,getOptionLabel:u})=>{let c=a?l.trim():l;n&&(c=c.toLowerCase()),e&&(c=u8(c));const f=c?s.filter(d=>{let p=(o||u)(d);return n&&(p=p.toLowerCase()),e&&(p=u8(p)),i==="start"?p.indexOf(c)===0:p.indexOf(c)>-1}):s;return typeof r=="number"?f.slice(0,r):f}}function UT(t,e){for(let n=0;n{var e;return t.current!==null&&((e=t.current.parentElement)==null?void 0:e.contains(document.activeElement))};function nue(t){const{unstable_isActiveElementInListbox:e=tue,unstable_classNamePrefix:n="Mui",autoComplete:r=!1,autoHighlight:i=!1,autoSelect:o=!1,blurOnSelect:a=!1,clearOnBlur:s=!t.freeSolo,clearOnEscape:l=!1,componentName:u="useAutocomplete",defaultValue:c=t.multiple?[]:null,disableClearable:f=!1,disableCloseOnSelect:d=!1,disabled:p,disabledItemsFocusable:y=!1,disableListWrap:x=!1,filterOptions:_=eue,filterSelectedOptions:v=!1,freeSolo:S=!1,getOptionDisabled:w,getOptionLabel:E=Ze=>{var Ge;return(Ge=Ze.label)!=null?Ge:Ze},groupBy:T,handleHomeEndKeys:C=!t.freeSolo,id:D,includeInputInList:O=!1,inputValue:P,isOptionEqualToValue:N=(Ze,Ge)=>Ze===Ge,multiple:k=!1,onChange:G,onClose:Z,onHighlightChange:j,onInputChange:K,onOpen:Y,open:$,openOnFocus:W=!1,options:U,readOnly:te=!1,selectOnFocus:re=!t.freeSolo,value:le}=t,ce=vv(D);let Ce=E;Ce=Ze=>{const Ge=E(Ze);return typeof Ge!="string"?String(Ge):Ge};const Re=H.useRef(!1),Ie=H.useRef(!0),He=H.useRef(null),tt=H.useRef(null),[Qe,ct]=H.useState(null),[Xe,ue]=H.useState(-1),De=i?0:-1,Ee=H.useRef(De),[X,ne]=Td({controlled:le,default:c,name:u}),[me,we]=Td({controlled:P,default:"",name:u,state:"inputValue"}),[Ne,Ue]=H.useState(!1),We=H.useCallback((Ze,Ge)=>{if(!(k?X.length!(v&&(k?X:[X]).some(Ge=>Ge!==null&&N(Ze,Ge)))),{inputValue:ge&&B?"":me,getOptionLabel:Ce}):[],ve=ere({filteredOptions:de,value:X,inputValue:me});H.useEffect(()=>{const Ze=X!==ve.value;Ne&&!Ze||S&&!Ze||We(null,X)},[X,We,Ne,ve.value,S]);const Se=lt&&de.length>0&&!te,Pe=Jl(Ze=>{Ze===-1?He.current.focus():Qe.querySelector(`[data-tag-index="${Ze}"]`).focus()});H.useEffect(()=>{k&&Xe>X.length-1&&(ue(-1),Pe(-1))},[X,k,Xe,Pe]);function Be(Ze,Ge){if(!tt.current||Ze<0||Ze>=de.length)return-1;let ot=Ze;for(;;){const J=tt.current.querySelector(`[data-option-index="${ot}"]`),_e=y?!1:!J||J.disabled||J.getAttribute("aria-disabled")==="true";if(J&&J.hasAttribute("tabindex")&&!_e)return ot;if(Ge==="next"?ot=(ot+1)%de.length:ot=(ot-1+de.length)%de.length,ot===Ze)return-1}}const je=Jl(({event:Ze,index:Ge,reason:ot="auto"})=>{if(Ee.current=Ge,Ge===-1?He.current.removeAttribute("aria-activedescendant"):He.current.setAttribute("aria-activedescendant",`${ce}-option-${Ge}`),j&&j(Ze,Ge===-1?null:de[Ge],ot),!tt.current)return;const J=tt.current.querySelector(`[role="option"].${n}-focused`);J&&(J.classList.remove(`${n}-focused`),J.classList.remove(`${n}-focusVisible`));let _e=tt.current;if(tt.current.getAttribute("role")!=="listbox"&&(_e=tt.current.parentElement.querySelector('[role="listbox"]')),!_e)return;if(Ge===-1){_e.scrollTop=0;return}const Oe=tt.current.querySelector(`[data-option-index="${Ge}"]`);if(Oe&&(Oe.classList.add(`${n}-focused`),ot==="keyboard"&&Oe.classList.add(`${n}-focusVisible`),_e.scrollHeight>_e.clientHeight&&ot!=="mouse"&&ot!=="touch")){const ke=Oe,ze=_e.clientHeight+_e.scrollTop,Mt=ke.offsetTop+ke.offsetHeight;Mt>ze?_e.scrollTop=Mt-_e.clientHeight:ke.offsetTop-ke.offsetHeight*(T?1.3:0)<_e.scrollTop&&(_e.scrollTop=ke.offsetTop-ke.offsetHeight*(T?1.3:0))}}),Le=Jl(({event:Ze,diff:Ge,direction:ot="next",reason:J="auto"})=>{if(!pe)return;const Oe=Be((()=>{const ke=de.length-1;if(Ge==="reset")return De;if(Ge==="start")return 0;if(Ge==="end")return ke;const ze=Ee.current+Ge;return ze<0?ze===-1&&O?-1:x&&Ee.current!==-1||Math.abs(Ge)>1?0:ke:ze>ke?ze===ke+1&&O?-1:x||Math.abs(Ge)>1?ke:0:ze})(),ot);if(je({index:Oe,reason:J,event:Ze}),r&&Ge!=="reset")if(Oe===-1)He.current.value=me;else{const ke=Ce(de[Oe]);He.current.value=ke,ke.toLowerCase().indexOf(me.toLowerCase())===0&&me.length>0&&He.current.setSelectionRange(me.length,ke.length)}}),_t=()=>{const Ze=(Ge,ot)=>{const J=Ge?Ce(Ge):"",_e=ot?Ce(ot):"";return J===_e};if(Ee.current!==-1&&ve.filteredOptions&&ve.filteredOptions.length!==de.length&&ve.inputValue===me&&(k?X.length===ve.value.length&&ve.value.every((Ge,ot)=>Ce(X[ot])===Ce(Ge)):Ze(ve.value,X))){const Ge=ve.filteredOptions[Ee.current];if(Ge&&de.some(J=>Ce(J)===Ce(Ge)))return!0}return!1},xt=H.useCallback(()=>{if(!pe||_t())return;const Ze=k?X[0]:X;if(de.length===0||Ze==null){Le({diff:"reset"});return}if(tt.current){if(Ze!=null){const Ge=de[Ee.current];if(k&&Ge&&UT(X,J=>N(Ge,J))!==-1)return;const ot=UT(de,J=>N(J,Ze));ot===-1?Le({diff:"reset"}):je({index:ot});return}if(Ee.current>=de.length-1){je({index:de.length-1});return}je({index:Ee.current})}},[de.length,k?!1:X,v,Le,je,pe,me,k]),wt=Jl(Ze=>{_x(tt,Ze),Ze&&xt()});H.useEffect(()=>{xt()},[xt]);const Ct=Ze=>{lt||(z(!0),oe(!0),Y&&Y(Ze))},pt=(Ze,Ge)=>{lt&&(z(!1),Z&&Z(Ze,Ge))},jt=(Ze,Ge,ot,J)=>{if(k){if(X.length===Ge.length&&X.every((_e,Oe)=>_e===Ge[Oe]))return}else if(X===Ge)return;G&&G(Ze,Ge,ot,J),ne(Ge)},be=H.useRef(!1),gt=(Ze,Ge,ot="selectOption",J="options")=>{let _e=ot,Oe=Ge;if(k){Oe=Array.isArray(X)?X.slice():[];const ke=UT(Oe,ze=>N(Ge,ze));ke===-1?Oe.push(Ge):J!=="freeSolo"&&(Oe.splice(ke,1),_e="removeOption")}We(Ze,Oe),jt(Ze,Oe,_e,{option:Ge}),!d&&(!Ze||!Ze.ctrlKey&&!Ze.metaKey)&&pt(Ze,_e),(a===!0||a==="touch"&&be.current||a==="mouse"&&!be.current)&&He.current.blur()};function ft(Ze,Ge){if(Ze===-1)return-1;let ot=Ze;for(;;){if(Ge==="next"&&ot===X.length||Ge==="previous"&&ot===-1)return-1;const J=Qe.querySelector(`[data-tag-index="${ot}"]`);if(!J||!J.hasAttribute("tabindex")||J.disabled||J.getAttribute("aria-disabled")==="true")ot+=Ge==="next"?1:-1;else return ot}}const Ye=(Ze,Ge)=>{if(!k)return;me===""&&pt(Ze,"toggleInput");let ot=Xe;Xe===-1?me===""&&Ge==="previous"&&(ot=X.length-1):(ot+=Ge==="next"?1:-1,ot<0&&(ot=0),ot===X.length&&(ot=-1)),ot=ft(ot,Ge),ue(ot),Pe(ot)},mt=Ze=>{Re.current=!0,we(""),K&&K(Ze,"","clear"),jt(Ze,k?[]:null,"clear")},Vt=Ze=>Ge=>{if(Ze.onKeyDown&&Ze.onKeyDown(Ge),!Ge.defaultMuiPrevented&&(Xe!==-1&&["ArrowLeft","ArrowRight"].indexOf(Ge.key)===-1&&(ue(-1),Pe(-1)),Ge.which!==229))switch(Ge.key){case"Home":pe&&C&&(Ge.preventDefault(),Le({diff:"start",direction:"next",reason:"keyboard",event:Ge}));break;case"End":pe&&C&&(Ge.preventDefault(),Le({diff:"end",direction:"previous",reason:"keyboard",event:Ge}));break;case"PageUp":Ge.preventDefault(),Le({diff:-c8,direction:"previous",reason:"keyboard",event:Ge}),Ct(Ge);break;case"PageDown":Ge.preventDefault(),Le({diff:c8,direction:"next",reason:"keyboard",event:Ge}),Ct(Ge);break;case"ArrowDown":Ge.preventDefault(),Le({diff:1,direction:"next",reason:"keyboard",event:Ge}),Ct(Ge);break;case"ArrowUp":Ge.preventDefault(),Le({diff:-1,direction:"previous",reason:"keyboard",event:Ge}),Ct(Ge);break;case"ArrowLeft":Ye(Ge,"previous");break;case"ArrowRight":Ye(Ge,"next");break;case"Enter":if(Ee.current!==-1&&pe){const ot=de[Ee.current],J=w?w(ot):!1;if(Ge.preventDefault(),J)return;gt(Ge,ot,"selectOption"),r&&He.current.setSelectionRange(He.current.value.length,He.current.value.length)}else S&&me!==""&&ge===!1&&(k&&Ge.preventDefault(),gt(Ge,me,"createOption","freeSolo"));break;case"Escape":pe?(Ge.preventDefault(),Ge.stopPropagation(),pt(Ge,"escape")):l&&(me!==""||k&&X.length>0)&&(Ge.preventDefault(),Ge.stopPropagation(),mt(Ge));break;case"Backspace":if(k&&!te&&me===""&&X.length>0){const ot=Xe===-1?X.length-1:Xe,J=X.slice();J.splice(ot,1),jt(Ge,J,"removeOption",{option:X[ot]})}break;case"Delete":if(k&&!te&&me===""&&X.length>0&&Xe!==-1){const ot=Xe,J=X.slice();J.splice(ot,1),jt(Ge,J,"removeOption",{option:X[ot]})}break}},_n=Ze=>{Ue(!0),W&&!Re.current&&Ct(Ze)},Zn=Ze=>{if(e(tt)){He.current.focus();return}Ue(!1),Ie.current=!0,Re.current=!1,o&&Ee.current!==-1&&pe?gt(Ze,de[Ee.current],"blur"):o&&S&&me!==""?gt(Ze,me,"blur","freeSolo"):s&&We(Ze,X),pt(Ze,"blur")},Cr=Ze=>{const Ge=Ze.target.value;me!==Ge&&(we(Ge),oe(!1),K&&K(Ze,Ge,"input")),Ge===""?!f&&!k&&jt(Ze,null,"clear"):Ct(Ze)},dn=Ze=>{const Ge=Number(Ze.currentTarget.getAttribute("data-option-index"));Ee.current!==Ge&&je({event:Ze,index:Ge,reason:"mouse"})},En=Ze=>{je({event:Ze,index:Number(Ze.currentTarget.getAttribute("data-option-index")),reason:"touch"}),be.current=!0},ur=Ze=>{const Ge=Number(Ze.currentTarget.getAttribute("data-option-index"));gt(Ze,de[Ge],"selectOption"),be.current=!1},Aa=Ze=>Ge=>{const ot=X.slice();ot.splice(Ze,1),jt(Ge,ot,"removeOption",{option:X[Ze]})},Ta=Ze=>{lt?pt(Ze,"toggleInput"):Ct(Ze)},ns=Ze=>{Ze.currentTarget.contains(Ze.target)&&Ze.target.getAttribute("id")!==ce&&Ze.preventDefault()},Oo=Ze=>{Ze.currentTarget.contains(Ze.target)&&(He.current.focus(),re&&Ie.current&&He.current.selectionEnd-He.current.selectionStart===0&&He.current.select(),Ie.current=!1)},ea=Ze=>{!p&&(me===""||!lt)&&Ta(Ze)};let Io=S&&me.length>0;Io=Io||(k?X.length>0:X!==null);let ta=de;return T&&(ta=de.reduce((Ze,Ge,ot)=>{const J=T(Ge);return Ze.length>0&&Ze[Ze.length-1].group===J?Ze[Ze.length-1].options.push(Ge):Ze.push({key:ot,index:ot,group:J,options:[Ge]}),Ze},[])),p&&Ne&&Zn(),{getRootProps:(Ze={})=>Q({"aria-owns":Se?`${ce}-listbox`:null},Ze,{onKeyDown:Vt(Ze),onMouseDown:ns,onClick:Oo}),getInputLabelProps:()=>({id:`${ce}-label`,htmlFor:ce}),getInputProps:()=>({id:ce,value:me,onBlur:Zn,onFocus:_n,onChange:Cr,onMouseDown:ea,"aria-activedescendant":pe?"":null,"aria-autocomplete":r?"both":"list","aria-controls":Se?`${ce}-listbox`:void 0,"aria-expanded":Se,autoComplete:"off",ref:He,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:p}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:mt}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:Ta}),getTagProps:({index:Ze})=>Q({key:Ze,"data-tag-index":Ze,tabIndex:-1},!te&&{onDelete:Aa(Ze)}),getListboxProps:()=>({role:"listbox",id:`${ce}-listbox`,"aria-labelledby":`${ce}-label`,ref:wt,onMouseDown:Ze=>{Ze.preventDefault()}}),getOptionProps:({index:Ze,option:Ge})=>{const ot=(k?X:[X]).some(_e=>_e!=null&&N(Ge,_e)),J=w?w(Ge):!1;return{key:Ce(Ge),tabIndex:-1,role:"option",id:`${ce}-option-${Ze}`,onMouseMove:dn,onClick:ur,onTouchStart:En,"data-option-index":Ze,"aria-disabled":J,"aria-selected":ot}},id:ce,inputValue:me,value:X,dirty:Io,expanded:pe&&Qe,popupOpen:pe,focused:Ne||Xe!==-1,anchorEl:Qe,setAnchorEl:ct,focusedTag:Xe,groupedOptions:ta}}const rue=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],iue=ut(zle,{name:"MuiPopper",slot:"Root",overridesResolver:(t,e)=>e.root})({}),oue=H.forwardRef(function(e,n){var r;const i=Q7(),o=an({props:e,name:"MuiPopper"}),{anchorEl:a,component:s,components:l,componentsProps:u,container:c,disablePortal:f,keepMounted:d,modifiers:p,open:y,placement:x,popperOptions:_,popperRef:v,transition:S,slots:w,slotProps:E}=o,T=yt(o,rue),C=(r=w==null?void 0:w.root)!=null?r:l==null?void 0:l.Root,D=Q({anchorEl:a,container:c,disablePortal:f,keepMounted:d,modifiers:p,open:y,placement:x,popperOptions:_,popperRef:v,transition:S},T);return F.jsx(iue,Q({as:s,direction:i==null?void 0:i.direction,slots:{root:C},slotProps:E??u},D,{ref:n}))}),bH=oue;function aue(t){return Qt("MuiListSubheader",t)}Yt("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const sue=["className","color","component","disableGutters","disableSticky","inset"],lue=t=>{const{classes:e,color:n,disableGutters:r,inset:i,disableSticky:o}=t,a={root:["root",n!=="default"&&`color${it(n)}`,!r&&"gutters",i&&"inset",!o&&"sticky"]};return nn(a,aue,e)},uue=ut("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.color!=="default"&&e[`color${it(n.color)}`],!n.disableGutters&&e.gutters,n.inset&&e.inset,!n.disableSticky&&e.sticky]}})(({theme:t,ownerState:e})=>Q({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)},e.color==="primary"&&{color:(t.vars||t).palette.primary.main},e.color==="inherit"&&{color:"inherit"},!e.disableGutters&&{paddingLeft:16,paddingRight:16},e.inset&&{paddingLeft:72},!e.disableSticky&&{position:"sticky",top:0,zIndex:1,backgroundColor:(t.vars||t).palette.background.paper})),_H=H.forwardRef(function(e,n){const r=an({props:e,name:"MuiListSubheader"}),{className:i,color:o="default",component:a="li",disableGutters:s=!1,disableSticky:l=!1,inset:u=!1}=r,c=yt(r,sue),f=Q({},r,{color:o,component:a,disableGutters:s,disableSticky:l,inset:u}),d=lue(f);return F.jsx(uue,Q({as:a,className:bt(d.root,i),ref:n,ownerState:f},c))});_H.muiSkipListHighlight=!0;const cue=_H,fue=hf(F.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"}),"Cancel");function due(t){return Qt("MuiChip",t)}const hue=Yt("MuiChip",["root","sizeSmall","sizeMedium","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"]),Yn=hue,pue=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],mue=t=>{const{classes:e,disabled:n,size:r,color:i,iconColor:o,onDelete:a,clickable:s,variant:l}=t,u={root:["root",l,n&&"disabled",`size${it(r)}`,`color${it(i)}`,s&&"clickable",s&&`clickableColor${it(i)}`,a&&"deletable",a&&`deletableColor${it(i)}`,`${l}${it(i)}`],label:["label",`label${it(r)}`],avatar:["avatar",`avatar${it(r)}`,`avatarColor${it(i)}`],icon:["icon",`icon${it(r)}`,`iconColor${it(o)}`],deleteIcon:["deleteIcon",`deleteIcon${it(r)}`,`deleteIconColor${it(i)}`,`deleteIcon${it(l)}Color${it(i)}`]};return nn(u,due,e)},gue=ut("div",{name:"MuiChip",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t,{color:r,iconColor:i,clickable:o,onDelete:a,size:s,variant:l}=n;return[{[`& .${Yn.avatar}`]:e.avatar},{[`& .${Yn.avatar}`]:e[`avatar${it(s)}`]},{[`& .${Yn.avatar}`]:e[`avatarColor${it(r)}`]},{[`& .${Yn.icon}`]:e.icon},{[`& .${Yn.icon}`]:e[`icon${it(s)}`]},{[`& .${Yn.icon}`]:e[`iconColor${it(i)}`]},{[`& .${Yn.deleteIcon}`]:e.deleteIcon},{[`& .${Yn.deleteIcon}`]:e[`deleteIcon${it(s)}`]},{[`& .${Yn.deleteIcon}`]:e[`deleteIconColor${it(r)}`]},{[`& .${Yn.deleteIcon}`]:e[`deleteIcon${it(l)}Color${it(r)}`]},e.root,e[`size${it(s)}`],e[`color${it(r)}`],o&&e.clickable,o&&r!=="default"&&e[`clickableColor${it(r)})`],a&&e.deletable,a&&r!=="default"&&e[`deletableColor${it(r)}`],e[l],e[`${l}${it(r)}`]]}})(({theme:t,ownerState:e})=>{const n=t.palette.mode==="light"?t.palette.grey[700]:t.palette.grey[300];return Q({maxWidth:"100%",fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,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",[`&.${Yn.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${Yn.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:t.vars?t.vars.palette.Chip.defaultAvatarColor:n,fontSize:t.typography.pxToRem(12)},[`& .${Yn.avatarColorPrimary}`]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.dark},[`& .${Yn.avatarColorSecondary}`]:{color:(t.vars||t).palette.secondary.contrastText,backgroundColor:(t.vars||t).palette.secondary.dark},[`& .${Yn.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:t.typography.pxToRem(10)},[`& .${Yn.icon}`]:Q({marginLeft:5,marginRight:-6},e.size==="small"&&{fontSize:18,marginLeft:4,marginRight:-4},e.iconColor===e.color&&Q({color:t.vars?t.vars.palette.Chip.defaultIconColor:n},e.color!=="default"&&{color:"inherit"})),[`& .${Yn.deleteIcon}`]:Q({WebkitTapHighlightColor:"transparent",color:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / 0.26)`:zn(t.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / 0.4)`:zn(t.palette.text.primary,.4)}},e.size==="small"&&{fontSize:16,marginRight:4,marginLeft:-4},e.color!=="default"&&{color:t.vars?`rgba(${t.vars.palette[e.color].contrastTextChannel} / 0.7)`:zn(t.palette[e.color].contrastText,.7),"&:hover, &:active":{color:(t.vars||t).palette[e.color].contrastText}})},e.size==="small"&&{height:24},e.color!=="default"&&{backgroundColor:(t.vars||t).palette[e.color].main,color:(t.vars||t).palette[e.color].contrastText},e.onDelete&&{[`&.${Yn.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.action.selectedChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:zn(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},e.onDelete&&e.color!=="default"&&{[`&.${Yn.focusVisible}`]:{backgroundColor:(t.vars||t).palette[e.color].dark}})},({theme:t,ownerState:e})=>Q({},e.clickable&&{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.selectedChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:zn(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity)},[`&.${Yn.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.action.selectedChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:zn(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)},"&:active":{boxShadow:(t.vars||t).shadows[1]}},e.clickable&&e.color!=="default"&&{[`&:hover, &.${Yn.focusVisible}`]:{backgroundColor:(t.vars||t).palette[e.color].dark}}),({theme:t,ownerState:e})=>Q({},e.variant==="outlined"&&{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]}`,[`&.${Yn.clickable}:hover`]:{backgroundColor:(t.vars||t).palette.action.hover},[`&.${Yn.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`& .${Yn.avatar}`]:{marginLeft:4},[`& .${Yn.avatarSmall}`]:{marginLeft:2},[`& .${Yn.icon}`]:{marginLeft:4},[`& .${Yn.iconSmall}`]:{marginLeft:2},[`& .${Yn.deleteIcon}`]:{marginRight:5},[`& .${Yn.deleteIconSmall}`]:{marginRight:3}},e.variant==="outlined"&&e.color!=="default"&&{color:(t.vars||t).palette[e.color].main,border:`1px solid ${t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / 0.7)`:zn(t.palette[e.color].main,.7)}`,[`&.${Yn.clickable}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:zn(t.palette[e.color].main,t.palette.action.hoverOpacity)},[`&.${Yn.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.focusOpacity})`:zn(t.palette[e.color].main,t.palette.action.focusOpacity)},[`& .${Yn.deleteIcon}`]:{color:t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / 0.7)`:zn(t.palette[e.color].main,.7),"&:hover, &:active":{color:(t.vars||t).palette[e.color].main}}})),vue=ut("span",{name:"MuiChip",slot:"Label",overridesResolver:(t,e)=>{const{ownerState:n}=t,{size:r}=n;return[e.label,e[`label${it(r)}`]]}})(({ownerState:t})=>Q({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},t.variant==="outlined"&&{paddingLeft:11,paddingRight:11},t.size==="small"&&{paddingLeft:8,paddingRight:8},t.size==="small"&&t.variant==="outlined"&&{paddingLeft:7,paddingRight:7}));function f8(t){return t.key==="Backspace"||t.key==="Delete"}const yue=H.forwardRef(function(e,n){const r=an({props:e,name:"MuiChip"}),{avatar:i,className:o,clickable:a,color:s="default",component:l,deleteIcon:u,disabled:c=!1,icon:f,label:d,onClick:p,onDelete:y,onKeyDown:x,onKeyUp:_,size:v="medium",variant:S="filled",tabIndex:w,skipFocusWhenDisabled:E=!1}=r,T=yt(r,pue),C=H.useRef(null),D=Jr(C,n),O=U=>{U.stopPropagation(),y&&y(U)},P=U=>{U.currentTarget===U.target&&f8(U)&&U.preventDefault(),x&&x(U)},N=U=>{U.currentTarget===U.target&&(y&&f8(U)?y(U):U.key==="Escape"&&C.current&&C.current.blur()),_&&_(U)},k=a!==!1&&p?!0:a,G=k||y?zp:l||"div",Z=Q({},r,{component:G,disabled:c,size:v,color:s,iconColor:H.isValidElement(f)&&f.props.color||s,onDelete:!!y,clickable:k,variant:S}),j=mue(Z),K=G===zp?Q({component:l||"div",focusVisibleClassName:j.focusVisible},y&&{disableRipple:!0}):{};let Y=null;y&&(Y=u&&H.isValidElement(u)?H.cloneElement(u,{className:bt(u.props.className,j.deleteIcon),onClick:O}):F.jsx(fue,{className:bt(j.deleteIcon),onClick:O}));let $=null;i&&H.isValidElement(i)&&($=H.cloneElement(i,{className:bt(j.avatar,i.props.className)}));let W=null;return f&&H.isValidElement(f)&&(W=H.cloneElement(f,{className:bt(j.icon,f.props.className)})),F.jsxs(gue,Q({as:G,className:bt(j.root,o),disabled:k&&c?!0:void 0,onClick:p,onKeyDown:P,onKeyUp:N,ref:D,tabIndex:E&&c?-1:w,ownerState:Z},K,T,{children:[$||W,F.jsx(vue,{className:bt(j.label),ownerState:Z,children:d}),Y]}))}),xue=yue;function Qd({props:t,states:e,muiFormControl:n}){return e.reduce((r,i)=>(r[i]=t[i],n&&typeof t[i]>"u"&&(r[i]=n[i]),r),{})}const bue=H.createContext(void 0),$O=bue;function gf(){return H.useContext($O)}function _ue(t){return F.jsx(roe,Q({},t,{defaultTheme:ZM,themeId:vb}))}function d8(t){return t!=null&&!(Array.isArray(t)&&t.length===0)}function t2(t,e=!1){return t&&(d8(t.value)&&t.value!==""||e&&d8(t.defaultValue)&&t.defaultValue!=="")}function wue(t){return t.startAdornment}function Sue(t){return Qt("MuiInputBase",t)}const Eue=Yt("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),Ms=Eue,Mue=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],tC=(t,e)=>{const{ownerState:n}=t;return[e.root,n.formControl&&e.formControl,n.startAdornment&&e.adornedStart,n.endAdornment&&e.adornedEnd,n.error&&e.error,n.size==="small"&&e.sizeSmall,n.multiline&&e.multiline,n.color&&e[`color${it(n.color)}`],n.fullWidth&&e.fullWidth,n.hiddenLabel&&e.hiddenLabel]},nC=(t,e)=>{const{ownerState:n}=t;return[e.input,n.size==="small"&&e.inputSizeSmall,n.multiline&&e.inputMultiline,n.type==="search"&&e.inputTypeSearch,n.startAdornment&&e.inputAdornedStart,n.endAdornment&&e.inputAdornedEnd,n.hiddenLabel&&e.inputHiddenLabel]},Cue=t=>{const{classes:e,color:n,disabled:r,error:i,endAdornment:o,focused:a,formControl:s,fullWidth:l,hiddenLabel:u,multiline:c,readOnly:f,size:d,startAdornment:p,type:y}=t,x={root:["root",`color${it(n)}`,r&&"disabled",i&&"error",l&&"fullWidth",a&&"focused",s&&"formControl",d&&d!=="medium"&&`size${it(d)}`,c&&"multiline",p&&"adornedStart",o&&"adornedEnd",u&&"hiddenLabel",f&&"readOnly"],input:["input",r&&"disabled",y==="search"&&"inputTypeSearch",c&&"inputMultiline",d==="small"&&"inputSizeSmall",u&&"inputHiddenLabel",p&&"inputAdornedStart",o&&"inputAdornedEnd",f&&"readOnly"]};return nn(x,Sue,e)},rC=ut("div",{name:"MuiInputBase",slot:"Root",overridesResolver:tC})(({theme:t,ownerState:e})=>Q({},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",[`&.${Ms.disabled}`]:{color:(t.vars||t).palette.text.disabled,cursor:"default"}},e.multiline&&Q({padding:"4px 0 5px"},e.size==="small"&&{paddingTop:1}),e.fullWidth&&{width:"100%"})),iC=ut("input",{name:"MuiInputBase",slot:"Input",overridesResolver:nC})(({theme:t,ownerState:e})=>{const n=t.palette.mode==="light",r=Q({color:"currentColor"},t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5},{transition:t.transitions.create("opacity",{duration:t.transitions.duration.shorter})}),i={opacity:"0 !important"},o=t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5};return Q({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%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${Ms.formControl} &`]:{"&::-webkit-input-placeholder":i,"&::-moz-placeholder":i,"&:-ms-input-placeholder":i,"&::-ms-input-placeholder":i,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus:-ms-input-placeholder":o,"&:focus::-ms-input-placeholder":o},[`&.${Ms.disabled}`]:{opacity:1,WebkitTextFillColor:(t.vars||t).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},e.size==="small"&&{paddingTop:1},e.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},e.type==="search"&&{MozAppearance:"textfield"})}),Aue=F.jsx(_ue,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),Tue=H.forwardRef(function(e,n){var r;const i=an({props:e,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:a,autoFocus:s,className:l,components:u={},componentsProps:c={},defaultValue:f,disabled:d,disableInjectingGlobalStyles:p,endAdornment:y,fullWidth:x=!1,id:_,inputComponent:v="input",inputProps:S={},inputRef:w,maxRows:E,minRows:T,multiline:C=!1,name:D,onBlur:O,onChange:P,onClick:N,onFocus:k,onKeyDown:G,onKeyUp:Z,placeholder:j,readOnly:K,renderSuffix:Y,rows:$,slotProps:W={},slots:U={},startAdornment:te,type:re="text",value:le}=i,ce=yt(i,Mue),Ce=S.value!=null?S.value:le,{current:Re}=H.useRef(Ce!=null),Ie=H.useRef(),He=H.useCallback(de=>{},[]),tt=Jr(Ie,w,S.ref,He),[Qe,ct]=H.useState(!1),Xe=gf(),ue=Qd({props:i,muiFormControl:Xe,states:["color","disabled","error","hiddenLabel","size","required","filled"]});ue.focused=Xe?Xe.focused:Qe,H.useEffect(()=>{!Xe&&d&&Qe&&(ct(!1),O&&O())},[Xe,d,Qe,O]);const De=Xe&&Xe.onFilled,Ee=Xe&&Xe.onEmpty,X=H.useCallback(de=>{t2(de)?De&&De():Ee&&Ee()},[De,Ee]);_l(()=>{Re&&X({value:Ce})},[Ce,X,Re]);const ne=de=>{if(ue.disabled){de.stopPropagation();return}k&&k(de),S.onFocus&&S.onFocus(de),Xe&&Xe.onFocus?Xe.onFocus(de):ct(!0)},me=de=>{O&&O(de),S.onBlur&&S.onBlur(de),Xe&&Xe.onBlur?Xe.onBlur(de):ct(!1)},we=(de,...ve)=>{if(!Re){const Se=de.target||Ie.current;if(Se==null)throw new Error(Bd(1));X({value:Se.value})}S.onChange&&S.onChange(de,...ve),P&&P(de,...ve)};H.useEffect(()=>{X(Ie.current)},[]);const Ne=de=>{Ie.current&&de.currentTarget===de.target&&Ie.current.focus(),N&&N(de)};let Ue=v,We=S;C&&Ue==="input"&&($?We=Q({type:void 0,minRows:$,maxRows:$},We):We=Q({type:void 0,maxRows:E,minRows:T},We),Ue=Jle);const lt=de=>{X(de.animationName==="mui-auto-fill-cancel"?Ie.current:{value:"x"})};H.useEffect(()=>{Xe&&Xe.setAdornedStart(!!te)},[Xe,te]);const z=Q({},i,{color:ue.color||"primary",disabled:ue.disabled,endAdornment:y,error:ue.error,focused:ue.focused,formControl:Xe,fullWidth:x,hiddenLabel:ue.hiddenLabel,multiline:C,size:ue.size,startAdornment:te,type:re}),B=Cue(z),oe=U.root||u.Root||rC,ge=W.root||c.root||{},pe=U.input||u.Input||iC;return We=Q({},We,(r=W.input)!=null?r:c.input),F.jsxs(H.Fragment,{children:[!p&&Aue,F.jsxs(oe,Q({},ge,!Zg(oe)&&{ownerState:Q({},z,ge.ownerState)},{ref:n,onClick:Ne},ce,{className:bt(B.root,ge.className,l,K&&"MuiInputBase-readOnly"),children:[te,F.jsx($O.Provider,{value:null,children:F.jsx(pe,Q({ownerState:z,"aria-invalid":ue.error,"aria-describedby":o,autoComplete:a,autoFocus:s,defaultValue:f,disabled:ue.disabled,id:_,onAnimationStart:lt,name:D,placeholder:j,readOnly:K,required:ue.required,rows:$,value:Ce,onKeyDown:G,onKeyUp:Z,type:re},We,!Zg(pe)&&{as:Ue,ownerState:Q({},z,We.ownerState)},{ref:tt,className:bt(B.input,We.className,K&&"MuiInputBase-readOnly"),onBlur:me,onChange:we,onFocus:ne}))}),y,Y?Y(Q({},ue,{startAdornment:te})):null]}))]})}),HO=Tue;function Due(t){return Qt("MuiInput",t)}const Rue=Q({},Ms,Yt("MuiInput",["root","underline","input"])),md=Rue;function Pue(t){return Qt("MuiOutlinedInput",t)}const Nue=Q({},Ms,Yt("MuiOutlinedInput",["root","notchedOutline","input"])),Ou=Nue;function Oue(t){return Qt("MuiFilledInput",t)}const Iue=Q({},Ms,Yt("MuiFilledInput",["root","underline","input"])),Cs=Iue,wH=hf(F.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");function Fue(t){return Qt("MuiAutocomplete",t)}const Lue=Yt("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"]),Bn=Lue;var h8,p8;const kue=["autoComplete","autoHighlight","autoSelect","blurOnSelect","ChipProps","className","clearIcon","clearOnBlur","clearOnEscape","clearText","closeText","componentsProps","defaultValue","disableClearable","disableCloseOnSelect","disabled","disabledItemsFocusable","disableListWrap","disablePortal","filterOptions","filterSelectedOptions","forcePopupIcon","freeSolo","fullWidth","getLimitTagsText","getOptionDisabled","getOptionLabel","isOptionEqualToValue","groupBy","handleHomeEndKeys","id","includeInputInList","inputValue","limitTags","ListboxComponent","ListboxProps","loading","loadingText","multiple","noOptionsText","onChange","onClose","onHighlightChange","onInputChange","onOpen","open","openOnFocus","openText","options","PaperComponent","PopperComponent","popupIcon","readOnly","renderGroup","renderInput","renderOption","renderTags","selectOnFocus","size","slotProps","value"],Bue=["ref"],Uue=t=>{const{classes:e,disablePortal:n,expanded:r,focused:i,fullWidth:o,hasClearIcon:a,hasPopupIcon:s,inputFocused:l,popupOpen:u,size:c}=t,f={root:["root",r&&"expanded",i&&"focused",o&&"fullWidth",a&&"hasClearIcon",s&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",l&&"inputFocused"],tag:["tag",`tagSize${it(c)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",u&&"popupIndicatorOpen"],popper:["popper",n&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return nn(f,Fue,e)},zue=ut("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t,{fullWidth:r,hasClearIcon:i,hasPopupIcon:o,inputFocused:a,size:s}=n;return[{[`& .${Bn.tag}`]:e.tag},{[`& .${Bn.tag}`]:e[`tagSize${it(s)}`]},{[`& .${Bn.inputRoot}`]:e.inputRoot},{[`& .${Bn.input}`]:e.input},{[`& .${Bn.input}`]:a&&e.inputFocused},e.root,r&&e.fullWidth,o&&e.hasPopupIcon,i&&e.hasClearIcon]}})(({ownerState:t})=>Q({[`&.${Bn.focused} .${Bn.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${Bn.clearIndicator}`]:{visibility:"visible"}}},t.fullWidth&&{width:"100%"},{[`& .${Bn.tag}`]:Q({margin:3,maxWidth:"calc(100% - 6px)"},t.size==="small"&&{margin:2,maxWidth:"calc(100% - 4px)"}),[`& .${Bn.inputRoot}`]:{flexWrap:"wrap",[`.${Bn.hasPopupIcon}&, .${Bn.hasClearIcon}&`]:{paddingRight:26+4},[`.${Bn.hasPopupIcon}.${Bn.hasClearIcon}&`]:{paddingRight:52+4},[`& .${Bn.input}`]:{width:0,minWidth:30}},[`& .${md.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${md.root}.${Ms.sizeSmall}`]:{[`& .${md.input}`]:{padding:"2px 4px 3px 0"}},[`& .${Ou.root}`]:{padding:9,[`.${Bn.hasPopupIcon}&, .${Bn.hasClearIcon}&`]:{paddingRight:26+4+9},[`.${Bn.hasPopupIcon}.${Bn.hasClearIcon}&`]:{paddingRight:52+4+9},[`& .${Bn.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${Bn.endAdornment}`]:{right:9}},[`& .${Ou.root}.${Ms.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${Bn.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${Cs.root}`]:{paddingTop:19,paddingLeft:8,[`.${Bn.hasPopupIcon}&, .${Bn.hasClearIcon}&`]:{paddingRight:26+4+9},[`.${Bn.hasPopupIcon}.${Bn.hasClearIcon}&`]:{paddingRight:52+4+9},[`& .${Cs.input}`]:{padding:"7px 4px"},[`& .${Bn.endAdornment}`]:{right:9}},[`& .${Cs.root}.${Ms.sizeSmall}`]:{paddingBottom:1,[`& .${Cs.input}`]:{padding:"2.5px 4px"}},[`& .${Ms.hiddenLabel}`]:{paddingTop:8},[`& .${Cs.root}.${Ms.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${Bn.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${Cs.root}.${Ms.hiddenLabel}.${Ms.sizeSmall}`]:{[`& .${Bn.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${Bn.input}`]:Q({flexGrow:1,textOverflow:"ellipsis",opacity:0},t.inputFocused&&{opacity:1})})),$ue=ut("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(t,e)=>e.endAdornment})({position:"absolute",right:0,top:"calc(50% - 14px)"}),Hue=ut(QM,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(t,e)=>e.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),Vue=ut(QM,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:({ownerState:t},e)=>Q({},e.popupIndicator,t.popupOpen&&e.popupIndicatorOpen)})(({ownerState:t})=>Q({padding:2,marginRight:-2},t.popupOpen&&{transform:"rotate(180deg)"})),Wue=ut(bH,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${Bn.option}`]:e.option},e.popper,n.disablePortal&&e.popperDisablePortal]}})(({theme:t,ownerState:e})=>Q({zIndex:(t.vars||t).zIndex.modal},e.disablePortal&&{position:"absolute"})),Gue=ut(mf,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(t,e)=>e.paper})(({theme:t})=>Q({},t.typography.body1,{overflow:"auto"})),jue=ut("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(t,e)=>e.loading})(({theme:t})=>({color:(t.vars||t).palette.text.secondary,padding:"14px 16px"})),que=ut("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(t,e)=>e.noOptions})(({theme:t})=>({color:(t.vars||t).palette.text.secondary,padding:"14px 16px"})),Xue=ut("div",{name:"MuiAutocomplete",slot:"Listbox",overridesResolver:(t,e)=>e.listbox})(({theme:t})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${Bn.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"},[`&.${Bn.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"},[`&.${Bn.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:zn(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${Bn.focused}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:zn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(t.vars||t).palette.action.selected}},[`&.${Bn.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:zn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}}}})),Yue=ut(cue,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(t,e)=>e.groupLabel})(({theme:t})=>({backgroundColor:(t.vars||t).palette.background.paper,top:-8})),Kue=ut("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(t,e)=>e.groupUl})({padding:0,[`& .${Bn.option}`]:{paddingLeft:24}}),Zue=H.forwardRef(function(e,n){var r,i,o,a;const s=an({props:e,name:"MuiAutocomplete"}),{autoComplete:l=!1,autoHighlight:u=!1,autoSelect:c=!1,blurOnSelect:f=!1,ChipProps:d,className:p,clearIcon:y=h8||(h8=F.jsx(Zae,{fontSize:"small"})),clearOnBlur:x=!s.freeSolo,clearOnEscape:_=!1,clearText:v="Clear",closeText:S="Close",componentsProps:w={},defaultValue:E=s.multiple?[]:null,disableClearable:T=!1,disableCloseOnSelect:C=!1,disabled:D=!1,disabledItemsFocusable:O=!1,disableListWrap:P=!1,disablePortal:N=!1,filterSelectedOptions:k=!1,forcePopupIcon:G="auto",freeSolo:Z=!1,fullWidth:j=!1,getLimitTagsText:K=ot=>`+${ot}`,getOptionLabel:Y,groupBy:$,handleHomeEndKeys:W=!s.freeSolo,includeInputInList:U=!1,limitTags:te=-1,ListboxComponent:re="ul",ListboxProps:le,loading:ce=!1,loadingText:Ce="Loading…",multiple:Re=!1,noOptionsText:Ie="No options",openOnFocus:He=!1,openText:tt="Open",PaperComponent:Qe=mf,PopperComponent:ct=bH,popupIcon:Xe=p8||(p8=F.jsx(wH,{})),readOnly:ue=!1,renderGroup:De,renderInput:Ee,renderOption:X,renderTags:ne,selectOnFocus:me=!s.freeSolo,size:we="medium",slotProps:Ne={}}=s,Ue=yt(s,kue),{getRootProps:We,getInputProps:lt,getInputLabelProps:z,getPopupIndicatorProps:B,getClearProps:oe,getTagProps:ge,getListboxProps:pe,getOptionProps:de,value:ve,dirty:Se,expanded:Pe,id:Be,popupOpen:je,focused:Le,focusedTag:_t,anchorEl:xt,setAnchorEl:wt,inputValue:Ct,groupedOptions:pt}=nue(Q({},s,{componentName:"Autocomplete"})),jt=!T&&!D&&Se&&!ue,be=(!Z||G===!0)&&G!==!1,{onMouseDown:gt}=lt(),{ref:ft}=le??{},Ye=pe(),{ref:mt}=Ye,Vt=yt(Ye,Bue),_n=Jr(mt,ft),Cr=Y||(ot=>{var J;return(J=ot.label)!=null?J:ot}),dn=Q({},s,{disablePortal:N,expanded:Pe,focused:Le,fullWidth:j,getOptionLabel:Cr,hasClearIcon:jt,hasPopupIcon:be,inputFocused:_t===-1,popupOpen:je,size:we}),En=Uue(dn);let ur;if(Re&&ve.length>0){const ot=J=>Q({className:En.tag,disabled:D},ge(J));ne?ur=ne(ve,ot,dn):ur=ve.map((J,_e)=>F.jsx(xue,Q({label:Cr(J),size:we},ot({index:_e}),d)))}if(te>-1&&Array.isArray(ur)){const ot=ur.length-te;!Le&&ot>0&&(ur=ur.splice(0,te),ur.push(F.jsx("span",{className:En.tag,children:K(ot)},ur.length)))}const Ta=De||(ot=>F.jsxs("li",{children:[F.jsx(Yue,{className:En.groupLabel,ownerState:dn,component:"div",children:ot.group}),F.jsx(Kue,{className:En.groupUl,ownerState:dn,children:ot.children})]},ot.key)),Oo=X||((ot,J)=>F.jsx("li",Q({},ot,{children:Cr(J)}))),ea=(ot,J)=>{const _e=de({option:ot,index:J});return Oo(Q({},_e,{className:En.option}),ot,{selected:_e["aria-selected"],index:J,inputValue:Ct},dn)},Io=(r=Ne.clearIndicator)!=null?r:w.clearIndicator,ta=(i=Ne.paper)!=null?i:w.paper,Ze=(o=Ne.popper)!=null?o:w.popper,Ge=(a=Ne.popupIndicator)!=null?a:w.popupIndicator;return F.jsxs(H.Fragment,{children:[F.jsx(zue,Q({ref:n,className:bt(En.root,p),ownerState:dn},We(Ue),{children:Ee({id:Be,disabled:D,fullWidth:!0,size:we==="small"?"small":void 0,InputLabelProps:z(),InputProps:Q({ref:wt,className:En.inputRoot,startAdornment:ur,onClick:ot=>{ot.target===ot.currentTarget&>(ot)}},(jt||be)&&{endAdornment:F.jsxs($ue,{className:En.endAdornment,ownerState:dn,children:[jt?F.jsx(Hue,Q({},oe(),{"aria-label":v,title:v,ownerState:dn},Io,{className:bt(En.clearIndicator,Io==null?void 0:Io.className),children:y})):null,be?F.jsx(Vue,Q({},B(),{disabled:D,"aria-label":je?S:tt,title:je?S:tt,ownerState:dn},Ge,{className:bt(En.popupIndicator,Ge==null?void 0:Ge.className),children:Xe})):null]})}),inputProps:Q({className:En.input,disabled:D,readOnly:ue},lt())})})),xt?F.jsx(Wue,Q({as:ct,disablePortal:N,style:{width:xt?xt.clientWidth:null},ownerState:dn,role:"presentation",anchorEl:xt,open:je},Ze,{className:bt(En.popper,Ze==null?void 0:Ze.className),children:F.jsxs(Gue,Q({ownerState:dn,as:Qe},ta,{className:bt(En.paper,ta==null?void 0:ta.className),children:[ce&&pt.length===0?F.jsx(jue,{className:En.loading,ownerState:dn,children:Ce}):null,pt.length===0&&!Z&&!ce?F.jsx(que,{className:En.noOptions,ownerState:dn,role:"presentation",onMouseDown:ot=>{ot.preventDefault()},children:Ie}):null,pt.length>0?F.jsx(Xue,Q({as:re,className:En.listbox,ownerState:dn},Vt,le,{ref:_n,children:pt.map((ot,J)=>$?Ta({key:ot.key,group:ot.group,children:ot.options.map((_e,Oe)=>ea(_e,ot.index+Oe))}):ea(ot,J))})):null]}))})):null]})}),m8=Zue,Jue=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],Que={entering:{opacity:1},entered:{opacity:1}},ece=H.forwardRef(function(e,n){const r=Jp(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:o,appear:a=!0,children:s,easing:l,in:u,onEnter:c,onEntered:f,onEntering:d,onExit:p,onExited:y,onExiting:x,style:_,timeout:v=i,TransitionComponent:S=RO}=e,w=yt(e,Jue),E=H.useRef(null),T=Jr(E,s.ref,n),C=j=>K=>{if(j){const Y=E.current;K===void 0?j(Y):j(Y,K)}},D=C(d),O=C((j,K)=>{OO(j);const Y=Kg({style:_,timeout:v,easing:l},{mode:"enter"});j.style.webkitTransition=r.transitions.create("opacity",Y),j.style.transition=r.transitions.create("opacity",Y),c&&c(j,K)}),P=C(f),N=C(x),k=C(j=>{const K=Kg({style:_,timeout:v,easing:l},{mode:"exit"});j.style.webkitTransition=r.transitions.create("opacity",K),j.style.transition=r.transitions.create("opacity",K),p&&p(j)}),G=C(y),Z=j=>{o&&o(E.current,j)};return F.jsx(S,Q({appear:a,in:u,nodeRef:E,onEnter:O,onEntered:P,onEntering:D,onExit:k,onExited:G,onExiting:N,addEndListener:Z,timeout:v},w,{children:(j,K)=>H.cloneElement(s,Q({style:Q({opacity:0,visibility:j==="exited"&&!u?"hidden":void 0},Que[j],_,s.props.style),ref:T},K))}))}),SH=ece;function tce(t){return Qt("MuiBackdrop",t)}Yt("MuiBackdrop",["root","invisible"]);const nce=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],rce=t=>{const{classes:e,invisible:n}=t;return nn({root:["root",n&&"invisible"]},tce,e)},ice=ut("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.invisible&&e.invisible]}})(({ownerState:t})=>Q({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"},t.invisible&&{backgroundColor:"transparent"})),oce=H.forwardRef(function(e,n){var r,i,o;const a=an({props:e,name:"MuiBackdrop"}),{children:s,className:l,component:u="div",components:c={},componentsProps:f={},invisible:d=!1,open:p,slotProps:y={},slots:x={},TransitionComponent:_=SH,transitionDuration:v}=a,S=yt(a,nce),w=Q({},a,{component:u,invisible:d}),E=rce(w),T=(r=y.root)!=null?r:f.root;return F.jsx(_,Q({in:p,timeout:v},S,{children:F.jsx(ice,Q({"aria-hidden":!0},T,{as:(i=(o=x.root)!=null?o:c.Root)!=null?i:u,className:bt(E.root,l,T==null?void 0:T.className),ownerState:Q({},w,T==null?void 0:T.ownerState),classes:E,ref:n,children:s}))}))}),EH=oce,ace=sH(),sce=soe({themeId:vb,defaultTheme:ace,defaultClassName:"MuiBox-root",generateClassName:hO.generate}),af=sce;function lce(t){return Qt("MuiButton",t)}const uce=Yt("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","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),Rw=uce,cce=H.createContext({}),fce=cce,dce=H.createContext(void 0),hce=dce,pce=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],mce=t=>{const{color:e,disableElevation:n,fullWidth:r,size:i,variant:o,classes:a}=t,s={root:["root",o,`${o}${it(e)}`,`size${it(i)}`,`${o}Size${it(i)}`,e==="inherit"&&"colorInherit",n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${it(i)}`],endIcon:["endIcon",`iconSize${it(i)}`]},l=nn(s,lce,a);return Q({},a,l)},MH=t=>Q({},t.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},t.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},t.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),gce=ut(zp,{shouldForwardProp:t=>Ro(t)||t==="classes",name:"MuiButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`${n.variant}${it(n.color)}`],e[`size${it(n.size)}`],e[`${n.variant}Size${it(n.size)}`],n.color==="inherit"&&e.colorInherit,n.disableElevation&&e.disableElevation,n.fullWidth&&e.fullWidth]}})(({theme:t,ownerState:e})=>{var n,r;const i=t.palette.mode==="light"?t.palette.grey[300]:t.palette.grey[800],o=t.palette.mode==="light"?t.palette.grey.A100:t.palette.grey[700];return Q({},t.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create(["background-color","box-shadow","border-color","color"],{duration:t.transitions.duration.short}),"&:hover":Q({textDecoration:"none",backgroundColor:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:zn(t.palette.text.primary,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},e.variant==="text"&&e.color!=="inherit"&&{backgroundColor:t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:zn(t.palette[e.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},e.variant==="outlined"&&e.color!=="inherit"&&{border:`1px solid ${(t.vars||t).palette[e.color].main}`,backgroundColor:t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:zn(t.palette[e.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},e.variant==="contained"&&{backgroundColor:t.vars?t.vars.palette.Button.inheritContainedHoverBg:o,boxShadow:(t.vars||t).shadows[4],"@media (hover: none)":{boxShadow:(t.vars||t).shadows[2],backgroundColor:(t.vars||t).palette.grey[300]}},e.variant==="contained"&&e.color!=="inherit"&&{backgroundColor:(t.vars||t).palette[e.color].dark,"@media (hover: none)":{backgroundColor:(t.vars||t).palette[e.color].main}}),"&:active":Q({},e.variant==="contained"&&{boxShadow:(t.vars||t).shadows[8]}),[`&.${Rw.focusVisible}`]:Q({},e.variant==="contained"&&{boxShadow:(t.vars||t).shadows[6]}),[`&.${Rw.disabled}`]:Q({color:(t.vars||t).palette.action.disabled},e.variant==="outlined"&&{border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`},e.variant==="contained"&&{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).palette.action.disabledBackground})},e.variant==="text"&&{padding:"6px 8px"},e.variant==="text"&&e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].main},e.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},e.variant==="outlined"&&e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].main,border:t.vars?`1px solid rgba(${t.vars.palette[e.color].mainChannel} / 0.5)`:`1px solid ${zn(t.palette[e.color].main,.5)}`},e.variant==="contained"&&{color:t.vars?t.vars.palette.text.primary:(n=(r=t.palette).getContrastText)==null?void 0:n.call(r,t.palette.grey[300]),backgroundColor:t.vars?t.vars.palette.Button.inheritContainedBg:i,boxShadow:(t.vars||t).shadows[2]},e.variant==="contained"&&e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].contrastText,backgroundColor:(t.vars||t).palette[e.color].main},e.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},e.size==="small"&&e.variant==="text"&&{padding:"4px 5px",fontSize:t.typography.pxToRem(13)},e.size==="large"&&e.variant==="text"&&{padding:"8px 11px",fontSize:t.typography.pxToRem(15)},e.size==="small"&&e.variant==="outlined"&&{padding:"3px 9px",fontSize:t.typography.pxToRem(13)},e.size==="large"&&e.variant==="outlined"&&{padding:"7px 21px",fontSize:t.typography.pxToRem(15)},e.size==="small"&&e.variant==="contained"&&{padding:"4px 10px",fontSize:t.typography.pxToRem(13)},e.size==="large"&&e.variant==="contained"&&{padding:"8px 22px",fontSize:t.typography.pxToRem(15)},e.fullWidth&&{width:"100%"})},({ownerState:t})=>t.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${Rw.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${Rw.disabled}`]:{boxShadow:"none"}}),vce=ut("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.startIcon,e[`iconSize${it(n.size)}`]]}})(({ownerState:t})=>Q({display:"inherit",marginRight:8,marginLeft:-4},t.size==="small"&&{marginLeft:-2},MH(t))),yce=ut("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.endIcon,e[`iconSize${it(n.size)}`]]}})(({ownerState:t})=>Q({display:"inherit",marginRight:-4,marginLeft:8},t.size==="small"&&{marginRight:-2},MH(t))),xce=H.forwardRef(function(e,n){const r=H.useContext(fce),i=H.useContext(hce),o=dO(r,e),a=an({props:o,name:"MuiButton"}),{children:s,color:l="primary",component:u="button",className:c,disabled:f=!1,disableElevation:d=!1,disableFocusRipple:p=!1,endIcon:y,focusVisibleClassName:x,fullWidth:_=!1,size:v="medium",startIcon:S,type:w,variant:E="text"}=a,T=yt(a,pce),C=Q({},a,{color:l,component:u,disabled:f,disableElevation:d,disableFocusRipple:p,fullWidth:_,size:v,type:w,variant:E}),D=mce(C),O=S&&F.jsx(vce,{className:D.startIcon,ownerState:C,children:S}),P=y&&F.jsx(yce,{className:D.endIcon,ownerState:C,children:y}),N=i||"";return F.jsxs(gce,Q({ownerState:C,className:bt(r.className,D.root,c,N),component:u,disabled:f,focusRipple:!p,focusVisibleClassName:bt(D.focusVisible,x),ref:n,type:w},T,{classes:D,children:[O,s,P]}))}),Ax=xce;function bce(t){return Qt("MuiCard",t)}Yt("MuiCard",["root"]);const _ce=["className","raised"],wce=t=>{const{classes:e}=t;return nn({root:["root"]},bce,e)},Sce=ut(mf,{name:"MuiCard",slot:"Root",overridesResolver:(t,e)=>e.root})(()=>({overflow:"hidden"})),Ece=H.forwardRef(function(e,n){const r=an({props:e,name:"MuiCard"}),{className:i,raised:o=!1}=r,a=yt(r,_ce),s=Q({},r,{raised:o}),l=wce(s);return F.jsx(Sce,Q({className:bt(l.root,i),elevation:o?8:void 0,ref:n,ownerState:s},a))}),oC=Ece;function Mce(t){return Qt("MuiCardContent",t)}Yt("MuiCardContent",["root"]);const Cce=["className","component"],Ace=t=>{const{classes:e}=t;return nn({root:["root"]},Mce,e)},Tce=ut("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(t,e)=>e.root})(()=>({padding:16,"&:last-child":{paddingBottom:24}})),Dce=H.forwardRef(function(e,n){const r=an({props:e,name:"MuiCardContent"}),{className:i,component:o="div"}=r,a=yt(r,Cce),s=Q({},r,{component:o}),l=Ace(s);return F.jsx(Tce,Q({as:o,className:bt(l.root,i),ownerState:s,ref:n},a))}),aC=Dce;function Rce(t){return Qt("PrivateSwitchBase",t)}Yt("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const Pce=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],Nce=t=>{const{classes:e,checked:n,disabled:r,edge:i}=t,o={root:["root",n&&"checked",r&&"disabled",i&&`edge${it(i)}`],input:["input"]};return nn(o,Rce,e)},Oce=ut(zp)(({ownerState:t})=>Q({padding:9,borderRadius:"50%"},t.edge==="start"&&{marginLeft:t.size==="small"?-3:-12},t.edge==="end"&&{marginRight:t.size==="small"?-3:-12})),Ice=ut("input",{shouldForwardProp:Ro})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),Fce=H.forwardRef(function(e,n){const{autoFocus:r,checked:i,checkedIcon:o,className:a,defaultChecked:s,disabled:l,disableFocusRipple:u=!1,edge:c=!1,icon:f,id:d,inputProps:p,inputRef:y,name:x,onBlur:_,onChange:v,onFocus:S,readOnly:w,required:E=!1,tabIndex:T,type:C,value:D}=e,O=yt(e,Pce),[P,N]=Td({controlled:i,default:!!s,name:"SwitchBase",state:"checked"}),k=gf(),G=U=>{S&&S(U),k&&k.onFocus&&k.onFocus(U)},Z=U=>{_&&_(U),k&&k.onBlur&&k.onBlur(U)},j=U=>{if(U.nativeEvent.defaultPrevented)return;const te=U.target.checked;N(te),v&&v(U,te)};let K=l;k&&typeof K>"u"&&(K=k.disabled);const Y=C==="checkbox"||C==="radio",$=Q({},e,{checked:P,disabled:K,disableFocusRipple:u,edge:c}),W=Nce($);return F.jsxs(Oce,Q({component:"span",className:bt(W.root,a),centerRipple:!0,focusRipple:!u,disabled:K,tabIndex:null,role:void 0,onFocus:G,onBlur:Z,ownerState:$,ref:n},O,{children:[F.jsx(Ice,Q({autoFocus:r,checked:i,defaultChecked:s,className:W.input,disabled:K,id:Y?d:void 0,name:x,onChange:j,readOnly:w,ref:y,required:E,ownerState:$,tabIndex:T,type:C},C==="checkbox"&&D===void 0?{}:{value:D},p)),P?o:f]}))}),CH=Fce,Lce=hf(F.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"}),"CheckBoxOutlineBlank"),kce=hf(F.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"}),"CheckBox"),Bce=hf(F.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"}),"IndeterminateCheckBox");function Uce(t){return Qt("MuiCheckbox",t)}const zce=Yt("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),zT=zce,$ce=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],Hce=t=>{const{classes:e,indeterminate:n,color:r,size:i}=t,o={root:["root",n&&"indeterminate",`color${it(r)}`,`size${it(i)}`]},a=nn(o,Uce,e);return Q({},e,a)},Vce=ut(CH,{shouldForwardProp:t=>Ro(t)||t==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.indeterminate&&e.indeterminate,e[`size${it(n.size)}`],n.color!=="default"&&e[`color${it(n.color)}`]]}})(({theme:t,ownerState:e})=>Q({color:(t.vars||t).palette.text.secondary},!e.disableRipple&&{"&:hover":{backgroundColor:t.vars?`rgba(${e.color==="default"?t.vars.palette.action.activeChannel:t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:zn(e.color==="default"?t.palette.action.active:t.palette[e.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},e.color!=="default"&&{[`&.${zT.checked}, &.${zT.indeterminate}`]:{color:(t.vars||t).palette[e.color].main},[`&.${zT.disabled}`]:{color:(t.vars||t).palette.action.disabled}})),Wce=F.jsx(kce,{}),Gce=F.jsx(Lce,{}),jce=F.jsx(Bce,{}),qce=H.forwardRef(function(e,n){var r,i;const o=an({props:e,name:"MuiCheckbox"}),{checkedIcon:a=Wce,color:s="primary",icon:l=Gce,indeterminate:u=!1,indeterminateIcon:c=jce,inputProps:f,size:d="medium",className:p}=o,y=yt(o,$ce),x=u?c:l,_=u?c:a,v=Q({},o,{color:s,indeterminate:u,size:d}),S=Hce(v);return F.jsx(Vce,Q({type:"checkbox",inputProps:Q({"data-indeterminate":u},f),icon:H.cloneElement(x,{fontSize:(r=x.props.fontSize)!=null?r:d}),checkedIcon:H.cloneElement(_,{fontSize:(i=_.props.fontSize)!=null?i:d}),ownerState:v,ref:n,className:bt(S.root,p)},y,{classes:S}))}),Vh=qce;function Xce(t){return Qt("MuiModal",t)}Yt("MuiModal",["root","hidden","backdrop"]);const Yce=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],Kce=t=>{const{open:e,exited:n,classes:r}=t;return nn({root:["root",!e&&n&&"hidden"],backdrop:["backdrop"]},Xce,r)},Zce=ut("div",{name:"MuiModal",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.open&&n.exited&&e.hidden]}})(({theme:t,ownerState:e})=>Q({position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0},!e.open&&e.exited&&{visibility:"hidden"})),Jce=ut(EH,{name:"MuiModal",slot:"Backdrop",overridesResolver:(t,e)=>e.backdrop})({zIndex:-1}),Qce=H.forwardRef(function(e,n){var r,i,o,a,s,l;const u=an({name:"MuiModal",props:e}),{BackdropComponent:c=Jce,BackdropProps:f,className:d,closeAfterTransition:p=!1,children:y,container:x,component:_,components:v={},componentsProps:S={},disableAutoFocus:w=!1,disableEnforceFocus:E=!1,disableEscapeKeyDown:T=!1,disablePortal:C=!1,disableRestoreFocus:D=!1,disableScrollLock:O=!1,hideBackdrop:P=!1,keepMounted:N=!1,onBackdropClick:k,open:G,slotProps:Z,slots:j}=u,K=yt(u,Yce),Y=Q({},u,{closeAfterTransition:p,disableAutoFocus:w,disableEnforceFocus:E,disableEscapeKeyDown:T,disablePortal:C,disableRestoreFocus:D,disableScrollLock:O,hideBackdrop:P,keepMounted:N}),{getRootProps:$,getBackdropProps:W,getTransitionProps:U,portalRef:te,isTopModal:re,exited:le,hasTransition:ce}=Yle(Q({},Y,{rootRef:n})),Ce=Q({},Y,{exited:le}),Re=Kce(Ce),Ie={};if(y.props.tabIndex===void 0&&(Ie.tabIndex="-1"),ce){const{onEnter:De,onExited:Ee}=U();Ie.onEnter=De,Ie.onExited=Ee}const He=(r=(i=j==null?void 0:j.root)!=null?i:v.Root)!=null?r:Zce,tt=(o=(a=j==null?void 0:j.backdrop)!=null?a:v.Backdrop)!=null?o:c,Qe=(s=Z==null?void 0:Z.root)!=null?s:S.root,ct=(l=Z==null?void 0:Z.backdrop)!=null?l:S.backdrop,Xe=$p({elementType:He,externalSlotProps:Qe,externalForwardedProps:K,getSlotProps:$,additionalProps:{ref:n,as:_},ownerState:Ce,className:bt(d,Qe==null?void 0:Qe.className,Re==null?void 0:Re.root,!Ce.open&&Ce.exited&&(Re==null?void 0:Re.hidden))}),ue=$p({elementType:tt,externalSlotProps:ct,additionalProps:f,getSlotProps:De=>W(Q({},De,{onClick:Ee=>{k&&k(Ee),De!=null&&De.onClick&&De.onClick(Ee)}})),className:bt(ct==null?void 0:ct.className,f==null?void 0:f.className,Re==null?void 0:Re.backdrop),ownerState:Ce});return!N&&!G&&(!ce||le)?null:F.jsx(xH,{ref:te,container:x,disablePortal:C,children:F.jsxs(He,Q({},Xe,{children:[!P&&c?F.jsx(tt,Q({},ue)):null,F.jsx(Ese,{disableEnforceFocus:E,disableAutoFocus:w,disableRestoreFocus:D,isEnabled:re,open:G,children:H.cloneElement(y,Ie)})]}))})}),VO=Qce;function efe(t){return Qt("MuiDialog",t)}const tfe=Yt("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),$T=tfe,nfe=H.createContext({}),AH=nfe,rfe=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],ife=ut(EH,{name:"MuiDialog",slot:"Backdrop",overrides:(t,e)=>e.backdrop})({zIndex:-1}),ofe=t=>{const{classes:e,scroll:n,maxWidth:r,fullWidth:i,fullScreen:o}=t,a={root:["root"],container:["container",`scroll${it(n)}`],paper:["paper",`paperScroll${it(n)}`,`paperWidth${it(String(r))}`,i&&"paperFullWidth",o&&"paperFullScreen"]};return nn(a,efe,e)},afe=ut(VO,{name:"MuiDialog",slot:"Root",overridesResolver:(t,e)=>e.root})({"@media print":{position:"absolute !important"}}),sfe=ut("div",{name:"MuiDialog",slot:"Container",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.container,e[`scroll${it(n.scroll)}`]]}})(({ownerState:t})=>Q({height:"100%","@media print":{height:"auto"},outline:0},t.scroll==="paper"&&{display:"flex",justifyContent:"center",alignItems:"center"},t.scroll==="body"&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&:after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})),lfe=ut(mf,{name:"MuiDialog",slot:"Paper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.paper,e[`scrollPaper${it(n.scroll)}`],e[`paperWidth${it(String(n.maxWidth))}`],n.fullWidth&&e.paperFullWidth,n.fullScreen&&e.paperFullScreen]}})(({theme:t,ownerState:e})=>Q({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},e.scroll==="paper"&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},e.scroll==="body"&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!e.maxWidth&&{maxWidth:"calc(100% - 64px)"},e.maxWidth==="xs"&&{maxWidth:t.breakpoints.unit==="px"?Math.max(t.breakpoints.values.xs,444):`max(${t.breakpoints.values.xs}${t.breakpoints.unit}, 444px)`,[`&.${$T.paperScrollBody}`]:{[t.breakpoints.down(Math.max(t.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}},e.maxWidth&&e.maxWidth!=="xs"&&{maxWidth:`${t.breakpoints.values[e.maxWidth]}${t.breakpoints.unit}`,[`&.${$T.paperScrollBody}`]:{[t.breakpoints.down(t.breakpoints.values[e.maxWidth]+32*2)]:{maxWidth:"calc(100% - 64px)"}}},e.fullWidth&&{width:"calc(100% - 64px)"},e.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${$T.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),ufe=H.forwardRef(function(e,n){const r=an({props:e,name:"MuiDialog"}),i=Jp(),o={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{"aria-describedby":a,"aria-labelledby":s,BackdropComponent:l,BackdropProps:u,children:c,className:f,disableEscapeKeyDown:d=!1,fullScreen:p=!1,fullWidth:y=!1,maxWidth:x="sm",onBackdropClick:_,onClose:v,open:S,PaperComponent:w=mf,PaperProps:E={},scroll:T="paper",TransitionComponent:C=SH,transitionDuration:D=o,TransitionProps:O}=r,P=yt(r,rfe),N=Q({},r,{disableEscapeKeyDown:d,fullScreen:p,fullWidth:y,maxWidth:x,scroll:T}),k=ofe(N),G=H.useRef(),Z=$=>{G.current=$.target===$.currentTarget},j=$=>{G.current&&(G.current=null,_&&_($),v&&v($,"backdropClick"))},K=vv(s),Y=H.useMemo(()=>({titleId:K}),[K]);return F.jsx(afe,Q({className:bt(k.root,f),closeAfterTransition:!0,components:{Backdrop:ife},componentsProps:{backdrop:Q({transitionDuration:D,as:l},u)},disableEscapeKeyDown:d,onClose:v,open:S,ref:n,onClick:j,ownerState:N},P,{children:F.jsx(C,Q({appear:!0,in:S,timeout:D,role:"presentation"},O,{children:F.jsx(sfe,{className:bt(k.container),onMouseDown:Z,ownerState:N,children:F.jsx(lfe,Q({as:w,elevation:24,role:"dialog","aria-describedby":a,"aria-labelledby":K},E,{className:bt(k.paper,E.className),ownerState:N,children:F.jsx(AH.Provider,{value:Y,children:c})}))})}))}))}),cfe=ufe;function ffe(t){return Qt("MuiDialogActions",t)}Yt("MuiDialogActions",["root","spacing"]);const dfe=["className","disableSpacing"],hfe=t=>{const{classes:e,disableSpacing:n}=t;return nn({root:["root",!n&&"spacing"]},ffe,e)},pfe=ut("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disableSpacing&&e.spacing]}})(({ownerState:t})=>Q({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!t.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})),mfe=H.forwardRef(function(e,n){const r=an({props:e,name:"MuiDialogActions"}),{className:i,disableSpacing:o=!1}=r,a=yt(r,dfe),s=Q({},r,{disableSpacing:o}),l=hfe(s);return F.jsx(pfe,Q({className:bt(l.root,i),ownerState:s,ref:n},a))}),gfe=mfe;function vfe(t){return Qt("MuiDialogContent",t)}Yt("MuiDialogContent",["root","dividers"]);function yfe(t){return Qt("MuiDialogTitle",t)}const xfe=Yt("MuiDialogTitle",["root"]),bfe=xfe,_fe=["className","dividers"],wfe=t=>{const{classes:e,dividers:n}=t;return nn({root:["root",n&&"dividers"]},vfe,e)},Sfe=ut("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.dividers&&e.dividers]}})(({theme:t,ownerState:e})=>Q({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},e.dividers?{padding:"16px 24px",borderTop:`1px solid ${(t.vars||t).palette.divider}`,borderBottom:`1px solid ${(t.vars||t).palette.divider}`}:{[`.${bfe.root} + &`]:{paddingTop:0}})),Efe=H.forwardRef(function(e,n){const r=an({props:e,name:"MuiDialogContent"}),{className:i,dividers:o=!1}=r,a=yt(r,_fe),s=Q({},r,{dividers:o}),l=wfe(s);return F.jsx(Sfe,Q({className:bt(l.root,i),ownerState:s,ref:n},a))}),Mfe=Efe,Cfe=["className","id"],Afe=t=>{const{classes:e}=t;return nn({root:["root"]},yfe,e)},Tfe=ut(tn,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(t,e)=>e.root})({padding:"16px 24px",flex:"0 0 auto"}),Dfe=H.forwardRef(function(e,n){const r=an({props:e,name:"MuiDialogTitle"}),{className:i,id:o}=r,a=yt(r,Cfe),s=r,l=Afe(s),{titleId:u=o}=H.useContext(AH);return F.jsx(Tfe,Q({component:"h2",className:bt(l.root,i),ownerState:s,ref:n,variant:"h6",id:o??u},a))}),Rfe=Dfe;function Pfe(t){return Qt("MuiDivider",t)}const Nfe=Yt("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),g8=Nfe,Ofe=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],Ife=t=>{const{absolute:e,children:n,classes:r,flexItem:i,light:o,orientation:a,textAlign:s,variant:l}=t;return nn({root:["root",e&&"absolute",l,o&&"light",a==="vertical"&&"vertical",i&&"flexItem",n&&"withChildren",n&&a==="vertical"&&"withChildrenVertical",s==="right"&&a!=="vertical"&&"textAlignRight",s==="left"&&a!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",a==="vertical"&&"wrapperVertical"]},Pfe,r)},Ffe=ut("div",{name:"MuiDivider",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.absolute&&e.absolute,e[n.variant],n.light&&e.light,n.orientation==="vertical"&&e.vertical,n.flexItem&&e.flexItem,n.children&&e.withChildren,n.children&&n.orientation==="vertical"&&e.withChildrenVertical,n.textAlign==="right"&&n.orientation!=="vertical"&&e.textAlignRight,n.textAlign==="left"&&n.orientation!=="vertical"&&e.textAlignLeft]}})(({theme:t,ownerState:e})=>Q({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(t.vars||t).palette.divider,borderBottomWidth:"thin"},e.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},e.light&&{borderColor:t.vars?`rgba(${t.vars.palette.dividerChannel} / 0.08)`:zn(t.palette.divider,.08)},e.variant==="inset"&&{marginLeft:72},e.variant==="middle"&&e.orientation==="horizontal"&&{marginLeft:t.spacing(2),marginRight:t.spacing(2)},e.variant==="middle"&&e.orientation==="vertical"&&{marginTop:t.spacing(1),marginBottom:t.spacing(1)},e.orientation==="vertical"&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},e.flexItem&&{alignSelf:"stretch",height:"auto"}),({ownerState:t})=>Q({},t.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,"&::before, &::after":{content:'""',alignSelf:"center"}}),({theme:t,ownerState:e})=>Q({},e.children&&e.orientation!=="vertical"&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(t.vars||t).palette.divider}`}}),({theme:t,ownerState:e})=>Q({},e.children&&e.orientation==="vertical"&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(t.vars||t).palette.divider}`}}),({ownerState:t})=>Q({},t.textAlign==="right"&&t.orientation!=="vertical"&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},t.textAlign==="left"&&t.orientation!=="vertical"&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})),Lfe=ut("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.wrapper,n.orientation==="vertical"&&e.wrapperVertical]}})(({theme:t,ownerState:e})=>Q({display:"inline-block",paddingLeft:`calc(${t.spacing(1)} * 1.2)`,paddingRight:`calc(${t.spacing(1)} * 1.2)`},e.orientation==="vertical"&&{paddingTop:`calc(${t.spacing(1)} * 1.2)`,paddingBottom:`calc(${t.spacing(1)} * 1.2)`})),TH=H.forwardRef(function(e,n){const r=an({props:e,name:"MuiDivider"}),{absolute:i=!1,children:o,className:a,component:s=o?"div":"hr",flexItem:l=!1,light:u=!1,orientation:c="horizontal",role:f=s!=="hr"?"separator":void 0,textAlign:d="center",variant:p="fullWidth"}=r,y=yt(r,Ofe),x=Q({},r,{absolute:i,component:s,flexItem:l,light:u,orientation:c,role:f,textAlign:d,variant:p}),_=Ife(x);return F.jsx(Ffe,Q({as:s,className:bt(_.root,a),role:f,ref:n,ownerState:x},y,{children:o?F.jsx(Lfe,{className:_.wrapper,ownerState:x,children:o}):null}))});TH.muiSkipListHighlight=!0;const Dd=TH,kfe=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function Bfe(t,e,n){const r=e.getBoundingClientRect(),i=n&&n.getBoundingClientRect(),o=Ju(e);let a;if(e.fakeTransform)a=e.fakeTransform;else{const u=o.getComputedStyle(e);a=u.getPropertyValue("-webkit-transform")||u.getPropertyValue("transform")}let s=0,l=0;if(a&&a!=="none"&&typeof a=="string"){const u=a.split("(")[1].split(")")[0].split(",");s=parseInt(u[4],10),l=parseInt(u[5],10)}return t==="left"?i?`translateX(${i.right+s-r.left}px)`:`translateX(${o.innerWidth+s-r.left}px)`:t==="right"?i?`translateX(-${r.right-i.left-s}px)`:`translateX(-${r.left+r.width-s}px)`:t==="up"?i?`translateY(${i.bottom+l-r.top}px)`:`translateY(${o.innerHeight+l-r.top}px)`:i?`translateY(-${r.top-i.top+r.height-l}px)`:`translateY(-${r.top+r.height-l}px)`}function Ufe(t){return typeof t=="function"?t():t}function Pw(t,e,n){const r=Ufe(n),i=Bfe(t,e,r);i&&(e.style.webkitTransform=i,e.style.transform=i)}const zfe=H.forwardRef(function(e,n){const r=Jp(),i={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:a,appear:s=!0,children:l,container:u,direction:c="down",easing:f=i,in:d,onEnter:p,onEntered:y,onEntering:x,onExit:_,onExited:v,onExiting:S,style:w,timeout:E=o,TransitionComponent:T=RO}=e,C=yt(e,kfe),D=H.useRef(null),O=Jr(l.ref,D,n),P=W=>U=>{W&&(U===void 0?W(D.current):W(D.current,U))},N=P((W,U)=>{Pw(c,W,u),OO(W),p&&p(W,U)}),k=P((W,U)=>{const te=Kg({timeout:E,style:w,easing:f},{mode:"enter"});W.style.webkitTransition=r.transitions.create("-webkit-transform",Q({},te)),W.style.transition=r.transitions.create("transform",Q({},te)),W.style.webkitTransform="none",W.style.transform="none",x&&x(W,U)}),G=P(y),Z=P(S),j=P(W=>{const U=Kg({timeout:E,style:w,easing:f},{mode:"exit"});W.style.webkitTransition=r.transitions.create("-webkit-transform",U),W.style.transition=r.transitions.create("transform",U),Pw(c,W,u),_&&_(W)}),K=P(W=>{W.style.webkitTransition="",W.style.transition="",v&&v(W)}),Y=W=>{a&&a(D.current,W)},$=H.useCallback(()=>{D.current&&Pw(c,D.current,u)},[c,u]);return H.useEffect(()=>{if(d||c==="down"||c==="right")return;const W=EM(()=>{D.current&&Pw(c,D.current,u)}),U=Ju(D.current);return U.addEventListener("resize",W),()=>{W.clear(),U.removeEventListener("resize",W)}},[c,d,u]),H.useEffect(()=>{d||$()},[d,$]),F.jsx(T,Q({nodeRef:D,onEnter:N,onEntered:G,onEntering:k,onExit:j,onExited:K,onExiting:Z,addEndListener:Y,appear:s,in:d,timeout:E},C,{children:(W,U)=>H.cloneElement(l,Q({ref:O,style:Q({visibility:W==="exited"&&!d?"hidden":void 0},w,l.props.style)},U))}))}),$fe=zfe;function Hfe(t){return Qt("MuiDrawer",t)}Yt("MuiDrawer",["root","docked","paper","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const Vfe=["BackdropProps"],Wfe=["anchor","BackdropProps","children","className","elevation","hideBackdrop","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"],DH=(t,e)=>{const{ownerState:n}=t;return[e.root,(n.variant==="permanent"||n.variant==="persistent")&&e.docked,e.modal]},Gfe=t=>{const{classes:e,anchor:n,variant:r}=t,i={root:["root"],docked:[(r==="permanent"||r==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${it(n)}`,r!=="temporary"&&`paperAnchorDocked${it(n)}`]};return nn(i,Hfe,e)},jfe=ut(VO,{name:"MuiDrawer",slot:"Root",overridesResolver:DH})(({theme:t})=>({zIndex:(t.vars||t).zIndex.drawer})),v8=ut("div",{shouldForwardProp:Ro,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:DH})({flex:"0 0 auto"}),qfe=ut(mf,{name:"MuiDrawer",slot:"Paper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.paper,e[`paperAnchor${it(n.anchor)}`],n.variant!=="temporary"&&e[`paperAnchorDocked${it(n.anchor)}`]]}})(({theme:t,ownerState:e})=>Q({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},e.anchor==="left"&&{left:0},e.anchor==="top"&&{top:0,left:0,right:0,height:"auto",maxHeight:"100%"},e.anchor==="right"&&{right:0},e.anchor==="bottom"&&{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},e.anchor==="left"&&e.variant!=="temporary"&&{borderRight:`1px solid ${(t.vars||t).palette.divider}`},e.anchor==="top"&&e.variant!=="temporary"&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`},e.anchor==="right"&&e.variant!=="temporary"&&{borderLeft:`1px solid ${(t.vars||t).palette.divider}`},e.anchor==="bottom"&&e.variant!=="temporary"&&{borderTop:`1px solid ${(t.vars||t).palette.divider}`})),RH={left:"right",right:"left",top:"down",bottom:"up"};function Xfe(t){return["left","right"].indexOf(t)!==-1}function Yfe(t,e){return t.direction==="rtl"&&Xfe(e)?RH[e]:e}const Kfe=H.forwardRef(function(e,n){const r=an({props:e,name:"MuiDrawer"}),i=Jp(),o={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{anchor:a="left",BackdropProps:s,children:l,className:u,elevation:c=16,hideBackdrop:f=!1,ModalProps:{BackdropProps:d}={},onClose:p,open:y=!1,PaperProps:x={},SlideProps:_,TransitionComponent:v=$fe,transitionDuration:S=o,variant:w="temporary"}=r,E=yt(r.ModalProps,Vfe),T=yt(r,Wfe),C=H.useRef(!1);H.useEffect(()=>{C.current=!0},[]);const D=Yfe(i,a),P=Q({},r,{anchor:a,elevation:c,open:y,variant:w},T),N=Gfe(P),k=F.jsx(qfe,Q({elevation:w==="temporary"?c:0,square:!0},x,{className:bt(N.paper,x.className),ownerState:P,children:l}));if(w==="permanent")return F.jsx(v8,Q({className:bt(N.root,N.docked,u),ownerState:P,ref:n},T,{children:k}));const G=F.jsx(v,Q({in:y,direction:RH[D],timeout:S,appear:C.current},_,{children:k}));return w==="persistent"?F.jsx(v8,Q({className:bt(N.root,N.docked,u),ownerState:P,ref:n},T,{children:G})):F.jsx(jfe,Q({BackdropProps:Q({},s,d,{transitionDuration:S}),className:bt(N.root,N.modal,u),open:y,ownerState:P,onClose:p,hideBackdrop:f,ref:n},T,E,{children:G}))}),Zfe=Kfe,Jfe=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],Qfe=t=>{const{classes:e,disableUnderline:n}=t,i=nn({root:["root",!n&&"underline"],input:["input"]},Oue,e);return Q({},e,i)},ede=ut(rC,{shouldForwardProp:t=>Ro(t)||t==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[...tC(t,e),!n.disableUnderline&&e.underline]}})(({theme:t,ownerState:e})=>{var n;const r=t.palette.mode==="light",i=r?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",o=r?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",a=r?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",s=r?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return Q({position:"relative",backgroundColor:t.vars?t.vars.palette.FilledInput.bg:o,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:a,"@media (hover: none)":{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:o}},[`&.${Cs.focused}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:o},[`&.${Cs.disabled}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.disabledBg:s}},!e.disableUnderline&&{"&:after":{borderBottom:`2px solid ${(n=(t.vars||t).palette[e.color||"primary"])==null?void 0:n.main}`,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"},[`&.${Cs.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Cs.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})`:i}`,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(.${Cs.disabled}, .${Cs.error}):before`]:{borderBottom:`1px solid ${(t.vars||t).palette.text.primary}`},[`&.${Cs.disabled}:before`]:{borderBottomStyle:"dotted"}},e.startAdornment&&{paddingLeft:12},e.endAdornment&&{paddingRight:12},e.multiline&&Q({padding:"25px 12px 8px"},e.size==="small"&&{paddingTop:21,paddingBottom:4},e.hiddenLabel&&{paddingTop:16,paddingBottom:17}))}),tde=ut(iC,{name:"MuiFilledInput",slot:"Input",overridesResolver:nC})(({theme:t,ownerState:e})=>Q({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"}}},e.size==="small"&&{paddingTop:21,paddingBottom:4},e.hiddenLabel&&{paddingTop:16,paddingBottom:17},e.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0},e.startAdornment&&{paddingLeft:0},e.endAdornment&&{paddingRight:0},e.hiddenLabel&&e.size==="small"&&{paddingTop:8,paddingBottom:9})),PH=H.forwardRef(function(e,n){var r,i,o,a;const s=an({props:e,name:"MuiFilledInput"}),{components:l={},componentsProps:u,fullWidth:c=!1,inputComponent:f="input",multiline:d=!1,slotProps:p,slots:y={},type:x="text"}=s,_=yt(s,Jfe),v=Q({},s,{fullWidth:c,inputComponent:f,multiline:d,type:x}),S=Qfe(s),w={root:{ownerState:v},input:{ownerState:v}},E=p??u?Xo(p??u,w):w,T=(r=(i=y.root)!=null?i:l.Root)!=null?r:ede,C=(o=(a=y.input)!=null?a:l.Input)!=null?o:tde;return F.jsx(HO,Q({slots:{root:T,input:C},componentsProps:E,fullWidth:c,inputComponent:f,multiline:d,ref:n,type:x},_,{classes:S}))});PH.muiName="Input";const NH=PH;function nde(t){return Qt("MuiFormControl",t)}Yt("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const rde=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],ide=t=>{const{classes:e,margin:n,fullWidth:r}=t,i={root:["root",n!=="none"&&`margin${it(n)}`,r&&"fullWidth"]};return nn(i,nde,e)},ode=ut("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:t},e)=>Q({},e.root,e[`margin${it(t.margin)}`],t.fullWidth&&e.fullWidth)})(({ownerState:t})=>Q({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},t.margin==="normal"&&{marginTop:16,marginBottom:8},t.margin==="dense"&&{marginTop:8,marginBottom:4},t.fullWidth&&{width:"100%"})),ade=H.forwardRef(function(e,n){const r=an({props:e,name:"MuiFormControl"}),{children:i,className:o,color:a="primary",component:s="div",disabled:l=!1,error:u=!1,focused:c,fullWidth:f=!1,hiddenLabel:d=!1,margin:p="none",required:y=!1,size:x="medium",variant:_="outlined"}=r,v=yt(r,rde),S=Q({},r,{color:a,component:s,disabled:l,error:u,fullWidth:f,hiddenLabel:d,margin:p,required:y,size:x,variant:_}),w=ide(S),[E,T]=H.useState(()=>{let Z=!1;return i&&H.Children.forEach(i,j=>{if(!F1(j,["Input","Select"]))return;const K=F1(j,["Select"])?j.props.input:j;K&&wue(K.props)&&(Z=!0)}),Z}),[C,D]=H.useState(()=>{let Z=!1;return i&&H.Children.forEach(i,j=>{F1(j,["Input","Select"])&&(t2(j.props,!0)||t2(j.props.inputProps,!0))&&(Z=!0)}),Z}),[O,P]=H.useState(!1);l&&O&&P(!1);const N=c!==void 0&&!l?c:O;let k;const G=H.useMemo(()=>({adornedStart:E,setAdornedStart:T,color:a,disabled:l,error:u,filled:C,focused:N,fullWidth:f,hiddenLabel:d,size:x,onBlur:()=>{P(!1)},onEmpty:()=>{D(!1)},onFilled:()=>{D(!0)},onFocus:()=>{P(!0)},registerEffect:k,required:y,variant:_}),[E,a,l,u,C,N,f,d,k,y,x,_]);return F.jsx($O.Provider,{value:G,children:F.jsx(ode,Q({as:s,ownerState:S,className:bt(w.root,o),ref:n},v,{children:i}))})}),yl=ade,sde=aH({createStyledComponent:ut("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root}),useThemeProps:t=>an({props:t,name:"MuiStack"})}),Ln=sde;function lde(t){return Qt("MuiFormControlLabel",t)}const ude=Yt("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),g1=ude,cde=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],fde=t=>{const{classes:e,disabled:n,labelPlacement:r,error:i,required:o}=t,a={root:["root",n&&"disabled",`labelPlacement${it(r)}`,i&&"error",o&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",i&&"error"]};return nn(a,lde,e)},dde=ut("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${g1.label}`]:e.label},e.root,e[`labelPlacement${it(n.labelPlacement)}`]]}})(({theme:t,ownerState:e})=>Q({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${g1.disabled}`]:{cursor:"default"}},e.labelPlacement==="start"&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},e.labelPlacement==="top"&&{flexDirection:"column-reverse",marginLeft:16},e.labelPlacement==="bottom"&&{flexDirection:"column",marginLeft:16},{[`& .${g1.label}`]:{[`&.${g1.disabled}`]:{color:(t.vars||t).palette.text.disabled}}})),hde=ut("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(t,e)=>e.asterisk})(({theme:t})=>({[`&.${g1.error}`]:{color:(t.vars||t).palette.error.main}})),pde=H.forwardRef(function(e,n){var r,i;const o=an({props:e,name:"MuiFormControlLabel"}),{className:a,componentsProps:s={},control:l,disabled:u,disableTypography:c,label:f,labelPlacement:d="end",required:p,slotProps:y={}}=o,x=yt(o,cde),_=gf(),v=(r=u??l.props.disabled)!=null?r:_==null?void 0:_.disabled,S=p??l.props.required,w={disabled:v,required:S};["checked","name","onChange","value","inputRef"].forEach(P=>{typeof l.props[P]>"u"&&typeof o[P]<"u"&&(w[P]=o[P])});const E=Qd({props:o,muiFormControl:_,states:["error"]}),T=Q({},o,{disabled:v,labelPlacement:d,required:S,error:E.error}),C=fde(T),D=(i=y.typography)!=null?i:s.typography;let O=f;return O!=null&&O.type!==tn&&!c&&(O=F.jsx(tn,Q({component:"span"},D,{className:bt(C.label,D==null?void 0:D.className),children:O}))),F.jsxs(dde,Q({className:bt(C.root,a),ownerState:T,ref:n},x,{children:[H.cloneElement(l,w),S?F.jsxs(Ln,{direction:"row",alignItems:"center",children:[O,F.jsxs(hde,{ownerState:T,"aria-hidden":!0,className:C.asterisk,children:[" ","*"]})]}):O]}))}),Ss=pde;function mde(t){return Qt("MuiFormGroup",t)}Yt("MuiFormGroup",["root","row","error"]);const gde=["className","row"],vde=t=>{const{classes:e,row:n,error:r}=t;return nn({root:["root",n&&"row",r&&"error"]},mde,e)},yde=ut("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.row&&e.row]}})(({ownerState:t})=>Q({display:"flex",flexDirection:"column",flexWrap:"wrap"},t.row&&{flexDirection:"row"})),xde=H.forwardRef(function(e,n){const r=an({props:e,name:"MuiFormGroup"}),{className:i,row:o=!1}=r,a=yt(r,gde),s=gf(),l=Qd({props:r,muiFormControl:s,states:["error"]}),u=Q({},r,{row:o,error:l.error}),c=vde(u);return F.jsx(yde,Q({className:bt(c.root,i),ownerState:u,ref:n},a))}),OH=xde;function bde(t){return Qt("MuiFormHelperText",t)}const _de=Yt("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]),y8=_de;var x8;const wde=["children","className","component","disabled","error","filled","focused","margin","required","variant"],Sde=t=>{const{classes:e,contained:n,size:r,disabled:i,error:o,filled:a,focused:s,required:l}=t,u={root:["root",i&&"disabled",o&&"error",r&&`size${it(r)}`,n&&"contained",s&&"focused",a&&"filled",l&&"required"]};return nn(u,bde,e)},Ede=ut("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.size&&e[`size${it(n.size)}`],n.contained&&e.contained,n.filled&&e.filled]}})(({theme:t,ownerState:e})=>Q({color:(t.vars||t).palette.text.secondary},t.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${y8.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${y8.error}`]:{color:(t.vars||t).palette.error.main}},e.size==="small"&&{marginTop:4},e.contained&&{marginLeft:14,marginRight:14})),Mde=H.forwardRef(function(e,n){const r=an({props:e,name:"MuiFormHelperText"}),{children:i,className:o,component:a="p"}=r,s=yt(r,wde),l=gf(),u=Qd({props:r,muiFormControl:l,states:["variant","size","disabled","error","filled","focused","required"]}),c=Q({},r,{component:a,contained:u.variant==="filled"||u.variant==="outlined",variant:u.variant,size:u.size,disabled:u.disabled,error:u.error,filled:u.filled,focused:u.focused,required:u.required}),f=Sde(c);return F.jsx(Ede,Q({as:a,ownerState:c,className:bt(f.root,o),ref:n},s,{children:i===" "?x8||(x8=F.jsx("span",{className:"notranslate",children:"​"})):i}))}),Cde=Mde;function Ade(t){return Qt("MuiFormLabel",t)}const Tde=Yt("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),$1=Tde,Dde=["children","className","color","component","disabled","error","filled","focused","required"],Rde=t=>{const{classes:e,color:n,focused:r,disabled:i,error:o,filled:a,required:s}=t,l={root:["root",`color${it(n)}`,i&&"disabled",o&&"error",a&&"filled",r&&"focused",s&&"required"],asterisk:["asterisk",o&&"error"]};return nn(l,Ade,e)},Pde=ut("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:t},e)=>Q({},e.root,t.color==="secondary"&&e.colorSecondary,t.filled&&e.filled)})(({theme:t,ownerState:e})=>Q({color:(t.vars||t).palette.text.secondary},t.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${$1.focused}`]:{color:(t.vars||t).palette[e.color].main},[`&.${$1.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${$1.error}`]:{color:(t.vars||t).palette.error.main}})),Nde=ut("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(t,e)=>e.asterisk})(({theme:t})=>({[`&.${$1.error}`]:{color:(t.vars||t).palette.error.main}})),Ode=H.forwardRef(function(e,n){const r=an({props:e,name:"MuiFormLabel"}),{children:i,className:o,component:a="label"}=r,s=yt(r,Dde),l=gf(),u=Qd({props:r,muiFormControl:l,states:["color","required","focused","disabled","error","filled"]}),c=Q({},r,{color:u.color||"primary",component:a,disabled:u.disabled,error:u.error,filled:u.filled,focused:u.focused,required:u.required}),f=Rde(c);return F.jsxs(Pde,Q({as:a,ownerState:c,className:bt(f.root,o),ref:n},s,{children:[i,u.required&&F.jsxs(Nde,{ownerState:c,"aria-hidden":!0,className:f.asterisk,children:[" ","*"]})]}))}),WO=Ode,Ide=H.createContext(),b8=Ide;function Fde(t){return Qt("MuiGrid",t)}const Lde=[0,1,2,3,4,5,6,7,8,9,10],kde=["column-reverse","column","row-reverse","row"],Bde=["nowrap","wrap-reverse","wrap"],zy=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],Tx=Yt("MuiGrid",["root","container","item","zeroMinWidth",...Lde.map(t=>`spacing-xs-${t}`),...kde.map(t=>`direction-xs-${t}`),...Bde.map(t=>`wrap-xs-${t}`),...zy.map(t=>`grid-xs-${t}`),...zy.map(t=>`grid-sm-${t}`),...zy.map(t=>`grid-md-${t}`),...zy.map(t=>`grid-lg-${t}`),...zy.map(t=>`grid-xl-${t}`)]),Ude=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function Pg(t){const e=parseFloat(t);return`${e}${String(t).replace(String(e),"")||"px"}`}function zde({theme:t,ownerState:e}){let n;return t.breakpoints.keys.reduce((r,i)=>{let o={};if(e[i]&&(n=e[i]),!n)return r;if(n===!0)o={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if(n==="auto")o={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const a=Sp({values:e.columns,breakpoints:t.breakpoints.values}),s=typeof a=="object"?a[i]:a;if(s==null)return r;const l=`${Math.round(n/s*1e8)/1e6}%`;let u={};if(e.container&&e.item&&e.columnSpacing!==0){const c=t.spacing(e.columnSpacing);if(c!=="0px"){const f=`calc(${l} + ${Pg(c)})`;u={flexBasis:f,maxWidth:f}}}o=Q({flexBasis:l,flexGrow:0,maxWidth:l},u)}return t.breakpoints.values[i]===0?Object.assign(r,o):r[t.breakpoints.up(i)]=o,r},{})}function $de({theme:t,ownerState:e}){const n=Sp({values:e.direction,breakpoints:t.breakpoints.values});return Ka({theme:t},n,r=>{const i={flexDirection:r};return r.indexOf("column")===0&&(i[`& > .${Tx.item}`]={maxWidth:"none"}),i})}function IH({breakpoints:t,values:e}){let n="";Object.keys(e).forEach(i=>{n===""&&e[i]!==0&&(n=i)});const r=Object.keys(t).sort((i,o)=>t[i]-t[o]);return r.slice(0,r.indexOf(n))}function Hde({theme:t,ownerState:e}){const{container:n,rowSpacing:r}=e;let i={};if(n&&r!==0){const o=Sp({values:r,breakpoints:t.breakpoints.values});let a;typeof o=="object"&&(a=IH({breakpoints:t.breakpoints.values,values:o})),i=Ka({theme:t},o,(s,l)=>{var u;const c=t.spacing(s);return c!=="0px"?{marginTop:`-${Pg(c)}`,[`& > .${Tx.item}`]:{paddingTop:Pg(c)}}:(u=a)!=null&&u.includes(l)?{}:{marginTop:0,[`& > .${Tx.item}`]:{paddingTop:0}}})}return i}function Vde({theme:t,ownerState:e}){const{container:n,columnSpacing:r}=e;let i={};if(n&&r!==0){const o=Sp({values:r,breakpoints:t.breakpoints.values});let a;typeof o=="object"&&(a=IH({breakpoints:t.breakpoints.values,values:o})),i=Ka({theme:t},o,(s,l)=>{var u;const c=t.spacing(s);return c!=="0px"?{width:`calc(100% + ${Pg(c)})`,marginLeft:`-${Pg(c)}`,[`& > .${Tx.item}`]:{paddingLeft:Pg(c)}}:(u=a)!=null&&u.includes(l)?{}:{width:"100%",marginLeft:0,[`& > .${Tx.item}`]:{paddingLeft:0}}})}return i}function Wde(t,e,n={}){if(!t||t<=0)return[];if(typeof t=="string"&&!Number.isNaN(Number(t))||typeof t=="number")return[n[`spacing-xs-${String(t)}`]];const r=[];return e.forEach(i=>{const o=t[i];Number(o)>0&&r.push(n[`spacing-${i}-${String(o)}`])}),r}const Gde=ut("div",{name:"MuiGrid",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t,{container:r,direction:i,item:o,spacing:a,wrap:s,zeroMinWidth:l,breakpoints:u}=n;let c=[];r&&(c=Wde(a,u,e));const f=[];return u.forEach(d=>{const p=n[d];p&&f.push(e[`grid-${d}-${String(p)}`])}),[e.root,r&&e.container,o&&e.item,l&&e.zeroMinWidth,...c,i!=="row"&&e[`direction-xs-${String(i)}`],s!=="wrap"&&e[`wrap-xs-${String(s)}`],...f]}})(({ownerState:t})=>Q({boxSizing:"border-box"},t.container&&{display:"flex",flexWrap:"wrap",width:"100%"},t.item&&{margin:0},t.zeroMinWidth&&{minWidth:0},t.wrap!=="wrap"&&{flexWrap:t.wrap}),$de,Hde,Vde,zde);function jde(t,e){if(!t||t<=0)return[];if(typeof t=="string"&&!Number.isNaN(Number(t))||typeof t=="number")return[`spacing-xs-${String(t)}`];const n=[];return e.forEach(r=>{const i=t[r];if(Number(i)>0){const o=`spacing-${r}-${String(i)}`;n.push(o)}}),n}const qde=t=>{const{classes:e,container:n,direction:r,item:i,spacing:o,wrap:a,zeroMinWidth:s,breakpoints:l}=t;let u=[];n&&(u=jde(o,l));const c=[];l.forEach(d=>{const p=t[d];p&&c.push(`grid-${d}-${String(p)}`)});const f={root:["root",n&&"container",i&&"item",s&&"zeroMinWidth",...u,r!=="row"&&`direction-xs-${String(r)}`,a!=="wrap"&&`wrap-xs-${String(a)}`,...c]};return nn(f,Fde,e)},Xde=H.forwardRef(function(e,n){const r=an({props:e,name:"MuiGrid"}),{breakpoints:i}=Jp(),o=YM(r),{className:a,columns:s,columnSpacing:l,component:u="div",container:c=!1,direction:f="row",item:d=!1,rowSpacing:p,spacing:y=0,wrap:x="wrap",zeroMinWidth:_=!1}=o,v=yt(o,Ude),S=p||y,w=l||y,E=H.useContext(b8),T=c?s||12:E,C={},D=Q({},v);i.keys.forEach(N=>{v[N]!=null&&(C[N]=v[N],delete D[N])});const O=Q({},o,{columns:T,container:c,direction:f,item:d,rowSpacing:S,columnSpacing:w,wrap:x,zeroMinWidth:_,spacing:y},C,{breakpoints:i.keys}),P=qde(O);return F.jsx(b8.Provider,{value:T,children:F.jsx(Gde,Q({ownerState:O,className:bt(P.root,a),as:u,ref:n},D))})}),Ul=Xde,Yde=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function AR(t){return`scale(${t}, ${t**2})`}const Kde={entering:{opacity:1,transform:AR(1)},entered:{opacity:1,transform:"none"}},HT=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),FH=H.forwardRef(function(e,n){const{addEndListener:r,appear:i=!0,children:o,easing:a,in:s,onEnter:l,onEntered:u,onEntering:c,onExit:f,onExited:d,onExiting:p,style:y,timeout:x="auto",TransitionComponent:_=RO}=e,v=yt(e,Yde),S=H.useRef(),w=H.useRef(),E=Jp(),T=H.useRef(null),C=Jr(T,o.ref,n),D=K=>Y=>{if(K){const $=T.current;Y===void 0?K($):K($,Y)}},O=D(c),P=D((K,Y)=>{OO(K);const{duration:$,delay:W,easing:U}=Kg({style:y,timeout:x,easing:a},{mode:"enter"});let te;x==="auto"?(te=E.transitions.getAutoHeightDuration(K.clientHeight),w.current=te):te=$,K.style.transition=[E.transitions.create("opacity",{duration:te,delay:W}),E.transitions.create("transform",{duration:HT?te:te*.666,delay:W,easing:U})].join(","),l&&l(K,Y)}),N=D(u),k=D(p),G=D(K=>{const{duration:Y,delay:$,easing:W}=Kg({style:y,timeout:x,easing:a},{mode:"exit"});let U;x==="auto"?(U=E.transitions.getAutoHeightDuration(K.clientHeight),w.current=U):U=Y,K.style.transition=[E.transitions.create("opacity",{duration:U,delay:$}),E.transitions.create("transform",{duration:HT?U:U*.666,delay:HT?$:$||U*.333,easing:W})].join(","),K.style.opacity=0,K.style.transform=AR(.75),f&&f(K)}),Z=D(d),j=K=>{x==="auto"&&(S.current=setTimeout(K,w.current||0)),r&&r(T.current,K)};return H.useEffect(()=>()=>{clearTimeout(S.current)},[]),F.jsx(_,Q({appear:i,in:s,nodeRef:T,onEnter:P,onEntered:N,onEntering:O,onExit:G,onExited:Z,onExiting:k,addEndListener:j,timeout:x==="auto"?null:x},v,{children:(K,Y)=>H.cloneElement(o,Q({style:Q({opacity:0,transform:AR(.75),visibility:K==="exited"&&!s?"hidden":void 0},Kde[K],y,o.props.style),ref:C},Y))}))});FH.muiSupportAuto=!0;const Zde=FH,Jde=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],Qde=t=>{const{classes:e,disableUnderline:n}=t,i=nn({root:["root",!n&&"underline"],input:["input"]},Due,e);return Q({},e,i)},ehe=ut(rC,{shouldForwardProp:t=>Ro(t)||t==="classes",name:"MuiInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[...tC(t,e),!n.disableUnderline&&e.underline]}})(({theme:t,ownerState:e})=>{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})`),Q({position:"relative"},e.formControl&&{"label + &":{marginTop:16}},!e.disableUnderline&&{"&:after":{borderBottom:`2px solid ${(t.vars||t).palette[e.color].main}`,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"},[`&.${md.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${md.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(.${md.disabled}, .${md.error}):before`]:{borderBottom:`2px solid ${(t.vars||t).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${md.disabled}:before`]:{borderBottomStyle:"dotted"}})}),the=ut(iC,{name:"MuiInput",slot:"Input",overridesResolver:nC})({}),LH=H.forwardRef(function(e,n){var r,i,o,a;const s=an({props:e,name:"MuiInput"}),{disableUnderline:l,components:u={},componentsProps:c,fullWidth:f=!1,inputComponent:d="input",multiline:p=!1,slotProps:y,slots:x={},type:_="text"}=s,v=yt(s,Jde),S=Qde(s),E={root:{ownerState:{disableUnderline:l}}},T=y??c?Xo(y??c,E):E,C=(r=(i=x.root)!=null?i:u.Root)!=null?r:ehe,D=(o=(a=x.input)!=null?a:u.Input)!=null?o:the;return F.jsx(HO,Q({slots:{root:C,input:D},slotProps:T,fullWidth:f,inputComponent:d,multiline:p,ref:n,type:_},v,{classes:S}))});LH.muiName="Input";const kH=LH;function nhe(t){return Qt("MuiInputLabel",t)}Yt("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const rhe=["disableAnimation","margin","shrink","variant","className"],ihe=t=>{const{classes:e,formControl:n,size:r,shrink:i,disableAnimation:o,variant:a,required:s}=t,l={root:["root",n&&"formControl",!o&&"animated",i&&"shrink",r&&r!=="normal"&&`size${it(r)}`,a],asterisk:[s&&"asterisk"]},u=nn(l,nhe,e);return Q({},e,u)},ohe=ut(WO,{shouldForwardProp:t=>Ro(t)||t==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${$1.asterisk}`]:e.asterisk},e.root,n.formControl&&e.formControl,n.size==="small"&&e.sizeSmall,n.shrink&&e.shrink,!n.disableAnimation&&e.animated,n.focused&&e.focused,e[n.variant]]}})(({theme:t,ownerState:e})=>Q({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},e.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},e.size==="small"&&{transform:"translate(0, 17px) scale(1)"},e.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!e.disableAnimation&&{transition:t.transitions.create(["color","transform","max-width"],{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut})},e.variant==="filled"&&Q({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},e.size==="small"&&{transform:"translate(12px, 13px) scale(1)"},e.shrink&&Q({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},e.size==="small"&&{transform:"translate(12px, 4px) scale(0.75)"})),e.variant==="outlined"&&Q({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},e.size==="small"&&{transform:"translate(14px, 9px) scale(1)"},e.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))),ahe=H.forwardRef(function(e,n){const r=an({name:"MuiInputLabel",props:e}),{disableAnimation:i=!1,shrink:o,className:a}=r,s=yt(r,rhe),l=gf();let u=o;typeof u>"u"&&l&&(u=l.filled||l.focused||l.adornedStart);const c=Qd({props:r,muiFormControl:l,states:["size","variant","required","focused"]}),f=Q({},r,{disableAnimation:i,formControl:l,shrink:u,size:c.size,variant:c.variant,required:c.required,focused:c.focused}),d=ihe(f);return F.jsx(ohe,Q({"data-shrink":u,ownerState:f,ref:n,className:bt(d.root,a)},s,{classes:d}))}),Gu=ahe,she=H.createContext({}),Mp=she;function lhe(t){return Qt("MuiList",t)}Yt("MuiList",["root","padding","dense","subheader"]);const uhe=["children","className","component","dense","disablePadding","subheader"],che=t=>{const{classes:e,disablePadding:n,dense:r,subheader:i}=t;return nn({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},lhe,e)},fhe=ut("ul",{name:"MuiList",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disablePadding&&e.padding,n.dense&&e.dense,n.subheader&&e.subheader]}})(({ownerState:t})=>Q({listStyle:"none",margin:0,padding:0,position:"relative"},!t.disablePadding&&{paddingTop:8,paddingBottom:8},t.subheader&&{paddingTop:0})),dhe=H.forwardRef(function(e,n){const r=an({props:e,name:"MuiList"}),{children:i,className:o,component:a="ul",dense:s=!1,disablePadding:l=!1,subheader:u}=r,c=yt(r,uhe),f=H.useMemo(()=>({dense:s}),[s]),d=Q({},r,{component:a,dense:s,disablePadding:l}),p=che(d);return F.jsx(Mp.Provider,{value:f,children:F.jsxs(fhe,Q({as:a,className:bt(p.root,o),ref:n,ownerState:d},c,{children:[u,i]}))})}),BH=dhe;function hhe(t){return Qt("MuiListItem",t)}const phe=Yt("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]),F0=phe,mhe=Yt("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),ghe=mhe;function vhe(t){return Qt("MuiListItemSecondaryAction",t)}Yt("MuiListItemSecondaryAction",["root","disableGutters"]);const yhe=["className"],xhe=t=>{const{disableGutters:e,classes:n}=t;return nn({root:["root",e&&"disableGutters"]},vhe,n)},bhe=ut("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.disableGutters&&e.disableGutters]}})(({ownerState:t})=>Q({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},t.disableGutters&&{right:0})),UH=H.forwardRef(function(e,n){const r=an({props:e,name:"MuiListItemSecondaryAction"}),{className:i}=r,o=yt(r,yhe),a=H.useContext(Mp),s=Q({},r,{disableGutters:a.disableGutters}),l=xhe(s);return F.jsx(bhe,Q({className:bt(l.root,i),ownerState:s,ref:n},o))});UH.muiName="ListItemSecondaryAction";const _he=UH,whe=["className"],She=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],Ehe=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.alignItems==="flex-start"&&e.alignItemsFlexStart,n.divider&&e.divider,!n.disableGutters&&e.gutters,!n.disablePadding&&e.padding,n.button&&e.button,n.hasSecondaryAction&&e.secondaryAction]},Mhe=t=>{const{alignItems:e,button:n,classes:r,dense:i,disabled:o,disableGutters:a,disablePadding:s,divider:l,hasSecondaryAction:u,selected:c}=t;return nn({root:["root",i&&"dense",!a&&"gutters",!s&&"padding",l&&"divider",o&&"disabled",n&&"button",e==="flex-start"&&"alignItemsFlexStart",u&&"secondaryAction",c&&"selected"],container:["container"]},hhe,r)},Che=ut("div",{name:"MuiListItem",slot:"Root",overridesResolver:Ehe})(({theme:t,ownerState:e})=>Q({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!e.disablePadding&&Q({paddingTop:8,paddingBottom:8},e.dense&&{paddingTop:4,paddingBottom:4},!e.disableGutters&&{paddingLeft:16,paddingRight:16},!!e.secondaryAction&&{paddingRight:48}),!!e.secondaryAction&&{[`& > .${ghe.root}`]:{paddingRight:48}},{[`&.${F0.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${F0.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:zn(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${F0.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:zn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${F0.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.alignItems==="flex-start"&&{alignItems:"flex-start"},e.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},e.button&&{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"}},[`&.${F0.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:zn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:zn(t.palette.primary.main,t.palette.action.selectedOpacity)}}},e.hasSecondaryAction&&{paddingRight:48})),Ahe=ut("li",{name:"MuiListItem",slot:"Container",overridesResolver:(t,e)=>e.container})({position:"relative"}),The=H.forwardRef(function(e,n){const r=an({props:e,name:"MuiListItem"}),{alignItems:i="center",autoFocus:o=!1,button:a=!1,children:s,className:l,component:u,components:c={},componentsProps:f={},ContainerComponent:d="li",ContainerProps:{className:p}={},dense:y=!1,disabled:x=!1,disableGutters:_=!1,disablePadding:v=!1,divider:S=!1,focusVisibleClassName:w,secondaryAction:E,selected:T=!1,slotProps:C={},slots:D={}}=r,O=yt(r.ContainerProps,whe),P=yt(r,She),N=H.useContext(Mp),k=H.useMemo(()=>({dense:y||N.dense||!1,alignItems:i,disableGutters:_}),[i,N.dense,y,_]),G=H.useRef(null);_l(()=>{o&&G.current&&G.current.focus()},[o]);const Z=H.Children.toArray(s),j=Z.length&&F1(Z[Z.length-1],["ListItemSecondaryAction"]),K=Q({},r,{alignItems:i,autoFocus:o,button:a,dense:k.dense,disabled:x,disableGutters:_,disablePadding:v,divider:S,hasSecondaryAction:j,selected:T}),Y=Mhe(K),$=Jr(G,n),W=D.root||c.Root||Che,U=C.root||f.root||{},te=Q({className:bt(Y.root,U.className,l),disabled:x},P);let re=u||"li";return a&&(te.component=u||"div",te.focusVisibleClassName=bt(F0.focusVisible,w),re=zp),j?(re=!te.component&&!u?"div":re,d==="li"&&(re==="li"?re="div":te.component==="li"&&(te.component="div")),F.jsx(Mp.Provider,{value:k,children:F.jsxs(Ahe,Q({as:d,className:bt(Y.container,p),ref:$,ownerState:K},O,{children:[F.jsx(W,Q({},U,!Zg(W)&&{as:re,ownerState:Q({},K,U.ownerState)},te,{children:Z})),Z.pop()]}))})):F.jsx(Mp.Provider,{value:k,children:F.jsxs(W,Q({},U,{as:re,ref:$},!Zg(W)&&{ownerState:Q({},K,U.ownerState)},te,{children:[Z,E&&F.jsx(_he,{children:E})]}))})}),Dhe=The,Rhe=Yt("MuiListItemIcon",["root","alignItemsFlexStart"]),_8=Rhe,Phe=Yt("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),w8=Phe,Nhe=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function VT(t,e,n){return t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:n?null:t.firstChild}function S8(t,e,n){return t===e?n?t.firstChild:t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:n?null:t.lastChild}function zH(t,e){if(e===void 0)return!0;let n=t.innerText;return n===void 0&&(n=t.textContent),n=n.trim().toLowerCase(),n.length===0?!1:e.repeating?n[0]===e.keys[0]:n.indexOf(e.keys.join(""))===0}function $y(t,e,n,r,i,o){let a=!1,s=i(t,e,e?n:!1);for(;s;){if(s===t.firstChild){if(a)return!1;a=!0}const l=r?!1:s.disabled||s.getAttribute("aria-disabled")==="true";if(!s.hasAttribute("tabindex")||!zH(s,o)||l)s=i(t,s,n);else return s.focus(),!0}return!1}const Ohe=H.forwardRef(function(e,n){const{actions:r,autoFocus:i=!1,autoFocusItem:o=!1,children:a,className:s,disabledItemsFocusable:l=!1,disableListWrap:u=!1,onKeyDown:c,variant:f="selectedMenu"}=e,d=yt(e,Nhe),p=H.useRef(null),y=H.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});_l(()=>{i&&p.current.focus()},[i]),H.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(w,E)=>{const T=!p.current.style.width;if(w.clientHeight{const E=p.current,T=w.key,C=Yo(E).activeElement;if(T==="ArrowDown")w.preventDefault(),$y(E,C,u,l,VT);else if(T==="ArrowUp")w.preventDefault(),$y(E,C,u,l,S8);else if(T==="Home")w.preventDefault(),$y(E,null,u,l,VT);else if(T==="End")w.preventDefault(),$y(E,null,u,l,S8);else if(T.length===1){const D=y.current,O=T.toLowerCase(),P=performance.now();D.keys.length>0&&(P-D.lastTime>500?(D.keys=[],D.repeating=!0,D.previousKeyMatched=!0):D.repeating&&O!==D.keys[0]&&(D.repeating=!1)),D.lastTime=P,D.keys.push(O);const N=C&&!D.repeating&&zH(C,D);D.previousKeyMatched&&(N||$y(E,C,!1,l,VT,D))?w.preventDefault():D.previousKeyMatched=!1}c&&c(w)},_=Jr(p,n);let v=-1;H.Children.forEach(a,(w,E)=>{if(!H.isValidElement(w)){v===E&&(v+=1,v>=a.length&&(v=-1));return}w.props.disabled||(f==="selectedMenu"&&w.props.selected||v===-1)&&(v=E),v===E&&(w.props.disabled||w.props.muiSkipListHighlight||w.type.muiSkipListHighlight)&&(v+=1,v>=a.length&&(v=-1))});const S=H.Children.map(a,(w,E)=>{if(E===v){const T={};return o&&(T.autoFocus=!0),w.props.tabIndex===void 0&&f==="selectedMenu"&&(T.tabIndex=0),H.cloneElement(w,T)}return w});return F.jsx(BH,Q({role:"menu",ref:_,className:s,onKeyDown:x,tabIndex:i?0:-1},d,{children:S}))}),Ihe=Ohe;function Fhe(t){return Qt("MuiPopover",t)}Yt("MuiPopover",["root","paper"]);const Lhe=["onEntering"],khe=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],Bhe=["slotProps"];function E8(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.height/2:e==="bottom"&&(n=t.height),n}function M8(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.width/2:e==="right"&&(n=t.width),n}function C8(t){return[t.horizontal,t.vertical].map(e=>typeof e=="number"?`${e}px`:e).join(" ")}function WT(t){return typeof t=="function"?t():t}const Uhe=t=>{const{classes:e}=t;return nn({root:["root"],paper:["paper"]},Fhe,e)},zhe=ut(VO,{name:"MuiPopover",slot:"Root",overridesResolver:(t,e)=>e.root})({}),$H=ut(mf,{name:"MuiPopover",slot:"Paper",overridesResolver:(t,e)=>e.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),$he=H.forwardRef(function(e,n){var r,i,o;const a=an({props:e,name:"MuiPopover"}),{action:s,anchorEl:l,anchorOrigin:u={vertical:"top",horizontal:"left"},anchorPosition:c,anchorReference:f="anchorEl",children:d,className:p,container:y,elevation:x=8,marginThreshold:_=16,open:v,PaperProps:S={},slots:w,slotProps:E,transformOrigin:T={vertical:"top",horizontal:"left"},TransitionComponent:C=Zde,transitionDuration:D="auto",TransitionProps:{onEntering:O}={},disableScrollLock:P=!1}=a,N=yt(a.TransitionProps,Lhe),k=yt(a,khe),G=(r=E==null?void 0:E.paper)!=null?r:S,Z=H.useRef(),j=Jr(Z,G.ref),K=Q({},a,{anchorOrigin:u,anchorReference:f,elevation:x,marginThreshold:_,externalPaperSlotProps:G,transformOrigin:T,TransitionComponent:C,transitionDuration:D,TransitionProps:N}),Y=Uhe(K),$=H.useCallback(()=>{if(f==="anchorPosition")return c;const De=WT(l),X=(De&&De.nodeType===1?De:Yo(Z.current).body).getBoundingClientRect();return{top:X.top+E8(X,u.vertical),left:X.left+M8(X,u.horizontal)}},[l,u.horizontal,u.vertical,c,f]),W=H.useCallback(De=>({vertical:E8(De,T.vertical),horizontal:M8(De,T.horizontal)}),[T.horizontal,T.vertical]),U=H.useCallback(De=>{const Ee={width:De.offsetWidth,height:De.offsetHeight},X=W(Ee);if(f==="none")return{top:null,left:null,transformOrigin:C8(X)};const ne=$();let me=ne.top-X.vertical,we=ne.left-X.horizontal;const Ne=me+Ee.height,Ue=we+Ee.width,We=Ju(WT(l)),lt=We.innerHeight-_,z=We.innerWidth-_;if(_!==null&&me<_){const B=me-_;me-=B,X.vertical+=B}else if(_!==null&&Ne>lt){const B=Ne-lt;me-=B,X.vertical+=B}if(_!==null&&we<_){const B=we-_;we-=B,X.horizontal+=B}else if(Ue>z){const B=Ue-z;we-=B,X.horizontal+=B}return{top:`${Math.round(me)}px`,left:`${Math.round(we)}px`,transformOrigin:C8(X)}},[l,f,$,W,_]),[te,re]=H.useState(v),le=H.useCallback(()=>{const De=Z.current;if(!De)return;const Ee=U(De);Ee.top!==null&&(De.style.top=Ee.top),Ee.left!==null&&(De.style.left=Ee.left),De.style.transformOrigin=Ee.transformOrigin,re(!0)},[U]);H.useEffect(()=>(P&&window.addEventListener("scroll",le),()=>window.removeEventListener("scroll",le)),[l,P,le]);const ce=(De,Ee)=>{O&&O(De,Ee),le()},Ce=()=>{re(!1)};H.useEffect(()=>{v&&le()}),H.useImperativeHandle(s,()=>v?{updatePosition:()=>{le()}}:null,[v,le]),H.useEffect(()=>{if(!v)return;const De=EM(()=>{le()}),Ee=Ju(l);return Ee.addEventListener("resize",De),()=>{De.clear(),Ee.removeEventListener("resize",De)}},[l,v,le]);let Re=D;D==="auto"&&!C.muiSupportAuto&&(Re=void 0);const Ie=y||(l?Yo(WT(l)).body:void 0),He=(i=w==null?void 0:w.root)!=null?i:zhe,tt=(o=w==null?void 0:w.paper)!=null?o:$H,Qe=$p({elementType:tt,externalSlotProps:Q({},G,{style:te?G.style:Q({},G.style,{opacity:0})}),additionalProps:{elevation:x,ref:j},ownerState:K,className:bt(Y.paper,G==null?void 0:G.className)}),ct=$p({elementType:He,externalSlotProps:(E==null?void 0:E.root)||{},externalForwardedProps:k,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:Ie,open:v},ownerState:K,className:bt(Y.root,p)}),{slotProps:Xe}=ct,ue=yt(ct,Bhe);return F.jsx(He,Q({},ue,!Zg(He)&&{slotProps:Xe,disableScrollLock:P},{children:F.jsx(C,Q({appear:!0,in:v,onEntering:ce,onExited:Ce,timeout:Re},N,{children:F.jsx(tt,Q({},Qe,{children:d}))}))}))}),HH=$he;function Hhe(t){return Qt("MuiMenu",t)}Yt("MuiMenu",["root","paper","list"]);const Vhe=["onEntering"],Whe=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],Ghe={vertical:"top",horizontal:"right"},jhe={vertical:"top",horizontal:"left"},qhe=t=>{const{classes:e}=t;return nn({root:["root"],paper:["paper"],list:["list"]},Hhe,e)},Xhe=ut(HH,{shouldForwardProp:t=>Ro(t)||t==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(t,e)=>e.root})({}),Yhe=ut($H,{name:"MuiMenu",slot:"Paper",overridesResolver:(t,e)=>e.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),Khe=ut(Ihe,{name:"MuiMenu",slot:"List",overridesResolver:(t,e)=>e.list})({outline:0}),Zhe=H.forwardRef(function(e,n){var r,i;const o=an({props:e,name:"MuiMenu"}),{autoFocus:a=!0,children:s,className:l,disableAutoFocusItem:u=!1,MenuListProps:c={},onClose:f,open:d,PaperProps:p={},PopoverClasses:y,transitionDuration:x="auto",TransitionProps:{onEntering:_}={},variant:v="selectedMenu",slots:S={},slotProps:w={}}=o,E=yt(o.TransitionProps,Vhe),T=yt(o,Whe),C=Jp(),D=C.direction==="rtl",O=Q({},o,{autoFocus:a,disableAutoFocusItem:u,MenuListProps:c,onEntering:_,PaperProps:p,transitionDuration:x,TransitionProps:E,variant:v}),P=qhe(O),N=a&&!u&&d,k=H.useRef(null),G=(U,te)=>{k.current&&k.current.adjustStyleForScrollbar(U,C),_&&_(U,te)},Z=U=>{U.key==="Tab"&&(U.preventDefault(),f&&f(U,"tabKeyDown"))};let j=-1;H.Children.map(s,(U,te)=>{H.isValidElement(U)&&(U.props.disabled||(v==="selectedMenu"&&U.props.selected||j===-1)&&(j=te))});const K=(r=S.paper)!=null?r:Yhe,Y=(i=w.paper)!=null?i:p,$=$p({elementType:S.root,externalSlotProps:w.root,ownerState:O,className:[P.root,l]}),W=$p({elementType:K,externalSlotProps:Y,ownerState:O,className:P.paper});return F.jsx(Xhe,Q({onClose:f,anchorOrigin:{vertical:"bottom",horizontal:D?"right":"left"},transformOrigin:D?Ghe:jhe,slots:{paper:K,root:S.root},slotProps:{root:$,paper:W},open:d,ref:n,transitionDuration:x,TransitionProps:Q({onEntering:G},E),ownerState:O},T,{classes:y,children:F.jsx(Khe,Q({onKeyDown:Z,actions:k,autoFocus:a&&(j===-1||u),autoFocusItem:N,variant:v},c,{className:bt(P.list,c.className),children:s}))}))}),Jhe=Zhe;function Qhe(t){return Qt("MuiMenuItem",t)}const epe=Yt("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),Hy=epe,tpe=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],npe=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.divider&&e.divider,!n.disableGutters&&e.gutters]},rpe=t=>{const{disabled:e,dense:n,divider:r,disableGutters:i,selected:o,classes:a}=t,l=nn({root:["root",n&&"dense",e&&"disabled",!i&&"gutters",r&&"divider",o&&"selected"]},Qhe,a);return Q({},a,l)},ipe=ut(zp,{shouldForwardProp:t=>Ro(t)||t==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:npe})(({theme:t,ownerState:e})=>Q({},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"},!e.disableGutters&&{paddingLeft:16,paddingRight:16},e.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Hy.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:zn(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${Hy.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:zn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${Hy.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:zn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:zn(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${Hy.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${Hy.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},[`& + .${g8.root}`]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},[`& + .${g8.inset}`]:{marginLeft:52},[`& .${w8.root}`]:{marginTop:0,marginBottom:0},[`& .${w8.inset}`]:{paddingLeft:36},[`& .${_8.root}`]:{minWidth:36}},!e.dense&&{[t.breakpoints.up("sm")]:{minHeight:"auto"}},e.dense&&Q({minHeight:32,paddingTop:4,paddingBottom:4},t.typography.body2,{[`& .${_8.root} svg`]:{fontSize:"1.25rem"}}))),ope=H.forwardRef(function(e,n){const r=an({props:e,name:"MuiMenuItem"}),{autoFocus:i=!1,component:o="li",dense:a=!1,divider:s=!1,disableGutters:l=!1,focusVisibleClassName:u,role:c="menuitem",tabIndex:f,className:d}=r,p=yt(r,tpe),y=H.useContext(Mp),x=H.useMemo(()=>({dense:a||y.dense||!1,disableGutters:l}),[y.dense,a,l]),_=H.useRef(null);_l(()=>{i&&_.current&&_.current.focus()},[i]);const v=Q({},r,{dense:x.dense,divider:s,disableGutters:l}),S=rpe(r),w=Jr(_,n);let E;return r.disabled||(E=f!==void 0?f:-1),F.jsx(Mp.Provider,{value:x,children:F.jsx(ipe,Q({ref:w,role:c,tabIndex:E,component:o,focusVisibleClassName:bt(S.focusVisible,u),className:bt(S.root,d)},p,{ownerState:v,classes:S}))})}),so=ope;function ape(t){return Qt("MuiNativeSelect",t)}const spe=Yt("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),GO=spe,lpe=["className","disabled","error","IconComponent","inputRef","variant"],upe=t=>{const{classes:e,variant:n,disabled:r,multiple:i,open:o,error:a}=t,s={select:["select",n,r&&"disabled",i&&"multiple",a&&"error"],icon:["icon",`icon${it(n)}`,o&&"iconOpen",r&&"disabled"]};return nn(s,ape,e)},VH=({ownerState:t,theme:e})=>Q({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":Q({},e.vars?{backgroundColor:`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:e.palette.mode==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${GO.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},t.variant==="filled"&&{"&&&":{paddingRight:32}},t.variant==="outlined"&&{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}),cpe=ut("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:Ro,overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.select,e[n.variant],n.error&&e.error,{[`&.${GO.multiple}`]:e.multiple}]}})(VH),WH=({ownerState:t,theme:e})=>Q({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${GO.disabled}`]:{color:(e.vars||e).palette.action.disabled}},t.open&&{transform:"rotate(180deg)"},t.variant==="filled"&&{right:7},t.variant==="outlined"&&{right:7}),fpe=ut("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.icon,n.variant&&e[`icon${it(n.variant)}`],n.open&&e.iconOpen]}})(WH),dpe=H.forwardRef(function(e,n){const{className:r,disabled:i,error:o,IconComponent:a,inputRef:s,variant:l="standard"}=e,u=yt(e,lpe),c=Q({},e,{disabled:i,variant:l,error:o}),f=upe(c);return F.jsxs(H.Fragment,{children:[F.jsx(cpe,Q({ownerState:c,className:bt(f.select,r),disabled:i,ref:s||n},u)),e.multiple?null:F.jsx(fpe,{as:a,ownerState:c,className:f.icon})]})}),hpe=dpe;var A8;const ppe=["children","classes","className","label","notched"],mpe=ut("fieldset",{shouldForwardProp:Ro})({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%"}),gpe=ut("legend",{shouldForwardProp:Ro})(({ownerState:t,theme:e})=>Q({float:"unset",width:"auto",overflow:"hidden"},!t.withLabel&&{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})},t.withLabel&&Q({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},t.notched&&{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})})));function vpe(t){const{className:e,label:n,notched:r}=t,i=yt(t,ppe),o=n!=null&&n!=="",a=Q({},t,{notched:r,withLabel:o});return F.jsx(mpe,Q({"aria-hidden":!0,className:e,ownerState:a},i,{children:F.jsx(gpe,{ownerState:a,children:o?F.jsx("span",{children:n}):A8||(A8=F.jsx("span",{className:"notranslate",children:"​"}))})}))}const ype=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],xpe=t=>{const{classes:e}=t,r=nn({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},Pue,e);return Q({},e,r)},bpe=ut(rC,{shouldForwardProp:t=>Ro(t)||t==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:tC})(({theme:t,ownerState:e})=>{const n=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return Q({position:"relative",borderRadius:(t.vars||t).shape.borderRadius,[`&:hover .${Ou.notchedOutline}`]:{borderColor:(t.vars||t).palette.text.primary},"@media (hover: none)":{[`&:hover .${Ou.notchedOutline}`]:{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${Ou.focused} .${Ou.notchedOutline}`]:{borderColor:(t.vars||t).palette[e.color].main,borderWidth:2},[`&.${Ou.error} .${Ou.notchedOutline}`]:{borderColor:(t.vars||t).palette.error.main},[`&.${Ou.disabled} .${Ou.notchedOutline}`]:{borderColor:(t.vars||t).palette.action.disabled}},e.startAdornment&&{paddingLeft:14},e.endAdornment&&{paddingRight:14},e.multiline&&Q({padding:"16.5px 14px"},e.size==="small"&&{padding:"8.5px 14px"}))}),_pe=ut(vpe,{name:"MuiOutlinedInput",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{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:e}}),wpe=ut(iC,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:nC})(({theme:t,ownerState:e})=>Q({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"}}},e.size==="small"&&{padding:"8.5px 14px"},e.multiline&&{padding:0},e.startAdornment&&{paddingLeft:0},e.endAdornment&&{paddingRight:0})),GH=H.forwardRef(function(e,n){var r,i,o,a,s;const l=an({props:e,name:"MuiOutlinedInput"}),{components:u={},fullWidth:c=!1,inputComponent:f="input",label:d,multiline:p=!1,notched:y,slots:x={},type:_="text"}=l,v=yt(l,ype),S=xpe(l),w=gf(),E=Qd({props:l,muiFormControl:w,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),T=Q({},l,{color:E.color||"primary",disabled:E.disabled,error:E.error,focused:E.focused,formControl:w,fullWidth:c,hiddenLabel:E.hiddenLabel,multiline:p,size:E.size,type:_}),C=(r=(i=x.root)!=null?i:u.Root)!=null?r:bpe,D=(o=(a=x.input)!=null?a:u.Input)!=null?o:wpe;return F.jsx(HO,Q({slots:{root:C,input:D},renderSuffix:O=>F.jsx(_pe,{ownerState:T,className:S.notchedOutline,label:d!=null&&d!==""&&E.required?s||(s=F.jsxs(H.Fragment,{children:[d," ","*"]})):d,notched:typeof y<"u"?y:!!(O.startAdornment||O.filled||O.focused)}),fullWidth:c,inputComponent:f,multiline:p,ref:n,type:_},v,{classes:Q({},S,{notchedOutline:null})}))});GH.muiName="Input";const jH=GH,Spe=hf(F.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"}),"RadioButtonUnchecked"),Epe=hf(F.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"}),"RadioButtonChecked"),Mpe=ut("span",{shouldForwardProp:Ro})({position:"relative",display:"flex"}),Cpe=ut(Spe)({transform:"scale(1)"}),Ape=ut(Epe)(({theme:t,ownerState:e})=>Q({left:0,position:"absolute",transform:"scale(0)",transition:t.transitions.create("transform",{easing:t.transitions.easing.easeIn,duration:t.transitions.duration.shortest})},e.checked&&{transform:"scale(1)",transition:t.transitions.create("transform",{easing:t.transitions.easing.easeOut,duration:t.transitions.duration.shortest})}));function qH(t){const{checked:e=!1,classes:n={},fontSize:r}=t,i=Q({},t,{checked:e});return F.jsxs(Mpe,{className:n.root,ownerState:i,children:[F.jsx(Cpe,{fontSize:r,className:n.background,ownerState:i}),F.jsx(Ape,{fontSize:r,className:n.dot,ownerState:i})]})}const Tpe=H.createContext(void 0),XH=Tpe;function Dpe(){return H.useContext(XH)}function Rpe(t){return Qt("MuiRadio",t)}const Ppe=Yt("MuiRadio",["root","checked","disabled","colorPrimary","colorSecondary","sizeSmall"]),T8=Ppe,Npe=["checked","checkedIcon","color","icon","name","onChange","size","className"],Ope=t=>{const{classes:e,color:n,size:r}=t,i={root:["root",`color${it(n)}`,r!=="medium"&&`size${it(r)}`]};return Q({},e,nn(i,Rpe,e))},Ipe=ut(CH,{shouldForwardProp:t=>Ro(t)||t==="classes",name:"MuiRadio",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.size!=="medium"&&e[`size${it(n.size)}`],e[`color${it(n.color)}`]]}})(({theme:t,ownerState:e})=>Q({color:(t.vars||t).palette.text.secondary},!e.disableRipple&&{"&:hover":{backgroundColor:t.vars?`rgba(${e.color==="default"?t.vars.palette.action.activeChannel:t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:zn(e.color==="default"?t.palette.action.active:t.palette[e.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},e.color!=="default"&&{[`&.${T8.checked}`]:{color:(t.vars||t).palette[e.color].main}},{[`&.${T8.disabled}`]:{color:(t.vars||t).palette.action.disabled}}));function Fpe(t,e){return typeof e=="object"&&e!==null?t===e:String(t)===String(e)}const D8=F.jsx(qH,{checked:!0}),R8=F.jsx(qH,{}),Lpe=H.forwardRef(function(e,n){var r,i;const o=an({props:e,name:"MuiRadio"}),{checked:a,checkedIcon:s=D8,color:l="primary",icon:u=R8,name:c,onChange:f,size:d="medium",className:p}=o,y=yt(o,Npe),x=Q({},o,{color:l,size:d}),_=Ope(x),v=Dpe();let S=a;const w=XE(f,v&&v.onChange);let E=c;return v&&(typeof S>"u"&&(S=Fpe(v.value,o.value)),typeof E>"u"&&(E=v.name)),F.jsx(Ipe,Q({type:"radio",icon:H.cloneElement(u,{fontSize:(r=R8.props.fontSize)!=null?r:d}),checkedIcon:H.cloneElement(s,{fontSize:(i=D8.props.fontSize)!=null?i:d}),ownerState:x,classes:_,name:E,checked:S,onChange:w,ref:n,className:bt(_.root,p)},y))}),Ng=Lpe,kpe=["actions","children","defaultValue","name","onChange","value"],Bpe=H.forwardRef(function(e,n){const{actions:r,children:i,defaultValue:o,name:a,onChange:s,value:l}=e,u=yt(e,kpe),c=H.useRef(null),[f,d]=Td({controlled:l,default:o,name:"RadioGroup"});H.useImperativeHandle(r,()=>({focus:()=>{let _=c.current.querySelector("input:not(:disabled):checked");_||(_=c.current.querySelector("input:not(:disabled)")),_&&_.focus()}}),[]);const p=Jr(n,c),y=vv(a),x=H.useMemo(()=>({name:y,onChange(_){d(_.target.value),s&&s(_,_.target.value)},value:f}),[y,s,d,f]);return F.jsx(XH.Provider,{value:x,children:F.jsx(OH,Q({role:"radiogroup",ref:p},u,{children:i}))})}),YH=Bpe;function Upe(t){return Qt("MuiSelect",t)}const zpe=Yt("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),Vy=zpe;var P8;const $pe=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],Hpe=ut("div",{name:"MuiSelect",slot:"Select",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`&.${Vy.select}`]:e.select},{[`&.${Vy.select}`]:e[n.variant]},{[`&.${Vy.error}`]:e.error},{[`&.${Vy.multiple}`]:e.multiple}]}})(VH,{[`&.${Vy.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),Vpe=ut("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.icon,n.variant&&e[`icon${it(n.variant)}`],n.open&&e.iconOpen]}})(WH),Wpe=ut("input",{shouldForwardProp:t=>iae(t)&&t!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(t,e)=>e.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function N8(t,e){return typeof e=="object"&&e!==null?t===e:String(t)===String(e)}function Gpe(t){return t==null||typeof t=="string"&&!t.trim()}const jpe=t=>{const{classes:e,variant:n,disabled:r,multiple:i,open:o,error:a}=t,s={select:["select",n,r&&"disabled",i&&"multiple",a&&"error"],icon:["icon",`icon${it(n)}`,o&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return nn(s,Upe,e)},qpe=H.forwardRef(function(e,n){var r;const{"aria-describedby":i,"aria-label":o,autoFocus:a,autoWidth:s,children:l,className:u,defaultOpen:c,defaultValue:f,disabled:d,displayEmpty:p,error:y=!1,IconComponent:x,inputRef:_,labelId:v,MenuProps:S={},multiple:w,name:E,onBlur:T,onChange:C,onClose:D,onFocus:O,onOpen:P,open:N,readOnly:k,renderValue:G,SelectDisplayProps:Z={},tabIndex:j,value:K,variant:Y="standard"}=e,$=yt(e,$pe),[W,U]=Td({controlled:K,default:f,name:"Select"}),[te,re]=Td({controlled:N,default:c,name:"Select"}),le=H.useRef(null),ce=H.useRef(null),[Ce,Re]=H.useState(null),{current:Ie}=H.useRef(N!=null),[He,tt]=H.useState(),Qe=Jr(n,_),ct=H.useCallback(je=>{ce.current=je,je&&Re(je)},[]),Xe=Ce==null?void 0:Ce.parentNode;H.useImperativeHandle(Qe,()=>({focus:()=>{ce.current.focus()},node:le.current,value:W}),[W]),H.useEffect(()=>{c&&te&&Ce&&!Ie&&(tt(s?null:Xe.clientWidth),ce.current.focus())},[Ce,s]),H.useEffect(()=>{a&&ce.current.focus()},[a]),H.useEffect(()=>{if(!v)return;const je=Yo(ce.current).getElementById(v);if(je){const Le=()=>{getSelection().isCollapsed&&ce.current.focus()};return je.addEventListener("click",Le),()=>{je.removeEventListener("click",Le)}}},[v]);const ue=(je,Le)=>{je?P&&P(Le):D&&D(Le),Ie||(tt(s?null:Xe.clientWidth),re(je))},De=je=>{je.button===0&&(je.preventDefault(),ce.current.focus(),ue(!0,je))},Ee=je=>{ue(!1,je)},X=H.Children.toArray(l),ne=je=>{const Le=X.find(_t=>_t.props.value===je.target.value);Le!==void 0&&(U(Le.props.value),C&&C(je,Le))},me=je=>Le=>{let _t;if(Le.currentTarget.hasAttribute("tabindex")){if(w){_t=Array.isArray(W)?W.slice():[];const xt=W.indexOf(je.props.value);xt===-1?_t.push(je.props.value):_t.splice(xt,1)}else _t=je.props.value;if(je.props.onClick&&je.props.onClick(Le),W!==_t&&(U(_t),C)){const xt=Le.nativeEvent||Le,wt=new xt.constructor(xt.type,xt);Object.defineProperty(wt,"target",{writable:!0,value:{value:_t,name:E}}),C(wt,je)}w||ue(!1,Le)}},we=je=>{k||[" ","ArrowUp","ArrowDown","Enter"].indexOf(je.key)!==-1&&(je.preventDefault(),ue(!0,je))},Ne=Ce!==null&&te,Ue=je=>{!Ne&&T&&(Object.defineProperty(je,"target",{writable:!0,value:{value:W,name:E}}),T(je))};delete $["aria-invalid"];let We,lt;const z=[];let B=!1;(t2({value:W})||p)&&(G?We=G(W):B=!0);const oe=X.map(je=>{if(!H.isValidElement(je))return null;let Le;if(w){if(!Array.isArray(W))throw new Error(Bd(2));Le=W.some(_t=>N8(_t,je.props.value)),Le&&B&&z.push(je.props.children)}else Le=N8(W,je.props.value),Le&&B&&(lt=je.props.children);return H.cloneElement(je,{"aria-selected":Le?"true":"false",onClick:me(je),onKeyUp:_t=>{_t.key===" "&&_t.preventDefault(),je.props.onKeyUp&&je.props.onKeyUp(_t)},role:"option",selected:Le,value:void 0,"data-value":je.props.value})});B&&(w?z.length===0?We=null:We=z.reduce((je,Le,_t)=>(je.push(Le),_t{const{classes:e}=t;return e},jO={name:"MuiSelect",overridesResolver:(t,e)=>e.root,shouldForwardProp:t=>Ro(t)&&t!=="variant",slot:"Root"},Jpe=ut(kH,jO)(""),Qpe=ut(jH,jO)(""),eme=ut(NH,jO)(""),KH=H.forwardRef(function(e,n){const r=an({name:"MuiSelect",props:e}),{autoWidth:i=!1,children:o,classes:a={},className:s,defaultOpen:l=!1,displayEmpty:u=!1,IconComponent:c=wH,id:f,input:d,inputProps:p,label:y,labelId:x,MenuProps:_,multiple:v=!1,native:S=!1,onClose:w,onOpen:E,open:T,renderValue:C,SelectDisplayProps:D,variant:O="outlined"}=r,P=yt(r,Ype),N=S?hpe:Xpe,k=gf(),G=Qd({props:r,muiFormControl:k,states:["variant","error"]}),Z=G.variant||O,j=Q({},r,{variant:Z,classes:a}),K=Zpe(j),Y=yt(K,Kpe),$=d||{standard:F.jsx(Jpe,{ownerState:j}),outlined:F.jsx(Qpe,{label:y,ownerState:j}),filled:F.jsx(eme,{ownerState:j})}[Z],W=Jr(n,$.ref);return F.jsx(H.Fragment,{children:H.cloneElement($,Q({inputComponent:N,inputProps:Q({children:o,error:G.error,IconComponent:c,variant:Z,type:void 0,multiple:v},S?{id:f}:{autoWidth:i,defaultOpen:l,displayEmpty:u,labelId:x,MenuProps:_,onClose:w,onOpen:E,open:T,renderValue:C,SelectDisplayProps:Q({id:f},D)},p,{classes:p?Xo(Y,p.classes):Y},d?d.props.inputProps:{})},v&&S&&Z==="outlined"?{notched:!0}:{},{ref:W,className:bt($.props.className,s,K.root)},!d&&{variant:Z},P))})});KH.muiName="Select";const ju=KH,tme=H.createContext(),ZH=tme;function nme(t){return Qt("MuiTable",t)}Yt("MuiTable",["root","stickyHeader"]);const rme=["className","component","padding","size","stickyHeader"],ime=t=>{const{classes:e,stickyHeader:n}=t;return nn({root:["root",n&&"stickyHeader"]},nme,e)},ome=ut("table",{name:"MuiTable",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.stickyHeader&&e.stickyHeader]}})(({theme:t,ownerState:e})=>Q({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":Q({},t.typography.body2,{padding:t.spacing(2),color:(t.vars||t).palette.text.secondary,textAlign:"left",captionSide:"bottom"})},e.stickyHeader&&{borderCollapse:"separate"})),O8="table",ame=H.forwardRef(function(e,n){const r=an({props:e,name:"MuiTable"}),{className:i,component:o=O8,padding:a="normal",size:s="medium",stickyHeader:l=!1}=r,u=yt(r,rme),c=Q({},r,{component:o,padding:a,size:s,stickyHeader:l}),f=ime(c),d=H.useMemo(()=>({padding:a,size:s,stickyHeader:l}),[a,s,l]);return F.jsx(ZH.Provider,{value:d,children:F.jsx(ome,Q({as:o,role:o===O8?null:"table",ref:n,className:bt(f.root,i),ownerState:c},u))})}),sme=ame,lme=H.createContext(),sC=lme;function ume(t){return Qt("MuiTableBody",t)}Yt("MuiTableBody",["root"]);const cme=["className","component"],fme=t=>{const{classes:e}=t;return nn({root:["root"]},ume,e)},dme=ut("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"table-row-group"}),hme={variant:"body"},I8="tbody",pme=H.forwardRef(function(e,n){const r=an({props:e,name:"MuiTableBody"}),{className:i,component:o=I8}=r,a=yt(r,cme),s=Q({},r,{component:o}),l=fme(s);return F.jsx(sC.Provider,{value:hme,children:F.jsx(dme,Q({className:bt(l.root,i),as:o,ref:n,role:o===I8?null:"rowgroup",ownerState:s},a))})}),mme=pme;function gme(t){return Qt("MuiTableCell",t)}const vme=Yt("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),yme=vme,xme=["align","className","component","padding","scope","size","sortDirection","variant"],bme=t=>{const{classes:e,variant:n,align:r,padding:i,size:o,stickyHeader:a}=t,s={root:["root",n,a&&"stickyHeader",r!=="inherit"&&`align${it(r)}`,i!=="normal"&&`padding${it(i)}`,`size${it(o)}`]};return nn(s,gme,e)},_me=ut("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`size${it(n.size)}`],n.padding!=="normal"&&e[`padding${it(n.padding)}`],n.align!=="inherit"&&e[`align${it(n.align)}`],n.stickyHeader&&e.stickyHeader]}})(({theme:t,ownerState:e})=>Q({},t.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:t.vars?`1px solid ${t.vars.palette.TableCell.border}`:`1px solid - ${t.palette.mode==="light"?oH(zn(t.palette.divider,1),.88):iH(zn(t.palette.divider,1),.68)}`,textAlign:"left",padding:16},e.variant==="head"&&{color:(t.vars||t).palette.text.primary,lineHeight:t.typography.pxToRem(24),fontWeight:t.typography.fontWeightMedium},e.variant==="body"&&{color:(t.vars||t).palette.text.primary},e.variant==="footer"&&{color:(t.vars||t).palette.text.secondary,lineHeight:t.typography.pxToRem(21),fontSize:t.typography.pxToRem(12)},e.size==="small"&&{padding:"6px 16px",[`&.${yme.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}},e.padding==="checkbox"&&{width:48,padding:"0 0 0 4px"},e.padding==="none"&&{padding:0},e.align==="left"&&{textAlign:"left"},e.align==="center"&&{textAlign:"center"},e.align==="right"&&{textAlign:"right",flexDirection:"row-reverse"},e.align==="justify"&&{textAlign:"justify"},e.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(t.vars||t).palette.background.default})),wme=H.forwardRef(function(e,n){const r=an({props:e,name:"MuiTableCell"}),{align:i="inherit",className:o,component:a,padding:s,scope:l,size:u,sortDirection:c,variant:f}=r,d=yt(r,xme),p=H.useContext(ZH),y=H.useContext(sC),x=y&&y.variant==="head";let _;a?_=a:_=x?"th":"td";let v=l;_==="td"?v=void 0:!v&&x&&(v="col");const S=f||y&&y.variant,w=Q({},r,{align:i,component:_,padding:s||(p&&p.padding?p.padding:"normal"),size:u||(p&&p.size?p.size:"medium"),sortDirection:c,stickyHeader:S==="head"&&p&&p.stickyHeader,variant:S}),E=bme(w);let T=null;return c&&(T=c==="asc"?"ascending":"descending"),F.jsx(_me,Q({as:_,ref:n,className:bt(E.root,o),"aria-sort":T,scope:v,ownerState:w},d))}),Ho=wme;function Sme(t){return Qt("MuiTableContainer",t)}Yt("MuiTableContainer",["root"]);const Eme=["className","component"],Mme=t=>{const{classes:e}=t;return nn({root:["root"]},Sme,e)},Cme=ut("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(t,e)=>e.root})({width:"100%",overflowX:"auto"}),Ame=H.forwardRef(function(e,n){const r=an({props:e,name:"MuiTableContainer"}),{className:i,component:o="div"}=r,a=yt(r,Eme),s=Q({},r,{component:o}),l=Mme(s);return F.jsx(Cme,Q({ref:n,as:o,className:bt(l.root,i),ownerState:s},a))}),Tme=Ame;function Dme(t){return Qt("MuiTableHead",t)}Yt("MuiTableHead",["root"]);const Rme=["className","component"],Pme=t=>{const{classes:e}=t;return nn({root:["root"]},Dme,e)},Nme=ut("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"table-header-group"}),Ome={variant:"head"},F8="thead",Ime=H.forwardRef(function(e,n){const r=an({props:e,name:"MuiTableHead"}),{className:i,component:o=F8}=r,a=yt(r,Rme),s=Q({},r,{component:o}),l=Pme(s);return F.jsx(sC.Provider,{value:Ome,children:F.jsx(Nme,Q({as:o,className:bt(l.root,i),ref:n,role:o===F8?null:"rowgroup",ownerState:s},a))})}),Fme=Ime;function Lme(t){return Qt("MuiToolbar",t)}Yt("MuiToolbar",["root","gutters","regular","dense"]);const kme=["className","component","disableGutters","variant"],Bme=t=>{const{classes:e,disableGutters:n,variant:r}=t;return nn({root:["root",!n&&"gutters",r]},Lme,e)},Ume=ut("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disableGutters&&e.gutters,e[n.variant]]}})(({theme:t,ownerState:e})=>Q({position:"relative",display:"flex",alignItems:"center"},!e.disableGutters&&{paddingLeft:t.spacing(2),paddingRight:t.spacing(2),[t.breakpoints.up("sm")]:{paddingLeft:t.spacing(3),paddingRight:t.spacing(3)}},e.variant==="dense"&&{minHeight:48}),({theme:t,ownerState:e})=>e.variant==="regular"&&t.mixins.toolbar),zme=H.forwardRef(function(e,n){const r=an({props:e,name:"MuiToolbar"}),{className:i,component:o="div",disableGutters:a=!1,variant:s="regular"}=r,l=yt(r,kme),u=Q({},r,{component:o,disableGutters:a,variant:s}),c=Bme(u);return F.jsx(Ume,Q({as:o,className:bt(c.root,i),ref:n,ownerState:u},l))}),$me=zme;function Hme(t){return Qt("MuiTableRow",t)}const Vme=Yt("MuiTableRow",["root","selected","hover","head","footer"]),L8=Vme,Wme=["className","component","hover","selected"],Gme=t=>{const{classes:e,selected:n,hover:r,head:i,footer:o}=t;return nn({root:["root",n&&"selected",r&&"hover",i&&"head",o&&"footer"]},Hme,e)},jme=ut("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.head&&e.head,n.footer&&e.footer]}})(({theme:t})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${L8.hover}:hover`]:{backgroundColor:(t.vars||t).palette.action.hover},[`&.${L8.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:zn(t.palette.primary.main,t.palette.action.selectedOpacity),"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:zn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity)}}})),k8="tr",qme=H.forwardRef(function(e,n){const r=an({props:e,name:"MuiTableRow"}),{className:i,component:o=k8,hover:a=!1,selected:s=!1}=r,l=yt(r,Wme),u=H.useContext(sC),c=Q({},r,{component:o,hover:a,selected:s,head:u&&u.variant==="head",footer:u&&u.variant==="footer"}),f=Gme(c);return F.jsx(jme,Q({as:o,ref:n,className:bt(f.root,i),role:o===k8?null:"row",ownerState:c},l))}),Nw=qme;function Xme(t){return Qt("MuiTextField",t)}Yt("MuiTextField",["root"]);const Yme=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],Kme={standard:kH,filled:NH,outlined:jH},Zme=t=>{const{classes:e}=t;return nn({root:["root"]},Xme,e)},Jme=ut(yl,{name:"MuiTextField",slot:"Root",overridesResolver:(t,e)=>e.root})({}),Qme=H.forwardRef(function(e,n){const r=an({props:e,name:"MuiTextField"}),{autoComplete:i,autoFocus:o=!1,children:a,className:s,color:l="primary",defaultValue:u,disabled:c=!1,error:f=!1,FormHelperTextProps:d,fullWidth:p=!1,helperText:y,id:x,InputLabelProps:_,inputProps:v,InputProps:S,inputRef:w,label:E,maxRows:T,minRows:C,multiline:D=!1,name:O,onBlur:P,onChange:N,onFocus:k,placeholder:G,required:Z=!1,rows:j,select:K=!1,SelectProps:Y,type:$,value:W,variant:U="outlined"}=r,te=yt(r,Yme),re=Q({},r,{autoFocus:o,color:l,disabled:c,error:f,fullWidth:p,multiline:D,required:Z,select:K,variant:U}),le=Zme(re),ce={};U==="outlined"&&(_&&typeof _.shrink<"u"&&(ce.notched=_.shrink),ce.label=E),K&&((!Y||!Y.native)&&(ce.id=void 0),ce["aria-describedby"]=void 0);const Ce=vv(x),Re=y&&Ce?`${Ce}-helper-text`:void 0,Ie=E&&Ce?`${Ce}-label`:void 0,He=Kme[U],tt=F.jsx(He,Q({"aria-describedby":Re,autoComplete:i,autoFocus:o,defaultValue:u,fullWidth:p,multiline:D,name:O,rows:j,maxRows:T,minRows:C,type:$,value:W,id:Ce,inputRef:w,onBlur:P,onChange:N,onFocus:k,placeholder:G,inputProps:v},ce,S));return F.jsxs(Jme,Q({className:bt(le.root,s),disabled:c,error:f,fullWidth:p,ref:n,required:Z,color:l,variant:U,ownerState:re},te,{children:[E!=null&&E!==""&&F.jsx(Gu,Q({htmlFor:Ce,id:Ie},_,{children:E})),K?F.jsx(ju,Q({"aria-describedby":Re,id:Ce,labelId:Ie,value:W,input:tt},Y,{children:a})):tt,y&&F.jsx(Cde,Q({id:Re},d,{children:y}))]}))}),Eo=Qme;var JH={epsilon:1e-12,matrix:"Matrix",number:"number",precision:64,predictable:!1,randomSeed:null};function Br(t){return typeof t=="number"}function co(t){return!t||typeof t!="object"||typeof t.constructor!="function"?!1:t.isBigNumber===!0&&typeof t.constructor.prototype=="object"&&t.constructor.prototype.isBigNumber===!0||typeof t.constructor.isDecimal=="function"&&t.constructor.isDecimal(t)===!0}function H1(t){return t&&typeof t=="object"&&Object.getPrototypeOf(t).isComplex===!0||!1}function QH(t){return t&&typeof t=="object"&&Object.getPrototypeOf(t).isFraction===!0||!1}function ud(t){return t&&t.constructor.prototype.isUnit===!0||!1}function Lu(t){return typeof t=="string"}var jr=Array.isArray;function di(t){return t&&t.constructor.prototype.isMatrix===!0||!1}function Dx(t){return Array.isArray(t)||di(t)}function e0e(t){return t&&t.isDenseMatrix&&t.constructor.prototype.isMatrix===!0||!1}function t0e(t){return t&&t.isSparseMatrix&&t.constructor.prototype.isMatrix===!0||!1}function n0e(t){return t&&t.constructor.prototype.isRange===!0||!1}function qO(t){return t&&t.constructor.prototype.isIndex===!0||!1}function r0e(t){return typeof t=="boolean"}function i0e(t){return t&&t.constructor.prototype.isResultSet===!0||!1}function o0e(t){return t&&t.constructor.prototype.isHelp===!0||!1}function a0e(t){return typeof t=="function"}function s0e(t){return t instanceof Date}function l0e(t){return t instanceof RegExp}function eV(t){return!!(t&&typeof t=="object"&&t.constructor===Object&&!H1(t)&&!QH(t))}function u0e(t){return t===null}function c0e(t){return t===void 0}function f0e(t){return t&&t.isAccessorNode===!0&&t.constructor.prototype.isNode===!0||!1}function d0e(t){return t&&t.isArrayNode===!0&&t.constructor.prototype.isNode===!0||!1}function h0e(t){return t&&t.isAssignmentNode===!0&&t.constructor.prototype.isNode===!0||!1}function p0e(t){return t&&t.isBlockNode===!0&&t.constructor.prototype.isNode===!0||!1}function m0e(t){return t&&t.isConditionalNode===!0&&t.constructor.prototype.isNode===!0||!1}function g0e(t){return t&&t.isConstantNode===!0&&t.constructor.prototype.isNode===!0||!1}function v0e(t){return t&&t.isFunctionAssignmentNode===!0&&t.constructor.prototype.isNode===!0||!1}function y0e(t){return t&&t.isFunctionNode===!0&&t.constructor.prototype.isNode===!0||!1}function x0e(t){return t&&t.isIndexNode===!0&&t.constructor.prototype.isNode===!0||!1}function b0e(t){return t&&t.isNode===!0&&t.constructor.prototype.isNode===!0||!1}function _0e(t){return t&&t.isObjectNode===!0&&t.constructor.prototype.isNode===!0||!1}function w0e(t){return t&&t.isOperatorNode===!0&&t.constructor.prototype.isNode===!0||!1}function S0e(t){return t&&t.isParenthesisNode===!0&&t.constructor.prototype.isNode===!0||!1}function E0e(t){return t&&t.isRangeNode===!0&&t.constructor.prototype.isNode===!0||!1}function M0e(t){return t&&t.isRelationalNode===!0&&t.constructor.prototype.isNode===!0||!1}function C0e(t){return t&&t.isSymbolNode===!0&&t.constructor.prototype.isNode===!0||!1}function A0e(t){return t&&t.constructor.prototype.isChain===!0||!1}function ml(t){var e=typeof t;return e==="object"?t===null?"null":co(t)?"BigNumber":t.constructor&&t.constructor.name?t.constructor.name:"Object":e}function Lr(t){var e=typeof t;if(e==="number"||e==="string"||e==="boolean"||t===null||t===void 0)return t;if(typeof t.clone=="function")return t.clone();if(Array.isArray(t))return t.map(function(n){return Lr(n)});if(t instanceof Date)return new Date(t.valueOf());if(co(t))return t;if(eV(t))return T0e(t,Lr);throw new TypeError("Cannot clone: unknown type of value (value: ".concat(t,")"))}function T0e(t,e){var n={};for(var r in t)dr(t,r)&&(n[r]=e(t[r]));return n}function tV(t,e){for(var n in e)dr(e,n)&&(t[n]=e[n]);return t}function nv(t,e){var n,r,i;if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(r=0,i=t.length;rt.transitions.easing.easeInOut,ul.ripplePulsate,({theme:t})=>t.transitions.duration.shorter,ul.child,ul.childLeaving,Bae,MR,({theme:t})=>t.transitions.easing.easeInOut,ul.childPulsate,Uae,({theme:t})=>t.transitions.easing.easeInOut),Hae=H.forwardRef(function(e,n){const r=nn({props:e,name:"MuiTouchRipple"}),{center:i=!1,classes:o={},className:a}=r,s=vt(r,Fae),[l,u]=H.useState([]),c=H.useRef(0),f=H.useRef(null);H.useEffect(()=>{f.current&&(f.current(),f.current=null)},[l]);const d=H.useRef(!1),p=H.useRef(0),y=H.useRef(null),x=H.useRef(null);H.useEffect(()=>()=>{p.current&&clearTimeout(p.current)},[]);const _=H.useCallback(E=>{const{pulsate:T,rippleX:C,rippleY:D,rippleSize:O,cb:P}=E;u(N=>[...N,F.jsx($ae,{classes:{ripple:xt(o.ripple,ul.ripple),rippleVisible:xt(o.rippleVisible,ul.rippleVisible),ripplePulsate:xt(o.ripplePulsate,ul.ripplePulsate),child:xt(o.child,ul.child),childLeaving:xt(o.childLeaving,ul.childLeaving),childPulsate:xt(o.childPulsate,ul.childPulsate)},timeout:MR,pulsate:T,rippleX:C,rippleY:D,rippleSize:O},c.current)]),c.current+=1,f.current=P},[o]),v=H.useCallback((E={},T={},C=()=>{})=>{const{pulsate:D=!1,center:O=i||T.pulsate,fakeElement:P=!1}=T;if((E==null?void 0:E.type)==="mousedown"&&d.current){d.current=!1;return}(E==null?void 0:E.type)==="touchstart"&&(d.current=!0);const N=P?null:x.current,k=N?N.getBoundingClientRect():{width:0,height:0,left:0,top:0};let G,Z,j;if(O||E===void 0||E.clientX===0&&E.clientY===0||!E.clientX&&!E.touches)G=Math.round(k.width/2),Z=Math.round(k.height/2);else{const{clientX:K,clientY:Y}=E.touches&&E.touches.length>0?E.touches[0]:E;G=Math.round(K-k.left),Z=Math.round(Y-k.top)}if(O)j=Math.sqrt((2*k.width**2+k.height**2)/3),j%2===0&&(j+=1);else{const K=Math.max(Math.abs((N?N.clientWidth:0)-G),G)*2+2,Y=Math.max(Math.abs((N?N.clientHeight:0)-Z),Z)*2+2;j=Math.sqrt(K**2+Y**2)}E!=null&&E.touches?y.current===null&&(y.current=()=>{_({pulsate:D,rippleX:G,rippleY:Z,rippleSize:j,cb:C})},p.current=setTimeout(()=>{y.current&&(y.current(),y.current=null)},Lae)):_({pulsate:D,rippleX:G,rippleY:Z,rippleSize:j,cb:C})},[i,_]),S=H.useCallback(()=>{v({},{pulsate:!0})},[v]),w=H.useCallback((E,T)=>{if(clearTimeout(p.current),(E==null?void 0:E.type)==="touchend"&&y.current){y.current(),y.current=null,p.current=setTimeout(()=>{w(E,T)});return}y.current=null,u(C=>C.length>0?C.slice(1):C),f.current=T},[]);return H.useImperativeHandle(n,()=>({pulsate:S,start:v,stop:w}),[S,v,w]),F.jsx(zae,Q({className:xt(ul.root,o.root,a),ref:x},s,{children:F.jsx(Aae,{component:null,exit:!0,children:l})}))}),Vae=Hae;function Wae(t){return Zt("MuiButtonBase",t)}const Gae=Yt("MuiButtonBase",["root","disabled","focusVisible"]),jae=Gae,qae=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],Xae=t=>{const{disabled:e,focusVisible:n,focusVisibleClassName:r,classes:i}=t,a=en({root:["root",e&&"disabled",n&&"focusVisible"]},Wae,i);return n&&r&&(a.root+=` ${r}`),a},Yae=ut("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(t,e)=>e.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"},[`&.${jae.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Kae=H.forwardRef(function(e,n){const r=nn({props:e,name:"MuiButtonBase"}),{action:i,centerRipple:o=!1,children:a,className:s,component:l="button",disabled:u=!1,disableRipple:c=!1,disableTouchRipple:f=!1,focusRipple:d=!1,LinkComponent:p="a",onBlur:y,onClick:x,onContextMenu:_,onDragLeave:v,onFocus:S,onFocusVisible:w,onKeyDown:E,onKeyUp:T,onMouseDown:C,onMouseLeave:D,onMouseUp:O,onTouchEnd:P,onTouchMove:N,onTouchStart:k,tabIndex:G=0,TouchRippleProps:Z,touchRippleRef:j,type:K}=r,Y=vt(r,qae),$=H.useRef(null),W=H.useRef(null),U=Jr(W,j),{isFocusVisibleRef:te,onFocus:re,onBlur:le,ref:ce}=P7(),[Ce,Re]=H.useState(!1);u&&Ce&&Re(!1),H.useImperativeHandle(i,()=>({focusVisible:()=>{Re(!0),$.current.focus()}}),[]);const[Ie,He]=H.useState(!1);H.useEffect(()=>{He(!0)},[]);const tt=Ie&&!c&&!u;H.useEffect(()=>{Ce&&d&&!c&&Ie&&W.current.pulsate()},[c,d,Ce,Ie]);function Qe(ve,Se,Pe=f){return Zl(Be=>(Se&&Se(Be),!Pe&&W.current&&W.current[ve](Be),!0))}const ct=Qe("start",C),Xe=Qe("stop",_),ue=Qe("stop",v),De=Qe("stop",O),Ee=Qe("stop",ve=>{Ce&&ve.preventDefault(),D&&D(ve)}),X=Qe("start",k),ne=Qe("stop",P),me=Qe("stop",N),we=Qe("stop",ve=>{le(ve),te.current===!1&&Re(!1),y&&y(ve)},!1),Ne=Zl(ve=>{$.current||($.current=ve.currentTarget),re(ve),te.current===!0&&(Re(!0),w&&w(ve)),S&&S(ve)}),Ue=()=>{const ve=$.current;return l&&l!=="button"&&!(ve.tagName==="A"&&ve.href)},We=H.useRef(!1),lt=Zl(ve=>{d&&!We.current&&Ce&&W.current&&ve.key===" "&&(We.current=!0,W.current.stop(ve,()=>{W.current.start(ve)})),ve.target===ve.currentTarget&&Ue()&&ve.key===" "&&ve.preventDefault(),E&&E(ve),ve.target===ve.currentTarget&&Ue()&&ve.key==="Enter"&&!u&&(ve.preventDefault(),x&&x(ve))}),z=Zl(ve=>{d&&ve.key===" "&&W.current&&Ce&&!ve.defaultPrevented&&(We.current=!1,W.current.stop(ve,()=>{W.current.pulsate(ve)})),T&&T(ve),x&&ve.target===ve.currentTarget&&Ue()&&ve.key===" "&&!ve.defaultPrevented&&x(ve)});let B=l;B==="button"&&(Y.href||Y.to)&&(B=p);const oe={};B==="button"?(oe.type=K===void 0?"button":K,oe.disabled=u):(!Y.href&&!Y.to&&(oe.role="button"),u&&(oe["aria-disabled"]=u));const ge=Jr(n,ce,$),pe=Q({},r,{centerRipple:o,component:l,disabled:u,disableRipple:c,disableTouchRipple:f,focusRipple:d,tabIndex:G,focusVisible:Ce}),de=Xae(pe);return F.jsxs(Yae,Q({as:B,className:xt(de.root,s),ownerState:pe,onBlur:we,onClick:x,onContextMenu:Xe,onFocus:Ne,onKeyDown:lt,onKeyUp:z,onMouseDown:ct,onMouseLeave:Ee,onMouseUp:De,onDragLeave:ue,onTouchEnd:ne,onTouchMove:me,onTouchStart:X,ref:ge,tabIndex:u?-1:G,type:K},oe,Y,{children:[a,tt?F.jsx(Vae,Q({ref:U,center:o},Z)):null]}))}),$p=Kae;function Zae(t){return Zt("MuiIconButton",t)}const Jae=Yt("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),Qae=Jae,ese=["edge","children","className","color","disabled","disableFocusRipple","size"],tse=t=>{const{classes:e,disabled:n,color:r,edge:i,size:o}=t,a={root:["root",n&&"disabled",r!=="default"&&`color${rt(r)}`,i&&`edge${rt(i)}`,`size${rt(o)}`]};return en(a,Zae,e)},nse=ut($p,{name:"MuiIconButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.color!=="default"&&e[`color${rt(n.color)}`],n.edge&&e[`edge${rt(n.edge)}`],e[`size${rt(n.size)}`]]}})(({theme:t,ownerState:e})=>Q({textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(t.vars||t).palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest})},!e.disableRipple&&{"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:Un(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},e.edge==="start"&&{marginLeft:e.size==="small"?-3:-12},e.edge==="end"&&{marginRight:e.size==="small"?-3:-12}),({theme:t,ownerState:e})=>{var n;const r=(n=(t.vars||t).palette)==null?void 0:n[e.color];return Q({},e.color==="inherit"&&{color:"inherit"},e.color!=="inherit"&&e.color!=="default"&&Q({color:r==null?void 0:r.main},!e.disableRipple&&{"&:hover":Q({},r&&{backgroundColor:t.vars?`rgba(${r.mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Un(r.main,t.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),e.size==="small"&&{padding:5,fontSize:t.typography.pxToRem(18)},e.size==="large"&&{padding:12,fontSize:t.typography.pxToRem(28)},{[`&.${Qae.disabled}`]:{backgroundColor:"transparent",color:(t.vars||t).palette.action.disabled}})}),rse=H.forwardRef(function(e,n){const r=nn({props:e,name:"MuiIconButton"}),{edge:i=!1,children:o,className:a,color:s="default",disabled:l=!1,disableFocusRipple:u=!1,size:c="medium"}=r,f=vt(r,ese),d=Q({},r,{edge:i,color:s,disabled:l,disableFocusRipple:u,size:c}),p=tse(d);return F.jsx(nse,Q({className:xt(p.root,a),centerRipple:!0,focusRipple:!u,disabled:l,ref:n,ownerState:d},f,{children:o}))}),QM=rse,ise=pf(F.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"}),"Close");function ose(t){return Zt("MuiTypography",t)}Yt("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const ase=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],sse=t=>{const{align:e,gutterBottom:n,noWrap:r,paragraph:i,variant:o,classes:a}=t,s={root:["root",o,t.align!=="inherit"&&`align${rt(e)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return en(s,ose,a)},lse=ut("span",{name:"MuiTypography",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.variant&&e[n.variant],n.align!=="inherit"&&e[`align${rt(n.align)}`],n.noWrap&&e.noWrap,n.gutterBottom&&e.gutterBottom,n.paragraph&&e.paragraph]}})(({theme:t,ownerState:e})=>Q({margin:0},e.variant==="inherit"&&{font:"inherit"},e.variant!=="inherit"&&t.typography[e.variant],e.align!=="inherit"&&{textAlign:e.align},e.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},e.gutterBottom&&{marginBottom:"0.35em"},e.paragraph&&{marginBottom:16})),ZL={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},use={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},cse=t=>use[t]||t,fse=H.forwardRef(function(e,n){const r=nn({props:e,name:"MuiTypography"}),i=cse(r.color),o=YM(Q({},r,{color:i})),{align:a="inherit",className:s,component:l,gutterBottom:u=!1,noWrap:c=!1,paragraph:f=!1,variant:d="body1",variantMapping:p=ZL}=o,y=vt(o,ase),x=Q({},o,{align:a,color:i,className:s,component:l,gutterBottom:u,noWrap:c,paragraph:f,variant:d,variantMapping:p}),_=l||(f?"p":p[d]||ZL[d])||"span",v=sse(x);return F.jsx(lse,Q({as:_,ref:n,ownerState:x,className:xt(v.root,s)},y))}),Wn=fse;function dse(t){return Zt("MuiAppBar",t)}Yt("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const hse=["className","color","enableColorOnDark","position"],pse=t=>{const{color:e,position:n,classes:r}=t,i={root:["root",`color${rt(e)}`,`position${rt(n)}`]};return en(i,dse,r)},Aw=(t,e)=>t?`${t==null?void 0:t.replace(")","")}, ${e})`:e,mse=ut(gf,{name:"MuiAppBar",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`position${rt(n.position)}`],e[`color${rt(n.color)}`]]}})(({theme:t,ownerState:e})=>{const n=t.palette.mode==="light"?t.palette.grey[100]:t.palette.grey[900];return Q({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},e.position==="fixed"&&{position:"fixed",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},e.position==="absolute"&&{position:"absolute",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0},e.position==="sticky"&&{position:"sticky",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0},e.position==="static"&&{position:"static"},e.position==="relative"&&{position:"relative"},!t.vars&&Q({},e.color==="default"&&{backgroundColor:n,color:t.palette.getContrastText(n)},e.color&&e.color!=="default"&&e.color!=="inherit"&&e.color!=="transparent"&&{backgroundColor:t.palette[e.color].main,color:t.palette[e.color].contrastText},e.color==="inherit"&&{color:"inherit"},t.palette.mode==="dark"&&!e.enableColorOnDark&&{backgroundColor:null,color:null},e.color==="transparent"&&Q({backgroundColor:"transparent",color:"inherit"},t.palette.mode==="dark"&&{backgroundImage:"none"})),t.vars&&Q({},e.color==="default"&&{"--AppBar-background":e.enableColorOnDark?t.vars.palette.AppBar.defaultBg:Aw(t.vars.palette.AppBar.darkBg,t.vars.palette.AppBar.defaultBg),"--AppBar-color":e.enableColorOnDark?t.vars.palette.text.primary:Aw(t.vars.palette.AppBar.darkColor,t.vars.palette.text.primary)},e.color&&!e.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":e.enableColorOnDark?t.vars.palette[e.color].main:Aw(t.vars.palette.AppBar.darkBg,t.vars.palette[e.color].main),"--AppBar-color":e.enableColorOnDark?t.vars.palette[e.color].contrastText:Aw(t.vars.palette.AppBar.darkColor,t.vars.palette[e.color].contrastText)},{backgroundColor:"var(--AppBar-background)",color:e.color==="inherit"?"inherit":"var(--AppBar-color)"},e.color==="transparent"&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))}),gse=H.forwardRef(function(e,n){const r=nn({props:e,name:"MuiAppBar"}),{className:i,color:o="primary",enableColorOnDark:a=!1,position:s="fixed"}=r,l=vt(r,hse),u=Q({},r,{color:o,position:s,enableColorOnDark:a}),c=pse(u);return F.jsx(mse,Q({square:!0,component:"header",ownerState:u,elevation:4,className:xt(c.root,i,s==="fixed"&&"mui-fixed"),ref:n},l))}),vse=gse;function Qg(t){return typeof t=="string"}function yse(t,e,n){return t===void 0||Qg(t)?e:Q({},e,{ownerState:Q({},e.ownerState,n)})}const xse={disableDefaultClasses:!1},bse=H.createContext(xse);function _se(t){const{disableDefaultClasses:e}=H.useContext(bse);return n=>e?"":t(n)}function dH(t,e=[]){if(t===void 0)return{};const n={};return Object.keys(t).filter(r=>r.match(/^on[A-Z]/)&&typeof t[r]=="function"&&!e.includes(r)).forEach(r=>{n[r]=t[r]}),n}function wse(t,e,n){return typeof t=="function"?t(e,n):t}function JL(t){if(t===void 0)return{};const e={};return Object.keys(t).filter(n=>!(n.match(/^on[A-Z]/)&&typeof t[n]=="function")).forEach(n=>{e[n]=t[n]}),e}function Sse(t){const{getSlotProps:e,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=t;if(!e){const p=xt(n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),y=Q({},n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),x=Q({},n,i,r);return p.length>0&&(x.className=p),Object.keys(y).length>0&&(x.style=y),{props:x,internalRef:void 0}}const a=dH(Q({},i,r)),s=JL(r),l=JL(i),u=e(a),c=xt(u==null?void 0:u.className,n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),f=Q({},u==null?void 0:u.style,n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),d=Q({},u,n,l,s);return c.length>0&&(d.className=c),Object.keys(f).length>0&&(d.style=f),{props:d,internalRef:u.ref}}const Ese=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function Hp(t){var e;const{elementType:n,externalSlotProps:r,ownerState:i,skipResolvingSlotProps:o=!1}=t,a=vt(t,Ese),s=o?{}:wse(r,i),{props:l,internalRef:u}=Sse(Q({},a,{externalSlotProps:s})),c=Jr(u,s==null?void 0:s.ref,(e=t.additionalProps)==null?void 0:e.ref);return yse(n,Q({},l,{ref:c}),i)}const Mse=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function Cse(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 Ase(t){if(t.tagName!=="INPUT"||t.type!=="radio"||!t.name)return!1;const e=r=>t.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=e(`[name="${t.name}"]:checked`);return n||(n=e(`[name="${t.name}"]`)),n!==t}function Tse(t){return!(t.disabled||t.tagName==="INPUT"&&t.type==="hidden"||Ase(t))}function Dse(t){const e=[],n=[];return Array.from(t.querySelectorAll(Mse)).forEach((r,i)=>{const o=Cse(r);o===-1||!Tse(r)||(o===0?e.push(r):n.push({documentOrder:i,tabIndex:o,node:r}))}),n.sort((r,i)=>r.tabIndex===i.tabIndex?r.documentOrder-i.documentOrder:r.tabIndex-i.tabIndex).map(r=>r.node).concat(e)}function Rse(){return!0}function Pse(t){const{children:e,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:o=Dse,isEnabled:a=Rse,open:s}=t,l=H.useRef(!1),u=H.useRef(null),c=H.useRef(null),f=H.useRef(null),d=H.useRef(null),p=H.useRef(!1),y=H.useRef(null),x=Jr(e.ref,y),_=H.useRef(null);H.useEffect(()=>{!s||!y.current||(p.current=!n)},[n,s]),H.useEffect(()=>{if(!s||!y.current)return;const w=Yo(y.current);return y.current.contains(w.activeElement)||(y.current.hasAttribute("tabIndex")||y.current.setAttribute("tabIndex","-1"),p.current&&y.current.focus()),()=>{i||(f.current&&f.current.focus&&(l.current=!0,f.current.focus()),f.current=null)}},[s]),H.useEffect(()=>{if(!s||!y.current)return;const w=Yo(y.current),E=D=>{_.current=D,!(r||!a()||D.key!=="Tab")&&w.activeElement===y.current&&D.shiftKey&&(l.current=!0,c.current&&c.current.focus())},T=()=>{const D=y.current;if(D===null)return;if(!w.hasFocus()||!a()||l.current){l.current=!1;return}if(D.contains(w.activeElement)||r&&w.activeElement!==u.current&&w.activeElement!==c.current)return;if(w.activeElement!==d.current)d.current=null;else if(d.current!==null)return;if(!p.current)return;let O=[];if((w.activeElement===u.current||w.activeElement===c.current)&&(O=o(y.current)),O.length>0){var P,N;const k=!!((P=_.current)!=null&&P.shiftKey&&((N=_.current)==null?void 0:N.key)==="Tab"),G=O[0],Z=O[O.length-1];typeof G!="string"&&typeof Z!="string"&&(k?Z.focus():G.focus())}else D.focus()};w.addEventListener("focusin",T),w.addEventListener("keydown",E,!0);const C=setInterval(()=>{w.activeElement&&w.activeElement.tagName==="BODY"&&T()},50);return()=>{clearInterval(C),w.removeEventListener("focusin",T),w.removeEventListener("keydown",E,!0)}},[n,r,i,a,s,o]);const v=w=>{f.current===null&&(f.current=w.relatedTarget),p.current=!0,d.current=w.target;const E=e.props.onFocus;E&&E(w)},S=w=>{f.current===null&&(f.current=w.relatedTarget),p.current=!0};return F.jsxs(H.Fragment,{children:[F.jsx("div",{tabIndex:s?0:-1,onFocus:S,ref:u,"data-testid":"sentinelStart"}),H.cloneElement(e,{ref:x,onFocus:v}),F.jsx("div",{tabIndex:s?0:-1,onFocus:S,ref:c,"data-testid":"sentinelEnd"})]})}var ja="top",wl="bottom",Sl="right",qa="left",LO="auto",_b=[ja,wl,Sl,qa],ev="start",Ax="end",Nse="clippingParents",hH="viewport",Hy="popper",Ose="reference",QL=_b.reduce(function(t,e){return t.concat([e+"-"+ev,e+"-"+Ax])},[]),pH=[].concat(_b,[LO]).reduce(function(t,e){return t.concat([e,e+"-"+ev,e+"-"+Ax])},[]),Ise="beforeRead",Fse="read",Lse="afterRead",kse="beforeMain",Bse="main",Use="afterMain",zse="beforeWrite",$se="write",Hse="afterWrite",Vse=[Ise,Fse,Lse,kse,Bse,Use,zse,$se,Hse];function Ju(t){return t?(t.nodeName||"").toLowerCase():null}function Us(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Vp(t){var e=Us(t).Element;return t instanceof e||t instanceof Element}function vl(t){var e=Us(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function kO(t){if(typeof ShadowRoot>"u")return!1;var e=Us(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function Wse(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},i=e.attributes[n]||{},o=e.elements[n];!vl(o)||!Ju(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function Gse(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(r){var i=e.elements[r],o=e.attributes[r]||{},a=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),s=a.reduce(function(l,u){return l[u]="",l},{});!vl(i)||!Ju(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const jse={name:"applyStyles",enabled:!0,phase:"write",fn:Wse,effect:Gse,requires:["computeStyles"]};function Vu(t){return t.split("-")[0]}var Mp=Math.max,e2=Math.min,tv=Math.round;function CR(){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 mH(){return!/^((?!chrome|android).)*safari/i.test(CR())}function nv(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var r=t.getBoundingClientRect(),i=1,o=1;e&&vl(t)&&(i=t.offsetWidth>0&&tv(r.width)/t.offsetWidth||1,o=t.offsetHeight>0&&tv(r.height)/t.offsetHeight||1);var a=Vp(t)?Us(t):window,s=a.visualViewport,l=!mH()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/i,c=(r.top+(l&&s?s.offsetTop:0))/o,f=r.width/i,d=r.height/o;return{width:f,height:d,top:c,right:u+f,bottom:c+d,left:u,x:u,y:c}}function BO(t){var e=nv(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function gH(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&kO(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function af(t){return Us(t).getComputedStyle(t)}function qse(t){return["table","td","th"].indexOf(Ju(t))>=0}function Qd(t){return((Vp(t)?t.ownerDocument:t.document)||window.document).documentElement}function eC(t){return Ju(t)==="html"?t:t.assignedSlot||t.parentNode||(kO(t)?t.host:null)||Qd(t)}function e8(t){return!vl(t)||af(t).position==="fixed"?null:t.offsetParent}function Xse(t){var e=/firefox/i.test(CR()),n=/Trident/i.test(CR());if(n&&vl(t)){var r=af(t);if(r.position==="fixed")return null}var i=eC(t);for(kO(i)&&(i=i.host);vl(i)&&["html","body"].indexOf(Ju(i))<0;){var o=af(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||e&&o.willChange==="filter"||e&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function wb(t){for(var e=Us(t),n=e8(t);n&&qse(n)&&af(n).position==="static";)n=e8(n);return n&&(Ju(n)==="html"||Ju(n)==="body"&&af(n).position==="static")?e:n||Xse(t)||e}function UO(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function $1(t,e,n){return Mp(t,e2(e,n))}function Yse(t,e,n){var r=$1(t,e,n);return r>n?n:r}function vH(){return{top:0,right:0,bottom:0,left:0}}function yH(t){return Object.assign({},vH(),t)}function xH(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var Kse=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,yH(typeof e!="number"?e:xH(e,_b))};function Zse(t){var e,n=t.state,r=t.name,i=t.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Vu(n.placement),l=UO(s),u=[qa,Sl].indexOf(s)>=0,c=u?"height":"width";if(!(!o||!a)){var f=Kse(i.padding,n),d=BO(o),p=l==="y"?ja:qa,y=l==="y"?wl:Sl,x=n.rects.reference[c]+n.rects.reference[l]-a[l]-n.rects.popper[c],_=a[l]-n.rects.reference[l],v=wb(o),S=v?l==="y"?v.clientHeight||0:v.clientWidth||0:0,w=x/2-_/2,E=f[p],T=S-d[c]-f[y],C=S/2-d[c]/2+w,D=$1(E,C,T),O=l;n.modifiersData[r]=(e={},e[O]=D,e.centerOffset=D-C,e)}}function Jse(t){var e=t.state,n=t.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||gH(e.elements.popper,i)&&(e.elements.arrow=i))}const Qse={name:"arrow",enabled:!0,phase:"main",fn:Zse,effect:Jse,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function rv(t){return t.split("-")[1]}var ele={top:"auto",right:"auto",bottom:"auto",left:"auto"};function tle(t,e){var n=t.x,r=t.y,i=e.devicePixelRatio||1;return{x:tv(n*i)/i||0,y:tv(r*i)/i||0}}function t8(t){var e,n=t.popper,r=t.popperRect,i=t.placement,o=t.variation,a=t.offsets,s=t.position,l=t.gpuAcceleration,u=t.adaptive,c=t.roundOffsets,f=t.isFixed,d=a.x,p=d===void 0?0:d,y=a.y,x=y===void 0?0:y,_=typeof c=="function"?c({x:p,y:x}):{x:p,y:x};p=_.x,x=_.y;var v=a.hasOwnProperty("x"),S=a.hasOwnProperty("y"),w=qa,E=ja,T=window;if(u){var C=wb(n),D="clientHeight",O="clientWidth";if(C===Us(n)&&(C=Qd(n),af(C).position!=="static"&&s==="absolute"&&(D="scrollHeight",O="scrollWidth")),C=C,i===ja||(i===qa||i===Sl)&&o===Ax){E=wl;var P=f&&C===T&&T.visualViewport?T.visualViewport.height:C[D];x-=P-r.height,x*=l?1:-1}if(i===qa||(i===ja||i===wl)&&o===Ax){w=Sl;var N=f&&C===T&&T.visualViewport?T.visualViewport.width:C[O];p-=N-r.width,p*=l?1:-1}}var k=Object.assign({position:s},u&&ele),G=c===!0?tle({x:p,y:x},Us(n)):{x:p,y:x};if(p=G.x,x=G.y,l){var Z;return Object.assign({},k,(Z={},Z[E]=S?"0":"",Z[w]=v?"0":"",Z.transform=(T.devicePixelRatio||1)<=1?"translate("+p+"px, "+x+"px)":"translate3d("+p+"px, "+x+"px, 0)",Z))}return Object.assign({},k,(e={},e[E]=S?x+"px":"",e[w]=v?p+"px":"",e.transform="",e))}function nle(t){var e=t.state,n=t.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:Vu(e.placement),variation:rv(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,t8(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,t8(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const rle={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:nle,data:{}};var Tw={passive:!0};function ile(t){var e=t.state,n=t.instance,r=t.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=Us(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&u.forEach(function(c){c.addEventListener("scroll",n.update,Tw)}),s&&l.addEventListener("resize",n.update,Tw),function(){o&&u.forEach(function(c){c.removeEventListener("scroll",n.update,Tw)}),s&&l.removeEventListener("resize",n.update,Tw)}}const ole={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:ile,data:{}};var ale={left:"right",right:"left",bottom:"top",top:"bottom"};function lE(t){return t.replace(/left|right|bottom|top/g,function(e){return ale[e]})}var sle={start:"end",end:"start"};function n8(t){return t.replace(/start|end/g,function(e){return sle[e]})}function zO(t){var e=Us(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function $O(t){return nv(Qd(t)).left+zO(t).scrollLeft}function lle(t,e){var n=Us(t),r=Qd(t),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=mH();(u||!u&&e==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+$O(t),y:l}}function ule(t){var e,n=Qd(t),r=zO(t),i=(e=t.ownerDocument)==null?void 0:e.body,o=Mp(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Mp(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+$O(t),l=-r.scrollTop;return af(i||n).direction==="rtl"&&(s+=Mp(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function HO(t){var e=af(t),n=e.overflow,r=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function bH(t){return["html","body","#document"].indexOf(Ju(t))>=0?t.ownerDocument.body:vl(t)&&HO(t)?t:bH(eC(t))}function H1(t,e){var n;e===void 0&&(e=[]);var r=bH(t),i=r===((n=t.ownerDocument)==null?void 0:n.body),o=Us(r),a=i?[o].concat(o.visualViewport||[],HO(r)?r:[]):r,s=e.concat(a);return i?s:s.concat(H1(eC(a)))}function AR(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function cle(t,e){var n=nv(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function r8(t,e,n){return e===hH?AR(lle(t,n)):Vp(e)?cle(e,n):AR(ule(Qd(t)))}function fle(t){var e=H1(eC(t)),n=["absolute","fixed"].indexOf(af(t).position)>=0,r=n&&vl(t)?wb(t):t;return Vp(r)?e.filter(function(i){return Vp(i)&&gH(i,r)&&Ju(i)!=="body"}):[]}function dle(t,e,n,r){var i=e==="clippingParents"?fle(t):[].concat(e),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var c=r8(t,u,r);return l.top=Mp(c.top,l.top),l.right=e2(c.right,l.right),l.bottom=e2(c.bottom,l.bottom),l.left=Mp(c.left,l.left),l},r8(t,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function _H(t){var e=t.reference,n=t.element,r=t.placement,i=r?Vu(r):null,o=r?rv(r):null,a=e.x+e.width/2-n.width/2,s=e.y+e.height/2-n.height/2,l;switch(i){case ja:l={x:a,y:e.y-n.height};break;case wl:l={x:a,y:e.y+e.height};break;case Sl:l={x:e.x+e.width,y:s};break;case qa:l={x:e.x-n.width,y:s};break;default:l={x:e.x,y:e.y}}var u=i?UO(i):null;if(u!=null){var c=u==="y"?"height":"width";switch(o){case ev:l[u]=l[u]-(e[c]/2-n[c]/2);break;case Ax:l[u]=l[u]+(e[c]/2-n[c]/2);break}}return l}function Tx(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=r===void 0?t.placement:r,o=n.strategy,a=o===void 0?t.strategy:o,s=n.boundary,l=s===void 0?Nse:s,u=n.rootBoundary,c=u===void 0?hH:u,f=n.elementContext,d=f===void 0?Hy:f,p=n.altBoundary,y=p===void 0?!1:p,x=n.padding,_=x===void 0?0:x,v=yH(typeof _!="number"?_:xH(_,_b)),S=d===Hy?Ose:Hy,w=t.rects.popper,E=t.elements[y?S:d],T=dle(Vp(E)?E:E.contextElement||Qd(t.elements.popper),l,c,a),C=nv(t.elements.reference),D=_H({reference:C,element:w,strategy:"absolute",placement:i}),O=AR(Object.assign({},w,D)),P=d===Hy?O:C,N={top:T.top-P.top+v.top,bottom:P.bottom-T.bottom+v.bottom,left:T.left-P.left+v.left,right:P.right-T.right+v.right},k=t.modifiersData.offset;if(d===Hy&&k){var G=k[i];Object.keys(N).forEach(function(Z){var j=[Sl,wl].indexOf(Z)>=0?1:-1,K=[ja,wl].indexOf(Z)>=0?"y":"x";N[Z]+=G[K]*j})}return N}function hle(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?pH:l,c=rv(r),f=c?s?QL:QL.filter(function(y){return rv(y)===c}):_b,d=f.filter(function(y){return u.indexOf(y)>=0});d.length===0&&(d=f);var p=d.reduce(function(y,x){return y[x]=Tx(t,{placement:x,boundary:i,rootBoundary:o,padding:a})[Vu(x)],y},{});return Object.keys(p).sort(function(y,x){return p[y]-p[x]})}function ple(t){if(Vu(t)===LO)return[];var e=lE(t);return[n8(t),e,n8(e)]}function mle(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,u=n.padding,c=n.boundary,f=n.rootBoundary,d=n.altBoundary,p=n.flipVariations,y=p===void 0?!0:p,x=n.allowedAutoPlacements,_=e.options.placement,v=Vu(_),S=v===_,w=l||(S||!y?[lE(_)]:ple(_)),E=[_].concat(w).reduce(function(Ce,Re){return Ce.concat(Vu(Re)===LO?hle(e,{placement:Re,boundary:c,rootBoundary:f,padding:u,flipVariations:y,allowedAutoPlacements:x}):Re)},[]),T=e.rects.reference,C=e.rects.popper,D=new Map,O=!0,P=E[0],N=0;N=0,K=j?"width":"height",Y=Tx(e,{placement:k,boundary:c,rootBoundary:f,altBoundary:d,padding:u}),$=j?Z?Sl:qa:Z?wl:ja;T[K]>C[K]&&($=lE($));var W=lE($),U=[];if(o&&U.push(Y[G]<=0),s&&U.push(Y[$]<=0,Y[W]<=0),U.every(function(Ce){return Ce})){P=k,O=!1;break}D.set(k,U)}if(O)for(var te=y?3:1,re=function(Re){var Ie=E.find(function(He){var tt=D.get(He);if(tt)return tt.slice(0,Re).every(function(Qe){return Qe})});if(Ie)return P=Ie,"break"},le=te;le>0;le--){var ce=re(le);if(ce==="break")break}e.placement!==P&&(e.modifiersData[r]._skip=!0,e.placement=P,e.reset=!0)}}const gle={name:"flip",enabled:!0,phase:"main",fn:mle,requiresIfExists:["offset"],data:{_skip:!1}};function i8(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function o8(t){return[ja,Sl,wl,qa].some(function(e){return t[e]>=0})}function vle(t){var e=t.state,n=t.name,r=e.rects.reference,i=e.rects.popper,o=e.modifiersData.preventOverflow,a=Tx(e,{elementContext:"reference"}),s=Tx(e,{altBoundary:!0}),l=i8(a,r),u=i8(s,i,o),c=o8(l),f=o8(u);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:f},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":f})}const yle={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:vle};function xle(t,e,n){var r=Vu(t),i=[qa,ja].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[qa,Sl].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function ble(t){var e=t.state,n=t.options,r=t.name,i=n.offset,o=i===void 0?[0,0]:i,a=pH.reduce(function(c,f){return c[f]=xle(f,e.rects,o),c},{}),s=a[e.placement],l=s.x,u=s.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=u),e.modifiersData[r]=a}const _le={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:ble};function wle(t){var e=t.state,n=t.name;e.modifiersData[n]=_H({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const Sle={name:"popperOffsets",enabled:!0,phase:"read",fn:wle,data:{}};function Ele(t){return t==="x"?"y":"x"}function Mle(t){var e=t.state,n=t.options,r=t.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,u=n.rootBoundary,c=n.altBoundary,f=n.padding,d=n.tether,p=d===void 0?!0:d,y=n.tetherOffset,x=y===void 0?0:y,_=Tx(e,{boundary:l,rootBoundary:u,padding:f,altBoundary:c}),v=Vu(e.placement),S=rv(e.placement),w=!S,E=UO(v),T=Ele(E),C=e.modifiersData.popperOffsets,D=e.rects.reference,O=e.rects.popper,P=typeof x=="function"?x(Object.assign({},e.rects,{placement:e.placement})):x,N=typeof P=="number"?{mainAxis:P,altAxis:P}:Object.assign({mainAxis:0,altAxis:0},P),k=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,G={x:0,y:0};if(C){if(o){var Z,j=E==="y"?ja:qa,K=E==="y"?wl:Sl,Y=E==="y"?"height":"width",$=C[E],W=$+_[j],U=$-_[K],te=p?-O[Y]/2:0,re=S===ev?D[Y]:O[Y],le=S===ev?-O[Y]:-D[Y],ce=e.elements.arrow,Ce=p&&ce?BO(ce):{width:0,height:0},Re=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:vH(),Ie=Re[j],He=Re[K],tt=$1(0,D[Y],Ce[Y]),Qe=w?D[Y]/2-te-tt-Ie-N.mainAxis:re-tt-Ie-N.mainAxis,ct=w?-D[Y]/2+te+tt+He+N.mainAxis:le+tt+He+N.mainAxis,Xe=e.elements.arrow&&wb(e.elements.arrow),ue=Xe?E==="y"?Xe.clientTop||0:Xe.clientLeft||0:0,De=(Z=k==null?void 0:k[E])!=null?Z:0,Ee=$+Qe-De-ue,X=$+ct-De,ne=$1(p?e2(W,Ee):W,$,p?Mp(U,X):U);C[E]=ne,G[E]=ne-$}if(s){var me,we=E==="x"?ja:qa,Ne=E==="x"?wl:Sl,Ue=C[T],We=T==="y"?"height":"width",lt=Ue+_[we],z=Ue-_[Ne],B=[ja,qa].indexOf(v)!==-1,oe=(me=k==null?void 0:k[T])!=null?me:0,ge=B?lt:Ue-D[We]-O[We]-oe+N.altAxis,pe=B?Ue+D[We]+O[We]-oe-N.altAxis:z,de=p&&B?Yse(ge,Ue,pe):$1(p?ge:lt,Ue,p?pe:z);C[T]=de,G[T]=de-Ue}e.modifiersData[r]=G}}const Cle={name:"preventOverflow",enabled:!0,phase:"main",fn:Mle,requiresIfExists:["offset"]};function Ale(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Tle(t){return t===Us(t)||!vl(t)?zO(t):Ale(t)}function Dle(t){var e=t.getBoundingClientRect(),n=tv(e.width)/t.offsetWidth||1,r=tv(e.height)/t.offsetHeight||1;return n!==1||r!==1}function Rle(t,e,n){n===void 0&&(n=!1);var r=vl(e),i=vl(e)&&Dle(e),o=Qd(e),a=nv(t,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Ju(e)!=="body"||HO(o))&&(s=Tle(e)),vl(e)?(l=nv(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):o&&(l.x=$O(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Ple(t){var e=new Map,n=new Set,r=[];t.forEach(function(o){e.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=e.get(s);l&&i(l)}}),r.push(o)}return t.forEach(function(o){n.has(o.name)||i(o)}),r}function Nle(t){var e=Ple(t);return Vse.reduce(function(n,r){return n.concat(e.filter(function(i){return i.phase===r}))},[])}function Ole(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function Ile(t){var e=t.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(e).map(function(n){return e[n]})}var a8={placement:"bottom",modifiers:[],strategy:"absolute"};function s8(){for(var t=arguments.length,e=new Array(t),n=0;n{o||s(Ble(i)||document.body)},[i,o]),_l(()=>{if(a&&!o)return Sx(n,a),()=>{Sx(n,null)}},[n,a,o]),o){if(H.isValidElement(r)){const u={ref:l};return H.cloneElement(r,u)}return F.jsx(H.Fragment,{children:r})}return F.jsx(H.Fragment,{children:a&&Jd.createPortal(r,a)})});function Ule(t){return Zt("MuiPopper",t)}Yt("MuiPopper",["root"]);const zle=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],$le=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function Hle(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 TR(t){return typeof t=="function"?t():t}function Vle(t){return t.nodeType!==void 0}const Wle=()=>en({root:["root"]},_se(Ule)),Gle={},jle=H.forwardRef(function(e,n){var r;const{anchorEl:i,children:o,direction:a,disablePortal:s,modifiers:l,open:u,placement:c,popperOptions:f,popperRef:d,slotProps:p={},slots:y={},TransitionProps:x}=e,_=vt(e,zle),v=H.useRef(null),S=Jr(v,n),w=H.useRef(null),E=Jr(w,d),T=H.useRef(E);_l(()=>{T.current=E},[E]),H.useImperativeHandle(d,()=>w.current,[]);const C=Hle(c,a),[D,O]=H.useState(C),[P,N]=H.useState(TR(i));H.useEffect(()=>{w.current&&w.current.forceUpdate()}),H.useEffect(()=>{i&&N(TR(i))},[i]),_l(()=>{if(!P||!u)return;const K=W=>{O(W.placement)};let Y=[{name:"preventOverflow",options:{altBoundary:s}},{name:"flip",options:{altBoundary:s}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:W})=>{K(W)}}];l!=null&&(Y=Y.concat(l)),f&&f.modifiers!=null&&(Y=Y.concat(f.modifiers));const $=kle(P,v.current,Q({placement:C},f,{modifiers:Y}));return T.current($),()=>{$.destroy(),T.current(null)}},[P,s,l,u,f,C]);const k={placement:D};x!==null&&(k.TransitionProps=x);const G=Wle(),Z=(r=y.root)!=null?r:"div",j=Hp({elementType:Z,externalSlotProps:p.root,externalForwardedProps:_,additionalProps:{role:"tooltip",ref:S},ownerState:e,className:G.root});return F.jsx(Z,Q({},j,{children:typeof o=="function"?o(k):o}))}),qle=H.forwardRef(function(e,n){const{anchorEl:r,children:i,container:o,direction:a="ltr",disablePortal:s=!1,keepMounted:l=!1,modifiers:u,open:c,placement:f="bottom",popperOptions:d=Gle,popperRef:p,style:y,transition:x=!1,slotProps:_={},slots:v={}}=e,S=vt(e,$le),[w,E]=H.useState(!0),T=()=>{E(!1)},C=()=>{E(!0)};if(!l&&!c&&(!x||w))return null;let D;if(o)D=o;else if(r){const N=TR(r);D=N&&Vle(N)?Yo(N).body:Yo(null).body}const O=!c&&l&&(!x||w)?"none":void 0,P=x?{in:c,onEnter:T,onExited:C}:void 0;return F.jsx(wH,{disablePortal:s,container:D,children:F.jsx(jle,Q({anchorEl:r,direction:a,disablePortal:s,modifiers:u,ref:n,open:x?!w:c,placement:f,popperOptions:d,popperRef:p,slotProps:_,slots:v},S,{style:Q({position:"fixed",top:0,left:0,display:O},y),TransitionProps:P,children:i}))})});function Xle(t){const e=Yo(t);return e.body===t?Zu(t).innerWidth>e.documentElement.clientWidth:t.scrollHeight>t.clientHeight}function V1(t,e){e?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden")}function l8(t){return parseInt(Zu(t).getComputedStyle(t).paddingRight,10)||0}function Yle(t){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(t.tagName)!==-1,r=t.tagName==="INPUT"&&t.getAttribute("type")==="hidden";return n||r}function u8(t,e,n,r,i){const o=[e,n,...r];[].forEach.call(t.children,a=>{const s=o.indexOf(a)===-1,l=!Yle(a);s&&l&&V1(a,i)})}function UT(t,e){let n=-1;return t.some((r,i)=>e(r)?(n=i,!0):!1),n}function Kle(t,e){const n=[],r=t.container;if(!e.disableScrollLock){if(Xle(r)){const a=N7(Yo(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${l8(r)+a}px`;const s=Yo(r).querySelectorAll(".mui-fixed");[].forEach.call(s,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${l8(l)+a}px`})}let o;if(r.parentNode instanceof DocumentFragment)o=Yo(r).body;else{const a=r.parentElement,s=Zu(r);o=(a==null?void 0:a.nodeName)==="HTML"&&s.getComputedStyle(a).overflowY==="scroll"?a:r}n.push({value:o.style.overflow,property:"overflow",el:o},{value:o.style.overflowX,property:"overflow-x",el:o},{value:o.style.overflowY,property:"overflow-y",el:o}),o.style.overflow="hidden"}return()=>{n.forEach(({value:o,el:a,property:s})=>{o?a.style.setProperty(s,o):a.style.removeProperty(s)})}}function Zle(t){const e=[];return[].forEach.call(t.children,n=>{n.getAttribute("aria-hidden")==="true"&&e.push(n)}),e}class Jle{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,n){let r=this.modals.indexOf(e);if(r!==-1)return r;r=this.modals.length,this.modals.push(e),e.modalRef&&V1(e.modalRef,!1);const i=Zle(n);u8(n,e.mount,e.modalRef,i,!0);const o=UT(this.containers,a=>a.container===n);return o!==-1?(this.containers[o].modals.push(e),r):(this.containers.push({modals:[e],container:n,restore:null,hiddenSiblings:i}),r)}mount(e,n){const r=UT(this.containers,o=>o.modals.indexOf(e)!==-1),i=this.containers[r];i.restore||(i.restore=Kle(i,n))}remove(e,n=!0){const r=this.modals.indexOf(e);if(r===-1)return r;const i=UT(this.containers,a=>a.modals.indexOf(e)!==-1),o=this.containers[i];if(o.modals.splice(o.modals.indexOf(e),1),this.modals.splice(r,1),o.modals.length===0)o.restore&&o.restore(),e.modalRef&&V1(e.modalRef,n),u8(o.container,e.mount,e.modalRef,o.hiddenSiblings,!1),this.containers.splice(i,1);else{const a=o.modals[o.modals.length-1];a.modalRef&&V1(a.modalRef,!1)}return r}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}function Qle(t){return typeof t=="function"?t():t}function eue(t){return t?t.props.hasOwnProperty("in"):!1}const tue=new Jle;function nue(t){const{container:e,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=tue,closeAfterTransition:o=!1,onTransitionEnter:a,onTransitionExited:s,children:l,onClose:u,open:c,rootRef:f}=t,d=H.useRef({}),p=H.useRef(null),y=H.useRef(null),x=Jr(y,f),[_,v]=H.useState(!c),S=eue(l);let w=!0;(t["aria-hidden"]==="false"||t["aria-hidden"]===!1)&&(w=!1);const E=()=>Yo(p.current),T=()=>(d.current.modalRef=y.current,d.current.mount=p.current,d.current),C=()=>{i.mount(T(),{disableScrollLock:r}),y.current&&(y.current.scrollTop=0)},D=Zl(()=>{const Y=Qle(e)||E().body;i.add(T(),Y),y.current&&C()}),O=H.useCallback(()=>i.isTopModal(T()),[i]),P=Zl(Y=>{p.current=Y,Y&&(c&&O()?C():y.current&&V1(y.current,w))}),N=H.useCallback(()=>{i.remove(T(),w)},[w,i]);H.useEffect(()=>()=>{N()},[N]),H.useEffect(()=>{c?D():(!S||!o)&&N()},[c,N,S,o,D]);const k=Y=>$=>{var W;(W=Y.onKeyDown)==null||W.call(Y,$),!($.key!=="Escape"||$.which===229||!O())&&(n||($.stopPropagation(),u&&u($,"escapeKeyDown")))},G=Y=>$=>{var W;(W=Y.onClick)==null||W.call(Y,$),$.target===$.currentTarget&&u&&u($,"backdropClick")};return{getRootProps:(Y={})=>{const $=dH(t);delete $.onTransitionEnter,delete $.onTransitionExited;const W=Q({},$,Y);return Q({role:"presentation"},W,{onKeyDown:k(W),ref:x})},getBackdropProps:(Y={})=>{const $=Y;return Q({"aria-hidden":!0},$,{onClick:G($),open:c})},getTransitionProps:()=>{const Y=()=>{v(!1),a&&a()},$=()=>{v(!0),s&&s(),o&&N()};return{onEnter:XE(Y,l==null?void 0:l.props.onEnter),onExited:XE($,l==null?void 0:l.props.onExited)}},rootRef:x,portalRef:P,isTopModal:O,exited:_,hasTransition:S}}const rue=["onChange","maxRows","minRows","style","value"];function Dw(t){return parseInt(t,10)||0}const iue={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function c8(t){return t==null||Object.keys(t).length===0||t.outerHeightStyle===0&&!t.overflow}const oue=H.forwardRef(function(e,n){const{onChange:r,maxRows:i,minRows:o=1,style:a,value:s}=e,l=vt(e,rue),{current:u}=H.useRef(s!=null),c=H.useRef(null),f=Jr(n,c),d=H.useRef(null),p=H.useRef(0),[y,x]=H.useState({outerHeightStyle:0}),_=H.useCallback(()=>{const E=c.current,C=Zu(E).getComputedStyle(E);if(C.width==="0px")return{outerHeightStyle:0};const D=d.current;D.style.width=C.width,D.value=E.value||e.placeholder||"x",D.value.slice(-1)===` +`&&(D.value+=" ");const O=C.boxSizing,P=Dw(C.paddingBottom)+Dw(C.paddingTop),N=Dw(C.borderBottomWidth)+Dw(C.borderTopWidth),k=D.scrollHeight;D.value="x";const G=D.scrollHeight;let Z=k;o&&(Z=Math.max(Number(o)*G,Z)),i&&(Z=Math.min(Number(i)*G,Z)),Z=Math.max(Z,G);const j=Z+(O==="border-box"?P+N:0),K=Math.abs(Z-k)<=1;return{outerHeightStyle:j,overflow:K}},[i,o,e.placeholder]),v=(E,T)=>{const{outerHeightStyle:C,overflow:D}=T;return p.current<20&&(C>0&&Math.abs((E.outerHeightStyle||0)-C)>1||E.overflow!==D)?(p.current+=1,{overflow:D,outerHeightStyle:C}):E},S=H.useCallback(()=>{const E=_();c8(E)||x(T=>v(T,E))},[_]);_l(()=>{const E=()=>{const k=_();c8(k)||Jd.flushSync(()=>{x(G=>v(G,k))})},T=()=>{p.current=0,E()};let C;const D=EM(T),O=c.current,P=Zu(O);P.addEventListener("resize",D);let N;return typeof ResizeObserver<"u"&&(N=new ResizeObserver(T),N.observe(O)),()=>{D.clear(),cancelAnimationFrame(C),P.removeEventListener("resize",D),N&&N.disconnect()}},[_]),_l(()=>{S()}),H.useEffect(()=>{p.current=0},[s]);const w=E=>{p.current=0,u||S(),r&&r(E)};return F.jsxs(H.Fragment,{children:[F.jsx("textarea",Q({value:s,onChange:w,ref:f,rows:o,style:Q({height:y.outerHeightStyle,overflow:y.overflow?"hidden":void 0},a)},l)),F.jsx("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:d,tabIndex:-1,style:Q({},iue.shadow,a,{paddingTop:0,paddingBottom:0})})]})});function f8(t){return typeof t.normalize<"u"?t.normalize("NFD").replace(/[\u0300-\u036f]/g,""):t}function aue(t={}){const{ignoreAccents:e=!0,ignoreCase:n=!0,limit:r,matchFrom:i="any",stringify:o,trim:a=!1}=t;return(s,{inputValue:l,getOptionLabel:u})=>{let c=a?l.trim():l;n&&(c=c.toLowerCase()),e&&(c=f8(c));const f=c?s.filter(d=>{let p=(o||u)(d);return n&&(p=p.toLowerCase()),e&&(p=f8(p)),i==="start"?p.indexOf(c)===0:p.indexOf(c)>-1}):s;return typeof r=="number"?f.slice(0,r):f}}function zT(t,e){for(let n=0;n{var e;return t.current!==null&&((e=t.current.parentElement)==null?void 0:e.contains(document.activeElement))};function uue(t){const{unstable_isActiveElementInListbox:e=lue,unstable_classNamePrefix:n="Mui",autoComplete:r=!1,autoHighlight:i=!1,autoSelect:o=!1,blurOnSelect:a=!1,clearOnBlur:s=!t.freeSolo,clearOnEscape:l=!1,componentName:u="useAutocomplete",defaultValue:c=t.multiple?[]:null,disableClearable:f=!1,disableCloseOnSelect:d=!1,disabled:p,disabledItemsFocusable:y=!1,disableListWrap:x=!1,filterOptions:_=sue,filterSelectedOptions:v=!1,freeSolo:S=!1,getOptionDisabled:w,getOptionLabel:E=Ze=>{var Ge;return(Ge=Ze.label)!=null?Ge:Ze},groupBy:T,handleHomeEndKeys:C=!t.freeSolo,id:D,includeInputInList:O=!1,inputValue:P,isOptionEqualToValue:N=(Ze,Ge)=>Ze===Ge,multiple:k=!1,onChange:G,onClose:Z,onHighlightChange:j,onInputChange:K,onOpen:Y,open:$,openOnFocus:W=!1,options:U,readOnly:te=!1,selectOnFocus:re=!t.freeSolo,value:le}=t,ce=bv(D);let Ce=E;Ce=Ze=>{const Ge=E(Ze);return typeof Ge!="string"?String(Ge):Ge};const Re=H.useRef(!1),Ie=H.useRef(!0),He=H.useRef(null),tt=H.useRef(null),[Qe,ct]=H.useState(null),[Xe,ue]=H.useState(-1),De=i?0:-1,Ee=H.useRef(De),[X,ne]=Dd({controlled:le,default:c,name:u}),[me,we]=Dd({controlled:P,default:"",name:u,state:"inputValue"}),[Ne,Ue]=H.useState(!1),We=H.useCallback((Ze,Ge)=>{if(!(k?X.length!(v&&(k?X:[X]).some(Ge=>Ge!==null&&N(Ze,Ge)))),{inputValue:ge&&B?"":me,getOptionLabel:Ce}):[],ve=sre({filteredOptions:de,value:X,inputValue:me});H.useEffect(()=>{const Ze=X!==ve.value;Ne&&!Ze||S&&!Ze||We(null,X)},[X,We,Ne,ve.value,S]);const Se=lt&&de.length>0&&!te,Pe=Zl(Ze=>{Ze===-1?He.current.focus():Qe.querySelector(`[data-tag-index="${Ze}"]`).focus()});H.useEffect(()=>{k&&Xe>X.length-1&&(ue(-1),Pe(-1))},[X,k,Xe,Pe]);function Be(Ze,Ge){if(!tt.current||Ze<0||Ze>=de.length)return-1;let ot=Ze;for(;;){const J=tt.current.querySelector(`[data-option-index="${ot}"]`),_e=y?!1:!J||J.disabled||J.getAttribute("aria-disabled")==="true";if(J&&J.hasAttribute("tabindex")&&!_e)return ot;if(Ge==="next"?ot=(ot+1)%de.length:ot=(ot-1+de.length)%de.length,ot===Ze)return-1}}const je=Zl(({event:Ze,index:Ge,reason:ot="auto"})=>{if(Ee.current=Ge,Ge===-1?He.current.removeAttribute("aria-activedescendant"):He.current.setAttribute("aria-activedescendant",`${ce}-option-${Ge}`),j&&j(Ze,Ge===-1?null:de[Ge],ot),!tt.current)return;const J=tt.current.querySelector(`[role="option"].${n}-focused`);J&&(J.classList.remove(`${n}-focused`),J.classList.remove(`${n}-focusVisible`));let _e=tt.current;if(tt.current.getAttribute("role")!=="listbox"&&(_e=tt.current.parentElement.querySelector('[role="listbox"]')),!_e)return;if(Ge===-1){_e.scrollTop=0;return}const Oe=tt.current.querySelector(`[data-option-index="${Ge}"]`);if(Oe&&(Oe.classList.add(`${n}-focused`),ot==="keyboard"&&Oe.classList.add(`${n}-focusVisible`),_e.scrollHeight>_e.clientHeight&&ot!=="mouse"&&ot!=="touch")){const ke=Oe,ze=_e.clientHeight+_e.scrollTop,Mt=ke.offsetTop+ke.offsetHeight;Mt>ze?_e.scrollTop=Mt-_e.clientHeight:ke.offsetTop-ke.offsetHeight*(T?1.3:0)<_e.scrollTop&&(_e.scrollTop=ke.offsetTop-ke.offsetHeight*(T?1.3:0))}}),Le=Zl(({event:Ze,diff:Ge,direction:ot="next",reason:J="auto"})=>{if(!pe)return;const Oe=Be((()=>{const ke=de.length-1;if(Ge==="reset")return De;if(Ge==="start")return 0;if(Ge==="end")return ke;const ze=Ee.current+Ge;return ze<0?ze===-1&&O?-1:x&&Ee.current!==-1||Math.abs(Ge)>1?0:ke:ze>ke?ze===ke+1&&O?-1:x||Math.abs(Ge)>1?ke:0:ze})(),ot);if(je({index:Oe,reason:J,event:Ze}),r&&Ge!=="reset")if(Oe===-1)He.current.value=me;else{const ke=Ce(de[Oe]);He.current.value=ke,ke.toLowerCase().indexOf(me.toLowerCase())===0&&me.length>0&&He.current.setSelectionRange(me.length,ke.length)}}),_t=()=>{const Ze=(Ge,ot)=>{const J=Ge?Ce(Ge):"",_e=ot?Ce(ot):"";return J===_e};if(Ee.current!==-1&&ve.filteredOptions&&ve.filteredOptions.length!==de.length&&ve.inputValue===me&&(k?X.length===ve.value.length&&ve.value.every((Ge,ot)=>Ce(X[ot])===Ce(Ge)):Ze(ve.value,X))){const Ge=ve.filteredOptions[Ee.current];if(Ge&&de.some(J=>Ce(J)===Ce(Ge)))return!0}return!1},bt=H.useCallback(()=>{if(!pe||_t())return;const Ze=k?X[0]:X;if(de.length===0||Ze==null){Le({diff:"reset"});return}if(tt.current){if(Ze!=null){const Ge=de[Ee.current];if(k&&Ge&&zT(X,J=>N(Ge,J))!==-1)return;const ot=zT(de,J=>N(J,Ze));ot===-1?Le({diff:"reset"}):je({index:ot});return}if(Ee.current>=de.length-1){je({index:de.length-1});return}je({index:Ee.current})}},[de.length,k?!1:X,v,Le,je,pe,me,k]),wt=Zl(Ze=>{Sx(tt,Ze),Ze&&bt()});H.useEffect(()=>{bt()},[bt]);const Ct=Ze=>{lt||(z(!0),oe(!0),Y&&Y(Ze))},pt=(Ze,Ge)=>{lt&&(z(!1),Z&&Z(Ze,Ge))},qt=(Ze,Ge,ot,J)=>{if(k){if(X.length===Ge.length&&X.every((_e,Oe)=>_e===Ge[Oe]))return}else if(X===Ge)return;G&&G(Ze,Ge,ot,J),ne(Ge)},be=H.useRef(!1),gt=(Ze,Ge,ot="selectOption",J="options")=>{let _e=ot,Oe=Ge;if(k){Oe=Array.isArray(X)?X.slice():[];const ke=zT(Oe,ze=>N(Ge,ze));ke===-1?Oe.push(Ge):J!=="freeSolo"&&(Oe.splice(ke,1),_e="removeOption")}We(Ze,Oe),qt(Ze,Oe,_e,{option:Ge}),!d&&(!Ze||!Ze.ctrlKey&&!Ze.metaKey)&&pt(Ze,_e),(a===!0||a==="touch"&&be.current||a==="mouse"&&!be.current)&&He.current.blur()};function ft(Ze,Ge){if(Ze===-1)return-1;let ot=Ze;for(;;){if(Ge==="next"&&ot===X.length||Ge==="previous"&&ot===-1)return-1;const J=Qe.querySelector(`[data-tag-index="${ot}"]`);if(!J||!J.hasAttribute("tabindex")||J.disabled||J.getAttribute("aria-disabled")==="true")ot+=Ge==="next"?1:-1;else return ot}}const Ye=(Ze,Ge)=>{if(!k)return;me===""&&pt(Ze,"toggleInput");let ot=Xe;Xe===-1?me===""&&Ge==="previous"&&(ot=X.length-1):(ot+=Ge==="next"?1:-1,ot<0&&(ot=0),ot===X.length&&(ot=-1)),ot=ft(ot,Ge),ue(ot),Pe(ot)},mt=Ze=>{Re.current=!0,we(""),K&&K(Ze,"","clear"),qt(Ze,k?[]:null,"clear")},Vt=Ze=>Ge=>{if(Ze.onKeyDown&&Ze.onKeyDown(Ge),!Ge.defaultMuiPrevented&&(Xe!==-1&&["ArrowLeft","ArrowRight"].indexOf(Ge.key)===-1&&(ue(-1),Pe(-1)),Ge.which!==229))switch(Ge.key){case"Home":pe&&C&&(Ge.preventDefault(),Le({diff:"start",direction:"next",reason:"keyboard",event:Ge}));break;case"End":pe&&C&&(Ge.preventDefault(),Le({diff:"end",direction:"previous",reason:"keyboard",event:Ge}));break;case"PageUp":Ge.preventDefault(),Le({diff:-d8,direction:"previous",reason:"keyboard",event:Ge}),Ct(Ge);break;case"PageDown":Ge.preventDefault(),Le({diff:d8,direction:"next",reason:"keyboard",event:Ge}),Ct(Ge);break;case"ArrowDown":Ge.preventDefault(),Le({diff:1,direction:"next",reason:"keyboard",event:Ge}),Ct(Ge);break;case"ArrowUp":Ge.preventDefault(),Le({diff:-1,direction:"previous",reason:"keyboard",event:Ge}),Ct(Ge);break;case"ArrowLeft":Ye(Ge,"previous");break;case"ArrowRight":Ye(Ge,"next");break;case"Enter":if(Ee.current!==-1&&pe){const ot=de[Ee.current],J=w?w(ot):!1;if(Ge.preventDefault(),J)return;gt(Ge,ot,"selectOption"),r&&He.current.setSelectionRange(He.current.value.length,He.current.value.length)}else S&&me!==""&&ge===!1&&(k&&Ge.preventDefault(),gt(Ge,me,"createOption","freeSolo"));break;case"Escape":pe?(Ge.preventDefault(),Ge.stopPropagation(),pt(Ge,"escape")):l&&(me!==""||k&&X.length>0)&&(Ge.preventDefault(),Ge.stopPropagation(),mt(Ge));break;case"Backspace":if(k&&!te&&me===""&&X.length>0){const ot=Xe===-1?X.length-1:Xe,J=X.slice();J.splice(ot,1),qt(Ge,J,"removeOption",{option:X[ot]})}break;case"Delete":if(k&&!te&&me===""&&X.length>0&&Xe!==-1){const ot=Xe,J=X.slice();J.splice(ot,1),qt(Ge,J,"removeOption",{option:X[ot]})}break}},bn=Ze=>{Ue(!0),W&&!Re.current&&Ct(Ze)},Zn=Ze=>{if(e(tt)){He.current.focus();return}Ue(!1),Ie.current=!0,Re.current=!1,o&&Ee.current!==-1&&pe?gt(Ze,de[Ee.current],"blur"):o&&S&&me!==""?gt(Ze,me,"blur","freeSolo"):s&&We(Ze,X),pt(Ze,"blur")},Cr=Ze=>{const Ge=Ze.target.value;me!==Ge&&(we(Ge),oe(!1),K&&K(Ze,Ge,"input")),Ge===""?!f&&!k&&qt(Ze,null,"clear"):Ct(Ze)},fn=Ze=>{const Ge=Number(Ze.currentTarget.getAttribute("data-option-index"));Ee.current!==Ge&&je({event:Ze,index:Ge,reason:"mouse"})},Sn=Ze=>{je({event:Ze,index:Number(Ze.currentTarget.getAttribute("data-option-index")),reason:"touch"}),be.current=!0},ur=Ze=>{const Ge=Number(Ze.currentTarget.getAttribute("data-option-index"));gt(Ze,de[Ge],"selectOption"),be.current=!1},Aa=Ze=>Ge=>{const ot=X.slice();ot.splice(Ze,1),qt(Ge,ot,"removeOption",{option:X[Ze]})},Ta=Ze=>{lt?pt(Ze,"toggleInput"):Ct(Ze)},ns=Ze=>{Ze.currentTarget.contains(Ze.target)&&Ze.target.getAttribute("id")!==ce&&Ze.preventDefault()},Oo=Ze=>{Ze.currentTarget.contains(Ze.target)&&(He.current.focus(),re&&Ie.current&&He.current.selectionEnd-He.current.selectionStart===0&&He.current.select(),Ie.current=!1)},ea=Ze=>{!p&&(me===""||!lt)&&Ta(Ze)};let Io=S&&me.length>0;Io=Io||(k?X.length>0:X!==null);let ta=de;return T&&(ta=de.reduce((Ze,Ge,ot)=>{const J=T(Ge);return Ze.length>0&&Ze[Ze.length-1].group===J?Ze[Ze.length-1].options.push(Ge):Ze.push({key:ot,index:ot,group:J,options:[Ge]}),Ze},[])),p&&Ne&&Zn(),{getRootProps:(Ze={})=>Q({"aria-owns":Se?`${ce}-listbox`:null},Ze,{onKeyDown:Vt(Ze),onMouseDown:ns,onClick:Oo}),getInputLabelProps:()=>({id:`${ce}-label`,htmlFor:ce}),getInputProps:()=>({id:ce,value:me,onBlur:Zn,onFocus:bn,onChange:Cr,onMouseDown:ea,"aria-activedescendant":pe?"":null,"aria-autocomplete":r?"both":"list","aria-controls":Se?`${ce}-listbox`:void 0,"aria-expanded":Se,autoComplete:"off",ref:He,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:p}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:mt}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:Ta}),getTagProps:({index:Ze})=>Q({key:Ze,"data-tag-index":Ze,tabIndex:-1},!te&&{onDelete:Aa(Ze)}),getListboxProps:()=>({role:"listbox",id:`${ce}-listbox`,"aria-labelledby":`${ce}-label`,ref:wt,onMouseDown:Ze=>{Ze.preventDefault()}}),getOptionProps:({index:Ze,option:Ge})=>{const ot=(k?X:[X]).some(_e=>_e!=null&&N(Ge,_e)),J=w?w(Ge):!1;return{key:Ce(Ge),tabIndex:-1,role:"option",id:`${ce}-option-${Ze}`,onMouseMove:fn,onClick:ur,onTouchStart:Sn,"data-option-index":Ze,"aria-disabled":J,"aria-selected":ot}},id:ce,inputValue:me,value:X,dirty:Io,expanded:pe&&Qe,popupOpen:pe,focused:Ne||Xe!==-1,anchorEl:Qe,setAnchorEl:ct,focusedTag:Xe,groupedOptions:ta}}const cue=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],fue=ut(qle,{name:"MuiPopper",slot:"Root",overridesResolver:(t,e)=>e.root})({}),due=H.forwardRef(function(e,n){var r;const i=nH(),o=nn({props:e,name:"MuiPopper"}),{anchorEl:a,component:s,components:l,componentsProps:u,container:c,disablePortal:f,keepMounted:d,modifiers:p,open:y,placement:x,popperOptions:_,popperRef:v,transition:S,slots:w,slotProps:E}=o,T=vt(o,cue),C=(r=w==null?void 0:w.root)!=null?r:l==null?void 0:l.Root,D=Q({anchorEl:a,container:c,disablePortal:f,keepMounted:d,modifiers:p,open:y,placement:x,popperOptions:_,popperRef:v,transition:S},T);return F.jsx(fue,Q({as:s,direction:i==null?void 0:i.direction,slots:{root:C},slotProps:E??u},D,{ref:n}))}),SH=due;function hue(t){return Zt("MuiListSubheader",t)}Yt("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const pue=["className","color","component","disableGutters","disableSticky","inset"],mue=t=>{const{classes:e,color:n,disableGutters:r,inset:i,disableSticky:o}=t,a={root:["root",n!=="default"&&`color${rt(n)}`,!r&&"gutters",i&&"inset",!o&&"sticky"]};return en(a,hue,e)},gue=ut("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.color!=="default"&&e[`color${rt(n.color)}`],!n.disableGutters&&e.gutters,n.inset&&e.inset,!n.disableSticky&&e.sticky]}})(({theme:t,ownerState:e})=>Q({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)},e.color==="primary"&&{color:(t.vars||t).palette.primary.main},e.color==="inherit"&&{color:"inherit"},!e.disableGutters&&{paddingLeft:16,paddingRight:16},e.inset&&{paddingLeft:72},!e.disableSticky&&{position:"sticky",top:0,zIndex:1,backgroundColor:(t.vars||t).palette.background.paper})),EH=H.forwardRef(function(e,n){const r=nn({props:e,name:"MuiListSubheader"}),{className:i,color:o="default",component:a="li",disableGutters:s=!1,disableSticky:l=!1,inset:u=!1}=r,c=vt(r,pue),f=Q({},r,{color:o,component:a,disableGutters:s,disableSticky:l,inset:u}),d=mue(f);return F.jsx(gue,Q({as:a,className:xt(d.root,i),ref:n,ownerState:f},c))});EH.muiSkipListHighlight=!0;const vue=EH,yue=pf(F.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"}),"Cancel");function xue(t){return Zt("MuiChip",t)}const bue=Yt("MuiChip",["root","sizeSmall","sizeMedium","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"]),Yn=bue,_ue=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],wue=t=>{const{classes:e,disabled:n,size:r,color:i,iconColor:o,onDelete:a,clickable:s,variant:l}=t,u={root:["root",l,n&&"disabled",`size${rt(r)}`,`color${rt(i)}`,s&&"clickable",s&&`clickableColor${rt(i)}`,a&&"deletable",a&&`deletableColor${rt(i)}`,`${l}${rt(i)}`],label:["label",`label${rt(r)}`],avatar:["avatar",`avatar${rt(r)}`,`avatarColor${rt(i)}`],icon:["icon",`icon${rt(r)}`,`iconColor${rt(o)}`],deleteIcon:["deleteIcon",`deleteIcon${rt(r)}`,`deleteIconColor${rt(i)}`,`deleteIcon${rt(l)}Color${rt(i)}`]};return en(u,xue,e)},Sue=ut("div",{name:"MuiChip",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t,{color:r,iconColor:i,clickable:o,onDelete:a,size:s,variant:l}=n;return[{[`& .${Yn.avatar}`]:e.avatar},{[`& .${Yn.avatar}`]:e[`avatar${rt(s)}`]},{[`& .${Yn.avatar}`]:e[`avatarColor${rt(r)}`]},{[`& .${Yn.icon}`]:e.icon},{[`& .${Yn.icon}`]:e[`icon${rt(s)}`]},{[`& .${Yn.icon}`]:e[`iconColor${rt(i)}`]},{[`& .${Yn.deleteIcon}`]:e.deleteIcon},{[`& .${Yn.deleteIcon}`]:e[`deleteIcon${rt(s)}`]},{[`& .${Yn.deleteIcon}`]:e[`deleteIconColor${rt(r)}`]},{[`& .${Yn.deleteIcon}`]:e[`deleteIcon${rt(l)}Color${rt(r)}`]},e.root,e[`size${rt(s)}`],e[`color${rt(r)}`],o&&e.clickable,o&&r!=="default"&&e[`clickableColor${rt(r)})`],a&&e.deletable,a&&r!=="default"&&e[`deletableColor${rt(r)}`],e[l],e[`${l}${rt(r)}`]]}})(({theme:t,ownerState:e})=>{const n=t.palette.mode==="light"?t.palette.grey[700]:t.palette.grey[300];return Q({maxWidth:"100%",fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,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",[`&.${Yn.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${Yn.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:t.vars?t.vars.palette.Chip.defaultAvatarColor:n,fontSize:t.typography.pxToRem(12)},[`& .${Yn.avatarColorPrimary}`]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.dark},[`& .${Yn.avatarColorSecondary}`]:{color:(t.vars||t).palette.secondary.contrastText,backgroundColor:(t.vars||t).palette.secondary.dark},[`& .${Yn.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:t.typography.pxToRem(10)},[`& .${Yn.icon}`]:Q({marginLeft:5,marginRight:-6},e.size==="small"&&{fontSize:18,marginLeft:4,marginRight:-4},e.iconColor===e.color&&Q({color:t.vars?t.vars.palette.Chip.defaultIconColor:n},e.color!=="default"&&{color:"inherit"})),[`& .${Yn.deleteIcon}`]:Q({WebkitTapHighlightColor:"transparent",color:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / 0.26)`:Un(t.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / 0.4)`:Un(t.palette.text.primary,.4)}},e.size==="small"&&{fontSize:16,marginRight:4,marginLeft:-4},e.color!=="default"&&{color:t.vars?`rgba(${t.vars.palette[e.color].contrastTextChannel} / 0.7)`:Un(t.palette[e.color].contrastText,.7),"&:hover, &:active":{color:(t.vars||t).palette[e.color].contrastText}})},e.size==="small"&&{height:24},e.color!=="default"&&{backgroundColor:(t.vars||t).palette[e.color].main,color:(t.vars||t).palette[e.color].contrastText},e.onDelete&&{[`&.${Yn.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.action.selectedChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:Un(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},e.onDelete&&e.color!=="default"&&{[`&.${Yn.focusVisible}`]:{backgroundColor:(t.vars||t).palette[e.color].dark}})},({theme:t,ownerState:e})=>Q({},e.clickable&&{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.selectedChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:Un(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity)},[`&.${Yn.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.action.selectedChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:Un(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)},"&:active":{boxShadow:(t.vars||t).shadows[1]}},e.clickable&&e.color!=="default"&&{[`&:hover, &.${Yn.focusVisible}`]:{backgroundColor:(t.vars||t).palette[e.color].dark}}),({theme:t,ownerState:e})=>Q({},e.variant==="outlined"&&{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]}`,[`&.${Yn.clickable}:hover`]:{backgroundColor:(t.vars||t).palette.action.hover},[`&.${Yn.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`& .${Yn.avatar}`]:{marginLeft:4},[`& .${Yn.avatarSmall}`]:{marginLeft:2},[`& .${Yn.icon}`]:{marginLeft:4},[`& .${Yn.iconSmall}`]:{marginLeft:2},[`& .${Yn.deleteIcon}`]:{marginRight:5},[`& .${Yn.deleteIconSmall}`]:{marginRight:3}},e.variant==="outlined"&&e.color!=="default"&&{color:(t.vars||t).palette[e.color].main,border:`1px solid ${t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / 0.7)`:Un(t.palette[e.color].main,.7)}`,[`&.${Yn.clickable}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Un(t.palette[e.color].main,t.palette.action.hoverOpacity)},[`&.${Yn.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.focusOpacity})`:Un(t.palette[e.color].main,t.palette.action.focusOpacity)},[`& .${Yn.deleteIcon}`]:{color:t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / 0.7)`:Un(t.palette[e.color].main,.7),"&:hover, &:active":{color:(t.vars||t).palette[e.color].main}}})),Eue=ut("span",{name:"MuiChip",slot:"Label",overridesResolver:(t,e)=>{const{ownerState:n}=t,{size:r}=n;return[e.label,e[`label${rt(r)}`]]}})(({ownerState:t})=>Q({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},t.variant==="outlined"&&{paddingLeft:11,paddingRight:11},t.size==="small"&&{paddingLeft:8,paddingRight:8},t.size==="small"&&t.variant==="outlined"&&{paddingLeft:7,paddingRight:7}));function h8(t){return t.key==="Backspace"||t.key==="Delete"}const Mue=H.forwardRef(function(e,n){const r=nn({props:e,name:"MuiChip"}),{avatar:i,className:o,clickable:a,color:s="default",component:l,deleteIcon:u,disabled:c=!1,icon:f,label:d,onClick:p,onDelete:y,onKeyDown:x,onKeyUp:_,size:v="medium",variant:S="filled",tabIndex:w,skipFocusWhenDisabled:E=!1}=r,T=vt(r,_ue),C=H.useRef(null),D=Jr(C,n),O=U=>{U.stopPropagation(),y&&y(U)},P=U=>{U.currentTarget===U.target&&h8(U)&&U.preventDefault(),x&&x(U)},N=U=>{U.currentTarget===U.target&&(y&&h8(U)?y(U):U.key==="Escape"&&C.current&&C.current.blur()),_&&_(U)},k=a!==!1&&p?!0:a,G=k||y?$p:l||"div",Z=Q({},r,{component:G,disabled:c,size:v,color:s,iconColor:H.isValidElement(f)&&f.props.color||s,onDelete:!!y,clickable:k,variant:S}),j=wue(Z),K=G===$p?Q({component:l||"div",focusVisibleClassName:j.focusVisible},y&&{disableRipple:!0}):{};let Y=null;y&&(Y=u&&H.isValidElement(u)?H.cloneElement(u,{className:xt(u.props.className,j.deleteIcon),onClick:O}):F.jsx(yue,{className:xt(j.deleteIcon),onClick:O}));let $=null;i&&H.isValidElement(i)&&($=H.cloneElement(i,{className:xt(j.avatar,i.props.className)}));let W=null;return f&&H.isValidElement(f)&&(W=H.cloneElement(f,{className:xt(j.icon,f.props.className)})),F.jsxs(Sue,Q({as:G,className:xt(j.root,o),disabled:k&&c?!0:void 0,onClick:p,onKeyDown:P,onKeyUp:N,ref:D,tabIndex:E&&c?-1:w,ownerState:Z},K,T,{children:[$||W,F.jsx(Eue,{className:xt(j.label),ownerState:Z,children:d}),Y]}))}),Cue=Mue;function eh({props:t,states:e,muiFormControl:n}){return e.reduce((r,i)=>(r[i]=t[i],n&&typeof t[i]>"u"&&(r[i]=n[i]),r),{})}const Aue=H.createContext(void 0),tC=Aue;function ic(){return H.useContext(tC)}function Tue(t){return F.jsx(coe,Q({},t,{defaultTheme:ZM,themeId:yb}))}function p8(t){return t!=null&&!(Array.isArray(t)&&t.length===0)}function t2(t,e=!1){return t&&(p8(t.value)&&t.value!==""||e&&p8(t.defaultValue)&&t.defaultValue!=="")}function Due(t){return t.startAdornment}function Rue(t){return Zt("MuiInputBase",t)}const Pue=Yt("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),Ms=Pue,Nue=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],nC=(t,e)=>{const{ownerState:n}=t;return[e.root,n.formControl&&e.formControl,n.startAdornment&&e.adornedStart,n.endAdornment&&e.adornedEnd,n.error&&e.error,n.size==="small"&&e.sizeSmall,n.multiline&&e.multiline,n.color&&e[`color${rt(n.color)}`],n.fullWidth&&e.fullWidth,n.hiddenLabel&&e.hiddenLabel]},rC=(t,e)=>{const{ownerState:n}=t;return[e.input,n.size==="small"&&e.inputSizeSmall,n.multiline&&e.inputMultiline,n.type==="search"&&e.inputTypeSearch,n.startAdornment&&e.inputAdornedStart,n.endAdornment&&e.inputAdornedEnd,n.hiddenLabel&&e.inputHiddenLabel]},Oue=t=>{const{classes:e,color:n,disabled:r,error:i,endAdornment:o,focused:a,formControl:s,fullWidth:l,hiddenLabel:u,multiline:c,readOnly:f,size:d,startAdornment:p,type:y}=t,x={root:["root",`color${rt(n)}`,r&&"disabled",i&&"error",l&&"fullWidth",a&&"focused",s&&"formControl",d&&d!=="medium"&&`size${rt(d)}`,c&&"multiline",p&&"adornedStart",o&&"adornedEnd",u&&"hiddenLabel",f&&"readOnly"],input:["input",r&&"disabled",y==="search"&&"inputTypeSearch",c&&"inputMultiline",d==="small"&&"inputSizeSmall",u&&"inputHiddenLabel",p&&"inputAdornedStart",o&&"inputAdornedEnd",f&&"readOnly"]};return en(x,Rue,e)},iC=ut("div",{name:"MuiInputBase",slot:"Root",overridesResolver:nC})(({theme:t,ownerState:e})=>Q({},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",[`&.${Ms.disabled}`]:{color:(t.vars||t).palette.text.disabled,cursor:"default"}},e.multiline&&Q({padding:"4px 0 5px"},e.size==="small"&&{paddingTop:1}),e.fullWidth&&{width:"100%"})),oC=ut("input",{name:"MuiInputBase",slot:"Input",overridesResolver:rC})(({theme:t,ownerState:e})=>{const n=t.palette.mode==="light",r=Q({color:"currentColor"},t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5},{transition:t.transitions.create("opacity",{duration:t.transitions.duration.shorter})}),i={opacity:"0 !important"},o=t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5};return Q({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%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${Ms.formControl} &`]:{"&::-webkit-input-placeholder":i,"&::-moz-placeholder":i,"&:-ms-input-placeholder":i,"&::-ms-input-placeholder":i,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus:-ms-input-placeholder":o,"&:focus::-ms-input-placeholder":o},[`&.${Ms.disabled}`]:{opacity:1,WebkitTextFillColor:(t.vars||t).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},e.size==="small"&&{paddingTop:1},e.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},e.type==="search"&&{MozAppearance:"textfield"})}),Iue=F.jsx(Tue,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),Fue=H.forwardRef(function(e,n){var r;const i=nn({props:e,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:a,autoFocus:s,className:l,components:u={},componentsProps:c={},defaultValue:f,disabled:d,disableInjectingGlobalStyles:p,endAdornment:y,fullWidth:x=!1,id:_,inputComponent:v="input",inputProps:S={},inputRef:w,maxRows:E,minRows:T,multiline:C=!1,name:D,onBlur:O,onChange:P,onClick:N,onFocus:k,onKeyDown:G,onKeyUp:Z,placeholder:j,readOnly:K,renderSuffix:Y,rows:$,slotProps:W={},slots:U={},startAdornment:te,type:re="text",value:le}=i,ce=vt(i,Nue),Ce=S.value!=null?S.value:le,{current:Re}=H.useRef(Ce!=null),Ie=H.useRef(),He=H.useCallback(de=>{},[]),tt=Jr(Ie,w,S.ref,He),[Qe,ct]=H.useState(!1),Xe=ic(),ue=eh({props:i,muiFormControl:Xe,states:["color","disabled","error","hiddenLabel","size","required","filled"]});ue.focused=Xe?Xe.focused:Qe,H.useEffect(()=>{!Xe&&d&&Qe&&(ct(!1),O&&O())},[Xe,d,Qe,O]);const De=Xe&&Xe.onFilled,Ee=Xe&&Xe.onEmpty,X=H.useCallback(de=>{t2(de)?De&&De():Ee&&Ee()},[De,Ee]);_l(()=>{Re&&X({value:Ce})},[Ce,X,Re]);const ne=de=>{if(ue.disabled){de.stopPropagation();return}k&&k(de),S.onFocus&&S.onFocus(de),Xe&&Xe.onFocus?Xe.onFocus(de):ct(!0)},me=de=>{O&&O(de),S.onBlur&&S.onBlur(de),Xe&&Xe.onBlur?Xe.onBlur(de):ct(!1)},we=(de,...ve)=>{if(!Re){const Se=de.target||Ie.current;if(Se==null)throw new Error(Ud(1));X({value:Se.value})}S.onChange&&S.onChange(de,...ve),P&&P(de,...ve)};H.useEffect(()=>{X(Ie.current)},[]);const Ne=de=>{Ie.current&&de.currentTarget===de.target&&Ie.current.focus(),N&&N(de)};let Ue=v,We=S;C&&Ue==="input"&&($?We=Q({type:void 0,minRows:$,maxRows:$},We):We=Q({type:void 0,maxRows:E,minRows:T},We),Ue=oue);const lt=de=>{X(de.animationName==="mui-auto-fill-cancel"?Ie.current:{value:"x"})};H.useEffect(()=>{Xe&&Xe.setAdornedStart(!!te)},[Xe,te]);const z=Q({},i,{color:ue.color||"primary",disabled:ue.disabled,endAdornment:y,error:ue.error,focused:ue.focused,formControl:Xe,fullWidth:x,hiddenLabel:ue.hiddenLabel,multiline:C,size:ue.size,startAdornment:te,type:re}),B=Oue(z),oe=U.root||u.Root||iC,ge=W.root||c.root||{},pe=U.input||u.Input||oC;return We=Q({},We,(r=W.input)!=null?r:c.input),F.jsxs(H.Fragment,{children:[!p&&Iue,F.jsxs(oe,Q({},ge,!Qg(oe)&&{ownerState:Q({},z,ge.ownerState)},{ref:n,onClick:Ne},ce,{className:xt(B.root,ge.className,l,K&&"MuiInputBase-readOnly"),children:[te,F.jsx(tC.Provider,{value:null,children:F.jsx(pe,Q({ownerState:z,"aria-invalid":ue.error,"aria-describedby":o,autoComplete:a,autoFocus:s,defaultValue:f,disabled:ue.disabled,id:_,onAnimationStart:lt,name:D,placeholder:j,readOnly:K,required:ue.required,rows:$,value:Ce,onKeyDown:G,onKeyUp:Z,type:re},We,!Qg(pe)&&{as:Ue,ownerState:Q({},z,We.ownerState)},{ref:tt,className:xt(B.input,We.className,K&&"MuiInputBase-readOnly"),onBlur:me,onChange:we,onFocus:ne}))}),y,Y?Y(Q({},ue,{startAdornment:te})):null]}))]})}),VO=Fue;function Lue(t){return Zt("MuiInput",t)}const kue=Q({},Ms,Yt("MuiInput",["root","underline","input"])),gd=kue;function Bue(t){return Zt("MuiOutlinedInput",t)}const Uue=Q({},Ms,Yt("MuiOutlinedInput",["root","notchedOutline","input"])),Nu=Uue;function zue(t){return Zt("MuiFilledInput",t)}const $ue=Q({},Ms,Yt("MuiFilledInput",["root","underline","input"])),Cs=$ue,MH=pf(F.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");function Hue(t){return Zt("MuiAutocomplete",t)}const Vue=Yt("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"]),kn=Vue;var m8,g8;const Wue=["autoComplete","autoHighlight","autoSelect","blurOnSelect","ChipProps","className","clearIcon","clearOnBlur","clearOnEscape","clearText","closeText","componentsProps","defaultValue","disableClearable","disableCloseOnSelect","disabled","disabledItemsFocusable","disableListWrap","disablePortal","filterOptions","filterSelectedOptions","forcePopupIcon","freeSolo","fullWidth","getLimitTagsText","getOptionDisabled","getOptionLabel","isOptionEqualToValue","groupBy","handleHomeEndKeys","id","includeInputInList","inputValue","limitTags","ListboxComponent","ListboxProps","loading","loadingText","multiple","noOptionsText","onChange","onClose","onHighlightChange","onInputChange","onOpen","open","openOnFocus","openText","options","PaperComponent","PopperComponent","popupIcon","readOnly","renderGroup","renderInput","renderOption","renderTags","selectOnFocus","size","slotProps","value"],Gue=["ref"],jue=t=>{const{classes:e,disablePortal:n,expanded:r,focused:i,fullWidth:o,hasClearIcon:a,hasPopupIcon:s,inputFocused:l,popupOpen:u,size:c}=t,f={root:["root",r&&"expanded",i&&"focused",o&&"fullWidth",a&&"hasClearIcon",s&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",l&&"inputFocused"],tag:["tag",`tagSize${rt(c)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",u&&"popupIndicatorOpen"],popper:["popper",n&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return en(f,Hue,e)},que=ut("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t,{fullWidth:r,hasClearIcon:i,hasPopupIcon:o,inputFocused:a,size:s}=n;return[{[`& .${kn.tag}`]:e.tag},{[`& .${kn.tag}`]:e[`tagSize${rt(s)}`]},{[`& .${kn.inputRoot}`]:e.inputRoot},{[`& .${kn.input}`]:e.input},{[`& .${kn.input}`]:a&&e.inputFocused},e.root,r&&e.fullWidth,o&&e.hasPopupIcon,i&&e.hasClearIcon]}})(({ownerState:t})=>Q({[`&.${kn.focused} .${kn.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${kn.clearIndicator}`]:{visibility:"visible"}}},t.fullWidth&&{width:"100%"},{[`& .${kn.tag}`]:Q({margin:3,maxWidth:"calc(100% - 6px)"},t.size==="small"&&{margin:2,maxWidth:"calc(100% - 4px)"}),[`& .${kn.inputRoot}`]:{flexWrap:"wrap",[`.${kn.hasPopupIcon}&, .${kn.hasClearIcon}&`]:{paddingRight:26+4},[`.${kn.hasPopupIcon}.${kn.hasClearIcon}&`]:{paddingRight:52+4},[`& .${kn.input}`]:{width:0,minWidth:30}},[`& .${gd.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${gd.root}.${Ms.sizeSmall}`]:{[`& .${gd.input}`]:{padding:"2px 4px 3px 0"}},[`& .${Nu.root}`]:{padding:9,[`.${kn.hasPopupIcon}&, .${kn.hasClearIcon}&`]:{paddingRight:26+4+9},[`.${kn.hasPopupIcon}.${kn.hasClearIcon}&`]:{paddingRight:52+4+9},[`& .${kn.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${kn.endAdornment}`]:{right:9}},[`& .${Nu.root}.${Ms.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${kn.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${Cs.root}`]:{paddingTop:19,paddingLeft:8,[`.${kn.hasPopupIcon}&, .${kn.hasClearIcon}&`]:{paddingRight:26+4+9},[`.${kn.hasPopupIcon}.${kn.hasClearIcon}&`]:{paddingRight:52+4+9},[`& .${Cs.input}`]:{padding:"7px 4px"},[`& .${kn.endAdornment}`]:{right:9}},[`& .${Cs.root}.${Ms.sizeSmall}`]:{paddingBottom:1,[`& .${Cs.input}`]:{padding:"2.5px 4px"}},[`& .${Ms.hiddenLabel}`]:{paddingTop:8},[`& .${Cs.root}.${Ms.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${kn.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${Cs.root}.${Ms.hiddenLabel}.${Ms.sizeSmall}`]:{[`& .${kn.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${kn.input}`]:Q({flexGrow:1,textOverflow:"ellipsis",opacity:0},t.inputFocused&&{opacity:1})})),Xue=ut("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(t,e)=>e.endAdornment})({position:"absolute",right:0,top:"calc(50% - 14px)"}),Yue=ut(QM,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(t,e)=>e.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),Kue=ut(QM,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:({ownerState:t},e)=>Q({},e.popupIndicator,t.popupOpen&&e.popupIndicatorOpen)})(({ownerState:t})=>Q({padding:2,marginRight:-2},t.popupOpen&&{transform:"rotate(180deg)"})),Zue=ut(SH,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${kn.option}`]:e.option},e.popper,n.disablePortal&&e.popperDisablePortal]}})(({theme:t,ownerState:e})=>Q({zIndex:(t.vars||t).zIndex.modal},e.disablePortal&&{position:"absolute"})),Jue=ut(gf,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(t,e)=>e.paper})(({theme:t})=>Q({},t.typography.body1,{overflow:"auto"})),Que=ut("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(t,e)=>e.loading})(({theme:t})=>({color:(t.vars||t).palette.text.secondary,padding:"14px 16px"})),ece=ut("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(t,e)=>e.noOptions})(({theme:t})=>({color:(t.vars||t).palette.text.secondary,padding:"14px 16px"})),tce=ut("div",{name:"MuiAutocomplete",slot:"Listbox",overridesResolver:(t,e)=>e.listbox})(({theme:t})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${kn.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"},[`&.${kn.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"},[`&.${kn.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Un(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${kn.focused}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:Un(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(t.vars||t).palette.action.selected}},[`&.${kn.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:Un(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}}}})),nce=ut(vue,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(t,e)=>e.groupLabel})(({theme:t})=>({backgroundColor:(t.vars||t).palette.background.paper,top:-8})),rce=ut("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(t,e)=>e.groupUl})({padding:0,[`& .${kn.option}`]:{paddingLeft:24}}),ice=H.forwardRef(function(e,n){var r,i,o,a;const s=nn({props:e,name:"MuiAutocomplete"}),{autoComplete:l=!1,autoHighlight:u=!1,autoSelect:c=!1,blurOnSelect:f=!1,ChipProps:d,className:p,clearIcon:y=m8||(m8=F.jsx(ise,{fontSize:"small"})),clearOnBlur:x=!s.freeSolo,clearOnEscape:_=!1,clearText:v="Clear",closeText:S="Close",componentsProps:w={},defaultValue:E=s.multiple?[]:null,disableClearable:T=!1,disableCloseOnSelect:C=!1,disabled:D=!1,disabledItemsFocusable:O=!1,disableListWrap:P=!1,disablePortal:N=!1,filterSelectedOptions:k=!1,forcePopupIcon:G="auto",freeSolo:Z=!1,fullWidth:j=!1,getLimitTagsText:K=ot=>`+${ot}`,getOptionLabel:Y,groupBy:$,handleHomeEndKeys:W=!s.freeSolo,includeInputInList:U=!1,limitTags:te=-1,ListboxComponent:re="ul",ListboxProps:le,loading:ce=!1,loadingText:Ce="Loading…",multiple:Re=!1,noOptionsText:Ie="No options",openOnFocus:He=!1,openText:tt="Open",PaperComponent:Qe=gf,PopperComponent:ct=SH,popupIcon:Xe=g8||(g8=F.jsx(MH,{})),readOnly:ue=!1,renderGroup:De,renderInput:Ee,renderOption:X,renderTags:ne,selectOnFocus:me=!s.freeSolo,size:we="medium",slotProps:Ne={}}=s,Ue=vt(s,Wue),{getRootProps:We,getInputProps:lt,getInputLabelProps:z,getPopupIndicatorProps:B,getClearProps:oe,getTagProps:ge,getListboxProps:pe,getOptionProps:de,value:ve,dirty:Se,expanded:Pe,id:Be,popupOpen:je,focused:Le,focusedTag:_t,anchorEl:bt,setAnchorEl:wt,inputValue:Ct,groupedOptions:pt}=uue(Q({},s,{componentName:"Autocomplete"})),qt=!T&&!D&&Se&&!ue,be=(!Z||G===!0)&&G!==!1,{onMouseDown:gt}=lt(),{ref:ft}=le??{},Ye=pe(),{ref:mt}=Ye,Vt=vt(Ye,Gue),bn=Jr(mt,ft),Cr=Y||(ot=>{var J;return(J=ot.label)!=null?J:ot}),fn=Q({},s,{disablePortal:N,expanded:Pe,focused:Le,fullWidth:j,getOptionLabel:Cr,hasClearIcon:qt,hasPopupIcon:be,inputFocused:_t===-1,popupOpen:je,size:we}),Sn=jue(fn);let ur;if(Re&&ve.length>0){const ot=J=>Q({className:Sn.tag,disabled:D},ge(J));ne?ur=ne(ve,ot,fn):ur=ve.map((J,_e)=>F.jsx(Cue,Q({label:Cr(J),size:we},ot({index:_e}),d)))}if(te>-1&&Array.isArray(ur)){const ot=ur.length-te;!Le&&ot>0&&(ur=ur.splice(0,te),ur.push(F.jsx("span",{className:Sn.tag,children:K(ot)},ur.length)))}const Ta=De||(ot=>F.jsxs("li",{children:[F.jsx(nce,{className:Sn.groupLabel,ownerState:fn,component:"div",children:ot.group}),F.jsx(rce,{className:Sn.groupUl,ownerState:fn,children:ot.children})]},ot.key)),Oo=X||((ot,J)=>F.jsx("li",Q({},ot,{children:Cr(J)}))),ea=(ot,J)=>{const _e=de({option:ot,index:J});return Oo(Q({},_e,{className:Sn.option}),ot,{selected:_e["aria-selected"],index:J,inputValue:Ct},fn)},Io=(r=Ne.clearIndicator)!=null?r:w.clearIndicator,ta=(i=Ne.paper)!=null?i:w.paper,Ze=(o=Ne.popper)!=null?o:w.popper,Ge=(a=Ne.popupIndicator)!=null?a:w.popupIndicator;return F.jsxs(H.Fragment,{children:[F.jsx(que,Q({ref:n,className:xt(Sn.root,p),ownerState:fn},We(Ue),{children:Ee({id:Be,disabled:D,fullWidth:!0,size:we==="small"?"small":void 0,InputLabelProps:z(),InputProps:Q({ref:wt,className:Sn.inputRoot,startAdornment:ur,onClick:ot=>{ot.target===ot.currentTarget&>(ot)}},(qt||be)&&{endAdornment:F.jsxs(Xue,{className:Sn.endAdornment,ownerState:fn,children:[qt?F.jsx(Yue,Q({},oe(),{"aria-label":v,title:v,ownerState:fn},Io,{className:xt(Sn.clearIndicator,Io==null?void 0:Io.className),children:y})):null,be?F.jsx(Kue,Q({},B(),{disabled:D,"aria-label":je?S:tt,title:je?S:tt,ownerState:fn},Ge,{className:xt(Sn.popupIndicator,Ge==null?void 0:Ge.className),children:Xe})):null]})}),inputProps:Q({className:Sn.input,disabled:D,readOnly:ue},lt())})})),bt?F.jsx(Zue,Q({as:ct,disablePortal:N,style:{width:bt?bt.clientWidth:null},ownerState:fn,role:"presentation",anchorEl:bt,open:je},Ze,{className:xt(Sn.popper,Ze==null?void 0:Ze.className),children:F.jsxs(Jue,Q({ownerState:fn,as:Qe},ta,{className:xt(Sn.paper,ta==null?void 0:ta.className),children:[ce&&pt.length===0?F.jsx(Que,{className:Sn.loading,ownerState:fn,children:Ce}):null,pt.length===0&&!Z&&!ce?F.jsx(ece,{className:Sn.noOptions,ownerState:fn,role:"presentation",onMouseDown:ot=>{ot.preventDefault()},children:Ie}):null,pt.length>0?F.jsx(tce,Q({as:re,className:Sn.listbox,ownerState:fn},Vt,le,{ref:bn,children:pt.map((ot,J)=>$?Ta({key:ot.key,group:ot.group,children:ot.options.map((_e,Oe)=>ea(_e,ot.index+Oe))}):ea(ot,J))})):null]}))})):null]})}),v8=ice,oce=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],ace={entering:{opacity:1},entered:{opacity:1}},sce=H.forwardRef(function(e,n){const r=Qp(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:o,appear:a=!0,children:s,easing:l,in:u,onEnter:c,onEntered:f,onEntering:d,onExit:p,onExited:y,onExiting:x,style:_,timeout:v=i,TransitionComponent:S=NO}=e,w=vt(e,oce),E=H.useRef(null),T=Jr(E,s.ref,n),C=j=>K=>{if(j){const Y=E.current;K===void 0?j(Y):j(Y,K)}},D=C(d),O=C((j,K)=>{FO(j);const Y=Jg({style:_,timeout:v,easing:l},{mode:"enter"});j.style.webkitTransition=r.transitions.create("opacity",Y),j.style.transition=r.transitions.create("opacity",Y),c&&c(j,K)}),P=C(f),N=C(x),k=C(j=>{const K=Jg({style:_,timeout:v,easing:l},{mode:"exit"});j.style.webkitTransition=r.transitions.create("opacity",K),j.style.transition=r.transitions.create("opacity",K),p&&p(j)}),G=C(y),Z=j=>{o&&o(E.current,j)};return F.jsx(S,Q({appear:a,in:u,nodeRef:E,onEnter:O,onEntered:P,onEntering:D,onExit:k,onExited:G,onExiting:N,addEndListener:Z,timeout:v},w,{children:(j,K)=>H.cloneElement(s,Q({style:Q({opacity:0,visibility:j==="exited"&&!u?"hidden":void 0},ace[j],_,s.props.style),ref:T},K))}))}),CH=sce;function lce(t){return Zt("MuiBackdrop",t)}Yt("MuiBackdrop",["root","invisible"]);const uce=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],cce=t=>{const{classes:e,invisible:n}=t;return en({root:["root",n&&"invisible"]},lce,e)},fce=ut("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.invisible&&e.invisible]}})(({ownerState:t})=>Q({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"},t.invisible&&{backgroundColor:"transparent"})),dce=H.forwardRef(function(e,n){var r,i,o;const a=nn({props:e,name:"MuiBackdrop"}),{children:s,className:l,component:u="div",components:c={},componentsProps:f={},invisible:d=!1,open:p,slotProps:y={},slots:x={},TransitionComponent:_=CH,transitionDuration:v}=a,S=vt(a,uce),w=Q({},a,{component:u,invisible:d}),E=cce(w),T=(r=y.root)!=null?r:f.root;return F.jsx(_,Q({in:p,timeout:v},S,{children:F.jsx(fce,Q({"aria-hidden":!0},T,{as:(i=(o=x.root)!=null?o:c.Root)!=null?i:u,className:xt(E.root,l,T==null?void 0:T.className),ownerState:Q({},w,T==null?void 0:T.ownerState),classes:E,ref:n,children:s}))}))}),AH=dce,hce=cH(),pce=poe({themeId:yb,defaultTheme:hce,defaultClassName:"MuiBox-root",generateClassName:mO.generate}),sf=pce;function mce(t){return Zt("MuiButton",t)}const gce=Yt("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","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),Rw=gce,vce=H.createContext({}),yce=vce,xce=H.createContext(void 0),bce=xce,_ce=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],wce=t=>{const{color:e,disableElevation:n,fullWidth:r,size:i,variant:o,classes:a}=t,s={root:["root",o,`${o}${rt(e)}`,`size${rt(i)}`,`${o}Size${rt(i)}`,e==="inherit"&&"colorInherit",n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${rt(i)}`],endIcon:["endIcon",`iconSize${rt(i)}`]},l=en(s,mce,a);return Q({},a,l)},TH=t=>Q({},t.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},t.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},t.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),Sce=ut($p,{shouldForwardProp:t=>Ro(t)||t==="classes",name:"MuiButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`${n.variant}${rt(n.color)}`],e[`size${rt(n.size)}`],e[`${n.variant}Size${rt(n.size)}`],n.color==="inherit"&&e.colorInherit,n.disableElevation&&e.disableElevation,n.fullWidth&&e.fullWidth]}})(({theme:t,ownerState:e})=>{var n,r;const i=t.palette.mode==="light"?t.palette.grey[300]:t.palette.grey[800],o=t.palette.mode==="light"?t.palette.grey.A100:t.palette.grey[700];return Q({},t.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create(["background-color","box-shadow","border-color","color"],{duration:t.transitions.duration.short}),"&:hover":Q({textDecoration:"none",backgroundColor:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:Un(t.palette.text.primary,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},e.variant==="text"&&e.color!=="inherit"&&{backgroundColor:t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Un(t.palette[e.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},e.variant==="outlined"&&e.color!=="inherit"&&{border:`1px solid ${(t.vars||t).palette[e.color].main}`,backgroundColor:t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Un(t.palette[e.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},e.variant==="contained"&&{backgroundColor:t.vars?t.vars.palette.Button.inheritContainedHoverBg:o,boxShadow:(t.vars||t).shadows[4],"@media (hover: none)":{boxShadow:(t.vars||t).shadows[2],backgroundColor:(t.vars||t).palette.grey[300]}},e.variant==="contained"&&e.color!=="inherit"&&{backgroundColor:(t.vars||t).palette[e.color].dark,"@media (hover: none)":{backgroundColor:(t.vars||t).palette[e.color].main}}),"&:active":Q({},e.variant==="contained"&&{boxShadow:(t.vars||t).shadows[8]}),[`&.${Rw.focusVisible}`]:Q({},e.variant==="contained"&&{boxShadow:(t.vars||t).shadows[6]}),[`&.${Rw.disabled}`]:Q({color:(t.vars||t).palette.action.disabled},e.variant==="outlined"&&{border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`},e.variant==="contained"&&{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).palette.action.disabledBackground})},e.variant==="text"&&{padding:"6px 8px"},e.variant==="text"&&e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].main},e.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},e.variant==="outlined"&&e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].main,border:t.vars?`1px solid rgba(${t.vars.palette[e.color].mainChannel} / 0.5)`:`1px solid ${Un(t.palette[e.color].main,.5)}`},e.variant==="contained"&&{color:t.vars?t.vars.palette.text.primary:(n=(r=t.palette).getContrastText)==null?void 0:n.call(r,t.palette.grey[300]),backgroundColor:t.vars?t.vars.palette.Button.inheritContainedBg:i,boxShadow:(t.vars||t).shadows[2]},e.variant==="contained"&&e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].contrastText,backgroundColor:(t.vars||t).palette[e.color].main},e.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},e.size==="small"&&e.variant==="text"&&{padding:"4px 5px",fontSize:t.typography.pxToRem(13)},e.size==="large"&&e.variant==="text"&&{padding:"8px 11px",fontSize:t.typography.pxToRem(15)},e.size==="small"&&e.variant==="outlined"&&{padding:"3px 9px",fontSize:t.typography.pxToRem(13)},e.size==="large"&&e.variant==="outlined"&&{padding:"7px 21px",fontSize:t.typography.pxToRem(15)},e.size==="small"&&e.variant==="contained"&&{padding:"4px 10px",fontSize:t.typography.pxToRem(13)},e.size==="large"&&e.variant==="contained"&&{padding:"8px 22px",fontSize:t.typography.pxToRem(15)},e.fullWidth&&{width:"100%"})},({ownerState:t})=>t.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${Rw.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${Rw.disabled}`]:{boxShadow:"none"}}),Ece=ut("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.startIcon,e[`iconSize${rt(n.size)}`]]}})(({ownerState:t})=>Q({display:"inherit",marginRight:8,marginLeft:-4},t.size==="small"&&{marginLeft:-2},TH(t))),Mce=ut("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.endIcon,e[`iconSize${rt(n.size)}`]]}})(({ownerState:t})=>Q({display:"inherit",marginRight:-4,marginLeft:8},t.size==="small"&&{marginRight:-2},TH(t))),Cce=H.forwardRef(function(e,n){const r=H.useContext(yce),i=H.useContext(bce),o=pO(r,e),a=nn({props:o,name:"MuiButton"}),{children:s,color:l="primary",component:u="button",className:c,disabled:f=!1,disableElevation:d=!1,disableFocusRipple:p=!1,endIcon:y,focusVisibleClassName:x,fullWidth:_=!1,size:v="medium",startIcon:S,type:w,variant:E="text"}=a,T=vt(a,_ce),C=Q({},a,{color:l,component:u,disabled:f,disableElevation:d,disableFocusRipple:p,fullWidth:_,size:v,type:w,variant:E}),D=wce(C),O=S&&F.jsx(Ece,{className:D.startIcon,ownerState:C,children:S}),P=y&&F.jsx(Mce,{className:D.endIcon,ownerState:C,children:y}),N=i||"";return F.jsxs(Sce,Q({ownerState:C,className:xt(r.className,D.root,c,N),component:u,disabled:f,focusRipple:!p,focusVisibleClassName:xt(D.focusVisible,x),ref:n,type:w},T,{classes:D,children:[O,s,P]}))}),iv=Cce;function Ace(t){return Zt("MuiCard",t)}Yt("MuiCard",["root"]);const Tce=["className","raised"],Dce=t=>{const{classes:e}=t;return en({root:["root"]},Ace,e)},Rce=ut(gf,{name:"MuiCard",slot:"Root",overridesResolver:(t,e)=>e.root})(()=>({overflow:"hidden"})),Pce=H.forwardRef(function(e,n){const r=nn({props:e,name:"MuiCard"}),{className:i,raised:o=!1}=r,a=vt(r,Tce),s=Q({},r,{raised:o}),l=Dce(s);return F.jsx(Rce,Q({className:xt(l.root,i),elevation:o?8:void 0,ref:n,ownerState:s},a))}),aC=Pce;function Nce(t){return Zt("MuiCardContent",t)}Yt("MuiCardContent",["root"]);const Oce=["className","component"],Ice=t=>{const{classes:e}=t;return en({root:["root"]},Nce,e)},Fce=ut("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(t,e)=>e.root})(()=>({padding:16,"&:last-child":{paddingBottom:24}})),Lce=H.forwardRef(function(e,n){const r=nn({props:e,name:"MuiCardContent"}),{className:i,component:o="div"}=r,a=vt(r,Oce),s=Q({},r,{component:o}),l=Ice(s);return F.jsx(Fce,Q({as:o,className:xt(l.root,i),ownerState:s,ref:n},a))}),sC=Lce;function kce(t){return Zt("PrivateSwitchBase",t)}Yt("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const Bce=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],Uce=t=>{const{classes:e,checked:n,disabled:r,edge:i}=t,o={root:["root",n&&"checked",r&&"disabled",i&&`edge${rt(i)}`],input:["input"]};return en(o,kce,e)},zce=ut($p)(({ownerState:t})=>Q({padding:9,borderRadius:"50%"},t.edge==="start"&&{marginLeft:t.size==="small"?-3:-12},t.edge==="end"&&{marginRight:t.size==="small"?-3:-12})),$ce=ut("input",{shouldForwardProp:Ro})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),Hce=H.forwardRef(function(e,n){const{autoFocus:r,checked:i,checkedIcon:o,className:a,defaultChecked:s,disabled:l,disableFocusRipple:u=!1,edge:c=!1,icon:f,id:d,inputProps:p,inputRef:y,name:x,onBlur:_,onChange:v,onFocus:S,readOnly:w,required:E=!1,tabIndex:T,type:C,value:D}=e,O=vt(e,Bce),[P,N]=Dd({controlled:i,default:!!s,name:"SwitchBase",state:"checked"}),k=ic(),G=U=>{S&&S(U),k&&k.onFocus&&k.onFocus(U)},Z=U=>{_&&_(U),k&&k.onBlur&&k.onBlur(U)},j=U=>{if(U.nativeEvent.defaultPrevented)return;const te=U.target.checked;N(te),v&&v(U,te)};let K=l;k&&typeof K>"u"&&(K=k.disabled);const Y=C==="checkbox"||C==="radio",$=Q({},e,{checked:P,disabled:K,disableFocusRipple:u,edge:c}),W=Uce($);return F.jsxs(zce,Q({component:"span",className:xt(W.root,a),centerRipple:!0,focusRipple:!u,disabled:K,tabIndex:null,role:void 0,onFocus:G,onBlur:Z,ownerState:$,ref:n},O,{children:[F.jsx($ce,Q({autoFocus:r,checked:i,defaultChecked:s,className:W.input,disabled:K,id:Y?d:void 0,name:x,onChange:j,readOnly:w,ref:y,required:E,ownerState:$,tabIndex:T,type:C},C==="checkbox"&&D===void 0?{}:{value:D},p)),P?o:f]}))}),DH=Hce,Vce=pf(F.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"}),"CheckBoxOutlineBlank"),Wce=pf(F.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"}),"CheckBox"),Gce=pf(F.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"}),"IndeterminateCheckBox");function jce(t){return Zt("MuiCheckbox",t)}const qce=Yt("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),$T=qce,Xce=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],Yce=t=>{const{classes:e,indeterminate:n,color:r,size:i}=t,o={root:["root",n&&"indeterminate",`color${rt(r)}`,`size${rt(i)}`]},a=en(o,jce,e);return Q({},e,a)},Kce=ut(DH,{shouldForwardProp:t=>Ro(t)||t==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.indeterminate&&e.indeterminate,e[`size${rt(n.size)}`],n.color!=="default"&&e[`color${rt(n.color)}`]]}})(({theme:t,ownerState:e})=>Q({color:(t.vars||t).palette.text.secondary},!e.disableRipple&&{"&:hover":{backgroundColor:t.vars?`rgba(${e.color==="default"?t.vars.palette.action.activeChannel:t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Un(e.color==="default"?t.palette.action.active:t.palette[e.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},e.color!=="default"&&{[`&.${$T.checked}, &.${$T.indeterminate}`]:{color:(t.vars||t).palette[e.color].main},[`&.${$T.disabled}`]:{color:(t.vars||t).palette.action.disabled}})),Zce=F.jsx(Wce,{}),Jce=F.jsx(Vce,{}),Qce=F.jsx(Gce,{}),efe=H.forwardRef(function(e,n){var r,i;const o=nn({props:e,name:"MuiCheckbox"}),{checkedIcon:a=Zce,color:s="primary",icon:l=Jce,indeterminate:u=!1,indeterminateIcon:c=Qce,inputProps:f,size:d="medium",className:p}=o,y=vt(o,Xce),x=u?c:l,_=u?c:a,v=Q({},o,{color:s,indeterminate:u,size:d}),S=Yce(v);return F.jsx(Kce,Q({type:"checkbox",inputProps:Q({"data-indeterminate":u},f),icon:H.cloneElement(x,{fontSize:(r=x.props.fontSize)!=null?r:d}),checkedIcon:H.cloneElement(_,{fontSize:(i=_.props.fontSize)!=null?i:d}),ownerState:v,ref:n,className:xt(S.root,p)},y,{classes:S}))}),Wh=efe;function tfe(t){return Zt("MuiModal",t)}Yt("MuiModal",["root","hidden","backdrop"]);const nfe=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],rfe=t=>{const{open:e,exited:n,classes:r}=t;return en({root:["root",!e&&n&&"hidden"],backdrop:["backdrop"]},tfe,r)},ife=ut("div",{name:"MuiModal",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.open&&n.exited&&e.hidden]}})(({theme:t,ownerState:e})=>Q({position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0},!e.open&&e.exited&&{visibility:"hidden"})),ofe=ut(AH,{name:"MuiModal",slot:"Backdrop",overridesResolver:(t,e)=>e.backdrop})({zIndex:-1}),afe=H.forwardRef(function(e,n){var r,i,o,a,s,l;const u=nn({name:"MuiModal",props:e}),{BackdropComponent:c=ofe,BackdropProps:f,className:d,closeAfterTransition:p=!1,children:y,container:x,component:_,components:v={},componentsProps:S={},disableAutoFocus:w=!1,disableEnforceFocus:E=!1,disableEscapeKeyDown:T=!1,disablePortal:C=!1,disableRestoreFocus:D=!1,disableScrollLock:O=!1,hideBackdrop:P=!1,keepMounted:N=!1,onBackdropClick:k,open:G,slotProps:Z,slots:j}=u,K=vt(u,nfe),Y=Q({},u,{closeAfterTransition:p,disableAutoFocus:w,disableEnforceFocus:E,disableEscapeKeyDown:T,disablePortal:C,disableRestoreFocus:D,disableScrollLock:O,hideBackdrop:P,keepMounted:N}),{getRootProps:$,getBackdropProps:W,getTransitionProps:U,portalRef:te,isTopModal:re,exited:le,hasTransition:ce}=nue(Q({},Y,{rootRef:n})),Ce=Q({},Y,{exited:le}),Re=rfe(Ce),Ie={};if(y.props.tabIndex===void 0&&(Ie.tabIndex="-1"),ce){const{onEnter:De,onExited:Ee}=U();Ie.onEnter=De,Ie.onExited=Ee}const He=(r=(i=j==null?void 0:j.root)!=null?i:v.Root)!=null?r:ife,tt=(o=(a=j==null?void 0:j.backdrop)!=null?a:v.Backdrop)!=null?o:c,Qe=(s=Z==null?void 0:Z.root)!=null?s:S.root,ct=(l=Z==null?void 0:Z.backdrop)!=null?l:S.backdrop,Xe=Hp({elementType:He,externalSlotProps:Qe,externalForwardedProps:K,getSlotProps:$,additionalProps:{ref:n,as:_},ownerState:Ce,className:xt(d,Qe==null?void 0:Qe.className,Re==null?void 0:Re.root,!Ce.open&&Ce.exited&&(Re==null?void 0:Re.hidden))}),ue=Hp({elementType:tt,externalSlotProps:ct,additionalProps:f,getSlotProps:De=>W(Q({},De,{onClick:Ee=>{k&&k(Ee),De!=null&&De.onClick&&De.onClick(Ee)}})),className:xt(ct==null?void 0:ct.className,f==null?void 0:f.className,Re==null?void 0:Re.backdrop),ownerState:Ce});return!N&&!G&&(!ce||le)?null:F.jsx(wH,{ref:te,container:x,disablePortal:C,children:F.jsxs(He,Q({},Xe,{children:[!P&&c?F.jsx(tt,Q({},ue)):null,F.jsx(Pse,{disableEnforceFocus:E,disableAutoFocus:w,disableRestoreFocus:D,isEnabled:re,open:G,children:H.cloneElement(y,Ie)})]}))})}),WO=afe;function sfe(t){return Zt("MuiDialog",t)}const lfe=Yt("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),HT=lfe,ufe=H.createContext({}),RH=ufe,cfe=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],ffe=ut(AH,{name:"MuiDialog",slot:"Backdrop",overrides:(t,e)=>e.backdrop})({zIndex:-1}),dfe=t=>{const{classes:e,scroll:n,maxWidth:r,fullWidth:i,fullScreen:o}=t,a={root:["root"],container:["container",`scroll${rt(n)}`],paper:["paper",`paperScroll${rt(n)}`,`paperWidth${rt(String(r))}`,i&&"paperFullWidth",o&&"paperFullScreen"]};return en(a,sfe,e)},hfe=ut(WO,{name:"MuiDialog",slot:"Root",overridesResolver:(t,e)=>e.root})({"@media print":{position:"absolute !important"}}),pfe=ut("div",{name:"MuiDialog",slot:"Container",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.container,e[`scroll${rt(n.scroll)}`]]}})(({ownerState:t})=>Q({height:"100%","@media print":{height:"auto"},outline:0},t.scroll==="paper"&&{display:"flex",justifyContent:"center",alignItems:"center"},t.scroll==="body"&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&:after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})),mfe=ut(gf,{name:"MuiDialog",slot:"Paper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.paper,e[`scrollPaper${rt(n.scroll)}`],e[`paperWidth${rt(String(n.maxWidth))}`],n.fullWidth&&e.paperFullWidth,n.fullScreen&&e.paperFullScreen]}})(({theme:t,ownerState:e})=>Q({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},e.scroll==="paper"&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},e.scroll==="body"&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!e.maxWidth&&{maxWidth:"calc(100% - 64px)"},e.maxWidth==="xs"&&{maxWidth:t.breakpoints.unit==="px"?Math.max(t.breakpoints.values.xs,444):`max(${t.breakpoints.values.xs}${t.breakpoints.unit}, 444px)`,[`&.${HT.paperScrollBody}`]:{[t.breakpoints.down(Math.max(t.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}},e.maxWidth&&e.maxWidth!=="xs"&&{maxWidth:`${t.breakpoints.values[e.maxWidth]}${t.breakpoints.unit}`,[`&.${HT.paperScrollBody}`]:{[t.breakpoints.down(t.breakpoints.values[e.maxWidth]+32*2)]:{maxWidth:"calc(100% - 64px)"}}},e.fullWidth&&{width:"calc(100% - 64px)"},e.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${HT.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),gfe=H.forwardRef(function(e,n){const r=nn({props:e,name:"MuiDialog"}),i=Qp(),o={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{"aria-describedby":a,"aria-labelledby":s,BackdropComponent:l,BackdropProps:u,children:c,className:f,disableEscapeKeyDown:d=!1,fullScreen:p=!1,fullWidth:y=!1,maxWidth:x="sm",onBackdropClick:_,onClose:v,open:S,PaperComponent:w=gf,PaperProps:E={},scroll:T="paper",TransitionComponent:C=CH,transitionDuration:D=o,TransitionProps:O}=r,P=vt(r,cfe),N=Q({},r,{disableEscapeKeyDown:d,fullScreen:p,fullWidth:y,maxWidth:x,scroll:T}),k=dfe(N),G=H.useRef(),Z=$=>{G.current=$.target===$.currentTarget},j=$=>{G.current&&(G.current=null,_&&_($),v&&v($,"backdropClick"))},K=bv(s),Y=H.useMemo(()=>({titleId:K}),[K]);return F.jsx(hfe,Q({className:xt(k.root,f),closeAfterTransition:!0,components:{Backdrop:ffe},componentsProps:{backdrop:Q({transitionDuration:D,as:l},u)},disableEscapeKeyDown:d,onClose:v,open:S,ref:n,onClick:j,ownerState:N},P,{children:F.jsx(C,Q({appear:!0,in:S,timeout:D,role:"presentation"},O,{children:F.jsx(pfe,{className:xt(k.container),onMouseDown:Z,ownerState:N,children:F.jsx(mfe,Q({as:w,elevation:24,role:"dialog","aria-describedby":a,"aria-labelledby":K},E,{className:xt(k.paper,E.className),ownerState:N,children:F.jsx(RH.Provider,{value:Y,children:c})}))})}))}))}),PH=gfe;function vfe(t){return Zt("MuiDialogActions",t)}Yt("MuiDialogActions",["root","spacing"]);const yfe=["className","disableSpacing"],xfe=t=>{const{classes:e,disableSpacing:n}=t;return en({root:["root",!n&&"spacing"]},vfe,e)},bfe=ut("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disableSpacing&&e.spacing]}})(({ownerState:t})=>Q({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!t.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})),_fe=H.forwardRef(function(e,n){const r=nn({props:e,name:"MuiDialogActions"}),{className:i,disableSpacing:o=!1}=r,a=vt(r,yfe),s=Q({},r,{disableSpacing:o}),l=xfe(s);return F.jsx(bfe,Q({className:xt(l.root,i),ownerState:s,ref:n},a))}),NH=_fe;function wfe(t){return Zt("MuiDialogContent",t)}Yt("MuiDialogContent",["root","dividers"]);function Sfe(t){return Zt("MuiDialogTitle",t)}const Efe=Yt("MuiDialogTitle",["root"]),Mfe=Efe,Cfe=["className","dividers"],Afe=t=>{const{classes:e,dividers:n}=t;return en({root:["root",n&&"dividers"]},wfe,e)},Tfe=ut("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.dividers&&e.dividers]}})(({theme:t,ownerState:e})=>Q({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},e.dividers?{padding:"16px 24px",borderTop:`1px solid ${(t.vars||t).palette.divider}`,borderBottom:`1px solid ${(t.vars||t).palette.divider}`}:{[`.${Mfe.root} + &`]:{paddingTop:0}})),Dfe=H.forwardRef(function(e,n){const r=nn({props:e,name:"MuiDialogContent"}),{className:i,dividers:o=!1}=r,a=vt(r,Cfe),s=Q({},r,{dividers:o}),l=Afe(s);return F.jsx(Tfe,Q({className:xt(l.root,i),ownerState:s,ref:n},a))}),OH=Dfe,Rfe=["className","id"],Pfe=t=>{const{classes:e}=t;return en({root:["root"]},Sfe,e)},Nfe=ut(Wn,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(t,e)=>e.root})({padding:"16px 24px",flex:"0 0 auto"}),Ofe=H.forwardRef(function(e,n){const r=nn({props:e,name:"MuiDialogTitle"}),{className:i,id:o}=r,a=vt(r,Rfe),s=r,l=Pfe(s),{titleId:u=o}=H.useContext(RH);return F.jsx(Nfe,Q({component:"h2",className:xt(l.root,i),ownerState:s,ref:n,variant:"h6",id:o??u},a))}),IH=Ofe;function Ife(t){return Zt("MuiDivider",t)}const Ffe=Yt("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),y8=Ffe,Lfe=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],kfe=t=>{const{absolute:e,children:n,classes:r,flexItem:i,light:o,orientation:a,textAlign:s,variant:l}=t;return en({root:["root",e&&"absolute",l,o&&"light",a==="vertical"&&"vertical",i&&"flexItem",n&&"withChildren",n&&a==="vertical"&&"withChildrenVertical",s==="right"&&a!=="vertical"&&"textAlignRight",s==="left"&&a!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",a==="vertical"&&"wrapperVertical"]},Ife,r)},Bfe=ut("div",{name:"MuiDivider",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.absolute&&e.absolute,e[n.variant],n.light&&e.light,n.orientation==="vertical"&&e.vertical,n.flexItem&&e.flexItem,n.children&&e.withChildren,n.children&&n.orientation==="vertical"&&e.withChildrenVertical,n.textAlign==="right"&&n.orientation!=="vertical"&&e.textAlignRight,n.textAlign==="left"&&n.orientation!=="vertical"&&e.textAlignLeft]}})(({theme:t,ownerState:e})=>Q({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(t.vars||t).palette.divider,borderBottomWidth:"thin"},e.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},e.light&&{borderColor:t.vars?`rgba(${t.vars.palette.dividerChannel} / 0.08)`:Un(t.palette.divider,.08)},e.variant==="inset"&&{marginLeft:72},e.variant==="middle"&&e.orientation==="horizontal"&&{marginLeft:t.spacing(2),marginRight:t.spacing(2)},e.variant==="middle"&&e.orientation==="vertical"&&{marginTop:t.spacing(1),marginBottom:t.spacing(1)},e.orientation==="vertical"&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},e.flexItem&&{alignSelf:"stretch",height:"auto"}),({ownerState:t})=>Q({},t.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,"&::before, &::after":{content:'""',alignSelf:"center"}}),({theme:t,ownerState:e})=>Q({},e.children&&e.orientation!=="vertical"&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(t.vars||t).palette.divider}`}}),({theme:t,ownerState:e})=>Q({},e.children&&e.orientation==="vertical"&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(t.vars||t).palette.divider}`}}),({ownerState:t})=>Q({},t.textAlign==="right"&&t.orientation!=="vertical"&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},t.textAlign==="left"&&t.orientation!=="vertical"&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})),Ufe=ut("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.wrapper,n.orientation==="vertical"&&e.wrapperVertical]}})(({theme:t,ownerState:e})=>Q({display:"inline-block",paddingLeft:`calc(${t.spacing(1)} * 1.2)`,paddingRight:`calc(${t.spacing(1)} * 1.2)`},e.orientation==="vertical"&&{paddingTop:`calc(${t.spacing(1)} * 1.2)`,paddingBottom:`calc(${t.spacing(1)} * 1.2)`})),FH=H.forwardRef(function(e,n){const r=nn({props:e,name:"MuiDivider"}),{absolute:i=!1,children:o,className:a,component:s=o?"div":"hr",flexItem:l=!1,light:u=!1,orientation:c="horizontal",role:f=s!=="hr"?"separator":void 0,textAlign:d="center",variant:p="fullWidth"}=r,y=vt(r,Lfe),x=Q({},r,{absolute:i,component:s,flexItem:l,light:u,orientation:c,role:f,textAlign:d,variant:p}),_=kfe(x);return F.jsx(Bfe,Q({as:s,className:xt(_.root,a),role:f,ref:n,ownerState:x},y,{children:o?F.jsx(Ufe,{className:_.wrapper,ownerState:x,children:o}):null}))});FH.muiSkipListHighlight=!0;const Jc=FH,zfe=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function $fe(t,e,n){const r=e.getBoundingClientRect(),i=n&&n.getBoundingClientRect(),o=Zu(e);let a;if(e.fakeTransform)a=e.fakeTransform;else{const u=o.getComputedStyle(e);a=u.getPropertyValue("-webkit-transform")||u.getPropertyValue("transform")}let s=0,l=0;if(a&&a!=="none"&&typeof a=="string"){const u=a.split("(")[1].split(")")[0].split(",");s=parseInt(u[4],10),l=parseInt(u[5],10)}return t==="left"?i?`translateX(${i.right+s-r.left}px)`:`translateX(${o.innerWidth+s-r.left}px)`:t==="right"?i?`translateX(-${r.right-i.left-s}px)`:`translateX(-${r.left+r.width-s}px)`:t==="up"?i?`translateY(${i.bottom+l-r.top}px)`:`translateY(${o.innerHeight+l-r.top}px)`:i?`translateY(-${r.top-i.top+r.height-l}px)`:`translateY(-${r.top+r.height-l}px)`}function Hfe(t){return typeof t=="function"?t():t}function Pw(t,e,n){const r=Hfe(n),i=$fe(t,e,r);i&&(e.style.webkitTransform=i,e.style.transform=i)}const Vfe=H.forwardRef(function(e,n){const r=Qp(),i={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:a,appear:s=!0,children:l,container:u,direction:c="down",easing:f=i,in:d,onEnter:p,onEntered:y,onEntering:x,onExit:_,onExited:v,onExiting:S,style:w,timeout:E=o,TransitionComponent:T=NO}=e,C=vt(e,zfe),D=H.useRef(null),O=Jr(l.ref,D,n),P=W=>U=>{W&&(U===void 0?W(D.current):W(D.current,U))},N=P((W,U)=>{Pw(c,W,u),FO(W),p&&p(W,U)}),k=P((W,U)=>{const te=Jg({timeout:E,style:w,easing:f},{mode:"enter"});W.style.webkitTransition=r.transitions.create("-webkit-transform",Q({},te)),W.style.transition=r.transitions.create("transform",Q({},te)),W.style.webkitTransform="none",W.style.transform="none",x&&x(W,U)}),G=P(y),Z=P(S),j=P(W=>{const U=Jg({timeout:E,style:w,easing:f},{mode:"exit"});W.style.webkitTransition=r.transitions.create("-webkit-transform",U),W.style.transition=r.transitions.create("transform",U),Pw(c,W,u),_&&_(W)}),K=P(W=>{W.style.webkitTransition="",W.style.transition="",v&&v(W)}),Y=W=>{a&&a(D.current,W)},$=H.useCallback(()=>{D.current&&Pw(c,D.current,u)},[c,u]);return H.useEffect(()=>{if(d||c==="down"||c==="right")return;const W=EM(()=>{D.current&&Pw(c,D.current,u)}),U=Zu(D.current);return U.addEventListener("resize",W),()=>{W.clear(),U.removeEventListener("resize",W)}},[c,d,u]),H.useEffect(()=>{d||$()},[d,$]),F.jsx(T,Q({nodeRef:D,onEnter:N,onEntered:G,onEntering:k,onExit:j,onExited:K,onExiting:Z,addEndListener:Y,appear:s,in:d,timeout:E},C,{children:(W,U)=>H.cloneElement(l,Q({ref:O,style:Q({visibility:W==="exited"&&!d?"hidden":void 0},w,l.props.style)},U))}))}),Wfe=Vfe;function Gfe(t){return Zt("MuiDrawer",t)}Yt("MuiDrawer",["root","docked","paper","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const jfe=["BackdropProps"],qfe=["anchor","BackdropProps","children","className","elevation","hideBackdrop","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"],LH=(t,e)=>{const{ownerState:n}=t;return[e.root,(n.variant==="permanent"||n.variant==="persistent")&&e.docked,e.modal]},Xfe=t=>{const{classes:e,anchor:n,variant:r}=t,i={root:["root"],docked:[(r==="permanent"||r==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${rt(n)}`,r!=="temporary"&&`paperAnchorDocked${rt(n)}`]};return en(i,Gfe,e)},Yfe=ut(WO,{name:"MuiDrawer",slot:"Root",overridesResolver:LH})(({theme:t})=>({zIndex:(t.vars||t).zIndex.drawer})),x8=ut("div",{shouldForwardProp:Ro,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:LH})({flex:"0 0 auto"}),Kfe=ut(gf,{name:"MuiDrawer",slot:"Paper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.paper,e[`paperAnchor${rt(n.anchor)}`],n.variant!=="temporary"&&e[`paperAnchorDocked${rt(n.anchor)}`]]}})(({theme:t,ownerState:e})=>Q({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},e.anchor==="left"&&{left:0},e.anchor==="top"&&{top:0,left:0,right:0,height:"auto",maxHeight:"100%"},e.anchor==="right"&&{right:0},e.anchor==="bottom"&&{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},e.anchor==="left"&&e.variant!=="temporary"&&{borderRight:`1px solid ${(t.vars||t).palette.divider}`},e.anchor==="top"&&e.variant!=="temporary"&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`},e.anchor==="right"&&e.variant!=="temporary"&&{borderLeft:`1px solid ${(t.vars||t).palette.divider}`},e.anchor==="bottom"&&e.variant!=="temporary"&&{borderTop:`1px solid ${(t.vars||t).palette.divider}`})),kH={left:"right",right:"left",top:"down",bottom:"up"};function Zfe(t){return["left","right"].indexOf(t)!==-1}function Jfe(t,e){return t.direction==="rtl"&&Zfe(e)?kH[e]:e}const Qfe=H.forwardRef(function(e,n){const r=nn({props:e,name:"MuiDrawer"}),i=Qp(),o={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{anchor:a="left",BackdropProps:s,children:l,className:u,elevation:c=16,hideBackdrop:f=!1,ModalProps:{BackdropProps:d}={},onClose:p,open:y=!1,PaperProps:x={},SlideProps:_,TransitionComponent:v=Wfe,transitionDuration:S=o,variant:w="temporary"}=r,E=vt(r.ModalProps,jfe),T=vt(r,qfe),C=H.useRef(!1);H.useEffect(()=>{C.current=!0},[]);const D=Jfe(i,a),P=Q({},r,{anchor:a,elevation:c,open:y,variant:w},T),N=Xfe(P),k=F.jsx(Kfe,Q({elevation:w==="temporary"?c:0,square:!0},x,{className:xt(N.paper,x.className),ownerState:P,children:l}));if(w==="permanent")return F.jsx(x8,Q({className:xt(N.root,N.docked,u),ownerState:P,ref:n},T,{children:k}));const G=F.jsx(v,Q({in:y,direction:kH[D],timeout:S,appear:C.current},_,{children:k}));return w==="persistent"?F.jsx(x8,Q({className:xt(N.root,N.docked,u),ownerState:P,ref:n},T,{children:G})):F.jsx(Yfe,Q({BackdropProps:Q({},s,d,{transitionDuration:S}),className:xt(N.root,N.modal,u),open:y,ownerState:P,onClose:p,hideBackdrop:f,ref:n},T,E,{children:G}))}),ede=Qfe,tde=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],nde=t=>{const{classes:e,disableUnderline:n}=t,i=en({root:["root",!n&&"underline"],input:["input"]},zue,e);return Q({},e,i)},rde=ut(iC,{shouldForwardProp:t=>Ro(t)||t==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[...nC(t,e),!n.disableUnderline&&e.underline]}})(({theme:t,ownerState:e})=>{var n;const r=t.palette.mode==="light",i=r?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",o=r?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",a=r?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",s=r?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return Q({position:"relative",backgroundColor:t.vars?t.vars.palette.FilledInput.bg:o,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:a,"@media (hover: none)":{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:o}},[`&.${Cs.focused}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:o},[`&.${Cs.disabled}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.disabledBg:s}},!e.disableUnderline&&{"&:after":{borderBottom:`2px solid ${(n=(t.vars||t).palette[e.color||"primary"])==null?void 0:n.main}`,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"},[`&.${Cs.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Cs.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})`:i}`,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(.${Cs.disabled}, .${Cs.error}):before`]:{borderBottom:`1px solid ${(t.vars||t).palette.text.primary}`},[`&.${Cs.disabled}:before`]:{borderBottomStyle:"dotted"}},e.startAdornment&&{paddingLeft:12},e.endAdornment&&{paddingRight:12},e.multiline&&Q({padding:"25px 12px 8px"},e.size==="small"&&{paddingTop:21,paddingBottom:4},e.hiddenLabel&&{paddingTop:16,paddingBottom:17}))}),ide=ut(oC,{name:"MuiFilledInput",slot:"Input",overridesResolver:rC})(({theme:t,ownerState:e})=>Q({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"}}},e.size==="small"&&{paddingTop:21,paddingBottom:4},e.hiddenLabel&&{paddingTop:16,paddingBottom:17},e.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0},e.startAdornment&&{paddingLeft:0},e.endAdornment&&{paddingRight:0},e.hiddenLabel&&e.size==="small"&&{paddingTop:8,paddingBottom:9})),BH=H.forwardRef(function(e,n){var r,i,o,a;const s=nn({props:e,name:"MuiFilledInput"}),{components:l={},componentsProps:u,fullWidth:c=!1,inputComponent:f="input",multiline:d=!1,slotProps:p,slots:y={},type:x="text"}=s,_=vt(s,tde),v=Q({},s,{fullWidth:c,inputComponent:f,multiline:d,type:x}),S=nde(s),w={root:{ownerState:v},input:{ownerState:v}},E=p??u?Xo(p??u,w):w,T=(r=(i=y.root)!=null?i:l.Root)!=null?r:rde,C=(o=(a=y.input)!=null?a:l.Input)!=null?o:ide;return F.jsx(VO,Q({slots:{root:T,input:C},componentsProps:E,fullWidth:c,inputComponent:f,multiline:d,ref:n,type:x},_,{classes:S}))});BH.muiName="Input";const UH=BH;function ode(t){return Zt("MuiFormControl",t)}Yt("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const ade=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],sde=t=>{const{classes:e,margin:n,fullWidth:r}=t,i={root:["root",n!=="none"&&`margin${rt(n)}`,r&&"fullWidth"]};return en(i,ode,e)},lde=ut("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:t},e)=>Q({},e.root,e[`margin${rt(t.margin)}`],t.fullWidth&&e.fullWidth)})(({ownerState:t})=>Q({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},t.margin==="normal"&&{marginTop:16,marginBottom:8},t.margin==="dense"&&{marginTop:8,marginBottom:4},t.fullWidth&&{width:"100%"})),ude=H.forwardRef(function(e,n){const r=nn({props:e,name:"MuiFormControl"}),{children:i,className:o,color:a="primary",component:s="div",disabled:l=!1,error:u=!1,focused:c,fullWidth:f=!1,hiddenLabel:d=!1,margin:p="none",required:y=!1,size:x="medium",variant:_="outlined"}=r,v=vt(r,ade),S=Q({},r,{color:a,component:s,disabled:l,error:u,fullWidth:f,hiddenLabel:d,margin:p,required:y,size:x,variant:_}),w=sde(S),[E,T]=H.useState(()=>{let Z=!1;return i&&H.Children.forEach(i,j=>{if(!B1(j,["Input","Select"]))return;const K=B1(j,["Select"])?j.props.input:j;K&&Due(K.props)&&(Z=!0)}),Z}),[C,D]=H.useState(()=>{let Z=!1;return i&&H.Children.forEach(i,j=>{B1(j,["Input","Select"])&&(t2(j.props,!0)||t2(j.props.inputProps,!0))&&(Z=!0)}),Z}),[O,P]=H.useState(!1);l&&O&&P(!1);const N=c!==void 0&&!l?c:O;let k;const G=H.useMemo(()=>({adornedStart:E,setAdornedStart:T,color:a,disabled:l,error:u,filled:C,focused:N,fullWidth:f,hiddenLabel:d,size:x,onBlur:()=>{P(!1)},onEmpty:()=>{D(!1)},onFilled:()=>{D(!0)},onFocus:()=>{P(!0)},registerEffect:k,required:y,variant:_}),[E,a,l,u,C,N,f,d,k,y,x,_]);return F.jsx(tC.Provider,{value:G,children:F.jsx(lde,Q({as:s,ownerState:S,className:xt(w.root,o),ref:n},v,{children:i}))})}),yl=ude,cde=uH({createStyledComponent:ut("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root}),useThemeProps:t=>nn({props:t,name:"MuiStack"})}),Fn=cde;function fde(t){return Zt("MuiFormControlLabel",t)}const dde=Yt("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),x1=dde,hde=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],pde=t=>{const{classes:e,disabled:n,labelPlacement:r,error:i,required:o}=t,a={root:["root",n&&"disabled",`labelPlacement${rt(r)}`,i&&"error",o&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",i&&"error"]};return en(a,fde,e)},mde=ut("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${x1.label}`]:e.label},e.root,e[`labelPlacement${rt(n.labelPlacement)}`]]}})(({theme:t,ownerState:e})=>Q({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${x1.disabled}`]:{cursor:"default"}},e.labelPlacement==="start"&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},e.labelPlacement==="top"&&{flexDirection:"column-reverse",marginLeft:16},e.labelPlacement==="bottom"&&{flexDirection:"column",marginLeft:16},{[`& .${x1.label}`]:{[`&.${x1.disabled}`]:{color:(t.vars||t).palette.text.disabled}}})),gde=ut("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(t,e)=>e.asterisk})(({theme:t})=>({[`&.${x1.error}`]:{color:(t.vars||t).palette.error.main}})),vde=H.forwardRef(function(e,n){var r,i;const o=nn({props:e,name:"MuiFormControlLabel"}),{className:a,componentsProps:s={},control:l,disabled:u,disableTypography:c,label:f,labelPlacement:d="end",required:p,slotProps:y={}}=o,x=vt(o,hde),_=ic(),v=(r=u??l.props.disabled)!=null?r:_==null?void 0:_.disabled,S=p??l.props.required,w={disabled:v,required:S};["checked","name","onChange","value","inputRef"].forEach(P=>{typeof l.props[P]>"u"&&typeof o[P]<"u"&&(w[P]=o[P])});const E=eh({props:o,muiFormControl:_,states:["error"]}),T=Q({},o,{disabled:v,labelPlacement:d,required:S,error:E.error}),C=pde(T),D=(i=y.typography)!=null?i:s.typography;let O=f;return O!=null&&O.type!==Wn&&!c&&(O=F.jsx(Wn,Q({component:"span"},D,{className:xt(C.label,D==null?void 0:D.className),children:O}))),F.jsxs(mde,Q({className:xt(C.root,a),ownerState:T,ref:n},x,{children:[H.cloneElement(l,w),S?F.jsxs(Fn,{direction:"row",alignItems:"center",children:[O,F.jsxs(gde,{ownerState:T,"aria-hidden":!0,className:C.asterisk,children:[" ","*"]})]}):O]}))}),Ss=vde;function yde(t){return Zt("MuiFormGroup",t)}Yt("MuiFormGroup",["root","row","error"]);const xde=["className","row"],bde=t=>{const{classes:e,row:n,error:r}=t;return en({root:["root",n&&"row",r&&"error"]},yde,e)},_de=ut("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.row&&e.row]}})(({ownerState:t})=>Q({display:"flex",flexDirection:"column",flexWrap:"wrap"},t.row&&{flexDirection:"row"})),wde=H.forwardRef(function(e,n){const r=nn({props:e,name:"MuiFormGroup"}),{className:i,row:o=!1}=r,a=vt(r,xde),s=ic(),l=eh({props:r,muiFormControl:s,states:["error"]}),u=Q({},r,{row:o,error:l.error}),c=bde(u);return F.jsx(_de,Q({className:xt(c.root,i),ownerState:u,ref:n},a))}),zH=wde;function Sde(t){return Zt("MuiFormHelperText",t)}const Ede=Yt("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]),b8=Ede;var _8;const Mde=["children","className","component","disabled","error","filled","focused","margin","required","variant"],Cde=t=>{const{classes:e,contained:n,size:r,disabled:i,error:o,filled:a,focused:s,required:l}=t,u={root:["root",i&&"disabled",o&&"error",r&&`size${rt(r)}`,n&&"contained",s&&"focused",a&&"filled",l&&"required"]};return en(u,Sde,e)},Ade=ut("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.size&&e[`size${rt(n.size)}`],n.contained&&e.contained,n.filled&&e.filled]}})(({theme:t,ownerState:e})=>Q({color:(t.vars||t).palette.text.secondary},t.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${b8.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${b8.error}`]:{color:(t.vars||t).palette.error.main}},e.size==="small"&&{marginTop:4},e.contained&&{marginLeft:14,marginRight:14})),Tde=H.forwardRef(function(e,n){const r=nn({props:e,name:"MuiFormHelperText"}),{children:i,className:o,component:a="p"}=r,s=vt(r,Mde),l=ic(),u=eh({props:r,muiFormControl:l,states:["variant","size","disabled","error","filled","focused","required"]}),c=Q({},r,{component:a,contained:u.variant==="filled"||u.variant==="outlined",variant:u.variant,size:u.size,disabled:u.disabled,error:u.error,filled:u.filled,focused:u.focused,required:u.required}),f=Cde(c);return F.jsx(Ade,Q({as:a,ownerState:c,className:xt(f.root,o),ref:n},s,{children:i===" "?_8||(_8=F.jsx("span",{className:"notranslate",children:"​"})):i}))}),Dde=Tde;function Rde(t){return Zt("MuiFormLabel",t)}const Pde=Yt("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),W1=Pde,Nde=["children","className","color","component","disabled","error","filled","focused","required"],Ode=t=>{const{classes:e,color:n,focused:r,disabled:i,error:o,filled:a,required:s}=t,l={root:["root",`color${rt(n)}`,i&&"disabled",o&&"error",a&&"filled",r&&"focused",s&&"required"],asterisk:["asterisk",o&&"error"]};return en(l,Rde,e)},Ide=ut("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:t},e)=>Q({},e.root,t.color==="secondary"&&e.colorSecondary,t.filled&&e.filled)})(({theme:t,ownerState:e})=>Q({color:(t.vars||t).palette.text.secondary},t.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${W1.focused}`]:{color:(t.vars||t).palette[e.color].main},[`&.${W1.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${W1.error}`]:{color:(t.vars||t).palette.error.main}})),Fde=ut("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(t,e)=>e.asterisk})(({theme:t})=>({[`&.${W1.error}`]:{color:(t.vars||t).palette.error.main}})),Lde=H.forwardRef(function(e,n){const r=nn({props:e,name:"MuiFormLabel"}),{children:i,className:o,component:a="label"}=r,s=vt(r,Nde),l=ic(),u=eh({props:r,muiFormControl:l,states:["color","required","focused","disabled","error","filled"]}),c=Q({},r,{color:u.color||"primary",component:a,disabled:u.disabled,error:u.error,filled:u.filled,focused:u.focused,required:u.required}),f=Ode(c);return F.jsxs(Ide,Q({as:a,ownerState:c,className:xt(f.root,o),ref:n},s,{children:[i,u.required&&F.jsxs(Fde,{ownerState:c,"aria-hidden":!0,className:f.asterisk,children:[" ","*"]})]}))}),GO=Lde,kde=H.createContext(),w8=kde;function Bde(t){return Zt("MuiGrid",t)}const Ude=[0,1,2,3,4,5,6,7,8,9,10],zde=["column-reverse","column","row-reverse","row"],$de=["nowrap","wrap-reverse","wrap"],Vy=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],Dx=Yt("MuiGrid",["root","container","item","zeroMinWidth",...Ude.map(t=>`spacing-xs-${t}`),...zde.map(t=>`direction-xs-${t}`),...$de.map(t=>`wrap-xs-${t}`),...Vy.map(t=>`grid-xs-${t}`),...Vy.map(t=>`grid-sm-${t}`),...Vy.map(t=>`grid-md-${t}`),...Vy.map(t=>`grid-lg-${t}`),...Vy.map(t=>`grid-xl-${t}`)]),Hde=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function Ng(t){const e=parseFloat(t);return`${e}${String(t).replace(String(e),"")||"px"}`}function Vde({theme:t,ownerState:e}){let n;return t.breakpoints.keys.reduce((r,i)=>{let o={};if(e[i]&&(n=e[i]),!n)return r;if(n===!0)o={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if(n==="auto")o={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const a=Ep({values:e.columns,breakpoints:t.breakpoints.values}),s=typeof a=="object"?a[i]:a;if(s==null)return r;const l=`${Math.round(n/s*1e8)/1e6}%`;let u={};if(e.container&&e.item&&e.columnSpacing!==0){const c=t.spacing(e.columnSpacing);if(c!=="0px"){const f=`calc(${l} + ${Ng(c)})`;u={flexBasis:f,maxWidth:f}}}o=Q({flexBasis:l,flexGrow:0,maxWidth:l},u)}return t.breakpoints.values[i]===0?Object.assign(r,o):r[t.breakpoints.up(i)]=o,r},{})}function Wde({theme:t,ownerState:e}){const n=Ep({values:e.direction,breakpoints:t.breakpoints.values});return Ka({theme:t},n,r=>{const i={flexDirection:r};return r.indexOf("column")===0&&(i[`& > .${Dx.item}`]={maxWidth:"none"}),i})}function $H({breakpoints:t,values:e}){let n="";Object.keys(e).forEach(i=>{n===""&&e[i]!==0&&(n=i)});const r=Object.keys(t).sort((i,o)=>t[i]-t[o]);return r.slice(0,r.indexOf(n))}function Gde({theme:t,ownerState:e}){const{container:n,rowSpacing:r}=e;let i={};if(n&&r!==0){const o=Ep({values:r,breakpoints:t.breakpoints.values});let a;typeof o=="object"&&(a=$H({breakpoints:t.breakpoints.values,values:o})),i=Ka({theme:t},o,(s,l)=>{var u;const c=t.spacing(s);return c!=="0px"?{marginTop:`-${Ng(c)}`,[`& > .${Dx.item}`]:{paddingTop:Ng(c)}}:(u=a)!=null&&u.includes(l)?{}:{marginTop:0,[`& > .${Dx.item}`]:{paddingTop:0}}})}return i}function jde({theme:t,ownerState:e}){const{container:n,columnSpacing:r}=e;let i={};if(n&&r!==0){const o=Ep({values:r,breakpoints:t.breakpoints.values});let a;typeof o=="object"&&(a=$H({breakpoints:t.breakpoints.values,values:o})),i=Ka({theme:t},o,(s,l)=>{var u;const c=t.spacing(s);return c!=="0px"?{width:`calc(100% + ${Ng(c)})`,marginLeft:`-${Ng(c)}`,[`& > .${Dx.item}`]:{paddingLeft:Ng(c)}}:(u=a)!=null&&u.includes(l)?{}:{width:"100%",marginLeft:0,[`& > .${Dx.item}`]:{paddingLeft:0}}})}return i}function qde(t,e,n={}){if(!t||t<=0)return[];if(typeof t=="string"&&!Number.isNaN(Number(t))||typeof t=="number")return[n[`spacing-xs-${String(t)}`]];const r=[];return e.forEach(i=>{const o=t[i];Number(o)>0&&r.push(n[`spacing-${i}-${String(o)}`])}),r}const Xde=ut("div",{name:"MuiGrid",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t,{container:r,direction:i,item:o,spacing:a,wrap:s,zeroMinWidth:l,breakpoints:u}=n;let c=[];r&&(c=qde(a,u,e));const f=[];return u.forEach(d=>{const p=n[d];p&&f.push(e[`grid-${d}-${String(p)}`])}),[e.root,r&&e.container,o&&e.item,l&&e.zeroMinWidth,...c,i!=="row"&&e[`direction-xs-${String(i)}`],s!=="wrap"&&e[`wrap-xs-${String(s)}`],...f]}})(({ownerState:t})=>Q({boxSizing:"border-box"},t.container&&{display:"flex",flexWrap:"wrap",width:"100%"},t.item&&{margin:0},t.zeroMinWidth&&{minWidth:0},t.wrap!=="wrap"&&{flexWrap:t.wrap}),Wde,Gde,jde,Vde);function Yde(t,e){if(!t||t<=0)return[];if(typeof t=="string"&&!Number.isNaN(Number(t))||typeof t=="number")return[`spacing-xs-${String(t)}`];const n=[];return e.forEach(r=>{const i=t[r];if(Number(i)>0){const o=`spacing-${r}-${String(i)}`;n.push(o)}}),n}const Kde=t=>{const{classes:e,container:n,direction:r,item:i,spacing:o,wrap:a,zeroMinWidth:s,breakpoints:l}=t;let u=[];n&&(u=Yde(o,l));const c=[];l.forEach(d=>{const p=t[d];p&&c.push(`grid-${d}-${String(p)}`)});const f={root:["root",n&&"container",i&&"item",s&&"zeroMinWidth",...u,r!=="row"&&`direction-xs-${String(r)}`,a!=="wrap"&&`wrap-xs-${String(a)}`,...c]};return en(f,Bde,e)},Zde=H.forwardRef(function(e,n){const r=nn({props:e,name:"MuiGrid"}),{breakpoints:i}=Qp(),o=YM(r),{className:a,columns:s,columnSpacing:l,component:u="div",container:c=!1,direction:f="row",item:d=!1,rowSpacing:p,spacing:y=0,wrap:x="wrap",zeroMinWidth:_=!1}=o,v=vt(o,Hde),S=p||y,w=l||y,E=H.useContext(w8),T=c?s||12:E,C={},D=Q({},v);i.keys.forEach(N=>{v[N]!=null&&(C[N]=v[N],delete D[N])});const O=Q({},o,{columns:T,container:c,direction:f,item:d,rowSpacing:S,columnSpacing:w,wrap:x,zeroMinWidth:_,spacing:y},C,{breakpoints:i.keys}),P=Kde(O);return F.jsx(w8.Provider,{value:T,children:F.jsx(Xde,Q({ownerState:O,className:xt(P.root,a),as:u,ref:n},D))})}),Qf=Zde,Jde=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function DR(t){return`scale(${t}, ${t**2})`}const Qde={entering:{opacity:1,transform:DR(1)},entered:{opacity:1,transform:"none"}},VT=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),HH=H.forwardRef(function(e,n){const{addEndListener:r,appear:i=!0,children:o,easing:a,in:s,onEnter:l,onEntered:u,onEntering:c,onExit:f,onExited:d,onExiting:p,style:y,timeout:x="auto",TransitionComponent:_=NO}=e,v=vt(e,Jde),S=H.useRef(),w=H.useRef(),E=Qp(),T=H.useRef(null),C=Jr(T,o.ref,n),D=K=>Y=>{if(K){const $=T.current;Y===void 0?K($):K($,Y)}},O=D(c),P=D((K,Y)=>{FO(K);const{duration:$,delay:W,easing:U}=Jg({style:y,timeout:x,easing:a},{mode:"enter"});let te;x==="auto"?(te=E.transitions.getAutoHeightDuration(K.clientHeight),w.current=te):te=$,K.style.transition=[E.transitions.create("opacity",{duration:te,delay:W}),E.transitions.create("transform",{duration:VT?te:te*.666,delay:W,easing:U})].join(","),l&&l(K,Y)}),N=D(u),k=D(p),G=D(K=>{const{duration:Y,delay:$,easing:W}=Jg({style:y,timeout:x,easing:a},{mode:"exit"});let U;x==="auto"?(U=E.transitions.getAutoHeightDuration(K.clientHeight),w.current=U):U=Y,K.style.transition=[E.transitions.create("opacity",{duration:U,delay:$}),E.transitions.create("transform",{duration:VT?U:U*.666,delay:VT?$:$||U*.333,easing:W})].join(","),K.style.opacity=0,K.style.transform=DR(.75),f&&f(K)}),Z=D(d),j=K=>{x==="auto"&&(S.current=setTimeout(K,w.current||0)),r&&r(T.current,K)};return H.useEffect(()=>()=>{clearTimeout(S.current)},[]),F.jsx(_,Q({appear:i,in:s,nodeRef:T,onEnter:P,onEntered:N,onEntering:O,onExit:G,onExited:Z,onExiting:k,addEndListener:j,timeout:x==="auto"?null:x},v,{children:(K,Y)=>H.cloneElement(o,Q({style:Q({opacity:0,transform:DR(.75),visibility:K==="exited"&&!s?"hidden":void 0},Qde[K],y,o.props.style),ref:C},Y))}))});HH.muiSupportAuto=!0;const ehe=HH,the=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],nhe=t=>{const{classes:e,disableUnderline:n}=t,i=en({root:["root",!n&&"underline"],input:["input"]},Lue,e);return Q({},e,i)},rhe=ut(iC,{shouldForwardProp:t=>Ro(t)||t==="classes",name:"MuiInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[...nC(t,e),!n.disableUnderline&&e.underline]}})(({theme:t,ownerState:e})=>{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})`),Q({position:"relative"},e.formControl&&{"label + &":{marginTop:16}},!e.disableUnderline&&{"&:after":{borderBottom:`2px solid ${(t.vars||t).palette[e.color].main}`,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"},[`&.${gd.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${gd.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(.${gd.disabled}, .${gd.error}):before`]:{borderBottom:`2px solid ${(t.vars||t).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${gd.disabled}:before`]:{borderBottomStyle:"dotted"}})}),ihe=ut(oC,{name:"MuiInput",slot:"Input",overridesResolver:rC})({}),VH=H.forwardRef(function(e,n){var r,i,o,a;const s=nn({props:e,name:"MuiInput"}),{disableUnderline:l,components:u={},componentsProps:c,fullWidth:f=!1,inputComponent:d="input",multiline:p=!1,slotProps:y,slots:x={},type:_="text"}=s,v=vt(s,the),S=nhe(s),E={root:{ownerState:{disableUnderline:l}}},T=y??c?Xo(y??c,E):E,C=(r=(i=x.root)!=null?i:u.Root)!=null?r:rhe,D=(o=(a=x.input)!=null?a:u.Input)!=null?o:ihe;return F.jsx(VO,Q({slots:{root:C,input:D},slotProps:T,fullWidth:f,inputComponent:d,multiline:p,ref:n,type:_},v,{classes:S}))});VH.muiName="Input";const WH=VH;function ohe(t){return Zt("MuiInputAdornment",t)}const ahe=Yt("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]),S8=ahe;var E8;const she=["children","className","component","disablePointerEvents","disableTypography","position","variant"],lhe=(t,e)=>{const{ownerState:n}=t;return[e.root,e[`position${rt(n.position)}`],n.disablePointerEvents===!0&&e.disablePointerEvents,e[n.variant]]},uhe=t=>{const{classes:e,disablePointerEvents:n,hiddenLabel:r,position:i,size:o,variant:a}=t,s={root:["root",n&&"disablePointerEvents",i&&`position${rt(i)}`,a,r&&"hiddenLabel",o&&`size${rt(o)}`]};return en(s,ohe,e)},che=ut("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:lhe})(({theme:t,ownerState:e})=>Q({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(t.vars||t).palette.action.active},e.variant==="filled"&&{[`&.${S8.positionStart}&:not(.${S8.hiddenLabel})`]:{marginTop:16}},e.position==="start"&&{marginRight:8},e.position==="end"&&{marginLeft:8},e.disablePointerEvents===!0&&{pointerEvents:"none"})),fhe=H.forwardRef(function(e,n){const r=nn({props:e,name:"MuiInputAdornment"}),{children:i,className:o,component:a="div",disablePointerEvents:s=!1,disableTypography:l=!1,position:u,variant:c}=r,f=vt(r,she),d=ic()||{};let p=c;c&&d.variant,d&&!p&&(p=d.variant);const y=Q({},r,{hiddenLabel:d.hiddenLabel,size:d.size,disablePointerEvents:s,position:u,variant:p}),x=uhe(y);return F.jsx(tC.Provider,{value:null,children:F.jsx(che,Q({as:a,ownerState:y,className:xt(x.root,o),ref:n},f,{children:typeof i=="string"&&!l?F.jsx(Wn,{color:"text.secondary",children:i}):F.jsxs(H.Fragment,{children:[u==="start"?E8||(E8=F.jsx("span",{className:"notranslate",children:"​"})):null,i]})}))})}),Rd=fhe;function dhe(t){return Zt("MuiInputLabel",t)}Yt("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const hhe=["disableAnimation","margin","shrink","variant","className"],phe=t=>{const{classes:e,formControl:n,size:r,shrink:i,disableAnimation:o,variant:a,required:s}=t,l={root:["root",n&&"formControl",!o&&"animated",i&&"shrink",r&&r!=="normal"&&`size${rt(r)}`,a],asterisk:[s&&"asterisk"]},u=en(l,dhe,e);return Q({},e,u)},mhe=ut(GO,{shouldForwardProp:t=>Ro(t)||t==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${W1.asterisk}`]:e.asterisk},e.root,n.formControl&&e.formControl,n.size==="small"&&e.sizeSmall,n.shrink&&e.shrink,!n.disableAnimation&&e.animated,n.focused&&e.focused,e[n.variant]]}})(({theme:t,ownerState:e})=>Q({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},e.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},e.size==="small"&&{transform:"translate(0, 17px) scale(1)"},e.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!e.disableAnimation&&{transition:t.transitions.create(["color","transform","max-width"],{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut})},e.variant==="filled"&&Q({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},e.size==="small"&&{transform:"translate(12px, 13px) scale(1)"},e.shrink&&Q({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},e.size==="small"&&{transform:"translate(12px, 4px) scale(0.75)"})),e.variant==="outlined"&&Q({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},e.size==="small"&&{transform:"translate(14px, 9px) scale(1)"},e.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))),ghe=H.forwardRef(function(e,n){const r=nn({name:"MuiInputLabel",props:e}),{disableAnimation:i=!1,shrink:o,className:a}=r,s=vt(r,hhe),l=ic();let u=o;typeof u>"u"&&l&&(u=l.filled||l.focused||l.adornedStart);const c=eh({props:r,muiFormControl:l,states:["size","variant","required","focused"]}),f=Q({},r,{disableAnimation:i,formControl:l,shrink:u,size:c.size,variant:c.variant,required:c.required,focused:c.focused}),d=phe(f);return F.jsx(mhe,Q({"data-shrink":u,ownerState:f,ref:n,className:xt(d.root,a)},s,{classes:d}))}),Wu=ghe,vhe=H.createContext({}),Cp=vhe;function yhe(t){return Zt("MuiList",t)}Yt("MuiList",["root","padding","dense","subheader"]);const xhe=["children","className","component","dense","disablePadding","subheader"],bhe=t=>{const{classes:e,disablePadding:n,dense:r,subheader:i}=t;return en({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},yhe,e)},_he=ut("ul",{name:"MuiList",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disablePadding&&e.padding,n.dense&&e.dense,n.subheader&&e.subheader]}})(({ownerState:t})=>Q({listStyle:"none",margin:0,padding:0,position:"relative"},!t.disablePadding&&{paddingTop:8,paddingBottom:8},t.subheader&&{paddingTop:0})),whe=H.forwardRef(function(e,n){const r=nn({props:e,name:"MuiList"}),{children:i,className:o,component:a="ul",dense:s=!1,disablePadding:l=!1,subheader:u}=r,c=vt(r,xhe),f=H.useMemo(()=>({dense:s}),[s]),d=Q({},r,{component:a,dense:s,disablePadding:l}),p=bhe(d);return F.jsx(Cp.Provider,{value:f,children:F.jsxs(_he,Q({as:a,className:xt(p.root,o),ref:n,ownerState:d},c,{children:[u,i]}))})}),GH=whe;function She(t){return Zt("MuiListItem",t)}const Ehe=Yt("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]),L0=Ehe,Mhe=Yt("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),Che=Mhe;function Ahe(t){return Zt("MuiListItemSecondaryAction",t)}Yt("MuiListItemSecondaryAction",["root","disableGutters"]);const The=["className"],Dhe=t=>{const{disableGutters:e,classes:n}=t;return en({root:["root",e&&"disableGutters"]},Ahe,n)},Rhe=ut("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.disableGutters&&e.disableGutters]}})(({ownerState:t})=>Q({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},t.disableGutters&&{right:0})),jH=H.forwardRef(function(e,n){const r=nn({props:e,name:"MuiListItemSecondaryAction"}),{className:i}=r,o=vt(r,The),a=H.useContext(Cp),s=Q({},r,{disableGutters:a.disableGutters}),l=Dhe(s);return F.jsx(Rhe,Q({className:xt(l.root,i),ownerState:s,ref:n},o))});jH.muiName="ListItemSecondaryAction";const Phe=jH,Nhe=["className"],Ohe=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],Ihe=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.alignItems==="flex-start"&&e.alignItemsFlexStart,n.divider&&e.divider,!n.disableGutters&&e.gutters,!n.disablePadding&&e.padding,n.button&&e.button,n.hasSecondaryAction&&e.secondaryAction]},Fhe=t=>{const{alignItems:e,button:n,classes:r,dense:i,disabled:o,disableGutters:a,disablePadding:s,divider:l,hasSecondaryAction:u,selected:c}=t;return en({root:["root",i&&"dense",!a&&"gutters",!s&&"padding",l&&"divider",o&&"disabled",n&&"button",e==="flex-start"&&"alignItemsFlexStart",u&&"secondaryAction",c&&"selected"],container:["container"]},She,r)},Lhe=ut("div",{name:"MuiListItem",slot:"Root",overridesResolver:Ihe})(({theme:t,ownerState:e})=>Q({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!e.disablePadding&&Q({paddingTop:8,paddingBottom:8},e.dense&&{paddingTop:4,paddingBottom:4},!e.disableGutters&&{paddingLeft:16,paddingRight:16},!!e.secondaryAction&&{paddingRight:48}),!!e.secondaryAction&&{[`& > .${Che.root}`]:{paddingRight:48}},{[`&.${L0.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${L0.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Un(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${L0.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:Un(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${L0.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.alignItems==="flex-start"&&{alignItems:"flex-start"},e.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},e.button&&{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"}},[`&.${L0.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:Un(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Un(t.palette.primary.main,t.palette.action.selectedOpacity)}}},e.hasSecondaryAction&&{paddingRight:48})),khe=ut("li",{name:"MuiListItem",slot:"Container",overridesResolver:(t,e)=>e.container})({position:"relative"}),Bhe=H.forwardRef(function(e,n){const r=nn({props:e,name:"MuiListItem"}),{alignItems:i="center",autoFocus:o=!1,button:a=!1,children:s,className:l,component:u,components:c={},componentsProps:f={},ContainerComponent:d="li",ContainerProps:{className:p}={},dense:y=!1,disabled:x=!1,disableGutters:_=!1,disablePadding:v=!1,divider:S=!1,focusVisibleClassName:w,secondaryAction:E,selected:T=!1,slotProps:C={},slots:D={}}=r,O=vt(r.ContainerProps,Nhe),P=vt(r,Ohe),N=H.useContext(Cp),k=H.useMemo(()=>({dense:y||N.dense||!1,alignItems:i,disableGutters:_}),[i,N.dense,y,_]),G=H.useRef(null);_l(()=>{o&&G.current&&G.current.focus()},[o]);const Z=H.Children.toArray(s),j=Z.length&&B1(Z[Z.length-1],["ListItemSecondaryAction"]),K=Q({},r,{alignItems:i,autoFocus:o,button:a,dense:k.dense,disabled:x,disableGutters:_,disablePadding:v,divider:S,hasSecondaryAction:j,selected:T}),Y=Fhe(K),$=Jr(G,n),W=D.root||c.Root||Lhe,U=C.root||f.root||{},te=Q({className:xt(Y.root,U.className,l),disabled:x},P);let re=u||"li";return a&&(te.component=u||"div",te.focusVisibleClassName=xt(L0.focusVisible,w),re=$p),j?(re=!te.component&&!u?"div":re,d==="li"&&(re==="li"?re="div":te.component==="li"&&(te.component="div")),F.jsx(Cp.Provider,{value:k,children:F.jsxs(khe,Q({as:d,className:xt(Y.container,p),ref:$,ownerState:K},O,{children:[F.jsx(W,Q({},U,!Qg(W)&&{as:re,ownerState:Q({},K,U.ownerState)},te,{children:Z})),Z.pop()]}))})):F.jsx(Cp.Provider,{value:k,children:F.jsxs(W,Q({},U,{as:re,ref:$},!Qg(W)&&{ownerState:Q({},K,U.ownerState)},te,{children:[Z,E&&F.jsx(Phe,{children:E})]}))})}),Uhe=Bhe,zhe=Yt("MuiListItemIcon",["root","alignItemsFlexStart"]),M8=zhe,$he=Yt("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),C8=$he,Hhe=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function WT(t,e,n){return t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:n?null:t.firstChild}function A8(t,e,n){return t===e?n?t.firstChild:t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:n?null:t.lastChild}function qH(t,e){if(e===void 0)return!0;let n=t.innerText;return n===void 0&&(n=t.textContent),n=n.trim().toLowerCase(),n.length===0?!1:e.repeating?n[0]===e.keys[0]:n.indexOf(e.keys.join(""))===0}function Wy(t,e,n,r,i,o){let a=!1,s=i(t,e,e?n:!1);for(;s;){if(s===t.firstChild){if(a)return!1;a=!0}const l=r?!1:s.disabled||s.getAttribute("aria-disabled")==="true";if(!s.hasAttribute("tabindex")||!qH(s,o)||l)s=i(t,s,n);else return s.focus(),!0}return!1}const Vhe=H.forwardRef(function(e,n){const{actions:r,autoFocus:i=!1,autoFocusItem:o=!1,children:a,className:s,disabledItemsFocusable:l=!1,disableListWrap:u=!1,onKeyDown:c,variant:f="selectedMenu"}=e,d=vt(e,Hhe),p=H.useRef(null),y=H.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});_l(()=>{i&&p.current.focus()},[i]),H.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(w,E)=>{const T=!p.current.style.width;if(w.clientHeight{const E=p.current,T=w.key,C=Yo(E).activeElement;if(T==="ArrowDown")w.preventDefault(),Wy(E,C,u,l,WT);else if(T==="ArrowUp")w.preventDefault(),Wy(E,C,u,l,A8);else if(T==="Home")w.preventDefault(),Wy(E,null,u,l,WT);else if(T==="End")w.preventDefault(),Wy(E,null,u,l,A8);else if(T.length===1){const D=y.current,O=T.toLowerCase(),P=performance.now();D.keys.length>0&&(P-D.lastTime>500?(D.keys=[],D.repeating=!0,D.previousKeyMatched=!0):D.repeating&&O!==D.keys[0]&&(D.repeating=!1)),D.lastTime=P,D.keys.push(O);const N=C&&!D.repeating&&qH(C,D);D.previousKeyMatched&&(N||Wy(E,C,!1,l,WT,D))?w.preventDefault():D.previousKeyMatched=!1}c&&c(w)},_=Jr(p,n);let v=-1;H.Children.forEach(a,(w,E)=>{if(!H.isValidElement(w)){v===E&&(v+=1,v>=a.length&&(v=-1));return}w.props.disabled||(f==="selectedMenu"&&w.props.selected||v===-1)&&(v=E),v===E&&(w.props.disabled||w.props.muiSkipListHighlight||w.type.muiSkipListHighlight)&&(v+=1,v>=a.length&&(v=-1))});const S=H.Children.map(a,(w,E)=>{if(E===v){const T={};return o&&(T.autoFocus=!0),w.props.tabIndex===void 0&&f==="selectedMenu"&&(T.tabIndex=0),H.cloneElement(w,T)}return w});return F.jsx(GH,Q({role:"menu",ref:_,className:s,onKeyDown:x,tabIndex:i?0:-1},d,{children:S}))}),Whe=Vhe;function Ghe(t){return Zt("MuiPopover",t)}Yt("MuiPopover",["root","paper"]);const jhe=["onEntering"],qhe=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],Xhe=["slotProps"];function T8(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.height/2:e==="bottom"&&(n=t.height),n}function D8(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.width/2:e==="right"&&(n=t.width),n}function R8(t){return[t.horizontal,t.vertical].map(e=>typeof e=="number"?`${e}px`:e).join(" ")}function GT(t){return typeof t=="function"?t():t}const Yhe=t=>{const{classes:e}=t;return en({root:["root"],paper:["paper"]},Ghe,e)},Khe=ut(WO,{name:"MuiPopover",slot:"Root",overridesResolver:(t,e)=>e.root})({}),XH=ut(gf,{name:"MuiPopover",slot:"Paper",overridesResolver:(t,e)=>e.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),Zhe=H.forwardRef(function(e,n){var r,i,o;const a=nn({props:e,name:"MuiPopover"}),{action:s,anchorEl:l,anchorOrigin:u={vertical:"top",horizontal:"left"},anchorPosition:c,anchorReference:f="anchorEl",children:d,className:p,container:y,elevation:x=8,marginThreshold:_=16,open:v,PaperProps:S={},slots:w,slotProps:E,transformOrigin:T={vertical:"top",horizontal:"left"},TransitionComponent:C=ehe,transitionDuration:D="auto",TransitionProps:{onEntering:O}={},disableScrollLock:P=!1}=a,N=vt(a.TransitionProps,jhe),k=vt(a,qhe),G=(r=E==null?void 0:E.paper)!=null?r:S,Z=H.useRef(),j=Jr(Z,G.ref),K=Q({},a,{anchorOrigin:u,anchorReference:f,elevation:x,marginThreshold:_,externalPaperSlotProps:G,transformOrigin:T,TransitionComponent:C,transitionDuration:D,TransitionProps:N}),Y=Yhe(K),$=H.useCallback(()=>{if(f==="anchorPosition")return c;const De=GT(l),X=(De&&De.nodeType===1?De:Yo(Z.current).body).getBoundingClientRect();return{top:X.top+T8(X,u.vertical),left:X.left+D8(X,u.horizontal)}},[l,u.horizontal,u.vertical,c,f]),W=H.useCallback(De=>({vertical:T8(De,T.vertical),horizontal:D8(De,T.horizontal)}),[T.horizontal,T.vertical]),U=H.useCallback(De=>{const Ee={width:De.offsetWidth,height:De.offsetHeight},X=W(Ee);if(f==="none")return{top:null,left:null,transformOrigin:R8(X)};const ne=$();let me=ne.top-X.vertical,we=ne.left-X.horizontal;const Ne=me+Ee.height,Ue=we+Ee.width,We=Zu(GT(l)),lt=We.innerHeight-_,z=We.innerWidth-_;if(_!==null&&me<_){const B=me-_;me-=B,X.vertical+=B}else if(_!==null&&Ne>lt){const B=Ne-lt;me-=B,X.vertical+=B}if(_!==null&&we<_){const B=we-_;we-=B,X.horizontal+=B}else if(Ue>z){const B=Ue-z;we-=B,X.horizontal+=B}return{top:`${Math.round(me)}px`,left:`${Math.round(we)}px`,transformOrigin:R8(X)}},[l,f,$,W,_]),[te,re]=H.useState(v),le=H.useCallback(()=>{const De=Z.current;if(!De)return;const Ee=U(De);Ee.top!==null&&(De.style.top=Ee.top),Ee.left!==null&&(De.style.left=Ee.left),De.style.transformOrigin=Ee.transformOrigin,re(!0)},[U]);H.useEffect(()=>(P&&window.addEventListener("scroll",le),()=>window.removeEventListener("scroll",le)),[l,P,le]);const ce=(De,Ee)=>{O&&O(De,Ee),le()},Ce=()=>{re(!1)};H.useEffect(()=>{v&&le()}),H.useImperativeHandle(s,()=>v?{updatePosition:()=>{le()}}:null,[v,le]),H.useEffect(()=>{if(!v)return;const De=EM(()=>{le()}),Ee=Zu(l);return Ee.addEventListener("resize",De),()=>{De.clear(),Ee.removeEventListener("resize",De)}},[l,v,le]);let Re=D;D==="auto"&&!C.muiSupportAuto&&(Re=void 0);const Ie=y||(l?Yo(GT(l)).body:void 0),He=(i=w==null?void 0:w.root)!=null?i:Khe,tt=(o=w==null?void 0:w.paper)!=null?o:XH,Qe=Hp({elementType:tt,externalSlotProps:Q({},G,{style:te?G.style:Q({},G.style,{opacity:0})}),additionalProps:{elevation:x,ref:j},ownerState:K,className:xt(Y.paper,G==null?void 0:G.className)}),ct=Hp({elementType:He,externalSlotProps:(E==null?void 0:E.root)||{},externalForwardedProps:k,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:Ie,open:v},ownerState:K,className:xt(Y.root,p)}),{slotProps:Xe}=ct,ue=vt(ct,Xhe);return F.jsx(He,Q({},ue,!Qg(He)&&{slotProps:Xe,disableScrollLock:P},{children:F.jsx(C,Q({appear:!0,in:v,onEntering:ce,onExited:Ce,timeout:Re},N,{children:F.jsx(tt,Q({},Qe,{children:d}))}))}))}),YH=Zhe;function Jhe(t){return Zt("MuiMenu",t)}Yt("MuiMenu",["root","paper","list"]);const Qhe=["onEntering"],epe=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],tpe={vertical:"top",horizontal:"right"},npe={vertical:"top",horizontal:"left"},rpe=t=>{const{classes:e}=t;return en({root:["root"],paper:["paper"],list:["list"]},Jhe,e)},ipe=ut(YH,{shouldForwardProp:t=>Ro(t)||t==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(t,e)=>e.root})({}),ope=ut(XH,{name:"MuiMenu",slot:"Paper",overridesResolver:(t,e)=>e.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),ape=ut(Whe,{name:"MuiMenu",slot:"List",overridesResolver:(t,e)=>e.list})({outline:0}),spe=H.forwardRef(function(e,n){var r,i;const o=nn({props:e,name:"MuiMenu"}),{autoFocus:a=!0,children:s,className:l,disableAutoFocusItem:u=!1,MenuListProps:c={},onClose:f,open:d,PaperProps:p={},PopoverClasses:y,transitionDuration:x="auto",TransitionProps:{onEntering:_}={},variant:v="selectedMenu",slots:S={},slotProps:w={}}=o,E=vt(o.TransitionProps,Qhe),T=vt(o,epe),C=Qp(),D=C.direction==="rtl",O=Q({},o,{autoFocus:a,disableAutoFocusItem:u,MenuListProps:c,onEntering:_,PaperProps:p,transitionDuration:x,TransitionProps:E,variant:v}),P=rpe(O),N=a&&!u&&d,k=H.useRef(null),G=(U,te)=>{k.current&&k.current.adjustStyleForScrollbar(U,C),_&&_(U,te)},Z=U=>{U.key==="Tab"&&(U.preventDefault(),f&&f(U,"tabKeyDown"))};let j=-1;H.Children.map(s,(U,te)=>{H.isValidElement(U)&&(U.props.disabled||(v==="selectedMenu"&&U.props.selected||j===-1)&&(j=te))});const K=(r=S.paper)!=null?r:ope,Y=(i=w.paper)!=null?i:p,$=Hp({elementType:S.root,externalSlotProps:w.root,ownerState:O,className:[P.root,l]}),W=Hp({elementType:K,externalSlotProps:Y,ownerState:O,className:P.paper});return F.jsx(ipe,Q({onClose:f,anchorOrigin:{vertical:"bottom",horizontal:D?"right":"left"},transformOrigin:D?tpe:npe,slots:{paper:K,root:S.root},slotProps:{root:$,paper:W},open:d,ref:n,transitionDuration:x,TransitionProps:Q({onEntering:G},E),ownerState:O},T,{classes:y,children:F.jsx(ape,Q({onKeyDown:Z,actions:k,autoFocus:a&&(j===-1||u),autoFocusItem:N,variant:v},c,{className:xt(P.list,c.className),children:s}))}))}),lpe=spe;function upe(t){return Zt("MuiMenuItem",t)}const cpe=Yt("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),Gy=cpe,fpe=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],dpe=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.divider&&e.divider,!n.disableGutters&&e.gutters]},hpe=t=>{const{disabled:e,dense:n,divider:r,disableGutters:i,selected:o,classes:a}=t,l=en({root:["root",n&&"dense",e&&"disabled",!i&&"gutters",r&&"divider",o&&"selected"]},upe,a);return Q({},a,l)},ppe=ut($p,{shouldForwardProp:t=>Ro(t)||t==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:dpe})(({theme:t,ownerState:e})=>Q({},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"},!e.disableGutters&&{paddingLeft:16,paddingRight:16},e.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Gy.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Un(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${Gy.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:Un(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${Gy.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:Un(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Un(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${Gy.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${Gy.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},[`& + .${y8.root}`]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},[`& + .${y8.inset}`]:{marginLeft:52},[`& .${C8.root}`]:{marginTop:0,marginBottom:0},[`& .${C8.inset}`]:{paddingLeft:36},[`& .${M8.root}`]:{minWidth:36}},!e.dense&&{[t.breakpoints.up("sm")]:{minHeight:"auto"}},e.dense&&Q({minHeight:32,paddingTop:4,paddingBottom:4},t.typography.body2,{[`& .${M8.root} svg`]:{fontSize:"1.25rem"}}))),mpe=H.forwardRef(function(e,n){const r=nn({props:e,name:"MuiMenuItem"}),{autoFocus:i=!1,component:o="li",dense:a=!1,divider:s=!1,disableGutters:l=!1,focusVisibleClassName:u,role:c="menuitem",tabIndex:f,className:d}=r,p=vt(r,fpe),y=H.useContext(Cp),x=H.useMemo(()=>({dense:a||y.dense||!1,disableGutters:l}),[y.dense,a,l]),_=H.useRef(null);_l(()=>{i&&_.current&&_.current.focus()},[i]);const v=Q({},r,{dense:x.dense,divider:s,disableGutters:l}),S=hpe(r),w=Jr(_,n);let E;return r.disabled||(E=f!==void 0?f:-1),F.jsx(Cp.Provider,{value:x,children:F.jsx(ppe,Q({ref:w,role:c,tabIndex:E,component:o,focusVisibleClassName:xt(S.focusVisible,u),className:xt(S.root,d)},p,{ownerState:v,classes:S}))})}),lo=mpe;function gpe(t){return Zt("MuiNativeSelect",t)}const vpe=Yt("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),jO=vpe,ype=["className","disabled","error","IconComponent","inputRef","variant"],xpe=t=>{const{classes:e,variant:n,disabled:r,multiple:i,open:o,error:a}=t,s={select:["select",n,r&&"disabled",i&&"multiple",a&&"error"],icon:["icon",`icon${rt(n)}`,o&&"iconOpen",r&&"disabled"]};return en(s,gpe,e)},KH=({ownerState:t,theme:e})=>Q({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":Q({},e.vars?{backgroundColor:`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:e.palette.mode==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${jO.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},t.variant==="filled"&&{"&&&":{paddingRight:32}},t.variant==="outlined"&&{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}),bpe=ut("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:Ro,overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.select,e[n.variant],n.error&&e.error,{[`&.${jO.multiple}`]:e.multiple}]}})(KH),ZH=({ownerState:t,theme:e})=>Q({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${jO.disabled}`]:{color:(e.vars||e).palette.action.disabled}},t.open&&{transform:"rotate(180deg)"},t.variant==="filled"&&{right:7},t.variant==="outlined"&&{right:7}),_pe=ut("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.icon,n.variant&&e[`icon${rt(n.variant)}`],n.open&&e.iconOpen]}})(ZH),wpe=H.forwardRef(function(e,n){const{className:r,disabled:i,error:o,IconComponent:a,inputRef:s,variant:l="standard"}=e,u=vt(e,ype),c=Q({},e,{disabled:i,variant:l,error:o}),f=xpe(c);return F.jsxs(H.Fragment,{children:[F.jsx(bpe,Q({ownerState:c,className:xt(f.select,r),disabled:i,ref:s||n},u)),e.multiple?null:F.jsx(_pe,{as:a,ownerState:c,className:f.icon})]})}),Spe=wpe;var P8;const Epe=["children","classes","className","label","notched"],Mpe=ut("fieldset",{shouldForwardProp:Ro})({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%"}),Cpe=ut("legend",{shouldForwardProp:Ro})(({ownerState:t,theme:e})=>Q({float:"unset",width:"auto",overflow:"hidden"},!t.withLabel&&{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})},t.withLabel&&Q({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},t.notched&&{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})})));function Ape(t){const{className:e,label:n,notched:r}=t,i=vt(t,Epe),o=n!=null&&n!=="",a=Q({},t,{notched:r,withLabel:o});return F.jsx(Mpe,Q({"aria-hidden":!0,className:e,ownerState:a},i,{children:F.jsx(Cpe,{ownerState:a,children:o?F.jsx("span",{children:n}):P8||(P8=F.jsx("span",{className:"notranslate",children:"​"}))})}))}const Tpe=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],Dpe=t=>{const{classes:e}=t,r=en({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},Bue,e);return Q({},e,r)},Rpe=ut(iC,{shouldForwardProp:t=>Ro(t)||t==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:nC})(({theme:t,ownerState:e})=>{const n=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return Q({position:"relative",borderRadius:(t.vars||t).shape.borderRadius,[`&:hover .${Nu.notchedOutline}`]:{borderColor:(t.vars||t).palette.text.primary},"@media (hover: none)":{[`&:hover .${Nu.notchedOutline}`]:{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${Nu.focused} .${Nu.notchedOutline}`]:{borderColor:(t.vars||t).palette[e.color].main,borderWidth:2},[`&.${Nu.error} .${Nu.notchedOutline}`]:{borderColor:(t.vars||t).palette.error.main},[`&.${Nu.disabled} .${Nu.notchedOutline}`]:{borderColor:(t.vars||t).palette.action.disabled}},e.startAdornment&&{paddingLeft:14},e.endAdornment&&{paddingRight:14},e.multiline&&Q({padding:"16.5px 14px"},e.size==="small"&&{padding:"8.5px 14px"}))}),Ppe=ut(Ape,{name:"MuiOutlinedInput",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{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:e}}),Npe=ut(oC,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:rC})(({theme:t,ownerState:e})=>Q({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"}}},e.size==="small"&&{padding:"8.5px 14px"},e.multiline&&{padding:0},e.startAdornment&&{paddingLeft:0},e.endAdornment&&{paddingRight:0})),JH=H.forwardRef(function(e,n){var r,i,o,a,s;const l=nn({props:e,name:"MuiOutlinedInput"}),{components:u={},fullWidth:c=!1,inputComponent:f="input",label:d,multiline:p=!1,notched:y,slots:x={},type:_="text"}=l,v=vt(l,Tpe),S=Dpe(l),w=ic(),E=eh({props:l,muiFormControl:w,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),T=Q({},l,{color:E.color||"primary",disabled:E.disabled,error:E.error,focused:E.focused,formControl:w,fullWidth:c,hiddenLabel:E.hiddenLabel,multiline:p,size:E.size,type:_}),C=(r=(i=x.root)!=null?i:u.Root)!=null?r:Rpe,D=(o=(a=x.input)!=null?a:u.Input)!=null?o:Npe;return F.jsx(VO,Q({slots:{root:C,input:D},renderSuffix:O=>F.jsx(Ppe,{ownerState:T,className:S.notchedOutline,label:d!=null&&d!==""&&E.required?s||(s=F.jsxs(H.Fragment,{children:[d," ","*"]})):d,notched:typeof y<"u"?y:!!(O.startAdornment||O.filled||O.focused)}),fullWidth:c,inputComponent:f,multiline:p,ref:n,type:_},v,{classes:Q({},S,{notchedOutline:null})}))});JH.muiName="Input";const QH=JH,Ope=pf(F.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"}),"RadioButtonUnchecked"),Ipe=pf(F.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"}),"RadioButtonChecked"),Fpe=ut("span",{shouldForwardProp:Ro})({position:"relative",display:"flex"}),Lpe=ut(Ope)({transform:"scale(1)"}),kpe=ut(Ipe)(({theme:t,ownerState:e})=>Q({left:0,position:"absolute",transform:"scale(0)",transition:t.transitions.create("transform",{easing:t.transitions.easing.easeIn,duration:t.transitions.duration.shortest})},e.checked&&{transform:"scale(1)",transition:t.transitions.create("transform",{easing:t.transitions.easing.easeOut,duration:t.transitions.duration.shortest})}));function eV(t){const{checked:e=!1,classes:n={},fontSize:r}=t,i=Q({},t,{checked:e});return F.jsxs(Fpe,{className:n.root,ownerState:i,children:[F.jsx(Lpe,{fontSize:r,className:n.background,ownerState:i}),F.jsx(kpe,{fontSize:r,className:n.dot,ownerState:i})]})}const Bpe=H.createContext(void 0),tV=Bpe;function Upe(){return H.useContext(tV)}function zpe(t){return Zt("MuiRadio",t)}const $pe=Yt("MuiRadio",["root","checked","disabled","colorPrimary","colorSecondary","sizeSmall"]),N8=$pe,Hpe=["checked","checkedIcon","color","icon","name","onChange","size","className"],Vpe=t=>{const{classes:e,color:n,size:r}=t,i={root:["root",`color${rt(n)}`,r!=="medium"&&`size${rt(r)}`]};return Q({},e,en(i,zpe,e))},Wpe=ut(DH,{shouldForwardProp:t=>Ro(t)||t==="classes",name:"MuiRadio",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.size!=="medium"&&e[`size${rt(n.size)}`],e[`color${rt(n.color)}`]]}})(({theme:t,ownerState:e})=>Q({color:(t.vars||t).palette.text.secondary},!e.disableRipple&&{"&:hover":{backgroundColor:t.vars?`rgba(${e.color==="default"?t.vars.palette.action.activeChannel:t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Un(e.color==="default"?t.palette.action.active:t.palette[e.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},e.color!=="default"&&{[`&.${N8.checked}`]:{color:(t.vars||t).palette[e.color].main}},{[`&.${N8.disabled}`]:{color:(t.vars||t).palette.action.disabled}}));function Gpe(t,e){return typeof e=="object"&&e!==null?t===e:String(t)===String(e)}const O8=F.jsx(eV,{checked:!0}),I8=F.jsx(eV,{}),jpe=H.forwardRef(function(e,n){var r,i;const o=nn({props:e,name:"MuiRadio"}),{checked:a,checkedIcon:s=O8,color:l="primary",icon:u=I8,name:c,onChange:f,size:d="medium",className:p}=o,y=vt(o,Hpe),x=Q({},o,{color:l,size:d}),_=Vpe(x),v=Upe();let S=a;const w=XE(f,v&&v.onChange);let E=c;return v&&(typeof S>"u"&&(S=Gpe(v.value,o.value)),typeof E>"u"&&(E=v.name)),F.jsx(Wpe,Q({type:"radio",icon:H.cloneElement(u,{fontSize:(r=I8.props.fontSize)!=null?r:d}),checkedIcon:H.cloneElement(s,{fontSize:(i=O8.props.fontSize)!=null?i:d}),ownerState:x,classes:_,name:E,checked:S,onChange:w,ref:n,className:xt(_.root,p)},y))}),Og=jpe,qpe=["actions","children","defaultValue","name","onChange","value"],Xpe=H.forwardRef(function(e,n){const{actions:r,children:i,defaultValue:o,name:a,onChange:s,value:l}=e,u=vt(e,qpe),c=H.useRef(null),[f,d]=Dd({controlled:l,default:o,name:"RadioGroup"});H.useImperativeHandle(r,()=>({focus:()=>{let _=c.current.querySelector("input:not(:disabled):checked");_||(_=c.current.querySelector("input:not(:disabled)")),_&&_.focus()}}),[]);const p=Jr(n,c),y=bv(a),x=H.useMemo(()=>({name:y,onChange(_){d(_.target.value),s&&s(_,_.target.value)},value:f}),[y,s,d,f]);return F.jsx(tV.Provider,{value:x,children:F.jsx(zH,Q({role:"radiogroup",ref:p},u,{children:i}))})}),nV=Xpe;function Ype(t){return Zt("MuiSelect",t)}const Kpe=Yt("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),jy=Kpe;var F8;const Zpe=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],Jpe=ut("div",{name:"MuiSelect",slot:"Select",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`&.${jy.select}`]:e.select},{[`&.${jy.select}`]:e[n.variant]},{[`&.${jy.error}`]:e.error},{[`&.${jy.multiple}`]:e.multiple}]}})(KH,{[`&.${jy.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),Qpe=ut("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.icon,n.variant&&e[`icon${rt(n.variant)}`],n.open&&e.iconOpen]}})(ZH),eme=ut("input",{shouldForwardProp:t=>fae(t)&&t!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(t,e)=>e.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function L8(t,e){return typeof e=="object"&&e!==null?t===e:String(t)===String(e)}function tme(t){return t==null||typeof t=="string"&&!t.trim()}const nme=t=>{const{classes:e,variant:n,disabled:r,multiple:i,open:o,error:a}=t,s={select:["select",n,r&&"disabled",i&&"multiple",a&&"error"],icon:["icon",`icon${rt(n)}`,o&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return en(s,Ype,e)},rme=H.forwardRef(function(e,n){var r;const{"aria-describedby":i,"aria-label":o,autoFocus:a,autoWidth:s,children:l,className:u,defaultOpen:c,defaultValue:f,disabled:d,displayEmpty:p,error:y=!1,IconComponent:x,inputRef:_,labelId:v,MenuProps:S={},multiple:w,name:E,onBlur:T,onChange:C,onClose:D,onFocus:O,onOpen:P,open:N,readOnly:k,renderValue:G,SelectDisplayProps:Z={},tabIndex:j,value:K,variant:Y="standard"}=e,$=vt(e,Zpe),[W,U]=Dd({controlled:K,default:f,name:"Select"}),[te,re]=Dd({controlled:N,default:c,name:"Select"}),le=H.useRef(null),ce=H.useRef(null),[Ce,Re]=H.useState(null),{current:Ie}=H.useRef(N!=null),[He,tt]=H.useState(),Qe=Jr(n,_),ct=H.useCallback(je=>{ce.current=je,je&&Re(je)},[]),Xe=Ce==null?void 0:Ce.parentNode;H.useImperativeHandle(Qe,()=>({focus:()=>{ce.current.focus()},node:le.current,value:W}),[W]),H.useEffect(()=>{c&&te&&Ce&&!Ie&&(tt(s?null:Xe.clientWidth),ce.current.focus())},[Ce,s]),H.useEffect(()=>{a&&ce.current.focus()},[a]),H.useEffect(()=>{if(!v)return;const je=Yo(ce.current).getElementById(v);if(je){const Le=()=>{getSelection().isCollapsed&&ce.current.focus()};return je.addEventListener("click",Le),()=>{je.removeEventListener("click",Le)}}},[v]);const ue=(je,Le)=>{je?P&&P(Le):D&&D(Le),Ie||(tt(s?null:Xe.clientWidth),re(je))},De=je=>{je.button===0&&(je.preventDefault(),ce.current.focus(),ue(!0,je))},Ee=je=>{ue(!1,je)},X=H.Children.toArray(l),ne=je=>{const Le=X.find(_t=>_t.props.value===je.target.value);Le!==void 0&&(U(Le.props.value),C&&C(je,Le))},me=je=>Le=>{let _t;if(Le.currentTarget.hasAttribute("tabindex")){if(w){_t=Array.isArray(W)?W.slice():[];const bt=W.indexOf(je.props.value);bt===-1?_t.push(je.props.value):_t.splice(bt,1)}else _t=je.props.value;if(je.props.onClick&&je.props.onClick(Le),W!==_t&&(U(_t),C)){const bt=Le.nativeEvent||Le,wt=new bt.constructor(bt.type,bt);Object.defineProperty(wt,"target",{writable:!0,value:{value:_t,name:E}}),C(wt,je)}w||ue(!1,Le)}},we=je=>{k||[" ","ArrowUp","ArrowDown","Enter"].indexOf(je.key)!==-1&&(je.preventDefault(),ue(!0,je))},Ne=Ce!==null&&te,Ue=je=>{!Ne&&T&&(Object.defineProperty(je,"target",{writable:!0,value:{value:W,name:E}}),T(je))};delete $["aria-invalid"];let We,lt;const z=[];let B=!1;(t2({value:W})||p)&&(G?We=G(W):B=!0);const oe=X.map(je=>{if(!H.isValidElement(je))return null;let Le;if(w){if(!Array.isArray(W))throw new Error(Ud(2));Le=W.some(_t=>L8(_t,je.props.value)),Le&&B&&z.push(je.props.children)}else Le=L8(W,je.props.value),Le&&B&&(lt=je.props.children);return H.cloneElement(je,{"aria-selected":Le?"true":"false",onClick:me(je),onKeyUp:_t=>{_t.key===" "&&_t.preventDefault(),je.props.onKeyUp&&je.props.onKeyUp(_t)},role:"option",selected:Le,value:void 0,"data-value":je.props.value})});B&&(w?z.length===0?We=null:We=z.reduce((je,Le,_t)=>(je.push(Le),_t{const{classes:e}=t;return e},qO={name:"MuiSelect",overridesResolver:(t,e)=>e.root,shouldForwardProp:t=>Ro(t)&&t!=="variant",slot:"Root"},lme=ut(WH,qO)(""),ume=ut(QH,qO)(""),cme=ut(UH,qO)(""),rV=H.forwardRef(function(e,n){const r=nn({name:"MuiSelect",props:e}),{autoWidth:i=!1,children:o,classes:a={},className:s,defaultOpen:l=!1,displayEmpty:u=!1,IconComponent:c=MH,id:f,input:d,inputProps:p,label:y,labelId:x,MenuProps:_,multiple:v=!1,native:S=!1,onClose:w,onOpen:E,open:T,renderValue:C,SelectDisplayProps:D,variant:O="outlined"}=r,P=vt(r,ome),N=S?Spe:ime,k=ic(),G=eh({props:r,muiFormControl:k,states:["variant","error"]}),Z=G.variant||O,j=Q({},r,{variant:Z,classes:a}),K=sme(j),Y=vt(K,ame),$=d||{standard:F.jsx(lme,{ownerState:j}),outlined:F.jsx(ume,{label:y,ownerState:j}),filled:F.jsx(cme,{ownerState:j})}[Z],W=Jr(n,$.ref);return F.jsx(H.Fragment,{children:H.cloneElement($,Q({inputComponent:N,inputProps:Q({children:o,error:G.error,IconComponent:c,variant:Z,type:void 0,multiple:v},S?{id:f}:{autoWidth:i,defaultOpen:l,displayEmpty:u,labelId:x,MenuProps:_,onClose:w,onOpen:E,open:T,renderValue:C,SelectDisplayProps:Q({id:f},D)},p,{classes:p?Xo(Y,p.classes):Y},d?d.props.inputProps:{})},v&&S&&Z==="outlined"?{notched:!0}:{},{ref:W,className:xt($.props.className,s,K.root)},!d&&{variant:Z},P))})});rV.muiName="Select";const Gu=rV,fme=H.createContext(),iV=fme;function dme(t){return Zt("MuiTable",t)}Yt("MuiTable",["root","stickyHeader"]);const hme=["className","component","padding","size","stickyHeader"],pme=t=>{const{classes:e,stickyHeader:n}=t;return en({root:["root",n&&"stickyHeader"]},dme,e)},mme=ut("table",{name:"MuiTable",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.stickyHeader&&e.stickyHeader]}})(({theme:t,ownerState:e})=>Q({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":Q({},t.typography.body2,{padding:t.spacing(2),color:(t.vars||t).palette.text.secondary,textAlign:"left",captionSide:"bottom"})},e.stickyHeader&&{borderCollapse:"separate"})),k8="table",gme=H.forwardRef(function(e,n){const r=nn({props:e,name:"MuiTable"}),{className:i,component:o=k8,padding:a="normal",size:s="medium",stickyHeader:l=!1}=r,u=vt(r,hme),c=Q({},r,{component:o,padding:a,size:s,stickyHeader:l}),f=pme(c),d=H.useMemo(()=>({padding:a,size:s,stickyHeader:l}),[a,s,l]);return F.jsx(iV.Provider,{value:d,children:F.jsx(mme,Q({as:o,role:o===k8?null:"table",ref:n,className:xt(f.root,i),ownerState:c},u))})}),vme=gme,yme=H.createContext(),lC=yme;function xme(t){return Zt("MuiTableBody",t)}Yt("MuiTableBody",["root"]);const bme=["className","component"],_me=t=>{const{classes:e}=t;return en({root:["root"]},xme,e)},wme=ut("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"table-row-group"}),Sme={variant:"body"},B8="tbody",Eme=H.forwardRef(function(e,n){const r=nn({props:e,name:"MuiTableBody"}),{className:i,component:o=B8}=r,a=vt(r,bme),s=Q({},r,{component:o}),l=_me(s);return F.jsx(lC.Provider,{value:Sme,children:F.jsx(wme,Q({className:xt(l.root,i),as:o,ref:n,role:o===B8?null:"rowgroup",ownerState:s},a))})}),Mme=Eme;function Cme(t){return Zt("MuiTableCell",t)}const Ame=Yt("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),Tme=Ame,Dme=["align","className","component","padding","scope","size","sortDirection","variant"],Rme=t=>{const{classes:e,variant:n,align:r,padding:i,size:o,stickyHeader:a}=t,s={root:["root",n,a&&"stickyHeader",r!=="inherit"&&`align${rt(r)}`,i!=="normal"&&`padding${rt(i)}`,`size${rt(o)}`]};return en(s,Cme,e)},Pme=ut("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`size${rt(n.size)}`],n.padding!=="normal"&&e[`padding${rt(n.padding)}`],n.align!=="inherit"&&e[`align${rt(n.align)}`],n.stickyHeader&&e.stickyHeader]}})(({theme:t,ownerState:e})=>Q({},t.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:t.vars?`1px solid ${t.vars.palette.TableCell.border}`:`1px solid + ${t.palette.mode==="light"?lH(Un(t.palette.divider,1),.88):sH(Un(t.palette.divider,1),.68)}`,textAlign:"left",padding:16},e.variant==="head"&&{color:(t.vars||t).palette.text.primary,lineHeight:t.typography.pxToRem(24),fontWeight:t.typography.fontWeightMedium},e.variant==="body"&&{color:(t.vars||t).palette.text.primary},e.variant==="footer"&&{color:(t.vars||t).palette.text.secondary,lineHeight:t.typography.pxToRem(21),fontSize:t.typography.pxToRem(12)},e.size==="small"&&{padding:"6px 16px",[`&.${Tme.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}},e.padding==="checkbox"&&{width:48,padding:"0 0 0 4px"},e.padding==="none"&&{padding:0},e.align==="left"&&{textAlign:"left"},e.align==="center"&&{textAlign:"center"},e.align==="right"&&{textAlign:"right",flexDirection:"row-reverse"},e.align==="justify"&&{textAlign:"justify"},e.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(t.vars||t).palette.background.default})),Nme=H.forwardRef(function(e,n){const r=nn({props:e,name:"MuiTableCell"}),{align:i="inherit",className:o,component:a,padding:s,scope:l,size:u,sortDirection:c,variant:f}=r,d=vt(r,Dme),p=H.useContext(iV),y=H.useContext(lC),x=y&&y.variant==="head";let _;a?_=a:_=x?"th":"td";let v=l;_==="td"?v=void 0:!v&&x&&(v="col");const S=f||y&&y.variant,w=Q({},r,{align:i,component:_,padding:s||(p&&p.padding?p.padding:"normal"),size:u||(p&&p.size?p.size:"medium"),sortDirection:c,stickyHeader:S==="head"&&p&&p.stickyHeader,variant:S}),E=Rme(w);let T=null;return c&&(T=c==="asc"?"ascending":"descending"),F.jsx(Pme,Q({as:_,ref:n,className:xt(E.root,o),"aria-sort":T,scope:v,ownerState:w},d))}),Ho=Nme;function Ome(t){return Zt("MuiTableContainer",t)}Yt("MuiTableContainer",["root"]);const Ime=["className","component"],Fme=t=>{const{classes:e}=t;return en({root:["root"]},Ome,e)},Lme=ut("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(t,e)=>e.root})({width:"100%",overflowX:"auto"}),kme=H.forwardRef(function(e,n){const r=nn({props:e,name:"MuiTableContainer"}),{className:i,component:o="div"}=r,a=vt(r,Ime),s=Q({},r,{component:o}),l=Fme(s);return F.jsx(Lme,Q({ref:n,as:o,className:xt(l.root,i),ownerState:s},a))}),Bme=kme;function Ume(t){return Zt("MuiTableHead",t)}Yt("MuiTableHead",["root"]);const zme=["className","component"],$me=t=>{const{classes:e}=t;return en({root:["root"]},Ume,e)},Hme=ut("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"table-header-group"}),Vme={variant:"head"},U8="thead",Wme=H.forwardRef(function(e,n){const r=nn({props:e,name:"MuiTableHead"}),{className:i,component:o=U8}=r,a=vt(r,zme),s=Q({},r,{component:o}),l=$me(s);return F.jsx(lC.Provider,{value:Vme,children:F.jsx(Hme,Q({as:o,className:xt(l.root,i),ref:n,role:o===U8?null:"rowgroup",ownerState:s},a))})}),Gme=Wme;function jme(t){return Zt("MuiToolbar",t)}Yt("MuiToolbar",["root","gutters","regular","dense"]);const qme=["className","component","disableGutters","variant"],Xme=t=>{const{classes:e,disableGutters:n,variant:r}=t;return en({root:["root",!n&&"gutters",r]},jme,e)},Yme=ut("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disableGutters&&e.gutters,e[n.variant]]}})(({theme:t,ownerState:e})=>Q({position:"relative",display:"flex",alignItems:"center"},!e.disableGutters&&{paddingLeft:t.spacing(2),paddingRight:t.spacing(2),[t.breakpoints.up("sm")]:{paddingLeft:t.spacing(3),paddingRight:t.spacing(3)}},e.variant==="dense"&&{minHeight:48}),({theme:t,ownerState:e})=>e.variant==="regular"&&t.mixins.toolbar),Kme=H.forwardRef(function(e,n){const r=nn({props:e,name:"MuiToolbar"}),{className:i,component:o="div",disableGutters:a=!1,variant:s="regular"}=r,l=vt(r,qme),u=Q({},r,{component:o,disableGutters:a,variant:s}),c=Xme(u);return F.jsx(Yme,Q({as:o,className:xt(c.root,i),ref:n,ownerState:u},l))}),Zme=Kme;function Jme(t){return Zt("MuiTableRow",t)}const Qme=Yt("MuiTableRow",["root","selected","hover","head","footer"]),z8=Qme,e0e=["className","component","hover","selected"],t0e=t=>{const{classes:e,selected:n,hover:r,head:i,footer:o}=t;return en({root:["root",n&&"selected",r&&"hover",i&&"head",o&&"footer"]},Jme,e)},n0e=ut("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.head&&e.head,n.footer&&e.footer]}})(({theme:t})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${z8.hover}:hover`]:{backgroundColor:(t.vars||t).palette.action.hover},[`&.${z8.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:Un(t.palette.primary.main,t.palette.action.selectedOpacity),"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:Un(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity)}}})),$8="tr",r0e=H.forwardRef(function(e,n){const r=nn({props:e,name:"MuiTableRow"}),{className:i,component:o=$8,hover:a=!1,selected:s=!1}=r,l=vt(r,e0e),u=H.useContext(lC),c=Q({},r,{component:o,hover:a,selected:s,head:u&&u.variant==="head",footer:u&&u.variant==="footer"}),f=t0e(c);return F.jsx(n0e,Q({as:o,ref:n,className:xt(f.root,i),role:o===$8?null:"row",ownerState:c},l))}),Nw=r0e;function i0e(t){return Zt("MuiTextField",t)}Yt("MuiTextField",["root"]);const o0e=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],a0e={standard:WH,filled:UH,outlined:QH},s0e=t=>{const{classes:e}=t;return en({root:["root"]},i0e,e)},l0e=ut(yl,{name:"MuiTextField",slot:"Root",overridesResolver:(t,e)=>e.root})({}),u0e=H.forwardRef(function(e,n){const r=nn({props:e,name:"MuiTextField"}),{autoComplete:i,autoFocus:o=!1,children:a,className:s,color:l="primary",defaultValue:u,disabled:c=!1,error:f=!1,FormHelperTextProps:d,fullWidth:p=!1,helperText:y,id:x,InputLabelProps:_,inputProps:v,InputProps:S,inputRef:w,label:E,maxRows:T,minRows:C,multiline:D=!1,name:O,onBlur:P,onChange:N,onFocus:k,placeholder:G,required:Z=!1,rows:j,select:K=!1,SelectProps:Y,type:$,value:W,variant:U="outlined"}=r,te=vt(r,o0e),re=Q({},r,{autoFocus:o,color:l,disabled:c,error:f,fullWidth:p,multiline:D,required:Z,select:K,variant:U}),le=s0e(re),ce={};U==="outlined"&&(_&&typeof _.shrink<"u"&&(ce.notched=_.shrink),ce.label=E),K&&((!Y||!Y.native)&&(ce.id=void 0),ce["aria-describedby"]=void 0);const Ce=bv(x),Re=y&&Ce?`${Ce}-helper-text`:void 0,Ie=E&&Ce?`${Ce}-label`:void 0,He=a0e[U],tt=F.jsx(He,Q({"aria-describedby":Re,autoComplete:i,autoFocus:o,defaultValue:u,fullWidth:p,multiline:D,name:O,rows:j,maxRows:T,minRows:C,type:$,value:W,id:Ce,inputRef:w,onBlur:P,onChange:N,onFocus:k,placeholder:G,inputProps:v},ce,S));return F.jsxs(l0e,Q({className:xt(le.root,s),disabled:c,error:f,fullWidth:p,ref:n,required:Z,color:l,variant:U,ownerState:re},te,{children:[E!=null&&E!==""&&F.jsx(Wu,Q({htmlFor:Ce,id:Ie},_,{children:E})),K?F.jsx(Gu,Q({"aria-describedby":Re,id:Ce,labelId:Ie,value:W,input:tt},Y,{children:a})):tt,y&&F.jsx(Dde,Q({id:Re},d,{children:y}))]}))}),Vi=u0e;var oV={epsilon:1e-12,matrix:"Matrix",number:"number",precision:64,predictable:!1,randomSeed:null};function Br(t){return typeof t=="number"}function fo(t){return!t||typeof t!="object"||typeof t.constructor!="function"?!1:t.isBigNumber===!0&&typeof t.constructor.prototype=="object"&&t.constructor.prototype.isBigNumber===!0||typeof t.constructor.isDecimal=="function"&&t.constructor.isDecimal(t)===!0}function G1(t){return t&&typeof t=="object"&&Object.getPrototypeOf(t).isComplex===!0||!1}function aV(t){return t&&typeof t=="object"&&Object.getPrototypeOf(t).isFraction===!0||!1}function cd(t){return t&&t.constructor.prototype.isUnit===!0||!1}function Fu(t){return typeof t=="string"}var jr=Array.isArray;function di(t){return t&&t.constructor.prototype.isMatrix===!0||!1}function Rx(t){return Array.isArray(t)||di(t)}function c0e(t){return t&&t.isDenseMatrix&&t.constructor.prototype.isMatrix===!0||!1}function f0e(t){return t&&t.isSparseMatrix&&t.constructor.prototype.isMatrix===!0||!1}function d0e(t){return t&&t.constructor.prototype.isRange===!0||!1}function XO(t){return t&&t.constructor.prototype.isIndex===!0||!1}function h0e(t){return typeof t=="boolean"}function p0e(t){return t&&t.constructor.prototype.isResultSet===!0||!1}function m0e(t){return t&&t.constructor.prototype.isHelp===!0||!1}function g0e(t){return typeof t=="function"}function v0e(t){return t instanceof Date}function y0e(t){return t instanceof RegExp}function sV(t){return!!(t&&typeof t=="object"&&t.constructor===Object&&!G1(t)&&!aV(t))}function x0e(t){return t===null}function b0e(t){return t===void 0}function _0e(t){return t&&t.isAccessorNode===!0&&t.constructor.prototype.isNode===!0||!1}function w0e(t){return t&&t.isArrayNode===!0&&t.constructor.prototype.isNode===!0||!1}function S0e(t){return t&&t.isAssignmentNode===!0&&t.constructor.prototype.isNode===!0||!1}function E0e(t){return t&&t.isBlockNode===!0&&t.constructor.prototype.isNode===!0||!1}function M0e(t){return t&&t.isConditionalNode===!0&&t.constructor.prototype.isNode===!0||!1}function C0e(t){return t&&t.isConstantNode===!0&&t.constructor.prototype.isNode===!0||!1}function A0e(t){return t&&t.isFunctionAssignmentNode===!0&&t.constructor.prototype.isNode===!0||!1}function T0e(t){return t&&t.isFunctionNode===!0&&t.constructor.prototype.isNode===!0||!1}function D0e(t){return t&&t.isIndexNode===!0&&t.constructor.prototype.isNode===!0||!1}function R0e(t){return t&&t.isNode===!0&&t.constructor.prototype.isNode===!0||!1}function P0e(t){return t&&t.isObjectNode===!0&&t.constructor.prototype.isNode===!0||!1}function N0e(t){return t&&t.isOperatorNode===!0&&t.constructor.prototype.isNode===!0||!1}function O0e(t){return t&&t.isParenthesisNode===!0&&t.constructor.prototype.isNode===!0||!1}function I0e(t){return t&&t.isRangeNode===!0&&t.constructor.prototype.isNode===!0||!1}function F0e(t){return t&&t.isRelationalNode===!0&&t.constructor.prototype.isNode===!0||!1}function L0e(t){return t&&t.isSymbolNode===!0&&t.constructor.prototype.isNode===!0||!1}function k0e(t){return t&&t.constructor.prototype.isChain===!0||!1}function ml(t){var e=typeof t;return e==="object"?t===null?"null":fo(t)?"BigNumber":t.constructor&&t.constructor.name?t.constructor.name:"Object":e}function Lr(t){var e=typeof t;if(e==="number"||e==="string"||e==="boolean"||t===null||t===void 0)return t;if(typeof t.clone=="function")return t.clone();if(Array.isArray(t))return t.map(function(n){return Lr(n)});if(t instanceof Date)return new Date(t.valueOf());if(fo(t))return t;if(sV(t))return B0e(t,Lr);throw new TypeError("Cannot clone: unknown type of value (value: ".concat(t,")"))}function B0e(t,e){var n={};for(var r in t)dr(t,r)&&(n[r]=e(t[r]));return n}function lV(t,e){for(var n in e)dr(e,n)&&(t[n]=e[n]);return t}function ov(t,e){var n,r,i;if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(r=0,i=t.length;r1&&arguments[1]!==void 0?arguments[1]:"any";const oe=B?s(B).index:i.length,ge=[];for(let de=0;de{const ge=r.get(oe);return!ge.isAny&&ge.test(z)});return B.length?B:["any"]}function d(z){return z&&typeof z=="function"&&"_typedFunctionData"in z}function p(z,B,oe){if(!d(z))throw new TypeError(U8);const ge=oe&&oe.exact,pe=Array.isArray(B)?B.join(","):B,de=E(pe),ve=_(de);if(!ge||ve in z.signatures){const je=z._typedFunctionData.signatureMap.get(ve);if(je)return je}const Se=de.length;let Pe;if(ge){Pe=[];let je;for(je in z.signatures)Pe.push(z._typedFunctionData.signatureMap.get(je))}else Pe=z._typedFunctionData.signatures;for(let je=0;je!Ct.has(pt.name)))continue}_t.push(xt)}}if(Pe=_t,Pe.length===0)break}let Be;for(Be of Pe)if(Be.params.length<=Se)return Be;throw new TypeError("Signature not found (signature: "+(z.name||"unnamed")+"("+_(de,", ")+"))")}function y(z,B,oe){return p(z,B,oe).implementation}function x(z,B){const oe=s(B);if(oe.test(z))return z;const ge=oe.conversionsTo;if(ge.length===0)throw new Error("There are no conversions to "+B+" defined.");for(let pe=0;pe1&&arguments[1]!==void 0?arguments[1]:",";return z.map(oe=>oe.name).join(B)}function v(z){const B=z.indexOf("...")===0,ge=(B?z.length>3?z.slice(3):"any":z).split("|").map(Se=>s(Se.trim()));let pe=!1,de=B?"...":"";return{types:ge.map(function(Se){return pe=Se.isAny||pe,de+=Se.name+"|",{name:Se.name,typeIndex:Se.index,test:Se.test,isAny:Se.isAny,conversion:null,conversionIndex:-1}}),name:de.slice(0,-1),hasAny:pe,hasConversion:!1,restParam:B}}function S(z){const B=z.types.map(ve=>ve.name),oe=$(B);let ge=z.hasAny,pe=z.name;const de=oe.map(function(ve){const Se=s(ve.from);return ge=Se.isAny||ge,pe+="|"+ve.from,{name:ve.from,typeIndex:Se.index,test:Se.test,isAny:Se.isAny,conversion:ve,conversionIndex:ve.index}});return{types:z.types.concat(de),name:pe,hasAny:ge,hasConversion:de.length>0,restParam:z.restParam}}function w(z){return z.typeSet||(z.typeSet=new Set,z.types.forEach(B=>z.typeSet.add(B.name))),z.typeSet}function E(z){const B=[];if(typeof z!="string")throw new TypeError("Signatures must be strings");const oe=z.trim();if(oe==="")return B;const ge=oe.split(",");for(let pe=0;pe=pe+1}}else return z.length===0?function(de){return de.length===0}:z.length===1?(oe=C(z[0]),function(de){return oe(de[0])&&de.length===1}):z.length===2?(oe=C(z[0]),ge=C(z[1]),function(de){return oe(de[0])&&ge(de[1])&&de.length===2}):(B=z.map(C),function(de){for(let ve=0;ve{const pe=P(ge.params,B);let de;for(de of pe)oe.add(de)}),oe.has("any")?["any"]:Array.from(oe)}function G(z,B,oe){let ge,pe;const de=z||"unnamed";let ve=oe,Se;for(Se=0;Se{const xt=O(_t.params,Se),wt=C(xt);(Se<_t.params.length||T(_t.params))&&wt(B[Se])&&Le.push(_t)}),Le.length===0){if(pe=k(ve,Se),pe.length>0){const _t=f(B[Se]);return ge=new TypeError("Unexpected type of argument in function "+de+" (expected: "+pe.join(" or ")+", actual: "+_t.join(" | ")+", index: "+Se+")"),ge.data={category:"wrongType",fn:de,index:Se,actual:_t,expected:pe},ge}}else ve=Le}const Pe=ve.map(function(Le){return T(Le.params)?1/0:Le.params.length});if(B.lengthBe)return ge=new TypeError("Too many arguments in function "+de+" (expected: "+Be+", actual: "+B.length+")"),ge.data={category:"tooManyArgs",fn:de,index:B.length,expectedLength:Be},ge;const je=[];for(let Le=0;Le0)return 1;const ge=j(z)-j(B);return ge<0?-1:ge>0?1:0}function Y(z,B){const oe=z.params,ge=B.params,pe=Qe(oe),de=Qe(ge),ve=T(oe),Se=T(ge);if(ve&&pe.hasAny){if(!Se||!de.hasAny)return 1}else if(Se&&de.hasAny)return-1;let Pe=0,Be=0,je;for(je of oe)je.hasAny&&++Pe,je.hasConversion&&++Be;let Le=0,_t=0;for(je of ge)je.hasAny&&++Le,je.hasConversion&&++_t;if(Pe!==Le)return Pe-Le;if(ve&&pe.hasConversion){if(!Se||!de.hasConversion)return 1}else if(Se&&de.hasConversion)return-1;if(Be!==_t)return Be-_t;if(ve){if(!Se)return 1}else if(Se)return-1;const xt=(oe.length-ge.length)*(ve?-1:1);if(xt!==0)return xt;const wt=[];let Ct=0;for(let jt=0;jt1&&B.sort((pe,de)=>pe.index-de.index);let oe=B[0].conversionsTo;if(z.length===1)return oe;oe=oe.concat([]);const ge=new Set(z);for(let pe=1;pepe.hasConversion)){const pe=T(z),de=z.map(U);oe=function(){const Se=[],Pe=pe?arguments.length-1:arguments.length;for(let Be=0;BePe.name).join("|"),hasAny:Se.some(Pe=>Pe.isAny),hasConversion:!1,restParam:!0}),ve.push(de)}else ve=de.types.map(function(Se){return{types:[Se],name:Se.name,hasAny:Se.isAny,hasConversion:Se.conversion,restParam:!1}});return ue(ve,function(Se){return B(oe,ge+1,pe.concat([Se]))})}else return[pe]}return B(z,0,[])}function re(z,B){const oe=Math.max(z.length,B.length);for(let Se=0;Se=ge:ve?ge>=pe:ge===pe}function le(z){return z.map(B=>me(B)?X(B.referToSelf.callback):ne(B)?Ee(B.referTo.references,B.referTo.callback):B)}function ce(z,B,oe){const ge=[];let pe;for(pe of z){let de=oe[pe];if(typeof de!="number")throw new TypeError('No definition for referenced signature "'+pe+'"');if(de=B[de],typeof de!="function")return!1;ge.push(de)}return ge}function Ce(z,B,oe){const ge=le(z),pe=new Array(ge.length).fill(!1);let de=!0;for(;de;){de=!1;let ve=!0;for(let Se=0;Se{const ge=z[oe];if(B.test(ge.toString()))throw new SyntaxError("Using `this` to self-reference a function is deprecated since typed-function@3. Use typed.referTo and typed.referToSelf instead.")})}function Ie(z,B){if(a.createCount++,Object.keys(B).length===0)throw new SyntaxError("No signatures provided");a.warnAgainstDeprecatedThis&&Re(B);const oe=[],ge=[],pe={},de=[];let ve;for(ve in B){if(!Object.prototype.hasOwnProperty.call(B,ve))continue;const vt=E(ve);if(!vt)continue;oe.forEach(function(Xn){if(re(Xn,vt))throw new TypeError('Conflicting signatures "'+_(Xn)+'" and "'+_(vt)+'".')}),oe.push(vt);const Lt=ge.length;ge.push(B[ve]);const sn=vt.map(S);let en;for(en of te(sn)){const Xn=_(en);de.push({params:en,name:Xn,fn:Lt}),en.every(Qr=>!Qr.hasConversion)&&(pe[Xn]=Lt)}}de.sort(Y);const Se=Ce(ge,pe,Wt);let Pe;for(Pe in pe)Object.prototype.hasOwnProperty.call(pe,Pe)&&(pe[Pe]=Se[pe[Pe]]);const Be=[],je=new Map;for(Pe of de)je.has(Pe.name)||(Pe.fn=Se[Pe.fn],Be.push(Pe),je.set(Pe.name,Pe));const Le=Be[0]&&Be[0].params.length<=2&&!T(Be[0].params),_t=Be[1]&&Be[1].params.length<=2&&!T(Be[1].params),xt=Be[2]&&Be[2].params.length<=2&&!T(Be[2].params),wt=Be[3]&&Be[3].params.length<=2&&!T(Be[3].params),Ct=Be[4]&&Be[4].params.length<=2&&!T(Be[4].params),pt=Be[5]&&Be[5].params.length<=2&&!T(Be[5].params),jt=Le&&_t&&xt&&wt&&Ct&&pt;for(let vt=0;vtvt.test),Mt=Be.map(vt=>vt.implementation),Ft=function(){for(let Lt=Oe;Lt_(E(oe))),B=Qe(arguments);if(typeof B!="function")throw new TypeError("Callback function expected as last argument");return Ee(z,B)}function Ee(z,B){return{referTo:{references:z,callback:B}}}function X(z){if(typeof z!="function")throw new TypeError("Callback function expected as first argument");return{referToSelf:{callback:z}}}function ne(z){return z&&typeof z.referTo=="object"&&Array.isArray(z.referTo.references)&&typeof z.referTo.callback=="function"}function me(z){return z&&typeof z.referToSelf=="object"&&typeof z.referToSelf.callback=="function"}function we(z,B){if(!z)return B;if(B&&B!==z){const oe=new Error("Function names do not match (expected: "+z+", actual: "+B+")");throw oe.data={actual:B,expected:z},oe}return z}function Ne(z){let B;for(const oe in z)Object.prototype.hasOwnProperty.call(z,oe)&&(d(z[oe])||typeof z[oe].signature=="string")&&(B=we(B,z[oe].name));return B}function Ue(z,B){let oe;for(oe in B)if(Object.prototype.hasOwnProperty.call(B,oe)){if(oe in z&&B[oe]!==z[oe]){const ge=new Error('Signature "'+oe+'" is defined twice');throw ge.data={signature:oe,sourceFunction:B[oe],destFunction:z[oe]},ge}z[oe]=B[oe]}}const We=a;a=function(z){const B=typeof z=="string",oe=B?1:0;let ge=B?z:"";const pe={};for(let de=oe;depe.from===z.from);if(!oe)throw new Error("Attempt to remove nonexistent conversion from "+z.from+" to "+z.to);if(oe.convert!==z.convert)throw new Error("Conversion to remove does not match existing conversion");const ge=B.conversionsTo.indexOf(oe);B.conversionsTo.splice(ge,1)},a.resolve=function(z,B){if(!d(z))throw new TypeError(U8);const oe=z._typedFunctionData.signatures;for(let ge=0;ge2**(n-1)-1||t<-(2**(n-1)))throw new Error("Value must be in range [-2^".concat(n-1,", 2^").concat(n-1,"-1]"));if(!Pr(t))throw new Error("Value must be an integer");t<0&&(t=t+2**n),o="i".concat(n)}var a="";return t<0&&(t=-t,a="-"),"".concat(a).concat(i).concat(t.toString(e)).concat(o)}function TR(t,e){if(typeof e=="function")return e(t);if(t===1/0)return"Infinity";if(t===-1/0)return"-Infinity";if(isNaN(t))return"NaN";var n="auto",r,i;if(e&&(e.notation&&(n=e.notation),Br(e)?r=e:Br(e.precision)&&(r=e.precision),e.wordSize&&(i=e.wordSize,typeof i!="number")))throw new Error('Option "wordSize" must be a number');switch(n){case"fixed":return rV(t,r);case"exponential":return iV(t,r);case"engineering":return N0e(t,r);case"bin":return GT(t,2,i);case"oct":return GT(t,8,i);case"hex":return GT(t,16,i);case"auto":return O0e(t,r,e&&e).replace(/((\.\d*?)(0+))($|e)/,function(){var o=arguments[2],a=arguments[4];return o!=="."?o+a:a});default:throw new Error('Unknown notation "'+n+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function lC(t){var e=String(t).toLowerCase().match(/^(-?)(\d+\.?\d*)(e([+-]?\d+))?$/);if(!e)throw new SyntaxError("Invalid number "+t);var n=e[1],r=e[2],i=parseFloat(e[4]||"0"),o=r.indexOf(".");i+=o!==-1?o-1:r.length-1;var a=r.replace(".","").replace(/^0*/,function(s){return i-=s.length,""}).replace(/0*$/,"").split("").map(function(s){return parseInt(s)});return a.length===0&&(a.push(0),i++),{sign:n,coefficients:a,exponent:i}}function N0e(t,e){if(isNaN(t)||!isFinite(t))return String(t);var n=lC(t),r=uC(n,e),i=r.exponent,o=r.coefficients,a=i%3===0?i:i<0?i-3-i%3:i-i%3;if(Br(e))for(;e>o.length||i-a+1>o.length;)o.push(0);else for(var s=Math.abs(i-a)-(o.length-1),l=0;l0;)c++,u--;var f=o.slice(c).join(""),d=Br(e)&&f.length||f.match(/[1-9]/)?"."+f:"",p=o.slice(0,c).join("")+d+"e"+(i>=0?"+":"")+a.toString();return r.sign+p}function rV(t,e){if(isNaN(t)||!isFinite(t))return String(t);var n=lC(t),r=typeof e=="number"?uC(n,n.exponent+1+e):n,i=r.coefficients,o=r.exponent+1,a=o+(e||0);return i.length0?"."+i.join(""):"")+"e"+(o>=0?"+":"")+o}function O0e(t,e,n){if(isNaN(t)||!isFinite(t))return String(t);var r=n&&n.lowerExp!==void 0?n.lowerExp:-3,i=n&&n.upperExp!==void 0?n.upperExp:5,o=lC(t),a=e?uC(o,e):o;if(a.exponent=i)return iV(t,e);var s=a.coefficients,l=a.exponent;s.length0?l:0;return ue){var i=r.splice(e,r.length-e);if(i[0]>=5){var o=e-1;for(r[o]++;r[o]===10;)r.pop(),o===0&&(r.unshift(0),n.exponent++,o++),o--,r[o]++}}return n}function Og(t){for(var e=[],n=0;n=o&&u=0?"+":"")+r.toString()}function $8(t,e){return e!==void 0?t.toExponential(e-1):t.toExponential()}function B0e(t,e){return t.toFixed(e)}function U0e(t,e){var n=t.length-e.length,r=t.length;return t.substring(n,r)===e}function ui(t,e){var n=z0e(t,e);return e&&typeof e=="object"&&"truncate"in e&&n.length>e.truncate?n.substring(0,e.truncate-3)+"...":n}function z0e(t,e){if(typeof t=="number")return TR(t,e);if(co(t))return L0e(t,e);if($0e(t))return!e||e.fraction!=="decimal"?t.s*t.n+"/"+t.d:t.toString();if(Array.isArray(t))return oV(t,e);if(Lu(t))return H8(t);if(typeof t=="function")return t.syntax?String(t.syntax):"function";if(t&&typeof t=="object"){if(typeof t.format=="function")return t.format(e);if(t&&t.toString(e)!=={}.toString())return t.toString(e);var n=Object.keys(t).map(r=>H8(r)+": "+ui(t[r],e));return"{"+n.join(", ")+"}"}return String(t)}function H8(t){for(var e=String(t),n="",r=0;r=this.max?this.message="Index out of range ("+this.index+" > "+(this.max-1)+")":this.message="Index out of range ("+this.index+")",this.stack=new Error().stack}eh.prototype=new RangeError;eh.prototype.constructor=RangeError;eh.prototype.name="IndexError";eh.prototype.isIndexError=!0;function wa(t){for(var e=[];Array.isArray(t);)e.push(t.length),t=t[0];return e}function aV(t,e,n){var r,i=t.length;if(i!==e[n])throw new er(i,e[n]);if(n")}function W8(t,e){var n=e.length===0;if(n){if(Array.isArray(t))throw new er(t.length,0)}else aV(t,e,0)}function qr(t,e){if(t!==void 0){if(!Br(t)||!Pr(t))throw new TypeError("Index must be an integer (value: "+t+")");if(t<0||typeof e=="number"&&t>=e)throw new eh(t,e)}}function n2(t,e,n){if(!Array.isArray(e))throw new TypeError("Array expected");if(e.length===0)throw new Error("Resizing to scalar is not supported");e.forEach(function(i){if(!Br(i)||!Pr(i)||i<0)throw new TypeError("Invalid size, must contain positive integers (size: "+ui(e)+")")}),(Br(t)||co(t))&&(t=[t]);var r=n!==void 0?n:0;return DR(t,e,0,r),t}function DR(t,e,n,r){var i,o,a=t.length,s=e[n],l=Math.min(a,s);if(t.length=s,n=0,l=e%n===0;if(s)if(l)r[o]=-e/n;else throw new Error("Could not replace wildcard, since "+e+" is no multiple of "+-n);return r}function lV(t){return t.reduce((e,n)=>e*n,1)}function H0e(t,e){for(var n=t,r,i=e.length-1;i>0;i--){var o=e[i];r=[];for(var a=n.length/o,s=0;s1)return t.slice(1).reduce(function(n,r){return fV(n,r,e,0)},t[0]);throw new Error("Wrong number of arguments in function concat")}function W0e(){for(var t=arguments.length,e=new Array(t),n=0;nd.length),i=Math.max(...r),o=new Array(i).fill(null),a=0;ao[c]&&(o[c]=s[u])}for(var f=0;f1||t[i]>e[o])throw new Error("shape missmatch: missmatch is found in arg with shape (".concat(t,") not possible to broadcast dimension ").concat(r," with size ").concat(t[i]," to size ").concat(e[o]))}}function G8(t,e){var n=wa(t);if(nv(n,e))return t;i2(n,e);var r=W0e(n,e),i=r.length,o=[...Array(i-n.length).fill(1),...n],a=j0e(t);n.length!X0e(o)).every(o=>n[o]!==void 0);if(!r){var i=e.filter(o=>n[o]===void 0);throw new Error('Cannot create function "'.concat(t,'", ')+"some dependencies are missing: ".concat(i.map(o=>'"'.concat(o,'"')).join(", "),"."))}}function X0e(t){return t&&t[0]==="?"}function Y0e(t){return t&&t[0]==="?"?t.slice(1):t}function K0e(t,e){if(pV(t)&&hV(t,e))return t[e];throw typeof t[e]=="function"&&Q0e(t,e)?new Error('Cannot access method "'+e+'" as a property'):new Error('No access to property "'+e+'"')}function Z0e(t,e,n){if(pV(t)&&hV(t,e))return t[e]=n,n;throw new Error('No access to property "'+e+'"')}function J0e(t,e){return e in t}function hV(t,e){return!t||typeof t!="object"?!1:dr(ege,e)?!0:!(e in Object.prototype||e in Function.prototype)}function Q0e(t,e){return t==null||typeof t[e]!="function"||dr(t,e)&&Object.getPrototypeOf&&e in Object.getPrototypeOf(t)?!1:dr(tge,e)?!0:!(e in Object.prototype||e in Function.prototype)}function pV(t){return typeof t=="object"&&t&&t.constructor===Object}var ege={length:!0,name:!0},tge={toString:!0,valueOf:!0,toLocaleString:!0};class nge{constructor(e){this.wrappedObject=e}keys(){return Object.keys(this.wrappedObject)}get(e){return K0e(this.wrappedObject,e)}set(e,n){return Z0e(this.wrappedObject,e,n),this}has(e){return J0e(this.wrappedObject,e)}}function rge(t){return t?t instanceof Map||t instanceof nge||typeof t.set=="function"&&typeof t.get=="function"&&typeof t.keys=="function"&&typeof t.has=="function":!1}var mV=function(){return mV=z8.create,z8},ige=["?BigNumber","?Complex","?DenseMatrix","?Fraction"],oge=Tt("typed",ige,function(e){var{BigNumber:n,Complex:r,DenseMatrix:i,Fraction:o}=e,a=mV();return a.clear(),a.addTypes([{name:"number",test:Br},{name:"Complex",test:H1},{name:"BigNumber",test:co},{name:"Fraction",test:QH},{name:"Unit",test:ud},{name:"identifier",test:s=>Lu&&/^(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])(?:[0-9A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])*$/.test(s)},{name:"string",test:Lu},{name:"Chain",test:A0e},{name:"Array",test:jr},{name:"Matrix",test:di},{name:"DenseMatrix",test:e0e},{name:"SparseMatrix",test:t0e},{name:"Range",test:n0e},{name:"Index",test:qO},{name:"boolean",test:r0e},{name:"ResultSet",test:i0e},{name:"Help",test:o0e},{name:"function",test:a0e},{name:"Date",test:s0e},{name:"RegExp",test:l0e},{name:"null",test:u0e},{name:"undefined",test:c0e},{name:"AccessorNode",test:f0e},{name:"ArrayNode",test:d0e},{name:"AssignmentNode",test:h0e},{name:"BlockNode",test:p0e},{name:"ConditionalNode",test:m0e},{name:"ConstantNode",test:g0e},{name:"FunctionNode",test:y0e},{name:"FunctionAssignmentNode",test:v0e},{name:"IndexNode",test:x0e},{name:"Node",test:b0e},{name:"ObjectNode",test:_0e},{name:"OperatorNode",test:w0e},{name:"ParenthesisNode",test:S0e},{name:"RangeNode",test:E0e},{name:"RelationalNode",test:M0e},{name:"SymbolNode",test:C0e},{name:"Map",test:rge},{name:"Object",test:eV}]),a.addConversions([{from:"number",to:"BigNumber",convert:function(l){if(n||qT(l),I0e(l)>15)throw new TypeError("Cannot implicitly convert a number with >15 significant digits to BigNumber (value: "+l+"). Use function bignumber(x) to convert to BigNumber.");return new n(l)}},{from:"number",to:"Complex",convert:function(l){return r||Ow(l),new r(l,0)}},{from:"BigNumber",to:"Complex",convert:function(l){return r||Ow(l),new r(l.toNumber(),0)}},{from:"Fraction",to:"BigNumber",convert:function(l){throw new TypeError("Cannot implicitly convert a Fraction to BigNumber or vice versa. Use function bignumber(x) to convert to BigNumber or fraction(x) to convert to Fraction.")}},{from:"Fraction",to:"Complex",convert:function(l){return r||Ow(l),new r(l.valueOf(),0)}},{from:"number",to:"Fraction",convert:function(l){o||XT(l);var u=new o(l);if(u.valueOf()!==l)throw new TypeError("Cannot implicitly convert a number to a Fraction when there will be a loss of precision (value: "+l+"). Use function fraction(x) to convert to Fraction.");return u}},{from:"string",to:"number",convert:function(l){var u=Number(l);if(isNaN(u))throw new Error('Cannot convert "'+l+'" to a number');return u}},{from:"string",to:"BigNumber",convert:function(l){n||qT(l);try{return new n(l)}catch{throw new Error('Cannot convert "'+l+'" to BigNumber')}}},{from:"string",to:"Fraction",convert:function(l){o||XT(l);try{return new o(l)}catch{throw new Error('Cannot convert "'+l+'" to Fraction')}}},{from:"string",to:"Complex",convert:function(l){r||Ow(l);try{return new r(l)}catch{throw new Error('Cannot convert "'+l+'" to Complex')}}},{from:"boolean",to:"number",convert:function(l){return+l}},{from:"boolean",to:"BigNumber",convert:function(l){return n||qT(l),new n(+l)}},{from:"boolean",to:"Fraction",convert:function(l){return o||XT(l),new o(+l)}},{from:"boolean",to:"string",convert:function(l){return String(l)}},{from:"Array",to:"Matrix",convert:function(l){return i||age(),new i(l)}},{from:"Matrix",to:"Array",convert:function(l){return l.valueOf()}}]),a.onMismatch=(s,l,u)=>{var c=a.createError(s,l,u);if(["wrongType","mismatch"].includes(c.data.category)&&l.length===1&&Dx(l[0])&&u.some(d=>!d.params.includes(","))){var f=new TypeError("Function '".concat(s,"' doesn't apply to matrices. To call it ")+"elementwise on a matrix 'M', try 'map(M, ".concat(s,")'."));throw f.data=c.data,f}throw c},a.onMismatch=(s,l,u)=>{var c=a.createError(s,l,u);if(["wrongType","mismatch"].includes(c.data.category)&&l.length===1&&Dx(l[0])&&u.some(d=>!d.params.includes(","))){var f=new TypeError("Function '".concat(s,"' doesn't apply to matrices. To call it ")+"elementwise on a matrix 'M', try 'map(M, ".concat(s,")'."));throw f.data=c.data,f}throw c},a});function qT(t){throw new Error("Cannot convert value ".concat(t," into a BigNumber: no class 'BigNumber' provided"))}function Ow(t){throw new Error("Cannot convert value ".concat(t," into a Complex number: no class 'Complex' provided"))}function age(){throw new Error("Cannot convert array into a Matrix: no class 'DenseMatrix' provided")}function XT(t){throw new Error("Cannot convert value ".concat(t," into a Fraction, no class 'Fraction' provided."))}/*! +`);return Object.freeze(oV)};Q(Qo,oV,{MATRIX_OPTIONS:z0e,NUMBER_OPTIONS:$0e});function H8(){return!0}function ol(){return!1}function a0(){}const V8="Argument is not a typed-function.";function uV(){function t(z){return typeof z=="object"&&z!==null&&z.constructor===Object}const e=[{name:"number",test:function(z){return typeof z=="number"}},{name:"string",test:function(z){return typeof z=="string"}},{name:"boolean",test:function(z){return typeof z=="boolean"}},{name:"Function",test:function(z){return typeof z=="function"}},{name:"Array",test:Array.isArray},{name:"Date",test:function(z){return z instanceof Date}},{name:"RegExp",test:function(z){return z instanceof RegExp}},{name:"Object",test:t},{name:"null",test:function(z){return z===null}},{name:"undefined",test:function(z){return z===void 0}}],n={name:"any",test:H8,isAny:!0};let r,i,o=0,a={createCount:0};function s(z){const B=r.get(z);if(B)return B;let oe='Unknown type "'+z+'"';const ge=z.toLowerCase();let pe;for(pe of i)if(pe.toLowerCase()===ge){oe+='. Did you mean "'+pe+'" ?';break}throw new TypeError(oe)}function l(z){let B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"any";const oe=B?s(B).index:i.length,ge=[];for(let de=0;de{const ge=r.get(oe);return!ge.isAny&&ge.test(z)});return B.length?B:["any"]}function d(z){return z&&typeof z=="function"&&"_typedFunctionData"in z}function p(z,B,oe){if(!d(z))throw new TypeError(V8);const ge=oe&&oe.exact,pe=Array.isArray(B)?B.join(","):B,de=E(pe),ve=_(de);if(!ge||ve in z.signatures){const je=z._typedFunctionData.signatureMap.get(ve);if(je)return je}const Se=de.length;let Pe;if(ge){Pe=[];let je;for(je in z.signatures)Pe.push(z._typedFunctionData.signatureMap.get(je))}else Pe=z._typedFunctionData.signatures;for(let je=0;je!Ct.has(pt.name)))continue}_t.push(bt)}}if(Pe=_t,Pe.length===0)break}let Be;for(Be of Pe)if(Be.params.length<=Se)return Be;throw new TypeError("Signature not found (signature: "+(z.name||"unnamed")+"("+_(de,", ")+"))")}function y(z,B,oe){return p(z,B,oe).implementation}function x(z,B){const oe=s(B);if(oe.test(z))return z;const ge=oe.conversionsTo;if(ge.length===0)throw new Error("There are no conversions to "+B+" defined.");for(let pe=0;pe1&&arguments[1]!==void 0?arguments[1]:",";return z.map(oe=>oe.name).join(B)}function v(z){const B=z.indexOf("...")===0,ge=(B?z.length>3?z.slice(3):"any":z).split("|").map(Se=>s(Se.trim()));let pe=!1,de=B?"...":"";return{types:ge.map(function(Se){return pe=Se.isAny||pe,de+=Se.name+"|",{name:Se.name,typeIndex:Se.index,test:Se.test,isAny:Se.isAny,conversion:null,conversionIndex:-1}}),name:de.slice(0,-1),hasAny:pe,hasConversion:!1,restParam:B}}function S(z){const B=z.types.map(ve=>ve.name),oe=$(B);let ge=z.hasAny,pe=z.name;const de=oe.map(function(ve){const Se=s(ve.from);return ge=Se.isAny||ge,pe+="|"+ve.from,{name:ve.from,typeIndex:Se.index,test:Se.test,isAny:Se.isAny,conversion:ve,conversionIndex:ve.index}});return{types:z.types.concat(de),name:pe,hasAny:ge,hasConversion:de.length>0,restParam:z.restParam}}function w(z){return z.typeSet||(z.typeSet=new Set,z.types.forEach(B=>z.typeSet.add(B.name))),z.typeSet}function E(z){const B=[];if(typeof z!="string")throw new TypeError("Signatures must be strings");const oe=z.trim();if(oe==="")return B;const ge=oe.split(",");for(let pe=0;pe=pe+1}}else return z.length===0?function(de){return de.length===0}:z.length===1?(oe=C(z[0]),function(de){return oe(de[0])&&de.length===1}):z.length===2?(oe=C(z[0]),ge=C(z[1]),function(de){return oe(de[0])&&ge(de[1])&&de.length===2}):(B=z.map(C),function(de){for(let ve=0;ve{const pe=P(ge.params,B);let de;for(de of pe)oe.add(de)}),oe.has("any")?["any"]:Array.from(oe)}function G(z,B,oe){let ge,pe;const de=z||"unnamed";let ve=oe,Se;for(Se=0;Se{const bt=O(_t.params,Se),wt=C(bt);(Se<_t.params.length||T(_t.params))&&wt(B[Se])&&Le.push(_t)}),Le.length===0){if(pe=k(ve,Se),pe.length>0){const _t=f(B[Se]);return ge=new TypeError("Unexpected type of argument in function "+de+" (expected: "+pe.join(" or ")+", actual: "+_t.join(" | ")+", index: "+Se+")"),ge.data={category:"wrongType",fn:de,index:Se,actual:_t,expected:pe},ge}}else ve=Le}const Pe=ve.map(function(Le){return T(Le.params)?1/0:Le.params.length});if(B.lengthBe)return ge=new TypeError("Too many arguments in function "+de+" (expected: "+Be+", actual: "+B.length+")"),ge.data={category:"tooManyArgs",fn:de,index:B.length,expectedLength:Be},ge;const je=[];for(let Le=0;Le0)return 1;const ge=j(z)-j(B);return ge<0?-1:ge>0?1:0}function Y(z,B){const oe=z.params,ge=B.params,pe=Qe(oe),de=Qe(ge),ve=T(oe),Se=T(ge);if(ve&&pe.hasAny){if(!Se||!de.hasAny)return 1}else if(Se&&de.hasAny)return-1;let Pe=0,Be=0,je;for(je of oe)je.hasAny&&++Pe,je.hasConversion&&++Be;let Le=0,_t=0;for(je of ge)je.hasAny&&++Le,je.hasConversion&&++_t;if(Pe!==Le)return Pe-Le;if(ve&&pe.hasConversion){if(!Se||!de.hasConversion)return 1}else if(Se&&de.hasConversion)return-1;if(Be!==_t)return Be-_t;if(ve){if(!Se)return 1}else if(Se)return-1;const bt=(oe.length-ge.length)*(ve?-1:1);if(bt!==0)return bt;const wt=[];let Ct=0;for(let qt=0;qt1&&B.sort((pe,de)=>pe.index-de.index);let oe=B[0].conversionsTo;if(z.length===1)return oe;oe=oe.concat([]);const ge=new Set(z);for(let pe=1;pepe.hasConversion)){const pe=T(z),de=z.map(U);oe=function(){const Se=[],Pe=pe?arguments.length-1:arguments.length;for(let Be=0;BePe.name).join("|"),hasAny:Se.some(Pe=>Pe.isAny),hasConversion:!1,restParam:!0}),ve.push(de)}else ve=de.types.map(function(Se){return{types:[Se],name:Se.name,hasAny:Se.isAny,hasConversion:Se.conversion,restParam:!1}});return ue(ve,function(Se){return B(oe,ge+1,pe.concat([Se]))})}else return[pe]}return B(z,0,[])}function re(z,B){const oe=Math.max(z.length,B.length);for(let Se=0;Se=ge:ve?ge>=pe:ge===pe}function le(z){return z.map(B=>me(B)?X(B.referToSelf.callback):ne(B)?Ee(B.referTo.references,B.referTo.callback):B)}function ce(z,B,oe){const ge=[];let pe;for(pe of z){let de=oe[pe];if(typeof de!="number")throw new TypeError('No definition for referenced signature "'+pe+'"');if(de=B[de],typeof de!="function")return!1;ge.push(de)}return ge}function Ce(z,B,oe){const ge=le(z),pe=new Array(ge.length).fill(!1);let de=!0;for(;de;){de=!1;let ve=!0;for(let Se=0;Se{const ge=z[oe];if(B.test(ge.toString()))throw new SyntaxError("Using `this` to self-reference a function is deprecated since typed-function@3. Use typed.referTo and typed.referToSelf instead.")})}function Ie(z,B){if(a.createCount++,Object.keys(B).length===0)throw new SyntaxError("No signatures provided");a.warnAgainstDeprecatedThis&&Re(B);const oe=[],ge=[],pe={},de=[];let ve;for(ve in B){if(!Object.prototype.hasOwnProperty.call(B,ve))continue;const yt=E(ve);if(!yt)continue;oe.forEach(function(Xn){if(re(Xn,yt))throw new TypeError('Conflicting signatures "'+_(Xn)+'" and "'+_(yt)+'".')}),oe.push(yt);const Lt=ge.length;ge.push(B[ve]);const an=yt.map(S);let tn;for(tn of te(an)){const Xn=_(tn);de.push({params:tn,name:Xn,fn:Lt}),tn.every(Qr=>!Qr.hasConversion)&&(pe[Xn]=Lt)}}de.sort(Y);const Se=Ce(ge,pe,Wt);let Pe;for(Pe in pe)Object.prototype.hasOwnProperty.call(pe,Pe)&&(pe[Pe]=Se[pe[Pe]]);const Be=[],je=new Map;for(Pe of de)je.has(Pe.name)||(Pe.fn=Se[Pe.fn],Be.push(Pe),je.set(Pe.name,Pe));const Le=Be[0]&&Be[0].params.length<=2&&!T(Be[0].params),_t=Be[1]&&Be[1].params.length<=2&&!T(Be[1].params),bt=Be[2]&&Be[2].params.length<=2&&!T(Be[2].params),wt=Be[3]&&Be[3].params.length<=2&&!T(Be[3].params),Ct=Be[4]&&Be[4].params.length<=2&&!T(Be[4].params),pt=Be[5]&&Be[5].params.length<=2&&!T(Be[5].params),qt=Le&&_t&&bt&&wt&&Ct&&pt;for(let yt=0;ytyt.test),Mt=Be.map(yt=>yt.implementation),Ft=function(){for(let Lt=Oe;Lt_(E(oe))),B=Qe(arguments);if(typeof B!="function")throw new TypeError("Callback function expected as last argument");return Ee(z,B)}function Ee(z,B){return{referTo:{references:z,callback:B}}}function X(z){if(typeof z!="function")throw new TypeError("Callback function expected as first argument");return{referToSelf:{callback:z}}}function ne(z){return z&&typeof z.referTo=="object"&&Array.isArray(z.referTo.references)&&typeof z.referTo.callback=="function"}function me(z){return z&&typeof z.referToSelf=="object"&&typeof z.referToSelf.callback=="function"}function we(z,B){if(!z)return B;if(B&&B!==z){const oe=new Error("Function names do not match (expected: "+z+", actual: "+B+")");throw oe.data={actual:B,expected:z},oe}return z}function Ne(z){let B;for(const oe in z)Object.prototype.hasOwnProperty.call(z,oe)&&(d(z[oe])||typeof z[oe].signature=="string")&&(B=we(B,z[oe].name));return B}function Ue(z,B){let oe;for(oe in B)if(Object.prototype.hasOwnProperty.call(B,oe)){if(oe in z&&B[oe]!==z[oe]){const ge=new Error('Signature "'+oe+'" is defined twice');throw ge.data={signature:oe,sourceFunction:B[oe],destFunction:z[oe]},ge}z[oe]=B[oe]}}const We=a;a=function(z){const B=typeof z=="string",oe=B?1:0;let ge=B?z:"";const pe={};for(let de=oe;depe.from===z.from);if(!oe)throw new Error("Attempt to remove nonexistent conversion from "+z.from+" to "+z.to);if(oe.convert!==z.convert)throw new Error("Conversion to remove does not match existing conversion");const ge=B.conversionsTo.indexOf(oe);B.conversionsTo.splice(ge,1)},a.resolve=function(z,B){if(!d(z))throw new TypeError(V8);const oe=z._typedFunctionData.signatures;for(let ge=0;ge2**(n-1)-1||t<-(2**(n-1)))throw new Error("Value must be in range [-2^".concat(n-1,", 2^").concat(n-1,"-1]"));if(!Pr(t))throw new Error("Value must be an integer");t<0&&(t=t+2**n),o="i".concat(n)}var a="";return t<0&&(t=-t,a="-"),"".concat(a).concat(i).concat(t.toString(e)).concat(o)}function RR(t,e){if(typeof e=="function")return e(t);if(t===1/0)return"Infinity";if(t===-1/0)return"-Infinity";if(isNaN(t))return"NaN";var n="auto",r,i;if(e&&(e.notation&&(n=e.notation),Br(e)?r=e:Br(e.precision)&&(r=e.precision),e.wordSize&&(i=e.wordSize,typeof i!="number")))throw new Error('Option "wordSize" must be a number');switch(n){case"fixed":return cV(t,r);case"exponential":return fV(t,r);case"engineering":return H0e(t,r);case"bin":return jT(t,2,i);case"oct":return jT(t,8,i);case"hex":return jT(t,16,i);case"auto":return V0e(t,r,e&&e).replace(/((\.\d*?)(0+))($|e)/,function(){var o=arguments[2],a=arguments[4];return o!=="."?o+a:a});default:throw new Error('Unknown notation "'+n+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function uC(t){var e=String(t).toLowerCase().match(/^(-?)(\d+\.?\d*)(e([+-]?\d+))?$/);if(!e)throw new SyntaxError("Invalid number "+t);var n=e[1],r=e[2],i=parseFloat(e[4]||"0"),o=r.indexOf(".");i+=o!==-1?o-1:r.length-1;var a=r.replace(".","").replace(/^0*/,function(s){return i-=s.length,""}).replace(/0*$/,"").split("").map(function(s){return parseInt(s)});return a.length===0&&(a.push(0),i++),{sign:n,coefficients:a,exponent:i}}function H0e(t,e){if(isNaN(t)||!isFinite(t))return String(t);var n=uC(t),r=cC(n,e),i=r.exponent,o=r.coefficients,a=i%3===0?i:i<0?i-3-i%3:i-i%3;if(Br(e))for(;e>o.length||i-a+1>o.length;)o.push(0);else for(var s=Math.abs(i-a)-(o.length-1),l=0;l0;)c++,u--;var f=o.slice(c).join(""),d=Br(e)&&f.length||f.match(/[1-9]/)?"."+f:"",p=o.slice(0,c).join("")+d+"e"+(i>=0?"+":"")+a.toString();return r.sign+p}function cV(t,e){if(isNaN(t)||!isFinite(t))return String(t);var n=uC(t),r=typeof e=="number"?cC(n,n.exponent+1+e):n,i=r.coefficients,o=r.exponent+1,a=o+(e||0);return i.length0?"."+i.join(""):"")+"e"+(o>=0?"+":"")+o}function V0e(t,e,n){if(isNaN(t)||!isFinite(t))return String(t);var r=n&&n.lowerExp!==void 0?n.lowerExp:-3,i=n&&n.upperExp!==void 0?n.upperExp:5,o=uC(t),a=e?cC(o,e):o;if(a.exponent=i)return fV(t,e);var s=a.coefficients,l=a.exponent;s.length0?l:0;return ue){var i=r.splice(e,r.length-e);if(i[0]>=5){var o=e-1;for(r[o]++;r[o]===10;)r.pop(),o===0&&(r.unshift(0),n.exponent++,o++),o--,r[o]++}}return n}function Ig(t){for(var e=[],n=0;n=o&&u=0?"+":"")+r.toString()}function G8(t,e){return e!==void 0?t.toExponential(e-1):t.toExponential()}function X0e(t,e){return t.toFixed(e)}function Y0e(t,e){var n=t.length-e.length,r=t.length;return t.substring(n,r)===e}function ui(t,e){var n=K0e(t,e);return e&&typeof e=="object"&&"truncate"in e&&n.length>e.truncate?n.substring(0,e.truncate-3)+"...":n}function K0e(t,e){if(typeof t=="number")return RR(t,e);if(fo(t))return j0e(t,e);if(Z0e(t))return!e||e.fraction!=="decimal"?t.s*t.n+"/"+t.d:t.toString();if(Array.isArray(t))return dV(t,e);if(Fu(t))return j8(t);if(typeof t=="function")return t.syntax?String(t.syntax):"function";if(t&&typeof t=="object"){if(typeof t.format=="function")return t.format(e);if(t&&t.toString(e)!=={}.toString())return t.toString(e);var n=Object.keys(t).map(r=>j8(r)+": "+ui(t[r],e));return"{"+n.join(", ")+"}"}return String(t)}function j8(t){for(var e=String(t),n="",r=0;r=this.max?this.message="Index out of range ("+this.index+" > "+(this.max-1)+")":this.message="Index out of range ("+this.index+")",this.stack=new Error().stack}th.prototype=new RangeError;th.prototype.constructor=RangeError;th.prototype.name="IndexError";th.prototype.isIndexError=!0;function wa(t){for(var e=[];Array.isArray(t);)e.push(t.length),t=t[0];return e}function hV(t,e,n){var r,i=t.length;if(i!==e[n])throw new er(i,e[n]);if(n")}function X8(t,e){var n=e.length===0;if(n){if(Array.isArray(t))throw new er(t.length,0)}else hV(t,e,0)}function qr(t,e){if(t!==void 0){if(!Br(t)||!Pr(t))throw new TypeError("Index must be an integer (value: "+t+")");if(t<0||typeof e=="number"&&t>=e)throw new th(t,e)}}function n2(t,e,n){if(!Array.isArray(e))throw new TypeError("Array expected");if(e.length===0)throw new Error("Resizing to scalar is not supported");e.forEach(function(i){if(!Br(i)||!Pr(i)||i<0)throw new TypeError("Invalid size, must contain positive integers (size: "+ui(e)+")")}),(Br(t)||fo(t))&&(t=[t]);var r=n!==void 0?n:0;return PR(t,e,0,r),t}function PR(t,e,n,r){var i,o,a=t.length,s=e[n],l=Math.min(a,s);if(t.length=s,n=0,l=e%n===0;if(s)if(l)r[o]=-e/n;else throw new Error("Could not replace wildcard, since "+e+" is no multiple of "+-n);return r}function mV(t){return t.reduce((e,n)=>e*n,1)}function J0e(t,e){for(var n=t,r,i=e.length-1;i>0;i--){var o=e[i];r=[];for(var a=n.length/o,s=0;s1)return t.slice(1).reduce(function(n,r){return yV(n,r,e,0)},t[0]);throw new Error("Wrong number of arguments in function concat")}function ege(){for(var t=arguments.length,e=new Array(t),n=0;nd.length),i=Math.max(...r),o=new Array(i).fill(null),a=0;ao[c]&&(o[c]=s[u])}for(var f=0;f1||t[i]>e[o])throw new Error("shape missmatch: missmatch is found in arg with shape (".concat(t,") not possible to broadcast dimension ").concat(r," with size ").concat(t[i]," to size ").concat(e[o]))}}function Y8(t,e){var n=wa(t);if(ov(n,e))return t;i2(n,e);var r=ege(n,e),i=r.length,o=[...Array(i-n.length).fill(1),...n],a=nge(t);n.length!ige(o)).every(o=>n[o]!==void 0);if(!r){var i=e.filter(o=>n[o]===void 0);throw new Error('Cannot create function "'.concat(t,'", ')+"some dependencies are missing: ".concat(i.map(o=>'"'.concat(o,'"')).join(", "),"."))}}function ige(t){return t&&t[0]==="?"}function oge(t){return t&&t[0]==="?"?t.slice(1):t}function age(t,e){if(_V(t)&&bV(t,e))return t[e];throw typeof t[e]=="function"&&uge(t,e)?new Error('Cannot access method "'+e+'" as a property'):new Error('No access to property "'+e+'"')}function sge(t,e,n){if(_V(t)&&bV(t,e))return t[e]=n,n;throw new Error('No access to property "'+e+'"')}function lge(t,e){return e in t}function bV(t,e){return!t||typeof t!="object"?!1:dr(cge,e)?!0:!(e in Object.prototype||e in Function.prototype)}function uge(t,e){return t==null||typeof t[e]!="function"||dr(t,e)&&Object.getPrototypeOf&&e in Object.getPrototypeOf(t)?!1:dr(fge,e)?!0:!(e in Object.prototype||e in Function.prototype)}function _V(t){return typeof t=="object"&&t&&t.constructor===Object}var cge={length:!0,name:!0},fge={toString:!0,valueOf:!0,toLocaleString:!0};class dge{constructor(e){this.wrappedObject=e}keys(){return Object.keys(this.wrappedObject)}get(e){return age(this.wrappedObject,e)}set(e,n){return sge(this.wrappedObject,e,n),this}has(e){return lge(this.wrappedObject,e)}}function hge(t){return t?t instanceof Map||t instanceof dge||typeof t.set=="function"&&typeof t.get=="function"&&typeof t.keys=="function"&&typeof t.has=="function":!1}var wV=function(){return wV=W8.create,W8},pge=["?BigNumber","?Complex","?DenseMatrix","?Fraction"],mge=Tt("typed",pge,function(e){var{BigNumber:n,Complex:r,DenseMatrix:i,Fraction:o}=e,a=wV();return a.clear(),a.addTypes([{name:"number",test:Br},{name:"Complex",test:G1},{name:"BigNumber",test:fo},{name:"Fraction",test:aV},{name:"Unit",test:cd},{name:"identifier",test:s=>Fu&&/^(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])(?:[0-9A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])*$/.test(s)},{name:"string",test:Fu},{name:"Chain",test:k0e},{name:"Array",test:jr},{name:"Matrix",test:di},{name:"DenseMatrix",test:c0e},{name:"SparseMatrix",test:f0e},{name:"Range",test:d0e},{name:"Index",test:XO},{name:"boolean",test:h0e},{name:"ResultSet",test:p0e},{name:"Help",test:m0e},{name:"function",test:g0e},{name:"Date",test:v0e},{name:"RegExp",test:y0e},{name:"null",test:x0e},{name:"undefined",test:b0e},{name:"AccessorNode",test:_0e},{name:"ArrayNode",test:w0e},{name:"AssignmentNode",test:S0e},{name:"BlockNode",test:E0e},{name:"ConditionalNode",test:M0e},{name:"ConstantNode",test:C0e},{name:"FunctionNode",test:T0e},{name:"FunctionAssignmentNode",test:A0e},{name:"IndexNode",test:D0e},{name:"Node",test:R0e},{name:"ObjectNode",test:P0e},{name:"OperatorNode",test:N0e},{name:"ParenthesisNode",test:O0e},{name:"RangeNode",test:I0e},{name:"RelationalNode",test:F0e},{name:"SymbolNode",test:L0e},{name:"Map",test:hge},{name:"Object",test:sV}]),a.addConversions([{from:"number",to:"BigNumber",convert:function(l){if(n||XT(l),W0e(l)>15)throw new TypeError("Cannot implicitly convert a number with >15 significant digits to BigNumber (value: "+l+"). Use function bignumber(x) to convert to BigNumber.");return new n(l)}},{from:"number",to:"Complex",convert:function(l){return r||Ow(l),new r(l,0)}},{from:"BigNumber",to:"Complex",convert:function(l){return r||Ow(l),new r(l.toNumber(),0)}},{from:"Fraction",to:"BigNumber",convert:function(l){throw new TypeError("Cannot implicitly convert a Fraction to BigNumber or vice versa. Use function bignumber(x) to convert to BigNumber or fraction(x) to convert to Fraction.")}},{from:"Fraction",to:"Complex",convert:function(l){return r||Ow(l),new r(l.valueOf(),0)}},{from:"number",to:"Fraction",convert:function(l){o||YT(l);var u=new o(l);if(u.valueOf()!==l)throw new TypeError("Cannot implicitly convert a number to a Fraction when there will be a loss of precision (value: "+l+"). Use function fraction(x) to convert to Fraction.");return u}},{from:"string",to:"number",convert:function(l){var u=Number(l);if(isNaN(u))throw new Error('Cannot convert "'+l+'" to a number');return u}},{from:"string",to:"BigNumber",convert:function(l){n||XT(l);try{return new n(l)}catch{throw new Error('Cannot convert "'+l+'" to BigNumber')}}},{from:"string",to:"Fraction",convert:function(l){o||YT(l);try{return new o(l)}catch{throw new Error('Cannot convert "'+l+'" to Fraction')}}},{from:"string",to:"Complex",convert:function(l){r||Ow(l);try{return new r(l)}catch{throw new Error('Cannot convert "'+l+'" to Complex')}}},{from:"boolean",to:"number",convert:function(l){return+l}},{from:"boolean",to:"BigNumber",convert:function(l){return n||XT(l),new n(+l)}},{from:"boolean",to:"Fraction",convert:function(l){return o||YT(l),new o(+l)}},{from:"boolean",to:"string",convert:function(l){return String(l)}},{from:"Array",to:"Matrix",convert:function(l){return i||gge(),new i(l)}},{from:"Matrix",to:"Array",convert:function(l){return l.valueOf()}}]),a.onMismatch=(s,l,u)=>{var c=a.createError(s,l,u);if(["wrongType","mismatch"].includes(c.data.category)&&l.length===1&&Rx(l[0])&&u.some(d=>!d.params.includes(","))){var f=new TypeError("Function '".concat(s,"' doesn't apply to matrices. To call it ")+"elementwise on a matrix 'M', try 'map(M, ".concat(s,")'."));throw f.data=c.data,f}throw c},a.onMismatch=(s,l,u)=>{var c=a.createError(s,l,u);if(["wrongType","mismatch"].includes(c.data.category)&&l.length===1&&Rx(l[0])&&u.some(d=>!d.params.includes(","))){var f=new TypeError("Function '".concat(s,"' doesn't apply to matrices. To call it ")+"elementwise on a matrix 'M', try 'map(M, ".concat(s,")'."));throw f.data=c.data,f}throw c},a});function XT(t){throw new Error("Cannot convert value ".concat(t," into a BigNumber: no class 'BigNumber' provided"))}function Ow(t){throw new Error("Cannot convert value ".concat(t," into a Complex number: no class 'Complex' provided"))}function gge(){throw new Error("Cannot convert array into a Matrix: no class 'DenseMatrix' provided")}function YT(t){throw new Error("Cannot convert value ".concat(t," into a Fraction, no class 'Fraction' provided."))}/*! * decimal.js v10.4.3 * An arbitrary-precision Decimal type for JavaScript. * https://github.com/MikeMcl/decimal.js * Copyright (c) 2022 Michael Mclaughlin * MIT Licence - */var hg=9e15,th=1e9,RR="0123456789abcdef",o2="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",a2="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",PR={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-hg,maxE:hg,crypto:!1},gV,qc,mn=!0,cC="[DecimalError] ",Ud=cC+"Invalid argument: ",vV=cC+"Precision limit exceeded",yV=cC+"crypto unavailable",xV="[object Decimal]",Zo=Math.floor,$i=Math.pow,sge=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,lge=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,uge=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,bV=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ou=1e7,on=7,cge=9007199254740991,fge=o2.length-1,NR=a2.length-1,rt={toStringTag:xV};rt.absoluteValue=rt.abs=function(){var t=new this.constructor(this);return t.s<0&&(t.s=1),Xt(t)};rt.ceil=function(){return Xt(new this.constructor(this),this.e+1,2)};rt.clampedTo=rt.clamp=function(t,e){var n,r=this,i=r.constructor;if(t=new i(t),e=new i(e),!t.s||!e.s)return new i(NaN);if(t.gt(e))throw Error(Ud+e);return n=r.cmp(t),n<0?t:r.cmp(e)>0?e:new i(r)};rt.comparedTo=rt.cmp=function(t){var e,n,r,i,o=this,a=o.d,s=(t=new o.constructor(t)).d,l=o.s,u=t.s;if(!a||!s)return!l||!u?NaN:l!==u?l:a===s?0:!a^l<0?1:-1;if(!a[0]||!s[0])return a[0]?l:s[0]?-u:0;if(l!==u)return l;if(o.e!==t.e)return o.e>t.e^l<0?1:-1;for(r=a.length,i=s.length,e=0,n=rs[e]^l<0?1:-1;return r===i?0:r>i^l<0?1:-1};rt.cosine=rt.cos=function(){var t,e,n=this,r=n.constructor;return n.d?n.d[0]?(t=r.precision,e=r.rounding,r.precision=t+Math.max(n.e,n.sd())+on,r.rounding=1,n=dge(r,MV(r,n)),r.precision=t,r.rounding=e,Xt(qc==2||qc==3?n.neg():n,t,e,!0)):new r(1):new r(NaN)};rt.cubeRoot=rt.cbrt=function(){var t,e,n,r,i,o,a,s,l,u,c=this,f=c.constructor;if(!c.isFinite()||c.isZero())return new f(c);for(mn=!1,o=c.s*$i(c.s*c,1/3),!o||Math.abs(o)==1/0?(n=Mo(c.d),t=c.e,(o=(t-n.length+1)%3)&&(n+=o==1||o==-2?"0":"00"),o=$i(n,1/3),t=Zo((t+1)/3)-(t%3==(t<0?-1:2)),o==1/0?n="5e"+t:(n=o.toExponential(),n=n.slice(0,n.indexOf("e")+1)+t),r=new f(n),r.s=c.s):r=new f(o.toString()),a=(t=f.precision)+3;;)if(s=r,l=s.times(s).times(s),u=l.plus(c),r=yr(u.plus(c).times(s),u.plus(l),a+2,1),Mo(s.d).slice(0,a)===(n=Mo(r.d)).slice(0,a))if(n=n.slice(a-3,a+1),n=="9999"||!i&&n=="4999"){if(!i&&(Xt(s,t+1,0),s.times(s).times(s).eq(c))){r=s;break}a+=4,i=1}else{(!+n||!+n.slice(1)&&n.charAt(0)=="5")&&(Xt(r,t+1,1),e=!r.times(r).times(r).eq(c));break}return mn=!0,Xt(r,t,f.rounding,e)};rt.decimalPlaces=rt.dp=function(){var t,e=this.d,n=NaN;if(e){if(t=e.length-1,n=(t-Zo(this.e/on))*on,t=e[t],t)for(;t%10==0;t/=10)n--;n<0&&(n=0)}return n};rt.dividedBy=rt.div=function(t){return yr(this,new this.constructor(t))};rt.dividedToIntegerBy=rt.divToInt=function(t){var e=this,n=e.constructor;return Xt(yr(e,new n(t),0,1,1),n.precision,n.rounding)};rt.equals=rt.eq=function(t){return this.cmp(t)===0};rt.floor=function(){return Xt(new this.constructor(this),this.e+1,3)};rt.greaterThan=rt.gt=function(t){return this.cmp(t)>0};rt.greaterThanOrEqualTo=rt.gte=function(t){var e=this.cmp(t);return e==1||e===0};rt.hyperbolicCosine=rt.cosh=function(){var t,e,n,r,i,o=this,a=o.constructor,s=new a(1);if(!o.isFinite())return new a(o.s?1/0:NaN);if(o.isZero())return s;n=a.precision,r=a.rounding,a.precision=n+Math.max(o.e,o.sd())+4,a.rounding=1,i=o.d.length,i<32?(t=Math.ceil(i/3),e=(1/dC(4,t)).toString()):(t=16,e="2.3283064365386962890625e-10"),o=rv(a,1,o.times(e),new a(1),!0);for(var l,u=t,c=new a(8);u--;)l=o.times(o),o=s.minus(l.times(c.minus(l.times(c))));return Xt(o,a.precision=n,a.rounding=r,!0)};rt.hyperbolicSine=rt.sinh=function(){var t,e,n,r,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(e=o.precision,n=o.rounding,o.precision=e+Math.max(i.e,i.sd())+4,o.rounding=1,r=i.d.length,r<3)i=rv(o,2,i,i,!0);else{t=1.4*Math.sqrt(r),t=t>16?16:t|0,i=i.times(1/dC(5,t)),i=rv(o,2,i,i,!0);for(var a,s=new o(5),l=new o(16),u=new o(20);t--;)a=i.times(i),i=i.times(s.plus(a.times(l.times(a).plus(u))))}return o.precision=e,o.rounding=n,Xt(i,e,n,!0)};rt.hyperbolicTangent=rt.tanh=function(){var t,e,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+7,r.rounding=1,yr(n.sinh(),n.cosh(),r.precision=t,r.rounding=e)):new r(n.s)};rt.inverseCosine=rt.acos=function(){var t,e=this,n=e.constructor,r=e.abs().cmp(1),i=n.precision,o=n.rounding;return r!==-1?r===0?e.isNeg()?Ql(n,i,o):new n(0):new n(NaN):e.isZero()?Ql(n,i+4,o).times(.5):(n.precision=i+6,n.rounding=1,e=e.asin(),t=Ql(n,i+4,o).times(.5),n.precision=i,n.rounding=o,t.minus(e))};rt.inverseHyperbolicCosine=rt.acosh=function(){var t,e,n=this,r=n.constructor;return n.lte(1)?new r(n.eq(1)?0:NaN):n.isFinite()?(t=r.precision,e=r.rounding,r.precision=t+Math.max(Math.abs(n.e),n.sd())+4,r.rounding=1,mn=!1,n=n.times(n).minus(1).sqrt().plus(n),mn=!0,r.precision=t,r.rounding=e,n.ln()):new r(n)};rt.inverseHyperbolicSine=rt.asinh=function(){var t,e,n=this,r=n.constructor;return!n.isFinite()||n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+2*Math.max(Math.abs(n.e),n.sd())+6,r.rounding=1,mn=!1,n=n.times(n).plus(1).sqrt().plus(n),mn=!0,r.precision=t,r.rounding=e,n.ln())};rt.inverseHyperbolicTangent=rt.atanh=function(){var t,e,n,r,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(t=o.precision,e=o.rounding,r=i.sd(),Math.max(r,t)<2*-i.e-1?Xt(new o(i),t,e,!0):(o.precision=n=r-i.e,i=yr(i.plus(1),new o(1).minus(i),n+t,1),o.precision=t+4,o.rounding=1,i=i.ln(),o.precision=t,o.rounding=e,i.times(.5))):new o(NaN)};rt.inverseSine=rt.asin=function(){var t,e,n,r,i=this,o=i.constructor;return i.isZero()?new o(i):(e=i.abs().cmp(1),n=o.precision,r=o.rounding,e!==-1?e===0?(t=Ql(o,n+4,r).times(.5),t.s=i.s,t):new o(NaN):(o.precision=n+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=n,o.rounding=r,i.times(2)))};rt.inverseTangent=rt.atan=function(){var t,e,n,r,i,o,a,s,l,u=this,c=u.constructor,f=c.precision,d=c.rounding;if(u.isFinite()){if(u.isZero())return new c(u);if(u.abs().eq(1)&&f+4<=NR)return a=Ql(c,f+4,d).times(.25),a.s=u.s,a}else{if(!u.s)return new c(NaN);if(f+4<=NR)return a=Ql(c,f+4,d).times(.5),a.s=u.s,a}for(c.precision=s=f+10,c.rounding=1,n=Math.min(28,s/on+2|0),t=n;t;--t)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(mn=!1,e=Math.ceil(s/on),r=1,l=u.times(u),a=new c(u),i=u;t!==-1;)if(i=i.times(l),o=a.minus(i.div(r+=2)),i=i.times(l),a=o.plus(i.div(r+=2)),a.d[e]!==void 0)for(t=e;a.d[t]===o.d[t]&&t--;);return n&&(a=a.times(2<this.d.length-2};rt.isNaN=function(){return!this.s};rt.isNegative=rt.isNeg=function(){return this.s<0};rt.isPositive=rt.isPos=function(){return this.s>0};rt.isZero=function(){return!!this.d&&this.d[0]===0};rt.lessThan=rt.lt=function(t){return this.cmp(t)<0};rt.lessThanOrEqualTo=rt.lte=function(t){return this.cmp(t)<1};rt.logarithm=rt.log=function(t){var e,n,r,i,o,a,s,l,u=this,c=u.constructor,f=c.precision,d=c.rounding,p=5;if(t==null)t=new c(10),e=!0;else{if(t=new c(t),n=t.d,t.s<0||!n||!n[0]||t.eq(1))return new c(NaN);e=t.eq(10)}if(n=u.d,u.s<0||!n||!n[0]||u.eq(1))return new c(n&&!n[0]?-1/0:u.s!=1?NaN:n?0:1/0);if(e)if(n.length>1)o=!0;else{for(i=n[0];i%10===0;)i/=10;o=i!==1}if(mn=!1,s=f+p,a=xd(u,s),r=e?s2(c,s+10):xd(t,s),l=yr(a,r,s,1),Rx(l.d,i=f,d))do if(s+=10,a=xd(u,s),r=e?s2(c,s+10):xd(t,s),l=yr(a,r,s,1),!o){+Mo(l.d).slice(i+1,i+15)+1==1e14&&(l=Xt(l,f+1,0));break}while(Rx(l.d,i+=10,d));return mn=!0,Xt(l,f,d)};rt.minus=rt.sub=function(t){var e,n,r,i,o,a,s,l,u,c,f,d,p=this,y=p.constructor;if(t=new y(t),!p.d||!t.d)return!p.s||!t.s?t=new y(NaN):p.d?t.s=-t.s:t=new y(t.d||p.s!==t.s?p:NaN),t;if(p.s!=t.s)return t.s=-t.s,p.plus(t);if(u=p.d,d=t.d,s=y.precision,l=y.rounding,!u[0]||!d[0]){if(d[0])t.s=-t.s;else if(u[0])t=new y(p);else return new y(l===3?-0:0);return mn?Xt(t,s,l):t}if(n=Zo(t.e/on),c=Zo(p.e/on),u=u.slice(),o=c-n,o){for(f=o<0,f?(e=u,o=-o,a=d.length):(e=d,n=c,a=u.length),r=Math.max(Math.ceil(s/on),a)+2,o>r&&(o=r,e.length=1),e.reverse(),r=o;r--;)e.push(0);e.reverse()}else{for(r=u.length,a=d.length,f=r0;--r)u[a++]=0;for(r=d.length;r>o;){if(u[--r]a?o+1:a+1,i>a&&(i=a,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for(a=u.length,i=c.length,a-i<0&&(i=a,n=c,c=u,u=n),e=0;i;)e=(u[--i]=u[i]+c[i]+e)/ou|0,u[i]%=ou;for(e&&(u.unshift(e),++r),a=u.length;u[--a]==0;)u.pop();return t.d=u,t.e=fC(u,r),mn?Xt(t,s,l):t};rt.precision=rt.sd=function(t){var e,n=this;if(t!==void 0&&t!==!!t&&t!==1&&t!==0)throw Error(Ud+t);return n.d?(e=_V(n.d),t&&n.e+1>e&&(e=n.e+1)):e=NaN,e};rt.round=function(){var t=this,e=t.constructor;return Xt(new e(t),t.e+1,e.rounding)};rt.sine=rt.sin=function(){var t,e,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+Math.max(n.e,n.sd())+on,r.rounding=1,n=pge(r,MV(r,n)),r.precision=t,r.rounding=e,Xt(qc>2?n.neg():n,t,e,!0)):new r(NaN)};rt.squareRoot=rt.sqrt=function(){var t,e,n,r,i,o,a=this,s=a.d,l=a.e,u=a.s,c=a.constructor;if(u!==1||!s||!s[0])return new c(!u||u<0&&(!s||s[0])?NaN:s?a:1/0);for(mn=!1,u=Math.sqrt(+a),u==0||u==1/0?(e=Mo(s),(e.length+l)%2==0&&(e+="0"),u=Math.sqrt(e),l=Zo((l+1)/2)-(l<0||l%2),u==1/0?e="5e"+l:(e=u.toExponential(),e=e.slice(0,e.indexOf("e")+1)+l),r=new c(e)):r=new c(u.toString()),n=(l=c.precision)+3;;)if(o=r,r=o.plus(yr(a,o,n+2,1)).times(.5),Mo(o.d).slice(0,n)===(e=Mo(r.d)).slice(0,n))if(e=e.slice(n-3,n+1),e=="9999"||!i&&e=="4999"){if(!i&&(Xt(o,l+1,0),o.times(o).eq(a))){r=o;break}n+=4,i=1}else{(!+e||!+e.slice(1)&&e.charAt(0)=="5")&&(Xt(r,l+1,1),t=!r.times(r).eq(a));break}return mn=!0,Xt(r,l,c.rounding,t)};rt.tangent=rt.tan=function(){var t,e,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+10,r.rounding=1,n=n.sin(),n.s=1,n=yr(n,new r(1).minus(n.times(n)).sqrt(),t+10,0),r.precision=t,r.rounding=e,Xt(qc==2||qc==4?n.neg():n,t,e,!0)):new r(NaN)};rt.times=rt.mul=function(t){var e,n,r,i,o,a,s,l,u,c=this,f=c.constructor,d=c.d,p=(t=new f(t)).d;if(t.s*=c.s,!d||!d[0]||!p||!p[0])return new f(!t.s||d&&!d[0]&&!p||p&&!p[0]&&!d?NaN:!d||!p?t.s/0:t.s*0);for(n=Zo(c.e/on)+Zo(t.e/on),l=d.length,u=p.length,l=0;){for(e=0,i=l+r;i>r;)s=o[i]+p[r]*d[i-r-1]+e,o[i--]=s%ou|0,e=s/ou|0;o[i]=(o[i]+e)%ou|0}for(;!o[--a];)o.pop();return e?++n:o.shift(),t.d=o,t.e=fC(o,n),mn?Xt(t,f.precision,f.rounding):t};rt.toBinary=function(t,e){return YO(this,2,t,e)};rt.toDecimalPlaces=rt.toDP=function(t,e){var n=this,r=n.constructor;return n=new r(n),t===void 0?n:(Za(t,0,th),e===void 0?e=r.rounding:Za(e,0,8),Xt(n,t+n.e+1,e))};rt.toExponential=function(t,e){var n,r=this,i=r.constructor;return t===void 0?n=ec(r,!0):(Za(t,0,th),e===void 0?e=i.rounding:Za(e,0,8),r=Xt(new i(r),t+1,e),n=ec(r,!0,t+1)),r.isNeg()&&!r.isZero()?"-"+n:n};rt.toFixed=function(t,e){var n,r,i=this,o=i.constructor;return t===void 0?n=ec(i):(Za(t,0,th),e===void 0?e=o.rounding:Za(e,0,8),r=Xt(new o(i),t+i.e+1,e),n=ec(r,!1,t+r.e+1)),i.isNeg()&&!i.isZero()?"-"+n:n};rt.toFraction=function(t){var e,n,r,i,o,a,s,l,u,c,f,d,p=this,y=p.d,x=p.constructor;if(!y)return new x(p);if(u=n=new x(1),r=l=new x(0),e=new x(r),o=e.e=_V(y)-p.e-1,a=o%on,e.d[0]=$i(10,a<0?on+a:a),t==null)t=o>0?e:u;else{if(s=new x(t),!s.isInt()||s.lt(u))throw Error(Ud+s);t=s.gt(e)?o>0?e:u:s}for(mn=!1,s=new x(Mo(y)),c=x.precision,x.precision=o=y.length*on*2;f=yr(s,e,0,1,1),i=n.plus(f.times(r)),i.cmp(t)!=1;)n=r,r=i,i=u,u=l.plus(f.times(i)),l=i,i=e,e=s.minus(f.times(i)),s=i;return i=yr(t.minus(n),r,0,1,1),l=l.plus(i.times(u)),n=n.plus(i.times(r)),l.s=u.s=p.s,d=yr(u,r,o,1).minus(p).abs().cmp(yr(l,n,o,1).minus(p).abs())<1?[u,r]:[l,n],x.precision=c,mn=!0,d};rt.toHexadecimal=rt.toHex=function(t,e){return YO(this,16,t,e)};rt.toNearest=function(t,e){var n=this,r=n.constructor;if(n=new r(n),t==null){if(!n.d)return n;t=new r(1),e=r.rounding}else{if(t=new r(t),e===void 0?e=r.rounding:Za(e,0,8),!n.d)return t.s?n:t;if(!t.d)return t.s&&(t.s=n.s),t}return t.d[0]?(mn=!1,n=yr(n,t,0,e,1).times(t),mn=!0,Xt(n)):(t.s=n.s,n=t),n};rt.toNumber=function(){return+this};rt.toOctal=function(t,e){return YO(this,8,t,e)};rt.toPower=rt.pow=function(t){var e,n,r,i,o,a,s=this,l=s.constructor,u=+(t=new l(t));if(!s.d||!t.d||!s.d[0]||!t.d[0])return new l($i(+s,u));if(s=new l(s),s.eq(1))return s;if(r=l.precision,o=l.rounding,t.eq(1))return Xt(s,r,o);if(e=Zo(t.e/on),e>=t.d.length-1&&(n=u<0?-u:u)<=cge)return i=wV(l,s,n,r),t.s<0?new l(1).div(i):Xt(i,r,o);if(a=s.s,a<0){if(el.maxE+1||e0?a/0:0):(mn=!1,l.rounding=s.s=1,n=Math.min(12,(e+"").length),i=OR(t.times(xd(s,r+n)),r),i.d&&(i=Xt(i,r+5,1),Rx(i.d,r,o)&&(e=r+10,i=Xt(OR(t.times(xd(s,e+n)),e),e+5,1),+Mo(i.d).slice(r+1,r+15)+1==1e14&&(i=Xt(i,r+1,0)))),i.s=a,mn=!0,l.rounding=o,Xt(i,r,o))};rt.toPrecision=function(t,e){var n,r=this,i=r.constructor;return t===void 0?n=ec(r,r.e<=i.toExpNeg||r.e>=i.toExpPos):(Za(t,1,th),e===void 0?e=i.rounding:Za(e,0,8),r=Xt(new i(r),t,e),n=ec(r,t<=r.e||r.e<=i.toExpNeg,t)),r.isNeg()&&!r.isZero()?"-"+n:n};rt.toSignificantDigits=rt.toSD=function(t,e){var n=this,r=n.constructor;return t===void 0?(t=r.precision,e=r.rounding):(Za(t,1,th),e===void 0?e=r.rounding:Za(e,0,8)),Xt(new r(n),t,e)};rt.toString=function(){var t=this,e=t.constructor,n=ec(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()&&!t.isZero()?"-"+n:n};rt.truncated=rt.trunc=function(){return Xt(new this.constructor(this),this.e+1,1)};rt.valueOf=rt.toJSON=function(){var t=this,e=t.constructor,n=ec(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()?"-"+n:n};function Mo(t){var e,n,r,i=t.length-1,o="",a=t[0];if(i>0){for(o+=a,e=1;en)throw Error(Ud+t)}function Rx(t,e,n,r){var i,o,a,s;for(o=t[0];o>=10;o/=10)--e;return--e<0?(e+=on,i=0):(i=Math.ceil((e+1)/on),e%=on),o=$i(10,on-e),s=t[i]%o|0,r==null?e<3?(e==0?s=s/100|0:e==1&&(s=s/10|0),a=n<4&&s==99999||n>3&&s==49999||s==5e4||s==0):a=(n<4&&s+1==o||n>3&&s+1==o/2)&&(t[i+1]/o/100|0)==$i(10,e-2)-1||(s==o/2||s==0)&&(t[i+1]/o/100|0)==0:e<4?(e==0?s=s/1e3|0:e==1?s=s/100|0:e==2&&(s=s/10|0),a=(r||n<4)&&s==9999||!r&&n>3&&s==4999):a=((r||n<4)&&s+1==o||!r&&n>3&&s+1==o/2)&&(t[i+1]/o/1e3|0)==$i(10,e-3)-1,a}function uE(t,e,n){for(var r,i=[0],o,a=0,s=t.length;an-1&&(i[r+1]===void 0&&(i[r+1]=0),i[r+1]+=i[r]/n|0,i[r]%=n)}return i.reverse()}function dge(t,e){var n,r,i;if(e.isZero())return e;r=e.d.length,r<32?(n=Math.ceil(r/3),i=(1/dC(4,n)).toString()):(n=16,i="2.3283064365386962890625e-10"),t.precision+=n,e=rv(t,1,e.times(i),new t(1));for(var o=n;o--;){var a=e.times(e);e=a.times(a).minus(a).times(8).plus(1)}return t.precision-=n,e}var yr=function(){function t(r,i,o){var a,s=0,l=r.length;for(r=r.slice();l--;)a=r[l]*i+s,r[l]=a%o|0,s=a/o|0;return s&&r.unshift(s),r}function e(r,i,o,a){var s,l;if(o!=a)l=o>a?1:-1;else for(s=l=0;si[s]?1:-1;break}return l}function n(r,i,o,a){for(var s=0;o--;)r[o]-=s,s=r[o]1;)r.shift()}return function(r,i,o,a,s,l){var u,c,f,d,p,y,x,_,v,S,w,E,T,C,D,O,P,N,k,G,Z=r.constructor,j=r.s==i.s?1:-1,K=r.d,Y=i.d;if(!K||!K[0]||!Y||!Y[0])return new Z(!r.s||!i.s||(K?Y&&K[0]==Y[0]:!Y)?NaN:K&&K[0]==0||!Y?j*0:j/0);for(l?(p=1,c=r.e-i.e):(l=ou,p=on,c=Zo(r.e/p)-Zo(i.e/p)),k=Y.length,P=K.length,v=new Z(j),S=v.d=[],f=0;Y[f]==(K[f]||0);f++);if(Y[f]>(K[f]||0)&&c--,o==null?(C=o=Z.precision,a=Z.rounding):s?C=o+(r.e-i.e)+1:C=o,C<0)S.push(1),y=!0;else{if(C=C/p+2|0,f=0,k==1){for(d=0,Y=Y[0],C++;(f1&&(Y=t(Y,d,l),K=t(K,d,l),k=Y.length,P=K.length),O=k,w=K.slice(0,k),E=w.length;E=l/2&&++N;do d=0,u=e(Y,w,k,E),u<0?(T=w[0],k!=E&&(T=T*l+(w[1]||0)),d=T/N|0,d>1?(d>=l&&(d=l-1),x=t(Y,d,l),_=x.length,E=w.length,u=e(x,w,_,E),u==1&&(d--,n(x,k<_?G:Y,_,l))):(d==0&&(u=d=1),x=Y.slice()),_=x.length,_=10;d/=10)f++;v.e=f+c*p-1,Xt(v,s?o+v.e+1:o,a,y)}return v}}();function Xt(t,e,n,r){var i,o,a,s,l,u,c,f,d,p=t.constructor;e:if(e!=null){if(f=t.d,!f)return t;for(i=1,s=f[0];s>=10;s/=10)i++;if(o=e-i,o<0)o+=on,a=e,c=f[d=0],l=c/$i(10,i-a-1)%10|0;else if(d=Math.ceil((o+1)/on),s=f.length,d>=s)if(r){for(;s++<=d;)f.push(0);c=l=0,i=1,o%=on,a=o-on+1}else break e;else{for(c=s=f[d],i=1;s>=10;s/=10)i++;o%=on,a=o-on+i,l=a<0?0:c/$i(10,i-a-1)%10|0}if(r=r||e<0||f[d+1]!==void 0||(a<0?c:c%$i(10,i-a-1)),u=n<4?(l||r)&&(n==0||n==(t.s<0?3:2)):l>5||l==5&&(n==4||r||n==6&&(o>0?a>0?c/$i(10,i-a):0:f[d-1])%10&1||n==(t.s<0?8:7)),e<1||!f[0])return f.length=0,u?(e-=t.e+1,f[0]=$i(10,(on-e%on)%on),t.e=-e||0):f[0]=t.e=0,t;if(o==0?(f.length=d,s=1,d--):(f.length=d+1,s=$i(10,on-o),f[d]=a>0?(c/$i(10,i-a)%$i(10,a)|0)*s:0),u)for(;;)if(d==0){for(o=1,a=f[0];a>=10;a/=10)o++;for(a=f[0]+=s,s=1;a>=10;a/=10)s++;o!=s&&(t.e++,f[0]==ou&&(f[0]=1));break}else{if(f[d]+=s,f[d]!=ou)break;f[d--]=0,s=1}for(o=f.length;f[--o]===0;)f.pop()}return mn&&(t.e>p.maxE?(t.d=null,t.e=NaN):t.e0?o=o.charAt(0)+"."+o.slice(1)+cd(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(t.e<0?"e":"e+")+t.e):i<0?(o="0."+cd(-i-1)+o,n&&(r=n-a)>0&&(o+=cd(r))):i>=a?(o+=cd(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+cd(r))):((r=i+1)0&&(i+1===a&&(o+="."),o+=cd(r))),o}function fC(t,e){var n=t[0];for(e*=on;n>=10;n/=10)e++;return e}function s2(t,e,n){if(e>fge)throw mn=!0,n&&(t.precision=n),Error(vV);return Xt(new t(o2),e,1,!0)}function Ql(t,e,n){if(e>NR)throw Error(vV);return Xt(new t(a2),e,n,!0)}function _V(t){var e=t.length-1,n=e*on+1;if(e=t[e],e){for(;e%10==0;e/=10)n--;for(e=t[0];e>=10;e/=10)n++}return n}function cd(t){for(var e="";t--;)e+="0";return e}function wV(t,e,n,r){var i,o=new t(1),a=Math.ceil(r/on+4);for(mn=!1;;){if(n%2&&(o=o.times(e),q8(o.d,a)&&(i=!0)),n=Zo(n/2),n===0){n=o.d.length-1,i&&o.d[n]===0&&++o.d[n];break}e=e.times(e),q8(e.d,a)}return mn=!0,o}function j8(t){return t.d[t.d.length-1]&1}function SV(t,e,n){for(var r,i=new t(e[0]),o=0;++o17)return new d(t.d?t.d[0]?t.s<0?0:1/0:1:t.s?t.s<0?0:t:0/0);for(e==null?(mn=!1,l=y):l=e,s=new d(.03125);t.e>-2;)t=t.times(s),f+=5;for(r=Math.log($i(2,f))/Math.LN10*2+5|0,l+=r,n=o=a=new d(1),d.precision=l;;){if(o=Xt(o.times(t),l,1),n=n.times(++c),s=a.plus(yr(o,n,l,1)),Mo(s.d).slice(0,l)===Mo(a.d).slice(0,l)){for(i=f;i--;)a=Xt(a.times(a),l,1);if(e==null)if(u<3&&Rx(a.d,l-r,p,u))d.precision=l+=10,n=o=s=new d(1),c=0,u++;else return Xt(a,d.precision=y,p,mn=!0);else return d.precision=y,a}a=s}}function xd(t,e){var n,r,i,o,a,s,l,u,c,f,d,p=1,y=10,x=t,_=x.d,v=x.constructor,S=v.rounding,w=v.precision;if(x.s<0||!_||!_[0]||!x.e&&_[0]==1&&_.length==1)return new v(_&&!_[0]?-1/0:x.s!=1?NaN:_?0:x);if(e==null?(mn=!1,c=w):c=e,v.precision=c+=y,n=Mo(_),r=n.charAt(0),Math.abs(o=x.e)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)x=x.times(t),n=Mo(x.d),r=n.charAt(0),p++;o=x.e,r>1?(x=new v("0."+n),o++):x=new v(r+"."+n.slice(1))}else return u=s2(v,c+2,w).times(o+""),x=xd(new v(r+"."+n.slice(1)),c-y).plus(u),v.precision=w,e==null?Xt(x,w,S,mn=!0):x;for(f=x,l=a=x=yr(x.minus(1),x.plus(1),c,1),d=Xt(x.times(x),c,1),i=3;;){if(a=Xt(a.times(d),c,1),u=l.plus(yr(a,new v(i),c,1)),Mo(u.d).slice(0,c)===Mo(l.d).slice(0,c))if(l=l.times(2),o!==0&&(l=l.plus(s2(v,c+2,w).times(o+""))),l=yr(l,new v(p),c,1),e==null)if(Rx(l.d,c-y,S,s))v.precision=c+=y,u=a=x=yr(f.minus(1),f.plus(1),c,1),d=Xt(x.times(x),c,1),i=s=1;else return Xt(l,v.precision=w,S,mn=!0);else return v.precision=w,l;l=u,i+=2}}function EV(t){return String(t.s*t.s/0)}function IR(t,e){var n,r,i;for((n=e.indexOf("."))>-1&&(e=e.replace(".","")),(r=e.search(/e/i))>0?(n<0&&(n=r),n+=+e.slice(r+1),e=e.substring(0,r)):n<0&&(n=e.length),r=0;e.charCodeAt(r)===48;r++);for(i=e.length;e.charCodeAt(i-1)===48;--i);if(e=e.slice(r,i),e){if(i-=r,t.e=n=n-r-1,t.d=[],r=(n+1)%on,n<0&&(r+=on),rt.constructor.maxE?(t.d=null,t.e=NaN):t.e-1){if(e=e.replace(/(\d)_(?=\d)/g,"$1"),bV.test(e))return IR(t,e)}else if(e==="Infinity"||e==="NaN")return+e||(t.s=NaN),t.e=NaN,t.d=null,t;if(lge.test(e))n=16,e=e.toLowerCase();else if(sge.test(e))n=2;else if(uge.test(e))n=8;else throw Error(Ud+e);for(o=e.search(/p/i),o>0?(l=+e.slice(o+1),e=e.substring(2,o)):e=e.slice(2),o=e.indexOf("."),a=o>=0,r=t.constructor,a&&(e=e.replace(".",""),s=e.length,o=s-o,i=wV(r,new r(n),o,o*2)),u=uE(e,n,ou),c=u.length-1,o=c;u[o]===0;--o)u.pop();return o<0?new r(t.s*0):(t.e=fC(u,c),t.d=u,mn=!1,a&&(t=yr(t,i,s*4)),l&&(t=t.times(Math.abs(l)<54?$i(2,l):zd.pow(2,l))),mn=!0,t)}function pge(t,e){var n,r=e.d.length;if(r<3)return e.isZero()?e:rv(t,2,e,e);n=1.4*Math.sqrt(r),n=n>16?16:n|0,e=e.times(1/dC(5,n)),e=rv(t,2,e,e);for(var i,o=new t(5),a=new t(16),s=new t(20);n--;)i=e.times(e),e=e.times(o.plus(i.times(a.times(i).minus(s))));return e}function rv(t,e,n,r,i){var o,a,s,l,u=t.precision,c=Math.ceil(u/on);for(mn=!1,l=n.times(n),s=new t(r);;){if(a=yr(s.times(l),new t(e++*e++),u,1),s=i?r.plus(a):r.minus(a),r=yr(a.times(l),new t(e++*e++),u,1),a=s.plus(r),a.d[c]!==void 0){for(o=c;a.d[o]===s.d[o]&&o--;);if(o==-1)break}o=s,s=r,r=a,a=o}return mn=!0,a.d.length=c+1,a}function dC(t,e){for(var n=t;--e;)n*=t;return n}function MV(t,e){var n,r=e.s<0,i=Ql(t,t.precision,1),o=i.times(.5);if(e=e.abs(),e.lte(o))return qc=r?4:1,e;if(n=e.divToInt(i),n.isZero())qc=r?3:2;else{if(e=e.minus(n.times(i)),e.lte(o))return qc=j8(n)?r?2:3:r?4:1,e;qc=j8(n)?r?1:4:r?3:2}return e.minus(i).abs()}function YO(t,e,n,r){var i,o,a,s,l,u,c,f,d,p=t.constructor,y=n!==void 0;if(y?(Za(n,1,th),r===void 0?r=p.rounding:Za(r,0,8)):(n=p.precision,r=p.rounding),!t.isFinite())c=EV(t);else{for(c=ec(t),a=c.indexOf("."),y?(i=2,e==16?n=n*4-3:e==8&&(n=n*3-2)):i=e,a>=0&&(c=c.replace(".",""),d=new p(1),d.e=c.length-a,d.d=uE(ec(d),10,i),d.e=d.d.length),f=uE(c,10,i),o=l=f.length;f[--l]==0;)f.pop();if(!f[0])c=y?"0p+0":"0";else{if(a<0?o--:(t=new p(t),t.d=f,t.e=o,t=yr(t,d,n,r,0,i),f=t.d,o=t.e,u=gV),a=f[n],s=i/2,u=u||f[n+1]!==void 0,u=r<4?(a!==void 0||u)&&(r===0||r===(t.s<0?3:2)):a>s||a===s&&(r===4||u||r===6&&f[n-1]&1||r===(t.s<0?8:7)),f.length=n,u)for(;++f[--n]>i-1;)f[n]=0,n||(++o,f.unshift(1));for(l=f.length;!f[l-1];--l);for(a=0,c="";a1)if(e==16||e==8){for(a=e==16?4:3,--l;l%a;l++)c+="0";for(f=uE(c,i,e),l=f.length;!f[l-1];--l);for(a=1,c="1.";al)for(o-=l;o--;)c+="0";else oe)return t.length=e,!0}function mge(t){return new this(t).abs()}function gge(t){return new this(t).acos()}function vge(t){return new this(t).acosh()}function yge(t,e){return new this(t).plus(e)}function xge(t){return new this(t).asin()}function bge(t){return new this(t).asinh()}function _ge(t){return new this(t).atan()}function wge(t){return new this(t).atanh()}function Sge(t,e){t=new this(t),e=new this(e);var n,r=this.precision,i=this.rounding,o=r+4;return!t.s||!e.s?n=new this(NaN):!t.d&&!e.d?(n=Ql(this,o,1).times(e.s>0?.25:.75),n.s=t.s):!e.d||t.isZero()?(n=e.s<0?Ql(this,r,i):new this(0),n.s=t.s):!t.d||e.isZero()?(n=Ql(this,o,1).times(.5),n.s=t.s):e.s<0?(this.precision=o,this.rounding=1,n=this.atan(yr(t,e,o,1)),e=Ql(this,o,1),this.precision=r,this.rounding=i,n=t.s<0?n.minus(e):n.plus(e)):n=this.atan(yr(t,e,o,1)),n}function Ege(t){return new this(t).cbrt()}function Mge(t){return Xt(t=new this(t),t.e+1,2)}function Cge(t,e,n){return new this(t).clamp(e,n)}function Age(t){if(!t||typeof t!="object")throw Error(cC+"Object expected");var e,n,r,i=t.defaults===!0,o=["precision",1,th,"rounding",0,8,"toExpNeg",-hg,0,"toExpPos",0,hg,"maxE",0,hg,"minE",-hg,0,"modulo",0,9];for(e=0;e=o[e+1]&&r<=o[e+2])this[n]=r;else throw Error(Ud+n+": "+r);if(n="crypto",i&&(this[n]=PR[n]),(r=t[n])!==void 0)if(r===!0||r===!1||r===0||r===1)if(r)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[n]=!0;else throw Error(yV);else this[n]=!1;else throw Error(Ud+n+": "+r);return this}function Tge(t){return new this(t).cos()}function Dge(t){return new this(t).cosh()}function CV(t){var e,n,r;function i(o){var a,s,l,u=this;if(!(u instanceof i))return new i(o);if(u.constructor=i,X8(o)){u.s=o.s,mn?!o.d||o.e>i.maxE?(u.e=NaN,u.d=null):o.e=10;s/=10)a++;mn?a>i.maxE?(u.e=NaN,u.d=null):a=429e7?e[o]=crypto.getRandomValues(new Uint32Array(1))[0]:s[o++]=i%1e7;else if(crypto.randomBytes){for(e=crypto.randomBytes(r*=4);o=214e7?crypto.randomBytes(4).copy(e,o):(s.push(i%1e7),o+=4);o=r/4}else throw Error(yV);else for(;o=10;i/=10)r++;r{var{on:e,config:n}=t,r=zd.clone({precision:n.precision,modulo:zd.EUCLID});return r.prototype=Object.create(r.prototype),r.prototype.type="BigNumber",r.prototype.isBigNumber=!0,r.prototype.toJSON=function(){return{mathjs:"BigNumber",value:this.toString()}},r.fromJSON=function(i){return new r(i.value)},e&&e("config",function(i,o){i.precision!==o.precision&&r.config({precision:i.precision})}),r},{isClass:!0}),AV={exports:{}};/** + */var pg=9e15,nh=1e9,NR="0123456789abcdef",o2="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",a2="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",OR={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-pg,maxE:pg,crypto:!1},SV,qc,pn=!0,fC="[DecimalError] ",zd=fC+"Invalid argument: ",EV=fC+"Precision limit exceeded",MV=fC+"crypto unavailable",CV="[object Decimal]",Zo=Math.floor,$i=Math.pow,vge=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,yge=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,xge=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,AV=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,iu=1e7,on=7,bge=9007199254740991,_ge=o2.length-1,IR=a2.length-1,it={toStringTag:CV};it.absoluteValue=it.abs=function(){var t=new this.constructor(this);return t.s<0&&(t.s=1),Xt(t)};it.ceil=function(){return Xt(new this.constructor(this),this.e+1,2)};it.clampedTo=it.clamp=function(t,e){var n,r=this,i=r.constructor;if(t=new i(t),e=new i(e),!t.s||!e.s)return new i(NaN);if(t.gt(e))throw Error(zd+e);return n=r.cmp(t),n<0?t:r.cmp(e)>0?e:new i(r)};it.comparedTo=it.cmp=function(t){var e,n,r,i,o=this,a=o.d,s=(t=new o.constructor(t)).d,l=o.s,u=t.s;if(!a||!s)return!l||!u?NaN:l!==u?l:a===s?0:!a^l<0?1:-1;if(!a[0]||!s[0])return a[0]?l:s[0]?-u:0;if(l!==u)return l;if(o.e!==t.e)return o.e>t.e^l<0?1:-1;for(r=a.length,i=s.length,e=0,n=rs[e]^l<0?1:-1;return r===i?0:r>i^l<0?1:-1};it.cosine=it.cos=function(){var t,e,n=this,r=n.constructor;return n.d?n.d[0]?(t=r.precision,e=r.rounding,r.precision=t+Math.max(n.e,n.sd())+on,r.rounding=1,n=wge(r,NV(r,n)),r.precision=t,r.rounding=e,Xt(qc==2||qc==3?n.neg():n,t,e,!0)):new r(1):new r(NaN)};it.cubeRoot=it.cbrt=function(){var t,e,n,r,i,o,a,s,l,u,c=this,f=c.constructor;if(!c.isFinite()||c.isZero())return new f(c);for(pn=!1,o=c.s*$i(c.s*c,1/3),!o||Math.abs(o)==1/0?(n=Mo(c.d),t=c.e,(o=(t-n.length+1)%3)&&(n+=o==1||o==-2?"0":"00"),o=$i(n,1/3),t=Zo((t+1)/3)-(t%3==(t<0?-1:2)),o==1/0?n="5e"+t:(n=o.toExponential(),n=n.slice(0,n.indexOf("e")+1)+t),r=new f(n),r.s=c.s):r=new f(o.toString()),a=(t=f.precision)+3;;)if(s=r,l=s.times(s).times(s),u=l.plus(c),r=yr(u.plus(c).times(s),u.plus(l),a+2,1),Mo(s.d).slice(0,a)===(n=Mo(r.d)).slice(0,a))if(n=n.slice(a-3,a+1),n=="9999"||!i&&n=="4999"){if(!i&&(Xt(s,t+1,0),s.times(s).times(s).eq(c))){r=s;break}a+=4,i=1}else{(!+n||!+n.slice(1)&&n.charAt(0)=="5")&&(Xt(r,t+1,1),e=!r.times(r).times(r).eq(c));break}return pn=!0,Xt(r,t,f.rounding,e)};it.decimalPlaces=it.dp=function(){var t,e=this.d,n=NaN;if(e){if(t=e.length-1,n=(t-Zo(this.e/on))*on,t=e[t],t)for(;t%10==0;t/=10)n--;n<0&&(n=0)}return n};it.dividedBy=it.div=function(t){return yr(this,new this.constructor(t))};it.dividedToIntegerBy=it.divToInt=function(t){var e=this,n=e.constructor;return Xt(yr(e,new n(t),0,1,1),n.precision,n.rounding)};it.equals=it.eq=function(t){return this.cmp(t)===0};it.floor=function(){return Xt(new this.constructor(this),this.e+1,3)};it.greaterThan=it.gt=function(t){return this.cmp(t)>0};it.greaterThanOrEqualTo=it.gte=function(t){var e=this.cmp(t);return e==1||e===0};it.hyperbolicCosine=it.cosh=function(){var t,e,n,r,i,o=this,a=o.constructor,s=new a(1);if(!o.isFinite())return new a(o.s?1/0:NaN);if(o.isZero())return s;n=a.precision,r=a.rounding,a.precision=n+Math.max(o.e,o.sd())+4,a.rounding=1,i=o.d.length,i<32?(t=Math.ceil(i/3),e=(1/hC(4,t)).toString()):(t=16,e="2.3283064365386962890625e-10"),o=av(a,1,o.times(e),new a(1),!0);for(var l,u=t,c=new a(8);u--;)l=o.times(o),o=s.minus(l.times(c.minus(l.times(c))));return Xt(o,a.precision=n,a.rounding=r,!0)};it.hyperbolicSine=it.sinh=function(){var t,e,n,r,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(e=o.precision,n=o.rounding,o.precision=e+Math.max(i.e,i.sd())+4,o.rounding=1,r=i.d.length,r<3)i=av(o,2,i,i,!0);else{t=1.4*Math.sqrt(r),t=t>16?16:t|0,i=i.times(1/hC(5,t)),i=av(o,2,i,i,!0);for(var a,s=new o(5),l=new o(16),u=new o(20);t--;)a=i.times(i),i=i.times(s.plus(a.times(l.times(a).plus(u))))}return o.precision=e,o.rounding=n,Xt(i,e,n,!0)};it.hyperbolicTangent=it.tanh=function(){var t,e,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+7,r.rounding=1,yr(n.sinh(),n.cosh(),r.precision=t,r.rounding=e)):new r(n.s)};it.inverseCosine=it.acos=function(){var t,e=this,n=e.constructor,r=e.abs().cmp(1),i=n.precision,o=n.rounding;return r!==-1?r===0?e.isNeg()?Jl(n,i,o):new n(0):new n(NaN):e.isZero()?Jl(n,i+4,o).times(.5):(n.precision=i+6,n.rounding=1,e=e.asin(),t=Jl(n,i+4,o).times(.5),n.precision=i,n.rounding=o,t.minus(e))};it.inverseHyperbolicCosine=it.acosh=function(){var t,e,n=this,r=n.constructor;return n.lte(1)?new r(n.eq(1)?0:NaN):n.isFinite()?(t=r.precision,e=r.rounding,r.precision=t+Math.max(Math.abs(n.e),n.sd())+4,r.rounding=1,pn=!1,n=n.times(n).minus(1).sqrt().plus(n),pn=!0,r.precision=t,r.rounding=e,n.ln()):new r(n)};it.inverseHyperbolicSine=it.asinh=function(){var t,e,n=this,r=n.constructor;return!n.isFinite()||n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+2*Math.max(Math.abs(n.e),n.sd())+6,r.rounding=1,pn=!1,n=n.times(n).plus(1).sqrt().plus(n),pn=!0,r.precision=t,r.rounding=e,n.ln())};it.inverseHyperbolicTangent=it.atanh=function(){var t,e,n,r,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(t=o.precision,e=o.rounding,r=i.sd(),Math.max(r,t)<2*-i.e-1?Xt(new o(i),t,e,!0):(o.precision=n=r-i.e,i=yr(i.plus(1),new o(1).minus(i),n+t,1),o.precision=t+4,o.rounding=1,i=i.ln(),o.precision=t,o.rounding=e,i.times(.5))):new o(NaN)};it.inverseSine=it.asin=function(){var t,e,n,r,i=this,o=i.constructor;return i.isZero()?new o(i):(e=i.abs().cmp(1),n=o.precision,r=o.rounding,e!==-1?e===0?(t=Jl(o,n+4,r).times(.5),t.s=i.s,t):new o(NaN):(o.precision=n+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=n,o.rounding=r,i.times(2)))};it.inverseTangent=it.atan=function(){var t,e,n,r,i,o,a,s,l,u=this,c=u.constructor,f=c.precision,d=c.rounding;if(u.isFinite()){if(u.isZero())return new c(u);if(u.abs().eq(1)&&f+4<=IR)return a=Jl(c,f+4,d).times(.25),a.s=u.s,a}else{if(!u.s)return new c(NaN);if(f+4<=IR)return a=Jl(c,f+4,d).times(.5),a.s=u.s,a}for(c.precision=s=f+10,c.rounding=1,n=Math.min(28,s/on+2|0),t=n;t;--t)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(pn=!1,e=Math.ceil(s/on),r=1,l=u.times(u),a=new c(u),i=u;t!==-1;)if(i=i.times(l),o=a.minus(i.div(r+=2)),i=i.times(l),a=o.plus(i.div(r+=2)),a.d[e]!==void 0)for(t=e;a.d[t]===o.d[t]&&t--;);return n&&(a=a.times(2<this.d.length-2};it.isNaN=function(){return!this.s};it.isNegative=it.isNeg=function(){return this.s<0};it.isPositive=it.isPos=function(){return this.s>0};it.isZero=function(){return!!this.d&&this.d[0]===0};it.lessThan=it.lt=function(t){return this.cmp(t)<0};it.lessThanOrEqualTo=it.lte=function(t){return this.cmp(t)<1};it.logarithm=it.log=function(t){var e,n,r,i,o,a,s,l,u=this,c=u.constructor,f=c.precision,d=c.rounding,p=5;if(t==null)t=new c(10),e=!0;else{if(t=new c(t),n=t.d,t.s<0||!n||!n[0]||t.eq(1))return new c(NaN);e=t.eq(10)}if(n=u.d,u.s<0||!n||!n[0]||u.eq(1))return new c(n&&!n[0]?-1/0:u.s!=1?NaN:n?0:1/0);if(e)if(n.length>1)o=!0;else{for(i=n[0];i%10===0;)i/=10;o=i!==1}if(pn=!1,s=f+p,a=bd(u,s),r=e?s2(c,s+10):bd(t,s),l=yr(a,r,s,1),Px(l.d,i=f,d))do if(s+=10,a=bd(u,s),r=e?s2(c,s+10):bd(t,s),l=yr(a,r,s,1),!o){+Mo(l.d).slice(i+1,i+15)+1==1e14&&(l=Xt(l,f+1,0));break}while(Px(l.d,i+=10,d));return pn=!0,Xt(l,f,d)};it.minus=it.sub=function(t){var e,n,r,i,o,a,s,l,u,c,f,d,p=this,y=p.constructor;if(t=new y(t),!p.d||!t.d)return!p.s||!t.s?t=new y(NaN):p.d?t.s=-t.s:t=new y(t.d||p.s!==t.s?p:NaN),t;if(p.s!=t.s)return t.s=-t.s,p.plus(t);if(u=p.d,d=t.d,s=y.precision,l=y.rounding,!u[0]||!d[0]){if(d[0])t.s=-t.s;else if(u[0])t=new y(p);else return new y(l===3?-0:0);return pn?Xt(t,s,l):t}if(n=Zo(t.e/on),c=Zo(p.e/on),u=u.slice(),o=c-n,o){for(f=o<0,f?(e=u,o=-o,a=d.length):(e=d,n=c,a=u.length),r=Math.max(Math.ceil(s/on),a)+2,o>r&&(o=r,e.length=1),e.reverse(),r=o;r--;)e.push(0);e.reverse()}else{for(r=u.length,a=d.length,f=r0;--r)u[a++]=0;for(r=d.length;r>o;){if(u[--r]a?o+1:a+1,i>a&&(i=a,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for(a=u.length,i=c.length,a-i<0&&(i=a,n=c,c=u,u=n),e=0;i;)e=(u[--i]=u[i]+c[i]+e)/iu|0,u[i]%=iu;for(e&&(u.unshift(e),++r),a=u.length;u[--a]==0;)u.pop();return t.d=u,t.e=dC(u,r),pn?Xt(t,s,l):t};it.precision=it.sd=function(t){var e,n=this;if(t!==void 0&&t!==!!t&&t!==1&&t!==0)throw Error(zd+t);return n.d?(e=TV(n.d),t&&n.e+1>e&&(e=n.e+1)):e=NaN,e};it.round=function(){var t=this,e=t.constructor;return Xt(new e(t),t.e+1,e.rounding)};it.sine=it.sin=function(){var t,e,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+Math.max(n.e,n.sd())+on,r.rounding=1,n=Ege(r,NV(r,n)),r.precision=t,r.rounding=e,Xt(qc>2?n.neg():n,t,e,!0)):new r(NaN)};it.squareRoot=it.sqrt=function(){var t,e,n,r,i,o,a=this,s=a.d,l=a.e,u=a.s,c=a.constructor;if(u!==1||!s||!s[0])return new c(!u||u<0&&(!s||s[0])?NaN:s?a:1/0);for(pn=!1,u=Math.sqrt(+a),u==0||u==1/0?(e=Mo(s),(e.length+l)%2==0&&(e+="0"),u=Math.sqrt(e),l=Zo((l+1)/2)-(l<0||l%2),u==1/0?e="5e"+l:(e=u.toExponential(),e=e.slice(0,e.indexOf("e")+1)+l),r=new c(e)):r=new c(u.toString()),n=(l=c.precision)+3;;)if(o=r,r=o.plus(yr(a,o,n+2,1)).times(.5),Mo(o.d).slice(0,n)===(e=Mo(r.d)).slice(0,n))if(e=e.slice(n-3,n+1),e=="9999"||!i&&e=="4999"){if(!i&&(Xt(o,l+1,0),o.times(o).eq(a))){r=o;break}n+=4,i=1}else{(!+e||!+e.slice(1)&&e.charAt(0)=="5")&&(Xt(r,l+1,1),t=!r.times(r).eq(a));break}return pn=!0,Xt(r,l,c.rounding,t)};it.tangent=it.tan=function(){var t,e,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+10,r.rounding=1,n=n.sin(),n.s=1,n=yr(n,new r(1).minus(n.times(n)).sqrt(),t+10,0),r.precision=t,r.rounding=e,Xt(qc==2||qc==4?n.neg():n,t,e,!0)):new r(NaN)};it.times=it.mul=function(t){var e,n,r,i,o,a,s,l,u,c=this,f=c.constructor,d=c.d,p=(t=new f(t)).d;if(t.s*=c.s,!d||!d[0]||!p||!p[0])return new f(!t.s||d&&!d[0]&&!p||p&&!p[0]&&!d?NaN:!d||!p?t.s/0:t.s*0);for(n=Zo(c.e/on)+Zo(t.e/on),l=d.length,u=p.length,l=0;){for(e=0,i=l+r;i>r;)s=o[i]+p[r]*d[i-r-1]+e,o[i--]=s%iu|0,e=s/iu|0;o[i]=(o[i]+e)%iu|0}for(;!o[--a];)o.pop();return e?++n:o.shift(),t.d=o,t.e=dC(o,n),pn?Xt(t,f.precision,f.rounding):t};it.toBinary=function(t,e){return KO(this,2,t,e)};it.toDecimalPlaces=it.toDP=function(t,e){var n=this,r=n.constructor;return n=new r(n),t===void 0?n:(Za(t,0,nh),e===void 0?e=r.rounding:Za(e,0,8),Xt(n,t+n.e+1,e))};it.toExponential=function(t,e){var n,r=this,i=r.constructor;return t===void 0?n=Qu(r,!0):(Za(t,0,nh),e===void 0?e=i.rounding:Za(e,0,8),r=Xt(new i(r),t+1,e),n=Qu(r,!0,t+1)),r.isNeg()&&!r.isZero()?"-"+n:n};it.toFixed=function(t,e){var n,r,i=this,o=i.constructor;return t===void 0?n=Qu(i):(Za(t,0,nh),e===void 0?e=o.rounding:Za(e,0,8),r=Xt(new o(i),t+i.e+1,e),n=Qu(r,!1,t+r.e+1)),i.isNeg()&&!i.isZero()?"-"+n:n};it.toFraction=function(t){var e,n,r,i,o,a,s,l,u,c,f,d,p=this,y=p.d,x=p.constructor;if(!y)return new x(p);if(u=n=new x(1),r=l=new x(0),e=new x(r),o=e.e=TV(y)-p.e-1,a=o%on,e.d[0]=$i(10,a<0?on+a:a),t==null)t=o>0?e:u;else{if(s=new x(t),!s.isInt()||s.lt(u))throw Error(zd+s);t=s.gt(e)?o>0?e:u:s}for(pn=!1,s=new x(Mo(y)),c=x.precision,x.precision=o=y.length*on*2;f=yr(s,e,0,1,1),i=n.plus(f.times(r)),i.cmp(t)!=1;)n=r,r=i,i=u,u=l.plus(f.times(i)),l=i,i=e,e=s.minus(f.times(i)),s=i;return i=yr(t.minus(n),r,0,1,1),l=l.plus(i.times(u)),n=n.plus(i.times(r)),l.s=u.s=p.s,d=yr(u,r,o,1).minus(p).abs().cmp(yr(l,n,o,1).minus(p).abs())<1?[u,r]:[l,n],x.precision=c,pn=!0,d};it.toHexadecimal=it.toHex=function(t,e){return KO(this,16,t,e)};it.toNearest=function(t,e){var n=this,r=n.constructor;if(n=new r(n),t==null){if(!n.d)return n;t=new r(1),e=r.rounding}else{if(t=new r(t),e===void 0?e=r.rounding:Za(e,0,8),!n.d)return t.s?n:t;if(!t.d)return t.s&&(t.s=n.s),t}return t.d[0]?(pn=!1,n=yr(n,t,0,e,1).times(t),pn=!0,Xt(n)):(t.s=n.s,n=t),n};it.toNumber=function(){return+this};it.toOctal=function(t,e){return KO(this,8,t,e)};it.toPower=it.pow=function(t){var e,n,r,i,o,a,s=this,l=s.constructor,u=+(t=new l(t));if(!s.d||!t.d||!s.d[0]||!t.d[0])return new l($i(+s,u));if(s=new l(s),s.eq(1))return s;if(r=l.precision,o=l.rounding,t.eq(1))return Xt(s,r,o);if(e=Zo(t.e/on),e>=t.d.length-1&&(n=u<0?-u:u)<=bge)return i=DV(l,s,n,r),t.s<0?new l(1).div(i):Xt(i,r,o);if(a=s.s,a<0){if(el.maxE+1||e0?a/0:0):(pn=!1,l.rounding=s.s=1,n=Math.min(12,(e+"").length),i=FR(t.times(bd(s,r+n)),r),i.d&&(i=Xt(i,r+5,1),Px(i.d,r,o)&&(e=r+10,i=Xt(FR(t.times(bd(s,e+n)),e),e+5,1),+Mo(i.d).slice(r+1,r+15)+1==1e14&&(i=Xt(i,r+1,0)))),i.s=a,pn=!0,l.rounding=o,Xt(i,r,o))};it.toPrecision=function(t,e){var n,r=this,i=r.constructor;return t===void 0?n=Qu(r,r.e<=i.toExpNeg||r.e>=i.toExpPos):(Za(t,1,nh),e===void 0?e=i.rounding:Za(e,0,8),r=Xt(new i(r),t,e),n=Qu(r,t<=r.e||r.e<=i.toExpNeg,t)),r.isNeg()&&!r.isZero()?"-"+n:n};it.toSignificantDigits=it.toSD=function(t,e){var n=this,r=n.constructor;return t===void 0?(t=r.precision,e=r.rounding):(Za(t,1,nh),e===void 0?e=r.rounding:Za(e,0,8)),Xt(new r(n),t,e)};it.toString=function(){var t=this,e=t.constructor,n=Qu(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()&&!t.isZero()?"-"+n:n};it.truncated=it.trunc=function(){return Xt(new this.constructor(this),this.e+1,1)};it.valueOf=it.toJSON=function(){var t=this,e=t.constructor,n=Qu(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()?"-"+n:n};function Mo(t){var e,n,r,i=t.length-1,o="",a=t[0];if(i>0){for(o+=a,e=1;en)throw Error(zd+t)}function Px(t,e,n,r){var i,o,a,s;for(o=t[0];o>=10;o/=10)--e;return--e<0?(e+=on,i=0):(i=Math.ceil((e+1)/on),e%=on),o=$i(10,on-e),s=t[i]%o|0,r==null?e<3?(e==0?s=s/100|0:e==1&&(s=s/10|0),a=n<4&&s==99999||n>3&&s==49999||s==5e4||s==0):a=(n<4&&s+1==o||n>3&&s+1==o/2)&&(t[i+1]/o/100|0)==$i(10,e-2)-1||(s==o/2||s==0)&&(t[i+1]/o/100|0)==0:e<4?(e==0?s=s/1e3|0:e==1?s=s/100|0:e==2&&(s=s/10|0),a=(r||n<4)&&s==9999||!r&&n>3&&s==4999):a=((r||n<4)&&s+1==o||!r&&n>3&&s+1==o/2)&&(t[i+1]/o/1e3|0)==$i(10,e-3)-1,a}function uE(t,e,n){for(var r,i=[0],o,a=0,s=t.length;an-1&&(i[r+1]===void 0&&(i[r+1]=0),i[r+1]+=i[r]/n|0,i[r]%=n)}return i.reverse()}function wge(t,e){var n,r,i;if(e.isZero())return e;r=e.d.length,r<32?(n=Math.ceil(r/3),i=(1/hC(4,n)).toString()):(n=16,i="2.3283064365386962890625e-10"),t.precision+=n,e=av(t,1,e.times(i),new t(1));for(var o=n;o--;){var a=e.times(e);e=a.times(a).minus(a).times(8).plus(1)}return t.precision-=n,e}var yr=function(){function t(r,i,o){var a,s=0,l=r.length;for(r=r.slice();l--;)a=r[l]*i+s,r[l]=a%o|0,s=a/o|0;return s&&r.unshift(s),r}function e(r,i,o,a){var s,l;if(o!=a)l=o>a?1:-1;else for(s=l=0;si[s]?1:-1;break}return l}function n(r,i,o,a){for(var s=0;o--;)r[o]-=s,s=r[o]1;)r.shift()}return function(r,i,o,a,s,l){var u,c,f,d,p,y,x,_,v,S,w,E,T,C,D,O,P,N,k,G,Z=r.constructor,j=r.s==i.s?1:-1,K=r.d,Y=i.d;if(!K||!K[0]||!Y||!Y[0])return new Z(!r.s||!i.s||(K?Y&&K[0]==Y[0]:!Y)?NaN:K&&K[0]==0||!Y?j*0:j/0);for(l?(p=1,c=r.e-i.e):(l=iu,p=on,c=Zo(r.e/p)-Zo(i.e/p)),k=Y.length,P=K.length,v=new Z(j),S=v.d=[],f=0;Y[f]==(K[f]||0);f++);if(Y[f]>(K[f]||0)&&c--,o==null?(C=o=Z.precision,a=Z.rounding):s?C=o+(r.e-i.e)+1:C=o,C<0)S.push(1),y=!0;else{if(C=C/p+2|0,f=0,k==1){for(d=0,Y=Y[0],C++;(f1&&(Y=t(Y,d,l),K=t(K,d,l),k=Y.length,P=K.length),O=k,w=K.slice(0,k),E=w.length;E=l/2&&++N;do d=0,u=e(Y,w,k,E),u<0?(T=w[0],k!=E&&(T=T*l+(w[1]||0)),d=T/N|0,d>1?(d>=l&&(d=l-1),x=t(Y,d,l),_=x.length,E=w.length,u=e(x,w,_,E),u==1&&(d--,n(x,k<_?G:Y,_,l))):(d==0&&(u=d=1),x=Y.slice()),_=x.length,_=10;d/=10)f++;v.e=f+c*p-1,Xt(v,s?o+v.e+1:o,a,y)}return v}}();function Xt(t,e,n,r){var i,o,a,s,l,u,c,f,d,p=t.constructor;e:if(e!=null){if(f=t.d,!f)return t;for(i=1,s=f[0];s>=10;s/=10)i++;if(o=e-i,o<0)o+=on,a=e,c=f[d=0],l=c/$i(10,i-a-1)%10|0;else if(d=Math.ceil((o+1)/on),s=f.length,d>=s)if(r){for(;s++<=d;)f.push(0);c=l=0,i=1,o%=on,a=o-on+1}else break e;else{for(c=s=f[d],i=1;s>=10;s/=10)i++;o%=on,a=o-on+i,l=a<0?0:c/$i(10,i-a-1)%10|0}if(r=r||e<0||f[d+1]!==void 0||(a<0?c:c%$i(10,i-a-1)),u=n<4?(l||r)&&(n==0||n==(t.s<0?3:2)):l>5||l==5&&(n==4||r||n==6&&(o>0?a>0?c/$i(10,i-a):0:f[d-1])%10&1||n==(t.s<0?8:7)),e<1||!f[0])return f.length=0,u?(e-=t.e+1,f[0]=$i(10,(on-e%on)%on),t.e=-e||0):f[0]=t.e=0,t;if(o==0?(f.length=d,s=1,d--):(f.length=d+1,s=$i(10,on-o),f[d]=a>0?(c/$i(10,i-a)%$i(10,a)|0)*s:0),u)for(;;)if(d==0){for(o=1,a=f[0];a>=10;a/=10)o++;for(a=f[0]+=s,s=1;a>=10;a/=10)s++;o!=s&&(t.e++,f[0]==iu&&(f[0]=1));break}else{if(f[d]+=s,f[d]!=iu)break;f[d--]=0,s=1}for(o=f.length;f[--o]===0;)f.pop()}return pn&&(t.e>p.maxE?(t.d=null,t.e=NaN):t.e0?o=o.charAt(0)+"."+o.slice(1)+fd(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(t.e<0?"e":"e+")+t.e):i<0?(o="0."+fd(-i-1)+o,n&&(r=n-a)>0&&(o+=fd(r))):i>=a?(o+=fd(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+fd(r))):((r=i+1)0&&(i+1===a&&(o+="."),o+=fd(r))),o}function dC(t,e){var n=t[0];for(e*=on;n>=10;n/=10)e++;return e}function s2(t,e,n){if(e>_ge)throw pn=!0,n&&(t.precision=n),Error(EV);return Xt(new t(o2),e,1,!0)}function Jl(t,e,n){if(e>IR)throw Error(EV);return Xt(new t(a2),e,n,!0)}function TV(t){var e=t.length-1,n=e*on+1;if(e=t[e],e){for(;e%10==0;e/=10)n--;for(e=t[0];e>=10;e/=10)n++}return n}function fd(t){for(var e="";t--;)e+="0";return e}function DV(t,e,n,r){var i,o=new t(1),a=Math.ceil(r/on+4);for(pn=!1;;){if(n%2&&(o=o.times(e),Z8(o.d,a)&&(i=!0)),n=Zo(n/2),n===0){n=o.d.length-1,i&&o.d[n]===0&&++o.d[n];break}e=e.times(e),Z8(e.d,a)}return pn=!0,o}function K8(t){return t.d[t.d.length-1]&1}function RV(t,e,n){for(var r,i=new t(e[0]),o=0;++o17)return new d(t.d?t.d[0]?t.s<0?0:1/0:1:t.s?t.s<0?0:t:0/0);for(e==null?(pn=!1,l=y):l=e,s=new d(.03125);t.e>-2;)t=t.times(s),f+=5;for(r=Math.log($i(2,f))/Math.LN10*2+5|0,l+=r,n=o=a=new d(1),d.precision=l;;){if(o=Xt(o.times(t),l,1),n=n.times(++c),s=a.plus(yr(o,n,l,1)),Mo(s.d).slice(0,l)===Mo(a.d).slice(0,l)){for(i=f;i--;)a=Xt(a.times(a),l,1);if(e==null)if(u<3&&Px(a.d,l-r,p,u))d.precision=l+=10,n=o=s=new d(1),c=0,u++;else return Xt(a,d.precision=y,p,pn=!0);else return d.precision=y,a}a=s}}function bd(t,e){var n,r,i,o,a,s,l,u,c,f,d,p=1,y=10,x=t,_=x.d,v=x.constructor,S=v.rounding,w=v.precision;if(x.s<0||!_||!_[0]||!x.e&&_[0]==1&&_.length==1)return new v(_&&!_[0]?-1/0:x.s!=1?NaN:_?0:x);if(e==null?(pn=!1,c=w):c=e,v.precision=c+=y,n=Mo(_),r=n.charAt(0),Math.abs(o=x.e)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)x=x.times(t),n=Mo(x.d),r=n.charAt(0),p++;o=x.e,r>1?(x=new v("0."+n),o++):x=new v(r+"."+n.slice(1))}else return u=s2(v,c+2,w).times(o+""),x=bd(new v(r+"."+n.slice(1)),c-y).plus(u),v.precision=w,e==null?Xt(x,w,S,pn=!0):x;for(f=x,l=a=x=yr(x.minus(1),x.plus(1),c,1),d=Xt(x.times(x),c,1),i=3;;){if(a=Xt(a.times(d),c,1),u=l.plus(yr(a,new v(i),c,1)),Mo(u.d).slice(0,c)===Mo(l.d).slice(0,c))if(l=l.times(2),o!==0&&(l=l.plus(s2(v,c+2,w).times(o+""))),l=yr(l,new v(p),c,1),e==null)if(Px(l.d,c-y,S,s))v.precision=c+=y,u=a=x=yr(f.minus(1),f.plus(1),c,1),d=Xt(x.times(x),c,1),i=s=1;else return Xt(l,v.precision=w,S,pn=!0);else return v.precision=w,l;l=u,i+=2}}function PV(t){return String(t.s*t.s/0)}function LR(t,e){var n,r,i;for((n=e.indexOf("."))>-1&&(e=e.replace(".","")),(r=e.search(/e/i))>0?(n<0&&(n=r),n+=+e.slice(r+1),e=e.substring(0,r)):n<0&&(n=e.length),r=0;e.charCodeAt(r)===48;r++);for(i=e.length;e.charCodeAt(i-1)===48;--i);if(e=e.slice(r,i),e){if(i-=r,t.e=n=n-r-1,t.d=[],r=(n+1)%on,n<0&&(r+=on),rt.constructor.maxE?(t.d=null,t.e=NaN):t.e-1){if(e=e.replace(/(\d)_(?=\d)/g,"$1"),AV.test(e))return LR(t,e)}else if(e==="Infinity"||e==="NaN")return+e||(t.s=NaN),t.e=NaN,t.d=null,t;if(yge.test(e))n=16,e=e.toLowerCase();else if(vge.test(e))n=2;else if(xge.test(e))n=8;else throw Error(zd+e);for(o=e.search(/p/i),o>0?(l=+e.slice(o+1),e=e.substring(2,o)):e=e.slice(2),o=e.indexOf("."),a=o>=0,r=t.constructor,a&&(e=e.replace(".",""),s=e.length,o=s-o,i=DV(r,new r(n),o,o*2)),u=uE(e,n,iu),c=u.length-1,o=c;u[o]===0;--o)u.pop();return o<0?new r(t.s*0):(t.e=dC(u,c),t.d=u,pn=!1,a&&(t=yr(t,i,s*4)),l&&(t=t.times(Math.abs(l)<54?$i(2,l):$d.pow(2,l))),pn=!0,t)}function Ege(t,e){var n,r=e.d.length;if(r<3)return e.isZero()?e:av(t,2,e,e);n=1.4*Math.sqrt(r),n=n>16?16:n|0,e=e.times(1/hC(5,n)),e=av(t,2,e,e);for(var i,o=new t(5),a=new t(16),s=new t(20);n--;)i=e.times(e),e=e.times(o.plus(i.times(a.times(i).minus(s))));return e}function av(t,e,n,r,i){var o,a,s,l,u=t.precision,c=Math.ceil(u/on);for(pn=!1,l=n.times(n),s=new t(r);;){if(a=yr(s.times(l),new t(e++*e++),u,1),s=i?r.plus(a):r.minus(a),r=yr(a.times(l),new t(e++*e++),u,1),a=s.plus(r),a.d[c]!==void 0){for(o=c;a.d[o]===s.d[o]&&o--;);if(o==-1)break}o=s,s=r,r=a,a=o}return pn=!0,a.d.length=c+1,a}function hC(t,e){for(var n=t;--e;)n*=t;return n}function NV(t,e){var n,r=e.s<0,i=Jl(t,t.precision,1),o=i.times(.5);if(e=e.abs(),e.lte(o))return qc=r?4:1,e;if(n=e.divToInt(i),n.isZero())qc=r?3:2;else{if(e=e.minus(n.times(i)),e.lte(o))return qc=K8(n)?r?2:3:r?4:1,e;qc=K8(n)?r?1:4:r?3:2}return e.minus(i).abs()}function KO(t,e,n,r){var i,o,a,s,l,u,c,f,d,p=t.constructor,y=n!==void 0;if(y?(Za(n,1,nh),r===void 0?r=p.rounding:Za(r,0,8)):(n=p.precision,r=p.rounding),!t.isFinite())c=PV(t);else{for(c=Qu(t),a=c.indexOf("."),y?(i=2,e==16?n=n*4-3:e==8&&(n=n*3-2)):i=e,a>=0&&(c=c.replace(".",""),d=new p(1),d.e=c.length-a,d.d=uE(Qu(d),10,i),d.e=d.d.length),f=uE(c,10,i),o=l=f.length;f[--l]==0;)f.pop();if(!f[0])c=y?"0p+0":"0";else{if(a<0?o--:(t=new p(t),t.d=f,t.e=o,t=yr(t,d,n,r,0,i),f=t.d,o=t.e,u=SV),a=f[n],s=i/2,u=u||f[n+1]!==void 0,u=r<4?(a!==void 0||u)&&(r===0||r===(t.s<0?3:2)):a>s||a===s&&(r===4||u||r===6&&f[n-1]&1||r===(t.s<0?8:7)),f.length=n,u)for(;++f[--n]>i-1;)f[n]=0,n||(++o,f.unshift(1));for(l=f.length;!f[l-1];--l);for(a=0,c="";a1)if(e==16||e==8){for(a=e==16?4:3,--l;l%a;l++)c+="0";for(f=uE(c,i,e),l=f.length;!f[l-1];--l);for(a=1,c="1.";al)for(o-=l;o--;)c+="0";else oe)return t.length=e,!0}function Mge(t){return new this(t).abs()}function Cge(t){return new this(t).acos()}function Age(t){return new this(t).acosh()}function Tge(t,e){return new this(t).plus(e)}function Dge(t){return new this(t).asin()}function Rge(t){return new this(t).asinh()}function Pge(t){return new this(t).atan()}function Nge(t){return new this(t).atanh()}function Oge(t,e){t=new this(t),e=new this(e);var n,r=this.precision,i=this.rounding,o=r+4;return!t.s||!e.s?n=new this(NaN):!t.d&&!e.d?(n=Jl(this,o,1).times(e.s>0?.25:.75),n.s=t.s):!e.d||t.isZero()?(n=e.s<0?Jl(this,r,i):new this(0),n.s=t.s):!t.d||e.isZero()?(n=Jl(this,o,1).times(.5),n.s=t.s):e.s<0?(this.precision=o,this.rounding=1,n=this.atan(yr(t,e,o,1)),e=Jl(this,o,1),this.precision=r,this.rounding=i,n=t.s<0?n.minus(e):n.plus(e)):n=this.atan(yr(t,e,o,1)),n}function Ige(t){return new this(t).cbrt()}function Fge(t){return Xt(t=new this(t),t.e+1,2)}function Lge(t,e,n){return new this(t).clamp(e,n)}function kge(t){if(!t||typeof t!="object")throw Error(fC+"Object expected");var e,n,r,i=t.defaults===!0,o=["precision",1,nh,"rounding",0,8,"toExpNeg",-pg,0,"toExpPos",0,pg,"maxE",0,pg,"minE",-pg,0,"modulo",0,9];for(e=0;e=o[e+1]&&r<=o[e+2])this[n]=r;else throw Error(zd+n+": "+r);if(n="crypto",i&&(this[n]=OR[n]),(r=t[n])!==void 0)if(r===!0||r===!1||r===0||r===1)if(r)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[n]=!0;else throw Error(MV);else this[n]=!1;else throw Error(zd+n+": "+r);return this}function Bge(t){return new this(t).cos()}function Uge(t){return new this(t).cosh()}function OV(t){var e,n,r;function i(o){var a,s,l,u=this;if(!(u instanceof i))return new i(o);if(u.constructor=i,J8(o)){u.s=o.s,pn?!o.d||o.e>i.maxE?(u.e=NaN,u.d=null):o.e=10;s/=10)a++;pn?a>i.maxE?(u.e=NaN,u.d=null):a=429e7?e[o]=crypto.getRandomValues(new Uint32Array(1))[0]:s[o++]=i%1e7;else if(crypto.randomBytes){for(e=crypto.randomBytes(r*=4);o=214e7?crypto.randomBytes(4).copy(e,o):(s.push(i%1e7),o+=4);o=r/4}else throw Error(MV);else for(;o=10;i/=10)r++;r{var{on:e,config:n}=t,r=$d.clone({precision:n.precision,modulo:$d.EUCLID});return r.prototype=Object.create(r.prototype),r.prototype.type="BigNumber",r.prototype.isBigNumber=!0,r.prototype.toJSON=function(){return{mathjs:"BigNumber",value:this.toString()}},r.fromJSON=function(i){return new r(i.value)},e&&e("config",function(i,o){i.precision!==o.precision&&r.config({precision:i.precision})}),r},{isClass:!0}),IV={exports:{}};/** * @license Complex.js v2.1.1 12/05/2020 * * Copyright (c) 2020, Robert Eisele (robert@xarg.org) * Dual licensed under the MIT or GPL Version 2 licenses. **/(function(t,e){(function(n){var r=Math.cosh||function(f){return Math.abs(f)<1e-9?1-f:(Math.exp(f)+Math.exp(-f))*.5},i=Math.sinh||function(f){return Math.abs(f)<1e-9?f:(Math.exp(f)-Math.exp(-f))*.5},o=function(f){var d=Math.PI/4;if(-d>f||f>d)return Math.cos(f)-1;var p=f*f;return p*(p*(p*(p*(p*(p*(p*(p/20922789888e3-1/87178291200)+1/479001600)-1/3628800)+1/40320)-1/720)+1/24)-1/2)},a=function(f,d){var p=Math.abs(f),y=Math.abs(d);return p<3e3&&y<3e3?Math.sqrt(p*p+y*y):(p0&&s();break;case"number":p.im=0,p.re=f;break;default:s()}return isNaN(p.re)||isNaN(p.im),p};function c(f,d){if(!(this instanceof c))return new c(f,d);var p=u(f,d);this.re=p.re,this.im=p.im}c.prototype={re:0,im:0,sign:function(){var f=this.abs();return new c(this.re/f,this.im/f)},add:function(f,d){var p=new c(f,d);return this.isInfinite()&&p.isInfinite()?c.NAN:this.isInfinite()||p.isInfinite()?c.INFINITY:new c(this.re+p.re,this.im+p.im)},sub:function(f,d){var p=new c(f,d);return this.isInfinite()&&p.isInfinite()?c.NAN:this.isInfinite()||p.isInfinite()?c.INFINITY:new c(this.re-p.re,this.im-p.im)},mul:function(f,d){var p=new c(f,d);return this.isInfinite()&&p.isZero()||this.isZero()&&p.isInfinite()?c.NAN:this.isInfinite()||p.isInfinite()?c.INFINITY:p.im===0&&this.im===0?new c(this.re*p.re,0):new c(this.re*p.re-this.im*p.im,this.re*p.im+this.im*p.re)},div:function(f,d){var p=new c(f,d);if(this.isZero()&&p.isZero()||this.isInfinite()&&p.isInfinite())return c.NAN;if(this.isInfinite()||p.isZero())return c.INFINITY;if(this.isZero()||p.isInfinite())return c.ZERO;f=this.re,d=this.im;var y=p.re,x=p.im,_,v;return x===0?new c(f/y,d/y):Math.abs(y)0)return new c(Math.pow(f,p.re),0);if(f===0)switch((p.re%4+4)%4){case 0:return new c(Math.pow(d,p.re),0);case 1:return new c(0,Math.pow(d,p.re));case 2:return new c(-Math.pow(d,p.re),0);case 3:return new c(0,-Math.pow(d,p.re))}}if(f===0&&d===0&&p.re>0&&p.im>=0)return c.ZERO;var y=Math.atan2(d,f),x=l(f,d);return f=Math.exp(p.re*x-p.im*y),d=p.im*x+p.re*y,new c(f*Math.cos(d),f*Math.sin(d))},sqrt:function(){var f=this.re,d=this.im,p=this.abs(),y,x;if(f>=0){if(d===0)return new c(Math.sqrt(f),0);y=.5*Math.sqrt(2*(p+f))}else y=Math.abs(d)/Math.sqrt(2*(p-f));return f<=0?x=.5*Math.sqrt(2*(p-f)):x=Math.abs(d)/Math.sqrt(2*(p+f)),new c(y,d<0?-x:x)},exp:function(){var f=Math.exp(this.re);return this.im,new c(f*Math.cos(this.im),f*Math.sin(this.im))},expm1:function(){var f=this.re,d=this.im;return new c(Math.expm1(f)*Math.cos(d)+o(d),Math.exp(f)*Math.sin(d))},log:function(){var f=this.re,d=this.im;return new c(l(f,d),Math.atan2(d,f))},abs:function(){return a(this.re,this.im)},arg:function(){return Math.atan2(this.im,this.re)},sin:function(){var f=this.re,d=this.im;return new c(Math.sin(f)*r(d),Math.cos(f)*i(d))},cos:function(){var f=this.re,d=this.im;return new c(Math.cos(f)*r(d),-Math.sin(f)*i(d))},tan:function(){var f=2*this.re,d=2*this.im,p=Math.cos(f)+r(d);return new c(Math.sin(f)/p,i(d)/p)},cot:function(){var f=2*this.re,d=2*this.im,p=Math.cos(f)-r(d);return new c(-Math.sin(f)/p,i(d)/p)},sec:function(){var f=this.re,d=this.im,p=.5*r(2*d)+.5*Math.cos(2*f);return new c(Math.cos(f)*r(d)/p,Math.sin(f)*i(d)/p)},csc:function(){var f=this.re,d=this.im,p=.5*r(2*d)-.5*Math.cos(2*f);return new c(Math.sin(f)*r(d)/p,-Math.cos(f)*i(d)/p)},asin:function(){var f=this.re,d=this.im,p=new c(d*d-f*f+1,-2*f*d).sqrt(),y=new c(p.re-d,p.im+f).log();return new c(y.im,-y.re)},acos:function(){var f=this.re,d=this.im,p=new c(d*d-f*f+1,-2*f*d).sqrt(),y=new c(p.re-d,p.im+f).log();return new c(Math.PI/2-y.im,y.re)},atan:function(){var f=this.re,d=this.im;if(f===0){if(d===1)return new c(0,1/0);if(d===-1)return new c(0,-1/0)}var p=f*f+(1-d)*(1-d),y=new c((1-d*d-f*f)/p,-2*f/p).log();return new c(-.5*y.im,.5*y.re)},acot:function(){var f=this.re,d=this.im;if(d===0)return new c(Math.atan2(1,f),0);var p=f*f+d*d;return p!==0?new c(f/p,-d/p).atan():new c(f!==0?f/0:0,d!==0?-d/0:0).atan()},asec:function(){var f=this.re,d=this.im;if(f===0&&d===0)return new c(0,1/0);var p=f*f+d*d;return p!==0?new c(f/p,-d/p).acos():new c(f!==0?f/0:0,d!==0?-d/0:0).acos()},acsc:function(){var f=this.re,d=this.im;if(f===0&&d===0)return new c(Math.PI/2,1/0);var p=f*f+d*d;return p!==0?new c(f/p,-d/p).asin():new c(f!==0?f/0:0,d!==0?-d/0:0).asin()},sinh:function(){var f=this.re,d=this.im;return new c(i(f)*Math.cos(d),r(f)*Math.sin(d))},cosh:function(){var f=this.re,d=this.im;return new c(r(f)*Math.cos(d),i(f)*Math.sin(d))},tanh:function(){var f=2*this.re,d=2*this.im,p=r(f)+Math.cos(d);return new c(i(f)/p,Math.sin(d)/p)},coth:function(){var f=2*this.re,d=2*this.im,p=r(f)-Math.cos(d);return new c(i(f)/p,-Math.sin(d)/p)},csch:function(){var f=this.re,d=this.im,p=Math.cos(2*d)-r(2*f);return new c(-2*i(f)*Math.cos(d)/p,2*r(f)*Math.sin(d)/p)},sech:function(){var f=this.re,d=this.im,p=Math.cos(2*d)+r(2*f);return new c(2*r(f)*Math.cos(d)/p,-2*i(f)*Math.sin(d)/p)},asinh:function(){var f=this.im;this.im=-this.re,this.re=f;var d=this.asin();return this.re=-this.im,this.im=f,f=d.re,d.re=-d.im,d.im=f,d},acosh:function(){var f=this.acos();if(f.im<=0){var d=f.re;f.re=-f.im,f.im=d}else{var d=f.im;f.im=-f.re,f.re=d}return f},atanh:function(){var f=this.re,d=this.im,p=f>1&&d===0,y=1-f,x=1+f,_=y*y+d*d,v=_!==0?new c((x*y-d*d)/_,(d*y+x*d)/_):new c(f!==-1?f/0:0,d!==0?d/0:0),S=v.re;return v.re=l(v.re,v.im)/2,v.im=Math.atan2(v.im,S)/2,p&&(v.im=-v.im),v},acoth:function(){var f=this.re,d=this.im;if(f===0&&d===0)return new c(0,Math.PI/2);var p=f*f+d*d;return p!==0?new c(f/p,-d/p).atanh():new c(f!==0?f/0:0,d!==0?-d/0:0).atanh()},acsch:function(){var f=this.re,d=this.im;if(d===0)return new c(f!==0?Math.log(f+Math.sqrt(f*f+1)):1/0,0);var p=f*f+d*d;return p!==0?new c(f/p,-d/p).asinh():new c(f!==0?f/0:0,d!==0?-d/0:0).asinh()},asech:function(){var f=this.re,d=this.im;if(this.isZero())return c.INFINITY;var p=f*f+d*d;return p!==0?new c(f/p,-d/p).acosh():new c(f!==0?f/0:0,d!==0?-d/0:0).acosh()},inverse:function(){if(this.isZero())return c.INFINITY;if(this.isInfinite())return c.ZERO;var f=this.re,d=this.im,p=f*f+d*d;return new c(f/p,-d/p)},conjugate:function(){return new c(this.re,-this.im)},neg:function(){return new c(-this.re,-this.im)},ceil:function(f){return f=Math.pow(10,f||0),new c(Math.ceil(this.re*f)/f,Math.ceil(this.im*f)/f)},floor:function(f){return f=Math.pow(10,f||0),new c(Math.floor(this.re*f)/f,Math.floor(this.im*f)/f)},round:function(f){return f=Math.pow(10,f||0),new c(Math.round(this.re*f)/f,Math.round(this.im*f)/f)},equals:function(f,d){var p=new c(f,d);return Math.abs(p.re-this.re)<=c.EPSILON&&Math.abs(p.im-this.im)<=c.EPSILON},clone:function(){return new c(this.re,this.im)},toString:function(){var f=this.re,d=this.im,p="";return this.isNaN()?"NaN":this.isInfinite()?"Infinity":(Math.abs(f)(Object.defineProperty(bo,"name",{value:"Complex"}),bo.prototype.constructor=bo,bo.prototype.type="Complex",bo.prototype.isComplex=!0,bo.prototype.toJSON=function(){return{mathjs:"Complex",re:this.re,im:this.im}},bo.prototype.toPolar=function(){return{r:this.abs(),phi:this.arg()}},bo.prototype.format=function(t){var e="",n=this.im,r=this.re,i=TR(this.re,t),o=TR(this.im,t),a=Br(t)?t:t?t.precision:null;if(a!==null){var s=Math.pow(10,-a);Math.abs(r/n)e.re?1:t.ree.im?1:t.im0&&s();break;case"number":p.im=0,p.re=f;break;default:s()}return isNaN(p.re)||isNaN(p.im),p};function c(f,d){if(!(this instanceof c))return new c(f,d);var p=u(f,d);this.re=p.re,this.im=p.im}c.prototype={re:0,im:0,sign:function(){var f=this.abs();return new c(this.re/f,this.im/f)},add:function(f,d){var p=new c(f,d);return this.isInfinite()&&p.isInfinite()?c.NAN:this.isInfinite()||p.isInfinite()?c.INFINITY:new c(this.re+p.re,this.im+p.im)},sub:function(f,d){var p=new c(f,d);return this.isInfinite()&&p.isInfinite()?c.NAN:this.isInfinite()||p.isInfinite()?c.INFINITY:new c(this.re-p.re,this.im-p.im)},mul:function(f,d){var p=new c(f,d);return this.isInfinite()&&p.isZero()||this.isZero()&&p.isInfinite()?c.NAN:this.isInfinite()||p.isInfinite()?c.INFINITY:p.im===0&&this.im===0?new c(this.re*p.re,0):new c(this.re*p.re-this.im*p.im,this.re*p.im+this.im*p.re)},div:function(f,d){var p=new c(f,d);if(this.isZero()&&p.isZero()||this.isInfinite()&&p.isInfinite())return c.NAN;if(this.isInfinite()||p.isZero())return c.INFINITY;if(this.isZero()||p.isInfinite())return c.ZERO;f=this.re,d=this.im;var y=p.re,x=p.im,_,v;return x===0?new c(f/y,d/y):Math.abs(y)0)return new c(Math.pow(f,p.re),0);if(f===0)switch((p.re%4+4)%4){case 0:return new c(Math.pow(d,p.re),0);case 1:return new c(0,Math.pow(d,p.re));case 2:return new c(-Math.pow(d,p.re),0);case 3:return new c(0,-Math.pow(d,p.re))}}if(f===0&&d===0&&p.re>0&&p.im>=0)return c.ZERO;var y=Math.atan2(d,f),x=l(f,d);return f=Math.exp(p.re*x-p.im*y),d=p.im*x+p.re*y,new c(f*Math.cos(d),f*Math.sin(d))},sqrt:function(){var f=this.re,d=this.im,p=this.abs(),y,x;if(f>=0){if(d===0)return new c(Math.sqrt(f),0);y=.5*Math.sqrt(2*(p+f))}else y=Math.abs(d)/Math.sqrt(2*(p-f));return f<=0?x=.5*Math.sqrt(2*(p-f)):x=Math.abs(d)/Math.sqrt(2*(p+f)),new c(y,d<0?-x:x)},exp:function(){var f=Math.exp(this.re);return this.im,new c(f*Math.cos(this.im),f*Math.sin(this.im))},expm1:function(){var f=this.re,d=this.im;return new c(Math.expm1(f)*Math.cos(d)+o(d),Math.exp(f)*Math.sin(d))},log:function(){var f=this.re,d=this.im;return new c(l(f,d),Math.atan2(d,f))},abs:function(){return a(this.re,this.im)},arg:function(){return Math.atan2(this.im,this.re)},sin:function(){var f=this.re,d=this.im;return new c(Math.sin(f)*r(d),Math.cos(f)*i(d))},cos:function(){var f=this.re,d=this.im;return new c(Math.cos(f)*r(d),-Math.sin(f)*i(d))},tan:function(){var f=2*this.re,d=2*this.im,p=Math.cos(f)+r(d);return new c(Math.sin(f)/p,i(d)/p)},cot:function(){var f=2*this.re,d=2*this.im,p=Math.cos(f)-r(d);return new c(-Math.sin(f)/p,i(d)/p)},sec:function(){var f=this.re,d=this.im,p=.5*r(2*d)+.5*Math.cos(2*f);return new c(Math.cos(f)*r(d)/p,Math.sin(f)*i(d)/p)},csc:function(){var f=this.re,d=this.im,p=.5*r(2*d)-.5*Math.cos(2*f);return new c(Math.sin(f)*r(d)/p,-Math.cos(f)*i(d)/p)},asin:function(){var f=this.re,d=this.im,p=new c(d*d-f*f+1,-2*f*d).sqrt(),y=new c(p.re-d,p.im+f).log();return new c(y.im,-y.re)},acos:function(){var f=this.re,d=this.im,p=new c(d*d-f*f+1,-2*f*d).sqrt(),y=new c(p.re-d,p.im+f).log();return new c(Math.PI/2-y.im,y.re)},atan:function(){var f=this.re,d=this.im;if(f===0){if(d===1)return new c(0,1/0);if(d===-1)return new c(0,-1/0)}var p=f*f+(1-d)*(1-d),y=new c((1-d*d-f*f)/p,-2*f/p).log();return new c(-.5*y.im,.5*y.re)},acot:function(){var f=this.re,d=this.im;if(d===0)return new c(Math.atan2(1,f),0);var p=f*f+d*d;return p!==0?new c(f/p,-d/p).atan():new c(f!==0?f/0:0,d!==0?-d/0:0).atan()},asec:function(){var f=this.re,d=this.im;if(f===0&&d===0)return new c(0,1/0);var p=f*f+d*d;return p!==0?new c(f/p,-d/p).acos():new c(f!==0?f/0:0,d!==0?-d/0:0).acos()},acsc:function(){var f=this.re,d=this.im;if(f===0&&d===0)return new c(Math.PI/2,1/0);var p=f*f+d*d;return p!==0?new c(f/p,-d/p).asin():new c(f!==0?f/0:0,d!==0?-d/0:0).asin()},sinh:function(){var f=this.re,d=this.im;return new c(i(f)*Math.cos(d),r(f)*Math.sin(d))},cosh:function(){var f=this.re,d=this.im;return new c(r(f)*Math.cos(d),i(f)*Math.sin(d))},tanh:function(){var f=2*this.re,d=2*this.im,p=r(f)+Math.cos(d);return new c(i(f)/p,Math.sin(d)/p)},coth:function(){var f=2*this.re,d=2*this.im,p=r(f)-Math.cos(d);return new c(i(f)/p,-Math.sin(d)/p)},csch:function(){var f=this.re,d=this.im,p=Math.cos(2*d)-r(2*f);return new c(-2*i(f)*Math.cos(d)/p,2*r(f)*Math.sin(d)/p)},sech:function(){var f=this.re,d=this.im,p=Math.cos(2*d)+r(2*f);return new c(2*r(f)*Math.cos(d)/p,-2*i(f)*Math.sin(d)/p)},asinh:function(){var f=this.im;this.im=-this.re,this.re=f;var d=this.asin();return this.re=-this.im,this.im=f,f=d.re,d.re=-d.im,d.im=f,d},acosh:function(){var f=this.acos();if(f.im<=0){var d=f.re;f.re=-f.im,f.im=d}else{var d=f.im;f.im=-f.re,f.re=d}return f},atanh:function(){var f=this.re,d=this.im,p=f>1&&d===0,y=1-f,x=1+f,_=y*y+d*d,v=_!==0?new c((x*y-d*d)/_,(d*y+x*d)/_):new c(f!==-1?f/0:0,d!==0?d/0:0),S=v.re;return v.re=l(v.re,v.im)/2,v.im=Math.atan2(v.im,S)/2,p&&(v.im=-v.im),v},acoth:function(){var f=this.re,d=this.im;if(f===0&&d===0)return new c(0,Math.PI/2);var p=f*f+d*d;return p!==0?new c(f/p,-d/p).atanh():new c(f!==0?f/0:0,d!==0?-d/0:0).atanh()},acsch:function(){var f=this.re,d=this.im;if(d===0)return new c(f!==0?Math.log(f+Math.sqrt(f*f+1)):1/0,0);var p=f*f+d*d;return p!==0?new c(f/p,-d/p).asinh():new c(f!==0?f/0:0,d!==0?-d/0:0).asinh()},asech:function(){var f=this.re,d=this.im;if(this.isZero())return c.INFINITY;var p=f*f+d*d;return p!==0?new c(f/p,-d/p).acosh():new c(f!==0?f/0:0,d!==0?-d/0:0).acosh()},inverse:function(){if(this.isZero())return c.INFINITY;if(this.isInfinite())return c.ZERO;var f=this.re,d=this.im,p=f*f+d*d;return new c(f/p,-d/p)},conjugate:function(){return new c(this.re,-this.im)},neg:function(){return new c(-this.re,-this.im)},ceil:function(f){return f=Math.pow(10,f||0),new c(Math.ceil(this.re*f)/f,Math.ceil(this.im*f)/f)},floor:function(f){return f=Math.pow(10,f||0),new c(Math.floor(this.re*f)/f,Math.floor(this.im*f)/f)},round:function(f){return f=Math.pow(10,f||0),new c(Math.round(this.re*f)/f,Math.round(this.im*f)/f)},equals:function(f,d){var p=new c(f,d);return Math.abs(p.re-this.re)<=c.EPSILON&&Math.abs(p.im-this.im)<=c.EPSILON},clone:function(){return new c(this.re,this.im)},toString:function(){var f=this.re,d=this.im,p="";return this.isNaN()?"NaN":this.isInfinite()?"Infinity":(Math.abs(f)(Object.defineProperty(_o,"name",{value:"Complex"}),_o.prototype.constructor=_o,_o.prototype.type="Complex",_o.prototype.isComplex=!0,_o.prototype.toJSON=function(){return{mathjs:"Complex",re:this.re,im:this.im}},_o.prototype.toPolar=function(){return{r:this.abs(),phi:this.arg()}},_o.prototype.format=function(t){var e="",n=this.im,r=this.re,i=RR(this.re,t),o=RR(this.im,t),a=Br(t)?t:t?t.precision:null;if(a!==null){var s=Math.pow(10,-a);Math.abs(r/n)e.re?1:t.ree.im?1:t.im1&&(S[w]=(S[w]||0)+1):S[v]=(S[v]||0)+1,S}var l=function(v,S){var w=0,E=1,T=1,C=0,D=0,O=0,P=1,N=1,k=0,G=1,Z=1,j=1,K=1e7,Y;if(v!=null)if(S!==void 0){if(w=v,E=S,T=w*E,w%1!==0||E%1!==0)throw _()}else switch(typeof v){case"object":{if("d"in v&&"n"in v)w=v.n,E=v.d,"s"in v&&(w*=v.s);else if(0 in v)w=v[0],1 in v&&(E=v[1]);else throw x();T=w*E;break}case"number":{if(v<0&&(T=v,v=-v),v%1===0)w=v;else if(v>0){for(v>=1&&(N=Math.pow(10,Math.floor(1+Math.log(v)/Math.LN10)),v/=N);G<=K&&j<=K;)if(Y=(k+Z)/(G+j),v===Y){G+j<=K?(w=k+Z,E=G+j):j>G?(w=Z,E=j):(w=k,E=G);break}else v>Y?(k+=Z,G+=j):(Z+=k,j+=G),G>K?(w=Z,E=j):(w=k,E=G);w*=N}else(isNaN(v)||isNaN(S))&&(E=w=NaN);break}case"string":{if(G=v.match(/\d+|./g),G===null)throw x();if(G[k]==="-"?(T=-1,k++):G[k]==="+"&&k++,G.length===k+1?D=o(G[k++],T):G[k+1]==="."||G[k]==="."?(G[k]!=="."&&(C=o(G[k++],T)),k++,(k+1===G.length||G[k+1]==="("&&G[k+3]===")"||G[k+1]==="'"&&G[k+3]==="'")&&(D=o(G[k],T),P=Math.pow(10,G[k].length),k++),(G[k]==="("&&G[k+2]===")"||G[k]==="'"&&G[k+2]==="'")&&(O=o(G[k+1],T),N=Math.pow(10,G[k+1].length)-1,k+=3)):G[k+1]==="/"||G[k+1]===":"?(D=o(G[k],T),P=o(G[k+2],1),k+=3):G[k+3]==="/"&&G[k+1]===" "&&(C=o(G[k],T),D=o(G[k+2],T),P=o(G[k+4],1),k+=5),G.length<=k){E=P*N,T=w=O+E*C+N*D;break}}default:throw x()}if(E===0)throw y();i.s=T<0?-1:1,i.n=Math.abs(w),i.d=Math.abs(E)};function u(v,S,w){for(var E=1;S>0;v=v*v%w,S>>=1)S&1&&(E=E*v%w);return E}function c(v,S){for(;S%2===0;S/=2);for(;S%5===0;S/=5);if(S===1)return 0;for(var w=10%S,E=1;w!==1;E++)if(w=w*10%S,E>r)return 0;return E}function f(v,S,w){for(var E=1,T=u(10,w,S),C=0;C<300;C++){if(E===T)return C;E=E*10%S,T=T*10%S}return 0}function d(v,S){if(!v)return S;if(!S)return v;for(;;){if(v%=S,!v)return S;if(S%=v,!S)return v}}function p(v,S){if(l(v,S),this instanceof p)v=d(i.d,i.n),this.s=i.s,this.n=i.n/v,this.d=i.d/v;else return a(i.s*i.n,i.d)}var y=function(){return new Error("Division by Zero")},x=function(){return new Error("Invalid argument")},_=function(){return new Error("Parameters must be integer")};p.prototype={s:1,n:0,d:1,abs:function(){return a(this.n,this.d)},neg:function(){return a(-this.s*this.n,this.d)},add:function(v,S){return l(v,S),a(this.s*this.n*i.d+i.s*this.d*i.n,this.d*i.d)},sub:function(v,S){return l(v,S),a(this.s*this.n*i.d-i.s*this.d*i.n,this.d*i.d)},mul:function(v,S){return l(v,S),a(this.s*i.s*this.n*i.n,this.d*i.d)},div:function(v,S){return l(v,S),a(this.s*i.s*this.n*i.d,this.d*i.n)},clone:function(){return a(this.s*this.n,this.d)},mod:function(v,S){if(isNaN(this.n)||isNaN(this.d))return new p(NaN);if(v===void 0)return a(this.s*this.n%this.d,1);if(l(v,S),i.n===0&&this.d===0)throw y();return a(this.s*(i.d*this.n)%(i.n*this.d),i.d*this.d)},gcd:function(v,S){return l(v,S),a(d(i.n,this.n)*d(i.d,this.d),i.d*this.d)},lcm:function(v,S){return l(v,S),i.n===0&&this.n===0?a(0,1):a(i.n*this.n,d(i.n,this.n)*d(i.d,this.d))},ceil:function(v){return v=Math.pow(10,v||0),isNaN(this.n)||isNaN(this.d)?new p(NaN):a(Math.ceil(v*this.s*this.n/this.d),v)},floor:function(v){return v=Math.pow(10,v||0),isNaN(this.n)||isNaN(this.d)?new p(NaN):a(Math.floor(v*this.s*this.n/this.d),v)},round:function(v){return v=Math.pow(10,v||0),isNaN(this.n)||isNaN(this.d)?new p(NaN):a(Math.round(v*this.s*this.n/this.d),v)},inverse:function(){return a(this.s*this.d,this.n)},pow:function(v,S){if(l(v,S),i.d===1)return i.s<0?a(Math.pow(this.s*this.d,i.n),Math.pow(this.n,i.n)):a(Math.pow(this.s*this.n,i.n),Math.pow(this.d,i.n));if(this.s<0)return null;var w=s(this.n),E=s(this.d),T=1,C=1;for(var D in w)if(D!=="1"){if(D==="0"){T=0;break}if(w[D]*=i.n,w[D]%i.d===0)w[D]/=i.d;else return null;T*=Math.pow(D,w[D])}for(var D in E)if(D!=="1"){if(E[D]*=i.n,E[D]%i.d===0)E[D]/=i.d;else return null;C*=Math.pow(D,E[D])}return i.s<0?a(C,T):a(T,C)},equals:function(v,S){return l(v,S),this.s*this.n*i.d===i.s*i.n*this.d},compare:function(v,S){l(v,S);var w=this.s*this.n*i.d-i.s*i.n*this.d;return(0=0;C--)T=T.inverse().add(w[C]);if(Math.abs(T.sub(S).valueOf())0&&(w+=S,w+=" ",E%=T),w+=E,w+="/",w+=T),w},toLatex:function(v){var S,w="",E=this.n,T=this.d;return this.s<0&&(w+="-"),T===1?w+=E:(v&&(S=Math.floor(E/T))>0&&(w+=S,E%=T),w+="\\frac{",w+=E,w+="}{",w+=T,w+="}"),w},toContinued:function(){var v,S=this.n,w=this.d,E=[];if(isNaN(S)||isNaN(w))return E;do E.push(Math.floor(S/w)),v=S%w,S=w,w=v;while(S!==1);return E},toString:function(v){var S=this.n,w=this.d;if(isNaN(S)||isNaN(w))return"NaN";v=v||15;var E=c(S,w),T=f(S,w,E),C=this.s<0?"-":"";if(C+=S/w|0,S%=w,S*=10,S&&(C+="."),E){for(var D=T;D--;)C+=S/w|0,S%=w,S*=10;C+="(";for(var D=E;D--;)C+=S/w|0,S%=w,S*=10;C+=")"}else for(var D=v;S&&D--;)C+=S/w|0,S%=w,S*=10;return C}},Object.defineProperty(p,"__esModule",{value:!0}),p.default=p,p.Fraction=p,t.exports=p})()})(TV);var sve=TV.exports;const Tc=lu(sve);var lve="Fraction",uve=[],cve=Tt(lve,uve,()=>(Object.defineProperty(Tc,"name",{value:"Fraction"}),Tc.prototype.constructor=Tc,Tc.prototype.type="Fraction",Tc.prototype.isFraction=!0,Tc.prototype.toJSON=function(){return{mathjs:"Fraction",n:this.s*this.n,d:this.d}},Tc.fromJSON=function(t){return new Tc(t)},Tc),{isClass:!0}),fve="Matrix",dve=[],hve=Tt(fve,dve,()=>{function t(){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator")}return t.prototype.type="Matrix",t.prototype.isMatrix=!0,t.prototype.storage=function(){throw new Error("Cannot invoke storage on a Matrix interface")},t.prototype.datatype=function(){throw new Error("Cannot invoke datatype on a Matrix interface")},t.prototype.create=function(e,n){throw new Error("Cannot invoke create on a Matrix interface")},t.prototype.subset=function(e,n,r){throw new Error("Cannot invoke subset on a Matrix interface")},t.prototype.get=function(e){throw new Error("Cannot invoke get on a Matrix interface")},t.prototype.set=function(e,n,r){throw new Error("Cannot invoke set on a Matrix interface")},t.prototype.resize=function(e,n){throw new Error("Cannot invoke resize on a Matrix interface")},t.prototype.reshape=function(e,n){throw new Error("Cannot invoke reshape on a Matrix interface")},t.prototype.clone=function(){throw new Error("Cannot invoke clone on a Matrix interface")},t.prototype.size=function(){throw new Error("Cannot invoke size on a Matrix interface")},t.prototype.map=function(e,n){throw new Error("Cannot invoke map on a Matrix interface")},t.prototype.forEach=function(e){throw new Error("Cannot invoke forEach on a Matrix interface")},t.prototype[Symbol.iterator]=function(){throw new Error("Cannot iterate a Matrix interface")},t.prototype.toArray=function(){throw new Error("Cannot invoke toArray on a Matrix interface")},t.prototype.valueOf=function(){throw new Error("Cannot invoke valueOf on a Matrix interface")},t.prototype.format=function(e){throw new Error("Cannot invoke format on a Matrix interface")},t.prototype.toString=function(){throw new Error("Cannot invoke toString on a Matrix interface")},t},{isClass:!0});function pve(t){var e=0,n=1,r=Object.create(null),i=Object.create(null),o=0,a=function(l){var u=i[l];if(u&&(delete r[u],delete i[l],--e,n===u)){if(!e){o=0,n=1;return}for(;!Object.prototype.hasOwnProperty.call(r,++n););}};return t=Math.abs(t),{hit:function(l){var u=i[l],c=++o;if(r[c]=l,i[l]=c,!u)return++e,e<=t?void 0:(l=r[n],a(l),l);if(delete r[u],n===u)for(;!Object.prototype.hasOwnProperty.call(r,++n););},delete:a,clear:function(){e=o=0,n=1,r=Object.create(null),i=Object.create(null)}}}function wb(t){var{hasher:e,limit:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return n=n??Number.POSITIVE_INFINITY,e=e??JSON.stringify,function r(){typeof r.cache!="object"&&(r.cache={values:new Map,lru:pve(n||Number.POSITIVE_INFINITY)});for(var i=[],o=0;o{var{Matrix:e}=t;function n(c,f){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(f&&!Lu(f))throw new Error("Invalid datatype: "+f);if(di(c))c.type==="DenseMatrix"?(this._data=Lr(c._data),this._size=Lr(c._size),this._datatype=f||c._datatype):(this._data=c.toArray(),this._size=c.size(),this._datatype=f||c._datatype);else if(c&&jr(c.data)&&jr(c.size))this._data=c.data,this._size=c.size,W8(this._data,this._size),this._datatype=f||c.datatype;else if(jr(c))this._data=u(c),this._size=wa(this._data),W8(this._data,this._size),this._datatype=f;else{if(c)throw new TypeError("Unsupported type of data ("+ml(c)+")");this._data=[],this._size=[0],this._datatype=f}}n.prototype=new e,n.prototype.createDenseMatrix=function(c,f){return new n(c,f)},Object.defineProperty(n,"name",{value:"DenseMatrix"}),n.prototype.constructor=n,n.prototype.type="DenseMatrix",n.prototype.isDenseMatrix=!0,n.prototype.getDataType=function(){return r2(this._data,ml)},n.prototype.storage=function(){return"dense"},n.prototype.datatype=function(){return this._datatype},n.prototype.create=function(c,f){return new n(c,f)},n.prototype.subset=function(c,f,d){switch(arguments.length){case 1:return r(this,c);case 2:case 3:return o(this,c,f,d);default:throw new SyntaxError("Wrong number of arguments")}},n.prototype.get=function(c){if(!jr(c))throw new TypeError("Array expected");if(c.length!==this._size.length)throw new er(c.length,this._size.length);for(var f=0;f");var w=f.max().map(function(C){return C+1});l(c,w,p);var E=y.length,T=0;a(c._data,f,d,E,T)}return c}function a(c,f,d,p,y){var x=y===p-1,_=f.dimension(y);x?_.forEach(function(v,S){qr(v),c[v]=d[S[0]]}):_.forEach(function(v,S){qr(v),a(c[v],f,d[S[0]],p,y+1)})}n.prototype.resize=function(c,f,d){if(!Dx(c))throw new TypeError("Array or Matrix expected");var p=c.valueOf().map(x=>Array.isArray(x)&&x.length===1?x[0]:x),y=d?this.clone():this;return s(y,p,f)};function s(c,f,d){if(f.length===0){for(var p=c._data;jr(p);)p=p[0];return p}return c._size=f.slice(0),c._data=n2(c._data,c._size,d),c}n.prototype.reshape=function(c,f){var d=f?this.clone():this;d._data=sV(d._data,c);var p=d._size.reduce((y,x)=>y*x);return d._size=XO(c,p),d};function l(c,f,d){for(var p=c._size.slice(0),y=!1;p.lengthp[x]&&(p[x]=f[x],y=!0);y&&s(c,p,d)}n.prototype.clone=function(){var c=new n({data:Lr(this._data),size:Lr(this._size),datatype:this._datatype});return c},n.prototype.size=function(){return this._size.slice(0)},n.prototype.map=function(c){var f=this,d=DV(c),p=function _(v,S){return jr(v)?v.map(function(w,E){return _(w,S.concat(E))}):d===1?c(v):d===2?c(v,S):c(v,S,f)},y=p(this._data,[]),x=this._datatype!==void 0?r2(y,ml):void 0;return new n(y,x)},n.prototype.forEach=function(c){var f=this,d=function p(y,x){jr(y)?y.forEach(function(_,v){p(_,x.concat(v))}):c(y,x,f)};d(this._data,[])},n.prototype[Symbol.iterator]=function*(){var c=function*f(d,p){if(jr(d))for(var y=0;y[w[v]]);f.push(new n(S,c._datatype))},x=0;x0?c:0,d=c<0?-c:0,p=this._size[0],y=this._size[1],x=Math.min(p-d,y-f),_=[],v=0;v0?d:0,x=d<0?-d:0,_=c[0],v=c[1],S=Math.min(_-x,v-y),w;if(jr(f)){if(f.length!==S)throw new Error("Invalid value array length");w=function(O){return f[O]}}else if(di(f)){var E=f.size();if(E.length!==1||E[0]!==S)throw new Error("Invalid matrix length");w=function(O){return f.get([O])}}else w=function(){return f};p||(p=co(w(0))?w(0).mul(0):0);var T=[];if(c.length>0){T=n2(T,c,p);for(var C=0;C=r.length)throw new eh(e,r.length);return di(t)?t.create(l2(t.valueOf(),e,n)):l2(t,e,n)}function l2(t,e,n){var r,i,o,a;if(e<=0)if(Array.isArray(t[0])){for(a=yve(t),i=[],r=0;r{var{typed:e}=t;return e(Y8,{number:Pr,BigNumber:function(r){return r.isInt()},Fraction:function(r){return r.d===1&&isFinite(r.n)},"Array | Matrix":e.referToSelf(n=>r=>Wi(r,n))})}),NV="number",hC="number, number";function OV(t){return Math.abs(t)}OV.signature=NV;function IV(t,e){return t+e}IV.signature=hC;function FV(t,e){return t-e}FV.signature=hC;function LV(t,e){return t*e}LV.signature=hC;function kV(t){return-t}kV.signature=NV;function BV(t,e){return t*t<1&&e===1/0||t*t>1&&e===-1/0?0:Math.pow(t,e)}BV.signature=hC;function K8(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(!Pr(e)||e<0||e>15)throw new Error("Number of decimals in function round must be an integer from 0 to 15 inclusive");return parseFloat(rV(t,e))}var _ve="number";function UV(t){return t===0}UV.signature=_ve;var Z8="isNumeric",wve=["typed"],Sve=Tt(Z8,wve,t=>{var{typed:e}=t;return e(Z8,{"number | BigNumber | Fraction | boolean":()=>!0,"Complex | Unit | string | null | undefined | Node":()=>!1,"Array | Matrix":e.referToSelf(n=>r=>Wi(r,n))})}),J8="isZero",Eve=["typed"],Mve=Tt(J8,Eve,t=>{var{typed:e}=t;return e(J8,{number:UV,BigNumber:function(r){return r.isZero()},Complex:function(r){return r.re===0&&r.im===0},Fraction:function(r){return r.d===1&&r.n===0},Unit:e.referToSelf(n=>r=>e.find(n,r.valueType())(r.value)),"Array | Matrix":e.referToSelf(n=>r=>Wi(r,n))})});function sf(t,e,n){if(n==null)return t.eq(e);if(t.eq(e))return!0;if(t.isNaN()||e.isNaN())return!1;if(t.isFinite()&&e.isFinite()){var r=t.minus(e).abs();if(r.isZero())return!0;var i=t.constructor.max(t.abs(),e.abs());return r.lte(i.times(n))}return!1}function Cve(t,e,n){return El(t.re,e.re,n)&&El(t.im,e.im,n)}var Sb=Tt("compareUnits",["typed"],t=>{var{typed:e}=t;return{"Unit, Unit":e.referToSelf(n=>(r,i)=>{if(!r.equalBase(i))throw new Error("Cannot compare units with different base");return e.find(n,[r.valueType(),i.valueType()])(r.value,i.value)})}}),u2="equalScalar",Ave=["typed","config"],Tve=Tt(u2,Ave,t=>{var{typed:e,config:n}=t,r=Sb({typed:e});return e(u2,{"boolean, boolean":function(o,a){return o===a},"number, number":function(o,a){return El(o,a,n.epsilon)},"BigNumber, BigNumber":function(o,a){return o.eq(a)||sf(o,a,n.epsilon)},"Fraction, Fraction":function(o,a){return o.equals(a)},"Complex, Complex":function(o,a){return Cve(o,a,n.epsilon)}},r)});Tt(u2,["typed","config"],t=>{var{typed:e,config:n}=t;return e(u2,{"number, number":function(i,o){return El(i,o,n.epsilon)}})});var Dve="SparseMatrix",Rve=["typed","equalScalar","Matrix"],Pve=Tt(Dve,Rve,t=>{var{typed:e,equalScalar:n,Matrix:r}=t;function i(x,_){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");if(_&&!Lu(_))throw new Error("Invalid datatype: "+_);if(di(x))o(this,x,_);else if(x&&jr(x.index)&&jr(x.ptr)&&jr(x.size))this._values=x.values,this._index=x.index,this._ptr=x.ptr,this._size=x.size,this._datatype=_||x.datatype;else if(jr(x))a(this,x,_);else{if(x)throw new TypeError("Unsupported type of data ("+ml(x)+")");this._values=[],this._index=[],this._ptr=[0],this._size=[0,0],this._datatype=_}}function o(x,_,v){_.type==="SparseMatrix"?(x._values=_._values?Lr(_._values):void 0,x._index=Lr(_._index),x._ptr=Lr(_._ptr),x._size=Lr(_._size),x._datatype=v||_._datatype):a(x,_.valueOf(),v||_._datatype)}function a(x,_,v){x._values=[],x._index=[],x._ptr=[],x._datatype=v;var S=_.length,w=0,E=n,T=0;if(Lu(v)&&(E=e.find(n,[v,v])||n,T=e.convert(0,v)),S>0){var C=0;do{x._ptr.push(x._index.length);for(var D=0;D");if(w.length===1){var O=_.dimension(0);O.forEach(function(k,G){qr(k),x.set([k,0],v[G[0]],S)})}else{var P=_.dimension(0),N=_.dimension(1);P.forEach(function(k,G){qr(k),N.forEach(function(Z,j){qr(Z),x.set([k,Z],v[G[0]][j[0]],S)})})}}return x}i.prototype.get=function(x){if(!jr(x))throw new TypeError("Array expected");if(x.length!==this._size.length)throw new er(x.length,this._size.length);if(!this._values)throw new Error("Cannot invoke get on a Pattern only matrix");var _=x[0],v=x[1];qr(_,this._size[0]),qr(v,this._size[1]);var S=u(_,this._ptr[v],this._ptr[v+1],this._index);return SE-1||w>T-1)&&(d(this,Math.max(S+1,E),Math.max(w+1,T),v),E=this._size[0],T=this._size[1]),qr(S,E),qr(w,T);var O=u(S,this._ptr[w],this._ptr[w+1],this._index);return OArray.isArray(E)&&E.length===1?E[0]:E);if(S.length!==2)throw new Error("Only two dimensions matrix are supported");S.forEach(function(E){if(!Br(E)||!Pr(E)||E<0)throw new TypeError("Invalid size, must contain positive integers (size: "+ui(S)+")")});var w=v?this.clone():this;return d(w,S[0],S[1],_)};function d(x,_,v,S){var w=S||0,E=n,T=0;Lu(x._datatype)&&(E=e.find(n,[x._datatype,x._datatype])||n,T=e.convert(0,x._datatype),w=e.convert(w,x._datatype));var C=!E(w,T),D=x._size[0],O=x._size[1],P,N,k;if(v>O){for(N=O;ND){if(C){var G=0;for(N=0;N_-1&&(x._values.splice(k,1),x._index.splice(k,1),j++)}x._ptr[N]=x._values.length}return x._size[0]=_,x._size[1]=v,x}i.prototype.reshape=function(x,_){if(!jr(x))throw new TypeError("Array expected");if(x.length!==2)throw new Error("Sparse matrices can only be reshaped in two dimensions");x.forEach(function(U){if(!Br(U)||!Pr(U)||U<=-2||U===0)throw new TypeError("Invalid size, must contain positive integers or -1 (size: "+ui(x)+")")});var v=this._size[0]*this._size[1];x=XO(x,v);var S=x[0]*x[1];if(v!==S)throw new Error("Reshaping sparse matrix will result in the wrong number of elements");var w=_?this.clone():this;if(this._size[0]===x[0]&&this._size[1]===x[1])return w;for(var E=[],T=0;T=_&&Y<=v&&k(x._values[K],Y-_,G-S)}else{for(var $={},W=Z;W1&&(S[w]=(S[w]||0)+1):S[v]=(S[v]||0)+1,S}var l=function(v,S){var w=0,E=1,T=1,C=0,D=0,O=0,P=1,N=1,k=0,G=1,Z=1,j=1,K=1e7,Y;if(v!=null)if(S!==void 0){if(w=v,E=S,T=w*E,w%1!==0||E%1!==0)throw _()}else switch(typeof v){case"object":{if("d"in v&&"n"in v)w=v.n,E=v.d,"s"in v&&(w*=v.s);else if(0 in v)w=v[0],1 in v&&(E=v[1]);else throw x();T=w*E;break}case"number":{if(v<0&&(T=v,v=-v),v%1===0)w=v;else if(v>0){for(v>=1&&(N=Math.pow(10,Math.floor(1+Math.log(v)/Math.LN10)),v/=N);G<=K&&j<=K;)if(Y=(k+Z)/(G+j),v===Y){G+j<=K?(w=k+Z,E=G+j):j>G?(w=Z,E=j):(w=k,E=G);break}else v>Y?(k+=Z,G+=j):(Z+=k,j+=G),G>K?(w=Z,E=j):(w=k,E=G);w*=N}else(isNaN(v)||isNaN(S))&&(E=w=NaN);break}case"string":{if(G=v.match(/\d+|./g),G===null)throw x();if(G[k]==="-"?(T=-1,k++):G[k]==="+"&&k++,G.length===k+1?D=o(G[k++],T):G[k+1]==="."||G[k]==="."?(G[k]!=="."&&(C=o(G[k++],T)),k++,(k+1===G.length||G[k+1]==="("&&G[k+3]===")"||G[k+1]==="'"&&G[k+3]==="'")&&(D=o(G[k],T),P=Math.pow(10,G[k].length),k++),(G[k]==="("&&G[k+2]===")"||G[k]==="'"&&G[k+2]==="'")&&(O=o(G[k+1],T),N=Math.pow(10,G[k+1].length)-1,k+=3)):G[k+1]==="/"||G[k+1]===":"?(D=o(G[k],T),P=o(G[k+2],1),k+=3):G[k+3]==="/"&&G[k+1]===" "&&(C=o(G[k],T),D=o(G[k+2],T),P=o(G[k+4],1),k+=5),G.length<=k){E=P*N,T=w=O+E*C+N*D;break}}default:throw x()}if(E===0)throw y();i.s=T<0?-1:1,i.n=Math.abs(w),i.d=Math.abs(E)};function u(v,S,w){for(var E=1;S>0;v=v*v%w,S>>=1)S&1&&(E=E*v%w);return E}function c(v,S){for(;S%2===0;S/=2);for(;S%5===0;S/=5);if(S===1)return 0;for(var w=10%S,E=1;w!==1;E++)if(w=w*10%S,E>r)return 0;return E}function f(v,S,w){for(var E=1,T=u(10,w,S),C=0;C<300;C++){if(E===T)return C;E=E*10%S,T=T*10%S}return 0}function d(v,S){if(!v)return S;if(!S)return v;for(;;){if(v%=S,!v)return S;if(S%=v,!S)return v}}function p(v,S){if(l(v,S),this instanceof p)v=d(i.d,i.n),this.s=i.s,this.n=i.n/v,this.d=i.d/v;else return a(i.s*i.n,i.d)}var y=function(){return new Error("Division by Zero")},x=function(){return new Error("Invalid argument")},_=function(){return new Error("Parameters must be integer")};p.prototype={s:1,n:0,d:1,abs:function(){return a(this.n,this.d)},neg:function(){return a(-this.s*this.n,this.d)},add:function(v,S){return l(v,S),a(this.s*this.n*i.d+i.s*this.d*i.n,this.d*i.d)},sub:function(v,S){return l(v,S),a(this.s*this.n*i.d-i.s*this.d*i.n,this.d*i.d)},mul:function(v,S){return l(v,S),a(this.s*i.s*this.n*i.n,this.d*i.d)},div:function(v,S){return l(v,S),a(this.s*i.s*this.n*i.d,this.d*i.n)},clone:function(){return a(this.s*this.n,this.d)},mod:function(v,S){if(isNaN(this.n)||isNaN(this.d))return new p(NaN);if(v===void 0)return a(this.s*this.n%this.d,1);if(l(v,S),i.n===0&&this.d===0)throw y();return a(this.s*(i.d*this.n)%(i.n*this.d),i.d*this.d)},gcd:function(v,S){return l(v,S),a(d(i.n,this.n)*d(i.d,this.d),i.d*this.d)},lcm:function(v,S){return l(v,S),i.n===0&&this.n===0?a(0,1):a(i.n*this.n,d(i.n,this.n)*d(i.d,this.d))},ceil:function(v){return v=Math.pow(10,v||0),isNaN(this.n)||isNaN(this.d)?new p(NaN):a(Math.ceil(v*this.s*this.n/this.d),v)},floor:function(v){return v=Math.pow(10,v||0),isNaN(this.n)||isNaN(this.d)?new p(NaN):a(Math.floor(v*this.s*this.n/this.d),v)},round:function(v){return v=Math.pow(10,v||0),isNaN(this.n)||isNaN(this.d)?new p(NaN):a(Math.round(v*this.s*this.n/this.d),v)},inverse:function(){return a(this.s*this.d,this.n)},pow:function(v,S){if(l(v,S),i.d===1)return i.s<0?a(Math.pow(this.s*this.d,i.n),Math.pow(this.n,i.n)):a(Math.pow(this.s*this.n,i.n),Math.pow(this.d,i.n));if(this.s<0)return null;var w=s(this.n),E=s(this.d),T=1,C=1;for(var D in w)if(D!=="1"){if(D==="0"){T=0;break}if(w[D]*=i.n,w[D]%i.d===0)w[D]/=i.d;else return null;T*=Math.pow(D,w[D])}for(var D in E)if(D!=="1"){if(E[D]*=i.n,E[D]%i.d===0)E[D]/=i.d;else return null;C*=Math.pow(D,E[D])}return i.s<0?a(C,T):a(T,C)},equals:function(v,S){return l(v,S),this.s*this.n*i.d===i.s*i.n*this.d},compare:function(v,S){l(v,S);var w=this.s*this.n*i.d-i.s*i.n*this.d;return(0=0;C--)T=T.inverse().add(w[C]);if(Math.abs(T.sub(S).valueOf())0&&(w+=S,w+=" ",E%=T),w+=E,w+="/",w+=T),w},toLatex:function(v){var S,w="",E=this.n,T=this.d;return this.s<0&&(w+="-"),T===1?w+=E:(v&&(S=Math.floor(E/T))>0&&(w+=S,E%=T),w+="\\frac{",w+=E,w+="}{",w+=T,w+="}"),w},toContinued:function(){var v,S=this.n,w=this.d,E=[];if(isNaN(S)||isNaN(w))return E;do E.push(Math.floor(S/w)),v=S%w,S=w,w=v;while(S!==1);return E},toString:function(v){var S=this.n,w=this.d;if(isNaN(S)||isNaN(w))return"NaN";v=v||15;var E=c(S,w),T=f(S,w,E),C=this.s<0?"-":"";if(C+=S/w|0,S%=w,S*=10,S&&(C+="."),E){for(var D=T;D--;)C+=S/w|0,S%=w,S*=10;C+="(";for(var D=E;D--;)C+=S/w|0,S%=w,S*=10;C+=")"}else for(var D=v;S&&D--;)C+=S/w|0,S%=w,S*=10;return C}},Object.defineProperty(p,"__esModule",{value:!0}),p.default=p,p.Fraction=p,t.exports=p})()})(FV);var vve=FV.exports;const Tc=su(vve);var yve="Fraction",xve=[],bve=Tt(yve,xve,()=>(Object.defineProperty(Tc,"name",{value:"Fraction"}),Tc.prototype.constructor=Tc,Tc.prototype.type="Fraction",Tc.prototype.isFraction=!0,Tc.prototype.toJSON=function(){return{mathjs:"Fraction",n:this.s*this.n,d:this.d}},Tc.fromJSON=function(t){return new Tc(t)},Tc),{isClass:!0}),_ve="Matrix",wve=[],Sve=Tt(_ve,wve,()=>{function t(){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator")}return t.prototype.type="Matrix",t.prototype.isMatrix=!0,t.prototype.storage=function(){throw new Error("Cannot invoke storage on a Matrix interface")},t.prototype.datatype=function(){throw new Error("Cannot invoke datatype on a Matrix interface")},t.prototype.create=function(e,n){throw new Error("Cannot invoke create on a Matrix interface")},t.prototype.subset=function(e,n,r){throw new Error("Cannot invoke subset on a Matrix interface")},t.prototype.get=function(e){throw new Error("Cannot invoke get on a Matrix interface")},t.prototype.set=function(e,n,r){throw new Error("Cannot invoke set on a Matrix interface")},t.prototype.resize=function(e,n){throw new Error("Cannot invoke resize on a Matrix interface")},t.prototype.reshape=function(e,n){throw new Error("Cannot invoke reshape on a Matrix interface")},t.prototype.clone=function(){throw new Error("Cannot invoke clone on a Matrix interface")},t.prototype.size=function(){throw new Error("Cannot invoke size on a Matrix interface")},t.prototype.map=function(e,n){throw new Error("Cannot invoke map on a Matrix interface")},t.prototype.forEach=function(e){throw new Error("Cannot invoke forEach on a Matrix interface")},t.prototype[Symbol.iterator]=function(){throw new Error("Cannot iterate a Matrix interface")},t.prototype.toArray=function(){throw new Error("Cannot invoke toArray on a Matrix interface")},t.prototype.valueOf=function(){throw new Error("Cannot invoke valueOf on a Matrix interface")},t.prototype.format=function(e){throw new Error("Cannot invoke format on a Matrix interface")},t.prototype.toString=function(){throw new Error("Cannot invoke toString on a Matrix interface")},t},{isClass:!0});function Eve(t){var e=0,n=1,r=Object.create(null),i=Object.create(null),o=0,a=function(l){var u=i[l];if(u&&(delete r[u],delete i[l],--e,n===u)){if(!e){o=0,n=1;return}for(;!Object.prototype.hasOwnProperty.call(r,++n););}};return t=Math.abs(t),{hit:function(l){var u=i[l],c=++o;if(r[c]=l,i[l]=c,!u)return++e,e<=t?void 0:(l=r[n],a(l),l);if(delete r[u],n===u)for(;!Object.prototype.hasOwnProperty.call(r,++n););},delete:a,clear:function(){e=o=0,n=1,r=Object.create(null),i=Object.create(null)}}}function Sb(t){var{hasher:e,limit:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return n=n??Number.POSITIVE_INFINITY,e=e??JSON.stringify,function r(){typeof r.cache!="object"&&(r.cache={values:new Map,lru:Eve(n||Number.POSITIVE_INFINITY)});for(var i=[],o=0;o{var{Matrix:e}=t;function n(c,f){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(f&&!Fu(f))throw new Error("Invalid datatype: "+f);if(di(c))c.type==="DenseMatrix"?(this._data=Lr(c._data),this._size=Lr(c._size),this._datatype=f||c._datatype):(this._data=c.toArray(),this._size=c.size(),this._datatype=f||c._datatype);else if(c&&jr(c.data)&&jr(c.size))this._data=c.data,this._size=c.size,X8(this._data,this._size),this._datatype=f||c.datatype;else if(jr(c))this._data=u(c),this._size=wa(this._data),X8(this._data,this._size),this._datatype=f;else{if(c)throw new TypeError("Unsupported type of data ("+ml(c)+")");this._data=[],this._size=[0],this._datatype=f}}n.prototype=new e,n.prototype.createDenseMatrix=function(c,f){return new n(c,f)},Object.defineProperty(n,"name",{value:"DenseMatrix"}),n.prototype.constructor=n,n.prototype.type="DenseMatrix",n.prototype.isDenseMatrix=!0,n.prototype.getDataType=function(){return r2(this._data,ml)},n.prototype.storage=function(){return"dense"},n.prototype.datatype=function(){return this._datatype},n.prototype.create=function(c,f){return new n(c,f)},n.prototype.subset=function(c,f,d){switch(arguments.length){case 1:return r(this,c);case 2:case 3:return o(this,c,f,d);default:throw new SyntaxError("Wrong number of arguments")}},n.prototype.get=function(c){if(!jr(c))throw new TypeError("Array expected");if(c.length!==this._size.length)throw new er(c.length,this._size.length);for(var f=0;f");var w=f.max().map(function(C){return C+1});l(c,w,p);var E=y.length,T=0;a(c._data,f,d,E,T)}return c}function a(c,f,d,p,y){var x=y===p-1,_=f.dimension(y);x?_.forEach(function(v,S){qr(v),c[v]=d[S[0]]}):_.forEach(function(v,S){qr(v),a(c[v],f,d[S[0]],p,y+1)})}n.prototype.resize=function(c,f,d){if(!Rx(c))throw new TypeError("Array or Matrix expected");var p=c.valueOf().map(x=>Array.isArray(x)&&x.length===1?x[0]:x),y=d?this.clone():this;return s(y,p,f)};function s(c,f,d){if(f.length===0){for(var p=c._data;jr(p);)p=p[0];return p}return c._size=f.slice(0),c._data=n2(c._data,c._size,d),c}n.prototype.reshape=function(c,f){var d=f?this.clone():this;d._data=pV(d._data,c);var p=d._size.reduce((y,x)=>y*x);return d._size=YO(c,p),d};function l(c,f,d){for(var p=c._size.slice(0),y=!1;p.lengthp[x]&&(p[x]=f[x],y=!0);y&&s(c,p,d)}n.prototype.clone=function(){var c=new n({data:Lr(this._data),size:Lr(this._size),datatype:this._datatype});return c},n.prototype.size=function(){return this._size.slice(0)},n.prototype.map=function(c){var f=this,d=LV(c),p=function _(v,S){return jr(v)?v.map(function(w,E){return _(w,S.concat(E))}):d===1?c(v):d===2?c(v,S):c(v,S,f)},y=p(this._data,[]),x=this._datatype!==void 0?r2(y,ml):void 0;return new n(y,x)},n.prototype.forEach=function(c){var f=this,d=function p(y,x){jr(y)?y.forEach(function(_,v){p(_,x.concat(v))}):c(y,x,f)};d(this._data,[])},n.prototype[Symbol.iterator]=function*(){var c=function*f(d,p){if(jr(d))for(var y=0;y[w[v]]);f.push(new n(S,c._datatype))},x=0;x0?c:0,d=c<0?-c:0,p=this._size[0],y=this._size[1],x=Math.min(p-d,y-f),_=[],v=0;v0?d:0,x=d<0?-d:0,_=c[0],v=c[1],S=Math.min(_-x,v-y),w;if(jr(f)){if(f.length!==S)throw new Error("Invalid value array length");w=function(O){return f[O]}}else if(di(f)){var E=f.size();if(E.length!==1||E[0]!==S)throw new Error("Invalid matrix length");w=function(O){return f.get([O])}}else w=function(){return f};p||(p=fo(w(0))?w(0).mul(0):0);var T=[];if(c.length>0){T=n2(T,c,p);for(var C=0;C=r.length)throw new th(e,r.length);return di(t)?t.create(l2(t.valueOf(),e,n)):l2(t,e,n)}function l2(t,e,n){var r,i,o,a;if(e<=0)if(Array.isArray(t[0])){for(a=Tve(t),i=[],r=0;r{var{typed:e}=t;return e(Q8,{number:Pr,BigNumber:function(r){return r.isInt()},Fraction:function(r){return r.d===1&&isFinite(r.n)},"Array | Matrix":e.referToSelf(n=>r=>Gi(r,n))})}),UV="number",pC="number, number";function zV(t){return Math.abs(t)}zV.signature=UV;function $V(t,e){return t+e}$V.signature=pC;function HV(t,e){return t-e}HV.signature=pC;function VV(t,e){return t*e}VV.signature=pC;function WV(t){return-t}WV.signature=UV;function GV(t,e){return t*t<1&&e===1/0||t*t>1&&e===-1/0?0:Math.pow(t,e)}GV.signature=pC;function ek(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(!Pr(e)||e<0||e>15)throw new Error("Number of decimals in function round must be an integer from 0 to 15 inclusive");return parseFloat(cV(t,e))}var Pve="number";function jV(t){return t===0}jV.signature=Pve;var tk="isNumeric",Nve=["typed"],Ove=Tt(tk,Nve,t=>{var{typed:e}=t;return e(tk,{"number | BigNumber | Fraction | boolean":()=>!0,"Complex | Unit | string | null | undefined | Node":()=>!1,"Array | Matrix":e.referToSelf(n=>r=>Gi(r,n))})}),nk="isZero",Ive=["typed"],Fve=Tt(nk,Ive,t=>{var{typed:e}=t;return e(nk,{number:jV,BigNumber:function(r){return r.isZero()},Complex:function(r){return r.re===0&&r.im===0},Fraction:function(r){return r.d===1&&r.n===0},Unit:e.referToSelf(n=>r=>e.find(n,r.valueType())(r.value)),"Array | Matrix":e.referToSelf(n=>r=>Gi(r,n))})});function lf(t,e,n){if(n==null)return t.eq(e);if(t.eq(e))return!0;if(t.isNaN()||e.isNaN())return!1;if(t.isFinite()&&e.isFinite()){var r=t.minus(e).abs();if(r.isZero())return!0;var i=t.constructor.max(t.abs(),e.abs());return r.lte(i.times(n))}return!1}function Lve(t,e,n){return El(t.re,e.re,n)&&El(t.im,e.im,n)}var Eb=Tt("compareUnits",["typed"],t=>{var{typed:e}=t;return{"Unit, Unit":e.referToSelf(n=>(r,i)=>{if(!r.equalBase(i))throw new Error("Cannot compare units with different base");return e.find(n,[r.valueType(),i.valueType()])(r.value,i.value)})}}),u2="equalScalar",kve=["typed","config"],Bve=Tt(u2,kve,t=>{var{typed:e,config:n}=t,r=Eb({typed:e});return e(u2,{"boolean, boolean":function(o,a){return o===a},"number, number":function(o,a){return El(o,a,n.epsilon)},"BigNumber, BigNumber":function(o,a){return o.eq(a)||lf(o,a,n.epsilon)},"Fraction, Fraction":function(o,a){return o.equals(a)},"Complex, Complex":function(o,a){return Lve(o,a,n.epsilon)}},r)});Tt(u2,["typed","config"],t=>{var{typed:e,config:n}=t;return e(u2,{"number, number":function(i,o){return El(i,o,n.epsilon)}})});var Uve="SparseMatrix",zve=["typed","equalScalar","Matrix"],$ve=Tt(Uve,zve,t=>{var{typed:e,equalScalar:n,Matrix:r}=t;function i(x,_){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");if(_&&!Fu(_))throw new Error("Invalid datatype: "+_);if(di(x))o(this,x,_);else if(x&&jr(x.index)&&jr(x.ptr)&&jr(x.size))this._values=x.values,this._index=x.index,this._ptr=x.ptr,this._size=x.size,this._datatype=_||x.datatype;else if(jr(x))a(this,x,_);else{if(x)throw new TypeError("Unsupported type of data ("+ml(x)+")");this._values=[],this._index=[],this._ptr=[0],this._size=[0,0],this._datatype=_}}function o(x,_,v){_.type==="SparseMatrix"?(x._values=_._values?Lr(_._values):void 0,x._index=Lr(_._index),x._ptr=Lr(_._ptr),x._size=Lr(_._size),x._datatype=v||_._datatype):a(x,_.valueOf(),v||_._datatype)}function a(x,_,v){x._values=[],x._index=[],x._ptr=[],x._datatype=v;var S=_.length,w=0,E=n,T=0;if(Fu(v)&&(E=e.find(n,[v,v])||n,T=e.convert(0,v)),S>0){var C=0;do{x._ptr.push(x._index.length);for(var D=0;D");if(w.length===1){var O=_.dimension(0);O.forEach(function(k,G){qr(k),x.set([k,0],v[G[0]],S)})}else{var P=_.dimension(0),N=_.dimension(1);P.forEach(function(k,G){qr(k),N.forEach(function(Z,j){qr(Z),x.set([k,Z],v[G[0]][j[0]],S)})})}}return x}i.prototype.get=function(x){if(!jr(x))throw new TypeError("Array expected");if(x.length!==this._size.length)throw new er(x.length,this._size.length);if(!this._values)throw new Error("Cannot invoke get on a Pattern only matrix");var _=x[0],v=x[1];qr(_,this._size[0]),qr(v,this._size[1]);var S=u(_,this._ptr[v],this._ptr[v+1],this._index);return SE-1||w>T-1)&&(d(this,Math.max(S+1,E),Math.max(w+1,T),v),E=this._size[0],T=this._size[1]),qr(S,E),qr(w,T);var O=u(S,this._ptr[w],this._ptr[w+1],this._index);return OArray.isArray(E)&&E.length===1?E[0]:E);if(S.length!==2)throw new Error("Only two dimensions matrix are supported");S.forEach(function(E){if(!Br(E)||!Pr(E)||E<0)throw new TypeError("Invalid size, must contain positive integers (size: "+ui(S)+")")});var w=v?this.clone():this;return d(w,S[0],S[1],_)};function d(x,_,v,S){var w=S||0,E=n,T=0;Fu(x._datatype)&&(E=e.find(n,[x._datatype,x._datatype])||n,T=e.convert(0,x._datatype),w=e.convert(w,x._datatype));var C=!E(w,T),D=x._size[0],O=x._size[1],P,N,k;if(v>O){for(N=O;ND){if(C){var G=0;for(N=0;N_-1&&(x._values.splice(k,1),x._index.splice(k,1),j++)}x._ptr[N]=x._values.length}return x._size[0]=_,x._size[1]=v,x}i.prototype.reshape=function(x,_){if(!jr(x))throw new TypeError("Array expected");if(x.length!==2)throw new Error("Sparse matrices can only be reshaped in two dimensions");x.forEach(function(U){if(!Br(U)||!Pr(U)||U<=-2||U===0)throw new TypeError("Invalid size, must contain positive integers or -1 (size: "+ui(x)+")")});var v=this._size[0]*this._size[1];x=YO(x,v);var S=x[0]*x[1];if(v!==S)throw new Error("Reshaping sparse matrix will result in the wrong number of elements");var w=_?this.clone():this;if(this._size[0]===x[0]&&this._size[1]===x[1])return w;for(var E=[],T=0;T=_&&Y<=v&&k(x._values[K],Y-_,G-S)}else{for(var $={},W=Z;W "+(this._values?ui(this._values[D],x):"X")}return w},i.prototype.toString=function(){return ui(this.toArray())},i.prototype.toJSON=function(){return{mathjs:"SparseMatrix",values:this._values,index:this._index,ptr:this._ptr,size:this._size,datatype:this._datatype}},i.prototype.diagonal=function(x){if(x){if(co(x)&&(x=x.toNumber()),!Br(x)||!Pr(x))throw new TypeError("The parameter k must be an integer number")}else x=0;var _=x>0?x:0,v=x<0?-x:0,S=this._size[0],w=this._size[1],E=Math.min(S-v,w-_),T=[],C=[],D=[];D[0]=0;for(var O=_;O0?v:0,D=v<0?-v:0,O=x[0],P=x[1],N=Math.min(O-D,P-C),k;if(jr(_)){if(_.length!==N)throw new Error("Invalid value array length");k=function(te){return _[te]}}else if(di(_)){var G=_.size();if(G.length!==1||G[0]!==N)throw new Error("Invalid matrix length");k=function(te){return _.get([te])}}else k=function(){return _};for(var Z=[],j=[],K=[],Y=0;Y=0&&$=D||w[P]!==_)){var k=S?S[O]:void 0;w.splice(P,0,_),S&&S.splice(P,0,k),w.splice(P<=O?O+1:O,1),S&&S.splice(P<=O?O+1:O,1);continue}if(P=D||w[O]!==x)){var G=S?S[P]:void 0;w.splice(O,0,x),S&&S.splice(O,0,G),w.splice(O<=P?P+1:P,1),S&&S.splice(O<=P?P+1:P,1)}}},i},{isClass:!0}),Nve="number",Ove=["typed"];function Ive(t){var e=t.match(/(0[box])([0-9a-fA-F]*)\.([0-9a-fA-F]*)/);if(e){var n={"0b":2,"0o":8,"0x":16}[e[1]],r=e[2],i=e[3];return{input:t,radix:n,integerPart:r,fractionalPart:i}}else return null}function Fve(t){for(var e=parseInt(t.integerPart,t.radix),n=0,r=0;r{var{typed:e}=t,n=e("number",{"":function(){return 0},number:function(i){return i},string:function(i){if(i==="NaN")return NaN;var o=Ive(i);if(o)return Fve(o);var a=0,s=i.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/);s&&(a=Number(s[2]),i=s[1]);var l=Number(i);if(isNaN(l))throw new SyntaxError('String "'+i+'" is not a valid number');if(s){if(l>2**a-1)throw new SyntaxError('String "'.concat(i,'" is out of range'));l>=2**(a-1)&&(l=l-2**a)}return l},BigNumber:function(i){return i.toNumber()},Fraction:function(i){return i.valueOf()},Unit:e.referToSelf(r=>i=>{var o=i.clone();return o.value=r(i.value),o}),null:function(i){return 0},"Unit, string | Unit":function(i,o){return i.toNumber(o)},"Array | Matrix":e.referToSelf(r=>i=>Wi(i,r))});return n.fromJSON=function(r){return parseFloat(r.value)},n}),kve="bignumber",Bve=["typed","BigNumber"],Uve=Tt(kve,Bve,t=>{var{typed:e,BigNumber:n}=t;return e("bignumber",{"":function(){return new n(0)},number:function(i){return new n(i+"")},string:function(i){var o=i.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/);if(o){var a=o[2],s=n(o[1]),l=new n(2).pow(Number(a));if(s.gt(l.sub(1)))throw new SyntaxError('String "'.concat(i,'" is out of range'));var u=new n(2).pow(Number(a)-1);return s.gte(u)?s.sub(l):s}return new n(i)},BigNumber:function(i){return i},Unit:e.referToSelf(r=>i=>{var o=i.clone();return o.value=r(i.value),o}),Fraction:function(i){return new n(i.n).div(i.d).times(i.s)},null:function(i){return new n(0)},"Array | Matrix":e.referToSelf(r=>i=>Wi(i,r))})}),zve="fraction",$ve=["typed","Fraction"],Hve=Tt(zve,$ve,t=>{var{typed:e,Fraction:n}=t;return e("fraction",{number:function(i){if(!isFinite(i)||isNaN(i))throw new Error(i+" cannot be represented as a fraction");return new n(i)},string:function(i){return new n(i)},"number, number":function(i,o){return new n(i,o)},null:function(i){return new n(0)},BigNumber:function(i){return new n(i.toString())},Fraction:function(i){return i},Unit:e.referToSelf(r=>i=>{var o=i.clone();return o.value=r(i.value),o}),Object:function(i){return new n(i)},"Array | Matrix":e.referToSelf(r=>i=>Wi(i,r))})}),Q8="matrix",Vve=["typed","Matrix","DenseMatrix","SparseMatrix"],Wve=Tt(Q8,Vve,t=>{var{typed:e,Matrix:n,DenseMatrix:r,SparseMatrix:i}=t;return e(Q8,{"":function(){return o([])},string:function(s){return o([],s)},"string, string":function(s,l){return o([],s,l)},Array:function(s){return o(s)},Matrix:function(s){return o(s,s.storage())},"Array | Matrix, string":o,"Array | Matrix, string, string":o});function o(a,s,l){if(s==="dense"||s==="default"||s===void 0)return new r(a,l);if(s==="sparse")return new i(a,l);throw new TypeError("Unknown matrix type "+JSON.stringify(s)+".")}}),ek="unaryMinus",Gve=["typed"],jve=Tt(ek,Gve,t=>{var{typed:e}=t;return e(ek,{number:kV,"Complex | BigNumber | Fraction":n=>n.neg(),Unit:e.referToSelf(n=>r=>{var i=r.clone();return i.value=e.find(n,i.valueType())(r.value),i}),"Array | Matrix":e.referToSelf(n=>r=>Wi(r,n))})}),tk="abs",qve=["typed"],Xve=Tt(tk,qve,t=>{var{typed:e}=t;return e(tk,{number:OV,"Complex | BigNumber | Fraction | Unit":n=>n.abs(),"Array | Matrix":e.referToSelf(n=>r=>Wi(r,n))})}),nk="addScalar",Yve=["typed"],Kve=Tt(nk,Yve,t=>{var{typed:e}=t;return e(nk,{"number, number":IV,"Complex, Complex":function(r,i){return r.add(i)},"BigNumber, BigNumber":function(r,i){return r.plus(i)},"Fraction, Fraction":function(r,i){return r.add(i)},"Unit, Unit":e.referToSelf(n=>(r,i)=>{if(r.value===null||r.value===void 0)throw new Error("Parameter x contains a unit with undefined value");if(i.value===null||i.value===void 0)throw new Error("Parameter y contains a unit with undefined value");if(!r.equalBase(i))throw new Error("Units do not match");var o=r.clone();return o.value=e.find(n,[o.valueType(),i.valueType()])(o.value,i.value),o.fixPrefix=!1,o})})}),rk="subtractScalar",Zve=["typed"],Jve=Tt(rk,Zve,t=>{var{typed:e}=t;return e(rk,{"number, number":FV,"Complex, Complex":function(r,i){return r.sub(i)},"BigNumber, BigNumber":function(r,i){return r.minus(i)},"Fraction, Fraction":function(r,i){return r.sub(i)},"Unit, Unit":e.referToSelf(n=>(r,i)=>{if(r.value===null||r.value===void 0)throw new Error("Parameter x contains a unit with undefined value");if(i.value===null||i.value===void 0)throw new Error("Parameter y contains a unit with undefined value");if(!r.equalBase(i))throw new Error("Units do not match");var o=r.clone();return o.value=e.find(n,[o.valueType(),i.valueType()])(o.value,i.value),o.fixPrefix=!1,o})})}),Qve="matAlgo11xS0s",eye=["typed","equalScalar"],Eb=Tt(Qve,eye,t=>{var{typed:e,equalScalar:n}=t;return function(i,o,a,s){var l=i._values,u=i._index,c=i._ptr,f=i._size,d=i._datatype;if(!l)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var p=f[0],y=f[1],x,_=n,v=0,S=a;typeof d=="string"&&(x=d,_=e.find(n,[x,x]),v=e.convert(0,x),o=e.convert(o,x),S=e.find(a,[x,x]));for(var w=[],E=[],T=[],C=0;C{var{typed:e,DenseMatrix:n}=t;return function(i,o,a,s){var l=i._values,u=i._index,c=i._ptr,f=i._size,d=i._datatype;if(!l)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var p=f[0],y=f[1],x,_=a;typeof d=="string"&&(x=d,o=e.convert(o,x),_=e.find(a,[x,x]));for(var v=[],S=[],w=[],E=0;E{var{typed:e}=t;return function(i,o,a,s){var l=i._data,u=i._size,c=i._datatype,f,d=a;typeof c=="string"&&(f=c,o=e.convert(o,f),d=e.find(a,[f,f]));var p=u.length>0?n(d,0,u,u[0],l,o,s):[];return i.createDenseMatrix({data:p,size:Lr(u),datatype:f})};function n(r,i,o,a,s,l,u){var c=[];if(i===o.length-1)for(var f=0;f{var{typed:e,config:n,round:r}=t;return e(FR,{number:function(o){return El(o,r(o),n.epsilon)?r(o):Math.ceil(o)},"number, number":function(o,a){if(El(o,r(o,a),n.epsilon))return r(o,a);var[s,l]="".concat(o,"e").split("e"),u=Math.ceil(Number("".concat(s,"e").concat(Number(l)+a)));return[s,l]="".concat(u,"e").split("e"),Number("".concat(s,"e").concat(Number(l)-a))}})}),sye=Tt(FR,oye,t=>{var{typed:e,config:n,round:r,matrix:i,equalScalar:o,zeros:a,DenseMatrix:s}=t,l=Eb({typed:e,equalScalar:o}),u=oc({typed:e,DenseMatrix:s}),c=Qp({typed:e}),f=aye({typed:e,config:n,round:r});return e("ceil",{number:f.signatures.number,"number,number":f.signatures["number,number"],Complex:function(p){return p.ceil()},"Complex, number":function(p,y){return p.ceil(y)},"Complex, BigNumber":function(p,y){return p.ceil(y.toNumber())},BigNumber:function(p){return sf(p,r(p),n.epsilon)?r(p):p.ceil()},"BigNumber, BigNumber":function(p,y){return sf(p,r(p,y),n.epsilon)?r(p,y):p.toDecimalPlaces(y.toNumber(),zd.ROUND_CEIL)},Fraction:function(p){return p.ceil()},"Fraction, number":function(p,y){return p.ceil(y)},"Fraction, BigNumber":function(p,y){return p.ceil(y.toNumber())},"Array | Matrix":e.referToSelf(d=>p=>Wi(p,d)),"Array, number | BigNumber":e.referToSelf(d=>(p,y)=>Wi(p,x=>d(x,y))),"SparseMatrix, number | BigNumber":e.referToSelf(d=>(p,y)=>l(p,y,d,!1)),"DenseMatrix, number | BigNumber":e.referToSelf(d=>(p,y)=>c(p,y,d,!1)),"number | Complex | Fraction | BigNumber, Array":e.referToSelf(d=>(p,y)=>c(i(y),p,d,!0).valueOf()),"number | Complex | Fraction | BigNumber, Matrix":e.referToSelf(d=>(p,y)=>o(p,0)?a(y.size(),y.storage()):y.storage()==="dense"?c(y,p,d,!0):u(y,p,d,!0))})}),LR="fix",lye=["typed","Complex","matrix","ceil","floor","equalScalar","zeros","DenseMatrix"],uye=Tt(LR,["typed","ceil","floor"],t=>{var{typed:e,ceil:n,floor:r}=t;return e(LR,{number:function(o){return o>0?r(o):n(o)},"number, number":function(o,a){return o>0?r(o,a):n(o,a)}})}),cye=Tt(LR,lye,t=>{var{typed:e,Complex:n,matrix:r,ceil:i,floor:o,equalScalar:a,zeros:s,DenseMatrix:l}=t,u=oc({typed:e,DenseMatrix:l}),c=Qp({typed:e}),f=uye({typed:e,ceil:i,floor:o});return e("fix",{number:f.signatures.number,"number, number | BigNumber":f.signatures["number,number"],Complex:function(p){return new n(p.re>0?Math.floor(p.re):Math.ceil(p.re),p.im>0?Math.floor(p.im):Math.ceil(p.im))},"Complex, number":function(p,y){return new n(p.re>0?o(p.re,y):i(p.re,y),p.im>0?o(p.im,y):i(p.im,y))},"Complex, BigNumber":function(p,y){var x=y.toNumber();return new n(p.re>0?o(p.re,x):i(p.re,x),p.im>0?o(p.im,x):i(p.im,x))},BigNumber:function(p){return p.isNegative()?i(p):o(p)},"BigNumber, number | BigNumber":function(p,y){return p.isNegative()?i(p,y):o(p,y)},Fraction:function(p){return p.s<0?p.ceil():p.floor()},"Fraction, number | BigNumber":function(p,y){return p.s<0?i(p,y):o(p,y)},"Array | Matrix":e.referToSelf(d=>p=>Wi(p,d)),"Array | Matrix, number | BigNumber":e.referToSelf(d=>(p,y)=>Wi(p,x=>d(x,y))),"number | Complex | Fraction | BigNumber, Array":e.referToSelf(d=>(p,y)=>c(r(y),p,d,!0).valueOf()),"number | Complex | Fraction | BigNumber, Matrix":e.referToSelf(d=>(p,y)=>a(p,0)?s(y.size(),y.storage()):y.storage()==="dense"?c(y,p,d,!0):u(y,p,d,!0))})}),kR="floor",fye=["typed","config","round","matrix","equalScalar","zeros","DenseMatrix"],dye=Tt(kR,["typed","config","round"],t=>{var{typed:e,config:n,round:r}=t;return e(kR,{number:function(o){return El(o,r(o),n.epsilon)?r(o):Math.floor(o)},"number, number":function(o,a){if(El(o,r(o,a),n.epsilon))return r(o,a);var[s,l]="".concat(o,"e").split("e"),u=Math.floor(Number("".concat(s,"e").concat(Number(l)+a)));return[s,l]="".concat(u,"e").split("e"),Number("".concat(s,"e").concat(Number(l)-a))}})}),hye=Tt(kR,fye,t=>{var{typed:e,config:n,round:r,matrix:i,equalScalar:o,zeros:a,DenseMatrix:s}=t,l=Eb({typed:e,equalScalar:o}),u=oc({typed:e,DenseMatrix:s}),c=Qp({typed:e}),f=dye({typed:e,config:n,round:r});return e("floor",{number:f.signatures.number,"number,number":f.signatures["number,number"],Complex:function(p){return p.floor()},"Complex, number":function(p,y){return p.floor(y)},"Complex, BigNumber":function(p,y){return p.floor(y.toNumber())},BigNumber:function(p){return sf(p,r(p),n.epsilon)?r(p):p.floor()},"BigNumber, BigNumber":function(p,y){return sf(p,r(p,y),n.epsilon)?r(p,y):p.toDecimalPlaces(y.toNumber(),zd.ROUND_FLOOR)},Fraction:function(p){return p.floor()},"Fraction, number":function(p,y){return p.floor(y)},"Fraction, BigNumber":function(p,y){return p.floor(y.toNumber())},"Array | Matrix":e.referToSelf(d=>p=>Wi(p,d)),"Array, number | BigNumber":e.referToSelf(d=>(p,y)=>Wi(p,x=>d(x,y))),"SparseMatrix, number | BigNumber":e.referToSelf(d=>(p,y)=>l(p,y,d,!1)),"DenseMatrix, number | BigNumber":e.referToSelf(d=>(p,y)=>c(p,y,d,!1)),"number | Complex | Fraction | BigNumber, Array":e.referToSelf(d=>(p,y)=>c(i(y),p,d,!0).valueOf()),"number | Complex | Fraction | BigNumber, Matrix":e.referToSelf(d=>(p,y)=>o(p,0)?a(y.size(),y.storage()):y.storage()==="dense"?c(y,p,d,!0):u(y,p,d,!0))})}),pye="matAlgo03xDSf",mye=["typed"],xv=Tt(pye,mye,t=>{var{typed:e}=t;return function(r,i,o,a){var s=r._data,l=r._size,u=r._datatype,c=i._values,f=i._index,d=i._ptr,p=i._size,y=i._datatype;if(l.length!==p.length)throw new er(l.length,p.length);if(l[0]!==p[0]||l[1]!==p[1])throw new RangeError("Dimension mismatch. Matrix A ("+l+") must match Matrix B ("+p+")");if(!c)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var x=l[0],_=l[1],v,S=0,w=o;typeof u=="string"&&u===y&&(v=u,S=e.convert(0,v),w=e.find(o,[v,v]));for(var E=[],T=0;T{var{typed:e,equalScalar:n}=t;return function(i,o,a){var s=i._values,l=i._index,u=i._ptr,c=i._size,f=i._datatype,d=o._values,p=o._index,y=o._ptr,x=o._size,_=o._datatype;if(c.length!==x.length)throw new er(c.length,x.length);if(c[0]!==x[0]||c[1]!==x[1])throw new RangeError("Dimension mismatch. Matrix A ("+c+") must match Matrix B ("+x+")");var v=c[0],S=c[1],w,E=n,T=0,C=a;typeof f=="string"&&f===_&&(w=f,E=e.find(n,[w,w]),T=e.convert(0,w),C=e.find(a,[w,w]));var D=s&&d?[]:void 0,O=[],P=[],N=D?[]:void 0,k=D?[]:void 0,G=[],Z=[],j,K,Y,$;for(K=0;K{var{typed:e}=t;return function(i,o,a){var s=i._data,l=i._size,u=i._datatype,c=o._data,f=o._size,d=o._datatype,p=[];if(l.length!==f.length)throw new er(l.length,f.length);for(var y=0;y0?n(_,0,p,p[0],s,c):[];return i.createDenseMatrix({data:v,size:p,datatype:x})};function n(r,i,o,a,s,l){var u=[];if(i===o.length-1)for(var c=0;c{var{concat:e}=t;return function(i,o){var a=Math.max(i._size.length,o._size.length);if(i._size.length===o._size.length&&i._size.every((y,x)=>y===o._size[x]))return[i,o];for(var s=n(i._size,a,0),l=n(o._size,a,0),u=[],c=0;c{var{typed:e,matrix:n,concat:r}=t,i=_ye({typed:e}),o=Qp({typed:e}),a=Eye({concat:r});return function(l){var u=l.elop,c=l.SD||l.DS,f;u?(f={"DenseMatrix, DenseMatrix":(x,_)=>i(...a(x,_),u),"Array, Array":(x,_)=>i(...a(n(x),n(_)),u).valueOf(),"Array, DenseMatrix":(x,_)=>i(...a(n(x),_),u),"DenseMatrix, Array":(x,_)=>i(...a(x,n(_)),u)},l.SS&&(f["SparseMatrix, SparseMatrix"]=(x,_)=>l.SS(...a(x,_),u,!1)),l.DS&&(f["DenseMatrix, SparseMatrix"]=(x,_)=>l.DS(...a(x,_),u,!1),f["Array, SparseMatrix"]=(x,_)=>l.DS(...a(n(x),_),u,!1)),c&&(f["SparseMatrix, DenseMatrix"]=(x,_)=>c(...a(_,x),u,!0),f["SparseMatrix, Array"]=(x,_)=>c(...a(n(_),x),u,!0))):(f={"DenseMatrix, DenseMatrix":e.referToSelf(x=>(_,v)=>i(...a(_,v),x)),"Array, Array":e.referToSelf(x=>(_,v)=>i(...a(n(_),n(v)),x).valueOf()),"Array, DenseMatrix":e.referToSelf(x=>(_,v)=>i(...a(n(_),v),x)),"DenseMatrix, Array":e.referToSelf(x=>(_,v)=>i(...a(_,n(v)),x))},l.SS&&(f["SparseMatrix, SparseMatrix"]=e.referToSelf(x=>(_,v)=>l.SS(...a(_,v),x,!1))),l.DS&&(f["DenseMatrix, SparseMatrix"]=e.referToSelf(x=>(_,v)=>l.DS(...a(_,v),x,!1)),f["Array, SparseMatrix"]=e.referToSelf(x=>(_,v)=>l.DS(...a(n(_),v),x,!1))),c&&(f["SparseMatrix, DenseMatrix"]=e.referToSelf(x=>(_,v)=>c(...a(v,_),x,!0)),f["SparseMatrix, Array"]=e.referToSelf(x=>(_,v)=>c(...a(n(v),_),x,!0))));var d=l.scalar||"any",p=l.Ds||l.Ss;p&&(u?(f["DenseMatrix,"+d]=(x,_)=>o(x,_,u,!1),f[d+", DenseMatrix"]=(x,_)=>o(_,x,u,!0),f["Array,"+d]=(x,_)=>o(n(x),_,u,!1).valueOf(),f[d+", Array"]=(x,_)=>o(n(_),x,u,!0).valueOf()):(f["DenseMatrix,"+d]=e.referToSelf(x=>(_,v)=>o(_,v,x,!1)),f[d+", DenseMatrix"]=e.referToSelf(x=>(_,v)=>o(v,_,x,!0)),f["Array,"+d]=e.referToSelf(x=>(_,v)=>o(n(_),v,x,!1).valueOf()),f[d+", Array"]=e.referToSelf(x=>(_,v)=>o(n(v),_,x,!0).valueOf())));var y=l.sS!==void 0?l.sS:l.Ss;return u?(l.Ss&&(f["SparseMatrix,"+d]=(x,_)=>l.Ss(x,_,u,!1)),y&&(f[d+", SparseMatrix"]=(x,_)=>y(_,x,u,!0))):(l.Ss&&(f["SparseMatrix,"+d]=e.referToSelf(x=>(_,v)=>l.Ss(_,v,x,!1))),y&&(f[d+", SparseMatrix"]=e.referToSelf(x=>(_,v)=>y(v,_,x,!0)))),u&&u.signatures&&tV(f,u.signatures),f}}),Aye="matAlgo01xDSid",Tye=["typed"],zV=Tt(Aye,Tye,t=>{var{typed:e}=t;return function(r,i,o,a){var s=r._data,l=r._size,u=r._datatype,c=i._values,f=i._index,d=i._ptr,p=i._size,y=i._datatype;if(l.length!==p.length)throw new er(l.length,p.length);if(l[0]!==p[0]||l[1]!==p[1])throw new RangeError("Dimension mismatch. Matrix A ("+l+") must match Matrix B ("+p+")");if(!c)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var x=l[0],_=l[1],v=typeof u=="string"&&u===y?u:void 0,S=v?e.find(o,[v,v]):o,w,E,T=[];for(w=0;w{var{typed:e,equalScalar:n}=t;return function(i,o,a){var s=i._values,l=i._index,u=i._ptr,c=i._size,f=i._datatype,d=o._values,p=o._index,y=o._ptr,x=o._size,_=o._datatype;if(c.length!==x.length)throw new er(c.length,x.length);if(c[0]!==x[0]||c[1]!==x[1])throw new RangeError("Dimension mismatch. Matrix A ("+c+") must match Matrix B ("+x+")");var v=c[0],S=c[1],w,E=n,T=0,C=a;typeof f=="string"&&f===_&&(w=f,E=e.find(n,[w,w]),T=e.convert(0,w),C=e.find(a,[w,w]));var D=s&&d?[]:void 0,O=[],P=[],N=s&&d?[]:void 0,k=s&&d?[]:void 0,G=[],Z=[],j,K,Y,$,W;for(K=0;K{var{typed:e,DenseMatrix:n}=t;return function(i,o,a,s){var l=i._values,u=i._index,c=i._ptr,f=i._size,d=i._datatype;if(!l)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var p=f[0],y=f[1],x,_=a;typeof d=="string"&&(x=d,o=e.convert(o,x),_=e.find(a,[x,x]));for(var v=[],S=[],w=[],E=0;E{var{typed:e}=t;return e("multiplyScalar",{"number, number":LV,"Complex, Complex":function(r,i){return r.mul(i)},"BigNumber, BigNumber":function(r,i){return r.times(i)},"Fraction, Fraction":function(r,i){return r.mul(i)},"number | Fraction | BigNumber | Complex, Unit":(n,r)=>r.multiply(n),"Unit, number | Fraction | BigNumber | Complex | Unit":(n,r)=>n.multiply(r)})}),ik="multiply",kye=["typed","matrix","addScalar","multiplyScalar","equalScalar","dot"],Bye=Tt(ik,kye,t=>{var{typed:e,matrix:n,addScalar:r,multiplyScalar:i,equalScalar:o,dot:a}=t,s=Eb({typed:e,equalScalar:o}),l=Qp({typed:e});function u(T,C){switch(T.length){case 1:switch(C.length){case 1:if(T[0]!==C[0])throw new RangeError("Dimension mismatch in multiplication. Vectors must have the same length");break;case 2:if(T[0]!==C[0])throw new RangeError("Dimension mismatch in multiplication. Vector length ("+T[0]+") must match Matrix rows ("+C[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+C.length+" dimensions)")}break;case 2:switch(C.length){case 1:if(T[1]!==C[0])throw new RangeError("Dimension mismatch in multiplication. Matrix columns ("+T[1]+") must match Vector length ("+C[0]+")");break;case 2:if(T[1]!==C[0])throw new RangeError("Dimension mismatch in multiplication. Matrix A columns ("+T[1]+") must match Matrix B rows ("+C[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+C.length+" dimensions)")}break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix A has "+T.length+" dimensions)")}}function c(T,C,D){if(D===0)throw new Error("Cannot multiply two empty vectors");return a(T,C)}function f(T,C){if(C.storage()!=="dense")throw new Error("Support for SparseMatrix not implemented");return d(T,C)}function d(T,C){var D=T._data,O=T._size,P=T._datatype,N=C._data,k=C._size,G=C._datatype,Z=O[0],j=k[1],K,Y=r,$=i;P&&G&&P===G&&typeof P=="string"&&(K=P,Y=e.find(r,[K,K]),$=e.find(i,[K,K]));for(var W=[],U=0;UHe)for(var Qe=0,ct=0;ct(C,D)=>{u(wa(C),wa(D));var O=T(n(C),n(D));return di(O)?O.valueOf():O}),"Matrix, Matrix":function(C,D){var O=C.size(),P=D.size();return u(O,P),O.length===1?P.length===1?c(C,D,O[0]):f(C,D):P.length===1?p(C,D):y(C,D)},"Matrix, Array":e.referTo("Matrix,Matrix",T=>(C,D)=>T(C,n(D))),"Array, Matrix":e.referToSelf(T=>(C,D)=>T(n(C,D.storage()),D)),"SparseMatrix, any":function(C,D){return s(C,D,i,!1)},"DenseMatrix, any":function(C,D){return l(C,D,i,!1)},"any, SparseMatrix":function(C,D){return s(D,C,i,!0)},"any, DenseMatrix":function(C,D){return l(D,C,i,!0)},"Array, any":function(C,D){return l(n(C),D,i,!1).valueOf()},"any, Array":function(C,D){return l(n(D),C,i,!0).valueOf()},"any, any":i,"any, any, ...any":e.referToSelf(T=>(C,D,O)=>{for(var P=T(C,D),N=0;N{var{typed:e,matrix:n,equalScalar:r,subtractScalar:i,unaryMinus:o,DenseMatrix:a,concat:s}=t,l=zV({typed:e}),u=xv({typed:e}),c=yye({typed:e,equalScalar:r}),f=$V({typed:e,DenseMatrix:a}),d=oc({typed:e,DenseMatrix:a}),p=em({typed:e,matrix:n,concat:s});return e(ok,{"any, any":i},p({elop:i,SS:c,DS:l,SD:u,Ss:d,sS:f}))}),$ye="matAlgo07xSSf",Hye=["typed","DenseMatrix"],Mb=Tt($ye,Hye,t=>{var{typed:e,DenseMatrix:n}=t;return function(o,a,s){var l=o._size,u=o._datatype,c=a._size,f=a._datatype;if(l.length!==c.length)throw new er(l.length,c.length);if(l[0]!==c[0]||l[1]!==c[1])throw new RangeError("Dimension mismatch. Matrix A ("+l+") must match Matrix B ("+c+")");var d=l[0],p=l[1],y,x=0,_=s;typeof u=="string"&&u===f&&(y=u,x=e.convert(0,y),_=e.find(s,[y,y]));var v,S,w=[];for(v=0;v{var{typed:e}=t;return e(ak,{"number | BigNumber | Fraction":n=>n,Complex:n=>n.conjugate(),"Array | Matrix":e.referToSelf(n=>r=>Wi(r,n))})}),sk="concat",Gye=["typed","matrix","isInteger"],jye=Tt(sk,Gye,t=>{var{typed:e,matrix:n,isInteger:r}=t;return e(sk,{"...Array | Matrix | number | BigNumber":function(o){var a,s=o.length,l=-1,u,c=!1,f=[];for(a=0;a0&&l>u)throw new eh(l,u+1)}else{var p=Lr(d).valueOf(),y=wa(p);if(f[a]=p,u=l,l=y.length-1,a>0&&l!==u)throw new er(u+1,l+1)}}if(f.length===0)throw new SyntaxError("At least one matrix expected");for(var x=f.shift();f.length;)x=dV(x,f.shift(),l);return c?n(x):x},"...string":function(o){return o.join("")}})}),lk="identity",qye=["typed","config","matrix","BigNumber","DenseMatrix","SparseMatrix"],Xye=Tt(lk,qye,t=>{var{typed:e,config:n,matrix:r,BigNumber:i,DenseMatrix:o,SparseMatrix:a}=t;return e(lk,{"":function(){return n.matrix==="Matrix"?r([]):[]},string:function(c){return r(c)},"number | BigNumber":function(c){return l(c,c,n.matrix==="Matrix"?"dense":void 0)},"number | BigNumber, string":function(c,f){return l(c,c,f)},"number | BigNumber, number | BigNumber":function(c,f){return l(c,f,n.matrix==="Matrix"?"dense":void 0)},"number | BigNumber, number | BigNumber, string":function(c,f,d){return l(c,f,d)},Array:function(c){return s(c)},"Array, string":function(c,f){return s(c,f)},Matrix:function(c){return s(c.valueOf(),c.storage())},"Matrix, string":function(c,f){return s(c.valueOf(),f)}});function s(u,c){switch(u.length){case 0:return c?r(c):[];case 1:return l(u[0],u[0],c);case 2:return l(u[0],u[1],c);default:throw new Error("Vector containing two values expected")}}function l(u,c,f){var d=co(u)||co(c)?i:null;if(co(u)&&(u=u.toNumber()),co(c)&&(c=c.toNumber()),!Pr(u)||u<1)throw new Error("Parameters in function identity must be positive integers");if(!Pr(c)||c<1)throw new Error("Parameters in function identity must be positive integers");var p=d?new i(1):1,y=d?new d(0):0,x=[u,c];if(f){if(f==="sparse")return a.diagonal(x,p,0,y);if(f==="dense")return o.diagonal(x,p,0,y);throw new TypeError('Unknown matrix type "'.concat(f,'"'))}for(var _=n2([],x,y),v=u{var{typed:e,config:n,matrix:r}=t;return e(uk,{Matrix:function(o){return o.create(o.size())},Array:wa,string:function(o){return n.matrix==="Array"?[o.length]:r([o.length])},"number | Complex | BigNumber | Unit | boolean | null":function(o){return n.matrix==="Array"?[]:r?r([]):Zye()}})}),ck="zeros",e1e=["typed","config","matrix","BigNumber"],t1e=Tt(ck,e1e,t=>{var{typed:e,config:n,matrix:r,BigNumber:i}=t;return e(ck,{"":function(){return n.matrix==="Array"?o([]):o([],"default")},"...number | BigNumber | string":function(u){var c=u[u.length-1];if(typeof c=="string"){var f=u.pop();return o(u,f)}else return n.matrix==="Array"?o(u):o(u,"default")},Array:o,Matrix:function(u){var c=u.storage();return o(u.valueOf(),c)},"Array | Matrix, string":function(u,c){return o(u.valueOf(),c)}});function o(l,u){var c=a(l),f=c?new i(0):0;if(s(l),u){var d=r(u);return l.length>0?d.resize(l,f):d}else{var p=[];return l.length>0?n2(p,l,f):p}}function a(l){var u=!1;return l.forEach(function(c,f,d){co(c)&&(u=!0,d[f]=c.toNumber())}),u}function s(l){l.forEach(function(u){if(typeof u!="number"||!Pr(u)||u<0)throw new Error("Parameters in function zeros must be positive integers")})}});function Px(t){"@babel/helpers - typeof";return Px=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},Px(t)}function n1e(t,e){if(Px(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Px(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function r1e(t){var e=n1e(t,"string");return Px(e)=="symbol"?e:String(e)}function i1e(t,e,n){return e=r1e(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function c2(t,e,n){var r;return String(t).indexOf("Unexpected type")!==-1?(r=arguments.length>2?" (type: "+ml(n)+", value: "+JSON.stringify(n)+")":" (type: "+t.data.actual+")",new TypeError("Cannot calculate "+e+", unexpected type of argument"+r)):String(t).indexOf("complex numbers")!==-1?(r=arguments.length>2?" (type: "+ml(n)+", value: "+JSON.stringify(n)+")":"",new TypeError("Cannot calculate "+e+", no ordering relation is defined for complex numbers"+r)):t}var fk="format",o1e=["typed"],a1e=Tt(fk,o1e,t=>{var{typed:e}=t;return e(fk,{any:ui,"any, Object | function | number":ui})}),s1e="numeric",l1e=["number","?bignumber","?fraction"],u1e=Tt(s1e,l1e,t=>{var{number:e,bignumber:n,fraction:r}=t,i={string:!0,number:!0,BigNumber:!0,Fraction:!0},o={number:a=>e(a),BigNumber:n?a=>n(a):Yye,Fraction:r?a=>r(a):Kye};return function(s){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"number",u=arguments.length>2?arguments[2]:void 0;if(u!==void 0)throw new SyntaxError("numeric() takes one or two arguments");var c=ml(s);if(!(c in i))throw new TypeError("Cannot convert "+s+' of type "'+c+'"; valid input types are '+Object.keys(i).join(", "));if(!(l in o))throw new TypeError("Cannot convert "+s+' to type "'+l+'"; valid output types are '+Object.keys(o).join(", "));return l===c?s:o[l](s)}}),dk="divideScalar",c1e=["typed","numeric"],f1e=Tt(dk,c1e,t=>{var{typed:e,numeric:n}=t;return e(dk,{"number, number":function(i,o){return i/o},"Complex, Complex":function(i,o){return i.div(o)},"BigNumber, BigNumber":function(i,o){return i.div(o)},"Fraction, Fraction":function(i,o){return i.div(o)},"Unit, number | Complex | Fraction | BigNumber | Unit":(r,i)=>r.divide(i),"number | Fraction | Complex | BigNumber, Unit":(r,i)=>i.divideInto(r)})}),hk="pow",d1e=["typed","config","identity","multiply","matrix","inv","fraction","number","Complex"],h1e=Tt(hk,d1e,t=>{var{typed:e,config:n,identity:r,multiply:i,matrix:o,inv:a,number:s,fraction:l,Complex:u}=t;return e(hk,{"number, number":c,"Complex, Complex":function(y,x){return y.pow(x)},"BigNumber, BigNumber":function(y,x){return x.isInteger()||y>=0||n.predictable?y.pow(x):new u(y.toNumber(),0).pow(x.toNumber(),0)},"Fraction, Fraction":function(y,x){var _=y.pow(x);if(_!=null)return _;if(n.predictable)throw new Error("Result of pow is non-rational and cannot be expressed as a fraction");return c(y.valueOf(),x.valueOf())},"Array, number":f,"Array, BigNumber":function(y,x){return f(y,x.toNumber())},"Matrix, number":d,"Matrix, BigNumber":function(y,x){return d(y,x.toNumber())},"Unit, number | BigNumber":function(y,x){return y.pow(x)}});function c(p,y){if(n.predictable&&!Pr(y)&&p<0)try{var x=l(y),_=s(x);if((y===_||Math.abs((y-_)/y)<1e-14)&&x.d%2===1)return(x.n%2===0?1:-1)*Math.pow(-p,y)}catch{}return n.predictable&&(p<-1&&y===1/0||p>-1&&p<0&&y===-1/0)?NaN:Pr(y)||p>=0||n.predictable?BV(p,y):p*p<1&&y===1/0||p*p>1&&y===-1/0?0:new u(p,0).pow(y,0)}function f(p,y){if(!Pr(y))throw new TypeError("For A^b, b must be an integer (value is "+y+")");var x=wa(p);if(x.length!==2)throw new Error("For A^b, A must be 2 dimensional (A has "+x.length+" dimensions)");if(x[0]!==x[1])throw new Error("For A^b, A must be square (size is "+x[0]+"x"+x[1]+")");if(y<0)try{return f(a(p),-y)}catch(S){throw S.message==="Cannot calculate inverse, determinant is zero"?new TypeError("For A^b, when A is not invertible, b must be a positive integer (value is "+y+")"):S}for(var _=r(x[0]).valueOf(),v=p;y>=1;)(y&1)===1&&(_=i(v,_)),y>>=1,v=i(v,v);return _}function d(p,y){return o(f(p.valueOf(),y))}}),a0="Number of decimals in function round must be an integer",pk="round",p1e=["typed","matrix","equalScalar","zeros","BigNumber","DenseMatrix"],m1e=Tt(pk,p1e,t=>{var{typed:e,matrix:n,equalScalar:r,zeros:i,BigNumber:o,DenseMatrix:a}=t,s=Eb({typed:e,equalScalar:r}),l=oc({typed:e,DenseMatrix:a}),u=Qp({typed:e});return e(pk,{number:K8,"number, number":K8,"number, BigNumber":function(f,d){if(!d.isInteger())throw new TypeError(a0);return new o(f).toDecimalPlaces(d.toNumber())},Complex:function(f){return f.round()},"Complex, number":function(f,d){if(d%1)throw new TypeError(a0);return f.round(d)},"Complex, BigNumber":function(f,d){if(!d.isInteger())throw new TypeError(a0);var p=d.toNumber();return f.round(p)},BigNumber:function(f){return f.toDecimalPlaces(0)},"BigNumber, BigNumber":function(f,d){if(!d.isInteger())throw new TypeError(a0);return f.toDecimalPlaces(d.toNumber())},Fraction:function(f){return f.round()},"Fraction, number":function(f,d){if(d%1)throw new TypeError(a0);return f.round(d)},"Fraction, BigNumber":function(f,d){if(!d.isInteger())throw new TypeError(a0);return f.round(d.toNumber())},"Unit, number, Unit":e.referToSelf(c=>function(f,d,p){var y=f.toNumeric(p);return p.multiply(c(y,d))}),"Unit, BigNumber, Unit":e.referToSelf(c=>(f,d,p)=>c(f,d.toNumber(),p)),"Unit, Unit":e.referToSelf(c=>(f,d)=>c(f,0,d)),"Array | Matrix, number, Unit":e.referToSelf(c=>(f,d,p)=>Wi(f,y=>c(y,d,p))),"Array | Matrix, BigNumber, Unit":e.referToSelf(c=>(f,d,p)=>c(f,d.toNumber(),p)),"Array | Matrix, Unit":e.referToSelf(c=>(f,d)=>c(f,0,d)),"Array | Matrix":e.referToSelf(c=>f=>Wi(f,c)),"SparseMatrix, number | BigNumber":e.referToSelf(c=>(f,d)=>s(f,d,c,!1)),"DenseMatrix, number | BigNumber":e.referToSelf(c=>(f,d)=>u(f,d,c,!1)),"Array, number | BigNumber":e.referToSelf(c=>(f,d)=>u(n(f),d,c,!1).valueOf()),"number | Complex | BigNumber | Fraction, SparseMatrix":e.referToSelf(c=>(f,d)=>r(f,0)?i(d.size(),d.storage()):l(d,f,c,!0)),"number | Complex | BigNumber | Fraction, DenseMatrix":e.referToSelf(c=>(f,d)=>r(f,0)?i(d.size(),d.storage()):u(d,f,c,!0)),"number | Complex | BigNumber | Fraction, Array":e.referToSelf(c=>(f,d)=>u(n(d),f,c,!0).valueOf())})}),f2="equal",g1e=["typed","matrix","equalScalar","DenseMatrix","concat"],v1e=Tt(f2,g1e,t=>{var{typed:e,matrix:n,equalScalar:r,DenseMatrix:i,concat:o}=t,a=xv({typed:e}),s=Mb({typed:e,DenseMatrix:i}),l=oc({typed:e,DenseMatrix:i}),u=em({typed:e,matrix:n,concat:o});return e(f2,y1e({typed:e,equalScalar:r}),u({elop:r,SS:s,DS:a,Ss:l}))}),y1e=Tt(f2,["typed","equalScalar"],t=>{var{typed:e,equalScalar:n}=t;return e(f2,{"any, any":function(i,o){return i===null?o===null:o===null?i===null:i===void 0?o===void 0:o===void 0?i===void 0:n(i,o)}})}),d2="smaller",x1e=["typed","config","matrix","DenseMatrix","concat"],b1e=Tt(d2,x1e,t=>{var{typed:e,config:n,matrix:r,DenseMatrix:i,concat:o}=t,a=xv({typed:e}),s=Mb({typed:e,DenseMatrix:i}),l=oc({typed:e,DenseMatrix:i}),u=em({typed:e,matrix:r,concat:o}),c=Sb({typed:e});return e(d2,_1e({typed:e,config:n}),{"boolean, boolean":(f,d)=>ff.compare(d)===-1,"Complex, Complex":function(d,p){throw new TypeError("No ordering relation is defined for complex numbers")}},c,u({SS:s,DS:a,Ss:l}))}),_1e=Tt(d2,["typed","config"],t=>{var{typed:e,config:n}=t;return e(d2,{"number, number":function(i,o){return i{var{typed:e,config:n,matrix:r,DenseMatrix:i,concat:o}=t,a=xv({typed:e}),s=Mb({typed:e,DenseMatrix:i}),l=oc({typed:e,DenseMatrix:i}),u=em({typed:e,matrix:r,concat:o}),c=Sb({typed:e});return e(h2,E1e({typed:e,config:n}),{"boolean, boolean":(f,d)=>f<=d,"BigNumber, BigNumber":function(d,p){return d.lte(p)||sf(d,p,n.epsilon)},"Fraction, Fraction":(f,d)=>f.compare(d)!==1,"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},c,u({SS:s,DS:a,Ss:l}))}),E1e=Tt(h2,["typed","config"],t=>{var{typed:e,config:n}=t;return e(h2,{"number, number":function(i,o){return i<=o||El(i,o,n.epsilon)}})}),p2="larger",M1e=["typed","config","matrix","DenseMatrix","concat"],C1e=Tt(p2,M1e,t=>{var{typed:e,config:n,matrix:r,DenseMatrix:i,concat:o}=t,a=xv({typed:e}),s=Mb({typed:e,DenseMatrix:i}),l=oc({typed:e,DenseMatrix:i}),u=em({typed:e,matrix:r,concat:o}),c=Sb({typed:e});return e(p2,A1e({typed:e,config:n}),{"boolean, boolean":(f,d)=>f>d,"BigNumber, BigNumber":function(d,p){return d.gt(p)&&!sf(d,p,n.epsilon)},"Fraction, Fraction":(f,d)=>f.compare(d)===1,"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},c,u({SS:s,DS:a,Ss:l}))}),A1e=Tt(p2,["typed","config"],t=>{var{typed:e,config:n}=t;return e(p2,{"number, number":function(i,o){return i>o&&!El(i,o,n.epsilon)}})}),m2="largerEq",T1e=["typed","config","matrix","DenseMatrix","concat"],D1e=Tt(m2,T1e,t=>{var{typed:e,config:n,matrix:r,DenseMatrix:i,concat:o}=t,a=xv({typed:e}),s=Mb({typed:e,DenseMatrix:i}),l=oc({typed:e,DenseMatrix:i}),u=em({typed:e,matrix:r,concat:o}),c=Sb({typed:e});return e(m2,R1e({typed:e,config:n}),{"boolean, boolean":(f,d)=>f>=d,"BigNumber, BigNumber":function(d,p){return d.gte(p)||sf(d,p,n.epsilon)},"Fraction, Fraction":(f,d)=>f.compare(d)!==-1,"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},c,u({SS:s,DS:a,Ss:l}))}),R1e=Tt(m2,["typed","config"],t=>{var{typed:e,config:n}=t;return e(m2,{"number, number":function(i,o){return i>=o||El(i,o,n.epsilon)}})}),mk="max",P1e=["typed","config","numeric","larger"],N1e=Tt(mk,P1e,t=>{var{typed:e,config:n,numeric:r,larger:i}=t;return e(mk,{"Array | Matrix":a,"Array | Matrix, number | BigNumber":function(l,u){return PV(l,u.valueOf(),o)},"...":function(l){if(RV(l))throw new TypeError("Scalar values expected in function max");return a(l)}});function o(s,l){try{return i(s,l)?s:l}catch(u){throw c2(u,"max",l)}}function a(s){var l;if(KO(s,function(u){try{isNaN(u)&&typeof u=="number"?l=NaN:(l===void 0||i(u,l))&&(l=u)}catch(c){throw c2(c,"max",u)}}),l===void 0)throw new Error("Cannot calculate max of an empty array");return typeof l=="string"&&(l=r(l,n.number)),l}}),gk="min",O1e=["typed","config","numeric","smaller"],I1e=Tt(gk,O1e,t=>{var{typed:e,config:n,numeric:r,smaller:i}=t;return e(gk,{"Array | Matrix":a,"Array | Matrix, number | BigNumber":function(l,u){return PV(l,u.valueOf(),o)},"...":function(l){if(RV(l))throw new TypeError("Scalar values expected in function min");return a(l)}});function o(s,l){try{return i(s,l)?s:l}catch(u){throw c2(u,"min",l)}}function a(s){var l;if(KO(s,function(u){try{isNaN(u)&&typeof u=="number"?l=NaN:(l===void 0||i(u,l))&&(l=u)}catch(c){throw c2(c,"min",u)}}),l===void 0)throw new Error("Cannot calculate min of an empty array");return typeof l=="string"&&(l=r(l,n.number)),l}});wb(function(t){return new t(1).exp()},{hasher:pC});wb(function(t){return new t(1).plus(new t(5).sqrt()).div(2)},{hasher:pC});var HV=wb(function(t){return t.acos(-1)},{hasher:pC});wb(function(t){return HV(t).times(2)},{hasher:pC});function pC(t){return t[0].precision}function vk(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function YT(t){for(var e=1;e{var{on:e,config:n,addScalar:r,subtractScalar:i,multiplyScalar:o,divideScalar:a,pow:s,abs:l,fix:u,round:c,equal:f,isNumeric:d,format:p,number:y,Complex:x,BigNumber:_,Fraction:v}=t,S=y;function w(X,ne){if(!(this instanceof w))throw new Error("Constructor must be called with the new operator");if(!(X==null||d(X)||H1(X)))throw new TypeError("First parameter in Unit constructor must be number, BigNumber, Fraction, Complex, or undefined");if(this.fixPrefix=!1,this.skipAutomaticSimplification=!0,ne===void 0)this.units=[],this.dimensions=W.map(we=>0);else if(typeof ne=="string"){var me=w.parse(ne);this.units=me.units,this.dimensions=me.dimensions}else if(ud(ne)&&ne.value===null)this.fixPrefix=ne.fixPrefix,this.skipAutomaticSimplification=ne.skipAutomaticSimplification,this.dimensions=ne.dimensions.slice(0),this.units=ne.units.map(we=>Q({},we));else throw new TypeError("Second parameter in Unit constructor must be a string or valueless Unit");this.value=this._normalize(X)}Object.defineProperty(w,"name",{value:"Unit"}),w.prototype.constructor=w,w.prototype.type="Unit",w.prototype.isUnit=!0;var E,T,C;function D(){for(;C===" "||C===" ";)N()}function O(X){return X>="0"&&X<="9"||X==="."}function P(X){return X>="0"&&X<="9"}function N(){T++,C=E.charAt(T)}function k(X){T=X,C=E.charAt(T)}function G(){var X="",ne=T;if(C==="+"?N():C==="-"&&(X+=C,N()),!O(C))return k(ne),null;if(C==="."){if(X+=C,N(),!P(C))return k(ne),null}else{for(;P(C);)X+=C,N();C==="."&&(X+=C,N())}for(;P(C);)X+=C,N();if(C==="E"||C==="e"){var me="",we=T;if(me+=C,N(),(C==="+"||C==="-")&&(me+=C,N()),!P(C))return k(we),X;for(X=X+me;P(C);)X+=C,N()}return X}function Z(){for(var X="";P(C)||w.isValidAlpha(C);)X+=C,N();var ne=X.charAt(0);return w.isValidAlpha(ne)?X:null}function j(X){return C===X?(N(),X):null}w.parse=function(X,ne){if(ne=ne||{},E=X,T=-1,C="",typeof E!="string")throw new TypeError("Invalid argument in Unit.parse, string expected");var me=new w;me.units=[];var we=1,Ne=!1;N(),D();var Ue=G(),We=null;if(Ue){if(n.number==="BigNumber")We=new _(Ue);else if(n.number==="Fraction")try{We=new v(Ue)}catch{We=parseFloat(Ue)}else We=parseFloat(Ue);D(),j("*")?(we=1,Ne=!0):j("/")&&(we=-1,Ne=!0)}for(var lt=[],z=1;;){for(D();C==="(";)lt.push(we),z*=we,we=1,N(),D();var B=void 0;if(C){var oe=C;if(B=Z(),B===null)throw new SyntaxError('Unexpected "'+oe+'" in "'+E+'" at index '+T.toString())}else break;var ge=K(B);if(ge===null)throw new SyntaxError('Unit "'+B+'" not found.');var pe=we*z;if(D(),j("^")){D();var de=G();if(de===null)throw new SyntaxError('In "'+X+'", "^" must be followed by a floating-point number');pe*=de}me.units.push({unit:ge.unit,prefix:ge.prefix,power:pe});for(var ve=0;ve1||Math.abs(this.units[0].power-1)>1e-15},w.prototype._normalize=function(X){if(X==null||this.units.length===0)return X;for(var ne=X,me=w._getNumberConverter(ml(X)),we=0;we{if(dr(ce,X)){var ne=ce[X],me=ne.prefixes[""];return{unit:ne,prefix:me}}for(var we in ce)if(dr(ce,we)&&U0e(X,we)){var Ne=ce[we],Ue=X.length-we.length,We=X.substring(0,Ue),lt=dr(Ne.prefixes,We)?Ne.prefixes[We]:void 0;if(lt!==void 0)return{unit:Ne,prefix:lt}}return null},{hasher:X=>X[0],limit:100});w.isValuelessUnit=function(X){return K(X)!==null},w.prototype.hasBase=function(X){if(typeof X=="string"&&(X=U[X]),!X)return!1;for(var ne=0;ne1e-12)return!1;return!0},w.prototype.equalBase=function(X){for(var ne=0;ne1e-12)return!1;return!0},w.prototype.equals=function(X){return this.equalBase(X)&&f(this.value,X.value)},w.prototype.multiply=function(X){for(var ne=this.clone(),me=ud(X)?X:new w(X),we=0;we1e-12&&(dr(He,lt)?ne.push({unit:He[lt].unit,prefix:He[lt].prefix,power:X.dimensions[We]||0}):Ue=!0)}ne.length1e-12)if(dr(Ie.si,we))ne.push({unit:Ie.si[we].unit,prefix:Ie.si[we].prefix,power:X.dimensions[me]||0});else throw new Error("Cannot express custom unit "+we+" in SI units")}return X.units=ne,X.fixPrefix=!0,X.skipAutomaticSimplification=!0,X},w.prototype.formatUnits=function(){for(var X="",ne="",me=0,we=0,Ne=0;Ne0?(me++,X+=" "+this.units[Ne].prefix.name+this.units[Ne].unit.name,Math.abs(this.units[Ne].power-1)>1e-15&&(X+="^"+this.units[Ne].power)):this.units[Ne].power<0&&we++;if(we>0)for(var Ue=0;Ue0?(ne+=" "+this.units[Ue].prefix.name+this.units[Ue].unit.name,Math.abs(this.units[Ue].power+1)>1e-15&&(ne+="^"+-this.units[Ue].power)):(ne+=" "+this.units[Ue].prefix.name+this.units[Ue].unit.name,ne+="^"+this.units[Ue].power));X=X.substr(1),ne=ne.substr(1),me>1&&we>0&&(X="("+X+")"),we>1&&me>0&&(ne="("+ne+")");var We=X;return me>0&&we>0&&(We+=" / "),We+=ne,We},w.prototype.format=function(X){var ne=this.skipAutomaticSimplification||this.value===null?this.clone():this.simplify(),me=!1;typeof ne.value<"u"&&ne.value!==null&&H1(ne.value)&&(me=Math.abs(ne.value.re)<1e-14);for(var we in ne.units)dr(ne.units,we)&&ne.units[we].unit&&(ne.units[we].unit.name==="VA"&&me?ne.units[we].unit=ce.VAR:ne.units[we].unit.name==="VAR"&&!me&&(ne.units[we].unit=ce.VA));ne.units.length===1&&!ne.fixPrefix&&Math.abs(ne.units[0].power-Math.round(ne.units[0].power))<1e-14&&(ne.units[0].prefix=ne._bestPrefix());var Ne=ne._denormalize(ne.value),Ue=ne.value!==null?p(Ne,X||{}):"",We=ne.formatUnits();return ne.value&&H1(ne.value)&&(Ue="("+Ue+")"),We.length>0&&Ue.length>0&&(Ue+=" "),Ue+=We,Ue},w.prototype._bestPrefix=function(){if(this.units.length!==1)throw new Error("Can only compute the best prefix for single units with integer powers, like kg, s^2, N^-1, and so forth!");if(Math.abs(this.units[0].power-Math.round(this.units[0].power))>=1e-14)throw new Error("Can only compute the best prefix for single units with integer powers, like kg, s^2, N^-1, and so forth!");var X=this.value!==null?l(this.value):0,ne=l(this.units[0].unit.value),me=this.units[0].prefix;if(X===0)return me;var we=this.units[0].power,Ne=Math.log(X/Math.pow(me.value*ne,we))/Math.LN10-1.2;if(Ne>-2.200001&&Ne<1.800001)return me;Ne=Math.abs(Ne);var Ue=this.units[0].unit.prefixes;for(var We in Ue)if(dr(Ue,We)){var lt=Ue[We];if(lt.scientific){var z=Math.abs(Math.log(X/Math.pow(lt.value*ne,we))/Math.LN10-1.2);(z0)},ce={meter:{name:"meter",base:U.LENGTH,prefixes:$.LONG,value:1,offset:0},inch:{name:"inch",base:U.LENGTH,prefixes:$.NONE,value:.0254,offset:0},foot:{name:"foot",base:U.LENGTH,prefixes:$.NONE,value:.3048,offset:0},yard:{name:"yard",base:U.LENGTH,prefixes:$.NONE,value:.9144,offset:0},mile:{name:"mile",base:U.LENGTH,prefixes:$.NONE,value:1609.344,offset:0},link:{name:"link",base:U.LENGTH,prefixes:$.NONE,value:.201168,offset:0},rod:{name:"rod",base:U.LENGTH,prefixes:$.NONE,value:5.0292,offset:0},chain:{name:"chain",base:U.LENGTH,prefixes:$.NONE,value:20.1168,offset:0},angstrom:{name:"angstrom",base:U.LENGTH,prefixes:$.NONE,value:1e-10,offset:0},m:{name:"m",base:U.LENGTH,prefixes:$.SHORT,value:1,offset:0},in:{name:"in",base:U.LENGTH,prefixes:$.NONE,value:.0254,offset:0},ft:{name:"ft",base:U.LENGTH,prefixes:$.NONE,value:.3048,offset:0},yd:{name:"yd",base:U.LENGTH,prefixes:$.NONE,value:.9144,offset:0},mi:{name:"mi",base:U.LENGTH,prefixes:$.NONE,value:1609.344,offset:0},li:{name:"li",base:U.LENGTH,prefixes:$.NONE,value:.201168,offset:0},rd:{name:"rd",base:U.LENGTH,prefixes:$.NONE,value:5.02921,offset:0},ch:{name:"ch",base:U.LENGTH,prefixes:$.NONE,value:20.1168,offset:0},mil:{name:"mil",base:U.LENGTH,prefixes:$.NONE,value:254e-7,offset:0},m2:{name:"m2",base:U.SURFACE,prefixes:$.SQUARED,value:1,offset:0},sqin:{name:"sqin",base:U.SURFACE,prefixes:$.NONE,value:64516e-8,offset:0},sqft:{name:"sqft",base:U.SURFACE,prefixes:$.NONE,value:.09290304,offset:0},sqyd:{name:"sqyd",base:U.SURFACE,prefixes:$.NONE,value:.83612736,offset:0},sqmi:{name:"sqmi",base:U.SURFACE,prefixes:$.NONE,value:2589988110336e-6,offset:0},sqrd:{name:"sqrd",base:U.SURFACE,prefixes:$.NONE,value:25.29295,offset:0},sqch:{name:"sqch",base:U.SURFACE,prefixes:$.NONE,value:404.6873,offset:0},sqmil:{name:"sqmil",base:U.SURFACE,prefixes:$.NONE,value:64516e-14,offset:0},acre:{name:"acre",base:U.SURFACE,prefixes:$.NONE,value:4046.86,offset:0},hectare:{name:"hectare",base:U.SURFACE,prefixes:$.NONE,value:1e4,offset:0},m3:{name:"m3",base:U.VOLUME,prefixes:$.CUBIC,value:1,offset:0},L:{name:"L",base:U.VOLUME,prefixes:$.SHORT,value:.001,offset:0},l:{name:"l",base:U.VOLUME,prefixes:$.SHORT,value:.001,offset:0},litre:{name:"litre",base:U.VOLUME,prefixes:$.LONG,value:.001,offset:0},cuin:{name:"cuin",base:U.VOLUME,prefixes:$.NONE,value:16387064e-12,offset:0},cuft:{name:"cuft",base:U.VOLUME,prefixes:$.NONE,value:.028316846592,offset:0},cuyd:{name:"cuyd",base:U.VOLUME,prefixes:$.NONE,value:.764554857984,offset:0},teaspoon:{name:"teaspoon",base:U.VOLUME,prefixes:$.NONE,value:5e-6,offset:0},tablespoon:{name:"tablespoon",base:U.VOLUME,prefixes:$.NONE,value:15e-6,offset:0},drop:{name:"drop",base:U.VOLUME,prefixes:$.NONE,value:5e-8,offset:0},gtt:{name:"gtt",base:U.VOLUME,prefixes:$.NONE,value:5e-8,offset:0},minim:{name:"minim",base:U.VOLUME,prefixes:$.NONE,value:6161152e-14,offset:0},fluiddram:{name:"fluiddram",base:U.VOLUME,prefixes:$.NONE,value:36966911e-13,offset:0},fluidounce:{name:"fluidounce",base:U.VOLUME,prefixes:$.NONE,value:2957353e-11,offset:0},gill:{name:"gill",base:U.VOLUME,prefixes:$.NONE,value:.0001182941,offset:0},cc:{name:"cc",base:U.VOLUME,prefixes:$.NONE,value:1e-6,offset:0},cup:{name:"cup",base:U.VOLUME,prefixes:$.NONE,value:.0002365882,offset:0},pint:{name:"pint",base:U.VOLUME,prefixes:$.NONE,value:.0004731765,offset:0},quart:{name:"quart",base:U.VOLUME,prefixes:$.NONE,value:.0009463529,offset:0},gallon:{name:"gallon",base:U.VOLUME,prefixes:$.NONE,value:.003785412,offset:0},beerbarrel:{name:"beerbarrel",base:U.VOLUME,prefixes:$.NONE,value:.1173478,offset:0},oilbarrel:{name:"oilbarrel",base:U.VOLUME,prefixes:$.NONE,value:.1589873,offset:0},hogshead:{name:"hogshead",base:U.VOLUME,prefixes:$.NONE,value:.238481,offset:0},fldr:{name:"fldr",base:U.VOLUME,prefixes:$.NONE,value:36966911e-13,offset:0},floz:{name:"floz",base:U.VOLUME,prefixes:$.NONE,value:2957353e-11,offset:0},gi:{name:"gi",base:U.VOLUME,prefixes:$.NONE,value:.0001182941,offset:0},cp:{name:"cp",base:U.VOLUME,prefixes:$.NONE,value:.0002365882,offset:0},pt:{name:"pt",base:U.VOLUME,prefixes:$.NONE,value:.0004731765,offset:0},qt:{name:"qt",base:U.VOLUME,prefixes:$.NONE,value:.0009463529,offset:0},gal:{name:"gal",base:U.VOLUME,prefixes:$.NONE,value:.003785412,offset:0},bbl:{name:"bbl",base:U.VOLUME,prefixes:$.NONE,value:.1173478,offset:0},obl:{name:"obl",base:U.VOLUME,prefixes:$.NONE,value:.1589873,offset:0},g:{name:"g",base:U.MASS,prefixes:$.SHORT,value:.001,offset:0},gram:{name:"gram",base:U.MASS,prefixes:$.LONG,value:.001,offset:0},ton:{name:"ton",base:U.MASS,prefixes:$.SHORT,value:907.18474,offset:0},t:{name:"t",base:U.MASS,prefixes:$.SHORT,value:1e3,offset:0},tonne:{name:"tonne",base:U.MASS,prefixes:$.LONG,value:1e3,offset:0},grain:{name:"grain",base:U.MASS,prefixes:$.NONE,value:6479891e-11,offset:0},dram:{name:"dram",base:U.MASS,prefixes:$.NONE,value:.0017718451953125,offset:0},ounce:{name:"ounce",base:U.MASS,prefixes:$.NONE,value:.028349523125,offset:0},poundmass:{name:"poundmass",base:U.MASS,prefixes:$.NONE,value:.45359237,offset:0},hundredweight:{name:"hundredweight",base:U.MASS,prefixes:$.NONE,value:45.359237,offset:0},stick:{name:"stick",base:U.MASS,prefixes:$.NONE,value:.115,offset:0},stone:{name:"stone",base:U.MASS,prefixes:$.NONE,value:6.35029318,offset:0},gr:{name:"gr",base:U.MASS,prefixes:$.NONE,value:6479891e-11,offset:0},dr:{name:"dr",base:U.MASS,prefixes:$.NONE,value:.0017718451953125,offset:0},oz:{name:"oz",base:U.MASS,prefixes:$.NONE,value:.028349523125,offset:0},lbm:{name:"lbm",base:U.MASS,prefixes:$.NONE,value:.45359237,offset:0},cwt:{name:"cwt",base:U.MASS,prefixes:$.NONE,value:45.359237,offset:0},s:{name:"s",base:U.TIME,prefixes:$.SHORT,value:1,offset:0},min:{name:"min",base:U.TIME,prefixes:$.NONE,value:60,offset:0},h:{name:"h",base:U.TIME,prefixes:$.NONE,value:3600,offset:0},second:{name:"second",base:U.TIME,prefixes:$.LONG,value:1,offset:0},sec:{name:"sec",base:U.TIME,prefixes:$.LONG,value:1,offset:0},minute:{name:"minute",base:U.TIME,prefixes:$.NONE,value:60,offset:0},hour:{name:"hour",base:U.TIME,prefixes:$.NONE,value:3600,offset:0},day:{name:"day",base:U.TIME,prefixes:$.NONE,value:86400,offset:0},week:{name:"week",base:U.TIME,prefixes:$.NONE,value:7*86400,offset:0},month:{name:"month",base:U.TIME,prefixes:$.NONE,value:2629800,offset:0},year:{name:"year",base:U.TIME,prefixes:$.NONE,value:31557600,offset:0},decade:{name:"decade",base:U.TIME,prefixes:$.NONE,value:315576e3,offset:0},century:{name:"century",base:U.TIME,prefixes:$.NONE,value:315576e4,offset:0},millennium:{name:"millennium",base:U.TIME,prefixes:$.NONE,value:315576e5,offset:0},hertz:{name:"Hertz",base:U.FREQUENCY,prefixes:$.LONG,value:1,offset:0,reciprocal:!0},Hz:{name:"Hz",base:U.FREQUENCY,prefixes:$.SHORT,value:1,offset:0,reciprocal:!0},rad:{name:"rad",base:U.ANGLE,prefixes:$.SHORT,value:1,offset:0},radian:{name:"radian",base:U.ANGLE,prefixes:$.LONG,value:1,offset:0},deg:{name:"deg",base:U.ANGLE,prefixes:$.SHORT,value:null,offset:0},degree:{name:"degree",base:U.ANGLE,prefixes:$.LONG,value:null,offset:0},grad:{name:"grad",base:U.ANGLE,prefixes:$.SHORT,value:null,offset:0},gradian:{name:"gradian",base:U.ANGLE,prefixes:$.LONG,value:null,offset:0},cycle:{name:"cycle",base:U.ANGLE,prefixes:$.NONE,value:null,offset:0},arcsec:{name:"arcsec",base:U.ANGLE,prefixes:$.NONE,value:null,offset:0},arcmin:{name:"arcmin",base:U.ANGLE,prefixes:$.NONE,value:null,offset:0},A:{name:"A",base:U.CURRENT,prefixes:$.SHORT,value:1,offset:0},ampere:{name:"ampere",base:U.CURRENT,prefixes:$.LONG,value:1,offset:0},K:{name:"K",base:U.TEMPERATURE,prefixes:$.SHORT,value:1,offset:0},degC:{name:"degC",base:U.TEMPERATURE,prefixes:$.SHORT,value:1,offset:273.15},degF:{name:"degF",base:U.TEMPERATURE,prefixes:$.SHORT,value:new v(5,9),offset:459.67},degR:{name:"degR",base:U.TEMPERATURE,prefixes:$.SHORT,value:new v(5,9),offset:0},kelvin:{name:"kelvin",base:U.TEMPERATURE,prefixes:$.LONG,value:1,offset:0},celsius:{name:"celsius",base:U.TEMPERATURE,prefixes:$.LONG,value:1,offset:273.15},fahrenheit:{name:"fahrenheit",base:U.TEMPERATURE,prefixes:$.LONG,value:new v(5,9),offset:459.67},rankine:{name:"rankine",base:U.TEMPERATURE,prefixes:$.LONG,value:new v(5,9),offset:0},mol:{name:"mol",base:U.AMOUNT_OF_SUBSTANCE,prefixes:$.SHORT,value:1,offset:0},mole:{name:"mole",base:U.AMOUNT_OF_SUBSTANCE,prefixes:$.LONG,value:1,offset:0},cd:{name:"cd",base:U.LUMINOUS_INTENSITY,prefixes:$.SHORT,value:1,offset:0},candela:{name:"candela",base:U.LUMINOUS_INTENSITY,prefixes:$.LONG,value:1,offset:0},N:{name:"N",base:U.FORCE,prefixes:$.SHORT,value:1,offset:0},newton:{name:"newton",base:U.FORCE,prefixes:$.LONG,value:1,offset:0},dyn:{name:"dyn",base:U.FORCE,prefixes:$.SHORT,value:1e-5,offset:0},dyne:{name:"dyne",base:U.FORCE,prefixes:$.LONG,value:1e-5,offset:0},lbf:{name:"lbf",base:U.FORCE,prefixes:$.NONE,value:4.4482216152605,offset:0},poundforce:{name:"poundforce",base:U.FORCE,prefixes:$.NONE,value:4.4482216152605,offset:0},kip:{name:"kip",base:U.FORCE,prefixes:$.LONG,value:4448.2216,offset:0},kilogramforce:{name:"kilogramforce",base:U.FORCE,prefixes:$.NONE,value:9.80665,offset:0},J:{name:"J",base:U.ENERGY,prefixes:$.SHORT,value:1,offset:0},joule:{name:"joule",base:U.ENERGY,prefixes:$.LONG,value:1,offset:0},erg:{name:"erg",base:U.ENERGY,prefixes:$.SHORTLONG,value:1e-7,offset:0},Wh:{name:"Wh",base:U.ENERGY,prefixes:$.SHORT,value:3600,offset:0},BTU:{name:"BTU",base:U.ENERGY,prefixes:$.BTU,value:1055.05585262,offset:0},eV:{name:"eV",base:U.ENERGY,prefixes:$.SHORT,value:1602176565e-28,offset:0},electronvolt:{name:"electronvolt",base:U.ENERGY,prefixes:$.LONG,value:1602176565e-28,offset:0},W:{name:"W",base:U.POWER,prefixes:$.SHORT,value:1,offset:0},watt:{name:"watt",base:U.POWER,prefixes:$.LONG,value:1,offset:0},hp:{name:"hp",base:U.POWER,prefixes:$.NONE,value:745.6998715386,offset:0},VAR:{name:"VAR",base:U.POWER,prefixes:$.SHORT,value:x.I,offset:0},VA:{name:"VA",base:U.POWER,prefixes:$.SHORT,value:1,offset:0},Pa:{name:"Pa",base:U.PRESSURE,prefixes:$.SHORT,value:1,offset:0},psi:{name:"psi",base:U.PRESSURE,prefixes:$.NONE,value:6894.75729276459,offset:0},atm:{name:"atm",base:U.PRESSURE,prefixes:$.NONE,value:101325,offset:0},bar:{name:"bar",base:U.PRESSURE,prefixes:$.SHORTLONG,value:1e5,offset:0},torr:{name:"torr",base:U.PRESSURE,prefixes:$.NONE,value:133.322,offset:0},mmHg:{name:"mmHg",base:U.PRESSURE,prefixes:$.NONE,value:133.322,offset:0},mmH2O:{name:"mmH2O",base:U.PRESSURE,prefixes:$.NONE,value:9.80665,offset:0},cmH2O:{name:"cmH2O",base:U.PRESSURE,prefixes:$.NONE,value:98.0665,offset:0},coulomb:{name:"coulomb",base:U.ELECTRIC_CHARGE,prefixes:$.LONG,value:1,offset:0},C:{name:"C",base:U.ELECTRIC_CHARGE,prefixes:$.SHORT,value:1,offset:0},farad:{name:"farad",base:U.ELECTRIC_CAPACITANCE,prefixes:$.LONG,value:1,offset:0},F:{name:"F",base:U.ELECTRIC_CAPACITANCE,prefixes:$.SHORT,value:1,offset:0},volt:{name:"volt",base:U.ELECTRIC_POTENTIAL,prefixes:$.LONG,value:1,offset:0},V:{name:"V",base:U.ELECTRIC_POTENTIAL,prefixes:$.SHORT,value:1,offset:0},ohm:{name:"ohm",base:U.ELECTRIC_RESISTANCE,prefixes:$.SHORTLONG,value:1,offset:0},henry:{name:"henry",base:U.ELECTRIC_INDUCTANCE,prefixes:$.LONG,value:1,offset:0},H:{name:"H",base:U.ELECTRIC_INDUCTANCE,prefixes:$.SHORT,value:1,offset:0},siemens:{name:"siemens",base:U.ELECTRIC_CONDUCTANCE,prefixes:$.LONG,value:1,offset:0},S:{name:"S",base:U.ELECTRIC_CONDUCTANCE,prefixes:$.SHORT,value:1,offset:0},weber:{name:"weber",base:U.MAGNETIC_FLUX,prefixes:$.LONG,value:1,offset:0},Wb:{name:"Wb",base:U.MAGNETIC_FLUX,prefixes:$.SHORT,value:1,offset:0},tesla:{name:"tesla",base:U.MAGNETIC_FLUX_DENSITY,prefixes:$.LONG,value:1,offset:0},T:{name:"T",base:U.MAGNETIC_FLUX_DENSITY,prefixes:$.SHORT,value:1,offset:0},b:{name:"b",base:U.BIT,prefixes:$.BINARY_SHORT,value:1,offset:0},bits:{name:"bits",base:U.BIT,prefixes:$.BINARY_LONG,value:1,offset:0},B:{name:"B",base:U.BIT,prefixes:$.BINARY_SHORT,value:8,offset:0},bytes:{name:"bytes",base:U.BIT,prefixes:$.BINARY_LONG,value:8,offset:0}},Ce={meters:"meter",inches:"inch",feet:"foot",yards:"yard",miles:"mile",links:"link",rods:"rod",chains:"chain",angstroms:"angstrom",lt:"l",litres:"litre",liter:"litre",liters:"litre",teaspoons:"teaspoon",tablespoons:"tablespoon",minims:"minim",fluiddrams:"fluiddram",fluidounces:"fluidounce",gills:"gill",cups:"cup",pints:"pint",quarts:"quart",gallons:"gallon",beerbarrels:"beerbarrel",oilbarrels:"oilbarrel",hogsheads:"hogshead",gtts:"gtt",grams:"gram",tons:"ton",tonnes:"tonne",grains:"grain",drams:"dram",ounces:"ounce",poundmasses:"poundmass",hundredweights:"hundredweight",sticks:"stick",lb:"lbm",lbs:"lbm",kips:"kip",kgf:"kilogramforce",acres:"acre",hectares:"hectare",sqfeet:"sqft",sqyard:"sqyd",sqmile:"sqmi",sqmiles:"sqmi",mmhg:"mmHg",mmh2o:"mmH2O",cmh2o:"cmH2O",seconds:"second",secs:"second",minutes:"minute",mins:"minute",hours:"hour",hr:"hour",hrs:"hour",days:"day",weeks:"week",months:"month",years:"year",decades:"decade",centuries:"century",millennia:"millennium",hertz:"hertz",radians:"radian",degrees:"degree",gradians:"gradian",cycles:"cycle",arcsecond:"arcsec",arcseconds:"arcsec",arcminute:"arcmin",arcminutes:"arcmin",BTUs:"BTU",watts:"watt",joules:"joule",amperes:"ampere",amps:"ampere",amp:"ampere",coulombs:"coulomb",volts:"volt",ohms:"ohm",farads:"farad",webers:"weber",teslas:"tesla",electronvolts:"electronvolt",moles:"mole",bit:"bits",byte:"bytes"};function Re(X){if(X.number==="BigNumber"){var ne=HV(_);ce.rad.value=new _(1),ce.deg.value=ne.div(180),ce.grad.value=ne.div(200),ce.cycle.value=ne.times(2),ce.arcsec.value=ne.div(648e3),ce.arcmin.value=ne.div(10800)}else ce.rad.value=1,ce.deg.value=Math.PI/180,ce.grad.value=Math.PI/200,ce.cycle.value=Math.PI*2,ce.arcsec.value=Math.PI/648e3,ce.arcmin.value=Math.PI/10800;ce.radian.value=ce.rad.value,ce.degree.value=ce.deg.value,ce.gradian.value=ce.grad.value}Re(n),e&&e("config",function(X,ne){X.number!==ne.number&&Re(X)});var Ie={si:{NONE:{unit:le,prefix:$.NONE[""]},LENGTH:{unit:ce.m,prefix:$.SHORT[""]},MASS:{unit:ce.g,prefix:$.SHORT.k},TIME:{unit:ce.s,prefix:$.SHORT[""]},CURRENT:{unit:ce.A,prefix:$.SHORT[""]},TEMPERATURE:{unit:ce.K,prefix:$.SHORT[""]},LUMINOUS_INTENSITY:{unit:ce.cd,prefix:$.SHORT[""]},AMOUNT_OF_SUBSTANCE:{unit:ce.mol,prefix:$.SHORT[""]},ANGLE:{unit:ce.rad,prefix:$.SHORT[""]},BIT:{unit:ce.bits,prefix:$.SHORT[""]},FORCE:{unit:ce.N,prefix:$.SHORT[""]},ENERGY:{unit:ce.J,prefix:$.SHORT[""]},POWER:{unit:ce.W,prefix:$.SHORT[""]},PRESSURE:{unit:ce.Pa,prefix:$.SHORT[""]},ELECTRIC_CHARGE:{unit:ce.C,prefix:$.SHORT[""]},ELECTRIC_CAPACITANCE:{unit:ce.F,prefix:$.SHORT[""]},ELECTRIC_POTENTIAL:{unit:ce.V,prefix:$.SHORT[""]},ELECTRIC_RESISTANCE:{unit:ce.ohm,prefix:$.SHORT[""]},ELECTRIC_INDUCTANCE:{unit:ce.H,prefix:$.SHORT[""]},ELECTRIC_CONDUCTANCE:{unit:ce.S,prefix:$.SHORT[""]},MAGNETIC_FLUX:{unit:ce.Wb,prefix:$.SHORT[""]},MAGNETIC_FLUX_DENSITY:{unit:ce.T,prefix:$.SHORT[""]},FREQUENCY:{unit:ce.Hz,prefix:$.SHORT[""]}}};Ie.cgs=JSON.parse(JSON.stringify(Ie.si)),Ie.cgs.LENGTH={unit:ce.m,prefix:$.SHORT.c},Ie.cgs.MASS={unit:ce.g,prefix:$.SHORT[""]},Ie.cgs.FORCE={unit:ce.dyn,prefix:$.SHORT[""]},Ie.cgs.ENERGY={unit:ce.erg,prefix:$.NONE[""]},Ie.us=JSON.parse(JSON.stringify(Ie.si)),Ie.us.LENGTH={unit:ce.ft,prefix:$.NONE[""]},Ie.us.MASS={unit:ce.lbm,prefix:$.NONE[""]},Ie.us.TEMPERATURE={unit:ce.degF,prefix:$.NONE[""]},Ie.us.FORCE={unit:ce.lbf,prefix:$.NONE[""]},Ie.us.ENERGY={unit:ce.BTU,prefix:$.BTU[""]},Ie.us.POWER={unit:ce.hp,prefix:$.NONE[""]},Ie.us.PRESSURE={unit:ce.psi,prefix:$.NONE[""]},Ie.auto=JSON.parse(JSON.stringify(Ie.si));var He=Ie.auto;w.setUnitSystem=function(X){if(dr(Ie,X))He=Ie[X];else throw new Error("Unit system "+X+" does not exist. Choices are: "+Object.keys(Ie).join(", "))},w.getUnitSystem=function(){for(var X in Ie)if(dr(Ie,X)&&Ie[X]===He)return X},w.typeConverters={BigNumber:function(ne){return ne!=null&&ne.isFraction?new _(ne.n).div(ne.d).times(ne.s):new _(ne+"")},Fraction:function(ne){return new v(ne)},Complex:function(ne){return ne},number:function(ne){return ne!=null&&ne.isFraction?y(ne):ne}},w.prototype._numberConverter=function(){var X=w.typeConverters[this.valueType()];if(X)return X;throw new TypeError('Unsupported Unit value type "'+this.valueType()+'"')},w._getNumberConverter=function(X){if(!w.typeConverters[X])throw new TypeError('Unsupported type "'+X+'"');return w.typeConverters[X]};for(var tt in ce)if(dr(ce,tt)){var Qe=ce[tt];Qe.dimensions=Qe.base.dimensions}for(var ct in Ce)if(dr(Ce,ct)){var Xe=ce[Ce[ct]],ue={};for(var De in Xe)dr(Xe,De)&&(ue[De]=Xe[De]);ue.name=ct,ce[ct]=ue}w.isValidAlpha=function(ne){return/^[a-zA-Z]$/.test(ne)};function Ee(X){for(var ne=0;ne0&&!(w.isValidAlpha(C)||P(C)))throw new Error('Invalid unit name (only alphanumeric characters are allowed): "'+X+'"')}}return w.createUnit=function(X,ne){if(typeof X!="object")throw new TypeError("createUnit expects first parameter to be of type 'Object'");if(ne&&ne.override){for(var me in X)if(dr(X,me)&&w.deleteUnit(me),X[me].aliases)for(var we=0;we"u"||ne===null)&&(ne={}),typeof X!="string")throw new TypeError("createUnitSingle expects first parameter to be of type 'string'");if(dr(ce,X))throw new Error('Cannot create unit "'+X+'": a unit with that name already exists');Ee(X);var me=null,we=[],Ne=0,Ue,We,lt;if(ne&&ne.type==="Unit")me=ne.clone();else if(typeof ne=="string")ne!==""&&(Ue=ne);else if(typeof ne=="object")Ue=ne.definition,We=ne.prefixes,Ne=ne.offset,lt=ne.baseName,ne.aliases&&(we=ne.aliases.valueOf());else throw new TypeError('Cannot create unit "'+X+'" from "'+ne.toString()+'": expecting "string" or "Unit" or "Object"');if(we){for(var z=0;z1e-12){Se=!1;break}if(Se){de=!0,B.base=U[ve];break}}if(!de){lt=lt||X+"_STUFF";var Be={dimensions:me.dimensions.slice(0)};Be.key=lt,U[lt]=Be,He[lt]={unit:B,prefix:$.NONE[""]},B.base=U[lt]}}else{if(lt=lt||X+"_STUFF",W.indexOf(lt)>=0)throw new Error('Cannot create new base unit "'+X+'": a base unit with that name already exists (and cannot be overridden)');W.push(lt);for(var oe in U)dr(U,oe)&&(U[oe].dimensions[W.length-1]=0);for(var ge={dimensions:[]},pe=0;pe{var{typed:e,Unit:n}=t;return e(yk,{Unit:function(i){return i.clone()},string:function(i){return n.isValuelessUnit(i)?new n(null,i):n.parse(i,{allowNoUnits:!0})},"number | BigNumber | Fraction | Complex, string | Unit":function(i,o){return new n(i,o)},"number | BigNumber | Fraction":function(i){return new n(i)},"Array | Matrix":e.referToSelf(r=>i=>Wi(i,r))})}),xk="createUnit",z1e=["typed","Unit"],$1e=Tt(xk,z1e,t=>{var{typed:e,Unit:n}=t;return e(xk,{"Object, Object":function(i,o){return n.createUnit(i,o)},Object:function(i){return n.createUnit(i,{})},"string, Unit | string | Object, Object":function(i,o,a){var s={};return s[i]=o,n.createUnit(s,a)},"string, Unit | string | Object":function(i,o){var a={};return a[i]=o,n.createUnit(a,{})},string:function(i){var o={};return o[i]={},n.createUnit(o,{})}})}),VV=Tt("trigUnit",["typed"],t=>{var{typed:e}=t;return{Unit:e.referToSelf(n=>r=>{if(!r.hasBase(r.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function cot is no angle");return e.find(n,r.valueType())(r.value)})}}),bk="cos",H1e=["typed"],V1e=Tt(bk,H1e,t=>{var{typed:e}=t,n=VV({typed:e});return e(bk,{number:Math.cos,"Complex | BigNumber":r=>r.cos()},n)}),_k="sin",W1e=["typed"],G1e=Tt(_k,W1e,t=>{var{typed:e}=t,n=VV({typed:e});return e(_k,{number:Math.sin,"Complex | BigNumber":r=>r.sin()},n)}),wk="add",j1e=["typed","matrix","addScalar","equalScalar","DenseMatrix","SparseMatrix","concat"],q1e=Tt(wk,j1e,t=>{var{typed:e,matrix:n,addScalar:r,equalScalar:i,DenseMatrix:o,SparseMatrix:a,concat:s}=t,l=zV({typed:e}),u=Pye({typed:e,equalScalar:i}),c=$V({typed:e,DenseMatrix:o}),f=em({typed:e,matrix:n,concat:s});return e(wk,{"any, any":r,"any, any, ...any":e.referToSelf(d=>(p,y,x)=>{for(var _=d(p,y),v=0;v{var{typed:e,addScalar:n,multiplyScalar:r,conj:i,size:o}=t;return e(Sk,{"Array | DenseMatrix, Array | DenseMatrix":s,"SparseMatrix, SparseMatrix":l});function a(c,f){var d=u(c),p=u(f),y,x;if(d.length===1)y=d[0];else if(d.length===2&&d[1]===1)y=d[0];else throw new RangeError("Expected a column vector, instead got a matrix of size ("+d.join(", ")+")");if(p.length===1)x=p[0];else if(p.length===2&&p[1]===1)x=p[0];else throw new RangeError("Expected a column vector, instead got a matrix of size ("+p.join(", ")+")");if(y!==x)throw new RangeError("Vectors must have equal length ("+y+" != "+x+")");if(y===0)throw new RangeError("Cannot calculate the dot product of empty vectors");return y}function s(c,f){var d=a(c,f),p=di(c)?c._data:c,y=di(c)?c._datatype:void 0,x=di(f)?f._data:f,_=di(f)?f._datatype:void 0,v=u(c).length===2,S=u(f).length===2,w=n,E=r;if(y&&_&&y===_&&typeof y=="string"){var T=y;w=e.find(n,[T,T]),E=e.find(r,[T,T])}if(!v&&!S){for(var C=E(i(p[0]),x[0]),D=1;DC){E++;continue}T===C&&(_=v(_,S(p[w],x[E])),w++,E++)}return _}function u(c){return di(c)?c.size():o(c)}}),Ek="det",K1e=["typed","matrix","subtractScalar","multiply","divideScalar","isZero","unaryMinus"],Z1e=Tt(Ek,K1e,t=>{var{typed:e,matrix:n,subtractScalar:r,multiply:i,divideScalar:o,isZero:a,unaryMinus:s}=t;return e(Ek,{any:function(c){return Lr(c)},"Array | Matrix":function(c){var f;switch(di(c)?f=c.size():Array.isArray(c)?(c=n(c),f=c.size()):f=[],f.length){case 0:return Lr(c);case 1:if(f[0]===1)return Lr(c.valueOf()[0]);if(f[0]===0)return 1;throw new RangeError("Matrix must be square (size: "+ui(f)+")");case 2:{var d=f[0],p=f[1];if(d===p)return l(c.clone().valueOf(),d);if(p===0)return 1;throw new RangeError("Matrix must be square (size: "+ui(f)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+ui(f)+")")}}});function l(u,c,f){if(c===1)return Lr(u[0][0]);if(c===2)return r(i(u[0][0],u[1][1]),i(u[1][0],u[0][1]));for(var d=!1,p=new Array(c).fill(0).map((D,O)=>O),y=0;y{var{typed:e,matrix:n,divideScalar:r,addScalar:i,multiply:o,unaryMinus:a,det:s,identity:l,abs:u}=t;return e(Mk,{"Array | Matrix":function(d){var p=di(d)?d.size():wa(d);switch(p.length){case 1:if(p[0]===1)return di(d)?n([r(1,d.valueOf()[0])]):[r(1,d[0])];throw new RangeError("Matrix must be square (size: "+ui(p)+")");case 2:{var y=p[0],x=p[1];if(y===x)return di(d)?n(c(d.valueOf(),y,x),d.storage()):c(d,y,x);throw new RangeError("Matrix must be square (size: "+ui(p)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+ui(p)+")")}},any:function(d){return r(1,d)}});function c(f,d,p){var y,x,_,v,S;if(d===1){if(v=f[0][0],v===0)throw Error("Cannot calculate inverse, determinant is zero");return[[r(1,v)]]}else if(d===2){var w=s(f);if(w===0)throw Error("Cannot calculate inverse, determinant is zero");return[[r(f[1][1],w),r(a(f[0][1]),w)],[r(a(f[1][0]),w),r(f[0][0],w)]]}else{var E=f.concat();for(y=0;yD&&(D=u(E[y][C]),O=y),y++;if(D===0)throw Error("Cannot calculate inverse, determinant is zero");y=O,y!==C&&(S=E[C],E[C]=E[y],E[y]=S,S=T[C],T[C]=T[y],T[y]=S);var P=E[C],N=T[C];for(y=0;y{var{typed:e,matrix:n,multiply:r,equalScalar:i,divideScalar:o,inv:a}=t,s=Eb({typed:e,equalScalar:i}),l=Qp({typed:e});return e("divide",tV({"Array | Matrix, Array | Matrix":function(c,f){return r(c,a(f))},"DenseMatrix, any":function(c,f){return l(c,f,o,!1)},"SparseMatrix, any":function(c,f){return s(c,f,o,!1)},"Array, any":function(c,f){return l(n(c),f,o,!1).valueOf()},"any, Array | Matrix":function(c,f){return r(c,a(f))}},o.signatures))}),bv=nve({config:Qo}),mC=ave({}),ZO=cve({}),JO=hve({}),Ja=vve({Matrix:JO}),bn=oge({BigNumber:bv,Complex:mC,DenseMatrix:Ja,Fraction:ZO}),WV=Xve({typed:bn}),Cb=Kve({typed:bn}),rxe=Uve({BigNumber:bv,typed:bn}),ixe=Wye({typed:bn}),Ck=V1e({typed:bn}),ac=Tve({config:Qo,typed:bn}),oxe=a1e({typed:bn}),axe=bve({typed:bn}),sxe=Mve({typed:bn}),QO=Lye({typed:bn}),e4=Lve({typed:bn}),Ak=G1e({typed:bn}),t4=Pve({Matrix:JO,equalScalar:ac,typed:bn}),n4=Jve({typed:bn}),r4=jve({typed:bn}),GV=Hve({Fraction:ZO,typed:bn}),lxe=Sve({typed:bn}),Oi=Wve({DenseMatrix:Ja,Matrix:JO,SparseMatrix:t4,typed:bn}),i4=u1e({bignumber:rxe,fraction:GV,number:e4}),uxe=Qye({matrix:Oi,config:Qo,typed:bn}),gC=t1e({BigNumber:bv,config:Qo,matrix:Oi,typed:bn}),tm=jye({isInteger:axe,matrix:Oi,typed:bn}),vC=f1e({numeric:i4,typed:bn}),BR=v1e({DenseMatrix:Ja,concat:tm,equalScalar:ac,matrix:Oi,typed:bn}),jV=Xye({BigNumber:bv,DenseMatrix:Ja,SparseMatrix:t4,config:Qo,matrix:Oi,typed:bn}),KT=D1e({DenseMatrix:Ja,concat:tm,config:Qo,matrix:Oi,typed:bn}),o4=m1e({BigNumber:bv,DenseMatrix:Ja,equalScalar:ac,matrix:Oi,typed:bn,zeros:gC}),cxe=b1e({DenseMatrix:Ja,concat:tm,config:Qo,matrix:Oi,typed:bn}),Tk=zye({DenseMatrix:Ja,concat:tm,equalScalar:ac,matrix:Oi,subtractScalar:n4,typed:bn,unaryMinus:r4}),Iw=q1e({DenseMatrix:Ja,SparseMatrix:t4,addScalar:Cb,concat:tm,equalScalar:ac,matrix:Oi,typed:bn}),fxe=Y1e({addScalar:Cb,conj:ixe,multiplyScalar:QO,size:uxe,typed:bn}),dxe=hye({DenseMatrix:Ja,config:Qo,equalScalar:ac,matrix:Oi,round:o4,typed:bn,zeros:gC}),cE=C1e({DenseMatrix:Ja,concat:tm,config:Qo,matrix:Oi,typed:bn}),hxe=I1e({config:Qo,numeric:i4,smaller:cxe,typed:bn}),Bi=Bye({addScalar:Cb,dot:fxe,equalScalar:ac,matrix:Oi,multiplyScalar:QO,typed:bn}),pxe=sye({DenseMatrix:Ja,config:Qo,equalScalar:ac,matrix:Oi,round:o4,typed:bn,zeros:gC}),mxe=Z1e({divideScalar:vC,isZero:sxe,matrix:Oi,multiply:Bi,subtractScalar:n4,typed:bn,unaryMinus:r4}),gxe=cye({Complex:mC,DenseMatrix:Ja,ceil:pxe,equalScalar:ac,floor:dxe,matrix:Oi,typed:bn,zeros:gC}),vxe=N1e({config:Qo,larger:cE,numeric:i4,typed:bn}),yxe=S1e({DenseMatrix:Ja,concat:tm,config:Qo,matrix:Oi,typed:bn}),qV=Q1e({abs:WV,addScalar:Cb,det:mxe,divideScalar:vC,identity:jV,matrix:Oi,multiply:Bi,typed:bn,unaryMinus:r4}),xxe=h1e({Complex:mC,config:Qo,fraction:GV,identity:jV,inv:qV,matrix:Oi,multiply:Bi,number:e4,typed:bn}),pg=k1e({BigNumber:bv,Complex:mC,Fraction:ZO,abs:WV,addScalar:Cb,config:Qo,divideScalar:vC,equal:BR,fix:gxe,format:oxe,isNumeric:lxe,multiplyScalar:QO,number:e4,pow:xxe,round:o4,subtractScalar:n4}),Dk=$1e({Unit:pg,typed:bn}),jo=nxe({divideScalar:vC,equalScalar:ac,inv:qV,matrix:Oi,multiply:Bi,typed:bn}),qt=U1e({Unit:pg,typed:bn});const XV=qt(299792458,"m/s"),YV=qt(662607015e-42,"J s");var Xc=(t=>(t.millimetre="mm",t.micrometre="um",t))(Xc||{}),v1=(t=>(t.electronVolts="eV",t.kiloElectronVolts="keV",t))(v1||{}),dl=(t=>(t.nanmometres="nm",t.angstroms="angstrom",t))(dl||{}),g2=(t=>(t.nanmometres="nm^-1",t.angstroms="angstrom^-1",t))(g2||{}),y1=(t=>(t.radians="rad",t.degrees="deg",t))(y1||{});const bxe=t=>{const e=jo(Bi(YV,XV),t.toSI());if(typeof e=="number"||!("units"in e))throw TypeError("units for constants h and c are wrong");return e},UR=t=>{const e=jo(Bi(YV,XV),t.toSI());if(typeof e=="number"||!("units"in e))throw TypeError("units for constants h and c are wrong");return e},mg=t=>{const e=parseFloat(t.trim());return!e&&e!=0?null:e},Rk=t=>{let e;const n=new Set,r=(l,u)=>{const c=typeof l=="function"?l(e):l;if(!Object.is(c,e)){const f=e;e=u??typeof c!="object"?c:Object.assign({},e,c),n.forEach(d=>d(e,f))}},i=()=>e,s={setState:r,getState:i,subscribe:l=>(n.add(l),()=>n.delete(l)),destroy:()=>{n.clear()}};return e=t(r,i,s),s},_xe=t=>t?Rk(t):Rk;var KV={exports:{}},ZV={},JV={exports:{}},QV={};/** + (`+ui(O,x)+", "+ui(E,x)+") ==> "+(this._values?ui(this._values[D],x):"X")}return w},i.prototype.toString=function(){return ui(this.toArray())},i.prototype.toJSON=function(){return{mathjs:"SparseMatrix",values:this._values,index:this._index,ptr:this._ptr,size:this._size,datatype:this._datatype}},i.prototype.diagonal=function(x){if(x){if(fo(x)&&(x=x.toNumber()),!Br(x)||!Pr(x))throw new TypeError("The parameter k must be an integer number")}else x=0;var _=x>0?x:0,v=x<0?-x:0,S=this._size[0],w=this._size[1],E=Math.min(S-v,w-_),T=[],C=[],D=[];D[0]=0;for(var O=_;O0?v:0,D=v<0?-v:0,O=x[0],P=x[1],N=Math.min(O-D,P-C),k;if(jr(_)){if(_.length!==N)throw new Error("Invalid value array length");k=function(te){return _[te]}}else if(di(_)){var G=_.size();if(G.length!==1||G[0]!==N)throw new Error("Invalid matrix length");k=function(te){return _.get([te])}}else k=function(){return _};for(var Z=[],j=[],K=[],Y=0;Y=0&&$=D||w[P]!==_)){var k=S?S[O]:void 0;w.splice(P,0,_),S&&S.splice(P,0,k),w.splice(P<=O?O+1:O,1),S&&S.splice(P<=O?O+1:O,1);continue}if(P=D||w[O]!==x)){var G=S?S[P]:void 0;w.splice(O,0,x),S&&S.splice(O,0,G),w.splice(O<=P?P+1:P,1),S&&S.splice(O<=P?P+1:P,1)}}},i},{isClass:!0}),Hve="number",Vve=["typed"];function Wve(t){var e=t.match(/(0[box])([0-9a-fA-F]*)\.([0-9a-fA-F]*)/);if(e){var n={"0b":2,"0o":8,"0x":16}[e[1]],r=e[2],i=e[3];return{input:t,radix:n,integerPart:r,fractionalPart:i}}else return null}function Gve(t){for(var e=parseInt(t.integerPart,t.radix),n=0,r=0;r{var{typed:e}=t,n=e("number",{"":function(){return 0},number:function(i){return i},string:function(i){if(i==="NaN")return NaN;var o=Wve(i);if(o)return Gve(o);var a=0,s=i.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/);s&&(a=Number(s[2]),i=s[1]);var l=Number(i);if(isNaN(l))throw new SyntaxError('String "'+i+'" is not a valid number');if(s){if(l>2**a-1)throw new SyntaxError('String "'.concat(i,'" is out of range'));l>=2**(a-1)&&(l=l-2**a)}return l},BigNumber:function(i){return i.toNumber()},Fraction:function(i){return i.valueOf()},Unit:e.referToSelf(r=>i=>{var o=i.clone();return o.value=r(i.value),o}),null:function(i){return 0},"Unit, string | Unit":function(i,o){return i.toNumber(o)},"Array | Matrix":e.referToSelf(r=>i=>Gi(i,r))});return n.fromJSON=function(r){return parseFloat(r.value)},n}),qve="bignumber",Xve=["typed","BigNumber"],Yve=Tt(qve,Xve,t=>{var{typed:e,BigNumber:n}=t;return e("bignumber",{"":function(){return new n(0)},number:function(i){return new n(i+"")},string:function(i){var o=i.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/);if(o){var a=o[2],s=n(o[1]),l=new n(2).pow(Number(a));if(s.gt(l.sub(1)))throw new SyntaxError('String "'.concat(i,'" is out of range'));var u=new n(2).pow(Number(a)-1);return s.gte(u)?s.sub(l):s}return new n(i)},BigNumber:function(i){return i},Unit:e.referToSelf(r=>i=>{var o=i.clone();return o.value=r(i.value),o}),Fraction:function(i){return new n(i.n).div(i.d).times(i.s)},null:function(i){return new n(0)},"Array | Matrix":e.referToSelf(r=>i=>Gi(i,r))})}),Kve="fraction",Zve=["typed","Fraction"],Jve=Tt(Kve,Zve,t=>{var{typed:e,Fraction:n}=t;return e("fraction",{number:function(i){if(!isFinite(i)||isNaN(i))throw new Error(i+" cannot be represented as a fraction");return new n(i)},string:function(i){return new n(i)},"number, number":function(i,o){return new n(i,o)},null:function(i){return new n(0)},BigNumber:function(i){return new n(i.toString())},Fraction:function(i){return i},Unit:e.referToSelf(r=>i=>{var o=i.clone();return o.value=r(i.value),o}),Object:function(i){return new n(i)},"Array | Matrix":e.referToSelf(r=>i=>Gi(i,r))})}),rk="matrix",Qve=["typed","Matrix","DenseMatrix","SparseMatrix"],eye=Tt(rk,Qve,t=>{var{typed:e,Matrix:n,DenseMatrix:r,SparseMatrix:i}=t;return e(rk,{"":function(){return o([])},string:function(s){return o([],s)},"string, string":function(s,l){return o([],s,l)},Array:function(s){return o(s)},Matrix:function(s){return o(s,s.storage())},"Array | Matrix, string":o,"Array | Matrix, string, string":o});function o(a,s,l){if(s==="dense"||s==="default"||s===void 0)return new r(a,l);if(s==="sparse")return new i(a,l);throw new TypeError("Unknown matrix type "+JSON.stringify(s)+".")}}),ik="unaryMinus",tye=["typed"],nye=Tt(ik,tye,t=>{var{typed:e}=t;return e(ik,{number:WV,"Complex | BigNumber | Fraction":n=>n.neg(),Unit:e.referToSelf(n=>r=>{var i=r.clone();return i.value=e.find(n,i.valueType())(r.value),i}),"Array | Matrix":e.referToSelf(n=>r=>Gi(r,n))})}),ok="abs",rye=["typed"],iye=Tt(ok,rye,t=>{var{typed:e}=t;return e(ok,{number:zV,"Complex | BigNumber | Fraction | Unit":n=>n.abs(),"Array | Matrix":e.referToSelf(n=>r=>Gi(r,n))})}),ak="addScalar",oye=["typed"],aye=Tt(ak,oye,t=>{var{typed:e}=t;return e(ak,{"number, number":$V,"Complex, Complex":function(r,i){return r.add(i)},"BigNumber, BigNumber":function(r,i){return r.plus(i)},"Fraction, Fraction":function(r,i){return r.add(i)},"Unit, Unit":e.referToSelf(n=>(r,i)=>{if(r.value===null||r.value===void 0)throw new Error("Parameter x contains a unit with undefined value");if(i.value===null||i.value===void 0)throw new Error("Parameter y contains a unit with undefined value");if(!r.equalBase(i))throw new Error("Units do not match");var o=r.clone();return o.value=e.find(n,[o.valueType(),i.valueType()])(o.value,i.value),o.fixPrefix=!1,o})})}),sk="subtractScalar",sye=["typed"],lye=Tt(sk,sye,t=>{var{typed:e}=t;return e(sk,{"number, number":HV,"Complex, Complex":function(r,i){return r.sub(i)},"BigNumber, BigNumber":function(r,i){return r.minus(i)},"Fraction, Fraction":function(r,i){return r.sub(i)},"Unit, Unit":e.referToSelf(n=>(r,i)=>{if(r.value===null||r.value===void 0)throw new Error("Parameter x contains a unit with undefined value");if(i.value===null||i.value===void 0)throw new Error("Parameter y contains a unit with undefined value");if(!r.equalBase(i))throw new Error("Units do not match");var o=r.clone();return o.value=e.find(n,[o.valueType(),i.valueType()])(o.value,i.value),o.fixPrefix=!1,o})})}),uye="matAlgo11xS0s",cye=["typed","equalScalar"],Mb=Tt(uye,cye,t=>{var{typed:e,equalScalar:n}=t;return function(i,o,a,s){var l=i._values,u=i._index,c=i._ptr,f=i._size,d=i._datatype;if(!l)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var p=f[0],y=f[1],x,_=n,v=0,S=a;typeof d=="string"&&(x=d,_=e.find(n,[x,x]),v=e.convert(0,x),o=e.convert(o,x),S=e.find(a,[x,x]));for(var w=[],E=[],T=[],C=0;C{var{typed:e,DenseMatrix:n}=t;return function(i,o,a,s){var l=i._values,u=i._index,c=i._ptr,f=i._size,d=i._datatype;if(!l)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var p=f[0],y=f[1],x,_=a;typeof d=="string"&&(x=d,o=e.convert(o,x),_=e.find(a,[x,x]));for(var v=[],S=[],w=[],E=0;E{var{typed:e}=t;return function(i,o,a,s){var l=i._data,u=i._size,c=i._datatype,f,d=a;typeof c=="string"&&(f=c,o=e.convert(o,f),d=e.find(a,[f,f]));var p=u.length>0?n(d,0,u,u[0],l,o,s):[];return i.createDenseMatrix({data:p,size:Lr(u),datatype:f})};function n(r,i,o,a,s,l,u){var c=[];if(i===o.length-1)for(var f=0;f{var{typed:e,config:n,round:r}=t;return e(kR,{number:function(o){return El(o,r(o),n.epsilon)?r(o):Math.ceil(o)},"number, number":function(o,a){if(El(o,r(o,a),n.epsilon))return r(o,a);var[s,l]="".concat(o,"e").split("e"),u=Math.ceil(Number("".concat(s,"e").concat(Number(l)+a)));return[s,l]="".concat(u,"e").split("e"),Number("".concat(s,"e").concat(Number(l)-a))}})}),vye=Tt(kR,mye,t=>{var{typed:e,config:n,round:r,matrix:i,equalScalar:o,zeros:a,DenseMatrix:s}=t,l=Mb({typed:e,equalScalar:o}),u=oc({typed:e,DenseMatrix:s}),c=em({typed:e}),f=gye({typed:e,config:n,round:r});return e("ceil",{number:f.signatures.number,"number,number":f.signatures["number,number"],Complex:function(p){return p.ceil()},"Complex, number":function(p,y){return p.ceil(y)},"Complex, BigNumber":function(p,y){return p.ceil(y.toNumber())},BigNumber:function(p){return lf(p,r(p),n.epsilon)?r(p):p.ceil()},"BigNumber, BigNumber":function(p,y){return lf(p,r(p,y),n.epsilon)?r(p,y):p.toDecimalPlaces(y.toNumber(),$d.ROUND_CEIL)},Fraction:function(p){return p.ceil()},"Fraction, number":function(p,y){return p.ceil(y)},"Fraction, BigNumber":function(p,y){return p.ceil(y.toNumber())},"Array | Matrix":e.referToSelf(d=>p=>Gi(p,d)),"Array, number | BigNumber":e.referToSelf(d=>(p,y)=>Gi(p,x=>d(x,y))),"SparseMatrix, number | BigNumber":e.referToSelf(d=>(p,y)=>l(p,y,d,!1)),"DenseMatrix, number | BigNumber":e.referToSelf(d=>(p,y)=>c(p,y,d,!1)),"number | Complex | Fraction | BigNumber, Array":e.referToSelf(d=>(p,y)=>c(i(y),p,d,!0).valueOf()),"number | Complex | Fraction | BigNumber, Matrix":e.referToSelf(d=>(p,y)=>o(p,0)?a(y.size(),y.storage()):y.storage()==="dense"?c(y,p,d,!0):u(y,p,d,!0))})}),BR="fix",yye=["typed","Complex","matrix","ceil","floor","equalScalar","zeros","DenseMatrix"],xye=Tt(BR,["typed","ceil","floor"],t=>{var{typed:e,ceil:n,floor:r}=t;return e(BR,{number:function(o){return o>0?r(o):n(o)},"number, number":function(o,a){return o>0?r(o,a):n(o,a)}})}),bye=Tt(BR,yye,t=>{var{typed:e,Complex:n,matrix:r,ceil:i,floor:o,equalScalar:a,zeros:s,DenseMatrix:l}=t,u=oc({typed:e,DenseMatrix:l}),c=em({typed:e}),f=xye({typed:e,ceil:i,floor:o});return e("fix",{number:f.signatures.number,"number, number | BigNumber":f.signatures["number,number"],Complex:function(p){return new n(p.re>0?Math.floor(p.re):Math.ceil(p.re),p.im>0?Math.floor(p.im):Math.ceil(p.im))},"Complex, number":function(p,y){return new n(p.re>0?o(p.re,y):i(p.re,y),p.im>0?o(p.im,y):i(p.im,y))},"Complex, BigNumber":function(p,y){var x=y.toNumber();return new n(p.re>0?o(p.re,x):i(p.re,x),p.im>0?o(p.im,x):i(p.im,x))},BigNumber:function(p){return p.isNegative()?i(p):o(p)},"BigNumber, number | BigNumber":function(p,y){return p.isNegative()?i(p,y):o(p,y)},Fraction:function(p){return p.s<0?p.ceil():p.floor()},"Fraction, number | BigNumber":function(p,y){return p.s<0?i(p,y):o(p,y)},"Array | Matrix":e.referToSelf(d=>p=>Gi(p,d)),"Array | Matrix, number | BigNumber":e.referToSelf(d=>(p,y)=>Gi(p,x=>d(x,y))),"number | Complex | Fraction | BigNumber, Array":e.referToSelf(d=>(p,y)=>c(r(y),p,d,!0).valueOf()),"number | Complex | Fraction | BigNumber, Matrix":e.referToSelf(d=>(p,y)=>a(p,0)?s(y.size(),y.storage()):y.storage()==="dense"?c(y,p,d,!0):u(y,p,d,!0))})}),UR="floor",_ye=["typed","config","round","matrix","equalScalar","zeros","DenseMatrix"],wye=Tt(UR,["typed","config","round"],t=>{var{typed:e,config:n,round:r}=t;return e(UR,{number:function(o){return El(o,r(o),n.epsilon)?r(o):Math.floor(o)},"number, number":function(o,a){if(El(o,r(o,a),n.epsilon))return r(o,a);var[s,l]="".concat(o,"e").split("e"),u=Math.floor(Number("".concat(s,"e").concat(Number(l)+a)));return[s,l]="".concat(u,"e").split("e"),Number("".concat(s,"e").concat(Number(l)-a))}})}),Sye=Tt(UR,_ye,t=>{var{typed:e,config:n,round:r,matrix:i,equalScalar:o,zeros:a,DenseMatrix:s}=t,l=Mb({typed:e,equalScalar:o}),u=oc({typed:e,DenseMatrix:s}),c=em({typed:e}),f=wye({typed:e,config:n,round:r});return e("floor",{number:f.signatures.number,"number,number":f.signatures["number,number"],Complex:function(p){return p.floor()},"Complex, number":function(p,y){return p.floor(y)},"Complex, BigNumber":function(p,y){return p.floor(y.toNumber())},BigNumber:function(p){return lf(p,r(p),n.epsilon)?r(p):p.floor()},"BigNumber, BigNumber":function(p,y){return lf(p,r(p,y),n.epsilon)?r(p,y):p.toDecimalPlaces(y.toNumber(),$d.ROUND_FLOOR)},Fraction:function(p){return p.floor()},"Fraction, number":function(p,y){return p.floor(y)},"Fraction, BigNumber":function(p,y){return p.floor(y.toNumber())},"Array | Matrix":e.referToSelf(d=>p=>Gi(p,d)),"Array, number | BigNumber":e.referToSelf(d=>(p,y)=>Gi(p,x=>d(x,y))),"SparseMatrix, number | BigNumber":e.referToSelf(d=>(p,y)=>l(p,y,d,!1)),"DenseMatrix, number | BigNumber":e.referToSelf(d=>(p,y)=>c(p,y,d,!1)),"number | Complex | Fraction | BigNumber, Array":e.referToSelf(d=>(p,y)=>c(i(y),p,d,!0).valueOf()),"number | Complex | Fraction | BigNumber, Matrix":e.referToSelf(d=>(p,y)=>o(p,0)?a(y.size(),y.storage()):y.storage()==="dense"?c(y,p,d,!0):u(y,p,d,!0))})}),Eye="matAlgo03xDSf",Mye=["typed"],wv=Tt(Eye,Mye,t=>{var{typed:e}=t;return function(r,i,o,a){var s=r._data,l=r._size,u=r._datatype,c=i._values,f=i._index,d=i._ptr,p=i._size,y=i._datatype;if(l.length!==p.length)throw new er(l.length,p.length);if(l[0]!==p[0]||l[1]!==p[1])throw new RangeError("Dimension mismatch. Matrix A ("+l+") must match Matrix B ("+p+")");if(!c)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var x=l[0],_=l[1],v,S=0,w=o;typeof u=="string"&&u===y&&(v=u,S=e.convert(0,v),w=e.find(o,[v,v]));for(var E=[],T=0;T{var{typed:e,equalScalar:n}=t;return function(i,o,a){var s=i._values,l=i._index,u=i._ptr,c=i._size,f=i._datatype,d=o._values,p=o._index,y=o._ptr,x=o._size,_=o._datatype;if(c.length!==x.length)throw new er(c.length,x.length);if(c[0]!==x[0]||c[1]!==x[1])throw new RangeError("Dimension mismatch. Matrix A ("+c+") must match Matrix B ("+x+")");var v=c[0],S=c[1],w,E=n,T=0,C=a;typeof f=="string"&&f===_&&(w=f,E=e.find(n,[w,w]),T=e.convert(0,w),C=e.find(a,[w,w]));var D=s&&d?[]:void 0,O=[],P=[],N=D?[]:void 0,k=D?[]:void 0,G=[],Z=[],j,K,Y,$;for(K=0;K{var{typed:e}=t;return function(i,o,a){var s=i._data,l=i._size,u=i._datatype,c=o._data,f=o._size,d=o._datatype,p=[];if(l.length!==f.length)throw new er(l.length,f.length);for(var y=0;y0?n(_,0,p,p[0],s,c):[];return i.createDenseMatrix({data:v,size:p,datatype:x})};function n(r,i,o,a,s,l){var u=[];if(i===o.length-1)for(var c=0;c{var{concat:e}=t;return function(i,o){var a=Math.max(i._size.length,o._size.length);if(i._size.length===o._size.length&&i._size.every((y,x)=>y===o._size[x]))return[i,o];for(var s=n(i._size,a,0),l=n(o._size,a,0),u=[],c=0;c{var{typed:e,matrix:n,concat:r}=t,i=Pye({typed:e}),o=em({typed:e}),a=Iye({concat:r});return function(l){var u=l.elop,c=l.SD||l.DS,f;u?(f={"DenseMatrix, DenseMatrix":(x,_)=>i(...a(x,_),u),"Array, Array":(x,_)=>i(...a(n(x),n(_)),u).valueOf(),"Array, DenseMatrix":(x,_)=>i(...a(n(x),_),u),"DenseMatrix, Array":(x,_)=>i(...a(x,n(_)),u)},l.SS&&(f["SparseMatrix, SparseMatrix"]=(x,_)=>l.SS(...a(x,_),u,!1)),l.DS&&(f["DenseMatrix, SparseMatrix"]=(x,_)=>l.DS(...a(x,_),u,!1),f["Array, SparseMatrix"]=(x,_)=>l.DS(...a(n(x),_),u,!1)),c&&(f["SparseMatrix, DenseMatrix"]=(x,_)=>c(...a(_,x),u,!0),f["SparseMatrix, Array"]=(x,_)=>c(...a(n(_),x),u,!0))):(f={"DenseMatrix, DenseMatrix":e.referToSelf(x=>(_,v)=>i(...a(_,v),x)),"Array, Array":e.referToSelf(x=>(_,v)=>i(...a(n(_),n(v)),x).valueOf()),"Array, DenseMatrix":e.referToSelf(x=>(_,v)=>i(...a(n(_),v),x)),"DenseMatrix, Array":e.referToSelf(x=>(_,v)=>i(...a(_,n(v)),x))},l.SS&&(f["SparseMatrix, SparseMatrix"]=e.referToSelf(x=>(_,v)=>l.SS(...a(_,v),x,!1))),l.DS&&(f["DenseMatrix, SparseMatrix"]=e.referToSelf(x=>(_,v)=>l.DS(...a(_,v),x,!1)),f["Array, SparseMatrix"]=e.referToSelf(x=>(_,v)=>l.DS(...a(n(_),v),x,!1))),c&&(f["SparseMatrix, DenseMatrix"]=e.referToSelf(x=>(_,v)=>c(...a(v,_),x,!0)),f["SparseMatrix, Array"]=e.referToSelf(x=>(_,v)=>c(...a(n(v),_),x,!0))));var d=l.scalar||"any",p=l.Ds||l.Ss;p&&(u?(f["DenseMatrix,"+d]=(x,_)=>o(x,_,u,!1),f[d+", DenseMatrix"]=(x,_)=>o(_,x,u,!0),f["Array,"+d]=(x,_)=>o(n(x),_,u,!1).valueOf(),f[d+", Array"]=(x,_)=>o(n(_),x,u,!0).valueOf()):(f["DenseMatrix,"+d]=e.referToSelf(x=>(_,v)=>o(_,v,x,!1)),f[d+", DenseMatrix"]=e.referToSelf(x=>(_,v)=>o(v,_,x,!0)),f["Array,"+d]=e.referToSelf(x=>(_,v)=>o(n(_),v,x,!1).valueOf()),f[d+", Array"]=e.referToSelf(x=>(_,v)=>o(n(v),_,x,!0).valueOf())));var y=l.sS!==void 0?l.sS:l.Ss;return u?(l.Ss&&(f["SparseMatrix,"+d]=(x,_)=>l.Ss(x,_,u,!1)),y&&(f[d+", SparseMatrix"]=(x,_)=>y(_,x,u,!0))):(l.Ss&&(f["SparseMatrix,"+d]=e.referToSelf(x=>(_,v)=>l.Ss(_,v,x,!1))),y&&(f[d+", SparseMatrix"]=e.referToSelf(x=>(_,v)=>y(v,_,x,!0)))),u&&u.signatures&&lV(f,u.signatures),f}}),kye="matAlgo01xDSid",Bye=["typed"],qV=Tt(kye,Bye,t=>{var{typed:e}=t;return function(r,i,o,a){var s=r._data,l=r._size,u=r._datatype,c=i._values,f=i._index,d=i._ptr,p=i._size,y=i._datatype;if(l.length!==p.length)throw new er(l.length,p.length);if(l[0]!==p[0]||l[1]!==p[1])throw new RangeError("Dimension mismatch. Matrix A ("+l+") must match Matrix B ("+p+")");if(!c)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var x=l[0],_=l[1],v=typeof u=="string"&&u===y?u:void 0,S=v?e.find(o,[v,v]):o,w,E,T=[];for(w=0;w{var{typed:e,equalScalar:n}=t;return function(i,o,a){var s=i._values,l=i._index,u=i._ptr,c=i._size,f=i._datatype,d=o._values,p=o._index,y=o._ptr,x=o._size,_=o._datatype;if(c.length!==x.length)throw new er(c.length,x.length);if(c[0]!==x[0]||c[1]!==x[1])throw new RangeError("Dimension mismatch. Matrix A ("+c+") must match Matrix B ("+x+")");var v=c[0],S=c[1],w,E=n,T=0,C=a;typeof f=="string"&&f===_&&(w=f,E=e.find(n,[w,w]),T=e.convert(0,w),C=e.find(a,[w,w]));var D=s&&d?[]:void 0,O=[],P=[],N=s&&d?[]:void 0,k=s&&d?[]:void 0,G=[],Z=[],j,K,Y,$,W;for(K=0;K{var{typed:e,DenseMatrix:n}=t;return function(i,o,a,s){var l=i._values,u=i._index,c=i._ptr,f=i._size,d=i._datatype;if(!l)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var p=f[0],y=f[1],x,_=a;typeof d=="string"&&(x=d,o=e.convert(o,x),_=e.find(a,[x,x]));for(var v=[],S=[],w=[],E=0;E{var{typed:e}=t;return e("multiplyScalar",{"number, number":VV,"Complex, Complex":function(r,i){return r.mul(i)},"BigNumber, BigNumber":function(r,i){return r.times(i)},"Fraction, Fraction":function(r,i){return r.mul(i)},"number | Fraction | BigNumber | Complex, Unit":(n,r)=>r.multiply(n),"Unit, number | Fraction | BigNumber | Complex | Unit":(n,r)=>n.multiply(r)})}),lk="multiply",qye=["typed","matrix","addScalar","multiplyScalar","equalScalar","dot"],Xye=Tt(lk,qye,t=>{var{typed:e,matrix:n,addScalar:r,multiplyScalar:i,equalScalar:o,dot:a}=t,s=Mb({typed:e,equalScalar:o}),l=em({typed:e});function u(T,C){switch(T.length){case 1:switch(C.length){case 1:if(T[0]!==C[0])throw new RangeError("Dimension mismatch in multiplication. Vectors must have the same length");break;case 2:if(T[0]!==C[0])throw new RangeError("Dimension mismatch in multiplication. Vector length ("+T[0]+") must match Matrix rows ("+C[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+C.length+" dimensions)")}break;case 2:switch(C.length){case 1:if(T[1]!==C[0])throw new RangeError("Dimension mismatch in multiplication. Matrix columns ("+T[1]+") must match Vector length ("+C[0]+")");break;case 2:if(T[1]!==C[0])throw new RangeError("Dimension mismatch in multiplication. Matrix A columns ("+T[1]+") must match Matrix B rows ("+C[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+C.length+" dimensions)")}break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix A has "+T.length+" dimensions)")}}function c(T,C,D){if(D===0)throw new Error("Cannot multiply two empty vectors");return a(T,C)}function f(T,C){if(C.storage()!=="dense")throw new Error("Support for SparseMatrix not implemented");return d(T,C)}function d(T,C){var D=T._data,O=T._size,P=T._datatype,N=C._data,k=C._size,G=C._datatype,Z=O[0],j=k[1],K,Y=r,$=i;P&&G&&P===G&&typeof P=="string"&&(K=P,Y=e.find(r,[K,K]),$=e.find(i,[K,K]));for(var W=[],U=0;UHe)for(var Qe=0,ct=0;ct(C,D)=>{u(wa(C),wa(D));var O=T(n(C),n(D));return di(O)?O.valueOf():O}),"Matrix, Matrix":function(C,D){var O=C.size(),P=D.size();return u(O,P),O.length===1?P.length===1?c(C,D,O[0]):f(C,D):P.length===1?p(C,D):y(C,D)},"Matrix, Array":e.referTo("Matrix,Matrix",T=>(C,D)=>T(C,n(D))),"Array, Matrix":e.referToSelf(T=>(C,D)=>T(n(C,D.storage()),D)),"SparseMatrix, any":function(C,D){return s(C,D,i,!1)},"DenseMatrix, any":function(C,D){return l(C,D,i,!1)},"any, SparseMatrix":function(C,D){return s(D,C,i,!0)},"any, DenseMatrix":function(C,D){return l(D,C,i,!0)},"Array, any":function(C,D){return l(n(C),D,i,!1).valueOf()},"any, Array":function(C,D){return l(n(D),C,i,!0).valueOf()},"any, any":i,"any, any, ...any":e.referToSelf(T=>(C,D,O)=>{for(var P=T(C,D),N=0;N{var{typed:e,matrix:n,equalScalar:r,subtractScalar:i,unaryMinus:o,DenseMatrix:a,concat:s}=t,l=qV({typed:e}),u=wv({typed:e}),c=Tye({typed:e,equalScalar:r}),f=XV({typed:e,DenseMatrix:a}),d=oc({typed:e,DenseMatrix:a}),p=tm({typed:e,matrix:n,concat:s});return e(uk,{"any, any":i},p({elop:i,SS:c,DS:l,SD:u,Ss:d,sS:f}))}),Zye="matAlgo07xSSf",Jye=["typed","DenseMatrix"],Cb=Tt(Zye,Jye,t=>{var{typed:e,DenseMatrix:n}=t;return function(o,a,s){var l=o._size,u=o._datatype,c=a._size,f=a._datatype;if(l.length!==c.length)throw new er(l.length,c.length);if(l[0]!==c[0]||l[1]!==c[1])throw new RangeError("Dimension mismatch. Matrix A ("+l+") must match Matrix B ("+c+")");var d=l[0],p=l[1],y,x=0,_=s;typeof u=="string"&&u===f&&(y=u,x=e.convert(0,y),_=e.find(s,[y,y]));var v,S,w=[];for(v=0;v{var{typed:e}=t;return e(ck,{"number | BigNumber | Fraction":n=>n,Complex:n=>n.conjugate(),"Array | Matrix":e.referToSelf(n=>r=>Gi(r,n))})}),fk="concat",t1e=["typed","matrix","isInteger"],n1e=Tt(fk,t1e,t=>{var{typed:e,matrix:n,isInteger:r}=t;return e(fk,{"...Array | Matrix | number | BigNumber":function(o){var a,s=o.length,l=-1,u,c=!1,f=[];for(a=0;a0&&l>u)throw new th(l,u+1)}else{var p=Lr(d).valueOf(),y=wa(p);if(f[a]=p,u=l,l=y.length-1,a>0&&l!==u)throw new er(u+1,l+1)}}if(f.length===0)throw new SyntaxError("At least one matrix expected");for(var x=f.shift();f.length;)x=xV(x,f.shift(),l);return c?n(x):x},"...string":function(o){return o.join("")}})}),dk="identity",r1e=["typed","config","matrix","BigNumber","DenseMatrix","SparseMatrix"],i1e=Tt(dk,r1e,t=>{var{typed:e,config:n,matrix:r,BigNumber:i,DenseMatrix:o,SparseMatrix:a}=t;return e(dk,{"":function(){return n.matrix==="Matrix"?r([]):[]},string:function(c){return r(c)},"number | BigNumber":function(c){return l(c,c,n.matrix==="Matrix"?"dense":void 0)},"number | BigNumber, string":function(c,f){return l(c,c,f)},"number | BigNumber, number | BigNumber":function(c,f){return l(c,f,n.matrix==="Matrix"?"dense":void 0)},"number | BigNumber, number | BigNumber, string":function(c,f,d){return l(c,f,d)},Array:function(c){return s(c)},"Array, string":function(c,f){return s(c,f)},Matrix:function(c){return s(c.valueOf(),c.storage())},"Matrix, string":function(c,f){return s(c.valueOf(),f)}});function s(u,c){switch(u.length){case 0:return c?r(c):[];case 1:return l(u[0],u[0],c);case 2:return l(u[0],u[1],c);default:throw new Error("Vector containing two values expected")}}function l(u,c,f){var d=fo(u)||fo(c)?i:null;if(fo(u)&&(u=u.toNumber()),fo(c)&&(c=c.toNumber()),!Pr(u)||u<1)throw new Error("Parameters in function identity must be positive integers");if(!Pr(c)||c<1)throw new Error("Parameters in function identity must be positive integers");var p=d?new i(1):1,y=d?new d(0):0,x=[u,c];if(f){if(f==="sparse")return a.diagonal(x,p,0,y);if(f==="dense")return o.diagonal(x,p,0,y);throw new TypeError('Unknown matrix type "'.concat(f,'"'))}for(var _=n2([],x,y),v=u{var{typed:e,config:n,matrix:r}=t;return e(hk,{Matrix:function(o){return o.create(o.size())},Array:wa,string:function(o){return n.matrix==="Array"?[o.length]:r([o.length])},"number | Complex | BigNumber | Unit | boolean | null":function(o){return n.matrix==="Array"?[]:r?r([]):s1e()}})}),pk="zeros",c1e=["typed","config","matrix","BigNumber"],f1e=Tt(pk,c1e,t=>{var{typed:e,config:n,matrix:r,BigNumber:i}=t;return e(pk,{"":function(){return n.matrix==="Array"?o([]):o([],"default")},"...number | BigNumber | string":function(u){var c=u[u.length-1];if(typeof c=="string"){var f=u.pop();return o(u,f)}else return n.matrix==="Array"?o(u):o(u,"default")},Array:o,Matrix:function(u){var c=u.storage();return o(u.valueOf(),c)},"Array | Matrix, string":function(u,c){return o(u.valueOf(),c)}});function o(l,u){var c=a(l),f=c?new i(0):0;if(s(l),u){var d=r(u);return l.length>0?d.resize(l,f):d}else{var p=[];return l.length>0?n2(p,l,f):p}}function a(l){var u=!1;return l.forEach(function(c,f,d){fo(c)&&(u=!0,d[f]=c.toNumber())}),u}function s(l){l.forEach(function(u){if(typeof u!="number"||!Pr(u)||u<0)throw new Error("Parameters in function zeros must be positive integers")})}});function Nx(t){"@babel/helpers - typeof";return Nx=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},Nx(t)}function d1e(t,e){if(Nx(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Nx(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function h1e(t){var e=d1e(t,"string");return Nx(e)=="symbol"?e:String(e)}function p1e(t,e,n){return e=h1e(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function c2(t,e,n){var r;return String(t).indexOf("Unexpected type")!==-1?(r=arguments.length>2?" (type: "+ml(n)+", value: "+JSON.stringify(n)+")":" (type: "+t.data.actual+")",new TypeError("Cannot calculate "+e+", unexpected type of argument"+r)):String(t).indexOf("complex numbers")!==-1?(r=arguments.length>2?" (type: "+ml(n)+", value: "+JSON.stringify(n)+")":"",new TypeError("Cannot calculate "+e+", no ordering relation is defined for complex numbers"+r)):t}var mk="format",m1e=["typed"],g1e=Tt(mk,m1e,t=>{var{typed:e}=t;return e(mk,{any:ui,"any, Object | function | number":ui})}),v1e="numeric",y1e=["number","?bignumber","?fraction"],x1e=Tt(v1e,y1e,t=>{var{number:e,bignumber:n,fraction:r}=t,i={string:!0,number:!0,BigNumber:!0,Fraction:!0},o={number:a=>e(a),BigNumber:n?a=>n(a):o1e,Fraction:r?a=>r(a):a1e};return function(s){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"number",u=arguments.length>2?arguments[2]:void 0;if(u!==void 0)throw new SyntaxError("numeric() takes one or two arguments");var c=ml(s);if(!(c in i))throw new TypeError("Cannot convert "+s+' of type "'+c+'"; valid input types are '+Object.keys(i).join(", "));if(!(l in o))throw new TypeError("Cannot convert "+s+' to type "'+l+'"; valid output types are '+Object.keys(o).join(", "));return l===c?s:o[l](s)}}),gk="divideScalar",b1e=["typed","numeric"],_1e=Tt(gk,b1e,t=>{var{typed:e,numeric:n}=t;return e(gk,{"number, number":function(i,o){return i/o},"Complex, Complex":function(i,o){return i.div(o)},"BigNumber, BigNumber":function(i,o){return i.div(o)},"Fraction, Fraction":function(i,o){return i.div(o)},"Unit, number | Complex | Fraction | BigNumber | Unit":(r,i)=>r.divide(i),"number | Fraction | Complex | BigNumber, Unit":(r,i)=>i.divideInto(r)})}),vk="pow",w1e=["typed","config","identity","multiply","matrix","inv","fraction","number","Complex"],S1e=Tt(vk,w1e,t=>{var{typed:e,config:n,identity:r,multiply:i,matrix:o,inv:a,number:s,fraction:l,Complex:u}=t;return e(vk,{"number, number":c,"Complex, Complex":function(y,x){return y.pow(x)},"BigNumber, BigNumber":function(y,x){return x.isInteger()||y>=0||n.predictable?y.pow(x):new u(y.toNumber(),0).pow(x.toNumber(),0)},"Fraction, Fraction":function(y,x){var _=y.pow(x);if(_!=null)return _;if(n.predictable)throw new Error("Result of pow is non-rational and cannot be expressed as a fraction");return c(y.valueOf(),x.valueOf())},"Array, number":f,"Array, BigNumber":function(y,x){return f(y,x.toNumber())},"Matrix, number":d,"Matrix, BigNumber":function(y,x){return d(y,x.toNumber())},"Unit, number | BigNumber":function(y,x){return y.pow(x)}});function c(p,y){if(n.predictable&&!Pr(y)&&p<0)try{var x=l(y),_=s(x);if((y===_||Math.abs((y-_)/y)<1e-14)&&x.d%2===1)return(x.n%2===0?1:-1)*Math.pow(-p,y)}catch{}return n.predictable&&(p<-1&&y===1/0||p>-1&&p<0&&y===-1/0)?NaN:Pr(y)||p>=0||n.predictable?GV(p,y):p*p<1&&y===1/0||p*p>1&&y===-1/0?0:new u(p,0).pow(y,0)}function f(p,y){if(!Pr(y))throw new TypeError("For A^b, b must be an integer (value is "+y+")");var x=wa(p);if(x.length!==2)throw new Error("For A^b, A must be 2 dimensional (A has "+x.length+" dimensions)");if(x[0]!==x[1])throw new Error("For A^b, A must be square (size is "+x[0]+"x"+x[1]+")");if(y<0)try{return f(a(p),-y)}catch(S){throw S.message==="Cannot calculate inverse, determinant is zero"?new TypeError("For A^b, when A is not invertible, b must be a positive integer (value is "+y+")"):S}for(var _=r(x[0]).valueOf(),v=p;y>=1;)(y&1)===1&&(_=i(v,_)),y>>=1,v=i(v,v);return _}function d(p,y){return o(f(p.valueOf(),y))}}),s0="Number of decimals in function round must be an integer",yk="round",E1e=["typed","matrix","equalScalar","zeros","BigNumber","DenseMatrix"],M1e=Tt(yk,E1e,t=>{var{typed:e,matrix:n,equalScalar:r,zeros:i,BigNumber:o,DenseMatrix:a}=t,s=Mb({typed:e,equalScalar:r}),l=oc({typed:e,DenseMatrix:a}),u=em({typed:e});return e(yk,{number:ek,"number, number":ek,"number, BigNumber":function(f,d){if(!d.isInteger())throw new TypeError(s0);return new o(f).toDecimalPlaces(d.toNumber())},Complex:function(f){return f.round()},"Complex, number":function(f,d){if(d%1)throw new TypeError(s0);return f.round(d)},"Complex, BigNumber":function(f,d){if(!d.isInteger())throw new TypeError(s0);var p=d.toNumber();return f.round(p)},BigNumber:function(f){return f.toDecimalPlaces(0)},"BigNumber, BigNumber":function(f,d){if(!d.isInteger())throw new TypeError(s0);return f.toDecimalPlaces(d.toNumber())},Fraction:function(f){return f.round()},"Fraction, number":function(f,d){if(d%1)throw new TypeError(s0);return f.round(d)},"Fraction, BigNumber":function(f,d){if(!d.isInteger())throw new TypeError(s0);return f.round(d.toNumber())},"Unit, number, Unit":e.referToSelf(c=>function(f,d,p){var y=f.toNumeric(p);return p.multiply(c(y,d))}),"Unit, BigNumber, Unit":e.referToSelf(c=>(f,d,p)=>c(f,d.toNumber(),p)),"Unit, Unit":e.referToSelf(c=>(f,d)=>c(f,0,d)),"Array | Matrix, number, Unit":e.referToSelf(c=>(f,d,p)=>Gi(f,y=>c(y,d,p))),"Array | Matrix, BigNumber, Unit":e.referToSelf(c=>(f,d,p)=>c(f,d.toNumber(),p)),"Array | Matrix, Unit":e.referToSelf(c=>(f,d)=>c(f,0,d)),"Array | Matrix":e.referToSelf(c=>f=>Gi(f,c)),"SparseMatrix, number | BigNumber":e.referToSelf(c=>(f,d)=>s(f,d,c,!1)),"DenseMatrix, number | BigNumber":e.referToSelf(c=>(f,d)=>u(f,d,c,!1)),"Array, number | BigNumber":e.referToSelf(c=>(f,d)=>u(n(f),d,c,!1).valueOf()),"number | Complex | BigNumber | Fraction, SparseMatrix":e.referToSelf(c=>(f,d)=>r(f,0)?i(d.size(),d.storage()):l(d,f,c,!0)),"number | Complex | BigNumber | Fraction, DenseMatrix":e.referToSelf(c=>(f,d)=>r(f,0)?i(d.size(),d.storage()):u(d,f,c,!0)),"number | Complex | BigNumber | Fraction, Array":e.referToSelf(c=>(f,d)=>u(n(d),f,c,!0).valueOf())})}),f2="equal",C1e=["typed","matrix","equalScalar","DenseMatrix","concat"],A1e=Tt(f2,C1e,t=>{var{typed:e,matrix:n,equalScalar:r,DenseMatrix:i,concat:o}=t,a=wv({typed:e}),s=Cb({typed:e,DenseMatrix:i}),l=oc({typed:e,DenseMatrix:i}),u=tm({typed:e,matrix:n,concat:o});return e(f2,T1e({typed:e,equalScalar:r}),u({elop:r,SS:s,DS:a,Ss:l}))}),T1e=Tt(f2,["typed","equalScalar"],t=>{var{typed:e,equalScalar:n}=t;return e(f2,{"any, any":function(i,o){return i===null?o===null:o===null?i===null:i===void 0?o===void 0:o===void 0?i===void 0:n(i,o)}})}),d2="smaller",D1e=["typed","config","matrix","DenseMatrix","concat"],R1e=Tt(d2,D1e,t=>{var{typed:e,config:n,matrix:r,DenseMatrix:i,concat:o}=t,a=wv({typed:e}),s=Cb({typed:e,DenseMatrix:i}),l=oc({typed:e,DenseMatrix:i}),u=tm({typed:e,matrix:r,concat:o}),c=Eb({typed:e});return e(d2,P1e({typed:e,config:n}),{"boolean, boolean":(f,d)=>ff.compare(d)===-1,"Complex, Complex":function(d,p){throw new TypeError("No ordering relation is defined for complex numbers")}},c,u({SS:s,DS:a,Ss:l}))}),P1e=Tt(d2,["typed","config"],t=>{var{typed:e,config:n}=t;return e(d2,{"number, number":function(i,o){return i{var{typed:e,config:n,matrix:r,DenseMatrix:i,concat:o}=t,a=wv({typed:e}),s=Cb({typed:e,DenseMatrix:i}),l=oc({typed:e,DenseMatrix:i}),u=tm({typed:e,matrix:r,concat:o}),c=Eb({typed:e});return e(h2,I1e({typed:e,config:n}),{"boolean, boolean":(f,d)=>f<=d,"BigNumber, BigNumber":function(d,p){return d.lte(p)||lf(d,p,n.epsilon)},"Fraction, Fraction":(f,d)=>f.compare(d)!==1,"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},c,u({SS:s,DS:a,Ss:l}))}),I1e=Tt(h2,["typed","config"],t=>{var{typed:e,config:n}=t;return e(h2,{"number, number":function(i,o){return i<=o||El(i,o,n.epsilon)}})}),p2="larger",F1e=["typed","config","matrix","DenseMatrix","concat"],L1e=Tt(p2,F1e,t=>{var{typed:e,config:n,matrix:r,DenseMatrix:i,concat:o}=t,a=wv({typed:e}),s=Cb({typed:e,DenseMatrix:i}),l=oc({typed:e,DenseMatrix:i}),u=tm({typed:e,matrix:r,concat:o}),c=Eb({typed:e});return e(p2,k1e({typed:e,config:n}),{"boolean, boolean":(f,d)=>f>d,"BigNumber, BigNumber":function(d,p){return d.gt(p)&&!lf(d,p,n.epsilon)},"Fraction, Fraction":(f,d)=>f.compare(d)===1,"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},c,u({SS:s,DS:a,Ss:l}))}),k1e=Tt(p2,["typed","config"],t=>{var{typed:e,config:n}=t;return e(p2,{"number, number":function(i,o){return i>o&&!El(i,o,n.epsilon)}})}),m2="largerEq",B1e=["typed","config","matrix","DenseMatrix","concat"],U1e=Tt(m2,B1e,t=>{var{typed:e,config:n,matrix:r,DenseMatrix:i,concat:o}=t,a=wv({typed:e}),s=Cb({typed:e,DenseMatrix:i}),l=oc({typed:e,DenseMatrix:i}),u=tm({typed:e,matrix:r,concat:o}),c=Eb({typed:e});return e(m2,z1e({typed:e,config:n}),{"boolean, boolean":(f,d)=>f>=d,"BigNumber, BigNumber":function(d,p){return d.gte(p)||lf(d,p,n.epsilon)},"Fraction, Fraction":(f,d)=>f.compare(d)!==-1,"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},c,u({SS:s,DS:a,Ss:l}))}),z1e=Tt(m2,["typed","config"],t=>{var{typed:e,config:n}=t;return e(m2,{"number, number":function(i,o){return i>=o||El(i,o,n.epsilon)}})}),xk="max",$1e=["typed","config","numeric","larger"],H1e=Tt(xk,$1e,t=>{var{typed:e,config:n,numeric:r,larger:i}=t;return e(xk,{"Array | Matrix":a,"Array | Matrix, number | BigNumber":function(l,u){return BV(l,u.valueOf(),o)},"...":function(l){if(kV(l))throw new TypeError("Scalar values expected in function max");return a(l)}});function o(s,l){try{return i(s,l)?s:l}catch(u){throw c2(u,"max",l)}}function a(s){var l;if(ZO(s,function(u){try{isNaN(u)&&typeof u=="number"?l=NaN:(l===void 0||i(u,l))&&(l=u)}catch(c){throw c2(c,"max",u)}}),l===void 0)throw new Error("Cannot calculate max of an empty array");return typeof l=="string"&&(l=r(l,n.number)),l}}),bk="min",V1e=["typed","config","numeric","smaller"],W1e=Tt(bk,V1e,t=>{var{typed:e,config:n,numeric:r,smaller:i}=t;return e(bk,{"Array | Matrix":a,"Array | Matrix, number | BigNumber":function(l,u){return BV(l,u.valueOf(),o)},"...":function(l){if(kV(l))throw new TypeError("Scalar values expected in function min");return a(l)}});function o(s,l){try{return i(s,l)?s:l}catch(u){throw c2(u,"min",l)}}function a(s){var l;if(ZO(s,function(u){try{isNaN(u)&&typeof u=="number"?l=NaN:(l===void 0||i(u,l))&&(l=u)}catch(c){throw c2(c,"min",u)}}),l===void 0)throw new Error("Cannot calculate min of an empty array");return typeof l=="string"&&(l=r(l,n.number)),l}});Sb(function(t){return new t(1).exp()},{hasher:mC});Sb(function(t){return new t(1).plus(new t(5).sqrt()).div(2)},{hasher:mC});var YV=Sb(function(t){return t.acos(-1)},{hasher:mC});Sb(function(t){return YV(t).times(2)},{hasher:mC});function mC(t){return t[0].precision}function _k(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function KT(t){for(var e=1;e{var{on:e,config:n,addScalar:r,subtractScalar:i,multiplyScalar:o,divideScalar:a,pow:s,abs:l,fix:u,round:c,equal:f,isNumeric:d,format:p,number:y,Complex:x,BigNumber:_,Fraction:v}=t,S=y;function w(X,ne){if(!(this instanceof w))throw new Error("Constructor must be called with the new operator");if(!(X==null||d(X)||G1(X)))throw new TypeError("First parameter in Unit constructor must be number, BigNumber, Fraction, Complex, or undefined");if(this.fixPrefix=!1,this.skipAutomaticSimplification=!0,ne===void 0)this.units=[],this.dimensions=W.map(we=>0);else if(typeof ne=="string"){var me=w.parse(ne);this.units=me.units,this.dimensions=me.dimensions}else if(cd(ne)&&ne.value===null)this.fixPrefix=ne.fixPrefix,this.skipAutomaticSimplification=ne.skipAutomaticSimplification,this.dimensions=ne.dimensions.slice(0),this.units=ne.units.map(we=>Q({},we));else throw new TypeError("Second parameter in Unit constructor must be a string or valueless Unit");this.value=this._normalize(X)}Object.defineProperty(w,"name",{value:"Unit"}),w.prototype.constructor=w,w.prototype.type="Unit",w.prototype.isUnit=!0;var E,T,C;function D(){for(;C===" "||C===" ";)N()}function O(X){return X>="0"&&X<="9"||X==="."}function P(X){return X>="0"&&X<="9"}function N(){T++,C=E.charAt(T)}function k(X){T=X,C=E.charAt(T)}function G(){var X="",ne=T;if(C==="+"?N():C==="-"&&(X+=C,N()),!O(C))return k(ne),null;if(C==="."){if(X+=C,N(),!P(C))return k(ne),null}else{for(;P(C);)X+=C,N();C==="."&&(X+=C,N())}for(;P(C);)X+=C,N();if(C==="E"||C==="e"){var me="",we=T;if(me+=C,N(),(C==="+"||C==="-")&&(me+=C,N()),!P(C))return k(we),X;for(X=X+me;P(C);)X+=C,N()}return X}function Z(){for(var X="";P(C)||w.isValidAlpha(C);)X+=C,N();var ne=X.charAt(0);return w.isValidAlpha(ne)?X:null}function j(X){return C===X?(N(),X):null}w.parse=function(X,ne){if(ne=ne||{},E=X,T=-1,C="",typeof E!="string")throw new TypeError("Invalid argument in Unit.parse, string expected");var me=new w;me.units=[];var we=1,Ne=!1;N(),D();var Ue=G(),We=null;if(Ue){if(n.number==="BigNumber")We=new _(Ue);else if(n.number==="Fraction")try{We=new v(Ue)}catch{We=parseFloat(Ue)}else We=parseFloat(Ue);D(),j("*")?(we=1,Ne=!0):j("/")&&(we=-1,Ne=!0)}for(var lt=[],z=1;;){for(D();C==="(";)lt.push(we),z*=we,we=1,N(),D();var B=void 0;if(C){var oe=C;if(B=Z(),B===null)throw new SyntaxError('Unexpected "'+oe+'" in "'+E+'" at index '+T.toString())}else break;var ge=K(B);if(ge===null)throw new SyntaxError('Unit "'+B+'" not found.');var pe=we*z;if(D(),j("^")){D();var de=G();if(de===null)throw new SyntaxError('In "'+X+'", "^" must be followed by a floating-point number');pe*=de}me.units.push({unit:ge.unit,prefix:ge.prefix,power:pe});for(var ve=0;ve1||Math.abs(this.units[0].power-1)>1e-15},w.prototype._normalize=function(X){if(X==null||this.units.length===0)return X;for(var ne=X,me=w._getNumberConverter(ml(X)),we=0;we{if(dr(ce,X)){var ne=ce[X],me=ne.prefixes[""];return{unit:ne,prefix:me}}for(var we in ce)if(dr(ce,we)&&Y0e(X,we)){var Ne=ce[we],Ue=X.length-we.length,We=X.substring(0,Ue),lt=dr(Ne.prefixes,We)?Ne.prefixes[We]:void 0;if(lt!==void 0)return{unit:Ne,prefix:lt}}return null},{hasher:X=>X[0],limit:100});w.isValuelessUnit=function(X){return K(X)!==null},w.prototype.hasBase=function(X){if(typeof X=="string"&&(X=U[X]),!X)return!1;for(var ne=0;ne1e-12)return!1;return!0},w.prototype.equalBase=function(X){for(var ne=0;ne1e-12)return!1;return!0},w.prototype.equals=function(X){return this.equalBase(X)&&f(this.value,X.value)},w.prototype.multiply=function(X){for(var ne=this.clone(),me=cd(X)?X:new w(X),we=0;we1e-12&&(dr(He,lt)?ne.push({unit:He[lt].unit,prefix:He[lt].prefix,power:X.dimensions[We]||0}):Ue=!0)}ne.length1e-12)if(dr(Ie.si,we))ne.push({unit:Ie.si[we].unit,prefix:Ie.si[we].prefix,power:X.dimensions[me]||0});else throw new Error("Cannot express custom unit "+we+" in SI units")}return X.units=ne,X.fixPrefix=!0,X.skipAutomaticSimplification=!0,X},w.prototype.formatUnits=function(){for(var X="",ne="",me=0,we=0,Ne=0;Ne0?(me++,X+=" "+this.units[Ne].prefix.name+this.units[Ne].unit.name,Math.abs(this.units[Ne].power-1)>1e-15&&(X+="^"+this.units[Ne].power)):this.units[Ne].power<0&&we++;if(we>0)for(var Ue=0;Ue0?(ne+=" "+this.units[Ue].prefix.name+this.units[Ue].unit.name,Math.abs(this.units[Ue].power+1)>1e-15&&(ne+="^"+-this.units[Ue].power)):(ne+=" "+this.units[Ue].prefix.name+this.units[Ue].unit.name,ne+="^"+this.units[Ue].power));X=X.substr(1),ne=ne.substr(1),me>1&&we>0&&(X="("+X+")"),we>1&&me>0&&(ne="("+ne+")");var We=X;return me>0&&we>0&&(We+=" / "),We+=ne,We},w.prototype.format=function(X){var ne=this.skipAutomaticSimplification||this.value===null?this.clone():this.simplify(),me=!1;typeof ne.value<"u"&&ne.value!==null&&G1(ne.value)&&(me=Math.abs(ne.value.re)<1e-14);for(var we in ne.units)dr(ne.units,we)&&ne.units[we].unit&&(ne.units[we].unit.name==="VA"&&me?ne.units[we].unit=ce.VAR:ne.units[we].unit.name==="VAR"&&!me&&(ne.units[we].unit=ce.VA));ne.units.length===1&&!ne.fixPrefix&&Math.abs(ne.units[0].power-Math.round(ne.units[0].power))<1e-14&&(ne.units[0].prefix=ne._bestPrefix());var Ne=ne._denormalize(ne.value),Ue=ne.value!==null?p(Ne,X||{}):"",We=ne.formatUnits();return ne.value&&G1(ne.value)&&(Ue="("+Ue+")"),We.length>0&&Ue.length>0&&(Ue+=" "),Ue+=We,Ue},w.prototype._bestPrefix=function(){if(this.units.length!==1)throw new Error("Can only compute the best prefix for single units with integer powers, like kg, s^2, N^-1, and so forth!");if(Math.abs(this.units[0].power-Math.round(this.units[0].power))>=1e-14)throw new Error("Can only compute the best prefix for single units with integer powers, like kg, s^2, N^-1, and so forth!");var X=this.value!==null?l(this.value):0,ne=l(this.units[0].unit.value),me=this.units[0].prefix;if(X===0)return me;var we=this.units[0].power,Ne=Math.log(X/Math.pow(me.value*ne,we))/Math.LN10-1.2;if(Ne>-2.200001&&Ne<1.800001)return me;Ne=Math.abs(Ne);var Ue=this.units[0].unit.prefixes;for(var We in Ue)if(dr(Ue,We)){var lt=Ue[We];if(lt.scientific){var z=Math.abs(Math.log(X/Math.pow(lt.value*ne,we))/Math.LN10-1.2);(z0)},ce={meter:{name:"meter",base:U.LENGTH,prefixes:$.LONG,value:1,offset:0},inch:{name:"inch",base:U.LENGTH,prefixes:$.NONE,value:.0254,offset:0},foot:{name:"foot",base:U.LENGTH,prefixes:$.NONE,value:.3048,offset:0},yard:{name:"yard",base:U.LENGTH,prefixes:$.NONE,value:.9144,offset:0},mile:{name:"mile",base:U.LENGTH,prefixes:$.NONE,value:1609.344,offset:0},link:{name:"link",base:U.LENGTH,prefixes:$.NONE,value:.201168,offset:0},rod:{name:"rod",base:U.LENGTH,prefixes:$.NONE,value:5.0292,offset:0},chain:{name:"chain",base:U.LENGTH,prefixes:$.NONE,value:20.1168,offset:0},angstrom:{name:"angstrom",base:U.LENGTH,prefixes:$.NONE,value:1e-10,offset:0},m:{name:"m",base:U.LENGTH,prefixes:$.SHORT,value:1,offset:0},in:{name:"in",base:U.LENGTH,prefixes:$.NONE,value:.0254,offset:0},ft:{name:"ft",base:U.LENGTH,prefixes:$.NONE,value:.3048,offset:0},yd:{name:"yd",base:U.LENGTH,prefixes:$.NONE,value:.9144,offset:0},mi:{name:"mi",base:U.LENGTH,prefixes:$.NONE,value:1609.344,offset:0},li:{name:"li",base:U.LENGTH,prefixes:$.NONE,value:.201168,offset:0},rd:{name:"rd",base:U.LENGTH,prefixes:$.NONE,value:5.02921,offset:0},ch:{name:"ch",base:U.LENGTH,prefixes:$.NONE,value:20.1168,offset:0},mil:{name:"mil",base:U.LENGTH,prefixes:$.NONE,value:254e-7,offset:0},m2:{name:"m2",base:U.SURFACE,prefixes:$.SQUARED,value:1,offset:0},sqin:{name:"sqin",base:U.SURFACE,prefixes:$.NONE,value:64516e-8,offset:0},sqft:{name:"sqft",base:U.SURFACE,prefixes:$.NONE,value:.09290304,offset:0},sqyd:{name:"sqyd",base:U.SURFACE,prefixes:$.NONE,value:.83612736,offset:0},sqmi:{name:"sqmi",base:U.SURFACE,prefixes:$.NONE,value:2589988110336e-6,offset:0},sqrd:{name:"sqrd",base:U.SURFACE,prefixes:$.NONE,value:25.29295,offset:0},sqch:{name:"sqch",base:U.SURFACE,prefixes:$.NONE,value:404.6873,offset:0},sqmil:{name:"sqmil",base:U.SURFACE,prefixes:$.NONE,value:64516e-14,offset:0},acre:{name:"acre",base:U.SURFACE,prefixes:$.NONE,value:4046.86,offset:0},hectare:{name:"hectare",base:U.SURFACE,prefixes:$.NONE,value:1e4,offset:0},m3:{name:"m3",base:U.VOLUME,prefixes:$.CUBIC,value:1,offset:0},L:{name:"L",base:U.VOLUME,prefixes:$.SHORT,value:.001,offset:0},l:{name:"l",base:U.VOLUME,prefixes:$.SHORT,value:.001,offset:0},litre:{name:"litre",base:U.VOLUME,prefixes:$.LONG,value:.001,offset:0},cuin:{name:"cuin",base:U.VOLUME,prefixes:$.NONE,value:16387064e-12,offset:0},cuft:{name:"cuft",base:U.VOLUME,prefixes:$.NONE,value:.028316846592,offset:0},cuyd:{name:"cuyd",base:U.VOLUME,prefixes:$.NONE,value:.764554857984,offset:0},teaspoon:{name:"teaspoon",base:U.VOLUME,prefixes:$.NONE,value:5e-6,offset:0},tablespoon:{name:"tablespoon",base:U.VOLUME,prefixes:$.NONE,value:15e-6,offset:0},drop:{name:"drop",base:U.VOLUME,prefixes:$.NONE,value:5e-8,offset:0},gtt:{name:"gtt",base:U.VOLUME,prefixes:$.NONE,value:5e-8,offset:0},minim:{name:"minim",base:U.VOLUME,prefixes:$.NONE,value:6161152e-14,offset:0},fluiddram:{name:"fluiddram",base:U.VOLUME,prefixes:$.NONE,value:36966911e-13,offset:0},fluidounce:{name:"fluidounce",base:U.VOLUME,prefixes:$.NONE,value:2957353e-11,offset:0},gill:{name:"gill",base:U.VOLUME,prefixes:$.NONE,value:.0001182941,offset:0},cc:{name:"cc",base:U.VOLUME,prefixes:$.NONE,value:1e-6,offset:0},cup:{name:"cup",base:U.VOLUME,prefixes:$.NONE,value:.0002365882,offset:0},pint:{name:"pint",base:U.VOLUME,prefixes:$.NONE,value:.0004731765,offset:0},quart:{name:"quart",base:U.VOLUME,prefixes:$.NONE,value:.0009463529,offset:0},gallon:{name:"gallon",base:U.VOLUME,prefixes:$.NONE,value:.003785412,offset:0},beerbarrel:{name:"beerbarrel",base:U.VOLUME,prefixes:$.NONE,value:.1173478,offset:0},oilbarrel:{name:"oilbarrel",base:U.VOLUME,prefixes:$.NONE,value:.1589873,offset:0},hogshead:{name:"hogshead",base:U.VOLUME,prefixes:$.NONE,value:.238481,offset:0},fldr:{name:"fldr",base:U.VOLUME,prefixes:$.NONE,value:36966911e-13,offset:0},floz:{name:"floz",base:U.VOLUME,prefixes:$.NONE,value:2957353e-11,offset:0},gi:{name:"gi",base:U.VOLUME,prefixes:$.NONE,value:.0001182941,offset:0},cp:{name:"cp",base:U.VOLUME,prefixes:$.NONE,value:.0002365882,offset:0},pt:{name:"pt",base:U.VOLUME,prefixes:$.NONE,value:.0004731765,offset:0},qt:{name:"qt",base:U.VOLUME,prefixes:$.NONE,value:.0009463529,offset:0},gal:{name:"gal",base:U.VOLUME,prefixes:$.NONE,value:.003785412,offset:0},bbl:{name:"bbl",base:U.VOLUME,prefixes:$.NONE,value:.1173478,offset:0},obl:{name:"obl",base:U.VOLUME,prefixes:$.NONE,value:.1589873,offset:0},g:{name:"g",base:U.MASS,prefixes:$.SHORT,value:.001,offset:0},gram:{name:"gram",base:U.MASS,prefixes:$.LONG,value:.001,offset:0},ton:{name:"ton",base:U.MASS,prefixes:$.SHORT,value:907.18474,offset:0},t:{name:"t",base:U.MASS,prefixes:$.SHORT,value:1e3,offset:0},tonne:{name:"tonne",base:U.MASS,prefixes:$.LONG,value:1e3,offset:0},grain:{name:"grain",base:U.MASS,prefixes:$.NONE,value:6479891e-11,offset:0},dram:{name:"dram",base:U.MASS,prefixes:$.NONE,value:.0017718451953125,offset:0},ounce:{name:"ounce",base:U.MASS,prefixes:$.NONE,value:.028349523125,offset:0},poundmass:{name:"poundmass",base:U.MASS,prefixes:$.NONE,value:.45359237,offset:0},hundredweight:{name:"hundredweight",base:U.MASS,prefixes:$.NONE,value:45.359237,offset:0},stick:{name:"stick",base:U.MASS,prefixes:$.NONE,value:.115,offset:0},stone:{name:"stone",base:U.MASS,prefixes:$.NONE,value:6.35029318,offset:0},gr:{name:"gr",base:U.MASS,prefixes:$.NONE,value:6479891e-11,offset:0},dr:{name:"dr",base:U.MASS,prefixes:$.NONE,value:.0017718451953125,offset:0},oz:{name:"oz",base:U.MASS,prefixes:$.NONE,value:.028349523125,offset:0},lbm:{name:"lbm",base:U.MASS,prefixes:$.NONE,value:.45359237,offset:0},cwt:{name:"cwt",base:U.MASS,prefixes:$.NONE,value:45.359237,offset:0},s:{name:"s",base:U.TIME,prefixes:$.SHORT,value:1,offset:0},min:{name:"min",base:U.TIME,prefixes:$.NONE,value:60,offset:0},h:{name:"h",base:U.TIME,prefixes:$.NONE,value:3600,offset:0},second:{name:"second",base:U.TIME,prefixes:$.LONG,value:1,offset:0},sec:{name:"sec",base:U.TIME,prefixes:$.LONG,value:1,offset:0},minute:{name:"minute",base:U.TIME,prefixes:$.NONE,value:60,offset:0},hour:{name:"hour",base:U.TIME,prefixes:$.NONE,value:3600,offset:0},day:{name:"day",base:U.TIME,prefixes:$.NONE,value:86400,offset:0},week:{name:"week",base:U.TIME,prefixes:$.NONE,value:7*86400,offset:0},month:{name:"month",base:U.TIME,prefixes:$.NONE,value:2629800,offset:0},year:{name:"year",base:U.TIME,prefixes:$.NONE,value:31557600,offset:0},decade:{name:"decade",base:U.TIME,prefixes:$.NONE,value:315576e3,offset:0},century:{name:"century",base:U.TIME,prefixes:$.NONE,value:315576e4,offset:0},millennium:{name:"millennium",base:U.TIME,prefixes:$.NONE,value:315576e5,offset:0},hertz:{name:"Hertz",base:U.FREQUENCY,prefixes:$.LONG,value:1,offset:0,reciprocal:!0},Hz:{name:"Hz",base:U.FREQUENCY,prefixes:$.SHORT,value:1,offset:0,reciprocal:!0},rad:{name:"rad",base:U.ANGLE,prefixes:$.SHORT,value:1,offset:0},radian:{name:"radian",base:U.ANGLE,prefixes:$.LONG,value:1,offset:0},deg:{name:"deg",base:U.ANGLE,prefixes:$.SHORT,value:null,offset:0},degree:{name:"degree",base:U.ANGLE,prefixes:$.LONG,value:null,offset:0},grad:{name:"grad",base:U.ANGLE,prefixes:$.SHORT,value:null,offset:0},gradian:{name:"gradian",base:U.ANGLE,prefixes:$.LONG,value:null,offset:0},cycle:{name:"cycle",base:U.ANGLE,prefixes:$.NONE,value:null,offset:0},arcsec:{name:"arcsec",base:U.ANGLE,prefixes:$.NONE,value:null,offset:0},arcmin:{name:"arcmin",base:U.ANGLE,prefixes:$.NONE,value:null,offset:0},A:{name:"A",base:U.CURRENT,prefixes:$.SHORT,value:1,offset:0},ampere:{name:"ampere",base:U.CURRENT,prefixes:$.LONG,value:1,offset:0},K:{name:"K",base:U.TEMPERATURE,prefixes:$.SHORT,value:1,offset:0},degC:{name:"degC",base:U.TEMPERATURE,prefixes:$.SHORT,value:1,offset:273.15},degF:{name:"degF",base:U.TEMPERATURE,prefixes:$.SHORT,value:new v(5,9),offset:459.67},degR:{name:"degR",base:U.TEMPERATURE,prefixes:$.SHORT,value:new v(5,9),offset:0},kelvin:{name:"kelvin",base:U.TEMPERATURE,prefixes:$.LONG,value:1,offset:0},celsius:{name:"celsius",base:U.TEMPERATURE,prefixes:$.LONG,value:1,offset:273.15},fahrenheit:{name:"fahrenheit",base:U.TEMPERATURE,prefixes:$.LONG,value:new v(5,9),offset:459.67},rankine:{name:"rankine",base:U.TEMPERATURE,prefixes:$.LONG,value:new v(5,9),offset:0},mol:{name:"mol",base:U.AMOUNT_OF_SUBSTANCE,prefixes:$.SHORT,value:1,offset:0},mole:{name:"mole",base:U.AMOUNT_OF_SUBSTANCE,prefixes:$.LONG,value:1,offset:0},cd:{name:"cd",base:U.LUMINOUS_INTENSITY,prefixes:$.SHORT,value:1,offset:0},candela:{name:"candela",base:U.LUMINOUS_INTENSITY,prefixes:$.LONG,value:1,offset:0},N:{name:"N",base:U.FORCE,prefixes:$.SHORT,value:1,offset:0},newton:{name:"newton",base:U.FORCE,prefixes:$.LONG,value:1,offset:0},dyn:{name:"dyn",base:U.FORCE,prefixes:$.SHORT,value:1e-5,offset:0},dyne:{name:"dyne",base:U.FORCE,prefixes:$.LONG,value:1e-5,offset:0},lbf:{name:"lbf",base:U.FORCE,prefixes:$.NONE,value:4.4482216152605,offset:0},poundforce:{name:"poundforce",base:U.FORCE,prefixes:$.NONE,value:4.4482216152605,offset:0},kip:{name:"kip",base:U.FORCE,prefixes:$.LONG,value:4448.2216,offset:0},kilogramforce:{name:"kilogramforce",base:U.FORCE,prefixes:$.NONE,value:9.80665,offset:0},J:{name:"J",base:U.ENERGY,prefixes:$.SHORT,value:1,offset:0},joule:{name:"joule",base:U.ENERGY,prefixes:$.LONG,value:1,offset:0},erg:{name:"erg",base:U.ENERGY,prefixes:$.SHORTLONG,value:1e-7,offset:0},Wh:{name:"Wh",base:U.ENERGY,prefixes:$.SHORT,value:3600,offset:0},BTU:{name:"BTU",base:U.ENERGY,prefixes:$.BTU,value:1055.05585262,offset:0},eV:{name:"eV",base:U.ENERGY,prefixes:$.SHORT,value:1602176565e-28,offset:0},electronvolt:{name:"electronvolt",base:U.ENERGY,prefixes:$.LONG,value:1602176565e-28,offset:0},W:{name:"W",base:U.POWER,prefixes:$.SHORT,value:1,offset:0},watt:{name:"watt",base:U.POWER,prefixes:$.LONG,value:1,offset:0},hp:{name:"hp",base:U.POWER,prefixes:$.NONE,value:745.6998715386,offset:0},VAR:{name:"VAR",base:U.POWER,prefixes:$.SHORT,value:x.I,offset:0},VA:{name:"VA",base:U.POWER,prefixes:$.SHORT,value:1,offset:0},Pa:{name:"Pa",base:U.PRESSURE,prefixes:$.SHORT,value:1,offset:0},psi:{name:"psi",base:U.PRESSURE,prefixes:$.NONE,value:6894.75729276459,offset:0},atm:{name:"atm",base:U.PRESSURE,prefixes:$.NONE,value:101325,offset:0},bar:{name:"bar",base:U.PRESSURE,prefixes:$.SHORTLONG,value:1e5,offset:0},torr:{name:"torr",base:U.PRESSURE,prefixes:$.NONE,value:133.322,offset:0},mmHg:{name:"mmHg",base:U.PRESSURE,prefixes:$.NONE,value:133.322,offset:0},mmH2O:{name:"mmH2O",base:U.PRESSURE,prefixes:$.NONE,value:9.80665,offset:0},cmH2O:{name:"cmH2O",base:U.PRESSURE,prefixes:$.NONE,value:98.0665,offset:0},coulomb:{name:"coulomb",base:U.ELECTRIC_CHARGE,prefixes:$.LONG,value:1,offset:0},C:{name:"C",base:U.ELECTRIC_CHARGE,prefixes:$.SHORT,value:1,offset:0},farad:{name:"farad",base:U.ELECTRIC_CAPACITANCE,prefixes:$.LONG,value:1,offset:0},F:{name:"F",base:U.ELECTRIC_CAPACITANCE,prefixes:$.SHORT,value:1,offset:0},volt:{name:"volt",base:U.ELECTRIC_POTENTIAL,prefixes:$.LONG,value:1,offset:0},V:{name:"V",base:U.ELECTRIC_POTENTIAL,prefixes:$.SHORT,value:1,offset:0},ohm:{name:"ohm",base:U.ELECTRIC_RESISTANCE,prefixes:$.SHORTLONG,value:1,offset:0},henry:{name:"henry",base:U.ELECTRIC_INDUCTANCE,prefixes:$.LONG,value:1,offset:0},H:{name:"H",base:U.ELECTRIC_INDUCTANCE,prefixes:$.SHORT,value:1,offset:0},siemens:{name:"siemens",base:U.ELECTRIC_CONDUCTANCE,prefixes:$.LONG,value:1,offset:0},S:{name:"S",base:U.ELECTRIC_CONDUCTANCE,prefixes:$.SHORT,value:1,offset:0},weber:{name:"weber",base:U.MAGNETIC_FLUX,prefixes:$.LONG,value:1,offset:0},Wb:{name:"Wb",base:U.MAGNETIC_FLUX,prefixes:$.SHORT,value:1,offset:0},tesla:{name:"tesla",base:U.MAGNETIC_FLUX_DENSITY,prefixes:$.LONG,value:1,offset:0},T:{name:"T",base:U.MAGNETIC_FLUX_DENSITY,prefixes:$.SHORT,value:1,offset:0},b:{name:"b",base:U.BIT,prefixes:$.BINARY_SHORT,value:1,offset:0},bits:{name:"bits",base:U.BIT,prefixes:$.BINARY_LONG,value:1,offset:0},B:{name:"B",base:U.BIT,prefixes:$.BINARY_SHORT,value:8,offset:0},bytes:{name:"bytes",base:U.BIT,prefixes:$.BINARY_LONG,value:8,offset:0}},Ce={meters:"meter",inches:"inch",feet:"foot",yards:"yard",miles:"mile",links:"link",rods:"rod",chains:"chain",angstroms:"angstrom",lt:"l",litres:"litre",liter:"litre",liters:"litre",teaspoons:"teaspoon",tablespoons:"tablespoon",minims:"minim",fluiddrams:"fluiddram",fluidounces:"fluidounce",gills:"gill",cups:"cup",pints:"pint",quarts:"quart",gallons:"gallon",beerbarrels:"beerbarrel",oilbarrels:"oilbarrel",hogsheads:"hogshead",gtts:"gtt",grams:"gram",tons:"ton",tonnes:"tonne",grains:"grain",drams:"dram",ounces:"ounce",poundmasses:"poundmass",hundredweights:"hundredweight",sticks:"stick",lb:"lbm",lbs:"lbm",kips:"kip",kgf:"kilogramforce",acres:"acre",hectares:"hectare",sqfeet:"sqft",sqyard:"sqyd",sqmile:"sqmi",sqmiles:"sqmi",mmhg:"mmHg",mmh2o:"mmH2O",cmh2o:"cmH2O",seconds:"second",secs:"second",minutes:"minute",mins:"minute",hours:"hour",hr:"hour",hrs:"hour",days:"day",weeks:"week",months:"month",years:"year",decades:"decade",centuries:"century",millennia:"millennium",hertz:"hertz",radians:"radian",degrees:"degree",gradians:"gradian",cycles:"cycle",arcsecond:"arcsec",arcseconds:"arcsec",arcminute:"arcmin",arcminutes:"arcmin",BTUs:"BTU",watts:"watt",joules:"joule",amperes:"ampere",amps:"ampere",amp:"ampere",coulombs:"coulomb",volts:"volt",ohms:"ohm",farads:"farad",webers:"weber",teslas:"tesla",electronvolts:"electronvolt",moles:"mole",bit:"bits",byte:"bytes"};function Re(X){if(X.number==="BigNumber"){var ne=YV(_);ce.rad.value=new _(1),ce.deg.value=ne.div(180),ce.grad.value=ne.div(200),ce.cycle.value=ne.times(2),ce.arcsec.value=ne.div(648e3),ce.arcmin.value=ne.div(10800)}else ce.rad.value=1,ce.deg.value=Math.PI/180,ce.grad.value=Math.PI/200,ce.cycle.value=Math.PI*2,ce.arcsec.value=Math.PI/648e3,ce.arcmin.value=Math.PI/10800;ce.radian.value=ce.rad.value,ce.degree.value=ce.deg.value,ce.gradian.value=ce.grad.value}Re(n),e&&e("config",function(X,ne){X.number!==ne.number&&Re(X)});var Ie={si:{NONE:{unit:le,prefix:$.NONE[""]},LENGTH:{unit:ce.m,prefix:$.SHORT[""]},MASS:{unit:ce.g,prefix:$.SHORT.k},TIME:{unit:ce.s,prefix:$.SHORT[""]},CURRENT:{unit:ce.A,prefix:$.SHORT[""]},TEMPERATURE:{unit:ce.K,prefix:$.SHORT[""]},LUMINOUS_INTENSITY:{unit:ce.cd,prefix:$.SHORT[""]},AMOUNT_OF_SUBSTANCE:{unit:ce.mol,prefix:$.SHORT[""]},ANGLE:{unit:ce.rad,prefix:$.SHORT[""]},BIT:{unit:ce.bits,prefix:$.SHORT[""]},FORCE:{unit:ce.N,prefix:$.SHORT[""]},ENERGY:{unit:ce.J,prefix:$.SHORT[""]},POWER:{unit:ce.W,prefix:$.SHORT[""]},PRESSURE:{unit:ce.Pa,prefix:$.SHORT[""]},ELECTRIC_CHARGE:{unit:ce.C,prefix:$.SHORT[""]},ELECTRIC_CAPACITANCE:{unit:ce.F,prefix:$.SHORT[""]},ELECTRIC_POTENTIAL:{unit:ce.V,prefix:$.SHORT[""]},ELECTRIC_RESISTANCE:{unit:ce.ohm,prefix:$.SHORT[""]},ELECTRIC_INDUCTANCE:{unit:ce.H,prefix:$.SHORT[""]},ELECTRIC_CONDUCTANCE:{unit:ce.S,prefix:$.SHORT[""]},MAGNETIC_FLUX:{unit:ce.Wb,prefix:$.SHORT[""]},MAGNETIC_FLUX_DENSITY:{unit:ce.T,prefix:$.SHORT[""]},FREQUENCY:{unit:ce.Hz,prefix:$.SHORT[""]}}};Ie.cgs=JSON.parse(JSON.stringify(Ie.si)),Ie.cgs.LENGTH={unit:ce.m,prefix:$.SHORT.c},Ie.cgs.MASS={unit:ce.g,prefix:$.SHORT[""]},Ie.cgs.FORCE={unit:ce.dyn,prefix:$.SHORT[""]},Ie.cgs.ENERGY={unit:ce.erg,prefix:$.NONE[""]},Ie.us=JSON.parse(JSON.stringify(Ie.si)),Ie.us.LENGTH={unit:ce.ft,prefix:$.NONE[""]},Ie.us.MASS={unit:ce.lbm,prefix:$.NONE[""]},Ie.us.TEMPERATURE={unit:ce.degF,prefix:$.NONE[""]},Ie.us.FORCE={unit:ce.lbf,prefix:$.NONE[""]},Ie.us.ENERGY={unit:ce.BTU,prefix:$.BTU[""]},Ie.us.POWER={unit:ce.hp,prefix:$.NONE[""]},Ie.us.PRESSURE={unit:ce.psi,prefix:$.NONE[""]},Ie.auto=JSON.parse(JSON.stringify(Ie.si));var He=Ie.auto;w.setUnitSystem=function(X){if(dr(Ie,X))He=Ie[X];else throw new Error("Unit system "+X+" does not exist. Choices are: "+Object.keys(Ie).join(", "))},w.getUnitSystem=function(){for(var X in Ie)if(dr(Ie,X)&&Ie[X]===He)return X},w.typeConverters={BigNumber:function(ne){return ne!=null&&ne.isFraction?new _(ne.n).div(ne.d).times(ne.s):new _(ne+"")},Fraction:function(ne){return new v(ne)},Complex:function(ne){return ne},number:function(ne){return ne!=null&&ne.isFraction?y(ne):ne}},w.prototype._numberConverter=function(){var X=w.typeConverters[this.valueType()];if(X)return X;throw new TypeError('Unsupported Unit value type "'+this.valueType()+'"')},w._getNumberConverter=function(X){if(!w.typeConverters[X])throw new TypeError('Unsupported type "'+X+'"');return w.typeConverters[X]};for(var tt in ce)if(dr(ce,tt)){var Qe=ce[tt];Qe.dimensions=Qe.base.dimensions}for(var ct in Ce)if(dr(Ce,ct)){var Xe=ce[Ce[ct]],ue={};for(var De in Xe)dr(Xe,De)&&(ue[De]=Xe[De]);ue.name=ct,ce[ct]=ue}w.isValidAlpha=function(ne){return/^[a-zA-Z]$/.test(ne)};function Ee(X){for(var ne=0;ne0&&!(w.isValidAlpha(C)||P(C)))throw new Error('Invalid unit name (only alphanumeric characters are allowed): "'+X+'"')}}return w.createUnit=function(X,ne){if(typeof X!="object")throw new TypeError("createUnit expects first parameter to be of type 'Object'");if(ne&&ne.override){for(var me in X)if(dr(X,me)&&w.deleteUnit(me),X[me].aliases)for(var we=0;we"u"||ne===null)&&(ne={}),typeof X!="string")throw new TypeError("createUnitSingle expects first parameter to be of type 'string'");if(dr(ce,X))throw new Error('Cannot create unit "'+X+'": a unit with that name already exists');Ee(X);var me=null,we=[],Ne=0,Ue,We,lt;if(ne&&ne.type==="Unit")me=ne.clone();else if(typeof ne=="string")ne!==""&&(Ue=ne);else if(typeof ne=="object")Ue=ne.definition,We=ne.prefixes,Ne=ne.offset,lt=ne.baseName,ne.aliases&&(we=ne.aliases.valueOf());else throw new TypeError('Cannot create unit "'+X+'" from "'+ne.toString()+'": expecting "string" or "Unit" or "Object"');if(we){for(var z=0;z1e-12){Se=!1;break}if(Se){de=!0,B.base=U[ve];break}}if(!de){lt=lt||X+"_STUFF";var Be={dimensions:me.dimensions.slice(0)};Be.key=lt,U[lt]=Be,He[lt]={unit:B,prefix:$.NONE[""]},B.base=U[lt]}}else{if(lt=lt||X+"_STUFF",W.indexOf(lt)>=0)throw new Error('Cannot create new base unit "'+X+'": a base unit with that name already exists (and cannot be overridden)');W.push(lt);for(var oe in U)dr(U,oe)&&(U[oe].dimensions[W.length-1]=0);for(var ge={dimensions:[]},pe=0;pe{var{typed:e,Unit:n}=t;return e(wk,{Unit:function(i){return i.clone()},string:function(i){return n.isValuelessUnit(i)?new n(null,i):n.parse(i,{allowNoUnits:!0})},"number | BigNumber | Fraction | Complex, string | Unit":function(i,o){return new n(i,o)},"number | BigNumber | Fraction":function(i){return new n(i)},"Array | Matrix":e.referToSelf(r=>i=>Gi(i,r))})}),Sk="createUnit",K1e=["typed","Unit"],Z1e=Tt(Sk,K1e,t=>{var{typed:e,Unit:n}=t;return e(Sk,{"Object, Object":function(i,o){return n.createUnit(i,o)},Object:function(i){return n.createUnit(i,{})},"string, Unit | string | Object, Object":function(i,o,a){var s={};return s[i]=o,n.createUnit(s,a)},"string, Unit | string | Object":function(i,o){var a={};return a[i]=o,n.createUnit(a,{})},string:function(i){var o={};return o[i]={},n.createUnit(o,{})}})}),KV=Tt("trigUnit",["typed"],t=>{var{typed:e}=t;return{Unit:e.referToSelf(n=>r=>{if(!r.hasBase(r.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function cot is no angle");return e.find(n,r.valueType())(r.value)})}}),Ek="cos",J1e=["typed"],Q1e=Tt(Ek,J1e,t=>{var{typed:e}=t,n=KV({typed:e});return e(Ek,{number:Math.cos,"Complex | BigNumber":r=>r.cos()},n)}),Mk="sin",exe=["typed"],txe=Tt(Mk,exe,t=>{var{typed:e}=t,n=KV({typed:e});return e(Mk,{number:Math.sin,"Complex | BigNumber":r=>r.sin()},n)}),Ck="add",nxe=["typed","matrix","addScalar","equalScalar","DenseMatrix","SparseMatrix","concat"],rxe=Tt(Ck,nxe,t=>{var{typed:e,matrix:n,addScalar:r,equalScalar:i,DenseMatrix:o,SparseMatrix:a,concat:s}=t,l=qV({typed:e}),u=$ye({typed:e,equalScalar:i}),c=XV({typed:e,DenseMatrix:o}),f=tm({typed:e,matrix:n,concat:s});return e(Ck,{"any, any":r,"any, any, ...any":e.referToSelf(d=>(p,y,x)=>{for(var _=d(p,y),v=0;v{var{typed:e,addScalar:n,multiplyScalar:r,conj:i,size:o}=t;return e(Ak,{"Array | DenseMatrix, Array | DenseMatrix":s,"SparseMatrix, SparseMatrix":l});function a(c,f){var d=u(c),p=u(f),y,x;if(d.length===1)y=d[0];else if(d.length===2&&d[1]===1)y=d[0];else throw new RangeError("Expected a column vector, instead got a matrix of size ("+d.join(", ")+")");if(p.length===1)x=p[0];else if(p.length===2&&p[1]===1)x=p[0];else throw new RangeError("Expected a column vector, instead got a matrix of size ("+p.join(", ")+")");if(y!==x)throw new RangeError("Vectors must have equal length ("+y+" != "+x+")");if(y===0)throw new RangeError("Cannot calculate the dot product of empty vectors");return y}function s(c,f){var d=a(c,f),p=di(c)?c._data:c,y=di(c)?c._datatype:void 0,x=di(f)?f._data:f,_=di(f)?f._datatype:void 0,v=u(c).length===2,S=u(f).length===2,w=n,E=r;if(y&&_&&y===_&&typeof y=="string"){var T=y;w=e.find(n,[T,T]),E=e.find(r,[T,T])}if(!v&&!S){for(var C=E(i(p[0]),x[0]),D=1;DC){E++;continue}T===C&&(_=v(_,S(p[w],x[E])),w++,E++)}return _}function u(c){return di(c)?c.size():o(c)}}),Tk="det",axe=["typed","matrix","subtractScalar","multiply","divideScalar","isZero","unaryMinus"],sxe=Tt(Tk,axe,t=>{var{typed:e,matrix:n,subtractScalar:r,multiply:i,divideScalar:o,isZero:a,unaryMinus:s}=t;return e(Tk,{any:function(c){return Lr(c)},"Array | Matrix":function(c){var f;switch(di(c)?f=c.size():Array.isArray(c)?(c=n(c),f=c.size()):f=[],f.length){case 0:return Lr(c);case 1:if(f[0]===1)return Lr(c.valueOf()[0]);if(f[0]===0)return 1;throw new RangeError("Matrix must be square (size: "+ui(f)+")");case 2:{var d=f[0],p=f[1];if(d===p)return l(c.clone().valueOf(),d);if(p===0)return 1;throw new RangeError("Matrix must be square (size: "+ui(f)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+ui(f)+")")}}});function l(u,c,f){if(c===1)return Lr(u[0][0]);if(c===2)return r(i(u[0][0],u[1][1]),i(u[1][0],u[0][1]));for(var d=!1,p=new Array(c).fill(0).map((D,O)=>O),y=0;y{var{typed:e,matrix:n,divideScalar:r,addScalar:i,multiply:o,unaryMinus:a,det:s,identity:l,abs:u}=t;return e(Dk,{"Array | Matrix":function(d){var p=di(d)?d.size():wa(d);switch(p.length){case 1:if(p[0]===1)return di(d)?n([r(1,d.valueOf()[0])]):[r(1,d[0])];throw new RangeError("Matrix must be square (size: "+ui(p)+")");case 2:{var y=p[0],x=p[1];if(y===x)return di(d)?n(c(d.valueOf(),y,x),d.storage()):c(d,y,x);throw new RangeError("Matrix must be square (size: "+ui(p)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+ui(p)+")")}},any:function(d){return r(1,d)}});function c(f,d,p){var y,x,_,v,S;if(d===1){if(v=f[0][0],v===0)throw Error("Cannot calculate inverse, determinant is zero");return[[r(1,v)]]}else if(d===2){var w=s(f);if(w===0)throw Error("Cannot calculate inverse, determinant is zero");return[[r(f[1][1],w),r(a(f[0][1]),w)],[r(a(f[1][0]),w),r(f[0][0],w)]]}else{var E=f.concat();for(y=0;yD&&(D=u(E[y][C]),O=y),y++;if(D===0)throw Error("Cannot calculate inverse, determinant is zero");y=O,y!==C&&(S=E[C],E[C]=E[y],E[y]=S,S=T[C],T[C]=T[y],T[y]=S);var P=E[C],N=T[C];for(y=0;y{var{typed:e,matrix:n,multiply:r,equalScalar:i,divideScalar:o,inv:a}=t,s=Mb({typed:e,equalScalar:i}),l=em({typed:e});return e("divide",lV({"Array | Matrix, Array | Matrix":function(c,f){return r(c,a(f))},"DenseMatrix, any":function(c,f){return l(c,f,o,!1)},"SparseMatrix, any":function(c,f){return s(c,f,o,!1)},"Array, any":function(c,f){return l(n(c),f,o,!1).valueOf()},"any, Array | Matrix":function(c,f){return r(c,a(f))}},o.signatures))}),Sv=dve({config:Qo}),gC=gve({}),JO=bve({}),QO=Sve({}),Ja=Ave({Matrix:QO}),xn=mge({BigNumber:Sv,Complex:gC,DenseMatrix:Ja,Fraction:JO}),ZV=iye({typed:xn}),Ab=aye({typed:xn}),hxe=Yve({BigNumber:Sv,typed:xn}),pxe=e1e({typed:xn}),Rk=Q1e({typed:xn}),ac=Bve({config:Qo,typed:xn}),mxe=g1e({typed:xn}),gxe=Rve({typed:xn}),vxe=Fve({typed:xn}),e4=jye({typed:xn}),t4=jve({typed:xn}),Pk=txe({typed:xn}),n4=$ve({Matrix:QO,equalScalar:ac,typed:xn}),r4=lye({typed:xn}),i4=nye({typed:xn}),JV=Jve({Fraction:JO,typed:xn}),yxe=Ove({typed:xn}),Oi=eye({DenseMatrix:Ja,Matrix:QO,SparseMatrix:n4,typed:xn}),o4=x1e({bignumber:hxe,fraction:JV,number:t4}),xxe=u1e({matrix:Oi,config:Qo,typed:xn}),vC=f1e({BigNumber:Sv,config:Qo,matrix:Oi,typed:xn}),nm=n1e({isInteger:gxe,matrix:Oi,typed:xn}),yC=_1e({numeric:o4,typed:xn}),zR=A1e({DenseMatrix:Ja,concat:nm,equalScalar:ac,matrix:Oi,typed:xn}),QV=i1e({BigNumber:Sv,DenseMatrix:Ja,SparseMatrix:n4,config:Qo,matrix:Oi,typed:xn}),ZT=U1e({DenseMatrix:Ja,concat:nm,config:Qo,matrix:Oi,typed:xn}),a4=M1e({BigNumber:Sv,DenseMatrix:Ja,equalScalar:ac,matrix:Oi,typed:xn,zeros:vC}),bxe=R1e({DenseMatrix:Ja,concat:nm,config:Qo,matrix:Oi,typed:xn}),Nk=Kye({DenseMatrix:Ja,concat:nm,equalScalar:ac,matrix:Oi,subtractScalar:r4,typed:xn,unaryMinus:i4}),Iw=rxe({DenseMatrix:Ja,SparseMatrix:n4,addScalar:Ab,concat:nm,equalScalar:ac,matrix:Oi,typed:xn}),_xe=oxe({addScalar:Ab,conj:pxe,multiplyScalar:e4,size:xxe,typed:xn}),wxe=Sye({DenseMatrix:Ja,config:Qo,equalScalar:ac,matrix:Oi,round:a4,typed:xn,zeros:vC}),cE=L1e({DenseMatrix:Ja,concat:nm,config:Qo,matrix:Oi,typed:xn}),Sxe=W1e({config:Qo,numeric:o4,smaller:bxe,typed:xn}),Bi=Xye({addScalar:Ab,dot:_xe,equalScalar:ac,matrix:Oi,multiplyScalar:e4,typed:xn}),Exe=vye({DenseMatrix:Ja,config:Qo,equalScalar:ac,matrix:Oi,round:a4,typed:xn,zeros:vC}),Mxe=sxe({divideScalar:yC,isZero:vxe,matrix:Oi,multiply:Bi,subtractScalar:r4,typed:xn,unaryMinus:i4}),Cxe=bye({Complex:gC,DenseMatrix:Ja,ceil:Exe,equalScalar:ac,floor:wxe,matrix:Oi,typed:xn,zeros:vC}),Axe=H1e({config:Qo,larger:cE,numeric:o4,typed:xn}),Txe=O1e({DenseMatrix:Ja,concat:nm,config:Qo,matrix:Oi,typed:xn}),eW=uxe({abs:ZV,addScalar:Ab,det:Mxe,divideScalar:yC,identity:QV,matrix:Oi,multiply:Bi,typed:xn,unaryMinus:i4}),Dxe=S1e({Complex:gC,config:Qo,fraction:JV,identity:QV,inv:eW,matrix:Oi,multiply:Bi,number:t4,typed:xn}),mg=q1e({BigNumber:Sv,Complex:gC,Fraction:JO,abs:ZV,addScalar:Ab,config:Qo,divideScalar:yC,equal:zR,fix:Cxe,format:mxe,isNumeric:yxe,multiplyScalar:e4,number:t4,pow:Dxe,round:a4,subtractScalar:r4}),Ok=Z1e({Unit:mg,typed:xn}),jo=dxe({divideScalar:yC,equalScalar:ac,inv:eW,matrix:Oi,multiply:Bi,typed:xn}),Gt=Y1e({Unit:mg,typed:xn});const tW=Gt(299792458,"m/s"),nW=Gt(662607015e-42,"J s");var Xc=(t=>(t.millimetre="mm",t.micrometre="um",t))(Xc||{}),b1=(t=>(t.electronVolts="eV",t.kiloElectronVolts="keV",t))(b1||{}),dl=(t=>(t.nanmometres="nm",t.angstroms="angstrom",t))(dl||{}),g2=(t=>(t.nanmometres="nm^-1",t.angstroms="angstrom^-1",t))(g2||{}),_1=(t=>(t.radians="rad",t.degrees="deg",t))(_1||{});const Rxe=t=>{const e=jo(Bi(nW,tW),t.toSI());if(typeof e=="number"||!("units"in e))throw TypeError("units for constants h and c are wrong");return e},$R=t=>{const e=jo(Bi(nW,tW),t.toSI());if(typeof e=="number"||!("units"in e))throw TypeError("units for constants h and c are wrong");return e},gg=t=>{const e=parseFloat(t.trim());return!e&&e!=0?null:e},Ik=t=>{let e;const n=new Set,r=(l,u)=>{const c=typeof l=="function"?l(e):l;if(!Object.is(c,e)){const f=e;e=u??typeof c!="object"?c:Object.assign({},e,c),n.forEach(d=>d(e,f))}},i=()=>e,s={setState:r,getState:i,subscribe:l=>(n.add(l),()=>n.delete(l)),destroy:()=>{n.clear()}};return e=t(r,i,s),s},Pxe=t=>t?Ik(t):Ik;var rW={exports:{}},iW={},oW={exports:{}},aW={};/** * @license React * use-sync-external-store-shim.production.min.js * @@ -168,7 +168,7 @@ Example: * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var iv=H;function wxe(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Sxe=typeof Object.is=="function"?Object.is:wxe,Exe=iv.useState,Mxe=iv.useEffect,Cxe=iv.useLayoutEffect,Axe=iv.useDebugValue;function Txe(t,e){var n=e(),r=Exe({inst:{value:n,getSnapshot:e}}),i=r[0].inst,o=r[1];return Cxe(function(){i.value=n,i.getSnapshot=e,ZT(i)&&o({inst:i})},[t,n,e]),Mxe(function(){return ZT(i)&&o({inst:i}),t(function(){ZT(i)&&o({inst:i})})},[t]),Axe(n),n}function ZT(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Sxe(t,n)}catch{return!0}}function Dxe(t,e){return e()}var Rxe=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Dxe:Txe;QV.useSyncExternalStore=iv.useSyncExternalStore!==void 0?iv.useSyncExternalStore:Rxe;JV.exports=QV;var Pxe=JV.exports;/** + */var sv=H;function Nxe(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Oxe=typeof Object.is=="function"?Object.is:Nxe,Ixe=sv.useState,Fxe=sv.useEffect,Lxe=sv.useLayoutEffect,kxe=sv.useDebugValue;function Bxe(t,e){var n=e(),r=Ixe({inst:{value:n,getSnapshot:e}}),i=r[0].inst,o=r[1];return Lxe(function(){i.value=n,i.getSnapshot=e,JT(i)&&o({inst:i})},[t,n,e]),Fxe(function(){return JT(i)&&o({inst:i}),t(function(){JT(i)&&o({inst:i})})},[t]),kxe(n),n}function JT(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Oxe(t,n)}catch{return!0}}function Uxe(t,e){return e()}var zxe=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Uxe:Bxe;aW.useSyncExternalStore=sv.useSyncExternalStore!==void 0?sv.useSyncExternalStore:zxe;oW.exports=aW;var $xe=oW.exports;/** * @license React * use-sync-external-store-shim/with-selector.production.min.js * @@ -176,41 +176,41 @@ Example: * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var yC=H,Nxe=Pxe;function Oxe(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Ixe=typeof Object.is=="function"?Object.is:Oxe,Fxe=Nxe.useSyncExternalStore,Lxe=yC.useRef,kxe=yC.useEffect,Bxe=yC.useMemo,Uxe=yC.useDebugValue;ZV.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var o=Lxe(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=Bxe(function(){function l(p){if(!u){if(u=!0,c=p,p=r(p),i!==void 0&&a.hasValue){var y=a.value;if(i(y,p))return f=y}return f=p}if(y=f,Ixe(c,p))return y;var x=r(p);return i!==void 0&&i(y,x)?y:(c=p,f=x)}var u=!1,c,f,d=n===void 0?null:n;return[function(){return l(e())},d===null?void 0:function(){return l(d())}]},[e,n,r,i]);var s=Fxe(t,o[0],o[1]);return kxe(function(){a.hasValue=!0,a.value=s},[s]),Uxe(s),s};KV.exports=ZV;var zxe=KV.exports;const eW=lu(zxe),{useDebugValue:$xe}=se,{useSyncExternalStoreWithSelector:Hxe}=eW;function Vxe(t,e=t.getState,n){const r=Hxe(t.subscribe,t.getState,t.getServerState||t.getState,e,n);return $xe(r),r}const Pk=t=>{const e=typeof t=="function"?_xe(t):t,n=(r,i)=>Vxe(e,r,i);return Object.assign(n,e),n},_v=t=>t?Pk(t):Pk,Wxe={"Pilatus P3-2M":{resolution:{width:1475,height:1679},pixelSize:{width:.172,height:.172}},"long boy":{resolution:{width:1475,height:679},pixelSize:{width:.2,height:.2}}},Gxe={"I22 SAXS Isotropic":{detector:"Pilatus P3-2M",beamstop:{centre:{x:738,y:100},diameter:4,clearance:10},cameraTube:{centre:{x:738,y:840},diameter:310},angle:90,wavelength:null,cameraLength:1.9,minWavelength:.062,maxWavelength:.335,minCameraLength:1.9,maxCameraLength:9.9,cameraLengthStep:1},"I22 SAXS Anisotropic":{detector:"Pilatus P3-2M",beamstop:{centre:{x:738,y:840},diameter:4,clearance:10},cameraTube:{centre:{x:738,y:840},diameter:310},angle:90,wavelength:null,cameraLength:1.9,minWavelength:.062,maxWavelength:.335,minCameraLength:1.9,maxCameraLength:9.9,cameraLengthStep:2}},Nk=Object.fromEntries(Object.entries(Wxe).map(([t,e])=>[t,{...e,pixelSize:{height:qt(e.pixelSize.height,"mm"),width:qt(e.pixelSize.height,"mm")}}])),Nx=Object.fromEntries(Object.entries(Gxe).map(([t,e])=>[t,{...e,beamstop:{...e.beamstop,diameter:qt(e.beamstop.diameter,"mm")},cameraTube:{...e.cameraTube,diameter:qt(e.cameraTube.diameter,"mm")},minWavelength:qt(e.minWavelength,"nm"),maxWavelength:qt(e.maxWavelength,"nm"),minCameraLength:qt(e.minCameraLength,"m"),maxCameraLength:qt(e.maxCameraLength,"m"),cameraLengthStep:qt(e.cameraLengthStep,"m"),wavelength:qt(e.wavelength??NaN,"nm"),angle:qt(e.angle??NaN,"deg")}])),$c=Nx[Object.keys(Nx)[0]],a4=_v(t=>({...$c.beamstop,updateCentre:e=>t(n=>({centre:{...n.centre,...e}})),updateDiameter:(e,n)=>t({diameter:qt(e,n)}),updateDiameterUnits:e=>t(n=>({diameter:n.diameter.to(e)})),updateClearance:e=>t({clearance:e}),updateBeamstop:e=>t(e)})),V1=_v(t=>({name:$c.detector,...Nk[$c.detector],detectorList:Nk,updateDetector:e=>t(n=>({...n.detectorList[e],name:e})),updatePixelUnits:e=>t(n=>({pixelSize:{height:n.pixelSize.height.to(e),width:n.pixelSize.width.to(e)}}))}));function jxe(){const t=a4(),e=s=>{t.updateCentre({x:parseFloat(s.target.value)})},n=s=>{t.updateCentre({y:parseFloat(s.target.value)})},r=s=>{t.updateClearance(parseFloat(s.target.value))},i=V1(),o=()=>{t.updateCentre({x:i.resolution.width/2,y:i.resolution.height/2})},a=()=>{t.updateCentre({x:i.resolution.width/2,y:0})};return F.jsxs(Ln,{spacing:1,children:[F.jsx(tn,{variant:"h6",children:" Beamstop "}),F.jsxs(Ln,{direction:"row",children:[F.jsxs(tn,{flexGrow:2,children:[" ","Diameter: ",t.diameter.toNumber()," "]}),F.jsxs(yl,{children:[F.jsx(Gu,{children:"units "}),F.jsxs(ju,{size:"small",label:"units",value:t.diameter.formatUnits(),onChange:s=>t.updateDiameterUnits(s.target.value),children:[F.jsx(so,{value:Xc.millimetre,children:"mm"}),F.jsx(so,{value:Xc.micrometre,children:"μm"})]})]})]}),F.jsx(tn,{children:"Position:"}),F.jsxs(Ln,{direction:"row",spacing:2,children:[F.jsx(tn,{flexGrow:2,children:"x: "}),F.jsx(Eo,{type:"number",size:"small",value:t.centre.x,onChange:e}),F.jsxs(tn,{flexGrow:2,align:"center",children:[" ","px"]}),F.jsx(Ax,{size:"small",variant:"outlined",onClick:o,children:"Centre detector"})]}),F.jsxs(Ln,{direction:"row",spacing:1,children:[F.jsx(tn,{flexGrow:2,children:"y: "}),F.jsx(Eo,{type:"number",size:"small",value:t.centre.y,onChange:n}),F.jsxs(tn,{flexGrow:2,align:"center",children:[" ","px"]}),F.jsx(Ax,{size:"small",variant:"outlined",onClick:a,children:"Centre top edge"})]}),F.jsx(Ln,{direction:"row",children:F.jsxs(Ln,{direction:"row",spacing:1,children:[F.jsx(tn,{flexGrow:1,children:"Clearance: "}),F.jsx(Eo,{type:"number",size:"small",value:t.clearance,onChange:r}),F.jsx(tn,{children:"px"})]})})]})}const s4=_v(t=>({...$c.cameraTube,updateCentre:e=>t(n=>({centre:{...n.centre,...e}})),updateDiameterUnits:e=>t(n=>({diameter:n.diameter.to(e)})),updateCameraTube:e=>t(e)}));function qxe(){const t=s4(),e=r=>{t.updateCentre({x:parseFloat(r.target.value)})},n=r=>{t.updateCentre({y:parseFloat(r.target.value)})};return F.jsxs(Cw,{spacing:1,children:[F.jsx(tn,{variant:"h6",children:" CameraTube "}),F.jsxs(Cw,{direction:"row",children:[F.jsxs(tn,{flexGrow:2,children:[" ","Diameter: ",t.diameter.toNumber()," "]}),F.jsxs(yl,{children:[F.jsx(Gu,{children:"units "}),F.jsxs(ju,{size:"small",label:"units",value:t.diameter.formatUnits(),onChange:r=>t.updateDiameterUnits(r.target.value),children:[F.jsx(so,{value:Xc.millimetre,children:"mm"}),F.jsx(so,{value:Xc.micrometre,children:"μm"})]})]})]}),F.jsx(tn,{children:"Position:"}),F.jsxs(Cw,{direction:"row",children:[F.jsx(tn,{flexGrow:2,children:"x: "}),F.jsx(Eo,{type:"number",size:"small",value:t.centre.x,onChange:e}),F.jsxs(tn,{flexGrow:2,align:"center",children:[" ","px"]})]}),F.jsxs(Cw,{direction:"row",children:[F.jsx(tn,{flexGrow:2,children:"y: "}),F.jsx(Eo,{type:"number",size:"small",value:t.centre.y,onChange:n}),F.jsxs(tn,{flexGrow:2,align:"center",children:[" ","px"]})]})]})}const v2=_v(t=>({preset:Object.keys(Nx)[0],...$c,userEnergy:UR($c.wavelength).to("keV").toNumber(),userWavelength:$c.wavelength.toNumber(),userAngle:$c.angle.toNumber(),energy:UR($c.wavelength).to("keV"),updateAngle:(e,n)=>t({angle:qt(e??NaN,n),userAngle:e}),updateAngleUnits:e=>t(n=>({angle:n.angle.to(e),userAngle:n.angle.to(e).toNumber()})),updateCameraLength:e=>t({cameraLength:e}),updateWavelength:(e,n)=>t(r=>({wavelength:qt(e??NaN,n),userWavelength:e,minWavelength:r.minWavelength.to(n),maxWavelength:r.maxWavelength.to(n)})),updateWavelengthUnits:e=>t(n=>({wavelength:n.wavelength.to(e),userWavelength:n.wavelength.to(e).toNumber(),minWavelength:n.minWavelength.to(e),maxWavelength:n.maxWavelength.to(e)})),updateEnergy:(e,n)=>t({energy:qt(e??NaN,n),userEnergy:e}),updateEnergyUnits:e=>t(n=>({energy:n.energy.to(e),userEnergy:n.energy.to(e).toNumber()})),update:e=>t({...e})}));function Xxe(){const t=v2(),e=l=>{t.updateAngleUnits(l.target.value)},n=l=>{t.updateAngle(mg(l.target.value),t.angle.formatUnits())},r=l=>{const u=mg(l.target.value);t.updateWavelength(u,t.wavelength.formatUnits());const c=UR(qt(u??NaN,t.wavelength.formatUnits()));t.updateEnergy(c.to(t.energy.formatUnits()).toNumber(),t.energy.formatUnits())},i=l=>{t.updateWavelengthUnits(l.target.value)},o=l=>{const u=mg(l.target.value);t.updateEnergy(u,t.energy.formatUnits());const c=bxe(qt(u??NaN,t.energy.formatUnits()));t.updateWavelength(c.to(t.wavelength.formatUnits()).toNumber(),t.wavelength.formatUnits())},a=l=>{t.updateEnergyUnits(l.target.value)},s=l=>{t.updateCameraLength(mg(l.target.value))};return F.jsxs(Ln,{spacing:2,children:[F.jsx(tn,{variant:"h6",children:"Beam properties"}),F.jsxs(Ln,{direction:"row",spacing:1,children:[F.jsx(tn,{flexGrow:1,children:"Energy: "}),F.jsx(Eo,{type:"number",size:"small",value:t.userEnergy,onChange:o}),F.jsxs(yl,{children:[F.jsx(Gu,{children:"units"}),F.jsxs(ju,{size:"small",label:"units",value:t.energy.formatUnits(),onChange:a,children:[F.jsx(so,{value:v1.electronVolts,children:v1.electronVolts}),F.jsx(so,{value:v1.kiloElectronVolts,children:v1.kiloElectronVolts})]})]})]}),F.jsxs(Ln,{direction:"row",spacing:1,children:[F.jsx(tn,{flexGrow:1,children:"Wavelength: "}),F.jsx(Eo,{type:"number",size:"small",value:t.userWavelength,onChange:r}),F.jsxs(yl,{children:[F.jsx(Gu,{children:"units"}),F.jsxs(ju,{size:"small",label:"units",value:t.wavelength.formatUnits(),onChange:i,children:[F.jsx(so,{value:dl.nanmometres,children:dl.nanmometres}),F.jsx(so,{value:dl.angstroms,children:"Å"})]})]})]}),F.jsxs(tn,{children:["Minimum allowed wavelength: ",t.minWavelength.toString()]}),F.jsxs(tn,{children:["Maximum allowed wavelength: ",t.maxWavelength.toString()]}),F.jsxs(Ln,{direction:"row",spacing:1,children:[F.jsx(tn,{children:"Camera Length: "}),F.jsx(Eo,{type:"number",size:"small",value:t.cameraLength??"",InputProps:{inputProps:{max:t.maxCameraLength.toNumber(),min:t.minCameraLength.toNumber(),step:t.cameraLengthStep.toNumber()}},onChange:s}),F.jsx(tn,{children:"m"})]}),F.jsxs(Ln,{direction:"row",spacing:1,children:[F.jsx(tn,{flexGrow:2,children:"Angle:"}),F.jsx(Eo,{type:"number",size:"small",defaultValue:"",value:t.userAngle??"",onChange:n}),F.jsxs(yl,{children:[F.jsx(Gu,{children:"units"}),F.jsxs(ju,{size:"small",label:"units",value:t.angle.formatUnits(),onChange:e,children:[F.jsx(so,{value:y1.radians,children:y1.radians}),F.jsx(so,{value:y1.degrees,children:y1.degrees})]})]})]})]})}function Yxe(t){return F.jsxs(cfe,{open:t.open,keepMounted:!0,onClose:t.handleClose,children:[F.jsx(Rfe,{children:"Add a new detector"}),F.jsx(Mfe,{children:F.jsxs(Ln,{spacing:2,children:[F.jsx(Dd,{}),F.jsxs(Ul,{container:!0,spacing:2,children:[F.jsx(Ul,{item:!0,xs:4,children:F.jsx(tn,{children:"Resolution:"})}),F.jsx(Ul,{item:!0,xs:1,children:F.jsx(tn,{children:"w:"})}),F.jsx(Ul,{item:!0,xs:3,children:F.jsx(Eo,{type:"number",size:"small"})}),F.jsx(Ul,{item:!0,xs:1,children:F.jsx(tn,{children:"h:"})}),F.jsx(Ul,{item:!0,xs:3,children:F.jsx(Eo,{type:"number",size:"small"})}),F.jsx(Ul,{item:!0,xs:4,children:F.jsxs(tn,{children:[" Pixel Size ","(mm)",":"]})}),F.jsx(Ul,{item:!0,xs:1,children:F.jsx(tn,{children:"x:"})}),F.jsx(Ul,{item:!0,xs:3,children:F.jsx(Eo,{type:"number",size:"small"})}),F.jsx(Ul,{item:!0,xs:1,children:F.jsx(tn,{children:"y:"})}),F.jsx(Ul,{item:!0,xs:3,children:F.jsx(Eo,{type:"number",size:"small"})})]})]})}),F.jsx(gfe,{children:F.jsx(Ax,{onClick:t.handleClose,variant:"outlined",children:"Submit"})})]})}function Kxe(){const t=V1(),e=V1(d=>d.detectorList),n=v2(),r=a4(d=>d.updateBeamstop),i=s4(d=>d.updateCameraTube),o=v2(d=>d.update),a=V1(d=>d.updateDetector),s=d=>{const{beamstop:p,cameraTube:y,detector:x,..._}=Nx[d];a(x),r(p),i(y),o(_),o({preset:d})},[l,u]=se.useState(!1),c=()=>{u(!0)},f=()=>{u(!1)};return F.jsx(oC,{sx:{height:1},children:F.jsx(aC,{children:F.jsxs(Ln,{spacing:1,children:[F.jsx(tn,{variant:"h6",children:"Preset"}),F.jsxs(Ln,{direction:"row",spacing:2,children:[F.jsx(m8,{size:"small",disablePortal:!0,id:"combo-box-demo",options:Object.keys(Nx),value:n.preset,sx:{width:300,color:"white"},renderInput:d=>F.jsx(Eo,{...d,label:"choose beamline preset",sx:{color:"white"}}),onChange:(d,p)=>{p&&s(p)}}),F.jsx(Ax,{variant:"outlined",children:" Save Current"})]}),F.jsx(tn,{variant:"h6",children:"Detector"}),F.jsxs(Ln,{direction:"row",spacing:2,children:[F.jsx(m8,{size:"small",disablePortal:!0,id:"combo-box-demo",options:Object.keys(e),sx:{width:300},renderInput:d=>F.jsx(Eo,{...d,label:"choose detector type"}),value:t.name,onChange:(d,p)=>{p&&t.updateDetector(p)}}),F.jsxs(Ax,{variant:"outlined",onClick:c,children:[" ","Add new detector"]}),F.jsx(Yxe,{open:l,handleClose:f,handleOpen:c})]}),F.jsxs(tn,{children:["Resolution (hxw): ",t.resolution.height," x"," ",t.resolution.width]}),F.jsxs(Ln,{direction:"row",children:[F.jsxs(tn,{flexGrow:2,children:["Pixel size: ",t.pixelSize.height.toString()," x"," ",t.pixelSize.width.toString()]}),F.jsxs(yl,{children:[F.jsx(Gu,{children:"units"}),F.jsxs(ju,{size:"small",label:"units",value:t.pixelSize.height.formatUnits(),onChange:d=>t.updatePixelUnits(d.target.value),children:[F.jsxs(so,{value:Xc.millimetre,children:[Xc.millimetre," x ",Xc.millimetre]}),F.jsxs(so,{value:Xc.micrometre,children:["μm"," x ","μm"]})]})]})]}),F.jsx(Dd,{}),F.jsx(jxe,{}),F.jsx(Dd,{}),F.jsx(qxe,{}),F.jsx(Dd,{}),F.jsx(Xxe,{})]})})})}function As(t){const e=H.useRef(t);return e.current=t,H.useMemo(()=>Object.freeze({get current(){return e.current}}),[])}function tW(t){const e=As(t);H.useEffect(()=>()=>{e.current()},[])}const zR=typeof window<"u"&&typeof navigator<"u"&&typeof document<"u";function Zxe(t){const e=As(t),n=H.useRef(0),r=H.useCallback(()=>{zR&&n.current&&(cancelAnimationFrame(n.current),n.current=0)},[]);return tW(r),[H.useMemo(()=>{const i=(...o)=>{zR&&(r(),n.current=requestAnimationFrame(()=>{e.current(...o),n.current=0}))};return Object.defineProperties(i,{length:{value:t.length},name:{value:`${t.name||"anonymous"}__raf`}}),i},[]),r]}function Jxe(t,...e){var n;(n=t==null?void 0:t.addEventListener)==null||n.call(t,...e)}function Qxe(t,...e){var n;(n=t==null?void 0:t.removeEventListener)==null||n.call(t,...e)}const ebe=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),tbe=()=>!0,nbe=()=>!1;function rbe(t=!1){const e=H.useRef(t),n=H.useCallback(()=>e.current,[]);return H.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),n}const ibe=t=>(t+1)%Number.MAX_SAFE_INTEGER;function obe(){const[,t]=H.useState(0);return H.useCallback(()=>{t(ibe)},[])}function abe(t,e){return typeof t=="function"?t(e):t}function Ok(t){const e=H.useRef();return H.useEffect(()=>{e.current=t}),e.current}function sbe(t){const[e,n]=H.useState(t),[r,i]=Zxe(n);return tW(i),[e,r]}function lbe(t=!1,e=!0){const[n,r]=H.useState(t),i=As(e);return[n,H.useCallback(o=>{r(a=>o===void 0||i.current&&typeof o=="object"&&(o.constructor.name==="SyntheticBaseEvent"||typeof o._reactName=="string")?!a:!!abe(o,a))},[])]}function Cp(t,...e){const n=rbe(),r=As(e[1]),i=H.useMemo(()=>function(...o){n()&&(typeof r.current=="function"?r.current.apply(this,o):typeof r.current.handleEvent=="function"&&r.current.handleEvent.apply(this,o))},[]);H.useEffect(()=>{const o=t&&ebe(t,"current")?t.current:t;if(!o)return;const a=e.slice(2);return Jxe(o,e[0],i,...a),()=>{Qxe(o,e[0],i,...a)}},[t,e[0]])}const ube=t=>typeof t=="function"?t:typeof t=="string"?e=>e.key===t:t?tbe:nbe,cbe=zR?window:null;function fbe(t,e,n,r={}){const{event:i="keydown",target:o=cbe,eventOptions:a}=r,s=As(e),l=H.useMemo(()=>{const u=ube(t);return function(c){u(c)&&s.current.call(this,c)}},n);Cp(o,i,l,a)}var y2={exports:{}};/** + */var xC=H,Hxe=$xe;function Vxe(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Wxe=typeof Object.is=="function"?Object.is:Vxe,Gxe=Hxe.useSyncExternalStore,jxe=xC.useRef,qxe=xC.useEffect,Xxe=xC.useMemo,Yxe=xC.useDebugValue;iW.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var o=jxe(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=Xxe(function(){function l(p){if(!u){if(u=!0,c=p,p=r(p),i!==void 0&&a.hasValue){var y=a.value;if(i(y,p))return f=y}return f=p}if(y=f,Wxe(c,p))return y;var x=r(p);return i!==void 0&&i(y,x)?y:(c=p,f=x)}var u=!1,c,f,d=n===void 0?null:n;return[function(){return l(e())},d===null?void 0:function(){return l(d())}]},[e,n,r,i]);var s=Gxe(t,o[0],o[1]);return qxe(function(){a.hasValue=!0,a.value=s},[s]),Yxe(s),s};rW.exports=iW;var Kxe=rW.exports;const sW=su(Kxe),{useDebugValue:Zxe}=se,{useSyncExternalStoreWithSelector:Jxe}=sW;function Qxe(t,e=t.getState,n){const r=Jxe(t.subscribe,t.getState,t.getServerState||t.getState,e,n);return Zxe(r),r}const Fk=t=>{const e=typeof t=="function"?Pxe(t):t,n=(r,i)=>Qxe(e,r,i);return Object.assign(n,e),n},Ev=t=>t?Fk(t):Fk,ebe={"Pilatus P3-2M":{resolution:{width:1475,height:1679},pixelSize:{width:.172,height:.172}},"long boy":{resolution:{width:1475,height:679},pixelSize:{width:.2,height:.2}}},tbe={"I22 SAXS Isotropic":{detector:"Pilatus P3-2M",beamstop:{centre:{x:738,y:100},diameter:4,clearance:10},cameraTube:{centre:{x:738,y:840},diameter:310},angle:90,wavelength:null,cameraLength:1.9,minWavelength:.062,maxWavelength:.335,minCameraLength:1.9,maxCameraLength:9.9,cameraLengthStep:1},"I22 SAXS Anisotropic":{detector:"Pilatus P3-2M",beamstop:{centre:{x:738,y:840},diameter:4,clearance:10},cameraTube:{centre:{x:738,y:840},diameter:310},angle:90,wavelength:null,cameraLength:1.9,minWavelength:.062,maxWavelength:.335,minCameraLength:1.9,maxCameraLength:9.9,cameraLengthStep:2}},QT=Object.fromEntries(Object.entries(ebe).map(([t,e])=>[t,{...e,pixelSize:{height:Gt(e.pixelSize.height,"mm"),width:Gt(e.pixelSize.height,"mm")}}])),Ox=Object.fromEntries(Object.entries(tbe).map(([t,e])=>[t,{...e,beamstop:{...e.beamstop,diameter:Gt(e.beamstop.diameter,"mm")},cameraTube:{...e.cameraTube,diameter:Gt(e.cameraTube.diameter,"mm")},minWavelength:Gt(e.minWavelength,"nm"),maxWavelength:Gt(e.maxWavelength,"nm"),minCameraLength:Gt(e.minCameraLength,"m"),maxCameraLength:Gt(e.maxCameraLength,"m"),cameraLengthStep:Gt(e.cameraLengthStep,"m"),wavelength:Gt(e.wavelength??NaN,"nm"),angle:Gt(e.angle??NaN,"deg")}])),$c=Ox[Object.keys(Ox)[0]],s4=Ev(t=>({...$c.beamstop,updateCentre:e=>t(n=>({centre:{...n.centre,...e}})),updateDiameter:(e,n)=>t({diameter:Gt(e,n)}),updateDiameterUnits:e=>t(n=>({diameter:n.diameter.to(e)})),updateClearance:e=>t({clearance:e}),updateBeamstop:e=>t(e)})),Fg=Ev(t=>({name:$c.detector,...QT[$c.detector],detectorList:QT,updateDetector:e=>t(n=>({...n.detectorList[e],name:e})),updatePixelUnits:e=>t(n=>({pixelSize:{height:n.pixelSize.height.to(e),width:n.pixelSize.width.to(e)}})),addNewDetector:(e,n)=>{QT[e]=n}}));function nbe(){const t=s4(),e=s=>{t.updateCentre({x:parseFloat(s.target.value)})},n=s=>{t.updateCentre({y:parseFloat(s.target.value)})},r=s=>{t.updateClearance(parseFloat(s.target.value))},i=Fg(),o=()=>{t.updateCentre({x:i.resolution.width/2,y:i.resolution.height/2})},a=()=>{t.updateCentre({x:i.resolution.width/2,y:0})};return F.jsxs(Fn,{spacing:1,children:[F.jsx(Wn,{variant:"h6",children:" Beamstop "}),F.jsxs(Fn,{direction:"row",children:[F.jsxs(Wn,{flexGrow:1,children:[" ","Diameter: ",t.diameter.toNumber()," "]}),F.jsxs(yl,{children:[F.jsx(Wu,{children:"units "}),F.jsxs(Gu,{size:"small",label:"units",value:t.diameter.formatUnits(),onChange:s=>t.updateDiameterUnits(s.target.value),children:[F.jsx(lo,{value:Xc.millimetre,children:"mm"}),F.jsx(lo,{value:Xc.micrometre,children:"μm"})]})]})]}),F.jsx(Wn,{children:"Position:"}),F.jsxs(Fn,{direction:"row",spacing:2,children:[F.jsx(Vi,{type:"number",size:"small",label:"x",value:t.centre.x,onChange:e,InputProps:{endAdornment:F.jsx(Rd,{position:"end",children:"px"})}}),F.jsx(iv,{size:"small",variant:"outlined",onClick:o,children:"Centre detector"})]}),F.jsxs(Fn,{direction:"row",spacing:1,children:[F.jsx(Vi,{type:"number",size:"small",label:"y",value:t.centre.y,onChange:n,InputProps:{endAdornment:F.jsx(Rd,{position:"end",children:"px"})}}),F.jsx(iv,{size:"small",variant:"outlined",onClick:a,children:"Centre top edge"})]}),F.jsx(Fn,{direction:"row",children:F.jsx(Vi,{type:"number",size:"small",label:"clearance",value:t.clearance,onChange:r,InputProps:{endAdornment:F.jsx(Rd,{position:"end",children:"px"})}})})]})}const l4=Ev(t=>({...$c.cameraTube,updateCentre:e=>t(n=>({centre:{...n.centre,...e}})),updateDiameterUnits:e=>t(n=>({diameter:n.diameter.to(e)})),updateCameraTube:e=>t(e)}));function rbe(){const t=l4(),e=r=>{t.updateCentre({x:parseFloat(r.target.value)})},n=r=>{t.updateCentre({y:parseFloat(r.target.value)})};return F.jsxs(BL,{spacing:1,children:[F.jsx(Wn,{variant:"h6",children:" CameraTube "}),F.jsxs(BL,{direction:"row",children:[F.jsxs(Wn,{flexGrow:1,children:[" ","Diameter: ",t.diameter.toNumber()," "]}),F.jsxs(yl,{children:[F.jsx(Wu,{children:"units "}),F.jsxs(Gu,{size:"small",label:"units",value:t.diameter.formatUnits(),onChange:r=>t.updateDiameterUnits(r.target.value),children:[F.jsx(lo,{value:Xc.millimetre,children:"mm"}),F.jsx(lo,{value:Xc.micrometre,children:"μm"})]})]})]}),F.jsx(Wn,{children:"Position:"}),F.jsx(Vi,{type:"number",size:"small",label:"x",value:t.centre.x,onChange:e,InputProps:{endAdornment:F.jsx(Rd,{position:"end",children:"px"})}}),F.jsx(Vi,{type:"number",size:"small",label:"y",value:t.centre.y,onChange:n,InputProps:{endAdornment:F.jsx(Rd,{position:"end",children:"px"})}})]})}const v2=Ev(t=>({preset:Object.keys(Ox)[0],...$c,userEnergy:$R($c.wavelength).to("keV").toNumber(),userWavelength:$c.wavelength.toNumber(),userAngle:$c.angle.toNumber(),energy:$R($c.wavelength).to("keV"),updateAngle:(e,n)=>t({angle:Gt(e??NaN,n),userAngle:e}),updateAngleUnits:e=>t(n=>({angle:n.angle.to(e),userAngle:n.angle.to(e).toNumber()})),updateCameraLength:e=>t({cameraLength:e}),updateWavelength:(e,n)=>t(r=>({wavelength:Gt(e??NaN,n),userWavelength:e,minWavelength:r.minWavelength.to(n),maxWavelength:r.maxWavelength.to(n)})),updateWavelengthUnits:e=>t(n=>({wavelength:n.wavelength.to(e),userWavelength:n.wavelength.to(e).toNumber(),minWavelength:n.minWavelength.to(e),maxWavelength:n.maxWavelength.to(e)})),updateEnergy:(e,n)=>t({energy:Gt(e??NaN,n),userEnergy:e}),updateEnergyUnits:e=>t(n=>({energy:n.energy.to(e),userEnergy:n.energy.to(e).toNumber()})),update:e=>t({...e})}));function ibe(){const t=v2(),e=l=>{t.updateAngleUnits(l.target.value)},n=l=>{t.updateAngle(gg(l.target.value),t.angle.formatUnits())},r=l=>{const u=gg(l.target.value);t.updateWavelength(u,t.wavelength.formatUnits());const c=$R(Gt(u??NaN,t.wavelength.formatUnits()));t.updateEnergy(c.to(t.energy.formatUnits()).toNumber(),t.energy.formatUnits())},i=l=>{t.updateWavelengthUnits(l.target.value)},o=l=>{const u=gg(l.target.value);t.updateEnergy(u,t.energy.formatUnits());const c=Rxe(Gt(u??NaN,t.energy.formatUnits()));t.updateWavelength(c.to(t.wavelength.formatUnits()).toNumber(),t.wavelength.formatUnits())},a=l=>{t.updateEnergyUnits(l.target.value)},s=l=>{t.updateCameraLength(gg(l.target.value))};return F.jsxs(Fn,{spacing:2,children:[F.jsx(Wn,{variant:"h6",children:"Beam properties"}),F.jsxs(Fn,{direction:"row",spacing:1,children:[F.jsx(Vi,{type:"number",size:"small",label:"energy",value:t.userEnergy,onChange:o}),F.jsxs(yl,{children:[F.jsx(Wu,{children:"units"}),F.jsxs(Gu,{size:"small",label:"units",value:t.energy.formatUnits(),onChange:a,children:[F.jsx(lo,{value:b1.electronVolts,children:b1.electronVolts}),F.jsx(lo,{value:b1.kiloElectronVolts,children:b1.kiloElectronVolts})]})]})]}),F.jsxs(Fn,{direction:"row",spacing:1,children:[F.jsx(Vi,{type:"number",size:"small",label:"wavelength",value:t.userWavelength,onChange:r}),F.jsxs(yl,{children:[F.jsx(Wu,{children:"units"}),F.jsxs(Gu,{size:"small",label:"units",value:t.wavelength.formatUnits(),onChange:i,children:[F.jsx(lo,{value:dl.nanmometres,children:dl.nanmometres}),F.jsx(lo,{value:dl.angstroms,children:"Å"})]})]})]}),F.jsxs(Wn,{children:["Minimum allowed wavelength: ",t.minWavelength.toString()]}),F.jsxs(Wn,{children:["Maximum allowed wavelength: ",t.maxWavelength.toString()]}),F.jsx(Fn,{direction:"row",spacing:1,children:F.jsx(Vi,{type:"number",size:"small",label:"camera length",value:t.cameraLength??"",InputProps:{inputProps:{max:t.maxCameraLength.toNumber(),min:t.minCameraLength.toNumber(),step:t.cameraLengthStep.toNumber()},endAdornment:F.jsx(Rd,{position:"end",children:"m"})},onChange:s})}),F.jsxs(Fn,{direction:"row",spacing:1,children:[F.jsx(Vi,{type:"number",size:"small",label:"angle",defaultValue:"",value:t.userAngle??"",onChange:n}),F.jsxs(yl,{children:[F.jsx(Wu,{children:"units"}),F.jsxs(Gu,{size:"small",label:"units",value:t.angle.formatUnits(),onChange:e,children:[F.jsx(lo,{value:_1.radians,children:_1.radians}),F.jsx(lo,{value:_1.degrees,children:_1.degrees})]})]})]})]})}function obe(t){const e=Fg(),[n,r]=se.useState(),[i,o]=se.useState(),[a,s]=se.useState(),[l,u]=se.useState(),[c,f]=se.useState(),d=()=>{n&&i&&a&&l&&c&&e.addNewDetector(c,{resolution:{height:n,width:i},pixelSize:{height:Gt(a,"mm"),width:Gt(l,"mm")}}),t.handleClose()};return F.jsxs(PH,{open:t.open,keepMounted:!0,onClose:t.handleClose,children:[F.jsx(IH,{children:"Add detector"}),F.jsx(OH,{children:F.jsxs(Fn,{spacing:2,children:[F.jsx(Jc,{}),F.jsxs(Qf,{container:!0,spacing:2,children:[F.jsx(Qf,{item:!0,xs:12,children:F.jsx(Vi,{id:"outlined-basic",label:"name",onChange:p=>f(p.target.value),variant:"outlined",size:"small"})}),F.jsx(Qf,{item:!0,xs:4,children:F.jsx(Wn,{children:"Resolution:"})}),F.jsx(Qf,{item:!0,xs:3,children:F.jsx(Vi,{type:"number",label:"width",onChange:p=>o(parseFloat(p.target.value)),size:"small"})}),F.jsx(Qf,{item:!0,xs:3,children:F.jsx(Vi,{type:"number",label:"height",onChange:p=>r(parseFloat(p.target.value)),size:"small"})}),F.jsx(Qf,{item:!0,xs:4,children:F.jsx(Wn,{children:" Pixel Size:"})}),F.jsx(Qf,{item:!0,xs:3,children:F.jsx(Vi,{type:"number",label:"x",onChange:p=>u(parseFloat(p.target.value)),size:"small",InputProps:{endAdornment:F.jsx(Rd,{position:"end",children:"mm"})}})}),F.jsx(Qf,{item:!0,xs:3,children:F.jsx(Vi,{type:"number",label:"y",onChange:p=>s(parseFloat(p.target.value)),size:"small",InputProps:{endAdornment:F.jsx(Rd,{position:"end",children:"mm"})}})})]})]})}),F.jsx(NH,{children:F.jsx(iv,{onClick:d,variant:"outlined",children:"Submit"})})]})}function abe(t){const e=()=>{t.handleClose()};return F.jsxs(PH,{open:t.open,keepMounted:!0,onClose:t.handleClose,children:[F.jsx(IH,{children:"Add new Beamline config"}),F.jsx(OH,{children:F.jsxs(Fn,{spacing:2,children:[F.jsx(Jc,{}),F.jsx(Vi,{id:"outlined-basic",label:"name",variant:"outlined",size:"small"})]})}),F.jsx(NH,{children:F.jsx(iv,{onClick:e,variant:"outlined",children:"Submit"})})]})}function sbe(){const t=Fg(),e=Fg(_=>_.detectorList),n=v2(),r=s4(_=>_.updateBeamstop),i=l4(_=>_.updateCameraTube),o=v2(_=>_.update),a=Fg(_=>_.updateDetector),s=_=>{const{beamstop:v,cameraTube:S,detector:w,...E}=Ox[_];a(w),r(v),i(S),o(E),o({preset:_})},[l,u]=se.useState(!1),c=()=>{u(!0)},f=()=>{u(!1)},[d,p]=se.useState(!1),y=()=>{p(!0)},x=()=>{p(!1)};return F.jsx(aC,{children:F.jsx(sC,{children:F.jsxs(Fn,{spacing:1,children:[F.jsx(Wn,{variant:"h6",children:"Preset"}),F.jsxs(Fn,{direction:"row",spacing:2,children:[F.jsx(v8,{size:"small",disablePortal:!0,id:"combo-box-demo",options:Object.keys(Ox),value:n.preset,sx:{width:300,color:"white"},renderInput:_=>F.jsx(Vi,{..._,label:"choose beamline preset",sx:{color:"white"}}),onChange:(_,v)=>{v&&s(v)}}),F.jsx(iv,{variant:"outlined",onClick:y,children:"Save Preset"}),F.jsx(abe,{open:d,handleClose:x,handleOpen:y})]}),F.jsx(Wn,{variant:"h6",children:"Detector"}),F.jsxs(Fn,{direction:"row",spacing:2,children:[F.jsx(v8,{size:"small",disablePortal:!0,id:"combo-box-demo",options:Object.keys(e),sx:{width:300},renderInput:_=>F.jsx(Vi,{..._,label:"choose detector type"}),value:t.name,onChange:(_,v)=>{v&&t.updateDetector(v)}}),F.jsxs(iv,{variant:"outlined",onClick:c,children:[" ","Add detector"]}),F.jsx(obe,{open:l,handleClose:f,handleOpen:c})]}),F.jsxs(Wn,{children:["Resolution (hxw): ",t.resolution.height," x"," ",t.resolution.width]}),F.jsxs(Fn,{direction:"row",children:[F.jsxs(Wn,{flexGrow:2,children:["Pixel size: ",t.pixelSize.height.toString()," x"," ",t.pixelSize.width.toString()]}),F.jsxs(yl,{children:[F.jsx(Wu,{children:"units"}),F.jsxs(Gu,{size:"small",label:"units",value:t.pixelSize.height.formatUnits(),onChange:_=>t.updatePixelUnits(_.target.value),children:[F.jsxs(lo,{value:Xc.millimetre,children:[Xc.millimetre," x ",Xc.millimetre]}),F.jsxs(lo,{value:Xc.micrometre,children:["μm"," x ","μm"]})]})]})]}),F.jsx(Jc,{}),F.jsx(nbe,{}),F.jsx(Jc,{}),F.jsx(rbe,{}),F.jsx(Jc,{}),F.jsx(ibe,{})]})})})}function As(t){const e=H.useRef(t);return e.current=t,H.useMemo(()=>Object.freeze({get current(){return e.current}}),[])}function lW(t){const e=As(t);H.useEffect(()=>()=>{e.current()},[])}const HR=typeof window<"u"&&typeof navigator<"u"&&typeof document<"u";function lbe(t){const e=As(t),n=H.useRef(0),r=H.useCallback(()=>{HR&&n.current&&(cancelAnimationFrame(n.current),n.current=0)},[]);return lW(r),[H.useMemo(()=>{const i=(...o)=>{HR&&(r(),n.current=requestAnimationFrame(()=>{e.current(...o),n.current=0}))};return Object.defineProperties(i,{length:{value:t.length},name:{value:`${t.name||"anonymous"}__raf`}}),i},[]),r]}function ube(t,...e){var n;(n=t==null?void 0:t.addEventListener)==null||n.call(t,...e)}function cbe(t,...e){var n;(n=t==null?void 0:t.removeEventListener)==null||n.call(t,...e)}const fbe=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),dbe=()=>!0,hbe=()=>!1;function pbe(t=!1){const e=H.useRef(t),n=H.useCallback(()=>e.current,[]);return H.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),n}const mbe=t=>(t+1)%Number.MAX_SAFE_INTEGER;function gbe(){const[,t]=H.useState(0);return H.useCallback(()=>{t(mbe)},[])}function vbe(t,e){return typeof t=="function"?t(e):t}function Lk(t){const e=H.useRef();return H.useEffect(()=>{e.current=t}),e.current}function ybe(t){const[e,n]=H.useState(t),[r,i]=lbe(n);return lW(i),[e,r]}function xbe(t=!1,e=!0){const[n,r]=H.useState(t),i=As(e);return[n,H.useCallback(o=>{r(a=>o===void 0||i.current&&typeof o=="object"&&(o.constructor.name==="SyntheticBaseEvent"||typeof o._reactName=="string")?!a:!!vbe(o,a))},[])]}function Ap(t,...e){const n=pbe(),r=As(e[1]),i=H.useMemo(()=>function(...o){n()&&(typeof r.current=="function"?r.current.apply(this,o):typeof r.current.handleEvent=="function"&&r.current.handleEvent.apply(this,o))},[]);H.useEffect(()=>{const o=t&&fbe(t,"current")?t.current:t;if(!o)return;const a=e.slice(2);return ube(o,e[0],i,...a),()=>{cbe(o,e[0],i,...a)}},[t,e[0]])}const bbe=t=>typeof t=="function"?t:typeof t=="string"?e=>e.key===t:t?dbe:hbe,_be=HR?window:null;function wbe(t,e,n,r={}){const{event:i="keydown",target:o=_be,eventOptions:a}=r,s=As(e),l=H.useMemo(()=>{const u=bbe(t);return function(c){u(c)&&s.current.call(this,c)}},n);Ap(o,i,l,a)}var y2={exports:{}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */y2.exports;(function(t,e){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,c="__lodash_placeholder__",f=1,d=2,p=4,y=1,x=2,_=1,v=2,S=4,w=8,E=16,T=32,C=64,D=128,O=256,P=512,N=30,k="...",G=800,Z=16,j=1,K=2,Y=3,$=1/0,W=9007199254740991,U=17976931348623157e292,te=0/0,re=4294967295,le=re-1,ce=re>>>1,Ce=[["ary",D],["bind",_],["bindKey",v],["curry",w],["curryRight",E],["flip",P],["partial",T],["partialRight",C],["rearg",O]],Re="[object Arguments]",Ie="[object Array]",He="[object AsyncFunction]",tt="[object Boolean]",Qe="[object Date]",ct="[object DOMException]",Xe="[object Error]",ue="[object Function]",De="[object GeneratorFunction]",Ee="[object Map]",X="[object Number]",ne="[object Null]",me="[object Object]",we="[object Promise]",Ne="[object Proxy]",Ue="[object RegExp]",We="[object Set]",lt="[object String]",z="[object Symbol]",B="[object Undefined]",oe="[object WeakMap]",ge="[object WeakSet]",pe="[object ArrayBuffer]",de="[object DataView]",ve="[object Float32Array]",Se="[object Float64Array]",Pe="[object Int8Array]",Be="[object Int16Array]",je="[object Int32Array]",Le="[object Uint8Array]",_t="[object Uint8ClampedArray]",xt="[object Uint16Array]",wt="[object Uint32Array]",Ct=/\b__p \+= '';/g,pt=/\b(__p \+=) '' \+/g,jt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,be=/&(?:amp|lt|gt|quot|#39);/g,gt=/[&<>"']/g,ft=RegExp(be.source),Ye=RegExp(gt.source),mt=/<%-([\s\S]+?)%>/g,Vt=/<%([\s\S]+?)%>/g,_n=/<%=([\s\S]+?)%>/g,Zn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Cr=/^\w*$/,dn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,En=/[\\^$.*+?()[\]{}|]/g,ur=RegExp(En.source),Aa=/^\s+/,Ta=/\s/,ns=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Oo=/\{\n\/\* \[wrapped with (.+)\] \*/,ea=/,? & /,Io=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ta=/[()=,{}\[\]\/\s]/,Ze=/\\(\\)?/g,Ge=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ot=/\w*$/,J=/^[-+]0x[0-9a-f]+$/i,_e=/^0b[01]+$/i,Oe=/^\[object .+?Constructor\]$/,ke=/^0o[0-7]+$/i,ze=/^(?:0|[1-9]\d*)$/,Mt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ft=/($^)/,Wt=/['\n\r\u2028\u2029\\]/g,vt="\\ud800-\\udfff",Lt="\\u0300-\\u036f",sn="\\ufe20-\\ufe2f",en="\\u20d0-\\u20ff",Xn=Lt+sn+en,Qr="\\u2700-\\u27bf",cr="a-z\\xdf-\\xf6\\xf8-\\xff",Si="\\xac\\xb1\\xd7\\xf7",ln="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",It="\\u2000-\\u206f",Da=" \\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",Nn="A-Z\\xc0-\\xd6\\xd8-\\xde",Ar="\\ufe0e\\ufe0f",rs=Si+ln+It+Da,Fo="['’]",Ei="["+vt+"]",$r="["+rs+"]",na="["+Xn+"]",cc="\\d+",Mi="["+Qr+"]",fc="["+cr+"]",Lo="[^"+vt+rs+cc+Qr+cr+Nn+"]",_f="\\ud83c[\\udffb-\\udfff]",SA="(?:"+na+"|"+_f+")",e_="[^"+vt+"]",wf="(?:\\ud83c[\\udde6-\\uddff]){2}",Sf="[\\ud800-\\udbff][\\udc00-\\udfff]",Ws="["+Nn+"]",uh="\\u200d",t_="(?:"+fc+"|"+Lo+")",EA="(?:"+Ws+"|"+Lo+")",mm="(?:"+Fo+"(?:d|ll|m|re|s|t|ve))?",gm="(?:"+Fo+"(?:D|LL|M|RE|S|T|VE))?",Ef=SA+"?",n_="["+Ar+"]?",Uv="(?:"+uh+"(?:"+[e_,wf,Sf].join("|")+")"+n_+Ef+")*",Wn="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",r_="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",vm=n_+Ef+Uv,i_="(?:"+[Mi,wf,Sf].join("|")+")"+vm,MA="(?:"+[e_+na+"?",na,wf,Sf,Ei].join("|")+")",CA=RegExp(Fo,"g"),Ci=RegExp(na,"g"),ch=RegExp(_f+"(?="+_f+")|"+MA+vm,"g"),AA=RegExp([Ws+"?"+fc+"+"+mm+"(?="+[$r,Ws,"$"].join("|")+")",EA+"+"+gm+"(?="+[$r,Ws+t_,"$"].join("|")+")",Ws+"?"+t_+"+"+mm,Ws+"+"+gm,r_,Wn,cc,i_].join("|"),"g"),zv=RegExp("["+uh+vt+Xn+Ar+"]"),TA=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ym=["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"],Gs=-1,pr={};pr[ve]=pr[Se]=pr[Pe]=pr[Be]=pr[je]=pr[Le]=pr[_t]=pr[xt]=pr[wt]=!0,pr[Re]=pr[Ie]=pr[pe]=pr[tt]=pr[de]=pr[Qe]=pr[Xe]=pr[ue]=pr[Ee]=pr[X]=pr[me]=pr[Ue]=pr[We]=pr[lt]=pr[oe]=!1;var fr={};fr[Re]=fr[Ie]=fr[pe]=fr[de]=fr[tt]=fr[Qe]=fr[ve]=fr[Se]=fr[Pe]=fr[Be]=fr[je]=fr[Ee]=fr[X]=fr[me]=fr[Ue]=fr[We]=fr[lt]=fr[z]=fr[Le]=fr[_t]=fr[xt]=fr[wt]=!0,fr[Xe]=fr[ue]=fr[oe]=!1;var js={À:"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",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Tl={"&":"&","<":"<",">":">",'"':""","'":"'"},xm={"&":"&","<":"<",">":">",""":'"',"'":"'"},$v={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},o_=parseFloat,DA=parseInt,is=typeof Uc=="object"&&Uc&&Uc.Object===Object&&Uc,RA=typeof self=="object"&&self&&self.Object===Object&&self,ei=is||RA||Function("return this")(),Hv=e&&!e.nodeType&&e,Ii=Hv&&!0&&t&&!t.nodeType&&t,fh=Ii&&Ii.exports===Hv,Mf=fh&&is.process,Fi=function(){try{var xe=Ii&&Ii.require&&Ii.require("util").types;return xe||Mf&&Mf.binding&&Mf.binding("util")}catch{}}(),bm=Fi&&Fi.isArrayBuffer,_m=Fi&&Fi.isDate,Vv=Fi&&Fi.isMap,wm=Fi&&Fi.isRegExp,Sm=Fi&&Fi.isSet,dc=Fi&&Fi.isTypedArray;function _r(xe,Ke,$e){switch($e.length){case 0:return xe.call(Ke);case 1:return xe.call(Ke,$e[0]);case 2:return xe.call(Ke,$e[0],$e[1]);case 3:return xe.call(Ke,$e[0],$e[1],$e[2])}return xe.apply(Ke,$e)}function qs(xe,Ke,$e,Rt){for(var hn=-1,yn=xe==null?0:xe.length;++hn-1}function Cf(xe,Ke,$e){for(var Rt=-1,hn=xe==null?0:xe.length;++Rt-1;);return $e}function Df(xe,Ke){for(var $e=xe.length;$e--&&ss(Ke,xe[$e],0)>-1;);return $e}function us(xe,Ke){for(var $e=xe.length,Rt=0;$e--;)xe[$e]===Ke&&++Rt;return Rt}var c_=Bo(js),f_=Bo(Tl);function qv(xe){return"\\"+$v[xe]}function Xv(xe,Ke){return xe==null?n:xe[Ke]}function hc(xe){return zv.test(xe)}function mh(xe){return TA.test(xe)}function Rf(xe){for(var Ke,$e=[];!(Ke=xe.next()).done;)$e.push(Ke.value);return $e}function gh(xe){var Ke=-1,$e=Array(xe.size);return xe.forEach(function(Rt,hn){$e[++Ke]=[hn,Rt]}),$e}function Pf(xe,Ke){return function($e){return xe(Ke($e))}}function cs(xe,Ke){for(var $e=-1,Rt=xe.length,hn=0,yn=[];++$e-1}function Pm(h,b){var A=this.__data__,L=bu(A,h);return L<0?(++this.size,A.push([h,b])):A[L][1]=b,this}fs.prototype.clear=P_,fs.prototype.delete=ry,fs.prototype.get=N_,fs.prototype.has=O_,fs.prototype.set=Pm;function Ra(h){var b=-1,A=h==null?0:h.length;for(this.clear();++b=b?h:b)),h}function oa(h,b,A,L,q,ie){var he,ye=b&f,Te=b&d,et=b&p;if(A&&(he=q?A(h,L,q,ie):A(h)),he!==n)return he;if(!Gr(h))return h;var nt=wn(h);if(nt){if(he=AY(h),!ye)return eo(h,he)}else{var at=Uo(h),At=at==ue||at==De;if(Zf(h))return Sy(h,ye);if(at==me||at==Re||At&&!q){if(he=Te||At?{}:b5(h),!ye)return Te?Y_(h,U_(he,h)):zA(h,uy(he,h))}else{if(!fr[at])return q?h:{};he=TY(h,at,ye)}}ie||(ie=new vi);var zt=ie.get(h);if(zt)return zt;ie.set(h,he),Y5(h)?h.forEach(function(fn){he.add(oa(fn,b,A,fn,h,ie))}):q5(h)&&h.forEach(function(fn,kn){he.set(kn,oa(fn,b,A,kn,h,ie))});var cn=et?Te?Un:ri:Te?Fa:no,On=nt?n:cn(h);return pi(On||h,function(fn,kn){On&&(kn=fn,fn=h[kn]),ds(he,kn,oa(fn,b,A,kn,h,ie))}),he}function cy(h){var b=no(h);return function(A){return Fm(A,h,b)}}function Fm(h,b,A){var L=A.length;if(h==null)return!L;for(h=un(h);L--;){var q=A[L],ie=b[q],he=h[q];if(he===n&&!(q in h)||!ie(he))return!1}return!0}function fy(h,b,A){if(typeof h!="function")throw new xo(a);return Ay(function(){h.apply(n,A)},b)}function xc(h,b,A,L){var q=-1,ie=os,he=!0,ye=h.length,Te=[],et=b.length;if(!ye)return Te;A&&(b=mr(b,vo(A))),L?(ie=Cf,he=!1):b.length>=i&&(ie=Li,he=!1,b=new xu(b));e:for(;++qq?0:q+A),L=L===n||L>q?q:Tn(L),L<0&&(L+=q),L=A>L?0:Z5(L);A0&&A(ye)?b>1?Di(ye,b-1,A,L,q):as(q,ye):L||(q[q.length]=ye)}return q}var Hf=qm(),Ph=qm(!0);function aa(h,b){return h&&Hf(h,b,no)}function Vf(h,b){return h&&Ph(h,b,no)}function bc(h,b){return qi(b,function(A){return Mc(h[A])})}function ps(h,b){b=Cu(b,h);for(var A=0,L=b.length;h!=null&&Ab}function H_(h,b){return h!=null&&Gn.call(h,b)}function hy(h,b){return h!=null&&b in un(h)}function BA(h,b,A){return h>=Xi(b,A)&&h=120&&nt.length>=120)?new xu(he&&nt):n}nt=h[0];var at=-1,At=ye[0];e:for(;++at-1;)ye!==h&&vu.call(ye,Te,1),vu.call(h,Te,1);return h}function Zi(h,b){for(var A=h?b.length:0,L=A-1;A--;){var q=b[A];if(A==L||q!==ie){var ie=q;Ec(q)?vu.call(h,q,1):by(h,q)}}return h}function el(h,b){return h+Eh(ty()*(b-h+1))}function Pa(h,b,A,L){for(var q=-1,ie=gi(Sh((b-h)/(A||1)),0),he=$e(ie);ie--;)he[L?ie:++q]=h,h+=A;return he}function Kf(h,b){var A="";if(!h||b<1||b>W)return A;do b%2&&(A+=h),b=Eh(b/2),b&&(h+=h);while(b);return A}function Kt(h,b){return qA(S5(h,b,La),h+"")}function V_(h){return Dh(Zm(h))}function vy(h,b){var A=Zm(h);return J_(A,_u(b,0,A.length))}function wc(h,b,A,L){if(!Gr(h))return h;b=Cu(b,h);for(var q=-1,ie=b.length,he=ie-1,ye=h;ye!=null&&++qq?0:q+b),A=A>q?q:A,A<0&&(A+=q),q=b>A?0:A-b>>>0,b>>>=0;for(var ie=$e(q);++L>>1,he=h[ie];he!==null&&!gs(he)&&(A?he<=b:he=i){var et=b?null:to(h);if(et)return vh(et);he=!1,q=Li,Te=new xu}else Te=b?[]:ye;e:for(;++L=L?h:la(h,b,A)}var q_=wh||function(h){return ei.clearTimeout(h)};function Sy(h,b){if(b)return h.slice();var A=h.length,L=Zv?Zv(A):new h.constructor(A);return h.copy(L),L}function Gm(h){var b=new h.constructor(h.byteLength);return new bh(b).set(new bh(h)),b}function UA(h,b){var A=b?Gm(h.buffer):h.buffer;return new h.constructor(A,h.byteOffset,h.byteLength)}function Na(h){var b=new h.constructor(h.source,ot.exec(h));return b.lastIndex=h.lastIndex,b}function Ey(h){return Nl?un(Nl.call(h)):{}}function X_(h,b){var A=b?Gm(h.buffer):h.buffer;return new h.constructor(A,h.byteOffset,h.length)}function Fl(h,b){if(h!==b){var A=h!==n,L=h===null,q=h===h,ie=gs(h),he=b!==n,ye=b===null,Te=b===b,et=gs(b);if(!ye&&!et&&!ie&&h>b||ie&&he&&Te&&!ye&&!et||L&&he&&Te||!A&&Te||!q)return 1;if(!L&&!ie&&!et&&h=ye)return Te;var et=A[L];return Te*(et=="desc"?-1:1)}}return h.index-b.index}function Tu(h,b,A,L){for(var q=-1,ie=h.length,he=A.length,ye=-1,Te=b.length,et=gi(ie-he,0),nt=$e(Te+et),at=!L;++ye1?A[q-1]:n,he=q>2?A[2]:n;for(ie=h.length>3&&typeof ie=="function"?(q--,ie):n,he&&ca(A[0],A[1],he)&&(ie=q<3?n:ie,q=1),b=un(b);++L-1?q[ie?b[he]:he]:n}}function I(h){return An(function(b){var A=b.length,L=A,q=Yi.prototype.thru;for(h&&b.reverse();L--;){var ie=b[L];if(typeof ie!="function")throw new xo(a);if(q&&!he&&Xm(ie)=="wrapper")var he=new Yi([],!0)}for(L=he?L:A;++L1&&Hn.reverse(),nt&&Teye))return!1;var et=ie.get(h),nt=ie.get(b);if(et&&nt)return et==b&&nt==h;var at=-1,At=!0,zt=A&x?new xu:n;for(ie.set(h,b),ie.set(b,h);++at1?"& ":"")+b[L],b=b.join(A>2?", ":" "),h.replace(ns,`{ + */y2.exports;(function(t,e){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,c="__lodash_placeholder__",f=1,d=2,p=4,y=1,x=2,_=1,v=2,S=4,w=8,E=16,T=32,C=64,D=128,O=256,P=512,N=30,k="...",G=800,Z=16,j=1,K=2,Y=3,$=1/0,W=9007199254740991,U=17976931348623157e292,te=0/0,re=4294967295,le=re-1,ce=re>>>1,Ce=[["ary",D],["bind",_],["bindKey",v],["curry",w],["curryRight",E],["flip",P],["partial",T],["partialRight",C],["rearg",O]],Re="[object Arguments]",Ie="[object Array]",He="[object AsyncFunction]",tt="[object Boolean]",Qe="[object Date]",ct="[object DOMException]",Xe="[object Error]",ue="[object Function]",De="[object GeneratorFunction]",Ee="[object Map]",X="[object Number]",ne="[object Null]",me="[object Object]",we="[object Promise]",Ne="[object Proxy]",Ue="[object RegExp]",We="[object Set]",lt="[object String]",z="[object Symbol]",B="[object Undefined]",oe="[object WeakMap]",ge="[object WeakSet]",pe="[object ArrayBuffer]",de="[object DataView]",ve="[object Float32Array]",Se="[object Float64Array]",Pe="[object Int8Array]",Be="[object Int16Array]",je="[object Int32Array]",Le="[object Uint8Array]",_t="[object Uint8ClampedArray]",bt="[object Uint16Array]",wt="[object Uint32Array]",Ct=/\b__p \+= '';/g,pt=/\b(__p \+=) '' \+/g,qt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,be=/&(?:amp|lt|gt|quot|#39);/g,gt=/[&<>"']/g,ft=RegExp(be.source),Ye=RegExp(gt.source),mt=/<%-([\s\S]+?)%>/g,Vt=/<%([\s\S]+?)%>/g,bn=/<%=([\s\S]+?)%>/g,Zn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Cr=/^\w*$/,fn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Sn=/[\\^$.*+?()[\]{}|]/g,ur=RegExp(Sn.source),Aa=/^\s+/,Ta=/\s/,ns=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Oo=/\{\n\/\* \[wrapped with (.+)\] \*/,ea=/,? & /,Io=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ta=/[()=,{}\[\]\/\s]/,Ze=/\\(\\)?/g,Ge=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ot=/\w*$/,J=/^[-+]0x[0-9a-f]+$/i,_e=/^0b[01]+$/i,Oe=/^\[object .+?Constructor\]$/,ke=/^0o[0-7]+$/i,ze=/^(?:0|[1-9]\d*)$/,Mt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ft=/($^)/,Wt=/['\n\r\u2028\u2029\\]/g,yt="\\ud800-\\udfff",Lt="\\u0300-\\u036f",an="\\ufe20-\\ufe2f",tn="\\u20d0-\\u20ff",Xn=Lt+an+tn,Qr="\\u2700-\\u27bf",cr="a-z\\xdf-\\xf6\\xf8-\\xff",Si="\\xac\\xb1\\xd7\\xf7",sn="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",It="\\u2000-\\u206f",Da=" \\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",Pn="A-Z\\xc0-\\xd6\\xd8-\\xde",Ar="\\ufe0e\\ufe0f",rs=Si+sn+It+Da,Fo="['’]",Ei="["+yt+"]",$r="["+rs+"]",na="["+Xn+"]",cc="\\d+",Mi="["+Qr+"]",fc="["+cr+"]",Lo="[^"+yt+rs+cc+Qr+cr+Pn+"]",_f="\\ud83c[\\udffb-\\udfff]",EA="(?:"+na+"|"+_f+")",t_="[^"+yt+"]",wf="(?:\\ud83c[\\udde6-\\uddff]){2}",Sf="[\\ud800-\\udbff][\\udc00-\\udfff]",Ws="["+Pn+"]",ch="\\u200d",n_="(?:"+fc+"|"+Lo+")",MA="(?:"+Ws+"|"+Lo+")",gm="(?:"+Fo+"(?:d|ll|m|re|s|t|ve))?",vm="(?:"+Fo+"(?:D|LL|M|RE|S|T|VE))?",Ef=EA+"?",r_="["+Ar+"]?",Hv="(?:"+ch+"(?:"+[t_,wf,Sf].join("|")+")"+r_+Ef+")*",Vn="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",i_="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ym=r_+Ef+Hv,o_="(?:"+[Mi,wf,Sf].join("|")+")"+ym,CA="(?:"+[t_+na+"?",na,wf,Sf,Ei].join("|")+")",AA=RegExp(Fo,"g"),Ci=RegExp(na,"g"),fh=RegExp(_f+"(?="+_f+")|"+CA+ym,"g"),TA=RegExp([Ws+"?"+fc+"+"+gm+"(?="+[$r,Ws,"$"].join("|")+")",MA+"+"+vm+"(?="+[$r,Ws+n_,"$"].join("|")+")",Ws+"?"+n_+"+"+gm,Ws+"+"+vm,i_,Vn,cc,o_].join("|"),"g"),Vv=RegExp("["+ch+yt+Xn+Ar+"]"),DA=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,xm=["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"],Gs=-1,pr={};pr[ve]=pr[Se]=pr[Pe]=pr[Be]=pr[je]=pr[Le]=pr[_t]=pr[bt]=pr[wt]=!0,pr[Re]=pr[Ie]=pr[pe]=pr[tt]=pr[de]=pr[Qe]=pr[Xe]=pr[ue]=pr[Ee]=pr[X]=pr[me]=pr[Ue]=pr[We]=pr[lt]=pr[oe]=!1;var fr={};fr[Re]=fr[Ie]=fr[pe]=fr[de]=fr[tt]=fr[Qe]=fr[ve]=fr[Se]=fr[Pe]=fr[Be]=fr[je]=fr[Ee]=fr[X]=fr[me]=fr[Ue]=fr[We]=fr[lt]=fr[z]=fr[Le]=fr[_t]=fr[bt]=fr[wt]=!0,fr[Xe]=fr[ue]=fr[oe]=!1;var js={À:"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",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Tl={"&":"&","<":"<",">":">",'"':""","'":"'"},bm={"&":"&","<":"<",">":">",""":'"',"'":"'"},Wv={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},a_=parseFloat,RA=parseInt,is=typeof Uc=="object"&&Uc&&Uc.Object===Object&&Uc,PA=typeof self=="object"&&self&&self.Object===Object&&self,ei=is||PA||Function("return this")(),Gv=e&&!e.nodeType&&e,Ii=Gv&&!0&&t&&!t.nodeType&&t,dh=Ii&&Ii.exports===Gv,Mf=dh&&is.process,Fi=function(){try{var xe=Ii&&Ii.require&&Ii.require("util").types;return xe||Mf&&Mf.binding&&Mf.binding("util")}catch{}}(),_m=Fi&&Fi.isArrayBuffer,wm=Fi&&Fi.isDate,jv=Fi&&Fi.isMap,Sm=Fi&&Fi.isRegExp,Em=Fi&&Fi.isSet,dc=Fi&&Fi.isTypedArray;function _r(xe,Ke,$e){switch($e.length){case 0:return xe.call(Ke);case 1:return xe.call(Ke,$e[0]);case 2:return xe.call(Ke,$e[0],$e[1]);case 3:return xe.call(Ke,$e[0],$e[1],$e[2])}return xe.apply(Ke,$e)}function qs(xe,Ke,$e,Rt){for(var dn=-1,vn=xe==null?0:xe.length;++dn-1}function Cf(xe,Ke,$e){for(var Rt=-1,dn=xe==null?0:xe.length;++Rt-1;);return $e}function Df(xe,Ke){for(var $e=xe.length;$e--&&ss(Ke,xe[$e],0)>-1;);return $e}function us(xe,Ke){for(var $e=xe.length,Rt=0;$e--;)xe[$e]===Ke&&++Rt;return Rt}var f_=Bo(js),d_=Bo(Tl);function Kv(xe){return"\\"+Wv[xe]}function Zv(xe,Ke){return xe==null?n:xe[Ke]}function hc(xe){return Vv.test(xe)}function gh(xe){return DA.test(xe)}function Rf(xe){for(var Ke,$e=[];!(Ke=xe.next()).done;)$e.push(Ke.value);return $e}function vh(xe){var Ke=-1,$e=Array(xe.size);return xe.forEach(function(Rt,dn){$e[++Ke]=[dn,Rt]}),$e}function Pf(xe,Ke){return function($e){return xe(Ke($e))}}function cs(xe,Ke){for(var $e=-1,Rt=xe.length,dn=0,vn=[];++$e-1}function Nm(h,b){var A=this.__data__,L=xu(A,h);return L<0?(++this.size,A.push([h,b])):A[L][1]=b,this}fs.prototype.clear=N_,fs.prototype.delete=ay,fs.prototype.get=O_,fs.prototype.has=I_,fs.prototype.set=Nm;function Ra(h){var b=-1,A=h==null?0:h.length;for(this.clear();++b=b?h:b)),h}function oa(h,b,A,L,q,ie){var he,ye=b&f,Te=b&d,et=b&p;if(A&&(he=q?A(h,L,q,ie):A(h)),he!==n)return he;if(!Gr(h))return h;var nt=_n(h);if(nt){if(he=IY(h),!ye)return to(h,he)}else{var at=Uo(h),At=at==ue||at==De;if(Zf(h))return Cy(h,ye);if(at==me||at==Re||At&&!q){if(he=Te||At?{}:_5(h),!ye)return Te?K_(h,z_(he,h)):$A(h,dy(he,h))}else{if(!fr[at])return q?h:{};he=FY(h,at,ye)}}ie||(ie=new vi);var zt=ie.get(h);if(zt)return zt;ie.set(h,he),K5(h)?h.forEach(function(cn){he.add(oa(cn,b,A,cn,h,ie))}):X5(h)&&h.forEach(function(cn,Ln){he.set(Ln,oa(cn,b,A,Ln,h,ie))});var un=et?Te?Bn:ri:Te?Fa:ro,Nn=nt?n:un(h);return pi(Nn||h,function(cn,Ln){Nn&&(Ln=cn,cn=h[Ln]),ds(he,Ln,oa(cn,b,A,Ln,h,ie))}),he}function hy(h){var b=ro(h);return function(A){return Lm(A,h,b)}}function Lm(h,b,A){var L=A.length;if(h==null)return!L;for(h=ln(h);L--;){var q=A[L],ie=b[q],he=h[q];if(he===n&&!(q in h)||!ie(he))return!1}return!0}function py(h,b,A){if(typeof h!="function")throw new bo(a);return Ry(function(){h.apply(n,A)},b)}function xc(h,b,A,L){var q=-1,ie=os,he=!0,ye=h.length,Te=[],et=b.length;if(!ye)return Te;A&&(b=mr(b,yo(A))),L?(ie=Cf,he=!1):b.length>=i&&(ie=Li,he=!1,b=new yu(b));e:for(;++qq?0:q+A),L=L===n||L>q?q:An(L),L<0&&(L+=q),L=A>L?0:J5(L);A0&&A(ye)?b>1?Di(ye,b-1,A,L,q):as(q,ye):L||(q[q.length]=ye)}return q}var Hf=Xm(),Nh=Xm(!0);function aa(h,b){return h&&Hf(h,b,ro)}function Vf(h,b){return h&&Nh(h,b,ro)}function bc(h,b){return Xi(b,function(A){return Mc(h[A])})}function ps(h,b){b=Mu(b,h);for(var A=0,L=b.length;h!=null&&Ab}function V_(h,b){return h!=null&&Gn.call(h,b)}function gy(h,b){return h!=null&&b in ln(h)}function UA(h,b,A){return h>=Yi(b,A)&&h=120&&nt.length>=120)?new yu(he&&nt):n}nt=h[0];var at=-1,At=ye[0];e:for(;++at-1;)ye!==h&&gu.call(ye,Te,1),gu.call(h,Te,1);return h}function Ji(h,b){for(var A=h?b.length:0,L=A-1;A--;){var q=b[A];if(A==L||q!==ie){var ie=q;Ec(q)?gu.call(h,q,1):Sy(h,q)}}return h}function el(h,b){return h+Mh(iy()*(b-h+1))}function Pa(h,b,A,L){for(var q=-1,ie=gi(Eh((b-h)/(A||1)),0),he=$e(ie);ie--;)he[L?ie:++q]=h,h+=A;return he}function Kf(h,b){var A="";if(!h||b<1||b>W)return A;do b%2&&(A+=h),b=Mh(b/2),b&&(h+=h);while(b);return A}function Kt(h,b){return XA(E5(h,b,La),h+"")}function W_(h){return Rh(Jm(h))}function by(h,b){var A=Jm(h);return Q_(A,bu(b,0,A.length))}function wc(h,b,A,L){if(!Gr(h))return h;b=Mu(b,h);for(var q=-1,ie=b.length,he=ie-1,ye=h;ye!=null&&++qq?0:q+b),A=A>q?q:A,A<0&&(A+=q),q=b>A?0:A-b>>>0,b>>>=0;for(var ie=$e(q);++L>>1,he=h[ie];he!==null&&!gs(he)&&(A?he<=b:he=i){var et=b?null:no(h);if(et)return yh(et);he=!1,q=Li,Te=new yu}else Te=b?[]:ye;e:for(;++L=L?h:la(h,b,A)}var X_=Sh||function(h){return ei.clearTimeout(h)};function Cy(h,b){if(b)return h.slice();var A=h.length,L=ey?ey(A):new h.constructor(A);return h.copy(L),L}function jm(h){var b=new h.constructor(h.byteLength);return new _h(b).set(new _h(h)),b}function zA(h,b){var A=b?jm(h.buffer):h.buffer;return new h.constructor(A,h.byteOffset,h.byteLength)}function Na(h){var b=new h.constructor(h.source,ot.exec(h));return b.lastIndex=h.lastIndex,b}function Ay(h){return Nl?ln(Nl.call(h)):{}}function Y_(h,b){var A=b?jm(h.buffer):h.buffer;return new h.constructor(A,h.byteOffset,h.length)}function Fl(h,b){if(h!==b){var A=h!==n,L=h===null,q=h===h,ie=gs(h),he=b!==n,ye=b===null,Te=b===b,et=gs(b);if(!ye&&!et&&!ie&&h>b||ie&&he&&Te&&!ye&&!et||L&&he&&Te||!A&&Te||!q)return 1;if(!L&&!ie&&!et&&h=ye)return Te;var et=A[L];return Te*(et=="desc"?-1:1)}}return h.index-b.index}function Au(h,b,A,L){for(var q=-1,ie=h.length,he=A.length,ye=-1,Te=b.length,et=gi(ie-he,0),nt=$e(Te+et),at=!L;++ye1?A[q-1]:n,he=q>2?A[2]:n;for(ie=h.length>3&&typeof ie=="function"?(q--,ie):n,he&&ca(A[0],A[1],he)&&(ie=q<3?n:ie,q=1),b=ln(b);++L-1?q[ie?b[he]:he]:n}}function I(h){return Cn(function(b){var A=b.length,L=A,q=Ki.prototype.thru;for(h&&b.reverse();L--;){var ie=b[L];if(typeof ie!="function")throw new bo(a);if(q&&!he&&Ym(ie)=="wrapper")var he=new Ki([],!0)}for(L=he?L:A;++L1&&$n.reverse(),nt&&Teye))return!1;var et=ie.get(h),nt=ie.get(b);if(et&&nt)return et==b&&nt==h;var at=-1,At=!0,zt=A&x?new yu:n;for(ie.set(h,b),ie.set(b,h);++at1?"& ":"")+b[L],b=b.join(A>2?", ":" "),h.replace(ns,`{ /* [wrapped with `+b+`] */ -`)}function RY(h){return wn(h)||Hh(h)||!!(Qv&&h&&h[Qv])}function Ec(h,b){var A=typeof h;return b=b??W,!!b&&(A=="number"||A!="symbol"&&ze.test(h))&&h>-1&&h%1==0&&h0){if(++b>=G)return arguments[0]}else b=0;return h.apply(n,arguments)}}function J_(h,b){var A=-1,L=h.length,q=L-1;for(b=b===n?L:b;++A1?h[b-1]:n;return A=typeof A=="function"?(h.pop(),A):n,F5(h,A)});function L5(h){var b=ee(h);return b.__chain__=!0,b}function $K(h,b){return b(h),h}function Q_(h,b){return b(h)}var HK=An(function(h){var b=h.length,A=b?h[0]:0,L=this.__wrapped__,q=function(ie){return Im(ie,h)};return b>1||this.__actions__.length||!(L instanceof Zt)||!Ec(A)?this.thru(q):(L=L.slice(A,+A+(b?1:0)),L.__actions__.push({func:Q_,args:[q],thisArg:n}),new Yi(L,this.__chain__).thru(function(ie){return b&&!ie.length&&ie.push(n),ie}))});function VK(){return L5(this)}function WK(){return new Yi(this.value(),this.__chain__)}function GK(){this.__values__===n&&(this.__values__=K5(this.value()));var h=this.__index__>=this.__values__.length,b=h?n:this.__values__[this.__index__++];return{done:h,value:b}}function jK(){return this}function qK(h){for(var b,A=this;A instanceof Th;){var L=D5(A);L.__index__=0,L.__values__=n,b?q.__wrapped__=L:b=L;var q=L;A=A.__wrapped__}return q.__wrapped__=h,b}function XK(){var h=this.__wrapped__;if(h instanceof Zt){var b=h;return this.__actions__.length&&(b=new Zt(this)),b=b.reverse(),b.__actions__.push({func:Q_,args:[XA],thisArg:n}),new Yi(b,this.__chain__)}return this.thru(XA)}function YK(){return Eu(this.__wrapped__,this.__actions__)}var KK=Uh(function(h,b,A){Gn.call(h,A)?++h[A]:Qs(h,A,1)});function ZK(h,b,A){var L=wn(h)?Gv:kA;return A&&ca(h,b,A)&&(b=n),L(h,rn(b,3))}function JK(h,b){var A=wn(h)?qi:dy;return A(h,rn(b,3))}var QK=R(R5),eZ=R(P5);function tZ(h,b){return Di(ew(h,b),1)}function nZ(h,b){return Di(ew(h,b),$)}function rZ(h,b,A){return A=A===n?1:Tn(A),Di(ew(h,b),A)}function k5(h,b){var A=wn(h)?pi:hs;return A(h,rn(b,3))}function B5(h,b){var A=wn(h)?Wv:z_;return A(h,rn(b,3))}var iZ=Uh(function(h,b,A){Gn.call(h,A)?h[A].push(b):Qs(h,A,[b])});function oZ(h,b,A,L){h=Ia(h)?h:Zm(h),A=A&&!L?Tn(A):0;var q=h.length;return A<0&&(A=gi(q+A,0)),ow(h)?A<=q&&h.indexOf(b,A)>-1:!!q&&ss(h,b,A)>-1}var aZ=Kt(function(h,b,A){var L=-1,q=typeof b=="function",ie=Ia(h)?$e(h.length):[];return hs(h,function(he){ie[++L]=q?_r(b,he,A):vr(he,b,A)}),ie}),sZ=Uh(function(h,b,A){Qs(h,A,b)});function ew(h,b){var A=wn(h)?mr:_c;return A(h,rn(b,3))}function lZ(h,b,A,L){return h==null?[]:(wn(b)||(b=b==null?[]:[b]),A=L?n:A,wn(A)||(A=A==null?[]:[A]),Fh(h,b,A))}var uZ=Uh(function(h,b,A){h[A?0:1].push(b)},function(){return[[],[]]});function cZ(h,b,A){var L=wn(h)?Em:pu,q=arguments.length<3;return L(h,rn(b,4),A,q,hs)}function fZ(h,b,A){var L=wn(h)?a_:pu,q=arguments.length<3;return L(h,rn(b,4),A,q,z_)}function dZ(h,b){var A=wn(h)?qi:dy;return A(h,rw(rn(b,3)))}function hZ(h){var b=wn(h)?Dh:V_;return b(h)}function pZ(h,b,A){(A?ca(h,b,A):b===n)?b=1:b=Tn(b);var L=wn(h)?ay:vy;return L(h,b)}function mZ(h){var b=wn(h)?B_:G_;return b(h)}function gZ(h){if(h==null)return 0;if(Ia(h))return ow(h)?Xs(h):h.length;var b=Uo(h);return b==Ee||b==We?h.size:Ki(h).length}function vZ(h,b,A){var L=wn(h)?dh:yy;return A&&ca(h,b,A)&&(b=n),L(h,rn(b,3))}var yZ=Kt(function(h,b){if(h==null)return[];var A=b.length;return A>1&&ca(h,b[0],b[1])?b=[]:A>2&&ca(b[0],b[1],b[2])&&(b=[b[0]]),Fh(h,Di(b,1),[])}),tw=m_||function(){return ei.Date.now()};function xZ(h,b){if(typeof b!="function")throw new xo(a);return h=Tn(h),function(){if(--h<1)return b.apply(this,arguments)}}function U5(h,b,A){return b=A?n:b,b=h&&b==null?h.length:b,Fe(h,D,n,n,n,n,b)}function z5(h,b){var A;if(typeof b!="function")throw new xo(a);return h=Tn(h),function(){return--h>0&&(A=b.apply(this,arguments)),h<=1&&(b=n),A}}var KA=Kt(function(h,b,A){var L=_;if(A.length){var q=cs(A,Ym(KA));L|=T}return Fe(h,L,b,A,q)}),$5=Kt(function(h,b,A){var L=_|v;if(A.length){var q=cs(A,Ym($5));L|=T}return Fe(b,L,h,A,q)});function H5(h,b,A){b=A?n:b;var L=Fe(h,w,n,n,n,n,n,b);return L.placeholder=H5.placeholder,L}function V5(h,b,A){b=A?n:b;var L=Fe(h,E,n,n,n,n,n,b);return L.placeholder=V5.placeholder,L}function W5(h,b,A){var L,q,ie,he,ye,Te,et=0,nt=!1,at=!1,At=!0;if(typeof h!="function")throw new xo(a);b=il(b)||0,Gr(A)&&(nt=!!A.leading,at="maxWait"in A,ie=at?gi(il(A.maxWait)||0,b):ie,At="trailing"in A?!!A.trailing:At);function zt(xi){var kl=L,Ac=q;return L=q=n,et=xi,he=h.apply(Ac,kl),he}function cn(xi){return et=xi,ye=Ay(kn,b),nt?zt(xi):he}function On(xi){var kl=xi-Te,Ac=xi-et,uF=b-kl;return at?Xi(uF,ie-Ac):uF}function fn(xi){var kl=xi-Te,Ac=xi-et;return Te===n||kl>=b||kl<0||at&&Ac>=ie}function kn(){var xi=tw();if(fn(xi))return Hn(xi);ye=Ay(kn,On(xi))}function Hn(xi){return ye=n,At&&L?zt(xi):(L=q=n,he)}function vs(){ye!==n&&q_(ye),et=0,L=Te=q=ye=n}function fa(){return ye===n?he:Hn(tw())}function ys(){var xi=tw(),kl=fn(xi);if(L=arguments,q=this,Te=xi,kl){if(ye===n)return cn(Te);if(at)return q_(ye),ye=Ay(kn,b),zt(Te)}return ye===n&&(ye=Ay(kn,b)),he}return ys.cancel=vs,ys.flush=fa,ys}var bZ=Kt(function(h,b){return fy(h,1,b)}),_Z=Kt(function(h,b,A){return fy(h,il(b)||0,A)});function wZ(h){return Fe(h,P)}function nw(h,b){if(typeof h!="function"||b!=null&&typeof b!="function")throw new xo(a);var A=function(){var L=arguments,q=b?b.apply(this,L):L[0],ie=A.cache;if(ie.has(q))return ie.get(q);var he=h.apply(this,L);return A.cache=ie.set(q,he)||ie,he};return A.cache=new(nw.Cache||Ra),A}nw.Cache=Ra;function rw(h){if(typeof h!="function")throw new xo(a);return function(){var b=arguments;switch(b.length){case 0:return!h.call(this);case 1:return!h.call(this,b[0]);case 2:return!h.call(this,b[0],b[1]);case 3:return!h.call(this,b[0],b[1],b[2])}return!h.apply(this,b)}}function SZ(h){return z5(2,h)}var EZ=j_(function(h,b){b=b.length==1&&wn(b[0])?mr(b[0],vo(rn())):mr(Di(b,1),vo(rn()));var A=b.length;return Kt(function(L){for(var q=-1,ie=Xi(L.length,A);++q=b}),Hh=Mn(function(){return arguments}())?Mn:function(h){return ii(h)&&Gn.call(h,"callee")&&!Dm.call(h,"callee")},wn=$e.isArray,UZ=bm?vo(bm):ti;function Ia(h){return h!=null&&iw(h.length)&&!Mc(h)}function yi(h){return ii(h)&&Ia(h)}function zZ(h){return h===!0||h===!1||ii(h)&&ki(h)==tt}var Zf=v_||lT,$Z=_m?vo(_m):ni;function HZ(h){return ii(h)&&h.nodeType===1&&!Ty(h)}function VZ(h){if(h==null)return!0;if(Ia(h)&&(wn(h)||typeof h=="string"||typeof h.splice=="function"||Zf(h)||Km(h)||Hh(h)))return!h.length;var b=Uo(h);if(b==Ee||b==We)return!h.size;if(Cy(h))return!Ki(h).length;for(var A in h)if(Gn.call(h,A))return!1;return!0}function WZ(h,b){return Vr(h,b)}function GZ(h,b,A){A=typeof A=="function"?A:n;var L=A?A(h,b):n;return L===n?Vr(h,b,n,A):!!L}function JA(h){if(!ii(h))return!1;var b=ki(h);return b==Xe||b==ct||typeof h.message=="string"&&typeof h.name=="string"&&!Ty(h)}function jZ(h){return typeof h=="number"&&ey(h)}function Mc(h){if(!Gr(h))return!1;var b=ki(h);return b==ue||b==De||b==He||b==Ne}function j5(h){return typeof h=="number"&&h==Tn(h)}function iw(h){return typeof h=="number"&&h>-1&&h%1==0&&h<=W}function Gr(h){var b=typeof h;return h!=null&&(b=="object"||b=="function")}function ii(h){return h!=null&&typeof h=="object"}var q5=Vv?vo(Vv):Gf;function qZ(h,b){return h===b||Wr(h,b,HA(b))}function XZ(h,b,A){return A=typeof A=="function"?A:n,Wr(h,b,HA(b),A)}function YZ(h){return X5(h)&&h!=+h}function KZ(h){if(OY(h))throw new hn(o);return jf(h)}function ZZ(h){return h===null}function JZ(h){return h==null}function X5(h){return typeof h=="number"||ii(h)&&ki(h)==X}function Ty(h){if(!ii(h)||ki(h)!=me)return!1;var b=_h(h);if(b===null)return!0;var A=Gn.call(b,"constructor")&&b.constructor;return typeof A=="function"&&A instanceof A&&kf.call(A)==pc}var QA=wm?vo(wm):qf;function QZ(h){return j5(h)&&h>=-W&&h<=W}var Y5=Sm?vo(Sm):km;function ow(h){return typeof h=="string"||!wn(h)&&ii(h)&&ki(h)==lt}function gs(h){return typeof h=="symbol"||ii(h)&&ki(h)==z}var Km=dc?vo(dc):my;function eJ(h){return h===n}function tJ(h){return ii(h)&&Uo(h)==oe}function nJ(h){return ii(h)&&ki(h)==ge}var rJ=Gt(Oh),iJ=Gt(function(h,b){return h<=b});function K5(h){if(!h)return[];if(Ia(h))return ow(h)?Or(h):eo(h);if(yu&&h[yu])return Rf(h[yu]());var b=Uo(h),A=b==Ee?gh:b==We?vh:Zm;return A(h)}function Cc(h){if(!h)return h===0?h:0;if(h=il(h),h===$||h===-$){var b=h<0?-1:1;return b*U}return h===h?h:0}function Tn(h){var b=Cc(h),A=b%1;return b===b?A?b-A:b:0}function Z5(h){return h?_u(Tn(h),0,re):0}function il(h){if(typeof h=="number")return h;if(gs(h))return te;if(Gr(h)){var b=typeof h.valueOf=="function"?h.valueOf():h;h=Gr(b)?b+"":b}if(typeof h!="string")return h===0?h:+h;h=Cm(h);var A=_e.test(h);return A||ke.test(h)?DA(h.slice(2),A?2:8):J.test(h)?te:+h}function J5(h){return Oa(h,Fa(h))}function oJ(h){return h?_u(Tn(h),-W,W):h===0?h:0}function rr(h){return h==null?"":Ji(h)}var aJ=Sc(function(h,b){if(Cy(b)||Ia(b)){Oa(b,no(b),h);return}for(var A in b)Gn.call(b,A)&&ds(h,A,b[A])}),Q5=Sc(function(h,b){Oa(b,Fa(b),h)}),aw=Sc(function(h,b,A,L){Oa(b,Fa(b),h,L)}),sJ=Sc(function(h,b,A,L){Oa(b,no(b),h,L)}),lJ=An(Im);function uJ(h,b){var A=Ol(h);return b==null?A:uy(A,b)}var cJ=Kt(function(h,b){h=un(h);var A=-1,L=b.length,q=L>2?b[2]:n;for(q&&ca(b[0],b[1],q)&&(L=1);++A1),ie}),Oa(h,Un(h),A),L&&(A=oa(A,f|d|p,Dt));for(var q=b.length;q--;)by(A,b[q]);return A});function TJ(h,b){return tF(h,rw(rn(b)))}var DJ=An(function(h,b){return h==null?{}:Lh(h,b)});function tF(h,b){if(h==null)return{};var A=mr(Un(h),function(L){return[L]});return b=rn(b),zm(h,A,function(L,q){return b(L,q[0])})}function RJ(h,b,A){b=Cu(b,h);var L=-1,q=b.length;for(q||(q=1,h=n);++Lb){var L=h;h=b,b=L}if(A||h%1||b%1){var q=ty();return Xi(h+q*(b-h+o_("1e-"+((q+"").length-1))),b)}return el(h,b)}var $J=m(function(h,b,A){return b=b.toLowerCase(),h+(A?iF(b):b)});function iF(h){return nT(rr(h).toLowerCase())}function oF(h){return h=rr(h),h&&h.replace(Mt,c_).replace(Ci,"")}function HJ(h,b,A){h=rr(h),b=Ji(b);var L=h.length;A=A===n?L:_u(Tn(A),0,L);var q=A;return A-=b.length,A>=0&&h.slice(A,q)==b}function VJ(h){return h=rr(h),h&&Ye.test(h)?h.replace(gt,f_):h}function WJ(h){return h=rr(h),h&&ur.test(h)?h.replace(En,"\\$&"):h}var GJ=m(function(h,b,A){return h+(A?"-":"")+b.toLowerCase()}),jJ=m(function(h,b,A){return h+(A?" ":"")+b.toLowerCase()}),qJ=K_("toLowerCase");function XJ(h,b,A){h=rr(h),b=Tn(b);var L=b?Xs(h):0;if(!b||L>=b)return h;var q=(b-L)/2;return dt(Eh(q),A)+h+dt(Sh(q),A)}function YJ(h,b,A){h=rr(h),b=Tn(b);var L=b?Xs(h):0;return b&&L>>0,A?(h=rr(h),h&&(typeof b=="string"||b!=null&&!QA(b))&&(b=Ji(b),!b&&hc(h))?Au(Or(h),0,A):h.split(b,A)):[]}var nQ=m(function(h,b,A){return h+(A?" ":"")+nT(b)});function rQ(h,b,A){return h=rr(h),A=A==null?0:_u(Tn(A),0,h.length),b=Ji(b),h.slice(A,A+b.length)==b}function iQ(h,b,A){var L=ee.templateSettings;A&&ca(h,b,A)&&(b=n),h=rr(h),b=aw({},b,L,Ae);var q=aw({},b.imports,L.imports,Ae),ie=no(q),he=yo(q,ie),ye,Te,et=0,nt=b.interpolate||Ft,at="__p += '",At=Ai((b.escape||Ft).source+"|"+nt.source+"|"+(nt===_n?Ge:Ft).source+"|"+(b.evaluate||Ft).source+"|$","g"),zt="//# sourceURL="+(Gn.call(b,"sourceURL")?(b.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Gs+"]")+` -`;h.replace(At,function(fn,kn,Hn,vs,fa,ys){return Hn||(Hn=vs),at+=h.slice(et,ys).replace(Wt,qv),kn&&(ye=!0,at+=`' + -__e(`+kn+`) + +`)}function kY(h){return _n(h)||Vh(h)||!!(ny&&h&&h[ny])}function Ec(h,b){var A=typeof h;return b=b??W,!!b&&(A=="number"||A!="symbol"&&ze.test(h))&&h>-1&&h%1==0&&h0){if(++b>=G)return arguments[0]}else b=0;return h.apply(n,arguments)}}function Q_(h,b){var A=-1,L=h.length,q=L-1;for(b=b===n?L:b;++A1?h[b-1]:n;return A=typeof A=="function"?(h.pop(),A):n,L5(h,A)});function k5(h){var b=ee(h);return b.__chain__=!0,b}function XK(h,b){return b(h),h}function ew(h,b){return b(h)}var YK=Cn(function(h){var b=h.length,A=b?h[0]:0,L=this.__wrapped__,q=function(ie){return Fm(ie,h)};return b>1||this.__actions__.length||!(L instanceof Jt)||!Ec(A)?this.thru(q):(L=L.slice(A,+A+(b?1:0)),L.__actions__.push({func:ew,args:[q],thisArg:n}),new Ki(L,this.__chain__).thru(function(ie){return b&&!ie.length&&ie.push(n),ie}))});function KK(){return k5(this)}function ZK(){return new Ki(this.value(),this.__chain__)}function JK(){this.__values__===n&&(this.__values__=Z5(this.value()));var h=this.__index__>=this.__values__.length,b=h?n:this.__values__[this.__index__++];return{done:h,value:b}}function QK(){return this}function eZ(h){for(var b,A=this;A instanceof Dh;){var L=R5(A);L.__index__=0,L.__values__=n,b?q.__wrapped__=L:b=L;var q=L;A=A.__wrapped__}return q.__wrapped__=h,b}function tZ(){var h=this.__wrapped__;if(h instanceof Jt){var b=h;return this.__actions__.length&&(b=new Jt(this)),b=b.reverse(),b.__actions__.push({func:ew,args:[YA],thisArg:n}),new Ki(b,this.__chain__)}return this.thru(YA)}function nZ(){return Su(this.__wrapped__,this.__actions__)}var rZ=zh(function(h,b,A){Gn.call(h,A)?++h[A]:Qs(h,A,1)});function iZ(h,b,A){var L=_n(h)?Xv:BA;return A&&ca(h,b,A)&&(b=n),L(h,rn(b,3))}function oZ(h,b){var A=_n(h)?Xi:my;return A(h,rn(b,3))}var aZ=R(P5),sZ=R(N5);function lZ(h,b){return Di(tw(h,b),1)}function uZ(h,b){return Di(tw(h,b),$)}function cZ(h,b,A){return A=A===n?1:An(A),Di(tw(h,b),A)}function B5(h,b){var A=_n(h)?pi:hs;return A(h,rn(b,3))}function U5(h,b){var A=_n(h)?qv:$_;return A(h,rn(b,3))}var fZ=zh(function(h,b,A){Gn.call(h,A)?h[A].push(b):Qs(h,A,[b])});function dZ(h,b,A,L){h=Ia(h)?h:Jm(h),A=A&&!L?An(A):0;var q=h.length;return A<0&&(A=gi(q+A,0)),aw(h)?A<=q&&h.indexOf(b,A)>-1:!!q&&ss(h,b,A)>-1}var hZ=Kt(function(h,b,A){var L=-1,q=typeof b=="function",ie=Ia(h)?$e(h.length):[];return hs(h,function(he){ie[++L]=q?_r(b,he,A):vr(he,b,A)}),ie}),pZ=zh(function(h,b,A){Qs(h,A,b)});function tw(h,b){var A=_n(h)?mr:_c;return A(h,rn(b,3))}function mZ(h,b,A,L){return h==null?[]:(_n(b)||(b=b==null?[]:[b]),A=L?n:A,_n(A)||(A=A==null?[]:[A]),Lh(h,b,A))}var gZ=zh(function(h,b,A){h[A?0:1].push(b)},function(){return[[],[]]});function vZ(h,b,A){var L=_n(h)?Mm:hu,q=arguments.length<3;return L(h,rn(b,4),A,q,hs)}function yZ(h,b,A){var L=_n(h)?s_:hu,q=arguments.length<3;return L(h,rn(b,4),A,q,$_)}function xZ(h,b){var A=_n(h)?Xi:my;return A(h,iw(rn(b,3)))}function bZ(h){var b=_n(h)?Rh:W_;return b(h)}function _Z(h,b,A){(A?ca(h,b,A):b===n)?b=1:b=An(b);var L=_n(h)?uy:by;return L(h,b)}function wZ(h){var b=_n(h)?U_:j_;return b(h)}function SZ(h){if(h==null)return 0;if(Ia(h))return aw(h)?Xs(h):h.length;var b=Uo(h);return b==Ee||b==We?h.size:Zi(h).length}function EZ(h,b,A){var L=_n(h)?hh:_y;return A&&ca(h,b,A)&&(b=n),L(h,rn(b,3))}var MZ=Kt(function(h,b){if(h==null)return[];var A=b.length;return A>1&&ca(h,b[0],b[1])?b=[]:A>2&&ca(b[0],b[1],b[2])&&(b=[b[0]]),Lh(h,Di(b,1),[])}),nw=g_||function(){return ei.Date.now()};function CZ(h,b){if(typeof b!="function")throw new bo(a);return h=An(h),function(){if(--h<1)return b.apply(this,arguments)}}function z5(h,b,A){return b=A?n:b,b=h&&b==null?h.length:b,Fe(h,D,n,n,n,n,b)}function $5(h,b){var A;if(typeof b!="function")throw new bo(a);return h=An(h),function(){return--h>0&&(A=b.apply(this,arguments)),h<=1&&(b=n),A}}var ZA=Kt(function(h,b,A){var L=_;if(A.length){var q=cs(A,Km(ZA));L|=T}return Fe(h,L,b,A,q)}),H5=Kt(function(h,b,A){var L=_|v;if(A.length){var q=cs(A,Km(H5));L|=T}return Fe(b,L,h,A,q)});function V5(h,b,A){b=A?n:b;var L=Fe(h,w,n,n,n,n,n,b);return L.placeholder=V5.placeholder,L}function W5(h,b,A){b=A?n:b;var L=Fe(h,E,n,n,n,n,n,b);return L.placeholder=W5.placeholder,L}function G5(h,b,A){var L,q,ie,he,ye,Te,et=0,nt=!1,at=!1,At=!0;if(typeof h!="function")throw new bo(a);b=il(b)||0,Gr(A)&&(nt=!!A.leading,at="maxWait"in A,ie=at?gi(il(A.maxWait)||0,b):ie,At="trailing"in A?!!A.trailing:At);function zt(xi){var kl=L,Ac=q;return L=q=n,et=xi,he=h.apply(Ac,kl),he}function un(xi){return et=xi,ye=Ry(Ln,b),nt?zt(xi):he}function Nn(xi){var kl=xi-Te,Ac=xi-et,cF=b-kl;return at?Yi(cF,ie-Ac):cF}function cn(xi){var kl=xi-Te,Ac=xi-et;return Te===n||kl>=b||kl<0||at&&Ac>=ie}function Ln(){var xi=nw();if(cn(xi))return $n(xi);ye=Ry(Ln,Nn(xi))}function $n(xi){return ye=n,At&&L?zt(xi):(L=q=n,he)}function vs(){ye!==n&&X_(ye),et=0,L=Te=q=ye=n}function fa(){return ye===n?he:$n(nw())}function ys(){var xi=nw(),kl=cn(xi);if(L=arguments,q=this,Te=xi,kl){if(ye===n)return un(Te);if(at)return X_(ye),ye=Ry(Ln,b),zt(Te)}return ye===n&&(ye=Ry(Ln,b)),he}return ys.cancel=vs,ys.flush=fa,ys}var AZ=Kt(function(h,b){return py(h,1,b)}),TZ=Kt(function(h,b,A){return py(h,il(b)||0,A)});function DZ(h){return Fe(h,P)}function rw(h,b){if(typeof h!="function"||b!=null&&typeof b!="function")throw new bo(a);var A=function(){var L=arguments,q=b?b.apply(this,L):L[0],ie=A.cache;if(ie.has(q))return ie.get(q);var he=h.apply(this,L);return A.cache=ie.set(q,he)||ie,he};return A.cache=new(rw.Cache||Ra),A}rw.Cache=Ra;function iw(h){if(typeof h!="function")throw new bo(a);return function(){var b=arguments;switch(b.length){case 0:return!h.call(this);case 1:return!h.call(this,b[0]);case 2:return!h.call(this,b[0],b[1]);case 3:return!h.call(this,b[0],b[1],b[2])}return!h.apply(this,b)}}function RZ(h){return $5(2,h)}var PZ=q_(function(h,b){b=b.length==1&&_n(b[0])?mr(b[0],yo(rn())):mr(Di(b,1),yo(rn()));var A=b.length;return Kt(function(L){for(var q=-1,ie=Yi(L.length,A);++q=b}),Vh=En(function(){return arguments}())?En:function(h){return ii(h)&&Gn.call(h,"callee")&&!Rm.call(h,"callee")},_n=$e.isArray,jZ=_m?yo(_m):ti;function Ia(h){return h!=null&&ow(h.length)&&!Mc(h)}function yi(h){return ii(h)&&Ia(h)}function qZ(h){return h===!0||h===!1||ii(h)&&ki(h)==tt}var Zf=y_||uT,XZ=wm?yo(wm):ni;function YZ(h){return ii(h)&&h.nodeType===1&&!Py(h)}function KZ(h){if(h==null)return!0;if(Ia(h)&&(_n(h)||typeof h=="string"||typeof h.splice=="function"||Zf(h)||Zm(h)||Vh(h)))return!h.length;var b=Uo(h);if(b==Ee||b==We)return!h.size;if(Dy(h))return!Zi(h).length;for(var A in h)if(Gn.call(h,A))return!1;return!0}function ZZ(h,b){return Vr(h,b)}function JZ(h,b,A){A=typeof A=="function"?A:n;var L=A?A(h,b):n;return L===n?Vr(h,b,n,A):!!L}function QA(h){if(!ii(h))return!1;var b=ki(h);return b==Xe||b==ct||typeof h.message=="string"&&typeof h.name=="string"&&!Py(h)}function QZ(h){return typeof h=="number"&&ry(h)}function Mc(h){if(!Gr(h))return!1;var b=ki(h);return b==ue||b==De||b==He||b==Ne}function q5(h){return typeof h=="number"&&h==An(h)}function ow(h){return typeof h=="number"&&h>-1&&h%1==0&&h<=W}function Gr(h){var b=typeof h;return h!=null&&(b=="object"||b=="function")}function ii(h){return h!=null&&typeof h=="object"}var X5=jv?yo(jv):Gf;function eJ(h,b){return h===b||Wr(h,b,VA(b))}function tJ(h,b,A){return A=typeof A=="function"?A:n,Wr(h,b,VA(b),A)}function nJ(h){return Y5(h)&&h!=+h}function rJ(h){if(zY(h))throw new dn(o);return jf(h)}function iJ(h){return h===null}function oJ(h){return h==null}function Y5(h){return typeof h=="number"||ii(h)&&ki(h)==X}function Py(h){if(!ii(h)||ki(h)!=me)return!1;var b=wh(h);if(b===null)return!0;var A=Gn.call(b,"constructor")&&b.constructor;return typeof A=="function"&&A instanceof A&&kf.call(A)==pc}var eT=Sm?yo(Sm):qf;function aJ(h){return q5(h)&&h>=-W&&h<=W}var K5=Em?yo(Em):Bm;function aw(h){return typeof h=="string"||!_n(h)&&ii(h)&&ki(h)==lt}function gs(h){return typeof h=="symbol"||ii(h)&&ki(h)==z}var Zm=dc?yo(dc):yy;function sJ(h){return h===n}function lJ(h){return ii(h)&&Uo(h)==oe}function uJ(h){return ii(h)&&ki(h)==ge}var cJ=jt(Ih),fJ=jt(function(h,b){return h<=b});function Z5(h){if(!h)return[];if(Ia(h))return aw(h)?Or(h):to(h);if(vu&&h[vu])return Rf(h[vu]());var b=Uo(h),A=b==Ee?vh:b==We?yh:Jm;return A(h)}function Cc(h){if(!h)return h===0?h:0;if(h=il(h),h===$||h===-$){var b=h<0?-1:1;return b*U}return h===h?h:0}function An(h){var b=Cc(h),A=b%1;return b===b?A?b-A:b:0}function J5(h){return h?bu(An(h),0,re):0}function il(h){if(typeof h=="number")return h;if(gs(h))return te;if(Gr(h)){var b=typeof h.valueOf=="function"?h.valueOf():h;h=Gr(b)?b+"":b}if(typeof h!="string")return h===0?h:+h;h=Am(h);var A=_e.test(h);return A||ke.test(h)?RA(h.slice(2),A?2:8):J.test(h)?te:+h}function Q5(h){return Oa(h,Fa(h))}function dJ(h){return h?bu(An(h),-W,W):h===0?h:0}function rr(h){return h==null?"":Qi(h)}var hJ=Sc(function(h,b){if(Dy(b)||Ia(b)){Oa(b,ro(b),h);return}for(var A in b)Gn.call(b,A)&&ds(h,A,b[A])}),eF=Sc(function(h,b){Oa(b,Fa(b),h)}),sw=Sc(function(h,b,A,L){Oa(b,Fa(b),h,L)}),pJ=Sc(function(h,b,A,L){Oa(b,ro(b),h,L)}),mJ=Cn(Fm);function gJ(h,b){var A=Ol(h);return b==null?A:dy(A,b)}var vJ=Kt(function(h,b){h=ln(h);var A=-1,L=b.length,q=L>2?b[2]:n;for(q&&ca(b[0],b[1],q)&&(L=1);++A1),ie}),Oa(h,Bn(h),A),L&&(A=oa(A,f|d|p,Dt));for(var q=b.length;q--;)Sy(A,b[q]);return A});function FJ(h,b){return nF(h,iw(rn(b)))}var LJ=Cn(function(h,b){return h==null?{}:kh(h,b)});function nF(h,b){if(h==null)return{};var A=mr(Bn(h),function(L){return[L]});return b=rn(b),$m(h,A,function(L,q){return b(L,q[0])})}function kJ(h,b,A){b=Mu(b,h);var L=-1,q=b.length;for(q||(q=1,h=n);++Lb){var L=h;h=b,b=L}if(A||h%1||b%1){var q=iy();return Yi(h+q*(b-h+a_("1e-"+((q+"").length-1))),b)}return el(h,b)}var XJ=m(function(h,b,A){return b=b.toLowerCase(),h+(A?oF(b):b)});function oF(h){return rT(rr(h).toLowerCase())}function aF(h){return h=rr(h),h&&h.replace(Mt,f_).replace(Ci,"")}function YJ(h,b,A){h=rr(h),b=Qi(b);var L=h.length;A=A===n?L:bu(An(A),0,L);var q=A;return A-=b.length,A>=0&&h.slice(A,q)==b}function KJ(h){return h=rr(h),h&&Ye.test(h)?h.replace(gt,d_):h}function ZJ(h){return h=rr(h),h&&ur.test(h)?h.replace(Sn,"\\$&"):h}var JJ=m(function(h,b,A){return h+(A?"-":"")+b.toLowerCase()}),QJ=m(function(h,b,A){return h+(A?" ":"")+b.toLowerCase()}),eQ=Z_("toLowerCase");function tQ(h,b,A){h=rr(h),b=An(b);var L=b?Xs(h):0;if(!b||L>=b)return h;var q=(b-L)/2;return dt(Mh(q),A)+h+dt(Eh(q),A)}function nQ(h,b,A){h=rr(h),b=An(b);var L=b?Xs(h):0;return b&&L>>0,A?(h=rr(h),h&&(typeof b=="string"||b!=null&&!eT(b))&&(b=Qi(b),!b&&hc(h))?Cu(Or(h),0,A):h.split(b,A)):[]}var uQ=m(function(h,b,A){return h+(A?" ":"")+rT(b)});function cQ(h,b,A){return h=rr(h),A=A==null?0:bu(An(A),0,h.length),b=Qi(b),h.slice(A,A+b.length)==b}function fQ(h,b,A){var L=ee.templateSettings;A&&ca(h,b,A)&&(b=n),h=rr(h),b=sw({},b,L,Ae);var q=sw({},b.imports,L.imports,Ae),ie=ro(q),he=xo(q,ie),ye,Te,et=0,nt=b.interpolate||Ft,at="__p += '",At=Ai((b.escape||Ft).source+"|"+nt.source+"|"+(nt===bn?Ge:Ft).source+"|"+(b.evaluate||Ft).source+"|$","g"),zt="//# sourceURL="+(Gn.call(b,"sourceURL")?(b.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Gs+"]")+` +`;h.replace(At,function(cn,Ln,$n,vs,fa,ys){return $n||($n=vs),at+=h.slice(et,ys).replace(Wt,Kv),Ln&&(ye=!0,at+=`' + +__e(`+Ln+`) + '`),fa&&(Te=!0,at+=`'; `+fa+`; -__p += '`),Hn&&(at+=`' + -((__t = (`+Hn+`)) == null ? '' : __t) + -'`),et=ys+fn.length,fn}),at+=`'; -`;var cn=Gn.call(b,"variable")&&b.variable;if(!cn)at=`with (obj) { +__p += '`),$n&&(at+=`' + +((__t = (`+$n+`)) == null ? '' : __t) + +'`),et=ys+cn.length,cn}),at+=`'; +`;var un=Gn.call(b,"variable")&&b.variable;if(!un)at=`with (obj) { `+at+` } -`;else if(ta.test(cn))throw new hn(s);at=(Te?at.replace(Ct,""):at).replace(pt,"$1").replace(jt,"$1;"),at="function("+(cn||"obj")+`) { -`+(cn?"":`obj || (obj = {}); +`;else if(ta.test(un))throw new dn(s);at=(Te?at.replace(Ct,""):at).replace(pt,"$1").replace(qt,"$1;"),at="function("+(un||"obj")+`) { +`+(un?"":`obj || (obj = {}); `)+"var __t, __p = ''"+(ye?", __e = _.escape":"")+(Te?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; `)+at+`return __p -}`;var On=sF(function(){return yn(ie,zt+"return "+at).apply(n,he)});if(On.source=at,JA(On))throw On;return On}function oQ(h){return rr(h).toLowerCase()}function aQ(h){return rr(h).toUpperCase()}function sQ(h,b,A){if(h=rr(h),h&&(A||b===n))return Cm(h);if(!h||!(b=Ji(b)))return h;var L=Or(h),q=Or(b),ie=gr(L,q),he=Df(L,q)+1;return Au(L,ie,he).join("")}function lQ(h,b,A){if(h=rr(h),h&&(A||b===n))return h.slice(0,Of(h)+1);if(!h||!(b=Ji(b)))return h;var L=Or(h),q=Df(L,Or(b))+1;return Au(L,0,q).join("")}function uQ(h,b,A){if(h=rr(h),h&&(A||b===n))return h.replace(Aa,"");if(!h||!(b=Ji(b)))return h;var L=Or(h),q=gr(L,Or(b));return Au(L,q).join("")}function cQ(h,b){var A=N,L=k;if(Gr(b)){var q="separator"in b?b.separator:q;A="length"in b?Tn(b.length):A,L="omission"in b?Ji(b.omission):L}h=rr(h);var ie=h.length;if(hc(h)){var he=Or(h);ie=he.length}if(A>=ie)return h;var ye=A-Xs(L);if(ye<1)return L;var Te=he?Au(he,0,ye).join(""):h.slice(0,ye);if(q===n)return Te+L;if(he&&(ye+=Te.length-ye),QA(q)){if(h.slice(ye).search(q)){var et,nt=Te;for(q.global||(q=Ai(q.source,rr(ot.exec(q))+"g")),q.lastIndex=0;et=q.exec(nt);)var at=et.index;Te=Te.slice(0,at===n?ye:at)}}else if(h.indexOf(Ji(q),ye)!=ye){var At=Te.lastIndexOf(q);At>-1&&(Te=Te.slice(0,At))}return Te+L}function fQ(h){return h=rr(h),h&&ft.test(h)?h.replace(be,If):h}var dQ=m(function(h,b,A){return h+(A?" ":"")+b.toUpperCase()}),nT=K_("toUpperCase");function aF(h,b,A){return h=rr(h),b=A?n:b,b===n?mh(h)?Ff(h):l_(h):h.match(b)||[]}var sF=Kt(function(h,b){try{return _r(h,n,b)}catch(A){return JA(A)?A:new hn(A)}}),hQ=An(function(h,b){return pi(b,function(A){A=Du(A),Qs(h,A,KA(h[A],h))}),h});function pQ(h){var b=h==null?0:h.length,A=rn();return h=b?mr(h,function(L){if(typeof L[1]!="function")throw new xo(a);return[A(L[0]),L[1]]}):[],Kt(function(L){for(var q=-1;++qW)return[];var A=re,L=Xi(h,re);b=rn(b),h-=re;for(var q=Rl(L,b);++A0||b<0)?new Zt(A):(h<0?A=A.takeRight(-h):h&&(A=A.drop(h)),b!==n&&(b=Tn(b),A=b<0?A.dropRight(-b):A.take(b-h)),A)},Zt.prototype.takeRightWhile=function(h){return this.reverse().takeWhile(h).reverse()},Zt.prototype.toArray=function(){return this.take(re)},aa(Zt.prototype,function(h,b){var A=/^(?:filter|find|map|reject)|While$/.test(b),L=/^(?:head|last)$/.test(b),q=ee[L?"take"+(b=="last"?"Right":""):b],ie=L||/^find/.test(b);q&&(ee.prototype[b]=function(){var he=this.__wrapped__,ye=L?[1]:arguments,Te=he instanceof Zt,et=ye[0],nt=Te||wn(he),at=function(kn){var Hn=q.apply(ee,as([kn],ye));return L&&At?Hn[0]:Hn};nt&&A&&typeof et=="function"&&et.length!=1&&(Te=nt=!1);var At=this.__chain__,zt=!!this.__actions__.length,cn=ie&&!At,On=Te&&!zt;if(!ie&&nt){he=On?he:new Zt(this);var fn=h.apply(he,ye);return fn.__actions__.push({func:Q_,args:[at],thisArg:n}),new Yi(fn,At)}return cn&&On?h.apply(this,ye):(fn=this.thru(at),cn?L?fn.value()[0]:fn.value():fn)})}),pi(["pop","push","shift","sort","splice","unshift"],function(h){var b=gu[h],A=/^(?:push|sort|unshift)$/.test(h)?"tap":"thru",L=/^(?:pop|shift)$/.test(h);ee.prototype[h]=function(){var q=arguments;if(L&&!this.__chain__){var ie=this.value();return b.apply(wn(ie)?ie:[],q)}return this[A](function(he){return b.apply(wn(he)?he:[],q)})}}),aa(Zt.prototype,function(h,b){var A=ee[b];if(A){var L=A.name+"";Gn.call(vc,L)||(vc[L]=[]),vc[L].push({name:b,func:A})}}),vc[V(n,v).name]=[{name:"wrapper",func:n}],Zt.prototype.clone=NA,Zt.prototype.reverse=OA,Zt.prototype.value=ia,ee.prototype.at=HK,ee.prototype.chain=VK,ee.prototype.commit=WK,ee.prototype.next=GK,ee.prototype.plant=qK,ee.prototype.reverse=XK,ee.prototype.toJSON=ee.prototype.valueOf=ee.prototype.value=YK,ee.prototype.first=ee.prototype.head,yu&&(ee.prototype[yu]=jK),ee},mu=p_();Ii?((Ii.exports=mu)._=mu,Hv._=mu):ei._=mu}).call(Uc)})(y2,y2.exports);var Jo=y2.exports;/** +}`;var Nn=lF(function(){return vn(ie,zt+"return "+at).apply(n,he)});if(Nn.source=at,QA(Nn))throw Nn;return Nn}function dQ(h){return rr(h).toLowerCase()}function hQ(h){return rr(h).toUpperCase()}function pQ(h,b,A){if(h=rr(h),h&&(A||b===n))return Am(h);if(!h||!(b=Qi(b)))return h;var L=Or(h),q=Or(b),ie=gr(L,q),he=Df(L,q)+1;return Cu(L,ie,he).join("")}function mQ(h,b,A){if(h=rr(h),h&&(A||b===n))return h.slice(0,Of(h)+1);if(!h||!(b=Qi(b)))return h;var L=Or(h),q=Df(L,Or(b))+1;return Cu(L,0,q).join("")}function gQ(h,b,A){if(h=rr(h),h&&(A||b===n))return h.replace(Aa,"");if(!h||!(b=Qi(b)))return h;var L=Or(h),q=gr(L,Or(b));return Cu(L,q).join("")}function vQ(h,b){var A=N,L=k;if(Gr(b)){var q="separator"in b?b.separator:q;A="length"in b?An(b.length):A,L="omission"in b?Qi(b.omission):L}h=rr(h);var ie=h.length;if(hc(h)){var he=Or(h);ie=he.length}if(A>=ie)return h;var ye=A-Xs(L);if(ye<1)return L;var Te=he?Cu(he,0,ye).join(""):h.slice(0,ye);if(q===n)return Te+L;if(he&&(ye+=Te.length-ye),eT(q)){if(h.slice(ye).search(q)){var et,nt=Te;for(q.global||(q=Ai(q.source,rr(ot.exec(q))+"g")),q.lastIndex=0;et=q.exec(nt);)var at=et.index;Te=Te.slice(0,at===n?ye:at)}}else if(h.indexOf(Qi(q),ye)!=ye){var At=Te.lastIndexOf(q);At>-1&&(Te=Te.slice(0,At))}return Te+L}function yQ(h){return h=rr(h),h&&ft.test(h)?h.replace(be,If):h}var xQ=m(function(h,b,A){return h+(A?" ":"")+b.toUpperCase()}),rT=Z_("toUpperCase");function sF(h,b,A){return h=rr(h),b=A?n:b,b===n?gh(h)?Ff(h):u_(h):h.match(b)||[]}var lF=Kt(function(h,b){try{return _r(h,n,b)}catch(A){return QA(A)?A:new dn(A)}}),bQ=Cn(function(h,b){return pi(b,function(A){A=Tu(A),Qs(h,A,ZA(h[A],h))}),h});function _Q(h){var b=h==null?0:h.length,A=rn();return h=b?mr(h,function(L){if(typeof L[1]!="function")throw new bo(a);return[A(L[0]),L[1]]}):[],Kt(function(L){for(var q=-1;++qW)return[];var A=re,L=Yi(h,re);b=rn(b),h-=re;for(var q=Rl(L,b);++A0||b<0)?new Jt(A):(h<0?A=A.takeRight(-h):h&&(A=A.drop(h)),b!==n&&(b=An(b),A=b<0?A.dropRight(-b):A.take(b-h)),A)},Jt.prototype.takeRightWhile=function(h){return this.reverse().takeWhile(h).reverse()},Jt.prototype.toArray=function(){return this.take(re)},aa(Jt.prototype,function(h,b){var A=/^(?:filter|find|map|reject)|While$/.test(b),L=/^(?:head|last)$/.test(b),q=ee[L?"take"+(b=="last"?"Right":""):b],ie=L||/^find/.test(b);q&&(ee.prototype[b]=function(){var he=this.__wrapped__,ye=L?[1]:arguments,Te=he instanceof Jt,et=ye[0],nt=Te||_n(he),at=function(Ln){var $n=q.apply(ee,as([Ln],ye));return L&&At?$n[0]:$n};nt&&A&&typeof et=="function"&&et.length!=1&&(Te=nt=!1);var At=this.__chain__,zt=!!this.__actions__.length,un=ie&&!At,Nn=Te&&!zt;if(!ie&&nt){he=Nn?he:new Jt(this);var cn=h.apply(he,ye);return cn.__actions__.push({func:ew,args:[at],thisArg:n}),new Ki(cn,At)}return un&&Nn?h.apply(this,ye):(cn=this.thru(at),un?L?cn.value()[0]:cn.value():cn)})}),pi(["pop","push","shift","sort","splice","unshift"],function(h){var b=mu[h],A=/^(?:push|sort|unshift)$/.test(h)?"tap":"thru",L=/^(?:pop|shift)$/.test(h);ee.prototype[h]=function(){var q=arguments;if(L&&!this.__chain__){var ie=this.value();return b.apply(_n(ie)?ie:[],q)}return this[A](function(he){return b.apply(_n(he)?he:[],q)})}}),aa(Jt.prototype,function(h,b){var A=ee[b];if(A){var L=A.name+"";Gn.call(vc,L)||(vc[L]=[]),vc[L].push({name:b,func:A})}}),vc[V(n,v).name]=[{name:"wrapper",func:n}],Jt.prototype.clone=OA,Jt.prototype.reverse=IA,Jt.prototype.value=ia,ee.prototype.at=YK,ee.prototype.chain=KK,ee.prototype.commit=ZK,ee.prototype.next=JK,ee.prototype.plant=eZ,ee.prototype.reverse=tZ,ee.prototype.toJSON=ee.prototype.valueOf=ee.prototype.value=nZ,ee.prototype.first=ee.prototype.head,vu&&(ee.prototype[vu]=QK),ee},pu=m_();Ii?((Ii.exports=pu)._=pu,Gv._=pu):ei._=pu}).call(Uc)})(y2,y2.exports);var Jo=y2.exports;/** * @license * Copyright 2010-2023 Three.js Authors * SPDX-License-Identifier: MIT - */const xC="158",dbe={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},hbe={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},nW=0,$R=1,rW=2,pbe=3,iW=0,bC=1,W1=2,jl=3,lf=0,Sa=1,Kl=2,mbe=2,Jc=0,Ap=1,HR=2,VR=3,WR=4,oW=5,gd=100,aW=101,sW=102,GR=103,jR=104,lW=200,uW=201,cW=202,fW=203,x2=204,b2=205,dW=206,hW=207,pW=208,mW=209,gW=210,vW=211,yW=212,xW=213,bW=214,_W=0,wW=1,SW=2,Ox=3,EW=4,MW=5,CW=6,AW=7,Ab=0,TW=1,DW=2,qu=0,RW=1,PW=2,NW=3,l4=4,OW=5,qR="attached",IW="detached",Tb=300,uf=301,$d=302,Ix=303,Fx=304,wv=306,Lx=1e3,uo=1001,kx=1002,ci=1003,_2=1004,gbe=1004,G1=1005,vbe=1005,wi=1006,u4=1007,ybe=1007,Hd=1008,xbe=1008,Ls=1009,FW=1010,LW=1011,_C=1012,c4=1013,Yc=1014,eu=1015,Vp=1016,f4=1017,d4=1018,Rd=1020,kW=1021,ba=1023,BW=1024,UW=1025,Pd=1026,Wp=1027,h4=1028,p4=1029,zW=1030,m4=1031,g4=1033,fE=33776,dE=33777,hE=33778,pE=33779,XR=35840,YR=35841,KR=35842,ZR=35843,$W=36196,JR=37492,QR=37496,eP=37808,tP=37809,nP=37810,rP=37811,iP=37812,oP=37813,aP=37814,sP=37815,lP=37816,uP=37817,cP=37818,fP=37819,dP=37820,hP=37821,mE=36492,pP=36494,mP=36495,HW=36283,gP=36284,vP=36285,yP=36286,VW=2200,WW=2201,GW=2202,Bx=2300,Ux=2301,gE=2302,mp=2400,gp=2401,zx=2402,wC=2500,v4=2501,bbe=0,_be=1,wbe=2,y4=3e3,Nd=3001,jW=3200,qW=3201,nh=0,XW=1,Ds="",Hi="srgb",tc="srgb-linear",SC="display-p3",Db="display-p3-linear",$x="linear",Er="srgb",Hx="rec709",Vx="p3",Sbe=0,ip=7680,Ebe=7681,Mbe=7682,Cbe=7683,Abe=34055,Tbe=34056,Dbe=5386,Rbe=512,Pbe=513,Nbe=514,Obe=515,Ibe=516,Fbe=517,Lbe=518,xP=519,YW=512,KW=513,ZW=514,JW=515,QW=516,eG=517,tG=518,nG=519,Wx=35044,kbe=35048,Bbe=35040,Ube=35045,zbe=35049,$be=35041,Hbe=35046,Vbe=35050,Wbe=35042,Gbe="100",bP="300 es",w2=1035,Uu=2e3,Gx=2001;class vf{addEventListener(e,n){this._listeners===void 0&&(this._listeners={});const r=this._listeners;r[e]===void 0&&(r[e]=[]),r[e].indexOf(n)===-1&&r[e].push(n)}hasEventListener(e,n){if(this._listeners===void 0)return!1;const r=this._listeners;return r[e]!==void 0&&r[e].indexOf(n)!==-1}removeEventListener(e,n){if(this._listeners===void 0)return;const i=this._listeners[e];if(i!==void 0){const o=i.indexOf(n);o!==-1&&i.splice(o,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const r=this._listeners[e.type];if(r!==void 0){e.target=this;const i=r.slice(0);for(let o=0,a=i.length;o>8&255]+Vo[t>>16&255]+Vo[t>>24&255]+"-"+Vo[e&255]+Vo[e>>8&255]+"-"+Vo[e>>16&15|64]+Vo[e>>24&255]+"-"+Vo[n&63|128]+Vo[n>>8&255]+"-"+Vo[n>>16&255]+Vo[n>>24&255]+Vo[r&255]+Vo[r>>8&255]+Vo[r>>16&255]+Vo[r>>24&255]).toLowerCase()}function fi(t,e,n){return Math.max(e,Math.min(n,t))}function x4(t,e){return(t%e+e)%e}function jbe(t,e,n,r,i){return r+(t-e)*(i-r)/(n-e)}function qbe(t,e,n){return t!==e?(n-t)/(e-t):0}function j1(t,e,n){return(1-n)*t+n*e}function Xbe(t,e,n,r){return j1(t,e,1-Math.exp(-n*r))}function Ybe(t,e=1){return e-Math.abs(x4(t,e*2)-e)}function Kbe(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*(3-2*t))}function Zbe(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*t*(t*(t*6-15)+10))}function Jbe(t,e){return t+Math.floor(Math.random()*(e-t+1))}function Qbe(t,e){return t+Math.random()*(e-t)}function e_e(t){return t*(.5-Math.random())}function t_e(t){t!==void 0&&(Ik=t);let e=Ik+=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 n_e(t){return t*Tp}function r_e(t){return t*ov}function _P(t){return(t&t-1)===0&&t!==0}function rG(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))}function S2(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}function i_e(t,e,n,r,i){const o=Math.cos,a=Math.sin,s=o(n/2),l=a(n/2),u=o((e+r)/2),c=a((e+r)/2),f=o((e-r)/2),d=a((e-r)/2),p=o((r-e)/2),y=a((r-e)/2);switch(i){case"XYX":t.set(s*c,l*f,l*d,s*u);break;case"YZY":t.set(l*d,s*c,l*f,s*u);break;case"ZXZ":t.set(l*f,l*d,s*c,s*u);break;case"XZX":t.set(s*c,l*y,l*p,s*u);break;case"YXY":t.set(l*p,s*c,l*y,s*u);break;case"ZYZ":t.set(l*y,l*p,s*c,s*u);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}function $a(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 Rn(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 o_e={DEG2RAD:Tp,RAD2DEG:ov,generateUUID:ks,clamp:fi,euclideanModulo:x4,mapLinear:jbe,inverseLerp:qbe,lerp:j1,damp:Xbe,pingpong:Ybe,smoothstep:Kbe,smootherstep:Zbe,randInt:Jbe,randFloat:Qbe,randFloatSpread:e_e,seededRandom:t_e,degToRad:n_e,radToDeg:r_e,isPowerOfTwo:_P,ceilPowerOfTwo:rG,floorPowerOfTwo:S2,setQuaternionFromProperEuler:i_e,normalize:Rn,denormalize:$a};class Je{constructor(e=0,n=0){Je.prototype.isVector2=!0,this.x=e,this.y=n}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,n){return this.x=e,this.y=n,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,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;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,n){return this.x=e.x+n.x,this.y=e.y+n.y,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,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,n){return this.x=e.x-n.x,this.y=e.y-n.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 n=this.x,r=this.y,i=e.elements;return this.x=i[0]*n+i[3]*r+i[6],this.y=i[1]*n+i[4]*r+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,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(n,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 n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const r=this.dot(e)/n;return Math.acos(fi(r,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,r=this.y-e.y;return n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this}lerpVectors(e,n,r){return this.x=e.x+(n.x-e.x)*r,this.y=e.y+(n.y-e.y)*r,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this}rotateAround(e,n){const r=Math.cos(n),i=Math.sin(n),o=this.x-e.x,a=this.y-e.y;return this.x=o*r-a*i+e.x,this.y=o*i+a*r+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class In{constructor(e,n,r,i,o,a,s,l,u){In.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,n,r,i,o,a,s,l,u)}set(e,n,r,i,o,a,s,l,u){const c=this.elements;return c[0]=e,c[1]=i,c[2]=s,c[3]=n,c[4]=o,c[5]=l,c[6]=r,c[7]=a,c[8]=u,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const n=this.elements,r=e.elements;return n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3],n[4]=r[4],n[5]=r[5],n[6]=r[6],n[7]=r[7],n[8]=r[8],this}extractBasis(e,n,r){return e.setFromMatrix3Column(this,0),n.setFromMatrix3Column(this,1),r.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const n=e.elements;return this.set(n[0],n[4],n[8],n[1],n[5],n[9],n[2],n[6],n[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const r=e.elements,i=n.elements,o=this.elements,a=r[0],s=r[3],l=r[6],u=r[1],c=r[4],f=r[7],d=r[2],p=r[5],y=r[8],x=i[0],_=i[3],v=i[6],S=i[1],w=i[4],E=i[7],T=i[2],C=i[5],D=i[8];return o[0]=a*x+s*S+l*T,o[3]=a*_+s*w+l*C,o[6]=a*v+s*E+l*D,o[1]=u*x+c*S+f*T,o[4]=u*_+c*w+f*C,o[7]=u*v+c*E+f*D,o[2]=d*x+p*S+y*T,o[5]=d*_+p*w+y*C,o[8]=d*v+p*E+y*D,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=e,n[4]*=e,n[7]*=e,n[2]*=e,n[5]*=e,n[8]*=e,this}determinant(){const e=this.elements,n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8];return n*a*c-n*s*u-r*o*c+r*s*l+i*o*u-i*a*l}invert(){const e=this.elements,n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],f=c*a-s*u,d=s*l-c*o,p=u*o-a*l,y=n*f+r*d+i*p;if(y===0)return this.set(0,0,0,0,0,0,0,0,0);const x=1/y;return e[0]=f*x,e[1]=(i*u-c*r)*x,e[2]=(s*r-i*a)*x,e[3]=d*x,e[4]=(c*n-i*l)*x,e[5]=(i*o-s*n)*x,e[6]=p*x,e[7]=(r*l-u*n)*x,e[8]=(a*n-r*o)*x,this}transpose(){let e;const n=this.elements;return e=n[1],n[1]=n[3],n[3]=e,e=n[2],n[2]=n[6],n[6]=e,e=n[5],n[5]=n[7],n[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const n=this.elements;return e[0]=n[0],e[1]=n[3],e[2]=n[6],e[3]=n[1],e[4]=n[4],e[5]=n[7],e[6]=n[2],e[7]=n[5],e[8]=n[8],this}setUvTransform(e,n,r,i,o,a,s){const l=Math.cos(o),u=Math.sin(o);return this.set(r*l,r*u,-r*(l*a+u*s)+a+e,-i*u,i*l,-i*(-u*a+l*s)+s+n,0,0,1),this}scale(e,n){return this.premultiply(JT.makeScale(e,n)),this}rotate(e){return this.premultiply(JT.makeRotation(-e)),this}translate(e,n){return this.premultiply(JT.makeTranslation(e,n)),this}makeTranslation(e,n){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,n,0,0,1),this}makeRotation(e){const n=Math.cos(e),r=Math.sin(e);return this.set(n,-r,0,r,n,0,0,0,1),this}makeScale(e,n){return this.set(e,0,0,0,n,0,0,0,1),this}equals(e){const n=this.elements,r=e.elements;for(let i=0;i<9;i++)if(n[i]!==r[i])return!1;return!0}fromArray(e,n=0){for(let r=0;r<9;r++)this.elements[r]=e[r+n];return this}toArray(e=[],n=0){const r=this.elements;return e[n]=r[0],e[n+1]=r[1],e[n+2]=r[2],e[n+3]=r[3],e[n+4]=r[4],e[n+5]=r[5],e[n+6]=r[6],e[n+7]=r[7],e[n+8]=r[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const JT=new In;function iG(t){for(let e=t.length-1;e>=0;--e)if(t[e]>=65535)return!0;return!1}const a_e={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function gg(t,e){return new a_e[t](e)}function jx(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}function oG(){const t=jx("canvas");return t.style.display="block",t}const Fk={};function q1(t){t in Fk||(Fk[t]=!0,console.warn(t))}const Lk=new In().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),kk=new In().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Fw={[tc]:{transfer:$x,primaries:Hx,toReference:t=>t,fromReference:t=>t},[Hi]:{transfer:Er,primaries:Hx,toReference:t=>t.convertSRGBToLinear(),fromReference:t=>t.convertLinearToSRGB()},[Db]:{transfer:$x,primaries:Vx,toReference:t=>t.applyMatrix3(kk),fromReference:t=>t.applyMatrix3(Lk)},[SC]:{transfer:Er,primaries:Vx,toReference:t=>t.convertSRGBToLinear().applyMatrix3(kk),fromReference:t=>t.applyMatrix3(Lk).convertLinearToSRGB()}},s_e=new Set([tc,Db]),ar={enabled:!0,_workingColorSpace:tc,get legacyMode(){return console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),!this.enabled},set legacyMode(t){console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),this.enabled=!t},get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(t){if(!s_e.has(t))throw new Error(`Unsupported working color space, "${t}".`);this._workingColorSpace=t},convert:function(t,e,n){if(this.enabled===!1||e===n||!e||!n)return t;const r=Fw[e].toReference,i=Fw[n].fromReference;return i(r(t))},fromWorkingColorSpace:function(t,e){return this.convert(t,this._workingColorSpace,e)},toWorkingColorSpace:function(t,e){return this.convert(t,e,this._workingColorSpace)},getPrimaries:function(t){return Fw[t].primaries},getTransfer:function(t){return t===Ds?$x:Fw[t].transfer}};function Ig(t){return t<.04045?t*.0773993808:Math.pow(t*.9478672986+.0521327014,2.4)}function QT(t){return t<.0031308?t*12.92:1.055*Math.pow(t,.41666)-.055}let s0;class b4{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{s0===void 0&&(s0=jx("canvas")),s0.width=e.width,s0.height=e.height;const r=s0.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),n=s0}return n.width>2048||n.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),n.toDataURL("image/jpeg",.6)):n.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const n=jx("canvas");n.width=e.width,n.height=e.height;const r=n.getContext("2d");r.drawImage(e,0,0,e.width,e.height);const i=r.getImageData(0,0,e.width,e.height),o=i.data;for(let a=0;a0&&(r.userData=this.userData),n||(e.textures[this.uuid]=r),r}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==Tb)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case Lx:e.x=e.x-Math.floor(e.x);break;case uo:e.x=e.x<0?0:1;break;case kx: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 Lx:e.y=e.y-Math.floor(e.y);break;case uo:e.y=e.y<0?0:1;break;case kx: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)}get encoding(){return q1("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===Hi?Nd:y4}set encoding(e){q1("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=e===Nd?Hi:Ds}}hi.DEFAULT_IMAGE=null;hi.DEFAULT_MAPPING=Tb;hi.DEFAULT_ANISOTROPY=1;class ir{constructor(e=0,n=0,r=0,i=1){ir.prototype.isVector4=!0,this.x=e,this.y=n,this.z=r,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,n,r,i){return this.x=e,this.y=n,this.z=r,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,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;case 3:this.w=n;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,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this.w=e.w+n.w,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,this.w+=e.w*n,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,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.z,this.w=e.w-n.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 n=this.x,r=this.y,i=this.z,o=this.w,a=e.elements;return this.x=a[0]*n+a[4]*r+a[8]*i+a[12]*o,this.y=a[1]*n+a[5]*r+a[9]*i+a[13]*o,this.z=a[2]*n+a[6]*r+a[10]*i+a[14]*o,this.w=a[3]*n+a[7]*r+a[11]*i+a[15]*o,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const n=Math.sqrt(1-e.w*e.w);return n<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/n,this.y=e.y/n,this.z=e.z/n),this}setAxisAngleFromRotationMatrix(e){let n,r,i,o;const l=e.elements,u=l[0],c=l[4],f=l[8],d=l[1],p=l[5],y=l[9],x=l[2],_=l[6],v=l[10];if(Math.abs(c-d)<.01&&Math.abs(f-x)<.01&&Math.abs(y-_)<.01){if(Math.abs(c+d)<.1&&Math.abs(f+x)<.1&&Math.abs(y+_)<.1&&Math.abs(u+p+v-3)<.1)return this.set(1,0,0,0),this;n=Math.PI;const w=(u+1)/2,E=(p+1)/2,T=(v+1)/2,C=(c+d)/4,D=(f+x)/4,O=(y+_)/4;return w>E&&w>T?w<.01?(r=0,i=.707106781,o=.707106781):(r=Math.sqrt(w),i=C/r,o=D/r):E>T?E<.01?(r=.707106781,i=0,o=.707106781):(i=Math.sqrt(E),r=C/i,o=O/i):T<.01?(r=.707106781,i=.707106781,o=0):(o=Math.sqrt(T),r=D/o,i=O/o),this.set(r,i,o,n),this}let S=Math.sqrt((_-y)*(_-y)+(f-x)*(f-x)+(d-c)*(d-c));return Math.abs(S)<.001&&(S=1),this.x=(_-y)/S,this.y=(f-x)/S,this.z=(d-c)/S,this.w=Math.acos((u+p+v-1)/2),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,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this.w=Math.max(e.w,Math.min(n.w,this.w)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this.w=Math.max(e,Math.min(n,this.w)),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(n,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,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this.w+=(e.w-this.w)*n,this}lerpVectors(e,n,r){return this.x=e.x+(n.x-e.x)*r,this.y=e.y+(n.y-e.y)*r,this.z=e.z+(n.z-e.z)*r,this.w=e.w+(n.w-e.w)*r,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this.w=e[n+3],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e[n+3]=this.w,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this.w=e.getW(n),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 aG extends vf{constructor(e=1,n=1,r={}){super(),this.isRenderTarget=!0,this.width=e,this.height=n,this.depth=1,this.scissor=new ir(0,0,e,n),this.scissorTest=!1,this.viewport=new ir(0,0,e,n);const i={width:e,height:n,depth:1};r.encoding!==void 0&&(q1("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),r.colorSpace=r.encoding===Nd?Hi:Ds),r=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:wi,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0},r),this.texture=new hi(i,r.mapping,r.wrapS,r.wrapT,r.magFilter,r.minFilter,r.format,r.type,r.anisotropy,r.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=r.generateMipmaps,this.texture.internalFormat=r.internalFormat,this.depthBuffer=r.depthBuffer,this.stencilBuffer=r.stencilBuffer,this.depthTexture=r.depthTexture,this.samples=r.samples}setSize(e,n,r=1){(this.width!==e||this.height!==n||this.depth!==r)&&(this.width=e,this.height=n,this.depth=r,this.texture.image.width=e,this.texture.image.height=n,this.texture.image.depth=r,this.dispose()),this.viewport.set(0,0,e,n),this.scissor.set(0,0,e,n)}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.texture=e.texture.clone(),this.texture.isRenderTargetTexture=!0;const n=Object.assign({},e.texture.image);return this.texture.source=new vp(n),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class su extends aG{constructor(e=1,n=1,r={}){super(e,n,r),this.isWebGLRenderTarget=!0}}class EC extends hi{constructor(e=null,n=1,r=1,i=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:n,height:r,depth:i},this.magFilter=ci,this.minFilter=ci,this.wrapR=uo,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class c_e extends su{constructor(e=1,n=1,r=1){super(e,n),this.isWebGLArrayRenderTarget=!0,this.depth=r,this.texture=new EC(null,e,n,r),this.texture.isRenderTargetTexture=!0}}class _4 extends hi{constructor(e=null,n=1,r=1,i=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:n,height:r,depth:i},this.magFilter=ci,this.minFilter=ci,this.wrapR=uo,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class f_e extends su{constructor(e=1,n=1,r=1){super(e,n),this.isWebGL3DRenderTarget=!0,this.depth=r,this.texture=new _4(null,e,n,r),this.texture.isRenderTargetTexture=!0}}class d_e extends su{constructor(e=1,n=1,r=1,i={}){super(e,n,i),this.isWebGLMultipleRenderTargets=!0;const o=this.texture;this.texture=[];for(let a=0;a=0?1:-1,w=1-v*v;if(w>Number.EPSILON){const T=Math.sqrt(w),C=Math.atan2(T,v*S);_=Math.sin(_*C)/T,s=Math.sin(s*C)/T}const E=s*S;if(l=l*_+d*E,u=u*_+p*E,c=c*_+y*E,f=f*_+x*E,_===1-s){const T=1/Math.sqrt(l*l+u*u+c*c+f*f);l*=T,u*=T,c*=T,f*=T}}e[n]=l,e[n+1]=u,e[n+2]=c,e[n+3]=f}static multiplyQuaternionsFlat(e,n,r,i,o,a){const s=r[i],l=r[i+1],u=r[i+2],c=r[i+3],f=o[a],d=o[a+1],p=o[a+2],y=o[a+3];return e[n]=s*y+c*f+l*p-u*d,e[n+1]=l*y+c*d+u*f-s*p,e[n+2]=u*y+c*p+s*d-l*f,e[n+3]=c*y-s*f-l*d-u*p,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,n,r,i){return this._x=e,this._y=n,this._z=r,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,n){const r=e._x,i=e._y,o=e._z,a=e._order,s=Math.cos,l=Math.sin,u=s(r/2),c=s(i/2),f=s(o/2),d=l(r/2),p=l(i/2),y=l(o/2);switch(a){case"XYZ":this._x=d*c*f+u*p*y,this._y=u*p*f-d*c*y,this._z=u*c*y+d*p*f,this._w=u*c*f-d*p*y;break;case"YXZ":this._x=d*c*f+u*p*y,this._y=u*p*f-d*c*y,this._z=u*c*y-d*p*f,this._w=u*c*f+d*p*y;break;case"ZXY":this._x=d*c*f-u*p*y,this._y=u*p*f+d*c*y,this._z=u*c*y+d*p*f,this._w=u*c*f-d*p*y;break;case"ZYX":this._x=d*c*f-u*p*y,this._y=u*p*f+d*c*y,this._z=u*c*y-d*p*f,this._w=u*c*f+d*p*y;break;case"YZX":this._x=d*c*f+u*p*y,this._y=u*p*f+d*c*y,this._z=u*c*y-d*p*f,this._w=u*c*f-d*p*y;break;case"XZY":this._x=d*c*f-u*p*y,this._y=u*p*f-d*c*y,this._z=u*c*y+d*p*f,this._w=u*c*f+d*p*y;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+a)}return n!==!1&&this._onChangeCallback(),this}setFromAxisAngle(e,n){const r=n/2,i=Math.sin(r);return this._x=e.x*i,this._y=e.y*i,this._z=e.z*i,this._w=Math.cos(r),this._onChangeCallback(),this}setFromRotationMatrix(e){const n=e.elements,r=n[0],i=n[4],o=n[8],a=n[1],s=n[5],l=n[9],u=n[2],c=n[6],f=n[10],d=r+s+f;if(d>0){const p=.5/Math.sqrt(d+1);this._w=.25/p,this._x=(c-l)*p,this._y=(o-u)*p,this._z=(a-i)*p}else if(r>s&&r>f){const p=2*Math.sqrt(1+r-s-f);this._w=(c-l)/p,this._x=.25*p,this._y=(i+a)/p,this._z=(o+u)/p}else if(s>f){const p=2*Math.sqrt(1+s-r-f);this._w=(o-u)/p,this._x=(i+a)/p,this._y=.25*p,this._z=(l+c)/p}else{const p=2*Math.sqrt(1+f-r-s);this._w=(a-i)/p,this._x=(o+u)/p,this._y=(l+c)/p,this._z=.25*p}return this._onChangeCallback(),this}setFromUnitVectors(e,n){let r=e.dot(n)+1;return rMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=r):(this._x=0,this._y=-e.z,this._z=e.y,this._w=r)):(this._x=e.y*n.z-e.z*n.y,this._y=e.z*n.x-e.x*n.z,this._z=e.x*n.y-e.y*n.x,this._w=r),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(fi(this.dot(e),-1,1)))}rotateTowards(e,n){const r=this.angleTo(e);if(r===0)return this;const i=Math.min(1,n/r);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,n){const r=e._x,i=e._y,o=e._z,a=e._w,s=n._x,l=n._y,u=n._z,c=n._w;return this._x=r*c+a*s+i*u-o*l,this._y=i*c+a*l+o*s-r*u,this._z=o*c+a*u+r*l-i*s,this._w=a*c-r*s-i*l-o*u,this._onChangeCallback(),this}slerp(e,n){if(n===0)return this;if(n===1)return this.copy(e);const r=this._x,i=this._y,o=this._z,a=this._w;let s=a*e._w+r*e._x+i*e._y+o*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=a,this._x=r,this._y=i,this._z=o,this;const l=1-s*s;if(l<=Number.EPSILON){const p=1-n;return this._w=p*a+n*this._w,this._x=p*r+n*this._x,this._y=p*i+n*this._y,this._z=p*o+n*this._z,this.normalize(),this._onChangeCallback(),this}const u=Math.sqrt(l),c=Math.atan2(u,s),f=Math.sin((1-n)*c)/u,d=Math.sin(n*c)/u;return this._w=a*f+this._w*d,this._x=r*f+this._x*d,this._y=i*f+this._y*d,this._z=o*f+this._z*d,this._onChangeCallback(),this}slerpQuaternions(e,n,r){return this.copy(e).slerp(n,r)}random(){const e=Math.random(),n=Math.sqrt(1-e),r=Math.sqrt(e),i=2*Math.PI*Math.random(),o=2*Math.PI*Math.random();return this.set(n*Math.cos(i),r*Math.sin(o),r*Math.cos(o),n*Math.sin(i))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,n=0){return this._x=e[n],this._y=e[n+1],this._z=e[n+2],this._w=e[n+3],this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._w,e}fromBufferAttribute(e,n){return this._x=e.getX(n),this._y=e.getY(n),this._z=e.getZ(n),this._w=e.getW(n),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 ae{constructor(e=0,n=0,r=0){ae.prototype.isVector3=!0,this.x=e,this.y=n,this.z=r}set(e,n,r){return r===void 0&&(r=this.z),this.x=e,this.y=n,this.z=r,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,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;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,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,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,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.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,n){return this.x=e.x*n.x,this.y=e.y*n.y,this.z=e.z*n.z,this}applyEuler(e){return this.applyQuaternion(Bk.setFromEuler(e))}applyAxisAngle(e,n){return this.applyQuaternion(Bk.setFromAxisAngle(e,n))}applyMatrix3(e){const n=this.x,r=this.y,i=this.z,o=e.elements;return this.x=o[0]*n+o[3]*r+o[6]*i,this.y=o[1]*n+o[4]*r+o[7]*i,this.z=o[2]*n+o[5]*r+o[8]*i,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const n=this.x,r=this.y,i=this.z,o=e.elements,a=1/(o[3]*n+o[7]*r+o[11]*i+o[15]);return this.x=(o[0]*n+o[4]*r+o[8]*i+o[12])*a,this.y=(o[1]*n+o[5]*r+o[9]*i+o[13])*a,this.z=(o[2]*n+o[6]*r+o[10]*i+o[14])*a,this}applyQuaternion(e){const n=this.x,r=this.y,i=this.z,o=e.x,a=e.y,s=e.z,l=e.w,u=2*(a*i-s*r),c=2*(s*n-o*i),f=2*(o*r-a*n);return this.x=n+l*u+a*f-s*c,this.y=r+l*c+s*u-o*f,this.z=i+l*f+o*c-a*u,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const n=this.x,r=this.y,i=this.z,o=e.elements;return this.x=o[0]*n+o[4]*r+o[8]*i,this.y=o[1]*n+o[5]*r+o[9]*i,this.z=o[2]*n+o[6]*r+o[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,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(n,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,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this}lerpVectors(e,n,r){return this.x=e.x+(n.x-e.x)*r,this.y=e.y+(n.y-e.y)*r,this.z=e.z+(n.z-e.z)*r,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,n){const r=e.x,i=e.y,o=e.z,a=n.x,s=n.y,l=n.z;return this.x=i*l-o*s,this.y=o*a-r*l,this.z=r*s-i*a,this}projectOnVector(e){const n=e.lengthSq();if(n===0)return this.set(0,0,0);const r=e.dot(this)/n;return this.copy(e).multiplyScalar(r)}projectOnPlane(e){return t3.copy(this).projectOnVector(e),this.sub(t3)}reflect(e){return this.sub(t3.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const r=this.dot(e)/n;return Math.acos(fi(r,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,r=this.y-e.y,i=this.z-e.z;return n*n+r*r+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,n,r){const i=Math.sin(n)*e;return this.x=i*Math.sin(r),this.y=Math.cos(n)*e,this.z=i*Math.cos(r),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,n,r){return this.x=e*Math.sin(n),this.y=r,this.z=e*Math.cos(n),this}setFromMatrixPosition(e){const n=e.elements;return this.x=n[12],this.y=n[13],this.z=n[14],this}setFromMatrixScale(e){const n=this.setFromMatrixColumn(e,0).length(),r=this.setFromMatrixColumn(e,1).length(),i=this.setFromMatrixColumn(e,2).length();return this.x=n,this.y=r,this.z=i,this}setFromMatrixColumn(e,n){return this.fromArray(e.elements,n*4)}setFromMatrix3Column(e,n){return this.fromArray(e.elements,n*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,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=(Math.random()-.5)*2,n=Math.random()*Math.PI*2,r=Math.sqrt(1-e**2);return this.x=r*Math.cos(n),this.y=r*Math.sin(n),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const t3=new ae,Bk=new Xa;class Al{constructor(e=new ae(1/0,1/0,1/0),n=new ae(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=n}set(e,n){return this.min.copy(e),this.max.copy(n),this}setFromArray(e){this.makeEmpty();for(let n=0,r=e.length;nthis.max.x||e.ythis.max.y||e.zthis.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,n){return n.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.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,zl),zl.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let n,r;return e.normal.x>0?(n=e.normal.x*this.min.x,r=e.normal.x*this.max.x):(n=e.normal.x*this.max.x,r=e.normal.x*this.min.x),e.normal.y>0?(n+=e.normal.y*this.min.y,r+=e.normal.y*this.max.y):(n+=e.normal.y*this.max.y,r+=e.normal.y*this.min.y),e.normal.z>0?(n+=e.normal.z*this.min.z,r+=e.normal.z*this.max.z):(n+=e.normal.z*this.max.z,r+=e.normal.z*this.min.z),n<=-e.constant&&r>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Wy),kw.subVectors(this.max,Wy),l0.subVectors(e.a,Wy),u0.subVectors(e.b,Wy),c0.subVectors(e.c,Wy),Qf.subVectors(u0,l0),ed.subVectors(c0,u0),Wh.subVectors(l0,c0);let n=[0,-Qf.z,Qf.y,0,-ed.z,ed.y,0,-Wh.z,Wh.y,Qf.z,0,-Qf.x,ed.z,0,-ed.x,Wh.z,0,-Wh.x,-Qf.y,Qf.x,0,-ed.y,ed.x,0,-Wh.y,Wh.x,0];return!n3(n,l0,u0,c0,kw)||(n=[1,0,0,0,1,0,0,0,1],!n3(n,l0,u0,c0,kw))?!1:(Bw.crossVectors(Qf,ed),n=[Bw.x,Bw.y,Bw.z],n3(n,l0,u0,c0,kw))}clampPoint(e,n){return n.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,zl).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(zl).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:(Dc[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Dc[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Dc[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Dc[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Dc[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Dc[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Dc[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Dc[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Dc),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 Dc=[new ae,new ae,new ae,new ae,new ae,new ae,new ae,new ae],zl=new ae,Lw=new Al,l0=new ae,u0=new ae,c0=new ae,Qf=new ae,ed=new ae,Wh=new ae,Wy=new ae,kw=new ae,Bw=new ae,Gh=new ae;function n3(t,e,n,r,i){for(let o=0,a=t.length-3;o<=a;o+=3){Gh.fromArray(t,o);const s=i.x*Math.abs(Gh.x)+i.y*Math.abs(Gh.y)+i.z*Math.abs(Gh.z),l=e.dot(Gh),u=n.dot(Gh),c=r.dot(Gh);if(Math.max(-Math.max(l,u,c),Math.min(l,u,c))>s)return!1}return!0}const h_e=new Al,Gy=new ae,r3=new ae;class uu{constructor(e=new ae,n=-1){this.center=e,this.radius=n}set(e,n){return this.center.copy(e),this.radius=n,this}setFromPoints(e,n){const r=this.center;n!==void 0?r.copy(n):h_e.setFromPoints(e).getCenter(r);let i=0;for(let o=0,a=e.length;othis.radius*this.radius&&(n.sub(this.center).normalize(),n.multiplyScalar(this.radius).add(this.center)),n}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;Gy.subVectors(e,this.center);const n=Gy.lengthSq();if(n>this.radius*this.radius){const r=Math.sqrt(n),i=(r-this.radius)*.5;this.center.addScaledVector(Gy,i/r),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):(r3.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Gy.copy(e.center).add(r3)),this.expandByPoint(Gy.copy(e.center).sub(r3))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const Rc=new ae,i3=new ae,Uw=new ae,td=new ae,o3=new ae,zw=new ae,a3=new ae;let Sv=class{constructor(e=new ae,n=new ae(0,0,-1)){this.origin=e,this.direction=n}set(e,n){return this.origin.copy(e),this.direction.copy(n),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,n){return n.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,Rc)),this}closestPointToPoint(e,n){n.subVectors(e,this.origin);const r=n.dot(this.direction);return r<0?n.copy(this.origin):n.copy(this.origin).addScaledVector(this.direction,r)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const n=Rc.subVectors(e,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(e):(Rc.copy(this.origin).addScaledVector(this.direction,n),Rc.distanceToSquared(e))}distanceSqToSegment(e,n,r,i){i3.copy(e).add(n).multiplyScalar(.5),Uw.copy(n).sub(e).normalize(),td.copy(this.origin).sub(i3);const o=e.distanceTo(n)*.5,a=-this.direction.dot(Uw),s=td.dot(this.direction),l=-td.dot(Uw),u=td.lengthSq(),c=Math.abs(1-a*a);let f,d,p,y;if(c>0)if(f=a*l-s,d=a*s-l,y=o*c,f>=0)if(d>=-y)if(d<=y){const x=1/c;f*=x,d*=x,p=f*(f+a*d+2*s)+d*(a*f+d+2*l)+u}else d=o,f=Math.max(0,-(a*d+s)),p=-f*f+d*(d+2*l)+u;else d=-o,f=Math.max(0,-(a*d+s)),p=-f*f+d*(d+2*l)+u;else d<=-y?(f=Math.max(0,-(-a*o+s)),d=f>0?-o:Math.min(Math.max(-o,-l),o),p=-f*f+d*(d+2*l)+u):d<=y?(f=0,d=Math.min(Math.max(-o,-l),o),p=d*(d+2*l)+u):(f=Math.max(0,-(a*o+s)),d=f>0?o:Math.min(Math.max(-o,-l),o),p=-f*f+d*(d+2*l)+u);else d=a>0?-o:o,f=Math.max(0,-(a*d+s)),p=-f*f+d*(d+2*l)+u;return r&&r.copy(this.origin).addScaledVector(this.direction,f),i&&i.copy(i3).addScaledVector(Uw,d),p}intersectSphere(e,n){Rc.subVectors(e.center,this.origin);const r=Rc.dot(this.direction),i=Rc.dot(Rc)-r*r,o=e.radius*e.radius;if(i>o)return null;const a=Math.sqrt(o-i),s=r-a,l=r+a;return l<0?null:s<0?this.at(l,n):this.at(s,n)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const n=e.normal.dot(this.direction);if(n===0)return e.distanceToPoint(this.origin)===0?0:null;const r=-(this.origin.dot(e.normal)+e.constant)/n;return r>=0?r:null}intersectPlane(e,n){const r=this.distanceToPlane(e);return r===null?null:this.at(r,n)}intersectsPlane(e){const n=e.distanceToPoint(this.origin);return n===0||e.normal.dot(this.direction)*n<0}intersectBox(e,n){let r,i,o,a,s,l;const u=1/this.direction.x,c=1/this.direction.y,f=1/this.direction.z,d=this.origin;return u>=0?(r=(e.min.x-d.x)*u,i=(e.max.x-d.x)*u):(r=(e.max.x-d.x)*u,i=(e.min.x-d.x)*u),c>=0?(o=(e.min.y-d.y)*c,a=(e.max.y-d.y)*c):(o=(e.max.y-d.y)*c,a=(e.min.y-d.y)*c),r>a||o>i||((o>r||isNaN(r))&&(r=o),(a=0?(s=(e.min.z-d.z)*f,l=(e.max.z-d.z)*f):(s=(e.max.z-d.z)*f,l=(e.min.z-d.z)*f),r>l||s>i)||((s>r||r!==r)&&(r=s),(l=0?r:i,n)}intersectsBox(e){return this.intersectBox(e,Rc)!==null}intersectTriangle(e,n,r,i,o){o3.subVectors(n,e),zw.subVectors(r,e),a3.crossVectors(o3,zw);let a=this.direction.dot(a3),s;if(a>0){if(i)return null;s=1}else if(a<0)s=-1,a=-a;else return null;td.subVectors(this.origin,e);const l=s*this.direction.dot(zw.crossVectors(td,zw));if(l<0)return null;const u=s*this.direction.dot(o3.cross(td));if(u<0||l+u>a)return null;const c=-s*td.dot(a3);return c<0?null:this.at(c/a,o)}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 xn{constructor(e,n,r,i,o,a,s,l,u,c,f,d,p,y,x,_){xn.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,n,r,i,o,a,s,l,u,c,f,d,p,y,x,_)}set(e,n,r,i,o,a,s,l,u,c,f,d,p,y,x,_){const v=this.elements;return v[0]=e,v[4]=n,v[8]=r,v[12]=i,v[1]=o,v[5]=a,v[9]=s,v[13]=l,v[2]=u,v[6]=c,v[10]=f,v[14]=d,v[3]=p,v[7]=y,v[11]=x,v[15]=_,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 xn().fromArray(this.elements)}copy(e){const n=this.elements,r=e.elements;return n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3],n[4]=r[4],n[5]=r[5],n[6]=r[6],n[7]=r[7],n[8]=r[8],n[9]=r[9],n[10]=r[10],n[11]=r[11],n[12]=r[12],n[13]=r[13],n[14]=r[14],n[15]=r[15],this}copyPosition(e){const n=this.elements,r=e.elements;return n[12]=r[12],n[13]=r[13],n[14]=r[14],this}setFromMatrix3(e){const n=e.elements;return this.set(n[0],n[3],n[6],0,n[1],n[4],n[7],0,n[2],n[5],n[8],0,0,0,0,1),this}extractBasis(e,n,r){return e.setFromMatrixColumn(this,0),n.setFromMatrixColumn(this,1),r.setFromMatrixColumn(this,2),this}makeBasis(e,n,r){return this.set(e.x,n.x,r.x,0,e.y,n.y,r.y,0,e.z,n.z,r.z,0,0,0,0,1),this}extractRotation(e){const n=this.elements,r=e.elements,i=1/f0.setFromMatrixColumn(e,0).length(),o=1/f0.setFromMatrixColumn(e,1).length(),a=1/f0.setFromMatrixColumn(e,2).length();return n[0]=r[0]*i,n[1]=r[1]*i,n[2]=r[2]*i,n[3]=0,n[4]=r[4]*o,n[5]=r[5]*o,n[6]=r[6]*o,n[7]=0,n[8]=r[8]*a,n[9]=r[9]*a,n[10]=r[10]*a,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromEuler(e){const n=this.elements,r=e.x,i=e.y,o=e.z,a=Math.cos(r),s=Math.sin(r),l=Math.cos(i),u=Math.sin(i),c=Math.cos(o),f=Math.sin(o);if(e.order==="XYZ"){const d=a*c,p=a*f,y=s*c,x=s*f;n[0]=l*c,n[4]=-l*f,n[8]=u,n[1]=p+y*u,n[5]=d-x*u,n[9]=-s*l,n[2]=x-d*u,n[6]=y+p*u,n[10]=a*l}else if(e.order==="YXZ"){const d=l*c,p=l*f,y=u*c,x=u*f;n[0]=d+x*s,n[4]=y*s-p,n[8]=a*u,n[1]=a*f,n[5]=a*c,n[9]=-s,n[2]=p*s-y,n[6]=x+d*s,n[10]=a*l}else if(e.order==="ZXY"){const d=l*c,p=l*f,y=u*c,x=u*f;n[0]=d-x*s,n[4]=-a*f,n[8]=y+p*s,n[1]=p+y*s,n[5]=a*c,n[9]=x-d*s,n[2]=-a*u,n[6]=s,n[10]=a*l}else if(e.order==="ZYX"){const d=a*c,p=a*f,y=s*c,x=s*f;n[0]=l*c,n[4]=y*u-p,n[8]=d*u+x,n[1]=l*f,n[5]=x*u+d,n[9]=p*u-y,n[2]=-u,n[6]=s*l,n[10]=a*l}else if(e.order==="YZX"){const d=a*l,p=a*u,y=s*l,x=s*u;n[0]=l*c,n[4]=x-d*f,n[8]=y*f+p,n[1]=f,n[5]=a*c,n[9]=-s*c,n[2]=-u*c,n[6]=p*f+y,n[10]=d-x*f}else if(e.order==="XZY"){const d=a*l,p=a*u,y=s*l,x=s*u;n[0]=l*c,n[4]=-f,n[8]=u*c,n[1]=d*f+x,n[5]=a*c,n[9]=p*f-y,n[2]=y*f-p,n[6]=s*c,n[10]=x*f+d}return n[3]=0,n[7]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromQuaternion(e){return this.compose(p_e,e,m_e)}lookAt(e,n,r){const i=this.elements;return xs.subVectors(e,n),xs.lengthSq()===0&&(xs.z=1),xs.normalize(),nd.crossVectors(r,xs),nd.lengthSq()===0&&(Math.abs(r.z)===1?xs.x+=1e-4:xs.z+=1e-4,xs.normalize(),nd.crossVectors(r,xs)),nd.normalize(),$w.crossVectors(xs,nd),i[0]=nd.x,i[4]=$w.x,i[8]=xs.x,i[1]=nd.y,i[5]=$w.y,i[9]=xs.y,i[2]=nd.z,i[6]=$w.z,i[10]=xs.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const r=e.elements,i=n.elements,o=this.elements,a=r[0],s=r[4],l=r[8],u=r[12],c=r[1],f=r[5],d=r[9],p=r[13],y=r[2],x=r[6],_=r[10],v=r[14],S=r[3],w=r[7],E=r[11],T=r[15],C=i[0],D=i[4],O=i[8],P=i[12],N=i[1],k=i[5],G=i[9],Z=i[13],j=i[2],K=i[6],Y=i[10],$=i[14],W=i[3],U=i[7],te=i[11],re=i[15];return o[0]=a*C+s*N+l*j+u*W,o[4]=a*D+s*k+l*K+u*U,o[8]=a*O+s*G+l*Y+u*te,o[12]=a*P+s*Z+l*$+u*re,o[1]=c*C+f*N+d*j+p*W,o[5]=c*D+f*k+d*K+p*U,o[9]=c*O+f*G+d*Y+p*te,o[13]=c*P+f*Z+d*$+p*re,o[2]=y*C+x*N+_*j+v*W,o[6]=y*D+x*k+_*K+v*U,o[10]=y*O+x*G+_*Y+v*te,o[14]=y*P+x*Z+_*$+v*re,o[3]=S*C+w*N+E*j+T*W,o[7]=S*D+w*k+E*K+T*U,o[11]=S*O+w*G+E*Y+T*te,o[15]=S*P+w*Z+E*$+T*re,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[4]*=e,n[8]*=e,n[12]*=e,n[1]*=e,n[5]*=e,n[9]*=e,n[13]*=e,n[2]*=e,n[6]*=e,n[10]*=e,n[14]*=e,n[3]*=e,n[7]*=e,n[11]*=e,n[15]*=e,this}determinant(){const e=this.elements,n=e[0],r=e[4],i=e[8],o=e[12],a=e[1],s=e[5],l=e[9],u=e[13],c=e[2],f=e[6],d=e[10],p=e[14],y=e[3],x=e[7],_=e[11],v=e[15];return y*(+o*l*f-i*u*f-o*s*d+r*u*d+i*s*p-r*l*p)+x*(+n*l*p-n*u*d+o*a*d-i*a*p+i*u*c-o*l*c)+_*(+n*u*f-n*s*p-o*a*f+r*a*p+o*s*c-r*u*c)+v*(-i*s*c-n*l*f+n*s*d+i*a*f-r*a*d+r*l*c)}transpose(){const e=this.elements;let n;return n=e[1],e[1]=e[4],e[4]=n,n=e[2],e[2]=e[8],e[8]=n,n=e[6],e[6]=e[9],e[9]=n,n=e[3],e[3]=e[12],e[12]=n,n=e[7],e[7]=e[13],e[13]=n,n=e[11],e[11]=e[14],e[14]=n,this}setPosition(e,n,r){const i=this.elements;return e.isVector3?(i[12]=e.x,i[13]=e.y,i[14]=e.z):(i[12]=e,i[13]=n,i[14]=r),this}invert(){const e=this.elements,n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],f=e[9],d=e[10],p=e[11],y=e[12],x=e[13],_=e[14],v=e[15],S=f*_*u-x*d*u+x*l*p-s*_*p-f*l*v+s*d*v,w=y*d*u-c*_*u-y*l*p+a*_*p+c*l*v-a*d*v,E=c*x*u-y*f*u+y*s*p-a*x*p-c*s*v+a*f*v,T=y*f*l-c*x*l-y*s*d+a*x*d+c*s*_-a*f*_,C=n*S+r*w+i*E+o*T;if(C===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const D=1/C;return e[0]=S*D,e[1]=(x*d*o-f*_*o-x*i*p+r*_*p+f*i*v-r*d*v)*D,e[2]=(s*_*o-x*l*o+x*i*u-r*_*u-s*i*v+r*l*v)*D,e[3]=(f*l*o-s*d*o-f*i*u+r*d*u+s*i*p-r*l*p)*D,e[4]=w*D,e[5]=(c*_*o-y*d*o+y*i*p-n*_*p-c*i*v+n*d*v)*D,e[6]=(y*l*o-a*_*o-y*i*u+n*_*u+a*i*v-n*l*v)*D,e[7]=(a*d*o-c*l*o+c*i*u-n*d*u-a*i*p+n*l*p)*D,e[8]=E*D,e[9]=(y*f*o-c*x*o-y*r*p+n*x*p+c*r*v-n*f*v)*D,e[10]=(a*x*o-y*s*o+y*r*u-n*x*u-a*r*v+n*s*v)*D,e[11]=(c*s*o-a*f*o-c*r*u+n*f*u+a*r*p-n*s*p)*D,e[12]=T*D,e[13]=(c*x*i-y*f*i+y*r*d-n*x*d-c*r*_+n*f*_)*D,e[14]=(y*s*i-a*x*i-y*r*l+n*x*l+a*r*_-n*s*_)*D,e[15]=(a*f*i-c*s*i+c*r*l-n*f*l-a*r*d+n*s*d)*D,this}scale(e){const n=this.elements,r=e.x,i=e.y,o=e.z;return n[0]*=r,n[4]*=i,n[8]*=o,n[1]*=r,n[5]*=i,n[9]*=o,n[2]*=r,n[6]*=i,n[10]*=o,n[3]*=r,n[7]*=i,n[11]*=o,this}getMaxScaleOnAxis(){const e=this.elements,n=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],r=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(n,r,i))}makeTranslation(e,n,r){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,n,0,0,1,r,0,0,0,1),this}makeRotationX(e){const n=Math.cos(e),r=Math.sin(e);return this.set(1,0,0,0,0,n,-r,0,0,r,n,0,0,0,0,1),this}makeRotationY(e){const n=Math.cos(e),r=Math.sin(e);return this.set(n,0,r,0,0,1,0,0,-r,0,n,0,0,0,0,1),this}makeRotationZ(e){const n=Math.cos(e),r=Math.sin(e);return this.set(n,-r,0,0,r,n,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,n){const r=Math.cos(n),i=Math.sin(n),o=1-r,a=e.x,s=e.y,l=e.z,u=o*a,c=o*s;return this.set(u*a+r,u*s-i*l,u*l+i*s,0,u*s+i*l,c*s+r,c*l-i*a,0,u*l-i*s,c*l+i*a,o*l*l+r,0,0,0,0,1),this}makeScale(e,n,r){return this.set(e,0,0,0,0,n,0,0,0,0,r,0,0,0,0,1),this}makeShear(e,n,r,i,o,a){return this.set(1,r,o,0,e,1,a,0,n,i,1,0,0,0,0,1),this}compose(e,n,r){const i=this.elements,o=n._x,a=n._y,s=n._z,l=n._w,u=o+o,c=a+a,f=s+s,d=o*u,p=o*c,y=o*f,x=a*c,_=a*f,v=s*f,S=l*u,w=l*c,E=l*f,T=r.x,C=r.y,D=r.z;return i[0]=(1-(x+v))*T,i[1]=(p+E)*T,i[2]=(y-w)*T,i[3]=0,i[4]=(p-E)*C,i[5]=(1-(d+v))*C,i[6]=(_+S)*C,i[7]=0,i[8]=(y+w)*D,i[9]=(_-S)*D,i[10]=(1-(d+x))*D,i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this}decompose(e,n,r){const i=this.elements;let o=f0.set(i[0],i[1],i[2]).length();const a=f0.set(i[4],i[5],i[6]).length(),s=f0.set(i[8],i[9],i[10]).length();this.determinant()<0&&(o=-o),e.x=i[12],e.y=i[13],e.z=i[14],$l.copy(this);const u=1/o,c=1/a,f=1/s;return $l.elements[0]*=u,$l.elements[1]*=u,$l.elements[2]*=u,$l.elements[4]*=c,$l.elements[5]*=c,$l.elements[6]*=c,$l.elements[8]*=f,$l.elements[9]*=f,$l.elements[10]*=f,n.setFromRotationMatrix($l),r.x=o,r.y=a,r.z=s,this}makePerspective(e,n,r,i,o,a,s=Uu){const l=this.elements,u=2*o/(n-e),c=2*o/(r-i),f=(n+e)/(n-e),d=(r+i)/(r-i);let p,y;if(s===Uu)p=-(a+o)/(a-o),y=-2*a*o/(a-o);else if(s===Gx)p=-a/(a-o),y=-a*o/(a-o);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+s);return l[0]=u,l[4]=0,l[8]=f,l[12]=0,l[1]=0,l[5]=c,l[9]=d,l[13]=0,l[2]=0,l[6]=0,l[10]=p,l[14]=y,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,n,r,i,o,a,s=Uu){const l=this.elements,u=1/(n-e),c=1/(r-i),f=1/(a-o),d=(n+e)*u,p=(r+i)*c;let y,x;if(s===Uu)y=(a+o)*f,x=-2*f;else if(s===Gx)y=o*f,x=-1*f;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+s);return l[0]=2*u,l[4]=0,l[8]=0,l[12]=-d,l[1]=0,l[5]=2*c,l[9]=0,l[13]=-p,l[2]=0,l[6]=0,l[10]=x,l[14]=-y,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){const n=this.elements,r=e.elements;for(let i=0;i<16;i++)if(n[i]!==r[i])return!1;return!0}fromArray(e,n=0){for(let r=0;r<16;r++)this.elements[r]=e[r+n];return this}toArray(e=[],n=0){const r=this.elements;return e[n]=r[0],e[n+1]=r[1],e[n+2]=r[2],e[n+3]=r[3],e[n+4]=r[4],e[n+5]=r[5],e[n+6]=r[6],e[n+7]=r[7],e[n+8]=r[8],e[n+9]=r[9],e[n+10]=r[10],e[n+11]=r[11],e[n+12]=r[12],e[n+13]=r[13],e[n+14]=r[14],e[n+15]=r[15],e}}const f0=new ae,$l=new xn,p_e=new ae(0,0,0),m_e=new ae(1,1,1),nd=new ae,$w=new ae,xs=new ae,Uk=new xn,zk=new Xa;class Rb{constructor(e=0,n=0,r=0,i=Rb.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=n,this._z=r,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,n,r,i=this._order){return this._x=e,this._y=n,this._z=r,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,n=this._order,r=!0){const i=e.elements,o=i[0],a=i[4],s=i[8],l=i[1],u=i[5],c=i[9],f=i[2],d=i[6],p=i[10];switch(n){case"XYZ":this._y=Math.asin(fi(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-c,p),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(d,u),this._z=0);break;case"YXZ":this._x=Math.asin(-fi(c,-1,1)),Math.abs(c)<.9999999?(this._y=Math.atan2(s,p),this._z=Math.atan2(l,u)):(this._y=Math.atan2(-f,o),this._z=0);break;case"ZXY":this._x=Math.asin(fi(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(-f,p),this._z=Math.atan2(-a,u)):(this._y=0,this._z=Math.atan2(l,o));break;case"ZYX":this._y=Math.asin(-fi(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(d,p),this._z=Math.atan2(l,o)):(this._x=0,this._z=Math.atan2(-a,u));break;case"YZX":this._z=Math.asin(fi(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-c,u),this._y=Math.atan2(-f,o)):(this._x=0,this._y=Math.atan2(s,p));break;case"XZY":this._z=Math.asin(-fi(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(d,u),this._y=Math.atan2(s,o)):(this._x=Math.atan2(-c,p),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+n)}return this._order=n,r===!0&&this._onChangeCallback(),this}setFromQuaternion(e,n,r){return Uk.makeRotationFromQuaternion(e),this.setFromRotationMatrix(Uk,n,r)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return zk.setFromEuler(this),this.setFromQuaternion(zk,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=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+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}}Rb.DEFAULT_ORDER="XYZ";class Dp{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let n=0;n1){for(let r=0;r0&&(r=r.concat(a))}return r}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(jy,e,v_e),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(jy,y_e,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const n=this.matrixWorld.elements;return e.set(n[8],n[9],n[10]).normalize()}raycast(){}traverse(e){e(this);const n=this.children;for(let r=0,i=n.length;r0&&(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()));function o(s,l){return s[l.uuid]===void 0&&(s[l.uuid]=l.toJSON(e)),l.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=o(e.geometries,this.geometry);const s=this.geometry.parameters;if(s!==void 0&&s.shapes!==void 0){const l=s.shapes;if(Array.isArray(l))for(let u=0,c=l.length;u0){i.children=[];for(let s=0;s0){i.animations=[];for(let s=0;s0&&(r.geometries=s),l.length>0&&(r.materials=l),u.length>0&&(r.textures=u),c.length>0&&(r.images=c),f.length>0&&(r.shapes=f),d.length>0&&(r.skeletons=d),p.length>0&&(r.animations=p),y.length>0&&(r.nodes=y)}return r.object=i,r;function a(s){const l=[];for(const u in s){const c=s[u];delete c.metadata,l.push(c)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,n=!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.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,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)),n===!0)for(let r=0;r0?i.multiplyScalar(1/Math.sqrt(o)):i.set(0,0,0)}static getBarycoord(e,n,r,i,o){Hl.subVectors(i,n),Nc.subVectors(r,n),s3.subVectors(e,n);const a=Hl.dot(Hl),s=Hl.dot(Nc),l=Hl.dot(s3),u=Nc.dot(Nc),c=Nc.dot(s3),f=a*u-s*s;if(f===0)return o.set(-2,-1,-1);const d=1/f,p=(u*l-s*c)*d,y=(a*c-s*l)*d;return o.set(1-p-y,y,p)}static containsPoint(e,n,r,i){return this.getBarycoord(e,n,r,i,Oc),Oc.x>=0&&Oc.y>=0&&Oc.x+Oc.y<=1}static getUV(e,n,r,i,o,a,s,l){return Vw===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Vw=!0),this.getInterpolation(e,n,r,i,o,a,s,l)}static getInterpolation(e,n,r,i,o,a,s,l){return this.getBarycoord(e,n,r,i,Oc),l.setScalar(0),l.addScaledVector(o,Oc.x),l.addScaledVector(a,Oc.y),l.addScaledVector(s,Oc.z),l}static isFrontFacing(e,n,r,i){return Hl.subVectors(r,n),Nc.subVectors(e,n),Hl.cross(Nc).dot(i)<0}set(e,n,r){return this.a.copy(e),this.b.copy(n),this.c.copy(r),this}setFromPointsAndIndices(e,n,r,i){return this.a.copy(e[n]),this.b.copy(e[r]),this.c.copy(e[i]),this}setFromAttributeAndIndices(e,n,r,i){return this.a.fromBufferAttribute(e,n),this.b.fromBufferAttribute(e,r),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 Hl.subVectors(this.c,this.b),Nc.subVectors(this.a,this.b),Hl.cross(Nc).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return za.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,n){return za.getBarycoord(e,this.a,this.b,this.c,n)}getUV(e,n,r,i,o){return Vw===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Vw=!0),za.getInterpolation(e,this.a,this.b,this.c,n,r,i,o)}getInterpolation(e,n,r,i,o){return za.getInterpolation(e,this.a,this.b,this.c,n,r,i,o)}containsPoint(e){return za.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return za.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,n){const r=this.a,i=this.b,o=this.c;let a,s;h0.subVectors(i,r),p0.subVectors(o,r),l3.subVectors(e,r);const l=h0.dot(l3),u=p0.dot(l3);if(l<=0&&u<=0)return n.copy(r);u3.subVectors(e,i);const c=h0.dot(u3),f=p0.dot(u3);if(c>=0&&f<=c)return n.copy(i);const d=l*f-c*u;if(d<=0&&l>=0&&c<=0)return a=l/(l-c),n.copy(r).addScaledVector(h0,a);c3.subVectors(e,o);const p=h0.dot(c3),y=p0.dot(c3);if(y>=0&&p<=y)return n.copy(o);const x=p*u-l*y;if(x<=0&&u>=0&&y<=0)return s=u/(u-y),n.copy(r).addScaledVector(p0,s);const _=c*y-p*f;if(_<=0&&f-c>=0&&p-y>=0)return Gk.subVectors(o,i),s=(f-c)/(f-c+(p-y)),n.copy(i).addScaledVector(Gk,s);const v=1/(_+x+d);return a=x*v,s=d*v,n.copy(r).addScaledVector(h0,a).addScaledVector(p0,s)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const sG={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},rd={h:0,s:0,l:0},Ww={h:0,s:0,l:0};function f3(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*6*(2/3-n):t}let Pt=class{constructor(e,n,r){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,n,r)}set(e,n,r){if(n===void 0&&r===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,n,r);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,n=Hi){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,ar.toWorkingColorSpace(this,n),this}setRGB(e,n,r,i=ar.workingColorSpace){return this.r=e,this.g=n,this.b=r,ar.toWorkingColorSpace(this,i),this}setHSL(e,n,r,i=ar.workingColorSpace){if(e=x4(e,1),n=fi(n,0,1),r=fi(r,0,1),n===0)this.r=this.g=this.b=r;else{const o=r<=.5?r*(1+n):r+n-r*n,a=2*r-o;this.r=f3(a,o,e+1/3),this.g=f3(a,o,e),this.b=f3(a,o,e-1/3)}return ar.toWorkingColorSpace(this,i),this}setStyle(e,n=Hi){function r(o){o!==void 0&&parseFloat(o)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let i;if(i=/^(\w+)\(([^\)]*)\)/.exec(e)){let o;const a=i[1],s=i[2];switch(a){case"rgb":case"rgba":if(o=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return r(o[4]),this.setRGB(Math.min(255,parseInt(o[1],10))/255,Math.min(255,parseInt(o[2],10))/255,Math.min(255,parseInt(o[3],10))/255,n);if(o=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return r(o[4]),this.setRGB(Math.min(100,parseInt(o[1],10))/100,Math.min(100,parseInt(o[2],10))/100,Math.min(100,parseInt(o[3],10))/100,n);break;case"hsl":case"hsla":if(o=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return r(o[4]),this.setHSL(parseFloat(o[1])/360,parseFloat(o[2])/100,parseFloat(o[3])/100,n);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(e)){const o=i[1],a=o.length;if(a===3)return this.setRGB(parseInt(o.charAt(0),16)/15,parseInt(o.charAt(1),16)/15,parseInt(o.charAt(2),16)/15,n);if(a===6)return this.setHex(parseInt(o,16),n);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,n);return this}setColorName(e,n=Hi){const r=sG[e.toLowerCase()];return r!==void 0?this.setHex(r,n):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=Ig(e.r),this.g=Ig(e.g),this.b=Ig(e.b),this}copyLinearToSRGB(e){return this.r=QT(e.r),this.g=QT(e.g),this.b=QT(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Hi){return ar.fromWorkingColorSpace(Wo.copy(this),e),Math.round(fi(Wo.r*255,0,255))*65536+Math.round(fi(Wo.g*255,0,255))*256+Math.round(fi(Wo.b*255,0,255))}getHexString(e=Hi){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,n=ar.workingColorSpace){ar.fromWorkingColorSpace(Wo.copy(this),n);const r=Wo.r,i=Wo.g,o=Wo.b,a=Math.max(r,i,o),s=Math.min(r,i,o);let l,u;const c=(s+a)/2;if(s===a)l=0,u=0;else{const f=a-s;switch(u=c<=.5?f/(a+s):f/(2-a-s),a){case r:l=(i-o)/f+(i0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const n in e){const r=e[n];if(r===void 0){console.warn(`THREE.Material: parameter '${n}' has value of undefined.`);continue}const i=this[n];if(i===void 0){console.warn(`THREE.Material: '${n}' is not a property of THREE.${this.type}.`);continue}i&&i.isColor?i.set(r):i&&i.isVector3&&r&&r.isVector3?i.copy(r):this[n]=r}}toJSON(e){const n=e===void 0||typeof e=="string";n&&(e={textures:{},images:{}});const r={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};r.uuid=this.uuid,r.type=this.type,this.name!==""&&(r.name=this.name),this.color&&this.color.isColor&&(r.color=this.color.getHex()),this.roughness!==void 0&&(r.roughness=this.roughness),this.metalness!==void 0&&(r.metalness=this.metalness),this.sheen!==void 0&&(r.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(r.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(r.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(r.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(r.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(r.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(r.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(r.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(r.shininess=this.shininess),this.clearcoat!==void 0&&(r.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(r.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(r.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(r.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(r.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,r.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(r.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(r.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(r.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(r.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(r.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(r.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(r.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(r.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(r.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(r.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(r.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(r.lightMap=this.lightMap.toJSON(e).uuid,r.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(r.aoMap=this.aoMap.toJSON(e).uuid,r.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(r.bumpMap=this.bumpMap.toJSON(e).uuid,r.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(r.normalMap=this.normalMap.toJSON(e).uuid,r.normalMapType=this.normalMapType,r.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(r.displacementMap=this.displacementMap.toJSON(e).uuid,r.displacementScale=this.displacementScale,r.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(r.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(r.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(r.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(r.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(r.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(r.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(r.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(r.combine=this.combine)),this.envMapIntensity!==void 0&&(r.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(r.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(r.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(r.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(r.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(r.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(r.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(r.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(r.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(r.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(r.size=this.size),this.shadowSide!==null&&(r.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(r.sizeAttenuation=this.sizeAttenuation),this.blending!==Ap&&(r.blending=this.blending),this.side!==lf&&(r.side=this.side),this.vertexColors===!0&&(r.vertexColors=!0),this.opacity<1&&(r.opacity=this.opacity),this.transparent===!0&&(r.transparent=!0),this.blendSrc!==x2&&(r.blendSrc=this.blendSrc),this.blendDst!==b2&&(r.blendDst=this.blendDst),this.blendEquation!==gd&&(r.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(r.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(r.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(r.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(r.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(r.blendAlpha=this.blendAlpha),this.depthFunc!==Ox&&(r.depthFunc=this.depthFunc),this.depthTest===!1&&(r.depthTest=this.depthTest),this.depthWrite===!1&&(r.depthWrite=this.depthWrite),this.colorWrite===!1&&(r.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(r.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==xP&&(r.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(r.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(r.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==ip&&(r.stencilFail=this.stencilFail),this.stencilZFail!==ip&&(r.stencilZFail=this.stencilZFail),this.stencilZPass!==ip&&(r.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(r.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(r.rotation=this.rotation),this.polygonOffset===!0&&(r.polygonOffset=!0),this.polygonOffsetFactor!==0&&(r.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(r.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(r.linewidth=this.linewidth),this.dashSize!==void 0&&(r.dashSize=this.dashSize),this.gapSize!==void 0&&(r.gapSize=this.gapSize),this.scale!==void 0&&(r.scale=this.scale),this.dithering===!0&&(r.dithering=!0),this.alphaTest>0&&(r.alphaTest=this.alphaTest),this.alphaHash===!0&&(r.alphaHash=!0),this.alphaToCoverage===!0&&(r.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(r.premultipliedAlpha=!0),this.forceSinglePass===!0&&(r.forceSinglePass=!0),this.wireframe===!0&&(r.wireframe=!0),this.wireframeLinewidth>1&&(r.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(r.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(r.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(r.flatShading=!0),this.visible===!1&&(r.visible=!1),this.toneMapped===!1&&(r.toneMapped=!1),this.fog===!1&&(r.fog=!1),Object.keys(this.userData).length>0&&(r.userData=this.userData);function i(o){const a=[];for(const s in o){const l=o[s];delete l.metadata,a.push(l)}return a}if(n){const o=i(e.textures),a=i(e.images);o.length>0&&(r.textures=o),a.length>0&&(r.images=a)}return r}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 n=e.clippingPlanes;let r=null;if(n!==null){const i=n.length;r=new Array(i);for(let o=0;o!==i;++o)r[o]=n[o].clone()}return this.clippingPlanes=r,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 rh extends Po{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Pt(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.combine=Ab,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.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 Hc=w_e();function w_e(){const t=new ArrayBuffer(4),e=new Float32Array(t),n=new Uint32Array(t),r=new Uint32Array(512),i=new Uint32Array(512);for(let l=0;l<256;++l){const u=l-127;u<-27?(r[l]=0,r[l|256]=32768,i[l]=24,i[l|256]=24):u<-14?(r[l]=1024>>-u-14,r[l|256]=1024>>-u-14|32768,i[l]=-u-1,i[l|256]=-u-1):u<=15?(r[l]=u+15<<10,r[l|256]=u+15<<10|32768,i[l]=13,i[l|256]=13):u<128?(r[l]=31744,r[l|256]=64512,i[l]=24,i[l|256]=24):(r[l]=31744,r[l|256]=64512,i[l]=13,i[l|256]=13)}const o=new Uint32Array(2048),a=new Uint32Array(64),s=new Uint32Array(64);for(let l=1;l<1024;++l){let u=l<<13,c=0;for(;!(u&8388608);)u<<=1,c-=8388608;u&=-8388609,c+=947912704,o[l]=u|c}for(let l=1024;l<2048;++l)o[l]=939524096+(l-1024<<13);for(let l=1;l<31;++l)a[l]=l<<23;a[31]=1199570944,a[32]=2147483648;for(let l=33;l<63;++l)a[l]=2147483648+(l-32<<23);a[63]=3347054592;for(let l=1;l<64;++l)l!==32&&(s[l]=1024);return{floatView:e,uint32View:n,baseTable:r,shiftTable:i,mantissaTable:o,exponentTable:a,offsetTable:s}}function ka(t){Math.abs(t)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),t=fi(t,-65504,65504),Hc.floatView[0]=t;const e=Hc.uint32View[0],n=e>>23&511;return Hc.baseTable[n]+((e&8388607)>>Hc.shiftTable[n])}function x1(t){const e=t>>10;return Hc.uint32View[0]=Hc.mantissaTable[Hc.offsetTable[e]+(t&1023)]+Hc.exponentTable[e],Hc.floatView[0]}const S_e={toHalfFloat:ka,fromHalfFloat:x1},Ri=new ae,Gw=new Je;class xr{constructor(e,n,r=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=n,this.count=e!==void 0?e.length/n:0,this.normalized=r,this.usage=Wx,this.updateRange={offset:0,count:-1},this.gpuType=eu,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}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,n,r){e*=this.itemSize,r*=n.itemSize;for(let i=0,o=this.itemSize;i0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const u in l)l[u]!==void 0&&(e[u]=l[u]);return e}e.data={attributes:{}};const n=this.index;n!==null&&(e.data.index={type:n.array.constructor.name,array:Array.prototype.slice.call(n.array)});const r=this.attributes;for(const l in r){const u=r[l];e.data.attributes[l]=u.toJSON(e.data)}const i={};let o=!1;for(const l in this.morphAttributes){const u=this.morphAttributes[l],c=[];for(let f=0,d=u.length;f0&&(i[l]=c,o=!0)}o&&(e.data.morphAttributes=i,e.data.morphTargetsRelative=this.morphTargetsRelative);const a=this.groups;a.length>0&&(e.data.groups=JSON.parse(JSON.stringify(a)));const s=this.boundingSphere;return s!==null&&(e.data.boundingSphere={center:s.center.toArray(),radius:s.radius}),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 n={};this.name=e.name;const r=e.index;r!==null&&this.setIndex(r.clone(n));const i=e.attributes;for(const u in i){const c=i[u];this.setAttribute(u,c.clone(n))}const o=e.morphAttributes;for(const u in o){const c=[],f=o[u];for(let d=0,p=f.length;d0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,a=i.length;o(e.far-e.near)**2))&&(jk.copy(o).invert(),jh.copy(e.ray).applyMatrix4(jk),!(r.boundingBox!==null&&jh.intersectsBox(r.boundingBox)===!1)&&this._computeIntersections(e,n,jh)))}_computeIntersections(e,n,r){let i;const o=this.geometry,a=this.material,s=o.index,l=o.attributes.position,u=o.attributes.uv,c=o.attributes.uv1,f=o.attributes.normal,d=o.groups,p=o.drawRange;if(s!==null)if(Array.isArray(a))for(let y=0,x=d.length;yn.far?null:{distance:u,point:Jw.clone(),object:t}}function Qw(t,e,n,r,i,o,a,s,l,u){t.getVertexPosition(s,g0),t.getVertexPosition(l,v0),t.getVertexPosition(u,y0);const c=N_e(t,e,n,r,g0,v0,y0,Zw);if(c){i&&(Xw.fromBufferAttribute(i,s),Yw.fromBufferAttribute(i,l),Kw.fromBufferAttribute(i,u),c.uv=za.getInterpolation(Zw,g0,v0,y0,Xw,Yw,Kw,new Je)),o&&(Xw.fromBufferAttribute(o,s),Yw.fromBufferAttribute(o,l),Kw.fromBufferAttribute(o,u),c.uv1=za.getInterpolation(Zw,g0,v0,y0,Xw,Yw,Kw,new Je),c.uv2=c.uv1),a&&(Xk.fromBufferAttribute(a,s),Yk.fromBufferAttribute(a,l),Kk.fromBufferAttribute(a,u),c.normal=za.getInterpolation(Zw,g0,v0,y0,Xk,Yk,Kk,new ae),c.normal.dot(r.direction)>0&&c.normal.multiplyScalar(-1));const f={a:s,b:l,c:u,normal:new ae,materialIndex:0};za.getNormal(g0,v0,y0,f.normal),c.face=f}return c}class nm extends Fn{constructor(e=1,n=1,r=1,i=1,o=1,a=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:n,depth:r,widthSegments:i,heightSegments:o,depthSegments:a};const s=this;i=Math.floor(i),o=Math.floor(o),a=Math.floor(a);const l=[],u=[],c=[],f=[];let d=0,p=0;y("z","y","x",-1,-1,r,n,e,a,o,0),y("z","y","x",1,-1,r,n,-e,a,o,1),y("x","z","y",1,1,e,r,n,i,a,2),y("x","z","y",1,-1,e,r,-n,i,a,3),y("x","y","z",1,-1,e,n,r,i,o,4),y("x","y","z",-1,-1,e,n,-r,i,o,5),this.setIndex(l),this.setAttribute("position",new Ut(u,3)),this.setAttribute("normal",new Ut(c,3)),this.setAttribute("uv",new Ut(f,2));function y(x,_,v,S,w,E,T,C,D,O,P){const N=E/D,k=T/O,G=E/2,Z=T/2,j=C/2,K=D+1,Y=O+1;let $=0,W=0;const U=new ae;for(let te=0;te0?1:-1,c.push(U.x,U.y,U.z),f.push(le/D),f.push(1-te/O),$+=1}}for(let te=0;te>8&255]+Vo[t>>16&255]+Vo[t>>24&255]+"-"+Vo[e&255]+Vo[e>>8&255]+"-"+Vo[e>>16&15|64]+Vo[e>>24&255]+"-"+Vo[n&63|128]+Vo[n>>8&255]+"-"+Vo[n>>16&255]+Vo[n>>24&255]+Vo[r&255]+Vo[r>>8&255]+Vo[r>>16&255]+Vo[r>>24&255]).toLowerCase()}function fi(t,e,n){return Math.max(e,Math.min(n,t))}function b4(t,e){return(t%e+e)%e}function r_e(t,e,n,r,i){return r+(t-e)*(i-r)/(n-e)}function i_e(t,e,n){return t!==e?(n-t)/(e-t):0}function X1(t,e,n){return(1-n)*t+n*e}function o_e(t,e,n,r){return X1(t,e,1-Math.exp(-n*r))}function a_e(t,e=1){return e-Math.abs(b4(t,e*2)-e)}function s_e(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*(3-2*t))}function l_e(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*t*(t*(t*6-15)+10))}function u_e(t,e){return t+Math.floor(Math.random()*(e-t+1))}function c_e(t,e){return t+Math.random()*(e-t)}function f_e(t){return t*(.5-Math.random())}function d_e(t){t!==void 0&&(kk=t);let e=kk+=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 h_e(t){return t*Dp}function p_e(t){return t*lv}function SP(t){return(t&t-1)===0&&t!==0}function cG(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))}function S2(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}function m_e(t,e,n,r,i){const o=Math.cos,a=Math.sin,s=o(n/2),l=a(n/2),u=o((e+r)/2),c=a((e+r)/2),f=o((e-r)/2),d=a((e-r)/2),p=o((r-e)/2),y=a((r-e)/2);switch(i){case"XYX":t.set(s*c,l*f,l*d,s*u);break;case"YZY":t.set(l*d,s*c,l*f,s*u);break;case"ZXZ":t.set(l*f,l*d,s*c,s*u);break;case"XZX":t.set(s*c,l*y,l*p,s*u);break;case"YXY":t.set(l*p,s*c,l*y,s*u);break;case"ZYZ":t.set(l*y,l*p,s*c,s*u);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}function $a(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 Dn(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 g_e={DEG2RAD:Dp,RAD2DEG:lv,generateUUID:ks,clamp:fi,euclideanModulo:b4,mapLinear:r_e,inverseLerp:i_e,lerp:X1,damp:o_e,pingpong:a_e,smoothstep:s_e,smootherstep:l_e,randInt:u_e,randFloat:c_e,randFloatSpread:f_e,seededRandom:d_e,degToRad:h_e,radToDeg:p_e,isPowerOfTwo:SP,ceilPowerOfTwo:cG,floorPowerOfTwo:S2,setQuaternionFromProperEuler:m_e,normalize:Dn,denormalize:$a};class Je{constructor(e=0,n=0){Je.prototype.isVector2=!0,this.x=e,this.y=n}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,n){return this.x=e,this.y=n,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,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;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,n){return this.x=e.x+n.x,this.y=e.y+n.y,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,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,n){return this.x=e.x-n.x,this.y=e.y-n.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 n=this.x,r=this.y,i=e.elements;return this.x=i[0]*n+i[3]*r+i[6],this.y=i[1]*n+i[4]*r+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,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(n,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 n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const r=this.dot(e)/n;return Math.acos(fi(r,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,r=this.y-e.y;return n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this}lerpVectors(e,n,r){return this.x=e.x+(n.x-e.x)*r,this.y=e.y+(n.y-e.y)*r,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this}rotateAround(e,n){const r=Math.cos(n),i=Math.sin(n),o=this.x-e.x,a=this.y-e.y;return this.x=o*r-a*i+e.x,this.y=o*i+a*r+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class On{constructor(e,n,r,i,o,a,s,l,u){On.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,n,r,i,o,a,s,l,u)}set(e,n,r,i,o,a,s,l,u){const c=this.elements;return c[0]=e,c[1]=i,c[2]=s,c[3]=n,c[4]=o,c[5]=l,c[6]=r,c[7]=a,c[8]=u,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const n=this.elements,r=e.elements;return n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3],n[4]=r[4],n[5]=r[5],n[6]=r[6],n[7]=r[7],n[8]=r[8],this}extractBasis(e,n,r){return e.setFromMatrix3Column(this,0),n.setFromMatrix3Column(this,1),r.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const n=e.elements;return this.set(n[0],n[4],n[8],n[1],n[5],n[9],n[2],n[6],n[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const r=e.elements,i=n.elements,o=this.elements,a=r[0],s=r[3],l=r[6],u=r[1],c=r[4],f=r[7],d=r[2],p=r[5],y=r[8],x=i[0],_=i[3],v=i[6],S=i[1],w=i[4],E=i[7],T=i[2],C=i[5],D=i[8];return o[0]=a*x+s*S+l*T,o[3]=a*_+s*w+l*C,o[6]=a*v+s*E+l*D,o[1]=u*x+c*S+f*T,o[4]=u*_+c*w+f*C,o[7]=u*v+c*E+f*D,o[2]=d*x+p*S+y*T,o[5]=d*_+p*w+y*C,o[8]=d*v+p*E+y*D,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=e,n[4]*=e,n[7]*=e,n[2]*=e,n[5]*=e,n[8]*=e,this}determinant(){const e=this.elements,n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8];return n*a*c-n*s*u-r*o*c+r*s*l+i*o*u-i*a*l}invert(){const e=this.elements,n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],f=c*a-s*u,d=s*l-c*o,p=u*o-a*l,y=n*f+r*d+i*p;if(y===0)return this.set(0,0,0,0,0,0,0,0,0);const x=1/y;return e[0]=f*x,e[1]=(i*u-c*r)*x,e[2]=(s*r-i*a)*x,e[3]=d*x,e[4]=(c*n-i*l)*x,e[5]=(i*o-s*n)*x,e[6]=p*x,e[7]=(r*l-u*n)*x,e[8]=(a*n-r*o)*x,this}transpose(){let e;const n=this.elements;return e=n[1],n[1]=n[3],n[3]=e,e=n[2],n[2]=n[6],n[6]=e,e=n[5],n[5]=n[7],n[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const n=this.elements;return e[0]=n[0],e[1]=n[3],e[2]=n[6],e[3]=n[1],e[4]=n[4],e[5]=n[7],e[6]=n[2],e[7]=n[5],e[8]=n[8],this}setUvTransform(e,n,r,i,o,a,s){const l=Math.cos(o),u=Math.sin(o);return this.set(r*l,r*u,-r*(l*a+u*s)+a+e,-i*u,i*l,-i*(-u*a+l*s)+s+n,0,0,1),this}scale(e,n){return this.premultiply(e3.makeScale(e,n)),this}rotate(e){return this.premultiply(e3.makeRotation(-e)),this}translate(e,n){return this.premultiply(e3.makeTranslation(e,n)),this}makeTranslation(e,n){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,n,0,0,1),this}makeRotation(e){const n=Math.cos(e),r=Math.sin(e);return this.set(n,-r,0,r,n,0,0,0,1),this}makeScale(e,n){return this.set(e,0,0,0,n,0,0,0,1),this}equals(e){const n=this.elements,r=e.elements;for(let i=0;i<9;i++)if(n[i]!==r[i])return!1;return!0}fromArray(e,n=0){for(let r=0;r<9;r++)this.elements[r]=e[r+n];return this}toArray(e=[],n=0){const r=this.elements;return e[n]=r[0],e[n+1]=r[1],e[n+2]=r[2],e[n+3]=r[3],e[n+4]=r[4],e[n+5]=r[5],e[n+6]=r[6],e[n+7]=r[7],e[n+8]=r[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const e3=new On;function fG(t){for(let e=t.length-1;e>=0;--e)if(t[e]>=65535)return!0;return!1}const v_e={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function vg(t,e){return new v_e[t](e)}function qx(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}function dG(){const t=qx("canvas");return t.style.display="block",t}const Bk={};function Y1(t){t in Bk||(Bk[t]=!0,console.warn(t))}const Uk=new On().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),zk=new On().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Fw={[ec]:{transfer:Hx,primaries:Vx,toReference:t=>t,fromReference:t=>t},[Hi]:{transfer:Er,primaries:Vx,toReference:t=>t.convertSRGBToLinear(),fromReference:t=>t.convertLinearToSRGB()},[Rb]:{transfer:Hx,primaries:Wx,toReference:t=>t.applyMatrix3(zk),fromReference:t=>t.applyMatrix3(Uk)},[EC]:{transfer:Er,primaries:Wx,toReference:t=>t.convertSRGBToLinear().applyMatrix3(zk),fromReference:t=>t.applyMatrix3(Uk).convertLinearToSRGB()}},y_e=new Set([ec,Rb]),ar={enabled:!0,_workingColorSpace:ec,get legacyMode(){return console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),!this.enabled},set legacyMode(t){console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),this.enabled=!t},get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(t){if(!y_e.has(t))throw new Error(`Unsupported working color space, "${t}".`);this._workingColorSpace=t},convert:function(t,e,n){if(this.enabled===!1||e===n||!e||!n)return t;const r=Fw[e].toReference,i=Fw[n].fromReference;return i(r(t))},fromWorkingColorSpace:function(t,e){return this.convert(t,this._workingColorSpace,e)},toWorkingColorSpace:function(t,e){return this.convert(t,e,this._workingColorSpace)},getPrimaries:function(t){return Fw[t].primaries},getTransfer:function(t){return t===Ds?Hx:Fw[t].transfer}};function Lg(t){return t<.04045?t*.0773993808:Math.pow(t*.9478672986+.0521327014,2.4)}function t3(t){return t<.0031308?t*12.92:1.055*Math.pow(t,.41666)-.055}let l0;class _4{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{l0===void 0&&(l0=qx("canvas")),l0.width=e.width,l0.height=e.height;const r=l0.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),n=l0}return n.width>2048||n.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),n.toDataURL("image/jpeg",.6)):n.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const n=qx("canvas");n.width=e.width,n.height=e.height;const r=n.getContext("2d");r.drawImage(e,0,0,e.width,e.height);const i=r.getImageData(0,0,e.width,e.height),o=i.data;for(let a=0;a0&&(r.userData=this.userData),n||(e.textures[this.uuid]=r),r}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==Db)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case kx:e.x=e.x-Math.floor(e.x);break;case co:e.x=e.x<0?0:1;break;case Bx: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 kx:e.y=e.y-Math.floor(e.y);break;case co:e.y=e.y<0?0:1;break;case Bx: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)}get encoding(){return Y1("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===Hi?Od:x4}set encoding(e){Y1("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=e===Od?Hi:Ds}}hi.DEFAULT_IMAGE=null;hi.DEFAULT_MAPPING=Db;hi.DEFAULT_ANISOTROPY=1;class ir{constructor(e=0,n=0,r=0,i=1){ir.prototype.isVector4=!0,this.x=e,this.y=n,this.z=r,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,n,r,i){return this.x=e,this.y=n,this.z=r,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,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;case 3:this.w=n;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,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this.w=e.w+n.w,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,this.w+=e.w*n,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,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.z,this.w=e.w-n.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 n=this.x,r=this.y,i=this.z,o=this.w,a=e.elements;return this.x=a[0]*n+a[4]*r+a[8]*i+a[12]*o,this.y=a[1]*n+a[5]*r+a[9]*i+a[13]*o,this.z=a[2]*n+a[6]*r+a[10]*i+a[14]*o,this.w=a[3]*n+a[7]*r+a[11]*i+a[15]*o,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const n=Math.sqrt(1-e.w*e.w);return n<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/n,this.y=e.y/n,this.z=e.z/n),this}setAxisAngleFromRotationMatrix(e){let n,r,i,o;const l=e.elements,u=l[0],c=l[4],f=l[8],d=l[1],p=l[5],y=l[9],x=l[2],_=l[6],v=l[10];if(Math.abs(c-d)<.01&&Math.abs(f-x)<.01&&Math.abs(y-_)<.01){if(Math.abs(c+d)<.1&&Math.abs(f+x)<.1&&Math.abs(y+_)<.1&&Math.abs(u+p+v-3)<.1)return this.set(1,0,0,0),this;n=Math.PI;const w=(u+1)/2,E=(p+1)/2,T=(v+1)/2,C=(c+d)/4,D=(f+x)/4,O=(y+_)/4;return w>E&&w>T?w<.01?(r=0,i=.707106781,o=.707106781):(r=Math.sqrt(w),i=C/r,o=D/r):E>T?E<.01?(r=.707106781,i=0,o=.707106781):(i=Math.sqrt(E),r=C/i,o=O/i):T<.01?(r=.707106781,i=.707106781,o=0):(o=Math.sqrt(T),r=D/o,i=O/o),this.set(r,i,o,n),this}let S=Math.sqrt((_-y)*(_-y)+(f-x)*(f-x)+(d-c)*(d-c));return Math.abs(S)<.001&&(S=1),this.x=(_-y)/S,this.y=(f-x)/S,this.z=(d-c)/S,this.w=Math.acos((u+p+v-1)/2),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,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this.w=Math.max(e.w,Math.min(n.w,this.w)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this.w=Math.max(e,Math.min(n,this.w)),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(n,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,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this.w+=(e.w-this.w)*n,this}lerpVectors(e,n,r){return this.x=e.x+(n.x-e.x)*r,this.y=e.y+(n.y-e.y)*r,this.z=e.z+(n.z-e.z)*r,this.w=e.w+(n.w-e.w)*r,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this.w=e[n+3],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e[n+3]=this.w,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this.w=e.getW(n),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 hG extends vf{constructor(e=1,n=1,r={}){super(),this.isRenderTarget=!0,this.width=e,this.height=n,this.depth=1,this.scissor=new ir(0,0,e,n),this.scissorTest=!1,this.viewport=new ir(0,0,e,n);const i={width:e,height:n,depth:1};r.encoding!==void 0&&(Y1("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),r.colorSpace=r.encoding===Od?Hi:Ds),r=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:wi,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0},r),this.texture=new hi(i,r.mapping,r.wrapS,r.wrapT,r.magFilter,r.minFilter,r.format,r.type,r.anisotropy,r.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=r.generateMipmaps,this.texture.internalFormat=r.internalFormat,this.depthBuffer=r.depthBuffer,this.stencilBuffer=r.stencilBuffer,this.depthTexture=r.depthTexture,this.samples=r.samples}setSize(e,n,r=1){(this.width!==e||this.height!==n||this.depth!==r)&&(this.width=e,this.height=n,this.depth=r,this.texture.image.width=e,this.texture.image.height=n,this.texture.image.depth=r,this.dispose()),this.viewport.set(0,0,e,n),this.scissor.set(0,0,e,n)}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.texture=e.texture.clone(),this.texture.isRenderTargetTexture=!0;const n=Object.assign({},e.texture.image);return this.texture.source=new yp(n),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class au extends hG{constructor(e=1,n=1,r={}){super(e,n,r),this.isWebGLRenderTarget=!0}}class MC extends hi{constructor(e=null,n=1,r=1,i=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:n,height:r,depth:i},this.magFilter=ci,this.minFilter=ci,this.wrapR=co,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class __e extends au{constructor(e=1,n=1,r=1){super(e,n),this.isWebGLArrayRenderTarget=!0,this.depth=r,this.texture=new MC(null,e,n,r),this.texture.isRenderTargetTexture=!0}}class w4 extends hi{constructor(e=null,n=1,r=1,i=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:n,height:r,depth:i},this.magFilter=ci,this.minFilter=ci,this.wrapR=co,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class w_e extends au{constructor(e=1,n=1,r=1){super(e,n),this.isWebGL3DRenderTarget=!0,this.depth=r,this.texture=new w4(null,e,n,r),this.texture.isRenderTargetTexture=!0}}class S_e extends au{constructor(e=1,n=1,r=1,i={}){super(e,n,i),this.isWebGLMultipleRenderTargets=!0;const o=this.texture;this.texture=[];for(let a=0;a=0?1:-1,w=1-v*v;if(w>Number.EPSILON){const T=Math.sqrt(w),C=Math.atan2(T,v*S);_=Math.sin(_*C)/T,s=Math.sin(s*C)/T}const E=s*S;if(l=l*_+d*E,u=u*_+p*E,c=c*_+y*E,f=f*_+x*E,_===1-s){const T=1/Math.sqrt(l*l+u*u+c*c+f*f);l*=T,u*=T,c*=T,f*=T}}e[n]=l,e[n+1]=u,e[n+2]=c,e[n+3]=f}static multiplyQuaternionsFlat(e,n,r,i,o,a){const s=r[i],l=r[i+1],u=r[i+2],c=r[i+3],f=o[a],d=o[a+1],p=o[a+2],y=o[a+3];return e[n]=s*y+c*f+l*p-u*d,e[n+1]=l*y+c*d+u*f-s*p,e[n+2]=u*y+c*p+s*d-l*f,e[n+3]=c*y-s*f-l*d-u*p,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,n,r,i){return this._x=e,this._y=n,this._z=r,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,n){const r=e._x,i=e._y,o=e._z,a=e._order,s=Math.cos,l=Math.sin,u=s(r/2),c=s(i/2),f=s(o/2),d=l(r/2),p=l(i/2),y=l(o/2);switch(a){case"XYZ":this._x=d*c*f+u*p*y,this._y=u*p*f-d*c*y,this._z=u*c*y+d*p*f,this._w=u*c*f-d*p*y;break;case"YXZ":this._x=d*c*f+u*p*y,this._y=u*p*f-d*c*y,this._z=u*c*y-d*p*f,this._w=u*c*f+d*p*y;break;case"ZXY":this._x=d*c*f-u*p*y,this._y=u*p*f+d*c*y,this._z=u*c*y+d*p*f,this._w=u*c*f-d*p*y;break;case"ZYX":this._x=d*c*f-u*p*y,this._y=u*p*f+d*c*y,this._z=u*c*y-d*p*f,this._w=u*c*f+d*p*y;break;case"YZX":this._x=d*c*f+u*p*y,this._y=u*p*f+d*c*y,this._z=u*c*y-d*p*f,this._w=u*c*f-d*p*y;break;case"XZY":this._x=d*c*f-u*p*y,this._y=u*p*f-d*c*y,this._z=u*c*y+d*p*f,this._w=u*c*f+d*p*y;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+a)}return n!==!1&&this._onChangeCallback(),this}setFromAxisAngle(e,n){const r=n/2,i=Math.sin(r);return this._x=e.x*i,this._y=e.y*i,this._z=e.z*i,this._w=Math.cos(r),this._onChangeCallback(),this}setFromRotationMatrix(e){const n=e.elements,r=n[0],i=n[4],o=n[8],a=n[1],s=n[5],l=n[9],u=n[2],c=n[6],f=n[10],d=r+s+f;if(d>0){const p=.5/Math.sqrt(d+1);this._w=.25/p,this._x=(c-l)*p,this._y=(o-u)*p,this._z=(a-i)*p}else if(r>s&&r>f){const p=2*Math.sqrt(1+r-s-f);this._w=(c-l)/p,this._x=.25*p,this._y=(i+a)/p,this._z=(o+u)/p}else if(s>f){const p=2*Math.sqrt(1+s-r-f);this._w=(o-u)/p,this._x=(i+a)/p,this._y=.25*p,this._z=(l+c)/p}else{const p=2*Math.sqrt(1+f-r-s);this._w=(a-i)/p,this._x=(o+u)/p,this._y=(l+c)/p,this._z=.25*p}return this._onChangeCallback(),this}setFromUnitVectors(e,n){let r=e.dot(n)+1;return rMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=r):(this._x=0,this._y=-e.z,this._z=e.y,this._w=r)):(this._x=e.y*n.z-e.z*n.y,this._y=e.z*n.x-e.x*n.z,this._z=e.x*n.y-e.y*n.x,this._w=r),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(fi(this.dot(e),-1,1)))}rotateTowards(e,n){const r=this.angleTo(e);if(r===0)return this;const i=Math.min(1,n/r);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,n){const r=e._x,i=e._y,o=e._z,a=e._w,s=n._x,l=n._y,u=n._z,c=n._w;return this._x=r*c+a*s+i*u-o*l,this._y=i*c+a*l+o*s-r*u,this._z=o*c+a*u+r*l-i*s,this._w=a*c-r*s-i*l-o*u,this._onChangeCallback(),this}slerp(e,n){if(n===0)return this;if(n===1)return this.copy(e);const r=this._x,i=this._y,o=this._z,a=this._w;let s=a*e._w+r*e._x+i*e._y+o*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=a,this._x=r,this._y=i,this._z=o,this;const l=1-s*s;if(l<=Number.EPSILON){const p=1-n;return this._w=p*a+n*this._w,this._x=p*r+n*this._x,this._y=p*i+n*this._y,this._z=p*o+n*this._z,this.normalize(),this._onChangeCallback(),this}const u=Math.sqrt(l),c=Math.atan2(u,s),f=Math.sin((1-n)*c)/u,d=Math.sin(n*c)/u;return this._w=a*f+this._w*d,this._x=r*f+this._x*d,this._y=i*f+this._y*d,this._z=o*f+this._z*d,this._onChangeCallback(),this}slerpQuaternions(e,n,r){return this.copy(e).slerp(n,r)}random(){const e=Math.random(),n=Math.sqrt(1-e),r=Math.sqrt(e),i=2*Math.PI*Math.random(),o=2*Math.PI*Math.random();return this.set(n*Math.cos(i),r*Math.sin(o),r*Math.cos(o),n*Math.sin(i))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,n=0){return this._x=e[n],this._y=e[n+1],this._z=e[n+2],this._w=e[n+3],this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._w,e}fromBufferAttribute(e,n){return this._x=e.getX(n),this._y=e.getY(n),this._z=e.getZ(n),this._w=e.getW(n),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 ae{constructor(e=0,n=0,r=0){ae.prototype.isVector3=!0,this.x=e,this.y=n,this.z=r}set(e,n,r){return r===void 0&&(r=this.z),this.x=e,this.y=n,this.z=r,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,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;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,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,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,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.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,n){return this.x=e.x*n.x,this.y=e.y*n.y,this.z=e.z*n.z,this}applyEuler(e){return this.applyQuaternion($k.setFromEuler(e))}applyAxisAngle(e,n){return this.applyQuaternion($k.setFromAxisAngle(e,n))}applyMatrix3(e){const n=this.x,r=this.y,i=this.z,o=e.elements;return this.x=o[0]*n+o[3]*r+o[6]*i,this.y=o[1]*n+o[4]*r+o[7]*i,this.z=o[2]*n+o[5]*r+o[8]*i,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const n=this.x,r=this.y,i=this.z,o=e.elements,a=1/(o[3]*n+o[7]*r+o[11]*i+o[15]);return this.x=(o[0]*n+o[4]*r+o[8]*i+o[12])*a,this.y=(o[1]*n+o[5]*r+o[9]*i+o[13])*a,this.z=(o[2]*n+o[6]*r+o[10]*i+o[14])*a,this}applyQuaternion(e){const n=this.x,r=this.y,i=this.z,o=e.x,a=e.y,s=e.z,l=e.w,u=2*(a*i-s*r),c=2*(s*n-o*i),f=2*(o*r-a*n);return this.x=n+l*u+a*f-s*c,this.y=r+l*c+s*u-o*f,this.z=i+l*f+o*c-a*u,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const n=this.x,r=this.y,i=this.z,o=e.elements;return this.x=o[0]*n+o[4]*r+o[8]*i,this.y=o[1]*n+o[5]*r+o[9]*i,this.z=o[2]*n+o[6]*r+o[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,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(n,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,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this}lerpVectors(e,n,r){return this.x=e.x+(n.x-e.x)*r,this.y=e.y+(n.y-e.y)*r,this.z=e.z+(n.z-e.z)*r,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,n){const r=e.x,i=e.y,o=e.z,a=n.x,s=n.y,l=n.z;return this.x=i*l-o*s,this.y=o*a-r*l,this.z=r*s-i*a,this}projectOnVector(e){const n=e.lengthSq();if(n===0)return this.set(0,0,0);const r=e.dot(this)/n;return this.copy(e).multiplyScalar(r)}projectOnPlane(e){return r3.copy(this).projectOnVector(e),this.sub(r3)}reflect(e){return this.sub(r3.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const r=this.dot(e)/n;return Math.acos(fi(r,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,r=this.y-e.y,i=this.z-e.z;return n*n+r*r+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,n,r){const i=Math.sin(n)*e;return this.x=i*Math.sin(r),this.y=Math.cos(n)*e,this.z=i*Math.cos(r),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,n,r){return this.x=e*Math.sin(n),this.y=r,this.z=e*Math.cos(n),this}setFromMatrixPosition(e){const n=e.elements;return this.x=n[12],this.y=n[13],this.z=n[14],this}setFromMatrixScale(e){const n=this.setFromMatrixColumn(e,0).length(),r=this.setFromMatrixColumn(e,1).length(),i=this.setFromMatrixColumn(e,2).length();return this.x=n,this.y=r,this.z=i,this}setFromMatrixColumn(e,n){return this.fromArray(e.elements,n*4)}setFromMatrix3Column(e,n){return this.fromArray(e.elements,n*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,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=(Math.random()-.5)*2,n=Math.random()*Math.PI*2,r=Math.sqrt(1-e**2);return this.x=r*Math.cos(n),this.y=r*Math.sin(n),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const r3=new ae,$k=new Xa;class Al{constructor(e=new ae(1/0,1/0,1/0),n=new ae(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=n}set(e,n){return this.min.copy(e),this.max.copy(n),this}setFromArray(e){this.makeEmpty();for(let n=0,r=e.length;nthis.max.x||e.ythis.max.y||e.zthis.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,n){return n.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.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,Ul),Ul.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let n,r;return e.normal.x>0?(n=e.normal.x*this.min.x,r=e.normal.x*this.max.x):(n=e.normal.x*this.max.x,r=e.normal.x*this.min.x),e.normal.y>0?(n+=e.normal.y*this.min.y,r+=e.normal.y*this.max.y):(n+=e.normal.y*this.max.y,r+=e.normal.y*this.min.y),e.normal.z>0?(n+=e.normal.z*this.min.z,r+=e.normal.z*this.max.z):(n+=e.normal.z*this.max.z,r+=e.normal.z*this.min.z),n<=-e.constant&&r>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(qy),kw.subVectors(this.max,qy),u0.subVectors(e.a,qy),c0.subVectors(e.b,qy),f0.subVectors(e.c,qy),ed.subVectors(c0,u0),td.subVectors(f0,c0),Gh.subVectors(u0,f0);let n=[0,-ed.z,ed.y,0,-td.z,td.y,0,-Gh.z,Gh.y,ed.z,0,-ed.x,td.z,0,-td.x,Gh.z,0,-Gh.x,-ed.y,ed.x,0,-td.y,td.x,0,-Gh.y,Gh.x,0];return!i3(n,u0,c0,f0,kw)||(n=[1,0,0,0,1,0,0,0,1],!i3(n,u0,c0,f0,kw))?!1:(Bw.crossVectors(ed,td),n=[Bw.x,Bw.y,Bw.z],i3(n,u0,c0,f0,kw))}clampPoint(e,n){return n.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Ul).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Ul).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:(Dc[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Dc[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Dc[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Dc[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Dc[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Dc[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Dc[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Dc[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Dc),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 Dc=[new ae,new ae,new ae,new ae,new ae,new ae,new ae,new ae],Ul=new ae,Lw=new Al,u0=new ae,c0=new ae,f0=new ae,ed=new ae,td=new ae,Gh=new ae,qy=new ae,kw=new ae,Bw=new ae,jh=new ae;function i3(t,e,n,r,i){for(let o=0,a=t.length-3;o<=a;o+=3){jh.fromArray(t,o);const s=i.x*Math.abs(jh.x)+i.y*Math.abs(jh.y)+i.z*Math.abs(jh.z),l=e.dot(jh),u=n.dot(jh),c=r.dot(jh);if(Math.max(-Math.max(l,u,c),Math.min(l,u,c))>s)return!1}return!0}const E_e=new Al,Xy=new ae,o3=new ae;class lu{constructor(e=new ae,n=-1){this.center=e,this.radius=n}set(e,n){return this.center.copy(e),this.radius=n,this}setFromPoints(e,n){const r=this.center;n!==void 0?r.copy(n):E_e.setFromPoints(e).getCenter(r);let i=0;for(let o=0,a=e.length;othis.radius*this.radius&&(n.sub(this.center).normalize(),n.multiplyScalar(this.radius).add(this.center)),n}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;Xy.subVectors(e,this.center);const n=Xy.lengthSq();if(n>this.radius*this.radius){const r=Math.sqrt(n),i=(r-this.radius)*.5;this.center.addScaledVector(Xy,i/r),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):(o3.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Xy.copy(e.center).add(o3)),this.expandByPoint(Xy.copy(e.center).sub(o3))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const Rc=new ae,a3=new ae,Uw=new ae,nd=new ae,s3=new ae,zw=new ae,l3=new ae;let Cv=class{constructor(e=new ae,n=new ae(0,0,-1)){this.origin=e,this.direction=n}set(e,n){return this.origin.copy(e),this.direction.copy(n),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,n){return n.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,Rc)),this}closestPointToPoint(e,n){n.subVectors(e,this.origin);const r=n.dot(this.direction);return r<0?n.copy(this.origin):n.copy(this.origin).addScaledVector(this.direction,r)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const n=Rc.subVectors(e,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(e):(Rc.copy(this.origin).addScaledVector(this.direction,n),Rc.distanceToSquared(e))}distanceSqToSegment(e,n,r,i){a3.copy(e).add(n).multiplyScalar(.5),Uw.copy(n).sub(e).normalize(),nd.copy(this.origin).sub(a3);const o=e.distanceTo(n)*.5,a=-this.direction.dot(Uw),s=nd.dot(this.direction),l=-nd.dot(Uw),u=nd.lengthSq(),c=Math.abs(1-a*a);let f,d,p,y;if(c>0)if(f=a*l-s,d=a*s-l,y=o*c,f>=0)if(d>=-y)if(d<=y){const x=1/c;f*=x,d*=x,p=f*(f+a*d+2*s)+d*(a*f+d+2*l)+u}else d=o,f=Math.max(0,-(a*d+s)),p=-f*f+d*(d+2*l)+u;else d=-o,f=Math.max(0,-(a*d+s)),p=-f*f+d*(d+2*l)+u;else d<=-y?(f=Math.max(0,-(-a*o+s)),d=f>0?-o:Math.min(Math.max(-o,-l),o),p=-f*f+d*(d+2*l)+u):d<=y?(f=0,d=Math.min(Math.max(-o,-l),o),p=d*(d+2*l)+u):(f=Math.max(0,-(a*o+s)),d=f>0?o:Math.min(Math.max(-o,-l),o),p=-f*f+d*(d+2*l)+u);else d=a>0?-o:o,f=Math.max(0,-(a*d+s)),p=-f*f+d*(d+2*l)+u;return r&&r.copy(this.origin).addScaledVector(this.direction,f),i&&i.copy(a3).addScaledVector(Uw,d),p}intersectSphere(e,n){Rc.subVectors(e.center,this.origin);const r=Rc.dot(this.direction),i=Rc.dot(Rc)-r*r,o=e.radius*e.radius;if(i>o)return null;const a=Math.sqrt(o-i),s=r-a,l=r+a;return l<0?null:s<0?this.at(l,n):this.at(s,n)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const n=e.normal.dot(this.direction);if(n===0)return e.distanceToPoint(this.origin)===0?0:null;const r=-(this.origin.dot(e.normal)+e.constant)/n;return r>=0?r:null}intersectPlane(e,n){const r=this.distanceToPlane(e);return r===null?null:this.at(r,n)}intersectsPlane(e){const n=e.distanceToPoint(this.origin);return n===0||e.normal.dot(this.direction)*n<0}intersectBox(e,n){let r,i,o,a,s,l;const u=1/this.direction.x,c=1/this.direction.y,f=1/this.direction.z,d=this.origin;return u>=0?(r=(e.min.x-d.x)*u,i=(e.max.x-d.x)*u):(r=(e.max.x-d.x)*u,i=(e.min.x-d.x)*u),c>=0?(o=(e.min.y-d.y)*c,a=(e.max.y-d.y)*c):(o=(e.max.y-d.y)*c,a=(e.min.y-d.y)*c),r>a||o>i||((o>r||isNaN(r))&&(r=o),(a=0?(s=(e.min.z-d.z)*f,l=(e.max.z-d.z)*f):(s=(e.max.z-d.z)*f,l=(e.min.z-d.z)*f),r>l||s>i)||((s>r||r!==r)&&(r=s),(l=0?r:i,n)}intersectsBox(e){return this.intersectBox(e,Rc)!==null}intersectTriangle(e,n,r,i,o){s3.subVectors(n,e),zw.subVectors(r,e),l3.crossVectors(s3,zw);let a=this.direction.dot(l3),s;if(a>0){if(i)return null;s=1}else if(a<0)s=-1,a=-a;else return null;nd.subVectors(this.origin,e);const l=s*this.direction.dot(zw.crossVectors(nd,zw));if(l<0)return null;const u=s*this.direction.dot(s3.cross(nd));if(u<0||l+u>a)return null;const c=-s*nd.dot(l3);return c<0?null:this.at(c/a,o)}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 yn{constructor(e,n,r,i,o,a,s,l,u,c,f,d,p,y,x,_){yn.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,n,r,i,o,a,s,l,u,c,f,d,p,y,x,_)}set(e,n,r,i,o,a,s,l,u,c,f,d,p,y,x,_){const v=this.elements;return v[0]=e,v[4]=n,v[8]=r,v[12]=i,v[1]=o,v[5]=a,v[9]=s,v[13]=l,v[2]=u,v[6]=c,v[10]=f,v[14]=d,v[3]=p,v[7]=y,v[11]=x,v[15]=_,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 yn().fromArray(this.elements)}copy(e){const n=this.elements,r=e.elements;return n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3],n[4]=r[4],n[5]=r[5],n[6]=r[6],n[7]=r[7],n[8]=r[8],n[9]=r[9],n[10]=r[10],n[11]=r[11],n[12]=r[12],n[13]=r[13],n[14]=r[14],n[15]=r[15],this}copyPosition(e){const n=this.elements,r=e.elements;return n[12]=r[12],n[13]=r[13],n[14]=r[14],this}setFromMatrix3(e){const n=e.elements;return this.set(n[0],n[3],n[6],0,n[1],n[4],n[7],0,n[2],n[5],n[8],0,0,0,0,1),this}extractBasis(e,n,r){return e.setFromMatrixColumn(this,0),n.setFromMatrixColumn(this,1),r.setFromMatrixColumn(this,2),this}makeBasis(e,n,r){return this.set(e.x,n.x,r.x,0,e.y,n.y,r.y,0,e.z,n.z,r.z,0,0,0,0,1),this}extractRotation(e){const n=this.elements,r=e.elements,i=1/d0.setFromMatrixColumn(e,0).length(),o=1/d0.setFromMatrixColumn(e,1).length(),a=1/d0.setFromMatrixColumn(e,2).length();return n[0]=r[0]*i,n[1]=r[1]*i,n[2]=r[2]*i,n[3]=0,n[4]=r[4]*o,n[5]=r[5]*o,n[6]=r[6]*o,n[7]=0,n[8]=r[8]*a,n[9]=r[9]*a,n[10]=r[10]*a,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromEuler(e){const n=this.elements,r=e.x,i=e.y,o=e.z,a=Math.cos(r),s=Math.sin(r),l=Math.cos(i),u=Math.sin(i),c=Math.cos(o),f=Math.sin(o);if(e.order==="XYZ"){const d=a*c,p=a*f,y=s*c,x=s*f;n[0]=l*c,n[4]=-l*f,n[8]=u,n[1]=p+y*u,n[5]=d-x*u,n[9]=-s*l,n[2]=x-d*u,n[6]=y+p*u,n[10]=a*l}else if(e.order==="YXZ"){const d=l*c,p=l*f,y=u*c,x=u*f;n[0]=d+x*s,n[4]=y*s-p,n[8]=a*u,n[1]=a*f,n[5]=a*c,n[9]=-s,n[2]=p*s-y,n[6]=x+d*s,n[10]=a*l}else if(e.order==="ZXY"){const d=l*c,p=l*f,y=u*c,x=u*f;n[0]=d-x*s,n[4]=-a*f,n[8]=y+p*s,n[1]=p+y*s,n[5]=a*c,n[9]=x-d*s,n[2]=-a*u,n[6]=s,n[10]=a*l}else if(e.order==="ZYX"){const d=a*c,p=a*f,y=s*c,x=s*f;n[0]=l*c,n[4]=y*u-p,n[8]=d*u+x,n[1]=l*f,n[5]=x*u+d,n[9]=p*u-y,n[2]=-u,n[6]=s*l,n[10]=a*l}else if(e.order==="YZX"){const d=a*l,p=a*u,y=s*l,x=s*u;n[0]=l*c,n[4]=x-d*f,n[8]=y*f+p,n[1]=f,n[5]=a*c,n[9]=-s*c,n[2]=-u*c,n[6]=p*f+y,n[10]=d-x*f}else if(e.order==="XZY"){const d=a*l,p=a*u,y=s*l,x=s*u;n[0]=l*c,n[4]=-f,n[8]=u*c,n[1]=d*f+x,n[5]=a*c,n[9]=p*f-y,n[2]=y*f-p,n[6]=s*c,n[10]=x*f+d}return n[3]=0,n[7]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromQuaternion(e){return this.compose(M_e,e,C_e)}lookAt(e,n,r){const i=this.elements;return xs.subVectors(e,n),xs.lengthSq()===0&&(xs.z=1),xs.normalize(),rd.crossVectors(r,xs),rd.lengthSq()===0&&(Math.abs(r.z)===1?xs.x+=1e-4:xs.z+=1e-4,xs.normalize(),rd.crossVectors(r,xs)),rd.normalize(),$w.crossVectors(xs,rd),i[0]=rd.x,i[4]=$w.x,i[8]=xs.x,i[1]=rd.y,i[5]=$w.y,i[9]=xs.y,i[2]=rd.z,i[6]=$w.z,i[10]=xs.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const r=e.elements,i=n.elements,o=this.elements,a=r[0],s=r[4],l=r[8],u=r[12],c=r[1],f=r[5],d=r[9],p=r[13],y=r[2],x=r[6],_=r[10],v=r[14],S=r[3],w=r[7],E=r[11],T=r[15],C=i[0],D=i[4],O=i[8],P=i[12],N=i[1],k=i[5],G=i[9],Z=i[13],j=i[2],K=i[6],Y=i[10],$=i[14],W=i[3],U=i[7],te=i[11],re=i[15];return o[0]=a*C+s*N+l*j+u*W,o[4]=a*D+s*k+l*K+u*U,o[8]=a*O+s*G+l*Y+u*te,o[12]=a*P+s*Z+l*$+u*re,o[1]=c*C+f*N+d*j+p*W,o[5]=c*D+f*k+d*K+p*U,o[9]=c*O+f*G+d*Y+p*te,o[13]=c*P+f*Z+d*$+p*re,o[2]=y*C+x*N+_*j+v*W,o[6]=y*D+x*k+_*K+v*U,o[10]=y*O+x*G+_*Y+v*te,o[14]=y*P+x*Z+_*$+v*re,o[3]=S*C+w*N+E*j+T*W,o[7]=S*D+w*k+E*K+T*U,o[11]=S*O+w*G+E*Y+T*te,o[15]=S*P+w*Z+E*$+T*re,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[4]*=e,n[8]*=e,n[12]*=e,n[1]*=e,n[5]*=e,n[9]*=e,n[13]*=e,n[2]*=e,n[6]*=e,n[10]*=e,n[14]*=e,n[3]*=e,n[7]*=e,n[11]*=e,n[15]*=e,this}determinant(){const e=this.elements,n=e[0],r=e[4],i=e[8],o=e[12],a=e[1],s=e[5],l=e[9],u=e[13],c=e[2],f=e[6],d=e[10],p=e[14],y=e[3],x=e[7],_=e[11],v=e[15];return y*(+o*l*f-i*u*f-o*s*d+r*u*d+i*s*p-r*l*p)+x*(+n*l*p-n*u*d+o*a*d-i*a*p+i*u*c-o*l*c)+_*(+n*u*f-n*s*p-o*a*f+r*a*p+o*s*c-r*u*c)+v*(-i*s*c-n*l*f+n*s*d+i*a*f-r*a*d+r*l*c)}transpose(){const e=this.elements;let n;return n=e[1],e[1]=e[4],e[4]=n,n=e[2],e[2]=e[8],e[8]=n,n=e[6],e[6]=e[9],e[9]=n,n=e[3],e[3]=e[12],e[12]=n,n=e[7],e[7]=e[13],e[13]=n,n=e[11],e[11]=e[14],e[14]=n,this}setPosition(e,n,r){const i=this.elements;return e.isVector3?(i[12]=e.x,i[13]=e.y,i[14]=e.z):(i[12]=e,i[13]=n,i[14]=r),this}invert(){const e=this.elements,n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],f=e[9],d=e[10],p=e[11],y=e[12],x=e[13],_=e[14],v=e[15],S=f*_*u-x*d*u+x*l*p-s*_*p-f*l*v+s*d*v,w=y*d*u-c*_*u-y*l*p+a*_*p+c*l*v-a*d*v,E=c*x*u-y*f*u+y*s*p-a*x*p-c*s*v+a*f*v,T=y*f*l-c*x*l-y*s*d+a*x*d+c*s*_-a*f*_,C=n*S+r*w+i*E+o*T;if(C===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const D=1/C;return e[0]=S*D,e[1]=(x*d*o-f*_*o-x*i*p+r*_*p+f*i*v-r*d*v)*D,e[2]=(s*_*o-x*l*o+x*i*u-r*_*u-s*i*v+r*l*v)*D,e[3]=(f*l*o-s*d*o-f*i*u+r*d*u+s*i*p-r*l*p)*D,e[4]=w*D,e[5]=(c*_*o-y*d*o+y*i*p-n*_*p-c*i*v+n*d*v)*D,e[6]=(y*l*o-a*_*o-y*i*u+n*_*u+a*i*v-n*l*v)*D,e[7]=(a*d*o-c*l*o+c*i*u-n*d*u-a*i*p+n*l*p)*D,e[8]=E*D,e[9]=(y*f*o-c*x*o-y*r*p+n*x*p+c*r*v-n*f*v)*D,e[10]=(a*x*o-y*s*o+y*r*u-n*x*u-a*r*v+n*s*v)*D,e[11]=(c*s*o-a*f*o-c*r*u+n*f*u+a*r*p-n*s*p)*D,e[12]=T*D,e[13]=(c*x*i-y*f*i+y*r*d-n*x*d-c*r*_+n*f*_)*D,e[14]=(y*s*i-a*x*i-y*r*l+n*x*l+a*r*_-n*s*_)*D,e[15]=(a*f*i-c*s*i+c*r*l-n*f*l-a*r*d+n*s*d)*D,this}scale(e){const n=this.elements,r=e.x,i=e.y,o=e.z;return n[0]*=r,n[4]*=i,n[8]*=o,n[1]*=r,n[5]*=i,n[9]*=o,n[2]*=r,n[6]*=i,n[10]*=o,n[3]*=r,n[7]*=i,n[11]*=o,this}getMaxScaleOnAxis(){const e=this.elements,n=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],r=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(n,r,i))}makeTranslation(e,n,r){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,n,0,0,1,r,0,0,0,1),this}makeRotationX(e){const n=Math.cos(e),r=Math.sin(e);return this.set(1,0,0,0,0,n,-r,0,0,r,n,0,0,0,0,1),this}makeRotationY(e){const n=Math.cos(e),r=Math.sin(e);return this.set(n,0,r,0,0,1,0,0,-r,0,n,0,0,0,0,1),this}makeRotationZ(e){const n=Math.cos(e),r=Math.sin(e);return this.set(n,-r,0,0,r,n,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,n){const r=Math.cos(n),i=Math.sin(n),o=1-r,a=e.x,s=e.y,l=e.z,u=o*a,c=o*s;return this.set(u*a+r,u*s-i*l,u*l+i*s,0,u*s+i*l,c*s+r,c*l-i*a,0,u*l-i*s,c*l+i*a,o*l*l+r,0,0,0,0,1),this}makeScale(e,n,r){return this.set(e,0,0,0,0,n,0,0,0,0,r,0,0,0,0,1),this}makeShear(e,n,r,i,o,a){return this.set(1,r,o,0,e,1,a,0,n,i,1,0,0,0,0,1),this}compose(e,n,r){const i=this.elements,o=n._x,a=n._y,s=n._z,l=n._w,u=o+o,c=a+a,f=s+s,d=o*u,p=o*c,y=o*f,x=a*c,_=a*f,v=s*f,S=l*u,w=l*c,E=l*f,T=r.x,C=r.y,D=r.z;return i[0]=(1-(x+v))*T,i[1]=(p+E)*T,i[2]=(y-w)*T,i[3]=0,i[4]=(p-E)*C,i[5]=(1-(d+v))*C,i[6]=(_+S)*C,i[7]=0,i[8]=(y+w)*D,i[9]=(_-S)*D,i[10]=(1-(d+x))*D,i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this}decompose(e,n,r){const i=this.elements;let o=d0.set(i[0],i[1],i[2]).length();const a=d0.set(i[4],i[5],i[6]).length(),s=d0.set(i[8],i[9],i[10]).length();this.determinant()<0&&(o=-o),e.x=i[12],e.y=i[13],e.z=i[14],zl.copy(this);const u=1/o,c=1/a,f=1/s;return zl.elements[0]*=u,zl.elements[1]*=u,zl.elements[2]*=u,zl.elements[4]*=c,zl.elements[5]*=c,zl.elements[6]*=c,zl.elements[8]*=f,zl.elements[9]*=f,zl.elements[10]*=f,n.setFromRotationMatrix(zl),r.x=o,r.y=a,r.z=s,this}makePerspective(e,n,r,i,o,a,s=Bu){const l=this.elements,u=2*o/(n-e),c=2*o/(r-i),f=(n+e)/(n-e),d=(r+i)/(r-i);let p,y;if(s===Bu)p=-(a+o)/(a-o),y=-2*a*o/(a-o);else if(s===jx)p=-a/(a-o),y=-a*o/(a-o);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+s);return l[0]=u,l[4]=0,l[8]=f,l[12]=0,l[1]=0,l[5]=c,l[9]=d,l[13]=0,l[2]=0,l[6]=0,l[10]=p,l[14]=y,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,n,r,i,o,a,s=Bu){const l=this.elements,u=1/(n-e),c=1/(r-i),f=1/(a-o),d=(n+e)*u,p=(r+i)*c;let y,x;if(s===Bu)y=(a+o)*f,x=-2*f;else if(s===jx)y=o*f,x=-1*f;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+s);return l[0]=2*u,l[4]=0,l[8]=0,l[12]=-d,l[1]=0,l[5]=2*c,l[9]=0,l[13]=-p,l[2]=0,l[6]=0,l[10]=x,l[14]=-y,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){const n=this.elements,r=e.elements;for(let i=0;i<16;i++)if(n[i]!==r[i])return!1;return!0}fromArray(e,n=0){for(let r=0;r<16;r++)this.elements[r]=e[r+n];return this}toArray(e=[],n=0){const r=this.elements;return e[n]=r[0],e[n+1]=r[1],e[n+2]=r[2],e[n+3]=r[3],e[n+4]=r[4],e[n+5]=r[5],e[n+6]=r[6],e[n+7]=r[7],e[n+8]=r[8],e[n+9]=r[9],e[n+10]=r[10],e[n+11]=r[11],e[n+12]=r[12],e[n+13]=r[13],e[n+14]=r[14],e[n+15]=r[15],e}}const d0=new ae,zl=new yn,M_e=new ae(0,0,0),C_e=new ae(1,1,1),rd=new ae,$w=new ae,xs=new ae,Hk=new yn,Vk=new Xa;class Pb{constructor(e=0,n=0,r=0,i=Pb.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=n,this._z=r,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,n,r,i=this._order){return this._x=e,this._y=n,this._z=r,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,n=this._order,r=!0){const i=e.elements,o=i[0],a=i[4],s=i[8],l=i[1],u=i[5],c=i[9],f=i[2],d=i[6],p=i[10];switch(n){case"XYZ":this._y=Math.asin(fi(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-c,p),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(d,u),this._z=0);break;case"YXZ":this._x=Math.asin(-fi(c,-1,1)),Math.abs(c)<.9999999?(this._y=Math.atan2(s,p),this._z=Math.atan2(l,u)):(this._y=Math.atan2(-f,o),this._z=0);break;case"ZXY":this._x=Math.asin(fi(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(-f,p),this._z=Math.atan2(-a,u)):(this._y=0,this._z=Math.atan2(l,o));break;case"ZYX":this._y=Math.asin(-fi(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(d,p),this._z=Math.atan2(l,o)):(this._x=0,this._z=Math.atan2(-a,u));break;case"YZX":this._z=Math.asin(fi(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-c,u),this._y=Math.atan2(-f,o)):(this._x=0,this._y=Math.atan2(s,p));break;case"XZY":this._z=Math.asin(-fi(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(d,u),this._y=Math.atan2(s,o)):(this._x=Math.atan2(-c,p),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+n)}return this._order=n,r===!0&&this._onChangeCallback(),this}setFromQuaternion(e,n,r){return Hk.makeRotationFromQuaternion(e),this.setFromRotationMatrix(Hk,n,r)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return Vk.setFromEuler(this),this.setFromQuaternion(Vk,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=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+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}}Pb.DEFAULT_ORDER="XYZ";class Rp{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let n=0;n1){for(let r=0;r0&&(r=r.concat(a))}return r}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Yy,e,T_e),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Yy,D_e,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const n=this.matrixWorld.elements;return e.set(n[8],n[9],n[10]).normalize()}raycast(){}traverse(e){e(this);const n=this.children;for(let r=0,i=n.length;r0&&(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()));function o(s,l){return s[l.uuid]===void 0&&(s[l.uuid]=l.toJSON(e)),l.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=o(e.geometries,this.geometry);const s=this.geometry.parameters;if(s!==void 0&&s.shapes!==void 0){const l=s.shapes;if(Array.isArray(l))for(let u=0,c=l.length;u0){i.children=[];for(let s=0;s0){i.animations=[];for(let s=0;s0&&(r.geometries=s),l.length>0&&(r.materials=l),u.length>0&&(r.textures=u),c.length>0&&(r.images=c),f.length>0&&(r.shapes=f),d.length>0&&(r.skeletons=d),p.length>0&&(r.animations=p),y.length>0&&(r.nodes=y)}return r.object=i,r;function a(s){const l=[];for(const u in s){const c=s[u];delete c.metadata,l.push(c)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,n=!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.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,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)),n===!0)for(let r=0;r0?i.multiplyScalar(1/Math.sqrt(o)):i.set(0,0,0)}static getBarycoord(e,n,r,i,o){$l.subVectors(i,n),Nc.subVectors(r,n),u3.subVectors(e,n);const a=$l.dot($l),s=$l.dot(Nc),l=$l.dot(u3),u=Nc.dot(Nc),c=Nc.dot(u3),f=a*u-s*s;if(f===0)return o.set(-2,-1,-1);const d=1/f,p=(u*l-s*c)*d,y=(a*c-s*l)*d;return o.set(1-p-y,y,p)}static containsPoint(e,n,r,i){return this.getBarycoord(e,n,r,i,Oc),Oc.x>=0&&Oc.y>=0&&Oc.x+Oc.y<=1}static getUV(e,n,r,i,o,a,s,l){return Vw===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Vw=!0),this.getInterpolation(e,n,r,i,o,a,s,l)}static getInterpolation(e,n,r,i,o,a,s,l){return this.getBarycoord(e,n,r,i,Oc),l.setScalar(0),l.addScaledVector(o,Oc.x),l.addScaledVector(a,Oc.y),l.addScaledVector(s,Oc.z),l}static isFrontFacing(e,n,r,i){return $l.subVectors(r,n),Nc.subVectors(e,n),$l.cross(Nc).dot(i)<0}set(e,n,r){return this.a.copy(e),this.b.copy(n),this.c.copy(r),this}setFromPointsAndIndices(e,n,r,i){return this.a.copy(e[n]),this.b.copy(e[r]),this.c.copy(e[i]),this}setFromAttributeAndIndices(e,n,r,i){return this.a.fromBufferAttribute(e,n),this.b.fromBufferAttribute(e,r),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 $l.subVectors(this.c,this.b),Nc.subVectors(this.a,this.b),$l.cross(Nc).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return za.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,n){return za.getBarycoord(e,this.a,this.b,this.c,n)}getUV(e,n,r,i,o){return Vw===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Vw=!0),za.getInterpolation(e,this.a,this.b,this.c,n,r,i,o)}getInterpolation(e,n,r,i,o){return za.getInterpolation(e,this.a,this.b,this.c,n,r,i,o)}containsPoint(e){return za.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return za.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,n){const r=this.a,i=this.b,o=this.c;let a,s;p0.subVectors(i,r),m0.subVectors(o,r),c3.subVectors(e,r);const l=p0.dot(c3),u=m0.dot(c3);if(l<=0&&u<=0)return n.copy(r);f3.subVectors(e,i);const c=p0.dot(f3),f=m0.dot(f3);if(c>=0&&f<=c)return n.copy(i);const d=l*f-c*u;if(d<=0&&l>=0&&c<=0)return a=l/(l-c),n.copy(r).addScaledVector(p0,a);d3.subVectors(e,o);const p=p0.dot(d3),y=m0.dot(d3);if(y>=0&&p<=y)return n.copy(o);const x=p*u-l*y;if(x<=0&&u>=0&&y<=0)return s=u/(u-y),n.copy(r).addScaledVector(m0,s);const _=c*y-p*f;if(_<=0&&f-c>=0&&p-y>=0)return Xk.subVectors(o,i),s=(f-c)/(f-c+(p-y)),n.copy(i).addScaledVector(Xk,s);const v=1/(_+x+d);return a=x*v,s=d*v,n.copy(r).addScaledVector(p0,a).addScaledVector(m0,s)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const pG={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},id={h:0,s:0,l:0},Ww={h:0,s:0,l:0};function h3(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*6*(2/3-n):t}let Pt=class{constructor(e,n,r){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,n,r)}set(e,n,r){if(n===void 0&&r===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,n,r);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,n=Hi){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,ar.toWorkingColorSpace(this,n),this}setRGB(e,n,r,i=ar.workingColorSpace){return this.r=e,this.g=n,this.b=r,ar.toWorkingColorSpace(this,i),this}setHSL(e,n,r,i=ar.workingColorSpace){if(e=b4(e,1),n=fi(n,0,1),r=fi(r,0,1),n===0)this.r=this.g=this.b=r;else{const o=r<=.5?r*(1+n):r+n-r*n,a=2*r-o;this.r=h3(a,o,e+1/3),this.g=h3(a,o,e),this.b=h3(a,o,e-1/3)}return ar.toWorkingColorSpace(this,i),this}setStyle(e,n=Hi){function r(o){o!==void 0&&parseFloat(o)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let i;if(i=/^(\w+)\(([^\)]*)\)/.exec(e)){let o;const a=i[1],s=i[2];switch(a){case"rgb":case"rgba":if(o=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return r(o[4]),this.setRGB(Math.min(255,parseInt(o[1],10))/255,Math.min(255,parseInt(o[2],10))/255,Math.min(255,parseInt(o[3],10))/255,n);if(o=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return r(o[4]),this.setRGB(Math.min(100,parseInt(o[1],10))/100,Math.min(100,parseInt(o[2],10))/100,Math.min(100,parseInt(o[3],10))/100,n);break;case"hsl":case"hsla":if(o=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return r(o[4]),this.setHSL(parseFloat(o[1])/360,parseFloat(o[2])/100,parseFloat(o[3])/100,n);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(e)){const o=i[1],a=o.length;if(a===3)return this.setRGB(parseInt(o.charAt(0),16)/15,parseInt(o.charAt(1),16)/15,parseInt(o.charAt(2),16)/15,n);if(a===6)return this.setHex(parseInt(o,16),n);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,n);return this}setColorName(e,n=Hi){const r=pG[e.toLowerCase()];return r!==void 0?this.setHex(r,n):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=Lg(e.r),this.g=Lg(e.g),this.b=Lg(e.b),this}copyLinearToSRGB(e){return this.r=t3(e.r),this.g=t3(e.g),this.b=t3(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Hi){return ar.fromWorkingColorSpace(Wo.copy(this),e),Math.round(fi(Wo.r*255,0,255))*65536+Math.round(fi(Wo.g*255,0,255))*256+Math.round(fi(Wo.b*255,0,255))}getHexString(e=Hi){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,n=ar.workingColorSpace){ar.fromWorkingColorSpace(Wo.copy(this),n);const r=Wo.r,i=Wo.g,o=Wo.b,a=Math.max(r,i,o),s=Math.min(r,i,o);let l,u;const c=(s+a)/2;if(s===a)l=0,u=0;else{const f=a-s;switch(u=c<=.5?f/(a+s):f/(2-a-s),a){case r:l=(i-o)/f+(i0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const n in e){const r=e[n];if(r===void 0){console.warn(`THREE.Material: parameter '${n}' has value of undefined.`);continue}const i=this[n];if(i===void 0){console.warn(`THREE.Material: '${n}' is not a property of THREE.${this.type}.`);continue}i&&i.isColor?i.set(r):i&&i.isVector3&&r&&r.isVector3?i.copy(r):this[n]=r}}toJSON(e){const n=e===void 0||typeof e=="string";n&&(e={textures:{},images:{}});const r={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};r.uuid=this.uuid,r.type=this.type,this.name!==""&&(r.name=this.name),this.color&&this.color.isColor&&(r.color=this.color.getHex()),this.roughness!==void 0&&(r.roughness=this.roughness),this.metalness!==void 0&&(r.metalness=this.metalness),this.sheen!==void 0&&(r.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(r.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(r.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(r.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(r.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(r.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(r.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(r.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(r.shininess=this.shininess),this.clearcoat!==void 0&&(r.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(r.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(r.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(r.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(r.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,r.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(r.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(r.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(r.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(r.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(r.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(r.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(r.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(r.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(r.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(r.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(r.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(r.lightMap=this.lightMap.toJSON(e).uuid,r.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(r.aoMap=this.aoMap.toJSON(e).uuid,r.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(r.bumpMap=this.bumpMap.toJSON(e).uuid,r.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(r.normalMap=this.normalMap.toJSON(e).uuid,r.normalMapType=this.normalMapType,r.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(r.displacementMap=this.displacementMap.toJSON(e).uuid,r.displacementScale=this.displacementScale,r.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(r.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(r.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(r.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(r.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(r.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(r.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(r.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(r.combine=this.combine)),this.envMapIntensity!==void 0&&(r.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(r.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(r.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(r.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(r.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(r.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(r.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(r.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(r.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(r.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(r.size=this.size),this.shadowSide!==null&&(r.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(r.sizeAttenuation=this.sizeAttenuation),this.blending!==Tp&&(r.blending=this.blending),this.side!==uf&&(r.side=this.side),this.vertexColors===!0&&(r.vertexColors=!0),this.opacity<1&&(r.opacity=this.opacity),this.transparent===!0&&(r.transparent=!0),this.blendSrc!==x2&&(r.blendSrc=this.blendSrc),this.blendDst!==b2&&(r.blendDst=this.blendDst),this.blendEquation!==vd&&(r.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(r.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(r.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(r.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(r.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(r.blendAlpha=this.blendAlpha),this.depthFunc!==Ix&&(r.depthFunc=this.depthFunc),this.depthTest===!1&&(r.depthTest=this.depthTest),this.depthWrite===!1&&(r.depthWrite=this.depthWrite),this.colorWrite===!1&&(r.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(r.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==_P&&(r.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(r.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(r.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==op&&(r.stencilFail=this.stencilFail),this.stencilZFail!==op&&(r.stencilZFail=this.stencilZFail),this.stencilZPass!==op&&(r.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(r.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(r.rotation=this.rotation),this.polygonOffset===!0&&(r.polygonOffset=!0),this.polygonOffsetFactor!==0&&(r.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(r.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(r.linewidth=this.linewidth),this.dashSize!==void 0&&(r.dashSize=this.dashSize),this.gapSize!==void 0&&(r.gapSize=this.gapSize),this.scale!==void 0&&(r.scale=this.scale),this.dithering===!0&&(r.dithering=!0),this.alphaTest>0&&(r.alphaTest=this.alphaTest),this.alphaHash===!0&&(r.alphaHash=!0),this.alphaToCoverage===!0&&(r.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(r.premultipliedAlpha=!0),this.forceSinglePass===!0&&(r.forceSinglePass=!0),this.wireframe===!0&&(r.wireframe=!0),this.wireframeLinewidth>1&&(r.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(r.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(r.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(r.flatShading=!0),this.visible===!1&&(r.visible=!1),this.toneMapped===!1&&(r.toneMapped=!1),this.fog===!1&&(r.fog=!1),Object.keys(this.userData).length>0&&(r.userData=this.userData);function i(o){const a=[];for(const s in o){const l=o[s];delete l.metadata,a.push(l)}return a}if(n){const o=i(e.textures),a=i(e.images);o.length>0&&(r.textures=o),a.length>0&&(r.images=a)}return r}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 n=e.clippingPlanes;let r=null;if(n!==null){const i=n.length;r=new Array(i);for(let o=0;o!==i;++o)r[o]=n[o].clone()}return this.clippingPlanes=r,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 ih extends Po{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Pt(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.combine=Tb,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.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 Hc=O_e();function O_e(){const t=new ArrayBuffer(4),e=new Float32Array(t),n=new Uint32Array(t),r=new Uint32Array(512),i=new Uint32Array(512);for(let l=0;l<256;++l){const u=l-127;u<-27?(r[l]=0,r[l|256]=32768,i[l]=24,i[l|256]=24):u<-14?(r[l]=1024>>-u-14,r[l|256]=1024>>-u-14|32768,i[l]=-u-1,i[l|256]=-u-1):u<=15?(r[l]=u+15<<10,r[l|256]=u+15<<10|32768,i[l]=13,i[l|256]=13):u<128?(r[l]=31744,r[l|256]=64512,i[l]=24,i[l|256]=24):(r[l]=31744,r[l|256]=64512,i[l]=13,i[l|256]=13)}const o=new Uint32Array(2048),a=new Uint32Array(64),s=new Uint32Array(64);for(let l=1;l<1024;++l){let u=l<<13,c=0;for(;!(u&8388608);)u<<=1,c-=8388608;u&=-8388609,c+=947912704,o[l]=u|c}for(let l=1024;l<2048;++l)o[l]=939524096+(l-1024<<13);for(let l=1;l<31;++l)a[l]=l<<23;a[31]=1199570944,a[32]=2147483648;for(let l=33;l<63;++l)a[l]=2147483648+(l-32<<23);a[63]=3347054592;for(let l=1;l<64;++l)l!==32&&(s[l]=1024);return{floatView:e,uint32View:n,baseTable:r,shiftTable:i,mantissaTable:o,exponentTable:a,offsetTable:s}}function ka(t){Math.abs(t)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),t=fi(t,-65504,65504),Hc.floatView[0]=t;const e=Hc.uint32View[0],n=e>>23&511;return Hc.baseTable[n]+((e&8388607)>>Hc.shiftTable[n])}function w1(t){const e=t>>10;return Hc.uint32View[0]=Hc.mantissaTable[Hc.offsetTable[e]+(t&1023)]+Hc.exponentTable[e],Hc.floatView[0]}const I_e={toHalfFloat:ka,fromHalfFloat:w1},Ri=new ae,Gw=new Je;class xr{constructor(e,n,r=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=n,this.count=e!==void 0?e.length/n:0,this.normalized=r,this.usage=Gx,this.updateRange={offset:0,count:-1},this.gpuType=Ql,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}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,n,r){e*=this.itemSize,r*=n.itemSize;for(let i=0,o=this.itemSize;i0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const u in l)l[u]!==void 0&&(e[u]=l[u]);return e}e.data={attributes:{}};const n=this.index;n!==null&&(e.data.index={type:n.array.constructor.name,array:Array.prototype.slice.call(n.array)});const r=this.attributes;for(const l in r){const u=r[l];e.data.attributes[l]=u.toJSON(e.data)}const i={};let o=!1;for(const l in this.morphAttributes){const u=this.morphAttributes[l],c=[];for(let f=0,d=u.length;f0&&(i[l]=c,o=!0)}o&&(e.data.morphAttributes=i,e.data.morphTargetsRelative=this.morphTargetsRelative);const a=this.groups;a.length>0&&(e.data.groups=JSON.parse(JSON.stringify(a)));const s=this.boundingSphere;return s!==null&&(e.data.boundingSphere={center:s.center.toArray(),radius:s.radius}),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 n={};this.name=e.name;const r=e.index;r!==null&&this.setIndex(r.clone(n));const i=e.attributes;for(const u in i){const c=i[u];this.setAttribute(u,c.clone(n))}const o=e.morphAttributes;for(const u in o){const c=[],f=o[u];for(let d=0,p=f.length;d0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,a=i.length;o(e.far-e.near)**2))&&(Yk.copy(o).invert(),qh.copy(e.ray).applyMatrix4(Yk),!(r.boundingBox!==null&&qh.intersectsBox(r.boundingBox)===!1)&&this._computeIntersections(e,n,qh)))}_computeIntersections(e,n,r){let i;const o=this.geometry,a=this.material,s=o.index,l=o.attributes.position,u=o.attributes.uv,c=o.attributes.uv1,f=o.attributes.normal,d=o.groups,p=o.drawRange;if(s!==null)if(Array.isArray(a))for(let y=0,x=d.length;yn.far?null:{distance:u,point:Jw.clone(),object:t}}function Qw(t,e,n,r,i,o,a,s,l,u){t.getVertexPosition(s,v0),t.getVertexPosition(l,y0),t.getVertexPosition(u,x0);const c=V_e(t,e,n,r,v0,y0,x0,Zw);if(c){i&&(Xw.fromBufferAttribute(i,s),Yw.fromBufferAttribute(i,l),Kw.fromBufferAttribute(i,u),c.uv=za.getInterpolation(Zw,v0,y0,x0,Xw,Yw,Kw,new Je)),o&&(Xw.fromBufferAttribute(o,s),Yw.fromBufferAttribute(o,l),Kw.fromBufferAttribute(o,u),c.uv1=za.getInterpolation(Zw,v0,y0,x0,Xw,Yw,Kw,new Je),c.uv2=c.uv1),a&&(Zk.fromBufferAttribute(a,s),Jk.fromBufferAttribute(a,l),Qk.fromBufferAttribute(a,u),c.normal=za.getInterpolation(Zw,v0,y0,x0,Zk,Jk,Qk,new ae),c.normal.dot(r.direction)>0&&c.normal.multiplyScalar(-1));const f={a:s,b:l,c:u,normal:new ae,materialIndex:0};za.getNormal(v0,y0,x0,f.normal),c.face=f}return c}class rm extends In{constructor(e=1,n=1,r=1,i=1,o=1,a=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:n,depth:r,widthSegments:i,heightSegments:o,depthSegments:a};const s=this;i=Math.floor(i),o=Math.floor(o),a=Math.floor(a);const l=[],u=[],c=[],f=[];let d=0,p=0;y("z","y","x",-1,-1,r,n,e,a,o,0),y("z","y","x",1,-1,r,n,-e,a,o,1),y("x","z","y",1,1,e,r,n,i,a,2),y("x","z","y",1,-1,e,r,-n,i,a,3),y("x","y","z",1,-1,e,n,r,i,o,4),y("x","y","z",-1,-1,e,n,-r,i,o,5),this.setIndex(l),this.setAttribute("position",new Ut(u,3)),this.setAttribute("normal",new Ut(c,3)),this.setAttribute("uv",new Ut(f,2));function y(x,_,v,S,w,E,T,C,D,O,P){const N=E/D,k=T/O,G=E/2,Z=T/2,j=C/2,K=D+1,Y=O+1;let $=0,W=0;const U=new ae;for(let te=0;te0?1:-1,c.push(U.x,U.y,U.z),f.push(le/D),f.push(1-te/O),$+=1}}for(let te=0;te0&&(n.defines=this.defines),n.vertexShader=this.vertexShader,n.fragmentShader=this.fragmentShader,n.lights=this.lights,n.clipping=this.clipping;const r={};for(const i in this.extensions)this.extensions[i]===!0&&(r[i]=!0);return Object.keys(r).length>0&&(n.extensions=r),n}}class Pb extends Kn{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new xn,this.projectionMatrix=new xn,this.projectionMatrixInverse=new xn,this.coordinateSystem=Uu}copy(e,n){return super.copy(e,n),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,n){super.updateWorldMatrix(e,n),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}class lo extends Pb{constructor(e=50,n=1,r=.1,i=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=r,this.far=i,this.focus=10,this.aspect=n,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),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 n=.5*this.getFilmHeight()/e;this.fov=ov*2*Math.atan(n),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(Tp*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return ov*2*Math.atan(Math.tan(Tp*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,n,r,i,o,a){this.aspect=e/n,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=n,this.view.offsetX=r,this.view.offsetY=i,this.view.width=o,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let n=e*Math.tan(Tp*.5*this.fov)/this.zoom,r=2*n,i=this.aspect*r,o=-.5*i;const a=this.view;if(this.view!==null&&this.view.enabled){const l=a.fullWidth,u=a.fullHeight;o+=a.offsetX*i/l,n-=a.offsetY*r/u,i*=a.width/l,r*=a.height/u}const s=this.filmOffset;s!==0&&(o+=e*s/this.getFilmWidth()),this.projectionMatrix.makePerspective(o,o+i,n,n-r,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.fov=this.fov,n.object.zoom=this.zoom,n.object.near=this.near,n.object.far=this.far,n.object.focus=this.focus,n.object.aspect=this.aspect,this.view!==null&&(n.object.view=Object.assign({},this.view)),n.object.filmGauge=this.filmGauge,n.object.filmOffset=this.filmOffset,n}}const x0=-90,b0=1;class cG extends Kn{constructor(e,n,r){super(),this.type="CubeCamera",this.renderTarget=r,this.coordinateSystem=null,this.activeMipmapLevel=0;const i=new lo(x0,b0,e,n);i.layers=this.layers,this.add(i);const o=new lo(x0,b0,e,n);o.layers=this.layers,this.add(o);const a=new lo(x0,b0,e,n);a.layers=this.layers,this.add(a);const s=new lo(x0,b0,e,n);s.layers=this.layers,this.add(s);const l=new lo(x0,b0,e,n);l.layers=this.layers,this.add(l);const u=new lo(x0,b0,e,n);u.layers=this.layers,this.add(u)}updateCoordinateSystem(){const e=this.coordinateSystem,n=this.children.concat(),[r,i,o,a,s,l]=n;for(const u of n)this.remove(u);if(e===Uu)r.up.set(0,1,0),r.lookAt(1,0,0),i.up.set(0,1,0),i.lookAt(-1,0,0),o.up.set(0,0,-1),o.lookAt(0,1,0),a.up.set(0,0,1),a.lookAt(0,-1,0),s.up.set(0,1,0),s.lookAt(0,0,1),l.up.set(0,1,0),l.lookAt(0,0,-1);else if(e===Gx)r.up.set(0,-1,0),r.lookAt(-1,0,0),i.up.set(0,-1,0),i.lookAt(1,0,0),o.up.set(0,0,1),o.lookAt(0,1,0),a.up.set(0,0,-1),a.lookAt(0,-1,0),s.up.set(0,-1,0),s.lookAt(0,0,1),l.up.set(0,-1,0),l.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const u of n)this.add(u),u.updateMatrixWorld()}update(e,n){this.parent===null&&this.updateMatrixWorld();const{renderTarget:r,activeMipmapLevel:i}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[o,a,s,l,u,c]=this.children,f=e.getRenderTarget(),d=e.getActiveCubeFace(),p=e.getActiveMipmapLevel(),y=e.xr.enabled;e.xr.enabled=!1;const x=r.texture.generateMipmaps;r.texture.generateMipmaps=!1,e.setRenderTarget(r,0,i),e.render(n,o),e.setRenderTarget(r,1,i),e.render(n,a),e.setRenderTarget(r,2,i),e.render(n,s),e.setRenderTarget(r,3,i),e.render(n,l),e.setRenderTarget(r,4,i),e.render(n,u),r.texture.generateMipmaps=x,e.setRenderTarget(r,5,i),e.render(n,c),e.setRenderTarget(f,d,p),e.xr.enabled=y,r.texture.needsPMREMUpdate=!0}}class Nb extends hi{constructor(e,n,r,i,o,a,s,l,u,c){e=e!==void 0?e:[],n=n!==void 0?n:uf,super(e,n,r,i,o,a,s,l,u,c),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class fG extends su{constructor(e=1,n={}){super(e,e,n),this.isWebGLCubeRenderTarget=!0;const r={width:e,height:e,depth:1},i=[r,r,r,r,r,r];n.encoding!==void 0&&(q1("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),n.colorSpace=n.encoding===Nd?Hi:Ds),this.texture=new Nb(i,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=n.generateMipmaps!==void 0?n.generateMipmaps:!1,this.texture.minFilter=n.minFilter!==void 0?n.minFilter:wi}fromEquirectangularTexture(e,n){this.texture.type=n.type,this.texture.colorSpace=n.colorSpace,this.texture.generateMipmaps=n.generateMipmaps,this.texture.minFilter=n.minFilter,this.texture.magFilter=n.magFilter;const r={uniforms:{tEquirect:{value:null}},vertexShader:` +}`;class tc extends Po{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=G_e,this.fragmentShader=j_e,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!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=uv(e.uniforms),this.uniformsGroups=W_e(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 n=super.toJSON(e);n.glslVersion=this.glslVersion,n.uniforms={};for(const i in this.uniforms){const a=this.uniforms[i].value;a&&a.isTexture?n.uniforms[i]={type:"t",value:a.toJSON(e).uuid}:a&&a.isColor?n.uniforms[i]={type:"c",value:a.getHex()}:a&&a.isVector2?n.uniforms[i]={type:"v2",value:a.toArray()}:a&&a.isVector3?n.uniforms[i]={type:"v3",value:a.toArray()}:a&&a.isVector4?n.uniforms[i]={type:"v4",value:a.toArray()}:a&&a.isMatrix3?n.uniforms[i]={type:"m3",value:a.toArray()}:a&&a.isMatrix4?n.uniforms[i]={type:"m4",value:a.toArray()}:n.uniforms[i]={value:a}}Object.keys(this.defines).length>0&&(n.defines=this.defines),n.vertexShader=this.vertexShader,n.fragmentShader=this.fragmentShader,n.lights=this.lights,n.clipping=this.clipping;const r={};for(const i in this.extensions)this.extensions[i]===!0&&(r[i]=!0);return Object.keys(r).length>0&&(n.extensions=r),n}}class Nb extends Kn{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new yn,this.projectionMatrix=new yn,this.projectionMatrixInverse=new yn,this.coordinateSystem=Bu}copy(e,n){return super.copy(e,n),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,n){super.updateWorldMatrix(e,n),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}class uo extends Nb{constructor(e=50,n=1,r=.1,i=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=r,this.far=i,this.focus=10,this.aspect=n,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),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 n=.5*this.getFilmHeight()/e;this.fov=lv*2*Math.atan(n),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(Dp*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return lv*2*Math.atan(Math.tan(Dp*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,n,r,i,o,a){this.aspect=e/n,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=n,this.view.offsetX=r,this.view.offsetY=i,this.view.width=o,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let n=e*Math.tan(Dp*.5*this.fov)/this.zoom,r=2*n,i=this.aspect*r,o=-.5*i;const a=this.view;if(this.view!==null&&this.view.enabled){const l=a.fullWidth,u=a.fullHeight;o+=a.offsetX*i/l,n-=a.offsetY*r/u,i*=a.width/l,r*=a.height/u}const s=this.filmOffset;s!==0&&(o+=e*s/this.getFilmWidth()),this.projectionMatrix.makePerspective(o,o+i,n,n-r,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.fov=this.fov,n.object.zoom=this.zoom,n.object.near=this.near,n.object.far=this.far,n.object.focus=this.focus,n.object.aspect=this.aspect,this.view!==null&&(n.object.view=Object.assign({},this.view)),n.object.filmGauge=this.filmGauge,n.object.filmOffset=this.filmOffset,n}}const b0=-90,_0=1;class vG extends Kn{constructor(e,n,r){super(),this.type="CubeCamera",this.renderTarget=r,this.coordinateSystem=null,this.activeMipmapLevel=0;const i=new uo(b0,_0,e,n);i.layers=this.layers,this.add(i);const o=new uo(b0,_0,e,n);o.layers=this.layers,this.add(o);const a=new uo(b0,_0,e,n);a.layers=this.layers,this.add(a);const s=new uo(b0,_0,e,n);s.layers=this.layers,this.add(s);const l=new uo(b0,_0,e,n);l.layers=this.layers,this.add(l);const u=new uo(b0,_0,e,n);u.layers=this.layers,this.add(u)}updateCoordinateSystem(){const e=this.coordinateSystem,n=this.children.concat(),[r,i,o,a,s,l]=n;for(const u of n)this.remove(u);if(e===Bu)r.up.set(0,1,0),r.lookAt(1,0,0),i.up.set(0,1,0),i.lookAt(-1,0,0),o.up.set(0,0,-1),o.lookAt(0,1,0),a.up.set(0,0,1),a.lookAt(0,-1,0),s.up.set(0,1,0),s.lookAt(0,0,1),l.up.set(0,1,0),l.lookAt(0,0,-1);else if(e===jx)r.up.set(0,-1,0),r.lookAt(-1,0,0),i.up.set(0,-1,0),i.lookAt(1,0,0),o.up.set(0,0,1),o.lookAt(0,1,0),a.up.set(0,0,-1),a.lookAt(0,-1,0),s.up.set(0,-1,0),s.lookAt(0,0,1),l.up.set(0,-1,0),l.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const u of n)this.add(u),u.updateMatrixWorld()}update(e,n){this.parent===null&&this.updateMatrixWorld();const{renderTarget:r,activeMipmapLevel:i}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[o,a,s,l,u,c]=this.children,f=e.getRenderTarget(),d=e.getActiveCubeFace(),p=e.getActiveMipmapLevel(),y=e.xr.enabled;e.xr.enabled=!1;const x=r.texture.generateMipmaps;r.texture.generateMipmaps=!1,e.setRenderTarget(r,0,i),e.render(n,o),e.setRenderTarget(r,1,i),e.render(n,a),e.setRenderTarget(r,2,i),e.render(n,s),e.setRenderTarget(r,3,i),e.render(n,l),e.setRenderTarget(r,4,i),e.render(n,u),r.texture.generateMipmaps=x,e.setRenderTarget(r,5,i),e.render(n,c),e.setRenderTarget(f,d,p),e.xr.enabled=y,r.texture.needsPMREMUpdate=!0}}class Ob extends hi{constructor(e,n,r,i,o,a,s,l,u,c){e=e!==void 0?e:[],n=n!==void 0?n:cf,super(e,n,r,i,o,a,s,l,u,c),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class yG extends au{constructor(e=1,n={}){super(e,e,n),this.isWebGLCubeRenderTarget=!0;const r={width:e,height:e,depth:1},i=[r,r,r,r,r,r];n.encoding!==void 0&&(Y1("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),n.colorSpace=n.encoding===Od?Hi:Ds),this.texture=new Ob(i,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=n.generateMipmaps!==void 0?n.generateMipmaps:!1,this.texture.minFilter=n.minFilter!==void 0?n.minFilter:wi}fromEquirectangularTexture(e,n){this.texture.type=n.type,this.texture.colorSpace=n.colorSpace,this.texture.generateMipmaps=n.generateMipmaps,this.texture.minFilter=n.minFilter,this.texture.magFilter=n.magFilter;const r={uniforms:{tEquirect:{value:null}},vertexShader:` varying vec3 vWorldDirection; @@ -245,9 +245,9 @@ function print() { __p += __j.call(arguments, '') } gl_FragColor = texture2D( tEquirect, sampleUV ); } - `},i=new nm(5,5,5),o=new nc({name:"CubemapFromEquirect",uniforms:av(r.uniforms),vertexShader:r.vertexShader,fragmentShader:r.fragmentShader,side:Sa,blending:Jc});o.uniforms.tEquirect.value=n;const a=new Co(i,o),s=n.minFilter;return n.minFilter===Hd&&(n.minFilter=wi),new cG(1,10,this).update(e,a),n.minFilter=s,a.geometry.dispose(),a.material.dispose(),this}clear(e,n,r,i){const o=e.getRenderTarget();for(let a=0;a<6;a++)e.setRenderTarget(this,a),e.clear(n,r,i);e.setRenderTarget(o)}}const p3=new ae,L_e=new ae,k_e=new In;class fd{constructor(e=new ae(1,0,0),n=0){this.isPlane=!0,this.normal=e,this.constant=n}set(e,n){return this.normal.copy(e),this.constant=n,this}setComponents(e,n,r,i){return this.normal.set(e,n,r),this.constant=i,this}setFromNormalAndCoplanarPoint(e,n){return this.normal.copy(e),this.constant=-n.dot(this.normal),this}setFromCoplanarPoints(e,n,r){const i=p3.subVectors(r,n).cross(L_e.subVectors(e,n)).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,n){return n.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,n){const r=e.delta(p3),i=this.normal.dot(r);if(i===0)return this.distanceToPoint(e.start)===0?n.copy(e.start):null;const o=-(e.start.dot(this.normal)+this.constant)/i;return o<0||o>1?null:n.copy(e.start).addScaledVector(r,o)}intersectsLine(e){const n=this.distanceToPoint(e.start),r=this.distanceToPoint(e.end);return n<0&&r>0||r<0&&n>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,n){const r=n||k_e.getNormalMatrix(e),i=this.coplanarPoint(p3).applyMatrix4(e),o=this.normal.applyMatrix3(r).normalize();return this.constant=-i.dot(o),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 qh=new uu,eS=new ae;class MC{constructor(e=new fd,n=new fd,r=new fd,i=new fd,o=new fd,a=new fd){this.planes=[e,n,r,i,o,a]}set(e,n,r,i,o,a){const s=this.planes;return s[0].copy(e),s[1].copy(n),s[2].copy(r),s[3].copy(i),s[4].copy(o),s[5].copy(a),this}copy(e){const n=this.planes;for(let r=0;r<6;r++)n[r].copy(e.planes[r]);return this}setFromProjectionMatrix(e,n=Uu){const r=this.planes,i=e.elements,o=i[0],a=i[1],s=i[2],l=i[3],u=i[4],c=i[5],f=i[6],d=i[7],p=i[8],y=i[9],x=i[10],_=i[11],v=i[12],S=i[13],w=i[14],E=i[15];if(r[0].setComponents(l-o,d-u,_-p,E-v).normalize(),r[1].setComponents(l+o,d+u,_+p,E+v).normalize(),r[2].setComponents(l+a,d+c,_+y,E+S).normalize(),r[3].setComponents(l-a,d-c,_-y,E-S).normalize(),r[4].setComponents(l-s,d-f,_-x,E-w).normalize(),n===Uu)r[5].setComponents(l+s,d+f,_+x,E+w).normalize();else if(n===Gx)r[5].setComponents(s,f,x,w).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+n);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),qh.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const n=e.geometry;n.boundingSphere===null&&n.computeBoundingSphere(),qh.copy(n.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(qh)}intersectsSprite(e){return qh.center.set(0,0,0),qh.radius=.7071067811865476,qh.applyMatrix4(e.matrixWorld),this.intersectsSphere(qh)}intersectsSphere(e){const n=this.planes,r=e.center,i=-e.radius;for(let o=0;o<6;o++)if(n[o].distanceToPoint(r)0?e.max.x:e.min.x,eS.y=i.normal.y>0?e.max.y:e.min.y,eS.z=i.normal.z>0?e.max.z:e.min.z,i.distanceToPoint(eS)<0)return!1}return!0}containsPoint(e){const n=this.planes;for(let r=0;r<6;r++)if(n[r].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function dG(){let t=null,e=!1,n=null,r=null;function i(o,a){n(o,a),r=t.requestAnimationFrame(i)}return{start:function(){e!==!0&&n!==null&&(r=t.requestAnimationFrame(i),e=!0)},stop:function(){t.cancelAnimationFrame(r),e=!1},setAnimationLoop:function(o){n=o},setContext:function(o){t=o}}}function B_e(t,e){const n=e.isWebGL2,r=new WeakMap;function i(u,c){const f=u.array,d=u.usage,p=t.createBuffer();t.bindBuffer(c,p),t.bufferData(c,f,d),u.onUploadCallback();let y;if(f instanceof Float32Array)y=t.FLOAT;else if(f instanceof Uint16Array)if(u.isFloat16BufferAttribute)if(n)y=t.HALF_FLOAT;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else y=t.UNSIGNED_SHORT;else if(f instanceof Int16Array)y=t.SHORT;else if(f instanceof Uint32Array)y=t.UNSIGNED_INT;else if(f instanceof Int32Array)y=t.INT;else if(f instanceof Int8Array)y=t.BYTE;else if(f instanceof Uint8Array)y=t.UNSIGNED_BYTE;else if(f instanceof Uint8ClampedArray)y=t.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+f);return{buffer:p,type:y,bytesPerElement:f.BYTES_PER_ELEMENT,version:u.version}}function o(u,c,f){const d=c.array,p=c.updateRange;t.bindBuffer(f,u),p.count===-1?t.bufferSubData(f,0,d):(n?t.bufferSubData(f,p.offset*d.BYTES_PER_ELEMENT,d,p.offset,p.count):t.bufferSubData(f,p.offset*d.BYTES_PER_ELEMENT,d.subarray(p.offset,p.offset+p.count)),p.count=-1),c.onUploadCallback()}function a(u){return u.isInterleavedBufferAttribute&&(u=u.data),r.get(u)}function s(u){u.isInterleavedBufferAttribute&&(u=u.data);const c=r.get(u);c&&(t.deleteBuffer(c.buffer),r.delete(u))}function l(u,c){if(u.isGLBufferAttribute){const d=r.get(u);(!d||d.version1?null:n.copy(e.start).addScaledVector(r,o)}intersectsLine(e){const n=this.distanceToPoint(e.start),r=this.distanceToPoint(e.end);return n<0&&r>0||r<0&&n>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,n){const r=n||X_e.getNormalMatrix(e),i=this.coplanarPoint(g3).applyMatrix4(e),o=this.normal.applyMatrix3(r).normalize();return this.constant=-i.dot(o),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 Xh=new lu,eS=new ae;class CC{constructor(e=new dd,n=new dd,r=new dd,i=new dd,o=new dd,a=new dd){this.planes=[e,n,r,i,o,a]}set(e,n,r,i,o,a){const s=this.planes;return s[0].copy(e),s[1].copy(n),s[2].copy(r),s[3].copy(i),s[4].copy(o),s[5].copy(a),this}copy(e){const n=this.planes;for(let r=0;r<6;r++)n[r].copy(e.planes[r]);return this}setFromProjectionMatrix(e,n=Bu){const r=this.planes,i=e.elements,o=i[0],a=i[1],s=i[2],l=i[3],u=i[4],c=i[5],f=i[6],d=i[7],p=i[8],y=i[9],x=i[10],_=i[11],v=i[12],S=i[13],w=i[14],E=i[15];if(r[0].setComponents(l-o,d-u,_-p,E-v).normalize(),r[1].setComponents(l+o,d+u,_+p,E+v).normalize(),r[2].setComponents(l+a,d+c,_+y,E+S).normalize(),r[3].setComponents(l-a,d-c,_-y,E-S).normalize(),r[4].setComponents(l-s,d-f,_-x,E-w).normalize(),n===Bu)r[5].setComponents(l+s,d+f,_+x,E+w).normalize();else if(n===jx)r[5].setComponents(s,f,x,w).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+n);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),Xh.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const n=e.geometry;n.boundingSphere===null&&n.computeBoundingSphere(),Xh.copy(n.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Xh)}intersectsSprite(e){return Xh.center.set(0,0,0),Xh.radius=.7071067811865476,Xh.applyMatrix4(e.matrixWorld),this.intersectsSphere(Xh)}intersectsSphere(e){const n=this.planes,r=e.center,i=-e.radius;for(let o=0;o<6;o++)if(n[o].distanceToPoint(r)0?e.max.x:e.min.x,eS.y=i.normal.y>0?e.max.y:e.min.y,eS.z=i.normal.z>0?e.max.z:e.min.z,i.distanceToPoint(eS)<0)return!1}return!0}containsPoint(e){const n=this.planes;for(let r=0;r<6;r++)if(n[r].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function xG(){let t=null,e=!1,n=null,r=null;function i(o,a){n(o,a),r=t.requestAnimationFrame(i)}return{start:function(){e!==!0&&n!==null&&(r=t.requestAnimationFrame(i),e=!0)},stop:function(){t.cancelAnimationFrame(r),e=!1},setAnimationLoop:function(o){n=o},setContext:function(o){t=o}}}function Y_e(t,e){const n=e.isWebGL2,r=new WeakMap;function i(u,c){const f=u.array,d=u.usage,p=t.createBuffer();t.bindBuffer(c,p),t.bufferData(c,f,d),u.onUploadCallback();let y;if(f instanceof Float32Array)y=t.FLOAT;else if(f instanceof Uint16Array)if(u.isFloat16BufferAttribute)if(n)y=t.HALF_FLOAT;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else y=t.UNSIGNED_SHORT;else if(f instanceof Int16Array)y=t.SHORT;else if(f instanceof Uint32Array)y=t.UNSIGNED_INT;else if(f instanceof Int32Array)y=t.INT;else if(f instanceof Int8Array)y=t.BYTE;else if(f instanceof Uint8Array)y=t.UNSIGNED_BYTE;else if(f instanceof Uint8ClampedArray)y=t.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+f);return{buffer:p,type:y,bytesPerElement:f.BYTES_PER_ELEMENT,version:u.version}}function o(u,c,f){const d=c.array,p=c.updateRange;t.bindBuffer(f,u),p.count===-1?t.bufferSubData(f,0,d):(n?t.bufferSubData(f,p.offset*d.BYTES_PER_ELEMENT,d,p.offset,p.count):t.bufferSubData(f,p.offset*d.BYTES_PER_ELEMENT,d.subarray(p.offset,p.offset+p.count)),p.count=-1),c.onUploadCallback()}function a(u){return u.isInterleavedBufferAttribute&&(u=u.data),r.get(u)}function s(u){u.isInterleavedBufferAttribute&&(u=u.data);const c=r.get(u);c&&(t.deleteBuffer(c.buffer),r.delete(u))}function l(u,c){if(u.isGLBufferAttribute){const d=r.get(u);(!d||d.version 0 +#endif`,uwe=`#if NUM_CLIPPING_PLANES > 0 vec4 plane; #pragma unroll_loop_start for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { @@ -428,26 +428,26 @@ vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in ve #pragma unroll_loop_end if ( clipped ) discard; #endif -#endif`,Q_e=`#if NUM_CLIPPING_PLANES > 0 +#endif`,cwe=`#if NUM_CLIPPING_PLANES > 0 varying vec3 vClipPosition; uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; -#endif`,ewe=`#if NUM_CLIPPING_PLANES > 0 +#endif`,fwe=`#if NUM_CLIPPING_PLANES > 0 varying vec3 vClipPosition; -#endif`,twe=`#if NUM_CLIPPING_PLANES > 0 +#endif`,dwe=`#if NUM_CLIPPING_PLANES > 0 vClipPosition = - mvPosition.xyz; -#endif`,nwe=`#if defined( USE_COLOR_ALPHA ) +#endif`,hwe=`#if defined( USE_COLOR_ALPHA ) diffuseColor *= vColor; #elif defined( USE_COLOR ) diffuseColor.rgb *= vColor; -#endif`,rwe=`#if defined( USE_COLOR_ALPHA ) +#endif`,pwe=`#if defined( USE_COLOR_ALPHA ) varying vec4 vColor; #elif defined( USE_COLOR ) varying vec3 vColor; -#endif`,iwe=`#if defined( USE_COLOR_ALPHA ) +#endif`,mwe=`#if defined( USE_COLOR_ALPHA ) varying vec4 vColor; #elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) varying vec3 vColor; -#endif`,owe=`#if defined( USE_COLOR_ALPHA ) +#endif`,gwe=`#if defined( USE_COLOR_ALPHA ) vColor = vec4( 1.0 ); #elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) vColor = vec3( 1.0 ); @@ -457,7 +457,7 @@ vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in ve #endif #ifdef USE_INSTANCING_COLOR vColor.xyz *= instanceColor.xyz; -#endif`,awe=`#define PI 3.141592653589793 +#endif`,vwe=`#define PI 3.141592653589793 #define PI2 6.283185307179586 #define PI_HALF 1.5707963267948966 #define RECIPROCAL_PI 0.3183098861837907 @@ -535,7 +535,7 @@ vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) { 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`,swe=`#ifdef ENVMAP_TYPE_CUBE_UV +} // validated`,ywe=`#ifdef ENVMAP_TYPE_CUBE_UV #define cubeUV_minMipLevel 4.0 #define cubeUV_minTileSize 16.0 float getFace( vec3 direction ) { @@ -633,7 +633,7 @@ float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { return vec4( mix( color0, color1, mipF ), 1.0 ); } } -#endif`,lwe=`vec3 transformedNormal = objectNormal; +#endif`,xwe=`vec3 transformedNormal = objectNormal; #ifdef USE_INSTANCING mat3 m = mat3( instanceMatrix ); transformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) ); @@ -648,18 +648,18 @@ transformedNormal = normalMatrix * transformedNormal; #ifdef FLIP_SIDED transformedTangent = - transformedTangent; #endif -#endif`,uwe=`#ifdef USE_DISPLACEMENTMAP +#endif`,bwe=`#ifdef USE_DISPLACEMENTMAP uniform sampler2D displacementMap; uniform float displacementScale; uniform float displacementBias; -#endif`,cwe=`#ifdef USE_DISPLACEMENTMAP +#endif`,_we=`#ifdef USE_DISPLACEMENTMAP transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias ); -#endif`,fwe=`#ifdef USE_EMISSIVEMAP +#endif`,wwe=`#ifdef USE_EMISSIVEMAP vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); totalEmissiveRadiance *= emissiveColor.rgb; -#endif`,dwe=`#ifdef USE_EMISSIVEMAP +#endif`,Swe=`#ifdef USE_EMISSIVEMAP uniform sampler2D emissiveMap; -#endif`,hwe="gl_FragColor = linearToOutputTexel( gl_FragColor );",pwe=` +#endif`,Ewe="gl_FragColor = linearToOutputTexel( gl_FragColor );",Mwe=` const mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3( vec3( 0.8224621, 0.177538, 0.0 ), vec3( 0.0331941, 0.9668058, 0.0 ), @@ -687,7 +687,7 @@ vec4 LinearToLinear( in vec4 value ) { } vec4 LinearTosRGB( in vec4 value ) { return sRGBTransferOETF( value ); -}`,mwe=`#ifdef USE_ENVMAP +}`,Cwe=`#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vec3 cameraToFrag; if ( isOrthographic ) { @@ -716,7 +716,7 @@ vec4 LinearTosRGB( in vec4 value ) { #elif defined( ENVMAP_BLENDING_ADD ) outgoingLight += envColor.xyz * specularStrength * reflectivity; #endif -#endif`,gwe=`#ifdef USE_ENVMAP +#endif`,Awe=`#ifdef USE_ENVMAP uniform float envMapIntensity; uniform float flipEnvMap; #ifdef ENVMAP_TYPE_CUBE @@ -725,7 +725,7 @@ vec4 LinearTosRGB( in vec4 value ) { uniform sampler2D envMap; #endif -#endif`,vwe=`#ifdef USE_ENVMAP +#endif`,Twe=`#ifdef USE_ENVMAP uniform float reflectivity; #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) #define ENV_WORLDPOS @@ -736,7 +736,7 @@ vec4 LinearTosRGB( in vec4 value ) { #else varying vec3 vReflect; #endif -#endif`,ywe=`#ifdef USE_ENVMAP +#endif`,Dwe=`#ifdef USE_ENVMAP #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) #define ENV_WORLDPOS #endif @@ -747,7 +747,7 @@ vec4 LinearTosRGB( in vec4 value ) { varying vec3 vReflect; uniform float refractionRatio; #endif -#endif`,xwe=`#ifdef USE_ENVMAP +#endif`,Rwe=`#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vWorldPosition = worldPosition.xyz; #else @@ -764,18 +764,18 @@ vec4 LinearTosRGB( in vec4 value ) { vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); #endif #endif -#endif`,bwe=`#ifdef USE_FOG +#endif`,Pwe=`#ifdef USE_FOG vFogDepth = - mvPosition.z; -#endif`,_we=`#ifdef USE_FOG +#endif`,Nwe=`#ifdef USE_FOG varying float vFogDepth; -#endif`,wwe=`#ifdef USE_FOG +#endif`,Owe=`#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`,Swe=`#ifdef USE_FOG +#endif`,Iwe=`#ifdef USE_FOG uniform vec3 fogColor; varying float vFogDepth; #ifdef FOG_EXP2 @@ -784,7 +784,7 @@ vec4 LinearTosRGB( in vec4 value ) { uniform float fogNear; uniform float fogFar; #endif -#endif`,Ewe=`#ifdef USE_GRADIENTMAP +#endif`,Fwe=`#ifdef USE_GRADIENTMAP uniform sampler2D gradientMap; #endif vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { @@ -796,16 +796,16 @@ vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { 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 -}`,Mwe=`#ifdef USE_LIGHTMAP +}`,Lwe=`#ifdef USE_LIGHTMAP vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; reflectedLight.indirectDiffuse += lightMapIrradiance; -#endif`,Cwe=`#ifdef USE_LIGHTMAP +#endif`,kwe=`#ifdef USE_LIGHTMAP uniform sampler2D lightMap; uniform float lightMapIntensity; -#endif`,Awe=`LambertMaterial material; +#endif`,Bwe=`LambertMaterial material; material.diffuseColor = diffuseColor.rgb; -material.specularStrength = specularStrength;`,Twe=`varying vec3 vViewPosition; +material.specularStrength = specularStrength;`,Uwe=`varying vec3 vViewPosition; struct LambertMaterial { vec3 diffuseColor; float specularStrength; @@ -819,7 +819,7 @@ void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometr reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_Lambert -#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,Dwe=`uniform bool receiveShadow; +#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,zwe=`uniform bool receiveShadow; uniform vec3 ambientLightColor; #if defined( USE_LIGHT_PROBES ) uniform vec3 lightProbe[ 9 ]; @@ -942,7 +942,7 @@ float getSpotAttenuation( const in float coneCosine, const in float penumbraCosi vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); return irradiance; } -#endif`,Rwe=`#ifdef USE_ENVMAP +#endif`,$we=`#ifdef USE_ENVMAP vec3 getIBLIrradiance( const in vec3 normal ) { #ifdef ENVMAP_TYPE_CUBE_UV vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); @@ -975,8 +975,8 @@ float getSpotAttenuation( const in float coneCosine, const in float penumbraCosi #endif } #endif -#endif`,Pwe=`ToonMaterial material; -material.diffuseColor = diffuseColor.rgb;`,Nwe=`varying vec3 vViewPosition; +#endif`,Hwe=`ToonMaterial material; +material.diffuseColor = diffuseColor.rgb;`,Vwe=`varying vec3 vViewPosition; struct ToonMaterial { vec3 diffuseColor; }; @@ -988,11 +988,11 @@ void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPo reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_Toon -#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,Owe=`BlinnPhongMaterial material; +#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,Wwe=`BlinnPhongMaterial material; material.diffuseColor = diffuseColor.rgb; material.specularColor = specular; material.specularShininess = shininess; -material.specularStrength = specularStrength;`,Iwe=`varying vec3 vViewPosition; +material.specularStrength = specularStrength;`,Gwe=`varying vec3 vViewPosition; struct BlinnPhongMaterial { vec3 diffuseColor; vec3 specularColor; @@ -1009,7 +1009,7 @@ void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geom reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_BlinnPhong -#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,Fwe=`PhysicalMaterial material; +#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,jwe=`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 ); @@ -1088,7 +1088,7 @@ material.roughness = min( material.roughness, 1.0 ); 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`,Lwe=`struct PhysicalMaterial { +#endif`,qwe=`struct PhysicalMaterial { vec3 diffuseColor; float roughness; vec3 specularColor; @@ -1388,7 +1388,7 @@ void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradia #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 ); -}`,kwe=` +}`,Xwe=` vec3 geometryPosition = - vViewPosition; vec3 geometryNormal = normal; vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); @@ -1503,7 +1503,7 @@ IncidentLight directLight; #if defined( RE_IndirectSpecular ) vec3 radiance = vec3( 0.0 ); vec3 clearcoatRadiance = vec3( 0.0 ); -#endif`,Bwe=`#if defined( RE_IndirectDiffuse ) +#endif`,Ywe=`#if defined( RE_IndirectDiffuse ) #ifdef USE_LIGHTMAP vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; @@ -1522,25 +1522,25 @@ IncidentLight directLight; #ifdef USE_CLEARCOAT clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness ); #endif -#endif`,Uwe=`#if defined( RE_IndirectDiffuse ) +#endif`,Kwe=`#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`,zwe=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) +#endif`,Zwe=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; -#endif`,$we=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) +#endif`,Jwe=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) uniform float logDepthBufFC; varying float vFragDepth; varying float vIsPerspective; -#endif`,Hwe=`#ifdef USE_LOGDEPTHBUF +#endif`,Qwe=`#ifdef USE_LOGDEPTHBUF #ifdef USE_LOGDEPTHBUF_EXT varying float vFragDepth; varying float vIsPerspective; #else uniform float logDepthBufFC; #endif -#endif`,Vwe=`#ifdef USE_LOGDEPTHBUF +#endif`,eSe=`#ifdef USE_LOGDEPTHBUF #ifdef USE_LOGDEPTHBUF_EXT vFragDepth = 1.0 + gl_Position.w; vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); @@ -1550,16 +1550,16 @@ IncidentLight directLight; gl_Position.z *= gl_Position.w; } #endif -#endif`,Wwe=`#ifdef USE_MAP +#endif`,tSe=`#ifdef USE_MAP vec4 sampledDiffuseColor = texture2D( map, vMapUv ); #ifdef DECODE_VIDEO_TEXTURE sampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w ); #endif diffuseColor *= sampledDiffuseColor; -#endif`,Gwe=`#ifdef USE_MAP +#endif`,nSe=`#ifdef USE_MAP uniform sampler2D map; -#endif`,jwe=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) +#endif`,rSe=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) #if defined( USE_POINTS_UV ) vec2 uv = vUv; #else @@ -1571,7 +1571,7 @@ IncidentLight directLight; #endif #ifdef USE_ALPHAMAP diffuseColor.a *= texture2D( alphaMap, uv ).g; -#endif`,qwe=`#if defined( USE_POINTS_UV ) +#endif`,iSe=`#if defined( USE_POINTS_UV ) varying vec2 vUv; #else #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) @@ -1583,13 +1583,13 @@ IncidentLight directLight; #endif #ifdef USE_ALPHAMAP uniform sampler2D alphaMap; -#endif`,Xwe=`float metalnessFactor = metalness; +#endif`,oSe=`float metalnessFactor = metalness; #ifdef USE_METALNESSMAP vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); metalnessFactor *= texelMetalness.b; -#endif`,Ywe=`#ifdef USE_METALNESSMAP +#endif`,aSe=`#ifdef USE_METALNESSMAP uniform sampler2D metalnessMap; -#endif`,Kwe=`#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE ) +#endif`,sSe=`#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE ) vColor *= morphTargetBaseInfluence; for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { #if defined( USE_COLOR_ALPHA ) @@ -1598,7 +1598,7 @@ IncidentLight directLight; if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; #endif } -#endif`,Zwe=`#ifdef USE_MORPHNORMALS +#endif`,lSe=`#ifdef USE_MORPHNORMALS objectNormal *= morphTargetBaseInfluence; #ifdef MORPHTARGETS_TEXTURE for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { @@ -1610,7 +1610,7 @@ IncidentLight directLight; objectNormal += morphNormal2 * morphTargetInfluences[ 2 ]; objectNormal += morphNormal3 * morphTargetInfluences[ 3 ]; #endif -#endif`,Jwe=`#ifdef USE_MORPHTARGETS +#endif`,uSe=`#ifdef USE_MORPHTARGETS uniform float morphTargetBaseInfluence; #ifdef MORPHTARGETS_TEXTURE uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; @@ -1630,7 +1630,7 @@ IncidentLight directLight; uniform float morphTargetInfluences[ 4 ]; #endif #endif -#endif`,Qwe=`#ifdef USE_MORPHTARGETS +#endif`,cSe=`#ifdef USE_MORPHTARGETS transformed *= morphTargetBaseInfluence; #ifdef MORPHTARGETS_TEXTURE for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { @@ -1648,7 +1648,7 @@ IncidentLight directLight; transformed += morphTarget7 * morphTargetInfluences[ 7 ]; #endif #endif -#endif`,eSe=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; +#endif`,fSe=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; #ifdef FLAT_SHADED vec3 fdx = dFdx( vViewPosition ); vec3 fdy = dFdy( vViewPosition ); @@ -1689,7 +1689,7 @@ IncidentLight directLight; tbn2[1] *= faceDirection; #endif #endif -vec3 nonPerturbedNormal = normal;`,tSe=`#ifdef USE_NORMALMAP_OBJECTSPACE +vec3 nonPerturbedNormal = normal;`,dSe=`#ifdef USE_NORMALMAP_OBJECTSPACE normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; #ifdef FLIP_SIDED normal = - normal; @@ -1704,25 +1704,25 @@ vec3 nonPerturbedNormal = normal;`,tSe=`#ifdef USE_NORMALMAP_OBJECTSPACE normal = normalize( tbn * mapN ); #elif defined( USE_BUMPMAP ) normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); -#endif`,nSe=`#ifndef FLAT_SHADED +#endif`,hSe=`#ifndef FLAT_SHADED varying vec3 vNormal; #ifdef USE_TANGENT varying vec3 vTangent; varying vec3 vBitangent; #endif -#endif`,rSe=`#ifndef FLAT_SHADED +#endif`,pSe=`#ifndef FLAT_SHADED varying vec3 vNormal; #ifdef USE_TANGENT varying vec3 vTangent; varying vec3 vBitangent; #endif -#endif`,iSe=`#ifndef FLAT_SHADED +#endif`,mSe=`#ifndef FLAT_SHADED vNormal = normalize( transformedNormal ); #ifdef USE_TANGENT vTangent = normalize( transformedTangent ); vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); #endif -#endif`,oSe=`#ifdef USE_NORMALMAP +#endif`,gSe=`#ifdef USE_NORMALMAP uniform sampler2D normalMap; uniform vec2 normalScale; #endif @@ -1744,13 +1744,13 @@ vec3 nonPerturbedNormal = normal;`,tSe=`#ifdef USE_NORMALMAP_OBJECTSPACE float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det ); return mat3( T * scale, B * scale, N ); } -#endif`,aSe=`#ifdef USE_CLEARCOAT +#endif`,vSe=`#ifdef USE_CLEARCOAT vec3 clearcoatNormal = nonPerturbedNormal; -#endif`,sSe=`#ifdef USE_CLEARCOAT_NORMALMAP +#endif`,ySe=`#ifdef USE_CLEARCOAT_NORMALMAP vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0; clearcoatMapN.xy *= clearcoatNormalScale; clearcoatNormal = normalize( tbn2 * clearcoatMapN ); -#endif`,lSe=`#ifdef USE_CLEARCOATMAP +#endif`,xSe=`#ifdef USE_CLEARCOATMAP uniform sampler2D clearcoatMap; #endif #ifdef USE_CLEARCOAT_NORMALMAP @@ -1759,18 +1759,18 @@ vec3 nonPerturbedNormal = normal;`,tSe=`#ifdef USE_NORMALMAP_OBJECTSPACE #endif #ifdef USE_CLEARCOAT_ROUGHNESSMAP uniform sampler2D clearcoatRoughnessMap; -#endif`,uSe=`#ifdef USE_IRIDESCENCEMAP +#endif`,bSe=`#ifdef USE_IRIDESCENCEMAP uniform sampler2D iridescenceMap; #endif #ifdef USE_IRIDESCENCE_THICKNESSMAP uniform sampler2D iridescenceThicknessMap; -#endif`,cSe=`#ifdef OPAQUE +#endif`,_Se=`#ifdef OPAQUE diffuseColor.a = 1.0; #endif #ifdef USE_TRANSMISSION diffuseColor.a *= material.transmissionAlpha; #endif -gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,fSe=`vec3 packNormalToRGB( const in vec3 normal ) { +gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,wSe=`vec3 packNormalToRGB( const in vec3 normal ) { return normalize( normal ) * 0.5 + 0.5; } vec3 unpackRGBToNormal( const in vec3 rgb ) { @@ -1811,29 +1811,29 @@ float viewZToPerspectiveDepth( const in float viewZ, const in float near, const } float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) { return ( near * far ) / ( ( far - near ) * depth - far ); -}`,dSe=`#ifdef PREMULTIPLIED_ALPHA +}`,SSe=`#ifdef PREMULTIPLIED_ALPHA gl_FragColor.rgb *= gl_FragColor.a; -#endif`,hSe=`vec4 mvPosition = vec4( transformed, 1.0 ); +#endif`,ESe=`vec4 mvPosition = vec4( transformed, 1.0 ); #ifdef USE_INSTANCING mvPosition = instanceMatrix * mvPosition; #endif mvPosition = modelViewMatrix * mvPosition; -gl_Position = projectionMatrix * mvPosition;`,pSe=`#ifdef DITHERING +gl_Position = projectionMatrix * mvPosition;`,MSe=`#ifdef DITHERING gl_FragColor.rgb = dithering( gl_FragColor.rgb ); -#endif`,mSe=`#ifdef DITHERING +#endif`,CSe=`#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`,gSe=`float roughnessFactor = roughness; +#endif`,ASe=`float roughnessFactor = roughness; #ifdef USE_ROUGHNESSMAP vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); roughnessFactor *= texelRoughness.g; -#endif`,vSe=`#ifdef USE_ROUGHNESSMAP +#endif`,TSe=`#ifdef USE_ROUGHNESSMAP uniform sampler2D roughnessMap; -#endif`,ySe=`#if NUM_SPOT_LIGHT_COORDS > 0 +#endif`,DSe=`#if NUM_SPOT_LIGHT_COORDS > 0 varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; #endif #if NUM_SPOT_LIGHT_MAPS > 0 @@ -2010,7 +2010,7 @@ gl_Position = projectionMatrix * mvPosition;`,pSe=`#ifdef DITHERING return texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ); #endif } -#endif`,xSe=`#if NUM_SPOT_LIGHT_COORDS > 0 +#endif`,RSe=`#if NUM_SPOT_LIGHT_COORDS > 0 uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; #endif @@ -2048,7 +2048,7 @@ gl_Position = projectionMatrix * mvPosition;`,pSe=`#ifdef DITHERING }; uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; #endif -#endif`,bSe=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) +#endif`,PSe=`#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 @@ -2080,7 +2080,7 @@ gl_Position = projectionMatrix * mvPosition;`,pSe=`#ifdef DITHERING vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; } #pragma unroll_loop_end -#endif`,_Se=`float getShadowMask() { +#endif`,NSe=`float getShadowMask() { float shadow = 1.0; #ifdef USE_SHADOWMAP #if NUM_DIR_LIGHT_SHADOWS > 0 @@ -2112,12 +2112,12 @@ gl_Position = projectionMatrix * mvPosition;`,pSe=`#ifdef DITHERING #endif #endif return shadow; -}`,wSe=`#ifdef USE_SKINNING +}`,OSe=`#ifdef USE_SKINNING mat4 boneMatX = getBoneMatrix( skinIndex.x ); mat4 boneMatY = getBoneMatrix( skinIndex.y ); mat4 boneMatZ = getBoneMatrix( skinIndex.z ); mat4 boneMatW = getBoneMatrix( skinIndex.w ); -#endif`,SSe=`#ifdef USE_SKINNING +#endif`,ISe=`#ifdef USE_SKINNING uniform mat4 bindMatrix; uniform mat4 bindMatrixInverse; uniform highp sampler2D boneTexture; @@ -2136,7 +2136,7 @@ gl_Position = projectionMatrix * mvPosition;`,pSe=`#ifdef DITHERING mat4 bone = mat4( v1, v2, v3, v4 ); return bone; } -#endif`,ESe=`#ifdef USE_SKINNING +#endif`,FSe=`#ifdef USE_SKINNING vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); vec4 skinned = vec4( 0.0 ); skinned += boneMatX * skinVertex * skinWeight.x; @@ -2144,7 +2144,7 @@ gl_Position = projectionMatrix * mvPosition;`,pSe=`#ifdef DITHERING skinned += boneMatZ * skinVertex * skinWeight.z; skinned += boneMatW * skinVertex * skinWeight.w; transformed = ( bindMatrixInverse * skinned ).xyz; -#endif`,MSe=`#ifdef USE_SKINNING +#endif`,LSe=`#ifdef USE_SKINNING mat4 skinMatrix = mat4( 0.0 ); skinMatrix += skinWeight.x * boneMatX; skinMatrix += skinWeight.y * boneMatY; @@ -2155,17 +2155,17 @@ gl_Position = projectionMatrix * mvPosition;`,pSe=`#ifdef DITHERING #ifdef USE_TANGENT objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; #endif -#endif`,CSe=`float specularStrength; +#endif`,kSe=`float specularStrength; #ifdef USE_SPECULARMAP vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); specularStrength = texelSpecular.r; #else specularStrength = 1.0; -#endif`,ASe=`#ifdef USE_SPECULARMAP +#endif`,BSe=`#ifdef USE_SPECULARMAP uniform sampler2D specularMap; -#endif`,TSe=`#if defined( TONE_MAPPING ) +#endif`,USe=`#if defined( TONE_MAPPING ) gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); -#endif`,DSe=`#ifndef saturate +#endif`,zSe=`#ifndef saturate #define saturate( a ) clamp( a, 0.0, 1.0 ) #endif uniform float toneMappingExposure; @@ -2201,7 +2201,7 @@ vec3 ACESFilmicToneMapping( vec3 color ) { color = ACESOutputMat * color; return saturate( color ); } -vec3 CustomToneMapping( vec3 color ) { return color; }`,RSe=`#ifdef USE_TRANSMISSION +vec3 CustomToneMapping( vec3 color ) { return color; }`,$Se=`#ifdef USE_TRANSMISSION material.transmission = transmission; material.transmissionAlpha = 1.0; material.thickness = thickness; @@ -2222,7 +2222,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,RSe=`#ifdef USE_TRANSMIS material.attenuationColor, material.attenuationDistance ); material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission ); totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission ); -#endif`,PSe=`#ifdef USE_TRANSMISSION +#endif`,HSe=`#ifdef USE_TRANSMISSION uniform float transmission; uniform float thickness; uniform float attenuationDistance; @@ -2328,7 +2328,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,RSe=`#ifdef USE_TRANSMIS float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0; return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor ); } -#endif`,NSe=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,VSe=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) varying vec2 vUv; #endif #ifdef USE_MAP @@ -2398,7 +2398,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,RSe=`#ifdef USE_TRANSMIS #ifdef USE_THICKNESSMAP uniform mat3 thicknessMapTransform; varying vec2 vThicknessMapUv; -#endif`,OSe=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,WSe=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) varying vec2 vUv; #endif #ifdef USE_MAP @@ -2492,7 +2492,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,RSe=`#ifdef USE_TRANSMIS #ifdef USE_THICKNESSMAP uniform mat3 thicknessMapTransform; varying vec2 vThicknessMapUv; -#endif`,ISe=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,GSe=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) vUv = vec3( uv, 1 ).xy; #endif #ifdef USE_MAP @@ -2563,18 +2563,18 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,RSe=`#ifdef USE_TRANSMIS #endif #ifdef USE_THICKNESSMAP vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy; -#endif`,FSe=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 +#endif`,jSe=`#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_INSTANCING worldPosition = instanceMatrix * worldPosition; #endif worldPosition = modelMatrix * worldPosition; -#endif`;const LSe=`varying vec2 vUv; +#endif`;const qSe=`varying vec2 vUv; uniform mat3 uvTransform; void main() { vUv = ( uvTransform * vec3( uv, 1 ) ).xy; gl_Position = vec4( position.xy, 1.0, 1.0 ); -}`,kSe=`uniform sampler2D t2D; +}`,XSe=`uniform sampler2D t2D; uniform float backgroundIntensity; varying vec2 vUv; void main() { @@ -2586,14 +2586,14 @@ void main() { gl_FragColor = texColor; #include #include -}`,BSe=`varying vec3 vWorldDirection; +}`,YSe=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include gl_Position.z = gl_Position.w; -}`,USe=`#ifdef ENVMAP_TYPE_CUBE +}`,KSe=`#ifdef ENVMAP_TYPE_CUBE uniform samplerCube envMap; #elif defined( ENVMAP_TYPE_CUBE_UV ) uniform sampler2D envMap; @@ -2615,14 +2615,14 @@ void main() { gl_FragColor = texColor; #include #include -}`,zSe=`varying vec3 vWorldDirection; +}`,ZSe=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include gl_Position.z = gl_Position.w; -}`,$Se=`uniform samplerCube tCube; +}`,JSe=`uniform samplerCube tCube; uniform float tFlip; uniform float opacity; varying vec3 vWorldDirection; @@ -2632,7 +2632,7 @@ void main() { gl_FragColor.a *= opacity; #include #include -}`,HSe=`#include +}`,QSe=`#include #include #include #include @@ -2656,7 +2656,7 @@ void main() { #include #include vHighPrecisionZW = gl_Position.zw; -}`,VSe=`#if DEPTH_PACKING == 3200 +}`,eEe=`#if DEPTH_PACKING == 3200 uniform float opacity; #endif #include @@ -2686,7 +2686,7 @@ void main() { #elif DEPTH_PACKING == 3201 gl_FragColor = packDepthToRGBA( fragCoordZ ); #endif -}`,WSe=`#define DISTANCE +}`,tEe=`#define DISTANCE varying vec3 vWorldPosition; #include #include @@ -2710,7 +2710,7 @@ void main() { #include #include vWorldPosition = worldPosition.xyz; -}`,GSe=`#define DISTANCE +}`,nEe=`#define DISTANCE uniform vec3 referencePosition; uniform float nearDistance; uniform float farDistance; @@ -2734,13 +2734,13 @@ void main () { dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); dist = saturate( dist ); gl_FragColor = packDepthToRGBA( dist ); -}`,jSe=`varying vec3 vWorldDirection; +}`,rEe=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include -}`,qSe=`uniform sampler2D tEquirect; +}`,iEe=`uniform sampler2D tEquirect; varying vec3 vWorldDirection; #include void main() { @@ -2749,7 +2749,7 @@ void main() { gl_FragColor = texture2D( tEquirect, sampleUV ); #include #include -}`,XSe=`uniform float scale; +}`,oEe=`uniform float scale; attribute float lineDistance; varying float vLineDistance; #include @@ -2770,7 +2770,7 @@ void main() { #include #include #include -}`,YSe=`uniform vec3 diffuse; +}`,aEe=`uniform vec3 diffuse; uniform float opacity; uniform float dashSize; uniform float totalSize; @@ -2798,7 +2798,7 @@ void main() { #include #include #include -}`,KSe=`#include +}`,sEe=`#include #include #include #include @@ -2827,7 +2827,7 @@ void main() { #include #include #include -}`,ZSe=`uniform vec3 diffuse; +}`,lEe=`uniform vec3 diffuse; uniform float opacity; #ifndef FLAT_SHADED varying vec3 vNormal; @@ -2875,7 +2875,7 @@ void main() { #include #include #include -}`,JSe=`#define LAMBERT +}`,uEe=`#define LAMBERT varying vec3 vViewPosition; #include #include @@ -2911,7 +2911,7 @@ void main() { #include #include #include -}`,QSe=`#define LAMBERT +}`,cEe=`#define LAMBERT uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; @@ -2968,7 +2968,7 @@ void main() { #include #include #include -}`,eEe=`#define MATCAP +}`,fEe=`#define MATCAP varying vec3 vViewPosition; #include #include @@ -2999,7 +2999,7 @@ void main() { #include #include vViewPosition = - mvPosition.xyz; -}`,tEe=`#define MATCAP +}`,dEe=`#define MATCAP uniform vec3 diffuse; uniform float opacity; uniform sampler2D matcap; @@ -3045,7 +3045,7 @@ void main() { #include #include #include -}`,nEe=`#define NORMAL +}`,hEe=`#define NORMAL #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) varying vec3 vViewPosition; #endif @@ -3075,7 +3075,7 @@ void main() { #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) vViewPosition = - mvPosition.xyz; #endif -}`,rEe=`#define NORMAL +}`,pEe=`#define NORMAL uniform float opacity; #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) varying vec3 vViewPosition; @@ -3096,7 +3096,7 @@ void main() { #ifdef OPAQUE gl_FragColor.a = 1.0; #endif -}`,iEe=`#define PHONG +}`,mEe=`#define PHONG varying vec3 vViewPosition; #include #include @@ -3132,7 +3132,7 @@ void main() { #include #include #include -}`,oEe=`#define PHONG +}`,gEe=`#define PHONG uniform vec3 diffuse; uniform vec3 emissive; uniform vec3 specular; @@ -3191,7 +3191,7 @@ void main() { #include #include #include -}`,aEe=`#define STANDARD +}`,vEe=`#define STANDARD varying vec3 vViewPosition; #ifdef USE_TRANSMISSION varying vec3 vWorldPosition; @@ -3231,7 +3231,7 @@ void main() { #ifdef USE_TRANSMISSION vWorldPosition = worldPosition.xyz; #endif -}`,sEe=`#define STANDARD +}`,yEe=`#define STANDARD #ifdef PHYSICAL #define IOR #define USE_SPECULAR @@ -3353,7 +3353,7 @@ void main() { #include #include #include -}`,lEe=`#define TOON +}`,xEe=`#define TOON varying vec3 vViewPosition; #include #include @@ -3387,7 +3387,7 @@ void main() { #include #include #include -}`,uEe=`#define TOON +}`,bEe=`#define TOON uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; @@ -3440,7 +3440,7 @@ void main() { #include #include #include -}`,cEe=`uniform float size; +}`,_Ee=`uniform float size; uniform float scale; #include #include @@ -3470,7 +3470,7 @@ void main() { #include #include #include -}`,fEe=`uniform vec3 diffuse; +}`,wEe=`uniform vec3 diffuse; uniform float opacity; #include #include @@ -3495,7 +3495,7 @@ void main() { #include #include #include -}`,dEe=`#include +}`,SEe=`#include #include #include #include @@ -3515,7 +3515,7 @@ void main() { #include #include #include -}`,hEe=`uniform vec3 color; +}`,EEe=`uniform vec3 color; uniform float opacity; #include #include @@ -3531,7 +3531,7 @@ void main() { #include #include #include -}`,pEe=`uniform float rotation; +}`,MEe=`uniform float rotation; uniform vec2 center; #include #include @@ -3557,7 +3557,7 @@ void main() { #include #include #include -}`,mEe=`uniform vec3 diffuse; +}`,CEe=`uniform vec3 diffuse; uniform float opacity; #include #include @@ -3582,7 +3582,7 @@ void main() { #include #include #include -}`,Dn={alphahash_fragment:U_e,alphahash_pars_fragment:z_e,alphamap_fragment:$_e,alphamap_pars_fragment:H_e,alphatest_fragment:V_e,alphatest_pars_fragment:W_e,aomap_fragment:G_e,aomap_pars_fragment:j_e,begin_vertex:q_e,beginnormal_vertex:X_e,bsdfs:Y_e,iridescence_fragment:K_e,bumpmap_pars_fragment:Z_e,clipping_planes_fragment:J_e,clipping_planes_pars_fragment:Q_e,clipping_planes_pars_vertex:ewe,clipping_planes_vertex:twe,color_fragment:nwe,color_pars_fragment:rwe,color_pars_vertex:iwe,color_vertex:owe,common:awe,cube_uv_reflection_fragment:swe,defaultnormal_vertex:lwe,displacementmap_pars_vertex:uwe,displacementmap_vertex:cwe,emissivemap_fragment:fwe,emissivemap_pars_fragment:dwe,colorspace_fragment:hwe,colorspace_pars_fragment:pwe,envmap_fragment:mwe,envmap_common_pars_fragment:gwe,envmap_pars_fragment:vwe,envmap_pars_vertex:ywe,envmap_physical_pars_fragment:Rwe,envmap_vertex:xwe,fog_vertex:bwe,fog_pars_vertex:_we,fog_fragment:wwe,fog_pars_fragment:Swe,gradientmap_pars_fragment:Ewe,lightmap_fragment:Mwe,lightmap_pars_fragment:Cwe,lights_lambert_fragment:Awe,lights_lambert_pars_fragment:Twe,lights_pars_begin:Dwe,lights_toon_fragment:Pwe,lights_toon_pars_fragment:Nwe,lights_phong_fragment:Owe,lights_phong_pars_fragment:Iwe,lights_physical_fragment:Fwe,lights_physical_pars_fragment:Lwe,lights_fragment_begin:kwe,lights_fragment_maps:Bwe,lights_fragment_end:Uwe,logdepthbuf_fragment:zwe,logdepthbuf_pars_fragment:$we,logdepthbuf_pars_vertex:Hwe,logdepthbuf_vertex:Vwe,map_fragment:Wwe,map_pars_fragment:Gwe,map_particle_fragment:jwe,map_particle_pars_fragment:qwe,metalnessmap_fragment:Xwe,metalnessmap_pars_fragment:Ywe,morphcolor_vertex:Kwe,morphnormal_vertex:Zwe,morphtarget_pars_vertex:Jwe,morphtarget_vertex:Qwe,normal_fragment_begin:eSe,normal_fragment_maps:tSe,normal_pars_fragment:nSe,normal_pars_vertex:rSe,normal_vertex:iSe,normalmap_pars_fragment:oSe,clearcoat_normal_fragment_begin:aSe,clearcoat_normal_fragment_maps:sSe,clearcoat_pars_fragment:lSe,iridescence_pars_fragment:uSe,opaque_fragment:cSe,packing:fSe,premultiplied_alpha_fragment:dSe,project_vertex:hSe,dithering_fragment:pSe,dithering_pars_fragment:mSe,roughnessmap_fragment:gSe,roughnessmap_pars_fragment:vSe,shadowmap_pars_fragment:ySe,shadowmap_pars_vertex:xSe,shadowmap_vertex:bSe,shadowmask_pars_fragment:_Se,skinbase_vertex:wSe,skinning_pars_vertex:SSe,skinning_vertex:ESe,skinnormal_vertex:MSe,specularmap_fragment:CSe,specularmap_pars_fragment:ASe,tonemapping_fragment:TSe,tonemapping_pars_fragment:DSe,transmission_fragment:RSe,transmission_pars_fragment:PSe,uv_pars_fragment:NSe,uv_pars_vertex:OSe,uv_vertex:ISe,worldpos_vertex:FSe,background_vert:LSe,background_frag:kSe,backgroundCube_vert:BSe,backgroundCube_frag:USe,cube_vert:zSe,cube_frag:$Se,depth_vert:HSe,depth_frag:VSe,distanceRGBA_vert:WSe,distanceRGBA_frag:GSe,equirect_vert:jSe,equirect_frag:qSe,linedashed_vert:XSe,linedashed_frag:YSe,meshbasic_vert:KSe,meshbasic_frag:ZSe,meshlambert_vert:JSe,meshlambert_frag:QSe,meshmatcap_vert:eEe,meshmatcap_frag:tEe,meshnormal_vert:nEe,meshnormal_frag:rEe,meshphong_vert:iEe,meshphong_frag:oEe,meshphysical_vert:aEe,meshphysical_frag:sEe,meshtoon_vert:lEe,meshtoon_frag:uEe,points_vert:cEe,points_frag:fEe,shadow_vert:dEe,shadow_frag:hEe,sprite_vert:pEe,sprite_frag:mEe},St={common:{diffuse:{value:new Pt(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new In},alphaMap:{value:null},alphaMapTransform:{value:new In},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new In}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new In}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new In}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new In},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new In},normalScale:{value:new Je(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new In},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new In}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new In}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new In}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Pt(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{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 Pt(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new In},alphaTest:{value:0},uvTransform:{value:new In}},sprite:{diffuse:{value:new Pt(16777215)},opacity:{value:1},center:{value:new Je(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new In},alphaMap:{value:null},alphaMapTransform:{value:new In},alphaTest:{value:0}}},Yl={basic:{uniforms:pa([St.common,St.specularmap,St.envmap,St.aomap,St.lightmap,St.fog]),vertexShader:Dn.meshbasic_vert,fragmentShader:Dn.meshbasic_frag},lambert:{uniforms:pa([St.common,St.specularmap,St.envmap,St.aomap,St.lightmap,St.emissivemap,St.bumpmap,St.normalmap,St.displacementmap,St.fog,St.lights,{emissive:{value:new Pt(0)}}]),vertexShader:Dn.meshlambert_vert,fragmentShader:Dn.meshlambert_frag},phong:{uniforms:pa([St.common,St.specularmap,St.envmap,St.aomap,St.lightmap,St.emissivemap,St.bumpmap,St.normalmap,St.displacementmap,St.fog,St.lights,{emissive:{value:new Pt(0)},specular:{value:new Pt(1118481)},shininess:{value:30}}]),vertexShader:Dn.meshphong_vert,fragmentShader:Dn.meshphong_frag},standard:{uniforms:pa([St.common,St.envmap,St.aomap,St.lightmap,St.emissivemap,St.bumpmap,St.normalmap,St.displacementmap,St.roughnessmap,St.metalnessmap,St.fog,St.lights,{emissive:{value:new Pt(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Dn.meshphysical_vert,fragmentShader:Dn.meshphysical_frag},toon:{uniforms:pa([St.common,St.aomap,St.lightmap,St.emissivemap,St.bumpmap,St.normalmap,St.displacementmap,St.gradientmap,St.fog,St.lights,{emissive:{value:new Pt(0)}}]),vertexShader:Dn.meshtoon_vert,fragmentShader:Dn.meshtoon_frag},matcap:{uniforms:pa([St.common,St.bumpmap,St.normalmap,St.displacementmap,St.fog,{matcap:{value:null}}]),vertexShader:Dn.meshmatcap_vert,fragmentShader:Dn.meshmatcap_frag},points:{uniforms:pa([St.points,St.fog]),vertexShader:Dn.points_vert,fragmentShader:Dn.points_frag},dashed:{uniforms:pa([St.common,St.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Dn.linedashed_vert,fragmentShader:Dn.linedashed_frag},depth:{uniforms:pa([St.common,St.displacementmap]),vertexShader:Dn.depth_vert,fragmentShader:Dn.depth_frag},normal:{uniforms:pa([St.common,St.bumpmap,St.normalmap,St.displacementmap,{opacity:{value:1}}]),vertexShader:Dn.meshnormal_vert,fragmentShader:Dn.meshnormal_frag},sprite:{uniforms:pa([St.sprite,St.fog]),vertexShader:Dn.sprite_vert,fragmentShader:Dn.sprite_frag},background:{uniforms:{uvTransform:{value:new In},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Dn.background_vert,fragmentShader:Dn.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:Dn.backgroundCube_vert,fragmentShader:Dn.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Dn.cube_vert,fragmentShader:Dn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Dn.equirect_vert,fragmentShader:Dn.equirect_frag},distanceRGBA:{uniforms:pa([St.common,St.displacementmap,{referencePosition:{value:new ae},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Dn.distanceRGBA_vert,fragmentShader:Dn.distanceRGBA_frag},shadow:{uniforms:pa([St.lights,St.fog,{color:{value:new Pt(0)},opacity:{value:1}}]),vertexShader:Dn.shadow_vert,fragmentShader:Dn.shadow_frag}};Yl.physical={uniforms:pa([Yl.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new In},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new In},clearcoatNormalScale:{value:new Je(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new In},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new In},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new In},sheen:{value:0},sheenColor:{value:new Pt(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new In},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new In},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new In},transmissionSamplerSize:{value:new Je},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new In},attenuationDistance:{value:0},attenuationColor:{value:new Pt(0)},specularColor:{value:new Pt(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new In},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new In},anisotropyVector:{value:new Je},anisotropyMap:{value:null},anisotropyMapTransform:{value:new In}}]),vertexShader:Dn.meshphysical_vert,fragmentShader:Dn.meshphysical_frag};const tS={r:0,b:0,g:0};function gEe(t,e,n,r,i,o,a){const s=new Pt(0);let l=o===!0?0:1,u,c,f=null,d=0,p=null;function y(_,v){let S=!1,w=v.isScene===!0?v.background:null;w&&w.isTexture&&(w=(v.backgroundBlurriness>0?n:e).get(w)),w===null?x(s,l):w&&w.isColor&&(x(w,1),S=!0);const E=t.xr.getEnvironmentBlendMode();E==="additive"?r.buffers.color.setClear(0,0,0,1,a):E==="alpha-blend"&&r.buffers.color.setClear(0,0,0,0,a),(t.autoClear||S)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),w&&(w.isCubeTexture||w.mapping===wv)?(c===void 0&&(c=new Co(new nm(1,1,1),new nc({name:"BackgroundCubeMaterial",uniforms:av(Yl.backgroundCube.uniforms),vertexShader:Yl.backgroundCube.vertexShader,fragmentShader:Yl.backgroundCube.fragmentShader,side:Sa,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),c.geometry.deleteAttribute("uv"),c.onBeforeRender=function(T,C,D){this.matrixWorld.copyPosition(D.matrixWorld)},Object.defineProperty(c.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(c)),c.material.uniforms.envMap.value=w,c.material.uniforms.flipEnvMap.value=w.isCubeTexture&&w.isRenderTargetTexture===!1?-1:1,c.material.uniforms.backgroundBlurriness.value=v.backgroundBlurriness,c.material.uniforms.backgroundIntensity.value=v.backgroundIntensity,c.material.toneMapped=ar.getTransfer(w.colorSpace)!==Er,(f!==w||d!==w.version||p!==t.toneMapping)&&(c.material.needsUpdate=!0,f=w,d=w.version,p=t.toneMapping),c.layers.enableAll(),_.unshift(c,c.geometry,c.material,0,0,null)):w&&w.isTexture&&(u===void 0&&(u=new Co(new Ob(2,2),new nc({name:"BackgroundMaterial",uniforms:av(Yl.background.uniforms),vertexShader:Yl.background.vertexShader,fragmentShader:Yl.background.fragmentShader,side:lf,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),Object.defineProperty(u.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(u)),u.material.uniforms.t2D.value=w,u.material.uniforms.backgroundIntensity.value=v.backgroundIntensity,u.material.toneMapped=ar.getTransfer(w.colorSpace)!==Er,w.matrixAutoUpdate===!0&&w.updateMatrix(),u.material.uniforms.uvTransform.value.copy(w.matrix),(f!==w||d!==w.version||p!==t.toneMapping)&&(u.material.needsUpdate=!0,f=w,d=w.version,p=t.toneMapping),u.layers.enableAll(),_.unshift(u,u.geometry,u.material,0,0,null))}function x(_,v){_.getRGB(tS,lG(t)),r.buffers.color.setClear(tS.r,tS.g,tS.b,v,a)}return{getClearColor:function(){return s},setClearColor:function(_,v=1){s.set(_),l=v,x(s,l)},getClearAlpha:function(){return l},setClearAlpha:function(_){l=_,x(s,l)},render:y}}function vEe(t,e,n,r){const i=t.getParameter(t.MAX_VERTEX_ATTRIBS),o=r.isWebGL2?null:e.get("OES_vertex_array_object"),a=r.isWebGL2||o!==null,s={},l=_(null);let u=l,c=!1;function f(j,K,Y,$,W){let U=!1;if(a){const te=x($,Y,K);u!==te&&(u=te,p(u.object)),U=v(j,$,Y,W),U&&S(j,$,Y,W)}else{const te=K.wireframe===!0;(u.geometry!==$.id||u.program!==Y.id||u.wireframe!==te)&&(u.geometry=$.id,u.program=Y.id,u.wireframe=te,U=!0)}W!==null&&n.update(W,t.ELEMENT_ARRAY_BUFFER),(U||c)&&(c=!1,O(j,K,Y,$),W!==null&&t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,n.get(W).buffer))}function d(){return r.isWebGL2?t.createVertexArray():o.createVertexArrayOES()}function p(j){return r.isWebGL2?t.bindVertexArray(j):o.bindVertexArrayOES(j)}function y(j){return r.isWebGL2?t.deleteVertexArray(j):o.deleteVertexArrayOES(j)}function x(j,K,Y){const $=Y.wireframe===!0;let W=s[j.id];W===void 0&&(W={},s[j.id]=W);let U=W[K.id];U===void 0&&(U={},W[K.id]=U);let te=U[$];return te===void 0&&(te=_(d()),U[$]=te),te}function _(j){const K=[],Y=[],$=[];for(let W=0;W=0){const Ce=W[le];let Re=U[le];if(Re===void 0&&(le==="instanceMatrix"&&j.instanceMatrix&&(Re=j.instanceMatrix),le==="instanceColor"&&j.instanceColor&&(Re=j.instanceColor)),Ce===void 0||Ce.attribute!==Re||Re&&Ce.data!==Re.data)return!0;te++}return u.attributesNum!==te||u.index!==$}function S(j,K,Y,$){const W={},U=K.attributes;let te=0;const re=Y.getAttributes();for(const le in re)if(re[le].location>=0){let Ce=U[le];Ce===void 0&&(le==="instanceMatrix"&&j.instanceMatrix&&(Ce=j.instanceMatrix),le==="instanceColor"&&j.instanceColor&&(Ce=j.instanceColor));const Re={};Re.attribute=Ce,Ce&&Ce.data&&(Re.data=Ce.data),W[le]=Re,te++}u.attributes=W,u.attributesNum=te,u.index=$}function w(){const j=u.newAttributes;for(let K=0,Y=j.length;K=0){let ce=W[re];if(ce===void 0&&(re==="instanceMatrix"&&j.instanceMatrix&&(ce=j.instanceMatrix),re==="instanceColor"&&j.instanceColor&&(ce=j.instanceColor)),ce!==void 0){const Ce=ce.normalized,Re=ce.itemSize,Ie=n.get(ce);if(Ie===void 0)continue;const He=Ie.buffer,tt=Ie.type,Qe=Ie.bytesPerElement,ct=r.isWebGL2===!0&&(tt===t.INT||tt===t.UNSIGNED_INT||ce.gpuType===c4);if(ce.isInterleavedBufferAttribute){const Xe=ce.data,ue=Xe.stride,De=ce.offset;if(Xe.isInstancedInterleavedBuffer){for(let Ee=0;Ee0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";D="mediump"}return D==="mediump"&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const a=typeof WebGL2RenderingContext<"u"&&t.constructor.name==="WebGL2RenderingContext";let s=n.precision!==void 0?n.precision:"highp";const l=o(s);l!==s&&(console.warn("THREE.WebGLRenderer:",s,"not supported, using",l,"instead."),s=l);const u=a||e.has("WEBGL_draw_buffers"),c=n.logarithmicDepthBuffer===!0,f=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),d=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),p=t.getParameter(t.MAX_TEXTURE_SIZE),y=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),x=t.getParameter(t.MAX_VERTEX_ATTRIBS),_=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),v=t.getParameter(t.MAX_VARYING_VECTORS),S=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),w=d>0,E=a||e.has("OES_texture_float"),T=w&&E,C=a?t.getParameter(t.MAX_SAMPLES):0;return{isWebGL2:a,drawBuffers:u,getMaxAnisotropy:i,getMaxPrecision:o,precision:s,logarithmicDepthBuffer:c,maxTextures:f,maxVertexTextures:d,maxTextureSize:p,maxCubemapSize:y,maxAttributes:x,maxVertexUniforms:_,maxVaryings:v,maxFragmentUniforms:S,vertexTextures:w,floatFragmentTextures:E,floatVertexTextures:T,maxSamples:C}}function bEe(t){const e=this;let n=null,r=0,i=!1,o=!1;const a=new fd,s=new In,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(f,d){const p=f.length!==0||d||r!==0||i;return i=d,r=f.length,p},this.beginShadows=function(){o=!0,c(null)},this.endShadows=function(){o=!1},this.setGlobalState=function(f,d){n=c(f,d,0)},this.setState=function(f,d,p){const y=f.clippingPlanes,x=f.clipIntersection,_=f.clipShadows,v=t.get(f);if(!i||y===null||y.length===0||o&&!_)o?c(null):u();else{const S=o?0:r,w=S*4;let E=v.clippingState||null;l.value=E,E=c(y,d,w,p);for(let T=0;T!==w;++T)E[T]=n[T];v.clippingState=E,this.numIntersection=x?this.numPlanes:0,this.numPlanes+=S}};function u(){l.value!==n&&(l.value=n,l.needsUpdate=r>0),e.numPlanes=r,e.numIntersection=0}function c(f,d,p,y){const x=f!==null?f.length:0;let _=null;if(x!==0){if(_=l.value,y!==!0||_===null){const v=p+x*4,S=d.matrixWorldInverse;s.getNormalMatrix(S),(_===null||_.length0){const u=new fG(l.height/2);return u.fromEquirectangularTexture(t,a),e.set(a,u),a.addEventListener("dispose",i),n(u.texture,a.mapping)}else return null}}return a}function i(a){const s=a.target;s.removeEventListener("dispose",i);const l=e.get(s);l!==void 0&&(e.delete(s),l.dispose())}function o(){e=new WeakMap}return{get:r,dispose:o}}class Ib extends Pb{constructor(e=-1,n=1,r=1,i=-1,o=.1,a=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=n,this.top=r,this.bottom=i,this.near=o,this.far=a,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),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,n,r,i,o,a){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=n,this.view.offsetX=r,this.view.offsetY=i,this.view.width=o,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),n=(this.top-this.bottom)/(2*this.zoom),r=(this.right+this.left)/2,i=(this.top+this.bottom)/2;let o=r-e,a=r+e,s=i+n,l=i-n;if(this.view!==null&&this.view.enabled){const u=(this.right-this.left)/this.view.fullWidth/this.zoom,c=(this.top-this.bottom)/this.view.fullHeight/this.zoom;o+=u*this.view.offsetX,a=o+u*this.view.width,s-=c*this.view.offsetY,l=s-c*this.view.height}this.projectionMatrix.makeOrthographic(o,a,s,l,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.zoom=this.zoom,n.object.left=this.left,n.object.right=this.right,n.object.top=this.top,n.object.bottom=this.bottom,n.object.near=this.near,n.object.far=this.far,this.view!==null&&(n.object.view=Object.assign({},this.view)),n}}const vg=4,Zk=[.125,.215,.35,.446,.526,.582],up=20,m3=new Ib,Jk=new Pt;let g3=null,v3=0,y3=0;const op=(1+Math.sqrt(5))/2,_0=1/op,Qk=[new ae(1,1,1),new ae(-1,1,1),new ae(1,1,-1),new ae(-1,1,-1),new ae(0,op,_0),new ae(0,op,-_0),new ae(_0,0,op),new ae(-_0,0,op),new ae(op,_0,0),new ae(-op,_0,0)];class wP{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,n=0,r=.1,i=100){g3=this._renderer.getRenderTarget(),v3=this._renderer.getActiveCubeFace(),y3=this._renderer.getActiveMipmapLevel(),this._setSize(256);const o=this._allocateTargets();return o.depthBuffer=!0,this._sceneToCubeUV(e,r,i,o),n>0&&this._blur(o,0,0,n),this._applyPMREM(o),this._cleanup(o),o}fromEquirectangular(e,n=null){return this._fromTexture(e,n)}fromCubemap(e,n=null){return this._fromTexture(e,n)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=n6(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=t6(),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;e2?w:0,w,w),c.setRenderTarget(i),x&&c.render(y,s),c.render(e,s)}y.geometry.dispose(),y.material.dispose(),c.toneMapping=d,c.autoClear=f,e.background=_}_textureToCubeUV(e,n){const r=this._renderer,i=e.mapping===uf||e.mapping===$d;i?(this._cubemapMaterial===null&&(this._cubemapMaterial=n6()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=t6());const o=i?this._cubemapMaterial:this._equirectMaterial,a=new Co(this._lodPlanes[0],o),s=o.uniforms;s.envMap.value=e;const l=this._cubeSize;nS(n,0,0,3*l,2*l),r.setRenderTarget(n),r.render(a,m3)}_applyPMREM(e){const n=this._renderer,r=n.autoClear;n.autoClear=!1;for(let i=1;iup&&console.warn(`sigmaRadians, ${o}, is too large and will clip, as it requested ${_} samples when the maximum is set to ${up}`);const v=[];let S=0;for(let D=0;Dw-vg?i-w+vg:0),C=4*(this._cubeSize-E);nS(n,T,C,3*E,2*E),l.setRenderTarget(n),l.render(f,m3)}}function wEe(t){const e=[],n=[],r=[];let i=t;const o=t-vg+1+Zk.length;for(let a=0;at-vg?l=Zk[a-t+vg-1]:a===0&&(l=0),r.push(l);const u=1/(s-2),c=-u,f=1+u,d=[c,c,f,c,f,f,c,c,f,f,c,f],p=6,y=6,x=3,_=2,v=1,S=new Float32Array(x*y*p),w=new Float32Array(_*y*p),E=new Float32Array(v*y*p);for(let C=0;C2?0:-1,P=[D,O,0,D+2/3,O,0,D+2/3,O+1,0,D,O,0,D+2/3,O+1,0,D,O+1,0];S.set(P,x*y*C),w.set(d,_*y*C);const N=[C,C,C,C,C,C];E.set(N,v*y*C)}const T=new Fn;T.setAttribute("position",new xr(S,x)),T.setAttribute("uv",new xr(w,_)),T.setAttribute("faceIndex",new xr(E,v)),e.push(T),i>vg&&i--}return{lodPlanes:e,sizeLods:n,sigmas:r}}function e6(t,e,n){const r=new su(t,e,n);return r.texture.mapping=wv,r.texture.name="PMREM.cubeUv",r.scissorTest=!0,r}function nS(t,e,n,r,i){t.viewport.set(e,n,r,i),t.scissor.set(e,n,r,i)}function SEe(t,e,n){const r=new Float32Array(up),i=new ae(0,1,0);return new nc({name:"SphericalGaussianBlur",defines:{n:up,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${t}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:r},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:E4(),fragmentShader:` +}`,Tn={alphahash_fragment:K_e,alphahash_pars_fragment:Z_e,alphamap_fragment:J_e,alphamap_pars_fragment:Q_e,alphatest_fragment:ewe,alphatest_pars_fragment:twe,aomap_fragment:nwe,aomap_pars_fragment:rwe,begin_vertex:iwe,beginnormal_vertex:owe,bsdfs:awe,iridescence_fragment:swe,bumpmap_pars_fragment:lwe,clipping_planes_fragment:uwe,clipping_planes_pars_fragment:cwe,clipping_planes_pars_vertex:fwe,clipping_planes_vertex:dwe,color_fragment:hwe,color_pars_fragment:pwe,color_pars_vertex:mwe,color_vertex:gwe,common:vwe,cube_uv_reflection_fragment:ywe,defaultnormal_vertex:xwe,displacementmap_pars_vertex:bwe,displacementmap_vertex:_we,emissivemap_fragment:wwe,emissivemap_pars_fragment:Swe,colorspace_fragment:Ewe,colorspace_pars_fragment:Mwe,envmap_fragment:Cwe,envmap_common_pars_fragment:Awe,envmap_pars_fragment:Twe,envmap_pars_vertex:Dwe,envmap_physical_pars_fragment:$we,envmap_vertex:Rwe,fog_vertex:Pwe,fog_pars_vertex:Nwe,fog_fragment:Owe,fog_pars_fragment:Iwe,gradientmap_pars_fragment:Fwe,lightmap_fragment:Lwe,lightmap_pars_fragment:kwe,lights_lambert_fragment:Bwe,lights_lambert_pars_fragment:Uwe,lights_pars_begin:zwe,lights_toon_fragment:Hwe,lights_toon_pars_fragment:Vwe,lights_phong_fragment:Wwe,lights_phong_pars_fragment:Gwe,lights_physical_fragment:jwe,lights_physical_pars_fragment:qwe,lights_fragment_begin:Xwe,lights_fragment_maps:Ywe,lights_fragment_end:Kwe,logdepthbuf_fragment:Zwe,logdepthbuf_pars_fragment:Jwe,logdepthbuf_pars_vertex:Qwe,logdepthbuf_vertex:eSe,map_fragment:tSe,map_pars_fragment:nSe,map_particle_fragment:rSe,map_particle_pars_fragment:iSe,metalnessmap_fragment:oSe,metalnessmap_pars_fragment:aSe,morphcolor_vertex:sSe,morphnormal_vertex:lSe,morphtarget_pars_vertex:uSe,morphtarget_vertex:cSe,normal_fragment_begin:fSe,normal_fragment_maps:dSe,normal_pars_fragment:hSe,normal_pars_vertex:pSe,normal_vertex:mSe,normalmap_pars_fragment:gSe,clearcoat_normal_fragment_begin:vSe,clearcoat_normal_fragment_maps:ySe,clearcoat_pars_fragment:xSe,iridescence_pars_fragment:bSe,opaque_fragment:_Se,packing:wSe,premultiplied_alpha_fragment:SSe,project_vertex:ESe,dithering_fragment:MSe,dithering_pars_fragment:CSe,roughnessmap_fragment:ASe,roughnessmap_pars_fragment:TSe,shadowmap_pars_fragment:DSe,shadowmap_pars_vertex:RSe,shadowmap_vertex:PSe,shadowmask_pars_fragment:NSe,skinbase_vertex:OSe,skinning_pars_vertex:ISe,skinning_vertex:FSe,skinnormal_vertex:LSe,specularmap_fragment:kSe,specularmap_pars_fragment:BSe,tonemapping_fragment:USe,tonemapping_pars_fragment:zSe,transmission_fragment:$Se,transmission_pars_fragment:HSe,uv_pars_fragment:VSe,uv_pars_vertex:WSe,uv_vertex:GSe,worldpos_vertex:jSe,background_vert:qSe,background_frag:XSe,backgroundCube_vert:YSe,backgroundCube_frag:KSe,cube_vert:ZSe,cube_frag:JSe,depth_vert:QSe,depth_frag:eEe,distanceRGBA_vert:tEe,distanceRGBA_frag:nEe,equirect_vert:rEe,equirect_frag:iEe,linedashed_vert:oEe,linedashed_frag:aEe,meshbasic_vert:sEe,meshbasic_frag:lEe,meshlambert_vert:uEe,meshlambert_frag:cEe,meshmatcap_vert:fEe,meshmatcap_frag:dEe,meshnormal_vert:hEe,meshnormal_frag:pEe,meshphong_vert:mEe,meshphong_frag:gEe,meshphysical_vert:vEe,meshphysical_frag:yEe,meshtoon_vert:xEe,meshtoon_frag:bEe,points_vert:_Ee,points_frag:wEe,shadow_vert:SEe,shadow_frag:EEe,sprite_vert:MEe,sprite_frag:CEe},St={common:{diffuse:{value:new Pt(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new On},alphaMap:{value:null},alphaMapTransform:{value:new On},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new On}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new On}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new On}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new On},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new On},normalScale:{value:new Je(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new On},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new On}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new On}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new On}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Pt(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{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 Pt(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new On},alphaTest:{value:0},uvTransform:{value:new On}},sprite:{diffuse:{value:new Pt(16777215)},opacity:{value:1},center:{value:new Je(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new On},alphaMap:{value:null},alphaMapTransform:{value:new On},alphaTest:{value:0}}},Xl={basic:{uniforms:pa([St.common,St.specularmap,St.envmap,St.aomap,St.lightmap,St.fog]),vertexShader:Tn.meshbasic_vert,fragmentShader:Tn.meshbasic_frag},lambert:{uniforms:pa([St.common,St.specularmap,St.envmap,St.aomap,St.lightmap,St.emissivemap,St.bumpmap,St.normalmap,St.displacementmap,St.fog,St.lights,{emissive:{value:new Pt(0)}}]),vertexShader:Tn.meshlambert_vert,fragmentShader:Tn.meshlambert_frag},phong:{uniforms:pa([St.common,St.specularmap,St.envmap,St.aomap,St.lightmap,St.emissivemap,St.bumpmap,St.normalmap,St.displacementmap,St.fog,St.lights,{emissive:{value:new Pt(0)},specular:{value:new Pt(1118481)},shininess:{value:30}}]),vertexShader:Tn.meshphong_vert,fragmentShader:Tn.meshphong_frag},standard:{uniforms:pa([St.common,St.envmap,St.aomap,St.lightmap,St.emissivemap,St.bumpmap,St.normalmap,St.displacementmap,St.roughnessmap,St.metalnessmap,St.fog,St.lights,{emissive:{value:new Pt(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Tn.meshphysical_vert,fragmentShader:Tn.meshphysical_frag},toon:{uniforms:pa([St.common,St.aomap,St.lightmap,St.emissivemap,St.bumpmap,St.normalmap,St.displacementmap,St.gradientmap,St.fog,St.lights,{emissive:{value:new Pt(0)}}]),vertexShader:Tn.meshtoon_vert,fragmentShader:Tn.meshtoon_frag},matcap:{uniforms:pa([St.common,St.bumpmap,St.normalmap,St.displacementmap,St.fog,{matcap:{value:null}}]),vertexShader:Tn.meshmatcap_vert,fragmentShader:Tn.meshmatcap_frag},points:{uniforms:pa([St.points,St.fog]),vertexShader:Tn.points_vert,fragmentShader:Tn.points_frag},dashed:{uniforms:pa([St.common,St.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Tn.linedashed_vert,fragmentShader:Tn.linedashed_frag},depth:{uniforms:pa([St.common,St.displacementmap]),vertexShader:Tn.depth_vert,fragmentShader:Tn.depth_frag},normal:{uniforms:pa([St.common,St.bumpmap,St.normalmap,St.displacementmap,{opacity:{value:1}}]),vertexShader:Tn.meshnormal_vert,fragmentShader:Tn.meshnormal_frag},sprite:{uniforms:pa([St.sprite,St.fog]),vertexShader:Tn.sprite_vert,fragmentShader:Tn.sprite_frag},background:{uniforms:{uvTransform:{value:new On},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Tn.background_vert,fragmentShader:Tn.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:Tn.backgroundCube_vert,fragmentShader:Tn.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Tn.cube_vert,fragmentShader:Tn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Tn.equirect_vert,fragmentShader:Tn.equirect_frag},distanceRGBA:{uniforms:pa([St.common,St.displacementmap,{referencePosition:{value:new ae},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Tn.distanceRGBA_vert,fragmentShader:Tn.distanceRGBA_frag},shadow:{uniforms:pa([St.lights,St.fog,{color:{value:new Pt(0)},opacity:{value:1}}]),vertexShader:Tn.shadow_vert,fragmentShader:Tn.shadow_frag}};Xl.physical={uniforms:pa([Xl.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new On},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new On},clearcoatNormalScale:{value:new Je(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new On},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new On},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new On},sheen:{value:0},sheenColor:{value:new Pt(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new On},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new On},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new On},transmissionSamplerSize:{value:new Je},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new On},attenuationDistance:{value:0},attenuationColor:{value:new Pt(0)},specularColor:{value:new Pt(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new On},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new On},anisotropyVector:{value:new Je},anisotropyMap:{value:null},anisotropyMapTransform:{value:new On}}]),vertexShader:Tn.meshphysical_vert,fragmentShader:Tn.meshphysical_frag};const tS={r:0,b:0,g:0};function AEe(t,e,n,r,i,o,a){const s=new Pt(0);let l=o===!0?0:1,u,c,f=null,d=0,p=null;function y(_,v){let S=!1,w=v.isScene===!0?v.background:null;w&&w.isTexture&&(w=(v.backgroundBlurriness>0?n:e).get(w)),w===null?x(s,l):w&&w.isColor&&(x(w,1),S=!0);const E=t.xr.getEnvironmentBlendMode();E==="additive"?r.buffers.color.setClear(0,0,0,1,a):E==="alpha-blend"&&r.buffers.color.setClear(0,0,0,0,a),(t.autoClear||S)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),w&&(w.isCubeTexture||w.mapping===Mv)?(c===void 0&&(c=new Co(new rm(1,1,1),new tc({name:"BackgroundCubeMaterial",uniforms:uv(Xl.backgroundCube.uniforms),vertexShader:Xl.backgroundCube.vertexShader,fragmentShader:Xl.backgroundCube.fragmentShader,side:Sa,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),c.geometry.deleteAttribute("uv"),c.onBeforeRender=function(T,C,D){this.matrixWorld.copyPosition(D.matrixWorld)},Object.defineProperty(c.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(c)),c.material.uniforms.envMap.value=w,c.material.uniforms.flipEnvMap.value=w.isCubeTexture&&w.isRenderTargetTexture===!1?-1:1,c.material.uniforms.backgroundBlurriness.value=v.backgroundBlurriness,c.material.uniforms.backgroundIntensity.value=v.backgroundIntensity,c.material.toneMapped=ar.getTransfer(w.colorSpace)!==Er,(f!==w||d!==w.version||p!==t.toneMapping)&&(c.material.needsUpdate=!0,f=w,d=w.version,p=t.toneMapping),c.layers.enableAll(),_.unshift(c,c.geometry,c.material,0,0,null)):w&&w.isTexture&&(u===void 0&&(u=new Co(new Ib(2,2),new tc({name:"BackgroundMaterial",uniforms:uv(Xl.background.uniforms),vertexShader:Xl.background.vertexShader,fragmentShader:Xl.background.fragmentShader,side:uf,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),Object.defineProperty(u.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(u)),u.material.uniforms.t2D.value=w,u.material.uniforms.backgroundIntensity.value=v.backgroundIntensity,u.material.toneMapped=ar.getTransfer(w.colorSpace)!==Er,w.matrixAutoUpdate===!0&&w.updateMatrix(),u.material.uniforms.uvTransform.value.copy(w.matrix),(f!==w||d!==w.version||p!==t.toneMapping)&&(u.material.needsUpdate=!0,f=w,d=w.version,p=t.toneMapping),u.layers.enableAll(),_.unshift(u,u.geometry,u.material,0,0,null))}function x(_,v){_.getRGB(tS,mG(t)),r.buffers.color.setClear(tS.r,tS.g,tS.b,v,a)}return{getClearColor:function(){return s},setClearColor:function(_,v=1){s.set(_),l=v,x(s,l)},getClearAlpha:function(){return l},setClearAlpha:function(_){l=_,x(s,l)},render:y}}function TEe(t,e,n,r){const i=t.getParameter(t.MAX_VERTEX_ATTRIBS),o=r.isWebGL2?null:e.get("OES_vertex_array_object"),a=r.isWebGL2||o!==null,s={},l=_(null);let u=l,c=!1;function f(j,K,Y,$,W){let U=!1;if(a){const te=x($,Y,K);u!==te&&(u=te,p(u.object)),U=v(j,$,Y,W),U&&S(j,$,Y,W)}else{const te=K.wireframe===!0;(u.geometry!==$.id||u.program!==Y.id||u.wireframe!==te)&&(u.geometry=$.id,u.program=Y.id,u.wireframe=te,U=!0)}W!==null&&n.update(W,t.ELEMENT_ARRAY_BUFFER),(U||c)&&(c=!1,O(j,K,Y,$),W!==null&&t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,n.get(W).buffer))}function d(){return r.isWebGL2?t.createVertexArray():o.createVertexArrayOES()}function p(j){return r.isWebGL2?t.bindVertexArray(j):o.bindVertexArrayOES(j)}function y(j){return r.isWebGL2?t.deleteVertexArray(j):o.deleteVertexArrayOES(j)}function x(j,K,Y){const $=Y.wireframe===!0;let W=s[j.id];W===void 0&&(W={},s[j.id]=W);let U=W[K.id];U===void 0&&(U={},W[K.id]=U);let te=U[$];return te===void 0&&(te=_(d()),U[$]=te),te}function _(j){const K=[],Y=[],$=[];for(let W=0;W=0){const Ce=W[le];let Re=U[le];if(Re===void 0&&(le==="instanceMatrix"&&j.instanceMatrix&&(Re=j.instanceMatrix),le==="instanceColor"&&j.instanceColor&&(Re=j.instanceColor)),Ce===void 0||Ce.attribute!==Re||Re&&Ce.data!==Re.data)return!0;te++}return u.attributesNum!==te||u.index!==$}function S(j,K,Y,$){const W={},U=K.attributes;let te=0;const re=Y.getAttributes();for(const le in re)if(re[le].location>=0){let Ce=U[le];Ce===void 0&&(le==="instanceMatrix"&&j.instanceMatrix&&(Ce=j.instanceMatrix),le==="instanceColor"&&j.instanceColor&&(Ce=j.instanceColor));const Re={};Re.attribute=Ce,Ce&&Ce.data&&(Re.data=Ce.data),W[le]=Re,te++}u.attributes=W,u.attributesNum=te,u.index=$}function w(){const j=u.newAttributes;for(let K=0,Y=j.length;K=0){let ce=W[re];if(ce===void 0&&(re==="instanceMatrix"&&j.instanceMatrix&&(ce=j.instanceMatrix),re==="instanceColor"&&j.instanceColor&&(ce=j.instanceColor)),ce!==void 0){const Ce=ce.normalized,Re=ce.itemSize,Ie=n.get(ce);if(Ie===void 0)continue;const He=Ie.buffer,tt=Ie.type,Qe=Ie.bytesPerElement,ct=r.isWebGL2===!0&&(tt===t.INT||tt===t.UNSIGNED_INT||ce.gpuType===f4);if(ce.isInterleavedBufferAttribute){const Xe=ce.data,ue=Xe.stride,De=ce.offset;if(Xe.isInstancedInterleavedBuffer){for(let Ee=0;Ee0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";D="mediump"}return D==="mediump"&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const a=typeof WebGL2RenderingContext<"u"&&t.constructor.name==="WebGL2RenderingContext";let s=n.precision!==void 0?n.precision:"highp";const l=o(s);l!==s&&(console.warn("THREE.WebGLRenderer:",s,"not supported, using",l,"instead."),s=l);const u=a||e.has("WEBGL_draw_buffers"),c=n.logarithmicDepthBuffer===!0,f=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),d=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),p=t.getParameter(t.MAX_TEXTURE_SIZE),y=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),x=t.getParameter(t.MAX_VERTEX_ATTRIBS),_=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),v=t.getParameter(t.MAX_VARYING_VECTORS),S=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),w=d>0,E=a||e.has("OES_texture_float"),T=w&&E,C=a?t.getParameter(t.MAX_SAMPLES):0;return{isWebGL2:a,drawBuffers:u,getMaxAnisotropy:i,getMaxPrecision:o,precision:s,logarithmicDepthBuffer:c,maxTextures:f,maxVertexTextures:d,maxTextureSize:p,maxCubemapSize:y,maxAttributes:x,maxVertexUniforms:_,maxVaryings:v,maxFragmentUniforms:S,vertexTextures:w,floatFragmentTextures:E,floatVertexTextures:T,maxSamples:C}}function PEe(t){const e=this;let n=null,r=0,i=!1,o=!1;const a=new dd,s=new On,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(f,d){const p=f.length!==0||d||r!==0||i;return i=d,r=f.length,p},this.beginShadows=function(){o=!0,c(null)},this.endShadows=function(){o=!1},this.setGlobalState=function(f,d){n=c(f,d,0)},this.setState=function(f,d,p){const y=f.clippingPlanes,x=f.clipIntersection,_=f.clipShadows,v=t.get(f);if(!i||y===null||y.length===0||o&&!_)o?c(null):u();else{const S=o?0:r,w=S*4;let E=v.clippingState||null;l.value=E,E=c(y,d,w,p);for(let T=0;T!==w;++T)E[T]=n[T];v.clippingState=E,this.numIntersection=x?this.numPlanes:0,this.numPlanes+=S}};function u(){l.value!==n&&(l.value=n,l.needsUpdate=r>0),e.numPlanes=r,e.numIntersection=0}function c(f,d,p,y){const x=f!==null?f.length:0;let _=null;if(x!==0){if(_=l.value,y!==!0||_===null){const v=p+x*4,S=d.matrixWorldInverse;s.getNormalMatrix(S),(_===null||_.length0){const u=new yG(l.height/2);return u.fromEquirectangularTexture(t,a),e.set(a,u),a.addEventListener("dispose",i),n(u.texture,a.mapping)}else return null}}return a}function i(a){const s=a.target;s.removeEventListener("dispose",i);const l=e.get(s);l!==void 0&&(e.delete(s),l.dispose())}function o(){e=new WeakMap}return{get:r,dispose:o}}class Fb extends Nb{constructor(e=-1,n=1,r=1,i=-1,o=.1,a=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=n,this.top=r,this.bottom=i,this.near=o,this.far=a,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),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,n,r,i,o,a){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=n,this.view.offsetX=r,this.view.offsetY=i,this.view.width=o,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),n=(this.top-this.bottom)/(2*this.zoom),r=(this.right+this.left)/2,i=(this.top+this.bottom)/2;let o=r-e,a=r+e,s=i+n,l=i-n;if(this.view!==null&&this.view.enabled){const u=(this.right-this.left)/this.view.fullWidth/this.zoom,c=(this.top-this.bottom)/this.view.fullHeight/this.zoom;o+=u*this.view.offsetX,a=o+u*this.view.width,s-=c*this.view.offsetY,l=s-c*this.view.height}this.projectionMatrix.makeOrthographic(o,a,s,l,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.zoom=this.zoom,n.object.left=this.left,n.object.right=this.right,n.object.top=this.top,n.object.bottom=this.bottom,n.object.near=this.near,n.object.far=this.far,this.view!==null&&(n.object.view=Object.assign({},this.view)),n}}const yg=4,e6=[.125,.215,.35,.446,.526,.582],cp=20,v3=new Fb,t6=new Pt;let y3=null,x3=0,b3=0;const ap=(1+Math.sqrt(5))/2,w0=1/ap,n6=[new ae(1,1,1),new ae(-1,1,1),new ae(1,1,-1),new ae(-1,1,-1),new ae(0,ap,w0),new ae(0,ap,-w0),new ae(w0,0,ap),new ae(-w0,0,ap),new ae(ap,w0,0),new ae(-ap,w0,0)];class EP{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,n=0,r=.1,i=100){y3=this._renderer.getRenderTarget(),x3=this._renderer.getActiveCubeFace(),b3=this._renderer.getActiveMipmapLevel(),this._setSize(256);const o=this._allocateTargets();return o.depthBuffer=!0,this._sceneToCubeUV(e,r,i,o),n>0&&this._blur(o,0,0,n),this._applyPMREM(o),this._cleanup(o),o}fromEquirectangular(e,n=null){return this._fromTexture(e,n)}fromCubemap(e,n=null){return this._fromTexture(e,n)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=o6(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=i6(),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;e2?w:0,w,w),c.setRenderTarget(i),x&&c.render(y,s),c.render(e,s)}y.geometry.dispose(),y.material.dispose(),c.toneMapping=d,c.autoClear=f,e.background=_}_textureToCubeUV(e,n){const r=this._renderer,i=e.mapping===cf||e.mapping===Hd;i?(this._cubemapMaterial===null&&(this._cubemapMaterial=o6()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=i6());const o=i?this._cubemapMaterial:this._equirectMaterial,a=new Co(this._lodPlanes[0],o),s=o.uniforms;s.envMap.value=e;const l=this._cubeSize;nS(n,0,0,3*l,2*l),r.setRenderTarget(n),r.render(a,v3)}_applyPMREM(e){const n=this._renderer,r=n.autoClear;n.autoClear=!1;for(let i=1;icp&&console.warn(`sigmaRadians, ${o}, is too large and will clip, as it requested ${_} samples when the maximum is set to ${cp}`);const v=[];let S=0;for(let D=0;Dw-yg?i-w+yg:0),C=4*(this._cubeSize-E);nS(n,T,C,3*E,2*E),l.setRenderTarget(n),l.render(f,v3)}}function OEe(t){const e=[],n=[],r=[];let i=t;const o=t-yg+1+e6.length;for(let a=0;at-yg?l=e6[a-t+yg-1]:a===0&&(l=0),r.push(l);const u=1/(s-2),c=-u,f=1+u,d=[c,c,f,c,f,f,c,c,f,f,c,f],p=6,y=6,x=3,_=2,v=1,S=new Float32Array(x*y*p),w=new Float32Array(_*y*p),E=new Float32Array(v*y*p);for(let C=0;C2?0:-1,P=[D,O,0,D+2/3,O,0,D+2/3,O+1,0,D,O,0,D+2/3,O+1,0,D,O+1,0];S.set(P,x*y*C),w.set(d,_*y*C);const N=[C,C,C,C,C,C];E.set(N,v*y*C)}const T=new In;T.setAttribute("position",new xr(S,x)),T.setAttribute("uv",new xr(w,_)),T.setAttribute("faceIndex",new xr(E,v)),e.push(T),i>yg&&i--}return{lodPlanes:e,sizeLods:n,sigmas:r}}function r6(t,e,n){const r=new au(t,e,n);return r.texture.mapping=Mv,r.texture.name="PMREM.cubeUv",r.scissorTest=!0,r}function nS(t,e,n,r,i){t.viewport.set(e,n,r,i),t.scissor.set(e,n,r,i)}function IEe(t,e,n){const r=new Float32Array(cp),i=new ae(0,1,0);return new tc({name:"SphericalGaussianBlur",defines:{n:cp,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${t}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:r},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:M4(),fragmentShader:` precision mediump float; precision mediump int; @@ -3642,7 +3642,7 @@ void main() { } } - `,blending:Jc,depthTest:!1,depthWrite:!1})}function t6(){return new nc({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:E4(),fragmentShader:` + `,blending:Qc,depthTest:!1,depthWrite:!1})}function i6(){return new tc({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:M4(),fragmentShader:` precision mediump float; precision mediump int; @@ -3661,7 +3661,7 @@ void main() { gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); } - `,blending:Jc,depthTest:!1,depthWrite:!1})}function n6(){return new nc({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:E4(),fragmentShader:` + `,blending:Qc,depthTest:!1,depthWrite:!1})}function o6(){return new tc({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:M4(),fragmentShader:` precision mediump float; precision mediump int; @@ -3677,7 +3677,7 @@ void main() { gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); } - `,blending:Jc,depthTest:!1,depthWrite:!1})}function E4(){return` + `,blending:Qc,depthTest:!1,depthWrite:!1})}function M4(){return` precision mediump float; precision mediump int; @@ -3732,39 +3732,39 @@ void main() { gl_Position = vec4( position, 1.0 ); } - `}function EEe(t){let e=new WeakMap,n=null;function r(s){if(s&&s.isTexture){const l=s.mapping,u=l===Ix||l===Fx,c=l===uf||l===$d;if(u||c)if(s.isRenderTargetTexture&&s.needsPMREMUpdate===!0){s.needsPMREMUpdate=!1;let f=e.get(s);return n===null&&(n=new wP(t)),f=u?n.fromEquirectangular(s,f):n.fromCubemap(s,f),e.set(s,f),f.texture}else{if(e.has(s))return e.get(s).texture;{const f=s.image;if(u&&f&&f.height>0||c&&f&&i(f)){n===null&&(n=new wP(t));const d=u?n.fromEquirectangular(s):n.fromCubemap(s);return e.set(s,d),s.addEventListener("dispose",o),d.texture}else return null}}}return s}function i(s){let l=0;const u=6;for(let c=0;ce.maxTextureSize&&(k=Math.ceil(N/e.maxTextureSize),N=e.maxTextureSize);const G=new Float32Array(N*k*4*x),Z=new EC(G,N,k,x);Z.type=eu,Z.needsUpdate=!0;const j=P*4;for(let Y=0;Y0)return t;const i=e*n;let o=r6[i];if(o===void 0&&(o=new Float32Array(i),r6[i]=o),e!==0){r.toArray(o,0);for(let a=1,s=0;a!==e;++a)s+=n,t[a].toArray(o,s)}return o}function Gi(t,e){if(t.length!==e.length)return!1;for(let n=0,r=t.length;n0||c&&f&&i(f)){n===null&&(n=new EP(t));const d=u?n.fromEquirectangular(s):n.fromCubemap(s);return e.set(s,d),s.addEventListener("dispose",o),d.texture}else return null}}}return s}function i(s){let l=0;const u=6;for(let c=0;ce.maxTextureSize&&(k=Math.ceil(N/e.maxTextureSize),N=e.maxTextureSize);const G=new Float32Array(N*k*4*x),Z=new MC(G,N,k,x);Z.type=Ql,Z.needsUpdate=!0;const j=P*4;for(let Y=0;Y0)return t;const i=e*n;let o=a6[i];if(o===void 0&&(o=new Float32Array(i),a6[i]=o),e!==0){r.toArray(o,0);for(let a=1,s=0;a!==e;++a)s+=n,t[a].toArray(o,s)}return o}function ji(t,e){if(t.length!==e.length)return!1;for(let n=0,r=t.length;n":" "} ${s}: ${n[a]}`)}return r.join(` -`)}function C2e(t){const e=ar.getPrimaries(ar.workingColorSpace),n=ar.getPrimaries(t);let r;switch(e===n?r="":e===Vx&&n===Hx?r="LinearDisplayP3ToLinearSRGB":e===Hx&&n===Vx&&(r="LinearSRGBToLinearDisplayP3"),t){case tc:case Db:return[r,"LinearTransferOETF"];case Hi:case SC:return[r,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",t),[r,"LinearTransferOETF"]}}function c6(t,e,n){const r=t.getShaderParameter(e,t.COMPILE_STATUS),i=t.getShaderInfoLog(e).trim();if(r&&i==="")return"";const o=/ERROR: 0:(\d+)/.exec(i);if(o){const a=parseInt(o[1]);return n.toUpperCase()+` +`)}function k2e(t){const e=ar.getPrimaries(ar.workingColorSpace),n=ar.getPrimaries(t);let r;switch(e===n?r="":e===Wx&&n===Vx?r="LinearDisplayP3ToLinearSRGB":e===Vx&&n===Wx&&(r="LinearSRGBToLinearDisplayP3"),t){case ec:case Rb:return[r,"LinearTransferOETF"];case Hi:case EC:return[r,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",t),[r,"LinearTransferOETF"]}}function h6(t,e,n){const r=t.getShaderParameter(e,t.COMPILE_STATUS),i=t.getShaderInfoLog(e).trim();if(r&&i==="")return"";const o=/ERROR: 0:(\d+)/.exec(i);if(o){const a=parseInt(o[1]);return n.toUpperCase()+` `+i+` -`+M2e(t.getShaderSource(e),a)}else return i}function A2e(t,e){const n=C2e(e);return`vec4 ${t}( vec4 value ) { return ${n[0]}( ${n[1]}( value ) ); }`}function T2e(t,e){let n;switch(e){case RW:n="Linear";break;case PW:n="Reinhard";break;case NW:n="OptimizedCineon";break;case l4:n="ACESFilmic";break;case OW:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),n="Linear"}return"vec3 "+t+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}function D2e(t){return[t.extensionDerivatives||t.envMapCubeUVHeight||t.bumpMap||t.normalMapTangentSpace||t.clearcoatNormalMap||t.flatShading||t.shaderID==="physical"?"#extension GL_OES_standard_derivatives : enable":"",(t.extensionFragDepth||t.logarithmicDepthBuffer)&&t.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",t.extensionDrawBuffers&&t.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(t.extensionShaderTextureLOD||t.envMap||t.transmission)&&t.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(b1).join(` -`)}function R2e(t){const e=[];for(const n in t){const r=t[n];r!==!1&&e.push("#define "+n+" "+r)}return e.join(` -`)}function P2e(t,e){const n={},r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES);for(let i=0;i/gm;function SP(t){return t.replace(N2e,I2e)}const O2e=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function I2e(t,e){let n=Dn[e];if(n===void 0){const r=O2e.get(e);if(r!==void 0)n=Dn[r],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,r);else throw new Error("Can not resolve #include <"+e+">")}return SP(n)}const F2e=/#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 h6(t){return t.replace(F2e,L2e)}function L2e(t,e,n,r){let i="";for(let o=parseInt(e);o/gm;function MP(t){return t.replace(V2e,G2e)}const W2e=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function G2e(t,e){let n=Tn[e];if(n===void 0){const r=W2e.get(e);if(r!==void 0)n=Tn[r],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,r);else throw new Error("Can not resolve #include <"+e+">")}return MP(n)}const j2e=/#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 g6(t){return t.replace(j2e,q2e)}function q2e(t,e,n,r){let i="";for(let o=parseInt(e);o0&&(_+=` -`),v=[p,"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,y].filter(b1).join(` +`),v=[p,"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,y].filter(S1).join(` `),v.length>0&&(v+=` -`)):(_=[p6(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,y,n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+c:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.displacementMap?"#define USE_DISPLACEMENTMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.mapUv?"#define MAP_UV "+n.mapUv:"",n.alphaMapUv?"#define ALPHAMAP_UV "+n.alphaMapUv:"",n.lightMapUv?"#define LIGHTMAP_UV "+n.lightMapUv:"",n.aoMapUv?"#define AOMAP_UV "+n.aoMapUv:"",n.emissiveMapUv?"#define EMISSIVEMAP_UV "+n.emissiveMapUv:"",n.bumpMapUv?"#define BUMPMAP_UV "+n.bumpMapUv:"",n.normalMapUv?"#define NORMALMAP_UV "+n.normalMapUv:"",n.displacementMapUv?"#define DISPLACEMENTMAP_UV "+n.displacementMapUv:"",n.metalnessMapUv?"#define METALNESSMAP_UV "+n.metalnessMapUv:"",n.roughnessMapUv?"#define ROUGHNESSMAP_UV "+n.roughnessMapUv:"",n.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+n.anisotropyMapUv:"",n.clearcoatMapUv?"#define CLEARCOATMAP_UV "+n.clearcoatMapUv:"",n.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+n.clearcoatNormalMapUv:"",n.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+n.clearcoatRoughnessMapUv:"",n.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+n.iridescenceMapUv:"",n.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+n.iridescenceThicknessMapUv:"",n.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+n.sheenColorMapUv:"",n.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+n.sheenRoughnessMapUv:"",n.specularMapUv?"#define SPECULARMAP_UV "+n.specularMapUv:"",n.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+n.specularColorMapUv:"",n.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+n.specularIntensityMapUv:"",n.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+n.transmissionMapUv:"",n.thicknessMapUv?"#define THICKNESSMAP_UV "+n.thicknessMapUv:"",n.vertexTangents&&n.flatShading===!1?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&n.flatShading===!1?"#define USE_MORPHNORMALS":"",n.morphColors&&n.isWebGL2?"#define USE_MORPHCOLORS":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+n.morphTextureStride:"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_COUNT "+n.morphTargetsCount:"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.useLegacyLights?"#define LEGACY_LIGHTS":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","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","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","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` -`].filter(b1).join(` -`),v=[p,p6(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,y,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+u:"",n.envMap?"#define "+c:"",n.envMap?"#define "+f:"",d?"#define CUBEUV_TEXEL_WIDTH "+d.texelWidth:"",d?"#define CUBEUV_TEXEL_HEIGHT "+d.texelHeight:"",d?"#define CUBEUV_MAX_MIP "+d.maxMip+".0":"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescence?"#define USE_IRIDESCENCE":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents&&n.flatShading===!1?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.useLegacyLights?"#define LEGACY_LIGHTS":"",n.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==qu?"#define TONE_MAPPING":"",n.toneMapping!==qu?Dn.tonemapping_pars_fragment:"",n.toneMapping!==qu?T2e("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",Dn.colorspace_pars_fragment,A2e("linearToOutputTexel",n.outputColorSpace),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"",` -`].filter(b1).join(` -`)),a=SP(a),a=f6(a,n),a=d6(a,n),s=SP(s),s=f6(s,n),s=d6(s,n),a=h6(a),s=h6(s),n.isWebGL2&&n.isRawShaderMaterial!==!0&&(S=`#version 300 es +`)):(_=[v6(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,y,n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+c:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.displacementMap?"#define USE_DISPLACEMENTMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.mapUv?"#define MAP_UV "+n.mapUv:"",n.alphaMapUv?"#define ALPHAMAP_UV "+n.alphaMapUv:"",n.lightMapUv?"#define LIGHTMAP_UV "+n.lightMapUv:"",n.aoMapUv?"#define AOMAP_UV "+n.aoMapUv:"",n.emissiveMapUv?"#define EMISSIVEMAP_UV "+n.emissiveMapUv:"",n.bumpMapUv?"#define BUMPMAP_UV "+n.bumpMapUv:"",n.normalMapUv?"#define NORMALMAP_UV "+n.normalMapUv:"",n.displacementMapUv?"#define DISPLACEMENTMAP_UV "+n.displacementMapUv:"",n.metalnessMapUv?"#define METALNESSMAP_UV "+n.metalnessMapUv:"",n.roughnessMapUv?"#define ROUGHNESSMAP_UV "+n.roughnessMapUv:"",n.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+n.anisotropyMapUv:"",n.clearcoatMapUv?"#define CLEARCOATMAP_UV "+n.clearcoatMapUv:"",n.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+n.clearcoatNormalMapUv:"",n.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+n.clearcoatRoughnessMapUv:"",n.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+n.iridescenceMapUv:"",n.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+n.iridescenceThicknessMapUv:"",n.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+n.sheenColorMapUv:"",n.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+n.sheenRoughnessMapUv:"",n.specularMapUv?"#define SPECULARMAP_UV "+n.specularMapUv:"",n.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+n.specularColorMapUv:"",n.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+n.specularIntensityMapUv:"",n.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+n.transmissionMapUv:"",n.thicknessMapUv?"#define THICKNESSMAP_UV "+n.thicknessMapUv:"",n.vertexTangents&&n.flatShading===!1?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&n.flatShading===!1?"#define USE_MORPHNORMALS":"",n.morphColors&&n.isWebGL2?"#define USE_MORPHCOLORS":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+n.morphTextureStride:"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_COUNT "+n.morphTargetsCount:"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.useLegacyLights?"#define LEGACY_LIGHTS":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","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","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","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` +`].filter(S1).join(` +`),v=[p,v6(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,y,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+u:"",n.envMap?"#define "+c:"",n.envMap?"#define "+f:"",d?"#define CUBEUV_TEXEL_WIDTH "+d.texelWidth:"",d?"#define CUBEUV_TEXEL_HEIGHT "+d.texelHeight:"",d?"#define CUBEUV_MAX_MIP "+d.maxMip+".0":"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescence?"#define USE_IRIDESCENCE":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents&&n.flatShading===!1?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.useLegacyLights?"#define LEGACY_LIGHTS":"",n.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==ju?"#define TONE_MAPPING":"",n.toneMapping!==ju?Tn.tonemapping_pars_fragment:"",n.toneMapping!==ju?U2e("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",Tn.colorspace_pars_fragment,B2e("linearToOutputTexel",n.outputColorSpace),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"",` +`].filter(S1).join(` +`)),a=MP(a),a=p6(a,n),a=m6(a,n),s=MP(s),s=p6(s,n),s=m6(s,n),a=g6(a),s=g6(s),n.isWebGL2&&n.isRawShaderMaterial!==!0&&(S=`#version 300 es `,_=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join(` `)+` -`+_,v=["precision mediump sampler2DArray;","#define varying in",n.glslVersion===bP?"":"layout(location = 0) out highp vec4 pc_fragColor;",n.glslVersion===bP?"":"#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(` +`+_,v=["precision mediump sampler2DArray;","#define varying in",n.glslVersion===wP?"":"layout(location = 0) out highp vec4 pc_fragColor;",n.glslVersion===wP?"":"#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(` `)+` -`+v);const w=S+_+a,E=S+v+s,T=u6(i,i.VERTEX_SHADER,w),C=u6(i,i.FRAGMENT_SHADER,E);i.attachShader(x,T),i.attachShader(x,C),n.index0AttributeName!==void 0?i.bindAttribLocation(x,0,n.index0AttributeName):n.morphTargets===!0&&i.bindAttribLocation(x,0,"position"),i.linkProgram(x);function D(k){if(t.debug.checkShaderErrors){const G=i.getProgramInfoLog(x).trim(),Z=i.getShaderInfoLog(T).trim(),j=i.getShaderInfoLog(C).trim();let K=!0,Y=!0;if(i.getProgramParameter(x,i.LINK_STATUS)===!1)if(K=!1,typeof t.debug.onShaderError=="function")t.debug.onShaderError(i,x,T,C);else{const $=c6(i,T,"vertex"),W=c6(i,C,"fragment");console.error("THREE.WebGLProgram: Shader Error "+i.getError()+" - VALIDATE_STATUS "+i.getProgramParameter(x,i.VALIDATE_STATUS)+` +`+v);const w=S+_+a,E=S+v+s,T=d6(i,i.VERTEX_SHADER,w),C=d6(i,i.FRAGMENT_SHADER,E);i.attachShader(x,T),i.attachShader(x,C),n.index0AttributeName!==void 0?i.bindAttribLocation(x,0,n.index0AttributeName):n.morphTargets===!0&&i.bindAttribLocation(x,0,"position"),i.linkProgram(x);function D(k){if(t.debug.checkShaderErrors){const G=i.getProgramInfoLog(x).trim(),Z=i.getShaderInfoLog(T).trim(),j=i.getShaderInfoLog(C).trim();let K=!0,Y=!0;if(i.getProgramParameter(x,i.LINK_STATUS)===!1)if(K=!1,typeof t.debug.onShaderError=="function")t.debug.onShaderError(i,x,T,C);else{const $=h6(i,T,"vertex"),W=h6(i,C,"fragment");console.error("THREE.WebGLProgram: Shader Error "+i.getError()+" - VALIDATE_STATUS "+i.getProgramParameter(x,i.VALIDATE_STATUS)+` Program Info Log: `+G+` `+$+` -`+W)}else G!==""?console.warn("THREE.WebGLProgram: Program Info Log:",G):(Z===""||j==="")&&(Y=!1);Y&&(k.diagnostics={runnable:K,programLog:G,vertexShader:{log:Z,prefix:_},fragmentShader:{log:j,prefix:v}})}i.deleteShader(T),i.deleteShader(C),O=new vE(i,x),P=P2e(i,x)}let O;this.getUniforms=function(){return O===void 0&&D(this),O};let P;this.getAttributes=function(){return P===void 0&&D(this),P};let N=n.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return N===!1&&(N=i.getProgramParameter(x,S2e)),N},this.destroy=function(){r.releaseStatesOfProgram(this),i.deleteProgram(x),this.program=void 0},this.type=n.shaderType,this.name=n.shaderName,this.id=E2e++,this.cacheKey=e,this.usedTimes=1,this.program=x,this.vertexShader=T,this.fragmentShader=C,this}let V2e=0;class W2e{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const n=e.vertexShader,r=e.fragmentShader,i=this._getShaderStage(n),o=this._getShaderStage(r),a=this._getShaderCacheForMaterial(e);return a.has(i)===!1&&(a.add(i),i.usedTimes++),a.has(o)===!1&&(a.add(o),o.usedTimes++),this}remove(e){const n=this.materialCache.get(e);for(const r of n)r.usedTimes--,r.usedTimes===0&&this.shaderCache.delete(r.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 n=this.materialCache;let r=n.get(e);return r===void 0&&(r=new Set,n.set(e,r)),r}_getShaderStage(e){const n=this.shaderCache;let r=n.get(e);return r===void 0&&(r=new G2e(e),n.set(e,r)),r}}class G2e{constructor(e){this.id=V2e++,this.code=e,this.usedTimes=0}}function j2e(t,e,n,r,i,o,a){const s=new Dp,l=new W2e,u=[],c=i.isWebGL2,f=i.logarithmicDepthBuffer,d=i.vertexTextures;let p=i.precision;const y={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 x(P){return P===0?"uv":`uv${P}`}function _(P,N,k,G,Z){const j=G.fog,K=Z.geometry,Y=P.isMeshStandardMaterial?G.environment:null,$=(P.isMeshStandardMaterial?n:e).get(P.envMap||Y),W=$&&$.mapping===wv?$.image.height:null,U=y[P.type];P.precision!==null&&(p=i.getMaxPrecision(P.precision),p!==P.precision&&console.warn("THREE.WebGLProgram.getParameters:",P.precision,"not supported, using",p,"instead."));const te=K.morphAttributes.position||K.morphAttributes.normal||K.morphAttributes.color,re=te!==void 0?te.length:0;let le=0;K.morphAttributes.position!==void 0&&(le=1),K.morphAttributes.normal!==void 0&&(le=2),K.morphAttributes.color!==void 0&&(le=3);let ce,Ce,Re,Ie;if(U){const Zn=Yl[U];ce=Zn.vertexShader,Ce=Zn.fragmentShader}else ce=P.vertexShader,Ce=P.fragmentShader,l.update(P),Re=l.getVertexShaderID(P),Ie=l.getFragmentShaderID(P);const He=t.getRenderTarget(),tt=Z.isInstancedMesh===!0,Qe=!!P.map,ct=!!P.matcap,Xe=!!$,ue=!!P.aoMap,De=!!P.lightMap,Ee=!!P.bumpMap,X=!!P.normalMap,ne=!!P.displacementMap,me=!!P.emissiveMap,we=!!P.metalnessMap,Ne=!!P.roughnessMap,Ue=P.anisotropy>0,We=P.clearcoat>0,lt=P.iridescence>0,z=P.sheen>0,B=P.transmission>0,oe=Ue&&!!P.anisotropyMap,ge=We&&!!P.clearcoatMap,pe=We&&!!P.clearcoatNormalMap,de=We&&!!P.clearcoatRoughnessMap,ve=lt&&!!P.iridescenceMap,Se=lt&&!!P.iridescenceThicknessMap,Pe=z&&!!P.sheenColorMap,Be=z&&!!P.sheenRoughnessMap,je=!!P.specularMap,Le=!!P.specularColorMap,_t=!!P.specularIntensityMap,xt=B&&!!P.transmissionMap,wt=B&&!!P.thicknessMap,Ct=!!P.gradientMap,pt=!!P.alphaMap,jt=P.alphaTest>0,be=!!P.alphaHash,gt=!!P.extensions,ft=!!K.attributes.uv1,Ye=!!K.attributes.uv2,mt=!!K.attributes.uv3;let Vt=qu;return P.toneMapped&&(He===null||He.isXRRenderTarget===!0)&&(Vt=t.toneMapping),{isWebGL2:c,shaderID:U,shaderType:P.type,shaderName:P.name,vertexShader:ce,fragmentShader:Ce,defines:P.defines,customVertexShaderID:Re,customFragmentShaderID:Ie,isRawShaderMaterial:P.isRawShaderMaterial===!0,glslVersion:P.glslVersion,precision:p,instancing:tt,instancingColor:tt&&Z.instanceColor!==null,supportsVertexTextures:d,outputColorSpace:He===null?t.outputColorSpace:He.isXRRenderTarget===!0?He.texture.colorSpace:tc,map:Qe,matcap:ct,envMap:Xe,envMapMode:Xe&&$.mapping,envMapCubeUVHeight:W,aoMap:ue,lightMap:De,bumpMap:Ee,normalMap:X,displacementMap:d&&ne,emissiveMap:me,normalMapObjectSpace:X&&P.normalMapType===XW,normalMapTangentSpace:X&&P.normalMapType===nh,metalnessMap:we,roughnessMap:Ne,anisotropy:Ue,anisotropyMap:oe,clearcoat:We,clearcoatMap:ge,clearcoatNormalMap:pe,clearcoatRoughnessMap:de,iridescence:lt,iridescenceMap:ve,iridescenceThicknessMap:Se,sheen:z,sheenColorMap:Pe,sheenRoughnessMap:Be,specularMap:je,specularColorMap:Le,specularIntensityMap:_t,transmission:B,transmissionMap:xt,thicknessMap:wt,gradientMap:Ct,opaque:P.transparent===!1&&P.blending===Ap,alphaMap:pt,alphaTest:jt,alphaHash:be,combine:P.combine,mapUv:Qe&&x(P.map.channel),aoMapUv:ue&&x(P.aoMap.channel),lightMapUv:De&&x(P.lightMap.channel),bumpMapUv:Ee&&x(P.bumpMap.channel),normalMapUv:X&&x(P.normalMap.channel),displacementMapUv:ne&&x(P.displacementMap.channel),emissiveMapUv:me&&x(P.emissiveMap.channel),metalnessMapUv:we&&x(P.metalnessMap.channel),roughnessMapUv:Ne&&x(P.roughnessMap.channel),anisotropyMapUv:oe&&x(P.anisotropyMap.channel),clearcoatMapUv:ge&&x(P.clearcoatMap.channel),clearcoatNormalMapUv:pe&&x(P.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:de&&x(P.clearcoatRoughnessMap.channel),iridescenceMapUv:ve&&x(P.iridescenceMap.channel),iridescenceThicknessMapUv:Se&&x(P.iridescenceThicknessMap.channel),sheenColorMapUv:Pe&&x(P.sheenColorMap.channel),sheenRoughnessMapUv:Be&&x(P.sheenRoughnessMap.channel),specularMapUv:je&&x(P.specularMap.channel),specularColorMapUv:Le&&x(P.specularColorMap.channel),specularIntensityMapUv:_t&&x(P.specularIntensityMap.channel),transmissionMapUv:xt&&x(P.transmissionMap.channel),thicknessMapUv:wt&&x(P.thicknessMap.channel),alphaMapUv:pt&&x(P.alphaMap.channel),vertexTangents:!!K.attributes.tangent&&(X||Ue),vertexColors:P.vertexColors,vertexAlphas:P.vertexColors===!0&&!!K.attributes.color&&K.attributes.color.itemSize===4,vertexUv1s:ft,vertexUv2s:Ye,vertexUv3s:mt,pointsUvs:Z.isPoints===!0&&!!K.attributes.uv&&(Qe||pt),fog:!!j,useFog:P.fog===!0,fogExp2:j&&j.isFogExp2,flatShading:P.flatShading===!0,sizeAttenuation:P.sizeAttenuation===!0,logarithmicDepthBuffer:f,skinning:Z.isSkinnedMesh===!0,morphTargets:K.morphAttributes.position!==void 0,morphNormals:K.morphAttributes.normal!==void 0,morphColors:K.morphAttributes.color!==void 0,morphTargetsCount:re,morphTextureStride:le,numDirLights:N.directional.length,numPointLights:N.point.length,numSpotLights:N.spot.length,numSpotLightMaps:N.spotLightMap.length,numRectAreaLights:N.rectArea.length,numHemiLights:N.hemi.length,numDirLightShadows:N.directionalShadowMap.length,numPointLightShadows:N.pointShadowMap.length,numSpotLightShadows:N.spotShadowMap.length,numSpotLightShadowsWithMaps:N.numSpotLightShadowsWithMaps,numLightProbes:N.numLightProbes,numClippingPlanes:a.numPlanes,numClipIntersection:a.numIntersection,dithering:P.dithering,shadowMapEnabled:t.shadowMap.enabled&&k.length>0,shadowMapType:t.shadowMap.type,toneMapping:Vt,useLegacyLights:t._useLegacyLights,decodeVideoTexture:Qe&&P.map.isVideoTexture===!0&&ar.getTransfer(P.map.colorSpace)===Er,premultipliedAlpha:P.premultipliedAlpha,doubleSided:P.side===Kl,flipSided:P.side===Sa,useDepthPacking:P.depthPacking>=0,depthPacking:P.depthPacking||0,index0AttributeName:P.index0AttributeName,extensionDerivatives:gt&&P.extensions.derivatives===!0,extensionFragDepth:gt&&P.extensions.fragDepth===!0,extensionDrawBuffers:gt&&P.extensions.drawBuffers===!0,extensionShaderTextureLOD:gt&&P.extensions.shaderTextureLOD===!0,rendererExtensionFragDepth:c||r.has("EXT_frag_depth"),rendererExtensionDrawBuffers:c||r.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:c||r.has("EXT_shader_texture_lod"),rendererExtensionParallelShaderCompile:r.has("KHR_parallel_shader_compile"),customProgramCacheKey:P.customProgramCacheKey()}}function v(P){const N=[];if(P.shaderID?N.push(P.shaderID):(N.push(P.customVertexShaderID),N.push(P.customFragmentShaderID)),P.defines!==void 0)for(const k in P.defines)N.push(k),N.push(P.defines[k]);return P.isRawShaderMaterial===!1&&(S(N,P),w(N,P),N.push(t.outputColorSpace)),N.push(P.customProgramCacheKey),N.join()}function S(P,N){P.push(N.precision),P.push(N.outputColorSpace),P.push(N.envMapMode),P.push(N.envMapCubeUVHeight),P.push(N.mapUv),P.push(N.alphaMapUv),P.push(N.lightMapUv),P.push(N.aoMapUv),P.push(N.bumpMapUv),P.push(N.normalMapUv),P.push(N.displacementMapUv),P.push(N.emissiveMapUv),P.push(N.metalnessMapUv),P.push(N.roughnessMapUv),P.push(N.anisotropyMapUv),P.push(N.clearcoatMapUv),P.push(N.clearcoatNormalMapUv),P.push(N.clearcoatRoughnessMapUv),P.push(N.iridescenceMapUv),P.push(N.iridescenceThicknessMapUv),P.push(N.sheenColorMapUv),P.push(N.sheenRoughnessMapUv),P.push(N.specularMapUv),P.push(N.specularColorMapUv),P.push(N.specularIntensityMapUv),P.push(N.transmissionMapUv),P.push(N.thicknessMapUv),P.push(N.combine),P.push(N.fogExp2),P.push(N.sizeAttenuation),P.push(N.morphTargetsCount),P.push(N.morphAttributeCount),P.push(N.numDirLights),P.push(N.numPointLights),P.push(N.numSpotLights),P.push(N.numSpotLightMaps),P.push(N.numHemiLights),P.push(N.numRectAreaLights),P.push(N.numDirLightShadows),P.push(N.numPointLightShadows),P.push(N.numSpotLightShadows),P.push(N.numSpotLightShadowsWithMaps),P.push(N.numLightProbes),P.push(N.shadowMapType),P.push(N.toneMapping),P.push(N.numClippingPlanes),P.push(N.numClipIntersection),P.push(N.depthPacking)}function w(P,N){s.disableAll(),N.isWebGL2&&s.enable(0),N.supportsVertexTextures&&s.enable(1),N.instancing&&s.enable(2),N.instancingColor&&s.enable(3),N.matcap&&s.enable(4),N.envMap&&s.enable(5),N.normalMapObjectSpace&&s.enable(6),N.normalMapTangentSpace&&s.enable(7),N.clearcoat&&s.enable(8),N.iridescence&&s.enable(9),N.alphaTest&&s.enable(10),N.vertexColors&&s.enable(11),N.vertexAlphas&&s.enable(12),N.vertexUv1s&&s.enable(13),N.vertexUv2s&&s.enable(14),N.vertexUv3s&&s.enable(15),N.vertexTangents&&s.enable(16),N.anisotropy&&s.enable(17),N.alphaHash&&s.enable(18),P.push(s.mask),s.disableAll(),N.fog&&s.enable(0),N.useFog&&s.enable(1),N.flatShading&&s.enable(2),N.logarithmicDepthBuffer&&s.enable(3),N.skinning&&s.enable(4),N.morphTargets&&s.enable(5),N.morphNormals&&s.enable(6),N.morphColors&&s.enable(7),N.premultipliedAlpha&&s.enable(8),N.shadowMapEnabled&&s.enable(9),N.useLegacyLights&&s.enable(10),N.doubleSided&&s.enable(11),N.flipSided&&s.enable(12),N.useDepthPacking&&s.enable(13),N.dithering&&s.enable(14),N.transmission&&s.enable(15),N.sheen&&s.enable(16),N.opaque&&s.enable(17),N.pointsUvs&&s.enable(18),N.decodeVideoTexture&&s.enable(19),P.push(s.mask)}function E(P){const N=y[P.type];let k;if(N){const G=Yl[N];k=uG.clone(G.uniforms)}else k=P.uniforms;return k}function T(P,N){let k;for(let G=0,Z=u.length;G0?r.push(v):p.transparent===!0?i.push(v):n.push(v)}function l(f,d,p,y,x,_){const v=a(f,d,p,y,x,_);p.transmission>0?r.unshift(v):p.transparent===!0?i.unshift(v):n.unshift(v)}function u(f,d){n.length>1&&n.sort(f||X2e),r.length>1&&r.sort(d||m6),i.length>1&&i.sort(d||m6)}function c(){for(let f=e,d=t.length;f=o.length?(a=new g6,o.push(a)):a=o[i],a}function n(){t=new WeakMap}return{get:e,dispose:n}}function K2e(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case"DirectionalLight":n={direction:new ae,color:new Pt};break;case"SpotLight":n={position:new ae,direction:new ae,color:new Pt,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new ae,color:new Pt,distance:0,decay:0};break;case"HemisphereLight":n={direction:new ae,skyColor:new Pt,groundColor:new Pt};break;case"RectAreaLight":n={color:new Pt,position:new ae,halfWidth:new ae,halfHeight:new ae};break}return t[e.id]=n,n}}}function Z2e(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case"DirectionalLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Je};break;case"SpotLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Je};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Je,shadowCameraNear:1,shadowCameraFar:1e3};break}return t[e.id]=n,n}}}let J2e=0;function Q2e(t,e){return(e.castShadow?2:0)-(t.castShadow?2:0)+(e.map?1:0)-(t.map?1:0)}function eMe(t,e){const n=new K2e,r=Z2e(),i={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 c=0;c<9;c++)i.probe.push(new ae);const o=new ae,a=new xn,s=new xn;function l(c,f){let d=0,p=0,y=0;for(let G=0;G<9;G++)i.probe[G].set(0,0,0);let x=0,_=0,v=0,S=0,w=0,E=0,T=0,C=0,D=0,O=0,P=0;c.sort(Q2e);const N=f===!0?Math.PI:1;for(let G=0,Z=c.length;G0&&(e.isWebGL2||t.has("OES_texture_float_linear")===!0?(i.rectAreaLTC1=St.LTC_FLOAT_1,i.rectAreaLTC2=St.LTC_FLOAT_2):t.has("OES_texture_half_float_linear")===!0?(i.rectAreaLTC1=St.LTC_HALF_1,i.rectAreaLTC2=St.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),i.ambient[0]=d,i.ambient[1]=p,i.ambient[2]=y;const k=i.hash;(k.directionalLength!==x||k.pointLength!==_||k.spotLength!==v||k.rectAreaLength!==S||k.hemiLength!==w||k.numDirectionalShadows!==E||k.numPointShadows!==T||k.numSpotShadows!==C||k.numSpotMaps!==D||k.numLightProbes!==P)&&(i.directional.length=x,i.spot.length=v,i.rectArea.length=S,i.point.length=_,i.hemi.length=w,i.directionalShadow.length=E,i.directionalShadowMap.length=E,i.pointShadow.length=T,i.pointShadowMap.length=T,i.spotShadow.length=C,i.spotShadowMap.length=C,i.directionalShadowMatrix.length=E,i.pointShadowMatrix.length=T,i.spotLightMatrix.length=C+D-O,i.spotLightMap.length=D,i.numSpotLightShadowsWithMaps=O,i.numLightProbes=P,k.directionalLength=x,k.pointLength=_,k.spotLength=v,k.rectAreaLength=S,k.hemiLength=w,k.numDirectionalShadows=E,k.numPointShadows=T,k.numSpotShadows=C,k.numSpotMaps=D,k.numLightProbes=P,i.version=J2e++)}function u(c,f){let d=0,p=0,y=0,x=0,_=0;const v=f.matrixWorldInverse;for(let S=0,w=c.length;S=s.length?(l=new v6(t,e),s.push(l)):l=s[a],l}function i(){n=new WeakMap}return{get:r,dispose:i}}class M4 extends Po{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=jW,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 C4 extends Po{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}}const nMe=`void main() { +`+W)}else G!==""?console.warn("THREE.WebGLProgram: Program Info Log:",G):(Z===""||j==="")&&(Y=!1);Y&&(k.diagnostics={runnable:K,programLog:G,vertexShader:{log:Z,prefix:_},fragmentShader:{log:j,prefix:v}})}i.deleteShader(T),i.deleteShader(C),O=new vE(i,x),P=H2e(i,x)}let O;this.getUniforms=function(){return O===void 0&&D(this),O};let P;this.getAttributes=function(){return P===void 0&&D(this),P};let N=n.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return N===!1&&(N=i.getProgramParameter(x,I2e)),N},this.destroy=function(){r.releaseStatesOfProgram(this),i.deleteProgram(x),this.program=void 0},this.type=n.shaderType,this.name=n.shaderName,this.id=F2e++,this.cacheKey=e,this.usedTimes=1,this.program=x,this.vertexShader=T,this.fragmentShader=C,this}let eMe=0;class tMe{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const n=e.vertexShader,r=e.fragmentShader,i=this._getShaderStage(n),o=this._getShaderStage(r),a=this._getShaderCacheForMaterial(e);return a.has(i)===!1&&(a.add(i),i.usedTimes++),a.has(o)===!1&&(a.add(o),o.usedTimes++),this}remove(e){const n=this.materialCache.get(e);for(const r of n)r.usedTimes--,r.usedTimes===0&&this.shaderCache.delete(r.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 n=this.materialCache;let r=n.get(e);return r===void 0&&(r=new Set,n.set(e,r)),r}_getShaderStage(e){const n=this.shaderCache;let r=n.get(e);return r===void 0&&(r=new nMe(e),n.set(e,r)),r}}class nMe{constructor(e){this.id=eMe++,this.code=e,this.usedTimes=0}}function rMe(t,e,n,r,i,o,a){const s=new Rp,l=new tMe,u=[],c=i.isWebGL2,f=i.logarithmicDepthBuffer,d=i.vertexTextures;let p=i.precision;const y={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 x(P){return P===0?"uv":`uv${P}`}function _(P,N,k,G,Z){const j=G.fog,K=Z.geometry,Y=P.isMeshStandardMaterial?G.environment:null,$=(P.isMeshStandardMaterial?n:e).get(P.envMap||Y),W=$&&$.mapping===Mv?$.image.height:null,U=y[P.type];P.precision!==null&&(p=i.getMaxPrecision(P.precision),p!==P.precision&&console.warn("THREE.WebGLProgram.getParameters:",P.precision,"not supported, using",p,"instead."));const te=K.morphAttributes.position||K.morphAttributes.normal||K.morphAttributes.color,re=te!==void 0?te.length:0;let le=0;K.morphAttributes.position!==void 0&&(le=1),K.morphAttributes.normal!==void 0&&(le=2),K.morphAttributes.color!==void 0&&(le=3);let ce,Ce,Re,Ie;if(U){const Zn=Xl[U];ce=Zn.vertexShader,Ce=Zn.fragmentShader}else ce=P.vertexShader,Ce=P.fragmentShader,l.update(P),Re=l.getVertexShaderID(P),Ie=l.getFragmentShaderID(P);const He=t.getRenderTarget(),tt=Z.isInstancedMesh===!0,Qe=!!P.map,ct=!!P.matcap,Xe=!!$,ue=!!P.aoMap,De=!!P.lightMap,Ee=!!P.bumpMap,X=!!P.normalMap,ne=!!P.displacementMap,me=!!P.emissiveMap,we=!!P.metalnessMap,Ne=!!P.roughnessMap,Ue=P.anisotropy>0,We=P.clearcoat>0,lt=P.iridescence>0,z=P.sheen>0,B=P.transmission>0,oe=Ue&&!!P.anisotropyMap,ge=We&&!!P.clearcoatMap,pe=We&&!!P.clearcoatNormalMap,de=We&&!!P.clearcoatRoughnessMap,ve=lt&&!!P.iridescenceMap,Se=lt&&!!P.iridescenceThicknessMap,Pe=z&&!!P.sheenColorMap,Be=z&&!!P.sheenRoughnessMap,je=!!P.specularMap,Le=!!P.specularColorMap,_t=!!P.specularIntensityMap,bt=B&&!!P.transmissionMap,wt=B&&!!P.thicknessMap,Ct=!!P.gradientMap,pt=!!P.alphaMap,qt=P.alphaTest>0,be=!!P.alphaHash,gt=!!P.extensions,ft=!!K.attributes.uv1,Ye=!!K.attributes.uv2,mt=!!K.attributes.uv3;let Vt=ju;return P.toneMapped&&(He===null||He.isXRRenderTarget===!0)&&(Vt=t.toneMapping),{isWebGL2:c,shaderID:U,shaderType:P.type,shaderName:P.name,vertexShader:ce,fragmentShader:Ce,defines:P.defines,customVertexShaderID:Re,customFragmentShaderID:Ie,isRawShaderMaterial:P.isRawShaderMaterial===!0,glslVersion:P.glslVersion,precision:p,instancing:tt,instancingColor:tt&&Z.instanceColor!==null,supportsVertexTextures:d,outputColorSpace:He===null?t.outputColorSpace:He.isXRRenderTarget===!0?He.texture.colorSpace:ec,map:Qe,matcap:ct,envMap:Xe,envMapMode:Xe&&$.mapping,envMapCubeUVHeight:W,aoMap:ue,lightMap:De,bumpMap:Ee,normalMap:X,displacementMap:d&&ne,emissiveMap:me,normalMapObjectSpace:X&&P.normalMapType===tG,normalMapTangentSpace:X&&P.normalMapType===rh,metalnessMap:we,roughnessMap:Ne,anisotropy:Ue,anisotropyMap:oe,clearcoat:We,clearcoatMap:ge,clearcoatNormalMap:pe,clearcoatRoughnessMap:de,iridescence:lt,iridescenceMap:ve,iridescenceThicknessMap:Se,sheen:z,sheenColorMap:Pe,sheenRoughnessMap:Be,specularMap:je,specularColorMap:Le,specularIntensityMap:_t,transmission:B,transmissionMap:bt,thicknessMap:wt,gradientMap:Ct,opaque:P.transparent===!1&&P.blending===Tp,alphaMap:pt,alphaTest:qt,alphaHash:be,combine:P.combine,mapUv:Qe&&x(P.map.channel),aoMapUv:ue&&x(P.aoMap.channel),lightMapUv:De&&x(P.lightMap.channel),bumpMapUv:Ee&&x(P.bumpMap.channel),normalMapUv:X&&x(P.normalMap.channel),displacementMapUv:ne&&x(P.displacementMap.channel),emissiveMapUv:me&&x(P.emissiveMap.channel),metalnessMapUv:we&&x(P.metalnessMap.channel),roughnessMapUv:Ne&&x(P.roughnessMap.channel),anisotropyMapUv:oe&&x(P.anisotropyMap.channel),clearcoatMapUv:ge&&x(P.clearcoatMap.channel),clearcoatNormalMapUv:pe&&x(P.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:de&&x(P.clearcoatRoughnessMap.channel),iridescenceMapUv:ve&&x(P.iridescenceMap.channel),iridescenceThicknessMapUv:Se&&x(P.iridescenceThicknessMap.channel),sheenColorMapUv:Pe&&x(P.sheenColorMap.channel),sheenRoughnessMapUv:Be&&x(P.sheenRoughnessMap.channel),specularMapUv:je&&x(P.specularMap.channel),specularColorMapUv:Le&&x(P.specularColorMap.channel),specularIntensityMapUv:_t&&x(P.specularIntensityMap.channel),transmissionMapUv:bt&&x(P.transmissionMap.channel),thicknessMapUv:wt&&x(P.thicknessMap.channel),alphaMapUv:pt&&x(P.alphaMap.channel),vertexTangents:!!K.attributes.tangent&&(X||Ue),vertexColors:P.vertexColors,vertexAlphas:P.vertexColors===!0&&!!K.attributes.color&&K.attributes.color.itemSize===4,vertexUv1s:ft,vertexUv2s:Ye,vertexUv3s:mt,pointsUvs:Z.isPoints===!0&&!!K.attributes.uv&&(Qe||pt),fog:!!j,useFog:P.fog===!0,fogExp2:j&&j.isFogExp2,flatShading:P.flatShading===!0,sizeAttenuation:P.sizeAttenuation===!0,logarithmicDepthBuffer:f,skinning:Z.isSkinnedMesh===!0,morphTargets:K.morphAttributes.position!==void 0,morphNormals:K.morphAttributes.normal!==void 0,morphColors:K.morphAttributes.color!==void 0,morphTargetsCount:re,morphTextureStride:le,numDirLights:N.directional.length,numPointLights:N.point.length,numSpotLights:N.spot.length,numSpotLightMaps:N.spotLightMap.length,numRectAreaLights:N.rectArea.length,numHemiLights:N.hemi.length,numDirLightShadows:N.directionalShadowMap.length,numPointLightShadows:N.pointShadowMap.length,numSpotLightShadows:N.spotShadowMap.length,numSpotLightShadowsWithMaps:N.numSpotLightShadowsWithMaps,numLightProbes:N.numLightProbes,numClippingPlanes:a.numPlanes,numClipIntersection:a.numIntersection,dithering:P.dithering,shadowMapEnabled:t.shadowMap.enabled&&k.length>0,shadowMapType:t.shadowMap.type,toneMapping:Vt,useLegacyLights:t._useLegacyLights,decodeVideoTexture:Qe&&P.map.isVideoTexture===!0&&ar.getTransfer(P.map.colorSpace)===Er,premultipliedAlpha:P.premultipliedAlpha,doubleSided:P.side===Yl,flipSided:P.side===Sa,useDepthPacking:P.depthPacking>=0,depthPacking:P.depthPacking||0,index0AttributeName:P.index0AttributeName,extensionDerivatives:gt&&P.extensions.derivatives===!0,extensionFragDepth:gt&&P.extensions.fragDepth===!0,extensionDrawBuffers:gt&&P.extensions.drawBuffers===!0,extensionShaderTextureLOD:gt&&P.extensions.shaderTextureLOD===!0,rendererExtensionFragDepth:c||r.has("EXT_frag_depth"),rendererExtensionDrawBuffers:c||r.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:c||r.has("EXT_shader_texture_lod"),rendererExtensionParallelShaderCompile:r.has("KHR_parallel_shader_compile"),customProgramCacheKey:P.customProgramCacheKey()}}function v(P){const N=[];if(P.shaderID?N.push(P.shaderID):(N.push(P.customVertexShaderID),N.push(P.customFragmentShaderID)),P.defines!==void 0)for(const k in P.defines)N.push(k),N.push(P.defines[k]);return P.isRawShaderMaterial===!1&&(S(N,P),w(N,P),N.push(t.outputColorSpace)),N.push(P.customProgramCacheKey),N.join()}function S(P,N){P.push(N.precision),P.push(N.outputColorSpace),P.push(N.envMapMode),P.push(N.envMapCubeUVHeight),P.push(N.mapUv),P.push(N.alphaMapUv),P.push(N.lightMapUv),P.push(N.aoMapUv),P.push(N.bumpMapUv),P.push(N.normalMapUv),P.push(N.displacementMapUv),P.push(N.emissiveMapUv),P.push(N.metalnessMapUv),P.push(N.roughnessMapUv),P.push(N.anisotropyMapUv),P.push(N.clearcoatMapUv),P.push(N.clearcoatNormalMapUv),P.push(N.clearcoatRoughnessMapUv),P.push(N.iridescenceMapUv),P.push(N.iridescenceThicknessMapUv),P.push(N.sheenColorMapUv),P.push(N.sheenRoughnessMapUv),P.push(N.specularMapUv),P.push(N.specularColorMapUv),P.push(N.specularIntensityMapUv),P.push(N.transmissionMapUv),P.push(N.thicknessMapUv),P.push(N.combine),P.push(N.fogExp2),P.push(N.sizeAttenuation),P.push(N.morphTargetsCount),P.push(N.morphAttributeCount),P.push(N.numDirLights),P.push(N.numPointLights),P.push(N.numSpotLights),P.push(N.numSpotLightMaps),P.push(N.numHemiLights),P.push(N.numRectAreaLights),P.push(N.numDirLightShadows),P.push(N.numPointLightShadows),P.push(N.numSpotLightShadows),P.push(N.numSpotLightShadowsWithMaps),P.push(N.numLightProbes),P.push(N.shadowMapType),P.push(N.toneMapping),P.push(N.numClippingPlanes),P.push(N.numClipIntersection),P.push(N.depthPacking)}function w(P,N){s.disableAll(),N.isWebGL2&&s.enable(0),N.supportsVertexTextures&&s.enable(1),N.instancing&&s.enable(2),N.instancingColor&&s.enable(3),N.matcap&&s.enable(4),N.envMap&&s.enable(5),N.normalMapObjectSpace&&s.enable(6),N.normalMapTangentSpace&&s.enable(7),N.clearcoat&&s.enable(8),N.iridescence&&s.enable(9),N.alphaTest&&s.enable(10),N.vertexColors&&s.enable(11),N.vertexAlphas&&s.enable(12),N.vertexUv1s&&s.enable(13),N.vertexUv2s&&s.enable(14),N.vertexUv3s&&s.enable(15),N.vertexTangents&&s.enable(16),N.anisotropy&&s.enable(17),N.alphaHash&&s.enable(18),P.push(s.mask),s.disableAll(),N.fog&&s.enable(0),N.useFog&&s.enable(1),N.flatShading&&s.enable(2),N.logarithmicDepthBuffer&&s.enable(3),N.skinning&&s.enable(4),N.morphTargets&&s.enable(5),N.morphNormals&&s.enable(6),N.morphColors&&s.enable(7),N.premultipliedAlpha&&s.enable(8),N.shadowMapEnabled&&s.enable(9),N.useLegacyLights&&s.enable(10),N.doubleSided&&s.enable(11),N.flipSided&&s.enable(12),N.useDepthPacking&&s.enable(13),N.dithering&&s.enable(14),N.transmission&&s.enable(15),N.sheen&&s.enable(16),N.opaque&&s.enable(17),N.pointsUvs&&s.enable(18),N.decodeVideoTexture&&s.enable(19),P.push(s.mask)}function E(P){const N=y[P.type];let k;if(N){const G=Xl[N];k=gG.clone(G.uniforms)}else k=P.uniforms;return k}function T(P,N){let k;for(let G=0,Z=u.length;G0?r.push(v):p.transparent===!0?i.push(v):n.push(v)}function l(f,d,p,y,x,_){const v=a(f,d,p,y,x,_);p.transmission>0?r.unshift(v):p.transparent===!0?i.unshift(v):n.unshift(v)}function u(f,d){n.length>1&&n.sort(f||oMe),r.length>1&&r.sort(d||y6),i.length>1&&i.sort(d||y6)}function c(){for(let f=e,d=t.length;f=o.length?(a=new x6,o.push(a)):a=o[i],a}function n(){t=new WeakMap}return{get:e,dispose:n}}function sMe(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case"DirectionalLight":n={direction:new ae,color:new Pt};break;case"SpotLight":n={position:new ae,direction:new ae,color:new Pt,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new ae,color:new Pt,distance:0,decay:0};break;case"HemisphereLight":n={direction:new ae,skyColor:new Pt,groundColor:new Pt};break;case"RectAreaLight":n={color:new Pt,position:new ae,halfWidth:new ae,halfHeight:new ae};break}return t[e.id]=n,n}}}function lMe(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case"DirectionalLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Je};break;case"SpotLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Je};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Je,shadowCameraNear:1,shadowCameraFar:1e3};break}return t[e.id]=n,n}}}let uMe=0;function cMe(t,e){return(e.castShadow?2:0)-(t.castShadow?2:0)+(e.map?1:0)-(t.map?1:0)}function fMe(t,e){const n=new sMe,r=lMe(),i={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 c=0;c<9;c++)i.probe.push(new ae);const o=new ae,a=new yn,s=new yn;function l(c,f){let d=0,p=0,y=0;for(let G=0;G<9;G++)i.probe[G].set(0,0,0);let x=0,_=0,v=0,S=0,w=0,E=0,T=0,C=0,D=0,O=0,P=0;c.sort(cMe);const N=f===!0?Math.PI:1;for(let G=0,Z=c.length;G0&&(e.isWebGL2||t.has("OES_texture_float_linear")===!0?(i.rectAreaLTC1=St.LTC_FLOAT_1,i.rectAreaLTC2=St.LTC_FLOAT_2):t.has("OES_texture_half_float_linear")===!0?(i.rectAreaLTC1=St.LTC_HALF_1,i.rectAreaLTC2=St.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),i.ambient[0]=d,i.ambient[1]=p,i.ambient[2]=y;const k=i.hash;(k.directionalLength!==x||k.pointLength!==_||k.spotLength!==v||k.rectAreaLength!==S||k.hemiLength!==w||k.numDirectionalShadows!==E||k.numPointShadows!==T||k.numSpotShadows!==C||k.numSpotMaps!==D||k.numLightProbes!==P)&&(i.directional.length=x,i.spot.length=v,i.rectArea.length=S,i.point.length=_,i.hemi.length=w,i.directionalShadow.length=E,i.directionalShadowMap.length=E,i.pointShadow.length=T,i.pointShadowMap.length=T,i.spotShadow.length=C,i.spotShadowMap.length=C,i.directionalShadowMatrix.length=E,i.pointShadowMatrix.length=T,i.spotLightMatrix.length=C+D-O,i.spotLightMap.length=D,i.numSpotLightShadowsWithMaps=O,i.numLightProbes=P,k.directionalLength=x,k.pointLength=_,k.spotLength=v,k.rectAreaLength=S,k.hemiLength=w,k.numDirectionalShadows=E,k.numPointShadows=T,k.numSpotShadows=C,k.numSpotMaps=D,k.numLightProbes=P,i.version=uMe++)}function u(c,f){let d=0,p=0,y=0,x=0,_=0;const v=f.matrixWorldInverse;for(let S=0,w=c.length;S=s.length?(l=new b6(t,e),s.push(l)):l=s[a],l}function i(){n=new WeakMap}return{get:r,dispose:i}}class C4 extends Po{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=QW,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 A4 extends Po{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}}const hMe=`void main() { gl_Position = vec4( position, 1.0 ); -}`,rMe=`uniform sampler2D shadow_pass; +}`,pMe=`uniform sampler2D shadow_pass; uniform vec2 resolution; uniform float radius; #include @@ -3790,7 +3790,7 @@ void main() { squared_mean = squared_mean / samples; float std_dev = sqrt( squared_mean - mean * mean ); gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); -}`;function iMe(t,e,n){let r=new MC;const i=new Je,o=new Je,a=new ir,s=new M4({depthPacking:qW}),l=new C4,u={},c=n.maxTextureSize,f={[lf]:Sa,[Sa]:lf,[Kl]:Kl},d=new nc({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Je},radius:{value:4}},vertexShader:nMe,fragmentShader:rMe}),p=d.clone();p.defines.HORIZONTAL_PASS=1;const y=new Fn;y.setAttribute("position",new xr(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const x=new Co(y,d),_=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=bC;let v=this.type;this.render=function(T,C,D){if(_.enabled===!1||_.autoUpdate===!1&&_.needsUpdate===!1||T.length===0)return;const O=t.getRenderTarget(),P=t.getActiveCubeFace(),N=t.getActiveMipmapLevel(),k=t.state;k.setBlending(Jc),k.buffers.color.setClear(1,1,1,1),k.buffers.depth.setTest(!0),k.setScissorTest(!1);const G=v!==jl&&this.type===jl,Z=v===jl&&this.type!==jl;for(let j=0,K=T.length;jc||i.y>c)&&(i.x>c&&(o.x=Math.floor(c/W.x),i.x=o.x*W.x,$.mapSize.x=o.x),i.y>c&&(o.y=Math.floor(c/W.y),i.y=o.y*W.y,$.mapSize.y=o.y)),$.map===null||G===!0||Z===!0){const te=this.type!==jl?{minFilter:ci,magFilter:ci}:{};$.map!==null&&$.map.dispose(),$.map=new su(i.x,i.y,te),$.map.texture.name=Y.name+".shadowMap",$.camera.updateProjectionMatrix()}t.setRenderTarget($.map),t.clear();const U=$.getViewportCount();for(let te=0;te0||C.map&&C.alphaTest>0){const k=P.uuid,G=C.uuid;let Z=u[k];Z===void 0&&(Z={},u[k]=Z);let j=Z[G];j===void 0&&(j=P.clone(),Z[G]=j),P=j}if(P.visible=C.visible,P.wireframe=C.wireframe,O===jl?P.side=C.shadowSide!==null?C.shadowSide:C.side:P.side=C.shadowSide!==null?C.shadowSide:f[C.side],P.alphaMap=C.alphaMap,P.alphaTest=C.alphaTest,P.map=C.map,P.clipShadows=C.clipShadows,P.clippingPlanes=C.clippingPlanes,P.clipIntersection=C.clipIntersection,P.displacementMap=C.displacementMap,P.displacementScale=C.displacementScale,P.displacementBias=C.displacementBias,P.wireframeLinewidth=C.wireframeLinewidth,P.linewidth=C.linewidth,D.isPointLight===!0&&P.isMeshDistanceMaterial===!0){const k=t.properties.get(P);k.light=D}return P}function E(T,C,D,O,P){if(T.visible===!1)return;if(T.layers.test(C.layers)&&(T.isMesh||T.isLine||T.isPoints)&&(T.castShadow||T.receiveShadow&&P===jl)&&(!T.frustumCulled||r.intersectsObject(T))){T.modelViewMatrix.multiplyMatrices(D.matrixWorldInverse,T.matrixWorld);const G=e.update(T),Z=T.material;if(Array.isArray(Z)){const j=G.groups;for(let K=0,Y=j.length;K=1):te.indexOf("OpenGL ES")!==-1&&(U=parseFloat(/^OpenGL ES (\d)/.exec(te)[1]),W=U>=2);let re=null,le={};const ce=t.getParameter(t.SCISSOR_BOX),Ce=t.getParameter(t.VIEWPORT),Re=new ir().fromArray(ce),Ie=new ir().fromArray(Ce);function He(be,gt,ft,Ye){const mt=new Uint8Array(4),Vt=t.createTexture();t.bindTexture(be,Vt),t.texParameteri(be,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(be,t.TEXTURE_MAG_FILTER,t.NEAREST);for(let _n=0;_n"u"?!1:/OculusBrowser/g.test(navigator.userAgent),y=new WeakMap;let x;const _=new WeakMap;let v=!1;try{v=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function S(z,B){return v?new OffscreenCanvas(z,B):jx("canvas")}function w(z,B,oe,ge){let pe=1;if((z.width>ge||z.height>ge)&&(pe=ge/Math.max(z.width,z.height)),pe<1||B===!0)if(typeof HTMLImageElement<"u"&&z instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&z instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&z instanceof ImageBitmap){const de=B?S2:Math.floor,ve=de(pe*z.width),Se=de(pe*z.height);x===void 0&&(x=S(ve,Se));const Pe=oe?S(ve,Se):x;return Pe.width=ve,Pe.height=Se,Pe.getContext("2d").drawImage(z,0,0,ve,Se),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+z.width+"x"+z.height+") to ("+ve+"x"+Se+")."),Pe}else return"data"in z&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+z.width+"x"+z.height+")."),z;return z}function E(z){return _P(z.width)&&_P(z.height)}function T(z){return s?!1:z.wrapS!==uo||z.wrapT!==uo||z.minFilter!==ci&&z.minFilter!==wi}function C(z,B){return z.generateMipmaps&&B&&z.minFilter!==ci&&z.minFilter!==wi}function D(z){t.generateMipmap(z)}function O(z,B,oe,ge,pe=!1){if(s===!1)return B;if(z!==null){if(t[z]!==void 0)return t[z];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+z+"'")}let de=B;if(B===t.RED&&(oe===t.FLOAT&&(de=t.R32F),oe===t.HALF_FLOAT&&(de=t.R16F),oe===t.UNSIGNED_BYTE&&(de=t.R8)),B===t.RED_INTEGER&&(oe===t.UNSIGNED_BYTE&&(de=t.R8UI),oe===t.UNSIGNED_SHORT&&(de=t.R16UI),oe===t.UNSIGNED_INT&&(de=t.R32UI),oe===t.BYTE&&(de=t.R8I),oe===t.SHORT&&(de=t.R16I),oe===t.INT&&(de=t.R32I)),B===t.RG&&(oe===t.FLOAT&&(de=t.RG32F),oe===t.HALF_FLOAT&&(de=t.RG16F),oe===t.UNSIGNED_BYTE&&(de=t.RG8)),B===t.RGBA){const ve=pe?$x:ar.getTransfer(ge);oe===t.FLOAT&&(de=t.RGBA32F),oe===t.HALF_FLOAT&&(de=t.RGBA16F),oe===t.UNSIGNED_BYTE&&(de=ve===Er?t.SRGB8_ALPHA8:t.RGBA8),oe===t.UNSIGNED_SHORT_4_4_4_4&&(de=t.RGBA4),oe===t.UNSIGNED_SHORT_5_5_5_1&&(de=t.RGB5_A1)}return(de===t.R16F||de===t.R32F||de===t.RG16F||de===t.RG32F||de===t.RGBA16F||de===t.RGBA32F)&&e.get("EXT_color_buffer_float"),de}function P(z,B,oe){return C(z,oe)===!0||z.isFramebufferTexture&&z.minFilter!==ci&&z.minFilter!==wi?Math.log2(Math.max(B.width,B.height))+1:z.mipmaps!==void 0&&z.mipmaps.length>0?z.mipmaps.length:z.isCompressedTexture&&Array.isArray(z.image)?B.mipmaps.length:1}function N(z){return z===ci||z===_2||z===G1?t.NEAREST:t.LINEAR}function k(z){const B=z.target;B.removeEventListener("dispose",k),Z(B),B.isVideoTexture&&y.delete(B)}function G(z){const B=z.target;B.removeEventListener("dispose",G),K(B)}function Z(z){const B=r.get(z);if(B.__webglInit===void 0)return;const oe=z.source,ge=_.get(oe);if(ge){const pe=ge[B.__cacheKey];pe.usedTimes--,pe.usedTimes===0&&j(z),Object.keys(ge).length===0&&_.delete(oe)}r.remove(z)}function j(z){const B=r.get(z);t.deleteTexture(B.__webglTexture);const oe=z.source,ge=_.get(oe);delete ge[B.__cacheKey],a.memory.textures--}function K(z){const B=z.texture,oe=r.get(z),ge=r.get(B);if(ge.__webglTexture!==void 0&&(t.deleteTexture(ge.__webglTexture),a.memory.textures--),z.depthTexture&&z.depthTexture.dispose(),z.isWebGLCubeRenderTarget)for(let pe=0;pe<6;pe++){if(Array.isArray(oe.__webglFramebuffer[pe]))for(let de=0;de=l&&console.warn("THREE.WebGLTextures: Trying to use "+z+" texture units while this GPU supports only "+l),Y+=1,z}function U(z){const B=[];return B.push(z.wrapS),B.push(z.wrapT),B.push(z.wrapR||0),B.push(z.magFilter),B.push(z.minFilter),B.push(z.anisotropy),B.push(z.internalFormat),B.push(z.format),B.push(z.type),B.push(z.generateMipmaps),B.push(z.premultiplyAlpha),B.push(z.flipY),B.push(z.unpackAlignment),B.push(z.colorSpace),B.join()}function te(z,B){const oe=r.get(z);if(z.isVideoTexture&&We(z),z.isRenderTargetTexture===!1&&z.version>0&&oe.__version!==z.version){const ge=z.image;if(ge===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(ge.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{Qe(oe,z,B);return}}n.bindTexture(t.TEXTURE_2D,oe.__webglTexture,t.TEXTURE0+B)}function re(z,B){const oe=r.get(z);if(z.version>0&&oe.__version!==z.version){Qe(oe,z,B);return}n.bindTexture(t.TEXTURE_2D_ARRAY,oe.__webglTexture,t.TEXTURE0+B)}function le(z,B){const oe=r.get(z);if(z.version>0&&oe.__version!==z.version){Qe(oe,z,B);return}n.bindTexture(t.TEXTURE_3D,oe.__webglTexture,t.TEXTURE0+B)}function ce(z,B){const oe=r.get(z);if(z.version>0&&oe.__version!==z.version){ct(oe,z,B);return}n.bindTexture(t.TEXTURE_CUBE_MAP,oe.__webglTexture,t.TEXTURE0+B)}const Ce={[Lx]:t.REPEAT,[uo]:t.CLAMP_TO_EDGE,[kx]:t.MIRRORED_REPEAT},Re={[ci]:t.NEAREST,[_2]:t.NEAREST_MIPMAP_NEAREST,[G1]:t.NEAREST_MIPMAP_LINEAR,[wi]:t.LINEAR,[u4]:t.LINEAR_MIPMAP_NEAREST,[Hd]:t.LINEAR_MIPMAP_LINEAR},Ie={[YW]:t.NEVER,[nG]:t.ALWAYS,[KW]:t.LESS,[JW]:t.LEQUAL,[ZW]:t.EQUAL,[tG]:t.GEQUAL,[QW]:t.GREATER,[eG]:t.NOTEQUAL};function He(z,B,oe){if(oe?(t.texParameteri(z,t.TEXTURE_WRAP_S,Ce[B.wrapS]),t.texParameteri(z,t.TEXTURE_WRAP_T,Ce[B.wrapT]),(z===t.TEXTURE_3D||z===t.TEXTURE_2D_ARRAY)&&t.texParameteri(z,t.TEXTURE_WRAP_R,Ce[B.wrapR]),t.texParameteri(z,t.TEXTURE_MAG_FILTER,Re[B.magFilter]),t.texParameteri(z,t.TEXTURE_MIN_FILTER,Re[B.minFilter])):(t.texParameteri(z,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(z,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),(z===t.TEXTURE_3D||z===t.TEXTURE_2D_ARRAY)&&t.texParameteri(z,t.TEXTURE_WRAP_R,t.CLAMP_TO_EDGE),(B.wrapS!==uo||B.wrapT!==uo)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),t.texParameteri(z,t.TEXTURE_MAG_FILTER,N(B.magFilter)),t.texParameteri(z,t.TEXTURE_MIN_FILTER,N(B.minFilter)),B.minFilter!==ci&&B.minFilter!==wi&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),B.compareFunction&&(t.texParameteri(z,t.TEXTURE_COMPARE_MODE,t.COMPARE_REF_TO_TEXTURE),t.texParameteri(z,t.TEXTURE_COMPARE_FUNC,Ie[B.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){const ge=e.get("EXT_texture_filter_anisotropic");if(B.magFilter===ci||B.minFilter!==G1&&B.minFilter!==Hd||B.type===eu&&e.has("OES_texture_float_linear")===!1||s===!1&&B.type===Vp&&e.has("OES_texture_half_float_linear")===!1)return;(B.anisotropy>1||r.get(B).__currentAnisotropy)&&(t.texParameterf(z,ge.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(B.anisotropy,i.getMaxAnisotropy())),r.get(B).__currentAnisotropy=B.anisotropy)}}function tt(z,B){let oe=!1;z.__webglInit===void 0&&(z.__webglInit=!0,B.addEventListener("dispose",k));const ge=B.source;let pe=_.get(ge);pe===void 0&&(pe={},_.set(ge,pe));const de=U(B);if(de!==z.__cacheKey){pe[de]===void 0&&(pe[de]={texture:t.createTexture(),usedTimes:0},a.memory.textures++,oe=!0),pe[de].usedTimes++;const ve=pe[z.__cacheKey];ve!==void 0&&(pe[z.__cacheKey].usedTimes--,ve.usedTimes===0&&j(B)),z.__cacheKey=de,z.__webglTexture=pe[de].texture}return oe}function Qe(z,B,oe){let ge=t.TEXTURE_2D;(B.isDataArrayTexture||B.isCompressedArrayTexture)&&(ge=t.TEXTURE_2D_ARRAY),B.isData3DTexture&&(ge=t.TEXTURE_3D);const pe=tt(z,B),de=B.source;n.bindTexture(ge,z.__webglTexture,t.TEXTURE0+oe);const ve=r.get(de);if(de.version!==ve.__version||pe===!0){n.activeTexture(t.TEXTURE0+oe);const Se=ar.getPrimaries(ar.workingColorSpace),Pe=B.colorSpace===Ds?null:ar.getPrimaries(B.colorSpace),Be=B.colorSpace===Ds||Se===Pe?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,B.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,B.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,B.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,Be);const je=T(B)&&E(B.image)===!1;let Le=w(B.image,je,!1,c);Le=lt(B,Le);const _t=E(Le)||s,xt=o.convert(B.format,B.colorSpace);let wt=o.convert(B.type),Ct=O(B.internalFormat,xt,wt,B.colorSpace,B.isVideoTexture);He(ge,B,_t);let pt;const jt=B.mipmaps,be=s&&B.isVideoTexture!==!0,gt=ve.__version===void 0||pe===!0,ft=P(B,Le,_t);if(B.isDepthTexture)Ct=t.DEPTH_COMPONENT,s?B.type===eu?Ct=t.DEPTH_COMPONENT32F:B.type===Yc?Ct=t.DEPTH_COMPONENT24:B.type===Rd?Ct=t.DEPTH24_STENCIL8:Ct=t.DEPTH_COMPONENT16:B.type===eu&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),B.format===Pd&&Ct===t.DEPTH_COMPONENT&&B.type!==_C&&B.type!==Yc&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),B.type=Yc,wt=o.convert(B.type)),B.format===Wp&&Ct===t.DEPTH_COMPONENT&&(Ct=t.DEPTH_STENCIL,B.type!==Rd&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),B.type=Rd,wt=o.convert(B.type))),gt&&(be?n.texStorage2D(t.TEXTURE_2D,1,Ct,Le.width,Le.height):n.texImage2D(t.TEXTURE_2D,0,Ct,Le.width,Le.height,0,xt,wt,null));else if(B.isDataTexture)if(jt.length>0&&_t){be&>&&n.texStorage2D(t.TEXTURE_2D,ft,Ct,jt[0].width,jt[0].height);for(let Ye=0,mt=jt.length;Ye>=1,mt>>=1}}else if(jt.length>0&&_t){be&>&&n.texStorage2D(t.TEXTURE_2D,ft,Ct,jt[0].width,jt[0].height);for(let Ye=0,mt=jt.length;Ye0&>++,n.texStorage2D(t.TEXTURE_CUBE_MAP,gt,pt,Le[0].width,Le[0].height));for(let Ye=0;Ye<6;Ye++)if(je){jt?n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Ye,0,0,0,Le[Ye].width,Le[Ye].height,wt,Ct,Le[Ye].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Ye,0,pt,Le[Ye].width,Le[Ye].height,0,wt,Ct,Le[Ye].data);for(let mt=0;mt>de),Le=Math.max(1,B.height>>de);pe===t.TEXTURE_3D||pe===t.TEXTURE_2D_ARRAY?n.texImage3D(pe,de,Pe,je,Le,B.depth,0,ve,Se,null):n.texImage2D(pe,de,Pe,je,Le,0,ve,Se,null)}n.bindFramebuffer(t.FRAMEBUFFER,z),Ue(B)?d.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,ge,pe,r.get(oe).__webglTexture,0,Ne(B)):(pe===t.TEXTURE_2D||pe>=t.TEXTURE_CUBE_MAP_POSITIVE_X&&pe<=t.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&t.framebufferTexture2D(t.FRAMEBUFFER,ge,pe,r.get(oe).__webglTexture,de),n.bindFramebuffer(t.FRAMEBUFFER,null)}function ue(z,B,oe){if(t.bindRenderbuffer(t.RENDERBUFFER,z),B.depthBuffer&&!B.stencilBuffer){let ge=s===!0?t.DEPTH_COMPONENT24:t.DEPTH_COMPONENT16;if(oe||Ue(B)){const pe=B.depthTexture;pe&&pe.isDepthTexture&&(pe.type===eu?ge=t.DEPTH_COMPONENT32F:pe.type===Yc&&(ge=t.DEPTH_COMPONENT24));const de=Ne(B);Ue(B)?d.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,de,ge,B.width,B.height):t.renderbufferStorageMultisample(t.RENDERBUFFER,de,ge,B.width,B.height)}else t.renderbufferStorage(t.RENDERBUFFER,ge,B.width,B.height);t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,z)}else if(B.depthBuffer&&B.stencilBuffer){const ge=Ne(B);oe&&Ue(B)===!1?t.renderbufferStorageMultisample(t.RENDERBUFFER,ge,t.DEPTH24_STENCIL8,B.width,B.height):Ue(B)?d.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,ge,t.DEPTH24_STENCIL8,B.width,B.height):t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,B.width,B.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,z)}else{const ge=B.isWebGLMultipleRenderTargets===!0?B.texture:[B.texture];for(let pe=0;pe0){oe.__webglFramebuffer[Se]=[];for(let Pe=0;Pe0){oe.__webglFramebuffer=[];for(let Se=0;Se0&&Ue(z)===!1){const Se=de?B:[B];oe.__webglMultisampledFramebuffer=t.createFramebuffer(),oe.__webglColorRenderbuffer=[],n.bindFramebuffer(t.FRAMEBUFFER,oe.__webglMultisampledFramebuffer);for(let Pe=0;Pe0)for(let Pe=0;Pe0)for(let Pe=0;Pe0&&Ue(z)===!1){const B=z.isWebGLMultipleRenderTargets?z.texture:[z.texture],oe=z.width,ge=z.height;let pe=t.COLOR_BUFFER_BIT;const de=[],ve=z.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,Se=r.get(z),Pe=z.isWebGLMultipleRenderTargets===!0;if(Pe)for(let Be=0;Be0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&B.__useRenderToTexture!==!1}function We(z){const B=a.render.frame;y.get(z)!==B&&(y.set(z,B),z.update())}function lt(z,B){const oe=z.colorSpace,ge=z.format,pe=z.type;return z.isCompressedTexture===!0||z.isVideoTexture===!0||z.format===w2||oe!==tc&&oe!==Ds&&(ar.getTransfer(oe)===Er?s===!1?e.has("EXT_sRGB")===!0&&ge===ba?(z.format=w2,z.minFilter=wi,z.generateMipmaps=!1):B=b4.sRGBToLinear(B):(ge!==ba||pe!==Ls)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",oe)),B}this.allocateTextureUnit=W,this.resetTextureUnits=$,this.setTexture2D=te,this.setTexture2DArray=re,this.setTexture3D=le,this.setTextureCube=ce,this.rebindTextures=X,this.setupRenderTarget=ne,this.updateRenderTargetMipmap=me,this.updateMultisampleRenderTarget=we,this.setupDepthRenderbuffer=Ee,this.setupFrameBufferTexture=Xe,this.useMultisampledRTT=Ue}function vG(t,e,n){const r=n.isWebGL2;function i(o,a=Ds){let s;const l=ar.getTransfer(a);if(o===Ls)return t.UNSIGNED_BYTE;if(o===f4)return t.UNSIGNED_SHORT_4_4_4_4;if(o===d4)return t.UNSIGNED_SHORT_5_5_5_1;if(o===FW)return t.BYTE;if(o===LW)return t.SHORT;if(o===_C)return t.UNSIGNED_SHORT;if(o===c4)return t.INT;if(o===Yc)return t.UNSIGNED_INT;if(o===eu)return t.FLOAT;if(o===Vp)return r?t.HALF_FLOAT:(s=e.get("OES_texture_half_float"),s!==null?s.HALF_FLOAT_OES:null);if(o===kW)return t.ALPHA;if(o===ba)return t.RGBA;if(o===BW)return t.LUMINANCE;if(o===UW)return t.LUMINANCE_ALPHA;if(o===Pd)return t.DEPTH_COMPONENT;if(o===Wp)return t.DEPTH_STENCIL;if(o===w2)return s=e.get("EXT_sRGB"),s!==null?s.SRGB_ALPHA_EXT:null;if(o===h4)return t.RED;if(o===p4)return t.RED_INTEGER;if(o===zW)return t.RG;if(o===m4)return t.RG_INTEGER;if(o===g4)return t.RGBA_INTEGER;if(o===fE||o===dE||o===hE||o===pE)if(l===Er)if(s=e.get("WEBGL_compressed_texture_s3tc_srgb"),s!==null){if(o===fE)return s.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(o===dE)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(o===hE)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(o===pE)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(s=e.get("WEBGL_compressed_texture_s3tc"),s!==null){if(o===fE)return s.COMPRESSED_RGB_S3TC_DXT1_EXT;if(o===dE)return s.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(o===hE)return s.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(o===pE)return s.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(o===XR||o===YR||o===KR||o===ZR)if(s=e.get("WEBGL_compressed_texture_pvrtc"),s!==null){if(o===XR)return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(o===YR)return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(o===KR)return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(o===ZR)return s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(o===$W)return s=e.get("WEBGL_compressed_texture_etc1"),s!==null?s.COMPRESSED_RGB_ETC1_WEBGL:null;if(o===JR||o===QR)if(s=e.get("WEBGL_compressed_texture_etc"),s!==null){if(o===JR)return l===Er?s.COMPRESSED_SRGB8_ETC2:s.COMPRESSED_RGB8_ETC2;if(o===QR)return l===Er?s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:s.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(o===eP||o===tP||o===nP||o===rP||o===iP||o===oP||o===aP||o===sP||o===lP||o===uP||o===cP||o===fP||o===dP||o===hP)if(s=e.get("WEBGL_compressed_texture_astc"),s!==null){if(o===eP)return l===Er?s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:s.COMPRESSED_RGBA_ASTC_4x4_KHR;if(o===tP)return l===Er?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:s.COMPRESSED_RGBA_ASTC_5x4_KHR;if(o===nP)return l===Er?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:s.COMPRESSED_RGBA_ASTC_5x5_KHR;if(o===rP)return l===Er?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:s.COMPRESSED_RGBA_ASTC_6x5_KHR;if(o===iP)return l===Er?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:s.COMPRESSED_RGBA_ASTC_6x6_KHR;if(o===oP)return l===Er?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:s.COMPRESSED_RGBA_ASTC_8x5_KHR;if(o===aP)return l===Er?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:s.COMPRESSED_RGBA_ASTC_8x6_KHR;if(o===sP)return l===Er?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:s.COMPRESSED_RGBA_ASTC_8x8_KHR;if(o===lP)return l===Er?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:s.COMPRESSED_RGBA_ASTC_10x5_KHR;if(o===uP)return l===Er?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:s.COMPRESSED_RGBA_ASTC_10x6_KHR;if(o===cP)return l===Er?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:s.COMPRESSED_RGBA_ASTC_10x8_KHR;if(o===fP)return l===Er?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:s.COMPRESSED_RGBA_ASTC_10x10_KHR;if(o===dP)return l===Er?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:s.COMPRESSED_RGBA_ASTC_12x10_KHR;if(o===hP)return l===Er?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:s.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(o===mE||o===pP||o===mP)if(s=e.get("EXT_texture_compression_bptc"),s!==null){if(o===mE)return l===Er?s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:s.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(o===pP)return s.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(o===mP)return s.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(o===HW||o===gP||o===vP||o===yP)if(s=e.get("EXT_texture_compression_rgtc"),s!==null){if(o===mE)return s.COMPRESSED_RED_RGTC1_EXT;if(o===gP)return s.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(o===vP)return s.COMPRESSED_RED_GREEN_RGTC2_EXT;if(o===yP)return s.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return o===Rd?r?t.UNSIGNED_INT_24_8:(s=e.get("WEBGL_depth_texture"),s!==null?s.UNSIGNED_INT_24_8_WEBGL:null):t[o]!==void 0?t[o]:null}return{convert:i}}class yG extends lo{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}let yg=class extends Kn{constructor(){super(),this.isGroup=!0,this.type="Group"}};const sMe={type:"move"};class b3{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new yg,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 yg,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new ae,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new ae),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new yg,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new ae,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new ae),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 n=this._hand;if(n)for(const r of e.hand.values())this._getHandJoint(n,r)}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,n,r){let i=null,o=null,a=null;const s=this._targetRay,l=this._grip,u=this._hand;if(e&&n.session.visibilityState!=="visible-blurred"){if(u&&e.hand){a=!0;for(const x of e.hand.values()){const _=n.getJointPose(x,r),v=this._getHandJoint(u,x);_!==null&&(v.matrix.fromArray(_.transform.matrix),v.matrix.decompose(v.position,v.rotation,v.scale),v.matrixWorldNeedsUpdate=!0,v.jointRadius=_.radius),v.visible=_!==null}const c=u.joints["index-finger-tip"],f=u.joints["thumb-tip"],d=c.position.distanceTo(f.position),p=.02,y=.005;u.inputState.pinching&&d>p+y?(u.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!u.inputState.pinching&&d<=p-y&&(u.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(o=n.getPose(e.gripSpace,r),o!==null&&(l.matrix.fromArray(o.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,o.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(o.linearVelocity)):l.hasLinearVelocity=!1,o.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(o.angularVelocity)):l.hasAngularVelocity=!1));s!==null&&(i=n.getPose(e.targetRaySpace,r),i===null&&o!==null&&(i=o),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(sMe)))}return s!==null&&(s.visible=i!==null),l!==null&&(l.visible=o!==null),u!==null&&(u.visible=a!==null),this}_getHandJoint(e,n){if(e.joints[n.jointName]===void 0){const r=new yg;r.matrixAutoUpdate=!1,r.visible=!1,e.joints[n.jointName]=r,e.add(r)}return e.joints[n.jointName]}}class xG extends hi{constructor(e,n,r,i,o,a,s,l,u,c){if(c=c!==void 0?c:Pd,c!==Pd&&c!==Wp)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");r===void 0&&c===Pd&&(r=Yc),r===void 0&&c===Wp&&(r=Rd),super(null,i,o,a,s,l,c,r,u),this.isDepthTexture=!0,this.image={width:e,height:n},this.magFilter=s!==void 0?s:ci,this.minFilter=l!==void 0?l:ci,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.compareFunction=e.compareFunction,this}toJSON(e){const n=super.toJSON(e);return this.compareFunction!==null&&(n.compareFunction=this.compareFunction),n}}class lMe extends vf{constructor(e,n){super();const r=this;let i=null,o=1,a=null,s="local-floor",l=1,u=null,c=null,f=null,d=null,p=null,y=null;const x=n.getContextAttributes();let _=null,v=null;const S=[],w=[],E=new lo;E.layers.enable(1),E.viewport=new ir;const T=new lo;T.layers.enable(2),T.viewport=new ir;const C=[E,T],D=new yG;D.layers.enable(1),D.layers.enable(2);let O=null,P=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(re){let le=S[re];return le===void 0&&(le=new b3,S[re]=le),le.getTargetRaySpace()},this.getControllerGrip=function(re){let le=S[re];return le===void 0&&(le=new b3,S[re]=le),le.getGripSpace()},this.getHand=function(re){let le=S[re];return le===void 0&&(le=new b3,S[re]=le),le.getHandSpace()};function N(re){const le=w.indexOf(re.inputSource);if(le===-1)return;const ce=S[le];ce!==void 0&&(ce.update(re.inputSource,re.frame,u||a),ce.dispatchEvent({type:re.type,data:re.inputSource}))}function k(){i.removeEventListener("select",N),i.removeEventListener("selectstart",N),i.removeEventListener("selectend",N),i.removeEventListener("squeeze",N),i.removeEventListener("squeezestart",N),i.removeEventListener("squeezeend",N),i.removeEventListener("end",k),i.removeEventListener("inputsourceschange",G);for(let re=0;re=0&&(w[Ce]=null,S[Ce].disconnect(ce))}for(let le=0;le=w.length){w.push(ce),Ce=Ie;break}else if(w[Ie]===null){w[Ie]=ce,Ce=Ie;break}if(Ce===-1)break}const Re=S[Ce];Re&&Re.connect(ce)}}const Z=new ae,j=new ae;function K(re,le,ce){Z.setFromMatrixPosition(le.matrixWorld),j.setFromMatrixPosition(ce.matrixWorld);const Ce=Z.distanceTo(j),Re=le.projectionMatrix.elements,Ie=ce.projectionMatrix.elements,He=Re[14]/(Re[10]-1),tt=Re[14]/(Re[10]+1),Qe=(Re[9]+1)/Re[5],ct=(Re[9]-1)/Re[5],Xe=(Re[8]-1)/Re[0],ue=(Ie[8]+1)/Ie[0],De=He*Xe,Ee=He*ue,X=Ce/(-Xe+ue),ne=X*-Xe;le.matrixWorld.decompose(re.position,re.quaternion,re.scale),re.translateX(ne),re.translateZ(X),re.matrixWorld.compose(re.position,re.quaternion,re.scale),re.matrixWorldInverse.copy(re.matrixWorld).invert();const me=He+X,we=tt+X,Ne=De-ne,Ue=Ee+(Ce-ne),We=Qe*tt/we*me,lt=ct*tt/we*me;re.projectionMatrix.makePerspective(Ne,Ue,We,lt,me,we),re.projectionMatrixInverse.copy(re.projectionMatrix).invert()}function Y(re,le){le===null?re.matrixWorld.copy(re.matrix):re.matrixWorld.multiplyMatrices(le.matrixWorld,re.matrix),re.matrixWorldInverse.copy(re.matrixWorld).invert()}this.updateCamera=function(re){if(i===null)return;D.near=T.near=E.near=re.near,D.far=T.far=E.far=re.far,(O!==D.near||P!==D.far)&&(i.updateRenderState({depthNear:D.near,depthFar:D.far}),O=D.near,P=D.far);const le=re.parent,ce=D.cameras;Y(D,le);for(let Ce=0;Ce0&&(_.alphaTest.value=v.alphaTest);const S=e.get(v).envMap;if(S&&(_.envMap.value=S,_.flipEnvMap.value=S.isCubeTexture&&S.isRenderTargetTexture===!1?-1:1,_.reflectivity.value=v.reflectivity,_.ior.value=v.ior,_.refractionRatio.value=v.refractionRatio),v.lightMap){_.lightMap.value=v.lightMap;const w=t._useLegacyLights===!0?Math.PI:1;_.lightMapIntensity.value=v.lightMapIntensity*w,n(v.lightMap,_.lightMapTransform)}v.aoMap&&(_.aoMap.value=v.aoMap,_.aoMapIntensity.value=v.aoMapIntensity,n(v.aoMap,_.aoMapTransform))}function a(_,v){_.diffuse.value.copy(v.color),_.opacity.value=v.opacity,v.map&&(_.map.value=v.map,n(v.map,_.mapTransform))}function s(_,v){_.dashSize.value=v.dashSize,_.totalSize.value=v.dashSize+v.gapSize,_.scale.value=v.scale}function l(_,v,S,w){_.diffuse.value.copy(v.color),_.opacity.value=v.opacity,_.size.value=v.size*S,_.scale.value=w*.5,v.map&&(_.map.value=v.map,n(v.map,_.uvTransform)),v.alphaMap&&(_.alphaMap.value=v.alphaMap,n(v.alphaMap,_.alphaMapTransform)),v.alphaTest>0&&(_.alphaTest.value=v.alphaTest)}function u(_,v){_.diffuse.value.copy(v.color),_.opacity.value=v.opacity,_.rotation.value=v.rotation,v.map&&(_.map.value=v.map,n(v.map,_.mapTransform)),v.alphaMap&&(_.alphaMap.value=v.alphaMap,n(v.alphaMap,_.alphaMapTransform)),v.alphaTest>0&&(_.alphaTest.value=v.alphaTest)}function c(_,v){_.specular.value.copy(v.specular),_.shininess.value=Math.max(v.shininess,1e-4)}function f(_,v){v.gradientMap&&(_.gradientMap.value=v.gradientMap)}function d(_,v){_.metalness.value=v.metalness,v.metalnessMap&&(_.metalnessMap.value=v.metalnessMap,n(v.metalnessMap,_.metalnessMapTransform)),_.roughness.value=v.roughness,v.roughnessMap&&(_.roughnessMap.value=v.roughnessMap,n(v.roughnessMap,_.roughnessMapTransform)),e.get(v).envMap&&(_.envMapIntensity.value=v.envMapIntensity)}function p(_,v,S){_.ior.value=v.ior,v.sheen>0&&(_.sheenColor.value.copy(v.sheenColor).multiplyScalar(v.sheen),_.sheenRoughness.value=v.sheenRoughness,v.sheenColorMap&&(_.sheenColorMap.value=v.sheenColorMap,n(v.sheenColorMap,_.sheenColorMapTransform)),v.sheenRoughnessMap&&(_.sheenRoughnessMap.value=v.sheenRoughnessMap,n(v.sheenRoughnessMap,_.sheenRoughnessMapTransform))),v.clearcoat>0&&(_.clearcoat.value=v.clearcoat,_.clearcoatRoughness.value=v.clearcoatRoughness,v.clearcoatMap&&(_.clearcoatMap.value=v.clearcoatMap,n(v.clearcoatMap,_.clearcoatMapTransform)),v.clearcoatRoughnessMap&&(_.clearcoatRoughnessMap.value=v.clearcoatRoughnessMap,n(v.clearcoatRoughnessMap,_.clearcoatRoughnessMapTransform)),v.clearcoatNormalMap&&(_.clearcoatNormalMap.value=v.clearcoatNormalMap,n(v.clearcoatNormalMap,_.clearcoatNormalMapTransform),_.clearcoatNormalScale.value.copy(v.clearcoatNormalScale),v.side===Sa&&_.clearcoatNormalScale.value.negate())),v.iridescence>0&&(_.iridescence.value=v.iridescence,_.iridescenceIOR.value=v.iridescenceIOR,_.iridescenceThicknessMinimum.value=v.iridescenceThicknessRange[0],_.iridescenceThicknessMaximum.value=v.iridescenceThicknessRange[1],v.iridescenceMap&&(_.iridescenceMap.value=v.iridescenceMap,n(v.iridescenceMap,_.iridescenceMapTransform)),v.iridescenceThicknessMap&&(_.iridescenceThicknessMap.value=v.iridescenceThicknessMap,n(v.iridescenceThicknessMap,_.iridescenceThicknessMapTransform))),v.transmission>0&&(_.transmission.value=v.transmission,_.transmissionSamplerMap.value=S.texture,_.transmissionSamplerSize.value.set(S.width,S.height),v.transmissionMap&&(_.transmissionMap.value=v.transmissionMap,n(v.transmissionMap,_.transmissionMapTransform)),_.thickness.value=v.thickness,v.thicknessMap&&(_.thicknessMap.value=v.thicknessMap,n(v.thicknessMap,_.thicknessMapTransform)),_.attenuationDistance.value=v.attenuationDistance,_.attenuationColor.value.copy(v.attenuationColor)),v.anisotropy>0&&(_.anisotropyVector.value.set(v.anisotropy*Math.cos(v.anisotropyRotation),v.anisotropy*Math.sin(v.anisotropyRotation)),v.anisotropyMap&&(_.anisotropyMap.value=v.anisotropyMap,n(v.anisotropyMap,_.anisotropyMapTransform))),_.specularIntensity.value=v.specularIntensity,_.specularColor.value.copy(v.specularColor),v.specularColorMap&&(_.specularColorMap.value=v.specularColorMap,n(v.specularColorMap,_.specularColorMapTransform)),v.specularIntensityMap&&(_.specularIntensityMap.value=v.specularIntensityMap,n(v.specularIntensityMap,_.specularIntensityMapTransform))}function y(_,v){v.matcap&&(_.matcap.value=v.matcap)}function x(_,v){const S=e.get(v).light;_.referencePosition.value.setFromMatrixPosition(S.matrixWorld),_.nearDistance.value=S.shadow.camera.near,_.farDistance.value=S.shadow.camera.far}return{refreshFogUniforms:r,refreshMaterialUniforms:i}}function cMe(t,e,n,r){let i={},o={},a=[];const s=n.isWebGL2?t.getParameter(t.MAX_UNIFORM_BUFFER_BINDINGS):0;function l(S,w){const E=w.program;r.uniformBlockBinding(S,E)}function u(S,w){let E=i[S.id];E===void 0&&(y(S),E=c(S),i[S.id]=E,S.addEventListener("dispose",_));const T=w.program;r.updateUBOMapping(S,T);const C=e.render.frame;o[S.id]!==C&&(d(S),o[S.id]=C)}function c(S){const w=f();S.__bindingPointIndex=w;const E=t.createBuffer(),T=S.__size,C=S.usage;return t.bindBuffer(t.UNIFORM_BUFFER,E),t.bufferData(t.UNIFORM_BUFFER,T,C),t.bindBuffer(t.UNIFORM_BUFFER,null),t.bindBufferBase(t.UNIFORM_BUFFER,w,E),E}function f(){for(let S=0;S0){C=E%T;const G=T-C;C!==0&&G-N.boundary<0&&(E+=T-C,P.__offset=E)}E+=N.storage}return C=E%T,C>0&&(E+=T-C),S.__size=E,S.__cache={},this}function x(S){const w={boundary:0,storage:0};return typeof S=="number"?(w.boundary=4,w.storage=4):S.isVector2?(w.boundary=8,w.storage=8):S.isVector3||S.isColor?(w.boundary=16,w.storage=12):S.isVector4?(w.boundary=16,w.storage=16):S.isMatrix3?(w.boundary=48,w.storage=48):S.isMatrix4?(w.boundary=64,w.storage=64):S.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",S),w}function _(S){const w=S.target;w.removeEventListener("dispose",_);const E=a.indexOf(w.__bindingPointIndex);a.splice(E,1),t.deleteBuffer(i[w.id]),delete i[w.id],delete o[w.id]}function v(){for(const S in i)t.deleteBuffer(i[S]);a=[],i={},o={}}return{bind:l,update:u,dispose:v}}class A4{constructor(e={}){const{canvas:n=oG(),context:r=null,depth:i=!0,stencil:o=!0,alpha:a=!1,antialias:s=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:u=!1,powerPreference:c="default",failIfMajorPerformanceCaveat:f=!1}=e;this.isWebGLRenderer=!0;let d;r!==null?d=r.getContextAttributes().alpha:d=a;const p=new Uint32Array(4),y=new Int32Array(4);let x=null,_=null;const v=[],S=[];this.domElement=n,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._outputColorSpace=Hi,this._useLegacyLights=!1,this.toneMapping=qu,this.toneMappingExposure=1;const w=this;let E=!1,T=0,C=0,D=null,O=-1,P=null;const N=new ir,k=new ir;let G=null;const Z=new Pt(0);let j=0,K=n.width,Y=n.height,$=1,W=null,U=null;const te=new ir(0,0,K,Y),re=new ir(0,0,K,Y);let le=!1;const ce=new MC;let Ce=!1,Re=!1,Ie=null;const He=new xn,tt=new Je,Qe=new ae,ct={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function Xe(){return D===null?$:1}let ue=r;function De(J,_e){for(let Oe=0;Oe{function Mt(){if(ke.forEach(function(Ft){we.get(Ft).currentProgram.isReady()&&ke.delete(Ft)}),ke.size===0){ze(J);return}setTimeout(Mt,10)}Ee.get("KHR_parallel_shader_compile")!==null?Mt():setTimeout(Mt,10)})};let _n=null;function Zn(J){_n&&_n(J)}function Cr(){En.stop()}function dn(){En.start()}const En=new dG;En.setAnimationLoop(Zn),typeof self<"u"&&En.setContext(self),this.setAnimationLoop=function(J){_n=J,pt.setAnimationLoop(J),J===null?En.stop():En.start()},pt.addEventListener("sessionstart",Cr),pt.addEventListener("sessionend",dn),this.render=function(J,_e){if(_e!==void 0&&_e.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(E===!0)return;J.matrixWorldAutoUpdate===!0&&J.updateMatrixWorld(),_e.parent===null&&_e.matrixWorldAutoUpdate===!0&&_e.updateMatrixWorld(),pt.enabled===!0&&pt.isPresenting===!0&&(pt.cameraAutoUpdate===!0&&pt.updateCamera(_e),_e=pt.getCamera()),J.isScene===!0&&J.onBeforeRender(w,J,_e,D),_=de.get(J,S.length),_.init(),S.push(_),He.multiplyMatrices(_e.projectionMatrix,_e.matrixWorldInverse),ce.setFromProjectionMatrix(He),Re=this.localClippingEnabled,Ce=ve.init(this.clippingPlanes,Re),x=pe.get(J,v.length),x.init(),v.push(x),ur(J,_e,0,w.sortObjects),x.finish(),w.sortObjects===!0&&x.sort(W,U),this.info.render.frame++,Ce===!0&&ve.beginShadows();const Oe=_.state.shadowsArray;if(Se.render(Oe,J,_e),Ce===!0&&ve.endShadows(),this.info.autoReset===!0&&this.info.reset(),Pe.render(x,J),_.setupLights(w._useLegacyLights),_e.isArrayCamera){const ke=_e.cameras;for(let ze=0,Mt=ke.length;ze0?_=S[S.length-1]:_=null,v.pop(),v.length>0?x=v[v.length-1]:x=null};function ur(J,_e,Oe,ke){if(J.visible===!1)return;if(J.layers.test(_e.layers)){if(J.isGroup)Oe=J.renderOrder;else if(J.isLOD)J.autoUpdate===!0&&J.update(_e);else if(J.isLight)_.pushLight(J),J.castShadow&&_.pushShadow(J);else if(J.isSprite){if(!J.frustumCulled||ce.intersectsSprite(J)){ke&&Qe.setFromMatrixPosition(J.matrixWorld).applyMatrix4(He);const Ft=B.update(J),Wt=J.material;Wt.visible&&x.push(J,Ft,Wt,Oe,Qe.z,null)}}else if((J.isMesh||J.isLine||J.isPoints)&&(!J.frustumCulled||ce.intersectsObject(J))){const Ft=B.update(J),Wt=J.material;if(ke&&(J.boundingSphere!==void 0?(J.boundingSphere===null&&J.computeBoundingSphere(),Qe.copy(J.boundingSphere.center)):(Ft.boundingSphere===null&&Ft.computeBoundingSphere(),Qe.copy(Ft.boundingSphere.center)),Qe.applyMatrix4(J.matrixWorld).applyMatrix4(He)),Array.isArray(Wt)){const vt=Ft.groups;for(let Lt=0,sn=vt.length;Lt0&&Ta(ze,Mt,_e,Oe),ke&&ne.viewport(N.copy(ke)),ze.length>0&&ns(ze,_e,Oe),Mt.length>0&&ns(Mt,_e,Oe),Ft.length>0&&ns(Ft,_e,Oe),ne.buffers.depth.setTest(!0),ne.buffers.depth.setMask(!0),ne.buffers.color.setMask(!0),ne.setPolygonOffset(!1)}function Ta(J,_e,Oe,ke){if((Oe.isScene===!0?Oe.overrideMaterial:null)!==null)return;const Mt=X.isWebGL2;Ie===null&&(Ie=new su(1,1,{generateMipmaps:!0,type:Ee.has("EXT_color_buffer_half_float")?Vp:Ls,minFilter:Hd,samples:Mt?4:0})),w.getDrawingBufferSize(tt),Mt?Ie.setSize(tt.x,tt.y):Ie.setSize(S2(tt.x),S2(tt.y));const Ft=w.getRenderTarget();w.setRenderTarget(Ie),w.getClearColor(Z),j=w.getClearAlpha(),j<1&&w.setClearColor(16777215,.5),w.clear();const Wt=w.toneMapping;w.toneMapping=qu,ns(J,Oe,ke),Ne.updateMultisampleRenderTarget(Ie),Ne.updateRenderTargetMipmap(Ie);let vt=!1;for(let Lt=0,sn=_e.length;Lt0),en=!!Oe.morphAttributes.position,Xn=!!Oe.morphAttributes.normal,Qr=!!Oe.morphAttributes.color;let cr=qu;ke.toneMapped&&(D===null||D.isXRRenderTarget===!0)&&(cr=w.toneMapping);const Si=Oe.morphAttributes.position||Oe.morphAttributes.normal||Oe.morphAttributes.color,ln=Si!==void 0?Si.length:0,It=we.get(ke),Da=_.state.lights;if(Ce===!0&&(Re===!0||J!==P)){const Mi=J===P&&ke.id===O;ve.setState(ke,J,Mi)}let Nn=!1;ke.version===It.__version?(It.needsLights&&It.lightsStateVersion!==Da.state.version||It.outputColorSpace!==Wt||ze.isInstancedMesh&&It.instancing===!1||!ze.isInstancedMesh&&It.instancing===!0||ze.isSkinnedMesh&&It.skinning===!1||!ze.isSkinnedMesh&&It.skinning===!0||ze.isInstancedMesh&&It.instancingColor===!0&&ze.instanceColor===null||ze.isInstancedMesh&&It.instancingColor===!1&&ze.instanceColor!==null||It.envMap!==vt||ke.fog===!0&&It.fog!==Mt||It.numClippingPlanes!==void 0&&(It.numClippingPlanes!==ve.numPlanes||It.numIntersection!==ve.numIntersection)||It.vertexAlphas!==Lt||It.vertexTangents!==sn||It.morphTargets!==en||It.morphNormals!==Xn||It.morphColors!==Qr||It.toneMapping!==cr||X.isWebGL2===!0&&It.morphTargetsCount!==ln)&&(Nn=!0):(Nn=!0,It.__version=ke.version);let Ar=It.currentProgram;Nn===!0&&(Ar=ea(ke,_e,ze));let rs=!1,Fo=!1,Ei=!1;const $r=Ar.getUniforms(),na=It.uniforms;if(ne.useProgram(Ar.program)&&(rs=!0,Fo=!0,Ei=!0),ke.id!==O&&(O=ke.id,Fo=!0),rs||P!==J){$r.setValue(ue,"projectionMatrix",J.projectionMatrix),$r.setValue(ue,"viewMatrix",J.matrixWorldInverse);const Mi=$r.map.cameraPosition;Mi!==void 0&&Mi.setValue(ue,Qe.setFromMatrixPosition(J.matrixWorld)),X.logarithmicDepthBuffer&&$r.setValue(ue,"logDepthBufFC",2/(Math.log(J.far+1)/Math.LN2)),(ke.isMeshPhongMaterial||ke.isMeshToonMaterial||ke.isMeshLambertMaterial||ke.isMeshBasicMaterial||ke.isMeshStandardMaterial||ke.isShaderMaterial)&&$r.setValue(ue,"isOrthographic",J.isOrthographicCamera===!0),P!==J&&(P=J,Fo=!0,Ei=!0)}if(ze.isSkinnedMesh){$r.setOptional(ue,ze,"bindMatrix"),$r.setOptional(ue,ze,"bindMatrixInverse");const Mi=ze.skeleton;Mi&&(X.floatVertexTextures?(Mi.boneTexture===null&&Mi.computeBoneTexture(),$r.setValue(ue,"boneTexture",Mi.boneTexture,Ne),$r.setValue(ue,"boneTextureSize",Mi.boneTextureSize)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}const cc=Oe.morphAttributes;if((cc.position!==void 0||cc.normal!==void 0||cc.color!==void 0&&X.isWebGL2===!0)&&Be.update(ze,Oe,Ar),(Fo||It.receiveShadow!==ze.receiveShadow)&&(It.receiveShadow=ze.receiveShadow,$r.setValue(ue,"receiveShadow",ze.receiveShadow)),ke.isMeshGouraudMaterial&&ke.envMap!==null&&(na.envMap.value=vt,na.flipEnvMap.value=vt.isCubeTexture&&vt.isRenderTargetTexture===!1?-1:1),Fo&&($r.setValue(ue,"toneMappingExposure",w.toneMappingExposure),It.needsLights&&Ge(na,Ei),Mt&&ke.fog===!0&&ge.refreshFogUniforms(na,Mt),ge.refreshMaterialUniforms(na,ke,$,Y,Ie),vE.upload(ue,Io(It),na,Ne)),ke.isShaderMaterial&&ke.uniformsNeedUpdate===!0&&(vE.upload(ue,Io(It),na,Ne),ke.uniformsNeedUpdate=!1),ke.isSpriteMaterial&&$r.setValue(ue,"center",ze.center),$r.setValue(ue,"modelViewMatrix",ze.modelViewMatrix),$r.setValue(ue,"normalMatrix",ze.normalMatrix),$r.setValue(ue,"modelMatrix",ze.matrixWorld),ke.isShaderMaterial||ke.isRawShaderMaterial){const Mi=ke.uniformsGroups;for(let fc=0,Lo=Mi.length;fc0&&Ne.useMultisampledRTT(J)===!1?ze=we.get(J).__webglMultisampledFramebuffer:Array.isArray(sn)?ze=sn[Oe]:ze=sn,N.copy(J.viewport),k.copy(J.scissor),G=J.scissorTest}else N.copy(te).multiplyScalar($).floor(),k.copy(re).multiplyScalar($).floor(),G=le;if(ne.bindFramebuffer(ue.FRAMEBUFFER,ze)&&X.drawBuffers&&ke&&ne.drawBuffers(J,ze),ne.viewport(N),ne.scissor(k),ne.setScissorTest(G),Mt){const vt=we.get(J.texture);ue.framebufferTexture2D(ue.FRAMEBUFFER,ue.COLOR_ATTACHMENT0,ue.TEXTURE_CUBE_MAP_POSITIVE_X+_e,vt.__webglTexture,Oe)}else if(Ft){const vt=we.get(J.texture),Lt=_e||0;ue.framebufferTextureLayer(ue.FRAMEBUFFER,ue.COLOR_ATTACHMENT0,vt.__webglTexture,Oe||0,Lt)}O=-1},this.readRenderTargetPixels=function(J,_e,Oe,ke,ze,Mt,Ft){if(!(J&&J.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let Wt=we.get(J).__webglFramebuffer;if(J.isWebGLCubeRenderTarget&&Ft!==void 0&&(Wt=Wt[Ft]),Wt){ne.bindFramebuffer(ue.FRAMEBUFFER,Wt);try{const vt=J.texture,Lt=vt.format,sn=vt.type;if(Lt!==ba&&_t.convert(Lt)!==ue.getParameter(ue.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const en=sn===Vp&&(Ee.has("EXT_color_buffer_half_float")||X.isWebGL2&&Ee.has("EXT_color_buffer_float"));if(sn!==Ls&&_t.convert(sn)!==ue.getParameter(ue.IMPLEMENTATION_COLOR_READ_TYPE)&&!(sn===eu&&(X.isWebGL2||Ee.has("OES_texture_float")||Ee.has("WEBGL_color_buffer_float")))&&!en){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}_e>=0&&_e<=J.width-ke&&Oe>=0&&Oe<=J.height-ze&&ue.readPixels(_e,Oe,ke,ze,_t.convert(Lt),_t.convert(sn),Mt)}finally{const vt=D!==null?we.get(D).__webglFramebuffer:null;ne.bindFramebuffer(ue.FRAMEBUFFER,vt)}}},this.copyFramebufferToTexture=function(J,_e,Oe=0){const ke=Math.pow(2,-Oe),ze=Math.floor(_e.image.width*ke),Mt=Math.floor(_e.image.height*ke);Ne.setTexture2D(_e,0),ue.copyTexSubImage2D(ue.TEXTURE_2D,Oe,0,0,J.x,J.y,ze,Mt),ne.unbindTexture()},this.copyTextureToTexture=function(J,_e,Oe,ke=0){const ze=_e.image.width,Mt=_e.image.height,Ft=_t.convert(Oe.format),Wt=_t.convert(Oe.type);Ne.setTexture2D(Oe,0),ue.pixelStorei(ue.UNPACK_FLIP_Y_WEBGL,Oe.flipY),ue.pixelStorei(ue.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Oe.premultiplyAlpha),ue.pixelStorei(ue.UNPACK_ALIGNMENT,Oe.unpackAlignment),_e.isDataTexture?ue.texSubImage2D(ue.TEXTURE_2D,ke,J.x,J.y,ze,Mt,Ft,Wt,_e.image.data):_e.isCompressedTexture?ue.compressedTexSubImage2D(ue.TEXTURE_2D,ke,J.x,J.y,_e.mipmaps[0].width,_e.mipmaps[0].height,Ft,_e.mipmaps[0].data):ue.texSubImage2D(ue.TEXTURE_2D,ke,J.x,J.y,Ft,Wt,_e.image),ke===0&&Oe.generateMipmaps&&ue.generateMipmap(ue.TEXTURE_2D),ne.unbindTexture()},this.copyTextureToTexture3D=function(J,_e,Oe,ke,ze=0){if(w.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}const Mt=J.max.x-J.min.x+1,Ft=J.max.y-J.min.y+1,Wt=J.max.z-J.min.z+1,vt=_t.convert(ke.format),Lt=_t.convert(ke.type);let sn;if(ke.isData3DTexture)Ne.setTexture3D(ke,0),sn=ue.TEXTURE_3D;else if(ke.isDataArrayTexture)Ne.setTexture2DArray(ke,0),sn=ue.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}ue.pixelStorei(ue.UNPACK_FLIP_Y_WEBGL,ke.flipY),ue.pixelStorei(ue.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ke.premultiplyAlpha),ue.pixelStorei(ue.UNPACK_ALIGNMENT,ke.unpackAlignment);const en=ue.getParameter(ue.UNPACK_ROW_LENGTH),Xn=ue.getParameter(ue.UNPACK_IMAGE_HEIGHT),Qr=ue.getParameter(ue.UNPACK_SKIP_PIXELS),cr=ue.getParameter(ue.UNPACK_SKIP_ROWS),Si=ue.getParameter(ue.UNPACK_SKIP_IMAGES),ln=Oe.isCompressedTexture?Oe.mipmaps[0]:Oe.image;ue.pixelStorei(ue.UNPACK_ROW_LENGTH,ln.width),ue.pixelStorei(ue.UNPACK_IMAGE_HEIGHT,ln.height),ue.pixelStorei(ue.UNPACK_SKIP_PIXELS,J.min.x),ue.pixelStorei(ue.UNPACK_SKIP_ROWS,J.min.y),ue.pixelStorei(ue.UNPACK_SKIP_IMAGES,J.min.z),Oe.isDataTexture||Oe.isData3DTexture?ue.texSubImage3D(sn,ze,_e.x,_e.y,_e.z,Mt,Ft,Wt,vt,Lt,ln.data):Oe.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),ue.compressedTexSubImage3D(sn,ze,_e.x,_e.y,_e.z,Mt,Ft,Wt,vt,ln.data)):ue.texSubImage3D(sn,ze,_e.x,_e.y,_e.z,Mt,Ft,Wt,vt,Lt,ln),ue.pixelStorei(ue.UNPACK_ROW_LENGTH,en),ue.pixelStorei(ue.UNPACK_IMAGE_HEIGHT,Xn),ue.pixelStorei(ue.UNPACK_SKIP_PIXELS,Qr),ue.pixelStorei(ue.UNPACK_SKIP_ROWS,cr),ue.pixelStorei(ue.UNPACK_SKIP_IMAGES,Si),ze===0&&ke.generateMipmaps&&ue.generateMipmap(sn),ne.unbindTexture()},this.initTexture=function(J){J.isCubeTexture?Ne.setTextureCube(J,0):J.isData3DTexture?Ne.setTexture3D(J,0):J.isDataArrayTexture||J.isCompressedArrayTexture?Ne.setTexture2DArray(J,0):Ne.setTexture2D(J,0),ne.unbindTexture()},this.resetState=function(){T=0,C=0,D=null,ne.reset(),xt.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Uu}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const n=this.getContext();n.drawingBufferColorSpace=e===SC?"display-p3":"srgb",n.unpackColorSpace=ar.workingColorSpace===Db?"display-p3":"srgb"}get physicallyCorrectLights(){return console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),!this.useLegacyLights}set physicallyCorrectLights(e){console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),this.useLegacyLights=!e}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===Hi?Nd:y4}set outputEncoding(e){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=e===Nd?Hi:tc}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(e){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=e}}class bG extends A4{}bG.prototype.isWebGL1Renderer=!0;class AC{constructor(e,n=25e-5){this.isFogExp2=!0,this.name="",this.color=new Pt(e),this.density=n}clone(){return new AC(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class TC{constructor(e,n=1,r=1e3){this.isFog=!0,this.name="",this.color=new Pt(e),this.near=n,this.far=r}clone(){return new TC(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class E2 extends Kn{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,n){return super.copy(e,n),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,e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const n=super.toJSON(e);return this.fog!==null&&(n.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(n.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(n.object.backgroundIntensity=this.backgroundIntensity),n}}class DC{constructor(e,n){this.isInterleavedBuffer=!0,this.array=e,this.stride=n,this.count=e!==void 0?e.length/n:0,this.usage=Wx,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=ks()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}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,n,r){e*=this.stride,r*=n.stride;for(let i=0,o=this.stride;ie.far||n.push({distance:l,point:Xy.clone(),uv:za.getInterpolation(Xy,rS,Ky,iS,y6,_3,x6,new Je),face:null,object:this})}copy(e,n){return super.copy(e,n),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}}function oS(t,e,n,r,i,o){M0.subVectors(t,n).addScalar(.5).multiply(r),i!==void 0?(Yy.x=o*M0.x-i*M0.y,Yy.y=i*M0.x+o*M0.y):Yy.copy(M0),t.copy(e),t.x+=Yy.x,t.y+=Yy.y,t.applyMatrix4(_G)}const aS=new ae,b6=new ae;class SG extends Kn{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const n=e.levels;for(let r=0,i=n.length;r0){let r,i;for(r=1,i=n.length;r0){aS.setFromMatrixPosition(this.matrixWorld);const i=e.ray.origin.distanceTo(aS);this.getObjectForDistance(i).raycast(e,n)}}update(e){const n=this.levels;if(n.length>1){aS.setFromMatrixPosition(e.matrixWorld),b6.setFromMatrixPosition(this.matrixWorld);const r=aS.distanceTo(b6)/e.zoom;n[0].object.visible=!0;let i,o;for(i=1,o=n.length;i=a)n[i-1].object.visible=!1,n[i].object.visible=!0;else break}for(this._currentLevel=i-1;il)continue;d.applyMatrix4(this.matrixWorld);const O=e.ray.origin.distanceTo(d);Oe.far||n.push({distance:O,point:f.clone().applyMatrix4(this.matrixWorld),index:w,face:null,faceIndex:null,object:this})}}else{const v=Math.max(0,a.start),S=Math.min(_.count,a.start+a.count);for(let w=v,E=S-1;wl)continue;d.applyMatrix4(this.matrixWorld);const C=e.ray.origin.distanceTo(d);Ce.far||n.push({distance:C,point:f.clone().applyMatrix4(this.matrixWorld),index:w,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const n=this.geometry.morphAttributes,r=Object.keys(n);if(r.length>0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,a=i.length;o0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,a=i.length;oi.far)return;o.push({distance:u,distanceToRay:Math.sqrt(s),point:l,index:e,face:null,object:a})}}class pMe extends hi{constructor(e,n,r,i,o,a,s,l,u){super(e,n,r,i,o,a,s,l,u),this.isVideoTexture=!0,this.minFilter=a!==void 0?a:wi,this.magFilter=o!==void 0?o:wi,this.generateMipmaps=!1;const c=this;function f(){c.needsUpdate=!0,e.requestVideoFrameCallback(f)}"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback(f)}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)}}class mMe extends hi{constructor(e,n){super({width:e,height:n}),this.isFramebufferTexture=!0,this.magFilter=ci,this.minFilter=ci,this.generateMipmaps=!1,this.needsUpdate=!0}}class PC extends hi{constructor(e,n,r,i,o,a,s,l,u,c,f,d){super(null,a,s,l,u,c,i,o,f,d),this.isCompressedTexture=!0,this.image={width:n,height:r},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class gMe extends PC{constructor(e,n,r,i,o,a){super(e,n,r,o,a),this.isCompressedArrayTexture=!0,this.image.depth=i,this.wrapR=uo}}class vMe extends PC{constructor(e,n,r){super(void 0,e[0].width,e[0].height,n,r,uf),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class yMe extends hi{constructor(e,n,r,i,o,a,s,l,u){super(e,n,r,i,o,a,s,l,u),this.isCanvasTexture=!0,this.needsUpdate=!0}}class cu{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,n){const r=this.getUtoTmapping(e);return this.getPoint(r,n)}getPoints(e=5){const n=[];for(let r=0;r<=e;r++)n.push(this.getPoint(r/e));return n}getSpacedPoints(e=5){const n=[];for(let r=0;r<=e;r++)n.push(this.getPointAt(r/e));return n}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 n=[];let r,i=this.getPoint(0),o=0;n.push(0);for(let a=1;a<=e;a++)r=this.getPoint(a/e),o+=r.distanceTo(i),n.push(o),i=r;return this.cacheArcLengths=n,n}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,n){const r=this.getLengths();let i=0;const o=r.length;let a;n?a=n:a=e*r[o-1];let s=0,l=o-1,u;for(;s<=l;)if(i=Math.floor(s+(l-s)/2),u=r[i]-a,u<0)s=i+1;else if(u>0)l=i-1;else{l=i;break}if(i=l,r[i]===a)return i/(o-1);const c=r[i],d=r[i+1]-c,p=(a-c)/d;return(i+p)/(o-1)}getTangent(e,n){let i=e-1e-4,o=e+1e-4;i<0&&(i=0),o>1&&(o=1);const a=this.getPoint(i),s=this.getPoint(o),l=n||(a.isVector2?new Je:new ae);return l.copy(s).sub(a).normalize(),l}getTangentAt(e,n){const r=this.getUtoTmapping(e);return this.getTangent(r,n)}computeFrenetFrames(e,n){const r=new ae,i=[],o=[],a=[],s=new ae,l=new xn;for(let p=0;p<=e;p++){const y=p/e;i[p]=this.getTangentAt(y,new ae)}o[0]=new ae,a[0]=new ae;let u=Number.MAX_VALUE;const c=Math.abs(i[0].x),f=Math.abs(i[0].y),d=Math.abs(i[0].z);c<=u&&(u=c,r.set(1,0,0)),f<=u&&(u=f,r.set(0,1,0)),d<=u&&r.set(0,0,1),s.crossVectors(i[0],r).normalize(),o[0].crossVectors(i[0],s),a[0].crossVectors(i[0],o[0]);for(let p=1;p<=e;p++){if(o[p]=o[p-1].clone(),a[p]=a[p-1].clone(),s.crossVectors(i[p-1],i[p]),s.length()>Number.EPSILON){s.normalize();const y=Math.acos(fi(i[p-1].dot(i[p]),-1,1));o[p].applyMatrix4(l.makeRotationAxis(s,y))}a[p].crossVectors(i[p],o[p])}if(n===!0){let p=Math.acos(fi(o[0].dot(o[e]),-1,1));p/=e,i[0].dot(s.crossVectors(o[0],o[e]))>0&&(p=-p);for(let y=1;y<=e;y++)o[y].applyMatrix4(l.makeRotationAxis(i[y],p*y)),a[y].crossVectors(i[y],o[y])}return{tangents:i,normals:o,binormals:a}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.6,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class NC extends cu{constructor(e=0,n=0,r=1,i=1,o=0,a=Math.PI*2,s=!1,l=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=n,this.xRadius=r,this.yRadius=i,this.aStartAngle=o,this.aEndAngle=a,this.aClockwise=s,this.aRotation=l}getPoint(e,n){const r=n||new Je,i=Math.PI*2;let o=this.aEndAngle-this.aStartAngle;const a=Math.abs(o)i;)o-=i;o0?0:(Math.floor(Math.abs(s)/o)+1)*o:l===0&&s===o-1&&(s=o-2,l=1);let u,c;this.closed||s>0?u=i[(s-1)%o]:(dS.subVectors(i[0],i[1]).add(i[0]),u=dS);const f=i[s%o],d=i[(s+1)%o];if(this.closed||s+2i.length-2?i.length-1:a+1],f=i[a>i.length-3?i.length-1:a+2];return r.set(L6(s,l.x,u.x,c.x,f.x),L6(s,l.y,u.y,c.y,f.y)),r}copy(e){super.copy(e),this.points=[];for(let n=0,r=e.points.length;n=r){const a=i[o]-r,s=this.curves[o],l=s.getLength(),u=l===0?0:1-a/l;return s.getPointAt(u,n)}o++}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 n=0;for(let r=0,i=this.curves.length;r1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n}copy(e){super.copy(e),this.curves=[];for(let n=0,r=e.curves.length;n0){const f=u.getPoint(0);f.equals(this.currentPoint)||this.lineTo(f.x,f.y)}this.curves.push(u);const c=u.getPoint(1);return this.currentPoint.copy(c),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 Fb extends Fn{constructor(e=[new Je(0,-.5),new Je(.5,0),new Je(0,.5)],n=12,r=0,i=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:e,segments:n,phiStart:r,phiLength:i},n=Math.floor(n),i=fi(i,0,Math.PI*2);const o=[],a=[],s=[],l=[],u=[],c=1/n,f=new ae,d=new Je,p=new ae,y=new ae,x=new ae;let _=0,v=0;for(let S=0;S<=e.length-1;S++)switch(S){case 0:_=e[S+1].x-e[S].x,v=e[S+1].y-e[S].y,p.x=v*1,p.y=-_,p.z=v*0,x.copy(p),p.normalize(),l.push(p.x,p.y,p.z);break;case e.length-1:l.push(x.x,x.y,x.z);break;default:_=e[S+1].x-e[S].x,v=e[S+1].y-e[S].y,p.x=v*1,p.y=-_,p.z=v*0,y.copy(p),p.x+=x.x,p.y+=x.y,p.z+=x.z,p.normalize(),l.push(p.x,p.y,p.z),x.copy(y)}for(let S=0;S<=n;S++){const w=r+S*c*i,E=Math.sin(w),T=Math.cos(w);for(let C=0;C<=e.length-1;C++){f.x=e[C].x*E,f.y=e[C].y,f.z=e[C].x*T,a.push(f.x,f.y,f.z),d.x=S/n,d.y=C/(e.length-1),s.push(d.x,d.y);const D=l[3*C+0]*E,O=l[3*C+1],P=l[3*C+0]*T;u.push(D,O,P)}}for(let S=0;S0&&w(!0),n>0&&w(!1)),this.setIndex(c),this.setAttribute("position",new Ut(f,3)),this.setAttribute("normal",new Ut(d,3)),this.setAttribute("uv",new Ut(p,2));function S(){const E=new ae,T=new ae;let C=0;const D=(n-e)/r;for(let O=0;O<=o;O++){const P=[],N=O/o,k=N*(n-e)+e;for(let G=0;G<=i;G++){const Z=G/i,j=Z*l+s,K=Math.sin(j),Y=Math.cos(j);T.x=k*K,T.y=-N*r+_,T.z=k*Y,f.push(T.x,T.y,T.z),E.set(K,D,Y).normalize(),d.push(E.x,E.y,E.z),p.push(Z,1-N),P.push(y++)}x.push(P)}for(let O=0;O.9&&D<.1&&(w<.2&&(a[S+0]+=1),E<.2&&(a[S+2]+=1),T<.2&&(a[S+4]+=1))}}function d(S){o.push(S.x,S.y,S.z)}function p(S,w){const E=S*3;w.x=e[E+0],w.y=e[E+1],w.z=e[E+2]}function y(){const S=new ae,w=new ae,E=new ae,T=new ae,C=new Je,D=new Je,O=new Je;for(let P=0,N=0;P80*n){s=u=t[0],l=c=t[1];for(let y=n;yu&&(u=f),d>c&&(c=d);p=Math.max(u-s,c-l),p=p!==0?32767/p:0}return Xx(o,a,n,s,l,p,0),a}};function IG(t,e,n,r,i){let o,a;if(i===HMe(t,e,n,r)>0)for(o=e;o=e;o-=r)a=k6(o,t[o],t[o+1],a);return a&&kC(a,a.next)&&(Kx(a),a=a.next),a}function jp(t,e){if(!t)return t;e||(e=t);let n=t,r;do if(r=!1,!n.steiner&&(kC(n,n.next)||Yr(n.prev,n,n.next)===0)){if(Kx(n),n=e=n.prev,n===n.next)break;r=!0}else n=n.next;while(r||n!==e);return e}function Xx(t,e,n,r,i,o,a){if(!t)return;!a&&o&&LMe(t,r,i,o);let s=t,l,u;for(;t.prev!==t.next;){if(l=t.prev,u=t.next,o?TMe(t,r,i,o):AMe(t)){e.push(l.i/n|0),e.push(t.i/n|0),e.push(u.i/n|0),Kx(t),t=u.next,s=u.next;continue}if(t=u,t===s){a?a===1?(t=DMe(jp(t),e,n),Xx(t,e,n,r,i,o,2)):a===2&&RMe(t,e,n,r,i,o):Xx(jp(t),e,n,r,i,o,1);break}}}function AMe(t){const e=t.prev,n=t,r=t.next;if(Yr(e,n,r)>=0)return!1;const i=e.x,o=n.x,a=r.x,s=e.y,l=n.y,u=r.y,c=io?i>a?i:a:o>a?o:a,p=s>l?s>u?s:u:l>u?l:u;let y=r.next;for(;y!==e;){if(y.x>=c&&y.x<=d&&y.y>=f&&y.y<=p&&xg(i,s,o,l,a,u,y.x,y.y)&&Yr(y.prev,y,y.next)>=0)return!1;y=y.next}return!0}function TMe(t,e,n,r){const i=t.prev,o=t,a=t.next;if(Yr(i,o,a)>=0)return!1;const s=i.x,l=o.x,u=a.x,c=i.y,f=o.y,d=a.y,p=sl?s>u?s:u:l>u?l:u,_=c>f?c>d?c:d:f>d?f:d,v=MP(p,y,e,n,r),S=MP(x,_,e,n,r);let w=t.prevZ,E=t.nextZ;for(;w&&w.z>=v&&E&&E.z<=S;){if(w.x>=p&&w.x<=x&&w.y>=y&&w.y<=_&&w!==i&&w!==a&&xg(s,c,l,f,u,d,w.x,w.y)&&Yr(w.prev,w,w.next)>=0||(w=w.prevZ,E.x>=p&&E.x<=x&&E.y>=y&&E.y<=_&&E!==i&&E!==a&&xg(s,c,l,f,u,d,E.x,E.y)&&Yr(E.prev,E,E.next)>=0))return!1;E=E.nextZ}for(;w&&w.z>=v;){if(w.x>=p&&w.x<=x&&w.y>=y&&w.y<=_&&w!==i&&w!==a&&xg(s,c,l,f,u,d,w.x,w.y)&&Yr(w.prev,w,w.next)>=0)return!1;w=w.prevZ}for(;E&&E.z<=S;){if(E.x>=p&&E.x<=x&&E.y>=y&&E.y<=_&&E!==i&&E!==a&&xg(s,c,l,f,u,d,E.x,E.y)&&Yr(E.prev,E,E.next)>=0)return!1;E=E.nextZ}return!0}function DMe(t,e,n){let r=t;do{const i=r.prev,o=r.next.next;!kC(i,o)&&FG(i,r,r.next,o)&&Yx(i,o)&&Yx(o,i)&&(e.push(i.i/n|0),e.push(r.i/n|0),e.push(o.i/n|0),Kx(r),Kx(r.next),r=t=o),r=r.next}while(r!==t);return jp(r)}function RMe(t,e,n,r,i,o){let a=t;do{let s=a.next.next;for(;s!==a.prev;){if(a.i!==s.i&&UMe(a,s)){let l=LG(a,s);a=jp(a,a.next),l=jp(l,l.next),Xx(a,e,n,r,i,o,0),Xx(l,e,n,r,i,o,0);return}s=s.next}a=a.next}while(a!==t)}function PMe(t,e,n,r){const i=[];let o,a,s,l,u;for(o=0,a=e.length;o=n.next.y&&n.next.y!==n.y){const d=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(d<=o&&d>r&&(r=d,i=n.x=n.x&&n.x>=l&&o!==n.x&&xg(ai.x||n.x===i.x&&FMe(i,n)))&&(i=n,c=f)),n=n.next;while(n!==s);return i}function FMe(t,e){return Yr(t.prev,t,e.prev)<0&&Yr(e.next,t,t.next)<0}function LMe(t,e,n,r){let i=t;do i.z===0&&(i.z=MP(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,kMe(i)}function kMe(t){let e,n,r,i,o,a,s,l,u=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,r=n,s=0,e=0;e0||l>0&&r;)s!==0&&(l===0||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,l--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,u*=2}while(a>1);return t}function MP(t,e,n,r,i){return t=(t-n)*i|0,e=(e-r)*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 BMe(t){let e=t,n=t;do(e.x=(t-a)*(o-s)&&(t-a)*(r-s)>=(n-a)*(e-s)&&(n-a)*(o-s)>=(i-a)*(r-s)}function UMe(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!zMe(t,e)&&(Yx(t,e)&&Yx(e,t)&&$Me(t,e)&&(Yr(t.prev,t,e.prev)||Yr(t,e.prev,e))||kC(t,e)&&Yr(t.prev,t,t.next)>0&&Yr(e.prev,e,e.next)>0)}function Yr(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function kC(t,e){return t.x===e.x&&t.y===e.y}function FG(t,e,n,r){const i=vS(Yr(t,e,n)),o=vS(Yr(t,e,r)),a=vS(Yr(n,r,t)),s=vS(Yr(n,r,e));return!!(i!==o&&a!==s||i===0&&gS(t,n,e)||o===0&&gS(t,r,e)||a===0&&gS(n,t,r)||s===0&&gS(n,e,r))}function gS(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function vS(t){return t>0?1:t<0?-1:0}function zMe(t,e){let n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&FG(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}function Yx(t,e){return Yr(t.prev,t,t.next)<0?Yr(t,e,t.next)>=0&&Yr(t,t.prev,e)>=0:Yr(t,e,t.prev)<0||Yr(t,t.next,e)<0}function $Me(t,e){let n=t,r=!1;const i=(t.x+e.x)/2,o=(t.y+e.y)/2;do n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next;while(n!==t);return r}function LG(t,e){const n=new CP(t.i,t.x,t.y),r=new CP(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function k6(t,e,n,r){const i=new CP(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function Kx(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 CP(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function HMe(t,e,n,r){let i=0;for(let o=e,a=n-r;o2&&t[e-1].equals(t[0])&&t.pop()}function U6(t,e){for(let n=0;nNumber.EPSILON){const B=Math.sqrt(lt),oe=Math.sqrt(Ue*Ue+We*We),ge=De.x-Ne/B,pe=De.y+we/B,de=Ee.x-We/oe,ve=Ee.y+Ue/oe,Se=((de-ge)*We-(ve-pe)*Ue)/(we*We-Ne*Ue);X=ge+we*Se-ue.x,ne=pe+Ne*Se-ue.y;const Pe=X*X+ne*ne;if(Pe<=2)return new Je(X,ne);me=Math.sqrt(Pe/2)}else{let B=!1;we>Number.EPSILON?Ue>Number.EPSILON&&(B=!0):we<-Number.EPSILON?Ue<-Number.EPSILON&&(B=!0):Math.sign(Ne)===Math.sign(We)&&(B=!0),B?(X=-Ne,ne=we,me=Math.sqrt(lt)):(X=we,ne=Ne,me=Math.sqrt(lt/2))}return new Je(X/me,ne/me)}const U=[];for(let ue=0,De=j.length,Ee=De-1,X=ue+1;ue=0;ue--){const De=ue/_,Ee=p*Math.cos(De*Math.PI/2),X=y*Math.sin(De*Math.PI/2)+x;for(let ne=0,me=j.length;ne=0;){const X=Ee;let ne=Ee-1;ne<0&&(ne=ue.length-1);for(let me=0,we=c+_*2;me0)&&p.push(w,E,C),(v!==r-1||l0!=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 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.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 $G extends Po{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new Pt(16777215),this.specular=new Pt(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Pt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=nh,this.normalScale=new Je(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Ab,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.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 HG extends Po{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Pt(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Pt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=nh,this.normalScale=new Je(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 VG extends Po{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=nh,this.normalScale=new Je(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 WG extends Po{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new Pt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Pt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=nh,this.normalScale=new Je(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Ab,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.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 GG extends Po{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Pt(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=nh,this.normalScale=new Je(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 jG extends Ca{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 yp(t,e,n){return!t||!n&&t.constructor===e?t:typeof e.BYTES_PER_ELEMENT=="number"?new e(t):Array.prototype.slice.call(t)}function qG(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function XG(t){function e(i,o){return t[i]-t[o]}const n=t.length,r=new Array(n);for(let i=0;i!==n;++i)r[i]=i;return r.sort(e),r}function AP(t,e,n){const r=t.length,i=new t.constructor(r);for(let o=0,a=0;a!==r;++o){const s=n[o]*e;for(let l=0;l!==e;++l)i[a++]=t[s+l]}return i}function B4(t,e,n,r){let i=1,o=t[0];for(;o!==void 0&&o[r]===void 0;)o=t[i++];if(o===void 0)return;let a=o[r];if(a!==void 0)if(Array.isArray(a))do a=o[r],a!==void 0&&(e.push(o.time),n.push.apply(n,a)),o=t[i++];while(o!==void 0);else if(a.toArray!==void 0)do a=o[r],a!==void 0&&(e.push(o.time),a.toArray(n,n.length)),o=t[i++];while(o!==void 0);else do a=o[r],a!==void 0&&(e.push(o.time),n.push(a)),o=t[i++];while(o!==void 0)}function jMe(t,e,n,r,i=30){const o=t.clone();o.name=e;const a=[];for(let l=0;l=r)){f.push(u.times[p]);for(let x=0;xo.tracks[l].times[0]&&(s=o.tracks[l].times[0]);for(let l=0;l=s.times[y]){const v=y*f+c,S=v+f-c;x=s.values.slice(v,S)}else{const v=s.createInterpolant(),S=c,w=f-c;v.evaluate(o),x=v.resultBuffer.slice(S,w)}l==="quaternion"&&new Xa().fromArray(x).normalize().conjugate().toArray(x);const _=u.times.length;for(let v=0;v<_;++v){const S=v*p+d;if(l==="quaternion")Xa.multiplyQuaternionsFlat(u.values,S,x,0,u.values,S);else{const w=p-d*2;for(let E=0;E=o)){const s=n[1];e=o)break t}a=r,r=0;break n}break e}for(;r>>1;en;)--a;if(++a,o!==0||a!==i){o>=a&&(a=Math.max(a,1),o=a-1);const s=this.getValueSize();this.times=r.slice(o,a),this.values=this.values.slice(o*s,a*s)}return this}validate(){let e=!0;const n=this.getValueSize();n-Math.floor(n)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const r=this.times,i=this.values,o=r.length;o===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let a=null;for(let s=0;s!==o;s++){const l=r[s];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,s,l),e=!1;break}if(a!==null&&a>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,s,l,a),e=!1;break}a=l}if(i!==void 0&&qG(i))for(let s=0,l=i.length;s!==l;++s){const u=i[s];if(isNaN(u)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,s,u),e=!1;break}}return e}optimize(){const e=this.times.slice(),n=this.values.slice(),r=this.getValueSize(),i=this.getInterpolation()===gE,o=e.length-1;let a=1;for(let s=1;s0){e[a]=e[o];for(let s=o*r,l=a*r,u=0;u!==r;++u)n[l+u]=n[s+u];++a}return a!==e.length?(this.times=e.slice(0,a),this.values=n.slice(0,a*r)):(this.times=e,this.values=n),this}clone(){const e=this.times.slice(),n=this.values.slice(),r=this.constructor,i=new r(this.name,e,n);return i.createInterpolant=this.createInterpolant,i}}fu.prototype.TimeBufferType=Float32Array;fu.prototype.ValueBufferType=Float32Array;fu.prototype.DefaultInterpolation=Ux;class rm extends fu{}rm.prototype.ValueTypeName="bool";rm.prototype.ValueBufferType=Array;rm.prototype.DefaultInterpolation=Bx;rm.prototype.InterpolantFactoryMethodLinear=void 0;rm.prototype.InterpolantFactoryMethodSmooth=void 0;class z4 extends fu{}z4.prototype.ValueTypeName="color";class Zx extends fu{}Zx.prototype.ValueTypeName="number";class ZG extends Bb{constructor(e,n,r,i){super(e,n,r,i)}interpolate_(e,n,r,i){const o=this.resultBuffer,a=this.sampleValues,s=this.valueSize,l=(r-n)/(i-n);let u=e*s;for(let c=u+s;u!==c;u+=4)Xa.slerpFlat(o,0,a,u-s,a,u,l);return o}}class Cv extends fu{InterpolantFactoryMethodLinear(e){return new ZG(this.times,this.values,this.getValueSize(),e)}}Cv.prototype.ValueTypeName="quaternion";Cv.prototype.DefaultInterpolation=Ux;Cv.prototype.InterpolantFactoryMethodSmooth=void 0;class im extends fu{}im.prototype.ValueTypeName="string";im.prototype.ValueBufferType=Array;im.prototype.DefaultInterpolation=Bx;im.prototype.InterpolantFactoryMethodLinear=void 0;im.prototype.InterpolantFactoryMethodSmooth=void 0;class Jx extends fu{}Jx.prototype.ValueTypeName="vector";class Qx{constructor(e,n=-1,r,i=wC){this.name=e,this.tracks=r,this.duration=n,this.blendMode=i,this.uuid=ks(),this.duration<0&&this.resetDuration()}static parse(e){const n=[],r=e.tracks,i=1/(e.fps||1);for(let a=0,s=r.length;a!==s;++a)n.push(KMe(r[a]).scale(i));const o=new this(e.name,e.duration,n,e.blendMode);return o.uuid=e.uuid,o}static toJSON(e){const n=[],r=e.tracks,i={name:e.name,duration:e.duration,tracks:n,uuid:e.uuid,blendMode:e.blendMode};for(let o=0,a=r.length;o!==a;++o)n.push(fu.toJSON(r[o]));return i}static CreateFromMorphTargetSequence(e,n,r,i){const o=n.length,a=[];for(let s=0;s1){const f=c[1];let d=i[f];d||(i[f]=d=[]),d.push(u)}}const a=[];for(const s in i)a.push(this.CreateFromMorphTargetSequence(s,i[s],n,r));return a}static parseAnimation(e,n){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const r=function(f,d,p,y,x){if(p.length!==0){const _=[],v=[];B4(p,_,v,y),_.length!==0&&x.push(new f(d,_,v))}},i=[],o=e.name||"default",a=e.fps||30,s=e.blendMode;let l=e.length||-1;const u=e.hierarchy||[];for(let f=0;f{n&&n(o),this.manager.itemEnd(e)},0),o;if(Ic[e]!==void 0){Ic[e].push({onLoad:n,onProgress:r,onError:i});return}Ic[e]=[],Ic[e].push({onLoad:n,onProgress:r,onError:i});const a=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),s=this.mimeType,l=this.responseType;fetch(a).then(u=>{if(u.status===200||u.status===0){if(u.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||u.body===void 0||u.body.getReader===void 0)return u;const c=Ic[e],f=u.body.getReader(),d=u.headers.get("Content-Length")||u.headers.get("X-File-Size"),p=d?parseInt(d):0,y=p!==0;let x=0;const _=new ReadableStream({start(v){S();function S(){f.read().then(({done:w,value:E})=>{if(w)v.close();else{x+=E.byteLength;const T=new ProgressEvent("progress",{lengthComputable:y,loaded:x,total:p});for(let C=0,D=c.length;C{switch(l){case"arraybuffer":return u.arrayBuffer();case"blob":return u.blob();case"document":return u.text().then(c=>new DOMParser().parseFromString(c,s));case"json":return u.json();default:if(s===void 0)return u.text();{const f=/charset="?([^;"\s]*)"?/i.exec(s),d=f&&f[1]?f[1].toLowerCase():void 0,p=new TextDecoder(d);return u.arrayBuffer().then(y=>p.decode(y))}}}).then(u=>{qp.add(e,u);const c=Ic[e];delete Ic[e];for(let f=0,d=c.length;f{const c=Ic[e];if(c===void 0)throw this.manager.itemError(e),u;delete Ic[e];for(let f=0,d=c.length;f{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class JMe extends Qa{constructor(e){super(e)}load(e,n,r,i){const o=this,a=new ff(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,function(s){try{n(o.parse(JSON.parse(s)))}catch(l){i?i(l):console.error(l),o.manager.itemError(e)}},r,i)}parse(e){const n=[];for(let r=0;r0:i.vertexColors=e.vertexColors),e.uniforms!==void 0)for(const o in e.uniforms){const a=e.uniforms[o];switch(i.uniforms[o]={},a.type){case"t":i.uniforms[o].value=r(a.value);break;case"c":i.uniforms[o].value=new Pt().setHex(a.value);break;case"v2":i.uniforms[o].value=new Je().fromArray(a.value);break;case"v3":i.uniforms[o].value=new ae().fromArray(a.value);break;case"v4":i.uniforms[o].value=new ir().fromArray(a.value);break;case"m3":i.uniforms[o].value=new In().fromArray(a.value);break;case"m4":i.uniforms[o].value=new xn().fromArray(a.value);break;default:i.uniforms[o].value=a.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 o in e.extensions)i.extensions[o]=e.extensions[o];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=r(e.map)),e.matcap!==void 0&&(i.matcap=r(e.matcap)),e.alphaMap!==void 0&&(i.alphaMap=r(e.alphaMap)),e.bumpMap!==void 0&&(i.bumpMap=r(e.bumpMap)),e.bumpScale!==void 0&&(i.bumpScale=e.bumpScale),e.normalMap!==void 0&&(i.normalMap=r(e.normalMap)),e.normalMapType!==void 0&&(i.normalMapType=e.normalMapType),e.normalScale!==void 0){let o=e.normalScale;Array.isArray(o)===!1&&(o=[o,o]),i.normalScale=new Je().fromArray(o)}return e.displacementMap!==void 0&&(i.displacementMap=r(e.displacementMap)),e.displacementScale!==void 0&&(i.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(i.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(i.roughnessMap=r(e.roughnessMap)),e.metalnessMap!==void 0&&(i.metalnessMap=r(e.metalnessMap)),e.emissiveMap!==void 0&&(i.emissiveMap=r(e.emissiveMap)),e.emissiveIntensity!==void 0&&(i.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(i.specularMap=r(e.specularMap)),e.specularIntensityMap!==void 0&&(i.specularIntensityMap=r(e.specularIntensityMap)),e.specularColorMap!==void 0&&(i.specularColorMap=r(e.specularColorMap)),e.envMap!==void 0&&(i.envMap=r(e.envMap)),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=r(e.lightMap)),e.lightMapIntensity!==void 0&&(i.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(i.aoMap=r(e.aoMap)),e.aoMapIntensity!==void 0&&(i.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(i.gradientMap=r(e.gradientMap)),e.clearcoatMap!==void 0&&(i.clearcoatMap=r(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(i.clearcoatRoughnessMap=r(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(i.clearcoatNormalMap=r(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(i.clearcoatNormalScale=new Je().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(i.iridescenceMap=r(e.iridescenceMap)),e.iridescenceThicknessMap!==void 0&&(i.iridescenceThicknessMap=r(e.iridescenceThicknessMap)),e.transmissionMap!==void 0&&(i.transmissionMap=r(e.transmissionMap)),e.thicknessMap!==void 0&&(i.thicknessMap=r(e.thicknessMap)),e.anisotropyMap!==void 0&&(i.anisotropyMap=r(e.anisotropyMap)),e.sheenColorMap!==void 0&&(i.sheenColorMap=r(e.sheenColorMap)),e.sheenRoughnessMap!==void 0&&(i.sheenRoughnessMap=r(e.sheenRoughnessMap)),i}setTextures(e){return this.textures=e,this}static createMaterialFromType(e){const n={ShadowMaterial:BG,SpriteMaterial:T4,RawShaderMaterial:UG,ShaderMaterial:nc,PointsMaterial:R4,MeshPhysicalMaterial:zG,MeshStandardMaterial:k4,MeshPhongMaterial:$G,MeshToonMaterial:HG,MeshNormalMaterial:VG,MeshLambertMaterial:WG,MeshDepthMaterial:M4,MeshDistanceMaterial:C4,MeshBasicMaterial:rh,MeshMatcapMaterial:GG,LineDashedMaterial:jG,LineBasicMaterial:Ca,Material:Po};return new n[e]}}class TP{static decodeText(e){if(typeof TextDecoder<"u")return new TextDecoder().decode(e);let n="";for(let r=0,i=e.length;r0){const l=new $4(n);o=new eb(l),o.setCrossOrigin(this.crossOrigin);for(let u=0,c=e.length;u0){i=new eb(this.manager),i.setCrossOrigin(this.crossOrigin);for(let a=0,s=e.length;a"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,n,r,i){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const o=this,a=qp.get(e);if(a!==void 0)return o.manager.itemStart(e),setTimeout(function(){n&&n(a),o.manager.itemEnd(e)},0),a;const s={};s.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",s.headers=this.requestHeader,fetch(e,s).then(function(l){return l.blob()}).then(function(l){return createImageBitmap(l,Object.assign(o.options,{colorSpaceConversion:"none"}))}).then(function(l){qp.add(e,l),n&&n(l),o.manager.itemEnd(e)}).catch(function(l){i&&i(l),o.manager.itemError(e),o.manager.itemEnd(e)}),o.manager.itemStart(e)}}let yS;class V4{static getContext(){return yS===void 0&&(yS=new(window.AudioContext||window.webkitAudioContext)),yS}static setContext(e){yS=e}}class uCe extends Qa{constructor(e){super(e)}load(e,n,r,i){const o=this,a=new ff(this.manager);a.setResponseType("arraybuffer"),a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,function(l){try{const u=l.slice(0);V4.getContext().decodeAudioData(u,function(f){n(f)},s)}catch(u){s(u)}},r,i);function s(l){i?i(l):console.error(l),o.manager.itemError(e)}}}const q6=new xn,X6=new xn,Xh=new xn;class cCe{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new lo,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new lo,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 n=this._cache;if(n.focus!==e.focus||n.fov!==e.fov||n.aspect!==e.aspect*this.aspect||n.near!==e.near||n.far!==e.far||n.zoom!==e.zoom||n.eyeSep!==this.eyeSep){n.focus=e.focus,n.fov=e.fov,n.aspect=e.aspect*this.aspect,n.near=e.near,n.far=e.far,n.zoom=e.zoom,n.eyeSep=this.eyeSep,Xh.copy(e.projectionMatrix);const i=n.eyeSep/2,o=i*n.near/n.focus,a=n.near*Math.tan(Tp*n.fov*.5)/n.zoom;let s,l;X6.elements[12]=-i,q6.elements[12]=i,s=-a*n.aspect+o,l=a*n.aspect+o,Xh.elements[0]=2*n.near/(l-s),Xh.elements[8]=(l+s)/(l-s),this.cameraL.projectionMatrix.copy(Xh),s=-a*n.aspect-o,l=a*n.aspect-o,Xh.elements[0]=2*n.near/(l-s),Xh.elements[8]=(l+s)/(l-s),this.cameraR.projectionMatrix.copy(Xh)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(X6),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(q6)}}class W4{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=Y6(),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 n=Y6();e=(n-this.oldTime)/1e3,this.oldTime=n,this.elapsedTime+=e}return e}}function Y6(){return(typeof performance>"u"?Date:performance).now()}const Yh=new ae,K6=new Xa,fCe=new ae,Kh=new ae;class dCe extends Kn{constructor(){super(),this.type="AudioListener",this.context=V4.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new W4}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 n=this.context.listener,r=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(Yh,K6,fCe),Kh.set(0,0,-1).applyQuaternion(K6),n.positionX){const i=this.context.currentTime+this.timeDelta;n.positionX.linearRampToValueAtTime(Yh.x,i),n.positionY.linearRampToValueAtTime(Yh.y,i),n.positionZ.linearRampToValueAtTime(Yh.z,i),n.forwardX.linearRampToValueAtTime(Kh.x,i),n.forwardY.linearRampToValueAtTime(Kh.y,i),n.forwardZ.linearRampToValueAtTime(Kh.z,i),n.upX.linearRampToValueAtTime(r.x,i),n.upY.linearRampToValueAtTime(r.y,i),n.upZ.linearRampToValueAtTime(r.z,i)}else n.setPosition(Yh.x,Yh.y,Yh.z),n.setOrientation(Kh.x,Kh.y,Kh.z,r.x,r.y,r.z)}}class uj extends Kn{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 n=this.context.createBufferSource();return n.buffer=this.buffer,n.loop=this.loop,n.loopStart=this.loopStart,n.loopEnd=this.loopEnd,n.onended=this.onEnded.bind(this),n.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=n,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(){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.source.onended=null),this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,n=this.filters.length;e0){this.source.disconnect(this.filters[0]);for(let e=1,n=this.filters.length;e0&&this._mixBufferRegionAdditive(r,i,this._addIndex*n,1,n);for(let l=n,u=n+n;l!==u;++l)if(r[l]!==r[l+n]){s.setValue(r,i);break}}saveOriginalState(){const e=this.binding,n=this.buffer,r=this.valueSize,i=r*this._origIndex;e.getValue(n,i);for(let o=r,a=i;o!==a;++o)n[o]=n[i+o%r];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,n=e+this.valueSize;for(let r=e;r=.5)for(let a=0;a!==o;++a)e[n+a]=e[r+a]}_slerp(e,n,r,i){Xa.slerpFlat(e,n,e,n,e,r,i)}_slerpAdditive(e,n,r,i,o){const a=this._workIndex*o;Xa.multiplyQuaternionsFlat(e,a,e,n,e,r),Xa.slerpFlat(e,n,e,n,e,a,i)}_lerp(e,n,r,i,o){const a=1-i;for(let s=0;s!==o;++s){const l=n+s;e[l]=e[l]*a+e[r+s]*i}}_lerpAdditive(e,n,r,i,o){for(let a=0;a!==o;++a){const s=n+a;e[s]=e[s]+e[r+a]*i}}}const G4="\\[\\]\\.:\\/",gCe=new RegExp("["+G4+"]","g"),j4="[^"+G4+"]",vCe="[^"+G4.replace("\\.","")+"]",yCe=/((?:WC+[\/:])*)/.source.replace("WC",j4),xCe=/(WCOD+)?/.source.replace("WCOD",vCe),bCe=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",j4),_Ce=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",j4),wCe=new RegExp("^"+yCe+xCe+bCe+_Ce+"$"),SCe=["material","materials","bones","map"];class ECe{constructor(e,n,r){const i=r||jn.parseTrackName(n);this._targetGroup=e,this._bindings=e.subscribe_(n,i)}getValue(e,n){this.bind();const r=this._targetGroup.nCachedObjects_,i=this._bindings[r];i!==void 0&&i.getValue(e,n)}setValue(e,n){const r=this._bindings;for(let i=this._targetGroup.nCachedObjects_,o=r.length;i!==o;++i)r[i].setValue(e,n)}bind(){const e=this._bindings;for(let n=this._targetGroup.nCachedObjects_,r=e.length;n!==r;++n)e[n].bind()}unbind(){const e=this._bindings;for(let n=this._targetGroup.nCachedObjects_,r=e.length;n!==r;++n)e[n].unbind()}}class jn{constructor(e,n,r){this.path=n,this.parsedPath=r||jn.parseTrackName(n),this.node=jn.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,n,r){return e&&e.isAnimationObjectGroup?new jn.Composite(e,n,r):new jn(e,n,r)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(gCe,"")}static parseTrackName(e){const n=wCe.exec(e);if(n===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const r={nodeName:n[2],objectName:n[3],objectIndex:n[4],propertyName:n[5],propertyIndex:n[6]},i=r.nodeName&&r.nodeName.lastIndexOf(".");if(i!==void 0&&i!==-1){const o=r.nodeName.substring(i+1);SCe.indexOf(o)!==-1&&(r.nodeName=r.nodeName.substring(0,i),r.objectName=o)}if(r.propertyName===null||r.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return r}static findNode(e,n){if(n===void 0||n===""||n==="."||n===-1||n===e.name||n===e.uuid)return e;if(e.skeleton){const r=e.skeleton.getBoneByName(n);if(r!==void 0)return r}if(e.children){const r=function(o){for(let a=0;a=o){const f=o++,d=e[f];n[d.uuid]=c,e[c]=d,n[u]=f,e[f]=l;for(let p=0,y=i;p!==y;++p){const x=r[p],_=x[f],v=x[c];x[c]=_,x[f]=v}}}this.nCachedObjects_=o}uncache(){const e=this._objects,n=this._indicesByUUID,r=this._bindings,i=r.length;let o=this.nCachedObjects_,a=e.length;for(let s=0,l=arguments.length;s!==l;++s){const u=arguments[s],c=u.uuid,f=n[c];if(f!==void 0)if(delete n[c],f0&&(n[p.uuid]=f),e[f]=p,e.pop();for(let y=0,x=i;y!==x;++y){const _=r[y];_[f]=_[d],_.pop()}}}this.nCachedObjects_=o}subscribe_(e,n){const r=this._bindingsIndicesByPath;let i=r[e];const o=this._bindings;if(i!==void 0)return o[i];const a=this._paths,s=this._parsedPaths,l=this._objects,u=l.length,c=this.nCachedObjects_,f=new Array(u);i=o.length,r[e]=i,a.push(e),s.push(n),o.push(f);for(let d=c,p=l.length;d!==p;++d){const y=l[d];f[d]=new jn(y,e,n)}return f}unsubscribe_(e){const n=this._bindingsIndicesByPath,r=n[e];if(r!==void 0){const i=this._paths,o=this._parsedPaths,a=this._bindings,s=a.length-1,l=a[s],u=e[s];n[u]=r,a[r]=l,a.pop(),o[r]=o[s],o.pop(),i[r]=i[s],i.pop()}}}class fj{constructor(e,n,r=null,i=n.blendMode){this._mixer=e,this._clip=n,this._localRoot=r,this.blendMode=i;const o=n.tracks,a=o.length,s=new Array(a),l={endingStart:mp,endingEnd:mp};for(let u=0;u!==a;++u){const c=o[u].createInterpolant(null);s[u]=c,c.settings=l}this._interpolantSettings=l,this._interpolants=s,this._propertyBindings=new Array(a),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=WW,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,n){return this.loop=e,this.repetitions=n,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,n,r){if(e.fadeOut(n),this.fadeIn(n),r){const i=this._clip.duration,o=e._clip.duration,a=o/i,s=i/o;e.warp(1,a,n),this.warp(s,1,n)}return this}crossFadeTo(e,n,r){return e.crossFadeFrom(this,n,r)}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,n,r){const i=this._mixer,o=i.time,a=this.timeScale;let s=this._timeScaleInterpolant;s===null&&(s=i._lendControlInterpolant(),this._timeScaleInterpolant=s);const l=s.parameterPositions,u=s.sampleValues;return l[0]=o,l[1]=o+r,u[0]=e/a,u[1]=n/a,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,n,r,i){if(!this.enabled){this._updateWeight(e);return}const o=this._startTime;if(o!==null){const l=(e-o)*r;l<0||r===0?n=0:(this._startTime=null,n=r*l)}n*=this._updateTimeScale(e);const a=this._updateTime(n),s=this._updateWeight(e);if(s>0){const l=this._interpolants,u=this._propertyBindings;switch(this.blendMode){case v4:for(let c=0,f=l.length;c!==f;++c)l[c].evaluate(a),u[c].accumulateAdditive(s);break;case wC:default:for(let c=0,f=l.length;c!==f;++c)l[c].evaluate(a),u[c].accumulate(i,s)}}}_updateWeight(e){let n=0;if(this.enabled){n=this.weight;const r=this._weightInterpolant;if(r!==null){const i=r.evaluate(e)[0];n*=i,e>r.parameterPositions[1]&&(this.stopFading(),i===0&&(this.enabled=!1))}}return this._effectiveWeight=n,n}_updateTimeScale(e){let n=0;if(!this.paused){n=this.timeScale;const r=this._timeScaleInterpolant;if(r!==null){const i=r.evaluate(e)[0];n*=i,e>r.parameterPositions[1]&&(this.stopWarping(),n===0?this.paused=!0:this.timeScale=n)}}return this._effectiveTimeScale=n,n}_updateTime(e){const n=this._clip.duration,r=this.loop;let i=this.time+e,o=this._loopCount;const a=r===GW;if(e===0)return o===-1?i:a&&(o&1)===1?n-i:i;if(r===VW){o===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(i>=n)i=n;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(o===-1&&(e>=0?(o=0,this._setEndings(!0,this.repetitions===0,a)):this._setEndings(this.repetitions===0,!0,a)),i>=n||i<0){const s=Math.floor(i/n);i-=n*s,o+=Math.abs(s);const l=this.repetitions-o;if(l<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,i=e>0?n:0,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(l===1){const u=e<0;this._setEndings(u,!u,a)}else this._setEndings(!1,!1,a);this._loopCount=o,this.time=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:s})}}else this.time=i;if(a&&(o&1)===1)return n-i}return i}_setEndings(e,n,r){const i=this._interpolantSettings;r?(i.endingStart=gp,i.endingEnd=gp):(e?i.endingStart=this.zeroSlopeAtStart?gp:mp:i.endingStart=zx,n?i.endingEnd=this.zeroSlopeAtEnd?gp:mp:i.endingEnd=zx)}_scheduleFading(e,n,r){const i=this._mixer,o=i.time;let a=this._weightInterpolant;a===null&&(a=i._lendControlInterpolant(),this._weightInterpolant=a);const s=a.parameterPositions,l=a.sampleValues;return s[0]=o,l[0]=n,s[1]=o+e,l[1]=r,this}}const CCe=new Float32Array(1);class ACe extends vf{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,n){const r=e._localRoot||this._root,i=e._clip.tracks,o=i.length,a=e._propertyBindings,s=e._interpolants,l=r.uuid,u=this._bindingsByRootAndName;let c=u[l];c===void 0&&(c={},u[l]=c);for(let f=0;f!==o;++f){const d=i[f],p=d.name;let y=c[p];if(y!==void 0)++y.referenceCount,a[f]=y;else{if(y=a[f],y!==void 0){y._cacheIndex===null&&(++y.referenceCount,this._addInactiveBinding(y,l,p));continue}const x=n&&n._propertyBindings[f].binding.parsedPath;y=new cj(jn.create(r,p,x),d.ValueTypeName,d.getValueSize()),++y.referenceCount,this._addInactiveBinding(y,l,p),a[f]=y}s[f].resultBuffer=y.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){const r=(e._localRoot||this._root).uuid,i=e._clip.uuid,o=this._actionsByClip[i];this._bindAction(e,o&&o.knownActions[0]),this._addInactiveAction(e,i,r)}const n=e._propertyBindings;for(let r=0,i=n.length;r!==i;++r){const o=n[r];o.useCount++===0&&(this._lendBinding(o),o.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const n=e._propertyBindings;for(let r=0,i=n.length;r!==i;++r){const o=n[r];--o.useCount===0&&(o.restoreOriginalState(),this._takeBackBinding(o))}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 n=e._cacheIndex;return n!==null&&n=0;--r)e[r].stop();return this}update(e){e*=this.timeScale;const n=this._actions,r=this._nActiveActions,i=this.time+=e,o=Math.sign(e),a=this._accuIndex^=1;for(let u=0;u!==r;++u)n[u]._update(i,e,o,a);const s=this._bindings,l=this._nActiveBindings;for(let u=0;u!==l;++u)s[u].apply(a);return this}setTime(e){this.time=0;for(let n=0;nthis.max.x||e.ythis.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,n){return n.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.xthis.max.x||e.max.ythis.max.y)}clampPoint(e,n){return n.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Q6).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 eB=new ae,xS=new ae;class FCe{constructor(e=new ae,n=new ae){this.start=e,this.end=n}set(e,n){return this.start.copy(e),this.end.copy(n),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,n){return this.delta(n).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,n){eB.subVectors(e,this.start),xS.subVectors(this.end,this.start);const r=xS.dot(xS);let o=xS.dot(eB)/r;return n&&(o=fi(o,0,1)),o}closestPointToPoint(e,n,r){const i=this.closestPointToPointParameter(e,n);return this.delta(r).multiplyScalar(i).add(this.start)}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 tB=new ae;class LCe extends Kn{constructor(e,n){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,this.type="SpotLightHelper";const r=new Fn,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 a=0,s=1,l=32;a1)for(let f=0;f.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{aB.set(e.z,0,-e.x).normalize();const n=Math.acos(e.y);this.quaternion.setFromAxisAngle(aB,n)}}setLength(e,n=e*.2,r=n*.2){this.line.scale.set(1,Math.max(1e-4,e-n),1),this.line.updateMatrix(),this.cone.scale.set(r,n,r),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 YCe extends sc{constructor(e=1){const n=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],r=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],i=new Fn;i.setAttribute("position",new Ut(n,3)),i.setAttribute("color",new Ut(r,3));const o=new Ca({vertexColors:!0,toneMapped:!1});super(i,o),this.type="AxesHelper"}setColors(e,n,r){const i=new Pt,o=this.geometry.attributes.color.array;return i.set(e),i.toArray(o,0),i.toArray(o,3),i.set(n),i.toArray(o,6),i.toArray(o,9),i.set(r),i.toArray(o,12),i.toArray(o,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class KCe{constructor(){this.type="ShapePath",this.color=new Pt,this.subPaths=[],this.currentPath=null}moveTo(e,n){return this.currentPath=new qx,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,n),this}lineTo(e,n){return this.currentPath.lineTo(e,n),this}quadraticCurveTo(e,n,r,i){return this.currentPath.quadraticCurveTo(e,n,r,i),this}bezierCurveTo(e,n,r,i,o,a){return this.currentPath.bezierCurveTo(e,n,r,i,o,a),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function n(v){const S=[];for(let w=0,E=v.length;wNumber.EPSILON){if(N<0&&(D=S[C],P=-P,O=S[T],N=-N),v.yO.y)continue;if(v.y===D.y){if(v.x===D.x)return!0}else{const k=N*(v.x-D.x)-P*(v.y-D.y);if(k===0)return!0;if(k<0)continue;E=!E}}else{if(v.y!==D.y)continue;if(O.x<=v.x&&v.x<=D.x||D.x<=v.x&&v.x<=O.x)return!0}}return E}const i=Xu.isClockWise,o=this.subPaths;if(o.length===0)return[];let a,s,l;const u=[];if(o.length===1)return s=o[0],l=new Rp,l.curves=s.curves,u.push(l),u;let c=!i(o[0].getPoints());c=e?!c:c;const f=[],d=[];let p=[],y=0,x;d[y]=void 0,p[y]=[];for(let v=0,S=o.length;v1){let v=!1,S=0;for(let w=0,E=d.length;w0&&v===!1&&(p=f)}let _;for(let v=0,S=d.length;vc||i.y>c)&&(i.x>c&&(o.x=Math.floor(c/W.x),i.x=o.x*W.x,$.mapSize.x=o.x),i.y>c&&(o.y=Math.floor(c/W.y),i.y=o.y*W.y,$.mapSize.y=o.y)),$.map===null||G===!0||Z===!0){const te=this.type!==Gl?{minFilter:ci,magFilter:ci}:{};$.map!==null&&$.map.dispose(),$.map=new au(i.x,i.y,te),$.map.texture.name=Y.name+".shadowMap",$.camera.updateProjectionMatrix()}t.setRenderTarget($.map),t.clear();const U=$.getViewportCount();for(let te=0;te0||C.map&&C.alphaTest>0){const k=P.uuid,G=C.uuid;let Z=u[k];Z===void 0&&(Z={},u[k]=Z);let j=Z[G];j===void 0&&(j=P.clone(),Z[G]=j),P=j}if(P.visible=C.visible,P.wireframe=C.wireframe,O===Gl?P.side=C.shadowSide!==null?C.shadowSide:C.side:P.side=C.shadowSide!==null?C.shadowSide:f[C.side],P.alphaMap=C.alphaMap,P.alphaTest=C.alphaTest,P.map=C.map,P.clipShadows=C.clipShadows,P.clippingPlanes=C.clippingPlanes,P.clipIntersection=C.clipIntersection,P.displacementMap=C.displacementMap,P.displacementScale=C.displacementScale,P.displacementBias=C.displacementBias,P.wireframeLinewidth=C.wireframeLinewidth,P.linewidth=C.linewidth,D.isPointLight===!0&&P.isMeshDistanceMaterial===!0){const k=t.properties.get(P);k.light=D}return P}function E(T,C,D,O,P){if(T.visible===!1)return;if(T.layers.test(C.layers)&&(T.isMesh||T.isLine||T.isPoints)&&(T.castShadow||T.receiveShadow&&P===Gl)&&(!T.frustumCulled||r.intersectsObject(T))){T.modelViewMatrix.multiplyMatrices(D.matrixWorldInverse,T.matrixWorld);const G=e.update(T),Z=T.material;if(Array.isArray(Z)){const j=G.groups;for(let K=0,Y=j.length;K=1):te.indexOf("OpenGL ES")!==-1&&(U=parseFloat(/^OpenGL ES (\d)/.exec(te)[1]),W=U>=2);let re=null,le={};const ce=t.getParameter(t.SCISSOR_BOX),Ce=t.getParameter(t.VIEWPORT),Re=new ir().fromArray(ce),Ie=new ir().fromArray(Ce);function He(be,gt,ft,Ye){const mt=new Uint8Array(4),Vt=t.createTexture();t.bindTexture(be,Vt),t.texParameteri(be,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(be,t.TEXTURE_MAG_FILTER,t.NEAREST);for(let bn=0;bn"u"?!1:/OculusBrowser/g.test(navigator.userAgent),y=new WeakMap;let x;const _=new WeakMap;let v=!1;try{v=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function S(z,B){return v?new OffscreenCanvas(z,B):qx("canvas")}function w(z,B,oe,ge){let pe=1;if((z.width>ge||z.height>ge)&&(pe=ge/Math.max(z.width,z.height)),pe<1||B===!0)if(typeof HTMLImageElement<"u"&&z instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&z instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&z instanceof ImageBitmap){const de=B?S2:Math.floor,ve=de(pe*z.width),Se=de(pe*z.height);x===void 0&&(x=S(ve,Se));const Pe=oe?S(ve,Se):x;return Pe.width=ve,Pe.height=Se,Pe.getContext("2d").drawImage(z,0,0,ve,Se),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+z.width+"x"+z.height+") to ("+ve+"x"+Se+")."),Pe}else return"data"in z&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+z.width+"x"+z.height+")."),z;return z}function E(z){return SP(z.width)&&SP(z.height)}function T(z){return s?!1:z.wrapS!==co||z.wrapT!==co||z.minFilter!==ci&&z.minFilter!==wi}function C(z,B){return z.generateMipmaps&&B&&z.minFilter!==ci&&z.minFilter!==wi}function D(z){t.generateMipmap(z)}function O(z,B,oe,ge,pe=!1){if(s===!1)return B;if(z!==null){if(t[z]!==void 0)return t[z];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+z+"'")}let de=B;if(B===t.RED&&(oe===t.FLOAT&&(de=t.R32F),oe===t.HALF_FLOAT&&(de=t.R16F),oe===t.UNSIGNED_BYTE&&(de=t.R8)),B===t.RED_INTEGER&&(oe===t.UNSIGNED_BYTE&&(de=t.R8UI),oe===t.UNSIGNED_SHORT&&(de=t.R16UI),oe===t.UNSIGNED_INT&&(de=t.R32UI),oe===t.BYTE&&(de=t.R8I),oe===t.SHORT&&(de=t.R16I),oe===t.INT&&(de=t.R32I)),B===t.RG&&(oe===t.FLOAT&&(de=t.RG32F),oe===t.HALF_FLOAT&&(de=t.RG16F),oe===t.UNSIGNED_BYTE&&(de=t.RG8)),B===t.RGBA){const ve=pe?Hx:ar.getTransfer(ge);oe===t.FLOAT&&(de=t.RGBA32F),oe===t.HALF_FLOAT&&(de=t.RGBA16F),oe===t.UNSIGNED_BYTE&&(de=ve===Er?t.SRGB8_ALPHA8:t.RGBA8),oe===t.UNSIGNED_SHORT_4_4_4_4&&(de=t.RGBA4),oe===t.UNSIGNED_SHORT_5_5_5_1&&(de=t.RGB5_A1)}return(de===t.R16F||de===t.R32F||de===t.RG16F||de===t.RG32F||de===t.RGBA16F||de===t.RGBA32F)&&e.get("EXT_color_buffer_float"),de}function P(z,B,oe){return C(z,oe)===!0||z.isFramebufferTexture&&z.minFilter!==ci&&z.minFilter!==wi?Math.log2(Math.max(B.width,B.height))+1:z.mipmaps!==void 0&&z.mipmaps.length>0?z.mipmaps.length:z.isCompressedTexture&&Array.isArray(z.image)?B.mipmaps.length:1}function N(z){return z===ci||z===_2||z===q1?t.NEAREST:t.LINEAR}function k(z){const B=z.target;B.removeEventListener("dispose",k),Z(B),B.isVideoTexture&&y.delete(B)}function G(z){const B=z.target;B.removeEventListener("dispose",G),K(B)}function Z(z){const B=r.get(z);if(B.__webglInit===void 0)return;const oe=z.source,ge=_.get(oe);if(ge){const pe=ge[B.__cacheKey];pe.usedTimes--,pe.usedTimes===0&&j(z),Object.keys(ge).length===0&&_.delete(oe)}r.remove(z)}function j(z){const B=r.get(z);t.deleteTexture(B.__webglTexture);const oe=z.source,ge=_.get(oe);delete ge[B.__cacheKey],a.memory.textures--}function K(z){const B=z.texture,oe=r.get(z),ge=r.get(B);if(ge.__webglTexture!==void 0&&(t.deleteTexture(ge.__webglTexture),a.memory.textures--),z.depthTexture&&z.depthTexture.dispose(),z.isWebGLCubeRenderTarget)for(let pe=0;pe<6;pe++){if(Array.isArray(oe.__webglFramebuffer[pe]))for(let de=0;de=l&&console.warn("THREE.WebGLTextures: Trying to use "+z+" texture units while this GPU supports only "+l),Y+=1,z}function U(z){const B=[];return B.push(z.wrapS),B.push(z.wrapT),B.push(z.wrapR||0),B.push(z.magFilter),B.push(z.minFilter),B.push(z.anisotropy),B.push(z.internalFormat),B.push(z.format),B.push(z.type),B.push(z.generateMipmaps),B.push(z.premultiplyAlpha),B.push(z.flipY),B.push(z.unpackAlignment),B.push(z.colorSpace),B.join()}function te(z,B){const oe=r.get(z);if(z.isVideoTexture&&We(z),z.isRenderTargetTexture===!1&&z.version>0&&oe.__version!==z.version){const ge=z.image;if(ge===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(ge.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{Qe(oe,z,B);return}}n.bindTexture(t.TEXTURE_2D,oe.__webglTexture,t.TEXTURE0+B)}function re(z,B){const oe=r.get(z);if(z.version>0&&oe.__version!==z.version){Qe(oe,z,B);return}n.bindTexture(t.TEXTURE_2D_ARRAY,oe.__webglTexture,t.TEXTURE0+B)}function le(z,B){const oe=r.get(z);if(z.version>0&&oe.__version!==z.version){Qe(oe,z,B);return}n.bindTexture(t.TEXTURE_3D,oe.__webglTexture,t.TEXTURE0+B)}function ce(z,B){const oe=r.get(z);if(z.version>0&&oe.__version!==z.version){ct(oe,z,B);return}n.bindTexture(t.TEXTURE_CUBE_MAP,oe.__webglTexture,t.TEXTURE0+B)}const Ce={[kx]:t.REPEAT,[co]:t.CLAMP_TO_EDGE,[Bx]:t.MIRRORED_REPEAT},Re={[ci]:t.NEAREST,[_2]:t.NEAREST_MIPMAP_NEAREST,[q1]:t.NEAREST_MIPMAP_LINEAR,[wi]:t.LINEAR,[c4]:t.LINEAR_MIPMAP_NEAREST,[Vd]:t.LINEAR_MIPMAP_LINEAR},Ie={[nG]:t.NEVER,[uG]:t.ALWAYS,[rG]:t.LESS,[oG]:t.LEQUAL,[iG]:t.EQUAL,[lG]:t.GEQUAL,[aG]:t.GREATER,[sG]:t.NOTEQUAL};function He(z,B,oe){if(oe?(t.texParameteri(z,t.TEXTURE_WRAP_S,Ce[B.wrapS]),t.texParameteri(z,t.TEXTURE_WRAP_T,Ce[B.wrapT]),(z===t.TEXTURE_3D||z===t.TEXTURE_2D_ARRAY)&&t.texParameteri(z,t.TEXTURE_WRAP_R,Ce[B.wrapR]),t.texParameteri(z,t.TEXTURE_MAG_FILTER,Re[B.magFilter]),t.texParameteri(z,t.TEXTURE_MIN_FILTER,Re[B.minFilter])):(t.texParameteri(z,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(z,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),(z===t.TEXTURE_3D||z===t.TEXTURE_2D_ARRAY)&&t.texParameteri(z,t.TEXTURE_WRAP_R,t.CLAMP_TO_EDGE),(B.wrapS!==co||B.wrapT!==co)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),t.texParameteri(z,t.TEXTURE_MAG_FILTER,N(B.magFilter)),t.texParameteri(z,t.TEXTURE_MIN_FILTER,N(B.minFilter)),B.minFilter!==ci&&B.minFilter!==wi&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),B.compareFunction&&(t.texParameteri(z,t.TEXTURE_COMPARE_MODE,t.COMPARE_REF_TO_TEXTURE),t.texParameteri(z,t.TEXTURE_COMPARE_FUNC,Ie[B.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){const ge=e.get("EXT_texture_filter_anisotropic");if(B.magFilter===ci||B.minFilter!==q1&&B.minFilter!==Vd||B.type===Ql&&e.has("OES_texture_float_linear")===!1||s===!1&&B.type===Wp&&e.has("OES_texture_half_float_linear")===!1)return;(B.anisotropy>1||r.get(B).__currentAnisotropy)&&(t.texParameterf(z,ge.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(B.anisotropy,i.getMaxAnisotropy())),r.get(B).__currentAnisotropy=B.anisotropy)}}function tt(z,B){let oe=!1;z.__webglInit===void 0&&(z.__webglInit=!0,B.addEventListener("dispose",k));const ge=B.source;let pe=_.get(ge);pe===void 0&&(pe={},_.set(ge,pe));const de=U(B);if(de!==z.__cacheKey){pe[de]===void 0&&(pe[de]={texture:t.createTexture(),usedTimes:0},a.memory.textures++,oe=!0),pe[de].usedTimes++;const ve=pe[z.__cacheKey];ve!==void 0&&(pe[z.__cacheKey].usedTimes--,ve.usedTimes===0&&j(B)),z.__cacheKey=de,z.__webglTexture=pe[de].texture}return oe}function Qe(z,B,oe){let ge=t.TEXTURE_2D;(B.isDataArrayTexture||B.isCompressedArrayTexture)&&(ge=t.TEXTURE_2D_ARRAY),B.isData3DTexture&&(ge=t.TEXTURE_3D);const pe=tt(z,B),de=B.source;n.bindTexture(ge,z.__webglTexture,t.TEXTURE0+oe);const ve=r.get(de);if(de.version!==ve.__version||pe===!0){n.activeTexture(t.TEXTURE0+oe);const Se=ar.getPrimaries(ar.workingColorSpace),Pe=B.colorSpace===Ds?null:ar.getPrimaries(B.colorSpace),Be=B.colorSpace===Ds||Se===Pe?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,B.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,B.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,B.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,Be);const je=T(B)&&E(B.image)===!1;let Le=w(B.image,je,!1,c);Le=lt(B,Le);const _t=E(Le)||s,bt=o.convert(B.format,B.colorSpace);let wt=o.convert(B.type),Ct=O(B.internalFormat,bt,wt,B.colorSpace,B.isVideoTexture);He(ge,B,_t);let pt;const qt=B.mipmaps,be=s&&B.isVideoTexture!==!0,gt=ve.__version===void 0||pe===!0,ft=P(B,Le,_t);if(B.isDepthTexture)Ct=t.DEPTH_COMPONENT,s?B.type===Ql?Ct=t.DEPTH_COMPONENT32F:B.type===Yc?Ct=t.DEPTH_COMPONENT24:B.type===Pd?Ct=t.DEPTH24_STENCIL8:Ct=t.DEPTH_COMPONENT16:B.type===Ql&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),B.format===Nd&&Ct===t.DEPTH_COMPONENT&&B.type!==wC&&B.type!==Yc&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),B.type=Yc,wt=o.convert(B.type)),B.format===Gp&&Ct===t.DEPTH_COMPONENT&&(Ct=t.DEPTH_STENCIL,B.type!==Pd&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),B.type=Pd,wt=o.convert(B.type))),gt&&(be?n.texStorage2D(t.TEXTURE_2D,1,Ct,Le.width,Le.height):n.texImage2D(t.TEXTURE_2D,0,Ct,Le.width,Le.height,0,bt,wt,null));else if(B.isDataTexture)if(qt.length>0&&_t){be&>&&n.texStorage2D(t.TEXTURE_2D,ft,Ct,qt[0].width,qt[0].height);for(let Ye=0,mt=qt.length;Ye>=1,mt>>=1}}else if(qt.length>0&&_t){be&>&&n.texStorage2D(t.TEXTURE_2D,ft,Ct,qt[0].width,qt[0].height);for(let Ye=0,mt=qt.length;Ye0&>++,n.texStorage2D(t.TEXTURE_CUBE_MAP,gt,pt,Le[0].width,Le[0].height));for(let Ye=0;Ye<6;Ye++)if(je){qt?n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Ye,0,0,0,Le[Ye].width,Le[Ye].height,wt,Ct,Le[Ye].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Ye,0,pt,Le[Ye].width,Le[Ye].height,0,wt,Ct,Le[Ye].data);for(let mt=0;mt>de),Le=Math.max(1,B.height>>de);pe===t.TEXTURE_3D||pe===t.TEXTURE_2D_ARRAY?n.texImage3D(pe,de,Pe,je,Le,B.depth,0,ve,Se,null):n.texImage2D(pe,de,Pe,je,Le,0,ve,Se,null)}n.bindFramebuffer(t.FRAMEBUFFER,z),Ue(B)?d.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,ge,pe,r.get(oe).__webglTexture,0,Ne(B)):(pe===t.TEXTURE_2D||pe>=t.TEXTURE_CUBE_MAP_POSITIVE_X&&pe<=t.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&t.framebufferTexture2D(t.FRAMEBUFFER,ge,pe,r.get(oe).__webglTexture,de),n.bindFramebuffer(t.FRAMEBUFFER,null)}function ue(z,B,oe){if(t.bindRenderbuffer(t.RENDERBUFFER,z),B.depthBuffer&&!B.stencilBuffer){let ge=s===!0?t.DEPTH_COMPONENT24:t.DEPTH_COMPONENT16;if(oe||Ue(B)){const pe=B.depthTexture;pe&&pe.isDepthTexture&&(pe.type===Ql?ge=t.DEPTH_COMPONENT32F:pe.type===Yc&&(ge=t.DEPTH_COMPONENT24));const de=Ne(B);Ue(B)?d.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,de,ge,B.width,B.height):t.renderbufferStorageMultisample(t.RENDERBUFFER,de,ge,B.width,B.height)}else t.renderbufferStorage(t.RENDERBUFFER,ge,B.width,B.height);t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,z)}else if(B.depthBuffer&&B.stencilBuffer){const ge=Ne(B);oe&&Ue(B)===!1?t.renderbufferStorageMultisample(t.RENDERBUFFER,ge,t.DEPTH24_STENCIL8,B.width,B.height):Ue(B)?d.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,ge,t.DEPTH24_STENCIL8,B.width,B.height):t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,B.width,B.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,z)}else{const ge=B.isWebGLMultipleRenderTargets===!0?B.texture:[B.texture];for(let pe=0;pe0){oe.__webglFramebuffer[Se]=[];for(let Pe=0;Pe0){oe.__webglFramebuffer=[];for(let Se=0;Se0&&Ue(z)===!1){const Se=de?B:[B];oe.__webglMultisampledFramebuffer=t.createFramebuffer(),oe.__webglColorRenderbuffer=[],n.bindFramebuffer(t.FRAMEBUFFER,oe.__webglMultisampledFramebuffer);for(let Pe=0;Pe0)for(let Pe=0;Pe0)for(let Pe=0;Pe0&&Ue(z)===!1){const B=z.isWebGLMultipleRenderTargets?z.texture:[z.texture],oe=z.width,ge=z.height;let pe=t.COLOR_BUFFER_BIT;const de=[],ve=z.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,Se=r.get(z),Pe=z.isWebGLMultipleRenderTargets===!0;if(Pe)for(let Be=0;Be0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&B.__useRenderToTexture!==!1}function We(z){const B=a.render.frame;y.get(z)!==B&&(y.set(z,B),z.update())}function lt(z,B){const oe=z.colorSpace,ge=z.format,pe=z.type;return z.isCompressedTexture===!0||z.isVideoTexture===!0||z.format===w2||oe!==ec&&oe!==Ds&&(ar.getTransfer(oe)===Er?s===!1?e.has("EXT_sRGB")===!0&&ge===ba?(z.format=w2,z.minFilter=wi,z.generateMipmaps=!1):B=_4.sRGBToLinear(B):(ge!==ba||pe!==Ls)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",oe)),B}this.allocateTextureUnit=W,this.resetTextureUnits=$,this.setTexture2D=te,this.setTexture2DArray=re,this.setTexture3D=le,this.setTextureCube=ce,this.rebindTextures=X,this.setupRenderTarget=ne,this.updateRenderTargetMipmap=me,this.updateMultisampleRenderTarget=we,this.setupDepthRenderbuffer=Ee,this.setupFrameBufferTexture=Xe,this.useMultisampledRTT=Ue}function EG(t,e,n){const r=n.isWebGL2;function i(o,a=Ds){let s;const l=ar.getTransfer(a);if(o===Ls)return t.UNSIGNED_BYTE;if(o===d4)return t.UNSIGNED_SHORT_4_4_4_4;if(o===h4)return t.UNSIGNED_SHORT_5_5_5_1;if(o===HW)return t.BYTE;if(o===VW)return t.SHORT;if(o===wC)return t.UNSIGNED_SHORT;if(o===f4)return t.INT;if(o===Yc)return t.UNSIGNED_INT;if(o===Ql)return t.FLOAT;if(o===Wp)return r?t.HALF_FLOAT:(s=e.get("OES_texture_half_float"),s!==null?s.HALF_FLOAT_OES:null);if(o===WW)return t.ALPHA;if(o===ba)return t.RGBA;if(o===GW)return t.LUMINANCE;if(o===jW)return t.LUMINANCE_ALPHA;if(o===Nd)return t.DEPTH_COMPONENT;if(o===Gp)return t.DEPTH_STENCIL;if(o===w2)return s=e.get("EXT_sRGB"),s!==null?s.SRGB_ALPHA_EXT:null;if(o===p4)return t.RED;if(o===m4)return t.RED_INTEGER;if(o===qW)return t.RG;if(o===g4)return t.RG_INTEGER;if(o===v4)return t.RGBA_INTEGER;if(o===fE||o===dE||o===hE||o===pE)if(l===Er)if(s=e.get("WEBGL_compressed_texture_s3tc_srgb"),s!==null){if(o===fE)return s.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(o===dE)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(o===hE)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(o===pE)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(s=e.get("WEBGL_compressed_texture_s3tc"),s!==null){if(o===fE)return s.COMPRESSED_RGB_S3TC_DXT1_EXT;if(o===dE)return s.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(o===hE)return s.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(o===pE)return s.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(o===KR||o===ZR||o===JR||o===QR)if(s=e.get("WEBGL_compressed_texture_pvrtc"),s!==null){if(o===KR)return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(o===ZR)return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(o===JR)return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(o===QR)return s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(o===XW)return s=e.get("WEBGL_compressed_texture_etc1"),s!==null?s.COMPRESSED_RGB_ETC1_WEBGL:null;if(o===eP||o===tP)if(s=e.get("WEBGL_compressed_texture_etc"),s!==null){if(o===eP)return l===Er?s.COMPRESSED_SRGB8_ETC2:s.COMPRESSED_RGB8_ETC2;if(o===tP)return l===Er?s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:s.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(o===nP||o===rP||o===iP||o===oP||o===aP||o===sP||o===lP||o===uP||o===cP||o===fP||o===dP||o===hP||o===pP||o===mP)if(s=e.get("WEBGL_compressed_texture_astc"),s!==null){if(o===nP)return l===Er?s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:s.COMPRESSED_RGBA_ASTC_4x4_KHR;if(o===rP)return l===Er?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:s.COMPRESSED_RGBA_ASTC_5x4_KHR;if(o===iP)return l===Er?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:s.COMPRESSED_RGBA_ASTC_5x5_KHR;if(o===oP)return l===Er?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:s.COMPRESSED_RGBA_ASTC_6x5_KHR;if(o===aP)return l===Er?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:s.COMPRESSED_RGBA_ASTC_6x6_KHR;if(o===sP)return l===Er?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:s.COMPRESSED_RGBA_ASTC_8x5_KHR;if(o===lP)return l===Er?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:s.COMPRESSED_RGBA_ASTC_8x6_KHR;if(o===uP)return l===Er?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:s.COMPRESSED_RGBA_ASTC_8x8_KHR;if(o===cP)return l===Er?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:s.COMPRESSED_RGBA_ASTC_10x5_KHR;if(o===fP)return l===Er?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:s.COMPRESSED_RGBA_ASTC_10x6_KHR;if(o===dP)return l===Er?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:s.COMPRESSED_RGBA_ASTC_10x8_KHR;if(o===hP)return l===Er?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:s.COMPRESSED_RGBA_ASTC_10x10_KHR;if(o===pP)return l===Er?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:s.COMPRESSED_RGBA_ASTC_12x10_KHR;if(o===mP)return l===Er?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:s.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(o===mE||o===gP||o===vP)if(s=e.get("EXT_texture_compression_bptc"),s!==null){if(o===mE)return l===Er?s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:s.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(o===gP)return s.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(o===vP)return s.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(o===YW||o===yP||o===xP||o===bP)if(s=e.get("EXT_texture_compression_rgtc"),s!==null){if(o===mE)return s.COMPRESSED_RED_RGTC1_EXT;if(o===yP)return s.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(o===xP)return s.COMPRESSED_RED_GREEN_RGTC2_EXT;if(o===bP)return s.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return o===Pd?r?t.UNSIGNED_INT_24_8:(s=e.get("WEBGL_depth_texture"),s!==null?s.UNSIGNED_INT_24_8_WEBGL:null):t[o]!==void 0?t[o]:null}return{convert:i}}class MG extends uo{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}let xg=class extends Kn{constructor(){super(),this.isGroup=!0,this.type="Group"}};const yMe={type:"move"};class w3{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new xg,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 xg,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new ae,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new ae),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new xg,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new ae,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new ae),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 n=this._hand;if(n)for(const r of e.hand.values())this._getHandJoint(n,r)}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,n,r){let i=null,o=null,a=null;const s=this._targetRay,l=this._grip,u=this._hand;if(e&&n.session.visibilityState!=="visible-blurred"){if(u&&e.hand){a=!0;for(const x of e.hand.values()){const _=n.getJointPose(x,r),v=this._getHandJoint(u,x);_!==null&&(v.matrix.fromArray(_.transform.matrix),v.matrix.decompose(v.position,v.rotation,v.scale),v.matrixWorldNeedsUpdate=!0,v.jointRadius=_.radius),v.visible=_!==null}const c=u.joints["index-finger-tip"],f=u.joints["thumb-tip"],d=c.position.distanceTo(f.position),p=.02,y=.005;u.inputState.pinching&&d>p+y?(u.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!u.inputState.pinching&&d<=p-y&&(u.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(o=n.getPose(e.gripSpace,r),o!==null&&(l.matrix.fromArray(o.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,o.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(o.linearVelocity)):l.hasLinearVelocity=!1,o.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(o.angularVelocity)):l.hasAngularVelocity=!1));s!==null&&(i=n.getPose(e.targetRaySpace,r),i===null&&o!==null&&(i=o),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(yMe)))}return s!==null&&(s.visible=i!==null),l!==null&&(l.visible=o!==null),u!==null&&(u.visible=a!==null),this}_getHandJoint(e,n){if(e.joints[n.jointName]===void 0){const r=new xg;r.matrixAutoUpdate=!1,r.visible=!1,e.joints[n.jointName]=r,e.add(r)}return e.joints[n.jointName]}}class CG extends hi{constructor(e,n,r,i,o,a,s,l,u,c){if(c=c!==void 0?c:Nd,c!==Nd&&c!==Gp)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");r===void 0&&c===Nd&&(r=Yc),r===void 0&&c===Gp&&(r=Pd),super(null,i,o,a,s,l,c,r,u),this.isDepthTexture=!0,this.image={width:e,height:n},this.magFilter=s!==void 0?s:ci,this.minFilter=l!==void 0?l:ci,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.compareFunction=e.compareFunction,this}toJSON(e){const n=super.toJSON(e);return this.compareFunction!==null&&(n.compareFunction=this.compareFunction),n}}class xMe extends vf{constructor(e,n){super();const r=this;let i=null,o=1,a=null,s="local-floor",l=1,u=null,c=null,f=null,d=null,p=null,y=null;const x=n.getContextAttributes();let _=null,v=null;const S=[],w=[],E=new uo;E.layers.enable(1),E.viewport=new ir;const T=new uo;T.layers.enable(2),T.viewport=new ir;const C=[E,T],D=new MG;D.layers.enable(1),D.layers.enable(2);let O=null,P=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(re){let le=S[re];return le===void 0&&(le=new w3,S[re]=le),le.getTargetRaySpace()},this.getControllerGrip=function(re){let le=S[re];return le===void 0&&(le=new w3,S[re]=le),le.getGripSpace()},this.getHand=function(re){let le=S[re];return le===void 0&&(le=new w3,S[re]=le),le.getHandSpace()};function N(re){const le=w.indexOf(re.inputSource);if(le===-1)return;const ce=S[le];ce!==void 0&&(ce.update(re.inputSource,re.frame,u||a),ce.dispatchEvent({type:re.type,data:re.inputSource}))}function k(){i.removeEventListener("select",N),i.removeEventListener("selectstart",N),i.removeEventListener("selectend",N),i.removeEventListener("squeeze",N),i.removeEventListener("squeezestart",N),i.removeEventListener("squeezeend",N),i.removeEventListener("end",k),i.removeEventListener("inputsourceschange",G);for(let re=0;re=0&&(w[Ce]=null,S[Ce].disconnect(ce))}for(let le=0;le=w.length){w.push(ce),Ce=Ie;break}else if(w[Ie]===null){w[Ie]=ce,Ce=Ie;break}if(Ce===-1)break}const Re=S[Ce];Re&&Re.connect(ce)}}const Z=new ae,j=new ae;function K(re,le,ce){Z.setFromMatrixPosition(le.matrixWorld),j.setFromMatrixPosition(ce.matrixWorld);const Ce=Z.distanceTo(j),Re=le.projectionMatrix.elements,Ie=ce.projectionMatrix.elements,He=Re[14]/(Re[10]-1),tt=Re[14]/(Re[10]+1),Qe=(Re[9]+1)/Re[5],ct=(Re[9]-1)/Re[5],Xe=(Re[8]-1)/Re[0],ue=(Ie[8]+1)/Ie[0],De=He*Xe,Ee=He*ue,X=Ce/(-Xe+ue),ne=X*-Xe;le.matrixWorld.decompose(re.position,re.quaternion,re.scale),re.translateX(ne),re.translateZ(X),re.matrixWorld.compose(re.position,re.quaternion,re.scale),re.matrixWorldInverse.copy(re.matrixWorld).invert();const me=He+X,we=tt+X,Ne=De-ne,Ue=Ee+(Ce-ne),We=Qe*tt/we*me,lt=ct*tt/we*me;re.projectionMatrix.makePerspective(Ne,Ue,We,lt,me,we),re.projectionMatrixInverse.copy(re.projectionMatrix).invert()}function Y(re,le){le===null?re.matrixWorld.copy(re.matrix):re.matrixWorld.multiplyMatrices(le.matrixWorld,re.matrix),re.matrixWorldInverse.copy(re.matrixWorld).invert()}this.updateCamera=function(re){if(i===null)return;D.near=T.near=E.near=re.near,D.far=T.far=E.far=re.far,(O!==D.near||P!==D.far)&&(i.updateRenderState({depthNear:D.near,depthFar:D.far}),O=D.near,P=D.far);const le=re.parent,ce=D.cameras;Y(D,le);for(let Ce=0;Ce0&&(_.alphaTest.value=v.alphaTest);const S=e.get(v).envMap;if(S&&(_.envMap.value=S,_.flipEnvMap.value=S.isCubeTexture&&S.isRenderTargetTexture===!1?-1:1,_.reflectivity.value=v.reflectivity,_.ior.value=v.ior,_.refractionRatio.value=v.refractionRatio),v.lightMap){_.lightMap.value=v.lightMap;const w=t._useLegacyLights===!0?Math.PI:1;_.lightMapIntensity.value=v.lightMapIntensity*w,n(v.lightMap,_.lightMapTransform)}v.aoMap&&(_.aoMap.value=v.aoMap,_.aoMapIntensity.value=v.aoMapIntensity,n(v.aoMap,_.aoMapTransform))}function a(_,v){_.diffuse.value.copy(v.color),_.opacity.value=v.opacity,v.map&&(_.map.value=v.map,n(v.map,_.mapTransform))}function s(_,v){_.dashSize.value=v.dashSize,_.totalSize.value=v.dashSize+v.gapSize,_.scale.value=v.scale}function l(_,v,S,w){_.diffuse.value.copy(v.color),_.opacity.value=v.opacity,_.size.value=v.size*S,_.scale.value=w*.5,v.map&&(_.map.value=v.map,n(v.map,_.uvTransform)),v.alphaMap&&(_.alphaMap.value=v.alphaMap,n(v.alphaMap,_.alphaMapTransform)),v.alphaTest>0&&(_.alphaTest.value=v.alphaTest)}function u(_,v){_.diffuse.value.copy(v.color),_.opacity.value=v.opacity,_.rotation.value=v.rotation,v.map&&(_.map.value=v.map,n(v.map,_.mapTransform)),v.alphaMap&&(_.alphaMap.value=v.alphaMap,n(v.alphaMap,_.alphaMapTransform)),v.alphaTest>0&&(_.alphaTest.value=v.alphaTest)}function c(_,v){_.specular.value.copy(v.specular),_.shininess.value=Math.max(v.shininess,1e-4)}function f(_,v){v.gradientMap&&(_.gradientMap.value=v.gradientMap)}function d(_,v){_.metalness.value=v.metalness,v.metalnessMap&&(_.metalnessMap.value=v.metalnessMap,n(v.metalnessMap,_.metalnessMapTransform)),_.roughness.value=v.roughness,v.roughnessMap&&(_.roughnessMap.value=v.roughnessMap,n(v.roughnessMap,_.roughnessMapTransform)),e.get(v).envMap&&(_.envMapIntensity.value=v.envMapIntensity)}function p(_,v,S){_.ior.value=v.ior,v.sheen>0&&(_.sheenColor.value.copy(v.sheenColor).multiplyScalar(v.sheen),_.sheenRoughness.value=v.sheenRoughness,v.sheenColorMap&&(_.sheenColorMap.value=v.sheenColorMap,n(v.sheenColorMap,_.sheenColorMapTransform)),v.sheenRoughnessMap&&(_.sheenRoughnessMap.value=v.sheenRoughnessMap,n(v.sheenRoughnessMap,_.sheenRoughnessMapTransform))),v.clearcoat>0&&(_.clearcoat.value=v.clearcoat,_.clearcoatRoughness.value=v.clearcoatRoughness,v.clearcoatMap&&(_.clearcoatMap.value=v.clearcoatMap,n(v.clearcoatMap,_.clearcoatMapTransform)),v.clearcoatRoughnessMap&&(_.clearcoatRoughnessMap.value=v.clearcoatRoughnessMap,n(v.clearcoatRoughnessMap,_.clearcoatRoughnessMapTransform)),v.clearcoatNormalMap&&(_.clearcoatNormalMap.value=v.clearcoatNormalMap,n(v.clearcoatNormalMap,_.clearcoatNormalMapTransform),_.clearcoatNormalScale.value.copy(v.clearcoatNormalScale),v.side===Sa&&_.clearcoatNormalScale.value.negate())),v.iridescence>0&&(_.iridescence.value=v.iridescence,_.iridescenceIOR.value=v.iridescenceIOR,_.iridescenceThicknessMinimum.value=v.iridescenceThicknessRange[0],_.iridescenceThicknessMaximum.value=v.iridescenceThicknessRange[1],v.iridescenceMap&&(_.iridescenceMap.value=v.iridescenceMap,n(v.iridescenceMap,_.iridescenceMapTransform)),v.iridescenceThicknessMap&&(_.iridescenceThicknessMap.value=v.iridescenceThicknessMap,n(v.iridescenceThicknessMap,_.iridescenceThicknessMapTransform))),v.transmission>0&&(_.transmission.value=v.transmission,_.transmissionSamplerMap.value=S.texture,_.transmissionSamplerSize.value.set(S.width,S.height),v.transmissionMap&&(_.transmissionMap.value=v.transmissionMap,n(v.transmissionMap,_.transmissionMapTransform)),_.thickness.value=v.thickness,v.thicknessMap&&(_.thicknessMap.value=v.thicknessMap,n(v.thicknessMap,_.thicknessMapTransform)),_.attenuationDistance.value=v.attenuationDistance,_.attenuationColor.value.copy(v.attenuationColor)),v.anisotropy>0&&(_.anisotropyVector.value.set(v.anisotropy*Math.cos(v.anisotropyRotation),v.anisotropy*Math.sin(v.anisotropyRotation)),v.anisotropyMap&&(_.anisotropyMap.value=v.anisotropyMap,n(v.anisotropyMap,_.anisotropyMapTransform))),_.specularIntensity.value=v.specularIntensity,_.specularColor.value.copy(v.specularColor),v.specularColorMap&&(_.specularColorMap.value=v.specularColorMap,n(v.specularColorMap,_.specularColorMapTransform)),v.specularIntensityMap&&(_.specularIntensityMap.value=v.specularIntensityMap,n(v.specularIntensityMap,_.specularIntensityMapTransform))}function y(_,v){v.matcap&&(_.matcap.value=v.matcap)}function x(_,v){const S=e.get(v).light;_.referencePosition.value.setFromMatrixPosition(S.matrixWorld),_.nearDistance.value=S.shadow.camera.near,_.farDistance.value=S.shadow.camera.far}return{refreshFogUniforms:r,refreshMaterialUniforms:i}}function _Me(t,e,n,r){let i={},o={},a=[];const s=n.isWebGL2?t.getParameter(t.MAX_UNIFORM_BUFFER_BINDINGS):0;function l(S,w){const E=w.program;r.uniformBlockBinding(S,E)}function u(S,w){let E=i[S.id];E===void 0&&(y(S),E=c(S),i[S.id]=E,S.addEventListener("dispose",_));const T=w.program;r.updateUBOMapping(S,T);const C=e.render.frame;o[S.id]!==C&&(d(S),o[S.id]=C)}function c(S){const w=f();S.__bindingPointIndex=w;const E=t.createBuffer(),T=S.__size,C=S.usage;return t.bindBuffer(t.UNIFORM_BUFFER,E),t.bufferData(t.UNIFORM_BUFFER,T,C),t.bindBuffer(t.UNIFORM_BUFFER,null),t.bindBufferBase(t.UNIFORM_BUFFER,w,E),E}function f(){for(let S=0;S0){C=E%T;const G=T-C;C!==0&&G-N.boundary<0&&(E+=T-C,P.__offset=E)}E+=N.storage}return C=E%T,C>0&&(E+=T-C),S.__size=E,S.__cache={},this}function x(S){const w={boundary:0,storage:0};return typeof S=="number"?(w.boundary=4,w.storage=4):S.isVector2?(w.boundary=8,w.storage=8):S.isVector3||S.isColor?(w.boundary=16,w.storage=12):S.isVector4?(w.boundary=16,w.storage=16):S.isMatrix3?(w.boundary=48,w.storage=48):S.isMatrix4?(w.boundary=64,w.storage=64):S.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",S),w}function _(S){const w=S.target;w.removeEventListener("dispose",_);const E=a.indexOf(w.__bindingPointIndex);a.splice(E,1),t.deleteBuffer(i[w.id]),delete i[w.id],delete o[w.id]}function v(){for(const S in i)t.deleteBuffer(i[S]);a=[],i={},o={}}return{bind:l,update:u,dispose:v}}class T4{constructor(e={}){const{canvas:n=dG(),context:r=null,depth:i=!0,stencil:o=!0,alpha:a=!1,antialias:s=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:u=!1,powerPreference:c="default",failIfMajorPerformanceCaveat:f=!1}=e;this.isWebGLRenderer=!0;let d;r!==null?d=r.getContextAttributes().alpha:d=a;const p=new Uint32Array(4),y=new Int32Array(4);let x=null,_=null;const v=[],S=[];this.domElement=n,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._outputColorSpace=Hi,this._useLegacyLights=!1,this.toneMapping=ju,this.toneMappingExposure=1;const w=this;let E=!1,T=0,C=0,D=null,O=-1,P=null;const N=new ir,k=new ir;let G=null;const Z=new Pt(0);let j=0,K=n.width,Y=n.height,$=1,W=null,U=null;const te=new ir(0,0,K,Y),re=new ir(0,0,K,Y);let le=!1;const ce=new CC;let Ce=!1,Re=!1,Ie=null;const He=new yn,tt=new Je,Qe=new ae,ct={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function Xe(){return D===null?$:1}let ue=r;function De(J,_e){for(let Oe=0;Oe{function Mt(){if(ke.forEach(function(Ft){we.get(Ft).currentProgram.isReady()&&ke.delete(Ft)}),ke.size===0){ze(J);return}setTimeout(Mt,10)}Ee.get("KHR_parallel_shader_compile")!==null?Mt():setTimeout(Mt,10)})};let bn=null;function Zn(J){bn&&bn(J)}function Cr(){Sn.stop()}function fn(){Sn.start()}const Sn=new xG;Sn.setAnimationLoop(Zn),typeof self<"u"&&Sn.setContext(self),this.setAnimationLoop=function(J){bn=J,pt.setAnimationLoop(J),J===null?Sn.stop():Sn.start()},pt.addEventListener("sessionstart",Cr),pt.addEventListener("sessionend",fn),this.render=function(J,_e){if(_e!==void 0&&_e.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(E===!0)return;J.matrixWorldAutoUpdate===!0&&J.updateMatrixWorld(),_e.parent===null&&_e.matrixWorldAutoUpdate===!0&&_e.updateMatrixWorld(),pt.enabled===!0&&pt.isPresenting===!0&&(pt.cameraAutoUpdate===!0&&pt.updateCamera(_e),_e=pt.getCamera()),J.isScene===!0&&J.onBeforeRender(w,J,_e,D),_=de.get(J,S.length),_.init(),S.push(_),He.multiplyMatrices(_e.projectionMatrix,_e.matrixWorldInverse),ce.setFromProjectionMatrix(He),Re=this.localClippingEnabled,Ce=ve.init(this.clippingPlanes,Re),x=pe.get(J,v.length),x.init(),v.push(x),ur(J,_e,0,w.sortObjects),x.finish(),w.sortObjects===!0&&x.sort(W,U),this.info.render.frame++,Ce===!0&&ve.beginShadows();const Oe=_.state.shadowsArray;if(Se.render(Oe,J,_e),Ce===!0&&ve.endShadows(),this.info.autoReset===!0&&this.info.reset(),Pe.render(x,J),_.setupLights(w._useLegacyLights),_e.isArrayCamera){const ke=_e.cameras;for(let ze=0,Mt=ke.length;ze0?_=S[S.length-1]:_=null,v.pop(),v.length>0?x=v[v.length-1]:x=null};function ur(J,_e,Oe,ke){if(J.visible===!1)return;if(J.layers.test(_e.layers)){if(J.isGroup)Oe=J.renderOrder;else if(J.isLOD)J.autoUpdate===!0&&J.update(_e);else if(J.isLight)_.pushLight(J),J.castShadow&&_.pushShadow(J);else if(J.isSprite){if(!J.frustumCulled||ce.intersectsSprite(J)){ke&&Qe.setFromMatrixPosition(J.matrixWorld).applyMatrix4(He);const Ft=B.update(J),Wt=J.material;Wt.visible&&x.push(J,Ft,Wt,Oe,Qe.z,null)}}else if((J.isMesh||J.isLine||J.isPoints)&&(!J.frustumCulled||ce.intersectsObject(J))){const Ft=B.update(J),Wt=J.material;if(ke&&(J.boundingSphere!==void 0?(J.boundingSphere===null&&J.computeBoundingSphere(),Qe.copy(J.boundingSphere.center)):(Ft.boundingSphere===null&&Ft.computeBoundingSphere(),Qe.copy(Ft.boundingSphere.center)),Qe.applyMatrix4(J.matrixWorld).applyMatrix4(He)),Array.isArray(Wt)){const yt=Ft.groups;for(let Lt=0,an=yt.length;Lt0&&Ta(ze,Mt,_e,Oe),ke&&ne.viewport(N.copy(ke)),ze.length>0&&ns(ze,_e,Oe),Mt.length>0&&ns(Mt,_e,Oe),Ft.length>0&&ns(Ft,_e,Oe),ne.buffers.depth.setTest(!0),ne.buffers.depth.setMask(!0),ne.buffers.color.setMask(!0),ne.setPolygonOffset(!1)}function Ta(J,_e,Oe,ke){if((Oe.isScene===!0?Oe.overrideMaterial:null)!==null)return;const Mt=X.isWebGL2;Ie===null&&(Ie=new au(1,1,{generateMipmaps:!0,type:Ee.has("EXT_color_buffer_half_float")?Wp:Ls,minFilter:Vd,samples:Mt?4:0})),w.getDrawingBufferSize(tt),Mt?Ie.setSize(tt.x,tt.y):Ie.setSize(S2(tt.x),S2(tt.y));const Ft=w.getRenderTarget();w.setRenderTarget(Ie),w.getClearColor(Z),j=w.getClearAlpha(),j<1&&w.setClearColor(16777215,.5),w.clear();const Wt=w.toneMapping;w.toneMapping=ju,ns(J,Oe,ke),Ne.updateMultisampleRenderTarget(Ie),Ne.updateRenderTargetMipmap(Ie);let yt=!1;for(let Lt=0,an=_e.length;Lt0),tn=!!Oe.morphAttributes.position,Xn=!!Oe.morphAttributes.normal,Qr=!!Oe.morphAttributes.color;let cr=ju;ke.toneMapped&&(D===null||D.isXRRenderTarget===!0)&&(cr=w.toneMapping);const Si=Oe.morphAttributes.position||Oe.morphAttributes.normal||Oe.morphAttributes.color,sn=Si!==void 0?Si.length:0,It=we.get(ke),Da=_.state.lights;if(Ce===!0&&(Re===!0||J!==P)){const Mi=J===P&&ke.id===O;ve.setState(ke,J,Mi)}let Pn=!1;ke.version===It.__version?(It.needsLights&&It.lightsStateVersion!==Da.state.version||It.outputColorSpace!==Wt||ze.isInstancedMesh&&It.instancing===!1||!ze.isInstancedMesh&&It.instancing===!0||ze.isSkinnedMesh&&It.skinning===!1||!ze.isSkinnedMesh&&It.skinning===!0||ze.isInstancedMesh&&It.instancingColor===!0&&ze.instanceColor===null||ze.isInstancedMesh&&It.instancingColor===!1&&ze.instanceColor!==null||It.envMap!==yt||ke.fog===!0&&It.fog!==Mt||It.numClippingPlanes!==void 0&&(It.numClippingPlanes!==ve.numPlanes||It.numIntersection!==ve.numIntersection)||It.vertexAlphas!==Lt||It.vertexTangents!==an||It.morphTargets!==tn||It.morphNormals!==Xn||It.morphColors!==Qr||It.toneMapping!==cr||X.isWebGL2===!0&&It.morphTargetsCount!==sn)&&(Pn=!0):(Pn=!0,It.__version=ke.version);let Ar=It.currentProgram;Pn===!0&&(Ar=ea(ke,_e,ze));let rs=!1,Fo=!1,Ei=!1;const $r=Ar.getUniforms(),na=It.uniforms;if(ne.useProgram(Ar.program)&&(rs=!0,Fo=!0,Ei=!0),ke.id!==O&&(O=ke.id,Fo=!0),rs||P!==J){$r.setValue(ue,"projectionMatrix",J.projectionMatrix),$r.setValue(ue,"viewMatrix",J.matrixWorldInverse);const Mi=$r.map.cameraPosition;Mi!==void 0&&Mi.setValue(ue,Qe.setFromMatrixPosition(J.matrixWorld)),X.logarithmicDepthBuffer&&$r.setValue(ue,"logDepthBufFC",2/(Math.log(J.far+1)/Math.LN2)),(ke.isMeshPhongMaterial||ke.isMeshToonMaterial||ke.isMeshLambertMaterial||ke.isMeshBasicMaterial||ke.isMeshStandardMaterial||ke.isShaderMaterial)&&$r.setValue(ue,"isOrthographic",J.isOrthographicCamera===!0),P!==J&&(P=J,Fo=!0,Ei=!0)}if(ze.isSkinnedMesh){$r.setOptional(ue,ze,"bindMatrix"),$r.setOptional(ue,ze,"bindMatrixInverse");const Mi=ze.skeleton;Mi&&(X.floatVertexTextures?(Mi.boneTexture===null&&Mi.computeBoneTexture(),$r.setValue(ue,"boneTexture",Mi.boneTexture,Ne),$r.setValue(ue,"boneTextureSize",Mi.boneTextureSize)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}const cc=Oe.morphAttributes;if((cc.position!==void 0||cc.normal!==void 0||cc.color!==void 0&&X.isWebGL2===!0)&&Be.update(ze,Oe,Ar),(Fo||It.receiveShadow!==ze.receiveShadow)&&(It.receiveShadow=ze.receiveShadow,$r.setValue(ue,"receiveShadow",ze.receiveShadow)),ke.isMeshGouraudMaterial&&ke.envMap!==null&&(na.envMap.value=yt,na.flipEnvMap.value=yt.isCubeTexture&&yt.isRenderTargetTexture===!1?-1:1),Fo&&($r.setValue(ue,"toneMappingExposure",w.toneMappingExposure),It.needsLights&&Ge(na,Ei),Mt&&ke.fog===!0&&ge.refreshFogUniforms(na,Mt),ge.refreshMaterialUniforms(na,ke,$,Y,Ie),vE.upload(ue,Io(It),na,Ne)),ke.isShaderMaterial&&ke.uniformsNeedUpdate===!0&&(vE.upload(ue,Io(It),na,Ne),ke.uniformsNeedUpdate=!1),ke.isSpriteMaterial&&$r.setValue(ue,"center",ze.center),$r.setValue(ue,"modelViewMatrix",ze.modelViewMatrix),$r.setValue(ue,"normalMatrix",ze.normalMatrix),$r.setValue(ue,"modelMatrix",ze.matrixWorld),ke.isShaderMaterial||ke.isRawShaderMaterial){const Mi=ke.uniformsGroups;for(let fc=0,Lo=Mi.length;fc0&&Ne.useMultisampledRTT(J)===!1?ze=we.get(J).__webglMultisampledFramebuffer:Array.isArray(an)?ze=an[Oe]:ze=an,N.copy(J.viewport),k.copy(J.scissor),G=J.scissorTest}else N.copy(te).multiplyScalar($).floor(),k.copy(re).multiplyScalar($).floor(),G=le;if(ne.bindFramebuffer(ue.FRAMEBUFFER,ze)&&X.drawBuffers&&ke&&ne.drawBuffers(J,ze),ne.viewport(N),ne.scissor(k),ne.setScissorTest(G),Mt){const yt=we.get(J.texture);ue.framebufferTexture2D(ue.FRAMEBUFFER,ue.COLOR_ATTACHMENT0,ue.TEXTURE_CUBE_MAP_POSITIVE_X+_e,yt.__webglTexture,Oe)}else if(Ft){const yt=we.get(J.texture),Lt=_e||0;ue.framebufferTextureLayer(ue.FRAMEBUFFER,ue.COLOR_ATTACHMENT0,yt.__webglTexture,Oe||0,Lt)}O=-1},this.readRenderTargetPixels=function(J,_e,Oe,ke,ze,Mt,Ft){if(!(J&&J.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let Wt=we.get(J).__webglFramebuffer;if(J.isWebGLCubeRenderTarget&&Ft!==void 0&&(Wt=Wt[Ft]),Wt){ne.bindFramebuffer(ue.FRAMEBUFFER,Wt);try{const yt=J.texture,Lt=yt.format,an=yt.type;if(Lt!==ba&&_t.convert(Lt)!==ue.getParameter(ue.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const tn=an===Wp&&(Ee.has("EXT_color_buffer_half_float")||X.isWebGL2&&Ee.has("EXT_color_buffer_float"));if(an!==Ls&&_t.convert(an)!==ue.getParameter(ue.IMPLEMENTATION_COLOR_READ_TYPE)&&!(an===Ql&&(X.isWebGL2||Ee.has("OES_texture_float")||Ee.has("WEBGL_color_buffer_float")))&&!tn){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}_e>=0&&_e<=J.width-ke&&Oe>=0&&Oe<=J.height-ze&&ue.readPixels(_e,Oe,ke,ze,_t.convert(Lt),_t.convert(an),Mt)}finally{const yt=D!==null?we.get(D).__webglFramebuffer:null;ne.bindFramebuffer(ue.FRAMEBUFFER,yt)}}},this.copyFramebufferToTexture=function(J,_e,Oe=0){const ke=Math.pow(2,-Oe),ze=Math.floor(_e.image.width*ke),Mt=Math.floor(_e.image.height*ke);Ne.setTexture2D(_e,0),ue.copyTexSubImage2D(ue.TEXTURE_2D,Oe,0,0,J.x,J.y,ze,Mt),ne.unbindTexture()},this.copyTextureToTexture=function(J,_e,Oe,ke=0){const ze=_e.image.width,Mt=_e.image.height,Ft=_t.convert(Oe.format),Wt=_t.convert(Oe.type);Ne.setTexture2D(Oe,0),ue.pixelStorei(ue.UNPACK_FLIP_Y_WEBGL,Oe.flipY),ue.pixelStorei(ue.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Oe.premultiplyAlpha),ue.pixelStorei(ue.UNPACK_ALIGNMENT,Oe.unpackAlignment),_e.isDataTexture?ue.texSubImage2D(ue.TEXTURE_2D,ke,J.x,J.y,ze,Mt,Ft,Wt,_e.image.data):_e.isCompressedTexture?ue.compressedTexSubImage2D(ue.TEXTURE_2D,ke,J.x,J.y,_e.mipmaps[0].width,_e.mipmaps[0].height,Ft,_e.mipmaps[0].data):ue.texSubImage2D(ue.TEXTURE_2D,ke,J.x,J.y,Ft,Wt,_e.image),ke===0&&Oe.generateMipmaps&&ue.generateMipmap(ue.TEXTURE_2D),ne.unbindTexture()},this.copyTextureToTexture3D=function(J,_e,Oe,ke,ze=0){if(w.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}const Mt=J.max.x-J.min.x+1,Ft=J.max.y-J.min.y+1,Wt=J.max.z-J.min.z+1,yt=_t.convert(ke.format),Lt=_t.convert(ke.type);let an;if(ke.isData3DTexture)Ne.setTexture3D(ke,0),an=ue.TEXTURE_3D;else if(ke.isDataArrayTexture)Ne.setTexture2DArray(ke,0),an=ue.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}ue.pixelStorei(ue.UNPACK_FLIP_Y_WEBGL,ke.flipY),ue.pixelStorei(ue.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ke.premultiplyAlpha),ue.pixelStorei(ue.UNPACK_ALIGNMENT,ke.unpackAlignment);const tn=ue.getParameter(ue.UNPACK_ROW_LENGTH),Xn=ue.getParameter(ue.UNPACK_IMAGE_HEIGHT),Qr=ue.getParameter(ue.UNPACK_SKIP_PIXELS),cr=ue.getParameter(ue.UNPACK_SKIP_ROWS),Si=ue.getParameter(ue.UNPACK_SKIP_IMAGES),sn=Oe.isCompressedTexture?Oe.mipmaps[0]:Oe.image;ue.pixelStorei(ue.UNPACK_ROW_LENGTH,sn.width),ue.pixelStorei(ue.UNPACK_IMAGE_HEIGHT,sn.height),ue.pixelStorei(ue.UNPACK_SKIP_PIXELS,J.min.x),ue.pixelStorei(ue.UNPACK_SKIP_ROWS,J.min.y),ue.pixelStorei(ue.UNPACK_SKIP_IMAGES,J.min.z),Oe.isDataTexture||Oe.isData3DTexture?ue.texSubImage3D(an,ze,_e.x,_e.y,_e.z,Mt,Ft,Wt,yt,Lt,sn.data):Oe.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),ue.compressedTexSubImage3D(an,ze,_e.x,_e.y,_e.z,Mt,Ft,Wt,yt,sn.data)):ue.texSubImage3D(an,ze,_e.x,_e.y,_e.z,Mt,Ft,Wt,yt,Lt,sn),ue.pixelStorei(ue.UNPACK_ROW_LENGTH,tn),ue.pixelStorei(ue.UNPACK_IMAGE_HEIGHT,Xn),ue.pixelStorei(ue.UNPACK_SKIP_PIXELS,Qr),ue.pixelStorei(ue.UNPACK_SKIP_ROWS,cr),ue.pixelStorei(ue.UNPACK_SKIP_IMAGES,Si),ze===0&&ke.generateMipmaps&&ue.generateMipmap(an),ne.unbindTexture()},this.initTexture=function(J){J.isCubeTexture?Ne.setTextureCube(J,0):J.isData3DTexture?Ne.setTexture3D(J,0):J.isDataArrayTexture||J.isCompressedArrayTexture?Ne.setTexture2DArray(J,0):Ne.setTexture2D(J,0),ne.unbindTexture()},this.resetState=function(){T=0,C=0,D=null,ne.reset(),bt.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Bu}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const n=this.getContext();n.drawingBufferColorSpace=e===EC?"display-p3":"srgb",n.unpackColorSpace=ar.workingColorSpace===Rb?"display-p3":"srgb"}get physicallyCorrectLights(){return console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),!this.useLegacyLights}set physicallyCorrectLights(e){console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),this.useLegacyLights=!e}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===Hi?Od:x4}set outputEncoding(e){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=e===Od?Hi:ec}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(e){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=e}}class AG extends T4{}AG.prototype.isWebGL1Renderer=!0;class TC{constructor(e,n=25e-5){this.isFogExp2=!0,this.name="",this.color=new Pt(e),this.density=n}clone(){return new TC(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class DC{constructor(e,n=1,r=1e3){this.isFog=!0,this.name="",this.color=new Pt(e),this.near=n,this.far=r}clone(){return new DC(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class E2 extends Kn{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,n){return super.copy(e,n),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,e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const n=super.toJSON(e);return this.fog!==null&&(n.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(n.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(n.object.backgroundIntensity=this.backgroundIntensity),n}}class RC{constructor(e,n){this.isInterleavedBuffer=!0,this.array=e,this.stride=n,this.count=e!==void 0?e.length/n:0,this.usage=Gx,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=ks()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}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,n,r){e*=this.stride,r*=n.stride;for(let i=0,o=this.stride;ie.far||n.push({distance:l,point:Zy.clone(),uv:za.getInterpolation(Zy,rS,Qy,iS,_6,S3,w6,new Je),face:null,object:this})}copy(e,n){return super.copy(e,n),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}}function oS(t,e,n,r,i,o){C0.subVectors(t,n).addScalar(.5).multiply(r),i!==void 0?(Jy.x=o*C0.x-i*C0.y,Jy.y=i*C0.x+o*C0.y):Jy.copy(C0),t.copy(e),t.x+=Jy.x,t.y+=Jy.y,t.applyMatrix4(TG)}const aS=new ae,S6=new ae;class RG extends Kn{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const n=e.levels;for(let r=0,i=n.length;r0){let r,i;for(r=1,i=n.length;r0){aS.setFromMatrixPosition(this.matrixWorld);const i=e.ray.origin.distanceTo(aS);this.getObjectForDistance(i).raycast(e,n)}}update(e){const n=this.levels;if(n.length>1){aS.setFromMatrixPosition(e.matrixWorld),S6.setFromMatrixPosition(this.matrixWorld);const r=aS.distanceTo(S6)/e.zoom;n[0].object.visible=!0;let i,o;for(i=1,o=n.length;i=a)n[i-1].object.visible=!1,n[i].object.visible=!0;else break}for(this._currentLevel=i-1;il)continue;d.applyMatrix4(this.matrixWorld);const O=e.ray.origin.distanceTo(d);Oe.far||n.push({distance:O,point:f.clone().applyMatrix4(this.matrixWorld),index:w,face:null,faceIndex:null,object:this})}}else{const v=Math.max(0,a.start),S=Math.min(_.count,a.start+a.count);for(let w=v,E=S-1;wl)continue;d.applyMatrix4(this.matrixWorld);const C=e.ray.origin.distanceTo(d);Ce.far||n.push({distance:C,point:f.clone().applyMatrix4(this.matrixWorld),index:w,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const n=this.geometry.morphAttributes,r=Object.keys(n);if(r.length>0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,a=i.length;o0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,a=i.length;oi.far)return;o.push({distance:u,distanceToRay:Math.sqrt(s),point:l,index:e,face:null,object:a})}}class MMe extends hi{constructor(e,n,r,i,o,a,s,l,u){super(e,n,r,i,o,a,s,l,u),this.isVideoTexture=!0,this.minFilter=a!==void 0?a:wi,this.magFilter=o!==void 0?o:wi,this.generateMipmaps=!1;const c=this;function f(){c.needsUpdate=!0,e.requestVideoFrameCallback(f)}"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback(f)}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)}}class CMe extends hi{constructor(e,n){super({width:e,height:n}),this.isFramebufferTexture=!0,this.magFilter=ci,this.minFilter=ci,this.generateMipmaps=!1,this.needsUpdate=!0}}class NC extends hi{constructor(e,n,r,i,o,a,s,l,u,c,f,d){super(null,a,s,l,u,c,i,o,f,d),this.isCompressedTexture=!0,this.image={width:n,height:r},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class AMe extends NC{constructor(e,n,r,i,o,a){super(e,n,r,o,a),this.isCompressedArrayTexture=!0,this.image.depth=i,this.wrapR=co}}class TMe extends NC{constructor(e,n,r){super(void 0,e[0].width,e[0].height,n,r,cf),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class DMe extends hi{constructor(e,n,r,i,o,a,s,l,u){super(e,n,r,i,o,a,s,l,u),this.isCanvasTexture=!0,this.needsUpdate=!0}}class uu{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,n){const r=this.getUtoTmapping(e);return this.getPoint(r,n)}getPoints(e=5){const n=[];for(let r=0;r<=e;r++)n.push(this.getPoint(r/e));return n}getSpacedPoints(e=5){const n=[];for(let r=0;r<=e;r++)n.push(this.getPointAt(r/e));return n}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 n=[];let r,i=this.getPoint(0),o=0;n.push(0);for(let a=1;a<=e;a++)r=this.getPoint(a/e),o+=r.distanceTo(i),n.push(o),i=r;return this.cacheArcLengths=n,n}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,n){const r=this.getLengths();let i=0;const o=r.length;let a;n?a=n:a=e*r[o-1];let s=0,l=o-1,u;for(;s<=l;)if(i=Math.floor(s+(l-s)/2),u=r[i]-a,u<0)s=i+1;else if(u>0)l=i-1;else{l=i;break}if(i=l,r[i]===a)return i/(o-1);const c=r[i],d=r[i+1]-c,p=(a-c)/d;return(i+p)/(o-1)}getTangent(e,n){let i=e-1e-4,o=e+1e-4;i<0&&(i=0),o>1&&(o=1);const a=this.getPoint(i),s=this.getPoint(o),l=n||(a.isVector2?new Je:new ae);return l.copy(s).sub(a).normalize(),l}getTangentAt(e,n){const r=this.getUtoTmapping(e);return this.getTangent(r,n)}computeFrenetFrames(e,n){const r=new ae,i=[],o=[],a=[],s=new ae,l=new yn;for(let p=0;p<=e;p++){const y=p/e;i[p]=this.getTangentAt(y,new ae)}o[0]=new ae,a[0]=new ae;let u=Number.MAX_VALUE;const c=Math.abs(i[0].x),f=Math.abs(i[0].y),d=Math.abs(i[0].z);c<=u&&(u=c,r.set(1,0,0)),f<=u&&(u=f,r.set(0,1,0)),d<=u&&r.set(0,0,1),s.crossVectors(i[0],r).normalize(),o[0].crossVectors(i[0],s),a[0].crossVectors(i[0],o[0]);for(let p=1;p<=e;p++){if(o[p]=o[p-1].clone(),a[p]=a[p-1].clone(),s.crossVectors(i[p-1],i[p]),s.length()>Number.EPSILON){s.normalize();const y=Math.acos(fi(i[p-1].dot(i[p]),-1,1));o[p].applyMatrix4(l.makeRotationAxis(s,y))}a[p].crossVectors(i[p],o[p])}if(n===!0){let p=Math.acos(fi(o[0].dot(o[e]),-1,1));p/=e,i[0].dot(s.crossVectors(o[0],o[e]))>0&&(p=-p);for(let y=1;y<=e;y++)o[y].applyMatrix4(l.makeRotationAxis(i[y],p*y)),a[y].crossVectors(i[y],o[y])}return{tangents:i,normals:o,binormals:a}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.6,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class OC extends uu{constructor(e=0,n=0,r=1,i=1,o=0,a=Math.PI*2,s=!1,l=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=n,this.xRadius=r,this.yRadius=i,this.aStartAngle=o,this.aEndAngle=a,this.aClockwise=s,this.aRotation=l}getPoint(e,n){const r=n||new Je,i=Math.PI*2;let o=this.aEndAngle-this.aStartAngle;const a=Math.abs(o)i;)o-=i;o0?0:(Math.floor(Math.abs(s)/o)+1)*o:l===0&&s===o-1&&(s=o-2,l=1);let u,c;this.closed||s>0?u=i[(s-1)%o]:(dS.subVectors(i[0],i[1]).add(i[0]),u=dS);const f=i[s%o],d=i[(s+1)%o];if(this.closed||s+2i.length-2?i.length-1:a+1],f=i[a>i.length-3?i.length-1:a+2];return r.set(U6(s,l.x,u.x,c.x,f.x),U6(s,l.y,u.y,c.y,f.y)),r}copy(e){super.copy(e),this.points=[];for(let n=0,r=e.points.length;n=r){const a=i[o]-r,s=this.curves[o],l=s.getLength(),u=l===0?0:1-a/l;return s.getPointAt(u,n)}o++}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 n=0;for(let r=0,i=this.curves.length;r1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n}copy(e){super.copy(e),this.curves=[];for(let n=0,r=e.curves.length;n0){const f=u.getPoint(0);f.equals(this.currentPoint)||this.lineTo(f.x,f.y)}this.curves.push(u);const c=u.getPoint(1);return this.currentPoint.copy(c),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 Lb extends In{constructor(e=[new Je(0,-.5),new Je(.5,0),new Je(0,.5)],n=12,r=0,i=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:e,segments:n,phiStart:r,phiLength:i},n=Math.floor(n),i=fi(i,0,Math.PI*2);const o=[],a=[],s=[],l=[],u=[],c=1/n,f=new ae,d=new Je,p=new ae,y=new ae,x=new ae;let _=0,v=0;for(let S=0;S<=e.length-1;S++)switch(S){case 0:_=e[S+1].x-e[S].x,v=e[S+1].y-e[S].y,p.x=v*1,p.y=-_,p.z=v*0,x.copy(p),p.normalize(),l.push(p.x,p.y,p.z);break;case e.length-1:l.push(x.x,x.y,x.z);break;default:_=e[S+1].x-e[S].x,v=e[S+1].y-e[S].y,p.x=v*1,p.y=-_,p.z=v*0,y.copy(p),p.x+=x.x,p.y+=x.y,p.z+=x.z,p.normalize(),l.push(p.x,p.y,p.z),x.copy(y)}for(let S=0;S<=n;S++){const w=r+S*c*i,E=Math.sin(w),T=Math.cos(w);for(let C=0;C<=e.length-1;C++){f.x=e[C].x*E,f.y=e[C].y,f.z=e[C].x*T,a.push(f.x,f.y,f.z),d.x=S/n,d.y=C/(e.length-1),s.push(d.x,d.y);const D=l[3*C+0]*E,O=l[3*C+1],P=l[3*C+0]*T;u.push(D,O,P)}}for(let S=0;S0&&w(!0),n>0&&w(!1)),this.setIndex(c),this.setAttribute("position",new Ut(f,3)),this.setAttribute("normal",new Ut(d,3)),this.setAttribute("uv",new Ut(p,2));function S(){const E=new ae,T=new ae;let C=0;const D=(n-e)/r;for(let O=0;O<=o;O++){const P=[],N=O/o,k=N*(n-e)+e;for(let G=0;G<=i;G++){const Z=G/i,j=Z*l+s,K=Math.sin(j),Y=Math.cos(j);T.x=k*K,T.y=-N*r+_,T.z=k*Y,f.push(T.x,T.y,T.z),E.set(K,D,Y).normalize(),d.push(E.x,E.y,E.z),p.push(Z,1-N),P.push(y++)}x.push(P)}for(let O=0;O.9&&D<.1&&(w<.2&&(a[S+0]+=1),E<.2&&(a[S+2]+=1),T<.2&&(a[S+4]+=1))}}function d(S){o.push(S.x,S.y,S.z)}function p(S,w){const E=S*3;w.x=e[E+0],w.y=e[E+1],w.z=e[E+2]}function y(){const S=new ae,w=new ae,E=new ae,T=new ae,C=new Je,D=new Je,O=new Je;for(let P=0,N=0;P80*n){s=u=t[0],l=c=t[1];for(let y=n;yu&&(u=f),d>c&&(c=d);p=Math.max(u-s,c-l),p=p!==0?32767/p:0}return Yx(o,a,n,s,l,p,0),a}};function $G(t,e,n,r,i){let o,a;if(i===QMe(t,e,n,r)>0)for(o=e;o=e;o-=r)a=z6(o,t[o],t[o+1],a);return a&&BC(a,a.next)&&(Zx(a),a=a.next),a}function qp(t,e){if(!t)return t;e||(e=t);let n=t,r;do if(r=!1,!n.steiner&&(BC(n,n.next)||Yr(n.prev,n,n.next)===0)){if(Zx(n),n=e=n.prev,n===n.next)break;r=!0}else n=n.next;while(r||n!==e);return e}function Yx(t,e,n,r,i,o,a){if(!t)return;!a&&o&&qMe(t,r,i,o);let s=t,l,u;for(;t.prev!==t.next;){if(l=t.prev,u=t.next,o?UMe(t,r,i,o):BMe(t)){e.push(l.i/n|0),e.push(t.i/n|0),e.push(u.i/n|0),Zx(t),t=u.next,s=u.next;continue}if(t=u,t===s){a?a===1?(t=zMe(qp(t),e,n),Yx(t,e,n,r,i,o,2)):a===2&&$Me(t,e,n,r,i,o):Yx(qp(t),e,n,r,i,o,1);break}}}function BMe(t){const e=t.prev,n=t,r=t.next;if(Yr(e,n,r)>=0)return!1;const i=e.x,o=n.x,a=r.x,s=e.y,l=n.y,u=r.y,c=io?i>a?i:a:o>a?o:a,p=s>l?s>u?s:u:l>u?l:u;let y=r.next;for(;y!==e;){if(y.x>=c&&y.x<=d&&y.y>=f&&y.y<=p&&bg(i,s,o,l,a,u,y.x,y.y)&&Yr(y.prev,y,y.next)>=0)return!1;y=y.next}return!0}function UMe(t,e,n,r){const i=t.prev,o=t,a=t.next;if(Yr(i,o,a)>=0)return!1;const s=i.x,l=o.x,u=a.x,c=i.y,f=o.y,d=a.y,p=sl?s>u?s:u:l>u?l:u,_=c>f?c>d?c:d:f>d?f:d,v=AP(p,y,e,n,r),S=AP(x,_,e,n,r);let w=t.prevZ,E=t.nextZ;for(;w&&w.z>=v&&E&&E.z<=S;){if(w.x>=p&&w.x<=x&&w.y>=y&&w.y<=_&&w!==i&&w!==a&&bg(s,c,l,f,u,d,w.x,w.y)&&Yr(w.prev,w,w.next)>=0||(w=w.prevZ,E.x>=p&&E.x<=x&&E.y>=y&&E.y<=_&&E!==i&&E!==a&&bg(s,c,l,f,u,d,E.x,E.y)&&Yr(E.prev,E,E.next)>=0))return!1;E=E.nextZ}for(;w&&w.z>=v;){if(w.x>=p&&w.x<=x&&w.y>=y&&w.y<=_&&w!==i&&w!==a&&bg(s,c,l,f,u,d,w.x,w.y)&&Yr(w.prev,w,w.next)>=0)return!1;w=w.prevZ}for(;E&&E.z<=S;){if(E.x>=p&&E.x<=x&&E.y>=y&&E.y<=_&&E!==i&&E!==a&&bg(s,c,l,f,u,d,E.x,E.y)&&Yr(E.prev,E,E.next)>=0)return!1;E=E.nextZ}return!0}function zMe(t,e,n){let r=t;do{const i=r.prev,o=r.next.next;!BC(i,o)&&HG(i,r,r.next,o)&&Kx(i,o)&&Kx(o,i)&&(e.push(i.i/n|0),e.push(r.i/n|0),e.push(o.i/n|0),Zx(r),Zx(r.next),r=t=o),r=r.next}while(r!==t);return qp(r)}function $Me(t,e,n,r,i,o){let a=t;do{let s=a.next.next;for(;s!==a.prev;){if(a.i!==s.i&&KMe(a,s)){let l=VG(a,s);a=qp(a,a.next),l=qp(l,l.next),Yx(a,e,n,r,i,o,0),Yx(l,e,n,r,i,o,0);return}s=s.next}a=a.next}while(a!==t)}function HMe(t,e,n,r){const i=[];let o,a,s,l,u;for(o=0,a=e.length;o=n.next.y&&n.next.y!==n.y){const d=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(d<=o&&d>r&&(r=d,i=n.x=n.x&&n.x>=l&&o!==n.x&&bg(ai.x||n.x===i.x&&jMe(i,n)))&&(i=n,c=f)),n=n.next;while(n!==s);return i}function jMe(t,e){return Yr(t.prev,t,e.prev)<0&&Yr(e.next,t,t.next)<0}function qMe(t,e,n,r){let i=t;do i.z===0&&(i.z=AP(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,XMe(i)}function XMe(t){let e,n,r,i,o,a,s,l,u=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,r=n,s=0,e=0;e0||l>0&&r;)s!==0&&(l===0||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,l--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,u*=2}while(a>1);return t}function AP(t,e,n,r,i){return t=(t-n)*i|0,e=(e-r)*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 YMe(t){let e=t,n=t;do(e.x=(t-a)*(o-s)&&(t-a)*(r-s)>=(n-a)*(e-s)&&(n-a)*(o-s)>=(i-a)*(r-s)}function KMe(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!ZMe(t,e)&&(Kx(t,e)&&Kx(e,t)&&JMe(t,e)&&(Yr(t.prev,t,e.prev)||Yr(t,e.prev,e))||BC(t,e)&&Yr(t.prev,t,t.next)>0&&Yr(e.prev,e,e.next)>0)}function Yr(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function BC(t,e){return t.x===e.x&&t.y===e.y}function HG(t,e,n,r){const i=vS(Yr(t,e,n)),o=vS(Yr(t,e,r)),a=vS(Yr(n,r,t)),s=vS(Yr(n,r,e));return!!(i!==o&&a!==s||i===0&&gS(t,n,e)||o===0&&gS(t,r,e)||a===0&&gS(n,t,r)||s===0&&gS(n,e,r))}function gS(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function vS(t){return t>0?1:t<0?-1:0}function ZMe(t,e){let n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&HG(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}function Kx(t,e){return Yr(t.prev,t,t.next)<0?Yr(t,e,t.next)>=0&&Yr(t,t.prev,e)>=0:Yr(t,e,t.prev)<0||Yr(t,t.next,e)<0}function JMe(t,e){let n=t,r=!1;const i=(t.x+e.x)/2,o=(t.y+e.y)/2;do n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next;while(n!==t);return r}function VG(t,e){const n=new TP(t.i,t.x,t.y),r=new TP(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function z6(t,e,n,r){const i=new TP(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function Zx(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 TP(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function QMe(t,e,n,r){let i=0;for(let o=e,a=n-r;o2&&t[e-1].equals(t[0])&&t.pop()}function H6(t,e){for(let n=0;nNumber.EPSILON){const B=Math.sqrt(lt),oe=Math.sqrt(Ue*Ue+We*We),ge=De.x-Ne/B,pe=De.y+we/B,de=Ee.x-We/oe,ve=Ee.y+Ue/oe,Se=((de-ge)*We-(ve-pe)*Ue)/(we*We-Ne*Ue);X=ge+we*Se-ue.x,ne=pe+Ne*Se-ue.y;const Pe=X*X+ne*ne;if(Pe<=2)return new Je(X,ne);me=Math.sqrt(Pe/2)}else{let B=!1;we>Number.EPSILON?Ue>Number.EPSILON&&(B=!0):we<-Number.EPSILON?Ue<-Number.EPSILON&&(B=!0):Math.sign(Ne)===Math.sign(We)&&(B=!0),B?(X=-Ne,ne=we,me=Math.sqrt(lt)):(X=we,ne=Ne,me=Math.sqrt(lt/2))}return new Je(X/me,ne/me)}const U=[];for(let ue=0,De=j.length,Ee=De-1,X=ue+1;ue=0;ue--){const De=ue/_,Ee=p*Math.cos(De*Math.PI/2),X=y*Math.sin(De*Math.PI/2)+x;for(let ne=0,me=j.length;ne=0;){const X=Ee;let ne=Ee-1;ne<0&&(ne=ue.length-1);for(let me=0,we=c+_*2;me0)&&p.push(w,E,C),(v!==r-1||l0!=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 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.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 XG extends Po{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new Pt(16777215),this.specular=new Pt(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Pt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=rh,this.normalScale=new Je(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Tb,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.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 YG extends Po{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Pt(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Pt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=rh,this.normalScale=new Je(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 KG extends Po{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=rh,this.normalScale=new Je(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 ZG extends Po{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new Pt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Pt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=rh,this.normalScale=new Je(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Tb,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.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 JG extends Po{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Pt(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=rh,this.normalScale=new Je(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 QG extends Ca{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 xp(t,e,n){return!t||!n&&t.constructor===e?t:typeof e.BYTES_PER_ELEMENT=="number"?new e(t):Array.prototype.slice.call(t)}function ej(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function tj(t){function e(i,o){return t[i]-t[o]}const n=t.length,r=new Array(n);for(let i=0;i!==n;++i)r[i]=i;return r.sort(e),r}function DP(t,e,n){const r=t.length,i=new t.constructor(r);for(let o=0,a=0;a!==r;++o){const s=n[o]*e;for(let l=0;l!==e;++l)i[a++]=t[s+l]}return i}function U4(t,e,n,r){let i=1,o=t[0];for(;o!==void 0&&o[r]===void 0;)o=t[i++];if(o===void 0)return;let a=o[r];if(a!==void 0)if(Array.isArray(a))do a=o[r],a!==void 0&&(e.push(o.time),n.push.apply(n,a)),o=t[i++];while(o!==void 0);else if(a.toArray!==void 0)do a=o[r],a!==void 0&&(e.push(o.time),a.toArray(n,n.length)),o=t[i++];while(o!==void 0);else do a=o[r],a!==void 0&&(e.push(o.time),n.push(a)),o=t[i++];while(o!==void 0)}function rCe(t,e,n,r,i=30){const o=t.clone();o.name=e;const a=[];for(let l=0;l=r)){f.push(u.times[p]);for(let x=0;xo.tracks[l].times[0]&&(s=o.tracks[l].times[0]);for(let l=0;l=s.times[y]){const v=y*f+c,S=v+f-c;x=s.values.slice(v,S)}else{const v=s.createInterpolant(),S=c,w=f-c;v.evaluate(o),x=v.resultBuffer.slice(S,w)}l==="quaternion"&&new Xa().fromArray(x).normalize().conjugate().toArray(x);const _=u.times.length;for(let v=0;v<_;++v){const S=v*p+d;if(l==="quaternion")Xa.multiplyQuaternionsFlat(u.values,S,x,0,u.values,S);else{const w=p-d*2;for(let E=0;E=o)){const s=n[1];e=o)break t}a=r,r=0;break n}break e}for(;r>>1;en;)--a;if(++a,o!==0||a!==i){o>=a&&(a=Math.max(a,1),o=a-1);const s=this.getValueSize();this.times=r.slice(o,a),this.values=this.values.slice(o*s,a*s)}return this}validate(){let e=!0;const n=this.getValueSize();n-Math.floor(n)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const r=this.times,i=this.values,o=r.length;o===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let a=null;for(let s=0;s!==o;s++){const l=r[s];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,s,l),e=!1;break}if(a!==null&&a>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,s,l,a),e=!1;break}a=l}if(i!==void 0&&ej(i))for(let s=0,l=i.length;s!==l;++s){const u=i[s];if(isNaN(u)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,s,u),e=!1;break}}return e}optimize(){const e=this.times.slice(),n=this.values.slice(),r=this.getValueSize(),i=this.getInterpolation()===gE,o=e.length-1;let a=1;for(let s=1;s0){e[a]=e[o];for(let s=o*r,l=a*r,u=0;u!==r;++u)n[l+u]=n[s+u];++a}return a!==e.length?(this.times=e.slice(0,a),this.values=n.slice(0,a*r)):(this.times=e,this.values=n),this}clone(){const e=this.times.slice(),n=this.values.slice(),r=this.constructor,i=new r(this.name,e,n);return i.createInterpolant=this.createInterpolant,i}}cu.prototype.TimeBufferType=Float32Array;cu.prototype.ValueBufferType=Float32Array;cu.prototype.DefaultInterpolation=zx;class im extends cu{}im.prototype.ValueTypeName="bool";im.prototype.ValueBufferType=Array;im.prototype.DefaultInterpolation=Ux;im.prototype.InterpolantFactoryMethodLinear=void 0;im.prototype.InterpolantFactoryMethodSmooth=void 0;class $4 extends cu{}$4.prototype.ValueTypeName="color";class Jx extends cu{}Jx.prototype.ValueTypeName="number";class ij extends Ub{constructor(e,n,r,i){super(e,n,r,i)}interpolate_(e,n,r,i){const o=this.resultBuffer,a=this.sampleValues,s=this.valueSize,l=(r-n)/(i-n);let u=e*s;for(let c=u+s;u!==c;u+=4)Xa.slerpFlat(o,0,a,u-s,a,u,l);return o}}class Dv extends cu{InterpolantFactoryMethodLinear(e){return new ij(this.times,this.values,this.getValueSize(),e)}}Dv.prototype.ValueTypeName="quaternion";Dv.prototype.DefaultInterpolation=zx;Dv.prototype.InterpolantFactoryMethodSmooth=void 0;class om extends cu{}om.prototype.ValueTypeName="string";om.prototype.ValueBufferType=Array;om.prototype.DefaultInterpolation=Ux;om.prototype.InterpolantFactoryMethodLinear=void 0;om.prototype.InterpolantFactoryMethodSmooth=void 0;class Qx extends cu{}Qx.prototype.ValueTypeName="vector";class eb{constructor(e,n=-1,r,i=SC){this.name=e,this.tracks=r,this.duration=n,this.blendMode=i,this.uuid=ks(),this.duration<0&&this.resetDuration()}static parse(e){const n=[],r=e.tracks,i=1/(e.fps||1);for(let a=0,s=r.length;a!==s;++a)n.push(sCe(r[a]).scale(i));const o=new this(e.name,e.duration,n,e.blendMode);return o.uuid=e.uuid,o}static toJSON(e){const n=[],r=e.tracks,i={name:e.name,duration:e.duration,tracks:n,uuid:e.uuid,blendMode:e.blendMode};for(let o=0,a=r.length;o!==a;++o)n.push(cu.toJSON(r[o]));return i}static CreateFromMorphTargetSequence(e,n,r,i){const o=n.length,a=[];for(let s=0;s1){const f=c[1];let d=i[f];d||(i[f]=d=[]),d.push(u)}}const a=[];for(const s in i)a.push(this.CreateFromMorphTargetSequence(s,i[s],n,r));return a}static parseAnimation(e,n){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const r=function(f,d,p,y,x){if(p.length!==0){const _=[],v=[];U4(p,_,v,y),_.length!==0&&x.push(new f(d,_,v))}},i=[],o=e.name||"default",a=e.fps||30,s=e.blendMode;let l=e.length||-1;const u=e.hierarchy||[];for(let f=0;f{n&&n(o),this.manager.itemEnd(e)},0),o;if(Ic[e]!==void 0){Ic[e].push({onLoad:n,onProgress:r,onError:i});return}Ic[e]=[],Ic[e].push({onLoad:n,onProgress:r,onError:i});const a=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),s=this.mimeType,l=this.responseType;fetch(a).then(u=>{if(u.status===200||u.status===0){if(u.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||u.body===void 0||u.body.getReader===void 0)return u;const c=Ic[e],f=u.body.getReader(),d=u.headers.get("Content-Length")||u.headers.get("X-File-Size"),p=d?parseInt(d):0,y=p!==0;let x=0;const _=new ReadableStream({start(v){S();function S(){f.read().then(({done:w,value:E})=>{if(w)v.close();else{x+=E.byteLength;const T=new ProgressEvent("progress",{lengthComputable:y,loaded:x,total:p});for(let C=0,D=c.length;C{switch(l){case"arraybuffer":return u.arrayBuffer();case"blob":return u.blob();case"document":return u.text().then(c=>new DOMParser().parseFromString(c,s));case"json":return u.json();default:if(s===void 0)return u.text();{const f=/charset="?([^;"\s]*)"?/i.exec(s),d=f&&f[1]?f[1].toLowerCase():void 0,p=new TextDecoder(d);return u.arrayBuffer().then(y=>p.decode(y))}}}).then(u=>{Xp.add(e,u);const c=Ic[e];delete Ic[e];for(let f=0,d=c.length;f{const c=Ic[e];if(c===void 0)throw this.manager.itemError(e),u;delete Ic[e];for(let f=0,d=c.length;f{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class uCe extends Qa{constructor(e){super(e)}load(e,n,r,i){const o=this,a=new df(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,function(s){try{n(o.parse(JSON.parse(s)))}catch(l){i?i(l):console.error(l),o.manager.itemError(e)}},r,i)}parse(e){const n=[];for(let r=0;r0:i.vertexColors=e.vertexColors),e.uniforms!==void 0)for(const o in e.uniforms){const a=e.uniforms[o];switch(i.uniforms[o]={},a.type){case"t":i.uniforms[o].value=r(a.value);break;case"c":i.uniforms[o].value=new Pt().setHex(a.value);break;case"v2":i.uniforms[o].value=new Je().fromArray(a.value);break;case"v3":i.uniforms[o].value=new ae().fromArray(a.value);break;case"v4":i.uniforms[o].value=new ir().fromArray(a.value);break;case"m3":i.uniforms[o].value=new On().fromArray(a.value);break;case"m4":i.uniforms[o].value=new yn().fromArray(a.value);break;default:i.uniforms[o].value=a.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 o in e.extensions)i.extensions[o]=e.extensions[o];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=r(e.map)),e.matcap!==void 0&&(i.matcap=r(e.matcap)),e.alphaMap!==void 0&&(i.alphaMap=r(e.alphaMap)),e.bumpMap!==void 0&&(i.bumpMap=r(e.bumpMap)),e.bumpScale!==void 0&&(i.bumpScale=e.bumpScale),e.normalMap!==void 0&&(i.normalMap=r(e.normalMap)),e.normalMapType!==void 0&&(i.normalMapType=e.normalMapType),e.normalScale!==void 0){let o=e.normalScale;Array.isArray(o)===!1&&(o=[o,o]),i.normalScale=new Je().fromArray(o)}return e.displacementMap!==void 0&&(i.displacementMap=r(e.displacementMap)),e.displacementScale!==void 0&&(i.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(i.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(i.roughnessMap=r(e.roughnessMap)),e.metalnessMap!==void 0&&(i.metalnessMap=r(e.metalnessMap)),e.emissiveMap!==void 0&&(i.emissiveMap=r(e.emissiveMap)),e.emissiveIntensity!==void 0&&(i.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(i.specularMap=r(e.specularMap)),e.specularIntensityMap!==void 0&&(i.specularIntensityMap=r(e.specularIntensityMap)),e.specularColorMap!==void 0&&(i.specularColorMap=r(e.specularColorMap)),e.envMap!==void 0&&(i.envMap=r(e.envMap)),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=r(e.lightMap)),e.lightMapIntensity!==void 0&&(i.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(i.aoMap=r(e.aoMap)),e.aoMapIntensity!==void 0&&(i.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(i.gradientMap=r(e.gradientMap)),e.clearcoatMap!==void 0&&(i.clearcoatMap=r(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(i.clearcoatRoughnessMap=r(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(i.clearcoatNormalMap=r(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(i.clearcoatNormalScale=new Je().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(i.iridescenceMap=r(e.iridescenceMap)),e.iridescenceThicknessMap!==void 0&&(i.iridescenceThicknessMap=r(e.iridescenceThicknessMap)),e.transmissionMap!==void 0&&(i.transmissionMap=r(e.transmissionMap)),e.thicknessMap!==void 0&&(i.thicknessMap=r(e.thicknessMap)),e.anisotropyMap!==void 0&&(i.anisotropyMap=r(e.anisotropyMap)),e.sheenColorMap!==void 0&&(i.sheenColorMap=r(e.sheenColorMap)),e.sheenRoughnessMap!==void 0&&(i.sheenRoughnessMap=r(e.sheenRoughnessMap)),i}setTextures(e){return this.textures=e,this}static createMaterialFromType(e){const n={ShadowMaterial:GG,SpriteMaterial:D4,RawShaderMaterial:jG,ShaderMaterial:tc,PointsMaterial:P4,MeshPhysicalMaterial:qG,MeshStandardMaterial:B4,MeshPhongMaterial:XG,MeshToonMaterial:YG,MeshNormalMaterial:KG,MeshLambertMaterial:ZG,MeshDepthMaterial:C4,MeshDistanceMaterial:A4,MeshBasicMaterial:ih,MeshMatcapMaterial:JG,LineDashedMaterial:QG,LineBasicMaterial:Ca,Material:Po};return new n[e]}}class RP{static decodeText(e){if(typeof TextDecoder<"u")return new TextDecoder().decode(e);let n="";for(let r=0,i=e.length;r0){const l=new H4(n);o=new tb(l),o.setCrossOrigin(this.crossOrigin);for(let u=0,c=e.length;u0){i=new tb(this.manager),i.setCrossOrigin(this.crossOrigin);for(let a=0,s=e.length;a"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,n,r,i){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const o=this,a=Xp.get(e);if(a!==void 0)return o.manager.itemStart(e),setTimeout(function(){n&&n(a),o.manager.itemEnd(e)},0),a;const s={};s.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",s.headers=this.requestHeader,fetch(e,s).then(function(l){return l.blob()}).then(function(l){return createImageBitmap(l,Object.assign(o.options,{colorSpaceConversion:"none"}))}).then(function(l){Xp.add(e,l),n&&n(l),o.manager.itemEnd(e)}).catch(function(l){i&&i(l),o.manager.itemError(e),o.manager.itemEnd(e)}),o.manager.itemStart(e)}}let yS;class W4{static getContext(){return yS===void 0&&(yS=new(window.AudioContext||window.webkitAudioContext)),yS}static setContext(e){yS=e}}class bCe extends Qa{constructor(e){super(e)}load(e,n,r,i){const o=this,a=new df(this.manager);a.setResponseType("arraybuffer"),a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,function(l){try{const u=l.slice(0);W4.getContext().decodeAudioData(u,function(f){n(f)},s)}catch(u){s(u)}},r,i);function s(l){i?i(l):console.error(l),o.manager.itemError(e)}}}const K6=new yn,Z6=new yn,Yh=new yn;class _Ce{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new uo,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new uo,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 n=this._cache;if(n.focus!==e.focus||n.fov!==e.fov||n.aspect!==e.aspect*this.aspect||n.near!==e.near||n.far!==e.far||n.zoom!==e.zoom||n.eyeSep!==this.eyeSep){n.focus=e.focus,n.fov=e.fov,n.aspect=e.aspect*this.aspect,n.near=e.near,n.far=e.far,n.zoom=e.zoom,n.eyeSep=this.eyeSep,Yh.copy(e.projectionMatrix);const i=n.eyeSep/2,o=i*n.near/n.focus,a=n.near*Math.tan(Dp*n.fov*.5)/n.zoom;let s,l;Z6.elements[12]=-i,K6.elements[12]=i,s=-a*n.aspect+o,l=a*n.aspect+o,Yh.elements[0]=2*n.near/(l-s),Yh.elements[8]=(l+s)/(l-s),this.cameraL.projectionMatrix.copy(Yh),s=-a*n.aspect-o,l=a*n.aspect-o,Yh.elements[0]=2*n.near/(l-s),Yh.elements[8]=(l+s)/(l-s),this.cameraR.projectionMatrix.copy(Yh)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(Z6),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(K6)}}class G4{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=J6(),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 n=J6();e=(n-this.oldTime)/1e3,this.oldTime=n,this.elapsedTime+=e}return e}}function J6(){return(typeof performance>"u"?Date:performance).now()}const Kh=new ae,Q6=new Xa,wCe=new ae,Zh=new ae;class SCe extends Kn{constructor(){super(),this.type="AudioListener",this.context=W4.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new G4}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 n=this.context.listener,r=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(Kh,Q6,wCe),Zh.set(0,0,-1).applyQuaternion(Q6),n.positionX){const i=this.context.currentTime+this.timeDelta;n.positionX.linearRampToValueAtTime(Kh.x,i),n.positionY.linearRampToValueAtTime(Kh.y,i),n.positionZ.linearRampToValueAtTime(Kh.z,i),n.forwardX.linearRampToValueAtTime(Zh.x,i),n.forwardY.linearRampToValueAtTime(Zh.y,i),n.forwardZ.linearRampToValueAtTime(Zh.z,i),n.upX.linearRampToValueAtTime(r.x,i),n.upY.linearRampToValueAtTime(r.y,i),n.upZ.linearRampToValueAtTime(r.z,i)}else n.setPosition(Kh.x,Kh.y,Kh.z),n.setOrientation(Zh.x,Zh.y,Zh.z,r.x,r.y,r.z)}}class gj extends Kn{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 n=this.context.createBufferSource();return n.buffer=this.buffer,n.loop=this.loop,n.loopStart=this.loopStart,n.loopEnd=this.loopEnd,n.onended=this.onEnded.bind(this),n.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=n,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(){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.source.onended=null),this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,n=this.filters.length;e0){this.source.disconnect(this.filters[0]);for(let e=1,n=this.filters.length;e0&&this._mixBufferRegionAdditive(r,i,this._addIndex*n,1,n);for(let l=n,u=n+n;l!==u;++l)if(r[l]!==r[l+n]){s.setValue(r,i);break}}saveOriginalState(){const e=this.binding,n=this.buffer,r=this.valueSize,i=r*this._origIndex;e.getValue(n,i);for(let o=r,a=i;o!==a;++o)n[o]=n[i+o%r];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,n=e+this.valueSize;for(let r=e;r=.5)for(let a=0;a!==o;++a)e[n+a]=e[r+a]}_slerp(e,n,r,i){Xa.slerpFlat(e,n,e,n,e,r,i)}_slerpAdditive(e,n,r,i,o){const a=this._workIndex*o;Xa.multiplyQuaternionsFlat(e,a,e,n,e,r),Xa.slerpFlat(e,n,e,n,e,a,i)}_lerp(e,n,r,i,o){const a=1-i;for(let s=0;s!==o;++s){const l=n+s;e[l]=e[l]*a+e[r+s]*i}}_lerpAdditive(e,n,r,i,o){for(let a=0;a!==o;++a){const s=n+a;e[s]=e[s]+e[r+a]*i}}}const j4="\\[\\]\\.:\\/",ACe=new RegExp("["+j4+"]","g"),q4="[^"+j4+"]",TCe="[^"+j4.replace("\\.","")+"]",DCe=/((?:WC+[\/:])*)/.source.replace("WC",q4),RCe=/(WCOD+)?/.source.replace("WCOD",TCe),PCe=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",q4),NCe=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",q4),OCe=new RegExp("^"+DCe+RCe+PCe+NCe+"$"),ICe=["material","materials","bones","map"];class FCe{constructor(e,n,r){const i=r||jn.parseTrackName(n);this._targetGroup=e,this._bindings=e.subscribe_(n,i)}getValue(e,n){this.bind();const r=this._targetGroup.nCachedObjects_,i=this._bindings[r];i!==void 0&&i.getValue(e,n)}setValue(e,n){const r=this._bindings;for(let i=this._targetGroup.nCachedObjects_,o=r.length;i!==o;++i)r[i].setValue(e,n)}bind(){const e=this._bindings;for(let n=this._targetGroup.nCachedObjects_,r=e.length;n!==r;++n)e[n].bind()}unbind(){const e=this._bindings;for(let n=this._targetGroup.nCachedObjects_,r=e.length;n!==r;++n)e[n].unbind()}}class jn{constructor(e,n,r){this.path=n,this.parsedPath=r||jn.parseTrackName(n),this.node=jn.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,n,r){return e&&e.isAnimationObjectGroup?new jn.Composite(e,n,r):new jn(e,n,r)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(ACe,"")}static parseTrackName(e){const n=OCe.exec(e);if(n===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const r={nodeName:n[2],objectName:n[3],objectIndex:n[4],propertyName:n[5],propertyIndex:n[6]},i=r.nodeName&&r.nodeName.lastIndexOf(".");if(i!==void 0&&i!==-1){const o=r.nodeName.substring(i+1);ICe.indexOf(o)!==-1&&(r.nodeName=r.nodeName.substring(0,i),r.objectName=o)}if(r.propertyName===null||r.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return r}static findNode(e,n){if(n===void 0||n===""||n==="."||n===-1||n===e.name||n===e.uuid)return e;if(e.skeleton){const r=e.skeleton.getBoneByName(n);if(r!==void 0)return r}if(e.children){const r=function(o){for(let a=0;a=o){const f=o++,d=e[f];n[d.uuid]=c,e[c]=d,n[u]=f,e[f]=l;for(let p=0,y=i;p!==y;++p){const x=r[p],_=x[f],v=x[c];x[c]=_,x[f]=v}}}this.nCachedObjects_=o}uncache(){const e=this._objects,n=this._indicesByUUID,r=this._bindings,i=r.length;let o=this.nCachedObjects_,a=e.length;for(let s=0,l=arguments.length;s!==l;++s){const u=arguments[s],c=u.uuid,f=n[c];if(f!==void 0)if(delete n[c],f0&&(n[p.uuid]=f),e[f]=p,e.pop();for(let y=0,x=i;y!==x;++y){const _=r[y];_[f]=_[d],_.pop()}}}this.nCachedObjects_=o}subscribe_(e,n){const r=this._bindingsIndicesByPath;let i=r[e];const o=this._bindings;if(i!==void 0)return o[i];const a=this._paths,s=this._parsedPaths,l=this._objects,u=l.length,c=this.nCachedObjects_,f=new Array(u);i=o.length,r[e]=i,a.push(e),s.push(n),o.push(f);for(let d=c,p=l.length;d!==p;++d){const y=l[d];f[d]=new jn(y,e,n)}return f}unsubscribe_(e){const n=this._bindingsIndicesByPath,r=n[e];if(r!==void 0){const i=this._paths,o=this._parsedPaths,a=this._bindings,s=a.length-1,l=a[s],u=e[s];n[u]=r,a[r]=l,a.pop(),o[r]=o[s],o.pop(),i[r]=i[s],i.pop()}}}class yj{constructor(e,n,r=null,i=n.blendMode){this._mixer=e,this._clip=n,this._localRoot=r,this.blendMode=i;const o=n.tracks,a=o.length,s=new Array(a),l={endingStart:gp,endingEnd:gp};for(let u=0;u!==a;++u){const c=o[u].createInterpolant(null);s[u]=c,c.settings=l}this._interpolantSettings=l,this._interpolants=s,this._propertyBindings=new Array(a),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=ZW,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,n){return this.loop=e,this.repetitions=n,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,n,r){if(e.fadeOut(n),this.fadeIn(n),r){const i=this._clip.duration,o=e._clip.duration,a=o/i,s=i/o;e.warp(1,a,n),this.warp(s,1,n)}return this}crossFadeTo(e,n,r){return e.crossFadeFrom(this,n,r)}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,n,r){const i=this._mixer,o=i.time,a=this.timeScale;let s=this._timeScaleInterpolant;s===null&&(s=i._lendControlInterpolant(),this._timeScaleInterpolant=s);const l=s.parameterPositions,u=s.sampleValues;return l[0]=o,l[1]=o+r,u[0]=e/a,u[1]=n/a,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,n,r,i){if(!this.enabled){this._updateWeight(e);return}const o=this._startTime;if(o!==null){const l=(e-o)*r;l<0||r===0?n=0:(this._startTime=null,n=r*l)}n*=this._updateTimeScale(e);const a=this._updateTime(n),s=this._updateWeight(e);if(s>0){const l=this._interpolants,u=this._propertyBindings;switch(this.blendMode){case y4:for(let c=0,f=l.length;c!==f;++c)l[c].evaluate(a),u[c].accumulateAdditive(s);break;case SC:default:for(let c=0,f=l.length;c!==f;++c)l[c].evaluate(a),u[c].accumulate(i,s)}}}_updateWeight(e){let n=0;if(this.enabled){n=this.weight;const r=this._weightInterpolant;if(r!==null){const i=r.evaluate(e)[0];n*=i,e>r.parameterPositions[1]&&(this.stopFading(),i===0&&(this.enabled=!1))}}return this._effectiveWeight=n,n}_updateTimeScale(e){let n=0;if(!this.paused){n=this.timeScale;const r=this._timeScaleInterpolant;if(r!==null){const i=r.evaluate(e)[0];n*=i,e>r.parameterPositions[1]&&(this.stopWarping(),n===0?this.paused=!0:this.timeScale=n)}}return this._effectiveTimeScale=n,n}_updateTime(e){const n=this._clip.duration,r=this.loop;let i=this.time+e,o=this._loopCount;const a=r===JW;if(e===0)return o===-1?i:a&&(o&1)===1?n-i:i;if(r===KW){o===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(i>=n)i=n;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(o===-1&&(e>=0?(o=0,this._setEndings(!0,this.repetitions===0,a)):this._setEndings(this.repetitions===0,!0,a)),i>=n||i<0){const s=Math.floor(i/n);i-=n*s,o+=Math.abs(s);const l=this.repetitions-o;if(l<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,i=e>0?n:0,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(l===1){const u=e<0;this._setEndings(u,!u,a)}else this._setEndings(!1,!1,a);this._loopCount=o,this.time=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:s})}}else this.time=i;if(a&&(o&1)===1)return n-i}return i}_setEndings(e,n,r){const i=this._interpolantSettings;r?(i.endingStart=vp,i.endingEnd=vp):(e?i.endingStart=this.zeroSlopeAtStart?vp:gp:i.endingStart=$x,n?i.endingEnd=this.zeroSlopeAtEnd?vp:gp:i.endingEnd=$x)}_scheduleFading(e,n,r){const i=this._mixer,o=i.time;let a=this._weightInterpolant;a===null&&(a=i._lendControlInterpolant(),this._weightInterpolant=a);const s=a.parameterPositions,l=a.sampleValues;return s[0]=o,l[0]=n,s[1]=o+e,l[1]=r,this}}const kCe=new Float32Array(1);class BCe extends vf{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,n){const r=e._localRoot||this._root,i=e._clip.tracks,o=i.length,a=e._propertyBindings,s=e._interpolants,l=r.uuid,u=this._bindingsByRootAndName;let c=u[l];c===void 0&&(c={},u[l]=c);for(let f=0;f!==o;++f){const d=i[f],p=d.name;let y=c[p];if(y!==void 0)++y.referenceCount,a[f]=y;else{if(y=a[f],y!==void 0){y._cacheIndex===null&&(++y.referenceCount,this._addInactiveBinding(y,l,p));continue}const x=n&&n._propertyBindings[f].binding.parsedPath;y=new vj(jn.create(r,p,x),d.ValueTypeName,d.getValueSize()),++y.referenceCount,this._addInactiveBinding(y,l,p),a[f]=y}s[f].resultBuffer=y.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){const r=(e._localRoot||this._root).uuid,i=e._clip.uuid,o=this._actionsByClip[i];this._bindAction(e,o&&o.knownActions[0]),this._addInactiveAction(e,i,r)}const n=e._propertyBindings;for(let r=0,i=n.length;r!==i;++r){const o=n[r];o.useCount++===0&&(this._lendBinding(o),o.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const n=e._propertyBindings;for(let r=0,i=n.length;r!==i;++r){const o=n[r];--o.useCount===0&&(o.restoreOriginalState(),this._takeBackBinding(o))}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 n=e._cacheIndex;return n!==null&&n=0;--r)e[r].stop();return this}update(e){e*=this.timeScale;const n=this._actions,r=this._nActiveActions,i=this.time+=e,o=Math.sign(e),a=this._accuIndex^=1;for(let u=0;u!==r;++u)n[u]._update(i,e,o,a);const s=this._bindings,l=this._nActiveBindings;for(let u=0;u!==l;++u)s[u].apply(a);return this}setTime(e){this.time=0;for(let n=0;nthis.max.x||e.ythis.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,n){return n.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.xthis.max.x||e.max.ythis.max.y)}clampPoint(e,n){return n.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,nB).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 rB=new ae,xS=new ae;class jCe{constructor(e=new ae,n=new ae){this.start=e,this.end=n}set(e,n){return this.start.copy(e),this.end.copy(n),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,n){return this.delta(n).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,n){rB.subVectors(e,this.start),xS.subVectors(this.end,this.start);const r=xS.dot(xS);let o=xS.dot(rB)/r;return n&&(o=fi(o,0,1)),o}closestPointToPoint(e,n,r){const i=this.closestPointToPointParameter(e,n);return this.delta(r).multiplyScalar(i).add(this.start)}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 iB=new ae;class qCe extends Kn{constructor(e,n){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,this.type="SpotLightHelper";const r=new In,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 a=0,s=1,l=32;a1)for(let f=0;f.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{uB.set(e.z,0,-e.x).normalize();const n=Math.acos(e.y);this.quaternion.setFromAxisAngle(uB,n)}}setLength(e,n=e*.2,r=n*.2){this.line.scale.set(1,Math.max(1e-4,e-n),1),this.line.updateMatrix(),this.cone.scale.set(r,n,r),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 aAe extends sc{constructor(e=1){const n=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],r=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],i=new In;i.setAttribute("position",new Ut(n,3)),i.setAttribute("color",new Ut(r,3));const o=new Ca({vertexColors:!0,toneMapped:!1});super(i,o),this.type="AxesHelper"}setColors(e,n,r){const i=new Pt,o=this.geometry.attributes.color.array;return i.set(e),i.toArray(o,0),i.toArray(o,3),i.set(n),i.toArray(o,6),i.toArray(o,9),i.set(r),i.toArray(o,12),i.toArray(o,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class sAe{constructor(){this.type="ShapePath",this.color=new Pt,this.subPaths=[],this.currentPath=null}moveTo(e,n){return this.currentPath=new Xx,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,n),this}lineTo(e,n){return this.currentPath.lineTo(e,n),this}quadraticCurveTo(e,n,r,i){return this.currentPath.quadraticCurveTo(e,n,r,i),this}bezierCurveTo(e,n,r,i,o,a){return this.currentPath.bezierCurveTo(e,n,r,i,o,a),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function n(v){const S=[];for(let w=0,E=v.length;wNumber.EPSILON){if(N<0&&(D=S[C],P=-P,O=S[T],N=-N),v.yO.y)continue;if(v.y===D.y){if(v.x===D.x)return!0}else{const k=N*(v.x-D.x)-P*(v.y-D.y);if(k===0)return!0;if(k<0)continue;E=!E}}else{if(v.y!==D.y)continue;if(O.x<=v.x&&v.x<=D.x||D.x<=v.x&&v.x<=O.x)return!0}}return E}const i=qu.isClockWise,o=this.subPaths;if(o.length===0)return[];let a,s,l;const u=[];if(o.length===1)return s=o[0],l=new Pp,l.curves=s.curves,u.push(l),u;let c=!i(o[0].getPoints());c=e?!c:c;const f=[],d=[];let p=[],y=0,x;d[y]=void 0,p[y]=[];for(let v=0,S=o.length;v1){let v=!1,S=0;for(let w=0,E=d.length;w0&&v===!1&&(p=f)}let _;for(let v=0,S=d.length;v{const f=typeof u=="function"?u(e):u;if(f!==e){const d=e;e=c?f:Object.assign({},e,f),n.forEach(p=>p(e,d))}},i=()=>e,o=(u,c=i,f=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let d=c(e);function p(){const y=c(e);if(!f(d,y)){const x=d;u(d=y,x)}}return n.add(p),()=>n.delete(p)},l={setState:r,getState:i,subscribe:(u,c,f)=>c||f?o(u,c,f):(n.add(u),()=>n.delete(u)),destroy:()=>n.clear()};return e=t(r,i,l),l}const QCe=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),sB=QCe?H.useEffect:H.useLayoutEffect;function eAe(t){const e=typeof t=="function"?JCe(t):t,n=(r=e.getState,i=Object.is)=>{const[,o]=H.useReducer(_=>_+1,0),a=e.getState(),s=H.useRef(a),l=H.useRef(r),u=H.useRef(i),c=H.useRef(!1),f=H.useRef();f.current===void 0&&(f.current=r(a));let d,p=!1;(s.current!==a||l.current!==r||u.current!==i||c.current)&&(d=r(a),p=!i(f.current,d)),sB(()=>{p&&(f.current=d),s.current=a,l.current=r,u.current=i,c.current=!1});const y=H.useRef(a);sB(()=>{const _=()=>{try{const S=e.getState(),w=l.current(S);u.current(f.current,w)||(s.current=S,f.current=w,o())}catch{c.current=!0,o()}},v=e.subscribe(_);return e.getState()!==y.current&&_(),v},[]);const x=p?d:f.current;return H.useDebugValue(x),x};return Object.assign(n,e),n[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const r=[n,e];return{next(){const i=r.length<=0;return{value:r.shift(),done:i}}}},n}var mj={exports:{}},gj={exports:{}},vj={};/** + */am.ConcurrentRoot=1;am.ContinuousEventPriority=4;am.DefaultEventPriority=16;am.DiscreteEventPriority=1;am.IdleEventPriority=536870912;am.LegacyRoot=0;_j.exports=am;var _g=_j.exports;function uAe(t){let e;const n=new Set,r=(u,c)=>{const f=typeof u=="function"?u(e):u;if(f!==e){const d=e;e=c?f:Object.assign({},e,f),n.forEach(p=>p(e,d))}},i=()=>e,o=(u,c=i,f=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let d=c(e);function p(){const y=c(e);if(!f(d,y)){const x=d;u(d=y,x)}}return n.add(p),()=>n.delete(p)},l={setState:r,getState:i,subscribe:(u,c,f)=>c||f?o(u,c,f):(n.add(u),()=>n.delete(u)),destroy:()=>n.clear()};return e=t(r,i,l),l}const cAe=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),cB=cAe?H.useEffect:H.useLayoutEffect;function fAe(t){const e=typeof t=="function"?uAe(t):t,n=(r=e.getState,i=Object.is)=>{const[,o]=H.useReducer(_=>_+1,0),a=e.getState(),s=H.useRef(a),l=H.useRef(r),u=H.useRef(i),c=H.useRef(!1),f=H.useRef();f.current===void 0&&(f.current=r(a));let d,p=!1;(s.current!==a||l.current!==r||u.current!==i||c.current)&&(d=r(a),p=!i(f.current,d)),cB(()=>{p&&(f.current=d),s.current=a,l.current=r,u.current=i,c.current=!1});const y=H.useRef(a);cB(()=>{const _=()=>{try{const S=e.getState(),w=l.current(S);u.current(f.current,w)||(s.current=S,f.current=w,o())}catch{c.current=!0,o()}},v=e.subscribe(_);return e.getState()!==y.current&&_(),v},[]);const x=p?d:f.current;return H.useDebugValue(x),x};return Object.assign(n,e),n[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const r=[n,e];return{next(){const i=r.length<=0;return{value:r.shift(),done:i}}}},n}var wj={exports:{}},Sj={exports:{}},Ej={};/** * @license React * scheduler.production.min.js * @@ -3806,7 +3806,7 @@ void main() { * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */(function(t){function e(W,U){var te=W.length;W.push(U);e:for(;0>>1,le=W[re];if(0>>1;rei(Re,te))Iei(He,Re)?(W[re]=He,W[Ie]=te,re=Ie):(W[re]=Re,W[Ce]=te,re=Ce);else if(Iei(He,te))W[re]=He,W[Ie]=te,re=Ie;else break e}}return U}function i(W,U){var te=W.sortIndex-U.sortIndex;return te!==0?te:W.id-U.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();t.unstable_now=function(){return a.now()-s}}var l=[],u=[],c=1,f=null,d=3,p=!1,y=!1,x=!1,_=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(W){for(var U=n(u);U!==null;){if(U.callback===null)r(u);else if(U.startTime<=W)r(u),U.sortIndex=U.expirationTime,e(l,U);else break;U=n(u)}}function E(W){if(x=!1,w(W),!y)if(n(l)!==null)y=!0,Y(T);else{var U=n(u);U!==null&&$(E,U.startTime-W)}}function T(W,U){y=!1,x&&(x=!1,v(O),O=-1),p=!0;var te=d;try{for(w(U),f=n(l);f!==null&&(!(f.expirationTime>U)||W&&!k());){var re=f.callback;if(typeof re=="function"){f.callback=null,d=f.priorityLevel;var le=re(f.expirationTime<=U);U=t.unstable_now(),typeof le=="function"?f.callback=le:f===n(l)&&r(l),w(U)}else r(l);f=n(l)}if(f!==null)var ce=!0;else{var Ce=n(u);Ce!==null&&$(E,Ce.startTime-U),ce=!1}return ce}finally{f=null,d=te,p=!1}}var C=!1,D=null,O=-1,P=5,N=-1;function k(){return!(t.unstable_now()-NW||125re?(W.sortIndex=te,e(u,W),n(l)===null&&W===n(u)&&(x?(v(O),O=-1):x=!0,$(E,te-re))):(W.sortIndex=le,e(l,W),y||p||(y=!0,Y(T))),W},t.unstable_shouldYield=k,t.unstable_wrapCallback=function(W){var U=d;return function(){var te=d;d=U;try{return W.apply(this,arguments)}finally{d=te}}}})(vj);gj.exports=vj;var RP=gj.exports;/** + */(function(t){function e(W,U){var te=W.length;W.push(U);e:for(;0>>1,le=W[re];if(0>>1;rei(Re,te))Iei(He,Re)?(W[re]=He,W[Ie]=te,re=Ie):(W[re]=Re,W[Ce]=te,re=Ce);else if(Iei(He,te))W[re]=He,W[Ie]=te,re=Ie;else break e}}return U}function i(W,U){var te=W.sortIndex-U.sortIndex;return te!==0?te:W.id-U.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();t.unstable_now=function(){return a.now()-s}}var l=[],u=[],c=1,f=null,d=3,p=!1,y=!1,x=!1,_=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(W){for(var U=n(u);U!==null;){if(U.callback===null)r(u);else if(U.startTime<=W)r(u),U.sortIndex=U.expirationTime,e(l,U);else break;U=n(u)}}function E(W){if(x=!1,w(W),!y)if(n(l)!==null)y=!0,Y(T);else{var U=n(u);U!==null&&$(E,U.startTime-W)}}function T(W,U){y=!1,x&&(x=!1,v(O),O=-1),p=!0;var te=d;try{for(w(U),f=n(l);f!==null&&(!(f.expirationTime>U)||W&&!k());){var re=f.callback;if(typeof re=="function"){f.callback=null,d=f.priorityLevel;var le=re(f.expirationTime<=U);U=t.unstable_now(),typeof le=="function"?f.callback=le:f===n(l)&&r(l),w(U)}else r(l);f=n(l)}if(f!==null)var ce=!0;else{var Ce=n(u);Ce!==null&&$(E,Ce.startTime-U),ce=!1}return ce}finally{f=null,d=te,p=!1}}var C=!1,D=null,O=-1,P=5,N=-1;function k(){return!(t.unstable_now()-NW||125re?(W.sortIndex=te,e(u,W),n(l)===null&&W===n(u)&&(x?(v(O),O=-1):x=!0,$(E,te-re))):(W.sortIndex=le,e(l,W),y||p||(y=!0,Y(T))),W},t.unstable_shouldYield=k,t.unstable_wrapCallback=function(W){var U=d;return function(){var te=d;d=U;try{return W.apply(this,arguments)}finally{d=te}}}})(Ej);Sj.exports=Ej;var NP=Sj.exports;/** * @license React * react-reconciler.production.min.js * @@ -3814,41 +3814,41 @@ void main() { * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var tAe=function(e){var n={},r=H,i=RP,o=Object.assign;function a(m){for(var g="https://reactjs.org/docs/error-decoder.html?invariant="+m,M=1;MMe||I[fe]!==V[Me]){var qe=` -`+I[fe].replace(" at new "," at ");return m.displayName&&qe.includes("")&&(qe=qe.replace("",m.displayName)),qe}while(1<=fe&&0<=Me);break}}}finally{sn=!1,Error.prepareStackTrace=M}return(m=m?m.displayName||m.name:"")?Lt(m):""}var Xn=Object.prototype.hasOwnProperty,Qr=[],cr=-1;function Si(m){return{current:m}}function ln(m){0>cr||(m.current=Qr[cr],Qr[cr]=null,cr--)}function It(m,g){cr++,Qr[cr]=m.current,m.current=g}var Da={},Nn=Si(Da),Ar=Si(!1),rs=Da;function Fo(m,g){var M=m.type.contextTypes;if(!M)return Da;var R=m.stateNode;if(R&&R.__reactInternalMemoizedUnmaskedChildContext===g)return R.__reactInternalMemoizedMaskedChildContext;var I={},V;for(V in M)I[V]=g[V];return R&&(m=m.stateNode,m.__reactInternalMemoizedUnmaskedChildContext=g,m.__reactInternalMemoizedMaskedChildContext=I),I}function Ei(m){return m=m.childContextTypes,m!=null}function $r(){ln(Ar),ln(Nn)}function na(m,g,M){if(Nn.current!==Da)throw Error(a(168));It(Nn,g),It(Ar,M)}function cc(m,g,M){var R=m.stateNode;if(g=g.childContextTypes,typeof R.getChildContext!="function")return M;R=R.getChildContext();for(var I in R)if(!(I in g))throw Error(a(108,O(m)||"Unknown",I));return o({},M,R)}function Mi(m){return m=(m=m.stateNode)&&m.__reactInternalMemoizedMergedChildContext||Da,rs=Nn.current,It(Nn,m),It(Ar,Ar.current),!0}function fc(m,g,M){var R=m.stateNode;if(!R)throw Error(a(169));M?(m=cc(m,g,rs),R.__reactInternalMemoizedMergedChildContext=m,ln(Ar),ln(Nn),It(Nn,m)):ln(Ar),It(Ar,M)}var Lo=Math.clz32?Math.clz32:e_,_f=Math.log,SA=Math.LN2;function e_(m){return m>>>=0,m===0?32:31-(_f(m)/SA|0)|0}var wf=64,Sf=4194304;function Ws(m){switch(m&-m){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: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 m&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return m&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return m}}function uh(m,g){var M=m.pendingLanes;if(M===0)return 0;var R=0,I=m.suspendedLanes,V=m.pingedLanes,fe=M&268435455;if(fe!==0){var Me=fe&~I;Me!==0?R=Ws(Me):(V&=fe,V!==0&&(R=Ws(V)))}else fe=M&~I,fe!==0?R=Ws(fe):V!==0&&(R=Ws(V));if(R===0)return 0;if(g!==0&&g!==R&&!(g&I)&&(I=R&-R,V=g&-g,I>=V||I===16&&(V&4194240)!==0))return g;if(R&4&&(R|=M&16),g=m.entangledLanes,g!==0)for(m=m.entanglements,g&=R;0M;M++)g.push(m);return g}function Ef(m,g,M){m.pendingLanes|=g,g!==536870912&&(m.suspendedLanes=0,m.pingedLanes=0),m=m.eventTimes,g=31-Lo(g),m[g]=M}function n_(m,g){var M=m.pendingLanes&~g;m.pendingLanes=g,m.suspendedLanes=0,m.pingedLanes=0,m.expiredLanes&=g,m.mutableReadLanes&=g,m.entangledLanes&=g,g=m.entanglements;var R=m.eventTimes;for(m=m.expirationTimes;0>=fe,I-=fe,Dl=1<<32-Lo(g)+I|M<An?(ri=vn,vn=null):ri=vn.sibling;var Un=Gt(Fe,vn,Ve[An],Dt);if(Un===null){vn===null&&(vn=ri);break}m&&vn&&Un.alternate===null&&g(Fe,vn),Ae=V(Un,Ae,An),Cn===null?Bt=Un:Cn.sibling=Un,Cn=Un,vn=ri}if(An===Ve.length)return M(Fe,vn),gr&&Rl(Fe,An),Bt;if(vn===null){for(;AnAn?(ri=vn,vn=null):ri=vn.sibling;var nl=Gt(Fe,vn,Un.value,Dt);if(nl===null){vn===null&&(vn=ri);break}m&&vn&&nl.alternate===null&&g(Fe,vn),Ae=V(nl,Ae,An),Cn===null?Bt=nl:Cn.sibling=nl,Cn=nl,vn=ri}if(Un.done)return M(Fe,vn),gr&&Rl(Fe,An),Bt;if(vn===null){for(;!Un.done;An++,Un=Ve.next())Un=pn(Fe,Un.value,Dt),Un!==null&&(Ae=V(Un,Ae,An),Cn===null?Bt=Un:Cn.sibling=Un,Cn=Un);return gr&&Rl(Fe,An),Bt}for(vn=R(Fe,vn);!Un.done;An++,Un=Ve.next())Un=nr(vn,Fe,An,Un.value,Dt),Un!==null&&(m&&Un.alternate!==null&&vn.delete(Un.key===null?An:Un.key),Ae=V(Un,Ae,An),Cn===null?Bt=Un:Cn.sibling=Un,Cn=Un);return m&&vn.forEach(function(Xm){return g(Fe,Xm)}),gr&&Rl(Fe,An),Bt}function ua(Fe,Ae,Ve,Dt){if(typeof Ve=="object"&&Ve!==null&&Ve.type===c&&Ve.key===null&&(Ve=Ve.props.children),typeof Ve=="object"&&Ve!==null){switch(Ve.$$typeof){case l:e:{for(var Bt=Ve.key,Cn=Ae;Cn!==null;){if(Cn.key===Bt){if(Bt=Ve.type,Bt===c){if(Cn.tag===7){M(Fe,Cn.sibling),Ae=I(Cn,Ve.props.children),Ae.return=Fe,Fe=Ae;break e}}else if(Cn.elementType===Bt||typeof Bt=="object"&&Bt!==null&&Bt.$$typeof===w&&vh(Bt)===Cn.type){M(Fe,Cn.sibling),Ae=I(Cn,Ve.props),Ae.ref=Pf(Fe,Cn,Ve),Ae.return=Fe,Fe=Ae;break e}M(Fe,Cn);break}else g(Fe,Cn);Cn=Cn.sibling}Ve.type===c?(Ae=Tu(Ve.props.children,Fe.mode,Dt,Ve.key),Ae.return=Fe,Fe=Ae):(Dt=jm(Ve.type,Ve.key,Ve.props,null,Fe.mode,Dt),Dt.ref=Pf(Fe,Ae,Ve),Dt.return=Fe,Fe=Dt)}return fe(Fe);case u:e:{for(Cn=Ve.key;Ae!==null;){if(Ae.key===Cn)if(Ae.tag===4&&Ae.stateNode.containerInfo===Ve.containerInfo&&Ae.stateNode.implementation===Ve.implementation){M(Fe,Ae.sibling),Ae=I(Ae,Ve.children||[]),Ae.return=Fe,Fe=Ae;break e}else{M(Fe,Ae);break}else g(Fe,Ae);Ae=Ae.sibling}Ae=Oa(Ve,Fe.mode,Dt),Ae.return=Fe,Fe=Ae}return fe(Fe);case w:return Cn=Ve._init,ua(Fe,Ae,Cn(Ve._payload),Dt)}if(K(Ve))return kt(Fe,Ae,Ve,Dt);if(C(Ve))return to(Fe,Ae,Ve,Dt);cs(Fe,Ve)}return typeof Ve=="string"&&Ve!==""||typeof Ve=="number"?(Ve=""+Ve,Ae!==null&&Ae.tag===6?(M(Fe,Ae.sibling),Ae=I(Ae,Ve),Ae.return=Fe,Fe=Ae):(M(Fe,Ae),Ae=eo(Ve,Fe.mode,Dt),Ae.return=Fe,Fe=Ae),fe(Fe)):M(Fe,Ae)}return ua}var Nf=d_(!0),h_=d_(!1),Xs={},Or=Si(Xs),Of=Si(Xs),If=Si(Xs);function Ys(m){if(m===Xs)throw Error(a(174));return m}function Yv(m,g){It(If,g),It(Of,m),It(Or,Xs),m=$(g),ln(Or),It(Or,m)}function Ff(){ln(Or),ln(Of),ln(If)}function p_(m){var g=Ys(If.current),M=Ys(Or.current);g=W(M,m.type,g),M!==g&&(It(Of,m),It(Or,g))}function mu(m){Of.current===m&&(ln(Or),ln(Of))}var xe=Si(0);function Ke(m){for(var g=m;g!==null;){if(g.tag===13){var M=g.memoizedState;if(M!==null&&(M=M.dehydrated,M===null||Aa(M)||Ta(M)))return g}else if(g.tag===19&&g.memoizedProps.revealOrder!==void 0){if(g.flags&128)return g}else if(g.child!==null){g.child.return=g,g=g.child;continue}if(g===m)break;for(;g.sibling===null;){if(g.return===null||g.return===m)return null;g=g.return}g.sibling.return=g.return,g=g.sibling}return null}var $e=[];function Rt(){for(var m=0;m<$e.length;m++){var g=$e[m];ct?g._workInProgressVersionPrimary=null:g._workInProgressVersionSecondary=null}$e.length=0}var hn=s.ReactCurrentDispatcher,yn=s.ReactCurrentBatchConfig,wr=0,un=null,Ai=null,Ti=null,xo=!1,gu=!1,yh=0,Lf=0;function mi(){throw Error(a(321))}function kf(m,g){if(g===null)return!1;for(var M=0;MM?M:4,m(!0);var R=yn.transition;yn.transition={};try{m(!1),g()}finally{Wn=M,yn.transition=R}}function y_(){return ra().memoizedState}function gi(m,g,M){var R=el(m);M={lane:R,action:M,hasEagerState:!1,eagerState:null,next:null},x_(m)?b_(g,M):(ty(m,g,M),M=Zi(),m=Pa(m,R,M),m!==null&&__(m,g,R))}function Xi(m,g,M){var R=el(m),I={lane:R,action:M,hasEagerState:!1,eagerState:null,next:null};if(x_(m))b_(g,I);else{ty(m,g,I);var V=m.alternate;if(m.lanes===0&&(V===null||V.lanes===0)&&(V=g.lastRenderedReducer,V!==null))try{var fe=g.lastRenderedState,Me=V(fe,M);if(I.hasEagerState=!0,I.eagerState=Me,js(Me,fe))return}catch{}finally{}M=Zi(),m=Pa(m,R,M),m!==null&&__(m,g,R)}}function x_(m){var g=m.alternate;return m===un||g!==null&&g===un}function b_(m,g){gu=xo=!0;var M=m.pending;M===null?g.next=g:(g.next=M.next,M.next=g),m.pending=g}function ty(m,g,M){ti!==null&&m.mode&1&&!(Mn&2)?(m=g.interleaved,m===null?(M.next=M,qs===null?qs=[g]:qs.push(g)):(M.next=m.next,m.next=M),g.interleaved=M):(m=g.pending,m===null?M.next=M:(M.next=m.next,m.next=M),g.pending=M)}function __(m,g,M){if(M&4194240){var R=g.lanes;R&=m.pendingLanes,M|=R,g.lanes=M,Uv(m,M)}}var Uf={readContext:_r,useCallback:mi,useContext:mi,useEffect:mi,useImperativeHandle:mi,useInsertionEffect:mi,useLayoutEffect:mi,useMemo:mi,useReducer:mi,useRef:mi,useState:mi,useDebugValue:mi,useDeferredValue:mi,useTransition:mi,useMutableSource:mi,useSyncExternalStore:mi,useId:mi,unstable_isNewReconciler:!1},Ch={readContext:_r,useCallback:function(m,g){return Ks().memoizedState=[m,g===void 0?null:g],m},useContext:_r,useEffect:Bf,useImperativeHandle:function(m,g,M){return M=M!=null?M.concat([m]):null,yu(4194308,4,Sh.bind(null,g,m),M)},useLayoutEffect:function(m,g){return yu(4194308,4,m,g)},useInsertionEffect:function(m,g){return yu(4,2,m,g)},useMemo:function(m,g){var M=Ks();return g=g===void 0?null:g,m=m(),M.memoizedState=[m,g],m},useReducer:function(m,g,M){var R=Ks();return g=M!==void 0?M(g):g,R.memoizedState=R.baseState=g,m={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:m,lastRenderedState:g},R.queue=m,m=m.dispatch=gi.bind(null,un,m),[R.memoizedState,m]},useRef:function(m){var g=Ks();return m={current:m},g.memoizedState=m},useState:Dm,useDebugValue:Mh,useDeferredValue:function(m){var g=Dm(m),M=g[0],R=g[1];return Bf(function(){var I=yn.transition;yn.transition={};try{R(m)}finally{yn.transition=I}},[m]),M},useTransition:function(){var m=Dm(!1),g=m[0];return m=PA.bind(null,m[1]),Ks().memoizedState=m,[g,m]},useMutableSource:function(){},useSyncExternalStore:function(m,g,M){var R=un,I=Ks();if(gr){if(M===void 0)throw Error(a(407));M=M()}else{if(M=g(),ti===null)throw Error(a(349));wr&30||bh(R,g,M)}I.memoizedState=M;var V={value:M,getSnapshot:g};return I.queue=V,Bf(_h.bind(null,R,V,m),[m]),R.flags|=2048,vu(9,Zv.bind(null,R,V,M,g),void 0,null),M},useId:function(){var m=Ks(),g=ti.identifierPrefix;if(gr){var M=ls,R=Dl;M=(R&~(1<<32-Lo(R)-1)).toString(32)+M,g=":"+g+"R"+M,M=yh++,0")&&(qe=qe.replace("",m.displayName)),qe}while(1<=fe&&0<=Me);break}}}finally{an=!1,Error.prepareStackTrace=M}return(m=m?m.displayName||m.name:"")?Lt(m):""}var Xn=Object.prototype.hasOwnProperty,Qr=[],cr=-1;function Si(m){return{current:m}}function sn(m){0>cr||(m.current=Qr[cr],Qr[cr]=null,cr--)}function It(m,g){cr++,Qr[cr]=m.current,m.current=g}var Da={},Pn=Si(Da),Ar=Si(!1),rs=Da;function Fo(m,g){var M=m.type.contextTypes;if(!M)return Da;var R=m.stateNode;if(R&&R.__reactInternalMemoizedUnmaskedChildContext===g)return R.__reactInternalMemoizedMaskedChildContext;var I={},V;for(V in M)I[V]=g[V];return R&&(m=m.stateNode,m.__reactInternalMemoizedUnmaskedChildContext=g,m.__reactInternalMemoizedMaskedChildContext=I),I}function Ei(m){return m=m.childContextTypes,m!=null}function $r(){sn(Ar),sn(Pn)}function na(m,g,M){if(Pn.current!==Da)throw Error(a(168));It(Pn,g),It(Ar,M)}function cc(m,g,M){var R=m.stateNode;if(g=g.childContextTypes,typeof R.getChildContext!="function")return M;R=R.getChildContext();for(var I in R)if(!(I in g))throw Error(a(108,O(m)||"Unknown",I));return o({},M,R)}function Mi(m){return m=(m=m.stateNode)&&m.__reactInternalMemoizedMergedChildContext||Da,rs=Pn.current,It(Pn,m),It(Ar,Ar.current),!0}function fc(m,g,M){var R=m.stateNode;if(!R)throw Error(a(169));M?(m=cc(m,g,rs),R.__reactInternalMemoizedMergedChildContext=m,sn(Ar),sn(Pn),It(Pn,m)):sn(Ar),It(Ar,M)}var Lo=Math.clz32?Math.clz32:t_,_f=Math.log,EA=Math.LN2;function t_(m){return m>>>=0,m===0?32:31-(_f(m)/EA|0)|0}var wf=64,Sf=4194304;function Ws(m){switch(m&-m){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: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 m&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return m&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return m}}function ch(m,g){var M=m.pendingLanes;if(M===0)return 0;var R=0,I=m.suspendedLanes,V=m.pingedLanes,fe=M&268435455;if(fe!==0){var Me=fe&~I;Me!==0?R=Ws(Me):(V&=fe,V!==0&&(R=Ws(V)))}else fe=M&~I,fe!==0?R=Ws(fe):V!==0&&(R=Ws(V));if(R===0)return 0;if(g!==0&&g!==R&&!(g&I)&&(I=R&-R,V=g&-g,I>=V||I===16&&(V&4194240)!==0))return g;if(R&4&&(R|=M&16),g=m.entangledLanes,g!==0)for(m=m.entanglements,g&=R;0M;M++)g.push(m);return g}function Ef(m,g,M){m.pendingLanes|=g,g!==536870912&&(m.suspendedLanes=0,m.pingedLanes=0),m=m.eventTimes,g=31-Lo(g),m[g]=M}function r_(m,g){var M=m.pendingLanes&~g;m.pendingLanes=g,m.suspendedLanes=0,m.pingedLanes=0,m.expiredLanes&=g,m.mutableReadLanes&=g,m.entangledLanes&=g,g=m.entanglements;var R=m.eventTimes;for(m=m.expirationTimes;0>=fe,I-=fe,Dl=1<<32-Lo(g)+I|M<Cn?(ri=gn,gn=null):ri=gn.sibling;var Bn=jt(Fe,gn,Ve[Cn],Dt);if(Bn===null){gn===null&&(gn=ri);break}m&&gn&&Bn.alternate===null&&g(Fe,gn),Ae=V(Bn,Ae,Cn),Mn===null?Bt=Bn:Mn.sibling=Bn,Mn=Bn,gn=ri}if(Cn===Ve.length)return M(Fe,gn),gr&&Rl(Fe,Cn),Bt;if(gn===null){for(;CnCn?(ri=gn,gn=null):ri=gn.sibling;var nl=jt(Fe,gn,Bn.value,Dt);if(nl===null){gn===null&&(gn=ri);break}m&&gn&&nl.alternate===null&&g(Fe,gn),Ae=V(nl,Ae,Cn),Mn===null?Bt=nl:Mn.sibling=nl,Mn=nl,gn=ri}if(Bn.done)return M(Fe,gn),gr&&Rl(Fe,Cn),Bt;if(gn===null){for(;!Bn.done;Cn++,Bn=Ve.next())Bn=hn(Fe,Bn.value,Dt),Bn!==null&&(Ae=V(Bn,Ae,Cn),Mn===null?Bt=Bn:Mn.sibling=Bn,Mn=Bn);return gr&&Rl(Fe,Cn),Bt}for(gn=R(Fe,gn);!Bn.done;Cn++,Bn=Ve.next())Bn=nr(gn,Fe,Cn,Bn.value,Dt),Bn!==null&&(m&&Bn.alternate!==null&&gn.delete(Bn.key===null?Cn:Bn.key),Ae=V(Bn,Ae,Cn),Mn===null?Bt=Bn:Mn.sibling=Bn,Mn=Bn);return m&&gn.forEach(function(Ym){return g(Fe,Ym)}),gr&&Rl(Fe,Cn),Bt}function ua(Fe,Ae,Ve,Dt){if(typeof Ve=="object"&&Ve!==null&&Ve.type===c&&Ve.key===null&&(Ve=Ve.props.children),typeof Ve=="object"&&Ve!==null){switch(Ve.$$typeof){case l:e:{for(var Bt=Ve.key,Mn=Ae;Mn!==null;){if(Mn.key===Bt){if(Bt=Ve.type,Bt===c){if(Mn.tag===7){M(Fe,Mn.sibling),Ae=I(Mn,Ve.props.children),Ae.return=Fe,Fe=Ae;break e}}else if(Mn.elementType===Bt||typeof Bt=="object"&&Bt!==null&&Bt.$$typeof===w&&yh(Bt)===Mn.type){M(Fe,Mn.sibling),Ae=I(Mn,Ve.props),Ae.ref=Pf(Fe,Mn,Ve),Ae.return=Fe,Fe=Ae;break e}M(Fe,Mn);break}else g(Fe,Mn);Mn=Mn.sibling}Ve.type===c?(Ae=Au(Ve.props.children,Fe.mode,Dt,Ve.key),Ae.return=Fe,Fe=Ae):(Dt=qm(Ve.type,Ve.key,Ve.props,null,Fe.mode,Dt),Dt.ref=Pf(Fe,Ae,Ve),Dt.return=Fe,Fe=Dt)}return fe(Fe);case u:e:{for(Mn=Ve.key;Ae!==null;){if(Ae.key===Mn)if(Ae.tag===4&&Ae.stateNode.containerInfo===Ve.containerInfo&&Ae.stateNode.implementation===Ve.implementation){M(Fe,Ae.sibling),Ae=I(Ae,Ve.children||[]),Ae.return=Fe,Fe=Ae;break e}else{M(Fe,Ae);break}else g(Fe,Ae);Ae=Ae.sibling}Ae=Oa(Ve,Fe.mode,Dt),Ae.return=Fe,Fe=Ae}return fe(Fe);case w:return Mn=Ve._init,ua(Fe,Ae,Mn(Ve._payload),Dt)}if(K(Ve))return kt(Fe,Ae,Ve,Dt);if(C(Ve))return no(Fe,Ae,Ve,Dt);cs(Fe,Ve)}return typeof Ve=="string"&&Ve!==""||typeof Ve=="number"?(Ve=""+Ve,Ae!==null&&Ae.tag===6?(M(Fe,Ae.sibling),Ae=I(Ae,Ve),Ae.return=Fe,Fe=Ae):(M(Fe,Ae),Ae=to(Ve,Fe.mode,Dt),Ae.return=Fe,Fe=Ae),fe(Fe)):M(Fe,Ae)}return ua}var Nf=h_(!0),p_=h_(!1),Xs={},Or=Si(Xs),Of=Si(Xs),If=Si(Xs);function Ys(m){if(m===Xs)throw Error(a(174));return m}function Jv(m,g){It(If,g),It(Of,m),It(Or,Xs),m=$(g),sn(Or),It(Or,m)}function Ff(){sn(Or),sn(Of),sn(If)}function m_(m){var g=Ys(If.current),M=Ys(Or.current);g=W(M,m.type,g),M!==g&&(It(Of,m),It(Or,g))}function pu(m){Of.current===m&&(sn(Or),sn(Of))}var xe=Si(0);function Ke(m){for(var g=m;g!==null;){if(g.tag===13){var M=g.memoizedState;if(M!==null&&(M=M.dehydrated,M===null||Aa(M)||Ta(M)))return g}else if(g.tag===19&&g.memoizedProps.revealOrder!==void 0){if(g.flags&128)return g}else if(g.child!==null){g.child.return=g,g=g.child;continue}if(g===m)break;for(;g.sibling===null;){if(g.return===null||g.return===m)return null;g=g.return}g.sibling.return=g.return,g=g.sibling}return null}var $e=[];function Rt(){for(var m=0;m<$e.length;m++){var g=$e[m];ct?g._workInProgressVersionPrimary=null:g._workInProgressVersionSecondary=null}$e.length=0}var dn=s.ReactCurrentDispatcher,vn=s.ReactCurrentBatchConfig,wr=0,ln=null,Ai=null,Ti=null,bo=!1,mu=!1,xh=0,Lf=0;function mi(){throw Error(a(321))}function kf(m,g){if(g===null)return!1;for(var M=0;MM?M:4,m(!0);var R=vn.transition;vn.transition={};try{m(!1),g()}finally{Vn=M,vn.transition=R}}function x_(){return ra().memoizedState}function gi(m,g,M){var R=el(m);M={lane:R,action:M,hasEagerState:!1,eagerState:null,next:null},b_(m)?__(g,M):(iy(m,g,M),M=Ji(),m=Pa(m,R,M),m!==null&&w_(m,g,R))}function Yi(m,g,M){var R=el(m),I={lane:R,action:M,hasEagerState:!1,eagerState:null,next:null};if(b_(m))__(g,I);else{iy(m,g,I);var V=m.alternate;if(m.lanes===0&&(V===null||V.lanes===0)&&(V=g.lastRenderedReducer,V!==null))try{var fe=g.lastRenderedState,Me=V(fe,M);if(I.hasEagerState=!0,I.eagerState=Me,js(Me,fe))return}catch{}finally{}M=Ji(),m=Pa(m,R,M),m!==null&&w_(m,g,R)}}function b_(m){var g=m.alternate;return m===ln||g!==null&&g===ln}function __(m,g){mu=bo=!0;var M=m.pending;M===null?g.next=g:(g.next=M.next,M.next=g),m.pending=g}function iy(m,g,M){ti!==null&&m.mode&1&&!(En&2)?(m=g.interleaved,m===null?(M.next=M,qs===null?qs=[g]:qs.push(g)):(M.next=m.next,m.next=M),g.interleaved=M):(m=g.pending,m===null?M.next=M:(M.next=m.next,m.next=M),g.pending=M)}function w_(m,g,M){if(M&4194240){var R=g.lanes;R&=m.pendingLanes,M|=R,g.lanes=M,Hv(m,M)}}var Uf={readContext:_r,useCallback:mi,useContext:mi,useEffect:mi,useImperativeHandle:mi,useInsertionEffect:mi,useLayoutEffect:mi,useMemo:mi,useReducer:mi,useRef:mi,useState:mi,useDebugValue:mi,useDeferredValue:mi,useTransition:mi,useMutableSource:mi,useSyncExternalStore:mi,useId:mi,unstable_isNewReconciler:!1},Ah={readContext:_r,useCallback:function(m,g){return Ks().memoizedState=[m,g===void 0?null:g],m},useContext:_r,useEffect:Bf,useImperativeHandle:function(m,g,M){return M=M!=null?M.concat([m]):null,vu(4194308,4,Eh.bind(null,g,m),M)},useLayoutEffect:function(m,g){return vu(4194308,4,m,g)},useInsertionEffect:function(m,g){return vu(4,2,m,g)},useMemo:function(m,g){var M=Ks();return g=g===void 0?null:g,m=m(),M.memoizedState=[m,g],m},useReducer:function(m,g,M){var R=Ks();return g=M!==void 0?M(g):g,R.memoizedState=R.baseState=g,m={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:m,lastRenderedState:g},R.queue=m,m=m.dispatch=gi.bind(null,ln,m),[R.memoizedState,m]},useRef:function(m){var g=Ks();return m={current:m},g.memoizedState=m},useState:Rm,useDebugValue:Ch,useDeferredValue:function(m){var g=Rm(m),M=g[0],R=g[1];return Bf(function(){var I=vn.transition;vn.transition={};try{R(m)}finally{vn.transition=I}},[m]),M},useTransition:function(){var m=Rm(!1),g=m[0];return m=NA.bind(null,m[1]),Ks().memoizedState=m,[g,m]},useMutableSource:function(){},useSyncExternalStore:function(m,g,M){var R=ln,I=Ks();if(gr){if(M===void 0)throw Error(a(407));M=M()}else{if(M=g(),ti===null)throw Error(a(349));wr&30||_h(R,g,M)}I.memoizedState=M;var V={value:M,getSnapshot:g};return I.queue=V,Bf(wh.bind(null,R,V,m),[m]),R.flags|=2048,gu(9,ey.bind(null,R,V,M,g),void 0,null),M},useId:function(){var m=Ks(),g=ti.identifierPrefix;if(gr){var M=ls,R=Dl;M=(R&~(1<<32-Lo(R)-1)).toString(32)+M,g=":"+g+"R"+M,M=xh++,0Oh&&(g.flags|=128,R=!0,Yi(I,!1),g.lanes=4194304)}else{if(!R)if(m=Ke(V),m!==null){if(g.flags|=128,R=!0,m=m.updateQueue,m!==null&&(g.updateQueue=m,g.flags|=4),Yi(I,!0),I.tail===null&&I.tailMode==="hidden"&&!V.alternate&&!gr)return Zt(g),null}else 2*Ci()-I.renderingStartTime>Oh&&M!==1073741824&&(g.flags|=128,R=!0,Yi(I,!1),g.lanes=4194304);I.isBackwards?(V.sibling=g.child,g.child=V):(m=I.last,m!==null?m.sibling=V:g.child=V,I.last=V)}return I.tail!==null?(g=I.tail,I.rendering=g,I.tail=g.sibling,I.renderingStartTime=Ci(),g.sibling=null,m=xe.current,It(xe,R?m&1|2:m&1),g):(Zt(g),null);case 22:case 23:return yy(),R=g.memoizedState!==null,m!==null&&m.memoizedState!==null!==R&&(g.flags|=8192),R&&g.mode&1?sa&1073741824&&(Zt(g),Xe&&g.subtreeFlags&6&&(g.flags|=8192)):Zt(g),null;case 24:return null;case 25:return null}throw Error(a(156,g.tag))}var OA=s.ReactCurrentOwner,ia=!1;function Hr(m,g,M,R){g.child=m===null?h_(g,null,M,R):Nf(g,m.child,M,R)}function C_(m,g,M,R,I){M=M.render;var V=g.ref;return dc(g,I),R=Gn(m,g,M,R,V,I),M=Kv(),m!==null&&!ia?(g.updateQueue=m.updateQueue,g.flags&=-2053,m.lanes&=~I,vi(m,g,I)):(gr&&M&&Cm(g),g.flags|=1,Hr(m,g,R,I),g.child)}function A_(m,g,M,R,I){if(m===null){var V=M.type;return typeof V=="function"&&!Ey(V)&&V.defaultProps===void 0&&M.compare===null&&M.defaultProps===void 0?(g.tag=15,g.type=V,T_(m,g,V,R,I)):(m=jm(M.type,null,R,g,g.mode,I),m.ref=g.ref,m.return=g,g.child=m)}if(V=m.child,!(m.lanes&I)){var fe=V.memoizedProps;if(M=M.compare,M=M!==null?M:ei,M(fe,R)&&m.ref===g.ref)return vi(m,g,I)}return g.flags|=1,m=Fl(V,R),m.ref=g.ref,m.return=g,g.child=m}function T_(m,g,M,R,I){if(m!==null&&ei(m.memoizedProps,R)&&m.ref===g.ref)if(ia=!1,(m.lanes&I)!==0)m.flags&131072&&(ia=!0);else return g.lanes=m.lanes,vi(m,g,I);return fs(m,g,M,R,I)}function D_(m,g,M){var R=g.pendingProps,I=R.children,V=m!==null?m.memoizedState:null;if(R.mode==="hidden")if(!(g.mode&1))g.memoizedState={baseLanes:0,cachePool:null},It(Gf,sa),sa|=M;else if(M&1073741824)g.memoizedState={baseLanes:0,cachePool:null},R=V!==null?V.baseLanes:M,It(Gf,sa),sa|=R;else return m=V!==null?V.baseLanes|M:M,g.lanes=g.childLanes=1073741824,g.memoizedState={baseLanes:m,cachePool:null},g.updateQueue=null,It(Gf,sa),sa|=m,null;else V!==null?(R=V.baseLanes|M,g.memoizedState=null):R=M,It(Gf,sa),sa|=R;return Hr(m,g,I,M),g.child}function R_(m,g){var M=g.ref;(m===null&&M!==null||m!==null&&m.ref!==M)&&(g.flags|=512,g.flags|=2097152)}function fs(m,g,M,R,I){var V=Ei(M)?rs:Nn.current;return V=Fo(g,V),dc(g,I),M=Gn(m,g,M,R,V,I),R=Kv(),m!==null&&!ia?(g.updateQueue=m.updateQueue,g.flags&=-2053,m.lanes&=~I,vi(m,g,I)):(gr&&R&&Cm(g),g.flags|=1,Hr(m,g,M,I),g.child)}function P_(m,g,M,R,I){if(Ei(M)){var V=!0;Mi(g)}else V=!1;if(dc(g,I),g.stateNode===null)m!==null&&(m.alternate=null,g.alternate=null,g.flags|=2),l_(g,M,R),Af(g,M,R,I),R=!0;else if(m===null){var fe=g.stateNode,Me=g.memoizedProps;fe.props=Me;var qe=fe.context,dt=M.contextType;typeof dt=="object"&&dt!==null?dt=_r(dt):(dt=Ei(M)?rs:Nn.current,dt=Fo(g,dt));var Nt=M.getDerivedStateFromProps,pn=typeof Nt=="function"||typeof fe.getSnapshotBeforeUpdate=="function";pn||typeof fe.UNSAFE_componentWillReceiveProps!="function"&&typeof fe.componentWillReceiveProps!="function"||(Me!==R||qe!==dt)&&jv(g,fe,R,dt),pi=!1;var Gt=g.memoizedState;fe.state=Gt,as(g,R,fe,I),qe=g.memoizedState,Me!==R||Gt!==qe||Ar.current||pi?(typeof Nt=="function"&&(dh(g,M,Nt,R),qe=g.memoizedState),(Me=pi||s_(g,M,Me,R,Gt,qe,dt))?(pn||typeof fe.UNSAFE_componentWillMount!="function"&&typeof fe.componentWillMount!="function"||(typeof fe.componentWillMount=="function"&&fe.componentWillMount(),typeof fe.UNSAFE_componentWillMount=="function"&&fe.UNSAFE_componentWillMount()),typeof fe.componentDidMount=="function"&&(g.flags|=4194308)):(typeof fe.componentDidMount=="function"&&(g.flags|=4194308),g.memoizedProps=R,g.memoizedState=qe),fe.props=R,fe.state=qe,fe.context=dt,R=Me):(typeof fe.componentDidMount=="function"&&(g.flags|=4194308),R=!1)}else{fe=g.stateNode,Gv(m,g),Me=g.memoizedProps,dt=g.type===g.elementType?Me:Ii(g.type,Me),fe.props=dt,pn=g.pendingProps,Gt=fe.context,qe=M.contextType,typeof qe=="object"&&qe!==null?qe=_r(qe):(qe=Ei(M)?rs:Nn.current,qe=Fo(g,qe));var nr=M.getDerivedStateFromProps;(Nt=typeof nr=="function"||typeof fe.getSnapshotBeforeUpdate=="function")||typeof fe.UNSAFE_componentWillReceiveProps!="function"&&typeof fe.componentWillReceiveProps!="function"||(Me!==pn||Gt!==qe)&&jv(g,fe,R,qe),pi=!1,Gt=g.memoizedState,fe.state=Gt,as(g,R,fe,I);var kt=g.memoizedState;Me!==pn||Gt!==kt||Ar.current||pi?(typeof nr=="function"&&(dh(g,M,nr,R),kt=g.memoizedState),(dt=pi||s_(g,M,dt,R,Gt,kt,qe)||!1)?(Nt||typeof fe.UNSAFE_componentWillUpdate!="function"&&typeof fe.componentWillUpdate!="function"||(typeof fe.componentWillUpdate=="function"&&fe.componentWillUpdate(R,kt,qe),typeof fe.UNSAFE_componentWillUpdate=="function"&&fe.UNSAFE_componentWillUpdate(R,kt,qe)),typeof fe.componentDidUpdate=="function"&&(g.flags|=4),typeof fe.getSnapshotBeforeUpdate=="function"&&(g.flags|=1024)):(typeof fe.componentDidUpdate!="function"||Me===m.memoizedProps&&Gt===m.memoizedState||(g.flags|=4),typeof fe.getSnapshotBeforeUpdate!="function"||Me===m.memoizedProps&&Gt===m.memoizedState||(g.flags|=1024),g.memoizedProps=R,g.memoizedState=kt),fe.props=R,fe.state=kt,fe.context=qe,R=dt):(typeof fe.componentDidUpdate!="function"||Me===m.memoizedProps&&Gt===m.memoizedState||(g.flags|=4),typeof fe.getSnapshotBeforeUpdate!="function"||Me===m.memoizedProps&&Gt===m.memoizedState||(g.flags|=1024),R=!1)}return ry(m,g,M,R,V,I)}function ry(m,g,M,R,I,V){R_(m,g);var fe=(g.flags&128)!==0;if(!R&&!fe)return I&&fc(g,M,!1),vi(m,g,V);R=g.stateNode,OA.current=g;var Me=fe&&typeof M.getDerivedStateFromError!="function"?null:R.render();return g.flags|=1,m!==null&&fe?(g.child=Nf(g,m.child,null,V),g.child=Nf(g,null,Me,V)):Hr(m,g,Me,V),g.memoizedState=R.state,I&&fc(g,M,!0),g.child}function N_(m){var g=m.stateNode;g.pendingContext?na(m,g.pendingContext,g.pendingContext!==g.context):g.context&&na(m,g.context,!1),Yv(m,g.containerInfo)}function O_(m,g,M,R,I){return Rf(),gh(I),g.flags|=256,Hr(m,g,M,R),g.child}var Pm={dehydrated:null,treeContext:null,retryLane:0};function Ra(m){return{baseLanes:m,cachePool:null}}function I_(m,g,M){var R=g.pendingProps,I=xe.current,V=!1,fe=(g.flags&128)!==0,Me;if((Me=fe)||(Me=m!==null&&m.memoizedState===null?!1:(I&2)!==0),Me?(V=!0,g.flags&=-129):(m===null||m.memoizedState!==null)&&(I|=1),It(xe,I&1),m===null)return Xv(g),m=g.memoizedState,m!==null&&(m=m.dehydrated,m!==null)?(g.mode&1?Ta(m)?g.lanes=8:g.lanes=1073741824:g.lanes=1,null):(I=R.children,m=R.fallback,V?(R=g.mode,V=g.child,I={mode:"hidden",children:I},!(R&1)&&V!==null?(V.childLanes=0,V.pendingProps=I):V=Bh(I,R,0,null),m=Tu(m,R,M,null),V.return=g,m.return=g,V.sibling=m,g.child=V,g.child.memoizedState=Ra(M),g.memoizedState=Pm,m):iy(g,I));if(I=m.memoizedState,I!==null){if(Me=I.dehydrated,Me!==null){if(fe)return g.flags&256?(g.flags&=-257,Nm(m,g,M,Error(a(422)))):g.memoizedState!==null?(g.child=m.child,g.flags|=128,null):(V=R.fallback,I=g.mode,R=Bh({mode:"visible",children:R.children},I,0,null),V=Tu(V,I,M,null),V.flags|=2,R.return=g,V.return=g,R.sibling=V,g.child=R,g.mode&1&&Nf(g,m.child,null,M),g.child.memoizedState=Ra(M),g.memoizedState=Pm,V);if(!(g.mode&1))g=Nm(m,g,M,null);else if(Ta(Me))g=Nm(m,g,M,Error(a(419)));else if(R=(M&m.childLanes)!==0,ia||R){if(R=ti,R!==null){switch(M&-M){case 4:V=2;break;case 16:V=8;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:V=32;break;case 536870912:V=268435456;break;default:V=0}R=V&(R.suspendedLanes|M)?0:V,R!==0&&R!==I.retryLane&&(I.retryLane=R,Pa(m,R,-1))}Vm(),g=Nm(m,g,M,Error(a(421)))}else Aa(Me)?(g.flags|=128,g.child=m.child,g=Au.bind(null,m),ns(Me,g),g=null):(M=I.treeContext,De&&(Li=ta(Me),yo=g,gr=!0,us=null,Df=!1,M!==null&&(ko[Bo++]=Dl,ko[Bo++]=ls,ko[Bo++]=pu,Dl=M.id,ls=M.overflow,pu=g)),g=iy(g,g.pendingProps.children),g.flags|=4096);return g}return V?(R=L_(m,g,R.children,R.fallback,M),V=g.child,I=m.child.memoizedState,V.memoizedState=I===null?Ra(M):{baseLanes:I.baseLanes|M,cachePool:null},V.childLanes=m.childLanes&~M,g.memoizedState=Pm,R):(M=F_(m,g,R.children,M),g.memoizedState=null,M)}return V?(R=L_(m,g,R.children,R.fallback,M),V=g.child,I=m.child.memoizedState,V.memoizedState=I===null?Ra(M):{baseLanes:I.baseLanes|M,cachePool:null},V.childLanes=m.childLanes&~M,g.memoizedState=Pm,R):(M=F_(m,g,R.children,M),g.memoizedState=null,M)}function iy(m,g){return g=Bh({mode:"visible",children:g},m.mode,0,null),g.return=m,m.child=g}function F_(m,g,M,R){var I=m.child;return m=I.sibling,M=Fl(I,{mode:"visible",children:M}),!(g.mode&1)&&(M.lanes=R),M.return=g,M.sibling=null,m!==null&&(R=g.deletions,R===null?(g.deletions=[m],g.flags|=16):R.push(m)),g.child=M}function L_(m,g,M,R,I){var V=g.mode;m=m.child;var fe=m.sibling,Me={mode:"hidden",children:M};return!(V&1)&&g.child!==m?(M=g.child,M.childLanes=0,M.pendingProps=Me,g.deletions=null):(M=Fl(m,Me),M.subtreeFlags=m.subtreeFlags&14680064),fe!==null?R=Fl(fe,R):(R=Tu(R,V,I,null),R.flags|=2),R.return=g,M.return=g,M.sibling=R,g.child=M,R}function Nm(m,g,M,R){return R!==null&&gh(R),Nf(g,m.child,null,M),m=iy(g,g.pendingProps.children),m.flags|=2,g.memoizedState=null,m}function xu(m,g,M){m.lanes|=g;var R=m.alternate;R!==null&&(R.lanes|=g),Sm(m.return,g,M)}function oy(m,g,M,R,I){var V=m.memoizedState;V===null?m.memoizedState={isBackwards:g,rendering:null,renderingStartTime:0,last:R,tail:M,tailMode:I}:(V.isBackwards=g,V.rendering=null,V.renderingStartTime=0,V.last=R,V.tail=M,V.tailMode=I)}function k_(m,g,M){var R=g.pendingProps,I=R.revealOrder,V=R.tail;if(Hr(m,g,R.children,M),R=xe.current,R&2)R=R&1|2,g.flags|=128;else{if(m!==null&&m.flags&128)e:for(m=g.child;m!==null;){if(m.tag===13)m.memoizedState!==null&&xu(m,M,g);else if(m.tag===19)xu(m,M,g);else if(m.child!==null){m.child.return=m,m=m.child;continue}if(m===g)break e;for(;m.sibling===null;){if(m.return===null||m.return===g)break e;m=m.return}m.sibling.return=m.return,m=m.sibling}R&=1}if(It(xe,R),!(g.mode&1))g.memoizedState=null;else switch(I){case"forwards":for(M=g.child,I=null;M!==null;)m=M.alternate,m!==null&&Ke(m)===null&&(I=M),M=M.sibling;M=I,M===null?(I=g.child,g.child=null):(I=M.sibling,M.sibling=null),oy(g,!1,I,M,V);break;case"backwards":for(M=null,I=g.child,g.child=null;I!==null;){if(m=I.alternate,m!==null&&Ke(m)===null){g.child=I;break}m=I.sibling,I.sibling=M,M=I,I=m}oy(g,!0,M,null,V);break;case"together":oy(g,!1,null,null,void 0);break;default:g.memoizedState=null}return g.child}function vi(m,g,M){if(m!==null&&(g.dependencies=m.dependencies),qf|=g.lanes,!(M&g.childLanes))return null;if(m!==null&&g.child!==m.child)throw Error(a(153));if(g.child!==null){for(m=g.child,M=Fl(m,m.pendingProps),g.child=M,M.return=g;m.sibling!==null;)m=m.sibling,M=M.sibling=Fl(m,m.pendingProps),M.return=g;M.sibling=null}return g.child}function IA(m,g,M){switch(g.tag){case 3:N_(g),Rf();break;case 5:p_(g);break;case 1:Ei(g.type)&&Mi(g);break;case 4:Yv(g,g.stateNode.containerInfo);break;case 10:Vv(g,g.type._context,g.memoizedProps.value);break;case 13:var R=g.memoizedState;if(R!==null)return R.dehydrated!==null?(It(xe,xe.current&1),g.flags|=128,null):M&g.child.childLanes?I_(m,g,M):(It(xe,xe.current&1),m=vi(m,g,M),m!==null?m.sibling:null);It(xe,xe.current&1);break;case 19:if(R=(M&g.childLanes)!==0,m.flags&128){if(R)return k_(m,g,M);g.flags|=128}var I=g.memoizedState;if(I!==null&&(I.rendering=null,I.tail=null,I.lastEffect=null),It(xe,xe.current),R)break;return null;case 22:case 23:return g.lanes=0,D_(m,g,M)}return vi(m,g,M)}function FA(m,g){switch(vo(g),g.tag){case 1:return Ei(g.type)&&$r(),m=g.flags,m&65536?(g.flags=m&-65537|128,g):null;case 3:return Ff(),ln(Ar),ln(Nn),Rt(),m=g.flags,m&65536&&!(m&128)?(g.flags=m&-65537|128,g):null;case 5:return mu(g),null;case 13:if(ln(xe),m=g.memoizedState,m!==null&&m.dehydrated!==null){if(g.alternate===null)throw Error(a(340));Rf()}return m=g.flags,m&65536?(g.flags=m&-65537|128,g):null;case 19:return ln(xe),null;case 4:return Ff(),null;case 10:return wm(g.type._context),null;case 22:case 23:return yy(),null;case 24:return null;default:return null}}var Om=!1,yc=!1,LA=typeof WeakSet=="function"?WeakSet:Set,Et=null;function Dh(m,g){var M=m.ref;if(M!==null)if(typeof M=="function")try{M(null)}catch(R){Qi(m,g,R)}else M.current=null}function ay(m,g,M){try{M()}catch(R){Qi(m,g,R)}}var B_=!1;function sy(m,g){for(U(m.containerInfo),Et=g;Et!==null;)if(m=Et,g=m.child,(m.subtreeFlags&1028)!==0&&g!==null)g.return=m,Et=g;else for(;Et!==null;){m=Et;try{var M=m.alternate;if(m.flags&1024)switch(m.tag){case 0:case 11:case 15:break;case 1:if(M!==null){var R=M.memoizedProps,I=M.memoizedState,V=m.stateNode,fe=V.getSnapshotBeforeUpdate(m.elementType===m.type?R:Ii(m.type,R),I);V.__reactInternalSnapshotBeforeUpdate=fe}break;case 3:Xe&>(m.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(Me){Qi(m,m.return,Me)}if(g=m.sibling,g!==null){g.return=m.return,Et=g;break}Et=m.return}return M=B_,B_=!1,M}function ds(m,g,M){var R=g.updateQueue;if(R=R!==null?R.lastEffect:null,R!==null){var I=R=R.next;do{if((I.tag&m)===m){var V=I.destroy;I.destroy=void 0,V!==void 0&&ay(g,M,V)}I=I.next}while(I!==R)}}function bu(m,g){if(g=g.updateQueue,g=g!==null?g.lastEffect:null,g!==null){var M=g=g.next;do{if((M.tag&m)===m){var R=M.create;M.destroy=R()}M=M.next}while(M!==g)}}function ly(m){var g=m.ref;if(g!==null){var M=m.stateNode;switch(m.tag){case 5:m=Y(M);break;default:m=M}typeof g=="function"?g(m):g.current=m}}function uy(m,g,M){if(Gs&&typeof Gs.onCommitFiberUnmount=="function")try{Gs.onCommitFiberUnmount(ym,g)}catch{}switch(g.tag){case 0:case 11:case 14:case 15:if(m=g.updateQueue,m!==null&&(m=m.lastEffect,m!==null)){var R=m=m.next;do{var I=R,V=I.destroy;I=I.tag,V!==void 0&&(I&2||I&4)&&ay(g,M,V),R=R.next}while(R!==m)}break;case 1:if(Dh(g,M),m=g.stateNode,typeof m.componentWillUnmount=="function")try{m.props=g.memoizedProps,m.state=g.memoizedState,m.componentWillUnmount()}catch(fe){Qi(g,M,fe)}break;case 5:Dh(g,M);break;case 4:Xe?fy(m,g,M):ue&&ue&&(g=g.stateNode.containerInfo,M=Ye(g),_n(g,M))}}function U_(m,g,M){for(var R=g;;)if(uy(m,R,M),R.child===null||Xe&&R.tag===4){if(R===g)break;for(;R.sibling===null;){if(R.return===null||R.return===g)return;R=R.return}R.sibling.return=R.return,R=R.sibling}else R.child.return=R,R=R.child}function Qs(m){var g=m.alternate;g!==null&&(m.alternate=null,Qs(g)),m.child=null,m.deletions=null,m.sibling=null,m.tag===5&&(g=m.stateNode,g!==null&&me(g)),m.stateNode=null,m.return=null,m.dependencies=null,m.memoizedProps=null,m.memoizedState=null,m.pendingProps=null,m.stateNode=null,m.updateQueue=null}function Im(m){return m.tag===5||m.tag===3||m.tag===4}function _u(m){e:for(;;){for(;m.sibling===null;){if(m.return===null||Im(m.return))return null;m=m.return}for(m.sibling.return=m.return,m=m.sibling;m.tag!==5&&m.tag!==6&&m.tag!==18;){if(m.flags&2||m.child===null||m.tag===4)continue e;m.child.return=m,m=m.child}if(!(m.flags&2))return m.stateNode}}function oa(m){if(Xe){e:{for(var g=m.return;g!==null;){if(Im(g))break e;g=g.return}throw Error(a(160))}var M=g;switch(M.tag){case 5:g=M.stateNode,M.flags&32&&(wt(g),M.flags&=-33),M=_u(m),Fm(m,M,g);break;case 3:case 4:g=M.stateNode.containerInfo,M=_u(m),cy(m,M,g);break;default:throw Error(a(161))}}}function cy(m,g,M){var R=m.tag;if(R===5||R===6)m=m.stateNode,g?Le(M,m,g):ve(M,m);else if(R!==4&&(m=m.child,m!==null))for(cy(m,g,M),m=m.sibling;m!==null;)cy(m,g,M),m=m.sibling}function Fm(m,g,M){var R=m.tag;if(R===5||R===6)m=m.stateNode,g?je(M,m,g):de(M,m);else if(R!==4&&(m=m.child,m!==null))for(Fm(m,g,M),m=m.sibling;m!==null;)Fm(m,g,M),m=m.sibling}function fy(m,g,M){for(var R=g,I=!1,V,fe;;){if(!I){I=R.return;e:for(;;){if(I===null)throw Error(a(160));switch(V=I.stateNode,I.tag){case 5:fe=!1;break e;case 3:V=V.containerInfo,fe=!0;break e;case 4:V=V.containerInfo,fe=!0;break e}I=I.return}I=!0}if(R.tag===5||R.tag===6)U_(m,R,M),fe?xt(V,R.stateNode):_t(V,R.stateNode);else if(R.tag===18)fe?ze(V,R.stateNode):ke(V,R.stateNode);else if(R.tag===4){if(R.child!==null){V=R.stateNode.containerInfo,fe=!0,R.child.return=R,R=R.child;continue}}else if(uy(m,R,M),R.child!==null){R.child.return=R,R=R.child;continue}if(R===g)break;for(;R.sibling===null;){if(R.return===null||R.return===g)return;R=R.return,R.tag===4&&(I=!1)}R.sibling.return=R.return,R=R.sibling}}function xc(m,g){if(Xe){switch(g.tag){case 0:case 11:case 14:case 15:ds(3,g,g.return),bu(3,g),ds(5,g,g.return);return;case 1:return;case 5:var M=g.stateNode;if(M!=null){var R=g.memoizedProps;m=m!==null?m.memoizedProps:R;var I=g.type,V=g.updateQueue;g.updateQueue=null,V!==null&&Be(M,V,I,m,R,g)}return;case 6:if(g.stateNode===null)throw Error(a(162));M=g.memoizedProps,Se(g.stateNode,m!==null?m.memoizedProps:M,M);return;case 3:De&&m!==null&&m.memoizedState.isDehydrated&&_e(g.stateNode.containerInfo);return;case 12:return;case 13:hs(g);return;case 19:hs(g);return;case 17:return}throw Error(a(163))}switch(g.tag){case 0:case 11:case 14:case 15:ds(3,g,g.return),bu(3,g),ds(5,g,g.return);return;case 12:return;case 13:hs(g);return;case 19:hs(g);return;case 3:De&&m!==null&&m.memoizedState.isDehydrated&&_e(g.stateNode.containerInfo);break;case 22:case 23:return}e:if(ue){switch(g.tag){case 1:case 5:case 6:break e;case 3:case 4:g=g.stateNode,_n(g.containerInfo,g.pendingChildren);break e}throw Error(a(163))}}function hs(m){var g=m.updateQueue;if(g!==null){m.updateQueue=null;var M=m.stateNode;M===null&&(M=m.stateNode=new LA),g.forEach(function(R){var I=q_.bind(null,m,R);M.has(R)||(M.add(R),R.then(I,I))})}}function z_(m,g){for(Et=g;Et!==null;){g=Et;var M=g.deletions;if(M!==null)for(var R=0;R";case Ph:return":has("+(Nh(m)||"")+")";case aa:return'[role="'+m.value+'"]';case bc:return'"'+m.value+'"';case Vf:return'[data-testname="'+m.value+'"]';default:throw Error(a(365))}}function H_(m,g){var M=[];m=[m,0];for(var R=0;RI&&(I=fe),R&=~V}if(R=I,R=Ci()-R,R=(120>R?120:480>R?480:1080>R?1080:1920>R?1920:3e3>R?3e3:4320>R?4320:1960*BA(R/1960))-R,10m?16:m,Il===null)var R=!1;else{if(m=Il,Il=null,Fh=0,Mn&6)throw Error(a(331));var I=Mn;for(Mn|=4,Et=m.current;Et!==null;){var V=Et,fe=V.child;if(Et.flags&16){var Me=V.deletions;if(Me!==null){for(var qe=0;qeCi()-gy?tl(m,0):my|=M),Kt(m,g)}function j_(m,g){g===0&&(m.mode&1?(g=Sf,Sf<<=1,!(Sf&130023424)&&(Sf=4194304)):g=1);var M=Zi();m=Kf(m,g),m!==null&&(Ef(m,g,M),Kt(m,M))}function Au(m){var g=m.memoizedState,M=0;g!==null&&(M=g.retryLane),j_(m,M)}function q_(m,g){var M=0;switch(m.tag){case 13:var R=m.stateNode,I=m.memoizedState;I!==null&&(M=I.retryLane);break;case 19:R=m.stateNode;break;default:throw Error(a(314))}R!==null&&R.delete(g),j_(m,M)}var Sy;Sy=function(m,g,M){if(m!==null)if(m.memoizedProps!==g.pendingProps||Ar.current)ia=!0;else{if(!(m.lanes&M)&&!(g.flags&128))return ia=!1,IA(m,g,M);ia=!!(m.flags&131072)}else ia=!1,gr&&g.flags&1048576&&u_(g,ph,g.index);switch(g.lanes=0,g.tag){case 2:var R=g.type;m!==null&&(m.alternate=null,g.alternate=null,g.flags|=2),m=g.pendingProps;var I=Fo(g,Nn.current);dc(g,M),I=Gn(null,g,R,m,I,M);var V=Kv();return g.flags|=1,typeof I=="object"&&I!==null&&typeof I.render=="function"&&I.$$typeof===void 0?(g.tag=1,g.memoizedState=null,g.updateQueue=null,Ei(R)?(V=!0,Mi(g)):V=!1,g.memoizedState=I.state!==null&&I.state!==void 0?I.state:null,Wv(g),I.updater=Mm,g.stateNode=I,I._reactInternals=g,Af(g,R,m,M),g=ry(null,g,R,!0,V,M)):(g.tag=0,gr&&V&&Cm(g),Hr(null,g,I,M),g=g.child),g;case 16:R=g.elementType;e:{switch(m!==null&&(m.alternate=null,g.alternate=null,g.flags|=2),m=g.pendingProps,I=R._init,R=I(R._payload),g.type=R,I=g.tag=X_(R),m=Ii(R,m),I){case 0:g=fs(null,g,R,m,M);break e;case 1:g=P_(null,g,R,m,M);break e;case 11:g=C_(null,g,R,m,M);break e;case 14:g=A_(null,g,R,Ii(R.type,m),M);break e}throw Error(a(306,R,""))}return g;case 0:return R=g.type,I=g.pendingProps,I=g.elementType===R?I:Ii(R,I),fs(m,g,R,I,M);case 1:return R=g.type,I=g.pendingProps,I=g.elementType===R?I:Ii(R,I),P_(m,g,R,I,M);case 3:e:{if(N_(g),m===null)throw Error(a(387));R=g.pendingProps,V=g.memoizedState,I=V.element,Gv(m,g),as(g,R,null,M);var fe=g.memoizedState;if(R=fe.element,De&&V.isDehydrated)if(V={element:R,isDehydrated:!1,cache:fe.cache,transitions:fe.transitions},g.updateQueue.baseState=V,g.memoizedState=V,g.flags&256){I=Error(a(423)),g=O_(m,g,R,M,I);break e}else if(R!==I){I=Error(a(424)),g=O_(m,g,R,M,I);break e}else for(De&&(Li=Io(g.stateNode.containerInfo),yo=g,gr=!0,us=null,Df=!1),M=h_(g,null,R,M),g.child=M;M;)M.flags=M.flags&-3|4096,M=M.sibling;else{if(Rf(),R===I){g=vi(m,g,M);break e}Hr(m,g,R,M)}g=g.child}return g;case 5:return p_(g),m===null&&Xv(g),R=g.type,I=g.pendingProps,V=m!==null?m.memoizedProps:null,fe=I.children,Re(R,I)?fe=null:V!==null&&Re(R,V)&&(g.flags|=32),R_(m,g),Hr(m,g,fe,M),g.child;case 6:return m===null&&Xv(g),null;case 13:return I_(m,g,M);case 4:return Yv(g,g.stateNode.containerInfo),R=g.pendingProps,m===null?g.child=Nf(g,null,R,M):Hr(m,g,R,M),g.child;case 11:return R=g.type,I=g.pendingProps,I=g.elementType===R?I:Ii(R,I),C_(m,g,R,I,M);case 7:return Hr(m,g,g.pendingProps,M),g.child;case 8:return Hr(m,g,g.pendingProps.children,M),g.child;case 12:return Hr(m,g,g.pendingProps.children,M),g.child;case 10:e:{if(R=g.type._context,I=g.pendingProps,V=g.memoizedProps,fe=I.value,Vv(g,R,fe),V!==null)if(js(V.value,fe)){if(V.children===I.children&&!Ar.current){g=vi(m,g,M);break e}}else for(V=g.child,V!==null&&(V.return=g);V!==null;){var Me=V.dependencies;if(Me!==null){fe=V.child;for(var qe=Me.firstContext;qe!==null;){if(qe.context===R){if(V.tag===1){qe=qi(-1,M&-M),qe.tag=2;var dt=V.updateQueue;if(dt!==null){dt=dt.shared;var Nt=dt.pending;Nt===null?qe.next=qe:(qe.next=Nt.next,Nt.next=qe),dt.pending=qe}}V.lanes|=M,qe=V.alternate,qe!==null&&(qe.lanes|=M),Sm(V.return,M,g),Me.lanes|=M;break}qe=qe.next}}else if(V.tag===10)fe=V.type===g.type?null:V.child;else if(V.tag===18){if(fe=V.return,fe===null)throw Error(a(341));fe.lanes|=M,Me=fe.alternate,Me!==null&&(Me.lanes|=M),Sm(fe,M,g),fe=V.sibling}else fe=V.child;if(fe!==null)fe.return=V;else for(fe=V;fe!==null;){if(fe===g){fe=null;break}if(V=fe.sibling,V!==null){V.return=fe.return,fe=V;break}fe=fe.return}V=fe}Hr(m,g,I.children,M),g=g.child}return g;case 9:return I=g.type,R=g.pendingProps.children,dc(g,M),I=_r(I),R=R(I),g.flags|=1,Hr(m,g,R,M),g.child;case 14:return R=g.type,I=Ii(R,g.pendingProps),I=Ii(R.type,I),A_(m,g,R,I,M);case 15:return T_(m,g,g.type,g.pendingProps,M);case 17:return R=g.type,I=g.pendingProps,I=g.elementType===R?I:Ii(R,I),m!==null&&(m.alternate=null,g.alternate=null,g.flags|=2),g.tag=1,Ei(R)?(m=!0,Mi(g)):m=!1,dc(g,M),l_(g,R,I),Af(g,R,I,M),ry(null,g,R,!0,m,M);case 19:return k_(m,g,M);case 22:return D_(m,g,M)}throw Error(a(156,g.tag))};function Gm(m,g){return vm(m,g)}function UA(m,g,M,R){this.tag=m,this.key=M,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=g,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=R,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Na(m,g,M,R){return new UA(m,g,M,R)}function Ey(m){return m=m.prototype,!(!m||!m.isReactComponent)}function X_(m){if(typeof m=="function")return Ey(m)?1:0;if(m!=null){if(m=m.$$typeof,m===x)return 11;if(m===S)return 14}return 2}function Fl(m,g){var M=m.alternate;return M===null?(M=Na(m.tag,g,m.key,m.mode),M.elementType=m.elementType,M.type=m.type,M.stateNode=m.stateNode,M.alternate=m,m.alternate=M):(M.pendingProps=g,M.type=m.type,M.flags=0,M.subtreeFlags=0,M.deletions=null),M.flags=m.flags&14680064,M.childLanes=m.childLanes,M.lanes=m.lanes,M.child=m.child,M.memoizedProps=m.memoizedProps,M.memoizedState=m.memoizedState,M.updateQueue=m.updateQueue,g=m.dependencies,M.dependencies=g===null?null:{lanes:g.lanes,firstContext:g.firstContext},M.sibling=m.sibling,M.index=m.index,M.ref=m.ref,M}function jm(m,g,M,R,I,V){var fe=2;if(R=m,typeof m=="function")Ey(m)&&(fe=1);else if(typeof m=="string")fe=5;else e:switch(m){case c:return Tu(M.children,I,V,g);case f:fe=8,I|=8;break;case d:return m=Na(12,M,g,I|2),m.elementType=d,m.lanes=V,m;case _:return m=Na(13,M,g,I),m.elementType=_,m.lanes=V,m;case v:return m=Na(19,M,g,I),m.elementType=v,m.lanes=V,m;case E:return Bh(M,I,V,g);default:if(typeof m=="object"&&m!==null)switch(m.$$typeof){case p:fe=10;break e;case y:fe=9;break e;case x:fe=11;break e;case S:fe=14;break e;case w:fe=16,R=null;break e}throw Error(a(130,m==null?m:typeof m,""))}return g=Na(fe,M,g,I),g.elementType=m,g.type=R,g.lanes=V,g}function Tu(m,g,M,R){return m=Na(7,m,R,g),m.lanes=M,m}function Bh(m,g,M,R){return m=Na(22,m,R,g),m.elementType=E,m.lanes=M,m.stateNode={},m}function eo(m,g,M){return m=Na(6,m,null,g),m.lanes=M,m}function Oa(m,g,M){return g=Na(4,m.children!==null?m.children:[],m.key,g),g.lanes=M,g.stateNode={containerInfo:m.containerInfo,pendingChildren:null,implementation:m.implementation},g}function zA(m,g,M,R,I){this.tag=g,this.containerInfo=m,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Qe,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=gm(0),this.expirationTimes=gm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gm(0),this.identifierPrefix=R,this.onRecoverableError=I,De&&(this.mutableSourceEagerHydrationData=null)}function Y_(m,g,M,R,I,V,fe,Me,qe){return m=new zA(m,g,M,Me,qe),g===1?(g=1,V===!0&&(g|=8)):g=0,V=Na(3,null,null,g),m.current=V,V.stateNode=m,V.memoizedState={element:R,isDehydrated:M,cache:null,transitions:null},Wv(V),m}function Uh(m){if(!m)return Da;m=m._reactInternals;e:{if(P(m)!==m||m.tag!==1)throw Error(a(170));var g=m;do{switch(g.tag){case 3:g=g.stateNode.context;break e;case 1:if(Ei(g.type)){g=g.stateNode.__reactInternalMemoizedMergedChildContext;break e}}g=g.return}while(g!==null);throw Error(a(171))}if(m.tag===1){var M=m.type;if(Ei(M))return cc(m,M,g)}return g}function Sc(m){var g=m._reactInternals;if(g===void 0)throw typeof m.render=="function"?Error(a(188)):(m=Object.keys(m).join(","),Error(a(268,m)));return m=G(g),m===null?null:m.stateNode}function My(m,g){if(m=m.memoizedState,m!==null&&m.dehydrated!==null){var M=m.retryLane;m.retryLane=M!==0&&M=dt&&V>=pn&&I<=Nt&&fe<=Gt){m.splice(g,1);break}else if(R!==dt||M.width!==qe.width||Gtfe){if(!(V!==pn||M.height!==qe.height||NtI)){dt>R&&(qe.width+=dt-R,qe.x=R),NtV&&(qe.height+=pn-V,qe.y=V),GtM&&(M=fe)),feIh&&(g.flags|=128,R=!0,Ki(I,!1),g.lanes=4194304)}else{if(!R)if(m=Ke(V),m!==null){if(g.flags|=128,R=!0,m=m.updateQueue,m!==null&&(g.updateQueue=m,g.flags|=4),Ki(I,!0),I.tail===null&&I.tailMode==="hidden"&&!V.alternate&&!gr)return Jt(g),null}else 2*Ci()-I.renderingStartTime>Ih&&M!==1073741824&&(g.flags|=128,R=!0,Ki(I,!1),g.lanes=4194304);I.isBackwards?(V.sibling=g.child,g.child=V):(m=I.last,m!==null?m.sibling=V:g.child=V,I.last=V)}return I.tail!==null?(g=I.tail,I.rendering=g,I.tail=g.sibling,I.renderingStartTime=Ci(),g.sibling=null,m=xe.current,It(xe,R?m&1|2:m&1),g):(Jt(g),null);case 22:case 23:return _y(),R=g.memoizedState!==null,m!==null&&m.memoizedState!==null!==R&&(g.flags|=8192),R&&g.mode&1?sa&1073741824&&(Jt(g),Xe&&g.subtreeFlags&6&&(g.flags|=8192)):Jt(g),null;case 24:return null;case 25:return null}throw Error(a(156,g.tag))}var IA=s.ReactCurrentOwner,ia=!1;function Hr(m,g,M,R){g.child=m===null?p_(g,null,M,R):Nf(g,m.child,M,R)}function A_(m,g,M,R,I){M=M.render;var V=g.ref;return dc(g,I),R=Gn(m,g,M,R,V,I),M=Qv(),m!==null&&!ia?(g.updateQueue=m.updateQueue,g.flags&=-2053,m.lanes&=~I,vi(m,g,I)):(gr&&M&&Am(g),g.flags|=1,Hr(m,g,R,I),g.child)}function T_(m,g,M,R,I){if(m===null){var V=M.type;return typeof V=="function"&&!Ay(V)&&V.defaultProps===void 0&&M.compare===null&&M.defaultProps===void 0?(g.tag=15,g.type=V,D_(m,g,V,R,I)):(m=qm(M.type,null,R,g,g.mode,I),m.ref=g.ref,m.return=g,g.child=m)}if(V=m.child,!(m.lanes&I)){var fe=V.memoizedProps;if(M=M.compare,M=M!==null?M:ei,M(fe,R)&&m.ref===g.ref)return vi(m,g,I)}return g.flags|=1,m=Fl(V,R),m.ref=g.ref,m.return=g,g.child=m}function D_(m,g,M,R,I){if(m!==null&&ei(m.memoizedProps,R)&&m.ref===g.ref)if(ia=!1,(m.lanes&I)!==0)m.flags&131072&&(ia=!0);else return g.lanes=m.lanes,vi(m,g,I);return fs(m,g,M,R,I)}function R_(m,g,M){var R=g.pendingProps,I=R.children,V=m!==null?m.memoizedState:null;if(R.mode==="hidden")if(!(g.mode&1))g.memoizedState={baseLanes:0,cachePool:null},It(Gf,sa),sa|=M;else if(M&1073741824)g.memoizedState={baseLanes:0,cachePool:null},R=V!==null?V.baseLanes:M,It(Gf,sa),sa|=R;else return m=V!==null?V.baseLanes|M:M,g.lanes=g.childLanes=1073741824,g.memoizedState={baseLanes:m,cachePool:null},g.updateQueue=null,It(Gf,sa),sa|=m,null;else V!==null?(R=V.baseLanes|M,g.memoizedState=null):R=M,It(Gf,sa),sa|=R;return Hr(m,g,I,M),g.child}function P_(m,g){var M=g.ref;(m===null&&M!==null||m!==null&&m.ref!==M)&&(g.flags|=512,g.flags|=2097152)}function fs(m,g,M,R,I){var V=Ei(M)?rs:Pn.current;return V=Fo(g,V),dc(g,I),M=Gn(m,g,M,R,V,I),R=Qv(),m!==null&&!ia?(g.updateQueue=m.updateQueue,g.flags&=-2053,m.lanes&=~I,vi(m,g,I)):(gr&&R&&Am(g),g.flags|=1,Hr(m,g,M,I),g.child)}function N_(m,g,M,R,I){if(Ei(M)){var V=!0;Mi(g)}else V=!1;if(dc(g,I),g.stateNode===null)m!==null&&(m.alternate=null,g.alternate=null,g.flags|=2),u_(g,M,R),Af(g,M,R,I),R=!0;else if(m===null){var fe=g.stateNode,Me=g.memoizedProps;fe.props=Me;var qe=fe.context,dt=M.contextType;typeof dt=="object"&&dt!==null?dt=_r(dt):(dt=Ei(M)?rs:Pn.current,dt=Fo(g,dt));var Nt=M.getDerivedStateFromProps,hn=typeof Nt=="function"||typeof fe.getSnapshotBeforeUpdate=="function";hn||typeof fe.UNSAFE_componentWillReceiveProps!="function"&&typeof fe.componentWillReceiveProps!="function"||(Me!==R||qe!==dt)&&Yv(g,fe,R,dt),pi=!1;var jt=g.memoizedState;fe.state=jt,as(g,R,fe,I),qe=g.memoizedState,Me!==R||jt!==qe||Ar.current||pi?(typeof Nt=="function"&&(hh(g,M,Nt,R),qe=g.memoizedState),(Me=pi||l_(g,M,Me,R,jt,qe,dt))?(hn||typeof fe.UNSAFE_componentWillMount!="function"&&typeof fe.componentWillMount!="function"||(typeof fe.componentWillMount=="function"&&fe.componentWillMount(),typeof fe.UNSAFE_componentWillMount=="function"&&fe.UNSAFE_componentWillMount()),typeof fe.componentDidMount=="function"&&(g.flags|=4194308)):(typeof fe.componentDidMount=="function"&&(g.flags|=4194308),g.memoizedProps=R,g.memoizedState=qe),fe.props=R,fe.state=qe,fe.context=dt,R=Me):(typeof fe.componentDidMount=="function"&&(g.flags|=4194308),R=!1)}else{fe=g.stateNode,Xv(m,g),Me=g.memoizedProps,dt=g.type===g.elementType?Me:Ii(g.type,Me),fe.props=dt,hn=g.pendingProps,jt=fe.context,qe=M.contextType,typeof qe=="object"&&qe!==null?qe=_r(qe):(qe=Ei(M)?rs:Pn.current,qe=Fo(g,qe));var nr=M.getDerivedStateFromProps;(Nt=typeof nr=="function"||typeof fe.getSnapshotBeforeUpdate=="function")||typeof fe.UNSAFE_componentWillReceiveProps!="function"&&typeof fe.componentWillReceiveProps!="function"||(Me!==hn||jt!==qe)&&Yv(g,fe,R,qe),pi=!1,jt=g.memoizedState,fe.state=jt,as(g,R,fe,I);var kt=g.memoizedState;Me!==hn||jt!==kt||Ar.current||pi?(typeof nr=="function"&&(hh(g,M,nr,R),kt=g.memoizedState),(dt=pi||l_(g,M,dt,R,jt,kt,qe)||!1)?(Nt||typeof fe.UNSAFE_componentWillUpdate!="function"&&typeof fe.componentWillUpdate!="function"||(typeof fe.componentWillUpdate=="function"&&fe.componentWillUpdate(R,kt,qe),typeof fe.UNSAFE_componentWillUpdate=="function"&&fe.UNSAFE_componentWillUpdate(R,kt,qe)),typeof fe.componentDidUpdate=="function"&&(g.flags|=4),typeof fe.getSnapshotBeforeUpdate=="function"&&(g.flags|=1024)):(typeof fe.componentDidUpdate!="function"||Me===m.memoizedProps&&jt===m.memoizedState||(g.flags|=4),typeof fe.getSnapshotBeforeUpdate!="function"||Me===m.memoizedProps&&jt===m.memoizedState||(g.flags|=1024),g.memoizedProps=R,g.memoizedState=kt),fe.props=R,fe.state=kt,fe.context=qe,R=dt):(typeof fe.componentDidUpdate!="function"||Me===m.memoizedProps&&jt===m.memoizedState||(g.flags|=4),typeof fe.getSnapshotBeforeUpdate!="function"||Me===m.memoizedProps&&jt===m.memoizedState||(g.flags|=1024),R=!1)}return ay(m,g,M,R,V,I)}function ay(m,g,M,R,I,V){P_(m,g);var fe=(g.flags&128)!==0;if(!R&&!fe)return I&&fc(g,M,!1),vi(m,g,V);R=g.stateNode,IA.current=g;var Me=fe&&typeof M.getDerivedStateFromError!="function"?null:R.render();return g.flags|=1,m!==null&&fe?(g.child=Nf(g,m.child,null,V),g.child=Nf(g,null,Me,V)):Hr(m,g,Me,V),g.memoizedState=R.state,I&&fc(g,M,!0),g.child}function O_(m){var g=m.stateNode;g.pendingContext?na(m,g.pendingContext,g.pendingContext!==g.context):g.context&&na(m,g.context,!1),Jv(m,g.containerInfo)}function I_(m,g,M,R,I){return Rf(),vh(I),g.flags|=256,Hr(m,g,M,R),g.child}var Nm={dehydrated:null,treeContext:null,retryLane:0};function Ra(m){return{baseLanes:m,cachePool:null}}function F_(m,g,M){var R=g.pendingProps,I=xe.current,V=!1,fe=(g.flags&128)!==0,Me;if((Me=fe)||(Me=m!==null&&m.memoizedState===null?!1:(I&2)!==0),Me?(V=!0,g.flags&=-129):(m===null||m.memoizedState!==null)&&(I|=1),It(xe,I&1),m===null)return Zv(g),m=g.memoizedState,m!==null&&(m=m.dehydrated,m!==null)?(g.mode&1?Ta(m)?g.lanes=8:g.lanes=1073741824:g.lanes=1,null):(I=R.children,m=R.fallback,V?(R=g.mode,V=g.child,I={mode:"hidden",children:I},!(R&1)&&V!==null?(V.childLanes=0,V.pendingProps=I):V=Uh(I,R,0,null),m=Au(m,R,M,null),V.return=g,m.return=g,V.sibling=m,g.child=V,g.child.memoizedState=Ra(M),g.memoizedState=Nm,m):sy(g,I));if(I=m.memoizedState,I!==null){if(Me=I.dehydrated,Me!==null){if(fe)return g.flags&256?(g.flags&=-257,Om(m,g,M,Error(a(422)))):g.memoizedState!==null?(g.child=m.child,g.flags|=128,null):(V=R.fallback,I=g.mode,R=Uh({mode:"visible",children:R.children},I,0,null),V=Au(V,I,M,null),V.flags|=2,R.return=g,V.return=g,R.sibling=V,g.child=R,g.mode&1&&Nf(g,m.child,null,M),g.child.memoizedState=Ra(M),g.memoizedState=Nm,V);if(!(g.mode&1))g=Om(m,g,M,null);else if(Ta(Me))g=Om(m,g,M,Error(a(419)));else if(R=(M&m.childLanes)!==0,ia||R){if(R=ti,R!==null){switch(M&-M){case 4:V=2;break;case 16:V=8;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:V=32;break;case 536870912:V=268435456;break;default:V=0}R=V&(R.suspendedLanes|M)?0:V,R!==0&&R!==I.retryLane&&(I.retryLane=R,Pa(m,R,-1))}Wm(),g=Om(m,g,M,Error(a(421)))}else Aa(Me)?(g.flags|=128,g.child=m.child,g=Cu.bind(null,m),ns(Me,g),g=null):(M=I.treeContext,De&&(Li=ta(Me),xo=g,gr=!0,us=null,Df=!1,M!==null&&(ko[Bo++]=Dl,ko[Bo++]=ls,ko[Bo++]=hu,Dl=M.id,ls=M.overflow,hu=g)),g=sy(g,g.pendingProps.children),g.flags|=4096);return g}return V?(R=k_(m,g,R.children,R.fallback,M),V=g.child,I=m.child.memoizedState,V.memoizedState=I===null?Ra(M):{baseLanes:I.baseLanes|M,cachePool:null},V.childLanes=m.childLanes&~M,g.memoizedState=Nm,R):(M=L_(m,g,R.children,M),g.memoizedState=null,M)}return V?(R=k_(m,g,R.children,R.fallback,M),V=g.child,I=m.child.memoizedState,V.memoizedState=I===null?Ra(M):{baseLanes:I.baseLanes|M,cachePool:null},V.childLanes=m.childLanes&~M,g.memoizedState=Nm,R):(M=L_(m,g,R.children,M),g.memoizedState=null,M)}function sy(m,g){return g=Uh({mode:"visible",children:g},m.mode,0,null),g.return=m,m.child=g}function L_(m,g,M,R){var I=m.child;return m=I.sibling,M=Fl(I,{mode:"visible",children:M}),!(g.mode&1)&&(M.lanes=R),M.return=g,M.sibling=null,m!==null&&(R=g.deletions,R===null?(g.deletions=[m],g.flags|=16):R.push(m)),g.child=M}function k_(m,g,M,R,I){var V=g.mode;m=m.child;var fe=m.sibling,Me={mode:"hidden",children:M};return!(V&1)&&g.child!==m?(M=g.child,M.childLanes=0,M.pendingProps=Me,g.deletions=null):(M=Fl(m,Me),M.subtreeFlags=m.subtreeFlags&14680064),fe!==null?R=Fl(fe,R):(R=Au(R,V,I,null),R.flags|=2),R.return=g,M.return=g,M.sibling=R,g.child=M,R}function Om(m,g,M,R){return R!==null&&vh(R),Nf(g,m.child,null,M),m=sy(g,g.pendingProps.children),m.flags|=2,g.memoizedState=null,m}function yu(m,g,M){m.lanes|=g;var R=m.alternate;R!==null&&(R.lanes|=g),Em(m.return,g,M)}function ly(m,g,M,R,I){var V=m.memoizedState;V===null?m.memoizedState={isBackwards:g,rendering:null,renderingStartTime:0,last:R,tail:M,tailMode:I}:(V.isBackwards=g,V.rendering=null,V.renderingStartTime=0,V.last=R,V.tail=M,V.tailMode=I)}function B_(m,g,M){var R=g.pendingProps,I=R.revealOrder,V=R.tail;if(Hr(m,g,R.children,M),R=xe.current,R&2)R=R&1|2,g.flags|=128;else{if(m!==null&&m.flags&128)e:for(m=g.child;m!==null;){if(m.tag===13)m.memoizedState!==null&&yu(m,M,g);else if(m.tag===19)yu(m,M,g);else if(m.child!==null){m.child.return=m,m=m.child;continue}if(m===g)break e;for(;m.sibling===null;){if(m.return===null||m.return===g)break e;m=m.return}m.sibling.return=m.return,m=m.sibling}R&=1}if(It(xe,R),!(g.mode&1))g.memoizedState=null;else switch(I){case"forwards":for(M=g.child,I=null;M!==null;)m=M.alternate,m!==null&&Ke(m)===null&&(I=M),M=M.sibling;M=I,M===null?(I=g.child,g.child=null):(I=M.sibling,M.sibling=null),ly(g,!1,I,M,V);break;case"backwards":for(M=null,I=g.child,g.child=null;I!==null;){if(m=I.alternate,m!==null&&Ke(m)===null){g.child=I;break}m=I.sibling,I.sibling=M,M=I,I=m}ly(g,!0,M,null,V);break;case"together":ly(g,!1,null,null,void 0);break;default:g.memoizedState=null}return g.child}function vi(m,g,M){if(m!==null&&(g.dependencies=m.dependencies),qf|=g.lanes,!(M&g.childLanes))return null;if(m!==null&&g.child!==m.child)throw Error(a(153));if(g.child!==null){for(m=g.child,M=Fl(m,m.pendingProps),g.child=M,M.return=g;m.sibling!==null;)m=m.sibling,M=M.sibling=Fl(m,m.pendingProps),M.return=g;M.sibling=null}return g.child}function FA(m,g,M){switch(g.tag){case 3:O_(g),Rf();break;case 5:m_(g);break;case 1:Ei(g.type)&&Mi(g);break;case 4:Jv(g,g.stateNode.containerInfo);break;case 10:jv(g,g.type._context,g.memoizedProps.value);break;case 13:var R=g.memoizedState;if(R!==null)return R.dehydrated!==null?(It(xe,xe.current&1),g.flags|=128,null):M&g.child.childLanes?F_(m,g,M):(It(xe,xe.current&1),m=vi(m,g,M),m!==null?m.sibling:null);It(xe,xe.current&1);break;case 19:if(R=(M&g.childLanes)!==0,m.flags&128){if(R)return B_(m,g,M);g.flags|=128}var I=g.memoizedState;if(I!==null&&(I.rendering=null,I.tail=null,I.lastEffect=null),It(xe,xe.current),R)break;return null;case 22:case 23:return g.lanes=0,R_(m,g,M)}return vi(m,g,M)}function LA(m,g){switch(yo(g),g.tag){case 1:return Ei(g.type)&&$r(),m=g.flags,m&65536?(g.flags=m&-65537|128,g):null;case 3:return Ff(),sn(Ar),sn(Pn),Rt(),m=g.flags,m&65536&&!(m&128)?(g.flags=m&-65537|128,g):null;case 5:return pu(g),null;case 13:if(sn(xe),m=g.memoizedState,m!==null&&m.dehydrated!==null){if(g.alternate===null)throw Error(a(340));Rf()}return m=g.flags,m&65536?(g.flags=m&-65537|128,g):null;case 19:return sn(xe),null;case 4:return Ff(),null;case 10:return Sm(g.type._context),null;case 22:case 23:return _y(),null;case 24:return null;default:return null}}var Im=!1,yc=!1,kA=typeof WeakSet=="function"?WeakSet:Set,Et=null;function Rh(m,g){var M=m.ref;if(M!==null)if(typeof M=="function")try{M(null)}catch(R){eo(m,g,R)}else M.current=null}function uy(m,g,M){try{M()}catch(R){eo(m,g,R)}}var U_=!1;function cy(m,g){for(U(m.containerInfo),Et=g;Et!==null;)if(m=Et,g=m.child,(m.subtreeFlags&1028)!==0&&g!==null)g.return=m,Et=g;else for(;Et!==null;){m=Et;try{var M=m.alternate;if(m.flags&1024)switch(m.tag){case 0:case 11:case 15:break;case 1:if(M!==null){var R=M.memoizedProps,I=M.memoizedState,V=m.stateNode,fe=V.getSnapshotBeforeUpdate(m.elementType===m.type?R:Ii(m.type,R),I);V.__reactInternalSnapshotBeforeUpdate=fe}break;case 3:Xe&>(m.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(Me){eo(m,m.return,Me)}if(g=m.sibling,g!==null){g.return=m.return,Et=g;break}Et=m.return}return M=U_,U_=!1,M}function ds(m,g,M){var R=g.updateQueue;if(R=R!==null?R.lastEffect:null,R!==null){var I=R=R.next;do{if((I.tag&m)===m){var V=I.destroy;I.destroy=void 0,V!==void 0&&uy(g,M,V)}I=I.next}while(I!==R)}}function xu(m,g){if(g=g.updateQueue,g=g!==null?g.lastEffect:null,g!==null){var M=g=g.next;do{if((M.tag&m)===m){var R=M.create;M.destroy=R()}M=M.next}while(M!==g)}}function fy(m){var g=m.ref;if(g!==null){var M=m.stateNode;switch(m.tag){case 5:m=Y(M);break;default:m=M}typeof g=="function"?g(m):g.current=m}}function dy(m,g,M){if(Gs&&typeof Gs.onCommitFiberUnmount=="function")try{Gs.onCommitFiberUnmount(xm,g)}catch{}switch(g.tag){case 0:case 11:case 14:case 15:if(m=g.updateQueue,m!==null&&(m=m.lastEffect,m!==null)){var R=m=m.next;do{var I=R,V=I.destroy;I=I.tag,V!==void 0&&(I&2||I&4)&&uy(g,M,V),R=R.next}while(R!==m)}break;case 1:if(Rh(g,M),m=g.stateNode,typeof m.componentWillUnmount=="function")try{m.props=g.memoizedProps,m.state=g.memoizedState,m.componentWillUnmount()}catch(fe){eo(g,M,fe)}break;case 5:Rh(g,M);break;case 4:Xe?py(m,g,M):ue&&ue&&(g=g.stateNode.containerInfo,M=Ye(g),bn(g,M))}}function z_(m,g,M){for(var R=g;;)if(dy(m,R,M),R.child===null||Xe&&R.tag===4){if(R===g)break;for(;R.sibling===null;){if(R.return===null||R.return===g)return;R=R.return}R.sibling.return=R.return,R=R.sibling}else R.child.return=R,R=R.child}function Qs(m){var g=m.alternate;g!==null&&(m.alternate=null,Qs(g)),m.child=null,m.deletions=null,m.sibling=null,m.tag===5&&(g=m.stateNode,g!==null&&me(g)),m.stateNode=null,m.return=null,m.dependencies=null,m.memoizedProps=null,m.memoizedState=null,m.pendingProps=null,m.stateNode=null,m.updateQueue=null}function Fm(m){return m.tag===5||m.tag===3||m.tag===4}function bu(m){e:for(;;){for(;m.sibling===null;){if(m.return===null||Fm(m.return))return null;m=m.return}for(m.sibling.return=m.return,m=m.sibling;m.tag!==5&&m.tag!==6&&m.tag!==18;){if(m.flags&2||m.child===null||m.tag===4)continue e;m.child.return=m,m=m.child}if(!(m.flags&2))return m.stateNode}}function oa(m){if(Xe){e:{for(var g=m.return;g!==null;){if(Fm(g))break e;g=g.return}throw Error(a(160))}var M=g;switch(M.tag){case 5:g=M.stateNode,M.flags&32&&(wt(g),M.flags&=-33),M=bu(m),Lm(m,M,g);break;case 3:case 4:g=M.stateNode.containerInfo,M=bu(m),hy(m,M,g);break;default:throw Error(a(161))}}}function hy(m,g,M){var R=m.tag;if(R===5||R===6)m=m.stateNode,g?Le(M,m,g):ve(M,m);else if(R!==4&&(m=m.child,m!==null))for(hy(m,g,M),m=m.sibling;m!==null;)hy(m,g,M),m=m.sibling}function Lm(m,g,M){var R=m.tag;if(R===5||R===6)m=m.stateNode,g?je(M,m,g):de(M,m);else if(R!==4&&(m=m.child,m!==null))for(Lm(m,g,M),m=m.sibling;m!==null;)Lm(m,g,M),m=m.sibling}function py(m,g,M){for(var R=g,I=!1,V,fe;;){if(!I){I=R.return;e:for(;;){if(I===null)throw Error(a(160));switch(V=I.stateNode,I.tag){case 5:fe=!1;break e;case 3:V=V.containerInfo,fe=!0;break e;case 4:V=V.containerInfo,fe=!0;break e}I=I.return}I=!0}if(R.tag===5||R.tag===6)z_(m,R,M),fe?bt(V,R.stateNode):_t(V,R.stateNode);else if(R.tag===18)fe?ze(V,R.stateNode):ke(V,R.stateNode);else if(R.tag===4){if(R.child!==null){V=R.stateNode.containerInfo,fe=!0,R.child.return=R,R=R.child;continue}}else if(dy(m,R,M),R.child!==null){R.child.return=R,R=R.child;continue}if(R===g)break;for(;R.sibling===null;){if(R.return===null||R.return===g)return;R=R.return,R.tag===4&&(I=!1)}R.sibling.return=R.return,R=R.sibling}}function xc(m,g){if(Xe){switch(g.tag){case 0:case 11:case 14:case 15:ds(3,g,g.return),xu(3,g),ds(5,g,g.return);return;case 1:return;case 5:var M=g.stateNode;if(M!=null){var R=g.memoizedProps;m=m!==null?m.memoizedProps:R;var I=g.type,V=g.updateQueue;g.updateQueue=null,V!==null&&Be(M,V,I,m,R,g)}return;case 6:if(g.stateNode===null)throw Error(a(162));M=g.memoizedProps,Se(g.stateNode,m!==null?m.memoizedProps:M,M);return;case 3:De&&m!==null&&m.memoizedState.isDehydrated&&_e(g.stateNode.containerInfo);return;case 12:return;case 13:hs(g);return;case 19:hs(g);return;case 17:return}throw Error(a(163))}switch(g.tag){case 0:case 11:case 14:case 15:ds(3,g,g.return),xu(3,g),ds(5,g,g.return);return;case 12:return;case 13:hs(g);return;case 19:hs(g);return;case 3:De&&m!==null&&m.memoizedState.isDehydrated&&_e(g.stateNode.containerInfo);break;case 22:case 23:return}e:if(ue){switch(g.tag){case 1:case 5:case 6:break e;case 3:case 4:g=g.stateNode,bn(g.containerInfo,g.pendingChildren);break e}throw Error(a(163))}}function hs(m){var g=m.updateQueue;if(g!==null){m.updateQueue=null;var M=m.stateNode;M===null&&(M=m.stateNode=new kA),g.forEach(function(R){var I=X_.bind(null,m,R);M.has(R)||(M.add(R),R.then(I,I))})}}function $_(m,g){for(Et=g;Et!==null;){g=Et;var M=g.deletions;if(M!==null)for(var R=0;R";case Nh:return":has("+(Oh(m)||"")+")";case aa:return'[role="'+m.value+'"]';case bc:return'"'+m.value+'"';case Vf:return'[data-testname="'+m.value+'"]';default:throw Error(a(365))}}function V_(m,g){var M=[];m=[m,0];for(var R=0;RI&&(I=fe),R&=~V}if(R=I,R=Ci()-R,R=(120>R?120:480>R?480:1080>R?1080:1920>R?1920:3e3>R?3e3:4320>R?4320:1960*UA(R/1960))-R,10m?16:m,Il===null)var R=!1;else{if(m=Il,Il=null,Lh=0,En&6)throw Error(a(331));var I=En;for(En|=4,Et=m.current;Et!==null;){var V=Et,fe=V.child;if(Et.flags&16){var Me=V.deletions;if(Me!==null){for(var qe=0;qeCi()-xy?tl(m,0):yy|=M),Kt(m,g)}function q_(m,g){g===0&&(m.mode&1?(g=Sf,Sf<<=1,!(Sf&130023424)&&(Sf=4194304)):g=1);var M=Ji();m=Kf(m,g),m!==null&&(Ef(m,g,M),Kt(m,M))}function Cu(m){var g=m.memoizedState,M=0;g!==null&&(M=g.retryLane),q_(m,M)}function X_(m,g){var M=0;switch(m.tag){case 13:var R=m.stateNode,I=m.memoizedState;I!==null&&(M=I.retryLane);break;case 19:R=m.stateNode;break;default:throw Error(a(314))}R!==null&&R.delete(g),q_(m,M)}var Cy;Cy=function(m,g,M){if(m!==null)if(m.memoizedProps!==g.pendingProps||Ar.current)ia=!0;else{if(!(m.lanes&M)&&!(g.flags&128))return ia=!1,FA(m,g,M);ia=!!(m.flags&131072)}else ia=!1,gr&&g.flags&1048576&&c_(g,mh,g.index);switch(g.lanes=0,g.tag){case 2:var R=g.type;m!==null&&(m.alternate=null,g.alternate=null,g.flags|=2),m=g.pendingProps;var I=Fo(g,Pn.current);dc(g,M),I=Gn(null,g,R,m,I,M);var V=Qv();return g.flags|=1,typeof I=="object"&&I!==null&&typeof I.render=="function"&&I.$$typeof===void 0?(g.tag=1,g.memoizedState=null,g.updateQueue=null,Ei(R)?(V=!0,Mi(g)):V=!1,g.memoizedState=I.state!==null&&I.state!==void 0?I.state:null,qv(g),I.updater=Cm,g.stateNode=I,I._reactInternals=g,Af(g,R,m,M),g=ay(null,g,R,!0,V,M)):(g.tag=0,gr&&V&&Am(g),Hr(null,g,I,M),g=g.child),g;case 16:R=g.elementType;e:{switch(m!==null&&(m.alternate=null,g.alternate=null,g.flags|=2),m=g.pendingProps,I=R._init,R=I(R._payload),g.type=R,I=g.tag=Y_(R),m=Ii(R,m),I){case 0:g=fs(null,g,R,m,M);break e;case 1:g=N_(null,g,R,m,M);break e;case 11:g=A_(null,g,R,m,M);break e;case 14:g=T_(null,g,R,Ii(R.type,m),M);break e}throw Error(a(306,R,""))}return g;case 0:return R=g.type,I=g.pendingProps,I=g.elementType===R?I:Ii(R,I),fs(m,g,R,I,M);case 1:return R=g.type,I=g.pendingProps,I=g.elementType===R?I:Ii(R,I),N_(m,g,R,I,M);case 3:e:{if(O_(g),m===null)throw Error(a(387));R=g.pendingProps,V=g.memoizedState,I=V.element,Xv(m,g),as(g,R,null,M);var fe=g.memoizedState;if(R=fe.element,De&&V.isDehydrated)if(V={element:R,isDehydrated:!1,cache:fe.cache,transitions:fe.transitions},g.updateQueue.baseState=V,g.memoizedState=V,g.flags&256){I=Error(a(423)),g=I_(m,g,R,M,I);break e}else if(R!==I){I=Error(a(424)),g=I_(m,g,R,M,I);break e}else for(De&&(Li=Io(g.stateNode.containerInfo),xo=g,gr=!0,us=null,Df=!1),M=p_(g,null,R,M),g.child=M;M;)M.flags=M.flags&-3|4096,M=M.sibling;else{if(Rf(),R===I){g=vi(m,g,M);break e}Hr(m,g,R,M)}g=g.child}return g;case 5:return m_(g),m===null&&Zv(g),R=g.type,I=g.pendingProps,V=m!==null?m.memoizedProps:null,fe=I.children,Re(R,I)?fe=null:V!==null&&Re(R,V)&&(g.flags|=32),P_(m,g),Hr(m,g,fe,M),g.child;case 6:return m===null&&Zv(g),null;case 13:return F_(m,g,M);case 4:return Jv(g,g.stateNode.containerInfo),R=g.pendingProps,m===null?g.child=Nf(g,null,R,M):Hr(m,g,R,M),g.child;case 11:return R=g.type,I=g.pendingProps,I=g.elementType===R?I:Ii(R,I),A_(m,g,R,I,M);case 7:return Hr(m,g,g.pendingProps,M),g.child;case 8:return Hr(m,g,g.pendingProps.children,M),g.child;case 12:return Hr(m,g,g.pendingProps.children,M),g.child;case 10:e:{if(R=g.type._context,I=g.pendingProps,V=g.memoizedProps,fe=I.value,jv(g,R,fe),V!==null)if(js(V.value,fe)){if(V.children===I.children&&!Ar.current){g=vi(m,g,M);break e}}else for(V=g.child,V!==null&&(V.return=g);V!==null;){var Me=V.dependencies;if(Me!==null){fe=V.child;for(var qe=Me.firstContext;qe!==null;){if(qe.context===R){if(V.tag===1){qe=Xi(-1,M&-M),qe.tag=2;var dt=V.updateQueue;if(dt!==null){dt=dt.shared;var Nt=dt.pending;Nt===null?qe.next=qe:(qe.next=Nt.next,Nt.next=qe),dt.pending=qe}}V.lanes|=M,qe=V.alternate,qe!==null&&(qe.lanes|=M),Em(V.return,M,g),Me.lanes|=M;break}qe=qe.next}}else if(V.tag===10)fe=V.type===g.type?null:V.child;else if(V.tag===18){if(fe=V.return,fe===null)throw Error(a(341));fe.lanes|=M,Me=fe.alternate,Me!==null&&(Me.lanes|=M),Em(fe,M,g),fe=V.sibling}else fe=V.child;if(fe!==null)fe.return=V;else for(fe=V;fe!==null;){if(fe===g){fe=null;break}if(V=fe.sibling,V!==null){V.return=fe.return,fe=V;break}fe=fe.return}V=fe}Hr(m,g,I.children,M),g=g.child}return g;case 9:return I=g.type,R=g.pendingProps.children,dc(g,M),I=_r(I),R=R(I),g.flags|=1,Hr(m,g,R,M),g.child;case 14:return R=g.type,I=Ii(R,g.pendingProps),I=Ii(R.type,I),T_(m,g,R,I,M);case 15:return D_(m,g,g.type,g.pendingProps,M);case 17:return R=g.type,I=g.pendingProps,I=g.elementType===R?I:Ii(R,I),m!==null&&(m.alternate=null,g.alternate=null,g.flags|=2),g.tag=1,Ei(R)?(m=!0,Mi(g)):m=!1,dc(g,M),u_(g,R,I),Af(g,R,I,M),ay(null,g,R,!0,m,M);case 19:return B_(m,g,M);case 22:return R_(m,g,M)}throw Error(a(156,g.tag))};function jm(m,g){return ym(m,g)}function zA(m,g,M,R){this.tag=m,this.key=M,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=g,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=R,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Na(m,g,M,R){return new zA(m,g,M,R)}function Ay(m){return m=m.prototype,!(!m||!m.isReactComponent)}function Y_(m){if(typeof m=="function")return Ay(m)?1:0;if(m!=null){if(m=m.$$typeof,m===x)return 11;if(m===S)return 14}return 2}function Fl(m,g){var M=m.alternate;return M===null?(M=Na(m.tag,g,m.key,m.mode),M.elementType=m.elementType,M.type=m.type,M.stateNode=m.stateNode,M.alternate=m,m.alternate=M):(M.pendingProps=g,M.type=m.type,M.flags=0,M.subtreeFlags=0,M.deletions=null),M.flags=m.flags&14680064,M.childLanes=m.childLanes,M.lanes=m.lanes,M.child=m.child,M.memoizedProps=m.memoizedProps,M.memoizedState=m.memoizedState,M.updateQueue=m.updateQueue,g=m.dependencies,M.dependencies=g===null?null:{lanes:g.lanes,firstContext:g.firstContext},M.sibling=m.sibling,M.index=m.index,M.ref=m.ref,M}function qm(m,g,M,R,I,V){var fe=2;if(R=m,typeof m=="function")Ay(m)&&(fe=1);else if(typeof m=="string")fe=5;else e:switch(m){case c:return Au(M.children,I,V,g);case f:fe=8,I|=8;break;case d:return m=Na(12,M,g,I|2),m.elementType=d,m.lanes=V,m;case _:return m=Na(13,M,g,I),m.elementType=_,m.lanes=V,m;case v:return m=Na(19,M,g,I),m.elementType=v,m.lanes=V,m;case E:return Uh(M,I,V,g);default:if(typeof m=="object"&&m!==null)switch(m.$$typeof){case p:fe=10;break e;case y:fe=9;break e;case x:fe=11;break e;case S:fe=14;break e;case w:fe=16,R=null;break e}throw Error(a(130,m==null?m:typeof m,""))}return g=Na(fe,M,g,I),g.elementType=m,g.type=R,g.lanes=V,g}function Au(m,g,M,R){return m=Na(7,m,R,g),m.lanes=M,m}function Uh(m,g,M,R){return m=Na(22,m,R,g),m.elementType=E,m.lanes=M,m.stateNode={},m}function to(m,g,M){return m=Na(6,m,null,g),m.lanes=M,m}function Oa(m,g,M){return g=Na(4,m.children!==null?m.children:[],m.key,g),g.lanes=M,g.stateNode={containerInfo:m.containerInfo,pendingChildren:null,implementation:m.implementation},g}function $A(m,g,M,R,I){this.tag=g,this.containerInfo=m,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Qe,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=vm(0),this.expirationTimes=vm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vm(0),this.identifierPrefix=R,this.onRecoverableError=I,De&&(this.mutableSourceEagerHydrationData=null)}function K_(m,g,M,R,I,V,fe,Me,qe){return m=new $A(m,g,M,Me,qe),g===1?(g=1,V===!0&&(g|=8)):g=0,V=Na(3,null,null,g),m.current=V,V.stateNode=m,V.memoizedState={element:R,isDehydrated:M,cache:null,transitions:null},qv(V),m}function zh(m){if(!m)return Da;m=m._reactInternals;e:{if(P(m)!==m||m.tag!==1)throw Error(a(170));var g=m;do{switch(g.tag){case 3:g=g.stateNode.context;break e;case 1:if(Ei(g.type)){g=g.stateNode.__reactInternalMemoizedMergedChildContext;break e}}g=g.return}while(g!==null);throw Error(a(171))}if(m.tag===1){var M=m.type;if(Ei(M))return cc(m,M,g)}return g}function Sc(m){var g=m._reactInternals;if(g===void 0)throw typeof m.render=="function"?Error(a(188)):(m=Object.keys(m).join(","),Error(a(268,m)));return m=G(g),m===null?null:m.stateNode}function Ty(m,g){if(m=m.memoizedState,m!==null&&m.dehydrated!==null){var M=m.retryLane;m.retryLane=M!==0&&M=dt&&V>=hn&&I<=Nt&&fe<=jt){m.splice(g,1);break}else if(R!==dt||M.width!==qe.width||jtfe){if(!(V!==hn||M.height!==qe.height||NtI)){dt>R&&(qe.width+=dt-R,qe.x=R),NtV&&(qe.height+=hn-V,qe.y=V),jtM&&(M=fe)),fe ")+` No matching component was found for: - `)+m.join(" > ")}return null},n.getPublicRootInstance=function(m){if(m=m.current,!m.child)return null;switch(m.child.tag){case 5:return Y(m.child.stateNode);default:return m.child.stateNode}},n.injectIntoDevTools=function(m){if(m={bundleType:m.bundleType,version:m.version,rendererPackageName:m.rendererPackageName,rendererConfig:m.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:s.ReactCurrentDispatcher,findHostInstanceByFiber:$A,findFiberByHostInstance:m.findFiberByHostInstance||K_,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.0.0-fc46dba67-20220329"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")m=!1;else{var g=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(g.isDisabled||!g.supportsFiber)m=!0;else{try{ym=g.inject(m),Gs=g}catch{}m=!!g.checkDCE}}return m},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(m,g,M,R){if(!Ue)throw Error(a(363));m=hy(m,g);var I=pe(m,M,R).disconnect;return{disconnect:function(){I()}}},n.registerMutableSourceForHydration=function(m,g){var M=g._getVersion;M=M(g._source),m.mutableSourceEagerHydrationData==null?m.mutableSourceEagerHydrationData=[g,M]:m.mutableSourceEagerHydrationData.push(g,M)},n.runWithPriority=function(m,g){var M=Wn;try{return Wn=m,g()}finally{Wn=M}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(m,g,M,R){var I=g.current,V=Zi(),fe=el(I);return M=Uh(M),g.context===null?g.context=M:g.pendingContext=M,g=qi(V,fe),g.payload={element:m},R=R===void 0?null:R,R!==null&&(g.callback=R),os(I,g),m=Pa(I,fe,V),m!==null&&Cf(m,I,fe),fe},n};mj.exports=tAe;var nAe=mj.exports;const rAe=lu(nAe),X4={},yj=t=>void Object.assign(X4,t);function iAe(t,e){function n(c,{args:f=[],attach:d,...p},y){let x=`${c[0].toUpperCase()}${c.slice(1)}`,_;if(c==="primitive"){if(p.object===void 0)throw new Error("R3F: Primitives without 'object' are invalid!");const v=p.object;_=L0(v,{type:c,root:y,attach:d,primitive:!0})}else{const v=X4[x];if(!v)throw new Error(`R3F: ${x} 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(!Array.isArray(f))throw new Error("R3F: The args prop must be an array!");_=L0(new v(...f),{type:c,root:y,attach:d,memoizedProps:{args:f}})}return _.__r3f.attach===void 0&&(_ instanceof Fn?_.__r3f.attach="geometry":_ instanceof Po&&(_.__r3f.attach="material")),x!=="inject"&&F3(_,p),_}function r(c,f){let d=!1;if(f){var p,y;(p=f.__r3f)!=null&&p.attach?I3(c,f,f.__r3f.attach):f.isObject3D&&c.isObject3D&&(c.add(f),d=!0),d||(y=c.__r3f)==null||y.objects.push(f),f.__r3f||L0(f,{}),f.__r3f.parent=c,NP(f),k0(f)}}function i(c,f,d){let p=!1;if(f){var y,x;if((y=f.__r3f)!=null&&y.attach)I3(c,f,f.__r3f.attach);else if(f.isObject3D&&c.isObject3D){f.parent=c,f.dispatchEvent({type:"added"});const _=c.children.filter(S=>S!==f),v=_.indexOf(d);c.children=[..._.slice(0,v),f,..._.slice(v)],p=!0}p||(x=c.__r3f)==null||x.objects.push(f),f.__r3f||L0(f,{}),f.__r3f.parent=c,NP(f),k0(f)}}function o(c,f,d=!1){c&&[...c].forEach(p=>a(f,p,d))}function a(c,f,d){if(f){var p,y,x;if(f.__r3f&&(f.__r3f.parent=null),(p=c.__r3f)!=null&&p.objects&&(c.__r3f.objects=c.__r3f.objects.filter(E=>E!==f)),(y=f.__r3f)!=null&&y.attach)dB(c,f,f.__r3f.attach);else if(f.isObject3D&&c.isObject3D){var _;c.remove(f),(_=f.__r3f)!=null&&_.root&&dAe(f.__r3f.root,f)}const S=(x=f.__r3f)==null?void 0:x.primitive,w=d===void 0?f.dispose!==null&&!S:d;if(!S){var v;o((v=f.__r3f)==null?void 0:v.objects,f,w),o(f.children,f,w)}delete f.__r3f,w&&f.dispose&&f.type!=="Scene"&&RP.unstable_scheduleCallback(RP.unstable_IdlePriority,()=>{try{f.dispose()}catch{}}),k0(c)}}function s(c,f,d,p){var y;const x=(y=c.__r3f)==null?void 0:y.parent;if(!x)return;const _=n(f,d,c.__r3f.root);if(c.children){for(const v of c.children)v.__r3f&&r(_,v);c.children=c.children.filter(v=>!v.__r3f)}c.__r3f.objects.forEach(v=>r(_,v)),c.__r3f.objects=[],c.__r3f.autoRemovedBeforeAppend||a(x,c),_.parent&&(_.__r3f.autoRemovedBeforeAppend=!0),r(x,_),_.raycast&&_.__r3f.eventCount&&_.__r3f.root.getState().internal.interaction.push(_),[p,p.alternate].forEach(v=>{v!==null&&(v.stateNode=_,v.ref&&(typeof v.ref=="function"?v.ref(_):v.ref.current=_))})}const l=()=>console.warn("Text is not allowed in the R3F tree! This could be stray whitespace or characters.");return{reconciler:rAe({createInstance:n,removeChild:a,appendChild:r,appendInitialChild:r,insertBefore:i,supportsMutation:!0,isPrimaryRenderer:!1,supportsPersistence:!1,supportsHydration:!1,noTimeout:-1,appendChildToContainer:(c,f)=>{if(!f)return;const d=c.getState().scene;d.__r3f&&(d.__r3f.root=c,r(d,f))},removeChildFromContainer:(c,f)=>{f&&a(c.getState().scene,f)},insertInContainerBefore:(c,f,d)=>{if(!f||!d)return;const p=c.getState().scene;p.__r3f&&i(p,f,d)},getRootHostContext:()=>null,getChildHostContext:c=>c,finalizeInitialChildren(c){var f;return!!((f=c==null?void 0:c.__r3f)!=null?f:{}).handlers},prepareUpdate(c,f,d,p){var y;if(((y=c==null?void 0:c.__r3f)!=null?y:{}).primitive&&p.object&&p.object!==c)return[!0];{const{args:_=[],children:v,...S}=p,{args:w=[],children:E,...T}=d;if(!Array.isArray(_))throw new Error("R3F: the args prop must be an array!");if(_.some((D,O)=>D!==w[O]))return[!0];const C=Mj(c,S,T,!0);return C.changes.length?[!1,C]:null}},commitUpdate(c,[f,d],p,y,x,_){f?s(c,p,x,_):F3(c,d)},commitMount(c,f,d,p){var y;const x=(y=c.__r3f)!=null?y:{};c.raycast&&x.handlers&&x.eventCount&&c.__r3f.root.getState().internal.interaction.push(c)},getPublicInstance:c=>c,prepareForCommit:()=>null,preparePortalMount:c=>L0(c.getState().scene),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance(c){var f;const{attach:d,parent:p}=(f=c.__r3f)!=null?f:{};d&&p&&dB(p,c,d),c.isObject3D&&(c.visible=!1),k0(c)},unhideInstance(c,f){var d;const{attach:p,parent:y}=(d=c.__r3f)!=null?d:{};p&&y&&I3(y,c,p),(c.isObject3D&&f.visible==null||f.visible)&&(c.visible=!0),k0(c)},createTextInstance:l,hideTextInstance:l,unhideTextInstance:l,getCurrentEventPriority:()=>e?e():bg.DefaultEventPriority,beforeActiveInstanceBlur:()=>{},afterActiveInstanceBlur:()=>{},detachDeletedInstance:()=>{},now:typeof performance<"u"&&Fr.fun(performance.now)?performance.now:Fr.fun(Date.now)?Date.now:()=>0,scheduleTimeout:Fr.fun(setTimeout)?setTimeout:void 0,cancelTimeout:Fr.fun(clearTimeout)?clearTimeout:void 0}),applyProps:F3}}var lB,uB;const O3=t=>"colorSpace"in t||"outputColorSpace"in t,xj=()=>{var t;return(t=X4.ColorManagement)!=null?t:null},bj=t=>t&&t.isOrthographicCamera,oAe=t=>t&&t.hasOwnProperty("current"),Ub=typeof window<"u"&&((lB=window.document)!=null&&lB.createElement||((uB=window.navigator)==null?void 0:uB.product)==="ReactNative")?H.useLayoutEffect:H.useEffect;function _j(t){const e=H.useRef(t);return Ub(()=>void(e.current=t),[t]),e}function aAe({set:t}){return Ub(()=>(t(new Promise(()=>null)),()=>t(!1)),[t]),null}class wj extends H.Component{constructor(...e){super(...e),this.state={error:!1}}componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}}wj.getDerivedStateFromError=()=>({error:!0});const Sj="__default",cB=new Map,sAe=t=>t&&!!t.memoized&&!!t.changes;function Ej(t){var e;const n=typeof window<"u"?(e=window.devicePixelRatio)!=null?e:2:1;return Array.isArray(t)?Math.min(Math.max(t[0],n),t[1]):t}const e1=t=>{var e;return(e=t.__r3f)==null?void 0:e.root.getState()},Fr={obj:t=>t===Object(t)&&!Fr.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,arr:t=>Array.isArray(t),equ(t,e,{arrays:n="shallow",objects:r="reference",strict:i=!0}={}){if(typeof t!=typeof e||!!t!=!!e)return!1;if(Fr.str(t)||Fr.num(t))return t===e;const o=Fr.obj(t);if(o&&r==="reference")return t===e;const a=Fr.arr(t);if(a&&n==="reference")return t===e;if((a||o)&&t===e)return!0;let s;for(s in t)if(!(s in e))return!1;if(o&&n==="shallow"&&r==="shallow"){for(s in i?e:t)if(!Fr.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(Fr.und(s)){if(a&&t.length===0&&e.length===0||o&&Object.keys(t).length===0&&Object.keys(e).length===0)return!0;if(t!==e)return!1}return!0}};function lAe(t){t.dispose&&t.type!=="Scene"&&t.dispose();for(const e in t)e.dispose==null||e.dispose(),delete t[e]}function L0(t,e){const n=t;return n.__r3f={type:"",root:null,previousAttach:null,memoizedProps:{},eventCount:0,handlers:{},objects:[],parent:null,...e},t}function PP(t,e){let n=t;if(e.includes("-")){const r=e.split("-"),i=r.pop();return n=r.reduce((o,a)=>o[a],t),{target:n,key:i}}else return{target:n,key:e}}const fB=/-\d+$/;function I3(t,e,n){if(Fr.str(n)){if(fB.test(n)){const o=n.replace(fB,""),{target:a,key:s}=PP(t,o);Array.isArray(a[s])||(a[s]=[])}const{target:r,key:i}=PP(t,n);e.__r3f.previousAttach=r[i],r[i]=e}else e.__r3f.previousAttach=n(t,e)}function dB(t,e,n){var r,i;if(Fr.str(n)){const{target:o,key:a}=PP(t,n),s=e.__r3f.previousAttach;s===void 0?delete o[a]:o[a]=s}else(r=e.__r3f)==null||r.previousAttach==null||r.previousAttach(t,e);(i=e.__r3f)==null||delete i.previousAttach}function Mj(t,{children:e,key:n,ref:r,...i},{children:o,key:a,ref:s,...l}={},u=!1){var c;const f=(c=t==null?void 0:t.__r3f)!=null?c:{},d=Object.entries(i),p=[];if(u){const x=Object.keys(l);for(let _=0;_{var v;if((v=t.__r3f)!=null&&v.primitive&&x==="object"||Fr.equ(_,l[x]))return;if(/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/.test(x))return p.push([x,_,!0,[]]);let S=[];x.includes("-")&&(S=x.split("-")),p.push([x,_,!1,S]);for(const w in i){const E=i[w];w.startsWith(`${x}-`)&&p.push([w,E,!1,w.split("-")])}});const y={...i};return f.memoizedProps&&f.memoizedProps.args&&(y.args=f.memoizedProps.args),f.memoizedProps&&f.memoizedProps.attach&&(y.attach=f.memoizedProps.attach),{memoized:y,changes:p}}const uAe=typeof process<"u"&&!1;function F3(t,e){var n,r,i;const o=(n=t.__r3f)!=null?n:{},a=o.root,s=(r=a==null||a.getState==null?void 0:a.getState())!=null?r:{},{memoized:l,changes:u}=sAe(e)?e:Mj(t,e),c=o.eventCount;t.__r3f&&(t.__r3f.memoizedProps=l);for(let d=0;dw[E],t),!(S&&S.set))){const[w,...E]=_.reverse();v=E.reverse().reduce((T,C)=>T[C],t),p=w}if(y===Sj+"remove")if(v.constructor){let w=cB.get(v.constructor);w||(w=new v.constructor,cB.set(v.constructor,w)),y=w[p]}else y=0;if(x)y?o.handlers[p]=y:delete o.handlers[p],o.eventCount=Object.keys(o.handlers).length;else if(S&&S.set&&(S.copy||S instanceof Dp)){if(Array.isArray(y))S.fromArray?S.fromArray(y):S.set(...y);else if(S.copy&&y&&y.constructor&&(uAe?S.constructor.name===y.constructor.name:S.constructor===y.constructor))S.copy(y);else if(y!==void 0){const w=S instanceof Pt;!w&&S.setScalar?S.setScalar(y):S instanceof Dp&&y instanceof Dp?S.mask=y.mask:S.set(y),!xj()&&!s.linear&&w&&S.convertSRGBToLinear()}}else if(v[p]=y,v[p]instanceof hi&&v[p].format===ba&&v[p].type===Ls){const w=v[p];O3(w)&&O3(s.gl)?w.colorSpace=s.gl.outputColorSpace:w.encoding=s.gl.outputEncoding}k0(t)}if(o.parent&&s.internal&&t.raycast&&c!==o.eventCount){const d=s.internal.interaction.indexOf(t);d>-1&&s.internal.interaction.splice(d,1),o.eventCount&&s.internal.interaction.push(t)}return!(u.length===1&&u[0][0]==="onUpdate")&&u.length&&(i=t.__r3f)!=null&&i.parent&&NP(t),t}function k0(t){var e,n;const r=(e=t.__r3f)==null||(n=e.root)==null||n.getState==null?void 0:n.getState();r&&r.internal.frames===0&&r.invalidate()}function NP(t){t.onUpdate==null||t.onUpdate(t)}function cAe(t,e){t.manual||(bj(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(),t.updateMatrixWorld())}function MS(t){return(t.eventObject||t.object).uuid+"/"+t.index+t.instanceId}function fAe(){var t;const e=typeof self<"u"&&self||typeof window<"u"&&window;if(!e)return bg.DefaultEventPriority;switch((t=e.event)==null?void 0:t.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return bg.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return bg.ContinuousEventPriority;default:return bg.DefaultEventPriority}}function Cj(t,e,n,r){const i=n.get(e);i&&(n.delete(e),n.size===0&&(t.delete(r),i.target.releasePointerCapture(r)))}function dAe(t,e){const{internal:n}=t.getState();n.interaction=n.interaction.filter(r=>r!==e),n.initialHits=n.initialHits.filter(r=>r!==e),n.hovered.forEach((r,i)=>{(r.eventObject===e||r.object===e)&&n.hovered.delete(i)}),n.capturedMap.forEach((r,i)=>{Cj(n.capturedMap,e,r,i)})}function hAe(t){function e(l){const{internal:u}=t.getState(),c=l.offsetX-u.initialClick[0],f=l.offsetY-u.initialClick[1];return Math.round(Math.sqrt(c*c+f*f))}function n(l){return l.filter(u=>["Move","Over","Enter","Out","Leave"].some(c=>{var f;return(f=u.__r3f)==null?void 0:f.handlers["onPointer"+c]}))}function r(l,u){const c=t.getState(),f=new Set,d=[],p=u?u(c.internal.interaction):c.internal.interaction;for(let v=0;v{const w=e1(v.object),E=e1(S.object);return!w||!E?v.distance-S.distance:E.events.priority-w.events.priority||v.distance-S.distance}).filter(v=>{const S=MS(v);return f.has(S)?!1:(f.add(S),!0)});c.events.filter&&(x=c.events.filter(x,c));for(const v of x){let S=v.object;for(;S;){var _;(_=S.__r3f)!=null&&_.eventCount&&d.push({...v,eventObject:S}),S=S.parent}}if("pointerId"in l&&c.internal.capturedMap.has(l.pointerId))for(let v of c.internal.capturedMap.get(l.pointerId).values())f.has(MS(v.intersection))||d.push(v.intersection);return d}function i(l,u,c,f){const d=t.getState();if(l.length){const p={stopped:!1};for(const y of l){const x=e1(y.object)||d,{raycaster:_,pointer:v,camera:S,internal:w}=x,E=new ae(v.x,v.y,0).unproject(S),T=N=>{var k,G;return(k=(G=w.capturedMap.get(N))==null?void 0:G.has(y.eventObject))!=null?k:!1},C=N=>{const k={intersection:y,target:u.target};w.capturedMap.has(N)?w.capturedMap.get(N).set(y.eventObject,k):w.capturedMap.set(N,new Map([[y.eventObject,k]])),u.target.setPointerCapture(N)},D=N=>{const k=w.capturedMap.get(N);k&&Cj(w.capturedMap,y.eventObject,k,N)};let O={};for(let N in u){let k=u[N];typeof k!="function"&&(O[N]=k)}let P={...y,...O,pointer:v,intersections:l,stopped:p.stopped,delta:c,unprojectedPoint:E,ray:_.ray,camera:S,stopPropagation(){const N="pointerId"in u&&w.capturedMap.get(u.pointerId);if((!N||N.has(y.eventObject))&&(P.stopped=p.stopped=!0,w.hovered.size&&Array.from(w.hovered.values()).find(k=>k.eventObject===y.eventObject))){const k=l.slice(0,l.indexOf(y));o([...k,y])}},target:{hasPointerCapture:T,setPointerCapture:C,releasePointerCapture:D},currentTarget:{hasPointerCapture:T,setPointerCapture:C,releasePointerCapture:D},nativeEvent:u};if(f(P),p.stopped===!0)break}}return l}function o(l){const{internal:u}=t.getState();for(const c of u.hovered.values())if(!l.length||!l.find(f=>f.object===c.object&&f.index===c.index&&f.instanceId===c.instanceId)){const d=c.eventObject.__r3f,p=d==null?void 0:d.handlers;if(u.hovered.delete(MS(c)),d!=null&&d.eventCount){const y={...c,intersections:l};p.onPointerOut==null||p.onPointerOut(y),p.onPointerLeave==null||p.onPointerLeave(y)}}}function a(l,u){for(let c=0;co([]);case"onLostPointerCapture":return u=>{const{internal:c}=t.getState();"pointerId"in u&&c.capturedMap.has(u.pointerId)&&requestAnimationFrame(()=>{c.capturedMap.has(u.pointerId)&&(c.capturedMap.delete(u.pointerId),o([]))})}}return function(c){const{onPointerMissed:f,internal:d}=t.getState();d.lastEvent.current=c;const p=l==="onPointerMove",y=l==="onClick"||l==="onContextMenu"||l==="onDoubleClick",_=r(c,p?n:void 0),v=y?e(c):0;l==="onPointerDown"&&(d.initialClick=[c.offsetX,c.offsetY],d.initialHits=_.map(w=>w.eventObject)),y&&!_.length&&v<=2&&(a(c,d.interaction),f&&f(c)),p&&o(_);function S(w){const E=w.eventObject,T=E.__r3f,C=T==null?void 0:T.handlers;if(T!=null&&T.eventCount)if(p){if(C.onPointerOver||C.onPointerEnter||C.onPointerOut||C.onPointerLeave){const D=MS(w),O=d.hovered.get(D);O?O.stopped&&w.stopPropagation():(d.hovered.set(D,w),C.onPointerOver==null||C.onPointerOver(w),C.onPointerEnter==null||C.onPointerEnter(w))}C.onPointerMove==null||C.onPointerMove(w)}else{const D=C[l];D?(!y||d.initialHits.includes(E))&&(a(c,d.interaction.filter(O=>!d.initialHits.includes(O))),D(w)):y&&d.initialHits.includes(E)&&a(c,d.interaction.filter(O=>!d.initialHits.includes(O)))}}i(_,c,v,S)}}return{handlePointer:s}}const Aj=t=>!!(t!=null&&t.render),Tj=H.createContext(null),pAe=(t,e)=>{const n=eAe((s,l)=>{const u=new ae,c=new ae,f=new ae;function d(v=l().camera,S=c,w=l().size){const{width:E,height:T,top:C,left:D}=w,O=E/T;S instanceof ae?f.copy(S):f.set(...S);const P=v.getWorldPosition(u).distanceTo(f);if(bj(v))return{width:E/v.zoom,height:T/v.zoom,top:C,left:D,factor:1,distance:P,aspect:O};{const N=v.fov*Math.PI/180,k=2*Math.tan(N/2)*P,G=k*(E/T);return{width:G,height:k,top:C,left:D,factor:E/G,distance:P,aspect:O}}}let p;const y=v=>s(S=>({performance:{...S.performance,current:v}})),x=new Je;return{set:s,get:l,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},xr:null,scene:null,invalidate:(v=1)=>t(l(),v),advance:(v,S)=>e(v,S,l()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new W4,pointer:x,mouse:x,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const v=l();p&&clearTimeout(p),v.performance.current!==v.performance.min&&y(v.performance.min),p=setTimeout(()=>y(l().performance.max),v.performance.debounce)}},size:{width:0,height:0,top:0,left:0,updateStyle:!1},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:d},setEvents:v=>s(S=>({...S,events:{...S.events,...v}})),setSize:(v,S,w,E,T)=>{const C=l().camera,D={width:v,height:S,top:E||0,left:T||0,updateStyle:w};s(O=>({size:D,viewport:{...O.viewport,...d(C,c,D)}}))},setDpr:v=>s(S=>{const w=Ej(v);return{viewport:{...S.viewport,dpr:w,initialDpr:S.viewport.initialDpr||w}}}),setFrameloop:(v="always")=>{const S=l().clock;S.stop(),S.elapsedTime=0,v!=="never"&&(S.start(),S.elapsedTime=0),s(()=>({frameloop:v}))},previousRoot:void 0,internal:{active:!1,priority:0,frames:0,lastEvent:H.createRef(),interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,subscribe:(v,S,w)=>{const E=l().internal;return E.priority=E.priority+(S>0?1:0),E.subscribers.push({ref:v,priority:S,store:w}),E.subscribers=E.subscribers.sort((T,C)=>T.priority-C.priority),()=>{const T=l().internal;T!=null&&T.subscribers&&(T.priority=T.priority-(S>0?1:0),T.subscribers=T.subscribers.filter(C=>C.ref!==v))}}}}}),r=n.getState();let i=r.size,o=r.viewport.dpr,a=r.camera;return n.subscribe(()=>{const{camera:s,size:l,viewport:u,gl:c,set:f}=n.getState();if(l.width!==i.width||l.height!==i.height||u.dpr!==o){var d;i=l,o=u.dpr,cAe(s,l),c.setPixelRatio(u.dpr);const p=(d=l.updateStyle)!=null?d:typeof HTMLCanvasElement<"u"&&c.domElement instanceof HTMLCanvasElement;c.setSize(l.width,l.height,p)}s!==a&&(a=s,f(p=>({viewport:{...p.viewport,...p.viewport.getCurrentViewport(s)}})))}),n.subscribe(s=>t(s)),n};let CS,mAe=new Set,gAe=new Set,vAe=new Set;function L3(t,e){if(t.size)for(const{callback:n}of t.values())n(e)}function t1(t,e){switch(t){case"before":return L3(mAe,e);case"after":return L3(gAe,e);case"tail":return L3(vAe,e)}}let k3,B3;function U3(t,e,n){let r=e.clock.getDelta();for(e.frameloop==="never"&&typeof t=="number"&&(r=t-e.clock.elapsedTime,e.clock.oldTime=e.clock.elapsedTime,e.clock.elapsedTime=t),k3=e.internal.subscribers,CS=0;CS0)&&!((u=i.gl.xr)!=null&&u.isPresenting)&&(n+=U3(l,i))}if(t1("after",l),n===0)return t1("tail",l),e=!1,cancelAnimationFrame(r)}function a(l,u=1){var c;if(!l)return t.forEach(f=>a(f.store.getState()),u);(c=l.gl.xr)!=null&&c.isPresenting||!l.internal.active||l.frameloop==="never"||(l.internal.frames=Math.min(60,l.internal.frames+u),e||(e=!0,requestAnimationFrame(o)))}function s(l,u=!0,c,f){if(u&&t1("before",l),c)U3(l,c,f);else for(const d of t.values())U3(l,d.store.getState());u&&t1("after",l)}return{loop:o,invalidate:a,advance:s}}function Dj(){const t=H.useContext(Tj);if(!t)throw new Error("R3F: Hooks can only be used within the Canvas component!");return t}function Do(t=n=>n,e){return Dj()(t,e)}function Y4(t,e=0){const n=Dj(),r=n.getState().internal.subscribe,i=_j(t);return Ub(()=>r(i,e,n),[e,r,n]),null}const lv=new Map,{invalidate:hB,advance:pB}=yAe(lv),{reconciler:C2,applyProps:A0}=iAe(lv,fAe),T0={objects:"shallow",strict:!1},xAe=(t,e)=>{const n=typeof t=="function"?t(e):t;return Aj(n)?n:new A4({powerPreference:"high-performance",canvas:e,antialias:!0,alpha:!0,...t})};function bAe(t,e){const n=typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement;if(e){const{width:r,height:i,top:o,left:a,updateStyle:s=n}=e;return{width:r,height:i,top:o,left:a,updateStyle:s}}else if(typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement&&t.parentElement){const{width:r,height:i,top:o,left:a}=t.parentElement.getBoundingClientRect();return{width:r,height:i,top:o,left:a,updateStyle:n}}else if(typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas)return{width:t.width,height:t.height,top:0,left:0,updateStyle:n};return{width:0,height:0,top:0,left:0}}function _Ae(t){const e=lv.get(t),n=e==null?void 0:e.fiber,r=e==null?void 0:e.store;e&&console.warn("R3F.createRoot should only be called once!");const i=typeof reportError=="function"?reportError:console.error,o=r||pAe(hB,pB),a=n||C2.createContainer(o,bg.ConcurrentRoot,null,!1,null,"",i,null);e||lv.set(t,{fiber:a,store:o});let s,l=!1,u;return{configure(c={}){let{gl:f,size:d,scene:p,events:y,onCreated:x,shadows:_=!1,linear:v=!1,flat:S=!1,legacy:w=!1,orthographic:E=!1,frameloop:T="always",dpr:C=[1,2],performance:D,raycaster:O,camera:P,onPointerMissed:N}=c,k=o.getState(),G=k.gl;k.gl||k.set({gl:G=xAe(f,t)});let Z=k.raycaster;Z||k.set({raycaster:Z=new dj});const{params:j,...K}=O||{};if(Fr.equ(K,Z,T0)||A0(Z,{...K}),Fr.equ(j,Z.params,T0)||A0(Z,{params:{...Z.params,...j}}),!k.camera||k.camera===u&&!Fr.equ(u,P,T0)){u=P;const le=P instanceof Pb,ce=le?P:E?new Ib(0,0,0,0,.1,1e3):new lo(75,0,.1,1e3);le||(ce.position.z=5,P&&A0(ce,P),!k.camera&&!(P!=null&&P.rotation)&&ce.lookAt(0,0,0)),k.set({camera:ce}),Z.camera=ce}if(!k.scene){let le;p instanceof E2?le=p:(le=new E2,p&&A0(le,p)),k.set({scene:L0(le)})}if(!k.xr){var Y;const le=(Re,Ie)=>{const He=o.getState();He.frameloop!=="never"&&pB(Re,!0,He,Ie)},ce=()=>{const Re=o.getState();Re.gl.xr.enabled=Re.gl.xr.isPresenting,Re.gl.xr.setAnimationLoop(Re.gl.xr.isPresenting?le:null),Re.gl.xr.isPresenting||hB(Re)},Ce={connect(){const Re=o.getState().gl;Re.xr.addEventListener("sessionstart",ce),Re.xr.addEventListener("sessionend",ce)},disconnect(){const Re=o.getState().gl;Re.xr.removeEventListener("sessionstart",ce),Re.xr.removeEventListener("sessionend",ce)}};typeof((Y=G.xr)==null?void 0:Y.addEventListener)=="function"&&Ce.connect(),k.set({xr:Ce})}if(G.shadowMap){const le=G.shadowMap.enabled,ce=G.shadowMap.type;if(G.shadowMap.enabled=!!_,Fr.boo(_))G.shadowMap.type=W1;else if(Fr.str(_)){var $;const Ce={basic:iW,percentage:bC,soft:W1,variance:jl};G.shadowMap.type=($=Ce[_])!=null?$:W1}else Fr.obj(_)&&Object.assign(G.shadowMap,_);(le!==G.shadowMap.enabled||ce!==G.shadowMap.type)&&(G.shadowMap.needsUpdate=!0)}const W=xj();W&&("enabled"in W?W.enabled=!w:"legacyMode"in W&&(W.legacyMode=w)),A0(G,{outputEncoding:v?3e3:3001,toneMapping:S?qu:l4}),k.legacy!==w&&k.set(()=>({legacy:w})),k.linear!==v&&k.set(()=>({linear:v})),k.flat!==S&&k.set(()=>({flat:S})),f&&!Fr.fun(f)&&!Aj(f)&&!Fr.equ(f,G,T0)&&A0(G,f),y&&!k.events.handlers&&k.set({events:y(o)});const re=bAe(t,d);return Fr.equ(re,k.size,T0)||k.setSize(re.width,re.height,re.updateStyle,re.top,re.left),C&&k.viewport.dpr!==Ej(C)&&k.setDpr(C),k.frameloop!==T&&k.setFrameloop(T),k.onPointerMissed||k.set({onPointerMissed:N}),D&&!Fr.equ(D,k.performance,T0)&&k.set(le=>({performance:{...le.performance,...D}})),s=x,l=!0,this},render(c){return l||this.configure(),C2.updateContainer(H.createElement(wAe,{store:o,children:c,onCreated:s,rootElement:t}),a,null,()=>{}),o},unmount(){Rj(t)}}}function wAe({store:t,children:e,onCreated:n,rootElement:r}){return Ub(()=>{const i=t.getState();i.set(o=>({internal:{...o.internal,active:!0}})),n&&n(i),t.getState().events.connected||i.events.connect==null||i.events.connect(r)},[]),H.createElement(Tj.Provider,{value:t},e)}function Rj(t,e){const n=lv.get(t),r=n==null?void 0:n.fiber;if(r){const i=n==null?void 0:n.store.getState();i&&(i.internal.active=!1),C2.updateContainer(null,r,null,()=>{i&&setTimeout(()=>{try{var o,a,s,l;i.events.disconnect==null||i.events.disconnect(),(o=i.gl)==null||(a=o.renderLists)==null||a.dispose==null||a.dispose(),(s=i.gl)==null||s.forceContextLoss==null||s.forceContextLoss(),(l=i.gl)!=null&&l.xr&&i.xr.disconnect(),lAe(i),lv.delete(t),e&&e(t)}catch{}},500)})}}C2.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:H.version});function OP(t,e,n){var r,i,o,a,s;e==null&&(e=100);function l(){var c=Date.now()-a;c=0?r=setTimeout(l,e-c):(r=null,n||(s=t.apply(o,i),o=i=null))}var u=function(){o=this,i=arguments,a=Date.now();var c=n&&!r;return r||(r=setTimeout(l,e)),c&&(s=t.apply(o,i),o=i=null),s};return u.clear=function(){r&&(clearTimeout(r),r=null)},u.flush=function(){r&&(s=t.apply(o,i),o=i=null,clearTimeout(r),r=null)},u}OP.debounce=OP;var SAe=OP;const mB=lu(SAe);function EAe(t){let{debounce:e,scroll:n,polyfill:r,offsetSize:i}=t===void 0?{debounce:0,scroll:!1,offsetSize:!1}:t;const o=r||(typeof window>"u"?class{}:window.ResizeObserver);if(!o)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,s]=H.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),l=H.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:a}),u=e?typeof e=="number"?e:e.scroll:null,c=e?typeof e=="number"?e:e.resize:null,f=H.useRef(!1);H.useEffect(()=>(f.current=!0,()=>void(f.current=!1)));const[d,p,y]=H.useMemo(()=>{const S=()=>{if(!l.current.element)return;const{left:w,top:E,width:T,height:C,bottom:D,right:O,x:P,y:N}=l.current.element.getBoundingClientRect(),k={left:w,top:E,width:T,height:C,bottom:D,right:O,x:P,y:N};l.current.element instanceof HTMLElement&&i&&(k.height=l.current.element.offsetHeight,k.width=l.current.element.offsetWidth),Object.freeze(k),f.current&&!TAe(l.current.lastBounds,k)&&s(l.current.lastBounds=k)};return[S,c?mB(S,c):S,u?mB(S,u):S]},[s,i,u,c]);function x(){l.current.scrollContainers&&(l.current.scrollContainers.forEach(S=>S.removeEventListener("scroll",y,!0)),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null)}function _(){l.current.element&&(l.current.resizeObserver=new o(y),l.current.resizeObserver.observe(l.current.element),n&&l.current.scrollContainers&&l.current.scrollContainers.forEach(S=>S.addEventListener("scroll",y,{capture:!0,passive:!0})))}const v=S=>{!S||S===l.current.element||(x(),l.current.element=S,l.current.scrollContainers=Pj(S),_())};return CAe(y,!!n),MAe(p),H.useEffect(()=>{x(),_()},[n,y,p]),H.useEffect(()=>x,[]),[v,a,d]}function MAe(t){H.useEffect(()=>{const e=t;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[t])}function CAe(t,e){H.useEffect(()=>{if(e){const n=t;return window.addEventListener("scroll",n,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",n,!0)}},[t,e])}function Pj(t){const e=[];if(!t||t===document.body)return e;const{overflow:n,overflowX:r,overflowY:i}=window.getComputedStyle(t);return[n,r,i].some(o=>o==="auto"||o==="scroll")&&e.push(t),[...e,...Pj(t.parentElement)]}const AAe=["x","y","top","bottom","left","right","width","height"],TAe=(t,e)=>AAe.every(n=>t[n]===e[n]);var DAe=Object.defineProperty,RAe=Object.defineProperties,PAe=Object.getOwnPropertyDescriptors,gB=Object.getOwnPropertySymbols,NAe=Object.prototype.hasOwnProperty,OAe=Object.prototype.propertyIsEnumerable,vB=(t,e,n)=>e in t?DAe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,yB=(t,e)=>{for(var n in e||(e={}))NAe.call(e,n)&&vB(t,n,e[n]);if(gB)for(var n of gB(e))OAe.call(e,n)&&vB(t,n,e[n]);return t},IAe=(t,e)=>RAe(t,PAe(e));function Nj(t,e,n){if(!t)return;if(n(t)===!0)return t;let r=e?t.return:t.child;for(;r;){const i=Nj(r,e,n);if(i)return i;r=e?null:r.sibling}}function Oj(t){try{return Object.defineProperties(t,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return t}}const K4=Oj(H.createContext(null));class Ij extends H.Component{render(){return H.createElement(K4.Provider,{value:this._reactInternals},this.props.children)}}const{ReactCurrentOwner:xB,ReactCurrentDispatcher:bB}=H.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function FAe(){const t=H.useContext(K4);if(t===null)throw new Error("its-fine: useFiber must be called within a !");const e=H.useId();return H.useMemo(()=>{for(const r of[xB==null?void 0:xB.current,t,t==null?void 0:t.alternate]){if(!r)continue;const i=Nj(r,!1,o=>{let a=o.memoizedState;for(;a;){if(a.memoizedState===e)return!0;a=a.next}});if(i)return i}},[t,e])}function LAe(){var t,e;const n=FAe(),[r]=H.useState(()=>new Map);r.clear();let i=n;for(;i;){const o=(t=i.type)==null?void 0:t._context;o&&o!==K4&&!r.has(o)&&r.set(o,(e=bB==null?void 0:bB.current)==null?void 0:e.readContext(Oj(o))),i=i.return}return r}function kAe(){const t=LAe();return H.useMemo(()=>Array.from(t.keys()).reduce((e,n)=>r=>H.createElement(e,null,H.createElement(n.Provider,IAe(yB({},r),{value:t.get(n)}))),e=>H.createElement(Ij,yB({},e))),[t])}const z3={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 BAe(t){const{handlePointer:e}=hAe(t);return{priority:1,enabled:!0,compute(n,r,i){r.pointer.set(n.offsetX/r.size.width*2-1,-(n.offsetY/r.size.height)*2+1),r.raycaster.setFromCamera(r.pointer,r.camera)},connected:void 0,handlers:Object.keys(z3).reduce((n,r)=>({...n,[r]:e(r)}),{}),update:()=>{var n;const{events:r,internal:i}=t.getState();(n=i.lastEvent)!=null&&n.current&&r.handlers&&r.handlers.onPointerMove(i.lastEvent.current)},connect:n=>{var r;const{set:i,events:o}=t.getState();o.disconnect==null||o.disconnect(),i(a=>({events:{...a.events,connected:n}})),Object.entries((r=o.handlers)!=null?r:[]).forEach(([a,s])=>{const[l,u]=z3[a];n.addEventListener(l,s,{passive:u})})},disconnect:()=>{const{set:n,events:r}=t.getState();if(r.connected){var i;Object.entries((i=r.handlers)!=null?i:[]).forEach(([o,a])=>{if(r&&r.connected instanceof HTMLElement){const[s]=z3[o];r.connected.removeEventListener(s,a)}}),n(o=>({events:{...o.events,connected:void 0}}))}}}}const UAe=H.forwardRef(function({children:e,fallback:n,resize:r,style:i,gl:o,events:a=BAe,eventSource:s,eventPrefix:l,shadows:u,linear:c,flat:f,legacy:d,orthographic:p,frameloop:y,dpr:x,performance:_,raycaster:v,camera:S,scene:w,onPointerMissed:E,onCreated:T,...C},D){H.useMemo(()=>yj(ZCe),[]);const O=kAe(),[P,N]=EAe({scroll:!0,debounce:{scroll:50,resize:0},...r}),k=H.useRef(null),G=H.useRef(null);H.useImperativeHandle(D,()=>k.current);const Z=_j(E),[j,K]=H.useState(!1),[Y,$]=H.useState(!1);if(j)throw j;if(Y)throw Y;const W=H.useRef(null);Ub(()=>{const te=k.current;N.width>0&&N.height>0&&te&&(W.current||(W.current=_Ae(te)),W.current.configure({gl:o,events:a,shadows:u,linear:c,flat:f,legacy:d,orthographic:p,frameloop:y,dpr:x,performance:_,raycaster:v,camera:S,scene:w,size:N,onPointerMissed:(...re)=>Z.current==null?void 0:Z.current(...re),onCreated:re=>{re.events.connect==null||re.events.connect(s?oAe(s)?s.current:s:G.current),l&&re.setEvents({compute:(le,ce)=>{const Ce=le[l+"X"],Re=le[l+"Y"];ce.pointer.set(Ce/ce.size.width*2-1,-(Re/ce.size.height)*2+1),ce.raycaster.setFromCamera(ce.pointer,ce.camera)}}),T==null||T(re)}}),W.current.render(H.createElement(O,null,H.createElement(wj,{set:$},H.createElement(H.Suspense,{fallback:H.createElement(aAe,{set:K})},e)))))}),H.useEffect(()=>{const te=k.current;if(te)return()=>Rj(te)},[]);const U=s?"none":"auto";return H.createElement("div",Q({ref:G,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:U,...i}},C),H.createElement("div",{ref:P,style:{width:"100%",height:"100%"}},H.createElement("canvas",{ref:k,style:{display:"block"}},n)))}),zAe=H.forwardRef(function(e,n){return H.createElement(Ij,null,H.createElement(UAe,Q({},e,{ref:n})))});function yE(t,e){return t==null||e==null?NaN:te?1:t>=e?0:NaN}function $Ae(t,e){return t==null||e==null?NaN:et?1:e>=t?0:NaN}function Fj(t){let e,n,r;t.length!==2?(e=yE,n=(s,l)=>yE(t(s),l),r=(s,l)=>t(s)-l):(e=t===yE||t===$Ae?t:HAe,n=t,r=t);function i(s,l,u=0,c=s.length){if(u>>1;n(s[f],l)<0?u=f+1:c=f}while(u>>1;n(s[f],l)<=0?u=f+1:c=f}while(uu&&r(s[f-1],l)>-r(s[f],l)?f-1:f}return{left:i,center:a,right:o}}function HAe(){return 0}function VAe(t){return t===null?NaN:+t}const WAe=Fj(yE),GAe=WAe.right;Fj(VAe).center;const jAe=GAe,qAe=Math.sqrt(50),XAe=Math.sqrt(10),YAe=Math.sqrt(2);function A2(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=qAe?10:o>=XAe?5:o>=YAe?2:1;let s,l,u;return i<0?(u=Math.pow(10,-i)/a,s=Math.round(t*u),l=Math.round(e*u),s/ue&&--l,u=-u):(u=Math.pow(10,i)*a,s=Math.round(t/u),l=Math.round(e/u),s*ue&&--l),l0))return[];if(t===e)return[t];const r=e=i))return[];const s=o-i+1,l=new Array(s);if(r)if(a<0)for(let u=0;u>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?AS(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?AS(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=ZAe.exec(t))?new fo(e[1],e[2],e[3],1):(e=JAe.exec(t))?new fo(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=QAe.exec(t))?AS(e[1],e[2],e[3],e[4]):(e=eTe.exec(t))?AS(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=tTe.exec(t))?AB(e[1],e[2]/100,e[3]/100,1):(e=nTe.exec(t))?AB(e[1],e[2]/100,e[3]/100,e[4]):_B.hasOwnProperty(t)?EB(_B[t]):t==="transparent"?new fo(NaN,NaN,NaN,0):null}function EB(t){return new fo(t>>16&255,t>>8&255,t&255,1)}function AS(t,e,n,r){return r<=0&&(t=e=n=NaN),new fo(t,e,n,r)}function Z4(t){return t instanceof ah||(t=nb(t)),t?(t=t.rgb(),new fo(t.r,t.g,t.b,t.opacity)):new fo}function Vd(t,e,n,r){return arguments.length===1?Z4(t):new fo(t,e,n,r??1)}function fo(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}Av(fo,Vd,zb(ah,{brighter(t){return t=t==null?uv:Math.pow(uv,t),new fo(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Xp:Math.pow(Xp,t),new fo(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new fo(Pp(this.r),Pp(this.g),Pp(this.b),T2(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:MB,formatHex:MB,formatHex8:oTe,formatRgb:CB,toString:CB}));function MB(){return`#${xp(this.r)}${xp(this.g)}${xp(this.b)}`}function oTe(){return`#${xp(this.r)}${xp(this.g)}${xp(this.b)}${xp((isNaN(this.opacity)?1:this.opacity)*255)}`}function CB(){const t=T2(this.opacity);return`${t===1?"rgb(":"rgba("}${Pp(this.r)}, ${Pp(this.g)}, ${Pp(this.b)}${t===1?")":`, ${t})`}`}function T2(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Pp(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function xp(t){return t=Pp(t),(t<16?"0":"")+t.toString(16)}function AB(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Zl(t,e,n,r)}function kj(t){if(t instanceof Zl)return new Zl(t.h,t.s,t.l,t.opacity);if(t instanceof ah||(t=nb(t)),!t)return new Zl;if(t instanceof Zl)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(e===o?a=(n-r)/s+(n0&&l<1?0:a,new Zl(a,s,l,t.opacity)}function D2(t,e,n,r){return arguments.length===1?kj(t):new Zl(t,e,n,r??1)}function Zl(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Av(Zl,D2,zb(ah,{brighter(t){return t=t==null?uv:Math.pow(uv,t),new Zl(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Xp:Math.pow(Xp,t),new Zl(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new fo($3(t>=240?t-240:t+120,i,r),$3(t,i,r),$3(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Zl(TB(this.h),TS(this.s),TS(this.l),T2(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 t=T2(this.opacity);return`${t===1?"hsl(":"hsla("}${TB(this.h)}, ${TS(this.s)*100}%, ${TS(this.l)*100}%${t===1?")":`, ${t})`}`}}));function TB(t){return t=(t||0)%360,t<0?t+360:t}function TS(t){return Math.max(0,Math.min(1,t||0))}function $3(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const Bj=Math.PI/180,Uj=180/Math.PI,R2=18,zj=.96422,$j=1,Hj=.82521,Vj=4/29,Lg=6/29,Wj=3*Lg*Lg,aTe=Lg*Lg*Lg;function Gj(t){if(t instanceof Ku)return new Ku(t.l,t.a,t.b,t.opacity);if(t instanceof Kc)return jj(t);t instanceof fo||(t=Z4(t));var e=G3(t.r),n=G3(t.g),r=G3(t.b),i=H3((.2225045*e+.7168786*n+.0606169*r)/$j),o,a;return e===n&&n===r?o=a=i:(o=H3((.4360747*e+.3850649*n+.1430804*r)/zj),a=H3((.0139322*e+.0971045*n+.7141733*r)/Hj)),new Ku(116*i-16,500*(o-i),200*(i-a),t.opacity)}function LP(t,e,n,r){return arguments.length===1?Gj(t):new Ku(t,e,n,r??1)}function Ku(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}Av(Ku,LP,zb(ah,{brighter(t){return new Ku(this.l+R2*(t??1),this.a,this.b,this.opacity)},darker(t){return new Ku(this.l-R2*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=zj*V3(e),t=$j*V3(t),n=Hj*V3(n),new fo(W3(3.1338561*e-1.6168667*t-.4906146*n),W3(-.9787684*e+1.9161415*t+.033454*n),W3(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function H3(t){return t>aTe?Math.pow(t,1/3):t/Wj+Vj}function V3(t){return t>Lg?t*t*t:Wj*(t-Vj)}function W3(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function G3(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function sTe(t){if(t instanceof Kc)return new Kc(t.h,t.c,t.l,t.opacity);if(t instanceof Ku||(t=Gj(t)),t.a===0&&t.b===0)return new Kc(NaN,0=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,s=r()=>t;function Xj(t,e){return function(n){return t+n*e}}function fTe(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function eI(t,e){var n=e-t;return n?Xj(t,n>180||n<-180?n-360*Math.round(n/360):n):YC(isNaN(t)?e:t)}function dTe(t){return(t=+t)==1?ho:function(e,n){return n-e?fTe(e,n,t):YC(isNaN(e)?n:e)}}function ho(t,e){var n=e-t;return n?Xj(t,n):YC(isNaN(t)?e:t)}const BP=function t(e){var n=dTe(e);function r(i,o){var a=n((i=Vd(i)).r,(o=Vd(o)).r),s=n(i.g,o.g),l=n(i.b,o.b),u=ho(i.opacity,o.opacity);return function(c){return i.r=a(c),i.g=s(c),i.b=l(c),i.opacity=u(c),i+""}}return r.gamma=t,r}(1);function hTe(t){return function(e){var n=e.length,r=new Array(n),i=new Array(n),o=new Array(n),a,s;for(a=0;an&&(o=e.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:cv(r,i)})),n=j3.lastIndex;return ne&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function NTe(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i2?OTe:NTe,l=u=null,f}function f(d){return d==null||isNaN(d=+d)?o:(l||(l=s(t.map(r),e,n)))(r(a(d)))}return f.invert=function(d){return a(i((u||(u=s(e,t.map(r),cv)))(d)))},f.domain=function(d){return arguments.length?(t=Array.from(d,RTe),c()):t.slice()},f.range=function(d){return arguments.length?(e=Array.from(d),c()):e.slice()},f.rangeRound=function(d){return e=Array.from(d),n=nI,c()},f.clamp=function(d){return arguments.length?(a=d?!0:zu,c()):a!==zu},f.interpolate=function(d){return arguments.length?(n=d,c()):n},f.unknown=function(d){return arguments.length?(o=d,f):o},function(d,p){return r=d,i=p,c()}}function ITe(){return JC()(zu,zu)}function FTe(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function P2(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function fv(t){return t=P2(Math.abs(t)),t?t[1]:NaN}function LTe(t,e){return function(n,r){for(var i=n.length,o=[],a=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(e)}}function kTe(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var BTe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ib(t){if(!(e=BTe.exec(t)))throw new Error("invalid format: "+t);var e;return new rI({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}ib.prototype=rI.prototype;function rI(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}rI.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 UTe(t){e:for(var e=t.length,n=1,r=-1,i;n0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var Jj;function zTe(t,e){var n=P2(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(Jj=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+P2(t,Math.max(0,e+o-1))[0]}function OB(t,e){var n=P2(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const IB={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:FTe,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>OB(t*100,e),r:OB,s:zTe,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function FB(t){return t}var LB=Array.prototype.map,kB=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function $Te(t){var e=t.grouping===void 0||t.thousands===void 0?FB:LTe(LB.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?FB:kTe(LB.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"−":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function u(f){f=ib(f);var d=f.fill,p=f.align,y=f.sign,x=f.symbol,_=f.zero,v=f.width,S=f.comma,w=f.precision,E=f.trim,T=f.type;T==="n"?(S=!0,T="g"):IB[T]||(w===void 0&&(w=12),E=!0,T="g"),(_||d==="0"&&p==="=")&&(_=!0,d="0",p="=");var C=x==="$"?n:x==="#"&&/[boxX]/.test(T)?"0"+T.toLowerCase():"",D=x==="$"?r:/[%p]/.test(T)?a:"",O=IB[T],P=/[defgprs%]/.test(T);w=w===void 0?6:/[gprs]/.test(T)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function N(k){var G=C,Z=D,j,K,Y;if(T==="c")Z=O(k)+Z,k="";else{k=+k;var $=k<0||1/k<0;if(k=isNaN(k)?l:O(Math.abs(k),w),E&&(k=UTe(k)),$&&+k==0&&y!=="+"&&($=!1),G=($?y==="("?y:s:y==="-"||y==="("?"":y)+G,Z=(T==="s"?kB[8+Jj/3]:"")+Z+($&&y==="("?")":""),P){for(j=-1,K=k.length;++jY||Y>57){Z=(Y===46?i+k.slice(j+1):k.slice(j))+Z,k=k.slice(0,j);break}}}S&&!_&&(k=e(k,1/0));var W=G.length+k.length+Z.length,U=W>1)+G+k+Z+U.slice(W);break;default:k=U+G+k+Z;break}return o(k)}return N.toString=function(){return f+""},N}function c(f,d){var p=u((f=ib(f),f.type="f",f)),y=Math.max(-8,Math.min(8,Math.floor(fv(d)/3)))*3,x=Math.pow(10,-y),_=kB[8+y/3];return function(v){return p(x*v)+_}}return{format:u,formatPrefix:c}}var DS,lc,Qj;HTe({thousands:",",grouping:[3],currency:["$",""]});function HTe(t){return DS=$Te(t),lc=DS.format,Qj=DS.formatPrefix,DS}function VTe(t){return Math.max(0,-fv(Math.abs(t)))}function WTe(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(fv(e)/3)))*3-fv(Math.abs(t)))}function GTe(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,fv(e)-fv(t))+1}function jTe(t,e,n,r){var i=Lj(t,e,n),o;switch(r=ib(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=WTe(i,a))&&(r.precision=o),Qj(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=GTe(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=VTe(i))&&(r.precision=o-(r.type==="%")*2);break}}return lc(r)}function iI(t){var e=t.domain;return t.ticks=function(n){var r=e();return IP(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return jTe(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,o=r.length-1,a=r[i],s=r[o],l,u,c=10;for(s0;){if(u=FP(a,s,n),u===l)return r[i]=a,r[o]=s,e(r);if(u>0)a=Math.floor(a/u)*u,s=Math.ceil(s/u)*u;else if(u<0)a=Math.ceil(a*u)/u,s=Math.floor(s*u)/u;else break;l=u}return t},t}function eq(){var t=ITe();return t.copy=function(){return ZC(t,eq())},qC.apply(t,arguments),iI(t)}function qTe(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],o=t[r],a;return oMath.pow(t,e)}function JTe(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function zB(t){return(e,n)=>-t(-e,n)}function QTe(t){const e=t(BB,UB),n=e.domain;let r=10,i,o;function a(){return i=JTe(r),o=ZTe(r),n()[0]<0?(i=zB(i),o=zB(o),t(XTe,YTe)):t(BB,UB),e}return e.base=function(s){return arguments.length?(r=+s,a()):r},e.domain=function(s){return arguments.length?(n(s),a()):n()},e.ticks=s=>{const l=n();let u=l[0],c=l[l.length-1];const f=c0){for(;d<=p;++d)for(y=1;yc)break;v.push(x)}}else for(;d<=p;++d)for(y=r-1;y>=1;--y)if(x=d>0?y/o(-d):y*o(d),!(xc)break;v.push(x)}v.length*2<_&&(v=IP(u,c,_))}else v=IP(d,p,Math.min(p-d,_)).map(o);return f?v.reverse():v},e.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=ib(l)).precision==null&&(l.trim=!0),l=lc(l)),s===1/0)return l;const u=Math.max(1,r*s/e.ticks().length);return c=>{let f=c/o(Math.round(i(c)));return f*rn(qTe(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),e}function tq(){const t=QTe(JC()).domain([1,10]);return t.copy=()=>ZC(t,tq()).base(t.base()),qC.apply(t,arguments),t}function $B(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function HB(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function e3e(t){var e=1,n=t($B(e),HB(e));return n.constant=function(r){return arguments.length?t($B(e=+r),HB(e)):e},iI(n)}function nq(){var t=e3e(JC());return t.copy=function(){return ZC(t,nq()).constant(t.constant())},qC.apply(t,arguments)}function VB(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function t3e(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function n3e(t){return t<0?-t*t:t*t}function r3e(t){var e=t(zu,zu),n=1;function r(){return n===1?t(zu,zu):n===.5?t(t3e,n3e):t(VB(n),VB(1/n))}return e.exponent=function(i){return arguments.length?(n=+i,r()):n},iI(e)}function oI(){var t=r3e(JC());return t.copy=function(){return ZC(t,oI()).exponent(t.exponent())},qC.apply(t,arguments),t}function i3e(){return oI.apply(null,arguments).exponent(.5)}const q3=new Date,X3=new Date;function No(t,e,n,r){function i(o){return t(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(t(o=new Date(+o)),o),i.ceil=o=>(t(o=new Date(o-1)),e(o,1),t(o),o),i.round=o=>{const a=i(o),s=i.ceil(o);return o-a(e(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,s)=>{const l=[];if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o0))return l;let u;do l.push(u=new Date(+o)),e(o,s),t(o);while(uNo(a=>{if(a>=a)for(;t(a),!o(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;e(a,-1),!o(a););else for(;--s>=0;)for(;e(a,1),!o(a););}),n&&(i.count=(o,a)=>(q3.setTime(+o),X3.setTime(+a),t(q3),t(X3),Math.floor(n(q3,X3))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?a=>r(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const ob=1e3,Wd=ob*60,ab=Wd*60,sb=ab*24,rq=sb*7,aI=No(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*ob)},(t,e)=>(e-t)/ob,t=>t.getUTCSeconds());aI.range;const iq=No(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*ob)},(t,e)=>{t.setTime(+t+e*Wd)},(t,e)=>(e-t)/Wd,t=>t.getMinutes());iq.range;const oq=No(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*Wd)},(t,e)=>(e-t)/Wd,t=>t.getUTCMinutes());oq.range;const aq=No(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*ob-t.getMinutes()*Wd)},(t,e)=>{t.setTime(+t+e*ab)},(t,e)=>(e-t)/ab,t=>t.getHours());aq.range;const sq=No(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*ab)},(t,e)=>(e-t)/ab,t=>t.getUTCHours());sq.range;const lq=No(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Wd)/sb,t=>t.getDate()-1);lq.range;const uq=No(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/sb,t=>t.getUTCDate()-1);uq.range;const o3e=No(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/sb,t=>Math.floor(t/sb));o3e.range;function am(t){return No(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*Wd)/rq)}const cq=am(0),a3e=am(1),s3e=am(2),l3e=am(3),u3e=am(4),c3e=am(5),f3e=am(6);cq.range;a3e.range;s3e.range;l3e.range;u3e.range;c3e.range;f3e.range;function sm(t){return No(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/rq)}const fq=sm(0),d3e=sm(1),h3e=sm(2),p3e=sm(3),m3e=sm(4),g3e=sm(5),v3e=sm(6);fq.range;d3e.range;h3e.range;p3e.range;m3e.range;g3e.range;v3e.range;const dq=No(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());dq.range;const hq=No(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());hq.range;const sI=No(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());sI.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:No(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});sI.range;const lI=No(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());lI.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:No(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});lI.range;function y3e(t,e){e.domain&&("nice"in t||"quantiles"in t||"padding"in t,t.domain(e.domain))}function x3e(t,e){e.range&&("padding"in t,t.range(e.range))}function b3e(t,e){"align"in t&&"align"in e&&typeof e.align<"u"&&t.align(e.align)}function _3e(t,e){"base"in t&&"base"in e&&typeof e.base<"u"&&t.base(e.base)}function w3e(t,e){"clamp"in t&&"clamp"in e&&typeof e.clamp<"u"&&t.clamp(e.clamp)}function S3e(t,e){"constant"in t&&"constant"in e&&typeof e.constant<"u"&&t.constant(e.constant)}function E3e(t,e){"exponent"in t&&"exponent"in e&&typeof e.exponent<"u"&&t.exponent(e.exponent)}var WB={lab:MTe,hcl:CTe,"hcl-long":ATe,hsl:STe,"hsl-long":ETe,cubehelix:TTe,"cubehelix-long":KC,rgb:BP};function M3e(t){switch(t){case"lab":case"hcl":case"hcl-long":case"hsl":case"hsl-long":case"cubehelix":case"cubehelix-long":case"rgb":return WB[t]}var e=t.type,n=t.gamma,r=WB[e];return typeof n>"u"?r:r.gamma(n)}function C3e(t,e){if("interpolate"in e&&"interpolate"in t&&typeof e.interpolate<"u"){var n=M3e(e.interpolate);t.interpolate(n)}}var A3e=new Date(Date.UTC(2020,1,2,3,4,5)),T3e="%Y-%m-%d %H:%M";function D3e(t){var e=t.tickFormat(1,T3e)(A3e);return e==="2020-02-02 03:04"}var GB={day:lq,hour:aq,minute:iq,month:dq,second:aI,week:cq,year:sI},jB={day:uq,hour:sq,minute:oq,month:hq,second:aI,week:fq,year:lI};function R3e(t,e){if("nice"in e&&typeof e.nice<"u"&&"nice"in t){var n=e.nice;if(typeof n=="boolean")n&&t.nice();else if(typeof n=="number")t.nice(n);else{var r=t,i=D3e(r);if(typeof n=="string")r.nice(i?jB[n]:GB[n]);else{var o=n.interval,a=n.step,s=(i?jB[o]:GB[o]).every(a);s!=null&&r.nice(s)}}}}function P3e(t,e){"padding"in t&&"padding"in e&&typeof e.padding<"u"&&t.padding(e.padding),"paddingInner"in t&&"paddingInner"in e&&typeof e.paddingInner<"u"&&t.paddingInner(e.paddingInner),"paddingOuter"in t&&"paddingOuter"in e&&typeof e.paddingOuter<"u"&&t.paddingOuter(e.paddingOuter)}function N3e(t,e){if(e.reverse){var n=t.range().slice().reverse();"padding"in t,t.range(n)}}function O3e(t,e){"round"in e&&typeof e.round<"u"&&(e.round&&"interpolate"in e&&typeof e.interpolate<"u"?console.warn("[visx/scale/applyRound] ignoring round: scale config contains round and interpolate. only applying interpolate. config:",e):"round"in t?t.round(e.round):"interpolate"in t&&e.round&&t.interpolate(nI))}function I3e(t,e){"unknown"in t&&"unknown"in e&&typeof e.unknown<"u"&&t.unknown(e.unknown)}function F3e(t,e){if("zero"in e&&e.zero===!0){var n=t.domain(),r=n[0],i=n[1],o=i0,a=[],s=[],l=0,u=0,c,f;for(c=0;c0&&a.push("var "+s.join(",")),c=r-1;c>=0;--c)l=t[c],a.push(["for(i",c,"=0;i",c,"0&&a.push(["index[",u,"]-=s",u].join("")),a.push(["++index[",l,"]"].join(""))),a.push("}")}return a.join(` -`)}function eDe(t,e,n,r){for(var i=e.length,o=n.arrayArgs.length,a=n.blockSize,s=n.indexArgs.length>0,l=[],u=0;u0;){"].join("")),l.push(["if(j",u,"<",a,"){"].join("")),l.push(["s",e[u],"=j",u].join("")),l.push(["j",u,"=0"].join("")),l.push(["}else{s",e[u],"=",a].join("")),l.push(["j",u,"-=",a,"}"].join("")),s&&l.push(["index[",e[u],"]=j",u].join(""));for(var u=0;u ")}return null},n.getPublicRootInstance=function(m){if(m=m.current,!m.child)return null;switch(m.child.tag){case 5:return Y(m.child.stateNode);default:return m.child.stateNode}},n.injectIntoDevTools=function(m){if(m={bundleType:m.bundleType,version:m.version,rendererPackageName:m.rendererPackageName,rendererConfig:m.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:s.ReactCurrentDispatcher,findHostInstanceByFiber:HA,findFiberByHostInstance:m.findFiberByHostInstance||Z_,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.0.0-fc46dba67-20220329"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")m=!1;else{var g=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(g.isDisabled||!g.supportsFiber)m=!0;else{try{xm=g.inject(m),Gs=g}catch{}m=!!g.checkDCE}}return m},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(m,g,M,R){if(!Ue)throw Error(a(363));m=gy(m,g);var I=pe(m,M,R).disconnect;return{disconnect:function(){I()}}},n.registerMutableSourceForHydration=function(m,g){var M=g._getVersion;M=M(g._source),m.mutableSourceEagerHydrationData==null?m.mutableSourceEagerHydrationData=[g,M]:m.mutableSourceEagerHydrationData.push(g,M)},n.runWithPriority=function(m,g){var M=Vn;try{return Vn=m,g()}finally{Vn=M}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(m,g,M,R){var I=g.current,V=Ji(),fe=el(I);return M=zh(M),g.context===null?g.context=M:g.pendingContext=M,g=Xi(V,fe),g.payload={element:m},R=R===void 0?null:R,R!==null&&(g.callback=R),os(I,g),m=Pa(I,fe,V),m!==null&&Cf(m,I,fe),fe},n};wj.exports=dAe;var hAe=wj.exports;const pAe=su(hAe),Y4={},Mj=t=>void Object.assign(Y4,t);function mAe(t,e){function n(c,{args:f=[],attach:d,...p},y){let x=`${c[0].toUpperCase()}${c.slice(1)}`,_;if(c==="primitive"){if(p.object===void 0)throw new Error("R3F: Primitives without 'object' are invalid!");const v=p.object;_=k0(v,{type:c,root:y,attach:d,primitive:!0})}else{const v=Y4[x];if(!v)throw new Error(`R3F: ${x} 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(!Array.isArray(f))throw new Error("R3F: The args prop must be an array!");_=k0(new v(...f),{type:c,root:y,attach:d,memoizedProps:{args:f}})}return _.__r3f.attach===void 0&&(_ instanceof In?_.__r3f.attach="geometry":_ instanceof Po&&(_.__r3f.attach="material")),x!=="inject"&&k3(_,p),_}function r(c,f){let d=!1;if(f){var p,y;(p=f.__r3f)!=null&&p.attach?L3(c,f,f.__r3f.attach):f.isObject3D&&c.isObject3D&&(c.add(f),d=!0),d||(y=c.__r3f)==null||y.objects.push(f),f.__r3f||k0(f,{}),f.__r3f.parent=c,IP(f),B0(f)}}function i(c,f,d){let p=!1;if(f){var y,x;if((y=f.__r3f)!=null&&y.attach)L3(c,f,f.__r3f.attach);else if(f.isObject3D&&c.isObject3D){f.parent=c,f.dispatchEvent({type:"added"});const _=c.children.filter(S=>S!==f),v=_.indexOf(d);c.children=[..._.slice(0,v),f,..._.slice(v)],p=!0}p||(x=c.__r3f)==null||x.objects.push(f),f.__r3f||k0(f,{}),f.__r3f.parent=c,IP(f),B0(f)}}function o(c,f,d=!1){c&&[...c].forEach(p=>a(f,p,d))}function a(c,f,d){if(f){var p,y,x;if(f.__r3f&&(f.__r3f.parent=null),(p=c.__r3f)!=null&&p.objects&&(c.__r3f.objects=c.__r3f.objects.filter(E=>E!==f)),(y=f.__r3f)!=null&&y.attach)mB(c,f,f.__r3f.attach);else if(f.isObject3D&&c.isObject3D){var _;c.remove(f),(_=f.__r3f)!=null&&_.root&&SAe(f.__r3f.root,f)}const S=(x=f.__r3f)==null?void 0:x.primitive,w=d===void 0?f.dispose!==null&&!S:d;if(!S){var v;o((v=f.__r3f)==null?void 0:v.objects,f,w),o(f.children,f,w)}delete f.__r3f,w&&f.dispose&&f.type!=="Scene"&&NP.unstable_scheduleCallback(NP.unstable_IdlePriority,()=>{try{f.dispose()}catch{}}),B0(c)}}function s(c,f,d,p){var y;const x=(y=c.__r3f)==null?void 0:y.parent;if(!x)return;const _=n(f,d,c.__r3f.root);if(c.children){for(const v of c.children)v.__r3f&&r(_,v);c.children=c.children.filter(v=>!v.__r3f)}c.__r3f.objects.forEach(v=>r(_,v)),c.__r3f.objects=[],c.__r3f.autoRemovedBeforeAppend||a(x,c),_.parent&&(_.__r3f.autoRemovedBeforeAppend=!0),r(x,_),_.raycast&&_.__r3f.eventCount&&_.__r3f.root.getState().internal.interaction.push(_),[p,p.alternate].forEach(v=>{v!==null&&(v.stateNode=_,v.ref&&(typeof v.ref=="function"?v.ref(_):v.ref.current=_))})}const l=()=>console.warn("Text is not allowed in the R3F tree! This could be stray whitespace or characters.");return{reconciler:pAe({createInstance:n,removeChild:a,appendChild:r,appendInitialChild:r,insertBefore:i,supportsMutation:!0,isPrimaryRenderer:!1,supportsPersistence:!1,supportsHydration:!1,noTimeout:-1,appendChildToContainer:(c,f)=>{if(!f)return;const d=c.getState().scene;d.__r3f&&(d.__r3f.root=c,r(d,f))},removeChildFromContainer:(c,f)=>{f&&a(c.getState().scene,f)},insertInContainerBefore:(c,f,d)=>{if(!f||!d)return;const p=c.getState().scene;p.__r3f&&i(p,f,d)},getRootHostContext:()=>null,getChildHostContext:c=>c,finalizeInitialChildren(c){var f;return!!((f=c==null?void 0:c.__r3f)!=null?f:{}).handlers},prepareUpdate(c,f,d,p){var y;if(((y=c==null?void 0:c.__r3f)!=null?y:{}).primitive&&p.object&&p.object!==c)return[!0];{const{args:_=[],children:v,...S}=p,{args:w=[],children:E,...T}=d;if(!Array.isArray(_))throw new Error("R3F: the args prop must be an array!");if(_.some((D,O)=>D!==w[O]))return[!0];const C=Nj(c,S,T,!0);return C.changes.length?[!1,C]:null}},commitUpdate(c,[f,d],p,y,x,_){f?s(c,p,x,_):k3(c,d)},commitMount(c,f,d,p){var y;const x=(y=c.__r3f)!=null?y:{};c.raycast&&x.handlers&&x.eventCount&&c.__r3f.root.getState().internal.interaction.push(c)},getPublicInstance:c=>c,prepareForCommit:()=>null,preparePortalMount:c=>k0(c.getState().scene),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance(c){var f;const{attach:d,parent:p}=(f=c.__r3f)!=null?f:{};d&&p&&mB(p,c,d),c.isObject3D&&(c.visible=!1),B0(c)},unhideInstance(c,f){var d;const{attach:p,parent:y}=(d=c.__r3f)!=null?d:{};p&&y&&L3(y,c,p),(c.isObject3D&&f.visible==null||f.visible)&&(c.visible=!0),B0(c)},createTextInstance:l,hideTextInstance:l,unhideTextInstance:l,getCurrentEventPriority:()=>e?e():_g.DefaultEventPriority,beforeActiveInstanceBlur:()=>{},afterActiveInstanceBlur:()=>{},detachDeletedInstance:()=>{},now:typeof performance<"u"&&Fr.fun(performance.now)?performance.now:Fr.fun(Date.now)?Date.now:()=>0,scheduleTimeout:Fr.fun(setTimeout)?setTimeout:void 0,cancelTimeout:Fr.fun(clearTimeout)?clearTimeout:void 0}),applyProps:k3}}var fB,dB;const F3=t=>"colorSpace"in t||"outputColorSpace"in t,Cj=()=>{var t;return(t=Y4.ColorManagement)!=null?t:null},Aj=t=>t&&t.isOrthographicCamera,gAe=t=>t&&t.hasOwnProperty("current"),zb=typeof window<"u"&&((fB=window.document)!=null&&fB.createElement||((dB=window.navigator)==null?void 0:dB.product)==="ReactNative")?H.useLayoutEffect:H.useEffect;function Tj(t){const e=H.useRef(t);return zb(()=>void(e.current=t),[t]),e}function vAe({set:t}){return zb(()=>(t(new Promise(()=>null)),()=>t(!1)),[t]),null}class Dj extends H.Component{constructor(...e){super(...e),this.state={error:!1}}componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}}Dj.getDerivedStateFromError=()=>({error:!0});const Rj="__default",hB=new Map,yAe=t=>t&&!!t.memoized&&!!t.changes;function Pj(t){var e;const n=typeof window<"u"?(e=window.devicePixelRatio)!=null?e:2:1;return Array.isArray(t)?Math.min(Math.max(t[0],n),t[1]):t}const r1=t=>{var e;return(e=t.__r3f)==null?void 0:e.root.getState()},Fr={obj:t=>t===Object(t)&&!Fr.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,arr:t=>Array.isArray(t),equ(t,e,{arrays:n="shallow",objects:r="reference",strict:i=!0}={}){if(typeof t!=typeof e||!!t!=!!e)return!1;if(Fr.str(t)||Fr.num(t))return t===e;const o=Fr.obj(t);if(o&&r==="reference")return t===e;const a=Fr.arr(t);if(a&&n==="reference")return t===e;if((a||o)&&t===e)return!0;let s;for(s in t)if(!(s in e))return!1;if(o&&n==="shallow"&&r==="shallow"){for(s in i?e:t)if(!Fr.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(Fr.und(s)){if(a&&t.length===0&&e.length===0||o&&Object.keys(t).length===0&&Object.keys(e).length===0)return!0;if(t!==e)return!1}return!0}};function xAe(t){t.dispose&&t.type!=="Scene"&&t.dispose();for(const e in t)e.dispose==null||e.dispose(),delete t[e]}function k0(t,e){const n=t;return n.__r3f={type:"",root:null,previousAttach:null,memoizedProps:{},eventCount:0,handlers:{},objects:[],parent:null,...e},t}function OP(t,e){let n=t;if(e.includes("-")){const r=e.split("-"),i=r.pop();return n=r.reduce((o,a)=>o[a],t),{target:n,key:i}}else return{target:n,key:e}}const pB=/-\d+$/;function L3(t,e,n){if(Fr.str(n)){if(pB.test(n)){const o=n.replace(pB,""),{target:a,key:s}=OP(t,o);Array.isArray(a[s])||(a[s]=[])}const{target:r,key:i}=OP(t,n);e.__r3f.previousAttach=r[i],r[i]=e}else e.__r3f.previousAttach=n(t,e)}function mB(t,e,n){var r,i;if(Fr.str(n)){const{target:o,key:a}=OP(t,n),s=e.__r3f.previousAttach;s===void 0?delete o[a]:o[a]=s}else(r=e.__r3f)==null||r.previousAttach==null||r.previousAttach(t,e);(i=e.__r3f)==null||delete i.previousAttach}function Nj(t,{children:e,key:n,ref:r,...i},{children:o,key:a,ref:s,...l}={},u=!1){var c;const f=(c=t==null?void 0:t.__r3f)!=null?c:{},d=Object.entries(i),p=[];if(u){const x=Object.keys(l);for(let _=0;_{var v;if((v=t.__r3f)!=null&&v.primitive&&x==="object"||Fr.equ(_,l[x]))return;if(/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/.test(x))return p.push([x,_,!0,[]]);let S=[];x.includes("-")&&(S=x.split("-")),p.push([x,_,!1,S]);for(const w in i){const E=i[w];w.startsWith(`${x}-`)&&p.push([w,E,!1,w.split("-")])}});const y={...i};return f.memoizedProps&&f.memoizedProps.args&&(y.args=f.memoizedProps.args),f.memoizedProps&&f.memoizedProps.attach&&(y.attach=f.memoizedProps.attach),{memoized:y,changes:p}}const bAe=typeof process<"u"&&!1;function k3(t,e){var n,r,i;const o=(n=t.__r3f)!=null?n:{},a=o.root,s=(r=a==null||a.getState==null?void 0:a.getState())!=null?r:{},{memoized:l,changes:u}=yAe(e)?e:Nj(t,e),c=o.eventCount;t.__r3f&&(t.__r3f.memoizedProps=l);for(let d=0;dw[E],t),!(S&&S.set))){const[w,...E]=_.reverse();v=E.reverse().reduce((T,C)=>T[C],t),p=w}if(y===Rj+"remove")if(v.constructor){let w=hB.get(v.constructor);w||(w=new v.constructor,hB.set(v.constructor,w)),y=w[p]}else y=0;if(x)y?o.handlers[p]=y:delete o.handlers[p],o.eventCount=Object.keys(o.handlers).length;else if(S&&S.set&&(S.copy||S instanceof Rp)){if(Array.isArray(y))S.fromArray?S.fromArray(y):S.set(...y);else if(S.copy&&y&&y.constructor&&(bAe?S.constructor.name===y.constructor.name:S.constructor===y.constructor))S.copy(y);else if(y!==void 0){const w=S instanceof Pt;!w&&S.setScalar?S.setScalar(y):S instanceof Rp&&y instanceof Rp?S.mask=y.mask:S.set(y),!Cj()&&!s.linear&&w&&S.convertSRGBToLinear()}}else if(v[p]=y,v[p]instanceof hi&&v[p].format===ba&&v[p].type===Ls){const w=v[p];F3(w)&&F3(s.gl)?w.colorSpace=s.gl.outputColorSpace:w.encoding=s.gl.outputEncoding}B0(t)}if(o.parent&&s.internal&&t.raycast&&c!==o.eventCount){const d=s.internal.interaction.indexOf(t);d>-1&&s.internal.interaction.splice(d,1),o.eventCount&&s.internal.interaction.push(t)}return!(u.length===1&&u[0][0]==="onUpdate")&&u.length&&(i=t.__r3f)!=null&&i.parent&&IP(t),t}function B0(t){var e,n;const r=(e=t.__r3f)==null||(n=e.root)==null||n.getState==null?void 0:n.getState();r&&r.internal.frames===0&&r.invalidate()}function IP(t){t.onUpdate==null||t.onUpdate(t)}function _Ae(t,e){t.manual||(Aj(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(),t.updateMatrixWorld())}function MS(t){return(t.eventObject||t.object).uuid+"/"+t.index+t.instanceId}function wAe(){var t;const e=typeof self<"u"&&self||typeof window<"u"&&window;if(!e)return _g.DefaultEventPriority;switch((t=e.event)==null?void 0:t.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return _g.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return _g.ContinuousEventPriority;default:return _g.DefaultEventPriority}}function Oj(t,e,n,r){const i=n.get(e);i&&(n.delete(e),n.size===0&&(t.delete(r),i.target.releasePointerCapture(r)))}function SAe(t,e){const{internal:n}=t.getState();n.interaction=n.interaction.filter(r=>r!==e),n.initialHits=n.initialHits.filter(r=>r!==e),n.hovered.forEach((r,i)=>{(r.eventObject===e||r.object===e)&&n.hovered.delete(i)}),n.capturedMap.forEach((r,i)=>{Oj(n.capturedMap,e,r,i)})}function EAe(t){function e(l){const{internal:u}=t.getState(),c=l.offsetX-u.initialClick[0],f=l.offsetY-u.initialClick[1];return Math.round(Math.sqrt(c*c+f*f))}function n(l){return l.filter(u=>["Move","Over","Enter","Out","Leave"].some(c=>{var f;return(f=u.__r3f)==null?void 0:f.handlers["onPointer"+c]}))}function r(l,u){const c=t.getState(),f=new Set,d=[],p=u?u(c.internal.interaction):c.internal.interaction;for(let v=0;v{const w=r1(v.object),E=r1(S.object);return!w||!E?v.distance-S.distance:E.events.priority-w.events.priority||v.distance-S.distance}).filter(v=>{const S=MS(v);return f.has(S)?!1:(f.add(S),!0)});c.events.filter&&(x=c.events.filter(x,c));for(const v of x){let S=v.object;for(;S;){var _;(_=S.__r3f)!=null&&_.eventCount&&d.push({...v,eventObject:S}),S=S.parent}}if("pointerId"in l&&c.internal.capturedMap.has(l.pointerId))for(let v of c.internal.capturedMap.get(l.pointerId).values())f.has(MS(v.intersection))||d.push(v.intersection);return d}function i(l,u,c,f){const d=t.getState();if(l.length){const p={stopped:!1};for(const y of l){const x=r1(y.object)||d,{raycaster:_,pointer:v,camera:S,internal:w}=x,E=new ae(v.x,v.y,0).unproject(S),T=N=>{var k,G;return(k=(G=w.capturedMap.get(N))==null?void 0:G.has(y.eventObject))!=null?k:!1},C=N=>{const k={intersection:y,target:u.target};w.capturedMap.has(N)?w.capturedMap.get(N).set(y.eventObject,k):w.capturedMap.set(N,new Map([[y.eventObject,k]])),u.target.setPointerCapture(N)},D=N=>{const k=w.capturedMap.get(N);k&&Oj(w.capturedMap,y.eventObject,k,N)};let O={};for(let N in u){let k=u[N];typeof k!="function"&&(O[N]=k)}let P={...y,...O,pointer:v,intersections:l,stopped:p.stopped,delta:c,unprojectedPoint:E,ray:_.ray,camera:S,stopPropagation(){const N="pointerId"in u&&w.capturedMap.get(u.pointerId);if((!N||N.has(y.eventObject))&&(P.stopped=p.stopped=!0,w.hovered.size&&Array.from(w.hovered.values()).find(k=>k.eventObject===y.eventObject))){const k=l.slice(0,l.indexOf(y));o([...k,y])}},target:{hasPointerCapture:T,setPointerCapture:C,releasePointerCapture:D},currentTarget:{hasPointerCapture:T,setPointerCapture:C,releasePointerCapture:D},nativeEvent:u};if(f(P),p.stopped===!0)break}}return l}function o(l){const{internal:u}=t.getState();for(const c of u.hovered.values())if(!l.length||!l.find(f=>f.object===c.object&&f.index===c.index&&f.instanceId===c.instanceId)){const d=c.eventObject.__r3f,p=d==null?void 0:d.handlers;if(u.hovered.delete(MS(c)),d!=null&&d.eventCount){const y={...c,intersections:l};p.onPointerOut==null||p.onPointerOut(y),p.onPointerLeave==null||p.onPointerLeave(y)}}}function a(l,u){for(let c=0;co([]);case"onLostPointerCapture":return u=>{const{internal:c}=t.getState();"pointerId"in u&&c.capturedMap.has(u.pointerId)&&requestAnimationFrame(()=>{c.capturedMap.has(u.pointerId)&&(c.capturedMap.delete(u.pointerId),o([]))})}}return function(c){const{onPointerMissed:f,internal:d}=t.getState();d.lastEvent.current=c;const p=l==="onPointerMove",y=l==="onClick"||l==="onContextMenu"||l==="onDoubleClick",_=r(c,p?n:void 0),v=y?e(c):0;l==="onPointerDown"&&(d.initialClick=[c.offsetX,c.offsetY],d.initialHits=_.map(w=>w.eventObject)),y&&!_.length&&v<=2&&(a(c,d.interaction),f&&f(c)),p&&o(_);function S(w){const E=w.eventObject,T=E.__r3f,C=T==null?void 0:T.handlers;if(T!=null&&T.eventCount)if(p){if(C.onPointerOver||C.onPointerEnter||C.onPointerOut||C.onPointerLeave){const D=MS(w),O=d.hovered.get(D);O?O.stopped&&w.stopPropagation():(d.hovered.set(D,w),C.onPointerOver==null||C.onPointerOver(w),C.onPointerEnter==null||C.onPointerEnter(w))}C.onPointerMove==null||C.onPointerMove(w)}else{const D=C[l];D?(!y||d.initialHits.includes(E))&&(a(c,d.interaction.filter(O=>!d.initialHits.includes(O))),D(w)):y&&d.initialHits.includes(E)&&a(c,d.interaction.filter(O=>!d.initialHits.includes(O)))}}i(_,c,v,S)}}return{handlePointer:s}}const Ij=t=>!!(t!=null&&t.render),Fj=H.createContext(null),MAe=(t,e)=>{const n=fAe((s,l)=>{const u=new ae,c=new ae,f=new ae;function d(v=l().camera,S=c,w=l().size){const{width:E,height:T,top:C,left:D}=w,O=E/T;S instanceof ae?f.copy(S):f.set(...S);const P=v.getWorldPosition(u).distanceTo(f);if(Aj(v))return{width:E/v.zoom,height:T/v.zoom,top:C,left:D,factor:1,distance:P,aspect:O};{const N=v.fov*Math.PI/180,k=2*Math.tan(N/2)*P,G=k*(E/T);return{width:G,height:k,top:C,left:D,factor:E/G,distance:P,aspect:O}}}let p;const y=v=>s(S=>({performance:{...S.performance,current:v}})),x=new Je;return{set:s,get:l,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},xr:null,scene:null,invalidate:(v=1)=>t(l(),v),advance:(v,S)=>e(v,S,l()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new G4,pointer:x,mouse:x,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const v=l();p&&clearTimeout(p),v.performance.current!==v.performance.min&&y(v.performance.min),p=setTimeout(()=>y(l().performance.max),v.performance.debounce)}},size:{width:0,height:0,top:0,left:0,updateStyle:!1},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:d},setEvents:v=>s(S=>({...S,events:{...S.events,...v}})),setSize:(v,S,w,E,T)=>{const C=l().camera,D={width:v,height:S,top:E||0,left:T||0,updateStyle:w};s(O=>({size:D,viewport:{...O.viewport,...d(C,c,D)}}))},setDpr:v=>s(S=>{const w=Pj(v);return{viewport:{...S.viewport,dpr:w,initialDpr:S.viewport.initialDpr||w}}}),setFrameloop:(v="always")=>{const S=l().clock;S.stop(),S.elapsedTime=0,v!=="never"&&(S.start(),S.elapsedTime=0),s(()=>({frameloop:v}))},previousRoot:void 0,internal:{active:!1,priority:0,frames:0,lastEvent:H.createRef(),interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,subscribe:(v,S,w)=>{const E=l().internal;return E.priority=E.priority+(S>0?1:0),E.subscribers.push({ref:v,priority:S,store:w}),E.subscribers=E.subscribers.sort((T,C)=>T.priority-C.priority),()=>{const T=l().internal;T!=null&&T.subscribers&&(T.priority=T.priority-(S>0?1:0),T.subscribers=T.subscribers.filter(C=>C.ref!==v))}}}}}),r=n.getState();let i=r.size,o=r.viewport.dpr,a=r.camera;return n.subscribe(()=>{const{camera:s,size:l,viewport:u,gl:c,set:f}=n.getState();if(l.width!==i.width||l.height!==i.height||u.dpr!==o){var d;i=l,o=u.dpr,_Ae(s,l),c.setPixelRatio(u.dpr);const p=(d=l.updateStyle)!=null?d:typeof HTMLCanvasElement<"u"&&c.domElement instanceof HTMLCanvasElement;c.setSize(l.width,l.height,p)}s!==a&&(a=s,f(p=>({viewport:{...p.viewport,...p.viewport.getCurrentViewport(s)}})))}),n.subscribe(s=>t(s)),n};let CS,CAe=new Set,AAe=new Set,TAe=new Set;function B3(t,e){if(t.size)for(const{callback:n}of t.values())n(e)}function i1(t,e){switch(t){case"before":return B3(CAe,e);case"after":return B3(AAe,e);case"tail":return B3(TAe,e)}}let U3,z3;function $3(t,e,n){let r=e.clock.getDelta();for(e.frameloop==="never"&&typeof t=="number"&&(r=t-e.clock.elapsedTime,e.clock.oldTime=e.clock.elapsedTime,e.clock.elapsedTime=t),U3=e.internal.subscribers,CS=0;CS0)&&!((u=i.gl.xr)!=null&&u.isPresenting)&&(n+=$3(l,i))}if(i1("after",l),n===0)return i1("tail",l),e=!1,cancelAnimationFrame(r)}function a(l,u=1){var c;if(!l)return t.forEach(f=>a(f.store.getState()),u);(c=l.gl.xr)!=null&&c.isPresenting||!l.internal.active||l.frameloop==="never"||(l.internal.frames=Math.min(60,l.internal.frames+u),e||(e=!0,requestAnimationFrame(o)))}function s(l,u=!0,c,f){if(u&&i1("before",l),c)$3(l,c,f);else for(const d of t.values())$3(l,d.store.getState());u&&i1("after",l)}return{loop:o,invalidate:a,advance:s}}function Lj(){const t=H.useContext(Fj);if(!t)throw new Error("R3F: Hooks can only be used within the Canvas component!");return t}function Do(t=n=>n,e){return Lj()(t,e)}function K4(t,e=0){const n=Lj(),r=n.getState().internal.subscribe,i=Tj(t);return zb(()=>r(i,e,n),[e,r,n]),null}const fv=new Map,{invalidate:gB,advance:vB}=DAe(fv),{reconciler:C2,applyProps:T0}=mAe(fv,wAe),D0={objects:"shallow",strict:!1},RAe=(t,e)=>{const n=typeof t=="function"?t(e):t;return Ij(n)?n:new T4({powerPreference:"high-performance",canvas:e,antialias:!0,alpha:!0,...t})};function PAe(t,e){const n=typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement;if(e){const{width:r,height:i,top:o,left:a,updateStyle:s=n}=e;return{width:r,height:i,top:o,left:a,updateStyle:s}}else if(typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement&&t.parentElement){const{width:r,height:i,top:o,left:a}=t.parentElement.getBoundingClientRect();return{width:r,height:i,top:o,left:a,updateStyle:n}}else if(typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas)return{width:t.width,height:t.height,top:0,left:0,updateStyle:n};return{width:0,height:0,top:0,left:0}}function NAe(t){const e=fv.get(t),n=e==null?void 0:e.fiber,r=e==null?void 0:e.store;e&&console.warn("R3F.createRoot should only be called once!");const i=typeof reportError=="function"?reportError:console.error,o=r||MAe(gB,vB),a=n||C2.createContainer(o,_g.ConcurrentRoot,null,!1,null,"",i,null);e||fv.set(t,{fiber:a,store:o});let s,l=!1,u;return{configure(c={}){let{gl:f,size:d,scene:p,events:y,onCreated:x,shadows:_=!1,linear:v=!1,flat:S=!1,legacy:w=!1,orthographic:E=!1,frameloop:T="always",dpr:C=[1,2],performance:D,raycaster:O,camera:P,onPointerMissed:N}=c,k=o.getState(),G=k.gl;k.gl||k.set({gl:G=RAe(f,t)});let Z=k.raycaster;Z||k.set({raycaster:Z=new xj});const{params:j,...K}=O||{};if(Fr.equ(K,Z,D0)||T0(Z,{...K}),Fr.equ(j,Z.params,D0)||T0(Z,{params:{...Z.params,...j}}),!k.camera||k.camera===u&&!Fr.equ(u,P,D0)){u=P;const le=P instanceof Nb,ce=le?P:E?new Fb(0,0,0,0,.1,1e3):new uo(75,0,.1,1e3);le||(ce.position.z=5,P&&T0(ce,P),!k.camera&&!(P!=null&&P.rotation)&&ce.lookAt(0,0,0)),k.set({camera:ce}),Z.camera=ce}if(!k.scene){let le;p instanceof E2?le=p:(le=new E2,p&&T0(le,p)),k.set({scene:k0(le)})}if(!k.xr){var Y;const le=(Re,Ie)=>{const He=o.getState();He.frameloop!=="never"&&vB(Re,!0,He,Ie)},ce=()=>{const Re=o.getState();Re.gl.xr.enabled=Re.gl.xr.isPresenting,Re.gl.xr.setAnimationLoop(Re.gl.xr.isPresenting?le:null),Re.gl.xr.isPresenting||gB(Re)},Ce={connect(){const Re=o.getState().gl;Re.xr.addEventListener("sessionstart",ce),Re.xr.addEventListener("sessionend",ce)},disconnect(){const Re=o.getState().gl;Re.xr.removeEventListener("sessionstart",ce),Re.xr.removeEventListener("sessionend",ce)}};typeof((Y=G.xr)==null?void 0:Y.addEventListener)=="function"&&Ce.connect(),k.set({xr:Ce})}if(G.shadowMap){const le=G.shadowMap.enabled,ce=G.shadowMap.type;if(G.shadowMap.enabled=!!_,Fr.boo(_))G.shadowMap.type=j1;else if(Fr.str(_)){var $;const Ce={basic:fW,percentage:_C,soft:j1,variance:Gl};G.shadowMap.type=($=Ce[_])!=null?$:j1}else Fr.obj(_)&&Object.assign(G.shadowMap,_);(le!==G.shadowMap.enabled||ce!==G.shadowMap.type)&&(G.shadowMap.needsUpdate=!0)}const W=Cj();W&&("enabled"in W?W.enabled=!w:"legacyMode"in W&&(W.legacyMode=w)),T0(G,{outputEncoding:v?3e3:3001,toneMapping:S?ju:u4}),k.legacy!==w&&k.set(()=>({legacy:w})),k.linear!==v&&k.set(()=>({linear:v})),k.flat!==S&&k.set(()=>({flat:S})),f&&!Fr.fun(f)&&!Ij(f)&&!Fr.equ(f,G,D0)&&T0(G,f),y&&!k.events.handlers&&k.set({events:y(o)});const re=PAe(t,d);return Fr.equ(re,k.size,D0)||k.setSize(re.width,re.height,re.updateStyle,re.top,re.left),C&&k.viewport.dpr!==Pj(C)&&k.setDpr(C),k.frameloop!==T&&k.setFrameloop(T),k.onPointerMissed||k.set({onPointerMissed:N}),D&&!Fr.equ(D,k.performance,D0)&&k.set(le=>({performance:{...le.performance,...D}})),s=x,l=!0,this},render(c){return l||this.configure(),C2.updateContainer(H.createElement(OAe,{store:o,children:c,onCreated:s,rootElement:t}),a,null,()=>{}),o},unmount(){kj(t)}}}function OAe({store:t,children:e,onCreated:n,rootElement:r}){return zb(()=>{const i=t.getState();i.set(o=>({internal:{...o.internal,active:!0}})),n&&n(i),t.getState().events.connected||i.events.connect==null||i.events.connect(r)},[]),H.createElement(Fj.Provider,{value:t},e)}function kj(t,e){const n=fv.get(t),r=n==null?void 0:n.fiber;if(r){const i=n==null?void 0:n.store.getState();i&&(i.internal.active=!1),C2.updateContainer(null,r,null,()=>{i&&setTimeout(()=>{try{var o,a,s,l;i.events.disconnect==null||i.events.disconnect(),(o=i.gl)==null||(a=o.renderLists)==null||a.dispose==null||a.dispose(),(s=i.gl)==null||s.forceContextLoss==null||s.forceContextLoss(),(l=i.gl)!=null&&l.xr&&i.xr.disconnect(),xAe(i),fv.delete(t),e&&e(t)}catch{}},500)})}}C2.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:H.version});function FP(t,e,n){var r,i,o,a,s;e==null&&(e=100);function l(){var c=Date.now()-a;c=0?r=setTimeout(l,e-c):(r=null,n||(s=t.apply(o,i),o=i=null))}var u=function(){o=this,i=arguments,a=Date.now();var c=n&&!r;return r||(r=setTimeout(l,e)),c&&(s=t.apply(o,i),o=i=null),s};return u.clear=function(){r&&(clearTimeout(r),r=null)},u.flush=function(){r&&(s=t.apply(o,i),o=i=null,clearTimeout(r),r=null)},u}FP.debounce=FP;var IAe=FP;const yB=su(IAe);function FAe(t){let{debounce:e,scroll:n,polyfill:r,offsetSize:i}=t===void 0?{debounce:0,scroll:!1,offsetSize:!1}:t;const o=r||(typeof window>"u"?class{}:window.ResizeObserver);if(!o)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,s]=H.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),l=H.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:a}),u=e?typeof e=="number"?e:e.scroll:null,c=e?typeof e=="number"?e:e.resize:null,f=H.useRef(!1);H.useEffect(()=>(f.current=!0,()=>void(f.current=!1)));const[d,p,y]=H.useMemo(()=>{const S=()=>{if(!l.current.element)return;const{left:w,top:E,width:T,height:C,bottom:D,right:O,x:P,y:N}=l.current.element.getBoundingClientRect(),k={left:w,top:E,width:T,height:C,bottom:D,right:O,x:P,y:N};l.current.element instanceof HTMLElement&&i&&(k.height=l.current.element.offsetHeight,k.width=l.current.element.offsetWidth),Object.freeze(k),f.current&&!UAe(l.current.lastBounds,k)&&s(l.current.lastBounds=k)};return[S,c?yB(S,c):S,u?yB(S,u):S]},[s,i,u,c]);function x(){l.current.scrollContainers&&(l.current.scrollContainers.forEach(S=>S.removeEventListener("scroll",y,!0)),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null)}function _(){l.current.element&&(l.current.resizeObserver=new o(y),l.current.resizeObserver.observe(l.current.element),n&&l.current.scrollContainers&&l.current.scrollContainers.forEach(S=>S.addEventListener("scroll",y,{capture:!0,passive:!0})))}const v=S=>{!S||S===l.current.element||(x(),l.current.element=S,l.current.scrollContainers=Bj(S),_())};return kAe(y,!!n),LAe(p),H.useEffect(()=>{x(),_()},[n,y,p]),H.useEffect(()=>x,[]),[v,a,d]}function LAe(t){H.useEffect(()=>{const e=t;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[t])}function kAe(t,e){H.useEffect(()=>{if(e){const n=t;return window.addEventListener("scroll",n,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",n,!0)}},[t,e])}function Bj(t){const e=[];if(!t||t===document.body)return e;const{overflow:n,overflowX:r,overflowY:i}=window.getComputedStyle(t);return[n,r,i].some(o=>o==="auto"||o==="scroll")&&e.push(t),[...e,...Bj(t.parentElement)]}const BAe=["x","y","top","bottom","left","right","width","height"],UAe=(t,e)=>BAe.every(n=>t[n]===e[n]);var zAe=Object.defineProperty,$Ae=Object.defineProperties,HAe=Object.getOwnPropertyDescriptors,xB=Object.getOwnPropertySymbols,VAe=Object.prototype.hasOwnProperty,WAe=Object.prototype.propertyIsEnumerable,bB=(t,e,n)=>e in t?zAe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,_B=(t,e)=>{for(var n in e||(e={}))VAe.call(e,n)&&bB(t,n,e[n]);if(xB)for(var n of xB(e))WAe.call(e,n)&&bB(t,n,e[n]);return t},GAe=(t,e)=>$Ae(t,HAe(e));function Uj(t,e,n){if(!t)return;if(n(t)===!0)return t;let r=e?t.return:t.child;for(;r;){const i=Uj(r,e,n);if(i)return i;r=e?null:r.sibling}}function zj(t){try{return Object.defineProperties(t,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return t}}const Z4=zj(H.createContext(null));class $j extends H.Component{render(){return H.createElement(Z4.Provider,{value:this._reactInternals},this.props.children)}}const{ReactCurrentOwner:wB,ReactCurrentDispatcher:SB}=H.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function jAe(){const t=H.useContext(Z4);if(t===null)throw new Error("its-fine: useFiber must be called within a !");const e=H.useId();return H.useMemo(()=>{for(const r of[wB==null?void 0:wB.current,t,t==null?void 0:t.alternate]){if(!r)continue;const i=Uj(r,!1,o=>{let a=o.memoizedState;for(;a;){if(a.memoizedState===e)return!0;a=a.next}});if(i)return i}},[t,e])}function qAe(){var t,e;const n=jAe(),[r]=H.useState(()=>new Map);r.clear();let i=n;for(;i;){const o=(t=i.type)==null?void 0:t._context;o&&o!==Z4&&!r.has(o)&&r.set(o,(e=SB==null?void 0:SB.current)==null?void 0:e.readContext(zj(o))),i=i.return}return r}function XAe(){const t=qAe();return H.useMemo(()=>Array.from(t.keys()).reduce((e,n)=>r=>H.createElement(e,null,H.createElement(n.Provider,GAe(_B({},r),{value:t.get(n)}))),e=>H.createElement($j,_B({},e))),[t])}const H3={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 YAe(t){const{handlePointer:e}=EAe(t);return{priority:1,enabled:!0,compute(n,r,i){r.pointer.set(n.offsetX/r.size.width*2-1,-(n.offsetY/r.size.height)*2+1),r.raycaster.setFromCamera(r.pointer,r.camera)},connected:void 0,handlers:Object.keys(H3).reduce((n,r)=>({...n,[r]:e(r)}),{}),update:()=>{var n;const{events:r,internal:i}=t.getState();(n=i.lastEvent)!=null&&n.current&&r.handlers&&r.handlers.onPointerMove(i.lastEvent.current)},connect:n=>{var r;const{set:i,events:o}=t.getState();o.disconnect==null||o.disconnect(),i(a=>({events:{...a.events,connected:n}})),Object.entries((r=o.handlers)!=null?r:[]).forEach(([a,s])=>{const[l,u]=H3[a];n.addEventListener(l,s,{passive:u})})},disconnect:()=>{const{set:n,events:r}=t.getState();if(r.connected){var i;Object.entries((i=r.handlers)!=null?i:[]).forEach(([o,a])=>{if(r&&r.connected instanceof HTMLElement){const[s]=H3[o];r.connected.removeEventListener(s,a)}}),n(o=>({events:{...o.events,connected:void 0}}))}}}}const KAe=H.forwardRef(function({children:e,fallback:n,resize:r,style:i,gl:o,events:a=YAe,eventSource:s,eventPrefix:l,shadows:u,linear:c,flat:f,legacy:d,orthographic:p,frameloop:y,dpr:x,performance:_,raycaster:v,camera:S,scene:w,onPointerMissed:E,onCreated:T,...C},D){H.useMemo(()=>Mj(lAe),[]);const O=XAe(),[P,N]=FAe({scroll:!0,debounce:{scroll:50,resize:0},...r}),k=H.useRef(null),G=H.useRef(null);H.useImperativeHandle(D,()=>k.current);const Z=Tj(E),[j,K]=H.useState(!1),[Y,$]=H.useState(!1);if(j)throw j;if(Y)throw Y;const W=H.useRef(null);zb(()=>{const te=k.current;N.width>0&&N.height>0&&te&&(W.current||(W.current=NAe(te)),W.current.configure({gl:o,events:a,shadows:u,linear:c,flat:f,legacy:d,orthographic:p,frameloop:y,dpr:x,performance:_,raycaster:v,camera:S,scene:w,size:N,onPointerMissed:(...re)=>Z.current==null?void 0:Z.current(...re),onCreated:re=>{re.events.connect==null||re.events.connect(s?gAe(s)?s.current:s:G.current),l&&re.setEvents({compute:(le,ce)=>{const Ce=le[l+"X"],Re=le[l+"Y"];ce.pointer.set(Ce/ce.size.width*2-1,-(Re/ce.size.height)*2+1),ce.raycaster.setFromCamera(ce.pointer,ce.camera)}}),T==null||T(re)}}),W.current.render(H.createElement(O,null,H.createElement(Dj,{set:$},H.createElement(H.Suspense,{fallback:H.createElement(vAe,{set:K})},e)))))}),H.useEffect(()=>{const te=k.current;if(te)return()=>kj(te)},[]);const U=s?"none":"auto";return H.createElement("div",Q({ref:G,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:U,...i}},C),H.createElement("div",{ref:P,style:{width:"100%",height:"100%"}},H.createElement("canvas",{ref:k,style:{display:"block"}},n)))}),ZAe=H.forwardRef(function(e,n){return H.createElement($j,null,H.createElement(KAe,Q({},e,{ref:n})))});function yE(t,e){return t==null||e==null?NaN:te?1:t>=e?0:NaN}function JAe(t,e){return t==null||e==null?NaN:et?1:e>=t?0:NaN}function Hj(t){let e,n,r;t.length!==2?(e=yE,n=(s,l)=>yE(t(s),l),r=(s,l)=>t(s)-l):(e=t===yE||t===JAe?t:QAe,n=t,r=t);function i(s,l,u=0,c=s.length){if(u>>1;n(s[f],l)<0?u=f+1:c=f}while(u>>1;n(s[f],l)<=0?u=f+1:c=f}while(uu&&r(s[f-1],l)>-r(s[f],l)?f-1:f}return{left:i,center:a,right:o}}function QAe(){return 0}function eTe(t){return t===null?NaN:+t}const tTe=Hj(yE),nTe=tTe.right;Hj(eTe).center;const rTe=nTe,iTe=Math.sqrt(50),oTe=Math.sqrt(10),aTe=Math.sqrt(2);function A2(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=iTe?10:o>=oTe?5:o>=aTe?2:1;let s,l,u;return i<0?(u=Math.pow(10,-i)/a,s=Math.round(t*u),l=Math.round(e*u),s/ue&&--l,u=-u):(u=Math.pow(10,i)*a,s=Math.round(t/u),l=Math.round(e/u),s*ue&&--l),l0))return[];if(t===e)return[t];const r=e=i))return[];const s=o-i+1,l=new Array(s);if(r)if(a<0)for(let u=0;u>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?AS(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?AS(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=lTe.exec(t))?new ho(e[1],e[2],e[3],1):(e=uTe.exec(t))?new ho(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=cTe.exec(t))?AS(e[1],e[2],e[3],e[4]):(e=fTe.exec(t))?AS(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=dTe.exec(t))?RB(e[1],e[2]/100,e[3]/100,1):(e=hTe.exec(t))?RB(e[1],e[2]/100,e[3]/100,e[4]):EB.hasOwnProperty(t)?AB(EB[t]):t==="transparent"?new ho(NaN,NaN,NaN,0):null}function AB(t){return new ho(t>>16&255,t>>8&255,t&255,1)}function AS(t,e,n,r){return r<=0&&(t=e=n=NaN),new ho(t,e,n,r)}function J4(t){return t instanceof sh||(t=rb(t)),t?(t=t.rgb(),new ho(t.r,t.g,t.b,t.opacity)):new ho}function Wd(t,e,n,r){return arguments.length===1?J4(t):new ho(t,e,n,r??1)}function ho(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}Rv(ho,Wd,$b(sh,{brighter(t){return t=t==null?dv:Math.pow(dv,t),new ho(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Yp:Math.pow(Yp,t),new ho(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ho(Np(this.r),Np(this.g),Np(this.b),T2(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:TB,formatHex:TB,formatHex8:gTe,formatRgb:DB,toString:DB}));function TB(){return`#${bp(this.r)}${bp(this.g)}${bp(this.b)}`}function gTe(){return`#${bp(this.r)}${bp(this.g)}${bp(this.b)}${bp((isNaN(this.opacity)?1:this.opacity)*255)}`}function DB(){const t=T2(this.opacity);return`${t===1?"rgb(":"rgba("}${Np(this.r)}, ${Np(this.g)}, ${Np(this.b)}${t===1?")":`, ${t})`}`}function T2(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Np(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function bp(t){return t=Np(t),(t<16?"0":"")+t.toString(16)}function RB(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Kl(t,e,n,r)}function Wj(t){if(t instanceof Kl)return new Kl(t.h,t.s,t.l,t.opacity);if(t instanceof sh||(t=rb(t)),!t)return new Kl;if(t instanceof Kl)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(e===o?a=(n-r)/s+(n0&&l<1?0:a,new Kl(a,s,l,t.opacity)}function D2(t,e,n,r){return arguments.length===1?Wj(t):new Kl(t,e,n,r??1)}function Kl(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Rv(Kl,D2,$b(sh,{brighter(t){return t=t==null?dv:Math.pow(dv,t),new Kl(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Yp:Math.pow(Yp,t),new Kl(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new ho(V3(t>=240?t-240:t+120,i,r),V3(t,i,r),V3(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Kl(PB(this.h),TS(this.s),TS(this.l),T2(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 t=T2(this.opacity);return`${t===1?"hsl(":"hsla("}${PB(this.h)}, ${TS(this.s)*100}%, ${TS(this.l)*100}%${t===1?")":`, ${t})`}`}}));function PB(t){return t=(t||0)%360,t<0?t+360:t}function TS(t){return Math.max(0,Math.min(1,t||0))}function V3(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const Gj=Math.PI/180,jj=180/Math.PI,R2=18,qj=.96422,Xj=1,Yj=.82521,Kj=4/29,Bg=6/29,Zj=3*Bg*Bg,vTe=Bg*Bg*Bg;function Jj(t){if(t instanceof Yu)return new Yu(t.l,t.a,t.b,t.opacity);if(t instanceof Kc)return Qj(t);t instanceof ho||(t=J4(t));var e=q3(t.r),n=q3(t.g),r=q3(t.b),i=W3((.2225045*e+.7168786*n+.0606169*r)/Xj),o,a;return e===n&&n===r?o=a=i:(o=W3((.4360747*e+.3850649*n+.1430804*r)/qj),a=W3((.0139322*e+.0971045*n+.7141733*r)/Yj)),new Yu(116*i-16,500*(o-i),200*(i-a),t.opacity)}function BP(t,e,n,r){return arguments.length===1?Jj(t):new Yu(t,e,n,r??1)}function Yu(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}Rv(Yu,BP,$b(sh,{brighter(t){return new Yu(this.l+R2*(t??1),this.a,this.b,this.opacity)},darker(t){return new Yu(this.l-R2*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=qj*G3(e),t=Xj*G3(t),n=Yj*G3(n),new ho(j3(3.1338561*e-1.6168667*t-.4906146*n),j3(-.9787684*e+1.9161415*t+.033454*n),j3(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function W3(t){return t>vTe?Math.pow(t,1/3):t/Zj+Kj}function G3(t){return t>Bg?t*t*t:Zj*(t-Kj)}function j3(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function q3(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function yTe(t){if(t instanceof Kc)return new Kc(t.h,t.c,t.l,t.opacity);if(t instanceof Yu||(t=Jj(t)),t.a===0&&t.b===0)return new Kc(NaN,0=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,s=r()=>t;function tq(t,e){return function(n){return t+n*e}}function wTe(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function tI(t,e){var n=e-t;return n?tq(t,n>180||n<-180?n-360*Math.round(n/360):n):KC(isNaN(t)?e:t)}function STe(t){return(t=+t)==1?po:function(e,n){return n-e?wTe(e,n,t):KC(isNaN(e)?n:e)}}function po(t,e){var n=e-t;return n?tq(t,n):KC(isNaN(t)?e:t)}const zP=function t(e){var n=STe(e);function r(i,o){var a=n((i=Wd(i)).r,(o=Wd(o)).r),s=n(i.g,o.g),l=n(i.b,o.b),u=po(i.opacity,o.opacity);return function(c){return i.r=a(c),i.g=s(c),i.b=l(c),i.opacity=u(c),i+""}}return r.gamma=t,r}(1);function ETe(t){return function(e){var n=e.length,r=new Array(n),i=new Array(n),o=new Array(n),a,s;for(a=0;an&&(o=e.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:hv(r,i)})),n=X3.lastIndex;return ne&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function VTe(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i2?WTe:VTe,l=u=null,f}function f(d){return d==null||isNaN(d=+d)?o:(l||(l=s(t.map(r),e,n)))(r(a(d)))}return f.invert=function(d){return a(i((u||(u=s(e,t.map(r),hv)))(d)))},f.domain=function(d){return arguments.length?(t=Array.from(d,$Te),c()):t.slice()},f.range=function(d){return arguments.length?(e=Array.from(d),c()):e.slice()},f.rangeRound=function(d){return e=Array.from(d),n=rI,c()},f.clamp=function(d){return arguments.length?(a=d?!0:Uu,c()):a!==Uu},f.interpolate=function(d){return arguments.length?(n=d,c()):n},f.unknown=function(d){return arguments.length?(o=d,f):o},function(d,p){return r=d,i=p,c()}}function GTe(){return QC()(Uu,Uu)}function jTe(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function P2(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function pv(t){return t=P2(Math.abs(t)),t?t[1]:NaN}function qTe(t,e){return function(n,r){for(var i=n.length,o=[],a=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(e)}}function XTe(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var YTe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ob(t){if(!(e=YTe.exec(t)))throw new Error("invalid format: "+t);var e;return new iI({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}ob.prototype=iI.prototype;function iI(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}iI.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 KTe(t){e:for(var e=t.length,n=1,r=-1,i;n0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var oq;function ZTe(t,e){var n=P2(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(oq=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+P2(t,Math.max(0,e+o-1))[0]}function LB(t,e){var n=P2(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const kB={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:jTe,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>LB(t*100,e),r:LB,s:ZTe,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function BB(t){return t}var UB=Array.prototype.map,zB=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function JTe(t){var e=t.grouping===void 0||t.thousands===void 0?BB:qTe(UB.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?BB:XTe(UB.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"−":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function u(f){f=ob(f);var d=f.fill,p=f.align,y=f.sign,x=f.symbol,_=f.zero,v=f.width,S=f.comma,w=f.precision,E=f.trim,T=f.type;T==="n"?(S=!0,T="g"):kB[T]||(w===void 0&&(w=12),E=!0,T="g"),(_||d==="0"&&p==="=")&&(_=!0,d="0",p="=");var C=x==="$"?n:x==="#"&&/[boxX]/.test(T)?"0"+T.toLowerCase():"",D=x==="$"?r:/[%p]/.test(T)?a:"",O=kB[T],P=/[defgprs%]/.test(T);w=w===void 0?6:/[gprs]/.test(T)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function N(k){var G=C,Z=D,j,K,Y;if(T==="c")Z=O(k)+Z,k="";else{k=+k;var $=k<0||1/k<0;if(k=isNaN(k)?l:O(Math.abs(k),w),E&&(k=KTe(k)),$&&+k==0&&y!=="+"&&($=!1),G=($?y==="("?y:s:y==="-"||y==="("?"":y)+G,Z=(T==="s"?zB[8+oq/3]:"")+Z+($&&y==="("?")":""),P){for(j=-1,K=k.length;++jY||Y>57){Z=(Y===46?i+k.slice(j+1):k.slice(j))+Z,k=k.slice(0,j);break}}}S&&!_&&(k=e(k,1/0));var W=G.length+k.length+Z.length,U=W>1)+G+k+Z+U.slice(W);break;default:k=U+G+k+Z;break}return o(k)}return N.toString=function(){return f+""},N}function c(f,d){var p=u((f=ob(f),f.type="f",f)),y=Math.max(-8,Math.min(8,Math.floor(pv(d)/3)))*3,x=Math.pow(10,-y),_=zB[8+y/3];return function(v){return p(x*v)+_}}return{format:u,formatPrefix:c}}var DS,lc,aq;QTe({thousands:",",grouping:[3],currency:["$",""]});function QTe(t){return DS=JTe(t),lc=DS.format,aq=DS.formatPrefix,DS}function e3e(t){return Math.max(0,-pv(Math.abs(t)))}function t3e(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(pv(e)/3)))*3-pv(Math.abs(t)))}function n3e(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,pv(e)-pv(t))+1}function r3e(t,e,n,r){var i=Vj(t,e,n),o;switch(r=ob(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=t3e(i,a))&&(r.precision=o),aq(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=n3e(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=e3e(i))&&(r.precision=o-(r.type==="%")*2);break}}return lc(r)}function oI(t){var e=t.domain;return t.ticks=function(n){var r=e();return LP(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return r3e(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,o=r.length-1,a=r[i],s=r[o],l,u,c=10;for(s0;){if(u=kP(a,s,n),u===l)return r[i]=a,r[o]=s,e(r);if(u>0)a=Math.floor(a/u)*u,s=Math.ceil(s/u)*u;else if(u<0)a=Math.ceil(a*u)/u,s=Math.floor(s*u)/u;else break;l=u}return t},t}function sq(){var t=GTe();return t.copy=function(){return JC(t,sq())},XC.apply(t,arguments),oI(t)}function i3e(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],o=t[r],a;return oMath.pow(t,e)}function u3e(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function VB(t){return(e,n)=>-t(-e,n)}function c3e(t){const e=t($B,HB),n=e.domain;let r=10,i,o;function a(){return i=u3e(r),o=l3e(r),n()[0]<0?(i=VB(i),o=VB(o),t(o3e,a3e)):t($B,HB),e}return e.base=function(s){return arguments.length?(r=+s,a()):r},e.domain=function(s){return arguments.length?(n(s),a()):n()},e.ticks=s=>{const l=n();let u=l[0],c=l[l.length-1];const f=c0){for(;d<=p;++d)for(y=1;yc)break;v.push(x)}}else for(;d<=p;++d)for(y=r-1;y>=1;--y)if(x=d>0?y/o(-d):y*o(d),!(xc)break;v.push(x)}v.length*2<_&&(v=LP(u,c,_))}else v=LP(d,p,Math.min(p-d,_)).map(o);return f?v.reverse():v},e.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=ob(l)).precision==null&&(l.trim=!0),l=lc(l)),s===1/0)return l;const u=Math.max(1,r*s/e.ticks().length);return c=>{let f=c/o(Math.round(i(c)));return f*rn(i3e(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),e}function lq(){const t=c3e(QC()).domain([1,10]);return t.copy=()=>JC(t,lq()).base(t.base()),XC.apply(t,arguments),t}function WB(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function GB(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function f3e(t){var e=1,n=t(WB(e),GB(e));return n.constant=function(r){return arguments.length?t(WB(e=+r),GB(e)):e},oI(n)}function uq(){var t=f3e(QC());return t.copy=function(){return JC(t,uq()).constant(t.constant())},XC.apply(t,arguments)}function jB(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function d3e(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function h3e(t){return t<0?-t*t:t*t}function p3e(t){var e=t(Uu,Uu),n=1;function r(){return n===1?t(Uu,Uu):n===.5?t(d3e,h3e):t(jB(n),jB(1/n))}return e.exponent=function(i){return arguments.length?(n=+i,r()):n},oI(e)}function aI(){var t=p3e(QC());return t.copy=function(){return JC(t,aI()).exponent(t.exponent())},XC.apply(t,arguments),t}function m3e(){return aI.apply(null,arguments).exponent(.5)}const Y3=new Date,K3=new Date;function No(t,e,n,r){function i(o){return t(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(t(o=new Date(+o)),o),i.ceil=o=>(t(o=new Date(o-1)),e(o,1),t(o),o),i.round=o=>{const a=i(o),s=i.ceil(o);return o-a(e(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,s)=>{const l=[];if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o0))return l;let u;do l.push(u=new Date(+o)),e(o,s),t(o);while(uNo(a=>{if(a>=a)for(;t(a),!o(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;e(a,-1),!o(a););else for(;--s>=0;)for(;e(a,1),!o(a););}),n&&(i.count=(o,a)=>(Y3.setTime(+o),K3.setTime(+a),t(Y3),t(K3),Math.floor(n(Y3,K3))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?a=>r(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const ab=1e3,Gd=ab*60,sb=Gd*60,lb=sb*24,cq=lb*7,sI=No(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*ab)},(t,e)=>(e-t)/ab,t=>t.getUTCSeconds());sI.range;const fq=No(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*ab)},(t,e)=>{t.setTime(+t+e*Gd)},(t,e)=>(e-t)/Gd,t=>t.getMinutes());fq.range;const dq=No(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*Gd)},(t,e)=>(e-t)/Gd,t=>t.getUTCMinutes());dq.range;const hq=No(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*ab-t.getMinutes()*Gd)},(t,e)=>{t.setTime(+t+e*sb)},(t,e)=>(e-t)/sb,t=>t.getHours());hq.range;const pq=No(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*sb)},(t,e)=>(e-t)/sb,t=>t.getUTCHours());pq.range;const mq=No(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Gd)/lb,t=>t.getDate()-1);mq.range;const gq=No(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/lb,t=>t.getUTCDate()-1);gq.range;const g3e=No(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/lb,t=>Math.floor(t/lb));g3e.range;function sm(t){return No(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*Gd)/cq)}const vq=sm(0),v3e=sm(1),y3e=sm(2),x3e=sm(3),b3e=sm(4),_3e=sm(5),w3e=sm(6);vq.range;v3e.range;y3e.range;x3e.range;b3e.range;_3e.range;w3e.range;function lm(t){return No(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/cq)}const yq=lm(0),S3e=lm(1),E3e=lm(2),M3e=lm(3),C3e=lm(4),A3e=lm(5),T3e=lm(6);yq.range;S3e.range;E3e.range;M3e.range;C3e.range;A3e.range;T3e.range;const xq=No(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());xq.range;const bq=No(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());bq.range;const lI=No(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());lI.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:No(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});lI.range;const uI=No(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());uI.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:No(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});uI.range;function D3e(t,e){e.domain&&("nice"in t||"quantiles"in t||"padding"in t,t.domain(e.domain))}function R3e(t,e){e.range&&("padding"in t,t.range(e.range))}function P3e(t,e){"align"in t&&"align"in e&&typeof e.align<"u"&&t.align(e.align)}function N3e(t,e){"base"in t&&"base"in e&&typeof e.base<"u"&&t.base(e.base)}function O3e(t,e){"clamp"in t&&"clamp"in e&&typeof e.clamp<"u"&&t.clamp(e.clamp)}function I3e(t,e){"constant"in t&&"constant"in e&&typeof e.constant<"u"&&t.constant(e.constant)}function F3e(t,e){"exponent"in t&&"exponent"in e&&typeof e.exponent<"u"&&t.exponent(e.exponent)}var qB={lab:LTe,hcl:kTe,"hcl-long":BTe,hsl:ITe,"hsl-long":FTe,cubehelix:UTe,"cubehelix-long":ZC,rgb:zP};function L3e(t){switch(t){case"lab":case"hcl":case"hcl-long":case"hsl":case"hsl-long":case"cubehelix":case"cubehelix-long":case"rgb":return qB[t]}var e=t.type,n=t.gamma,r=qB[e];return typeof n>"u"?r:r.gamma(n)}function k3e(t,e){if("interpolate"in e&&"interpolate"in t&&typeof e.interpolate<"u"){var n=L3e(e.interpolate);t.interpolate(n)}}var B3e=new Date(Date.UTC(2020,1,2,3,4,5)),U3e="%Y-%m-%d %H:%M";function z3e(t){var e=t.tickFormat(1,U3e)(B3e);return e==="2020-02-02 03:04"}var XB={day:mq,hour:hq,minute:fq,month:xq,second:sI,week:vq,year:lI},YB={day:gq,hour:pq,minute:dq,month:bq,second:sI,week:yq,year:uI};function $3e(t,e){if("nice"in e&&typeof e.nice<"u"&&"nice"in t){var n=e.nice;if(typeof n=="boolean")n&&t.nice();else if(typeof n=="number")t.nice(n);else{var r=t,i=z3e(r);if(typeof n=="string")r.nice(i?YB[n]:XB[n]);else{var o=n.interval,a=n.step,s=(i?YB[o]:XB[o]).every(a);s!=null&&r.nice(s)}}}}function H3e(t,e){"padding"in t&&"padding"in e&&typeof e.padding<"u"&&t.padding(e.padding),"paddingInner"in t&&"paddingInner"in e&&typeof e.paddingInner<"u"&&t.paddingInner(e.paddingInner),"paddingOuter"in t&&"paddingOuter"in e&&typeof e.paddingOuter<"u"&&t.paddingOuter(e.paddingOuter)}function V3e(t,e){if(e.reverse){var n=t.range().slice().reverse();"padding"in t,t.range(n)}}function W3e(t,e){"round"in e&&typeof e.round<"u"&&(e.round&&"interpolate"in e&&typeof e.interpolate<"u"?console.warn("[visx/scale/applyRound] ignoring round: scale config contains round and interpolate. only applying interpolate. config:",e):"round"in t?t.round(e.round):"interpolate"in t&&e.round&&t.interpolate(rI))}function G3e(t,e){"unknown"in t&&"unknown"in e&&typeof e.unknown<"u"&&t.unknown(e.unknown)}function j3e(t,e){if("zero"in e&&e.zero===!0){var n=t.domain(),r=n[0],i=n[1],o=i0,a=[],s=[],l=0,u=0,c,f;for(c=0;c0&&a.push("var "+s.join(",")),c=r-1;c>=0;--c)l=t[c],a.push(["for(i",c,"=0;i",c,"0&&a.push(["index[",u,"]-=s",u].join("")),a.push(["++index[",l,"]"].join(""))),a.push("}")}return a.join(` +`)}function fDe(t,e,n,r){for(var i=e.length,o=n.arrayArgs.length,a=n.blockSize,s=n.indexArgs.length>0,l=[],u=0;u0;){"].join("")),l.push(["if(j",u,"<",a,"){"].join("")),l.push(["s",e[u],"=j",u].join("")),l.push(["j",u,"=0"].join("")),l.push(["}else{s",e[u],"=",a].join("")),l.push(["j",u,"-=",a,"}"].join("")),s&&l.push(["index[",e[u],"]=j",u].join(""));for(var u=0;u0&&(n=n&&e[r]===e[r-1])}return n?e[0]:e.join("")}function rDe(t,e){for(var n=e[1].length-Math.abs(t.arrayBlockIndices[0])|0,r=new Array(t.arrayArgs.length),i=new Array(t.arrayArgs.length),o=0;o0&&x.push("shape=SS.slice(0)"),t.indexArgs.length>0){for(var _=new Array(n),o=0;o0&&y.push("var "+x.join(","));for(var o=0;o3&&y.push(Y3(t.pre,t,i));var E=Y3(t.body,t,i),T=tDe(c);T3&&y.push(Y3(t.post,t,i)),t.debug&&console.log("-----Generated cwise routine for ",e,`: +`).trim()}function hDe(t){for(var e=new Array(t.length),n=!0,r=0;r0&&(n=n&&e[r]===e[r-1])}return n?e[0]:e.join("")}function pDe(t,e){for(var n=e[1].length-Math.abs(t.arrayBlockIndices[0])|0,r=new Array(t.arrayArgs.length),i=new Array(t.arrayArgs.length),o=0;o0&&x.push("shape=SS.slice(0)"),t.indexArgs.length>0){for(var _=new Array(n),o=0;o0&&y.push("var "+x.join(","));for(var o=0;o3&&y.push(Z3(t.pre,t,i));var E=Z3(t.body,t,i),T=dDe(c);T3&&y.push(Z3(t.post,t,i)),t.debug&&console.log("-----Generated cwise routine for ",e,`: `+y.join(` `)+` -----------`);var C=[t.funcName||"unnamed","_cwise_loop_",r[0].join("s"),"m",T,nDe(i)].join(""),D=new Function(["function ",C,"(",p.join(","),"){",y.join(` -`),"} return ",C].join(""));return D()}var iDe=rDe,oDe=iDe;function aDe(t){var e=["'use strict'","var CACHED={}"],n=[],r=t.funcName+"_cwise_thunk";e.push(["return function ",r,"(",t.shimArgs.join(","),"){"].join(""));for(var i=[],o=[],a=[["array",t.arrayArgs[0],".shape.slice(",Math.max(0,t.arrayBlockIndices[0]),t.arrayBlockIndices[0]<0?","+t.arrayBlockIndices[0]+")":")"].join("")],s=[],l=[],u=0;u0&&(s.push("array"+t.arrayArgs[0]+".shape.length===array"+c+".shape.length+"+(Math.abs(t.arrayBlockIndices[0])-Math.abs(t.arrayBlockIndices[u]))),l.push("array"+t.arrayArgs[0]+".shape[shapeIndex+"+Math.max(0,t.arrayBlockIndices[0])+"]===array"+c+".shape[shapeIndex+"+Math.max(0,t.arrayBlockIndices[u])+"]"))}t.arrayArgs.length>1&&(e.push("if (!("+s.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same dimensionality!')"),e.push("for(var shapeIndex=array"+t.arrayArgs[0]+".shape.length-"+Math.abs(t.arrayBlockIndices[0])+"; shapeIndex-->0;) {"),e.push("if (!("+l.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same shape!')"),e.push("}"));for(var u=0;u0&&(s.push("array"+t.arrayArgs[0]+".shape.length===array"+c+".shape.length+"+(Math.abs(t.arrayBlockIndices[0])-Math.abs(t.arrayBlockIndices[u]))),l.push("array"+t.arrayArgs[0]+".shape[shapeIndex+"+Math.max(0,t.arrayBlockIndices[0])+"]===array"+c+".shape[shapeIndex+"+Math.max(0,t.arrayBlockIndices[u])+"]"))}t.arrayArgs.length>1&&(e.push("if (!("+s.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same dimensionality!')"),e.push("for(var shapeIndex=array"+t.arrayArgs[0]+".shape.length-"+Math.abs(t.arrayBlockIndices[0])+"; shapeIndex-->0;) {"),e.push("if (!("+l.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same shape!')"),e.push("}"));for(var u=0;u0)throw new Error("cwise: pre() block may not reference array args");if(r0)throw new Error("cwise: post() block may not reference array args")}else if(i==="scalar")e.scalarArgs.push(r),e.shimArgs.push("scalar"+r);else if(i==="index"){if(e.indexArgs.push(r),r0)throw new Error("cwise: pre() block may not reference array index");if(r0)throw new Error("cwise: post() block may not reference array index")}else if(i==="shape"){if(e.shapeArgs.push(r),rn.length)throw new Error("cwise: Too many arguments in pre() block");if(e.body.args.length>n.length)throw new Error("cwise: Too many arguments in body() block");if(e.post.args.length>n.length)throw new Error("cwise: Too many arguments in post() block");return e.debug=!!t.printCode||!!t.debug,e.funcName=t.funcName||"cwise",e.blockSize=t.blockSize||64,lDe(e)}var fDe=cDe;(function(t){var e=fDe,n={body:"",args:[],thisVars:[],localVars:[]};function r(d){if(!d)return n;for(var p=0;p>",rrshift:">>>"};(function(){for(var d in a){var p=a[d];t[d]=o({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+p+"c"},funcName:d}),t[d+"eq"]=o({args:["array","array"],body:{args:["a","b"],body:"a"+p+"=b"},rvalue:!0,funcName:d+"eq"}),t[d+"s"]=o({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+p+"s"},funcName:d+"s"}),t[d+"seq"]=o({args:["array","scalar"],body:{args:["a","s"],body:"a"+p+"=s"},rvalue:!0,funcName:d+"seq"})}})();var s={not:"!",bnot:"~",neg:"-",recip:"1.0/"};(function(){for(var d in s){var p=s[d];t[d]=o({args:["array","array"],body:{args:["a","b"],body:"a="+p+"b"},funcName:d}),t[d+"eq"]=o({args:["array"],body:{args:["a"],body:"a="+p+"a"},rvalue:!0,count:2,funcName:d+"eq"})}})();var l={and:"&&",or:"||",eq:"===",neq:"!==",lt:"<",gt:">",leq:"<=",geq:">="};(function(){for(var d in l){var p=l[d];t[d]=o({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+p+"c"},funcName:d}),t[d+"s"]=o({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+p+"s"},funcName:d+"s"}),t[d+"eq"]=o({args:["array","array"],body:{args:["a","b"],body:"a=a"+p+"b"},rvalue:!0,count:2,funcName:d+"eq"}),t[d+"seq"]=o({args:["array","scalar"],body:{args:["a","s"],body:"a=a"+p+"s"},rvalue:!0,count:2,funcName:d+"seq"})}})();var u=["abs","acos","asin","atan","ceil","cos","exp","floor","log","round","sin","sqrt","tan"];(function(){for(var d=0;dthis_s){this_s=-a}else if(a>this_s){this_s=a}",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norminf"}),t.norm1=e({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:3}],body:"this_s+=a<0?-a:a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norm1"}),t.sup=e({args:["array"],pre:{body:"this_h=-Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_>this_h)this_h=_inline_1_arg0_",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_h"],localVars:[]},post:{body:"return this_h",args:[],thisVars:["this_h"],localVars:[]}}),t.inf=e({args:["array"],pre:{body:"this_h=Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_this_v){this_v=_inline_1_arg1_;for(var _inline_1_k=0;_inline_1_k<_inline_1_arg0_.length;++_inline_1_k){this_i[_inline_1_k]=_inline_1_arg0_[_inline_1_k]}}}",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_i","this_v"],localVars:["_inline_1_k"]},post:{body:"{return this_i}",args:[],thisVars:["this_i"],localVars:[]}}),t.random=o({args:["array"],pre:{args:[],body:"this_f=Math.random",thisVars:["this_f"]},body:{args:["a"],body:"a=this_f()",thisVars:["this_f"]},funcName:"random"}),t.assign=o({args:["array","array"],body:{args:["a","b"],body:"a=b"},funcName:"assign"}),t.assigns=o({args:["array","scalar"],body:{args:["a","b"],body:"a=b"},funcName:"assigns"}),t.equals=e({args:["array","array"],pre:n,body:{args:[{name:"x",lvalue:!1,rvalue:!0,count:1},{name:"y",lvalue:!1,rvalue:!0,count:1}],body:"if(x!==y){return false}",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:"return true"},funcName:"equals"})})(X3e);var mq={exports:{}};/*! +`));return f(gDe.bind(void 0,t))}var yDe=vDe,xDe=yDe;function bDe(){this.argTypes=[],this.shimArgs=[],this.arrayArgs=[],this.arrayBlockIndices=[],this.scalarArgs=[],this.offsetArgs=[],this.offsetArgIndex=[],this.indexArgs=[],this.shapeArgs=[],this.funcName="",this.pre=null,this.body=null,this.post=null,this.debug=!1}function _De(t){var e=new bDe;e.pre=t.pre,e.body=t.body,e.post=t.post;var n=t.args.slice(0);e.argTypes=n;for(var r=0;r0)throw new Error("cwise: pre() block may not reference array args");if(r0)throw new Error("cwise: post() block may not reference array args")}else if(i==="scalar")e.scalarArgs.push(r),e.shimArgs.push("scalar"+r);else if(i==="index"){if(e.indexArgs.push(r),r0)throw new Error("cwise: pre() block may not reference array index");if(r0)throw new Error("cwise: post() block may not reference array index")}else if(i==="shape"){if(e.shapeArgs.push(r),rn.length)throw new Error("cwise: Too many arguments in pre() block");if(e.body.args.length>n.length)throw new Error("cwise: Too many arguments in body() block");if(e.post.args.length>n.length)throw new Error("cwise: Too many arguments in post() block");return e.debug=!!t.printCode||!!t.debug,e.funcName=t.funcName||"cwise",e.blockSize=t.blockSize||64,xDe(e)}var wDe=_De;(function(t){var e=wDe,n={body:"",args:[],thisVars:[],localVars:[]};function r(d){if(!d)return n;for(var p=0;p>",rrshift:">>>"};(function(){for(var d in a){var p=a[d];t[d]=o({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+p+"c"},funcName:d}),t[d+"eq"]=o({args:["array","array"],body:{args:["a","b"],body:"a"+p+"=b"},rvalue:!0,funcName:d+"eq"}),t[d+"s"]=o({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+p+"s"},funcName:d+"s"}),t[d+"seq"]=o({args:["array","scalar"],body:{args:["a","s"],body:"a"+p+"=s"},rvalue:!0,funcName:d+"seq"})}})();var s={not:"!",bnot:"~",neg:"-",recip:"1.0/"};(function(){for(var d in s){var p=s[d];t[d]=o({args:["array","array"],body:{args:["a","b"],body:"a="+p+"b"},funcName:d}),t[d+"eq"]=o({args:["array"],body:{args:["a"],body:"a="+p+"a"},rvalue:!0,count:2,funcName:d+"eq"})}})();var l={and:"&&",or:"||",eq:"===",neq:"!==",lt:"<",gt:">",leq:"<=",geq:">="};(function(){for(var d in l){var p=l[d];t[d]=o({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+p+"c"},funcName:d}),t[d+"s"]=o({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+p+"s"},funcName:d+"s"}),t[d+"eq"]=o({args:["array","array"],body:{args:["a","b"],body:"a=a"+p+"b"},rvalue:!0,count:2,funcName:d+"eq"}),t[d+"seq"]=o({args:["array","scalar"],body:{args:["a","s"],body:"a=a"+p+"s"},rvalue:!0,count:2,funcName:d+"seq"})}})();var u=["abs","acos","asin","atan","ceil","cos","exp","floor","log","round","sin","sqrt","tan"];(function(){for(var d=0;dthis_s){this_s=-a}else if(a>this_s){this_s=a}",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norminf"}),t.norm1=e({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:3}],body:"this_s+=a<0?-a:a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norm1"}),t.sup=e({args:["array"],pre:{body:"this_h=-Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_>this_h)this_h=_inline_1_arg0_",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_h"],localVars:[]},post:{body:"return this_h",args:[],thisVars:["this_h"],localVars:[]}}),t.inf=e({args:["array"],pre:{body:"this_h=Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_this_v){this_v=_inline_1_arg1_;for(var _inline_1_k=0;_inline_1_k<_inline_1_arg0_.length;++_inline_1_k){this_i[_inline_1_k]=_inline_1_arg0_[_inline_1_k]}}}",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_i","this_v"],localVars:["_inline_1_k"]},post:{body:"{return this_i}",args:[],thisVars:["this_i"],localVars:[]}}),t.random=o({args:["array"],pre:{args:[],body:"this_f=Math.random",thisVars:["this_f"]},body:{args:["a"],body:"a=this_f()",thisVars:["this_f"]},funcName:"random"}),t.assign=o({args:["array","array"],body:{args:["a","b"],body:"a=b"},funcName:"assign"}),t.assigns=o({args:["array","scalar"],body:{args:["a","b"],body:"a=b"},funcName:"assigns"}),t.equals=e({args:["array","array"],pre:n,body:{args:[{name:"x",lvalue:!1,rvalue:!0,count:1},{name:"y",lvalue:!1,rvalue:!0,count:1}],body:"if(x!==y){return false}",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:"return true"},funcName:"equals"})})(oDe);var wq={exports:{}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames -*/(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var r=[],i=0;i=0)&&(n[i]=t[i]);return n}function Hb(t){var e=t.top,n=e===void 0?0:e,r=t.left,i=r===void 0?0:r,o=t.transform,a=t.className,s=t.children,l=t.innerRef,u=hDe(t,dDe);return se.createElement("g",$P({ref:l,className:ic("visx-group",a),transform:o||"translate("+i+", "+n+")"},u),s)}Hb.propTypes={top:st.number,left:st.number,transform:st.string,className:st.string,children:st.node,innerRef:st.oneOfType([st.string,st.func,st.object])};var pDe=["from","to","fill","className","innerRef"];function HP(){return HP=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function vq(t){var e=t.from,n=e===void 0?{x:0,y:0}:e,r=t.to,i=r===void 0?{x:1,y:1}:r,o=t.fill,a=o===void 0?"transparent":o,s=t.className,l=t.innerRef,u=mDe(t,pDe),c=n.x===i.x||n.y===i.y;return se.createElement("line",HP({ref:l,className:ic("visx-line",s),x1:n.x,y1:n.y,x2:i.x,y2:i.y,fill:a,shapeRendering:c?"crispEdges":"auto"},u))}var gDe=yq;function yq(t,e,n){t instanceof RegExp&&(t=qB(t,n)),e instanceof RegExp&&(e=qB(e,n));var r=xq(t,e,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+t.length,r[1]),post:n.slice(r[1]+e.length)}}function qB(t,e){var n=e.match(t);return n?n[0]:null}yq.range=xq;function xq(t,e,n){var r,i,o,a,s,l=n.indexOf(t),u=n.indexOf(e,l+1),c=l;if(l>=0&&u>0){for(r=[],o=n.length;c>=0&&!s;)c==l?(r.push(c),l=n.indexOf(t,c+1)):r.length==1?s=[r.pop(),u]:(i=r.pop(),i=0?l:u;r.length&&(s=[o,a])}return s}var vDe=bq;function bq(t,e,n){t instanceof RegExp&&(t=XB(t,n)),e instanceof RegExp&&(e=XB(e,n));var r=_q(t,e,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+t.length,r[1]),post:n.slice(r[1]+e.length)}}function XB(t,e){var n=e.match(t);return n?n[0]:null}bq.range=_q;function _q(t,e,n){var r,i,o,a,s,l=n.indexOf(t),u=n.indexOf(e,l+1),c=l;if(l>=0&&u>0){if(t===e)return[l,u];for(r=[],o=n.length;c>=0&&!s;)c==l?(r.push(c),l=n.indexOf(t,c+1)):r.length==1?s=[r.pop(),u]:(i=r.pop(),i=0?l:u;r.length&&(s=[o,a])}return s}var yDe=vDe,xDe=wq;function wq(t,e,n){var r=t;return bDe(t,e).reduce(function(i,o){return i.replace(o.functionIdentifier+"("+o.matches.body+")",_De(o.matches.body,o.functionIdentifier,n,r,e))},t)}function bDe(t,e){var n=[],r=typeof e=="string"?new RegExp("\\b("+e+")\\("):e;do{var i=r.exec(t);if(!i)return n;if(i[1]===void 0)throw new Error("Missing the first couple of parenthesis to get the function identifier in "+e);var o=i[1],a=i.index,s=yDe("(",")",t.substring(a));if(!s||s.start!==i[0].length-1)throw new SyntaxError(o+"(): missing closing ')' in the value '"+t+"'");n.push({matches:s,functionIdentifier:o}),t=s.post}while(r.test(t));return n}function _De(t,e,n,r,i){return n(wq(t,i,n),e,r)}var ma=function(t){this.value=t};ma.math={isDegree:!0,acos:function(t){return ma.math.isDegree?180/Math.PI*Math.acos(t):Math.acos(t)},add:function(t,e){return t+e},asin:function(t){return ma.math.isDegree?180/Math.PI*Math.asin(t):Math.asin(t)},atan:function(t){return ma.math.isDegree?180/Math.PI*Math.atan(t):Math.atan(t)},acosh:function(t){return Math.log(t+Math.sqrt(t*t-1))},asinh:function(t){return Math.log(t+Math.sqrt(t*t+1))},atanh:function(t){return Math.log((1+t)/(1-t))},C:function(t,e){var n=1,r=t-e,i=e;iva.length-2?va.length-1:t.length-a;i>0;i--)if(va[i]!==void 0)for(o=0;o0&&ur)a.push(e);else{for(;r>=i&&!u||u&&i"u"?e[e.length-1].value.push(o[s]):e[e.length-1].value=o[s].value(e[e.length-1].value);else if(o[s].type===7)typeof e[e.length-1].type>"u"?e[e.length-1].value.push(o[s]):e[e.length-1].value=o[s].value(e[e.length-1].value);else if(o[s].type===8){for(var l=[],u=0;u"u"?(r.value=r.concat(n),r.value.push(o[s]),e.push(r)):typeof n.type>"u"?(n.unshift(r),n.push(o[s]),e.push(n)):e.push({type:1,value:o[s].value(r.value,n.value)})):o[s].type===2||o[s].type===9?(n=e.pop(),r=e.pop(),typeof r.type>"u"?(r=r.concat(n),r.push(o[s]),e.push(r)):typeof n.type>"u"?(n.unshift(r),n.push(o[s]),e.push(n)):e.push({type:1,value:o[s].value(r.value,n.value)})):o[s].type===12?(n=e.pop(),typeof n.type<"u"&&(n=[n]),r=e.pop(),i=e.pop(),e.push({type:1,value:o[s].value(i.value,r.value,new K1(n))})):o[s].type===13&&(a?e.push({value:t[o[s].value],type:3}):e.push([o[s]]));if(e.length>1)throw new K1.Exception("Uncaught Syntax error");return e[0].value>1e15?"Infinity":parseFloat(e[0].value.toFixed(15))};K1.eval=function(t,e,n){return typeof e>"u"?this.lex(t).toPostfix().postfixEval():typeof n>"u"?typeof e.length<"u"?this.lex(t,e).toPostfix().postfixEval():this.lex(t).toPostfix().postfixEval(e):this.lex(t,e).toPostfix().postfixEval(n)};var RDe=K1,Eq=RDe;Eq.prototype.formulaEval=function(){for(var t,e,n,r=[],i=this.value,o=0;o"+e.value+""+i[o].show+""+t.value+"",type:10}):r.push({value:(e.type!=1?"(":"")+e.value+(e.type!=1?")":"")+""+t.value+"",type:1})):i[o].type===2||i[o].type===9?(t=r.pop(),e=r.pop(),r.push({value:(e.type!=1?"(":"")+e.value+(e.type!=1?")":"")+i[o].show+(t.type!=1?"(":"")+t.value+(t.type!=1?")":""),type:i[o].type})):i[o].type===12&&(t=r.pop(),e=r.pop(),n=r.pop(),r.push({value:i[o].show+"("+n.value+","+e.value+","+t.value+")",type:12}));return r[0].value};var PDe=Eq,NDe=gDe,ODe=xDe,IDe=PDe,FDe=100,LDe=/(\+|\-|\*|\\|[^a-z]|)(\s*)(\()/g,K3,kDe=BDe;function BDe(t,e){K3=0,e=Math.pow(10,e===void 0?5:e),t=t.replace(/\n+/g," ");function n(i,o,a){if(K3++>FDe)throw K3=0,new Error("Call stack overflow for "+a);if(i==="")throw new Error(o+"(): '"+a+"' must contain a non-whitespace string");i=r(i,a);var s=UDe(i);if(s.length>1||i.indexOf("var(")>-1)return o+"("+i+")";var l=s[0]||"";l==="%"&&(i=i.replace(/\b[0-9\.]+%/g,function(f){return parseFloat(f.slice(0,-1))*.01}));var u=i.replace(new RegExp(l,"gi"),""),c;try{c=IDe.eval(u)}catch{return o+"("+i+")"}return l==="%"&&(c*=100),(o.length||l==="%")&&(c=Math.round(c*e)/e),c+=l,c}function r(i,o){i=i.replace(/((?:\-[a-z]+\-)?calc)/g,"");for(var a="",s=i,l;l=LDe.exec(s);){l[0].index>0&&(a+=s.substring(0,l[0].index));var u=NDe("(",")",s.substring([0].index));if(u.body==="")throw new Error("'"+i+"' must contain a non-whitespace string");var c=n(u.body,"",o);a+=u.pre+c,s=u.post}return a+s}return ODe(t,/((?:\-[a-z]+\-)?calc)\(/,n)}function UDe(t){for(var e=[],n=[],r=/[\.0-9]([%a-z]+)/gi,i=r.exec(t);i;)!i||!i[1]||(n.indexOf(i[1].toLowerCase())===-1&&(e.push(i[1]),n.push(i[1].toLowerCase())),i=r.exec(t));return e}const Z3=lu(kDe);var zDe=typeof Uc=="object"&&Uc&&Uc.Object===Object&&Uc,Mq=zDe,$De=Mq,HDe=typeof self=="object"&&self&&self.Object===Object&&self,VDe=$De||HDe||Function("return this")(),uc=VDe,WDe=uc,GDe=WDe.Symbol,Vb=GDe,YB=Vb,Cq=Object.prototype,jDe=Cq.hasOwnProperty,qDe=Cq.toString,i1=YB?YB.toStringTag:void 0;function XDe(t){var e=jDe.call(t,i1),n=t[i1];try{t[i1]=void 0;var r=!0}catch{}var i=qDe.call(t);return r&&(e?t[i1]=n:delete t[i1]),i}var YDe=XDe,KDe=Object.prototype,ZDe=KDe.toString;function JDe(t){return ZDe.call(t)}var QDe=JDe,KB=Vb,eRe=YDe,tRe=QDe,nRe="[object Null]",rRe="[object Undefined]",ZB=KB?KB.toStringTag:void 0;function iRe(t){return t==null?t===void 0?rRe:nRe:ZB&&ZB in Object(t)?eRe(t):tRe(t)}var lm=iRe;function oRe(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Tv=oRe,aRe=lm,sRe=Tv,lRe="[object AsyncFunction]",uRe="[object Function]",cRe="[object GeneratorFunction]",fRe="[object Proxy]";function dRe(t){if(!sRe(t))return!1;var e=aRe(t);return e==uRe||e==cRe||e==lRe||e==fRe}var Aq=dRe,hRe=uc,pRe=hRe["__core-js_shared__"],mRe=pRe,J3=mRe,JB=function(){var t=/[^.]+$/.exec(J3&&J3.keys&&J3.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function gRe(t){return!!JB&&JB in t}var vRe=gRe,yRe=Function.prototype,xRe=yRe.toString;function bRe(t){if(t!=null){try{return xRe.call(t)}catch{}try{return t+""}catch{}}return""}var Tq=bRe,_Re=Aq,wRe=vRe,SRe=Tv,ERe=Tq,MRe=/[\\^$.*+?()[\]{}|]/g,CRe=/^\[object .+?Constructor\]$/,ARe=Function.prototype,TRe=Object.prototype,DRe=ARe.toString,RRe=TRe.hasOwnProperty,PRe=RegExp("^"+DRe.call(RRe).replace(MRe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function NRe(t){if(!SRe(t)||wRe(t))return!1;var e=_Re(t)?PRe:CRe;return e.test(ERe(t))}var ORe=NRe;function IRe(t,e){return t==null?void 0:t[e]}var FRe=IRe,LRe=ORe,kRe=FRe;function BRe(t,e){var n=kRe(t,e);return LRe(n)?n:void 0}var um=BRe,URe=um,zRe=URe(Object,"create"),QC=zRe,QB=QC;function $Re(){this.__data__=QB?QB(null):{},this.size=0}var HRe=$Re;function VRe(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var WRe=VRe,GRe=QC,jRe="__lodash_hash_undefined__",qRe=Object.prototype,XRe=qRe.hasOwnProperty;function YRe(t){var e=this.__data__;if(GRe){var n=e[t];return n===jRe?void 0:n}return XRe.call(e,t)?e[t]:void 0}var KRe=YRe,ZRe=QC,JRe=Object.prototype,QRe=JRe.hasOwnProperty;function ePe(t){var e=this.__data__;return ZRe?e[t]!==void 0:QRe.call(e,t)}var tPe=ePe,nPe=QC,rPe="__lodash_hash_undefined__";function iPe(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=nPe&&e===void 0?rPe:e,this}var oPe=iPe,aPe=HRe,sPe=WRe,lPe=KRe,uPe=tPe,cPe=oPe;function Dv(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e-1}var APe=CPe,TPe=eA;function DPe(t,e){var n=this.__data__,r=TPe(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}var RPe=DPe,PPe=hPe,NPe=_Pe,OPe=EPe,IPe=APe,FPe=RPe;function Rv(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e=0)&&(n[i]=t[i]);return n}function Q3(t){return typeof t=="number"}function rU(t){return typeof t=="number"&&Number.isFinite(t)||typeof t=="string"}function mNe(t){var e=t.verticalAnchor,n=e===void 0?"end":e,r=t.scaleToFit,i=r===void 0?!1:r,o=t.angle,a=t.width,s=t.lineHeight,l=s===void 0?"1em":s,u=t.capHeight,c=u===void 0?"0.71em":u,f=t.children,d=t.style,p=pNe(t,hNe),y=p.x,x=y===void 0?0:y,_=p.y,v=_===void 0?0:_,S=!rU(x)||!rU(v),w=H.useMemo(function(){var P=f==null?[]:f.toString().split(/(?:(?!\u00A0+)\s+)/);return{wordsWithWidth:P.map(function(N){return{word:N,wordWidth:nU(N,d)||0}}),spaceWidth:nU(" ",d)||0}},[f,d]),E=w.wordsWithWidth,T=w.spaceWidth,C=H.useMemo(function(){return S?[]:a||i?E.reduce(function(P,N){var k=N.word,G=N.wordWidth,Z=P[P.length-1];if(Z&&(a==null||i||(Z.width||0)+G+T0){var N=C[0].width||1,k=i==="shrink-only"?Math.min(a/N,1):a/N,G=k,Z=x-k*x,j=v-G*v;P.push("matrix("+k+", 0, 0, "+G+", "+Z+", "+j+")")}return o&&P.push("rotate("+o+", "+x+", "+v+")"),P.length>0?P.join(" "):""},[S,x,v,a,i,C,o]);return{wordsByLines:C,startDy:D,transform:O}}var gNe=["dx","dy","textAnchor","innerRef","innerTextRef","verticalAnchor","angle","lineHeight","scaleToFit","capHeight","width"];function GP(){return GP=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}var yNe={overflow:"visible"};function Pq(t){var e=t.dx,n=e===void 0?0:e,r=t.dy,i=r===void 0?0:r,o=t.textAnchor,a=o===void 0?"start":o,s=t.innerRef,l=t.innerTextRef;t.verticalAnchor,t.angle;var u=t.lineHeight,c=u===void 0?"1em":u;t.scaleToFit,t.capHeight,t.width;var f=vNe(t,gNe),d=f.x,p=d===void 0?0:d,y=f.fontSize,x=mNe(t),_=x.wordsByLines,v=x.startDy,S=x.transform;return se.createElement("svg",{ref:s,x:n,y:i,fontSize:y,style:yNe},_.length>0?se.createElement("text",GP({ref:l,transform:S},f,{textAnchor:a}),_.map(function(w,E){return se.createElement("tspan",{key:E,x:p,dy:E===0?v:c},w.words.join(" "))})):null)}var xNe={top:"top",left:"left",right:"right",bottom:"bottom"};const Rs=xNe;function bNe(t){var e=t.labelOffset,n=t.labelProps,r=t.orientation,i=t.range,o=t.tickLabelFontSize,a=t.tickLength,s=r===Rs.left||r===Rs.top?-1:1,l,u,c;if(r===Rs.top||r===Rs.bottom){var f=r===Rs.bottom&&typeof n.fontSize=="number"?n.fontSize:0;l=(Number(i[0])+Number(i[i.length-1]))/2,u=s*(a+e+o+f)}else l=s*((Number(i[0])+Number(i[i.length-1]))/2),u=-(a+e),c="rotate("+s*90+")";return{x:l,y:u,transform:c}}function Z1(){return Z1=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function Nq(t){var e=t.children,n=e===void 0?wNe:e,r=t.axisClassName,i=t.hideAxisLine,o=i===void 0?!1:i,a=t.hideTicks,s=a===void 0?!1:a,l=t.hideZero,u=l===void 0?!1:l,c=t.left,f=c===void 0?0:c,d=t.numTicks,p=d===void 0?10:d,y=t.orientation,x=y===void 0?Rs.bottom:y,_=t.rangePadding,v=_===void 0?0:_,S=t.scale,w=t.tickFormat,E=t.tickLength,T=E===void 0?8:E,C=t.tickValues,D=t.top,O=D===void 0?0:D,P=ANe(t,CNe),N=w??ENe(S),k=x===Rs.left,G=x===Rs.top,Z=G||x===Rs.bottom,j=SNe(S),K=k||G?-1:1,Y=S.range(),$=MNe(v),W=NS({x:Number(Y[0])+.5-$.start,y:0},Z),U=NS({x:Number(Y[Y.length-1])+.5+$.end,y:0},Z),te=(C??fI(S,p)).filter(function(le){return!u||le!==0&&le!=="0"}).map(function(le,ce){return{value:le,index:ce}}),re=te.map(function(le){var ce=le.value,Ce=le.index,Re=cI(j(ce));return{value:ce,index:Ce,from:NS({x:Re,y:0},Z),to:NS({x:Re,y:T*K},Z),formattedValue:N(ce,Ce,te)}});return se.createElement(Hb,{className:ic("visx-axis",r),top:O,left:f},n(qP({},P,{axisFromPoint:W,axisToPoint:U,hideAxisLine:o,hideTicks:s,hideZero:u,horizontal:Z,numTicks:p,orientation:x,rangePadding:v,scale:S,tickFormat:N,tickLength:T,tickPosition:j,tickSign:K,ticks:re})))}var TNe=["axisClassName","labelOffset","tickLength","tickLabelProps"];function O2(){return O2=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}var RNe={dx:"-0.25em",dy:"0.25em",fill:"#222",fontFamily:"Arial",fontSize:10,textAnchor:"end"};function PNe(t){var e=t.axisClassName,n=t.labelOffset,r=n===void 0?36:n,i=t.tickLength,o=i===void 0?8:i,a=t.tickLabelProps,s=DNe(t,TNe),l=typeof a=="function"?a:O2({},RNe,a);return se.createElement(Nq,O2({axisClassName:ic("visx-axis-left",e),labelOffset:r,orientation:Rs.left,tickLabelProps:l,tickLength:o},s))}var NNe=["axisClassName","labelOffset","tickLength","tickLabelProps"];function I2(){return I2=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}var INe={dy:"0.25em",fill:"#222",fontFamily:"Arial",fontSize:10,textAnchor:"middle"};function FNe(t){var e=t.axisClassName,n=t.labelOffset,r=n===void 0?8:n,i=t.tickLength,o=i===void 0?8:i,a=t.tickLabelProps,s=ONe(t,NNe),l=typeof a=="function"?a:I2({},INe,a);return se.createElement(Nq,I2({axisClassName:ic("visx-axis-bottom",e),labelOffset:r,orientation:Rs.bottom,tickLabelProps:l,tickLength:o},s))}var Oq=zNe,LNe=Iq(H),kNe=Iq(gq),BNe=["from","to","fill","className","innerRef"];function Iq(t){return t&&t.__esModule?t:{default:t}}function XP(){return XP=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function zNe(t){var e=t.from,n=e===void 0?{x:0,y:0}:e,r=t.to,i=r===void 0?{x:1,y:1}:r,o=t.fill,a=o===void 0?"transparent":o,s=t.className,l=t.innerRef,u=UNe(t,BNe),c=n.x===i.x||n.y===i.y;return LNe.default.createElement("line",XP({ref:l,className:(0,kNe.default)("visx-line",s),x1:n.x,y1:n.y,x2:i.x,y2:i.y,fill:a,shapeRendering:c?"crispEdges":"auto"},u))}function Fq(t){return"bandwidth"in t?t.bandwidth():0}var $Ne=["top","left","scale","width","stroke","strokeWidth","strokeDasharray","className","children","numTicks","lineStyle","offset","tickValues"];function YP(){return YP=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function Lq(t){var e=t.top,n=e===void 0?0:e,r=t.left,i=r===void 0?0:r,o=t.scale,a=t.width,s=t.stroke,l=s===void 0?"#eaf0f6":s,u=t.strokeWidth,c=u===void 0?1:u,f=t.strokeDasharray,d=t.className,p=t.children,y=t.numTicks,x=y===void 0?10:y,_=t.lineStyle,v=t.offset,S=t.tickValues,w=HNe(t,$Ne),E=S??fI(o,x),T=(v??0)+Fq(o)/2,C=E.map(function(D,O){var P,N=((P=cI(o(D)))!=null?P:0)+T;return{index:O,from:new lb({x:0,y:N}),to:new lb({x:a,y:N})}});return se.createElement(Hb,{className:ic("visx-rows",d),top:n,left:i},p?p({lines:C}):C.map(function(D){var O=D.from,P=D.to,N=D.index;return se.createElement(Oq,YP({key:"row-line-"+N,from:O,to:P,stroke:l,strokeWidth:c,strokeDasharray:f,style:_},w))}))}Lq.propTypes={tickValues:st.array,width:st.number.isRequired};var VNe=["top","left","scale","height","stroke","strokeWidth","strokeDasharray","className","numTicks","lineStyle","offset","tickValues","children"];function KP(){return KP=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function kq(t){var e=t.top,n=e===void 0?0:e,r=t.left,i=r===void 0?0:r,o=t.scale,a=t.height,s=t.stroke,l=s===void 0?"#eaf0f6":s,u=t.strokeWidth,c=u===void 0?1:u,f=t.strokeDasharray,d=t.className,p=t.numTicks,y=p===void 0?10:p,x=t.lineStyle,_=t.offset,v=t.tickValues,S=t.children,w=WNe(t,VNe),E=v??fI(o,y),T=(_??0)+Fq(o)/2,C=E.map(function(D,O){var P,N=((P=cI(o(D)))!=null?P:0)+T;return{index:O,from:new lb({x:N,y:0}),to:new lb({x:N,y:a})}});return se.createElement(Hb,{className:ic("visx-columns",d),top:n,left:i},S?S({lines:C}):C.map(function(D){var O=D.from,P=D.to,N=D.index;return se.createElement(Oq,KP({key:"column-line-"+N,from:O,to:P,stroke:l,strokeWidth:c,strokeDasharray:f,style:x},w))}))}kq.propTypes={tickValues:st.array,height:st.number.isRequired};function tr(t){for(var e=t.length/6|0,n=new Array(e),r=0;rpTe(t[t.length-1]);var GNe=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(tr);const jNe=br(GNe);var qNe=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(tr);const XNe=br(qNe);var YNe=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(tr);const KNe=br(YNe);var ZNe=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(tr);const JNe=br(ZNe);var QNe=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(tr);const eOe=br(QNe);var tOe=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(tr);const nOe=br(tOe);var rOe=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(tr);const iOe=br(rOe);var oOe=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(tr);const aOe=br(oOe);var sOe=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(tr);const lOe=br(sOe);var uOe=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(tr);const cOe=br(uOe);var fOe=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(tr);const dOe=br(fOe);var hOe=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(tr);const pOe=br(hOe);var mOe=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(tr);const gOe=br(mOe);var vOe=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(tr);const yOe=br(vOe);var xOe=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(tr);const bOe=br(xOe);var _Oe=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(tr);const wOe=br(_Oe);var SOe=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(tr);const EOe=br(SOe);var MOe=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(tr);const COe=br(MOe);var AOe=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(tr);const TOe=br(AOe);var DOe=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(tr);const ROe=br(DOe);var POe=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(tr);const NOe=br(POe);var OOe=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(tr);const IOe=br(OOe);var FOe=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(tr);const LOe=br(FOe);var kOe=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(tr);const BOe=br(kOe);var UOe=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(tr);const zOe=br(UOe);var $Oe=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(tr);const HOe=br($Oe);var VOe=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(tr);const WOe=br(VOe);function GOe(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-t*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-t*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-t*2475.67)))))))+")"}const jOe=KC(rc(300,.5,0),rc(-240,.5,1));var qOe=KC(rc(-100,.75,.35),rc(80,1.5,.8)),XOe=KC(rc(260,.75,.35),rc(80,1.5,.8)),OS=rc();function YOe(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return OS.h=360*t-100,OS.s=1.5-1.5*e,OS.l=.8-.9*e,OS+""}var IS=Vd(),KOe=Math.PI/3,ZOe=Math.PI*2/3;function JOe(t){var e;return t=(.5-t)*Math.PI,IS.r=255*(e=Math.sin(t))*e,IS.g=255*(e=Math.sin(t+KOe))*e,IS.b=255*(e=Math.sin(t+ZOe))*e,IS+""}function QOe(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-t*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+t*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-t*6838.66)))))))+")"}function rA(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}const e4e=rA(tr("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var t4e=rA(tr("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),n4e=rA(tr("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),r4e=rA(tr("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),Bq={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},oU=se.createContext&&se.createContext(Bq),Fd=globalThis&&globalThis.__assign||function(){return Fd=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0},t.prototype.connect_=function(){!ZP||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),m4e?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){!ZP||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(e){var n=e.propertyName,r=n===void 0?"":n,i=p4e.some(function(o){return!!~r.indexOf(o)});i&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),$q=function(t,e){for(var n=0,r=Object.keys(e);n"u"||!(Element instanceof Object))){if(!(e instanceof dv(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)||(n.set(e,new E4e(e)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof dv(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)&&(n.delete(e),n.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&e.activeObservations_.push(n)})},t.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,n=this.activeObservations_.map(function(r){return new M4e(r.target,r.broadcastRect())});this.callback_.call(e,n,e),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),Vq=typeof WeakMap<"u"?new WeakMap:new zq,Wq=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=g4e.getInstance(),r=new C4e(e,n,this);Vq.set(this,r)}return t}();["observe","unobserve","disconnect"].forEach(function(t){Wq.prototype[t]=function(){var e;return(e=Vq.get(this))[t].apply(e,arguments)}});var A4e=function(){return typeof F2.ResizeObserver<"u"?F2.ResizeObserver:Wq}(),T4e=["client","offset","scroll","bounds","margin"];function sU(t){var e=[];return T4e.forEach(function(n){t[n]&&e.push(n)}),e}function lU(t,e){var n={};if(e.indexOf("client")>-1&&(n.client={top:t.clientTop,left:t.clientLeft,width:t.clientWidth,height:t.clientHeight}),e.indexOf("offset")>-1&&(n.offset={top:t.offsetTop,left:t.offsetLeft,width:t.offsetWidth,height:t.offsetHeight}),e.indexOf("scroll")>-1&&(n.scroll={top:t.scrollTop,left:t.scrollLeft,width:t.scrollWidth,height:t.scrollHeight}),e.indexOf("bounds")>-1){var r=t.getBoundingClientRect();n.bounds={top:r.top,right:r.right,bottom:r.bottom,left:r.left,width:r.width,height:r.height}}if(e.indexOf("margin")>-1){var i=getComputedStyle(t);n.margin={top:i?parseInt(i.marginTop):0,right:i?parseInt(i.marginRight):0,bottom:i?parseInt(i.marginBottom):0,left:i?parseInt(i.marginLeft):0}}return n}function D4e(t){var e=t&&t.ownerDocument&&t.ownerDocument.defaultView;return e||window}function R4e(t){return function(e){var n,r;return r=n=function(i){DO(o,i);function o(){for(var s,l=arguments.length,u=new Array(l),c=0;c0?e=t-1:this._settings.wrap?e=this._members.length-1:e=t,this.focusNodeAtIndex(e),e};zr.prototype.moveFocusToFirst=function(){this.focusNodeAtIndex(0)};zr.prototype.moveFocusToLast=function(){this.focusNodeAtIndex(this._members.length-1)};zr.prototype._handleUnboundKey=function(t){if(this._settings.stringSearch){if(this._searchString!==""&&(t.key===" "||t.keyCode===32))return t.preventDefault(),-1;if(!z4e(t.keyCode)||t.ctrlKey||t.metaKey||t.altKey)return-1;t.preventDefault(),this._addToSearchString(String.fromCharCode(t.keyCode)),this._runStringSearch()}};zr.prototype._clearSearchString=function(){this._searchString=""};zr.prototype._addToSearchString=function(t){this._searchString+=t.toLowerCase()};zr.prototype._startSearchStringRefreshTimer=function(){var t=this;this._clearSearchStringRefreshTimer(),this._stringSearchTimer=setTimeout(function(){t._clearSearchString()},this._settings.stringSearchDelay)};zr.prototype._clearSearchStringRefreshTimer=function(){clearTimeout(this._stringSearchTimer)};zr.prototype._runStringSearch=function(){this._startSearchStringRefreshTimer(),this.moveFocusByString(this._searchString)};zr.prototype.moveFocusByString=function(t){for(var e,n=0,r=this._members.length;n=65&&t<=90}function Xq(t){!t||!t.focus||(t.focus(),t.tagName.toLowerCase()==="input"&&t.select())}var $4e=function(e){return new zr(e)},H4e=$4e,uU=qq,V4e={wrap:!0,stringSearch:!0},W4e={init:function(e){this.updateOptions(e),this.handleBlur=G4e.bind(this),this.handleSelection=j4e.bind(this),this.handleMenuKey=q4e.bind(this),this.focusGroup=H4e(V4e),this.button=null,this.menu=null,this.isOpen=!1},updateOptions:function(e){var n=this.options;this.options=e||this.options||{},typeof this.options.closeOnSelection>"u"&&(this.options.closeOnSelection=!0),typeof this.options.closeOnBlur>"u"&&(this.options.closeOnBlur=!0),this.options.id&&uU.registerManager(this.options.id,this),n&&n.id&&n.id!==this.options.id&&uU.unregisterManager(this.options.id,this)},focusItem:function(e){this.focusGroup.focusNodeAtIndex(e)},addItem:function(e){this.focusGroup.addMember(e)},clearItems:function(){this.focusGroup.clearMembers()},handleButtonNonArrowKey:function(e){this.focusGroup._handleUnboundKey(e)},destroy:function(){this.button=null,this.menu=null,this.focusGroup.deactivate(),clearTimeout(this.blurTimer),clearTimeout(this.moveFocusTimer)},update:function(){this.menu.setState({isOpen:this.isOpen}),this.button.setState({menuOpen:this.isOpen}),this.options.onMenuToggle&&this.options.onMenuToggle({isOpen:this.isOpen})},openMenu:function(e){if(!this.isOpen&&(e=e||{},e.focusMenu===void 0&&(e.focusMenu=!0),this.isOpen=!0,this.update(),this.focusGroup.activate(),e.focusMenu)){var n=this;this.moveFocusTimer=setTimeout(function(){n.focusItem(0)},0)}},closeMenu:function(e){this.isOpen&&(e=e||{},this.isOpen=!1,this.update(),e.focusButton&&this.button.ref.current.focus())},toggleMenu:function(e,n){e=e||{},n=n||{},this.isOpen?this.closeMenu(e):this.openMenu(n)}};function G4e(){var t=this;t.blurTimer=setTimeout(function(){if(t.button){var e=t.button.ref.current;if(e){var n=e.ownerDocument.activeElement;if(!(e&&n===e)){var r=t.menu.ref.current;if(r===n){t.focusItem(0);return}r&&r.contains(n)||t.isOpen&&t.closeMenu({focusButton:!1})}}}},0)}function j4e(t,e){this.options.closeOnSelection&&this.closeMenu({focusButton:!0}),this.options.onSelection&&this.options.onSelection(t,e)}function q4e(t){if(this.isOpen)switch(t.key){case"Escape":t.preventDefault(),this.closeMenu({focusButton:!0});break;case"Home":t.preventDefault(),this.focusGroup.moveFocusToFirst();break;case"End":t.preventDefault(),this.focusGroup.moveFocusToLast();break}}var X4e=function(t){var e=Object.create(W4e);return e.init(t),e},Y4e=H,K4e=Y4e.createContext(),aA=K4e,FS=gv,sA={refType:FS.oneOfType([FS.func,FS.shape({current:FS.elementType})])},lA=function(t,e,n){n=n||{};for(var r in e)e.hasOwnProperty(r)&&(n[r]||(t[r]=e[r]))};function Z4e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function J4e(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Q4e(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var J1=H,R0=gv,eIe=X4e,tIe=aA,nIe=sA,rIe=nIe.refType,JP=lA,k2={children:R0.node.isRequired,forwardedRef:rIe,onMenuToggle:R0.func,onSelection:R0.func,closeOnSelection:R0.bool,closeOnBlur:R0.bool,tag:R0.string},cU=function(e){return{onMenuToggle:e.onMenuToggle,onSelection:e.onSelection,closeOnSelection:e.closeOnSelection,closeOnBlur:e.closeOnBlur,id:e.id}},gI=function(t){Q4e(e,t);function e(n){Z4e(this,e);var r=J4e(this,t.call(this,n));return r.manager=eIe(cU(n)),r}return e.prototype.componentDidUpdate=function(){this.manager.updateOptions(cU(this.props))},e.prototype.render=function(){var r={};return JP(r,this.props,k2),J1.createElement(tIe.Provider,{value:this.manager},J1.createElement(this.props.tag,r,this.props.children))},e}(J1.Component);gI.propTypes=k2;gI.defaultProps={tag:"div"};var iIe=J1.forwardRef(function(t,e){var n={forwardedRef:e};return JP(n,t,{children:k2.children,forwardedRef:k2.forwardedRef}),JP(n,{forwardedRef:e}),J1.createElement(gI,n,t.children)});function oIe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fU(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function aIe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var kg=H,LS=gv,sIe=aA,lIe=sA,uIe=lIe.refType,xE=lA,Q1={ambManager:LS.object.isRequired,children:LS.node.isRequired,disabled:LS.bool,forwardedRef:uIe,tag:LS.string},cIe=function(){return["button","fieldset","input","optgroup","option","select","textarea"]},vI=function(t){aIe(e,t);function e(){var n,r,i;oIe(this,e);for(var o=arguments.length,a=Array(o),s=0;s=0&&delete a.disabled,i.options.closeOnBlur&&(o.onBlur=i.handleBlur),xE(o,r,a),xE(o,{ref:this.setRef}),kg.createElement(r.tag,o,r.children)},e}(kg.Component);vI.propTypes=Q1;vI.defaultProps={tag:"span"};var fIe=kg.forwardRef(function(t,e){return kg.createElement(sIe.Consumer,null,function(n){var r={ambManager:n,forwardedRef:e};return xE(r,t,{ambManager:Q1.ambManager,children:Q1.children,forwardedRef:Q1.forwardedRef}),kg.createElement(vI,r,t.children)})}),dIe=function(e,n,r){var i=0,o=0,a=!1,s=!1,l=!1;e.addEventListener("click",u,r),e.addEventListener("touchstart",c,r);function u(_){l||n(_)}function c(_){l=!0,!a&&(a=!0,e.addEventListener("touchmove",f,r),e.addEventListener("touchend",d,r),e.addEventListener("touchcancel",p,r),s=!1,i=_.touches[0].clientX,o=_.touches[0].clientY)}function f(_){s||Math.abs(_.touches[0].clientX-i)<=10&&Math.abs(_.touches[0].clientY-o)<=10||(s=!0)}function d(_){a=!1,y(),s||n(_)}function p(){a=!1,s=!1,i=0,o=0}function y(){e.removeEventListener("touchmove",f,r),e.removeEventListener("touchend",d,r),e.removeEventListener("touchcancel",p,r)}function x(){e.removeEventListener("click",u,r),e.removeEventListener("touchstart",c,r),y()}return{remove:x}};function hIe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function dU(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function pIe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Bg=H,o1=gv,mIe=dIe,gIe=aA,vIe=sA,yIe=vIe.refType,QP=lA,ex={ambManager:o1.object.isRequired,children:o1.oneOfType([o1.func,o1.node]).isRequired,forwardedRef:yIe,tag:o1.string},yI=function(t){pIe(e,t);function e(){var n,r,i;hIe(this,e);for(var o=arguments.length,a=Array(o),s=0;s{let e;const n=new Set,r=(l,u)=>{const c=typeof l=="function"?l(e):l;if(!Object.is(c,e)){const f=e;e=u??typeof c!="object"?c:Object.assign({},e,c),n.forEach(d=>d(e,f))}},i=()=>e,s={setState:r,getState:i,subscribe:l=>(n.add(l),()=>n.delete(l)),destroy:()=>{n.clear()}};return e=t(r,i,s),s},CIe=t=>t?mU(t):mU,{useSyncExternalStoreWithSelector:AIe}=eW;function TIe(t,e=t.getState,n){const r=AIe(t.subscribe,t.getState,t.getServerState||t.getState,e,n);return H.useDebugValue(r),r}const gU=t=>{const e=typeof t=="function"?CIe(t):t,n=(r,i)=>TIe(e,r,i);return Object.assign(n,e),n},DIe=t=>t?gU(t):gU;var RIe=Object.defineProperty,PIe=(t,e,n)=>e in t?RIe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,kS=(t,e,n)=>(PIe(t,typeof e!="symbol"?e+"":e,n),n);const bI=H.createContext({}),NIe=H.createContext(void 0),OIe="_wrapper_1t5kp_1",IIe="_grid_1t5kp_6",FIe="_innerContainer_1t5kp_15",LIe="_colHeaders_1t5kp_19",kIe="_rowHeaders_1t5kp_23",BIe="_indexCell_1t5kp_28",UIe="_topLeftCell_1t5kp_49 _indexCell_1t5kp_28",zIe="_stickyGrid_1t5kp_53",$Ie="_cell_1t5kp_72",cp={wrapper:OIe,grid:IIe,innerContainer:FIe,colHeaders:LIe,rowHeaders:kIe,indexCell:BIe,topLeftCell:UIe,stickyGrid:zIe,cell:$Ie};function HIe(t){const{rowIndex:e,columnIndex:n,style:r}=t,{rowHeaderCellsWidth:i,cellSize:o,cellFormatter:a}=H.useContext(bI);return F.jsx("div",{className:cp.cell,style:{...r,left:r.left+i,top:r.top+o.height},role:"cell","aria-rowindex":e,"aria-colindex":n,"data-bg":(e+n)%2===1||void 0,children:a(e,n)})}H.memo(HIe);function vU(t){const{indexMin:e,indexMax:n,width:r,transform:i,headers:o}=t,{cellSize:a}=H.useContext(bI);return F.jsx(F.Fragment,{children:Jo.range(e,n+1).map(s=>F.jsx("div",{className:cp.indexCell,style:{width:r||a.width,height:a.height,transform:i},"data-bg":s%2===1?"":void 0,children:s>=0&&o?o[s]:s},s.toString()))})}const VIe=H.forwardRef((t,e)=>{const{children:n,style:r}=t,{rowCount:i,columnCount:o,cellSize:a,sticky:s,rowHeaderCellsWidth:l,columnHeaders:u}=H.useContext(bI),c=H.useContext(NIe),{overscanColumnStartIndex:f=0,overscanColumnStopIndex:d=0,overscanRowStartIndex:p=0,overscanRowStopIndex:y=0}=c||{};return F.jsxs("div",{ref:e,className:cp.stickyGrid,style:{...r,width:r.width+l,height:r.height+a.height},role:"table","aria-rowcount":i,"aria-colcount":o,"data-sticky":s||void 0,children:[F.jsxs("div",{className:cp.colHeaders,children:[F.jsx("div",{className:cp.topLeftCell,style:{width:l,height:a.height},"data-bg":!0,"aria-hidden":"true"}),F.jsx(vU,{indexMin:f,indexMax:d,transform:`translateX(${a.width*f}px)`,headers:u})]}),F.jsxs("div",{className:cp.innerContainer,children:[F.jsx("div",{className:cp.rowHeaders,"aria-hidden":"true",children:F.jsx(vU,{indexMin:p,indexMax:y,transform:`translateY(${a.height*p}px)`,width:l})}),n]})]})});VIe.displayName="StickyGrid";var Nv=(t=>(t.Group="group",t.Dataset="dataset",t.Datatype="datatype",t.Unresolved="unresolved",t))(Nv||{}),xa=(t=>(t.Bool="Boolean",t.Integer="Integer",t.Unsigned="Integer (unsigned)",t.Float="Float",t.Complex="Complex",t.String="String",t.Compound="Compound",t.Array="Array",t.VLen="Array (variable length)",t.Enum="Enumeration",t.Unknown="Unknown",t))(xa||{}),uA=(t=>(t.LE="little-endian",t.BE="big-endian",t))(uA||{}),Pn=(t=>(t.Linear="linear",t.Log="log",t.SymLog="symlog",t.Sqrt="sqrt",t.Gamma="gamma",t))(Pn||{});Pn.Linear,Pn.Log,Pn.SymLog;Pn.Linear,Pn.Log,Pn.SymLog,Pn.Sqrt;const yU=lc(".3~e"),tD=lc(".5~e");lc(".5~g");lc(".3~g");qIe(".12~g");const _I=3,WIe=/0\.([0-9]+)$/u,GIe=lc(`.${_I}~g`),jIe=lc(`.${_I}~e`);function nD(t){const e=GIe(t),n=WIe.exec(e);return n&&n[1].length>_I?jIe(t):e}function qIe(t,e=!1){const n=lc(t);return r=>{const[i,o]=r;if(o===0&&!e)return`${n(i)}`;if(i===0&&!e)return`${n(o)} i`;const a=Math.sign(o)>=0?" + ":" − ";return`${n(i)}${a}${n(Math.abs(o))} i`}}function XIe(t,e){return`${t==="/"?"":t}/${e}`}function YIe(t){const[e,n]=t.shape;return{rows:e,cols:n}}xa.Unsigned,xa.Integer,xa.Float,xa.String,xa.Bool,xa.Complex;function KIe(t){return t!==void 0}function ZIe(t){return t!==null}function bE(t,e="Expected some value"){if(!KIe(t))throw new TypeError(e)}function rD(t,e="Expected value to not be null"){if(!ZIe(t))throw new TypeError(e)}function JIe(t){return t.kind===Nv.Group}function QIe(t){return"children"in t}function e5e(t){return(...e)=>H.useMemo(()=>t(...e),e)}const od=Jo.range(-20,21),_E=Jo.range(0,100,5),t5e=Jo.range(-1,1.25,.25),n5e=Jo.range(10,40,10),r5e=Jo.range(1,4),i5e=Jo.range(9335,9338),ub=od.map(t=>t**2),wE=_E.map(t=>ub.map(e=>e-t)),Kq=t5e.map(t=>wE.map(e=>e.map(n=>n*t))),o5e=n5e.map(t=>Kq.map(e=>e.map(n=>n.map(r=>Math.sin(r/t))))),BS=[0,1,2,3],eN=[[[255,0,0],[0,255,0],[0,0,255]],[[0,255,255],[255,0,255],[255,255,0]],[[0,0,0],[128,128,128],[255,255,255]]],US=eN.flat(1/0),wI=Jo.range(1,11).map(t=>[t*Math.cos(t*3.14/10),t*Math.sin(t*3.14/10)]),Zq=["Hydrogen","Lithum","Carbon","Sodium","Argon"].map((t,e)=>[t,e,ub[e],e%2===0,wI[e]]),iD=[!0,!1,!1,!0,!0,!0,!1,!0,!1,!1],a5e=[Zq,["Vanadium","Niobium","Tantalum","Silicon","Germanium"].map((t,e)=>[t,e*10,ub[e],e%2===1,wI[e]])],s5e={null:null,raw:{int:42},scalar_int:0,scalar_int_42:42,scalar_str:"foo",scalar_bool:!0,scalar_cplx:[1,5],oneD:ub,oneD_cplx:wI,oneD_linear:od,oneD_errors:ub.map(t=>Math.abs(t)/10),oneD_str:["foo","bar"],oneD_bool:iD,twoD:wE,twoD_errors:_E.map(t=>od.map(e=>Math.abs(e-t))),twoD_cplx:[[[0,-5],[-2.1,-2]],[[5,0],[-3,.1]]],twoD_bool:iD.map(t=>iD.map(e=>t?e:!e)),threeD:Kq,threeD_bool:[[[!0,!1,!0,!1],[!0,!0,!0,!0],[!1,!1,!1,!1]],[[!0,!1,!1,!1],[!0,!0,!0,!0],[!1,!1,!0,!1]]],threeD_cplx:[[[[2,0],[1.41,1.41],[1,1.73],[0,2]],[[4,0],[2.82,2.82],[2,3.46],[0,4]],[[1,0],[.71,.71],[.5,.87],[0,1]]],[[[-1,0],[.87,-.5],[.92,-.38],[1,0]],[[-4,0],[3.46,-2],[3.7,-1.53],[4,0]],[[-8,0],[6.93,-4],[7.39,-3.06],[8,0]]]],threeD_rgb:eN,fourD_rgb:Jo.range(0,10).map(t=>eN.map(e=>e.map(n=>n.map(r=>Math.min(r+t*20,255))))),fourD:o5e,uint8:Uint8Array.from(BS),int16:Int16Array.from(BS),float32:Float32Array.from(BS),float64:Float64Array.from(BS),int8_rgb:Int8Array.from(US.map(t=>t-128)),uint8_rgb:Uint8Array.from(US),int32_rgb:Uint32Array.from(US),float32_rgb:Float32Array.from(US.map(t=>t/255)),X:od,X_desc:[...od].reverse(),X_log:od.map((t,e)=>(e+1)*.1),X_rgb:r5e,Y:_E,Y_desc:[..._E].reverse(),Y_rgb:i5e,title_twoD:"NeXus 2D",secondary:wE.map(t=>t.map(e=>e*2)),tertiary:wE.map(t=>t.map(e=>e/2)),position:[-1,1,3],scatter_data:od.map(t=>Math.cos(t*3.14/40)),Y_scatter:od.map((t,e)=>(e%10+e%5)/123456),oneD_compound:Zq,twoD_compound:a5e},Ht={class:xa.Integer,endianness:uA.LE,size:32};xa.Unsigned,uA.LE;const Bc={class:xa.Float,endianness:uA.LE,size:64},Vc={class:xa.String,charSet:"ASCII"},oD={class:xa.Compound,fields:{int:Ht}},_1={class:xa.Bool},ap={class:xa.Complex,realType:Bc,imagType:Bc},xU={class:xa.Compound,fields:{string:Vc,int:Ht,float:Bc,bool:_1,complex:ap}};function SI(t,e,n,r){return{name:t,type:e,shape:n,value:r}}function Jq(t,e,n){return SI(t,e,[],n)}function Ui(t,e){return Jq(t,Vc,e)}function bU(t,e){return Jq(t,Ht,e)}function tN(t,e){return{...t,attributes:[...t.attributes,...e]}}function P0(t){return tN(t,[Ui("CLASS","IMAGE"),Ui("IMAGE_VERSION","1.2")])}function Qq(t,e){t.children.forEach(n=>{n.path=XIe(e,n.path.slice(1)),JIe(n)&&QIe(n)&&Qq(n,e)})}function _s(t,e=[],n={}){const{attributes:r=[],link:i,isRoot:o=!1}=n,a=o?"/":`/${t}`,s={name:t,path:a,kind:Nv.Group,children:e,attributes:r,link:i};return Qq(s,a),s}function Jt(t,e,n,r={}){const{attributes:i=[],valueId:o=t,link:a}=r;return{name:t,path:`/${t}`,kind:Nv.Dataset,attributes:i,shape:n,type:e,value:s5e[o],link:a}}function sl(t,e,n={}){return Jt(t,e,[],n)}function l5e(t,e,n={}){const{attributes:r=[],link:i}=n;return{name:t,path:`/${t}`,kind:Nv.Datatype,attributes:r,type:e,link:i}}function aD(t,e,n,r){return{name:t,path:`/${t}`,kind:Nv.Unresolved,attributes:[],link:{class:e,file:r,path:n}}}function u5e(t){return SI("axes",Vc,[t.length],t)}function c5e(t){return SI("auxiliary_signals",Vc,[t.length],t)}function f5e(t){const{signalScaleType:e,axisScaleTypes:n}=t;return Ui("SILX_style",JSON.stringify({signal_scale_type:e,axes_scale_type:n}))}function ll(t,e,n={}){const{defaultPath:r,children:i,...o}=n;return _s(t,i,{...o,attributes:[...o.attributes??[],Ui("NX_class",e),...r?[Ui("default",r)]:[]]})}function _o(t,e){const{signal:n,title:r,errors:i,silxStyle:o,axes:a={},axesAttr:s,auxiliary:l={},auxAttr:u,attributes:c=[],children:f=[],...d}=e;return ll(t,"NXdata",{...d,attributes:[Ui("signal",n.name),...s?[u5e(s)]:[],...o?[f5e(o)]:[],...u?[c5e(u)]:[],...c],children:[n,...r?[r]:[],...i?[i]:[],...Object.values(a),...Object.values(l),...f]})}function oo(t,e,n,r={}){const{interpretation:i,longName:o,units:a,...s}=r;return Jt(t,e,n,{...s,attributes:[...s.attributes??[],...i?[Ui("interpretation",i)]:[],...o?[Ui("long_name",o)]:[],...a?[Ui("units",a)]:[]]})}const d5e="source.h5";ll(d5e,"NXroot",{isRoot:!0,defaultPath:"nexus_entry",children:[_s("entities",[_s("empty_group"),Jt("empty_dataset",Ht,null),l5e("datatype",oD),sl("raw",oD),sl("raw_large",oD),sl("scalar_int",Ht),sl("scalar_str",Vc),sl("scalar_bool",_1),sl("scalar_cplx",ap),aD("unresolved_hard_link","Hard"),aD("unresolved_soft_link","Soft","/foo"),aD("unresolved_external_link","External","entry_000/dataset","my_file.h5")]),_s("nD_datasets",[Jt("oneD_linear",Ht,[41]),Jt("oneD",Ht,[41]),Jt("oneD_cplx",ap,[10]),Jt("oneD_compound",xU,[5]),Jt("oneD_bool",_1,[10]),Jt("twoD",Ht,[20,41]),Jt("twoD_cplx",ap,[2,2]),Jt("twoD_compound",xU,[2,5]),Jt("twoD_bool",_1,[10,10]),Jt("threeD",Ht,[9,20,41]),Jt("threeD_bool",_1,[2,3,4]),Jt("threeD_cplx",ap,[2,3,4]),P0(Jt("threeD_rgb",Ht,[3,3,3])),Jt("fourD",Ht,[3,9,20,41])]),_s("typed_arrays",[Jt("uint8",Ht,[2,2]),Jt("int16",Ht,[2,2]),Jt("float32",Ht,[2,2]),Jt("float64",Ht,[2,2]),P0(Jt("int8_rgb",Ht,[3,3,3])),P0(Jt("uint8_rgb",Ht,[3,3,3])),P0(Jt("int32_rgb",Ht,[3,3,3])),P0(Jt("float32_rgb",Ht,[3,3,3]))]),ll("nexus_entry","NXentry",{defaultPath:"nx_process/nx_data",children:[ll("nx_process","NXprocess",{children:[_o("nx_data",{signal:Jt("twoD",Ht,[20,41]),silxStyle:{signalScaleType:Pn.SymLog},title:sl("title",Vc,{valueId:"title_twoD"})}),ll("absolute_default_path","NXentry",{defaultPath:"/nexus_entry/nx_process/nx_data"})]}),_o("spectrum",{signal:oo("twoD_spectrum",Ht,[20,41],{valueId:"twoD",interpretation:"spectrum",units:"arb. units"}),errors:Jt("errors",Bc,[20,41],{valueId:"twoD_errors"}),axes:{X:oo("X",Ht,[41],{units:"nm"})},axesAttr:[".","X"]}),_o("image",{signal:oo("fourD_image",Ht,[3,9,20,41],{valueId:"fourD",longName:"Interference fringes",interpretation:"image"}),axes:{X:oo("X",Ht,[41],{units:"nm"}),Y:oo("Y",Ht,[20],{units:"deg",longName:"Angle (degrees)"})},axesAttr:[".",".","Y","X"],silxStyle:{signalScaleType:Pn.Log}}),_o("log_spectrum",{signal:Jt("oneD",Ht,[41]),errors:Jt("oneD_errors",Ht,[41]),axes:{X_log:Jt("X_log",Bc,[41])},axesAttr:["X_log"],silxStyle:{signalScaleType:Pn.Log,axisScaleTypes:[Pn.Log]}}),_o("spectrum_with_aux",{signal:oo("twoD_spectrum",Ht,[20,41],{valueId:"twoD",interpretation:"spectrum",units:"arb. units"}),errors:Jt("errors",Bc,[20,41],{valueId:"twoD_errors"}),axes:{X:oo("X",Ht,[41],{units:"nm"})},axesAttr:[".","X"],auxiliary:{secondary:Jt("secondary",Ht,[20,41]),tertiary:Jt("tertiary",Ht,[20,41])},auxAttr:["secondary","tertiary"],children:[Jt("secondary_errors",Bc,[20,41],{valueId:"twoD_errors"})]}),_o("complex",{signal:Jt("twoD_complex",ap,[2,2],{valueId:"twoD_cplx"}),axes:{position:Jt("position",Ht,[3])},axesAttr:[".","position"]}),_o("complex_spectrum",{signal:oo("twoD_complex",ap,[2,2],{valueId:"twoD_cplx",interpretation:"spectrum"})}),_o("rgb-image",{signal:P0(oo("fourD_rgb",Ht,[10,3,3,3],{longName:"RGB CMY DGW",interpretation:"rgb-image"})),axes:{X_rgb:Jt("X_rgb",Bc,[3]),Y_rgb:Jt("Y_rgb",Bc,[3])},axesAttr:[".","Y_rgb","X_rgb"]}),_o("descending-axes",{signal:Jt("twoD",Ht,[20,41]),axes:{X:oo("X",Ht,[41],{valueId:"X_desc"}),Y:oo("Y",Ht,[20],{valueId:"Y_desc"})},axesAttr:["Y","X"]}),_o("scatter",{signal:Jt("scatter_data",Ht,[41]),axes:{X:oo("X",Ht,[41],{valueId:"X"}),Y:oo("Y",Ht,[41],{valueId:"Y_scatter"})},axesAttr:["X","Y"]}),ll("old-style","NXdata",{children:[Jt("twoD",Ht,[20,41],{attributes:[bU("signal",1),Ui("axes","Y:X")]}),oo("X",Ht,[41],{units:"nm"}),oo("Y",Ht,[20],{units:"deg",longName:"Angle (degrees)"})]})]}),ll("nexus_no_default","NXprocess",{defaultPath:void 0,children:[ll("ignore_me","NXentry"),_o("spectrum",{signal:Jt("oneD",Ht,[41])})]}),_s("nexus_malformed",[_s("default_not_found",[],{attributes:[Ui("default","/test")]}),_s("no_signal",[],{attributes:[Ui("NX_class","NXdata")]}),_s("signal_not_found",[],{attributes:[Ui("NX_class","NXdata"),Ui("signal","unknown")]}),ll("signal_not_dataset","NXdata",{children:[_s("some_group")],attributes:[Ui("signal","some_group")]}),ll("signal_old-style_not_dataset","NXdata",{children:[_s("some_group",[],{attributes:[bU("signal",1)]})]}),ll("signal_not_array","NXdata",{children:[sl("some_scalar",Ht)],attributes:[Ui("signal","some_scalar")]}),ll("signal_not_numeric","NXdata",{children:[Jt("oneD_str",Vc,[2])],attributes:[Ui("signal","oneD_str")]}),_o("interpretation_unknown",{signal:oo("fourD",Ht,[3,9,20,41],{interpretation:"unknown"})}),_o("rgb-image_incompatible",{signal:oo("oneD",Ht,[41],{interpretation:"rgb-image"})}),tN(_o("silx_style_unknown",{signal:Jt("oneD",Ht,[41]),axes:{X:Jt("X",Ht,[41])},axesAttr:["X"]}),[Ui("SILX_style",JSON.stringify({unknown:Pn.Log,signal_scale_type:"invalid",axes_scale_type:["invalid"]}))]),tN(_o("silx_style_malformed",{signal:Jt("oneD",Ht,[41])}),[Ui("SILX_style","{")])]),_s("resilience",[sl("error_value",Ht),sl("slow_value",Ht,{valueId:"scalar_int_42"}),Jt("slow_slicing",Ht,[9,20,41],{valueId:"threeD"}),_s("slow_metadata"),_o("slow_nx_spectrum",{signal:oo("slow_twoD",Ht,[20,41],{valueId:"twoD",interpretation:"spectrum"}),errors:Jt("slow_twoD_errors",Ht,[20,41],{valueId:"twoD_errors"}),axes:{slow_X:Jt("slow_X",Ht,[41],{valueId:"X"})},axesAttr:[".","slow_X"],auxiliary:{slow_secondary:Jt("slow_secondary",Ht,[20,41],{valueId:"secondary"})},auxAttr:["slow_secondary"],title:sl("title",Vc,{valueId:"title_twoD"})}),_o("slow_nx_image",{signal:Jt("slow_threeD",Ht,[9,20,41],{valueId:"threeD"}),axes:{slow_X:Jt("slow_X",Ht,[41],{valueId:"X"}),slow_Y:Jt("slow_Y",Ht,[20],{valueId:"Y"})},axesAttr:[".","slow_Y","slow_X"],title:sl("title",Vc,{valueId:"title_twoD"})})])]});const h5e=new ae(0,0,0);class _g extends Al{get size(){const{x:e,y:n}=this.getSize(new ae);return{width:e,height:n}}get center(){return this.getCenter(new ae)}static empty(e=h5e){return new _g(e.clone(),e.clone())}static fromPoints(...e){return new _g().setFromPoints(e)}static fromSize({width:e,height:n}){return _g.empty().expandBySize(e,n)}clampPoint(e){return super.clampPoint(e,new ae)}expandBySize(e,n){const{size:r}=this,i=e<0?Math.max(e,-r.width):e,o=n<0?Math.max(n,-r.height):n;return this.expandByVector(new ae(i,o).divideScalar(2))}expandToRatio(e){if(e===void 0||e<=0)return this;const{width:n,height:r}=this.size,i=n/r;return e>i?this.expandBySize(r*e-n,0):this.expandBySize(0,n/e-r)}hasMinSize(e,n=e){const{width:r,height:i}=this.size;return r>=e&&i>=n}keepWithin(e){const{center:n,size:r}=this,{width:i,height:o}=e.size,a=_g.empty(e.center).expandBySize(Math.max(i-r.width,0),Math.max(o-r.height,0)).clampPoint(n).sub(n).setZ(0);return this.translate(a)}toRect(){return[this.min,this.max]}}const Gd=_g;function _U(t,e){const n=e-t;return r=>n!==0?(r-t)/n:.5}function eX(t){let e=(t==null?void 0:t.domain)||[0,1],n=(t==null?void 0:t.range)||[0,1],r=(t==null?void 0:t.exponent)??1,i=(t==null?void 0:t.clamp)||!1,o=cv,a;const s=function(D){const O=Jo.isNumber(D)?D:D.valueOf();return Number.isNaN(O)?a:o(...n)(_U(...e)(l(O))**r)};function l(D){if(!i)return D;const[O,P]=e;return Math.max(O,Math.min(P,D))}function u(D){return D?(e=D,C):[...e]}function c(D){return D?(n=D,C):[...n]}function f(D){return D?(n=D,o=nI,C):[...n]}function d(D){return D?(i=D,C):i}function p(){return a}function y(D){return D?(o=D,C):o}function x(D){return D?(r=D,C):r}function _(D){return l(cv(...e)(_U(...n)(D)**(1/r)))}function v(){return H3e({domain:e,range:n,exponent:r,clamp:i})}function S(D){return e=v().nice(D).domain(),C}function w(D){return v().ticks(D)}function E(D,O){return v().tickFormat(D,O)}function T(){return eX().domain(e).range(n).exponent(r).clamp(i).interpolate(o)}const C=Object.assign(s,{domain:u,range:c,rangeRound:f,clamp:d,interpolate:y,invert:_,unknown:p,exponent:x,nice:S,ticks:w,tickFormat:E,copy:T});return C}const p5e=[.1,1],m5e={left:80,right:24,top:16,bottom:34},g5e=28,wU=24;Pn.Linear+"",-1/0,Pn.Log+"",Number.MIN_VALUE,Pn.SymLog+"",-1/0,Pn.Sqrt+"",Pn.Gamma+"",-1/0;const v5e=uI({domain:[300,900],range:[3,10],clamp:!0,round:!0}),y5e=uI({domain:[300,500],range:[.8,1.4]});function tX(t,e){if(Array.isArray(t)){const[,n]=t;return eX({...e,exponent:n})}switch(t){case Pn.Linear:return uI(e);case Pn.Log:return z3e(e);case Pn.SymLog:return W3e(e);case Pn.Sqrt:return j3e(e)}throw new Error("Unknown scale type")}function x5e(t,e){const{width:n,height:r}=t;return e?n/r>e?{width:r*e,height:r}:{width:n,height:n/e}:{width:n,height:r}}function b5e(t,e=[-Number.MAX_VALUE/2,Number.MAX_VALUE/2]){const[n,r]=e;return Jo.clamp(t,n,r)}function SU(t,e){const{scaleType:n,visDomain:r,flip:i,nice:o=!1}=t;return tX(n??Pn.Linear,{domain:r,range:[-e/2,e/2],reverse:i,nice:o})}function _5e(t,e){const n=Math.min(...t),r=Math.max(...t),i=Math.ceil(n),o=Math.floor(r),a=o-i+1,s=Math.min(a,e);if(s===0)return[];const l=Math.max(Lj(i,o,s),1),u=Math.ceil(n/l),c=Math.floor(r/l)-u+1;return Array.from({length:c},(f,d)=>(u+d)*l)}function w5e(t,e,n){if(n!==Pn.Log)return nD;const[r,i]=t[0]>0?t:[-t[1],-[t[0]]],o=y5e(e);return i/r<10**o?nD:a=>{const s=Math.log10(Math.abs(a.valueOf()));return s===Math.floor(s)?nD(a):""}}function nX(t,e,n){if(t==="auto")return;if(t==="equal")return nX(1,e,n);const[r,i]=e,[o,a]=n;return Math.abs(i-r)/Math.abs(a-o)/t}function S5e(t={}){const{left:e,right:n,top:r,bottom:i}=m5e;return{left:e+(t.left?wU:0),right:n,top:r+(t.top?g5e:0),bottom:i+(t.bottom?wU:0)}}const E5e=` +*/(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var r=[],i=0;i=0)&&(n[i]=t[i]);return n}function Vb(t){var e=t.top,n=e===void 0?0:e,r=t.left,i=r===void 0?0:r,o=t.transform,a=t.className,s=t.children,l=t.innerRef,u=EDe(t,SDe);return se.createElement("g",VP({ref:l,className:rc("visx-group",a),transform:o||"translate("+i+", "+n+")"},u),s)}Vb.propTypes={top:st.number,left:st.number,transform:st.string,className:st.string,children:st.node,innerRef:st.oneOfType([st.string,st.func,st.object])};var MDe=["from","to","fill","className","innerRef"];function WP(){return WP=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function Eq(t){var e=t.from,n=e===void 0?{x:0,y:0}:e,r=t.to,i=r===void 0?{x:1,y:1}:r,o=t.fill,a=o===void 0?"transparent":o,s=t.className,l=t.innerRef,u=CDe(t,MDe),c=n.x===i.x||n.y===i.y;return se.createElement("line",WP({ref:l,className:rc("visx-line",s),x1:n.x,y1:n.y,x2:i.x,y2:i.y,fill:a,shapeRendering:c?"crispEdges":"auto"},u))}var ADe=Mq;function Mq(t,e,n){t instanceof RegExp&&(t=KB(t,n)),e instanceof RegExp&&(e=KB(e,n));var r=Cq(t,e,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+t.length,r[1]),post:n.slice(r[1]+e.length)}}function KB(t,e){var n=e.match(t);return n?n[0]:null}Mq.range=Cq;function Cq(t,e,n){var r,i,o,a,s,l=n.indexOf(t),u=n.indexOf(e,l+1),c=l;if(l>=0&&u>0){for(r=[],o=n.length;c>=0&&!s;)c==l?(r.push(c),l=n.indexOf(t,c+1)):r.length==1?s=[r.pop(),u]:(i=r.pop(),i=0?l:u;r.length&&(s=[o,a])}return s}var TDe=Aq;function Aq(t,e,n){t instanceof RegExp&&(t=ZB(t,n)),e instanceof RegExp&&(e=ZB(e,n));var r=Tq(t,e,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+t.length,r[1]),post:n.slice(r[1]+e.length)}}function ZB(t,e){var n=e.match(t);return n?n[0]:null}Aq.range=Tq;function Tq(t,e,n){var r,i,o,a,s,l=n.indexOf(t),u=n.indexOf(e,l+1),c=l;if(l>=0&&u>0){if(t===e)return[l,u];for(r=[],o=n.length;c>=0&&!s;)c==l?(r.push(c),l=n.indexOf(t,c+1)):r.length==1?s=[r.pop(),u]:(i=r.pop(),i=0?l:u;r.length&&(s=[o,a])}return s}var DDe=TDe,RDe=Dq;function Dq(t,e,n){var r=t;return PDe(t,e).reduce(function(i,o){return i.replace(o.functionIdentifier+"("+o.matches.body+")",NDe(o.matches.body,o.functionIdentifier,n,r,e))},t)}function PDe(t,e){var n=[],r=typeof e=="string"?new RegExp("\\b("+e+")\\("):e;do{var i=r.exec(t);if(!i)return n;if(i[1]===void 0)throw new Error("Missing the first couple of parenthesis to get the function identifier in "+e);var o=i[1],a=i.index,s=DDe("(",")",t.substring(a));if(!s||s.start!==i[0].length-1)throw new SyntaxError(o+"(): missing closing ')' in the value '"+t+"'");n.push({matches:s,functionIdentifier:o}),t=s.post}while(r.test(t));return n}function NDe(t,e,n,r,i){return n(Dq(t,i,n),e,r)}var ma=function(t){this.value=t};ma.math={isDegree:!0,acos:function(t){return ma.math.isDegree?180/Math.PI*Math.acos(t):Math.acos(t)},add:function(t,e){return t+e},asin:function(t){return ma.math.isDegree?180/Math.PI*Math.asin(t):Math.asin(t)},atan:function(t){return ma.math.isDegree?180/Math.PI*Math.atan(t):Math.atan(t)},acosh:function(t){return Math.log(t+Math.sqrt(t*t-1))},asinh:function(t){return Math.log(t+Math.sqrt(t*t+1))},atanh:function(t){return Math.log((1+t)/(1-t))},C:function(t,e){var n=1,r=t-e,i=e;iva.length-2?va.length-1:t.length-a;i>0;i--)if(va[i]!==void 0)for(o=0;o0&&ur)a.push(e);else{for(;r>=i&&!u||u&&i"u"?e[e.length-1].value.push(o[s]):e[e.length-1].value=o[s].value(e[e.length-1].value);else if(o[s].type===7)typeof e[e.length-1].type>"u"?e[e.length-1].value.push(o[s]):e[e.length-1].value=o[s].value(e[e.length-1].value);else if(o[s].type===8){for(var l=[],u=0;u"u"?(r.value=r.concat(n),r.value.push(o[s]),e.push(r)):typeof n.type>"u"?(n.unshift(r),n.push(o[s]),e.push(n)):e.push({type:1,value:o[s].value(r.value,n.value)})):o[s].type===2||o[s].type===9?(n=e.pop(),r=e.pop(),typeof r.type>"u"?(r=r.concat(n),r.push(o[s]),e.push(r)):typeof n.type>"u"?(n.unshift(r),n.push(o[s]),e.push(n)):e.push({type:1,value:o[s].value(r.value,n.value)})):o[s].type===12?(n=e.pop(),typeof n.type<"u"&&(n=[n]),r=e.pop(),i=e.pop(),e.push({type:1,value:o[s].value(i.value,r.value,new J1(n))})):o[s].type===13&&(a?e.push({value:t[o[s].value],type:3}):e.push([o[s]]));if(e.length>1)throw new J1.Exception("Uncaught Syntax error");return e[0].value>1e15?"Infinity":parseFloat(e[0].value.toFixed(15))};J1.eval=function(t,e,n){return typeof e>"u"?this.lex(t).toPostfix().postfixEval():typeof n>"u"?typeof e.length<"u"?this.lex(t,e).toPostfix().postfixEval():this.lex(t).toPostfix().postfixEval(e):this.lex(t,e).toPostfix().postfixEval(n)};var $De=J1,Pq=$De;Pq.prototype.formulaEval=function(){for(var t,e,n,r=[],i=this.value,o=0;o"+e.value+""+i[o].show+""+t.value+"",type:10}):r.push({value:(e.type!=1?"(":"")+e.value+(e.type!=1?")":"")+""+t.value+"",type:1})):i[o].type===2||i[o].type===9?(t=r.pop(),e=r.pop(),r.push({value:(e.type!=1?"(":"")+e.value+(e.type!=1?")":"")+i[o].show+(t.type!=1?"(":"")+t.value+(t.type!=1?")":""),type:i[o].type})):i[o].type===12&&(t=r.pop(),e=r.pop(),n=r.pop(),r.push({value:i[o].show+"("+n.value+","+e.value+","+t.value+")",type:12}));return r[0].value};var HDe=Pq,VDe=ADe,WDe=RDe,GDe=HDe,jDe=100,qDe=/(\+|\-|\*|\\|[^a-z]|)(\s*)(\()/g,J3,XDe=YDe;function YDe(t,e){J3=0,e=Math.pow(10,e===void 0?5:e),t=t.replace(/\n+/g," ");function n(i,o,a){if(J3++>jDe)throw J3=0,new Error("Call stack overflow for "+a);if(i==="")throw new Error(o+"(): '"+a+"' must contain a non-whitespace string");i=r(i,a);var s=KDe(i);if(s.length>1||i.indexOf("var(")>-1)return o+"("+i+")";var l=s[0]||"";l==="%"&&(i=i.replace(/\b[0-9\.]+%/g,function(f){return parseFloat(f.slice(0,-1))*.01}));var u=i.replace(new RegExp(l,"gi"),""),c;try{c=GDe.eval(u)}catch{return o+"("+i+")"}return l==="%"&&(c*=100),(o.length||l==="%")&&(c=Math.round(c*e)/e),c+=l,c}function r(i,o){i=i.replace(/((?:\-[a-z]+\-)?calc)/g,"");for(var a="",s=i,l;l=qDe.exec(s);){l[0].index>0&&(a+=s.substring(0,l[0].index));var u=VDe("(",")",s.substring([0].index));if(u.body==="")throw new Error("'"+i+"' must contain a non-whitespace string");var c=n(u.body,"",o);a+=u.pre+c,s=u.post}return a+s}return WDe(t,/((?:\-[a-z]+\-)?calc)\(/,n)}function KDe(t){for(var e=[],n=[],r=/[\.0-9]([%a-z]+)/gi,i=r.exec(t);i;)!i||!i[1]||(n.indexOf(i[1].toLowerCase())===-1&&(e.push(i[1]),n.push(i[1].toLowerCase())),i=r.exec(t));return e}const Q3=su(XDe);var ZDe=typeof Uc=="object"&&Uc&&Uc.Object===Object&&Uc,Nq=ZDe,JDe=Nq,QDe=typeof self=="object"&&self&&self.Object===Object&&self,eRe=JDe||QDe||Function("return this")(),uc=eRe,tRe=uc,nRe=tRe.Symbol,Wb=nRe,JB=Wb,Oq=Object.prototype,rRe=Oq.hasOwnProperty,iRe=Oq.toString,s1=JB?JB.toStringTag:void 0;function oRe(t){var e=rRe.call(t,s1),n=t[s1];try{t[s1]=void 0;var r=!0}catch{}var i=iRe.call(t);return r&&(e?t[s1]=n:delete t[s1]),i}var aRe=oRe,sRe=Object.prototype,lRe=sRe.toString;function uRe(t){return lRe.call(t)}var cRe=uRe,QB=Wb,fRe=aRe,dRe=cRe,hRe="[object Null]",pRe="[object Undefined]",eU=QB?QB.toStringTag:void 0;function mRe(t){return t==null?t===void 0?pRe:hRe:eU&&eU in Object(t)?fRe(t):dRe(t)}var um=mRe;function gRe(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Pv=gRe,vRe=um,yRe=Pv,xRe="[object AsyncFunction]",bRe="[object Function]",_Re="[object GeneratorFunction]",wRe="[object Proxy]";function SRe(t){if(!yRe(t))return!1;var e=vRe(t);return e==bRe||e==_Re||e==xRe||e==wRe}var Iq=SRe,ERe=uc,MRe=ERe["__core-js_shared__"],CRe=MRe,eD=CRe,tU=function(){var t=/[^.]+$/.exec(eD&&eD.keys&&eD.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function ARe(t){return!!tU&&tU in t}var TRe=ARe,DRe=Function.prototype,RRe=DRe.toString;function PRe(t){if(t!=null){try{return RRe.call(t)}catch{}try{return t+""}catch{}}return""}var Fq=PRe,NRe=Iq,ORe=TRe,IRe=Pv,FRe=Fq,LRe=/[\\^$.*+?()[\]{}|]/g,kRe=/^\[object .+?Constructor\]$/,BRe=Function.prototype,URe=Object.prototype,zRe=BRe.toString,$Re=URe.hasOwnProperty,HRe=RegExp("^"+zRe.call($Re).replace(LRe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function VRe(t){if(!IRe(t)||ORe(t))return!1;var e=NRe(t)?HRe:kRe;return e.test(FRe(t))}var WRe=VRe;function GRe(t,e){return t==null?void 0:t[e]}var jRe=GRe,qRe=WRe,XRe=jRe;function YRe(t,e){var n=XRe(t,e);return qRe(n)?n:void 0}var cm=YRe,KRe=cm,ZRe=KRe(Object,"create"),eA=ZRe,nU=eA;function JRe(){this.__data__=nU?nU(null):{},this.size=0}var QRe=JRe;function ePe(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var tPe=ePe,nPe=eA,rPe="__lodash_hash_undefined__",iPe=Object.prototype,oPe=iPe.hasOwnProperty;function aPe(t){var e=this.__data__;if(nPe){var n=e[t];return n===rPe?void 0:n}return oPe.call(e,t)?e[t]:void 0}var sPe=aPe,lPe=eA,uPe=Object.prototype,cPe=uPe.hasOwnProperty;function fPe(t){var e=this.__data__;return lPe?e[t]!==void 0:cPe.call(e,t)}var dPe=fPe,hPe=eA,pPe="__lodash_hash_undefined__";function mPe(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=hPe&&e===void 0?pPe:e,this}var gPe=mPe,vPe=QRe,yPe=tPe,xPe=sPe,bPe=dPe,_Pe=gPe;function Nv(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e-1}var BPe=kPe,UPe=tA;function zPe(t,e){var n=this.__data__,r=UPe(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}var $Pe=zPe,HPe=EPe,VPe=NPe,WPe=FPe,GPe=BPe,jPe=$Pe;function Ov(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e=0)&&(n[i]=t[i]);return n}function tD(t){return typeof t=="number"}function aU(t){return typeof t=="number"&&Number.isFinite(t)||typeof t=="string"}function CNe(t){var e=t.verticalAnchor,n=e===void 0?"end":e,r=t.scaleToFit,i=r===void 0?!1:r,o=t.angle,a=t.width,s=t.lineHeight,l=s===void 0?"1em":s,u=t.capHeight,c=u===void 0?"0.71em":u,f=t.children,d=t.style,p=MNe(t,ENe),y=p.x,x=y===void 0?0:y,_=p.y,v=_===void 0?0:_,S=!aU(x)||!aU(v),w=H.useMemo(function(){var P=f==null?[]:f.toString().split(/(?:(?!\u00A0+)\s+)/);return{wordsWithWidth:P.map(function(N){return{word:N,wordWidth:oU(N,d)||0}}),spaceWidth:oU(" ",d)||0}},[f,d]),E=w.wordsWithWidth,T=w.spaceWidth,C=H.useMemo(function(){return S?[]:a||i?E.reduce(function(P,N){var k=N.word,G=N.wordWidth,Z=P[P.length-1];if(Z&&(a==null||i||(Z.width||0)+G+T0){var N=C[0].width||1,k=i==="shrink-only"?Math.min(a/N,1):a/N,G=k,Z=x-k*x,j=v-G*v;P.push("matrix("+k+", 0, 0, "+G+", "+Z+", "+j+")")}return o&&P.push("rotate("+o+", "+x+", "+v+")"),P.length>0?P.join(" "):""},[S,x,v,a,i,C,o]);return{wordsByLines:C,startDy:D,transform:O}}var ANe=["dx","dy","textAnchor","innerRef","innerTextRef","verticalAnchor","angle","lineHeight","scaleToFit","capHeight","width"];function qP(){return qP=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}var DNe={overflow:"visible"};function Bq(t){var e=t.dx,n=e===void 0?0:e,r=t.dy,i=r===void 0?0:r,o=t.textAnchor,a=o===void 0?"start":o,s=t.innerRef,l=t.innerTextRef;t.verticalAnchor,t.angle;var u=t.lineHeight,c=u===void 0?"1em":u;t.scaleToFit,t.capHeight,t.width;var f=TNe(t,ANe),d=f.x,p=d===void 0?0:d,y=f.fontSize,x=CNe(t),_=x.wordsByLines,v=x.startDy,S=x.transform;return se.createElement("svg",{ref:s,x:n,y:i,fontSize:y,style:DNe},_.length>0?se.createElement("text",qP({ref:l,transform:S},f,{textAnchor:a}),_.map(function(w,E){return se.createElement("tspan",{key:E,x:p,dy:E===0?v:c},w.words.join(" "))})):null)}var RNe={top:"top",left:"left",right:"right",bottom:"bottom"};const Rs=RNe;function PNe(t){var e=t.labelOffset,n=t.labelProps,r=t.orientation,i=t.range,o=t.tickLabelFontSize,a=t.tickLength,s=r===Rs.left||r===Rs.top?-1:1,l,u,c;if(r===Rs.top||r===Rs.bottom){var f=r===Rs.bottom&&typeof n.fontSize=="number"?n.fontSize:0;l=(Number(i[0])+Number(i[i.length-1]))/2,u=s*(a+e+o+f)}else l=s*((Number(i[0])+Number(i[i.length-1]))/2),u=-(a+e),c="rotate("+s*90+")";return{x:l,y:u,transform:c}}function Q1(){return Q1=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function Uq(t){var e=t.children,n=e===void 0?ONe:e,r=t.axisClassName,i=t.hideAxisLine,o=i===void 0?!1:i,a=t.hideTicks,s=a===void 0?!1:a,l=t.hideZero,u=l===void 0?!1:l,c=t.left,f=c===void 0?0:c,d=t.numTicks,p=d===void 0?10:d,y=t.orientation,x=y===void 0?Rs.bottom:y,_=t.rangePadding,v=_===void 0?0:_,S=t.scale,w=t.tickFormat,E=t.tickLength,T=E===void 0?8:E,C=t.tickValues,D=t.top,O=D===void 0?0:D,P=BNe(t,kNe),N=w??FNe(S),k=x===Rs.left,G=x===Rs.top,Z=G||x===Rs.bottom,j=INe(S),K=k||G?-1:1,Y=S.range(),$=LNe(v),W=NS({x:Number(Y[0])+.5-$.start,y:0},Z),U=NS({x:Number(Y[Y.length-1])+.5+$.end,y:0},Z),te=(C??dI(S,p)).filter(function(le){return!u||le!==0&&le!=="0"}).map(function(le,ce){return{value:le,index:ce}}),re=te.map(function(le){var ce=le.value,Ce=le.index,Re=fI(j(ce));return{value:ce,index:Ce,from:NS({x:Re,y:0},Z),to:NS({x:Re,y:T*K},Z),formattedValue:N(ce,Ce,te)}});return se.createElement(Vb,{className:rc("visx-axis",r),top:O,left:f},n(YP({},P,{axisFromPoint:W,axisToPoint:U,hideAxisLine:o,hideTicks:s,hideZero:u,horizontal:Z,numTicks:p,orientation:x,rangePadding:v,scale:S,tickFormat:N,tickLength:T,tickPosition:j,tickSign:K,ticks:re})))}var UNe=["axisClassName","labelOffset","tickLength","tickLabelProps"];function O2(){return O2=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}var $Ne={dx:"-0.25em",dy:"0.25em",fill:"#222",fontFamily:"Arial",fontSize:10,textAnchor:"end"};function HNe(t){var e=t.axisClassName,n=t.labelOffset,r=n===void 0?36:n,i=t.tickLength,o=i===void 0?8:i,a=t.tickLabelProps,s=zNe(t,UNe),l=typeof a=="function"?a:O2({},$Ne,a);return se.createElement(Uq,O2({axisClassName:rc("visx-axis-left",e),labelOffset:r,orientation:Rs.left,tickLabelProps:l,tickLength:o},s))}var VNe=["axisClassName","labelOffset","tickLength","tickLabelProps"];function I2(){return I2=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}var GNe={dy:"0.25em",fill:"#222",fontFamily:"Arial",fontSize:10,textAnchor:"middle"};function jNe(t){var e=t.axisClassName,n=t.labelOffset,r=n===void 0?8:n,i=t.tickLength,o=i===void 0?8:i,a=t.tickLabelProps,s=WNe(t,VNe),l=typeof a=="function"?a:I2({},GNe,a);return se.createElement(Uq,I2({axisClassName:rc("visx-axis-bottom",e),labelOffset:r,orientation:Rs.bottom,tickLabelProps:l,tickLength:o},s))}var zq=ZNe,qNe=$q(H),XNe=$q(Sq),YNe=["from","to","fill","className","innerRef"];function $q(t){return t&&t.__esModule?t:{default:t}}function KP(){return KP=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function ZNe(t){var e=t.from,n=e===void 0?{x:0,y:0}:e,r=t.to,i=r===void 0?{x:1,y:1}:r,o=t.fill,a=o===void 0?"transparent":o,s=t.className,l=t.innerRef,u=KNe(t,YNe),c=n.x===i.x||n.y===i.y;return qNe.default.createElement("line",KP({ref:l,className:(0,XNe.default)("visx-line",s),x1:n.x,y1:n.y,x2:i.x,y2:i.y,fill:a,shapeRendering:c?"crispEdges":"auto"},u))}function Hq(t){return"bandwidth"in t?t.bandwidth():0}var JNe=["top","left","scale","width","stroke","strokeWidth","strokeDasharray","className","children","numTicks","lineStyle","offset","tickValues"];function ZP(){return ZP=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function Vq(t){var e=t.top,n=e===void 0?0:e,r=t.left,i=r===void 0?0:r,o=t.scale,a=t.width,s=t.stroke,l=s===void 0?"#eaf0f6":s,u=t.strokeWidth,c=u===void 0?1:u,f=t.strokeDasharray,d=t.className,p=t.children,y=t.numTicks,x=y===void 0?10:y,_=t.lineStyle,v=t.offset,S=t.tickValues,w=QNe(t,JNe),E=S??dI(o,x),T=(v??0)+Hq(o)/2,C=E.map(function(D,O){var P,N=((P=fI(o(D)))!=null?P:0)+T;return{index:O,from:new ub({x:0,y:N}),to:new ub({x:a,y:N})}});return se.createElement(Vb,{className:rc("visx-rows",d),top:n,left:i},p?p({lines:C}):C.map(function(D){var O=D.from,P=D.to,N=D.index;return se.createElement(zq,ZP({key:"row-line-"+N,from:O,to:P,stroke:l,strokeWidth:c,strokeDasharray:f,style:_},w))}))}Vq.propTypes={tickValues:st.array,width:st.number.isRequired};var eOe=["top","left","scale","height","stroke","strokeWidth","strokeDasharray","className","numTicks","lineStyle","offset","tickValues","children"];function JP(){return JP=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function Wq(t){var e=t.top,n=e===void 0?0:e,r=t.left,i=r===void 0?0:r,o=t.scale,a=t.height,s=t.stroke,l=s===void 0?"#eaf0f6":s,u=t.strokeWidth,c=u===void 0?1:u,f=t.strokeDasharray,d=t.className,p=t.numTicks,y=p===void 0?10:p,x=t.lineStyle,_=t.offset,v=t.tickValues,S=t.children,w=tOe(t,eOe),E=v??dI(o,y),T=(_??0)+Hq(o)/2,C=E.map(function(D,O){var P,N=((P=fI(o(D)))!=null?P:0)+T;return{index:O,from:new ub({x:N,y:0}),to:new ub({x:N,y:a})}});return se.createElement(Vb,{className:rc("visx-columns",d),top:n,left:i},S?S({lines:C}):C.map(function(D){var O=D.from,P=D.to,N=D.index;return se.createElement(zq,JP({key:"column-line-"+N,from:O,to:P,stroke:l,strokeWidth:c,strokeDasharray:f,style:x},w))}))}Wq.propTypes={tickValues:st.array,height:st.number.isRequired};function tr(t){for(var e=t.length/6|0,n=new Array(e),r=0;rMTe(t[t.length-1]);var nOe=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(tr);const rOe=br(nOe);var iOe=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(tr);const oOe=br(iOe);var aOe=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(tr);const sOe=br(aOe);var lOe=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(tr);const uOe=br(lOe);var cOe=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(tr);const fOe=br(cOe);var dOe=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(tr);const hOe=br(dOe);var pOe=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(tr);const mOe=br(pOe);var gOe=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(tr);const vOe=br(gOe);var yOe=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(tr);const xOe=br(yOe);var bOe=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(tr);const _Oe=br(bOe);var wOe=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(tr);const SOe=br(wOe);var EOe=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(tr);const MOe=br(EOe);var COe=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(tr);const AOe=br(COe);var TOe=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(tr);const DOe=br(TOe);var ROe=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(tr);const POe=br(ROe);var NOe=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(tr);const OOe=br(NOe);var IOe=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(tr);const FOe=br(IOe);var LOe=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(tr);const kOe=br(LOe);var BOe=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(tr);const UOe=br(BOe);var zOe=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(tr);const $Oe=br(zOe);var HOe=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(tr);const VOe=br(HOe);var WOe=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(tr);const GOe=br(WOe);var jOe=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(tr);const qOe=br(jOe);var XOe=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(tr);const YOe=br(XOe);var KOe=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(tr);const ZOe=br(KOe);var JOe=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(tr);const QOe=br(JOe);var e4e=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(tr);const t4e=br(e4e);function n4e(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-t*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-t*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-t*2475.67)))))))+")"}const r4e=ZC(nc(300,.5,0),nc(-240,.5,1));var i4e=ZC(nc(-100,.75,.35),nc(80,1.5,.8)),o4e=ZC(nc(260,.75,.35),nc(80,1.5,.8)),OS=nc();function a4e(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return OS.h=360*t-100,OS.s=1.5-1.5*e,OS.l=.8-.9*e,OS+""}var IS=Wd(),s4e=Math.PI/3,l4e=Math.PI*2/3;function u4e(t){var e;return t=(.5-t)*Math.PI,IS.r=255*(e=Math.sin(t))*e,IS.g=255*(e=Math.sin(t+s4e))*e,IS.b=255*(e=Math.sin(t+l4e))*e,IS+""}function c4e(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-t*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+t*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-t*6838.66)))))))+")"}function iA(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}const f4e=iA(tr("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var d4e=iA(tr("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),h4e=iA(tr("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),p4e=iA(tr("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),Gq={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},lU=se.createContext&&se.createContext(Gq),Ld=globalThis&&globalThis.__assign||function(){return Ld=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0},t.prototype.connect_=function(){!QP||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),C4e?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){!QP||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(e){var n=e.propertyName,r=n===void 0?"":n,i=M4e.some(function(o){return!!~r.indexOf(o)});i&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),Xq=function(t,e){for(var n=0,r=Object.keys(e);n"u"||!(Element instanceof Object))){if(!(e instanceof mv(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)||(n.set(e,new F4e(e)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof mv(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)&&(n.delete(e),n.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&e.activeObservations_.push(n)})},t.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,n=this.activeObservations_.map(function(r){return new L4e(r.target,r.broadcastRect())});this.callback_.call(e,n,e),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),Kq=typeof WeakMap<"u"?new WeakMap:new qq,Zq=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=A4e.getInstance(),r=new k4e(e,n,this);Kq.set(this,r)}return t}();["observe","unobserve","disconnect"].forEach(function(t){Zq.prototype[t]=function(){var e;return(e=Kq.get(this))[t].apply(e,arguments)}});var B4e=function(){return typeof F2.ResizeObserver<"u"?F2.ResizeObserver:Zq}(),U4e=["client","offset","scroll","bounds","margin"];function cU(t){var e=[];return U4e.forEach(function(n){t[n]&&e.push(n)}),e}function fU(t,e){var n={};if(e.indexOf("client")>-1&&(n.client={top:t.clientTop,left:t.clientLeft,width:t.clientWidth,height:t.clientHeight}),e.indexOf("offset")>-1&&(n.offset={top:t.offsetTop,left:t.offsetLeft,width:t.offsetWidth,height:t.offsetHeight}),e.indexOf("scroll")>-1&&(n.scroll={top:t.scrollTop,left:t.scrollLeft,width:t.scrollWidth,height:t.scrollHeight}),e.indexOf("bounds")>-1){var r=t.getBoundingClientRect();n.bounds={top:r.top,right:r.right,bottom:r.bottom,left:r.left,width:r.width,height:r.height}}if(e.indexOf("margin")>-1){var i=getComputedStyle(t);n.margin={top:i?parseInt(i.marginTop):0,right:i?parseInt(i.marginRight):0,bottom:i?parseInt(i.marginBottom):0,left:i?parseInt(i.marginLeft):0}}return n}function z4e(t){var e=t&&t.ownerDocument&&t.ownerDocument.defaultView;return e||window}function $4e(t){return function(e){var n,r;return r=n=function(i){PO(o,i);function o(){for(var s,l=arguments.length,u=new Array(l),c=0;c0?e=t-1:this._settings.wrap?e=this._members.length-1:e=t,this.focusNodeAtIndex(e),e};zr.prototype.moveFocusToFirst=function(){this.focusNodeAtIndex(0)};zr.prototype.moveFocusToLast=function(){this.focusNodeAtIndex(this._members.length-1)};zr.prototype._handleUnboundKey=function(t){if(this._settings.stringSearch){if(this._searchString!==""&&(t.key===" "||t.keyCode===32))return t.preventDefault(),-1;if(!Z4e(t.keyCode)||t.ctrlKey||t.metaKey||t.altKey)return-1;t.preventDefault(),this._addToSearchString(String.fromCharCode(t.keyCode)),this._runStringSearch()}};zr.prototype._clearSearchString=function(){this._searchString=""};zr.prototype._addToSearchString=function(t){this._searchString+=t.toLowerCase()};zr.prototype._startSearchStringRefreshTimer=function(){var t=this;this._clearSearchStringRefreshTimer(),this._stringSearchTimer=setTimeout(function(){t._clearSearchString()},this._settings.stringSearchDelay)};zr.prototype._clearSearchStringRefreshTimer=function(){clearTimeout(this._stringSearchTimer)};zr.prototype._runStringSearch=function(){this._startSearchStringRefreshTimer(),this.moveFocusByString(this._searchString)};zr.prototype.moveFocusByString=function(t){for(var e,n=0,r=this._members.length;n=65&&t<=90}function tX(t){!t||!t.focus||(t.focus(),t.tagName.toLowerCase()==="input"&&t.select())}var J4e=function(e){return new zr(e)},Q4e=J4e,dU=eX,eIe={wrap:!0,stringSearch:!0},tIe={init:function(e){this.updateOptions(e),this.handleBlur=nIe.bind(this),this.handleSelection=rIe.bind(this),this.handleMenuKey=iIe.bind(this),this.focusGroup=Q4e(eIe),this.button=null,this.menu=null,this.isOpen=!1},updateOptions:function(e){var n=this.options;this.options=e||this.options||{},typeof this.options.closeOnSelection>"u"&&(this.options.closeOnSelection=!0),typeof this.options.closeOnBlur>"u"&&(this.options.closeOnBlur=!0),this.options.id&&dU.registerManager(this.options.id,this),n&&n.id&&n.id!==this.options.id&&dU.unregisterManager(this.options.id,this)},focusItem:function(e){this.focusGroup.focusNodeAtIndex(e)},addItem:function(e){this.focusGroup.addMember(e)},clearItems:function(){this.focusGroup.clearMembers()},handleButtonNonArrowKey:function(e){this.focusGroup._handleUnboundKey(e)},destroy:function(){this.button=null,this.menu=null,this.focusGroup.deactivate(),clearTimeout(this.blurTimer),clearTimeout(this.moveFocusTimer)},update:function(){this.menu.setState({isOpen:this.isOpen}),this.button.setState({menuOpen:this.isOpen}),this.options.onMenuToggle&&this.options.onMenuToggle({isOpen:this.isOpen})},openMenu:function(e){if(!this.isOpen&&(e=e||{},e.focusMenu===void 0&&(e.focusMenu=!0),this.isOpen=!0,this.update(),this.focusGroup.activate(),e.focusMenu)){var n=this;this.moveFocusTimer=setTimeout(function(){n.focusItem(0)},0)}},closeMenu:function(e){this.isOpen&&(e=e||{},this.isOpen=!1,this.update(),e.focusButton&&this.button.ref.current.focus())},toggleMenu:function(e,n){e=e||{},n=n||{},this.isOpen?this.closeMenu(e):this.openMenu(n)}};function nIe(){var t=this;t.blurTimer=setTimeout(function(){if(t.button){var e=t.button.ref.current;if(e){var n=e.ownerDocument.activeElement;if(!(e&&n===e)){var r=t.menu.ref.current;if(r===n){t.focusItem(0);return}r&&r.contains(n)||t.isOpen&&t.closeMenu({focusButton:!1})}}}},0)}function rIe(t,e){this.options.closeOnSelection&&this.closeMenu({focusButton:!0}),this.options.onSelection&&this.options.onSelection(t,e)}function iIe(t){if(this.isOpen)switch(t.key){case"Escape":t.preventDefault(),this.closeMenu({focusButton:!0});break;case"Home":t.preventDefault(),this.focusGroup.moveFocusToFirst();break;case"End":t.preventDefault(),this.focusGroup.moveFocusToLast();break}}var oIe=function(t){var e=Object.create(tIe);return e.init(t),e},aIe=H,sIe=aIe.createContext(),sA=sIe,FS=xv,lA={refType:FS.oneOfType([FS.func,FS.shape({current:FS.elementType})])},uA=function(t,e,n){n=n||{};for(var r in e)e.hasOwnProperty(r)&&(n[r]||(t[r]=e[r]))};function lIe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function uIe(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function cIe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var ex=H,P0=xv,fIe=oIe,dIe=sA,hIe=lA,pIe=hIe.refType,eN=uA,k2={children:P0.node.isRequired,forwardedRef:pIe,onMenuToggle:P0.func,onSelection:P0.func,closeOnSelection:P0.bool,closeOnBlur:P0.bool,tag:P0.string},hU=function(e){return{onMenuToggle:e.onMenuToggle,onSelection:e.onSelection,closeOnSelection:e.closeOnSelection,closeOnBlur:e.closeOnBlur,id:e.id}},vI=function(t){cIe(e,t);function e(n){lIe(this,e);var r=uIe(this,t.call(this,n));return r.manager=fIe(hU(n)),r}return e.prototype.componentDidUpdate=function(){this.manager.updateOptions(hU(this.props))},e.prototype.render=function(){var r={};return eN(r,this.props,k2),ex.createElement(dIe.Provider,{value:this.manager},ex.createElement(this.props.tag,r,this.props.children))},e}(ex.Component);vI.propTypes=k2;vI.defaultProps={tag:"div"};var mIe=ex.forwardRef(function(t,e){var n={forwardedRef:e};return eN(n,t,{children:k2.children,forwardedRef:k2.forwardedRef}),eN(n,{forwardedRef:e}),ex.createElement(vI,n,t.children)});function gIe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function pU(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function vIe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Ug=H,LS=xv,yIe=sA,xIe=lA,bIe=xIe.refType,xE=uA,tx={ambManager:LS.object.isRequired,children:LS.node.isRequired,disabled:LS.bool,forwardedRef:bIe,tag:LS.string},_Ie=function(){return["button","fieldset","input","optgroup","option","select","textarea"]},yI=function(t){vIe(e,t);function e(){var n,r,i;gIe(this,e);for(var o=arguments.length,a=Array(o),s=0;s=0&&delete a.disabled,i.options.closeOnBlur&&(o.onBlur=i.handleBlur),xE(o,r,a),xE(o,{ref:this.setRef}),Ug.createElement(r.tag,o,r.children)},e}(Ug.Component);yI.propTypes=tx;yI.defaultProps={tag:"span"};var wIe=Ug.forwardRef(function(t,e){return Ug.createElement(yIe.Consumer,null,function(n){var r={ambManager:n,forwardedRef:e};return xE(r,t,{ambManager:tx.ambManager,children:tx.children,forwardedRef:tx.forwardedRef}),Ug.createElement(yI,r,t.children)})}),SIe=function(e,n,r){var i=0,o=0,a=!1,s=!1,l=!1;e.addEventListener("click",u,r),e.addEventListener("touchstart",c,r);function u(_){l||n(_)}function c(_){l=!0,!a&&(a=!0,e.addEventListener("touchmove",f,r),e.addEventListener("touchend",d,r),e.addEventListener("touchcancel",p,r),s=!1,i=_.touches[0].clientX,o=_.touches[0].clientY)}function f(_){s||Math.abs(_.touches[0].clientX-i)<=10&&Math.abs(_.touches[0].clientY-o)<=10||(s=!0)}function d(_){a=!1,y(),s||n(_)}function p(){a=!1,s=!1,i=0,o=0}function y(){e.removeEventListener("touchmove",f,r),e.removeEventListener("touchend",d,r),e.removeEventListener("touchcancel",p,r)}function x(){e.removeEventListener("click",u,r),e.removeEventListener("touchstart",c,r),y()}return{remove:x}};function EIe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function mU(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function MIe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var zg=H,l1=xv,CIe=SIe,AIe=sA,TIe=lA,DIe=TIe.refType,tN=uA,nx={ambManager:l1.object.isRequired,children:l1.oneOfType([l1.func,l1.node]).isRequired,forwardedRef:DIe,tag:l1.string},xI=function(t){MIe(e,t);function e(){var n,r,i;EIe(this,e);for(var o=arguments.length,a=Array(o),s=0;s{let e;const n=new Set,r=(l,u)=>{const c=typeof l=="function"?l(e):l;if(!Object.is(c,e)){const f=e;e=u??typeof c!="object"?c:Object.assign({},e,c),n.forEach(d=>d(e,f))}},i=()=>e,s={setState:r,getState:i,subscribe:l=>(n.add(l),()=>n.delete(l)),destroy:()=>{n.clear()}};return e=t(r,i,s),s},kIe=t=>t?yU(t):yU,{useSyncExternalStoreWithSelector:BIe}=sW;function UIe(t,e=t.getState,n){const r=BIe(t.subscribe,t.getState,t.getServerState||t.getState,e,n);return H.useDebugValue(r),r}const xU=t=>{const e=typeof t=="function"?kIe(t):t,n=(r,i)=>UIe(e,r,i);return Object.assign(n,e),n},zIe=t=>t?xU(t):xU;var $Ie=Object.defineProperty,HIe=(t,e,n)=>e in t?$Ie(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,kS=(t,e,n)=>(HIe(t,typeof e!="symbol"?e+"":e,n),n);const _I=H.createContext({}),VIe=H.createContext(void 0),WIe="_wrapper_1t5kp_1",GIe="_grid_1t5kp_6",jIe="_innerContainer_1t5kp_15",qIe="_colHeaders_1t5kp_19",XIe="_rowHeaders_1t5kp_23",YIe="_indexCell_1t5kp_28",KIe="_topLeftCell_1t5kp_49 _indexCell_1t5kp_28",ZIe="_stickyGrid_1t5kp_53",JIe="_cell_1t5kp_72",fp={wrapper:WIe,grid:GIe,innerContainer:jIe,colHeaders:qIe,rowHeaders:XIe,indexCell:YIe,topLeftCell:KIe,stickyGrid:ZIe,cell:JIe};function QIe(t){const{rowIndex:e,columnIndex:n,style:r}=t,{rowHeaderCellsWidth:i,cellSize:o,cellFormatter:a}=H.useContext(_I);return F.jsx("div",{className:fp.cell,style:{...r,left:r.left+i,top:r.top+o.height},role:"cell","aria-rowindex":e,"aria-colindex":n,"data-bg":(e+n)%2===1||void 0,children:a(e,n)})}H.memo(QIe);function bU(t){const{indexMin:e,indexMax:n,width:r,transform:i,headers:o}=t,{cellSize:a}=H.useContext(_I);return F.jsx(F.Fragment,{children:Jo.range(e,n+1).map(s=>F.jsx("div",{className:fp.indexCell,style:{width:r||a.width,height:a.height,transform:i},"data-bg":s%2===1?"":void 0,children:s>=0&&o?o[s]:s},s.toString()))})}const e5e=H.forwardRef((t,e)=>{const{children:n,style:r}=t,{rowCount:i,columnCount:o,cellSize:a,sticky:s,rowHeaderCellsWidth:l,columnHeaders:u}=H.useContext(_I),c=H.useContext(VIe),{overscanColumnStartIndex:f=0,overscanColumnStopIndex:d=0,overscanRowStartIndex:p=0,overscanRowStopIndex:y=0}=c||{};return F.jsxs("div",{ref:e,className:fp.stickyGrid,style:{...r,width:r.width+l,height:r.height+a.height},role:"table","aria-rowcount":i,"aria-colcount":o,"data-sticky":s||void 0,children:[F.jsxs("div",{className:fp.colHeaders,children:[F.jsx("div",{className:fp.topLeftCell,style:{width:l,height:a.height},"data-bg":!0,"aria-hidden":"true"}),F.jsx(bU,{indexMin:f,indexMax:d,transform:`translateX(${a.width*f}px)`,headers:u})]}),F.jsxs("div",{className:fp.innerContainer,children:[F.jsx("div",{className:fp.rowHeaders,"aria-hidden":"true",children:F.jsx(bU,{indexMin:p,indexMax:y,transform:`translateY(${a.height*p}px)`,width:l})}),n]})]})});e5e.displayName="StickyGrid";var Fv=(t=>(t.Group="group",t.Dataset="dataset",t.Datatype="datatype",t.Unresolved="unresolved",t))(Fv||{}),xa=(t=>(t.Bool="Boolean",t.Integer="Integer",t.Unsigned="Integer (unsigned)",t.Float="Float",t.Complex="Complex",t.String="String",t.Compound="Compound",t.Array="Array",t.VLen="Array (variable length)",t.Enum="Enumeration",t.Unknown="Unknown",t))(xa||{}),cA=(t=>(t.LE="little-endian",t.BE="big-endian",t))(cA||{}),Rn=(t=>(t.Linear="linear",t.Log="log",t.SymLog="symlog",t.Sqrt="sqrt",t.Gamma="gamma",t))(Rn||{});Rn.Linear,Rn.Log,Rn.SymLog;Rn.Linear,Rn.Log,Rn.SymLog,Rn.Sqrt;const _U=lc(".3~e"),rD=lc(".5~e");lc(".5~g");lc(".3~g");i5e(".12~g");const wI=3,t5e=/0\.([0-9]+)$/u,n5e=lc(`.${wI}~g`),r5e=lc(`.${wI}~e`);function iD(t){const e=n5e(t),n=t5e.exec(e);return n&&n[1].length>wI?r5e(t):e}function i5e(t,e=!1){const n=lc(t);return r=>{const[i,o]=r;if(o===0&&!e)return`${n(i)}`;if(i===0&&!e)return`${n(o)} i`;const a=Math.sign(o)>=0?" + ":" − ";return`${n(i)}${a}${n(Math.abs(o))} i`}}function o5e(t,e){return`${t==="/"?"":t}/${e}`}function a5e(t){const[e,n]=t.shape;return{rows:e,cols:n}}xa.Unsigned,xa.Integer,xa.Float,xa.String,xa.Bool,xa.Complex;function s5e(t){return t!==void 0}function l5e(t){return t!==null}function bE(t,e="Expected some value"){if(!s5e(t))throw new TypeError(e)}function oD(t,e="Expected value to not be null"){if(!l5e(t))throw new TypeError(e)}function u5e(t){return t.kind===Fv.Group}function c5e(t){return"children"in t}function f5e(t){return(...e)=>H.useMemo(()=>t(...e),e)}const ad=Jo.range(-20,21),_E=Jo.range(0,100,5),d5e=Jo.range(-1,1.25,.25),h5e=Jo.range(10,40,10),p5e=Jo.range(1,4),m5e=Jo.range(9335,9338),cb=ad.map(t=>t**2),wE=_E.map(t=>cb.map(e=>e-t)),rX=d5e.map(t=>wE.map(e=>e.map(n=>n*t))),g5e=h5e.map(t=>rX.map(e=>e.map(n=>n.map(r=>Math.sin(r/t))))),BS=[0,1,2,3],nN=[[[255,0,0],[0,255,0],[0,0,255]],[[0,255,255],[255,0,255],[255,255,0]],[[0,0,0],[128,128,128],[255,255,255]]],US=nN.flat(1/0),SI=Jo.range(1,11).map(t=>[t*Math.cos(t*3.14/10),t*Math.sin(t*3.14/10)]),iX=["Hydrogen","Lithum","Carbon","Sodium","Argon"].map((t,e)=>[t,e,cb[e],e%2===0,SI[e]]),aD=[!0,!1,!1,!0,!0,!0,!1,!0,!1,!1],v5e=[iX,["Vanadium","Niobium","Tantalum","Silicon","Germanium"].map((t,e)=>[t,e*10,cb[e],e%2===1,SI[e]])],y5e={null:null,raw:{int:42},scalar_int:0,scalar_int_42:42,scalar_str:"foo",scalar_bool:!0,scalar_cplx:[1,5],oneD:cb,oneD_cplx:SI,oneD_linear:ad,oneD_errors:cb.map(t=>Math.abs(t)/10),oneD_str:["foo","bar"],oneD_bool:aD,twoD:wE,twoD_errors:_E.map(t=>ad.map(e=>Math.abs(e-t))),twoD_cplx:[[[0,-5],[-2.1,-2]],[[5,0],[-3,.1]]],twoD_bool:aD.map(t=>aD.map(e=>t?e:!e)),threeD:rX,threeD_bool:[[[!0,!1,!0,!1],[!0,!0,!0,!0],[!1,!1,!1,!1]],[[!0,!1,!1,!1],[!0,!0,!0,!0],[!1,!1,!0,!1]]],threeD_cplx:[[[[2,0],[1.41,1.41],[1,1.73],[0,2]],[[4,0],[2.82,2.82],[2,3.46],[0,4]],[[1,0],[.71,.71],[.5,.87],[0,1]]],[[[-1,0],[.87,-.5],[.92,-.38],[1,0]],[[-4,0],[3.46,-2],[3.7,-1.53],[4,0]],[[-8,0],[6.93,-4],[7.39,-3.06],[8,0]]]],threeD_rgb:nN,fourD_rgb:Jo.range(0,10).map(t=>nN.map(e=>e.map(n=>n.map(r=>Math.min(r+t*20,255))))),fourD:g5e,uint8:Uint8Array.from(BS),int16:Int16Array.from(BS),float32:Float32Array.from(BS),float64:Float64Array.from(BS),int8_rgb:Int8Array.from(US.map(t=>t-128)),uint8_rgb:Uint8Array.from(US),int32_rgb:Uint32Array.from(US),float32_rgb:Float32Array.from(US.map(t=>t/255)),X:ad,X_desc:[...ad].reverse(),X_log:ad.map((t,e)=>(e+1)*.1),X_rgb:p5e,Y:_E,Y_desc:[..._E].reverse(),Y_rgb:m5e,title_twoD:"NeXus 2D",secondary:wE.map(t=>t.map(e=>e*2)),tertiary:wE.map(t=>t.map(e=>e/2)),position:[-1,1,3],scatter_data:ad.map(t=>Math.cos(t*3.14/40)),Y_scatter:ad.map((t,e)=>(e%10+e%5)/123456),oneD_compound:iX,twoD_compound:v5e},Ht={class:xa.Integer,endianness:cA.LE,size:32};xa.Unsigned,cA.LE;const Bc={class:xa.Float,endianness:cA.LE,size:64},Vc={class:xa.String,charSet:"ASCII"},sD={class:xa.Compound,fields:{int:Ht}},E1={class:xa.Bool},sp={class:xa.Complex,realType:Bc,imagType:Bc},wU={class:xa.Compound,fields:{string:Vc,int:Ht,float:Bc,bool:E1,complex:sp}};function EI(t,e,n,r){return{name:t,type:e,shape:n,value:r}}function oX(t,e,n){return EI(t,e,[],n)}function Ui(t,e){return oX(t,Vc,e)}function SU(t,e){return oX(t,Ht,e)}function rN(t,e){return{...t,attributes:[...t.attributes,...e]}}function N0(t){return rN(t,[Ui("CLASS","IMAGE"),Ui("IMAGE_VERSION","1.2")])}function aX(t,e){t.children.forEach(n=>{n.path=o5e(e,n.path.slice(1)),u5e(n)&&c5e(n)&&aX(n,e)})}function _s(t,e=[],n={}){const{attributes:r=[],link:i,isRoot:o=!1}=n,a=o?"/":`/${t}`,s={name:t,path:a,kind:Fv.Group,children:e,attributes:r,link:i};return aX(s,a),s}function Qt(t,e,n,r={}){const{attributes:i=[],valueId:o=t,link:a}=r;return{name:t,path:`/${t}`,kind:Fv.Dataset,attributes:i,shape:n,type:e,value:y5e[o],link:a}}function sl(t,e,n={}){return Qt(t,e,[],n)}function x5e(t,e,n={}){const{attributes:r=[],link:i}=n;return{name:t,path:`/${t}`,kind:Fv.Datatype,attributes:r,type:e,link:i}}function lD(t,e,n,r){return{name:t,path:`/${t}`,kind:Fv.Unresolved,attributes:[],link:{class:e,file:r,path:n}}}function b5e(t){return EI("axes",Vc,[t.length],t)}function _5e(t){return EI("auxiliary_signals",Vc,[t.length],t)}function w5e(t){const{signalScaleType:e,axisScaleTypes:n}=t;return Ui("SILX_style",JSON.stringify({signal_scale_type:e,axes_scale_type:n}))}function ll(t,e,n={}){const{defaultPath:r,children:i,...o}=n;return _s(t,i,{...o,attributes:[...o.attributes??[],Ui("NX_class",e),...r?[Ui("default",r)]:[]]})}function wo(t,e){const{signal:n,title:r,errors:i,silxStyle:o,axes:a={},axesAttr:s,auxiliary:l={},auxAttr:u,attributes:c=[],children:f=[],...d}=e;return ll(t,"NXdata",{...d,attributes:[Ui("signal",n.name),...s?[b5e(s)]:[],...o?[w5e(o)]:[],...u?[_5e(u)]:[],...c],children:[n,...r?[r]:[],...i?[i]:[],...Object.values(a),...Object.values(l),...f]})}function ao(t,e,n,r={}){const{interpretation:i,longName:o,units:a,...s}=r;return Qt(t,e,n,{...s,attributes:[...s.attributes??[],...i?[Ui("interpretation",i)]:[],...o?[Ui("long_name",o)]:[],...a?[Ui("units",a)]:[]]})}const S5e="source.h5";ll(S5e,"NXroot",{isRoot:!0,defaultPath:"nexus_entry",children:[_s("entities",[_s("empty_group"),Qt("empty_dataset",Ht,null),x5e("datatype",sD),sl("raw",sD),sl("raw_large",sD),sl("scalar_int",Ht),sl("scalar_str",Vc),sl("scalar_bool",E1),sl("scalar_cplx",sp),lD("unresolved_hard_link","Hard"),lD("unresolved_soft_link","Soft","/foo"),lD("unresolved_external_link","External","entry_000/dataset","my_file.h5")]),_s("nD_datasets",[Qt("oneD_linear",Ht,[41]),Qt("oneD",Ht,[41]),Qt("oneD_cplx",sp,[10]),Qt("oneD_compound",wU,[5]),Qt("oneD_bool",E1,[10]),Qt("twoD",Ht,[20,41]),Qt("twoD_cplx",sp,[2,2]),Qt("twoD_compound",wU,[2,5]),Qt("twoD_bool",E1,[10,10]),Qt("threeD",Ht,[9,20,41]),Qt("threeD_bool",E1,[2,3,4]),Qt("threeD_cplx",sp,[2,3,4]),N0(Qt("threeD_rgb",Ht,[3,3,3])),Qt("fourD",Ht,[3,9,20,41])]),_s("typed_arrays",[Qt("uint8",Ht,[2,2]),Qt("int16",Ht,[2,2]),Qt("float32",Ht,[2,2]),Qt("float64",Ht,[2,2]),N0(Qt("int8_rgb",Ht,[3,3,3])),N0(Qt("uint8_rgb",Ht,[3,3,3])),N0(Qt("int32_rgb",Ht,[3,3,3])),N0(Qt("float32_rgb",Ht,[3,3,3]))]),ll("nexus_entry","NXentry",{defaultPath:"nx_process/nx_data",children:[ll("nx_process","NXprocess",{children:[wo("nx_data",{signal:Qt("twoD",Ht,[20,41]),silxStyle:{signalScaleType:Rn.SymLog},title:sl("title",Vc,{valueId:"title_twoD"})}),ll("absolute_default_path","NXentry",{defaultPath:"/nexus_entry/nx_process/nx_data"})]}),wo("spectrum",{signal:ao("twoD_spectrum",Ht,[20,41],{valueId:"twoD",interpretation:"spectrum",units:"arb. units"}),errors:Qt("errors",Bc,[20,41],{valueId:"twoD_errors"}),axes:{X:ao("X",Ht,[41],{units:"nm"})},axesAttr:[".","X"]}),wo("image",{signal:ao("fourD_image",Ht,[3,9,20,41],{valueId:"fourD",longName:"Interference fringes",interpretation:"image"}),axes:{X:ao("X",Ht,[41],{units:"nm"}),Y:ao("Y",Ht,[20],{units:"deg",longName:"Angle (degrees)"})},axesAttr:[".",".","Y","X"],silxStyle:{signalScaleType:Rn.Log}}),wo("log_spectrum",{signal:Qt("oneD",Ht,[41]),errors:Qt("oneD_errors",Ht,[41]),axes:{X_log:Qt("X_log",Bc,[41])},axesAttr:["X_log"],silxStyle:{signalScaleType:Rn.Log,axisScaleTypes:[Rn.Log]}}),wo("spectrum_with_aux",{signal:ao("twoD_spectrum",Ht,[20,41],{valueId:"twoD",interpretation:"spectrum",units:"arb. units"}),errors:Qt("errors",Bc,[20,41],{valueId:"twoD_errors"}),axes:{X:ao("X",Ht,[41],{units:"nm"})},axesAttr:[".","X"],auxiliary:{secondary:Qt("secondary",Ht,[20,41]),tertiary:Qt("tertiary",Ht,[20,41])},auxAttr:["secondary","tertiary"],children:[Qt("secondary_errors",Bc,[20,41],{valueId:"twoD_errors"})]}),wo("complex",{signal:Qt("twoD_complex",sp,[2,2],{valueId:"twoD_cplx"}),axes:{position:Qt("position",Ht,[3])},axesAttr:[".","position"]}),wo("complex_spectrum",{signal:ao("twoD_complex",sp,[2,2],{valueId:"twoD_cplx",interpretation:"spectrum"})}),wo("rgb-image",{signal:N0(ao("fourD_rgb",Ht,[10,3,3,3],{longName:"RGB CMY DGW",interpretation:"rgb-image"})),axes:{X_rgb:Qt("X_rgb",Bc,[3]),Y_rgb:Qt("Y_rgb",Bc,[3])},axesAttr:[".","Y_rgb","X_rgb"]}),wo("descending-axes",{signal:Qt("twoD",Ht,[20,41]),axes:{X:ao("X",Ht,[41],{valueId:"X_desc"}),Y:ao("Y",Ht,[20],{valueId:"Y_desc"})},axesAttr:["Y","X"]}),wo("scatter",{signal:Qt("scatter_data",Ht,[41]),axes:{X:ao("X",Ht,[41],{valueId:"X"}),Y:ao("Y",Ht,[41],{valueId:"Y_scatter"})},axesAttr:["X","Y"]}),ll("old-style","NXdata",{children:[Qt("twoD",Ht,[20,41],{attributes:[SU("signal",1),Ui("axes","Y:X")]}),ao("X",Ht,[41],{units:"nm"}),ao("Y",Ht,[20],{units:"deg",longName:"Angle (degrees)"})]})]}),ll("nexus_no_default","NXprocess",{defaultPath:void 0,children:[ll("ignore_me","NXentry"),wo("spectrum",{signal:Qt("oneD",Ht,[41])})]}),_s("nexus_malformed",[_s("default_not_found",[],{attributes:[Ui("default","/test")]}),_s("no_signal",[],{attributes:[Ui("NX_class","NXdata")]}),_s("signal_not_found",[],{attributes:[Ui("NX_class","NXdata"),Ui("signal","unknown")]}),ll("signal_not_dataset","NXdata",{children:[_s("some_group")],attributes:[Ui("signal","some_group")]}),ll("signal_old-style_not_dataset","NXdata",{children:[_s("some_group",[],{attributes:[SU("signal",1)]})]}),ll("signal_not_array","NXdata",{children:[sl("some_scalar",Ht)],attributes:[Ui("signal","some_scalar")]}),ll("signal_not_numeric","NXdata",{children:[Qt("oneD_str",Vc,[2])],attributes:[Ui("signal","oneD_str")]}),wo("interpretation_unknown",{signal:ao("fourD",Ht,[3,9,20,41],{interpretation:"unknown"})}),wo("rgb-image_incompatible",{signal:ao("oneD",Ht,[41],{interpretation:"rgb-image"})}),rN(wo("silx_style_unknown",{signal:Qt("oneD",Ht,[41]),axes:{X:Qt("X",Ht,[41])},axesAttr:["X"]}),[Ui("SILX_style",JSON.stringify({unknown:Rn.Log,signal_scale_type:"invalid",axes_scale_type:["invalid"]}))]),rN(wo("silx_style_malformed",{signal:Qt("oneD",Ht,[41])}),[Ui("SILX_style","{")])]),_s("resilience",[sl("error_value",Ht),sl("slow_value",Ht,{valueId:"scalar_int_42"}),Qt("slow_slicing",Ht,[9,20,41],{valueId:"threeD"}),_s("slow_metadata"),wo("slow_nx_spectrum",{signal:ao("slow_twoD",Ht,[20,41],{valueId:"twoD",interpretation:"spectrum"}),errors:Qt("slow_twoD_errors",Ht,[20,41],{valueId:"twoD_errors"}),axes:{slow_X:Qt("slow_X",Ht,[41],{valueId:"X"})},axesAttr:[".","slow_X"],auxiliary:{slow_secondary:Qt("slow_secondary",Ht,[20,41],{valueId:"secondary"})},auxAttr:["slow_secondary"],title:sl("title",Vc,{valueId:"title_twoD"})}),wo("slow_nx_image",{signal:Qt("slow_threeD",Ht,[9,20,41],{valueId:"threeD"}),axes:{slow_X:Qt("slow_X",Ht,[41],{valueId:"X"}),slow_Y:Qt("slow_Y",Ht,[20],{valueId:"Y"})},axesAttr:[".","slow_Y","slow_X"],title:sl("title",Vc,{valueId:"title_twoD"})})])]});const E5e=new ae(0,0,0);class wg extends Al{get size(){const{x:e,y:n}=this.getSize(new ae);return{width:e,height:n}}get center(){return this.getCenter(new ae)}static empty(e=E5e){return new wg(e.clone(),e.clone())}static fromPoints(...e){return new wg().setFromPoints(e)}static fromSize({width:e,height:n}){return wg.empty().expandBySize(e,n)}clampPoint(e){return super.clampPoint(e,new ae)}expandBySize(e,n){const{size:r}=this,i=e<0?Math.max(e,-r.width):e,o=n<0?Math.max(n,-r.height):n;return this.expandByVector(new ae(i,o).divideScalar(2))}expandToRatio(e){if(e===void 0||e<=0)return this;const{width:n,height:r}=this.size,i=n/r;return e>i?this.expandBySize(r*e-n,0):this.expandBySize(0,n/e-r)}hasMinSize(e,n=e){const{width:r,height:i}=this.size;return r>=e&&i>=n}keepWithin(e){const{center:n,size:r}=this,{width:i,height:o}=e.size,a=wg.empty(e.center).expandBySize(Math.max(i-r.width,0),Math.max(o-r.height,0)).clampPoint(n).sub(n).setZ(0);return this.translate(a)}toRect(){return[this.min,this.max]}}const jd=wg;function EU(t,e){const n=e-t;return r=>n!==0?(r-t)/n:.5}function sX(t){let e=(t==null?void 0:t.domain)||[0,1],n=(t==null?void 0:t.range)||[0,1],r=(t==null?void 0:t.exponent)??1,i=(t==null?void 0:t.clamp)||!1,o=hv,a;const s=function(D){const O=Jo.isNumber(D)?D:D.valueOf();return Number.isNaN(O)?a:o(...n)(EU(...e)(l(O))**r)};function l(D){if(!i)return D;const[O,P]=e;return Math.max(O,Math.min(P,D))}function u(D){return D?(e=D,C):[...e]}function c(D){return D?(n=D,C):[...n]}function f(D){return D?(n=D,o=rI,C):[...n]}function d(D){return D?(i=D,C):i}function p(){return a}function y(D){return D?(o=D,C):o}function x(D){return D?(r=D,C):r}function _(D){return l(hv(...e)(EU(...n)(D)**(1/r)))}function v(){return Q3e({domain:e,range:n,exponent:r,clamp:i})}function S(D){return e=v().nice(D).domain(),C}function w(D){return v().ticks(D)}function E(D,O){return v().tickFormat(D,O)}function T(){return sX().domain(e).range(n).exponent(r).clamp(i).interpolate(o)}const C=Object.assign(s,{domain:u,range:c,rangeRound:f,clamp:d,interpolate:y,invert:_,unknown:p,exponent:x,nice:S,ticks:w,tickFormat:E,copy:T});return C}const M5e=[.1,1],C5e={left:80,right:24,top:16,bottom:34},A5e=28,MU=24;Rn.Linear+"",-1/0,Rn.Log+"",Number.MIN_VALUE,Rn.SymLog+"",-1/0,Rn.Sqrt+"",Rn.Gamma+"",-1/0;const T5e=cI({domain:[300,900],range:[3,10],clamp:!0,round:!0}),D5e=cI({domain:[300,500],range:[.8,1.4]});function lX(t,e){if(Array.isArray(t)){const[,n]=t;return sX({...e,exponent:n})}switch(t){case Rn.Linear:return cI(e);case Rn.Log:return Z3e(e);case Rn.SymLog:return tDe(e);case Rn.Sqrt:return rDe(e)}throw new Error("Unknown scale type")}function R5e(t,e){const{width:n,height:r}=t;return e?n/r>e?{width:r*e,height:r}:{width:n,height:n/e}:{width:n,height:r}}function P5e(t,e=[-Number.MAX_VALUE/2,Number.MAX_VALUE/2]){const[n,r]=e;return Jo.clamp(t,n,r)}function CU(t,e){const{scaleType:n,visDomain:r,flip:i,nice:o=!1}=t;return lX(n??Rn.Linear,{domain:r,range:[-e/2,e/2],reverse:i,nice:o})}function N5e(t,e){const n=Math.min(...t),r=Math.max(...t),i=Math.ceil(n),o=Math.floor(r),a=o-i+1,s=Math.min(a,e);if(s===0)return[];const l=Math.max(Vj(i,o,s),1),u=Math.ceil(n/l),c=Math.floor(r/l)-u+1;return Array.from({length:c},(f,d)=>(u+d)*l)}function O5e(t,e,n){if(n!==Rn.Log)return iD;const[r,i]=t[0]>0?t:[-t[1],-[t[0]]],o=D5e(e);return i/r<10**o?iD:a=>{const s=Math.log10(Math.abs(a.valueOf()));return s===Math.floor(s)?iD(a):""}}function uX(t,e,n){if(t==="auto")return;if(t==="equal")return uX(1,e,n);const[r,i]=e,[o,a]=n;return Math.abs(i-r)/Math.abs(a-o)/t}function I5e(t={}){const{left:e,right:n,top:r,bottom:i}=C5e;return{left:e+(t.left?MU:0),right:n,top:r+(t.top?A5e:0),bottom:i+(t.bottom?MU:0)}}const F5e=` varying vec2 coords; void main() { coords = uv; gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); } -`;function M5e(t){return Object.fromEntries(Object.entries(t).map(([e,n])=>[e,{value:n}]))}const rX=H.createContext({});function go(){return H.useContext(rX)}function C5e(t){const{visRatio:e,abscissaConfig:n,ordinateConfig:r,svgOverlay:i,floatingToolbar:o,children:a}=t,{width:s,height:l}=Do(G=>G.size),u={width:s,height:l},c=s/l,f=x5e(u,e),d=H.useMemo(()=>Gd.empty().expandByPoint(new ae(s,l)),[s,l]),p=SU(n,f.width),y=SU(r,f.height),x=H.useCallback(G=>new ae(p(G.x),y(G.y)),[p,y]),_=H.useCallback(G=>new ae(p.invert(G.x),y.invert(G.y)),[p,y]),v=H.useMemo(()=>new xn().makeScale(s/2,-l/2,1).setPosition(s/2,l/2,0),[s,l]),S=H.useMemo(()=>v.clone().invert(),[v]),w=H.useCallback((G,Z)=>Z.clone().project(G).applyMatrix4(v),[v]),E=H.useCallback((G,Z)=>Z.clone().applyMatrix4(S).unproject(G),[S]),T=H.useCallback((G,Z)=>w(G,x(Z)),[x,w]),C=H.useCallback((G,Z)=>_(E(G,Z)),[E,_]),D=H.useCallback((G,Z=G.position)=>{const{scale:j}=G;return Gd.empty(Z).expandBySize(s*j.x,l*j.y)},[s,l]),O=H.useCallback(G=>{const[Z,j]=D(G).toRect().map(_);return{xVisibleDomain:[Z.x,j.x],yVisibleDomain:[Z.y,j.y]}},[D,_]),P=Do(G=>{var Z;return(Z=G.gl.domElement.parentElement)==null?void 0:Z.parentElement});bE(P),rD(P);const N=P.parentElement;rD(N);const k=N.parentElement;return rD(k),F.jsx(rX.Provider,{value:{canvasSize:u,canvasRatio:c,canvasBox:d,visRatio:e,visSize:f,abscissaConfig:n,ordinateConfig:r,abscissaScale:p,ordinateScale:y,dataToWorld:x,dataToHtml:T,worldToHtml:w,worldToData:_,htmlToWorld:E,htmlToData:C,getFovBox:D,getVisibleDomains:O,visCanvas:k,canvasArea:N,r3fRoot:P,svgOverlay:i,floatingToolbar:o},children:a})}var cA=(t=>(t[t.Left=0]="Left",t[t.Middle=1]="Middle",t))(cA||{});class A5e{constructor(e,n){kS(this,"buttons"),kS(this,"modifierKeys"),kS(this,"isWheel"),kS(this,"isEnabled"),this.id=e;const{button:r=cA.Left,modifierKey:i=[],disabled:o=!1}=n;r==="Wheel"?(this.buttons=[],this.isWheel=!0):(this.buttons=Jo.castArray(r),this.isWheel=!1),this.modifierKeys=Jo.castArray(i),this.isEnabled=!o}matches(e){return this.isEnabled&&(e instanceof WheelEvent?this.isWheel:this.buttons.includes(e.button))&&this.modifierKeys.every(n=>e.getModifierState(n))}}const iX=H.createContext({});function T5e(){return H.useContext(iX)}function D5e(t){const{children:e}=t,[n]=H.useState(new Map),r=H.useCallback((a,s)=>{n.has(a)?console.warn(`An interaction with ID "${a}" is already registered.`):n.set(a,new A5e(a,s))},[n]),i=H.useCallback(a=>{n.delete(a)},[n]),o=H.useCallback((a,s)=>{const l=[...n.values()];if(!n.has(a))throw new Error(`Interaction ${a} is not registered`);const u=l.filter(c=>c.matches(s));return u.length===0?!1:u.length===1?u[0].id===a:u.reduce((c,f)=>f.modifierKeys.length>c.modifierKeys.length?f:c).id===a},[n]);return F.jsx(iX.Provider,{value:{registerInteraction:r,unregisterInteraction:i,shouldInteract:o},children:e})}const EU=.95,MU=new ae(1,1,1),R5e=["Alt","Control","Shift"];function Wb(){const{visSize:t,getFovBox:e}=go(),n=Do(i=>i.camera),r=Do(i=>i.invalidate);return H.useCallback(i=>{const{position:o}=n,a=Gd.fromSize(t),s=e(n,i).keepWithin(a);o.copy(s.center.setZ(o.z)),n.updateMatrixWorld(),r()},[n,t,e,r])}function oX(){const{canvasSize:t}=go(),e=Do(r=>r.camera),n=Wb();return H.useCallback(({world:r})=>{const{width:i,height:o}=t,a=Gd.fromPoints(...r),{width:s,height:l}=a.size;e.scale.set(Math.max(s,1)/i,Math.max(l,1)/o,1),n(a.center)},[e,t,n])}function EI(){const{canvasArea:t}=go();Cp(t,"wheel",e=>e.preventDefault(),{passive:!1})}function MI(t){const e=Do(r=>r.camera),n=Wb();return function(r){const{sourceEvent:i,worldPt:o}=r,{x:a,y:s}=t(i);if(!a&&!s)return;const l=new ae(a?EU:1,s?EU:1,1);i.deltaY<0?e.scale.multiply(l).min(MU):e.scale.divide(l).min(MU);const u=e.position.clone().sub(o);i.deltaY<0?u.multiply(l):u.divide(l),n(o.clone().add(u))}}function Qc(t,e,n={}){const r=As(e),i=Do(u=>u.camera),{htmlToWorld:o,worldToData:a,canvasArea:s}=go();function l(u){const{offsetX:c,offsetY:f}=u,d=new ae(c,f),p=o(i,d),y=a(p);r.current({htmlPt:d,worldPt:p,dataPt:y,sourceEvent:u})}Cp(s,t,l,n)}function Gb(t,e){const{shouldInteract:n,registerInteraction:r,unregisterInteraction:i}=T5e();return H.useEffect(()=>(r(t,e),()=>i(t)),[t,r,i,e]),H.useCallback(o=>n(t,o),[t,n])}function aX(t=[]){const{canvasArea:e}=go(),n=Jo.castArray(t),[r]=H.useState(new Map),[i,o]=lbe(!1);function a(){const s=n.every(l=>r.get(l));i!==s&&o(s)}return Cp(window,"keyup",s=>{const{key:l}=s;r.set(l,!1),a()}),Cp(window,"keydown",s=>{const{key:l}=s;r.set(l,!0),a()}),Cp(e,"pointerdown",s=>{R5e.forEach(l=>{r.set(l,s.getModifierState(l))}),a()}),i}function P5e(t){const{id:e="Pan",button:n=cA.Left,modifierKey:r,disabled:i}=t,o=Gb(e,{button:n,modifierKey:r,disabled:i}),a=Do(p=>p.camera),s=Wb(),l=H.useRef(),u=aX(r);function c(p){const{worldPt:y,sourceEvent:x}=p,{target:_,pointerId:v}=x;o(x)&&(_.setPointerCapture(v),l.current=y.clone())}function f(p){if(!l.current||!u)return;const{worldPt:y}=p,x=l.current.clone().sub(y);s(a.position.clone().add(x))}function d(p){const{sourceEvent:y}=p,{target:x,pointerId:_}=y;x.releasePointerCapture(_),l.current=void 0}return Qc("pointerdown",c),Qc("pointermove",f),Qc("pointerup",d),null}function sX(t){const{id:e="Selection",modifierKey:n,disabled:r,transform:i=te=>te,validate:o=()=>!0,onSelectionStart:a,onSelectionChange:s,onSelectionEnd:l,onValidSelection:u,children:c}=t,f=As(i),d=As(o),p=As(a),y=As(s),x=As(l),_=As(u),v=Do(te=>te.camera),S=go(),{canvasBox:w,htmlToWorld:E,worldToData:T}=S,[C,D]=sbe(),O=H.useRef(),P=H.useRef(!1),N=aX(n),k=Gb(e,{button:cA.Left,modifierKey:n,disabled:r});function G(te){const{sourceEvent:re}=te;if(!k(re))return;const{target:le,pointerId:ce}=re;le.setPointerCapture(ce),O.current=te}function Z(te){if(!O.current)return;const{htmlPt:re}=O.current,le=[re,w.clampPoint(te.htmlPt)],ce=le.map(Re=>E(v,Re)),Ce=ce.map(T);D({html:le,world:ce,data:Ce})}function j(te){if(!O.current)return;const{sourceEvent:re}=te,{target:le,pointerId:ce}=re;le.releasePointerCapture(ce),O.current=void 0,P.current=k(re),D(void 0)}Qc("pointerdown",G),Qc("pointermove",Z),Qc("pointerup",j);function K(){O.current=void 0,D(void 0)}fbe("Escape",K,[],{event:"keydown"}),Cp(window,"contextmenu",te=>{O.current&&(te.preventDefault(),K())});const Y=H.useMemo(()=>C&&f.current(C,v,S),[C,f,v,S]),$=H.useMemo(()=>!!Y&&d.current(Y),[Y,d]),W=Ok(Y),U=Ok($);return H.useEffect(()=>{var te,re,le,ce;if(Y){bE(C),W||(te=p.current)==null||te.call(p),(re=y.current)==null||re.call(y,N?Y:void 0,C,$);return}W&&(bE(U),(le=x.current)==null||le.call(x,P.current?W:void 0,U),U&&P.current&&((ce=_.current)==null||ce.call(_,W)),P.current=!1)},[Y,W,C,$,U,N,p,y,x,_]),!Y||!N?null:(bE(C),F.jsx(F.Fragment,{children:c(Y,C,$)}))}const N5e="_selection_1p9dp_1",nN={selection:N5e};function CI(t){const{overflowCanvas:e=!1,children:n}=t,{r3fRoot:r,canvasArea:i}=go(),o=e?i:r,[a]=H.useState(()=>{const l=document.createElement("div");return l.setAttribute("hidden",""),l}),[s]=H.useState(()=>w7(a));return H.useLayoutEffect(()=>{s.render(Zd.createPortal(n,o))},[n,o,s]),H.useLayoutEffect(()=>(r.append(a),()=>{s.unmount(),a.remove()}),[r,s,a]),null}function AI(t){const{children:e}=t,{svgOverlay:n}=go();return n?F.jsx(CI,{children:Zd.createPortal(e,n)}):null}function B2(t){const{coords:e,strokePosition:n,...r}=t,{stroke:i,strokeWidth:o=1}=r,a=i&&n?o*(n==="outside"?1:-1):0,{min:s,max:l}=Gd.fromPoints(...e).expandBySize(a,a);return F.jsx("path",{d:`M ${s.x},${s.y} H ${l.x} V ${l.y} H ${s.x} z`,...r})}const O5e=20;function I5e(t){const{minZoom:e=O5e,...n}=t,{canvasSize:r,canvasRatio:i,canvasBox:o,visRatio:a,visSize:s,htmlToWorld:l,worldToData:u}=go(),c=oX(),f=Do(y=>y.camera),d=a!==void 0;function p(y){if(!d)return y;const{scale:x}=f,_=Gd.empty(new ae(r.width/2,r.height/2)).expandBySize(s.width/x.x,s.height/x.y),v=Gd.fromPoints(...y.html).expandToRatio(i).keepWithin(o).keepWithin(_).toRect(),S=v.map(E=>l(f,E)),w=S.map(u);return{html:v,world:S,data:w}}return F.jsx(sX,{id:"SelectToZoom",transform:p,validate:({html:y})=>y[0].manhattanDistanceTo(y[1])>=e,onValidSelection:c,...n,children:({html:y},{html:x},_)=>F.jsxs(AI,{children:[F.jsx(B2,{className:nN.selection,coords:x,fill:"white",fillOpacity:!d&&_?.25:0,stroke:"black",strokePosition:"inside",strokeDasharray:d||!_?4:void 0}),d&&F.jsx(B2,{className:nN.selection,coords:y,fill:"white",fillOpacity:_?.25:0,stroke:"black",strokePosition:"inside"})]})})}function F5e(t){const{modifierKey:e,disabled:n}=t,{visRatio:r}=go(),i=Gb("XAxisZoom",{button:"Wheel",modifierKey:e,disabled:r!==void 0||n}),o=a=>({x:i(a),y:!1});return EI(),Qc("wheel",MI(o)),null}function L5e(t){const{modifierKey:e,disabled:n}=t,{visRatio:r}=go(),i=Gb("YAxisZoom",{button:"Wheel",modifierKey:e,disabled:r!==void 0||n}),o=a=>({x:!1,y:i(a)});return EI(),Qc("wheel",MI(o)),null}function k5e(t){const{modifierKey:e,disabled:n}=t,r=Gb("Zoom",{button:"Wheel",modifierKey:e,disabled:n}),i=o=>{const a=r(o);return{x:a,y:a}};return EI(),Qc("wheel",MI(i)),null}function B5e(t){const{axis:e,onSelectionStart:n,onSelectionChange:r,onSelectionEnd:i,children:o,...a}=t;function s(l,u,c){const{canvasSize:f,htmlToWorld:d,worldToData:p}=c,{width:y,height:x}=f,[_,v]=l.html,S=e==="x"?[new ae(_.x,0),new ae(v.x,x)]:[new ae(0,_.y),new ae(y,v.y)],w=S.map(T=>d(u,T)),E=w.map(p);return{html:S,world:w,data:E}}return F.jsx(sX,{transform:s,onSelectionStart:n,onSelectionChange:r,onSelectionEnd:i,...a,children:o})}const U5e=20;function CU(t){const{axis:e,modifierKey:n,disabled:r,minZoom:i=U5e}=t,{visRatio:o}=go(),a=oX();return F.jsx(B5e,{axis:e,id:`${e.toUpperCase()}SelectToZoom`,modifierKey:n,disabled:o!==void 0||r,validate:({html:s})=>Gd.fromPoints(...s).hasMinSize(i),onValidSelection:a,children:({html:s},l,u)=>F.jsx(AI,{children:F.jsx(B2,{className:nN.selection,coords:s,fill:"white",fillOpacity:u?.25:0,stroke:"black",strokePosition:"inside",strokeDasharray:u?void 0:4})})})}function z5e(t){const{...e}=t;return F.jsxs(F.Fragment,{children:[e.pan!==!1&&F.jsx(P5e,{...e.pan}),e.zoom!==!1&&F.jsx(k5e,{...e.zoom}),e.xAxisZoom!==!1&&F.jsx(F5e,{modifierKey:"Alt",...e.xAxisZoom}),e.yAxisZoom!==!1&&F.jsx(L5e,{modifierKey:"Shift",...e.yAxisZoom}),e.selectToZoom!==!1&&F.jsx(I5e,{modifierKey:"Control",...e.selectToZoom}),e.xSelectToZoom!==!1&&F.jsx(CU,{axis:"x",modifierKey:["Control","Alt"],...e.xSelectToZoom}),e.ySelectToZoom!==!1&&F.jsx(CU,{axis:"y",modifierKey:["Control","Shift"],...e.ySelectToZoom})]})}function TI(t,e,n=(r,i)=>Object.is(r,i)){const r=Do(s=>s.camera),i=obe(),o=H.useRef(),a=As(t);return H.useMemo(()=>{o.current=a.current(r)},e),Y4(()=>{const s=a.current(r);n(o.current,s)||(o.current=s,i())}),o.current}function $5e(t){const{children:e}=t,{floatingToolbar:n}=go();return n?F.jsx(CI,{children:Zd.createPortal(e,n)}):null}const H5e="_btn_rzs1v_1 _btn_rnveq_39 btnClean",V5e="_btnLike_rzs1v_11 _btnLike_rnveq_55",AU={btn:H5e,btnLike:V5e};function W5e(){const t=Do(i=>i.camera),e=Do(i=>i.invalidate),n=TI(({scale:i})=>i.x<1||i.y<1,[]);function r(){t.scale.x=1,t.scale.y=1,t.position.x=0,t.position.y=0,t.updateMatrixWorld(),e()}return F.jsx($5e,{children:F.jsx("button",{className:AU.btn,type:"button",hidden:!n,onClick:()=>r(),children:F.jsx("span",{className:AU.btnLike,children:"Reset zoom"})})})}function G5e(t){const{children:e,size:n,...r}=t,{visSize:i}=go(),{width:o,height:a}=n??i;return F.jsxs("mesh",{...r,children:[F.jsx("planeGeometry",{args:[o,a]}),e]})}const j5e="_axis_1fn7e_1",q5e="_grid_1fn7e_2",X5e="_tick_1fn7e_22",Y5e="_label_1fn7e_34",U2={axis:j5e,grid:q5e,tick:X5e,label:Y5e};function K5e(t){const{formattedValue:e,...n}=t;return F.jsx("text",{...n,dy:"0.3125em",children:e})}const Z5e={labelClassName:U2.label,labelProps:{},tickClassName:U2.tick,tickComponent:K5e},J5e={abscissa:[FNe,kq],ordinate:[PNe,Lq]};function TU(t){const{type:e,config:n,domain:r,canvasSize:i,offset:o,flipAxis:a,showAxis:s}=t,{width:l,height:u}=i,c=e==="abscissa",f=c?l:u,{scaleType:d=Pn.Linear,isIndexAxis:p,showGrid:y,label:x,nice:_=!1}=n,v=tX(d,{domain:r,range:a?[f,0]:[0,f],nice:_}),[S,w]=J5e[e],E=v5e(f),T=p?{tickValues:_5e(r,E)}:{numTicks:E};return F.jsxs(F.Fragment,{children:[s&&F.jsx("svg",{className:U2.axis,"data-type":e,style:c?{width:l,height:o}:{width:o,height:u},children:F.jsx(S,{scale:v,tickFormat:w5e(r,f,d),label:x,labelOffset:o-(c?32:36),hideAxisLine:y,...T,...Z5e})}),y&&F.jsx("svg",{className:U2.grid,...i,children:F.jsx(w,{scale:v,...i,...T})})]})}function Q5e(t){const{axisOffsets:e,showAxes:n}=t,{canvasSize:r,visCanvas:i,abscissaConfig:o,ordinateConfig:a,getVisibleDomains:s}=go(),l=TI(s,[s]);return F.jsx(CI,{children:Zd.createPortal(F.jsxs(F.Fragment,{children:[F.jsx(TU,{type:"abscissa",config:o,domain:l.xVisibleDomain,canvasSize:r,offset:e.bottom,showAxis:n}),F.jsx(TU,{type:"ordinate",config:a,domain:l.yVisibleDomain,canvasSize:r,offset:e.left,showAxis:n,flipAxis:!0})]}),i)})}function eFe(t){const{className:e,orthographic:n,children:r}=t;return F.jsxs(zAe,{className:e,orthographic:n,flat:!0,frameloop:"demand",dpr:[1,3],resize:{debounce:{scroll:20,resize:200},scroll:!1},gl:{preserveDrawingBuffer:!0},children:[F.jsx("ambientLight",{}),r]})}function tFe(){const{visRatio:t}=go(),e=Do(r=>r.camera),n=Wb();return H.useEffect(()=>{if(!t||e.scale.x===e.scale.y)return;const r=Math.max(e.scale.x,e.scale.y);e.scale.x=r,e.scale.y=r,n(e.position)},[e,n,t]),null}function nFe(t){const{value:e}=t,n=Do(i=>i.raycaster),r=Do(i=>i.camera);return H.useEffect(()=>{const i=n.params.Points,o=i?i.threshold:1;return i&&(i.threshold=e),()=>{i&&(i.threshold=o)}},[n,e]),Y4(()=>{const i=(r.scale.x+r.scale.y)/2;n.params.Points&&(n.params.Points.threshold=e*i/2)}),null}function rFe(){const{dataToWorld:t,worldToData:e}=go(),n=H.useRef(),r=Do(o=>o.camera),i=Wb();return Y4(()=>{n.current=e(r.position)}),H.useEffect(()=>{n.current&&i(t(n.current))},[n,i,t,r]),null}const iFe="_visCanvas_lddco_1",oFe="_title_lddco_28",aFe="_canvasArea_lddco_40",sFe="_r3fRoot_lddco_42",lFe="_svgOverlay_lddco_42",uFe="_floatingToolbar_lddco_42",N0={visCanvas:iFe,title:oFe,canvasArea:aFe,r3fRoot:sFe,svgOverlay:lFe,floatingToolbar:uFe},cFe={left:0,right:0,top:0,bottom:0};function fFe(t){const{title:e,aspect:n="auto",abscissaConfig:r,ordinateConfig:i,raycasterThreshold:o,showAxes:a=!0,children:s}=t,l=nX(n,r.visDomain,i.visDomain),u=a?S5e({left:!!i.label,bottom:!!r.label,top:!!e}):cFe,[c,f]=H.useState(null),[d,p]=H.useState(null);return F.jsxs("div",{className:N0.visCanvas,style:{gridTemplateColumns:`${u.left}px minmax(0, 1fr) ${u.right}px`,gridTemplateRows:`${u.top}px minmax(0, 1fr) ${u.bottom}px`},children:[a&&e&&F.jsx("p",{className:N0.title,children:e}),F.jsxs("div",{className:N0.canvasArea,children:[F.jsx(eFe,{className:N0.r3fRoot,orthographic:!0,children:F.jsxs(C5e,{visRatio:l,abscissaConfig:r,ordinateConfig:i,svgOverlay:c,floatingToolbar:d,children:[F.jsx(Q5e,{axisOffsets:u,showAxes:a}),F.jsx(D5e,{children:s}),F.jsx(rFe,{}),F.jsx(tFe,{}),o!==void 0&&F.jsx(nFe,{value:o})]})}),F.jsx("svg",{ref:f,className:N0.svgOverlay,overflow:"hidden"})]}),F.jsx("div",{ref:p,className:N0.floatingToolbar})]})}var w1=(t=>(t.Circle="Circle",t.Cross="Cross",t.Square="Square",t.Cap="Cap",t))(w1||{});w1.Cross+"",w1.Cap+"",w1.Circle+"",w1.Square+"";class dFe extends cf{}yj({Line_:dFe});var wg=(t=>(t.MinGreater="min-greater",t.InvalidMinWithScale="invalid-min-with-scale",t.InvalidMaxWithScale="invalid-max-with-scale",t.CustomMaxFallback="custom-max-fallback",t))(wg||{});function hFe(t){return D2(t*360,1,.5).formatRgb()}function O0(t){return e=>t(1-e)}const pFe={Blues:O0(IOe),Greens:O0(LOe),Greys:O0(BOe),Oranges:O0(WOe),Purples:O0(zOe),Reds:O0(HOe),Turbo:QOe,Viridis:e4e,Inferno:n4e,Magma:t4e,Plasma:r4e,Cividis:GOe,Warm:qOe,Cool:XOe,Cubehelix:jOe,BuGn:cOe,BuPu:dOe,GnBu:pOe,OrRd:gOe,PuBuGn:yOe,PuBu:bOe,PuRd:wOe,RdPu:EOe,YlGnBu:COe,YlGn:TOe,YlOrBr:ROe,YlOrRd:NOe,Rainbow:YOe,Sinebow:JOe,HSL:hFe,BrBG:jNe,PRGn:XNe,PiYG:KNe,PuOr:JNe,RdBu:eOe,RdGy:nOe,RdYlBu:iOe,RdYlGn:aOe,Spectral:lOe},DU=1/20;Jo.range(0,1+DU,DU);const mFe={[Pn.Linear]:t=>t,[Pn.Log]:Math.log10,[Pn.SymLog]:t=>Math.sign(t)*Math.log10(1+Math.abs(t)),[Pn.Sqrt]:Math.sqrt,[Pn.Gamma]:t=>t},gFe={float32:eu,uint16:Vp,uint8:Ls,uint8_clamped:Ls};function vFe(t,e){const n=pFe[t];return e?r=>n(1-r):n}function yFe(t,e=Pn.Linear){const n=mFe[e];return[n(t[0]),n(t[1])]}function xFe(t,e=ci){if(!t)return;const{rows:n,cols:r}=YIe(t),i=new Od(t.data,r,n,h4,gFe[t.dtype],Tb,uo,uo,e);return i.needsUpdate=!0,i}const sD=e5e(xFe),bFe=Vd(255,255,255,0),lD=256,_Fe={[Pn.Log]:"log(value) * oneOverLog10",[Pn.SymLog]:"sign(value) * log(1. + abs(value)) * oneOverLog10",[Pn.Sqrt]:"sqrt(value)"},wFe={[Pn.Log]:"value > 0.",[Pn.Sqrt]:"value >= 0."};function SFe(t){const{values:e,domain:n,scaleType:r,colorMap:i,invertColorMap:o=!1,magFilter:a,alphaValues:s,alphaDomain:l=p5e,badColor:u=bFe,mask:c}=t,f=sD(e,a),d=sD(s),p=sD(c),y=H.useMemo(()=>{const E=vFe(i,o),T=Array.from({length:lD}).flatMap((D,O)=>{const{r:P,g:N,b:k}=Vd(E(O/(lD-1)));return[P,N,k,255]}),C=new Od(Uint8Array.from(T),lD,1,ba,Ls);return C.needsUpdate=!0,C},[i,o]),[x,_]=Array.isArray(r)?r:[r,1],v=yFe(n,x),S=typeof u=="string"?Vd(u):u,w={uniforms:M5e({data:f,mask:p,colorMap:y,min:v[0],oneOverRange:1/(v[1]-v[0]),gammaExponent:_,normRevertFactor:e.dtype==="uint8"?255:1,alpha:d,withAlpha:s?1:0,alphaMin:l[0],oneOverAlphaRange:1/(l[1]-l[0]),badColor:new ir(S.r/255,S.g/255,S.b/255,S.opacity)}),vertexShader:E5e,fragmentShader:` +`;function L5e(t){return Object.fromEntries(Object.entries(t).map(([e,n])=>[e,{value:n}]))}const cX=H.createContext({});function vo(){return H.useContext(cX)}function k5e(t){const{visRatio:e,abscissaConfig:n,ordinateConfig:r,svgOverlay:i,floatingToolbar:o,children:a}=t,{width:s,height:l}=Do(G=>G.size),u={width:s,height:l},c=s/l,f=R5e(u,e),d=H.useMemo(()=>jd.empty().expandByPoint(new ae(s,l)),[s,l]),p=CU(n,f.width),y=CU(r,f.height),x=H.useCallback(G=>new ae(p(G.x),y(G.y)),[p,y]),_=H.useCallback(G=>new ae(p.invert(G.x),y.invert(G.y)),[p,y]),v=H.useMemo(()=>new yn().makeScale(s/2,-l/2,1).setPosition(s/2,l/2,0),[s,l]),S=H.useMemo(()=>v.clone().invert(),[v]),w=H.useCallback((G,Z)=>Z.clone().project(G).applyMatrix4(v),[v]),E=H.useCallback((G,Z)=>Z.clone().applyMatrix4(S).unproject(G),[S]),T=H.useCallback((G,Z)=>w(G,x(Z)),[x,w]),C=H.useCallback((G,Z)=>_(E(G,Z)),[E,_]),D=H.useCallback((G,Z=G.position)=>{const{scale:j}=G;return jd.empty(Z).expandBySize(s*j.x,l*j.y)},[s,l]),O=H.useCallback(G=>{const[Z,j]=D(G).toRect().map(_);return{xVisibleDomain:[Z.x,j.x],yVisibleDomain:[Z.y,j.y]}},[D,_]),P=Do(G=>{var Z;return(Z=G.gl.domElement.parentElement)==null?void 0:Z.parentElement});bE(P),oD(P);const N=P.parentElement;oD(N);const k=N.parentElement;return oD(k),F.jsx(cX.Provider,{value:{canvasSize:u,canvasRatio:c,canvasBox:d,visRatio:e,visSize:f,abscissaConfig:n,ordinateConfig:r,abscissaScale:p,ordinateScale:y,dataToWorld:x,dataToHtml:T,worldToHtml:w,worldToData:_,htmlToWorld:E,htmlToData:C,getFovBox:D,getVisibleDomains:O,visCanvas:k,canvasArea:N,r3fRoot:P,svgOverlay:i,floatingToolbar:o},children:a})}var fA=(t=>(t[t.Left=0]="Left",t[t.Middle=1]="Middle",t))(fA||{});class B5e{constructor(e,n){kS(this,"buttons"),kS(this,"modifierKeys"),kS(this,"isWheel"),kS(this,"isEnabled"),this.id=e;const{button:r=fA.Left,modifierKey:i=[],disabled:o=!1}=n;r==="Wheel"?(this.buttons=[],this.isWheel=!0):(this.buttons=Jo.castArray(r),this.isWheel=!1),this.modifierKeys=Jo.castArray(i),this.isEnabled=!o}matches(e){return this.isEnabled&&(e instanceof WheelEvent?this.isWheel:this.buttons.includes(e.button))&&this.modifierKeys.every(n=>e.getModifierState(n))}}const fX=H.createContext({});function U5e(){return H.useContext(fX)}function z5e(t){const{children:e}=t,[n]=H.useState(new Map),r=H.useCallback((a,s)=>{n.has(a)?console.warn(`An interaction with ID "${a}" is already registered.`):n.set(a,new B5e(a,s))},[n]),i=H.useCallback(a=>{n.delete(a)},[n]),o=H.useCallback((a,s)=>{const l=[...n.values()];if(!n.has(a))throw new Error(`Interaction ${a} is not registered`);const u=l.filter(c=>c.matches(s));return u.length===0?!1:u.length===1?u[0].id===a:u.reduce((c,f)=>f.modifierKeys.length>c.modifierKeys.length?f:c).id===a},[n]);return F.jsx(fX.Provider,{value:{registerInteraction:r,unregisterInteraction:i,shouldInteract:o},children:e})}const AU=.95,TU=new ae(1,1,1),$5e=["Alt","Control","Shift"];function Gb(){const{visSize:t,getFovBox:e}=vo(),n=Do(i=>i.camera),r=Do(i=>i.invalidate);return H.useCallback(i=>{const{position:o}=n,a=jd.fromSize(t),s=e(n,i).keepWithin(a);o.copy(s.center.setZ(o.z)),n.updateMatrixWorld(),r()},[n,t,e,r])}function dX(){const{canvasSize:t}=vo(),e=Do(r=>r.camera),n=Gb();return H.useCallback(({world:r})=>{const{width:i,height:o}=t,a=jd.fromPoints(...r),{width:s,height:l}=a.size;e.scale.set(Math.max(s,1)/i,Math.max(l,1)/o,1),n(a.center)},[e,t,n])}function MI(){const{canvasArea:t}=vo();Ap(t,"wheel",e=>e.preventDefault(),{passive:!1})}function CI(t){const e=Do(r=>r.camera),n=Gb();return function(r){const{sourceEvent:i,worldPt:o}=r,{x:a,y:s}=t(i);if(!a&&!s)return;const l=new ae(a?AU:1,s?AU:1,1);i.deltaY<0?e.scale.multiply(l).min(TU):e.scale.divide(l).min(TU);const u=e.position.clone().sub(o);i.deltaY<0?u.multiply(l):u.divide(l),n(o.clone().add(u))}}function ef(t,e,n={}){const r=As(e),i=Do(u=>u.camera),{htmlToWorld:o,worldToData:a,canvasArea:s}=vo();function l(u){const{offsetX:c,offsetY:f}=u,d=new ae(c,f),p=o(i,d),y=a(p);r.current({htmlPt:d,worldPt:p,dataPt:y,sourceEvent:u})}Ap(s,t,l,n)}function jb(t,e){const{shouldInteract:n,registerInteraction:r,unregisterInteraction:i}=U5e();return H.useEffect(()=>(r(t,e),()=>i(t)),[t,r,i,e]),H.useCallback(o=>n(t,o),[t,n])}function hX(t=[]){const{canvasArea:e}=vo(),n=Jo.castArray(t),[r]=H.useState(new Map),[i,o]=xbe(!1);function a(){const s=n.every(l=>r.get(l));i!==s&&o(s)}return Ap(window,"keyup",s=>{const{key:l}=s;r.set(l,!1),a()}),Ap(window,"keydown",s=>{const{key:l}=s;r.set(l,!0),a()}),Ap(e,"pointerdown",s=>{$5e.forEach(l=>{r.set(l,s.getModifierState(l))}),a()}),i}function H5e(t){const{id:e="Pan",button:n=fA.Left,modifierKey:r,disabled:i}=t,o=jb(e,{button:n,modifierKey:r,disabled:i}),a=Do(p=>p.camera),s=Gb(),l=H.useRef(),u=hX(r);function c(p){const{worldPt:y,sourceEvent:x}=p,{target:_,pointerId:v}=x;o(x)&&(_.setPointerCapture(v),l.current=y.clone())}function f(p){if(!l.current||!u)return;const{worldPt:y}=p,x=l.current.clone().sub(y);s(a.position.clone().add(x))}function d(p){const{sourceEvent:y}=p,{target:x,pointerId:_}=y;x.releasePointerCapture(_),l.current=void 0}return ef("pointerdown",c),ef("pointermove",f),ef("pointerup",d),null}function pX(t){const{id:e="Selection",modifierKey:n,disabled:r,transform:i=te=>te,validate:o=()=>!0,onSelectionStart:a,onSelectionChange:s,onSelectionEnd:l,onValidSelection:u,children:c}=t,f=As(i),d=As(o),p=As(a),y=As(s),x=As(l),_=As(u),v=Do(te=>te.camera),S=vo(),{canvasBox:w,htmlToWorld:E,worldToData:T}=S,[C,D]=ybe(),O=H.useRef(),P=H.useRef(!1),N=hX(n),k=jb(e,{button:fA.Left,modifierKey:n,disabled:r});function G(te){const{sourceEvent:re}=te;if(!k(re))return;const{target:le,pointerId:ce}=re;le.setPointerCapture(ce),O.current=te}function Z(te){if(!O.current)return;const{htmlPt:re}=O.current,le=[re,w.clampPoint(te.htmlPt)],ce=le.map(Re=>E(v,Re)),Ce=ce.map(T);D({html:le,world:ce,data:Ce})}function j(te){if(!O.current)return;const{sourceEvent:re}=te,{target:le,pointerId:ce}=re;le.releasePointerCapture(ce),O.current=void 0,P.current=k(re),D(void 0)}ef("pointerdown",G),ef("pointermove",Z),ef("pointerup",j);function K(){O.current=void 0,D(void 0)}wbe("Escape",K,[],{event:"keydown"}),Ap(window,"contextmenu",te=>{O.current&&(te.preventDefault(),K())});const Y=H.useMemo(()=>C&&f.current(C,v,S),[C,f,v,S]),$=H.useMemo(()=>!!Y&&d.current(Y),[Y,d]),W=Lk(Y),U=Lk($);return H.useEffect(()=>{var te,re,le,ce;if(Y){bE(C),W||(te=p.current)==null||te.call(p),(re=y.current)==null||re.call(y,N?Y:void 0,C,$);return}W&&(bE(U),(le=x.current)==null||le.call(x,P.current?W:void 0,U),U&&P.current&&((ce=_.current)==null||ce.call(_,W)),P.current=!1)},[Y,W,C,$,U,N,p,y,x,_]),!Y||!N?null:(bE(C),F.jsx(F.Fragment,{children:c(Y,C,$)}))}const V5e="_selection_1p9dp_1",iN={selection:V5e};function AI(t){const{overflowCanvas:e=!1,children:n}=t,{r3fRoot:r,canvasArea:i}=vo(),o=e?i:r,[a]=H.useState(()=>{const l=document.createElement("div");return l.setAttribute("hidden",""),l}),[s]=H.useState(()=>M7(a));return H.useLayoutEffect(()=>{s.render(Jd.createPortal(n,o))},[n,o,s]),H.useLayoutEffect(()=>(r.append(a),()=>{s.unmount(),a.remove()}),[r,s,a]),null}function TI(t){const{children:e}=t,{svgOverlay:n}=vo();return n?F.jsx(AI,{children:Jd.createPortal(e,n)}):null}function B2(t){const{coords:e,strokePosition:n,...r}=t,{stroke:i,strokeWidth:o=1}=r,a=i&&n?o*(n==="outside"?1:-1):0,{min:s,max:l}=jd.fromPoints(...e).expandBySize(a,a);return F.jsx("path",{d:`M ${s.x},${s.y} H ${l.x} V ${l.y} H ${s.x} z`,...r})}const W5e=20;function G5e(t){const{minZoom:e=W5e,...n}=t,{canvasSize:r,canvasRatio:i,canvasBox:o,visRatio:a,visSize:s,htmlToWorld:l,worldToData:u}=vo(),c=dX(),f=Do(y=>y.camera),d=a!==void 0;function p(y){if(!d)return y;const{scale:x}=f,_=jd.empty(new ae(r.width/2,r.height/2)).expandBySize(s.width/x.x,s.height/x.y),v=jd.fromPoints(...y.html).expandToRatio(i).keepWithin(o).keepWithin(_).toRect(),S=v.map(E=>l(f,E)),w=S.map(u);return{html:v,world:S,data:w}}return F.jsx(pX,{id:"SelectToZoom",transform:p,validate:({html:y})=>y[0].manhattanDistanceTo(y[1])>=e,onValidSelection:c,...n,children:({html:y},{html:x},_)=>F.jsxs(TI,{children:[F.jsx(B2,{className:iN.selection,coords:x,fill:"white",fillOpacity:!d&&_?.25:0,stroke:"black",strokePosition:"inside",strokeDasharray:d||!_?4:void 0}),d&&F.jsx(B2,{className:iN.selection,coords:y,fill:"white",fillOpacity:_?.25:0,stroke:"black",strokePosition:"inside"})]})})}function j5e(t){const{modifierKey:e,disabled:n}=t,{visRatio:r}=vo(),i=jb("XAxisZoom",{button:"Wheel",modifierKey:e,disabled:r!==void 0||n}),o=a=>({x:i(a),y:!1});return MI(),ef("wheel",CI(o)),null}function q5e(t){const{modifierKey:e,disabled:n}=t,{visRatio:r}=vo(),i=jb("YAxisZoom",{button:"Wheel",modifierKey:e,disabled:r!==void 0||n}),o=a=>({x:!1,y:i(a)});return MI(),ef("wheel",CI(o)),null}function X5e(t){const{modifierKey:e,disabled:n}=t,r=jb("Zoom",{button:"Wheel",modifierKey:e,disabled:n}),i=o=>{const a=r(o);return{x:a,y:a}};return MI(),ef("wheel",CI(i)),null}function Y5e(t){const{axis:e,onSelectionStart:n,onSelectionChange:r,onSelectionEnd:i,children:o,...a}=t;function s(l,u,c){const{canvasSize:f,htmlToWorld:d,worldToData:p}=c,{width:y,height:x}=f,[_,v]=l.html,S=e==="x"?[new ae(_.x,0),new ae(v.x,x)]:[new ae(0,_.y),new ae(y,v.y)],w=S.map(T=>d(u,T)),E=w.map(p);return{html:S,world:w,data:E}}return F.jsx(pX,{transform:s,onSelectionStart:n,onSelectionChange:r,onSelectionEnd:i,...a,children:o})}const K5e=20;function DU(t){const{axis:e,modifierKey:n,disabled:r,minZoom:i=K5e}=t,{visRatio:o}=vo(),a=dX();return F.jsx(Y5e,{axis:e,id:`${e.toUpperCase()}SelectToZoom`,modifierKey:n,disabled:o!==void 0||r,validate:({html:s})=>jd.fromPoints(...s).hasMinSize(i),onValidSelection:a,children:({html:s},l,u)=>F.jsx(TI,{children:F.jsx(B2,{className:iN.selection,coords:s,fill:"white",fillOpacity:u?.25:0,stroke:"black",strokePosition:"inside",strokeDasharray:u?void 0:4})})})}function Z5e(t){const{...e}=t;return F.jsxs(F.Fragment,{children:[e.pan!==!1&&F.jsx(H5e,{...e.pan}),e.zoom!==!1&&F.jsx(X5e,{...e.zoom}),e.xAxisZoom!==!1&&F.jsx(j5e,{modifierKey:"Alt",...e.xAxisZoom}),e.yAxisZoom!==!1&&F.jsx(q5e,{modifierKey:"Shift",...e.yAxisZoom}),e.selectToZoom!==!1&&F.jsx(G5e,{modifierKey:"Control",...e.selectToZoom}),e.xSelectToZoom!==!1&&F.jsx(DU,{axis:"x",modifierKey:["Control","Alt"],...e.xSelectToZoom}),e.ySelectToZoom!==!1&&F.jsx(DU,{axis:"y",modifierKey:["Control","Shift"],...e.ySelectToZoom})]})}function DI(t,e,n=(r,i)=>Object.is(r,i)){const r=Do(s=>s.camera),i=gbe(),o=H.useRef(),a=As(t);return H.useMemo(()=>{o.current=a.current(r)},e),K4(()=>{const s=a.current(r);n(o.current,s)||(o.current=s,i())}),o.current}function J5e(t){const{children:e}=t,{floatingToolbar:n}=vo();return n?F.jsx(AI,{children:Jd.createPortal(e,n)}):null}const Q5e="_btn_rzs1v_1 _btn_rnveq_39 btnClean",eFe="_btnLike_rzs1v_11 _btnLike_rnveq_55",RU={btn:Q5e,btnLike:eFe};function tFe(){const t=Do(i=>i.camera),e=Do(i=>i.invalidate),n=DI(({scale:i})=>i.x<1||i.y<1,[]);function r(){t.scale.x=1,t.scale.y=1,t.position.x=0,t.position.y=0,t.updateMatrixWorld(),e()}return F.jsx(J5e,{children:F.jsx("button",{className:RU.btn,type:"button",hidden:!n,onClick:()=>r(),children:F.jsx("span",{className:RU.btnLike,children:"Reset zoom"})})})}function nFe(t){const{children:e,size:n,...r}=t,{visSize:i}=vo(),{width:o,height:a}=n??i;return F.jsxs("mesh",{...r,children:[F.jsx("planeGeometry",{args:[o,a]}),e]})}const rFe="_axis_1fn7e_1",iFe="_grid_1fn7e_2",oFe="_tick_1fn7e_22",aFe="_label_1fn7e_34",U2={axis:rFe,grid:iFe,tick:oFe,label:aFe};function sFe(t){const{formattedValue:e,...n}=t;return F.jsx("text",{...n,dy:"0.3125em",children:e})}const lFe={labelClassName:U2.label,labelProps:{},tickClassName:U2.tick,tickComponent:sFe},uFe={abscissa:[jNe,Wq],ordinate:[HNe,Vq]};function PU(t){const{type:e,config:n,domain:r,canvasSize:i,offset:o,flipAxis:a,showAxis:s}=t,{width:l,height:u}=i,c=e==="abscissa",f=c?l:u,{scaleType:d=Rn.Linear,isIndexAxis:p,showGrid:y,label:x,nice:_=!1}=n,v=lX(d,{domain:r,range:a?[f,0]:[0,f],nice:_}),[S,w]=uFe[e],E=T5e(f),T=p?{tickValues:N5e(r,E)}:{numTicks:E};return F.jsxs(F.Fragment,{children:[s&&F.jsx("svg",{className:U2.axis,"data-type":e,style:c?{width:l,height:o}:{width:o,height:u},children:F.jsx(S,{scale:v,tickFormat:O5e(r,f,d),label:x,labelOffset:o-(c?32:36),hideAxisLine:y,...T,...lFe})}),y&&F.jsx("svg",{className:U2.grid,...i,children:F.jsx(w,{scale:v,...i,...T})})]})}function cFe(t){const{axisOffsets:e,showAxes:n}=t,{canvasSize:r,visCanvas:i,abscissaConfig:o,ordinateConfig:a,getVisibleDomains:s}=vo(),l=DI(s,[s]);return F.jsx(AI,{children:Jd.createPortal(F.jsxs(F.Fragment,{children:[F.jsx(PU,{type:"abscissa",config:o,domain:l.xVisibleDomain,canvasSize:r,offset:e.bottom,showAxis:n}),F.jsx(PU,{type:"ordinate",config:a,domain:l.yVisibleDomain,canvasSize:r,offset:e.left,showAxis:n,flipAxis:!0})]}),i)})}function fFe(t){const{className:e,orthographic:n,children:r}=t;return F.jsxs(ZAe,{className:e,orthographic:n,flat:!0,frameloop:"demand",dpr:[1,3],resize:{debounce:{scroll:20,resize:200},scroll:!1},gl:{preserveDrawingBuffer:!0},children:[F.jsx("ambientLight",{}),r]})}function dFe(){const{visRatio:t}=vo(),e=Do(r=>r.camera),n=Gb();return H.useEffect(()=>{if(!t||e.scale.x===e.scale.y)return;const r=Math.max(e.scale.x,e.scale.y);e.scale.x=r,e.scale.y=r,n(e.position)},[e,n,t]),null}function hFe(t){const{value:e}=t,n=Do(i=>i.raycaster),r=Do(i=>i.camera);return H.useEffect(()=>{const i=n.params.Points,o=i?i.threshold:1;return i&&(i.threshold=e),()=>{i&&(i.threshold=o)}},[n,e]),K4(()=>{const i=(r.scale.x+r.scale.y)/2;n.params.Points&&(n.params.Points.threshold=e*i/2)}),null}function pFe(){const{dataToWorld:t,worldToData:e}=vo(),n=H.useRef(),r=Do(o=>o.camera),i=Gb();return K4(()=>{n.current=e(r.position)}),H.useEffect(()=>{n.current&&i(t(n.current))},[n,i,t,r]),null}const mFe="_visCanvas_lddco_1",gFe="_title_lddco_28",vFe="_canvasArea_lddco_40",yFe="_r3fRoot_lddco_42",xFe="_svgOverlay_lddco_42",bFe="_floatingToolbar_lddco_42",O0={visCanvas:mFe,title:gFe,canvasArea:vFe,r3fRoot:yFe,svgOverlay:xFe,floatingToolbar:bFe},_Fe={left:0,right:0,top:0,bottom:0};function wFe(t){const{title:e,aspect:n="auto",abscissaConfig:r,ordinateConfig:i,raycasterThreshold:o,showAxes:a=!0,children:s}=t,l=uX(n,r.visDomain,i.visDomain),u=a?I5e({left:!!i.label,bottom:!!r.label,top:!!e}):_Fe,[c,f]=H.useState(null),[d,p]=H.useState(null);return F.jsxs("div",{className:O0.visCanvas,style:{gridTemplateColumns:`${u.left}px minmax(0, 1fr) ${u.right}px`,gridTemplateRows:`${u.top}px minmax(0, 1fr) ${u.bottom}px`},children:[a&&e&&F.jsx("p",{className:O0.title,children:e}),F.jsxs("div",{className:O0.canvasArea,children:[F.jsx(fFe,{className:O0.r3fRoot,orthographic:!0,children:F.jsxs(k5e,{visRatio:l,abscissaConfig:r,ordinateConfig:i,svgOverlay:c,floatingToolbar:d,children:[F.jsx(cFe,{axisOffsets:u,showAxes:a}),F.jsx(z5e,{children:s}),F.jsx(pFe,{}),F.jsx(dFe,{}),o!==void 0&&F.jsx(hFe,{value:o})]})}),F.jsx("svg",{ref:f,className:O0.svgOverlay,overflow:"hidden"})]}),F.jsx("div",{ref:p,className:O0.floatingToolbar})]})}var M1=(t=>(t.Circle="Circle",t.Cross="Cross",t.Square="Square",t.Cap="Cap",t))(M1||{});M1.Cross+"",M1.Cap+"",M1.Circle+"",M1.Square+"";class SFe extends ff{}Mj({Line_:SFe});var Sg=(t=>(t.MinGreater="min-greater",t.InvalidMinWithScale="invalid-min-with-scale",t.InvalidMaxWithScale="invalid-max-with-scale",t.CustomMaxFallback="custom-max-fallback",t))(Sg||{});function EFe(t){return D2(t*360,1,.5).formatRgb()}function I0(t){return e=>t(1-e)}const MFe={Blues:I0(GOe),Greens:I0(qOe),Greys:I0(YOe),Oranges:I0(t4e),Purples:I0(ZOe),Reds:I0(QOe),Turbo:c4e,Viridis:f4e,Inferno:h4e,Magma:d4e,Plasma:p4e,Cividis:n4e,Warm:i4e,Cool:o4e,Cubehelix:r4e,BuGn:_Oe,BuPu:SOe,GnBu:MOe,OrRd:AOe,PuBuGn:DOe,PuBu:POe,PuRd:OOe,RdPu:FOe,YlGnBu:kOe,YlGn:UOe,YlOrBr:$Oe,YlOrRd:VOe,Rainbow:a4e,Sinebow:u4e,HSL:EFe,BrBG:rOe,PRGn:oOe,PiYG:sOe,PuOr:uOe,RdBu:fOe,RdGy:hOe,RdYlBu:mOe,RdYlGn:vOe,Spectral:xOe},NU=1/20;Jo.range(0,1+NU,NU);const CFe={[Rn.Linear]:t=>t,[Rn.Log]:Math.log10,[Rn.SymLog]:t=>Math.sign(t)*Math.log10(1+Math.abs(t)),[Rn.Sqrt]:Math.sqrt,[Rn.Gamma]:t=>t},AFe={float32:Ql,uint16:Wp,uint8:Ls,uint8_clamped:Ls};function TFe(t,e){const n=MFe[t];return e?r=>n(1-r):n}function DFe(t,e=Rn.Linear){const n=CFe[e];return[n(t[0]),n(t[1])]}function RFe(t,e=ci){if(!t)return;const{rows:n,cols:r}=a5e(t),i=new Id(t.data,r,n,p4,AFe[t.dtype],Db,co,co,e);return i.needsUpdate=!0,i}const uD=f5e(RFe),PFe=Wd(255,255,255,0),cD=256,NFe={[Rn.Log]:"log(value) * oneOverLog10",[Rn.SymLog]:"sign(value) * log(1. + abs(value)) * oneOverLog10",[Rn.Sqrt]:"sqrt(value)"},OFe={[Rn.Log]:"value > 0.",[Rn.Sqrt]:"value >= 0."};function IFe(t){const{values:e,domain:n,scaleType:r,colorMap:i,invertColorMap:o=!1,magFilter:a,alphaValues:s,alphaDomain:l=M5e,badColor:u=PFe,mask:c}=t,f=uD(e,a),d=uD(s),p=uD(c),y=H.useMemo(()=>{const E=TFe(i,o),T=Array.from({length:cD}).flatMap((D,O)=>{const{r:P,g:N,b:k}=Wd(E(O/(cD-1)));return[P,N,k,255]}),C=new Id(Uint8Array.from(T),cD,1,ba,Ls);return C.needsUpdate=!0,C},[i,o]),[x,_]=Array.isArray(r)?r:[r,1],v=DFe(n,x),S=typeof u=="string"?Wd(u):u,w={uniforms:L5e({data:f,mask:p,colorMap:y,min:v[0],oneOverRange:1/(v[1]-v[0]),gammaExponent:_,normRevertFactor:e.dtype==="uint8"?255:1,alpha:d,withAlpha:s?1:0,alphaMin:l[0],oneOverAlphaRange:1/(l[1]-l[0]),badColor:new ir(S.r/255,S.g/255,S.b/255,S.opacity)}),vertexShader:F5e,fragmentShader:` uniform sampler2D data; uniform sampler2D colorMap; @@ -3870,11 +3870,11 @@ No matching component was found for: varying vec2 coords; bool isSupported(float value) { - return ${wFe[x]||"true"}; + return ${OFe[x]||"true"}; } float scale(float value) { - return ${_Fe[x]||"value"}; + return ${NFe[x]||"value"}; } void main() { @@ -3894,9 +3894,9 @@ No matching component was found for: } } } - `};return F.jsx("shaderMaterial",{args:[w],side:Kl})}const EFe=H.memo(SFe);function MFe(t){const{values:e,domain:n,scaleType:r,colorMap:i,invertColorMap:o,magFilter:a,alphaValues:s,alphaDomain:l,badColor:u,mask:c,...f}=t;return F.jsx(G5e,{...f,children:F.jsx(EFe,{values:e,domain:n,scaleType:r,colorMap:i,invertColorMap:o,magFilter:a,alphaValues:s,alphaDomain:l,badColor:u,mask:c})})}const CFe="_toolbar_rnveq_1",AFe="_controls_rnveq_13",TFe="_controlWrapper_rnveq_20",DFe="_control_rnveq_13",RFe="_sep_rnveq_34",PFe="_btn_rnveq_39 btnClean",NFe="_btnLike_rnveq_55",OFe="_icon_rnveq_80",IFe="_label_rnveq_97",FFe="_popup_rnveq_133",LFe="_popupInner_rnveq_140",zS={toolbar:CFe,controls:AFe,controlWrapper:TFe,control:DFe,sep:RFe,btn:PFe,btnLike:NFe,icon:OFe,label:IFe,popup:FFe,popupInner:LFe};function kFe(t){const{label:e,icon:n,iconOnly:r,small:i,raised:o,disabled:a,onClick:s,...l}=t;return F.jsx("button",{className:zS.btn,type:"button",title:r?e:void 0,"aria-label":r?e:void 0,disabled:a,"data-small":i||void 0,"data-raised":o||void 0,onClick:()=>s(),...l,children:F.jsxs("span",{className:zS.btnLike,children:[n&&F.jsx(n,{className:zS.icon}),!r&&F.jsx("span",{className:zS.label,children:e})]})})}function RU(t){const{value:e,onToggle:n,...r}=t;return F.jsx(kFe,{...r,"aria-pressed":e,onClick:()=>n()})}H.createContext(void 0);const BFe="_boundEditor_fj0px_1",UFe="_label_fj0px_8",zFe="_value_fj0px_16",$Fe="_actionBtn_fj0px_64 _actionBtn_3jqdy_30 btnClean",s1={boundEditor:BFe,label:UFe,value:zFe,actionBtn:$Fe},lX=H.forwardRef((t,e)=>{const{bound:n,value:r,isEditing:i,hasError:o,onEditToggle:a,onChange:s}=t,l=`${n}-bound`,u=H.useRef(null),[c,f]=H.useState("");function d(){a(!1),f(tD(r))}return H.useImperativeHandle(e,()=>({cancel:d})),H.useEffect(()=>{f(tD(r))},[r,f]),H.useEffect(()=>{var p,y;i||(p=u.current)==null||p.blur(),i&&n==="min"&&((y=u.current)==null||y.focus())},[i,n]),F.jsxs("form",{className:s1.boundEditor,"data-error":o||void 0,"data-editing":i,onSubmit:p=>{p.preventDefault();const y=Number.parseFloat(c.replace("−","-")),x=Number.isNaN(y)?r:b5e(y);f(tD(x)),s(x),a(!1)},children:[F.jsx("label",{id:`${l}-label`,className:s1.label,htmlFor:l,children:n}),F.jsx("input",{id:l,ref:u,className:s1.value,type:"text",name:"bound",value:c,title:i?void 0:r.toString(),"aria-labelledby":`${l}-label`,onChange:p=>f(p.target.value),onFocus:()=>{i||a(!0)}}),F.jsx("button",{className:s1.actionBtn,type:"submit",disabled:!i,"aria-label":`Apply ${n}`,children:F.jsx(s4e,{})}),F.jsx("button",{className:s1.actionBtn,type:"button",disabled:!i,"aria-label":`Cancel ${n}`,onClick:()=>d(),children:F.jsx(u4e,{})})]})});lX.displayName="BoundEditor";const PU=lX,HFe="_root_3jqdy_1",VFe="_dataRange_3jqdy_9",WFe="_autoscale_3jqdy_20",GFe="_actionBtn_3jqdy_30 btnClean",jFe="_error_3jqdy_51",qFe="_errorMessage_3jqdy_59",XFe="_swapBtn_3jqdy_73 _actionBtn_3jqdy_30 btnClean",zg={root:HFe,dataRange:VFe,autoscale:WFe,actionBtn:GFe,error:jFe,errorMessage:qFe,swapBtn:XFe},YFe={[wg.MinGreater]:{message:"Min greater than max",fallback:"data range"},[wg.InvalidMinWithScale]:{message:"Custom min invalid with this scale",fallback:"data min"},[wg.InvalidMaxWithScale]:{message:"Custom max invalid with this scale",fallback:"data max"},[wg.CustomMaxFallback]:{message:"Custom min invalid with this scale",fallback:"custom max"}};function uD(t){const{error:e,showSwapBtn:n=!1,onSwap:r}=t,{message:i,fallback:o}=YFe[e];return F.jsxs("p",{className:zg.error,children:[F.jsxs("span",{className:zg.errorMessage,children:[i,F.jsx("br",{}),F.jsx(l4e,{})," falling back to ",F.jsx("strong",{children:o})]}),n&&r&&F.jsx("button",{className:zg.swapBtn,type:"button","aria-label":"Swap min and max",onClick:()=>r(),children:F.jsx(P4e,{})})]})}const KFe=H.forwardRef((t,e)=>{const{sliderDomain:n,dataDomain:r,errors:i}=t,{isAutoMin:o,isAutoMax:a,isEditingMin:s,isEditingMax:l}=t,{onAutoMinToggle:u,onAutoMaxToggle:c,onEditMin:f,onEditMax:d,onChangeMin:p,onChangeMax:y,onSwap:x}=t,{minGreater:_,minError:v,maxError:S}=i,w=H.useRef(null),E=H.useRef(null);return H.useImperativeHandle(e,()=>({cancelEditing:()=>{var T,C;(T=w.current)==null||T.cancel(),(C=E.current)==null||C.cancel()}})),F.jsxs("div",{className:zg.root,children:[_&&F.jsx(uD,{error:wg.MinGreater,showSwapBtn:!o&&!a,onSwap:x}),F.jsx(PU,{ref:w,bound:"min",value:n[0],isEditing:s,hasError:_||!!v,onEditToggle:f,onChange:p}),v&&F.jsx(uD,{error:v}),F.jsx(PU,{ref:E,bound:"max",value:n[1],isEditing:l,hasError:_||!!S,onEditToggle:d,onChange:y}),S&&F.jsx(uD,{error:S}),F.jsxs("p",{className:zg.dataRange,children:["Data range"," ",F.jsxs("span",{children:["["," ",F.jsx("abbr",{title:r[0].toString(),children:yU(r[0])})," ",","," ",F.jsx("abbr",{title:r[1].toString(),children:yU(r[1])})," ","]"]})]}),F.jsxs("p",{className:zg.autoscale,children:["Autoscale"," ",F.jsx(RU,{label:"Min",raised:!0,value:o,onToggle:u}),F.jsx(RU,{label:"Max",raised:!0,value:a,onToggle:c})]})]})});KFe.displayName="DomainControls";const ZFe="_thumb_doizn_1",JFe="_thumbBtnLike_doizn_11",QFe="_icon_doizn_47",$S={thumb:ZFe,thumbBtnLike:JFe,icon:QFe},eLe=H.forwardRef((t,e)=>{const{bound:n,isAuto:r,hasError:i,disabled:o,AutoIcon:a,...s}=t;return F.jsx("div",{ref:e,...s,className:$S.thumb,"aria-label":`Change ${n} limit`,"aria-disabled":o||void 0,tabIndex:o?-1:s.tabIndex,"data-auto":r,"data-error":i||void 0,children:F.jsxs("div",{className:$S.thumbBtnLike,children:[r&&F.jsx(a,{className:$S.icon}),!r&&i&&F.jsx(a4e,{className:$S.icon,strokeWidth:"3"})]})})});eLe.displayName="Thumb";function tLe(t){return F.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",...t,children:F.jsx("path",{d:"M18 17v-2H6v2zm4-4v-2H2v2zm-8 8v-2h-4v2zm4-12V7H6v2zm-8-4h4V3h-4z",stroke:"none"})})}function nLe(t){return F.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",fill:"none",strokeWidth:"2",viewBox:"0 0 24 24",strokeLinecap:"round",strokeLinejoin:"round",height:"1em",width:"1em",...t,children:F.jsx("polyline",{points:"2 12 6 12 9 21 15 3 19 3"})})}Pn.Linear+"",Pn.Log+"",Pn.SymLog+"",Pn.Sqrt+"",Pn.Gamma+"";function rLe(t){const{points:e,children:n}=t,{dataToHtml:r}=go(),i=TI(o=>e.map(a=>r(o,a)),[e,r]);return F.jsx(F.Fragment,{children:n(...i)})}function cD(t){const{coords:e,...n}=t,[r,i]=e;return F.jsx("line",{x1:r.x,y1:r.y,x2:i.x,y2:i.y,...n})}DIe(t=>({val:void 0,setTooltipValue:(e,n,r)=>t(()=>({val:{x:e,y:n,v:r}}))}));function iLe(t){const{api:e,layer:n,x:r,y:i,magFilter:o,onPointerMove:a,...s}=t,l=e.get(n,new Je(r,i)),[u,c]=l.shape,f=a&&Jo.throttle(d=>{a(d,l)},50,{trailing:!1});return F.jsx("group",{position:[r+c/2,i+u/2,0],children:F.jsx(MFe,{values:l,...s,magFilter:o,size:{width:c,height:u},onPointerMove:f})})}H.memo(iLe);new Al(new ae(-1,-1,-1),new ae(1,1,1));class ya{constructor(e,n){ro(this,"min");ro(this,"max");if(this.min=e,this.max=n,e>n){const r=n;this.max=e,this.min=r}}containsValue(e){return e>=this.min&&e<=this.max}containsRange(e){return e.min>=this.min&&e.max<=this.max}intersect(e){return e===null||e.min>this.max||this.min>e.max?null:new ya(Math.max(e.min,this.min),Math.min(e.max,this.max))}apply(e){return new ya(e(this.min),e(this.max))}applyInPlace(e){return this.min=e(this.min),this.max=e(this.max),this}toString(){return`(min:${this.min}, max:${this.max})`}equals(e){return this.min===e.min&&this.max===e.max}}var Wc=(t=>(t.milimeter="mm",t.pixel="pixel",t.reciprocal="nm^-1",t))(Wc||{});const uX=_v(t=>({detector:!0,detectorColour:{r:144,g:19,b:254,a:.4},beamstop:!0,beamstopColor:{r:0,g:0,b:0,a:1},cameraTube:!0,cameraTubeColor:{r:80,g:227,b:194,a:.4},visibleRange:!0,visibleColor:{r:245,g:166,b:35,a:1},requestedRange:!0,requestedRangeColor:{r:65,g:117,b:5,a:1},clearance:!0,clearanceColor:{r:0,g:0,b:0,a:.2},inaccessibleRange:!0,inaccessibleRangeColor:{r:208,g:2,b:27,a:1},plotAxes:"mm",update:e=>{t({...e})}})),oLe=t=>{const e=t.upperBound.x>t.upperBound.y?t.upperBound.x:t.upperBound.y,n=t.lowerBound.x`rgba(${t.r}, ${t.g}, ${t.b}, ${t.a})`,dd=class dd{constructor(e,n){ro(this,"plotAxes");ro(this,"xunit");ro(this,"yunit");ro(this,"scaleFactor");ro(this,"createPlotEllipseClearance",(e,n,r,i)=>{if(this.plotAxes!==Wc.reciprocal){const s=new ae(e.x.to(this.xunit).toNumber(),e.y.to(this.yunit).toNumber());return{centre:s,endPointX:new ae(s.x+jo(n,2).to(this.xunit).toNumber()+qt(r,"xpixel").to(this.xunit).toNumber(),s.y),endPointY:new ae(s.x,s.y+jo(n,2).to(this.yunit).toNumber()+qt(r,"ypixel").to(this.yunit).toNumber())}}if(!this.scaleFactor)throw TypeError("reciprocal units need a scaleFactor");const o=dd.convert2QSpace(e,this.scaleFactor,i),a=new ae(o.x.to(this.xunit).toNumber(),o.y.to(this.yunit).toNumber());return{centre:a,endPointX:new ae(a.x+Bi(jo(n,2),this.scaleFactor).to(this.xunit).toNumber()+Bi(qt(r,"xpixel"),this.scaleFactor).to(this.xunit).toNumber(),a.y),endPointY:new ae(a.x,a.y+Bi(jo(n,2),this.scaleFactor).to(this.yunit).toNumber()+Bi(qt(r,"ypixel"),this.scaleFactor).to(this.yunit).toNumber())}});ro(this,"createPlotRange",(e,n,r)=>{if(this.plotAxes===Wc.reciprocal){if(!this.scaleFactor)throw TypeError("reciprocal units need a scaleFactor");e=dd.convert2QSpace(e,this.scaleFactor,r),n=dd.convert2QSpace(n,this.scaleFactor,r)}return{start:new ae(e.x.to(this.xunit).toNumber(),e.y.to(this.yunit).toNumber()),end:new ae(n.x.to(this.xunit).toNumber(),n.y.to(this.yunit).toNumber())}});this.xunit=e,this.yunit=e,this.plotAxes=e,this.scaleFactor=n,e===Wc.pixel&&(this.xunit="xpixel",this.yunit="ypixel")}createPlotEllipse(e,n,r){if(this.plotAxes!==Wc.reciprocal){const a=new ae(e.x.to(this.xunit).toNumber(),e.y.to(this.yunit).toNumber());return{centre:a,endPointX:new ae(a.x+jo(n,2).to(this.xunit).toNumber(),a.y),endPointY:new ae(a.x,a.y+jo(n,2).to(this.yunit).toNumber())}}if(!this.scaleFactor)throw TypeError("reciprocal units need a scaleFactor");const i=dd.convert2QSpace(e,this.scaleFactor,r),o=new ae(i.x.to(this.xunit).toNumber(),i.y.to(this.yunit).toNumber());return{centre:o,endPointX:new ae(o.x+Bi(jo(n,2),this.scaleFactor).to(this.xunit).toNumber(),o.y),endPointY:new ae(o.x,o.y+Bi(jo(n,2),this.scaleFactor).to(this.yunit).toNumber())}}createPlotRectangle(e,n){if(this.plotAxes!==Wc.reciprocal)return{lowerBound:new ae(0,0),upperBound:new ae(qt(e.width,"xpixel").to(this.xunit).toNumber(),qt(e.height,"ypixel").to(this.yunit).toNumber())};if(!this.scaleFactor)throw TypeError("reciprocal units need a scaleFactor");const r=dd.convert2QSpace({x:qt(0,"xpixel"),y:qt(0,"ypixel")},this.scaleFactor,n);return{lowerBound:new ae(r.x.to(this.xunit).toNumber(),r.y.to(this.yunit).toNumber()),upperBound:new ae(r.x.to(this.xunit).toNumber()+Bi(qt(e.width,"xpixel"),this.scaleFactor).to(this.xunit).toNumber(),r.y.to(this.yunit).toNumber()+Bi(qt(e.height,"ypixel"),this.scaleFactor).to(this.yunit).toNumber())}}};ro(dd,"convert2QSpace",(e,n,r)=>({x:Bi(n,Tk(e.x,r.x)),y:Bi(n,Tk(e.y,r.y))}));let rN=dd;class aLe{constructor(e,n,r){ro(this,"detProps");ro(this,"kmod");ro(this,"qScale");ro(this,"mki");this.detProps=e,e.beamVector.normalize(),this.qScale=r,this.mki=e.beamVector.clone().negate(),this.kmod=this.qScale/n;const i=this.detProps.beamVector.clone();i.multiplyScalar(this.kmod),this.mki=i.negate()}convertToQ(e){const n=e.length();return n>0?(e.multiplyScalar(this.kmod/n),e.add(this.mki)):e.add(this.mki),e}qFromPixelPosition(e){const n=new ae;return n.set(-e.x,-e.y,0),n.add(this.detProps.origin),this.convertToQ(n)}setDiffractionCrystalEnviroment(e){this.kmod=this.qScale/e;const n=this.detProps.beamVector.clone();n.multiplyScalar(this.kmod),this.mki=n.negate()}}class $g{constructor(e,n){ro(this,"direction");ro(this,"initial_point");if(e.length()==0)throw TypeError("The direction vector of a ray cannot be the zero vector.");this.direction=e,this.initial_point=n}getPoint(e){const n=new Je(this.direction.x,this.direction.y);return n.multiplyScalar(e),n.add(this.initial_point),n}getPointAtDistance(e){return this.getPoint(e/this.direction.length())}static getParameterRange(e,n){let r=Math.min(e,n);const i=Math.max(e,n);return r<0&&(r=0),new ya(r,i)}getCircleIntersectionParameterRange(e,n){const r=this.initial_point.clone().add(n.multiplyScalar(-1)),i=this.direction.dot(this.direction),o=2*r.dot(this.direction),a=r.dot(r)-Math.pow(e,2),s=Math.pow(o,2)-4*i*a;if(s<0)return null;let l,u;if(i==0){if(o==0)return a==0?new ya(0,Number.POSITIVE_INFINITY):null;l=-a/o,u=-a/o}else l=.5*(-o-Math.sqrt(s))/i,u=.5*(-o+Math.sqrt(s))/i;return $g.getParameterRange(l,u)}getRectangleIntersectionParameterRange(e,n,r){let i;const o=e.x+n,a=e.x,s=e.y,l=e.y-r;if(this.direction.x===0){if(!new ya(a,o).containsValue(this.initial_point.x))return null;i=new ya(0,Number.POSITIVE_INFINITY)}else i=new ya((a-this.initial_point.x)/this.direction.x,(o-this.initial_point.x)/this.direction.x);return this.direction.y==0?new ya(l,s).containsValue(this.initial_point.y)?$g.getParameterRange(i.min,i.max):null:(i=i.intersect(new ya((l-this.initial_point.y)/this.direction.y,(s-this.initial_point.y)/this.direction.y)),i==null?null:$g.getParameterRange(i.min,i.max))}}function sLe(t,e,n,r){const i={ptMin:new Je(0,0),ptMax:new Je(0,0),visibleQRange:null,fullQRange:null},o=qt(r.cameraLength??NaN,"m"),a=Iw(qt(e.clearance??NaN,"xpixel"),jo(e.diameter,2)),s=Iw(qt(e.clearance??NaN,"ypixel"),jo(e.diameter,2)),l=qt(e.centre.x??NaN,"xpixel"),u=qt(e.centre.y??NaN,"ypixel"),c=qt(t.resolution.height,"ypixel"),f=qt(t.resolution.width,"xpixel"),d=qt(n.centre.x??NaN,"xpixel"),p=qt(n.centre.y??NaN,"ypixel"),y=Iw(Bi(a,Ck(r.angle)),l),x=Iw(Bi(s,Ak(r.angle)),u);if(typeof y=="number"||!("units"in y)||typeof x=="number"||!("units"in x))return i;const _=new Je(y.toSI().toNumber(),x.toSI().toNumber()),v=new $g(new Je(Ck(r.angle),Ak(r.angle)),_);let S=v.getRectangleIntersectionParameterRange(new Je(0,c.toSI().toNumber()),f.toSI().toNumber(),c.toSI().toNumber());if(S!=null&&n!=null&&n.diameter.toSI().toNumber()!=0&&(S=S.intersect(v.getCircleIntersectionParameterRange(jo(n.diameter,2).toSI().toNumber(),new Je(d.toSI().toNumber(),p.toSI().toNumber())))),S===null)return i;const w=v.getPoint(S.min),E=v.getPoint(S.max),T={...t,origin:new ae(l.toSI().toNumber(),u.toSI().toNumber(),o.toSI().toNumber()),beamVector:new ae(0,0,1)},C=new aLe(T,r.wavelength.toSI().toNumber(),2*Math.PI),D=C.qFromPixelPosition(w),O=C.qFromPixelPosition(E);T.origin.z=r.minCameraLength.toSI().toNumber(),C.setDiffractionCrystalEnviroment(r.minWavelength.toSI().toNumber());const P=C.qFromPixelPosition(E);T.origin.z=r.maxCameraLength.toSI().toNumber(),C.setDiffractionCrystalEnviroment(r.maxWavelength.toSI().toNumber());const N=C.qFromPixelPosition(w);return{ptMin:w,ptMax:E,visibleQRange:new ya(D.length(),O.length()),fullQRange:new ya(P.length(),N.length())}}var hl={},jb={},lLe=Array.isArray,du=lLe;function uLe(t){return t!=null&&typeof t=="object"}var yf=uLe,cLe=lm,fLe=du,dLe=yf,hLe="[object String]";function pLe(t){return typeof t=="string"||!fLe(t)&&dLe(t)&&cLe(t)==hLe}var mLe=pLe;function gLe(t){return function(e,n,r){for(var i=-1,o=Object(e),a=r(e),s=a.length;s--;){var l=a[t?s:++i];if(n(o[l],l,o)===!1)break}return e}}var vLe=gLe,yLe=vLe,xLe=yLe(),bLe=xLe;function _Le(t,e){for(var n=-1,r=Array(t);++n-1&&t%1==0&&t-1&&t%1==0&&t<=kLe}var RI=BLe,ULe=lm,zLe=RI,$Le=yf,HLe="[object Arguments]",VLe="[object Array]",WLe="[object Boolean]",GLe="[object Date]",jLe="[object Error]",qLe="[object Function]",XLe="[object Map]",YLe="[object Number]",KLe="[object Object]",ZLe="[object RegExp]",JLe="[object Set]",QLe="[object String]",e8e="[object WeakMap]",t8e="[object ArrayBuffer]",n8e="[object DataView]",r8e="[object Float32Array]",i8e="[object Float64Array]",o8e="[object Int8Array]",a8e="[object Int16Array]",s8e="[object Int32Array]",l8e="[object Uint8Array]",u8e="[object Uint8ClampedArray]",c8e="[object Uint16Array]",f8e="[object Uint32Array]",Dr={};Dr[r8e]=Dr[i8e]=Dr[o8e]=Dr[a8e]=Dr[s8e]=Dr[l8e]=Dr[u8e]=Dr[c8e]=Dr[f8e]=!0;Dr[HLe]=Dr[VLe]=Dr[t8e]=Dr[WLe]=Dr[n8e]=Dr[GLe]=Dr[jLe]=Dr[qLe]=Dr[XLe]=Dr[YLe]=Dr[KLe]=Dr[ZLe]=Dr[JLe]=Dr[QLe]=Dr[e8e]=!1;function d8e(t){return $Le(t)&&zLe(t.length)&&!!Dr[ULe(t)]}var h8e=d8e;function p8e(t){return function(e){return t(e)}}var PI=p8e,$2={exports:{}};$2.exports;(function(t,e){var n=Mq,r=e&&!e.nodeType&&e,i=r&&!0&&t&&!t.nodeType&&t,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();t.exports=s})($2,$2.exports);var NI=$2.exports,m8e=h8e,g8e=PI,OU=NI,IU=OU&&OU.isTypedArray,v8e=IU?g8e(IU):m8e,hX=v8e,y8e=wLe,x8e=fX,b8e=du,_8e=DI,w8e=dX,S8e=hX,E8e=Object.prototype,M8e=E8e.hasOwnProperty;function C8e(t,e){var n=b8e(t),r=!n&&x8e(t),i=!n&&!r&&_8e(t),o=!n&&!r&&!i&&S8e(t),a=n||r||i||o,s=a?y8e(t.length,String):[],l=s.length;for(var u in t)(e||M8e.call(t,u))&&!(a&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||w8e(u,l)))&&s.push(u);return s}var pX=C8e,A8e=Object.prototype;function T8e(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||A8e;return t===n}var OI=T8e;function D8e(t,e){return function(n){return t(e(n))}}var mX=D8e,R8e=mX,P8e=R8e(Object.keys,Object),N8e=P8e,O8e=OI,I8e=N8e,F8e=Object.prototype,L8e=F8e.hasOwnProperty;function k8e(t){if(!O8e(t))return I8e(t);var e=[];for(var n in Object(t))L8e.call(t,n)&&n!="constructor"&&e.push(n);return e}var B8e=k8e,U8e=Aq,z8e=RI;function $8e(t){return t!=null&&z8e(t.length)&&!U8e(t)}var fA=$8e,H8e=pX,V8e=B8e,W8e=fA;function G8e(t){return W8e(t)?H8e(t):V8e(t)}var qb=G8e,j8e=bLe,q8e=qb;function X8e(t,e){return t&&j8e(t,e,q8e)}var gX=X8e;function Y8e(t){return t}var vX=Y8e,K8e=vX;function Z8e(t){return typeof t=="function"?t:K8e}var J8e=Z8e,Q8e=gX,eke=J8e;function tke(t,e){return t&&Q8e(t,eke(e))}var II=tke,nke=mX,rke=nke(Object.getPrototypeOf,Object),FI=rke,ike=lm,oke=FI,ake=yf,ske="[object Object]",lke=Function.prototype,uke=Object.prototype,yX=lke.toString,cke=uke.hasOwnProperty,fke=yX.call(Object);function dke(t){if(!ake(t)||ike(t)!=ske)return!1;var e=oke(t);if(e===null)return!0;var n=cke.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&yX.call(n)==fke}var hke=dke;function pke(t,e){for(var n=-1,r=t==null?0:t.length,i=Array(r);++ns))return!1;var u=o.get(t),c=o.get(e);if(u&&c)return u==e&&c==t;var f=-1,d=!0,p=n&Qke?new Yke:void 0;for(o.set(t,e),o.set(e,t);++f0&&arguments[0]!==void 0?arguments[0]:[],n=[];return(0,$ze.default)(e,function(r){Array.isArray(r)?t(r).map(function(i){return n.push(i)}):(0,Uze.default)(r)?(0,kze.default)(r,function(i,o){i===!0&&n.push(o),n.push(o+"-"+i)}):(0,Fze.default)(r)&&n.push(r)}),n};jb.default=Hze;var Xb={};function Vze(t,e){for(var n=-1,r=t==null?0:t.length;++n1&&arguments[1]!==void 0?arguments[1]:[],r=e.default&&(0,uHe.default)(e.default)||{};return n.map(function(i){var o=e[i];return o&&(0,sHe.default)(o,function(a,s){r[s]||(r[s]={}),r[s]=cHe({},r[s],o[s])}),i}),r};Xb.default=fHe;var Yb={};Object.defineProperty(Yb,"__esModule",{value:!0});Yb.autoprefix=void 0;var dHe=II,fz=pHe(dHe),hHe=Object.assign||function(t){for(var e=1;e1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){_He(i,r);function i(){var o,a,s,l;bHe(this,i);for(var u=arguments.length,c=Array(u),f=0;f1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){AHe(i,r);function i(){var o,a,s,l;CHe(this,i);for(var u=arguments.length,c=Array(u),f=0;f1&&arguments[1]!==void 0?arguments[1]:!0;r[a]=s};return e===0&&i("first-child"),e===n-1&&i("last-child"),(e===0||e%2===0)&&i("even"),Math.abs(e%2)===1&&i("odd"),i("nth-child",e),r};HI.default=DHe;Object.defineProperty(hl,"__esModule",{value:!0});hl.ReactCSS=hl.loop=hl.handleActive=VI=hl.handleHover=hl.hover=void 0;var RHe=jb,PHe=Fv(RHe),NHe=Xb,OHe=Fv(NHe),IHe=Yb,FHe=Fv(IHe),LHe=Kb,$X=Fv(LHe),kHe=Zb,BHe=Fv(kHe),UHe=HI,zHe=Fv(UHe);function Fv(t){return t&&t.__esModule?t:{default:t}}hl.hover=$X.default;var VI=hl.handleHover=$X.default;hl.handleActive=BHe.default;hl.loop=zHe.default;var $He=hl.ReactCSS=function(e){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;is?d=1:d=Math.round(f*100/s)/100,n.a!==d)return{h:n.h,s:n.s,l:n.l,a:d,source:"rgb"}}else{var p=void 0;if(c<0?p=0:c>a?p=1:p=Math.round(c*100/a)/100,i!==p)return{h:n.h,s:n.s,l:n.l,a:p,source:"rgb"}}return null},mD={},VHe=function(e,n,r,i){if(typeof document>"u"&&!i)return null;var o=i?new i:document.createElement("canvas");o.width=r*2,o.height=r*2;var a=o.getContext("2d");return a?(a.fillStyle=e,a.fillRect(0,0,o.width,o.height),a.fillStyle=n,a.fillRect(0,0,r,r),a.translate(r,r),a.fillRect(0,0,r,r),o.toDataURL()):null},WHe=function(e,n,r,i){var o=e+"-"+n+"-"+r+(i?"-server":"");if(mD[o])return mD[o];var a=VHe(e,n,r,i);return mD[o]=a,a},pz=Object.assign||function(t){for(var e=1;es(),...l,children:F.jsxs("span",{className:zS.btnLike,children:[n&&F.jsx(n,{className:zS.icon}),!r&&F.jsx("span",{className:zS.label,children:e})]})})}function OU(t){const{value:e,onToggle:n,...r}=t;return F.jsx(XFe,{...r,"aria-pressed":e,onClick:()=>n()})}H.createContext(void 0);const YFe="_boundEditor_fj0px_1",KFe="_label_fj0px_8",ZFe="_value_fj0px_16",JFe="_actionBtn_fj0px_64 _actionBtn_3jqdy_30 btnClean",c1={boundEditor:YFe,label:KFe,value:ZFe,actionBtn:JFe},mX=H.forwardRef((t,e)=>{const{bound:n,value:r,isEditing:i,hasError:o,onEditToggle:a,onChange:s}=t,l=`${n}-bound`,u=H.useRef(null),[c,f]=H.useState("");function d(){a(!1),f(rD(r))}return H.useImperativeHandle(e,()=>({cancel:d})),H.useEffect(()=>{f(rD(r))},[r,f]),H.useEffect(()=>{var p,y;i||(p=u.current)==null||p.blur(),i&&n==="min"&&((y=u.current)==null||y.focus())},[i,n]),F.jsxs("form",{className:c1.boundEditor,"data-error":o||void 0,"data-editing":i,onSubmit:p=>{p.preventDefault();const y=Number.parseFloat(c.replace("−","-")),x=Number.isNaN(y)?r:P5e(y);f(rD(x)),s(x),a(!1)},children:[F.jsx("label",{id:`${l}-label`,className:c1.label,htmlFor:l,children:n}),F.jsx("input",{id:l,ref:u,className:c1.value,type:"text",name:"bound",value:c,title:i?void 0:r.toString(),"aria-labelledby":`${l}-label`,onChange:p=>f(p.target.value),onFocus:()=>{i||a(!0)}}),F.jsx("button",{className:c1.actionBtn,type:"submit",disabled:!i,"aria-label":`Apply ${n}`,children:F.jsx(y4e,{})}),F.jsx("button",{className:c1.actionBtn,type:"button",disabled:!i,"aria-label":`Cancel ${n}`,onClick:()=>d(),children:F.jsx(b4e,{})})]})});mX.displayName="BoundEditor";const IU=mX,QFe="_root_3jqdy_1",eLe="_dataRange_3jqdy_9",tLe="_autoscale_3jqdy_20",nLe="_actionBtn_3jqdy_30 btnClean",rLe="_error_3jqdy_51",iLe="_errorMessage_3jqdy_59",oLe="_swapBtn_3jqdy_73 _actionBtn_3jqdy_30 btnClean",Hg={root:QFe,dataRange:eLe,autoscale:tLe,actionBtn:nLe,error:rLe,errorMessage:iLe,swapBtn:oLe},aLe={[Sg.MinGreater]:{message:"Min greater than max",fallback:"data range"},[Sg.InvalidMinWithScale]:{message:"Custom min invalid with this scale",fallback:"data min"},[Sg.InvalidMaxWithScale]:{message:"Custom max invalid with this scale",fallback:"data max"},[Sg.CustomMaxFallback]:{message:"Custom min invalid with this scale",fallback:"custom max"}};function fD(t){const{error:e,showSwapBtn:n=!1,onSwap:r}=t,{message:i,fallback:o}=aLe[e];return F.jsxs("p",{className:Hg.error,children:[F.jsxs("span",{className:Hg.errorMessage,children:[i,F.jsx("br",{}),F.jsx(x4e,{})," falling back to ",F.jsx("strong",{children:o})]}),n&&r&&F.jsx("button",{className:Hg.swapBtn,type:"button","aria-label":"Swap min and max",onClick:()=>r(),children:F.jsx(H4e,{})})]})}const sLe=H.forwardRef((t,e)=>{const{sliderDomain:n,dataDomain:r,errors:i}=t,{isAutoMin:o,isAutoMax:a,isEditingMin:s,isEditingMax:l}=t,{onAutoMinToggle:u,onAutoMaxToggle:c,onEditMin:f,onEditMax:d,onChangeMin:p,onChangeMax:y,onSwap:x}=t,{minGreater:_,minError:v,maxError:S}=i,w=H.useRef(null),E=H.useRef(null);return H.useImperativeHandle(e,()=>({cancelEditing:()=>{var T,C;(T=w.current)==null||T.cancel(),(C=E.current)==null||C.cancel()}})),F.jsxs("div",{className:Hg.root,children:[_&&F.jsx(fD,{error:Sg.MinGreater,showSwapBtn:!o&&!a,onSwap:x}),F.jsx(IU,{ref:w,bound:"min",value:n[0],isEditing:s,hasError:_||!!v,onEditToggle:f,onChange:p}),v&&F.jsx(fD,{error:v}),F.jsx(IU,{ref:E,bound:"max",value:n[1],isEditing:l,hasError:_||!!S,onEditToggle:d,onChange:y}),S&&F.jsx(fD,{error:S}),F.jsxs("p",{className:Hg.dataRange,children:["Data range"," ",F.jsxs("span",{children:["["," ",F.jsx("abbr",{title:r[0].toString(),children:_U(r[0])})," ",","," ",F.jsx("abbr",{title:r[1].toString(),children:_U(r[1])})," ","]"]})]}),F.jsxs("p",{className:Hg.autoscale,children:["Autoscale"," ",F.jsx(OU,{label:"Min",raised:!0,value:o,onToggle:u}),F.jsx(OU,{label:"Max",raised:!0,value:a,onToggle:c})]})]})});sLe.displayName="DomainControls";const lLe="_thumb_doizn_1",uLe="_thumbBtnLike_doizn_11",cLe="_icon_doizn_47",$S={thumb:lLe,thumbBtnLike:uLe,icon:cLe},fLe=H.forwardRef((t,e)=>{const{bound:n,isAuto:r,hasError:i,disabled:o,AutoIcon:a,...s}=t;return F.jsx("div",{ref:e,...s,className:$S.thumb,"aria-label":`Change ${n} limit`,"aria-disabled":o||void 0,tabIndex:o?-1:s.tabIndex,"data-auto":r,"data-error":i||void 0,children:F.jsxs("div",{className:$S.thumbBtnLike,children:[r&&F.jsx(a,{className:$S.icon}),!r&&i&&F.jsx(v4e,{className:$S.icon,strokeWidth:"3"})]})})});fLe.displayName="Thumb";function dLe(t){return F.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",...t,children:F.jsx("path",{d:"M18 17v-2H6v2zm4-4v-2H2v2zm-8 8v-2h-4v2zm4-12V7H6v2zm-8-4h4V3h-4z",stroke:"none"})})}function hLe(t){return F.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",fill:"none",strokeWidth:"2",viewBox:"0 0 24 24",strokeLinecap:"round",strokeLinejoin:"round",height:"1em",width:"1em",...t,children:F.jsx("polyline",{points:"2 12 6 12 9 21 15 3 19 3"})})}Rn.Linear+"",Rn.Log+"",Rn.SymLog+"",Rn.Sqrt+"",Rn.Gamma+"";function pLe(t){const{points:e,children:n}=t,{dataToHtml:r}=vo(),i=DI(o=>e.map(a=>r(o,a)),[e,r]);return F.jsx(F.Fragment,{children:n(...i)})}function dD(t){const{coords:e,...n}=t,[r,i]=e;return F.jsx("line",{x1:r.x,y1:r.y,x2:i.x,y2:i.y,...n})}zIe(t=>({val:void 0,setTooltipValue:(e,n,r)=>t(()=>({val:{x:e,y:n,v:r}}))}));function mLe(t){const{api:e,layer:n,x:r,y:i,magFilter:o,onPointerMove:a,...s}=t,l=e.get(n,new Je(r,i)),[u,c]=l.shape,f=a&&Jo.throttle(d=>{a(d,l)},50,{trailing:!1});return F.jsx("group",{position:[r+c/2,i+u/2,0],children:F.jsx(LFe,{values:l,...s,magFilter:o,size:{width:c,height:u},onPointerMove:f})})}H.memo(mLe);new Al(new ae(-1,-1,-1),new ae(1,1,1));class ya{constructor(e,n){io(this,"min");io(this,"max");if(this.min=e,this.max=n,e>n){const r=n;this.max=e,this.min=r}}containsValue(e){return e>=this.min&&e<=this.max}containsRange(e){return e.min>=this.min&&e.max<=this.max}intersect(e){return e===null||e.min>this.max||this.min>e.max?null:new ya(Math.max(e.min,this.min),Math.min(e.max,this.max))}apply(e){return new ya(e(this.min),e(this.max))}applyInPlace(e){return this.min=e(this.min),this.max=e(this.max),this}toString(){return`(min:${this.min}, max:${this.max})`}equals(e){return this.min===e.min&&this.max===e.max}}var Wc=(t=>(t.milimeter="mm",t.pixel="pixel",t.reciprocal="nm^-1",t))(Wc||{});const gX=Ev(t=>({detector:!0,detectorColour:{r:144,g:19,b:254,a:.4},beamstop:!0,beamstopColor:{r:0,g:0,b:0,a:1},cameraTube:!0,cameraTubeColor:{r:80,g:227,b:194,a:.4},visibleRange:!0,visibleColor:{r:245,g:166,b:35,a:1},requestedRange:!0,requestedRangeColor:{r:65,g:117,b:5,a:1},clearance:!0,clearanceColor:{r:0,g:0,b:0,a:.2},inaccessibleRange:!0,inaccessibleRangeColor:{r:208,g:2,b:27,a:1},plotAxes:"mm",update:e=>{t({...e})}})),gLe=t=>{const e=t.upperBound.x>t.upperBound.y?t.upperBound.x:t.upperBound.y,n=t.lowerBound.x`rgba(${t.r}, ${t.g}, ${t.b}, ${t.a})`,hd=class hd{constructor(e,n){io(this,"plotAxes");io(this,"xunit");io(this,"yunit");io(this,"scaleFactor");io(this,"createPlotEllipseClearance",(e,n,r,i)=>{if(this.plotAxes!==Wc.reciprocal){const s=new ae(e.x.to(this.xunit).toNumber(),e.y.to(this.yunit).toNumber());return{centre:s,endPointX:new ae(s.x+jo(n,2).to(this.xunit).toNumber()+Gt(r,"xpixel").to(this.xunit).toNumber(),s.y),endPointY:new ae(s.x,s.y+jo(n,2).to(this.yunit).toNumber()+Gt(r,"ypixel").to(this.yunit).toNumber())}}if(!this.scaleFactor)throw TypeError("reciprocal units need a scaleFactor");const o=hd.convert2QSpace(e,this.scaleFactor,i),a=new ae(o.x.to(this.xunit).toNumber(),o.y.to(this.yunit).toNumber());return{centre:a,endPointX:new ae(a.x+Bi(jo(n,2),this.scaleFactor).to(this.xunit).toNumber()+Bi(Gt(r,"xpixel"),this.scaleFactor).to(this.xunit).toNumber(),a.y),endPointY:new ae(a.x,a.y+Bi(jo(n,2),this.scaleFactor).to(this.yunit).toNumber()+Bi(Gt(r,"ypixel"),this.scaleFactor).to(this.yunit).toNumber())}});io(this,"createPlotRange",(e,n,r)=>{if(this.plotAxes===Wc.reciprocal){if(!this.scaleFactor)throw TypeError("reciprocal units need a scaleFactor");e=hd.convert2QSpace(e,this.scaleFactor,r),n=hd.convert2QSpace(n,this.scaleFactor,r)}return{start:new ae(e.x.to(this.xunit).toNumber(),e.y.to(this.yunit).toNumber()),end:new ae(n.x.to(this.xunit).toNumber(),n.y.to(this.yunit).toNumber())}});this.xunit=e,this.yunit=e,this.plotAxes=e,this.scaleFactor=n,e===Wc.pixel&&(this.xunit="xpixel",this.yunit="ypixel")}createPlotEllipse(e,n,r){if(this.plotAxes!==Wc.reciprocal){const a=new ae(e.x.to(this.xunit).toNumber(),e.y.to(this.yunit).toNumber());return{centre:a,endPointX:new ae(a.x+jo(n,2).to(this.xunit).toNumber(),a.y),endPointY:new ae(a.x,a.y+jo(n,2).to(this.yunit).toNumber())}}if(!this.scaleFactor)throw TypeError("reciprocal units need a scaleFactor");const i=hd.convert2QSpace(e,this.scaleFactor,r),o=new ae(i.x.to(this.xunit).toNumber(),i.y.to(this.yunit).toNumber());return{centre:o,endPointX:new ae(o.x+Bi(jo(n,2),this.scaleFactor).to(this.xunit).toNumber(),o.y),endPointY:new ae(o.x,o.y+Bi(jo(n,2),this.scaleFactor).to(this.yunit).toNumber())}}createPlotRectangle(e,n){if(this.plotAxes!==Wc.reciprocal)return{lowerBound:new ae(0,0),upperBound:new ae(Gt(e.width,"xpixel").to(this.xunit).toNumber(),Gt(e.height,"ypixel").to(this.yunit).toNumber())};if(!this.scaleFactor)throw TypeError("reciprocal units need a scaleFactor");const r=hd.convert2QSpace({x:Gt(0,"xpixel"),y:Gt(0,"ypixel")},this.scaleFactor,n);return{lowerBound:new ae(r.x.to(this.xunit).toNumber(),r.y.to(this.yunit).toNumber()),upperBound:new ae(r.x.to(this.xunit).toNumber()+Bi(Gt(e.width,"xpixel"),this.scaleFactor).to(this.xunit).toNumber(),r.y.to(this.yunit).toNumber()+Bi(Gt(e.height,"ypixel"),this.scaleFactor).to(this.yunit).toNumber())}}};io(hd,"convert2QSpace",(e,n,r)=>({x:Bi(n,Nk(e.x,r.x)),y:Bi(n,Nk(e.y,r.y))}));let oN=hd;class vLe{constructor(e,n,r){io(this,"detProps");io(this,"kmod");io(this,"qScale");io(this,"mki");this.detProps=e,e.beamVector.normalize(),this.qScale=r,this.mki=e.beamVector.clone().negate(),this.kmod=this.qScale/n;const i=this.detProps.beamVector.clone();i.multiplyScalar(this.kmod),this.mki=i.negate()}convertToQ(e){const n=e.length();return n>0?(e.multiplyScalar(this.kmod/n),e.add(this.mki)):e.add(this.mki),e}qFromPixelPosition(e){const n=new ae;return n.set(-e.x,-e.y,0),n.add(this.detProps.origin),this.convertToQ(n)}setDiffractionCrystalEnviroment(e){this.kmod=this.qScale/e;const n=this.detProps.beamVector.clone();n.multiplyScalar(this.kmod),this.mki=n.negate()}}class Vg{constructor(e,n){io(this,"direction");io(this,"initial_point");if(e.length()==0)throw TypeError("The direction vector of a ray cannot be the zero vector.");this.direction=e,this.initial_point=n}getPoint(e){const n=new Je(this.direction.x,this.direction.y);return n.multiplyScalar(e),n.add(this.initial_point),n}getPointAtDistance(e){return this.getPoint(e/this.direction.length())}static getParameterRange(e,n){let r=Math.min(e,n);const i=Math.max(e,n);return r<0&&(r=0),new ya(r,i)}getCircleIntersectionParameterRange(e,n){const r=this.initial_point.clone().add(n.multiplyScalar(-1)),i=this.direction.dot(this.direction),o=2*r.dot(this.direction),a=r.dot(r)-Math.pow(e,2),s=Math.pow(o,2)-4*i*a;if(s<0)return null;let l,u;if(i==0){if(o==0)return a==0?new ya(0,Number.POSITIVE_INFINITY):null;l=-a/o,u=-a/o}else l=.5*(-o-Math.sqrt(s))/i,u=.5*(-o+Math.sqrt(s))/i;return Vg.getParameterRange(l,u)}getRectangleIntersectionParameterRange(e,n,r){let i;const o=e.x+n,a=e.x,s=e.y,l=e.y-r;if(this.direction.x===0){if(!new ya(a,o).containsValue(this.initial_point.x))return null;i=new ya(0,Number.POSITIVE_INFINITY)}else i=new ya((a-this.initial_point.x)/this.direction.x,(o-this.initial_point.x)/this.direction.x);return this.direction.y==0?new ya(l,s).containsValue(this.initial_point.y)?Vg.getParameterRange(i.min,i.max):null:(i=i.intersect(new ya((l-this.initial_point.y)/this.direction.y,(s-this.initial_point.y)/this.direction.y)),i==null?null:Vg.getParameterRange(i.min,i.max))}}function yLe(t,e,n,r){const i={ptMin:new Je(0,0),ptMax:new Je(0,0),visibleQRange:null,fullQRange:null},o=Gt(r.cameraLength??NaN,"m"),a=Iw(Gt(e.clearance??NaN,"xpixel"),jo(e.diameter,2)),s=Iw(Gt(e.clearance??NaN,"ypixel"),jo(e.diameter,2)),l=Gt(e.centre.x??NaN,"xpixel"),u=Gt(e.centre.y??NaN,"ypixel"),c=Gt(t.resolution.height,"ypixel"),f=Gt(t.resolution.width,"xpixel"),d=Gt(n.centre.x??NaN,"xpixel"),p=Gt(n.centre.y??NaN,"ypixel"),y=Iw(Bi(a,Rk(r.angle)),l),x=Iw(Bi(s,Pk(r.angle)),u);if(typeof y=="number"||!("units"in y)||typeof x=="number"||!("units"in x))return i;const _=new Je(y.toSI().toNumber(),x.toSI().toNumber()),v=new Vg(new Je(Rk(r.angle),Pk(r.angle)),_);let S=v.getRectangleIntersectionParameterRange(new Je(0,c.toSI().toNumber()),f.toSI().toNumber(),c.toSI().toNumber());if(S!=null&&n!=null&&n.diameter.toSI().toNumber()!=0&&(S=S.intersect(v.getCircleIntersectionParameterRange(jo(n.diameter,2).toSI().toNumber(),new Je(d.toSI().toNumber(),p.toSI().toNumber())))),S===null)return i;const w=v.getPoint(S.min),E=v.getPoint(S.max),T={...t,origin:new ae(l.toSI().toNumber(),u.toSI().toNumber(),o.toSI().toNumber()),beamVector:new ae(0,0,1)},C=new vLe(T,r.wavelength.toSI().toNumber(),2*Math.PI),D=C.qFromPixelPosition(w),O=C.qFromPixelPosition(E);T.origin.z=r.minCameraLength.toSI().toNumber(),C.setDiffractionCrystalEnviroment(r.minWavelength.toSI().toNumber());const P=C.qFromPixelPosition(E);T.origin.z=r.maxCameraLength.toSI().toNumber(),C.setDiffractionCrystalEnviroment(r.maxWavelength.toSI().toNumber());const N=C.qFromPixelPosition(w);return{ptMin:w,ptMax:E,visibleQRange:new ya(D.length(),O.length()),fullQRange:new ya(P.length(),N.length())}}var hl={},qb={},xLe=Array.isArray,fu=xLe;function bLe(t){return t!=null&&typeof t=="object"}var yf=bLe,_Le=um,wLe=fu,SLe=yf,ELe="[object String]";function MLe(t){return typeof t=="string"||!wLe(t)&&SLe(t)&&_Le(t)==ELe}var CLe=MLe;function ALe(t){return function(e,n,r){for(var i=-1,o=Object(e),a=r(e),s=a.length;s--;){var l=a[t?s:++i];if(n(o[l],l,o)===!1)break}return e}}var TLe=ALe,DLe=TLe,RLe=DLe(),PLe=RLe;function NLe(t,e){for(var n=-1,r=Array(t);++n-1&&t%1==0&&t-1&&t%1==0&&t<=XLe}var PI=YLe,KLe=um,ZLe=PI,JLe=yf,QLe="[object Arguments]",e8e="[object Array]",t8e="[object Boolean]",n8e="[object Date]",r8e="[object Error]",i8e="[object Function]",o8e="[object Map]",a8e="[object Number]",s8e="[object Object]",l8e="[object RegExp]",u8e="[object Set]",c8e="[object String]",f8e="[object WeakMap]",d8e="[object ArrayBuffer]",h8e="[object DataView]",p8e="[object Float32Array]",m8e="[object Float64Array]",g8e="[object Int8Array]",v8e="[object Int16Array]",y8e="[object Int32Array]",x8e="[object Uint8Array]",b8e="[object Uint8ClampedArray]",_8e="[object Uint16Array]",w8e="[object Uint32Array]",Dr={};Dr[p8e]=Dr[m8e]=Dr[g8e]=Dr[v8e]=Dr[y8e]=Dr[x8e]=Dr[b8e]=Dr[_8e]=Dr[w8e]=!0;Dr[QLe]=Dr[e8e]=Dr[d8e]=Dr[t8e]=Dr[h8e]=Dr[n8e]=Dr[r8e]=Dr[i8e]=Dr[o8e]=Dr[a8e]=Dr[s8e]=Dr[l8e]=Dr[u8e]=Dr[c8e]=Dr[f8e]=!1;function S8e(t){return JLe(t)&&ZLe(t.length)&&!!Dr[KLe(t)]}var E8e=S8e;function M8e(t){return function(e){return t(e)}}var NI=M8e,$2={exports:{}};$2.exports;(function(t,e){var n=Nq,r=e&&!e.nodeType&&e,i=r&&!0&&t&&!t.nodeType&&t,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();t.exports=s})($2,$2.exports);var OI=$2.exports,C8e=E8e,A8e=NI,LU=OI,kU=LU&&LU.isTypedArray,T8e=kU?A8e(kU):C8e,bX=T8e,D8e=OLe,R8e=yX,P8e=fu,N8e=RI,O8e=xX,I8e=bX,F8e=Object.prototype,L8e=F8e.hasOwnProperty;function k8e(t,e){var n=P8e(t),r=!n&&R8e(t),i=!n&&!r&&N8e(t),o=!n&&!r&&!i&&I8e(t),a=n||r||i||o,s=a?D8e(t.length,String):[],l=s.length;for(var u in t)(e||L8e.call(t,u))&&!(a&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||O8e(u,l)))&&s.push(u);return s}var _X=k8e,B8e=Object.prototype;function U8e(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||B8e;return t===n}var II=U8e;function z8e(t,e){return function(n){return t(e(n))}}var wX=z8e,$8e=wX,H8e=$8e(Object.keys,Object),V8e=H8e,W8e=II,G8e=V8e,j8e=Object.prototype,q8e=j8e.hasOwnProperty;function X8e(t){if(!W8e(t))return G8e(t);var e=[];for(var n in Object(t))q8e.call(t,n)&&n!="constructor"&&e.push(n);return e}var Y8e=X8e,K8e=Iq,Z8e=PI;function J8e(t){return t!=null&&Z8e(t.length)&&!K8e(t)}var dA=J8e,Q8e=_X,eke=Y8e,tke=dA;function nke(t){return tke(t)?Q8e(t):eke(t)}var Xb=nke,rke=PLe,ike=Xb;function oke(t,e){return t&&rke(t,e,ike)}var SX=oke;function ake(t){return t}var EX=ake,ske=EX;function lke(t){return typeof t=="function"?t:ske}var uke=lke,cke=SX,fke=uke;function dke(t,e){return t&&cke(t,fke(e))}var FI=dke,hke=wX,pke=hke(Object.getPrototypeOf,Object),LI=pke,mke=um,gke=LI,vke=yf,yke="[object Object]",xke=Function.prototype,bke=Object.prototype,MX=xke.toString,_ke=bke.hasOwnProperty,wke=MX.call(Object);function Ske(t){if(!vke(t)||mke(t)!=yke)return!1;var e=gke(t);if(e===null)return!0;var n=_ke.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&MX.call(n)==wke}var Eke=Ske;function Mke(t,e){for(var n=-1,r=t==null?0:t.length,i=Array(r);++ns))return!1;var u=o.get(t),c=o.get(e);if(u&&c)return u==e&&c==t;var f=-1,d=!0,p=n&c6e?new a6e:void 0;for(o.set(t,e),o.set(e,t);++f0&&arguments[0]!==void 0?arguments[0]:[],n=[];return(0,Jze.default)(e,function(r){Array.isArray(r)?t(r).map(function(i){return n.push(i)}):(0,Kze.default)(r)?(0,Xze.default)(r,function(i,o){i===!0&&n.push(o),n.push(o+"-"+i)}):(0,jze.default)(r)&&n.push(r)}),n};qb.default=Qze;var Yb={};function e$e(t,e){for(var n=-1,r=t==null?0:t.length;++n1&&arguments[1]!==void 0?arguments[1]:[],r=e.default&&(0,bHe.default)(e.default)||{};return n.map(function(i){var o=e[i];return o&&(0,yHe.default)(o,function(a,s){r[s]||(r[s]={}),r[s]=_He({},r[s],o[s])}),i}),r};Yb.default=wHe;var Kb={};Object.defineProperty(Kb,"__esModule",{value:!0});Kb.autoprefix=void 0;var SHe=FI,pz=MHe(SHe),EHe=Object.assign||function(t){for(var e=1;e1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){NHe(i,r);function i(){var o,a,s,l;PHe(this,i);for(var u=arguments.length,c=Array(u),f=0;f1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){BHe(i,r);function i(){var o,a,s,l;kHe(this,i);for(var u=arguments.length,c=Array(u),f=0;f1&&arguments[1]!==void 0?arguments[1]:!0;r[a]=s};return e===0&&i("first-child"),e===n-1&&i("last-child"),(e===0||e%2===0)&&i("even"),Math.abs(e%2)===1&&i("odd"),i("nth-child",e),r};VI.default=zHe;Object.defineProperty(hl,"__esModule",{value:!0});hl.ReactCSS=hl.loop=hl.handleActive=WI=hl.handleHover=hl.hover=void 0;var $He=qb,HHe=Bv($He),VHe=Yb,WHe=Bv(VHe),GHe=Kb,jHe=Bv(GHe),qHe=Zb,XX=Bv(qHe),XHe=Jb,YHe=Bv(XHe),KHe=VI,ZHe=Bv(KHe);function Bv(t){return t&&t.__esModule?t:{default:t}}hl.hover=XX.default;var WI=hl.handleHover=XX.default;hl.handleActive=YHe.default;hl.loop=ZHe.default;var JHe=hl.ReactCSS=function(e){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;is?d=1:d=Math.round(f*100/s)/100,n.a!==d)return{h:n.h,s:n.s,l:n.l,a:d,source:"rgb"}}else{var p=void 0;if(c<0?p=0:c>a?p=1:p=Math.round(c*100/a)/100,i!==p)return{h:n.h,s:n.s,l:n.l,a:p,source:"rgb"}}return null},vD={},eVe=function(e,n,r,i){if(typeof document>"u"&&!i)return null;var o=i?new i:document.createElement("canvas");o.width=r*2,o.height=r*2;var a=o.getContext("2d");return a?(a.fillStyle=e,a.fillRect(0,0,o.width,o.height),a.fillStyle=n,a.fillRect(0,0,r,r),a.translate(r,r),a.fillRect(0,0,r,r),o.toDataURL()):null},tVe=function(e,n,r,i){var o=e+"-"+n+"-"+r+(i?"-server":"");if(vD[o])return vD[o];var a=eVe(e,n,r,i);return vD[o]=a,a},vz=Object.assign||function(t){for(var e=1;e-1},iVe=function(e){return Number(String(e).replace(/%/g,""))},oVe=1,Vn=function(t){QHe(e,t);function e(n){ZHe(this,e);var r=JHe(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return r.handleBlur=function(){r.state.blurValue&&r.setState({value:r.state.blurValue,blurValue:null})},r.handleChange=function(i){r.setUpdatedValue(i.target.value,i)},r.handleKeyDown=function(i){var o=iVe(i.target.value);if(!isNaN(o)&&rVe(i.keyCode)){var a=r.getArrowOffset(),s=i.keyCode===HX?o+a:o-a;r.setUpdatedValue(s,i)}},r.handleDrag=function(i){if(r.props.dragLabel){var o=Math.round(r.props.value+i.movementX);o>=0&&o<=r.props.dragMax&&r.props.onChange&&r.props.onChange(r.getValueObjectWithLabel(o),i)}},r.handleMouseDown=function(i){r.props.dragLabel&&(i.preventDefault(),r.handleDrag(i),window.addEventListener("mousemove",r.handleDrag),window.addEventListener("mouseup",r.handleMouseUp))},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleDrag),window.removeEventListener("mouseup",r.handleMouseUp)},r.state={value:String(n.value).toUpperCase(),blurValue:String(n.value).toUpperCase()},r.inputId="rc-editable-input-"+oVe++,r}return YHe(e,[{key:"componentDidUpdate",value:function(r,i){this.props.value!==this.state.value&&(r.value!==this.props.value||i.value!==this.state.value)&&(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(r){return KHe({},this.props.label,r)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||eVe}},{key:"setUpdatedValue",value:function(r,i){var o=this.props.label?this.getValueObjectWithLabel(r):r;this.props.onChange&&this.props.onChange(o,i),this.setState({value:r})}},{key:"render",value:function(){var r=this,i=gn({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return se.createElement("div",{style:i.wrap},se.createElement("input",{id:this.inputId,style:i.input,ref:function(a){return r.input=a},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?se.createElement("label",{htmlFor:this.inputId,style:i.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),e}(H.PureComponent||H.Component),aVe=function(e,n,r,i){var o=i.clientWidth,a=i.clientHeight,s=typeof e.pageX=="number"?e.pageX:e.touches[0].pageX,l=typeof e.pageY=="number"?e.pageY:e.touches[0].pageY,u=s-(i.getBoundingClientRect().left+window.pageXOffset),c=l-(i.getBoundingClientRect().top+window.pageYOffset);if(n==="vertical"){var f=void 0;if(c<0)f=359;else if(c>a)f=0;else{var d=-(c*100/a)+100;f=360*d/100}if(r.h!==f)return{h:f,s:r.s,l:r.l,a:r.a,source:"hsl"}}else{var p=void 0;if(u<0)p=0;else if(u>o)p=359;else{var y=u*100/o;p=360*y/100}if(r.h!==p)return{h:p,s:r.s,l:r.l,a:r.a,source:"hsl"}}return null},sVe=function(){function t(e,n){for(var r=0;r-1},mVe=function(e){return Number(String(e).replace(/%/g,""))},gVe=1,Hn=function(t){cVe(e,t);function e(n){lVe(this,e);var r=uVe(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return r.handleBlur=function(){r.state.blurValue&&r.setState({value:r.state.blurValue,blurValue:null})},r.handleChange=function(i){r.setUpdatedValue(i.target.value,i)},r.handleKeyDown=function(i){var o=mVe(i.target.value);if(!isNaN(o)&&pVe(i.keyCode)){var a=r.getArrowOffset(),s=i.keyCode===YX?o+a:o-a;r.setUpdatedValue(s,i)}},r.handleDrag=function(i){if(r.props.dragLabel){var o=Math.round(r.props.value+i.movementX);o>=0&&o<=r.props.dragMax&&r.props.onChange&&r.props.onChange(r.getValueObjectWithLabel(o),i)}},r.handleMouseDown=function(i){r.props.dragLabel&&(i.preventDefault(),r.handleDrag(i),window.addEventListener("mousemove",r.handleDrag),window.addEventListener("mouseup",r.handleMouseUp))},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleDrag),window.removeEventListener("mouseup",r.handleMouseUp)},r.state={value:String(n.value).toUpperCase(),blurValue:String(n.value).toUpperCase()},r.inputId="rc-editable-input-"+gVe++,r}return aVe(e,[{key:"componentDidUpdate",value:function(r,i){this.props.value!==this.state.value&&(r.value!==this.props.value||i.value!==this.state.value)&&(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(r){return sVe({},this.props.label,r)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||fVe}},{key:"setUpdatedValue",value:function(r,i){var o=this.props.label?this.getValueObjectWithLabel(r):r;this.props.onChange&&this.props.onChange(o,i),this.setState({value:r})}},{key:"render",value:function(){var r=this,i=mn({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return se.createElement("div",{style:i.wrap},se.createElement("input",{id:this.inputId,style:i.input,ref:function(a){return r.input=a},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?se.createElement("label",{htmlFor:this.inputId,style:i.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),e}(H.PureComponent||H.Component),vVe=function(e,n,r,i){var o=i.clientWidth,a=i.clientHeight,s=typeof e.pageX=="number"?e.pageX:e.touches[0].pageX,l=typeof e.pageY=="number"?e.pageY:e.touches[0].pageY,u=s-(i.getBoundingClientRect().left+window.pageXOffset),c=l-(i.getBoundingClientRect().top+window.pageYOffset);if(n==="vertical"){var f=void 0;if(c<0)f=359;else if(c>a)f=0;else{var d=-(c*100/a)+100;f=360*d/100}if(r.h!==f)return{h:f,s:r.s,l:r.l,a:r.a,source:"hsl"}}else{var p=void 0;if(u<0)p=0;else if(u>o)p=359;else{var y=u*100/o;p=360*y/100}if(r.h!==p)return{h:p,s:r.s,l:r.l,a:r.a,source:"hsl"}}return null},yVe=function(){function t(e,n){for(var r=0;r-1}function gVe(t,e){var n=this.__data__,r=gA(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function xf(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e-1&&t%1==0&&t<=LWe}function Bv(t){return t!=null&&XI(t.length)&&!GI(t)}function kWe(t){return qd(t)&&Bv(t)}function BWe(){return!1}var KX=typeof Ns=="object"&&Ns&&!Ns.nodeType&&Ns,Ez=KX&&typeof Os=="object"&&Os&&!Os.nodeType&&Os,UWe=Ez&&Ez.exports===KX,Mz=UWe?hu.Buffer:void 0,zWe=Mz?Mz.isBuffer:void 0,$We=zWe||BWe;const q2=$We;var HWe="[object Object]",VWe=Function.prototype,WWe=Object.prototype,ZX=VWe.toString,GWe=WWe.hasOwnProperty,jWe=ZX.call(Object);function qWe(t){if(!qd(t)||cm(t)!=HWe)return!1;var e=XX(t);if(e===null)return!0;var n=GWe.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&ZX.call(n)==jWe}var XWe="[object Arguments]",YWe="[object Array]",KWe="[object Boolean]",ZWe="[object Date]",JWe="[object Error]",QWe="[object Function]",eGe="[object Map]",tGe="[object Number]",nGe="[object Object]",rGe="[object RegExp]",iGe="[object Set]",oGe="[object String]",aGe="[object WeakMap]",sGe="[object ArrayBuffer]",lGe="[object DataView]",uGe="[object Float32Array]",cGe="[object Float64Array]",fGe="[object Int8Array]",dGe="[object Int16Array]",hGe="[object Int32Array]",pGe="[object Uint8Array]",mGe="[object Uint8ClampedArray]",gGe="[object Uint16Array]",vGe="[object Uint32Array]",Rr={};Rr[uGe]=Rr[cGe]=Rr[fGe]=Rr[dGe]=Rr[hGe]=Rr[pGe]=Rr[mGe]=Rr[gGe]=Rr[vGe]=!0;Rr[XWe]=Rr[YWe]=Rr[sGe]=Rr[KWe]=Rr[lGe]=Rr[ZWe]=Rr[JWe]=Rr[QWe]=Rr[eGe]=Rr[tGe]=Rr[nGe]=Rr[rGe]=Rr[iGe]=Rr[oGe]=Rr[aGe]=!1;function yGe(t){return qd(t)&&XI(t.length)&&!!Rr[cm(t)]}function xGe(t){return function(e){return t(e)}}var JX=typeof Ns=="object"&&Ns&&!Ns.nodeType&&Ns,nx=JX&&typeof Os=="object"&&Os&&!Os.nodeType&&Os,bGe=nx&&nx.exports===JX,vD=bGe&&VX.process,_Ge=function(){try{var t=nx&&nx.require&&nx.require("util").types;return t||vD&&vD.binding&&vD.binding("util")}catch{}}();const Cz=_Ge;var Az=Cz&&Cz.isTypedArray,wGe=Az?xGe(Az):yGe;const YI=wGe;function cN(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var SGe=Object.prototype,EGe=SGe.hasOwnProperty;function MGe(t,e,n){var r=t[e];(!(EGe.call(t,e)&&Jb(r,n))||n===void 0&&!(e in t))&&jI(t,e,n)}function CGe(t,e,n,r){var i=!n;n||(n={});for(var o=-1,a=e.length;++o-1&&t%1==0&&t0){if(++e>=VGe)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var qGe=jGe(HGe);const XGe=qGe;function YGe(t,e){return XGe(UGe(t,e,yA),t+"")}function KGe(t,e,n){if(!Ml(n))return!1;var r=typeof e;return(r=="number"?Bv(n)&&KI(e,n.length):r=="string"&&e in n)?Jb(n[e],t):!1}function ZGe(t){return YGe(function(e,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o=t.length>3&&typeof o=="function"?(i--,o):void 0,a&&KGe(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),e=Object(e);++r=e||D<0||f&&O>=o}function v(){var C=yD();if(_(C))return S(C);s=setTimeout(v,x(C))}function S(C){return s=void 0,d&&r?p(C):(r=i=void 0,a)}function w(){s!==void 0&&clearTimeout(s),u=0,r=l=i=s=void 0}function E(){return s===void 0?a:S(yD())}function T(){var C=yD(),D=_(C);if(r=arguments,i=this,l=C,D){if(s===void 0)return y(l);if(f)return clearTimeout(s),s=setTimeout(v,e),p(l)}return s===void 0&&(s=setTimeout(v,e)),a}return T.cancel=w,T.flush=E,T}var dje="Expected a function";function hje(t,e,n){var r=!0,i=!0;if(typeof t!="function")throw new TypeError(dje);return Ml(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),nY(t,e,{leading:r,maxWait:e,trailing:i})}var pje=function(e,n,r){var i=r.getBoundingClientRect(),o=i.width,a=i.height,s=typeof e.pageX=="number"?e.pageX:e.touches[0].pageX,l=typeof e.pageY=="number"?e.pageY:e.touches[0].pageY,u=s-(r.getBoundingClientRect().left+window.pageXOffset),c=l-(r.getBoundingClientRect().top+window.pageYOffset);u<0?u=0:u>o&&(u=o),c<0?c=0:c>a&&(c=a);var f=u/o,d=1-c/a;return{h:n.h,s:f,v:d,a:n.a,source:"hsv"}},mje=function(){function t(e,n){for(var r=0;r-1}function AVe(t,e){var n=this.__data__,r=vA(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function xf(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e-1&&t%1==0&&t<=qWe}function $v(t){return t!=null&&YI(t.length)&&!jI(t)}function XWe(t){return Xd(t)&&$v(t)}function YWe(){return!1}var rY=typeof Ns=="object"&&Ns&&!Ns.nodeType&&Ns,Az=rY&&typeof Os=="object"&&Os&&!Os.nodeType&&Os,KWe=Az&&Az.exports===rY,Tz=KWe?du.Buffer:void 0,ZWe=Tz?Tz.isBuffer:void 0,JWe=ZWe||YWe;const q2=JWe;var QWe="[object Object]",eGe=Function.prototype,tGe=Object.prototype,iY=eGe.toString,nGe=tGe.hasOwnProperty,rGe=iY.call(Object);function iGe(t){if(!Xd(t)||fm(t)!=QWe)return!1;var e=tY(t);if(e===null)return!0;var n=nGe.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&iY.call(n)==rGe}var oGe="[object Arguments]",aGe="[object Array]",sGe="[object Boolean]",lGe="[object Date]",uGe="[object Error]",cGe="[object Function]",fGe="[object Map]",dGe="[object Number]",hGe="[object Object]",pGe="[object RegExp]",mGe="[object Set]",gGe="[object String]",vGe="[object WeakMap]",yGe="[object ArrayBuffer]",xGe="[object DataView]",bGe="[object Float32Array]",_Ge="[object Float64Array]",wGe="[object Int8Array]",SGe="[object Int16Array]",EGe="[object Int32Array]",MGe="[object Uint8Array]",CGe="[object Uint8ClampedArray]",AGe="[object Uint16Array]",TGe="[object Uint32Array]",Rr={};Rr[bGe]=Rr[_Ge]=Rr[wGe]=Rr[SGe]=Rr[EGe]=Rr[MGe]=Rr[CGe]=Rr[AGe]=Rr[TGe]=!0;Rr[oGe]=Rr[aGe]=Rr[yGe]=Rr[sGe]=Rr[xGe]=Rr[lGe]=Rr[uGe]=Rr[cGe]=Rr[fGe]=Rr[dGe]=Rr[hGe]=Rr[pGe]=Rr[mGe]=Rr[gGe]=Rr[vGe]=!1;function DGe(t){return Xd(t)&&YI(t.length)&&!!Rr[fm(t)]}function RGe(t){return function(e){return t(e)}}var oY=typeof Ns=="object"&&Ns&&!Ns.nodeType&&Ns,ix=oY&&typeof Os=="object"&&Os&&!Os.nodeType&&Os,PGe=ix&&ix.exports===oY,xD=PGe&&KX.process,NGe=function(){try{var t=ix&&ix.require&&ix.require("util").types;return t||xD&&xD.binding&&xD.binding("util")}catch{}}();const Dz=NGe;var Rz=Dz&&Dz.isTypedArray,OGe=Rz?RGe(Rz):DGe;const KI=OGe;function dN(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var IGe=Object.prototype,FGe=IGe.hasOwnProperty;function LGe(t,e,n){var r=t[e];(!(FGe.call(t,e)&&Qb(r,n))||n===void 0&&!(e in t))&&qI(t,e,n)}function kGe(t,e,n,r){var i=!n;n||(n={});for(var o=-1,a=e.length;++o-1&&t%1==0&&t0){if(++e>=eje)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var ije=rje(QGe);const oje=ije;function aje(t,e){return oje(KGe(t,e,xA),t+"")}function sje(t,e,n){if(!Ml(n))return!1;var r=typeof e;return(r=="number"?$v(n)&&ZI(e,n.length):r=="string"&&e in n)?Qb(n[e],t):!1}function lje(t){return aje(function(e,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o=t.length>3&&typeof o=="function"?(i--,o):void 0,a&&sje(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),e=Object(e);++r=e||D<0||f&&O>=o}function v(){var C=bD();if(_(C))return S(C);s=setTimeout(v,x(C))}function S(C){return s=void 0,d&&r?p(C):(r=i=void 0,a)}function w(){s!==void 0&&clearTimeout(s),u=0,r=l=i=s=void 0}function E(){return s===void 0?a:S(bD())}function T(){var C=bD(),D=_(C);if(r=arguments,i=this,l=C,D){if(s===void 0)return y(l);if(f)return clearTimeout(s),s=setTimeout(v,e),p(l)}return s===void 0&&(s=setTimeout(v,e)),a}return T.cancel=w,T.flush=E,T}var Sje="Expected a function";function Eje(t,e,n){var r=!0,i=!0;if(typeof t!="function")throw new TypeError(Sje);return Ml(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),uY(t,e,{leading:r,maxWait:e,trailing:i})}var Mje=function(e,n,r){var i=r.getBoundingClientRect(),o=i.width,a=i.height,s=typeof e.pageX=="number"?e.pageX:e.touches[0].pageX,l=typeof e.pageY=="number"?e.pageY:e.touches[0].pageY,u=s-(r.getBoundingClientRect().left+window.pageXOffset),c=l-(r.getBoundingClientRect().top+window.pageYOffset);u<0?u=0:u>o&&(u=o),c<0?c=0:c>a&&(c=a);var f=u/o,d=1-c/a;return{h:n.h,s:f,v:d,a:n.a,source:"hsv"}},Cje=function(){function t(e,n){for(var r=0;r=0,o=!n&&i&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return o?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(r=this.toRgbString()),e==="prgb"&&(r=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(r=this.toHexString()),e==="hex3"&&(r=this.toHexString(!0)),e==="hex4"&&(r=this.toHex8String(!0)),e==="hex8"&&(r=this.toHex8String()),e==="name"&&(r=this.toName()),e==="hsl"&&(r=this.toHslString()),e==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return $t(this.toString())},_applyModification:function(e,n){var r=e.apply(null,[this].concat([].slice.call(n)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(zje,arguments)},brighten:function(){return this._applyModification($je,arguments)},darken:function(){return this._applyModification(Hje,arguments)},desaturate:function(){return this._applyModification(kje,arguments)},saturate:function(){return this._applyModification(Bje,arguments)},greyscale:function(){return this._applyModification(Uje,arguments)},spin:function(){return this._applyModification(Vje,arguments)},_applyCombination:function(e,n){return e.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(jje,arguments)},complement:function(){return this._applyCombination(Wje,arguments)},monochromatic:function(){return this._applyCombination(qje,arguments)},splitcomplement:function(){return this._applyCombination(Gje,arguments)},triad:function(){return this._applyCombination(Fz,[3])},tetrad:function(){return this._applyCombination(Fz,[4])}};$t.fromRatio=function(t,e){if(X2(t)=="object"){var n={};for(var r in t)t.hasOwnProperty(r)&&(r==="a"?n[r]=t[r]:n[r]=S1(t[r]));t=n}return $t(t,e)};function Nje(t){var e={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof t=="string"&&(t=Jje(t)),X2(t)=="object"&&(Fc(t.r)&&Fc(t.g)&&Fc(t.b)?(e=Oje(t.r,t.g,t.b),a=!0,s=String(t.r).substr(-1)==="%"?"prgb":"rgb"):Fc(t.h)&&Fc(t.s)&&Fc(t.v)?(r=S1(t.s),i=S1(t.v),e=Fje(t.h,r,i),a=!0,s="hsv"):Fc(t.h)&&Fc(t.s)&&Fc(t.l)&&(r=S1(t.s),o=S1(t.l),e=Ije(t.h,r,o),a=!0,s="hsl"),t.hasOwnProperty("a")&&(n=t.a)),n=iY(n),{ok:a,format:t.format||s,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:n}}function Oje(t,e,n){return{r:kr(t,255)*255,g:kr(e,255)*255,b:kr(n,255)*255}}function Pz(t,e,n){t=kr(t,255),e=kr(e,255),n=kr(n,255);var r=Math.max(t,e,n),i=Math.min(t,e,n),o,a,s=(r+i)/2;if(r==i)o=a=0;else{var l=r-i;switch(a=s>.5?l/(2-r-i):l/(r+i),r){case t:o=(e-n)/l+(e1&&(f-=1),f<1/6?u+(c-u)*6*f:f<1/2?c:f<2/3?u+(c-u)*(2/3-f)*6:u}if(e===0)r=i=o=n;else{var s=n<.5?n*(1+e):n+e-n*e,l=2*n-s;r=a(l,s,t+1/3),i=a(l,s,t),o=a(l,s,t-1/3)}return{r:r*255,g:i*255,b:o*255}}function Nz(t,e,n){t=kr(t,255),e=kr(e,255),n=kr(n,255);var r=Math.max(t,e,n),i=Math.min(t,e,n),o,a,s=r,l=r-i;if(a=r===0?0:l/r,r==i)o=0;else{switch(r){case t:o=(e-n)/l+(e>1)+720)%360;--e;)r.h=(r.h+i)%360,o.push($t(r));return o}function qje(t,e){e=e||6;for(var n=$t(t).toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/e;e--;)a.push($t({h:r,s:i,v:o})),o=(o+s)%1;return a}$t.mix=function(t,e,n){n=n===0?0:n||50;var r=$t(t).toRgb(),i=$t(e).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return $t(a)};$t.readability=function(t,e){var n=$t(t),r=$t(e);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)};$t.isReadable=function(t,e,n){var r=$t.readability(t,e),i,o;switch(o=!1,i=Qje(n),i.level+i.size){case"AAsmall":case"AAAlarge":o=r>=4.5;break;case"AAlarge":o=r>=3;break;case"AAAsmall":o=r>=7;break}return o};$t.mostReadable=function(t,e,n){var r=null,i=0,o,a,s,l;n=n||{},a=n.includeFallbackColors,s=n.level,l=n.size;for(var u=0;ui&&(i=o,r=$t(e[u]));return $t.isReadable(t,r,{level:s,size:l})||!a?r:(n.includeFallbackColors=!1,$t.mostReadable(t,["#fff","#000"],n))};var fN=$t.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"},Xje=$t.hexNames=Yje(fN);function Yje(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}function iY(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function kr(t,e){Kje(t)&&(t="100%");var n=Zje(t);return t=Math.min(e,Math.max(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),Math.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function _A(t){return Math.min(1,Math.max(0,t))}function ws(t){return parseInt(t,16)}function Kje(t){return typeof t=="string"&&t.indexOf(".")!=-1&&parseFloat(t)===1}function Zje(t){return typeof t=="string"&&t.indexOf("%")!=-1}function tu(t){return t.length==1?"0"+t:""+t}function S1(t){return t<=1&&(t=t*100+"%"),t}function oY(t){return Math.round(parseFloat(t)*255).toString(16)}function Lz(t){return ws(t)/255}var Wl=function(){var t="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",n="(?:"+e+")|(?:"+t+")",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",i="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+i),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 Fc(t){return!!Wl.CSS_UNIT.exec(t)}function Jje(t){t=t.replace(Rje,"").replace(Pje,"").toLowerCase();var e=!1;if(fN[t])t=fN[t],e=!0;else if(t=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=Wl.rgb.exec(t))?{r:n[1],g:n[2],b:n[3]}:(n=Wl.rgba.exec(t))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Wl.hsl.exec(t))?{h:n[1],s:n[2],l:n[3]}:(n=Wl.hsla.exec(t))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Wl.hsv.exec(t))?{h:n[1],s:n[2],v:n[3]}:(n=Wl.hsva.exec(t))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Wl.hex8.exec(t))?{r:ws(n[1]),g:ws(n[2]),b:ws(n[3]),a:Lz(n[4]),format:e?"name":"hex8"}:(n=Wl.hex6.exec(t))?{r:ws(n[1]),g:ws(n[2]),b:ws(n[3]),format:e?"name":"hex"}:(n=Wl.hex4.exec(t))?{r:ws(n[1]+""+n[1]),g:ws(n[2]+""+n[2]),b:ws(n[3]+""+n[3]),a:Lz(n[4]+""+n[4]),format:e?"name":"hex8"}:(n=Wl.hex3.exec(t))?{r:ws(n[1]+""+n[1]),g:ws(n[2]+""+n[2]),b:ws(n[3]+""+n[3]),format:e?"name":"hex"}:!1}function Qje(t){var e,n;return t=t||{level:"AA",size:"small"},e=(t.level||"AA").toUpperCase(),n=(t.size||"small").toLowerCase(),e!=="AA"&&e!=="AAA"&&(e="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:e,size:n}}var kz=function(e){var n=["r","g","b","a","h","s","l","v"],r=0,i=0;return Dje(n,function(o){if(e[o]&&(r+=1,isNaN(e[o])||(i+=1),o==="s"||o==="l")){var a=/^\d+%$/;a.test(e[o])&&(i+=1)}}),r===i?e:!1},E1=function(e,n){var r=e.hex?$t(e.hex):$t(e),i=r.toHsl(),o=r.toHsv(),a=r.toRgb(),s=r.toHex();i.s===0&&(i.h=n||0,o.h=n||0);var l=s==="000000"&&a.a===0;return{hsl:i,hex:l?"transparent":"#"+s,rgb:a,hsv:o,oldHue:e.h||n||i.h,source:e.source}},lh=function(e){if(e==="transparent")return!0;var n=String(e).charAt(0)==="#"?1:0;return e.length!==4+n&&e.length<7+n&&$t(e).isValid()},JI=function(e){if(!e)return"#fff";var n=E1(e);if(n.hex==="transparent")return"rgba(0,0,0,0.4)";var r=(n.rgb.r*299+n.rgb.g*587+n.rgb.b*114)/1e3;return r>=128?"#000":"#fff"},xD=function(e,n){var r=e.replace("°","");return $t(n+" ("+r+")")._ok},u1=Object.assign||function(t){for(var e=1;e1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){sqe(i,r);function i(){var o,a,s,l;aqe(this,i);for(var u=arguments.length,c=Array(u),f=0;fs))return!1;var u=o.get(t),c=o.get(e);if(u&&c)return u==e&&c==t;var f=-1,d=!0,p=n&xqe?new Y2:void 0;for(o.set(t,e),o.set(e,t);++f=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}var WS=24,$Xe=mY.default=function(t){var e=t.fill,n=e===void 0?"currentColor":e,r=t.width,i=r===void 0?WS:r,o=t.height,a=o===void 0?WS:o,s=t.style,l=s===void 0?{}:s,u=zXe(t,["fill","width","height","style"]);return n$.default.createElement("svg",t$({viewBox:"0 0 "+WS+" "+WS,style:t$({fill:n,width:i,height:a},l)},u),n$.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))},HXe=function(){function t(e,n){for(var r=0;r1&&(i.a=1),r.props.onChange({h:r.props.hsl.h,s:r.props.hsl.s,l:r.props.hsl.l,a:Math.round(i.a*100)/100,source:"rgb"},o)):(i.h||i.s||i.l)&&(typeof i.s=="string"&&i.s.includes("%")&&(i.s=i.s.replace("%","")),typeof i.l=="string"&&i.l.includes("%")&&(i.l=i.l.replace("%","")),i.s==1?i.s=.01:i.l==1&&(i.l=.01),r.props.onChange({h:i.h||r.props.hsl.h,s:Number(e$(i.s)?r.props.hsl.s:i.s),l:Number(e$(i.l)?r.props.hsl.l:i.l),source:"hsl"},o))},r.showHighlight=function(i){i.currentTarget.style.background="#eee"},r.hideHighlight=function(i){i.currentTarget.style.background="transparent"},n.hsl.a!==1&&n.view==="hex"?r.state={view:"rgb"}:r.state={view:n.view},r}return HXe(e,[{key:"render",value:function(){var r=this,i=gn({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),o=void 0;return this.state.view==="hex"?o=se.createElement("div",{style:i.fields,className:"flexbox-fix"},se.createElement("div",{style:i.field},se.createElement(Vn,{style:{input:i.input,label:i.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):this.state.view==="rgb"?o=se.createElement("div",{style:i.fields,className:"flexbox-fix"},se.createElement("div",{style:i.field},se.createElement(Vn,{style:{input:i.input,label:i.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),se.createElement("div",{style:i.field},se.createElement(Vn,{style:{input:i.input,label:i.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),se.createElement("div",{style:i.field},se.createElement(Vn,{style:{input:i.input,label:i.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),se.createElement("div",{style:i.alpha},se.createElement(Vn,{style:{input:i.input,label:i.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):this.state.view==="hsl"&&(o=se.createElement("div",{style:i.fields,className:"flexbox-fix"},se.createElement("div",{style:i.field},se.createElement(Vn,{style:{input:i.input,label:i.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),se.createElement("div",{style:i.field},se.createElement(Vn,{style:{input:i.input,label:i.label},label:"s",value:Math.round(this.props.hsl.s*100)+"%",onChange:this.handleChange})),se.createElement("div",{style:i.field},se.createElement(Vn,{style:{input:i.input,label:i.label},label:"l",value:Math.round(this.props.hsl.l*100)+"%",onChange:this.handleChange})),se.createElement("div",{style:i.alpha},se.createElement(Vn,{style:{input:i.input,label:i.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),se.createElement("div",{style:i.wrap,className:"flexbox-fix"},o,se.createElement("div",{style:i.toggle},se.createElement("div",{style:i.icon,onClick:this.toggleViews,ref:function(s){return r.icon=s}},se.createElement($Xe,{style:i.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.hsl.a!==1&&i.view==="hex"?{view:"rgb"}:null}}]),e}(se.Component);gY.defaultProps={view:"hex"};var r$=function(){var e=gn({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return se.createElement("div",{style:e.picker})},jXe=function(){var e=gn({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return se.createElement("div",{style:e.picker})},i5=function(e){var n=e.width,r=e.onChange,i=e.disableAlpha,o=e.rgb,a=e.hsl,s=e.hsv,l=e.hex,u=e.renderers,c=e.styles,f=c===void 0?{}:c,d=e.className,p=d===void 0?"":d,y=e.defaultView,x=gn(es({default:{picker:{width:n,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+o.r+", "+o.g+", "+o.b+", "+o.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},f),{disableAlpha:i});return se.createElement("div",{style:x.picker,className:"chrome-picker "+p},se.createElement("div",{style:x.saturation},se.createElement(bA,{style:x.Saturation,hsl:a,hsv:s,pointer:jXe,onChange:r})),se.createElement("div",{style:x.body},se.createElement("div",{style:x.controls,className:"flexbox-fix"},se.createElement("div",{style:x.color},se.createElement("div",{style:x.swatch},se.createElement("div",{style:x.active}),se.createElement(Lv,{renderers:u}))),se.createElement("div",{style:x.toggles},se.createElement("div",{style:x.hue},se.createElement(kv,{style:x.Hue,hsl:a,pointer:r$,onChange:r})),se.createElement("div",{style:x.alpha},se.createElement(WI,{style:x.Alpha,rgb:o,hsl:a,pointer:r$,renderers:u,onChange:r})))),se.createElement(gY,{rgb:o,hsl:a,hex:l,view:y,onChange:r,disableAlpha:i})))};i5.propTypes={width:st.oneOfType([st.string,st.number]),disableAlpha:st.bool,styles:st.object,defaultView:st.oneOf(["hex","rgb","hsl"])};i5.defaultProps={width:225,disableAlpha:!1,styles:{}};ts(i5);var qXe=function(e){var n=e.color,r=e.onClick,i=r===void 0?function(){}:r,o=e.onSwatchHover,a=e.active,s=gn({default:{color:{background:n,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:JI(n),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:a,"color-#FFFFFF":n==="#FFFFFF",transparent:n==="transparent"});return se.createElement(hm,{style:s.color,color:n,onClick:i,onHover:o,focusStyle:{boxShadow:"0 0 4px "+n}},se.createElement("div",{style:s.dot}))},XXe=function(e){var n=e.hex,r=e.rgb,i=e.onChange,o=gn({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:n},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),a=function(l,u){l.r||l.g||l.b?i({r:l.r||r.r,g:l.g||r.g,b:l.b||r.b,source:"rgb"},u):i({hex:l.hex,source:"hex"},u)};return se.createElement("div",{style:o.fields,className:"flexbox-fix"},se.createElement("div",{style:o.active}),se.createElement(Vn,{style:{wrap:o.HEXwrap,input:o.HEXinput,label:o.HEXlabel},label:"hex",value:n,onChange:a}),se.createElement(Vn,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"r",value:r.r,onChange:a}),se.createElement(Vn,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"g",value:r.g,onChange:a}),se.createElement(Vn,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"b",value:r.b,onChange:a}))},o5=function(e){var n=e.onChange,r=e.onSwatchHover,i=e.colors,o=e.hex,a=e.rgb,s=e.styles,l=s===void 0?{}:s,u=e.className,c=u===void 0?"":u,f=gn(es({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},l)),d=function(y,x){y.hex?lh(y.hex)&&n({hex:y.hex,source:"hex"},x):n(y,x)};return se.createElement(Qb,{style:f.Compact,styles:l},se.createElement("div",{style:f.compact,className:"compact-picker "+c},se.createElement("div",null,pm(i,function(p){return se.createElement(qXe,{key:p,color:p,active:p.toLowerCase()===o,onClick:d,onSwatchHover:r})}),se.createElement("div",{style:f.clear})),se.createElement(XXe,{hex:o,rgb:a,onChange:d})))};o5.propTypes={colors:st.arrayOf(st.string),styles:st.object};o5.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}};ts(o5);var YXe=function(e){var n=e.hover,r=e.color,i=e.onClick,o=e.onSwatchHover,a={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},s=gn({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:a}},{hover:n});return se.createElement("div",{style:s.swatch},se.createElement(hm,{color:r,onClick:i,onHover:o,focusStyle:a}))};const KXe=VI(YXe);var a5=function(e){var n=e.width,r=e.colors,i=e.onChange,o=e.onSwatchHover,a=e.triangle,s=e.styles,l=s===void 0?{}:s,u=e.className,c=u===void 0?"":u,f=gn(es({default:{card:{width:n,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},l),{"hide-triangle":a==="hide","top-left-triangle":a==="top-left","top-right-triangle":a==="top-right","bottom-left-triangle":a==="bottom-left","bottom-right-triangle":a==="bottom-right"}),d=function(y,x){return i({hex:y,source:"hex"},x)};return se.createElement("div",{style:f.card,className:"github-picker "+c},se.createElement("div",{style:f.triangleShadow}),se.createElement("div",{style:f.triangle}),pm(r,function(p){return se.createElement(KXe,{color:p,key:p,onClick:d,onSwatchHover:o})}))};a5.propTypes={width:st.oneOfType([st.string,st.number]),colors:st.arrayOf(st.string),triangle:st.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:st.object};a5.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}};ts(a5);var ZXe=function(e){var n=e.direction,r=gn({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:n==="vertical"});return se.createElement("div",{style:r.picker})},JXe=Object.assign||function(t){for(var e=1;e.5});return se.createElement("div",{style:r.picker})},nYe=function(){var e=gn({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return se.createElement("div",{style:e.pointer},se.createElement("div",{style:e.left},se.createElement("div",{style:e.leftInside})),se.createElement("div",{style:e.right},se.createElement("div",{style:e.rightInside})))},i$=function(e){var n=e.onClick,r=e.label,i=e.children,o=e.active,a=gn({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:o});return se.createElement("div",{style:a.button,onClick:n},r||i)},rYe=function(e){var n=e.rgb,r=e.currentColor,i=gn({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+n.r+","+n.g+", "+n.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:r,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return se.createElement("div",null,se.createElement("div",{style:i.label},"new"),se.createElement("div",{style:i.swatches},se.createElement("div",{style:i.new}),se.createElement("div",{style:i.current})),se.createElement("div",{style:i.label},"current"))},iYe=function(){function t(e,n){for(var r=0;r100&&(c.a=100),c.a/=100,n({h:i.h,s:i.s,l:i.l,a:c.a,source:"rgb"},f))};return se.createElement("div",{style:s.fields,className:"flexbox-fix"},se.createElement("div",{style:s.double},se.createElement(Vn,{style:{input:s.input,label:s.label},label:"hex",value:o.replace("#",""),onChange:l})),se.createElement("div",{style:s.single},se.createElement(Vn,{style:{input:s.input,label:s.label},label:"r",value:r.r,onChange:l,dragLabel:"true",dragMax:"255"})),se.createElement("div",{style:s.single},se.createElement(Vn,{style:{input:s.input,label:s.label},label:"g",value:r.g,onChange:l,dragLabel:"true",dragMax:"255"})),se.createElement("div",{style:s.single},se.createElement(Vn,{style:{input:s.input,label:s.label},label:"b",value:r.b,onChange:l,dragLabel:"true",dragMax:"255"})),se.createElement("div",{style:s.alpha},se.createElement(Vn,{style:{input:s.input,label:s.label},label:"a",value:Math.round(r.a*100),onChange:l,dragLabel:"true",dragMax:"100"})))},uYe=Object.assign||function(t){for(var e=1;e=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}var GS=24,vYe=yY.default=function(t){var e=t.fill,n=e===void 0?"currentColor":e,r=t.width,i=r===void 0?GS:r,o=t.height,a=o===void 0?GS:o,s=t.style,l=s===void 0?{}:s,u=gYe(t,["fill","width","height","style"]);return a$.default.createElement("svg",o$({viewBox:"0 0 "+GS+" "+GS,style:o$({fill:n,width:i,height:a},l)},u),a$.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))},yYe=function(e){var n=e.color,r=e.onClick,i=r===void 0?function(){}:r,o=e.onSwatchHover,a=e.first,s=e.last,l=e.active,u=gn({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:n,marginBottom:"1px"},check:{color:JI(n),marginLeft:"8px",display:"none"}},first:{color:{overflow:"hidden",borderRadius:"2px 2px 0 0"}},last:{color:{overflow:"hidden",borderRadius:"0 0 2px 2px"}},active:{check:{display:"block"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},check:{color:"#333"}},transparent:{check:{color:"#333"}}},{first:a,last:s,active:l,"color-#FFFFFF":n==="#FFFFFF",transparent:n==="transparent"});return se.createElement(hm,{color:n,style:u.color,onClick:i,onHover:o,focusStyle:{boxShadow:"0 0 4px "+n}},se.createElement("div",{style:u.check},se.createElement(vYe,null)))},xYe=function(e){var n=e.onClick,r=e.onSwatchHover,i=e.group,o=e.active,a=gn({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return se.createElement("div",{style:a.group},pm(i,function(s,l){return se.createElement(yYe,{key:s,color:s,active:s.toLowerCase()===o,first:l===0,last:l===i.length-1,onClick:n,onSwatchHover:r})}))},f5=function(e){var n=e.width,r=e.height,i=e.onChange,o=e.onSwatchHover,a=e.colors,s=e.hex,l=e.styles,u=l===void 0?{}:l,c=e.className,f=c===void 0?"":c,d=gn(es({default:{picker:{width:n,height:r},overflow:{height:r,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}},u)),p=function(x,_){return i({hex:x,source:"hex"},_)};return se.createElement("div",{style:d.picker,className:"swatches-picker "+f},se.createElement(Qb,null,se.createElement("div",{style:d.overflow},se.createElement("div",{style:d.body},pm(a,function(y){return se.createElement(xYe,{key:y.toString(),group:y,active:s,onClick:p,onSwatchHover:o})}),se.createElement("div",{style:d.clear})))))};f5.propTypes={width:st.oneOfType([st.string,st.number]),height:st.oneOfType([st.string,st.number]),colors:st.arrayOf(st.arrayOf(st.string)),styles:st.object};f5.defaultProps={width:320,height:240,colors:[[B0[900],B0[700],B0[500],B0[300],B0[100]],[U0[900],U0[700],U0[500],U0[300],U0[100]],[z0[900],z0[700],z0[500],z0[300],z0[100]],[$0[900],$0[700],$0[500],$0[300],$0[100]],[H0[900],H0[700],H0[500],H0[300],H0[100]],[V0[900],V0[700],V0[500],V0[300],V0[100]],[W0[900],W0[700],W0[500],W0[300],W0[100]],[G0[900],G0[700],G0[500],G0[300],G0[100]],[j0[900],j0[700],j0[500],j0[300],j0[100]],["#194D33",M1[700],M1[500],M1[300],M1[100]],[q0[900],q0[700],q0[500],q0[300],q0[100]],[X0[900],X0[700],X0[500],X0[300],X0[100]],[Y0[900],Y0[700],Y0[500],Y0[300],Y0[100]],[K0[900],K0[700],K0[500],K0[300],K0[100]],[Z0[900],Z0[700],Z0[500],Z0[300],Z0[100]],[J0[900],J0[700],J0[500],J0[300],J0[100]],[Q0[900],Q0[700],Q0[500],Q0[300],Q0[100]],[eg[900],eg[700],eg[500],eg[300],eg[100]],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}};ts(f5);var d5=function(e){var n=e.onChange,r=e.onSwatchHover,i=e.hex,o=e.colors,a=e.width,s=e.triangle,l=e.styles,u=l===void 0?{}:l,c=e.className,f=c===void 0?"":c,d=gn(es({default:{card:{width:a,background:"#fff",border:"0 solid rgba(0,0,0,0.25)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",borderRadius:"4px",position:"relative"},body:{padding:"15px 9px 9px 15px"},label:{fontSize:"18px",color:"#fff"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent #fff transparent",position:"absolute"},triangleShadow:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent rgba(0,0,0,.1) transparent",position:"absolute"},hash:{background:"#F0F0F0",height:"30px",width:"30px",borderRadius:"4px 0 0 4px",float:"left",color:"#98A1A4",display:"flex",alignItems:"center",justifyContent:"center"},input:{width:"100px",fontSize:"14px",color:"#666",border:"0px",outline:"none",height:"28px",boxShadow:"inset 0 0 0 1px #F0F0F0",boxSizing:"content-box",borderRadius:"0 4px 4px 0",float:"left",paddingLeft:"8px"},swatch:{width:"30px",height:"30px",float:"left",borderRadius:"4px",margin:"0 6px 6px 0"},clear:{clear:"both"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-10px",left:"12px"},triangleShadow:{top:"-11px",left:"12px"}},"top-right-triangle":{triangle:{top:"-10px",right:"12px"},triangleShadow:{top:"-11px",right:"12px"}}},u),{"hide-triangle":s==="hide","top-left-triangle":s==="top-left","top-right-triangle":s==="top-right"}),p=function(x,_){lh(x)&&n({hex:x,source:"hex"},_)};return se.createElement("div",{style:d.card,className:"twitter-picker "+f},se.createElement("div",{style:d.triangleShadow}),se.createElement("div",{style:d.triangle}),se.createElement("div",{style:d.body},pm(o,function(y,x){return se.createElement(hm,{key:x,color:y,hex:y,style:d.swatch,onClick:p,onHover:r,focusStyle:{boxShadow:"0 0 4px "+y}})}),se.createElement("div",{style:d.hash},"#"),se.createElement(Vn,{label:null,style:{input:d.input},value:i.replace("#",""),onChange:p}),se.createElement("div",{style:d.clear})))};d5.propTypes={width:st.oneOfType([st.string,st.number]),triangle:st.oneOf(["hide","top-left","top-right"]),colors:st.arrayOf(st.string),styles:st.object};d5.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}};ts(d5);var h5=function(e){var n=gn({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",border:"2px #fff solid",transform:"translate(-12px, -13px)",background:"hsl("+Math.round(e.hsl.h)+", "+Math.round(e.hsl.s*100)+"%, "+Math.round(e.hsl.l*100)+"%)"}}});return se.createElement("div",{style:n.picker})};h5.propTypes={hsl:st.shape({h:st.number,s:st.number,l:st.number,a:st.number})};h5.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var p5=function(e){var n=gn({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",transform:"translate(-10px, -7px)",background:"hsl("+Math.round(e.hsl.h)+", 100%, 50%)",border:"2px white solid"}}});return se.createElement("div",{style:n.picker})};p5.propTypes={hsl:st.shape({h:st.number,s:st.number,l:st.number,a:st.number})};p5.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var bYe=function(e){var n=e.onChange,r=e.rgb,i=e.hsl,o=e.hex,a=e.hsv,s=function(p,y){if(p.hex)lh(p.hex)&&n({hex:p.hex,source:"hex"},y);else if(p.rgb){var x=p.rgb.split(",");xD(p.rgb,"rgb")&&n({r:x[0],g:x[1],b:x[2],a:1,source:"rgb"},y)}else if(p.hsv){var _=p.hsv.split(",");xD(p.hsv,"hsv")&&(_[2]=_[2].replace("%",""),_[1]=_[1].replace("%",""),_[0]=_[0].replace("°",""),_[1]==1?_[1]=.01:_[2]==1&&(_[2]=.01),n({h:Number(_[0]),s:Number(_[1]),v:Number(_[2]),source:"hsv"},y))}else if(p.hsl){var v=p.hsl.split(",");xD(p.hsl,"hsl")&&(v[2]=v[2].replace("%",""),v[1]=v[1].replace("%",""),v[0]=v[0].replace("°",""),f[1]==1?f[1]=.01:f[2]==1&&(f[2]=.01),n({h:Number(v[0]),s:Number(v[1]),v:Number(v[2]),source:"hsl"},y))}},l=gn({default:{wrap:{display:"flex",height:"100px",marginTop:"4px"},fields:{width:"100%"},column:{paddingTop:"10px",display:"flex",justifyContent:"space-between"},double:{padding:"0px 4.4px",boxSizing:"border-box"},input:{width:"100%",height:"38px",boxSizing:"border-box",padding:"4px 10% 3px",textAlign:"center",border:"1px solid #dadce0",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",fontFamily:"Roboto,Arial,sans-serif"},input2:{height:"38px",width:"100%",border:"1px solid #dadce0",boxSizing:"border-box",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",paddingLeft:"10px",fontFamily:"Roboto,Arial,sans-serif"},label:{textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"35px",top:"-6px",left:"0",right:"0",marginLeft:"auto",marginRight:"auto",fontFamily:"Roboto,Arial,sans-serif"},label2:{left:"10px",textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"32px",top:"-6px",fontFamily:"Roboto,Arial,sans-serif"},single:{flexGrow:"1",margin:"0px 4.4px"}}}),u=r.r+", "+r.g+", "+r.b,c=Math.round(i.h)+"°, "+Math.round(i.s*100)+"%, "+Math.round(i.l*100)+"%",f=Math.round(a.h)+"°, "+Math.round(a.s*100)+"%, "+Math.round(a.v*100)+"%";return se.createElement("div",{style:l.wrap,className:"flexbox-fix"},se.createElement("div",{style:l.fields},se.createElement("div",{style:l.double},se.createElement(Vn,{style:{input:l.input,label:l.label},label:"hex",value:o,onChange:s})),se.createElement("div",{style:l.column},se.createElement("div",{style:l.single},se.createElement(Vn,{style:{input:l.input2,label:l.label2},label:"rgb",value:u,onChange:s})),se.createElement("div",{style:l.single},se.createElement(Vn,{style:{input:l.input2,label:l.label2},label:"hsv",value:f,onChange:s})),se.createElement("div",{style:l.single},se.createElement(Vn,{style:{input:l.input2,label:l.label2},label:"hsl",value:c,onChange:s})))))},m5=function(e){var n=e.width,r=e.onChange,i=e.rgb,o=e.hsl,a=e.hsv,s=e.hex,l=e.header,u=e.styles,c=u===void 0?{}:u,f=e.className,d=f===void 0?"":f,p=gn(es({default:{picker:{width:n,background:"#fff",border:"1px solid #dfe1e5",boxSizing:"initial",display:"flex",flexWrap:"wrap",borderRadius:"8px 8px 0px 0px"},head:{height:"57px",width:"100%",paddingTop:"16px",paddingBottom:"16px",paddingLeft:"16px",fontSize:"20px",boxSizing:"border-box",fontFamily:"Roboto-Regular,HelveticaNeue,Arial,sans-serif"},saturation:{width:"70%",padding:"0px",position:"relative",overflow:"hidden"},swatch:{width:"30%",height:"228px",padding:"0px",background:"rgba("+i.r+", "+i.g+", "+i.b+", 1)",position:"relative",overflow:"hidden"},body:{margin:"auto",width:"95%"},controls:{display:"flex",boxSizing:"border-box",height:"52px",paddingTop:"22px"},color:{width:"32px"},hue:{height:"8px",position:"relative",margin:"0px 16px 0px 16px",width:"100%"},Hue:{radius:"2px"}}},c));return se.createElement("div",{style:p.picker,className:"google-picker "+d},se.createElement("div",{style:p.head},l),se.createElement("div",{style:p.swatch}),se.createElement("div",{style:p.saturation},se.createElement(bA,{hsl:o,hsv:a,pointer:h5,onChange:r})),se.createElement("div",{style:p.body},se.createElement("div",{style:p.controls,className:"flexbox-fix"},se.createElement("div",{style:p.hue},se.createElement(kv,{style:p.Hue,hsl:o,radius:"4px",pointer:p5,onChange:r}))),se.createElement(bYe,{rgb:i,hsl:o,hex:s,hsv:a,onChange:r})))};m5.propTypes={width:st.oneOfType([st.string,st.number]),styles:st.object,header:st.string};m5.defaultProps={width:652,styles:{},header:"Color picker"};ts(m5);var g5={},xY={exports:{}};(function(t){function e(n){return n&&n.__esModule?n:{default:n}}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(xY);var bY=xY.exports,_D={};const _Ye=nee(dae);var s$;function _Y(){return s$||(s$=1,function(t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return e.createSvgIcon}});var e=_Ye}(_D)),_D}var wYe=bY;Object.defineProperty(g5,"__esModule",{value:!0});var wY=g5.default=void 0,SYe=wYe(_Y()),EYe=F,MYe=(0,SYe.default)((0,EYe.jsx)("path",{d:"M3 3h18v18H3z"}),"Square");wY=g5.default=MYe;function Qh(t){const[e,n]=se.useState(null),r=a=>{n(a.currentTarget)},i=()=>{n(null)},o=!!e;return F.jsxs("div",{children:[F.jsx(QM,{style:{color:ad(t.color)},onClick:r,children:F.jsx(wY,{})}),F.jsx(HH,{open:o,anchorEl:e,onClose:i,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:F.jsx(fYe,{color:t.color,onChangeComplete:t.onChangeComplete})})]})}function CYe(){const t=uX();return F.jsx(oC,{sx:{height:1,width:1},children:F.jsx(aC,{children:F.jsxs(Ln,{spacing:1,children:[F.jsx(tn,{variant:"h6",children:" Legend"}),F.jsx(Dd,{}),F.jsxs(OH,{children:[F.jsx(Ss,{control:F.jsx(Vh,{checked:t.detector,onChange:(e,n)=>t.update({detector:n})}),label:F.jsxs(Ln,{direction:"row",children:[F.jsx(Qh,{color:t.detectorColour,onChangeComplete:e=>t.update({detectorColour:e.rgb})}),F.jsx(tn,{children:"Detector:"})]})}),F.jsx(Ss,{control:F.jsx(Vh,{checked:t.cameraTube,onChange:(e,n)=>t.update({cameraTube:n})}),label:F.jsxs(Ln,{direction:"row",children:[F.jsx(Qh,{color:t.cameraTubeColor,onChangeComplete:e=>t.update({cameraTubeColor:e.rgb})}),F.jsx(tn,{children:"Camera Tube:"})]})}),F.jsx(Ss,{control:F.jsx(Vh,{checked:t.beamstop,onChange:(e,n)=>{t.update({beamstop:n})}}),label:F.jsxs(Ln,{direction:"row",children:[F.jsx(Qh,{color:t.beamstopColor,onChangeComplete:e=>t.update({beamstopColor:e.rgb})}),F.jsx(tn,{children:"Beamstop"})]})}),F.jsx(Ss,{control:F.jsx(Vh,{checked:t.clearance,onChange:(e,n)=>{t.update({clearance:n})}}),label:F.jsxs(Ln,{direction:"row",children:[F.jsx(Qh,{color:t.clearanceColor,onChangeComplete:e=>t.update({clearanceColor:e.rgb})}),F.jsx(tn,{children:"Clearance"})]})}),F.jsx(Ss,{control:F.jsx(Vh,{checked:t.visibleRange,onChange:(e,n)=>t.update({visibleRange:n})}),label:F.jsxs(Ln,{direction:"row",children:[F.jsx(Qh,{color:t.visibleColor,onChangeComplete:e=>t.update({visibleColor:e.rgb})}),F.jsx(tn,{children:"Visible Range"})]})}),F.jsx(Ss,{control:F.jsx(Vh,{checked:t.requestedRange,onChange:(e,n)=>t.update({requestedRange:n})}),label:F.jsxs(Ln,{direction:"row",children:[F.jsx(Qh,{color:t.requestedRangeColor,onChangeComplete:e=>t.update({requestedRangeColor:e.rgb})}),F.jsx(tn,{children:"Requested Range"})]})}),F.jsx(Ss,{control:F.jsx(Vh,{checked:t.inaccessibleRange,onChange:(e,n)=>t.update({inaccessibleRange:n})}),label:F.jsxs(Ln,{direction:"row",children:[F.jsx(Qh,{color:t.inaccessibleRangeColor,onChangeComplete:e=>t.update({inaccessibleRangeColor:e.rgb})}),F.jsx(tn,{children:"Inaccessible Range"})]})})]}),F.jsxs(yl,{children:[F.jsx(WO,{id:"demo-radio-buttons-group-label",children:"Axes:"}),F.jsxs(YH,{"aria-labelledby":"demo-radio-buttons-group-label",value:t.plotAxes,name:"radio-buttons-group",onChange:e=>t.update({plotAxes:e.target.value}),children:[F.jsx(Ss,{value:Wc.milimeter,control:F.jsx(Ng,{}),label:"Axes in mm"}),F.jsx(Ss,{value:Wc.pixel,control:F.jsx(Ng,{}),label:"Axes in pixels"}),F.jsx(Ss,{value:Wc.reciprocal,control:F.jsx(Ng,{}),label:"Axes in q(nm^-1)"})]})]}),F.jsx(Ln,{direction:"row",spacing:1})]})})})}var Ba=(t=>(t.q="q",t.s="s",t.d="d",t))(Ba||{});const bp=_v(t=>({requested:"q",qUnits:g2.nanmometres,sUnits:dl.nanmometres,dUnits:dl.nanmometres,requestedMin:null,requestedMax:null,updateRequested:e=>{t({requested:e})},updateRequestedRange:e=>{t({...e})},updateQUnits:e=>t({qUnits:e}),updateSUnits:e=>t({sUnits:e}),updateDUnits:e=>t({dUnits:e})}));function AYe(t){return F.jsx("svg",{style:{display:"grid",height:"40%",width:"90%",border:"solid black"},children:F.jsx("text",{x:"40%",y:"50%",children:t.message})})}function TYe(t){const e=t.visibleRange.max.toNumber()-t.visibleRange.min.toNumber(),n=t.requestedRange.max.toNumber()/e*100,r=t.requestedRange.min.toNumber()/e*100,i=t.visibleRange.containsRange(t.requestedRange)?"green":"red",o=a=>a<50?"start":"end";return F.jsxs("svg",{style:{display:"grid",height:"40%",width:"90%",border:"solid black"},children:[F.jsx("rect",{y:"0",x:"0",width:"100%",height:"50%",fill:i}),F.jsx("line",{x1:`${r}%`,y1:0,x2:`${r}%`,y2:"50%",style:{stroke:"black",strokeWidth:2}}),F.jsx("line",{x1:`${n}%`,y1:0,x2:`${n}%`,y2:"60%",style:{stroke:"black",strokeWidth:2}}),F.jsxs("text",{y:"60%",x:`${r}%`,textAnchor:o(r),children:[" ","Requested min"]}),F.jsx("text",{y:"80%",x:`${n}%`,textAnchor:o(n),children:"Requested max"})]})}const K2=t=>{const e=jo(1,t);if(typeof e=="number"||!("units"in e))throw TypeError("name this error later ");return e},Z2=t=>{const e=jo(2*Math.PI,t);if(typeof e=="number"||!("units"in e))throw TypeError("name this error later ");return e};function DYe(t){const e=bp(),n=bp(f=>f.updateQUnits),r=bp(f=>f.updateSUnits),i=bp(f=>f.updateDUnits),o=f=>{n(f.target.value)},a=f=>{r(f.target.value)},s=f=>{i(f.target.value)},l=t.qRange.to(e.qUnits),u=t.qRange.apply(K2).to(e.sUnits),c=t.qRange.apply(Z2).to(e.dUnits);return F.jsx(af,{flexGrow:1,children:F.jsx(Tme,{component:mf,children:F.jsxs(sme,{sx:{minWidth:50},"aria-label":"simple table",size:"small",children:[F.jsx(Fme,{children:F.jsxs(Nw,{children:[F.jsx(Ho,{children:"Values"}),F.jsx(Ho,{align:"right",children:"Min"}),F.jsx(Ho,{align:"right",children:"Max"}),F.jsx(Ho,{align:"right",children:"Units"})]})}),F.jsxs(mme,{children:[F.jsxs(Nw,{children:[F.jsx(Ho,{component:"th",scope:"row",children:Ba.q}),F.jsx(Ho,{align:"right",children:isNaN(l.min.toNumber())?"":l.min.toNumber().toFixed(4)}),F.jsx(Ho,{align:"right",children:isNaN(l.max.toNumber())?"":l.max.toNumber().toFixed(4)}),F.jsx(Ho,{align:"right",children:F.jsxs(yl,{children:[F.jsx(Gu,{children:"q"}),F.jsxs(ju,{size:"small",label:"units",value:e.qUnits,onChange:o,children:[F.jsx(so,{value:g2.nanmometres,children:"1 / nm"}),F.jsx(so,{value:g2.angstroms,children:"1 / Å"})]})]})})]},"q"),F.jsxs(Nw,{children:[F.jsx(Ho,{component:"th",scope:"row",children:Ba.s}),F.jsx(Ho,{align:"right",children:isNaN(u.min.toNumber())?"":u.min.toNumber().toFixed(4)}),F.jsx(Ho,{align:"right",children:isNaN(u.max.toNumber())?"":u.max.toNumber().toFixed(4)}),F.jsx(Ho,{align:"right",children:F.jsxs(yl,{children:[F.jsx(Gu,{children:"s"}),F.jsxs(ju,{size:"small",label:"units",value:e.sUnits,onChange:a,children:[F.jsx(so,{value:dl.nanmometres,children:dl.nanmometres}),F.jsx(so,{value:dl.angstroms,children:"Å"})]})]})})]},"s"),F.jsxs(Nw,{children:[F.jsx(Ho,{component:"th",scope:"row",children:Ba.d}),F.jsx(Ho,{align:"right",children:isNaN(c.min.toNumber())?"":c.min.toNumber().toFixed(4)}),F.jsx(Ho,{align:"right",children:isNaN(c.max.toNumber())?"":c.max.toNumber().toFixed(4)}),F.jsx(Ho,{align:"right",children:F.jsxs(yl,{children:[F.jsx(Gu,{children:"d"}),F.jsxs(ju,{size:"small",label:"units",value:e.dUnits,onChange:s,children:[F.jsx(so,{value:dl.nanmometres,children:dl.nanmometres}),F.jsx(so,{value:dl.angstroms,children:"Å"})]})]})})]},"d")]})]})})})}class nu{constructor(e,n){ro(this,"min");ro(this,"max");if(this.min=e,this.max=n,!e.equalBase(n))throw new TypeError("min and max units must be same base length, mass, etc");if(cE(e,n)){const r=n;this.max=e,this.min=r}}to(e){return new nu(this.min.to(e),this.max.to(e))}containsValue(e){const n=KT(e,this.min)&&KT(e,this.max);if(typeof n!="boolean")throw TypeError("Can only check one value at a time");return n}containsRange(e){const n=yxe(this.min,e.min)&&KT(this.max,e.max);if(typeof n!="boolean")throw TypeError("Can only check one value at a time");return n}intersect(e){return cE(e.min,this.max)||cE(this.min,e.max)?null:new nu(vxe(e.min,this.min),hxe(e.max,this.max))}apply(e){return new nu(e(this.min),e(this.max))}applyInPlace(e){return this.min=e(this.min),this.max=e(this.max),this}static fromNumericRange(e,n){return new nu(qt((e==null?void 0:e.min)??NaN,n),qt((e==null?void 0:e.max)??NaN,n))}toString(){return`(min:${this.min.toString()}, max:${this.max.toString()})`}equals(e){const n=BR(this.min,e.min)&&BR(this.max,e.max);if(typeof n!="boolean")throw TypeError("write this later");return n}}function RYe(t){const e=bp(),n=bp(c=>c.requestedMax&&c.requestedMin?new ya(c.requestedMin,c.requestedMax):null);let r=null,i=null,o=null;const a=c=>{e.updateRequestedRange({requestedMax:mg(c.target.value)})},s=c=>{e.updateRequestedRange({requestedMin:mg(c.target.value)})};let l=null;if(t.visableQRange&&t.fullQrange&&n)switch(e.requested){case Ba.d:r=t.visableQRange.apply(Z2).to("nm"),i=t.fullQrange.apply(Z2).to("nm"),o=nu.fromNumericRange(n,e.dUnits).to("nm"),l=e.dUnits;break;case Ba.s:r=t.visableQRange.apply(K2).to("nm"),i=t.fullQrange.apply(K2).to("nm"),o=nu.fromNumericRange(n,e.sUnits).to("nm"),l=e.sUnits;break;default:r=t.visableQRange.to("nm^-1"),i=t.fullQrange.to("nm^-1"),o=nu.fromNumericRange(n,e.qUnits).to("nm^-1"),l=e.qUnits}const u=c=>{switch(c){case"angstrom":return"Å";case"angstrom^-1":return"Å^-1";case null:return"";default:return c}};return F.jsx(af,{sx:{flexGrow:1},children:F.jsx(oC,{sx:{height:1},children:F.jsx(aC,{children:F.jsxs(Ln,{spacing:1,children:[F.jsx(tn,{variant:"h6",children:" Results"}),F.jsx(Dd,{}),F.jsxs(Ln,{direction:"row",spacing:3,children:[F.jsx(DYe,{qRange:t.visableQRange}),F.jsx(Dd,{orientation:"vertical"}),F.jsxs(Ln,{flexGrow:2,children:[F.jsx(Ln,{spacing:1,children:F.jsxs(Ln,{direction:"row",spacing:3,children:[F.jsxs(Ln,{spacing:2,children:[F.jsxs(Ln,{direction:"row",spacing:2,children:[F.jsxs(tn,{children:["Requested min ",e.requested," value:"," "]}),F.jsx(Eo,{type:"number",size:"small",value:e.requestedMin,onChange:s}),F.jsx(tn,{children:u(l)})]}),F.jsxs(Ln,{direction:"row",spacing:2,children:[F.jsxs(tn,{children:["Requested max ",e.requested," value:"," "]}),F.jsx(Eo,{type:"number",size:"small",value:e.requestedMax,onChange:a}),F.jsx(tn,{children:u(l)})]})]}),F.jsxs(yl,{children:[F.jsx(WO,{children:"Requested Quantiy"}),F.jsxs(YH,{row:!0,value:e.requested,onChange:c=>e.updateRequested(c.target.value),children:[F.jsx(Ss,{value:Ba.q,control:F.jsx(Ng,{}),label:Ba.q}),F.jsx(Ss,{value:Ba.s,control:F.jsx(Ng,{}),label:Ba.s}),F.jsx(Ss,{value:Ba.d,control:F.jsx(Ng,{}),label:Ba.d})]})]})]})}),(()=>r&&i&&o&&i.containsRange(r)?F.jsx(TYe,{visibleRange:r,fullRange:i,requestedRange:o}):F.jsx(AYe,{message:"No solution"}))()]})]})]})})})})}const PYe=(t,e,n)=>{if(t<0||e<0||n<0)return null;const r=n*t/(4*Math.PI);return Math.abs(r)>=Math.sqrt(2)/2?null:Math.tan(2*Math.asin(r))*e},l$=(t,e,n,r,i)=>{const a=new $g(new Je(Math.cos(e.toSI().toNumber()),Math.sin(e.toSI().toNumber())),new Je(i.x.toSI().toNumber(),i.y.toSI().toNumber())).getPointAtDistance(PYe(t.toSI().toNumber(),n.toSI().toNumber(),r.toSI().toNumber())??0);return{x:qt(a.x,"m"),y:qt(a.y,"m")}};function wD(t){const{coords:e,...n}=t,[r,i,o]=e,a=i.distanceTo(r),s=o.distanceTo(r);return F.jsx("ellipse",{cx:r.x,cy:r.y,rx:a,ry:s,...n})}function NYe(){const t=uX(),e=v2(P=>({angle:P.angle,cameraLength:P.cameraLength,minWavelength:P.minWavelength,maxWavelength:P.maxWavelength,minCameraLength:P.minCameraLength,maxCameraLength:P.maxCameraLength,cameraLengthStep:P.cameraLengthStep,wavelength:P.wavelength})),n=V1(P=>({resolution:P.resolution,pixelSize:P.pixelSize})),r=a4(P=>({centre:P.centre,diameter:P.diameter,clearance:P.clearance})),i=s4(P=>({centre:P.centre,diameter:P.diameter}));let o=null;e.cameraLength&&e.wavelength&&(o=jo(2*Math.PI,Bi(qt(e.cameraLength,"m"),e.wavelength.to("m")))),pg.UNITS.xpixel&&delete pg.UNITS.xpixel,pg.UNITS.ypixel&&delete pg.UNITS.ypixel,Dk("xpixel",n.pixelSize.width.toString()),Dk("ypixel",n.pixelSize.height.toString());const{ptMin:a,ptMax:s,visibleQRange:l,fullQRange:u}=sLe(n,r,i,e),c=nu.fromNumericRange(l,"m^-1").to("nm^-1"),f=nu.fromNumericRange(u,"m^-1").to("nm^-1"),d={x:qt(a.x,"m"),y:qt(a.y,"m")},p={x:qt(s.x,"m"),y:qt(s.y,"m")},y={x:qt(r.centre.x??NaN,"xpixel"),y:qt(r.centre.y??NaN,"ypixel")},x={x:qt(i.centre.x??NaN,"xpixel"),y:qt(i.centre.y??NaN,"ypixel")},_=new rN(t.plotAxes,o),v=_.createPlotEllipse(y,r.diameter,y),S=_.createPlotEllipse(x,i.diameter,y),w=_.createPlotEllipseClearance(y,r.diameter,r.clearance??0,y),E=_.createPlotRectangle(n.resolution,y),T=_.createPlotRange(d,p,y),C=bp(P=>{if(!P.requestedMax||!P.requestedMin)return null;const N=k=>{let G;switch(P.requested){case Ba.d:G=Z2(qt(k,P.dUnits));break;case Ba.s:G=K2(qt(k,P.sUnits));break;default:G=qt(k,P.qUnits)}return G};return new nu(N(P.requestedMin),N(P.requestedMax))});let D={start:new ae(0,0),end:new ae(0,0)};if(C&&e.cameraLength&&e.wavelength){const P=l$(C.max,e.angle,qt(e.cameraLength,"m"),e.wavelength,y),N=l$(C.min,e.angle,qt(e.cameraLength,"m"),e.wavelength,y);D=_.createPlotRange(N,P,y)}console.log(E);const O=oLe(E);return F.jsx(af,{children:F.jsxs(Ln,{direction:"column",spacing:1,children:[F.jsxs(Ln,{direction:"row",spacing:1,children:[F.jsx(oC,{children:F.jsx(aC,{children:F.jsx("div",{style:{display:"grid",height:"60vh",width:"65vh",border:"solid black"},children:F.jsxs(fFe,{abscissaConfig:{visDomain:[O.xAxis.min,O.xAxis.max],showGrid:!0},ordinateConfig:{visDomain:[O.yAxis.max,O.yAxis.min],showGrid:!0},children:[F.jsx(z5e,{}),F.jsx(W5e,{}),F.jsx(rLe,{points:[v.centre,v.endPointX,v.endPointY,w.centre,w.endPointX,w.endPointY,S.centre,S.endPointX,S.endPointY,E.lowerBound,E.upperBound,T.start,T.end,D.start,D.end],children:(P,N,k,G,Z,j,K,Y,$,W,U,te,re,le,ce)=>F.jsxs(AI,{children:[t.cameraTube&&F.jsx(wD,{coords:[K,Y,$],fill:ad(t.cameraTubeColor),id:"camera tube"}),t.detector&&F.jsx(B2,{coords:[W,U],fill:ad(t.detectorColour),id:"detector"}),t.inaccessibleRange&&F.jsx(cD,{coords:[P,te],stroke:ad(t.inaccessibleRangeColor),strokeWidth:3,id:"inaccessible"}),t.clearance&&F.jsx(wD,{coords:[G,Z,j],fill:ad(t.clearanceColor),id:"clearance"}),t.visibleRange&&F.jsx(cD,{coords:[te,re],stroke:ad(t.visibleColor),strokeWidth:3,id:"visible"}),t.requestedRange&&F.jsx(cD,{coords:[le,ce],stroke:ad(t.requestedRangeColor),strokeWidth:3,id:"requested"}),t.beamstop&&F.jsx(wD,{coords:[P,N,k],fill:ad(t.beamstopColor),id:"beamstop"})]})})]})})})}),F.jsx(af,{flexGrow:1,children:F.jsx(CYe,{})})]}),F.jsx(RYe,{visableQRange:c,fullQrange:f})]})})}var v5={},OYe=bY;Object.defineProperty(v5,"__esModule",{value:!0});var SY=v5.default=void 0,IYe=OYe(_Y()),FYe=F,LYe=(0,IYe.default)((0,FYe.jsx)("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}),"Menu");SY=v5.default=LYe;function kYe(){return F.jsxs(af,{children:[F.jsx(BH,{children:F.jsx(Dhe,{children:F.jsx(Ln,{direction:"row",children:F.jsx(tn,{flexGrow:3,children:"Nothing to see here (0_0)"})})})}),F.jsx(Dd,{})]})}function BYe(){const[t,e]=H.useState({menuOpen:!1}),n=r=>()=>{e({menuOpen:r})};return F.jsx(af,{sx:{flexGrow:2},children:F.jsx(cse,{position:"static",children:F.jsxs($me,{children:[F.jsxs(H.Fragment,{children:[F.jsx(QM,{size:"large",edge:"start",color:"inherit","aria-label":"menu",sx:{mr:2},onClick:n(!0),children:F.jsx(SY,{})}),F.jsx(Zfe,{anchor:"left",open:t.menuOpen,onClose:n(!1),children:F.jsx(af,{sx:{width:250},role:"presentation",onClick:n(!1),children:F.jsx(kYe,{})})})]}),F.jsx(tn,{variant:"h6",component:"div",sx:{flexGrow:1},children:"Dedi Web"})]})})})}function UYe(){return F.jsxs(af,{children:[F.jsx(BYe,{}),F.jsxs(Ln,{direction:"row",spacing:1,margin:1,children:[F.jsx(af,{children:F.jsx(Kxe,{})}),F.jsx(Ln,{direction:"column",spacing:1,flexGrow:1,children:F.jsx(NYe,{})})]})]})}ED.createRoot(document.getElementById("root")).render(F.jsx(se.StrictMode,{children:F.jsx(UYe,{})}))});export default zYe(); + `),se.createElement("div",{style:c.white,className:"saturation-white"},se.createElement("div",{style:c.black,className:"saturation-black"}),se.createElement("div",{style:c.pointer},this.props.pointer?se.createElement(this.props.pointer,this.props):se.createElement("div",{style:c.circle}))))}}]),e}(H.PureComponent||H.Component);function Rje(t,e){for(var n=-1,r=t==null?0:t.length;++n=0,o=!n&&i&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return o?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(r=this.toRgbString()),e==="prgb"&&(r=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(r=this.toHexString()),e==="hex3"&&(r=this.toHexString(!0)),e==="hex4"&&(r=this.toHex8String(!0)),e==="hex8"&&(r=this.toHex8String()),e==="name"&&(r=this.toName()),e==="hsl"&&(r=this.toHslString()),e==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return $t(this.toString())},_applyModification:function(e,n){var r=e.apply(null,[this].concat([].slice.call(n)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(Zje,arguments)},brighten:function(){return this._applyModification(Jje,arguments)},darken:function(){return this._applyModification(Qje,arguments)},desaturate:function(){return this._applyModification(Xje,arguments)},saturate:function(){return this._applyModification(Yje,arguments)},greyscale:function(){return this._applyModification(Kje,arguments)},spin:function(){return this._applyModification(eqe,arguments)},_applyCombination:function(e,n){return e.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(rqe,arguments)},complement:function(){return this._applyCombination(tqe,arguments)},monochromatic:function(){return this._applyCombination(iqe,arguments)},splitcomplement:function(){return this._applyCombination(nqe,arguments)},triad:function(){return this._applyCombination(Bz,[3])},tetrad:function(){return this._applyCombination(Bz,[4])}};$t.fromRatio=function(t,e){if(X2(t)=="object"){var n={};for(var r in t)t.hasOwnProperty(r)&&(r==="a"?n[r]=t[r]:n[r]=C1(t[r]));t=n}return $t(t,e)};function Vje(t){var e={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof t=="string"&&(t=uqe(t)),X2(t)=="object"&&(Fc(t.r)&&Fc(t.g)&&Fc(t.b)?(e=Wje(t.r,t.g,t.b),a=!0,s=String(t.r).substr(-1)==="%"?"prgb":"rgb"):Fc(t.h)&&Fc(t.s)&&Fc(t.v)?(r=C1(t.s),i=C1(t.v),e=jje(t.h,r,i),a=!0,s="hsv"):Fc(t.h)&&Fc(t.s)&&Fc(t.l)&&(r=C1(t.s),o=C1(t.l),e=Gje(t.h,r,o),a=!0,s="hsl"),t.hasOwnProperty("a")&&(n=t.a)),n=fY(n),{ok:a,format:t.format||s,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:n}}function Wje(t,e,n){return{r:kr(t,255)*255,g:kr(e,255)*255,b:kr(n,255)*255}}function Iz(t,e,n){t=kr(t,255),e=kr(e,255),n=kr(n,255);var r=Math.max(t,e,n),i=Math.min(t,e,n),o,a,s=(r+i)/2;if(r==i)o=a=0;else{var l=r-i;switch(a=s>.5?l/(2-r-i):l/(r+i),r){case t:o=(e-n)/l+(e1&&(f-=1),f<1/6?u+(c-u)*6*f:f<1/2?c:f<2/3?u+(c-u)*(2/3-f)*6:u}if(e===0)r=i=o=n;else{var s=n<.5?n*(1+e):n+e-n*e,l=2*n-s;r=a(l,s,t+1/3),i=a(l,s,t),o=a(l,s,t-1/3)}return{r:r*255,g:i*255,b:o*255}}function Fz(t,e,n){t=kr(t,255),e=kr(e,255),n=kr(n,255);var r=Math.max(t,e,n),i=Math.min(t,e,n),o,a,s=r,l=r-i;if(a=r===0?0:l/r,r==i)o=0;else{switch(r){case t:o=(e-n)/l+(e>1)+720)%360;--e;)r.h=(r.h+i)%360,o.push($t(r));return o}function iqe(t,e){e=e||6;for(var n=$t(t).toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/e;e--;)a.push($t({h:r,s:i,v:o})),o=(o+s)%1;return a}$t.mix=function(t,e,n){n=n===0?0:n||50;var r=$t(t).toRgb(),i=$t(e).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return $t(a)};$t.readability=function(t,e){var n=$t(t),r=$t(e);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)};$t.isReadable=function(t,e,n){var r=$t.readability(t,e),i,o;switch(o=!1,i=cqe(n),i.level+i.size){case"AAsmall":case"AAAlarge":o=r>=4.5;break;case"AAlarge":o=r>=3;break;case"AAAsmall":o=r>=7;break}return o};$t.mostReadable=function(t,e,n){var r=null,i=0,o,a,s,l;n=n||{},a=n.includeFallbackColors,s=n.level,l=n.size;for(var u=0;ui&&(i=o,r=$t(e[u]));return $t.isReadable(t,r,{level:s,size:l})||!a?r:(n.includeFallbackColors=!1,$t.mostReadable(t,["#fff","#000"],n))};var hN=$t.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"},oqe=$t.hexNames=aqe(hN);function aqe(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}function fY(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function kr(t,e){sqe(t)&&(t="100%");var n=lqe(t);return t=Math.min(e,Math.max(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),Math.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function wA(t){return Math.min(1,Math.max(0,t))}function ws(t){return parseInt(t,16)}function sqe(t){return typeof t=="string"&&t.indexOf(".")!=-1&&parseFloat(t)===1}function lqe(t){return typeof t=="string"&&t.indexOf("%")!=-1}function eu(t){return t.length==1?"0"+t:""+t}function C1(t){return t<=1&&(t=t*100+"%"),t}function dY(t){return Math.round(parseFloat(t)*255).toString(16)}function Uz(t){return ws(t)/255}var Vl=function(){var t="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",n="(?:"+e+")|(?:"+t+")",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",i="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+i),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 Fc(t){return!!Vl.CSS_UNIT.exec(t)}function uqe(t){t=t.replace($je,"").replace(Hje,"").toLowerCase();var e=!1;if(hN[t])t=hN[t],e=!0;else if(t=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=Vl.rgb.exec(t))?{r:n[1],g:n[2],b:n[3]}:(n=Vl.rgba.exec(t))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Vl.hsl.exec(t))?{h:n[1],s:n[2],l:n[3]}:(n=Vl.hsla.exec(t))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Vl.hsv.exec(t))?{h:n[1],s:n[2],v:n[3]}:(n=Vl.hsva.exec(t))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Vl.hex8.exec(t))?{r:ws(n[1]),g:ws(n[2]),b:ws(n[3]),a:Uz(n[4]),format:e?"name":"hex8"}:(n=Vl.hex6.exec(t))?{r:ws(n[1]),g:ws(n[2]),b:ws(n[3]),format:e?"name":"hex"}:(n=Vl.hex4.exec(t))?{r:ws(n[1]+""+n[1]),g:ws(n[2]+""+n[2]),b:ws(n[3]+""+n[3]),a:Uz(n[4]+""+n[4]),format:e?"name":"hex8"}:(n=Vl.hex3.exec(t))?{r:ws(n[1]+""+n[1]),g:ws(n[2]+""+n[2]),b:ws(n[3]+""+n[3]),format:e?"name":"hex"}:!1}function cqe(t){var e,n;return t=t||{level:"AA",size:"small"},e=(t.level||"AA").toUpperCase(),n=(t.size||"small").toLowerCase(),e!=="AA"&&e!=="AAA"&&(e="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:e,size:n}}var zz=function(e){var n=["r","g","b","a","h","s","l","v"],r=0,i=0;return zje(n,function(o){if(e[o]&&(r+=1,isNaN(e[o])||(i+=1),o==="s"||o==="l")){var a=/^\d+%$/;a.test(e[o])&&(i+=1)}}),r===i?e:!1},A1=function(e,n){var r=e.hex?$t(e.hex):$t(e),i=r.toHsl(),o=r.toHsv(),a=r.toRgb(),s=r.toHex();i.s===0&&(i.h=n||0,o.h=n||0);var l=s==="000000"&&a.a===0;return{hsl:i,hex:l?"transparent":"#"+s,rgb:a,hsv:o,oldHue:e.h||n||i.h,source:e.source}},uh=function(e){if(e==="transparent")return!0;var n=String(e).charAt(0)==="#"?1:0;return e.length!==4+n&&e.length<7+n&&$t(e).isValid()},QI=function(e){if(!e)return"#fff";var n=A1(e);if(n.hex==="transparent")return"rgba(0,0,0,0.4)";var r=(n.rgb.r*299+n.rgb.g*587+n.rgb.b*114)/1e3;return r>=128?"#000":"#fff"},_D=function(e,n){var r=e.replace("°","");return $t(n+" ("+r+")")._ok},d1=Object.assign||function(t){for(var e=1;e1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){yqe(i,r);function i(){var o,a,s,l;vqe(this,i);for(var u=arguments.length,c=Array(u),f=0;fs))return!1;var u=o.get(t),c=o.get(e);if(u&&c)return u==e&&c==t;var f=-1,d=!0,p=n&Rqe?new Y2:void 0;for(o.set(t,e),o.set(e,t);++f=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}var WS=24,JXe=wY.default=function(t){var e=t.fill,n=e===void 0?"currentColor":e,r=t.width,i=r===void 0?WS:r,o=t.height,a=o===void 0?WS:o,s=t.style,l=s===void 0?{}:s,u=ZXe(t,["fill","width","height","style"]);return o$.default.createElement("svg",i$({viewBox:"0 0 "+WS+" "+WS,style:i$({fill:n,width:i,height:a},l)},u),o$.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))},QXe=function(){function t(e,n){for(var r=0;r1&&(i.a=1),r.props.onChange({h:r.props.hsl.h,s:r.props.hsl.s,l:r.props.hsl.l,a:Math.round(i.a*100)/100,source:"rgb"},o)):(i.h||i.s||i.l)&&(typeof i.s=="string"&&i.s.includes("%")&&(i.s=i.s.replace("%","")),typeof i.l=="string"&&i.l.includes("%")&&(i.l=i.l.replace("%","")),i.s==1?i.s=.01:i.l==1&&(i.l=.01),r.props.onChange({h:i.h||r.props.hsl.h,s:Number(r$(i.s)?r.props.hsl.s:i.s),l:Number(r$(i.l)?r.props.hsl.l:i.l),source:"hsl"},o))},r.showHighlight=function(i){i.currentTarget.style.background="#eee"},r.hideHighlight=function(i){i.currentTarget.style.background="transparent"},n.hsl.a!==1&&n.view==="hex"?r.state={view:"rgb"}:r.state={view:n.view},r}return QXe(e,[{key:"render",value:function(){var r=this,i=mn({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),o=void 0;return this.state.view==="hex"?o=se.createElement("div",{style:i.fields,className:"flexbox-fix"},se.createElement("div",{style:i.field},se.createElement(Hn,{style:{input:i.input,label:i.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):this.state.view==="rgb"?o=se.createElement("div",{style:i.fields,className:"flexbox-fix"},se.createElement("div",{style:i.field},se.createElement(Hn,{style:{input:i.input,label:i.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),se.createElement("div",{style:i.field},se.createElement(Hn,{style:{input:i.input,label:i.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),se.createElement("div",{style:i.field},se.createElement(Hn,{style:{input:i.input,label:i.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),se.createElement("div",{style:i.alpha},se.createElement(Hn,{style:{input:i.input,label:i.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):this.state.view==="hsl"&&(o=se.createElement("div",{style:i.fields,className:"flexbox-fix"},se.createElement("div",{style:i.field},se.createElement(Hn,{style:{input:i.input,label:i.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),se.createElement("div",{style:i.field},se.createElement(Hn,{style:{input:i.input,label:i.label},label:"s",value:Math.round(this.props.hsl.s*100)+"%",onChange:this.handleChange})),se.createElement("div",{style:i.field},se.createElement(Hn,{style:{input:i.input,label:i.label},label:"l",value:Math.round(this.props.hsl.l*100)+"%",onChange:this.handleChange})),se.createElement("div",{style:i.alpha},se.createElement(Hn,{style:{input:i.input,label:i.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),se.createElement("div",{style:i.wrap,className:"flexbox-fix"},o,se.createElement("div",{style:i.toggle},se.createElement("div",{style:i.icon,onClick:this.toggleViews,ref:function(s){return r.icon=s}},se.createElement(JXe,{style:i.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.hsl.a!==1&&i.view==="hex"?{view:"rgb"}:null}}]),e}(se.Component);SY.defaultProps={view:"hex"};var a$=function(){var e=mn({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return se.createElement("div",{style:e.picker})},rYe=function(){var e=mn({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return se.createElement("div",{style:e.picker})},o5=function(e){var n=e.width,r=e.onChange,i=e.disableAlpha,o=e.rgb,a=e.hsl,s=e.hsv,l=e.hex,u=e.renderers,c=e.styles,f=c===void 0?{}:c,d=e.className,p=d===void 0?"":d,y=e.defaultView,x=mn(es({default:{picker:{width:n,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+o.r+", "+o.g+", "+o.b+", "+o.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},f),{disableAlpha:i});return se.createElement("div",{style:x.picker,className:"chrome-picker "+p},se.createElement("div",{style:x.saturation},se.createElement(_A,{style:x.Saturation,hsl:a,hsv:s,pointer:rYe,onChange:r})),se.createElement("div",{style:x.body},se.createElement("div",{style:x.controls,className:"flexbox-fix"},se.createElement("div",{style:x.color},se.createElement("div",{style:x.swatch},se.createElement("div",{style:x.active}),se.createElement(Uv,{renderers:u}))),se.createElement("div",{style:x.toggles},se.createElement("div",{style:x.hue},se.createElement(zv,{style:x.Hue,hsl:a,pointer:a$,onChange:r})),se.createElement("div",{style:x.alpha},se.createElement(GI,{style:x.Alpha,rgb:o,hsl:a,pointer:a$,renderers:u,onChange:r})))),se.createElement(SY,{rgb:o,hsl:a,hex:l,view:y,onChange:r,disableAlpha:i})))};o5.propTypes={width:st.oneOfType([st.string,st.number]),disableAlpha:st.bool,styles:st.object,defaultView:st.oneOf(["hex","rgb","hsl"])};o5.defaultProps={width:225,disableAlpha:!1,styles:{}};ts(o5);var iYe=function(e){var n=e.color,r=e.onClick,i=r===void 0?function(){}:r,o=e.onSwatchHover,a=e.active,s=mn({default:{color:{background:n,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:QI(n),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:a,"color-#FFFFFF":n==="#FFFFFF",transparent:n==="transparent"});return se.createElement(pm,{style:s.color,color:n,onClick:i,onHover:o,focusStyle:{boxShadow:"0 0 4px "+n}},se.createElement("div",{style:s.dot}))},oYe=function(e){var n=e.hex,r=e.rgb,i=e.onChange,o=mn({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:n},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),a=function(l,u){l.r||l.g||l.b?i({r:l.r||r.r,g:l.g||r.g,b:l.b||r.b,source:"rgb"},u):i({hex:l.hex,source:"hex"},u)};return se.createElement("div",{style:o.fields,className:"flexbox-fix"},se.createElement("div",{style:o.active}),se.createElement(Hn,{style:{wrap:o.HEXwrap,input:o.HEXinput,label:o.HEXlabel},label:"hex",value:n,onChange:a}),se.createElement(Hn,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"r",value:r.r,onChange:a}),se.createElement(Hn,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"g",value:r.g,onChange:a}),se.createElement(Hn,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"b",value:r.b,onChange:a}))},a5=function(e){var n=e.onChange,r=e.onSwatchHover,i=e.colors,o=e.hex,a=e.rgb,s=e.styles,l=s===void 0?{}:s,u=e.className,c=u===void 0?"":u,f=mn(es({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},l)),d=function(y,x){y.hex?uh(y.hex)&&n({hex:y.hex,source:"hex"},x):n(y,x)};return se.createElement(e_,{style:f.Compact,styles:l},se.createElement("div",{style:f.compact,className:"compact-picker "+c},se.createElement("div",null,mm(i,function(p){return se.createElement(iYe,{key:p,color:p,active:p.toLowerCase()===o,onClick:d,onSwatchHover:r})}),se.createElement("div",{style:f.clear})),se.createElement(oYe,{hex:o,rgb:a,onChange:d})))};a5.propTypes={colors:st.arrayOf(st.string),styles:st.object};a5.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}};ts(a5);var aYe=function(e){var n=e.hover,r=e.color,i=e.onClick,o=e.onSwatchHover,a={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},s=mn({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:a}},{hover:n});return se.createElement("div",{style:s.swatch},se.createElement(pm,{color:r,onClick:i,onHover:o,focusStyle:a}))};const sYe=WI(aYe);var s5=function(e){var n=e.width,r=e.colors,i=e.onChange,o=e.onSwatchHover,a=e.triangle,s=e.styles,l=s===void 0?{}:s,u=e.className,c=u===void 0?"":u,f=mn(es({default:{card:{width:n,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},l),{"hide-triangle":a==="hide","top-left-triangle":a==="top-left","top-right-triangle":a==="top-right","bottom-left-triangle":a==="bottom-left","bottom-right-triangle":a==="bottom-right"}),d=function(y,x){return i({hex:y,source:"hex"},x)};return se.createElement("div",{style:f.card,className:"github-picker "+c},se.createElement("div",{style:f.triangleShadow}),se.createElement("div",{style:f.triangle}),mm(r,function(p){return se.createElement(sYe,{color:p,key:p,onClick:d,onSwatchHover:o})}))};s5.propTypes={width:st.oneOfType([st.string,st.number]),colors:st.arrayOf(st.string),triangle:st.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:st.object};s5.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}};ts(s5);var lYe=function(e){var n=e.direction,r=mn({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:n==="vertical"});return se.createElement("div",{style:r.picker})},uYe=Object.assign||function(t){for(var e=1;e.5});return se.createElement("div",{style:r.picker})},hYe=function(){var e=mn({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return se.createElement("div",{style:e.pointer},se.createElement("div",{style:e.left},se.createElement("div",{style:e.leftInside})),se.createElement("div",{style:e.right},se.createElement("div",{style:e.rightInside})))},s$=function(e){var n=e.onClick,r=e.label,i=e.children,o=e.active,a=mn({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:o});return se.createElement("div",{style:a.button,onClick:n},r||i)},pYe=function(e){var n=e.rgb,r=e.currentColor,i=mn({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+n.r+","+n.g+", "+n.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:r,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return se.createElement("div",null,se.createElement("div",{style:i.label},"new"),se.createElement("div",{style:i.swatches},se.createElement("div",{style:i.new}),se.createElement("div",{style:i.current})),se.createElement("div",{style:i.label},"current"))},mYe=function(){function t(e,n){for(var r=0;r100&&(c.a=100),c.a/=100,n({h:i.h,s:i.s,l:i.l,a:c.a,source:"rgb"},f))};return se.createElement("div",{style:s.fields,className:"flexbox-fix"},se.createElement("div",{style:s.double},se.createElement(Hn,{style:{input:s.input,label:s.label},label:"hex",value:o.replace("#",""),onChange:l})),se.createElement("div",{style:s.single},se.createElement(Hn,{style:{input:s.input,label:s.label},label:"r",value:r.r,onChange:l,dragLabel:"true",dragMax:"255"})),se.createElement("div",{style:s.single},se.createElement(Hn,{style:{input:s.input,label:s.label},label:"g",value:r.g,onChange:l,dragLabel:"true",dragMax:"255"})),se.createElement("div",{style:s.single},se.createElement(Hn,{style:{input:s.input,label:s.label},label:"b",value:r.b,onChange:l,dragLabel:"true",dragMax:"255"})),se.createElement("div",{style:s.alpha},se.createElement(Hn,{style:{input:s.input,label:s.label},label:"a",value:Math.round(r.a*100),onChange:l,dragLabel:"true",dragMax:"100"})))},bYe=Object.assign||function(t){for(var e=1;e=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}var GS=24,TYe=MY.default=function(t){var e=t.fill,n=e===void 0?"currentColor":e,r=t.width,i=r===void 0?GS:r,o=t.height,a=o===void 0?GS:o,s=t.style,l=s===void 0?{}:s,u=AYe(t,["fill","width","height","style"]);return u$.default.createElement("svg",l$({viewBox:"0 0 "+GS+" "+GS,style:l$({fill:n,width:i,height:a},l)},u),u$.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))},DYe=function(e){var n=e.color,r=e.onClick,i=r===void 0?function(){}:r,o=e.onSwatchHover,a=e.first,s=e.last,l=e.active,u=mn({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:n,marginBottom:"1px"},check:{color:QI(n),marginLeft:"8px",display:"none"}},first:{color:{overflow:"hidden",borderRadius:"2px 2px 0 0"}},last:{color:{overflow:"hidden",borderRadius:"0 0 2px 2px"}},active:{check:{display:"block"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},check:{color:"#333"}},transparent:{check:{color:"#333"}}},{first:a,last:s,active:l,"color-#FFFFFF":n==="#FFFFFF",transparent:n==="transparent"});return se.createElement(pm,{color:n,style:u.color,onClick:i,onHover:o,focusStyle:{boxShadow:"0 0 4px "+n}},se.createElement("div",{style:u.check},se.createElement(TYe,null)))},RYe=function(e){var n=e.onClick,r=e.onSwatchHover,i=e.group,o=e.active,a=mn({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return se.createElement("div",{style:a.group},mm(i,function(s,l){return se.createElement(DYe,{key:s,color:s,active:s.toLowerCase()===o,first:l===0,last:l===i.length-1,onClick:n,onSwatchHover:r})}))},d5=function(e){var n=e.width,r=e.height,i=e.onChange,o=e.onSwatchHover,a=e.colors,s=e.hex,l=e.styles,u=l===void 0?{}:l,c=e.className,f=c===void 0?"":c,d=mn(es({default:{picker:{width:n,height:r},overflow:{height:r,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}},u)),p=function(x,_){return i({hex:x,source:"hex"},_)};return se.createElement("div",{style:d.picker,className:"swatches-picker "+f},se.createElement(e_,null,se.createElement("div",{style:d.overflow},se.createElement("div",{style:d.body},mm(a,function(y){return se.createElement(RYe,{key:y.toString(),group:y,active:s,onClick:p,onSwatchHover:o})}),se.createElement("div",{style:d.clear})))))};d5.propTypes={width:st.oneOfType([st.string,st.number]),height:st.oneOfType([st.string,st.number]),colors:st.arrayOf(st.arrayOf(st.string)),styles:st.object};d5.defaultProps={width:320,height:240,colors:[[U0[900],U0[700],U0[500],U0[300],U0[100]],[z0[900],z0[700],z0[500],z0[300],z0[100]],[$0[900],$0[700],$0[500],$0[300],$0[100]],[H0[900],H0[700],H0[500],H0[300],H0[100]],[V0[900],V0[700],V0[500],V0[300],V0[100]],[W0[900],W0[700],W0[500],W0[300],W0[100]],[G0[900],G0[700],G0[500],G0[300],G0[100]],[j0[900],j0[700],j0[500],j0[300],j0[100]],[q0[900],q0[700],q0[500],q0[300],q0[100]],["#194D33",T1[700],T1[500],T1[300],T1[100]],[X0[900],X0[700],X0[500],X0[300],X0[100]],[Y0[900],Y0[700],Y0[500],Y0[300],Y0[100]],[K0[900],K0[700],K0[500],K0[300],K0[100]],[Z0[900],Z0[700],Z0[500],Z0[300],Z0[100]],[J0[900],J0[700],J0[500],J0[300],J0[100]],[Q0[900],Q0[700],Q0[500],Q0[300],Q0[100]],[eg[900],eg[700],eg[500],eg[300],eg[100]],[tg[900],tg[700],tg[500],tg[300],tg[100]],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}};ts(d5);var h5=function(e){var n=e.onChange,r=e.onSwatchHover,i=e.hex,o=e.colors,a=e.width,s=e.triangle,l=e.styles,u=l===void 0?{}:l,c=e.className,f=c===void 0?"":c,d=mn(es({default:{card:{width:a,background:"#fff",border:"0 solid rgba(0,0,0,0.25)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",borderRadius:"4px",position:"relative"},body:{padding:"15px 9px 9px 15px"},label:{fontSize:"18px",color:"#fff"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent #fff transparent",position:"absolute"},triangleShadow:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent rgba(0,0,0,.1) transparent",position:"absolute"},hash:{background:"#F0F0F0",height:"30px",width:"30px",borderRadius:"4px 0 0 4px",float:"left",color:"#98A1A4",display:"flex",alignItems:"center",justifyContent:"center"},input:{width:"100px",fontSize:"14px",color:"#666",border:"0px",outline:"none",height:"28px",boxShadow:"inset 0 0 0 1px #F0F0F0",boxSizing:"content-box",borderRadius:"0 4px 4px 0",float:"left",paddingLeft:"8px"},swatch:{width:"30px",height:"30px",float:"left",borderRadius:"4px",margin:"0 6px 6px 0"},clear:{clear:"both"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-10px",left:"12px"},triangleShadow:{top:"-11px",left:"12px"}},"top-right-triangle":{triangle:{top:"-10px",right:"12px"},triangleShadow:{top:"-11px",right:"12px"}}},u),{"hide-triangle":s==="hide","top-left-triangle":s==="top-left","top-right-triangle":s==="top-right"}),p=function(x,_){uh(x)&&n({hex:x,source:"hex"},_)};return se.createElement("div",{style:d.card,className:"twitter-picker "+f},se.createElement("div",{style:d.triangleShadow}),se.createElement("div",{style:d.triangle}),se.createElement("div",{style:d.body},mm(o,function(y,x){return se.createElement(pm,{key:x,color:y,hex:y,style:d.swatch,onClick:p,onHover:r,focusStyle:{boxShadow:"0 0 4px "+y}})}),se.createElement("div",{style:d.hash},"#"),se.createElement(Hn,{label:null,style:{input:d.input},value:i.replace("#",""),onChange:p}),se.createElement("div",{style:d.clear})))};h5.propTypes={width:st.oneOfType([st.string,st.number]),triangle:st.oneOf(["hide","top-left","top-right"]),colors:st.arrayOf(st.string),styles:st.object};h5.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}};ts(h5);var p5=function(e){var n=mn({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",border:"2px #fff solid",transform:"translate(-12px, -13px)",background:"hsl("+Math.round(e.hsl.h)+", "+Math.round(e.hsl.s*100)+"%, "+Math.round(e.hsl.l*100)+"%)"}}});return se.createElement("div",{style:n.picker})};p5.propTypes={hsl:st.shape({h:st.number,s:st.number,l:st.number,a:st.number})};p5.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var m5=function(e){var n=mn({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",transform:"translate(-10px, -7px)",background:"hsl("+Math.round(e.hsl.h)+", 100%, 50%)",border:"2px white solid"}}});return se.createElement("div",{style:n.picker})};m5.propTypes={hsl:st.shape({h:st.number,s:st.number,l:st.number,a:st.number})};m5.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var PYe=function(e){var n=e.onChange,r=e.rgb,i=e.hsl,o=e.hex,a=e.hsv,s=function(p,y){if(p.hex)uh(p.hex)&&n({hex:p.hex,source:"hex"},y);else if(p.rgb){var x=p.rgb.split(",");_D(p.rgb,"rgb")&&n({r:x[0],g:x[1],b:x[2],a:1,source:"rgb"},y)}else if(p.hsv){var _=p.hsv.split(",");_D(p.hsv,"hsv")&&(_[2]=_[2].replace("%",""),_[1]=_[1].replace("%",""),_[0]=_[0].replace("°",""),_[1]==1?_[1]=.01:_[2]==1&&(_[2]=.01),n({h:Number(_[0]),s:Number(_[1]),v:Number(_[2]),source:"hsv"},y))}else if(p.hsl){var v=p.hsl.split(",");_D(p.hsl,"hsl")&&(v[2]=v[2].replace("%",""),v[1]=v[1].replace("%",""),v[0]=v[0].replace("°",""),f[1]==1?f[1]=.01:f[2]==1&&(f[2]=.01),n({h:Number(v[0]),s:Number(v[1]),v:Number(v[2]),source:"hsl"},y))}},l=mn({default:{wrap:{display:"flex",height:"100px",marginTop:"4px"},fields:{width:"100%"},column:{paddingTop:"10px",display:"flex",justifyContent:"space-between"},double:{padding:"0px 4.4px",boxSizing:"border-box"},input:{width:"100%",height:"38px",boxSizing:"border-box",padding:"4px 10% 3px",textAlign:"center",border:"1px solid #dadce0",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",fontFamily:"Roboto,Arial,sans-serif"},input2:{height:"38px",width:"100%",border:"1px solid #dadce0",boxSizing:"border-box",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",paddingLeft:"10px",fontFamily:"Roboto,Arial,sans-serif"},label:{textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"35px",top:"-6px",left:"0",right:"0",marginLeft:"auto",marginRight:"auto",fontFamily:"Roboto,Arial,sans-serif"},label2:{left:"10px",textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"32px",top:"-6px",fontFamily:"Roboto,Arial,sans-serif"},single:{flexGrow:"1",margin:"0px 4.4px"}}}),u=r.r+", "+r.g+", "+r.b,c=Math.round(i.h)+"°, "+Math.round(i.s*100)+"%, "+Math.round(i.l*100)+"%",f=Math.round(a.h)+"°, "+Math.round(a.s*100)+"%, "+Math.round(a.v*100)+"%";return se.createElement("div",{style:l.wrap,className:"flexbox-fix"},se.createElement("div",{style:l.fields},se.createElement("div",{style:l.double},se.createElement(Hn,{style:{input:l.input,label:l.label},label:"hex",value:o,onChange:s})),se.createElement("div",{style:l.column},se.createElement("div",{style:l.single},se.createElement(Hn,{style:{input:l.input2,label:l.label2},label:"rgb",value:u,onChange:s})),se.createElement("div",{style:l.single},se.createElement(Hn,{style:{input:l.input2,label:l.label2},label:"hsv",value:f,onChange:s})),se.createElement("div",{style:l.single},se.createElement(Hn,{style:{input:l.input2,label:l.label2},label:"hsl",value:c,onChange:s})))))},g5=function(e){var n=e.width,r=e.onChange,i=e.rgb,o=e.hsl,a=e.hsv,s=e.hex,l=e.header,u=e.styles,c=u===void 0?{}:u,f=e.className,d=f===void 0?"":f,p=mn(es({default:{picker:{width:n,background:"#fff",border:"1px solid #dfe1e5",boxSizing:"initial",display:"flex",flexWrap:"wrap",borderRadius:"8px 8px 0px 0px"},head:{height:"57px",width:"100%",paddingTop:"16px",paddingBottom:"16px",paddingLeft:"16px",fontSize:"20px",boxSizing:"border-box",fontFamily:"Roboto-Regular,HelveticaNeue,Arial,sans-serif"},saturation:{width:"70%",padding:"0px",position:"relative",overflow:"hidden"},swatch:{width:"30%",height:"228px",padding:"0px",background:"rgba("+i.r+", "+i.g+", "+i.b+", 1)",position:"relative",overflow:"hidden"},body:{margin:"auto",width:"95%"},controls:{display:"flex",boxSizing:"border-box",height:"52px",paddingTop:"22px"},color:{width:"32px"},hue:{height:"8px",position:"relative",margin:"0px 16px 0px 16px",width:"100%"},Hue:{radius:"2px"}}},c));return se.createElement("div",{style:p.picker,className:"google-picker "+d},se.createElement("div",{style:p.head},l),se.createElement("div",{style:p.swatch}),se.createElement("div",{style:p.saturation},se.createElement(_A,{hsl:o,hsv:a,pointer:p5,onChange:r})),se.createElement("div",{style:p.body},se.createElement("div",{style:p.controls,className:"flexbox-fix"},se.createElement("div",{style:p.hue},se.createElement(zv,{style:p.Hue,hsl:o,radius:"4px",pointer:m5,onChange:r}))),se.createElement(PYe,{rgb:i,hsl:o,hex:s,hsv:a,onChange:r})))};g5.propTypes={width:st.oneOfType([st.string,st.number]),styles:st.object,header:st.string};g5.defaultProps={width:652,styles:{},header:"Color picker"};ts(g5);var v5={},CY={exports:{}};(function(t){function e(n){return n&&n.__esModule?n:{default:n}}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(CY);var AY=CY.exports,SD={};const NYe=uee(xae);var c$;function TY(){return c$||(c$=1,function(t){"use client";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return e.createSvgIcon}});var e=NYe}(SD)),SD}var OYe=AY;Object.defineProperty(v5,"__esModule",{value:!0});var DY=v5.default=void 0,IYe=OYe(TY()),FYe=F,LYe=(0,IYe.default)((0,FYe.jsx)("path",{d:"M3 3h18v18H3z"}),"Square");DY=v5.default=LYe;function ep(t){const[e,n]=se.useState(null),r=a=>{n(a.currentTarget)},i=()=>{n(null)},o=!!e;return F.jsxs("div",{children:[F.jsx(QM,{style:{color:sd(t.color)},onClick:r,children:F.jsx(DY,{})}),F.jsx(YH,{open:o,anchorEl:e,onClose:i,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:F.jsx(wYe,{color:t.color,onChangeComplete:t.onChangeComplete})})]})}function kYe(){const t=gX();return F.jsx(aC,{sx:{height:1,width:1},children:F.jsx(sC,{children:F.jsxs(Fn,{spacing:1,children:[F.jsx(Wn,{variant:"h6",children:" Legend"}),F.jsx(Jc,{}),F.jsxs(zH,{children:[F.jsx(Ss,{control:F.jsx(Wh,{checked:t.detector,onChange:(e,n)=>t.update({detector:n})}),label:F.jsxs(Fn,{direction:"row",children:[F.jsx(ep,{color:t.detectorColour,onChangeComplete:e=>t.update({detectorColour:e.rgb})}),F.jsx(Wn,{children:"Detector:"})]})}),F.jsx(Ss,{control:F.jsx(Wh,{checked:t.cameraTube,onChange:(e,n)=>t.update({cameraTube:n})}),label:F.jsxs(Fn,{direction:"row",children:[F.jsx(ep,{color:t.cameraTubeColor,onChangeComplete:e=>t.update({cameraTubeColor:e.rgb})}),F.jsx(Wn,{children:"Camera Tube:"})]})}),F.jsx(Ss,{control:F.jsx(Wh,{checked:t.beamstop,onChange:(e,n)=>{t.update({beamstop:n})}}),label:F.jsxs(Fn,{direction:"row",children:[F.jsx(ep,{color:t.beamstopColor,onChangeComplete:e=>t.update({beamstopColor:e.rgb})}),F.jsx(Wn,{children:"Beamstop"})]})}),F.jsx(Ss,{control:F.jsx(Wh,{checked:t.clearance,onChange:(e,n)=>{t.update({clearance:n})}}),label:F.jsxs(Fn,{direction:"row",children:[F.jsx(ep,{color:t.clearanceColor,onChangeComplete:e=>t.update({clearanceColor:e.rgb})}),F.jsx(Wn,{children:"Clearance"})]})}),F.jsx(Ss,{control:F.jsx(Wh,{checked:t.visibleRange,onChange:(e,n)=>t.update({visibleRange:n})}),label:F.jsxs(Fn,{direction:"row",children:[F.jsx(ep,{color:t.visibleColor,onChangeComplete:e=>t.update({visibleColor:e.rgb})}),F.jsx(Wn,{children:"Visible Range"})]})}),F.jsx(Ss,{control:F.jsx(Wh,{checked:t.requestedRange,onChange:(e,n)=>t.update({requestedRange:n})}),label:F.jsxs(Fn,{direction:"row",children:[F.jsx(ep,{color:t.requestedRangeColor,onChangeComplete:e=>t.update({requestedRangeColor:e.rgb})}),F.jsx(Wn,{children:"Requested Range"})]})}),F.jsx(Ss,{control:F.jsx(Wh,{checked:t.inaccessibleRange,onChange:(e,n)=>t.update({inaccessibleRange:n})}),label:F.jsxs(Fn,{direction:"row",children:[F.jsx(ep,{color:t.inaccessibleRangeColor,onChangeComplete:e=>t.update({inaccessibleRangeColor:e.rgb})}),F.jsx(Wn,{children:"Inaccessible Range"})]})})]}),F.jsxs(yl,{children:[F.jsx(GO,{id:"demo-radio-buttons-group-label",children:"Axes:"}),F.jsxs(nV,{"aria-labelledby":"demo-radio-buttons-group-label",value:t.plotAxes,name:"radio-buttons-group",onChange:e=>t.update({plotAxes:e.target.value}),children:[F.jsx(Ss,{value:Wc.milimeter,control:F.jsx(Og,{}),label:"Axes in mm"}),F.jsx(Ss,{value:Wc.pixel,control:F.jsx(Og,{}),label:"Axes in pixels"}),F.jsx(Ss,{value:Wc.reciprocal,control:F.jsx(Og,{}),label:"Axes in q(nm^-1)"})]})]}),F.jsx(Fn,{direction:"row",spacing:1})]})})})}var Ba=(t=>(t.q="q",t.s="s",t.d="d",t))(Ba||{});const _p=Ev(t=>({requested:"q",qUnits:g2.nanmometres,sUnits:dl.nanmometres,dUnits:dl.nanmometres,requestedMin:null,requestedMax:null,updateRequested:e=>{t({requested:e})},updateRequestedRange:e=>{t({...e})},updateQUnits:e=>t({qUnits:e}),updateSUnits:e=>t({sUnits:e}),updateDUnits:e=>t({dUnits:e})}));function BYe(t){return F.jsx("svg",{style:{display:"grid",height:"40%",width:"90%",border:"solid black"},children:F.jsx("text",{x:"40%",y:"50%",children:t.message})})}function UYe(t){const e=t.visibleRange.max.toNumber()-t.visibleRange.min.toNumber(),n=t.requestedRange.max.toNumber()/e*100,r=t.requestedRange.min.toNumber()/e*100,i=t.visibleRange.containsRange(t.requestedRange)?"green":"red",o=a=>a<50?"start":"end";return F.jsxs("svg",{style:{display:"grid",height:"40%",width:"90%",border:"solid black"},children:[F.jsx("rect",{y:"0",x:"0",width:"100%",height:"50%",fill:i}),F.jsx("line",{x1:`${r}%`,y1:0,x2:`${r}%`,y2:"50%",style:{stroke:"black",strokeWidth:2}}),F.jsx("line",{x1:`${n}%`,y1:0,x2:`${n}%`,y2:"60%",style:{stroke:"black",strokeWidth:2}}),F.jsxs("text",{y:"60%",x:`${r}%`,textAnchor:o(r),children:[" ","Requested min"]}),F.jsx("text",{y:"80%",x:`${n}%`,textAnchor:o(n),children:"Requested max"})]})}const K2=t=>{const e=jo(1,t);if(typeof e=="number"||!("units"in e))throw TypeError("name this error later ");return e},Z2=t=>{const e=jo(2*Math.PI,t);if(typeof e=="number"||!("units"in e))throw TypeError("name this error later ");return e};function zYe(t){const e=_p(),n=_p(f=>f.updateQUnits),r=_p(f=>f.updateSUnits),i=_p(f=>f.updateDUnits),o=f=>{n(f.target.value)},a=f=>{r(f.target.value)},s=f=>{i(f.target.value)},l=t.qRange.to(e.qUnits),u=t.qRange.apply(K2).to(e.sUnits),c=t.qRange.apply(Z2).to(e.dUnits);return F.jsx(sf,{flexGrow:1,children:F.jsx(Bme,{component:gf,children:F.jsxs(vme,{sx:{minWidth:50},"aria-label":"simple table",size:"small",children:[F.jsx(Gme,{children:F.jsxs(Nw,{children:[F.jsx(Ho,{children:"Values"}),F.jsx(Ho,{align:"right",children:"Min"}),F.jsx(Ho,{align:"right",children:"Max"}),F.jsx(Ho,{align:"right",children:"Units"})]})}),F.jsxs(Mme,{children:[F.jsxs(Nw,{children:[F.jsx(Ho,{component:"th",scope:"row",children:Ba.q}),F.jsx(Ho,{align:"right",children:isNaN(l.min.toNumber())?"":l.min.toNumber().toFixed(4)}),F.jsx(Ho,{align:"right",children:isNaN(l.max.toNumber())?"":l.max.toNumber().toFixed(4)}),F.jsx(Ho,{align:"right",children:F.jsxs(yl,{children:[F.jsx(Wu,{children:"q"}),F.jsxs(Gu,{size:"small",label:"units",value:e.qUnits,onChange:o,children:[F.jsx(lo,{value:g2.nanmometres,children:"1 / nm"}),F.jsx(lo,{value:g2.angstroms,children:"1 / Å"})]})]})})]},"q"),F.jsxs(Nw,{children:[F.jsx(Ho,{component:"th",scope:"row",children:Ba.s}),F.jsx(Ho,{align:"right",children:isNaN(u.min.toNumber())?"":u.min.toNumber().toFixed(4)}),F.jsx(Ho,{align:"right",children:isNaN(u.max.toNumber())?"":u.max.toNumber().toFixed(4)}),F.jsx(Ho,{align:"right",children:F.jsxs(yl,{children:[F.jsx(Wu,{children:"s"}),F.jsxs(Gu,{size:"small",label:"units",value:e.sUnits,onChange:a,children:[F.jsx(lo,{value:dl.nanmometres,children:dl.nanmometres}),F.jsx(lo,{value:dl.angstroms,children:"Å"})]})]})})]},"s"),F.jsxs(Nw,{children:[F.jsx(Ho,{component:"th",scope:"row",children:Ba.d}),F.jsx(Ho,{align:"right",children:isNaN(c.min.toNumber())?"":c.min.toNumber().toFixed(4)}),F.jsx(Ho,{align:"right",children:isNaN(c.max.toNumber())?"":c.max.toNumber().toFixed(4)}),F.jsx(Ho,{align:"right",children:F.jsxs(yl,{children:[F.jsx(Wu,{children:"d"}),F.jsxs(Gu,{size:"small",label:"units",value:e.dUnits,onChange:s,children:[F.jsx(lo,{value:dl.nanmometres,children:dl.nanmometres}),F.jsx(lo,{value:dl.angstroms,children:"Å"})]})]})})]},"d")]})]})})})}class tu{constructor(e,n){io(this,"min");io(this,"max");if(this.min=e,this.max=n,!e.equalBase(n))throw new TypeError("min and max units must be same base length, mass, etc");if(cE(e,n)){const r=n;this.max=e,this.min=r}}to(e){return new tu(this.min.to(e),this.max.to(e))}containsValue(e){const n=ZT(e,this.min)&&ZT(e,this.max);if(typeof n!="boolean")throw TypeError("Can only check one value at a time");return n}containsRange(e){const n=Txe(this.min,e.min)&&ZT(this.max,e.max);if(typeof n!="boolean")throw TypeError("Can only check one value at a time");return n}intersect(e){return cE(e.min,this.max)||cE(this.min,e.max)?null:new tu(Axe(e.min,this.min),Sxe(e.max,this.max))}apply(e){return new tu(e(this.min),e(this.max))}applyInPlace(e){return this.min=e(this.min),this.max=e(this.max),this}static fromNumericRange(e,n){return new tu(Gt((e==null?void 0:e.min)??NaN,n),Gt((e==null?void 0:e.max)??NaN,n))}toString(){return`(min:${this.min.toString()}, max:${this.max.toString()})`}equals(e){const n=zR(this.min,e.min)&&zR(this.max,e.max);if(typeof n!="boolean")throw TypeError("write this later");return n}}function $Ye(t){const e=_p(),n=_p(c=>c.requestedMax&&c.requestedMin?new ya(c.requestedMin,c.requestedMax):null);let r=null,i=null,o=null;const a=c=>{e.updateRequestedRange({requestedMax:gg(c.target.value)})},s=c=>{e.updateRequestedRange({requestedMin:gg(c.target.value)})};let l=null;if(t.visableQRange&&t.fullQrange&&n)switch(e.requested){case Ba.d:r=t.visableQRange.apply(Z2).to("nm"),i=t.fullQrange.apply(Z2).to("nm"),o=tu.fromNumericRange(n,e.dUnits).to("nm"),l=e.dUnits;break;case Ba.s:r=t.visableQRange.apply(K2).to("nm"),i=t.fullQrange.apply(K2).to("nm"),o=tu.fromNumericRange(n,e.sUnits).to("nm"),l=e.sUnits;break;default:r=t.visableQRange.to("nm^-1"),i=t.fullQrange.to("nm^-1"),o=tu.fromNumericRange(n,e.qUnits).to("nm^-1"),l=e.qUnits}const u=c=>{switch(c){case"angstrom":return"Å";case"angstrom^-1":return"Å^-1";case null:return"";default:return c}};return F.jsx(sf,{sx:{flexGrow:1},children:F.jsx(aC,{sx:{height:1},children:F.jsx(sC,{children:F.jsxs(Fn,{spacing:1,children:[F.jsx(Wn,{variant:"h6",children:" Results"}),F.jsx(Jc,{}),F.jsxs(Fn,{direction:"row",spacing:3,children:[F.jsx(zYe,{qRange:t.visableQRange}),F.jsx(Jc,{orientation:"vertical"}),F.jsxs(Fn,{flexGrow:2,children:[F.jsx(Fn,{spacing:1,children:F.jsxs(Fn,{direction:"row",spacing:3,children:[F.jsxs(Fn,{spacing:2,children:[F.jsxs(Fn,{direction:"row",spacing:2,children:[F.jsxs(Wn,{children:["Requested min ",e.requested," value:"," "]}),F.jsx(Vi,{type:"number",size:"small",value:e.requestedMin,onChange:s}),F.jsx(Wn,{children:u(l)})]}),F.jsxs(Fn,{direction:"row",spacing:2,children:[F.jsxs(Wn,{children:["Requested max ",e.requested," value:"," "]}),F.jsx(Vi,{type:"number",size:"small",value:e.requestedMax,onChange:a}),F.jsx(Wn,{children:u(l)})]})]}),F.jsxs(yl,{children:[F.jsx(GO,{children:"Requested Quantiy"}),F.jsxs(nV,{row:!0,value:e.requested,onChange:c=>e.updateRequested(c.target.value),children:[F.jsx(Ss,{value:Ba.q,control:F.jsx(Og,{}),label:Ba.q}),F.jsx(Ss,{value:Ba.s,control:F.jsx(Og,{}),label:Ba.s}),F.jsx(Ss,{value:Ba.d,control:F.jsx(Og,{}),label:Ba.d})]})]})]})}),(()=>r&&i&&o&&i.containsRange(r)?F.jsx(UYe,{visibleRange:r,fullRange:i,requestedRange:o}):F.jsx(BYe,{message:"No solution"}))()]})]})]})})})})}const HYe=(t,e,n)=>{if(t<0||e<0||n<0)return null;const r=n*t/(4*Math.PI);return Math.abs(r)>=Math.sqrt(2)/2?null:Math.tan(2*Math.asin(r))*e},f$=(t,e,n,r,i)=>{const a=new Vg(new Je(Math.cos(e.toSI().toNumber()),Math.sin(e.toSI().toNumber())),new Je(i.x.toSI().toNumber(),i.y.toSI().toNumber())).getPointAtDistance(HYe(t.toSI().toNumber(),n.toSI().toNumber(),r.toSI().toNumber())??0);return{x:Gt(a.x,"m"),y:Gt(a.y,"m")}};function ED(t){const{coords:e,...n}=t,[r,i,o]=e,a=i.distanceTo(r),s=o.distanceTo(r);return F.jsx("ellipse",{cx:r.x,cy:r.y,rx:a,ry:s,...n})}function VYe(){const t=gX(),e=v2(P=>({angle:P.angle,cameraLength:P.cameraLength,minWavelength:P.minWavelength,maxWavelength:P.maxWavelength,minCameraLength:P.minCameraLength,maxCameraLength:P.maxCameraLength,cameraLengthStep:P.cameraLengthStep,wavelength:P.wavelength})),n=Fg(P=>({resolution:P.resolution,pixelSize:P.pixelSize})),r=s4(P=>({centre:P.centre,diameter:P.diameter,clearance:P.clearance})),i=l4(P=>({centre:P.centre,diameter:P.diameter}));let o=null;if(e.cameraLength&&e.wavelength&&(o=jo(2*Math.PI,Bi(Gt(e.cameraLength,"m"),e.wavelength.to("m"))),o&&!("units"in o)))throw TypeError("things");mg.UNITS.xpixel&&delete mg.UNITS.xpixel,mg.UNITS.ypixel&&delete mg.UNITS.ypixel,Ok("xpixel",n.pixelSize.width.toString()),Ok("ypixel",n.pixelSize.height.toString());const{ptMin:a,ptMax:s,visibleQRange:l,fullQRange:u}=yLe(n,r,i,e),c=tu.fromNumericRange(l,"m^-1").to("nm^-1"),f=tu.fromNumericRange(u,"m^-1").to("nm^-1"),d={x:Gt(a.x,"m"),y:Gt(a.y,"m")},p={x:Gt(s.x,"m"),y:Gt(s.y,"m")},y={x:Gt(r.centre.x??NaN,"xpixel"),y:Gt(r.centre.y??NaN,"ypixel")},x={x:Gt(i.centre.x??NaN,"xpixel"),y:Gt(i.centre.y??NaN,"ypixel")},_=new oN(t.plotAxes,o),v=_.createPlotEllipse(y,r.diameter,y),S=_.createPlotEllipse(x,i.diameter,y),w=_.createPlotEllipseClearance(y,r.diameter,r.clearance??0,y),E=_.createPlotRectangle(n.resolution,y),T=_.createPlotRange(d,p,y),C=_p(P=>{if(!P.requestedMax||!P.requestedMin)return null;const N=k=>{let G;switch(P.requested){case Ba.d:G=Z2(Gt(k,P.dUnits));break;case Ba.s:G=K2(Gt(k,P.sUnits));break;default:G=Gt(k,P.qUnits)}return G};return new tu(N(P.requestedMin),N(P.requestedMax))});let D={start:new ae(0,0),end:new ae(0,0)};if(C&&e.cameraLength&&e.wavelength){const P=f$(C.max,e.angle,Gt(e.cameraLength,"m"),e.wavelength,y),N=f$(C.min,e.angle,Gt(e.cameraLength,"m"),e.wavelength,y);D=_.createPlotRange(N,P,y)}console.log(E);const O=gLe(E);return F.jsx(sf,{children:F.jsxs(Fn,{direction:"column",spacing:1,children:[F.jsxs(Fn,{direction:"row",spacing:1,children:[F.jsx(aC,{children:F.jsx(sC,{children:F.jsx("div",{style:{display:"grid",height:"60vh",width:"65vh",border:"solid black"},children:F.jsxs(wFe,{abscissaConfig:{visDomain:[O.xAxis.min,O.xAxis.max],showGrid:!0},ordinateConfig:{visDomain:[O.yAxis.max,O.yAxis.min],showGrid:!0},children:[F.jsx(Z5e,{}),F.jsx(tFe,{}),F.jsx(pLe,{points:[v.centre,v.endPointX,v.endPointY,w.centre,w.endPointX,w.endPointY,S.centre,S.endPointX,S.endPointY,E.lowerBound,E.upperBound,T.start,T.end,D.start,D.end],children:(P,N,k,G,Z,j,K,Y,$,W,U,te,re,le,ce)=>F.jsxs(TI,{children:[t.cameraTube&&F.jsx(ED,{coords:[K,Y,$],fill:sd(t.cameraTubeColor),id:"camera tube"}),t.detector&&F.jsx(B2,{coords:[W,U],fill:sd(t.detectorColour),id:"detector"}),t.inaccessibleRange&&F.jsx(dD,{coords:[P,te],stroke:sd(t.inaccessibleRangeColor),strokeWidth:3,id:"inaccessible"}),t.clearance&&F.jsx(ED,{coords:[G,Z,j],fill:sd(t.clearanceColor),id:"clearance"}),t.visibleRange&&F.jsx(dD,{coords:[te,re],stroke:sd(t.visibleColor),strokeWidth:3,id:"visible"}),t.requestedRange&&F.jsx(dD,{coords:[le,ce],stroke:sd(t.requestedRangeColor),strokeWidth:3,id:"requested"}),t.beamstop&&F.jsx(ED,{coords:[P,N,k],fill:sd(t.beamstopColor),id:"beamstop"})]})})]})})})}),F.jsx(sf,{flexGrow:1,children:F.jsx(kYe,{})})]}),F.jsx($Ye,{visableQRange:c,fullQrange:f})]})})}var y5={},WYe=AY;Object.defineProperty(y5,"__esModule",{value:!0});var RY=y5.default=void 0,GYe=WYe(TY()),jYe=F,qYe=(0,GYe.default)((0,jYe.jsx)("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}),"Menu");RY=y5.default=qYe;function XYe(){return F.jsxs(sf,{children:[F.jsx(GH,{children:F.jsx(Uhe,{children:F.jsx(Fn,{direction:"row",children:F.jsx(Wn,{flexGrow:3,children:"Nothing to see here (0_0)"})})})}),F.jsx(Jc,{})]})}function YYe(){const[t,e]=H.useState({menuOpen:!1}),n=r=>()=>{e({menuOpen:r})};return F.jsx(sf,{sx:{flexGrow:2},children:F.jsx(vse,{position:"static",children:F.jsxs(Zme,{children:[F.jsxs(H.Fragment,{children:[F.jsx(QM,{size:"large",edge:"start",color:"inherit","aria-label":"menu",sx:{mr:2},onClick:n(!0),children:F.jsx(RY,{})}),F.jsx(ede,{anchor:"left",open:t.menuOpen,onClose:n(!1),children:F.jsx(sf,{sx:{width:250},role:"presentation",onClick:n(!1),children:F.jsx(XYe,{})})})]}),F.jsx(Wn,{variant:"h6",component:"div",sx:{flexGrow:1},children:"Dedi Web"})]})})})}function KYe(){return F.jsxs(sf,{children:[F.jsx(YYe,{}),F.jsxs(Fn,{direction:"row",spacing:1,margin:1,children:[F.jsx(sf,{children:F.jsx(sbe,{})}),F.jsx(Fn,{direction:"column",spacing:1,flexGrow:1,children:F.jsx(VYe,{})})]})]})}CD.createRoot(document.getElementById("root")).render(F.jsx(se.StrictMode,{children:F.jsx(KYe,{})}))});export default ZYe(); diff --git a/index.html b/index.html index 5387aec..639cbde 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ dedi-web - +