ezpm2gui 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +202 -14
- package/bin/ezpm2gui.js +40 -44
- package/bin/ezpm2gui.ts +51 -0
- package/bin/generate-ecosystem.js +24 -22
- package/bin/generate-ecosystem.ts +56 -0
- package/dist/server/index.js +40 -20
- package/dist/server/routes/clusterManagement.d.ts +3 -0
- package/dist/server/routes/clusterManagement.js +152 -0
- package/dist/server/routes/deployApplication.d.ts +3 -0
- package/dist/server/routes/deployApplication.js +163 -0
- package/dist/server/routes/logStreaming.d.ts +5 -0
- package/dist/server/routes/logStreaming.js +102 -0
- package/dist/server/routes/modules.d.ts +3 -0
- package/dist/server/routes/modules.js +106 -0
- package/dist/server/routes/processConfig.d.ts +3 -0
- package/dist/server/routes/processConfig.js +118 -0
- package/dist/server/utils/pm2-connection.d.ts +16 -0
- package/dist/server/utils/pm2-connection.js +141 -0
- package/package.json +19 -5
- package/src/client/build/asset-manifest.json +6 -6
- package/src/client/build/index.html +1 -1
- package/src/client/build/static/css/main.672b8f26.css +2 -0
- package/src/client/build/static/css/main.672b8f26.css.map +1 -0
- package/src/client/build/static/js/main.1d7f99ff.js +156 -0
- package/src/client/build/static/js/{main.dde30e92.js.LICENSE.txt → main.1d7f99ff.js.LICENSE.txt} +19 -0
- package/src/client/build/static/js/main.1d7f99ff.js.map +1 -0
- package/ .npmignore +0 -39
- package/install.bat +0 -22
- package/install.sh +0 -23
- package/src/client/build/static/css/main.c1cbda3a.css +0 -2
- package/src/client/build/static/css/main.c1cbda3a.css.map +0 -1
- package/src/client/build/static/js/main.dde30e92.js +0 -3
- package/src/client/build/static/js/main.dde30e92.js.map +0 -1
- package/src/client/package-lock.json +0 -16192
- package/src/client/package.json +0 -39
- package/src/client/public/index.html +0 -20
- package/src/client/public/manifest.json +0 -25
- package/src/index.ts +0 -24
- package/src/server/index.ts +0 -240
- package/tsconfig.json +0 -18
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
/*! For license information please see main.dde30e92.js.LICENSE.txt */
|
|
2
|
-
(()=>{"use strict";var t={43:(t,e,n)=>{t.exports=n(202)},153:(t,e,n)=>{var i=n(43),r=Symbol.for("react.element"),s=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,a=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(t,e,n){var i,s={},c=null,u=null;for(i in void 0!==n&&(c=""+n),void 0!==e.key&&(c=""+e.key),void 0!==e.ref&&(u=e.ref),e)o.call(e,i)&&!l.hasOwnProperty(i)&&(s[i]=e[i]);if(t&&t.defaultProps)for(i in e=t.defaultProps)void 0===s[i]&&(s[i]=e[i]);return{$$typeof:r,type:t,key:c,ref:u,props:s,_owner:a.current}}e.Fragment=s,e.jsx=c,e.jsxs=c},202:(t,e)=>{var n=Symbol.for("react.element"),i=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.iterator;var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,m={};function y(t,e,n){this.props=t,this.context=e,this.refs=m,this.updater=n||p}function b(){}function v(t,e,n){this.props=t,this.context=e,this.refs=m,this.updater=n||p}y.prototype.isReactComponent={},y.prototype.setState=function(t,e){if("object"!==typeof t&&"function"!==typeof t&&null!=t)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")},y.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")},b.prototype=y.prototype;var x=v.prototype=new b;x.constructor=v,g(x,y.prototype),x.isPureReactComponent=!0;var _=Array.isArray,w=Object.prototype.hasOwnProperty,k={current:null},S={key:!0,ref:!0,__self:!0,__source:!0};function E(t,e,i){var r,s={},o=null,a=null;if(null!=e)for(r in void 0!==e.ref&&(a=e.ref),void 0!==e.key&&(o=""+e.key),e)w.call(e,r)&&!S.hasOwnProperty(r)&&(s[r]=e[r]);var l=arguments.length-2;if(1===l)s.children=i;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];s.children=c}if(t&&t.defaultProps)for(r in l=t.defaultProps)void 0===s[r]&&(s[r]=l[r]);return{$$typeof:n,type:t,key:o,ref:a,props:s,_owner:k.current}}function C(t){return"object"===typeof t&&null!==t&&t.$$typeof===n}var O=/\/+/g;function T(t,e){return"object"===typeof t&&null!==t&&null!=t.key?function(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,(function(t){return e[t]}))}(""+t.key):e.toString(36)}function M(t,e,r,s,o){var a=typeof t;"undefined"!==a&&"boolean"!==a||(t=null);var l=!1;if(null===t)l=!0;else switch(a){case"string":case"number":l=!0;break;case"object":switch(t.$$typeof){case n:case i:l=!0}}if(l)return o=o(l=t),t=""===s?"."+T(l,0):s,_(o)?(r="",null!=t&&(r=t.replace(O,"$&/")+"/"),M(o,e,r,"",(function(t){return t}))):null!=o&&(C(o)&&(o=function(t,e){return{$$typeof:n,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}(o,r+(!o.key||l&&l.key===o.key?"":(""+o.key).replace(O,"$&/")+"/")+t)),e.push(o)),1;if(l=0,s=""===s?".":s+":",_(t))for(var c=0;c<t.length;c++){var u=s+T(a=t[c],c);l+=M(a,e,r,u,o)}else if(u=function(t){return null===t||"object"!==typeof t?null:"function"===typeof(t=f&&t[f]||t["@@iterator"])?t:null}(t),"function"===typeof u)for(t=u.call(t),c=0;!(a=t.next()).done;)l+=M(a=a.value,e,r,u=s+T(a,c++),o);else if("object"===a)throw e=String(t),Error("Objects are not valid as a React child (found: "+("[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return l}function P(t,e,n){if(null==t)return t;var i=[],r=0;return M(t,i,"","",(function(t){return e.call(n,t,r++)})),i}function N(t){if(-1===t._status){var e=t._result;(e=e()).then((function(e){0!==t._status&&-1!==t._status||(t._status=1,t._result=e)}),(function(e){0!==t._status&&-1!==t._status||(t._status=2,t._result=e)})),-1===t._status&&(t._status=0,t._result=e)}if(1===t._status)return t._result.default;throw t._result}var R={current:null},A={transition:null},L={ReactCurrentDispatcher:R,ReactCurrentBatchConfig:A,ReactCurrentOwner:k};function D(){throw Error("act(...) is not supported in production builds of React.")}e.Children={map:P,forEach:function(t,e,n){P(t,(function(){e.apply(this,arguments)}),n)},count:function(t){var e=0;return P(t,(function(){e++})),e},toArray:function(t){return P(t,(function(t){return t}))||[]},only:function(t){if(!C(t))throw Error("React.Children.only expected to receive a single React element child.");return t}},e.Component=y,e.Fragment=r,e.Profiler=o,e.PureComponent=v,e.StrictMode=s,e.Suspense=u,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=L,e.act=D,e.cloneElement=function(t,e,i){if(null===t||void 0===t)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var r=g({},t.props),s=t.key,o=t.ref,a=t._owner;if(null!=e){if(void 0!==e.ref&&(o=e.ref,a=k.current),void 0!==e.key&&(s=""+e.key),t.type&&t.type.defaultProps)var l=t.type.defaultProps;for(c in e)w.call(e,c)&&!S.hasOwnProperty(c)&&(r[c]=void 0===e[c]&&void 0!==l?l[c]:e[c])}var c=arguments.length-2;if(1===c)r.children=i;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:n,type:t.type,key:s,ref:o,props:r,_owner:a}},e.createContext=function(t){return(t={$$typeof:l,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:a,_context:t},t.Consumer=t},e.createElement=E,e.createFactory=function(t){var e=E.bind(null,t);return e.type=t,e},e.createRef=function(){return{current:null}},e.forwardRef=function(t){return{$$typeof:c,render:t}},e.isValidElement=C,e.lazy=function(t){return{$$typeof:d,_payload:{_status:-1,_result:t},_init:N}},e.memo=function(t,e){return{$$typeof:h,type:t,compare:void 0===e?null:e}},e.startTransition=function(t){var e=A.transition;A.transition={};try{t()}finally{A.transition=e}},e.unstable_act=D,e.useCallback=function(t,e){return R.current.useCallback(t,e)},e.useContext=function(t){return R.current.useContext(t)},e.useDebugValue=function(){},e.useDeferredValue=function(t){return R.current.useDeferredValue(t)},e.useEffect=function(t,e){return R.current.useEffect(t,e)},e.useId=function(){return R.current.useId()},e.useImperativeHandle=function(t,e,n){return R.current.useImperativeHandle(t,e,n)},e.useInsertionEffect=function(t,e){return R.current.useInsertionEffect(t,e)},e.useLayoutEffect=function(t,e){return R.current.useLayoutEffect(t,e)},e.useMemo=function(t,e){return R.current.useMemo(t,e)},e.useReducer=function(t,e,n){return R.current.useReducer(t,e,n)},e.useRef=function(t){return R.current.useRef(t)},e.useState=function(t){return R.current.useState(t)},e.useSyncExternalStore=function(t,e,n){return R.current.useSyncExternalStore(t,e,n)},e.useTransition=function(){return R.current.useTransition()},e.version="18.3.1"},234:(t,e)=>{function n(t,e){var n=t.length;t.push(e);t:for(;0<n;){var i=n-1>>>1,r=t[i];if(!(0<s(r,e)))break t;t[i]=e,t[n]=r,n=i}}function i(t){return 0===t.length?null:t[0]}function r(t){if(0===t.length)return null;var e=t[0],n=t.pop();if(n!==e){t[0]=n;t:for(var i=0,r=t.length,o=r>>>1;i<o;){var a=2*(i+1)-1,l=t[a],c=a+1,u=t[c];if(0>s(l,n))c<r&&0>s(u,l)?(t[i]=u,t[c]=n,i=c):(t[i]=l,t[a]=n,i=a);else{if(!(c<r&&0>s(u,n)))break t;t[i]=u,t[c]=n,i=c}}}return e}function s(t,e){var n=t.sortIndex-e.sortIndex;return 0!==n?n:t.id-e.id}if("object"===typeof performance&&"function"===typeof performance.now){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var c=[],u=[],h=1,d=null,f=3,p=!1,g=!1,m=!1,y="function"===typeof setTimeout?setTimeout:null,b="function"===typeof clearTimeout?clearTimeout:null,v="undefined"!==typeof setImmediate?setImmediate:null;function x(t){for(var e=i(u);null!==e;){if(null===e.callback)r(u);else{if(!(e.startTime<=t))break;r(u),e.sortIndex=e.expirationTime,n(c,e)}e=i(u)}}function _(t){if(m=!1,x(t),!g)if(null!==i(c))g=!0,A(w);else{var e=i(u);null!==e&&L(_,e.startTime-t)}}function w(t,n){g=!1,m&&(m=!1,b(C),C=-1),p=!0;var s=f;try{for(x(n),d=i(c);null!==d&&(!(d.expirationTime>n)||t&&!M());){var o=d.callback;if("function"===typeof o){d.callback=null,f=d.priorityLevel;var a=o(d.expirationTime<=n);n=e.unstable_now(),"function"===typeof a?d.callback=a:d===i(c)&&r(c),x(n)}else r(c);d=i(c)}if(null!==d)var l=!0;else{var h=i(u);null!==h&&L(_,h.startTime-n),l=!1}return l}finally{d=null,f=s,p=!1}}"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var k,S=!1,E=null,C=-1,O=5,T=-1;function M(){return!(e.unstable_now()-T<O)}function P(){if(null!==E){var t=e.unstable_now();T=t;var n=!0;try{n=E(!0,t)}finally{n?k():(S=!1,E=null)}}else S=!1}if("function"===typeof v)k=function(){v(P)};else if("undefined"!==typeof MessageChannel){var N=new MessageChannel,R=N.port2;N.port1.onmessage=P,k=function(){R.postMessage(null)}}else k=function(){y(P,0)};function A(t){E=t,S||(S=!0,k())}function L(t,n){C=y((function(){t(e.unstable_now())}),n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(t){t.callback=null},e.unstable_continueExecution=function(){g||p||(g=!0,A(w))},e.unstable_forceFrameRate=function(t){0>t||125<t?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<t?Math.floor(1e3/t):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return i(c)},e.unstable_next=function(t){switch(f){case 1:case 2:case 3:var e=3;break;default:e=f}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(t,e){switch(t){case 1:case 2:case 3:case 4:case 5:break;default:t=3}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_scheduleCallback=function(t,r,s){var o=e.unstable_now();switch("object"===typeof s&&null!==s?s="number"===typeof(s=s.delay)&&0<s?o+s:o:s=o,t){case 1:var a=-1;break;case 2:a=250;break;case 5:a=1073741823;break;case 4:a=1e4;break;default:a=5e3}return t={id:h++,callback:r,priorityLevel:t,startTime:s,expirationTime:a=s+a,sortIndex:-1},s>o?(t.sortIndex=s,n(u,t),null===i(c)&&t===i(u)&&(m?(b(C),C=-1):m=!0,L(_,s-o))):(t.sortIndex=a,n(c,t),g||p||(g=!0,A(w))),t},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(t){var e=f;return function(){var n=f;f=e;try{return t.apply(this,arguments)}finally{f=n}}}},391:(t,e,n)=>{var i=n(950);e.createRoot=i.createRoot,e.hydrateRoot=i.hydrateRoot},579:(t,e,n)=>{t.exports=n(153)},730:(t,e,n)=>{var i=n(43),r=n(853);function s(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var o=new Set,a={};function l(t,e){c(t,e),c(t+"Capture",e)}function c(t,e){for(a[t]=e,t=0;t<e.length;t++)o.add(e[t])}var u=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),h=Object.prototype.hasOwnProperty,d=/^[: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]*$/,f={},p={};function g(t,e,n,i,r,s,o){this.acceptsBooleans=2===e||3===e||4===e,this.attributeName=i,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var m={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(t){m[t]=new g(t,0,!1,t,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(t){var e=t[0];m[e]=new g(e,1,!1,t[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(t){m[t]=new g(t,2,!1,t.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(t){m[t]=new g(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){m[t]=new g(t,3,!1,t.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(t){m[t]=new g(t,3,!0,t,null,!1,!1)})),["capture","download"].forEach((function(t){m[t]=new g(t,4,!1,t,null,!1,!1)})),["cols","rows","size","span"].forEach((function(t){m[t]=new g(t,6,!1,t,null,!1,!1)})),["rowSpan","start"].forEach((function(t){m[t]=new g(t,5,!1,t.toLowerCase(),null,!1,!1)}));var y=/[\-:]([a-z])/g;function b(t){return t[1].toUpperCase()}function v(t,e,n,i){var r=m.hasOwnProperty(e)?m[e]:null;(null!==r?0!==r.type:i||!(2<e.length)||"o"!==e[0]&&"O"!==e[0]||"n"!==e[1]&&"N"!==e[1])&&(function(t,e,n,i){if(null===e||"undefined"===typeof e||function(t,e,n,i){if(null!==n&&0===n.type)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return!i&&(null!==n?!n.acceptsBooleans:"data-"!==(t=t.toLowerCase().slice(0,5))&&"aria-"!==t);default:return!1}}(t,e,n,i))return!0;if(i)return!1;if(null!==n)switch(n.type){case 3:return!e;case 4:return!1===e;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}(e,n,r,i)&&(n=null),i||null===r?function(t){return!!h.call(p,t)||!h.call(f,t)&&(d.test(t)?p[t]=!0:(f[t]=!0,!1))}(e)&&(null===n?t.removeAttribute(e):t.setAttribute(e,""+n)):r.mustUseProperty?t[r.propertyName]=null===n?3!==r.type&&"":n:(e=r.attributeName,i=r.attributeNamespace,null===n?t.removeAttribute(e):(n=3===(r=r.type)||4===r&&!0===n?"":""+n,i?t.setAttributeNS(i,e,n):t.setAttribute(e,n))))}"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(y,b);m[e]=new g(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(y,b);m[e]=new g(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(y,b);m[e]=new g(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(t){m[t]=new g(t,1,!1,t.toLowerCase(),null,!1,!1)})),m.xlinkHref=new g("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(t){m[t]=new g(t,1,!1,t.toLowerCase(),null,!0,!0)}));var x=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,_=Symbol.for("react.element"),w=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),C=Symbol.for("react.provider"),O=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),R=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var A=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var L=Symbol.iterator;function D(t){return null===t||"object"!==typeof t?null:"function"===typeof(t=L&&t[L]||t["@@iterator"])?t:null}var j,z=Object.assign;function I(t){if(void 0===j)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);j=e&&e[1]||""}return"\n"+j+t}var F=!1;function B(t,e){if(!t||F)return"";F=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(e,[])}catch(c){var i=c}Reflect.construct(t,[],e)}else{try{e.call()}catch(c){i=c}t.call(e.prototype)}else{try{throw Error()}catch(c){i=c}t()}}catch(c){if(c&&i&&"string"===typeof c.stack){for(var r=c.stack.split("\n"),s=i.stack.split("\n"),o=r.length-1,a=s.length-1;1<=o&&0<=a&&r[o]!==s[a];)a--;for(;1<=o&&0<=a;o--,a--)if(r[o]!==s[a]){if(1!==o||1!==a)do{if(o--,0>--a||r[o]!==s[a]){var l="\n"+r[o].replace(" at new "," at ");return t.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",t.displayName)),l}}while(1<=o&&0<=a);break}}}finally{F=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?I(t):""}function U(t){switch(t.tag){case 5:return I(t.type);case 16:return I("Lazy");case 13:return I("Suspense");case 19:return I("SuspenseList");case 0:case 2:case 15:return t=B(t.type,!1);case 11:return t=B(t.type.render,!1);case 1:return t=B(t.type,!0);default:return""}}function H(t){if(null==t)return null;if("function"===typeof t)return t.displayName||t.name||null;if("string"===typeof t)return t;switch(t){case k:return"Fragment";case w:return"Portal";case E:return"Profiler";case S:return"StrictMode";case M:return"Suspense";case P:return"SuspenseList"}if("object"===typeof t)switch(t.$$typeof){case O:return(t.displayName||"Context")+".Consumer";case C:return(t._context.displayName||"Context")+".Provider";case T:var e=t.render;return(t=t.displayName)||(t=""!==(t=e.displayName||e.name||"")?"ForwardRef("+t+")":"ForwardRef"),t;case N:return null!==(e=t.displayName||null)?e:H(t.type)||"Memo";case R:e=t._payload,t=t._init;try{return H(t(e))}catch(n){}}return null}function W(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=(t=e.render).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 H(e);case 8:return e===S?"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("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e}return null}function V(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":case"object":return t;default:return""}}function $(t){var e=t.type;return(t=t.nodeName)&&"input"===t.toLowerCase()&&("checkbox"===e||"radio"===e)}function q(t){t._valueTracker||(t._valueTracker=function(t){var e=$(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),i=""+t[e];if(!t.hasOwnProperty(e)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var r=n.get,s=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return r.call(this)},set:function(t){i=""+t,s.call(this,t)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return i},setValue:function(t){i=""+t},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}(t))}function Y(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),i="";return t&&(i=$(t)?t.checked?"true":"false":t.value),(t=i)!==n&&(e.setValue(t),!0)}function K(t){if("undefined"===typeof(t=t||("undefined"!==typeof document?document:void 0)))return null;try{return t.activeElement||t.body}catch(e){return t.body}}function Q(t,e){var n=e.checked;return z({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:t._wrapperState.initialChecked})}function X(t,e){var n=null==e.defaultValue?"":e.defaultValue,i=null!=e.checked?e.checked:e.defaultChecked;n=V(null!=e.value?e.value:n),t._wrapperState={initialChecked:i,initialValue:n,controlled:"checkbox"===e.type||"radio"===e.type?null!=e.checked:null!=e.value}}function J(t,e){null!=(e=e.checked)&&v(t,"checked",e,!1)}function G(t,e){J(t,e);var n=V(e.value),i=e.type;if(null!=n)"number"===i?(0===n&&""===t.value||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if("submit"===i||"reset"===i)return void t.removeAttribute("value");e.hasOwnProperty("value")?tt(t,e.type,n):e.hasOwnProperty("defaultValue")&&tt(t,e.type,V(e.defaultValue)),null==e.checked&&null!=e.defaultChecked&&(t.defaultChecked=!!e.defaultChecked)}function Z(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var i=e.type;if(!("submit"!==i&&"reset"!==i||void 0!==e.value&&null!==e.value))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}""!==(n=t.name)&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,""!==n&&(t.name=n)}function tt(t,e,n){"number"===e&&K(t.ownerDocument)===t||(null==n?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var et=Array.isArray;function nt(t,e,n,i){if(t=t.options,e){e={};for(var r=0;r<n.length;r++)e["$"+n[r]]=!0;for(n=0;n<t.length;n++)r=e.hasOwnProperty("$"+t[n].value),t[n].selected!==r&&(t[n].selected=r),r&&i&&(t[n].defaultSelected=!0)}else{for(n=""+V(n),e=null,r=0;r<t.length;r++){if(t[r].value===n)return t[r].selected=!0,void(i&&(t[r].defaultSelected=!0));null!==e||t[r].disabled||(e=t[r])}null!==e&&(e.selected=!0)}}function it(t,e){if(null!=e.dangerouslySetInnerHTML)throw Error(s(91));return z({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function rt(t,e){var n=e.value;if(null==n){if(n=e.children,e=e.defaultValue,null!=n){if(null!=e)throw Error(s(92));if(et(n)){if(1<n.length)throw Error(s(93));n=n[0]}e=n}null==e&&(e=""),n=e}t._wrapperState={initialValue:V(n)}}function st(t,e){var n=V(e.value),i=V(e.defaultValue);null!=n&&((n=""+n)!==t.value&&(t.value=n),null==e.defaultValue&&t.defaultValue!==n&&(t.defaultValue=n)),null!=i&&(t.defaultValue=""+i)}function ot(t){var e=t.textContent;e===t._wrapperState.initialValue&&""!==e&&null!==e&&(t.value=e)}function at(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function lt(t,e){return null==t||"http://www.w3.org/1999/xhtml"===t?at(e):"http://www.w3.org/2000/svg"===t&&"foreignObject"===e?"http://www.w3.org/1999/xhtml":t}var ct,ut,ht=(ut=function(t,e){if("http://www.w3.org/2000/svg"!==t.namespaceURI||"innerHTML"in t)t.innerHTML=e;else{for((ct=ct||document.createElement("div")).innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=ct.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,e,n,i){MSApp.execUnsafeLocalFunction((function(){return ut(t,e)}))}:ut);function dt(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&3===n.nodeType)return void(n.nodeValue=e)}t.textContent=e}var ft={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},pt=["Webkit","ms","Moz","O"];function gt(t,e,n){return null==e||"boolean"===typeof e||""===e?"":n||"number"!==typeof e||0===e||ft.hasOwnProperty(t)&&ft[t]?(""+e).trim():e+"px"}function mt(t,e){for(var n in t=t.style,e)if(e.hasOwnProperty(n)){var i=0===n.indexOf("--"),r=gt(n,e[n],i);"float"===n&&(n="cssFloat"),i?t.setProperty(n,r):t[n]=r}}Object.keys(ft).forEach((function(t){pt.forEach((function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),ft[e]=ft[t]}))}));var yt=z({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 bt(t,e){if(e){if(yt[t]&&(null!=e.children||null!=e.dangerouslySetInnerHTML))throw Error(s(137,t));if(null!=e.dangerouslySetInnerHTML){if(null!=e.children)throw Error(s(60));if("object"!==typeof e.dangerouslySetInnerHTML||!("__html"in e.dangerouslySetInnerHTML))throw Error(s(61))}if(null!=e.style&&"object"!==typeof e.style)throw Error(s(62))}}function vt(t,e){if(-1===t.indexOf("-"))return"string"===typeof e.is;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 xt=null;function _t(t){return(t=t.target||t.srcElement||window).correspondingUseElement&&(t=t.correspondingUseElement),3===t.nodeType?t.parentNode:t}var wt=null,kt=null,St=null;function Et(t){if(t=vr(t)){if("function"!==typeof wt)throw Error(s(280));var e=t.stateNode;e&&(e=_r(e),wt(t.stateNode,t.type,e))}}function Ct(t){kt?St?St.push(t):St=[t]:kt=t}function Ot(){if(kt){var t=kt,e=St;if(St=kt=null,Et(t),e)for(t=0;t<e.length;t++)Et(e[t])}}function Tt(t,e){return t(e)}function Mt(){}var Pt=!1;function Nt(t,e,n){if(Pt)return t(e,n);Pt=!0;try{return Tt(t,e,n)}finally{Pt=!1,(null!==kt||null!==St)&&(Mt(),Ot())}}function Rt(t,e){var n=t.stateNode;if(null===n)return null;var i=_r(n);if(null===i)return null;n=i[e];t:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(i=!("button"===(t=t.type)||"input"===t||"select"===t||"textarea"===t)),t=!i;break t;default:t=!1}if(t)return null;if(n&&"function"!==typeof n)throw Error(s(231,e,typeof n));return n}var At=!1;if(u)try{var Lt={};Object.defineProperty(Lt,"passive",{get:function(){At=!0}}),window.addEventListener("test",Lt,Lt),window.removeEventListener("test",Lt,Lt)}catch(ut){At=!1}function Dt(t,e,n,i,r,s,o,a,l){var c=Array.prototype.slice.call(arguments,3);try{e.apply(n,c)}catch(u){this.onError(u)}}var jt=!1,zt=null,It=!1,Ft=null,Bt={onError:function(t){jt=!0,zt=t}};function Ut(t,e,n,i,r,s,o,a,l){jt=!1,zt=null,Dt.apply(Bt,arguments)}function Ht(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do{0!==(4098&(e=t).flags)&&(n=e.return),t=e.return}while(t)}return 3===e.tag?n:null}function Wt(t){if(13===t.tag){var e=t.memoizedState;if(null===e&&(null!==(t=t.alternate)&&(e=t.memoizedState)),null!==e)return e.dehydrated}return null}function Vt(t){if(Ht(t)!==t)throw Error(s(188))}function $t(t){return null!==(t=function(t){var e=t.alternate;if(!e){if(null===(e=Ht(t)))throw Error(s(188));return e!==t?null:t}for(var n=t,i=e;;){var r=n.return;if(null===r)break;var o=r.alternate;if(null===o){if(null!==(i=r.return)){n=i;continue}break}if(r.child===o.child){for(o=r.child;o;){if(o===n)return Vt(r),t;if(o===i)return Vt(r),e;o=o.sibling}throw Error(s(188))}if(n.return!==i.return)n=r,i=o;else{for(var a=!1,l=r.child;l;){if(l===n){a=!0,n=r,i=o;break}if(l===i){a=!0,i=r,n=o;break}l=l.sibling}if(!a){for(l=o.child;l;){if(l===n){a=!0,n=o,i=r;break}if(l===i){a=!0,i=o,n=r;break}l=l.sibling}if(!a)throw Error(s(189))}}if(n.alternate!==i)throw Error(s(190))}if(3!==n.tag)throw Error(s(188));return n.stateNode.current===n?t:e}(t))?qt(t):null}function qt(t){if(5===t.tag||6===t.tag)return t;for(t=t.child;null!==t;){var e=qt(t);if(null!==e)return e;t=t.sibling}return null}var Yt=r.unstable_scheduleCallback,Kt=r.unstable_cancelCallback,Qt=r.unstable_shouldYield,Xt=r.unstable_requestPaint,Jt=r.unstable_now,Gt=r.unstable_getCurrentPriorityLevel,Zt=r.unstable_ImmediatePriority,te=r.unstable_UserBlockingPriority,ee=r.unstable_NormalPriority,ne=r.unstable_LowPriority,ie=r.unstable_IdlePriority,re=null,se=null;var oe=Math.clz32?Math.clz32:function(t){return t>>>=0,0===t?32:31-(ae(t)/le|0)|0},ae=Math.log,le=Math.LN2;var ce=64,ue=4194304;function he(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 4194240&t;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&t;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function de(t,e){var n=t.pendingLanes;if(0===n)return 0;var i=0,r=t.suspendedLanes,s=t.pingedLanes,o=268435455&n;if(0!==o){var a=o&~r;0!==a?i=he(a):0!==(s&=o)&&(i=he(s))}else 0!==(o=n&~r)?i=he(o):0!==s&&(i=he(s));if(0===i)return 0;if(0!==e&&e!==i&&0===(e&r)&&((r=i&-i)>=(s=e&-e)||16===r&&0!==(4194240&s)))return e;if(0!==(4&i)&&(i|=16&n),0!==(e=t.entangledLanes))for(t=t.entanglements,e&=i;0<e;)r=1<<(n=31-oe(e)),i|=t[n],e&=~r;return i}function fe(t,e){switch(t){case 1:case 2:case 4:return e+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;default:return-1}}function pe(t){return 0!==(t=-1073741825&t.pendingLanes)?t:1073741824&t?1073741824:0}function ge(){var t=ce;return 0===(4194240&(ce<<=1))&&(ce=64),t}function me(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function ye(t,e,n){t.pendingLanes|=e,536870912!==e&&(t.suspendedLanes=0,t.pingedLanes=0),(t=t.eventTimes)[e=31-oe(e)]=n}function be(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var i=31-oe(n),r=1<<i;r&e|t[i]&e&&(t[i]|=e),n&=~r}}var ve=0;function xe(t){return 1<(t&=-t)?4<t?0!==(268435455&t)?16:536870912:4:1}var _e,we,ke,Se,Ee,Ce=!1,Oe=[],Te=null,Me=null,Pe=null,Ne=new Map,Re=new Map,Ae=[],Le="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function De(t,e){switch(t){case"focusin":case"focusout":Te=null;break;case"dragenter":case"dragleave":Me=null;break;case"mouseover":case"mouseout":Pe=null;break;case"pointerover":case"pointerout":Ne.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Re.delete(e.pointerId)}}function je(t,e,n,i,r,s){return null===t||t.nativeEvent!==s?(t={blockedOn:e,domEventName:n,eventSystemFlags:i,nativeEvent:s,targetContainers:[r]},null!==e&&(null!==(e=vr(e))&&we(e)),t):(t.eventSystemFlags|=i,e=t.targetContainers,null!==r&&-1===e.indexOf(r)&&e.push(r),t)}function ze(t){var e=br(t.target);if(null!==e){var n=Ht(e);if(null!==n)if(13===(e=n.tag)){if(null!==(e=Wt(n)))return t.blockedOn=e,void Ee(t.priority,(function(){ke(n)}))}else if(3===e&&n.stateNode.current.memoizedState.isDehydrated)return void(t.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}t.blockedOn=null}function Ie(t){if(null!==t.blockedOn)return!1;for(var e=t.targetContainers;0<e.length;){var n=Qe(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(null!==n)return null!==(e=vr(n))&&we(e),t.blockedOn=n,!1;var i=new(n=t.nativeEvent).constructor(n.type,n);xt=i,n.target.dispatchEvent(i),xt=null,e.shift()}return!0}function Fe(t,e,n){Ie(t)&&n.delete(e)}function Be(){Ce=!1,null!==Te&&Ie(Te)&&(Te=null),null!==Me&&Ie(Me)&&(Me=null),null!==Pe&&Ie(Pe)&&(Pe=null),Ne.forEach(Fe),Re.forEach(Fe)}function Ue(t,e){t.blockedOn===e&&(t.blockedOn=null,Ce||(Ce=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,Be)))}function He(t){function e(e){return Ue(e,t)}if(0<Oe.length){Ue(Oe[0],t);for(var n=1;n<Oe.length;n++){var i=Oe[n];i.blockedOn===t&&(i.blockedOn=null)}}for(null!==Te&&Ue(Te,t),null!==Me&&Ue(Me,t),null!==Pe&&Ue(Pe,t),Ne.forEach(e),Re.forEach(e),n=0;n<Ae.length;n++)(i=Ae[n]).blockedOn===t&&(i.blockedOn=null);for(;0<Ae.length&&null===(n=Ae[0]).blockedOn;)ze(n),null===n.blockedOn&&Ae.shift()}var We=x.ReactCurrentBatchConfig,Ve=!0;function $e(t,e,n,i){var r=ve,s=We.transition;We.transition=null;try{ve=1,Ye(t,e,n,i)}finally{ve=r,We.transition=s}}function qe(t,e,n,i){var r=ve,s=We.transition;We.transition=null;try{ve=4,Ye(t,e,n,i)}finally{ve=r,We.transition=s}}function Ye(t,e,n,i){if(Ve){var r=Qe(t,e,n,i);if(null===r)Vi(t,e,i,Ke,n),De(t,i);else if(function(t,e,n,i,r){switch(e){case"focusin":return Te=je(Te,t,e,n,i,r),!0;case"dragenter":return Me=je(Me,t,e,n,i,r),!0;case"mouseover":return Pe=je(Pe,t,e,n,i,r),!0;case"pointerover":var s=r.pointerId;return Ne.set(s,je(Ne.get(s)||null,t,e,n,i,r)),!0;case"gotpointercapture":return s=r.pointerId,Re.set(s,je(Re.get(s)||null,t,e,n,i,r)),!0}return!1}(r,t,e,n,i))i.stopPropagation();else if(De(t,i),4&e&&-1<Le.indexOf(t)){for(;null!==r;){var s=vr(r);if(null!==s&&_e(s),null===(s=Qe(t,e,n,i))&&Vi(t,e,i,Ke,n),s===r)break;r=s}null!==r&&i.stopPropagation()}else Vi(t,e,i,null,n)}}var Ke=null;function Qe(t,e,n,i){if(Ke=null,null!==(t=br(t=_t(i))))if(null===(e=Ht(t)))t=null;else if(13===(n=e.tag)){if(null!==(t=Wt(e)))return t;t=null}else if(3===n){if(e.stateNode.current.memoizedState.isDehydrated)return 3===e.tag?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return Ke=t,null}function Xe(t){switch(t){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Gt()){case Zt:return 1;case te:return 4;case ee:case ne:return 16;case ie:return 536870912;default:return 16}default:return 16}}var Je=null,Ge=null,Ze=null;function tn(){if(Ze)return Ze;var t,e,n=Ge,i=n.length,r="value"in Je?Je.value:Je.textContent,s=r.length;for(t=0;t<i&&n[t]===r[t];t++);var o=i-t;for(e=1;e<=o&&n[i-e]===r[s-e];e++);return Ze=r.slice(t,1<e?1-e:void 0)}function en(t){var e=t.keyCode;return"charCode"in t?0===(t=t.charCode)&&13===e&&(t=13):t=e,10===t&&(t=13),32<=t||13===t?t:0}function nn(){return!0}function rn(){return!1}function sn(t){function e(e,n,i,r,s){for(var o in this._reactName=e,this._targetInst=i,this.type=n,this.nativeEvent=r,this.target=s,this.currentTarget=null,t)t.hasOwnProperty(o)&&(e=t[o],this[o]=e?e(r):r[o]);return this.isDefaultPrevented=(null!=r.defaultPrevented?r.defaultPrevented:!1===r.returnValue)?nn:rn,this.isPropagationStopped=rn,this}return z(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var t=this.nativeEvent;t&&(t.preventDefault?t.preventDefault():"unknown"!==typeof t.returnValue&&(t.returnValue=!1),this.isDefaultPrevented=nn)},stopPropagation:function(){var t=this.nativeEvent;t&&(t.stopPropagation?t.stopPropagation():"unknown"!==typeof t.cancelBubble&&(t.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),e}var on,an,ln,cn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},un=sn(cn),hn=z({},cn,{view:0,detail:0}),dn=sn(hn),fn=z({},hn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:En,button:0,buttons:0,relatedTarget:function(t){return void 0===t.relatedTarget?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==ln&&(ln&&"mousemove"===t.type?(on=t.screenX-ln.screenX,an=t.screenY-ln.screenY):an=on=0,ln=t),on)},movementY:function(t){return"movementY"in t?t.movementY:an}}),pn=sn(fn),gn=sn(z({},fn,{dataTransfer:0})),mn=sn(z({},hn,{relatedTarget:0})),yn=sn(z({},cn,{animationName:0,elapsedTime:0,pseudoElement:0})),bn=z({},cn,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),vn=sn(bn),xn=sn(z({},cn,{data:0})),_n={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},wn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},kn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Sn(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):!!(t=kn[t])&&!!e[t]}function En(){return Sn}var Cn=z({},hn,{key:function(t){if(t.key){var e=_n[t.key]||t.key;if("Unidentified"!==e)return e}return"keypress"===t.type?13===(t=en(t))?"Enter":String.fromCharCode(t):"keydown"===t.type||"keyup"===t.type?wn[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:En,charCode:function(t){return"keypress"===t.type?en(t):0},keyCode:function(t){return"keydown"===t.type||"keyup"===t.type?t.keyCode:0},which:function(t){return"keypress"===t.type?en(t):"keydown"===t.type||"keyup"===t.type?t.keyCode:0}}),On=sn(Cn),Tn=sn(z({},fn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Mn=sn(z({},hn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:En})),Pn=sn(z({},cn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Nn=z({},fn,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),Rn=sn(Nn),An=[9,13,27,32],Ln=u&&"CompositionEvent"in window,Dn=null;u&&"documentMode"in document&&(Dn=document.documentMode);var jn=u&&"TextEvent"in window&&!Dn,zn=u&&(!Ln||Dn&&8<Dn&&11>=Dn),In=String.fromCharCode(32),Fn=!1;function Bn(t,e){switch(t){case"keyup":return-1!==An.indexOf(e.keyCode);case"keydown":return 229!==e.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Un(t){return"object"===typeof(t=t.detail)&&"data"in t?t.data:null}var Hn=!1;var Wn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Vn(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return"input"===e?!!Wn[t.type]:"textarea"===e}function $n(t,e,n,i){Ct(i),0<(e=qi(e,"onChange")).length&&(n=new un("onChange","change",null,n,i),t.push({event:n,listeners:e}))}var qn=null,Yn=null;function Kn(t){Ii(t,0)}function Qn(t){if(Y(xr(t)))return t}function Xn(t,e){if("change"===t)return e}var Jn=!1;if(u){var Gn;if(u){var Zn="oninput"in document;if(!Zn){var ti=document.createElement("div");ti.setAttribute("oninput","return;"),Zn="function"===typeof ti.oninput}Gn=Zn}else Gn=!1;Jn=Gn&&(!document.documentMode||9<document.documentMode)}function ei(){qn&&(qn.detachEvent("onpropertychange",ni),Yn=qn=null)}function ni(t){if("value"===t.propertyName&&Qn(Yn)){var e=[];$n(e,Yn,t,_t(t)),Nt(Kn,e)}}function ii(t,e,n){"focusin"===t?(ei(),Yn=n,(qn=e).attachEvent("onpropertychange",ni)):"focusout"===t&&ei()}function ri(t){if("selectionchange"===t||"keyup"===t||"keydown"===t)return Qn(Yn)}function si(t,e){if("click"===t)return Qn(e)}function oi(t,e){if("input"===t||"change"===t)return Qn(e)}var ai="function"===typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t===1/e)||t!==t&&e!==e};function li(t,e){if(ai(t,e))return!0;if("object"!==typeof t||null===t||"object"!==typeof e||null===e)return!1;var n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(i=0;i<n.length;i++){var r=n[i];if(!h.call(e,r)||!ai(t[r],e[r]))return!1}return!0}function ci(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function ui(t,e){var n,i=ci(t);for(t=0;i;){if(3===i.nodeType){if(n=t+i.textContent.length,t<=e&&n>=e)return{node:i,offset:e-t};t=n}t:{for(;i;){if(i.nextSibling){i=i.nextSibling;break t}i=i.parentNode}i=void 0}i=ci(i)}}function hi(t,e){return!(!t||!e)&&(t===e||(!t||3!==t.nodeType)&&(e&&3===e.nodeType?hi(t,e.parentNode):"contains"in t?t.contains(e):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(e))))}function di(){for(var t=window,e=K();e instanceof t.HTMLIFrameElement;){try{var n="string"===typeof e.contentWindow.location.href}catch(i){n=!1}if(!n)break;e=K((t=e.contentWindow).document)}return e}function fi(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&("input"===e&&("text"===t.type||"search"===t.type||"tel"===t.type||"url"===t.type||"password"===t.type)||"textarea"===e||"true"===t.contentEditable)}function pi(t){var e=di(),n=t.focusedElem,i=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&hi(n.ownerDocument.documentElement,n)){if(null!==i&&fi(n))if(e=i.start,void 0===(t=i.end)&&(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).getSelection){t=t.getSelection();var r=n.textContent.length,s=Math.min(i.start,r);i=void 0===i.end?s:Math.min(i.end,r),!t.extend&&s>i&&(r=i,i=s,s=r),r=ui(n,s);var o=ui(n,i);r&&o&&(1!==t.rangeCount||t.anchorNode!==r.node||t.anchorOffset!==r.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&((e=e.createRange()).setStart(r.node,r.offset),t.removeAllRanges(),s>i?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}for(e=[],t=n;t=t.parentNode;)1===t.nodeType&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for("function"===typeof n.focus&&n.focus(),n=0;n<e.length;n++)(t=e[n]).element.scrollLeft=t.left,t.element.scrollTop=t.top}}var gi=u&&"documentMode"in document&&11>=document.documentMode,mi=null,yi=null,bi=null,vi=!1;function xi(t,e,n){var i=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;vi||null==mi||mi!==K(i)||("selectionStart"in(i=mi)&&fi(i)?i={start:i.selectionStart,end:i.selectionEnd}:i={anchorNode:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset},bi&&li(bi,i)||(bi=i,0<(i=qi(yi,"onSelect")).length&&(e=new un("onSelect","select",null,e,n),t.push({event:e,listeners:i}),e.target=mi)))}function _i(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var wi={animationend:_i("Animation","AnimationEnd"),animationiteration:_i("Animation","AnimationIteration"),animationstart:_i("Animation","AnimationStart"),transitionend:_i("Transition","TransitionEnd")},ki={},Si={};function Ei(t){if(ki[t])return ki[t];if(!wi[t])return t;var e,n=wi[t];for(e in n)if(n.hasOwnProperty(e)&&e in Si)return ki[t]=n[e];return t}u&&(Si=document.createElement("div").style,"AnimationEvent"in window||(delete wi.animationend.animation,delete wi.animationiteration.animation,delete wi.animationstart.animation),"TransitionEvent"in window||delete wi.transitionend.transition);var Ci=Ei("animationend"),Oi=Ei("animationiteration"),Ti=Ei("animationstart"),Mi=Ei("transitionend"),Pi=new Map,Ni="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Ri(t,e){Pi.set(t,e),l(e,[t])}for(var Ai=0;Ai<Ni.length;Ai++){var Li=Ni[Ai];Ri(Li.toLowerCase(),"on"+(Li[0].toUpperCase()+Li.slice(1)))}Ri(Ci,"onAnimationEnd"),Ri(Oi,"onAnimationIteration"),Ri(Ti,"onAnimationStart"),Ri("dblclick","onDoubleClick"),Ri("focusin","onFocus"),Ri("focusout","onBlur"),Ri(Mi,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Di="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),ji=new Set("cancel close invalid load scroll toggle".split(" ").concat(Di));function zi(t,e,n){var i=t.type||"unknown-event";t.currentTarget=n,function(t,e,n,i,r,o,a,l,c){if(Ut.apply(this,arguments),jt){if(!jt)throw Error(s(198));var u=zt;jt=!1,zt=null,It||(It=!0,Ft=u)}}(i,e,void 0,t),t.currentTarget=null}function Ii(t,e){e=0!==(4&e);for(var n=0;n<t.length;n++){var i=t[n],r=i.event;i=i.listeners;t:{var s=void 0;if(e)for(var o=i.length-1;0<=o;o--){var a=i[o],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==s&&r.isPropagationStopped())break t;zi(r,a,c),s=l}else for(o=0;o<i.length;o++){if(l=(a=i[o]).instance,c=a.currentTarget,a=a.listener,l!==s&&r.isPropagationStopped())break t;zi(r,a,c),s=l}}}if(It)throw t=Ft,It=!1,Ft=null,t}function Fi(t,e){var n=e[gr];void 0===n&&(n=e[gr]=new Set);var i=t+"__bubble";n.has(i)||(Wi(e,t,2,!1),n.add(i))}function Bi(t,e,n){var i=0;e&&(i|=4),Wi(n,t,i,e)}var Ui="_reactListening"+Math.random().toString(36).slice(2);function Hi(t){if(!t[Ui]){t[Ui]=!0,o.forEach((function(e){"selectionchange"!==e&&(ji.has(e)||Bi(e,!1,t),Bi(e,!0,t))}));var e=9===t.nodeType?t:t.ownerDocument;null===e||e[Ui]||(e[Ui]=!0,Bi("selectionchange",!1,e))}}function Wi(t,e,n,i){switch(Xe(e)){case 1:var r=$e;break;case 4:r=qe;break;default:r=Ye}n=r.bind(null,e,n,t),r=void 0,!At||"touchstart"!==e&&"touchmove"!==e&&"wheel"!==e||(r=!0),i?void 0!==r?t.addEventListener(e,n,{capture:!0,passive:r}):t.addEventListener(e,n,!0):void 0!==r?t.addEventListener(e,n,{passive:r}):t.addEventListener(e,n,!1)}function Vi(t,e,n,i,r){var s=i;if(0===(1&e)&&0===(2&e)&&null!==i)t:for(;;){if(null===i)return;var o=i.tag;if(3===o||4===o){var a=i.stateNode.containerInfo;if(a===r||8===a.nodeType&&a.parentNode===r)break;if(4===o)for(o=i.return;null!==o;){var l=o.tag;if((3===l||4===l)&&((l=o.stateNode.containerInfo)===r||8===l.nodeType&&l.parentNode===r))return;o=o.return}for(;null!==a;){if(null===(o=br(a)))return;if(5===(l=o.tag)||6===l){i=s=o;continue t}a=a.parentNode}}i=i.return}Nt((function(){var i=s,r=_t(n),o=[];t:{var a=Pi.get(t);if(void 0!==a){var l=un,c=t;switch(t){case"keypress":if(0===en(n))break t;case"keydown":case"keyup":l=On;break;case"focusin":c="focus",l=mn;break;case"focusout":c="blur",l=mn;break;case"beforeblur":case"afterblur":l=mn;break;case"click":if(2===n.button)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=pn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=gn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Mn;break;case Ci:case Oi:case Ti:l=yn;break;case Mi:l=Pn;break;case"scroll":l=dn;break;case"wheel":l=Rn;break;case"copy":case"cut":case"paste":l=vn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Tn}var u=0!==(4&e),h=!u&&"scroll"===t,d=u?null!==a?a+"Capture":null:a;u=[];for(var f,p=i;null!==p;){var g=(f=p).stateNode;if(5===f.tag&&null!==g&&(f=g,null!==d&&(null!=(g=Rt(p,d))&&u.push($i(p,g,f)))),h)break;p=p.return}0<u.length&&(a=new l(a,c,null,n,r),o.push({event:a,listeners:u}))}}if(0===(7&e)){if(l="mouseout"===t||"pointerout"===t,(!(a="mouseover"===t||"pointerover"===t)||n===xt||!(c=n.relatedTarget||n.fromElement)||!br(c)&&!c[pr])&&(l||a)&&(a=r.window===r?r:(a=r.ownerDocument)?a.defaultView||a.parentWindow:window,l?(l=i,null!==(c=(c=n.relatedTarget||n.toElement)?br(c):null)&&(c!==(h=Ht(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=i),l!==c)){if(u=pn,g="onMouseLeave",d="onMouseEnter",p="mouse","pointerout"!==t&&"pointerover"!==t||(u=Tn,g="onPointerLeave",d="onPointerEnter",p="pointer"),h=null==l?a:xr(l),f=null==c?a:xr(c),(a=new u(g,p+"leave",l,n,r)).target=h,a.relatedTarget=f,g=null,br(r)===i&&((u=new u(d,p+"enter",c,n,r)).target=f,u.relatedTarget=h,g=u),h=g,l&&c)t:{for(d=c,p=0,f=u=l;f;f=Yi(f))p++;for(f=0,g=d;g;g=Yi(g))f++;for(;0<p-f;)u=Yi(u),p--;for(;0<f-p;)d=Yi(d),f--;for(;p--;){if(u===d||null!==d&&u===d.alternate)break t;u=Yi(u),d=Yi(d)}u=null}else u=null;null!==l&&Ki(o,a,l,u,!1),null!==c&&null!==h&&Ki(o,h,c,u,!0)}if("select"===(l=(a=i?xr(i):window).nodeName&&a.nodeName.toLowerCase())||"input"===l&&"file"===a.type)var m=Xn;else if(Vn(a))if(Jn)m=oi;else{m=ri;var y=ii}else(l=a.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===a.type||"radio"===a.type)&&(m=si);switch(m&&(m=m(t,i))?$n(o,m,n,r):(y&&y(t,a,i),"focusout"===t&&(y=a._wrapperState)&&y.controlled&&"number"===a.type&&tt(a,"number",a.value)),y=i?xr(i):window,t){case"focusin":(Vn(y)||"true"===y.contentEditable)&&(mi=y,yi=i,bi=null);break;case"focusout":bi=yi=mi=null;break;case"mousedown":vi=!0;break;case"contextmenu":case"mouseup":case"dragend":vi=!1,xi(o,n,r);break;case"selectionchange":if(gi)break;case"keydown":case"keyup":xi(o,n,r)}var b;if(Ln)t:{switch(t){case"compositionstart":var v="onCompositionStart";break t;case"compositionend":v="onCompositionEnd";break t;case"compositionupdate":v="onCompositionUpdate";break t}v=void 0}else Hn?Bn(t,n)&&(v="onCompositionEnd"):"keydown"===t&&229===n.keyCode&&(v="onCompositionStart");v&&(zn&&"ko"!==n.locale&&(Hn||"onCompositionStart"!==v?"onCompositionEnd"===v&&Hn&&(b=tn()):(Ge="value"in(Je=r)?Je.value:Je.textContent,Hn=!0)),0<(y=qi(i,v)).length&&(v=new xn(v,t,null,n,r),o.push({event:v,listeners:y}),b?v.data=b:null!==(b=Un(n))&&(v.data=b))),(b=jn?function(t,e){switch(t){case"compositionend":return Un(e);case"keypress":return 32!==e.which?null:(Fn=!0,In);case"textInput":return(t=e.data)===In&&Fn?null:t;default:return null}}(t,n):function(t,e){if(Hn)return"compositionend"===t||!Ln&&Bn(t,e)?(t=tn(),Ze=Ge=Je=null,Hn=!1,t):null;switch(t){case"paste":default:return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return zn&&"ko"!==e.locale?null:e.data}}(t,n))&&(0<(i=qi(i,"onBeforeInput")).length&&(r=new xn("onBeforeInput","beforeinput",null,n,r),o.push({event:r,listeners:i}),r.data=b))}Ii(o,e)}))}function $i(t,e,n){return{instance:t,listener:e,currentTarget:n}}function qi(t,e){for(var n=e+"Capture",i=[];null!==t;){var r=t,s=r.stateNode;5===r.tag&&null!==s&&(r=s,null!=(s=Rt(t,n))&&i.unshift($i(t,s,r)),null!=(s=Rt(t,e))&&i.push($i(t,s,r))),t=t.return}return i}function Yi(t){if(null===t)return null;do{t=t.return}while(t&&5!==t.tag);return t||null}function Ki(t,e,n,i,r){for(var s=e._reactName,o=[];null!==n&&n!==i;){var a=n,l=a.alternate,c=a.stateNode;if(null!==l&&l===i)break;5===a.tag&&null!==c&&(a=c,r?null!=(l=Rt(n,s))&&o.unshift($i(n,l,a)):r||null!=(l=Rt(n,s))&&o.push($i(n,l,a))),n=n.return}0!==o.length&&t.push({event:e,listeners:o})}var Qi=/\r\n?/g,Xi=/\u0000|\uFFFD/g;function Ji(t){return("string"===typeof t?t:""+t).replace(Qi,"\n").replace(Xi,"")}function Gi(t,e,n){if(e=Ji(e),Ji(t)!==e&&n)throw Error(s(425))}function Zi(){}var tr=null,er=null;function nr(t,e){return"textarea"===t||"noscript"===t||"string"===typeof e.children||"number"===typeof e.children||"object"===typeof e.dangerouslySetInnerHTML&&null!==e.dangerouslySetInnerHTML&&null!=e.dangerouslySetInnerHTML.__html}var ir="function"===typeof setTimeout?setTimeout:void 0,rr="function"===typeof clearTimeout?clearTimeout:void 0,sr="function"===typeof Promise?Promise:void 0,or="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof sr?function(t){return sr.resolve(null).then(t).catch(ar)}:ir;function ar(t){setTimeout((function(){throw t}))}function lr(t,e){var n=e,i=0;do{var r=n.nextSibling;if(t.removeChild(n),r&&8===r.nodeType)if("/$"===(n=r.data)){if(0===i)return t.removeChild(r),void He(e);i--}else"$"!==n&&"$?"!==n&&"$!"!==n||i++;n=r}while(n);He(e)}function cr(t){for(;null!=t;t=t.nextSibling){var e=t.nodeType;if(1===e||3===e)break;if(8===e){if("$"===(e=t.data)||"$!"===e||"$?"===e)break;if("/$"===e)return null}}return t}function ur(t){t=t.previousSibling;for(var e=0;t;){if(8===t.nodeType){var n=t.data;if("$"===n||"$!"===n||"$?"===n){if(0===e)return t;e--}else"/$"===n&&e++}t=t.previousSibling}return null}var hr=Math.random().toString(36).slice(2),dr="__reactFiber$"+hr,fr="__reactProps$"+hr,pr="__reactContainer$"+hr,gr="__reactEvents$"+hr,mr="__reactListeners$"+hr,yr="__reactHandles$"+hr;function br(t){var e=t[dr];if(e)return e;for(var n=t.parentNode;n;){if(e=n[pr]||n[dr]){if(n=e.alternate,null!==e.child||null!==n&&null!==n.child)for(t=ur(t);null!==t;){if(n=t[dr])return n;t=ur(t)}return e}n=(t=n).parentNode}return null}function vr(t){return!(t=t[dr]||t[pr])||5!==t.tag&&6!==t.tag&&13!==t.tag&&3!==t.tag?null:t}function xr(t){if(5===t.tag||6===t.tag)return t.stateNode;throw Error(s(33))}function _r(t){return t[fr]||null}var wr=[],kr=-1;function Sr(t){return{current:t}}function Er(t){0>kr||(t.current=wr[kr],wr[kr]=null,kr--)}function Cr(t,e){kr++,wr[kr]=t.current,t.current=e}var Or={},Tr=Sr(Or),Mr=Sr(!1),Pr=Or;function Nr(t,e){var n=t.type.contextTypes;if(!n)return Or;var i=t.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===e)return i.__reactInternalMemoizedMaskedChildContext;var r,s={};for(r in n)s[r]=e[r];return i&&((t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=s),s}function Rr(t){return null!==(t=t.childContextTypes)&&void 0!==t}function Ar(){Er(Mr),Er(Tr)}function Lr(t,e,n){if(Tr.current!==Or)throw Error(s(168));Cr(Tr,e),Cr(Mr,n)}function Dr(t,e,n){var i=t.stateNode;if(e=e.childContextTypes,"function"!==typeof i.getChildContext)return n;for(var r in i=i.getChildContext())if(!(r in e))throw Error(s(108,W(t)||"Unknown",r));return z({},n,i)}function jr(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Or,Pr=Tr.current,Cr(Tr,t),Cr(Mr,Mr.current),!0}function zr(t,e,n){var i=t.stateNode;if(!i)throw Error(s(169));n?(t=Dr(t,e,Pr),i.__reactInternalMemoizedMergedChildContext=t,Er(Mr),Er(Tr),Cr(Tr,t)):Er(Mr),Cr(Mr,n)}var Ir=null,Fr=!1,Br=!1;function Ur(t){null===Ir?Ir=[t]:Ir.push(t)}function Hr(){if(!Br&&null!==Ir){Br=!0;var t=0,e=ve;try{var n=Ir;for(ve=1;t<n.length;t++){var i=n[t];do{i=i(!0)}while(null!==i)}Ir=null,Fr=!1}catch(r){throw null!==Ir&&(Ir=Ir.slice(t+1)),Yt(Zt,Hr),r}finally{ve=e,Br=!1}}return null}var Wr=[],Vr=0,$r=null,qr=0,Yr=[],Kr=0,Qr=null,Xr=1,Jr="";function Gr(t,e){Wr[Vr++]=qr,Wr[Vr++]=$r,$r=t,qr=e}function Zr(t,e,n){Yr[Kr++]=Xr,Yr[Kr++]=Jr,Yr[Kr++]=Qr,Qr=t;var i=Xr;t=Jr;var r=32-oe(i)-1;i&=~(1<<r),n+=1;var s=32-oe(e)+r;if(30<s){var o=r-r%5;s=(i&(1<<o)-1).toString(32),i>>=o,r-=o,Xr=1<<32-oe(e)+r|n<<r|i,Jr=s+t}else Xr=1<<s|n<<r|i,Jr=t}function ts(t){null!==t.return&&(Gr(t,1),Zr(t,1,0))}function es(t){for(;t===$r;)$r=Wr[--Vr],Wr[Vr]=null,qr=Wr[--Vr],Wr[Vr]=null;for(;t===Qr;)Qr=Yr[--Kr],Yr[Kr]=null,Jr=Yr[--Kr],Yr[Kr]=null,Xr=Yr[--Kr],Yr[Kr]=null}var ns=null,is=null,rs=!1,ss=null;function os(t,e){var n=Nc(5,null,null,0);n.elementType="DELETED",n.stateNode=e,n.return=t,null===(e=t.deletions)?(t.deletions=[n],t.flags|=16):e.push(n)}function as(t,e){switch(t.tag){case 5:var n=t.type;return null!==(e=1!==e.nodeType||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e)&&(t.stateNode=e,ns=t,is=cr(e.firstChild),!0);case 6:return null!==(e=""===t.pendingProps||3!==e.nodeType?null:e)&&(t.stateNode=e,ns=t,is=null,!0);case 13:return null!==(e=8!==e.nodeType?null:e)&&(n=null!==Qr?{id:Xr,overflow:Jr}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},(n=Nc(18,null,null,0)).stateNode=e,n.return=t,t.child=n,ns=t,is=null,!0);default:return!1}}function ls(t){return 0!==(1&t.mode)&&0===(128&t.flags)}function cs(t){if(rs){var e=is;if(e){var n=e;if(!as(t,e)){if(ls(t))throw Error(s(418));e=cr(n.nextSibling);var i=ns;e&&as(t,e)?os(i,n):(t.flags=-4097&t.flags|2,rs=!1,ns=t)}}else{if(ls(t))throw Error(s(418));t.flags=-4097&t.flags|2,rs=!1,ns=t}}}function us(t){for(t=t.return;null!==t&&5!==t.tag&&3!==t.tag&&13!==t.tag;)t=t.return;ns=t}function hs(t){if(t!==ns)return!1;if(!rs)return us(t),rs=!0,!1;var e;if((e=3!==t.tag)&&!(e=5!==t.tag)&&(e="head"!==(e=t.type)&&"body"!==e&&!nr(t.type,t.memoizedProps)),e&&(e=is)){if(ls(t))throw ds(),Error(s(418));for(;e;)os(t,e),e=cr(e.nextSibling)}if(us(t),13===t.tag){if(!(t=null!==(t=t.memoizedState)?t.dehydrated:null))throw Error(s(317));t:{for(t=t.nextSibling,e=0;t;){if(8===t.nodeType){var n=t.data;if("/$"===n){if(0===e){is=cr(t.nextSibling);break t}e--}else"$"!==n&&"$!"!==n&&"$?"!==n||e++}t=t.nextSibling}is=null}}else is=ns?cr(t.stateNode.nextSibling):null;return!0}function ds(){for(var t=is;t;)t=cr(t.nextSibling)}function fs(){is=ns=null,rs=!1}function ps(t){null===ss?ss=[t]:ss.push(t)}var gs=x.ReactCurrentBatchConfig;function ms(t,e,n){if(null!==(t=n.ref)&&"function"!==typeof t&&"object"!==typeof t){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(s(309));var i=n.stateNode}if(!i)throw Error(s(147,t));var r=i,o=""+t;return null!==e&&null!==e.ref&&"function"===typeof e.ref&&e.ref._stringRef===o?e.ref:(e=function(t){var e=r.refs;null===t?delete e[o]:e[o]=t},e._stringRef=o,e)}if("string"!==typeof t)throw Error(s(284));if(!n._owner)throw Error(s(290,t))}return t}function ys(t,e){throw t=Object.prototype.toString.call(e),Error(s(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function bs(t){return(0,t._init)(t._payload)}function vs(t){function e(e,n){if(t){var i=e.deletions;null===i?(e.deletions=[n],e.flags|=16):i.push(n)}}function n(n,i){if(!t)return null;for(;null!==i;)e(n,i),i=i.sibling;return null}function i(t,e){for(t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function r(t,e){return(t=Ac(t,e)).index=0,t.sibling=null,t}function o(e,n,i){return e.index=i,t?null!==(i=e.alternate)?(i=i.index)<n?(e.flags|=2,n):i:(e.flags|=2,n):(e.flags|=1048576,n)}function a(e){return t&&null===e.alternate&&(e.flags|=2),e}function l(t,e,n,i){return null===e||6!==e.tag?((e=zc(n,t.mode,i)).return=t,e):((e=r(e,n)).return=t,e)}function c(t,e,n,i){var s=n.type;return s===k?h(t,e,n.props.children,i,n.key):null!==e&&(e.elementType===s||"object"===typeof s&&null!==s&&s.$$typeof===R&&bs(s)===e.type)?((i=r(e,n.props)).ref=ms(t,e,n),i.return=t,i):((i=Lc(n.type,n.key,n.props,null,t.mode,i)).ref=ms(t,e,n),i.return=t,i)}function u(t,e,n,i){return null===e||4!==e.tag||e.stateNode.containerInfo!==n.containerInfo||e.stateNode.implementation!==n.implementation?((e=Ic(n,t.mode,i)).return=t,e):((e=r(e,n.children||[])).return=t,e)}function h(t,e,n,i,s){return null===e||7!==e.tag?((e=Dc(n,t.mode,i,s)).return=t,e):((e=r(e,n)).return=t,e)}function d(t,e,n){if("string"===typeof e&&""!==e||"number"===typeof e)return(e=zc(""+e,t.mode,n)).return=t,e;if("object"===typeof e&&null!==e){switch(e.$$typeof){case _:return(n=Lc(e.type,e.key,e.props,null,t.mode,n)).ref=ms(t,null,e),n.return=t,n;case w:return(e=Ic(e,t.mode,n)).return=t,e;case R:return d(t,(0,e._init)(e._payload),n)}if(et(e)||D(e))return(e=Dc(e,t.mode,n,null)).return=t,e;ys(t,e)}return null}function f(t,e,n,i){var r=null!==e?e.key:null;if("string"===typeof n&&""!==n||"number"===typeof n)return null!==r?null:l(t,e,""+n,i);if("object"===typeof n&&null!==n){switch(n.$$typeof){case _:return n.key===r?c(t,e,n,i):null;case w:return n.key===r?u(t,e,n,i):null;case R:return f(t,e,(r=n._init)(n._payload),i)}if(et(n)||D(n))return null!==r?null:h(t,e,n,i,null);ys(t,n)}return null}function p(t,e,n,i,r){if("string"===typeof i&&""!==i||"number"===typeof i)return l(e,t=t.get(n)||null,""+i,r);if("object"===typeof i&&null!==i){switch(i.$$typeof){case _:return c(e,t=t.get(null===i.key?n:i.key)||null,i,r);case w:return u(e,t=t.get(null===i.key?n:i.key)||null,i,r);case R:return p(t,e,n,(0,i._init)(i._payload),r)}if(et(i)||D(i))return h(e,t=t.get(n)||null,i,r,null);ys(e,i)}return null}function g(r,s,a,l){for(var c=null,u=null,h=s,g=s=0,m=null;null!==h&&g<a.length;g++){h.index>g?(m=h,h=null):m=h.sibling;var y=f(r,h,a[g],l);if(null===y){null===h&&(h=m);break}t&&h&&null===y.alternate&&e(r,h),s=o(y,s,g),null===u?c=y:u.sibling=y,u=y,h=m}if(g===a.length)return n(r,h),rs&&Gr(r,g),c;if(null===h){for(;g<a.length;g++)null!==(h=d(r,a[g],l))&&(s=o(h,s,g),null===u?c=h:u.sibling=h,u=h);return rs&&Gr(r,g),c}for(h=i(r,h);g<a.length;g++)null!==(m=p(h,r,g,a[g],l))&&(t&&null!==m.alternate&&h.delete(null===m.key?g:m.key),s=o(m,s,g),null===u?c=m:u.sibling=m,u=m);return t&&h.forEach((function(t){return e(r,t)})),rs&&Gr(r,g),c}function m(r,a,l,c){var u=D(l);if("function"!==typeof u)throw Error(s(150));if(null==(l=u.call(l)))throw Error(s(151));for(var h=u=null,g=a,m=a=0,y=null,b=l.next();null!==g&&!b.done;m++,b=l.next()){g.index>m?(y=g,g=null):y=g.sibling;var v=f(r,g,b.value,c);if(null===v){null===g&&(g=y);break}t&&g&&null===v.alternate&&e(r,g),a=o(v,a,m),null===h?u=v:h.sibling=v,h=v,g=y}if(b.done)return n(r,g),rs&&Gr(r,m),u;if(null===g){for(;!b.done;m++,b=l.next())null!==(b=d(r,b.value,c))&&(a=o(b,a,m),null===h?u=b:h.sibling=b,h=b);return rs&&Gr(r,m),u}for(g=i(r,g);!b.done;m++,b=l.next())null!==(b=p(g,r,m,b.value,c))&&(t&&null!==b.alternate&&g.delete(null===b.key?m:b.key),a=o(b,a,m),null===h?u=b:h.sibling=b,h=b);return t&&g.forEach((function(t){return e(r,t)})),rs&&Gr(r,m),u}return function t(i,s,o,l){if("object"===typeof o&&null!==o&&o.type===k&&null===o.key&&(o=o.props.children),"object"===typeof o&&null!==o){switch(o.$$typeof){case _:t:{for(var c=o.key,u=s;null!==u;){if(u.key===c){if((c=o.type)===k){if(7===u.tag){n(i,u.sibling),(s=r(u,o.props.children)).return=i,i=s;break t}}else if(u.elementType===c||"object"===typeof c&&null!==c&&c.$$typeof===R&&bs(c)===u.type){n(i,u.sibling),(s=r(u,o.props)).ref=ms(i,u,o),s.return=i,i=s;break t}n(i,u);break}e(i,u),u=u.sibling}o.type===k?((s=Dc(o.props.children,i.mode,l,o.key)).return=i,i=s):((l=Lc(o.type,o.key,o.props,null,i.mode,l)).ref=ms(i,s,o),l.return=i,i=l)}return a(i);case w:t:{for(u=o.key;null!==s;){if(s.key===u){if(4===s.tag&&s.stateNode.containerInfo===o.containerInfo&&s.stateNode.implementation===o.implementation){n(i,s.sibling),(s=r(s,o.children||[])).return=i,i=s;break t}n(i,s);break}e(i,s),s=s.sibling}(s=Ic(o,i.mode,l)).return=i,i=s}return a(i);case R:return t(i,s,(u=o._init)(o._payload),l)}if(et(o))return g(i,s,o,l);if(D(o))return m(i,s,o,l);ys(i,o)}return"string"===typeof o&&""!==o||"number"===typeof o?(o=""+o,null!==s&&6===s.tag?(n(i,s.sibling),(s=r(s,o)).return=i,i=s):(n(i,s),(s=zc(o,i.mode,l)).return=i,i=s),a(i)):n(i,s)}}var xs=vs(!0),_s=vs(!1),ws=Sr(null),ks=null,Ss=null,Es=null;function Cs(){Es=Ss=ks=null}function Os(t){var e=ws.current;Er(ws),t._currentValue=e}function Ts(t,e,n){for(;null!==t;){var i=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,null!==i&&(i.childLanes|=e)):null!==i&&(i.childLanes&e)!==e&&(i.childLanes|=e),t===n)break;t=t.return}}function Ms(t,e){ks=t,Es=Ss=null,null!==(t=t.dependencies)&&null!==t.firstContext&&(0!==(t.lanes&e)&&(va=!0),t.firstContext=null)}function Ps(t){var e=t._currentValue;if(Es!==t)if(t={context:t,memoizedValue:e,next:null},null===Ss){if(null===ks)throw Error(s(308));Ss=t,ks.dependencies={lanes:0,firstContext:t}}else Ss=Ss.next=t;return e}var Ns=null;function Rs(t){null===Ns?Ns=[t]:Ns.push(t)}function As(t,e,n,i){var r=e.interleaved;return null===r?(n.next=n,Rs(e)):(n.next=r.next,r.next=n),e.interleaved=n,Ls(t,i)}function Ls(t,e){t.lanes|=e;var n=t.alternate;for(null!==n&&(n.lanes|=e),n=t,t=t.return;null!==t;)t.childLanes|=e,null!==(n=t.alternate)&&(n.childLanes|=e),n=t,t=t.return;return 3===n.tag?n.stateNode:null}var Ds=!1;function js(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function zs(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Is(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function Fs(t,e,n){var i=t.updateQueue;if(null===i)return null;if(i=i.shared,0!==(2&Tl)){var r=i.pending;return null===r?e.next=e:(e.next=r.next,r.next=e),i.pending=e,Ls(t,n)}return null===(r=i.interleaved)?(e.next=e,Rs(i)):(e.next=r.next,r.next=e),i.interleaved=e,Ls(t,n)}function Bs(t,e,n){if(null!==(e=e.updateQueue)&&(e=e.shared,0!==(4194240&n))){var i=e.lanes;n|=i&=t.pendingLanes,e.lanes=n,be(t,n)}}function Us(t,e){var n=t.updateQueue,i=t.alternate;if(null!==i&&n===(i=i.updateQueue)){var r=null,s=null;if(null!==(n=n.firstBaseUpdate)){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===s?r=s=o:s=s.next=o,n=n.next}while(null!==n);null===s?r=s=e:s=s.next=e}else r=s=e;return n={baseState:i.baseState,firstBaseUpdate:r,lastBaseUpdate:s,shared:i.shared,effects:i.effects},void(t.updateQueue=n)}null===(t=n.lastBaseUpdate)?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function Hs(t,e,n,i){var r=t.updateQueue;Ds=!1;var s=r.firstBaseUpdate,o=r.lastBaseUpdate,a=r.shared.pending;if(null!==a){r.shared.pending=null;var l=a,c=l.next;l.next=null,null===o?s=c:o.next=c,o=l;var u=t.alternate;null!==u&&((a=(u=u.updateQueue).lastBaseUpdate)!==o&&(null===a?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(null!==s){var h=r.baseState;for(o=0,u=c=l=null,a=s;;){var d=a.lane,f=a.eventTime;if((i&d)===d){null!==u&&(u=u.next={eventTime:f,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});t:{var p=t,g=a;switch(d=e,f=n,g.tag){case 1:if("function"===typeof(p=g.payload)){h=p.call(f,h,d);break t}h=p;break t;case 3:p.flags=-65537&p.flags|128;case 0:if(null===(d="function"===typeof(p=g.payload)?p.call(f,h,d):p)||void 0===d)break t;h=z({},h,d);break t;case 2:Ds=!0}}null!==a.callback&&0!==a.lane&&(t.flags|=64,null===(d=r.effects)?r.effects=[a]:d.push(a))}else f={eventTime:f,lane:d,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===u?(c=u=f,l=h):u=u.next=f,o|=d;if(null===(a=a.next)){if(null===(a=r.shared.pending))break;a=(d=a).next,d.next=null,r.lastBaseUpdate=d,r.shared.pending=null}}if(null===u&&(l=h),r.baseState=l,r.firstBaseUpdate=c,r.lastBaseUpdate=u,null!==(e=r.shared.interleaved)){r=e;do{o|=r.lane,r=r.next}while(r!==e)}else null===s&&(r.shared.lanes=0);jl|=o,t.lanes=o,t.memoizedState=h}}function Ws(t,e,n){if(t=e.effects,e.effects=null,null!==t)for(e=0;e<t.length;e++){var i=t[e],r=i.callback;if(null!==r){if(i.callback=null,i=n,"function"!==typeof r)throw Error(s(191,r));r.call(i)}}}var Vs={},$s=Sr(Vs),qs=Sr(Vs),Ys=Sr(Vs);function Ks(t){if(t===Vs)throw Error(s(174));return t}function Qs(t,e){switch(Cr(Ys,e),Cr(qs,t),Cr($s,Vs),t=e.nodeType){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:lt(null,"");break;default:e=lt(e=(t=8===t?e.parentNode:e).namespaceURI||null,t=t.tagName)}Er($s),Cr($s,e)}function Xs(){Er($s),Er(qs),Er(Ys)}function Js(t){Ks(Ys.current);var e=Ks($s.current),n=lt(e,t.type);e!==n&&(Cr(qs,t),Cr($s,n))}function Gs(t){qs.current===t&&(Er($s),Er(qs))}var Zs=Sr(0);function to(t){for(var e=t;null!==e;){if(13===e.tag){var n=e.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return e}else if(19===e.tag&&void 0!==e.memoizedProps.revealOrder){if(0!==(128&e.flags))return e}else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break;for(;null===e.sibling;){if(null===e.return||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var eo=[];function no(){for(var t=0;t<eo.length;t++)eo[t]._workInProgressVersionPrimary=null;eo.length=0}var io=x.ReactCurrentDispatcher,ro=x.ReactCurrentBatchConfig,so=0,oo=null,ao=null,lo=null,co=!1,uo=!1,ho=0,fo=0;function po(){throw Error(s(321))}function go(t,e){if(null===e)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!ai(t[n],e[n]))return!1;return!0}function mo(t,e,n,i,r,o){if(so=o,oo=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,io.current=null===t||null===t.memoizedState?Zo:ta,t=n(i,r),uo){o=0;do{if(uo=!1,ho=0,25<=o)throw Error(s(301));o+=1,lo=ao=null,e.updateQueue=null,io.current=ea,t=n(i,r)}while(uo)}if(io.current=Go,e=null!==ao&&null!==ao.next,so=0,lo=ao=oo=null,co=!1,e)throw Error(s(300));return t}function yo(){var t=0!==ho;return ho=0,t}function bo(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===lo?oo.memoizedState=lo=t:lo=lo.next=t,lo}function vo(){if(null===ao){var t=oo.alternate;t=null!==t?t.memoizedState:null}else t=ao.next;var e=null===lo?oo.memoizedState:lo.next;if(null!==e)lo=e,ao=t;else{if(null===t)throw Error(s(310));t={memoizedState:(ao=t).memoizedState,baseState:ao.baseState,baseQueue:ao.baseQueue,queue:ao.queue,next:null},null===lo?oo.memoizedState=lo=t:lo=lo.next=t}return lo}function xo(t,e){return"function"===typeof e?e(t):e}function _o(t){var e=vo(),n=e.queue;if(null===n)throw Error(s(311));n.lastRenderedReducer=t;var i=ao,r=i.baseQueue,o=n.pending;if(null!==o){if(null!==r){var a=r.next;r.next=o.next,o.next=a}i.baseQueue=r=o,n.pending=null}if(null!==r){o=r.next,i=i.baseState;var l=a=null,c=null,u=o;do{var h=u.lane;if((so&h)===h)null!==c&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),i=u.hasEagerState?u.eagerState:t(i,u.action);else{var d={lane:h,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===c?(l=c=d,a=i):c=c.next=d,oo.lanes|=h,jl|=h}u=u.next}while(null!==u&&u!==o);null===c?a=i:c.next=l,ai(i,e.memoizedState)||(va=!0),e.memoizedState=i,e.baseState=a,e.baseQueue=c,n.lastRenderedState=i}if(null!==(t=n.interleaved)){r=t;do{o=r.lane,oo.lanes|=o,jl|=o,r=r.next}while(r!==t)}else null===r&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function wo(t){var e=vo(),n=e.queue;if(null===n)throw Error(s(311));n.lastRenderedReducer=t;var i=n.dispatch,r=n.pending,o=e.memoizedState;if(null!==r){n.pending=null;var a=r=r.next;do{o=t(o,a.action),a=a.next}while(a!==r);ai(o,e.memoizedState)||(va=!0),e.memoizedState=o,null===e.baseQueue&&(e.baseState=o),n.lastRenderedState=o}return[o,i]}function ko(){}function So(t,e){var n=oo,i=vo(),r=e(),o=!ai(i.memoizedState,r);if(o&&(i.memoizedState=r,va=!0),i=i.queue,jo(Oo.bind(null,n,i,t),[t]),i.getSnapshot!==e||o||null!==lo&&1&lo.memoizedState.tag){if(n.flags|=2048,No(9,Co.bind(null,n,i,r,e),void 0,null),null===Ml)throw Error(s(349));0!==(30&so)||Eo(n,e,r)}return r}function Eo(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},null===(e=oo.updateQueue)?(e={lastEffect:null,stores:null},oo.updateQueue=e,e.stores=[t]):null===(n=e.stores)?e.stores=[t]:n.push(t)}function Co(t,e,n,i){e.value=n,e.getSnapshot=i,To(e)&&Mo(t)}function Oo(t,e,n){return n((function(){To(e)&&Mo(t)}))}function To(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!ai(t,n)}catch(i){return!0}}function Mo(t){var e=Ls(t,1);null!==e&&nc(e,t,1,-1)}function Po(t){var e=bo();return"function"===typeof t&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:xo,lastRenderedState:t},e.queue=t,t=t.dispatch=Ko.bind(null,oo,t),[e.memoizedState,t]}function No(t,e,n,i){return t={tag:t,create:e,destroy:n,deps:i,next:null},null===(e=oo.updateQueue)?(e={lastEffect:null,stores:null},oo.updateQueue=e,e.lastEffect=t.next=t):null===(n=e.lastEffect)?e.lastEffect=t.next=t:(i=n.next,n.next=t,t.next=i,e.lastEffect=t),t}function Ro(){return vo().memoizedState}function Ao(t,e,n,i){var r=bo();oo.flags|=t,r.memoizedState=No(1|e,n,void 0,void 0===i?null:i)}function Lo(t,e,n,i){var r=vo();i=void 0===i?null:i;var s=void 0;if(null!==ao){var o=ao.memoizedState;if(s=o.destroy,null!==i&&go(i,o.deps))return void(r.memoizedState=No(e,n,s,i))}oo.flags|=t,r.memoizedState=No(1|e,n,s,i)}function Do(t,e){return Ao(8390656,8,t,e)}function jo(t,e){return Lo(2048,8,t,e)}function zo(t,e){return Lo(4,2,t,e)}function Io(t,e){return Lo(4,4,t,e)}function Fo(t,e){return"function"===typeof e?(t=t(),e(t),function(){e(null)}):null!==e&&void 0!==e?(t=t(),e.current=t,function(){e.current=null}):void 0}function Bo(t,e,n){return n=null!==n&&void 0!==n?n.concat([t]):null,Lo(4,4,Fo.bind(null,e,t),n)}function Uo(){}function Ho(t,e){var n=vo();e=void 0===e?null:e;var i=n.memoizedState;return null!==i&&null!==e&&go(e,i[1])?i[0]:(n.memoizedState=[t,e],t)}function Wo(t,e){var n=vo();e=void 0===e?null:e;var i=n.memoizedState;return null!==i&&null!==e&&go(e,i[1])?i[0]:(t=t(),n.memoizedState=[t,e],t)}function Vo(t,e,n){return 0===(21&so)?(t.baseState&&(t.baseState=!1,va=!0),t.memoizedState=n):(ai(n,e)||(n=ge(),oo.lanes|=n,jl|=n,t.baseState=!0),e)}function $o(t,e){var n=ve;ve=0!==n&&4>n?n:4,t(!0);var i=ro.transition;ro.transition={};try{t(!1),e()}finally{ve=n,ro.transition=i}}function qo(){return vo().memoizedState}function Yo(t,e,n){var i=ec(t);if(n={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null},Qo(t))Xo(e,n);else if(null!==(n=As(t,e,n,i))){nc(n,t,i,tc()),Jo(n,e,i)}}function Ko(t,e,n){var i=ec(t),r={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null};if(Qo(t))Xo(e,r);else{var s=t.alternate;if(0===t.lanes&&(null===s||0===s.lanes)&&null!==(s=e.lastRenderedReducer))try{var o=e.lastRenderedState,a=s(o,n);if(r.hasEagerState=!0,r.eagerState=a,ai(a,o)){var l=e.interleaved;return null===l?(r.next=r,Rs(e)):(r.next=l.next,l.next=r),void(e.interleaved=r)}}catch(c){}null!==(n=As(t,e,r,i))&&(nc(n,t,i,r=tc()),Jo(n,e,i))}}function Qo(t){var e=t.alternate;return t===oo||null!==e&&e===oo}function Xo(t,e){uo=co=!0;var n=t.pending;null===n?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function Jo(t,e,n){if(0!==(4194240&n)){var i=e.lanes;n|=i&=t.pendingLanes,e.lanes=n,be(t,n)}}var Go={readContext:Ps,useCallback:po,useContext:po,useEffect:po,useImperativeHandle:po,useInsertionEffect:po,useLayoutEffect:po,useMemo:po,useReducer:po,useRef:po,useState:po,useDebugValue:po,useDeferredValue:po,useTransition:po,useMutableSource:po,useSyncExternalStore:po,useId:po,unstable_isNewReconciler:!1},Zo={readContext:Ps,useCallback:function(t,e){return bo().memoizedState=[t,void 0===e?null:e],t},useContext:Ps,useEffect:Do,useImperativeHandle:function(t,e,n){return n=null!==n&&void 0!==n?n.concat([t]):null,Ao(4194308,4,Fo.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Ao(4194308,4,t,e)},useInsertionEffect:function(t,e){return Ao(4,2,t,e)},useMemo:function(t,e){var n=bo();return e=void 0===e?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var i=bo();return e=void 0!==n?n(e):e,i.memoizedState=i.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},i.queue=t,t=t.dispatch=Yo.bind(null,oo,t),[i.memoizedState,t]},useRef:function(t){return t={current:t},bo().memoizedState=t},useState:Po,useDebugValue:Uo,useDeferredValue:function(t){return bo().memoizedState=t},useTransition:function(){var t=Po(!1),e=t[0];return t=$o.bind(null,t[1]),bo().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var i=oo,r=bo();if(rs){if(void 0===n)throw Error(s(407));n=n()}else{if(n=e(),null===Ml)throw Error(s(349));0!==(30&so)||Eo(i,e,n)}r.memoizedState=n;var o={value:n,getSnapshot:e};return r.queue=o,Do(Oo.bind(null,i,o,t),[t]),i.flags|=2048,No(9,Co.bind(null,i,o,n,e),void 0,null),n},useId:function(){var t=bo(),e=Ml.identifierPrefix;if(rs){var n=Jr;e=":"+e+"R"+(n=(Xr&~(1<<32-oe(Xr)-1)).toString(32)+n),0<(n=ho++)&&(e+="H"+n.toString(32)),e+=":"}else e=":"+e+"r"+(n=fo++).toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},ta={readContext:Ps,useCallback:Ho,useContext:Ps,useEffect:jo,useImperativeHandle:Bo,useInsertionEffect:zo,useLayoutEffect:Io,useMemo:Wo,useReducer:_o,useRef:Ro,useState:function(){return _o(xo)},useDebugValue:Uo,useDeferredValue:function(t){return Vo(vo(),ao.memoizedState,t)},useTransition:function(){return[_o(xo)[0],vo().memoizedState]},useMutableSource:ko,useSyncExternalStore:So,useId:qo,unstable_isNewReconciler:!1},ea={readContext:Ps,useCallback:Ho,useContext:Ps,useEffect:jo,useImperativeHandle:Bo,useInsertionEffect:zo,useLayoutEffect:Io,useMemo:Wo,useReducer:wo,useRef:Ro,useState:function(){return wo(xo)},useDebugValue:Uo,useDeferredValue:function(t){var e=vo();return null===ao?e.memoizedState=t:Vo(e,ao.memoizedState,t)},useTransition:function(){return[wo(xo)[0],vo().memoizedState]},useMutableSource:ko,useSyncExternalStore:So,useId:qo,unstable_isNewReconciler:!1};function na(t,e){if(t&&t.defaultProps){for(var n in e=z({},e),t=t.defaultProps)void 0===e[n]&&(e[n]=t[n]);return e}return e}function ia(t,e,n,i){n=null===(n=n(i,e=t.memoizedState))||void 0===n?e:z({},e,n),t.memoizedState=n,0===t.lanes&&(t.updateQueue.baseState=n)}var ra={isMounted:function(t){return!!(t=t._reactInternals)&&Ht(t)===t},enqueueSetState:function(t,e,n){t=t._reactInternals;var i=tc(),r=ec(t),s=Is(i,r);s.payload=e,void 0!==n&&null!==n&&(s.callback=n),null!==(e=Fs(t,s,r))&&(nc(e,t,r,i),Bs(e,t,r))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var i=tc(),r=ec(t),s=Is(i,r);s.tag=1,s.payload=e,void 0!==n&&null!==n&&(s.callback=n),null!==(e=Fs(t,s,r))&&(nc(e,t,r,i),Bs(e,t,r))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=tc(),i=ec(t),r=Is(n,i);r.tag=2,void 0!==e&&null!==e&&(r.callback=e),null!==(e=Fs(t,r,i))&&(nc(e,t,i,n),Bs(e,t,i))}};function sa(t,e,n,i,r,s,o){return"function"===typeof(t=t.stateNode).shouldComponentUpdate?t.shouldComponentUpdate(i,s,o):!e.prototype||!e.prototype.isPureReactComponent||(!li(n,i)||!li(r,s))}function oa(t,e,n){var i=!1,r=Or,s=e.contextType;return"object"===typeof s&&null!==s?s=Ps(s):(r=Rr(e)?Pr:Tr.current,s=(i=null!==(i=e.contextTypes)&&void 0!==i)?Nr(t,r):Or),e=new e(n,s),t.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,e.updater=ra,t.stateNode=e,e._reactInternals=t,i&&((t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=r,t.__reactInternalMemoizedMaskedChildContext=s),e}function aa(t,e,n,i){t=e.state,"function"===typeof e.componentWillReceiveProps&&e.componentWillReceiveProps(n,i),"function"===typeof e.UNSAFE_componentWillReceiveProps&&e.UNSAFE_componentWillReceiveProps(n,i),e.state!==t&&ra.enqueueReplaceState(e,e.state,null)}function la(t,e,n,i){var r=t.stateNode;r.props=n,r.state=t.memoizedState,r.refs={},js(t);var s=e.contextType;"object"===typeof s&&null!==s?r.context=Ps(s):(s=Rr(e)?Pr:Tr.current,r.context=Nr(t,s)),r.state=t.memoizedState,"function"===typeof(s=e.getDerivedStateFromProps)&&(ia(t,e,s,n),r.state=t.memoizedState),"function"===typeof e.getDerivedStateFromProps||"function"===typeof r.getSnapshotBeforeUpdate||"function"!==typeof r.UNSAFE_componentWillMount&&"function"!==typeof r.componentWillMount||(e=r.state,"function"===typeof r.componentWillMount&&r.componentWillMount(),"function"===typeof r.UNSAFE_componentWillMount&&r.UNSAFE_componentWillMount(),e!==r.state&&ra.enqueueReplaceState(r,r.state,null),Hs(t,n,r,i),r.state=t.memoizedState),"function"===typeof r.componentDidMount&&(t.flags|=4194308)}function ca(t,e){try{var n="",i=e;do{n+=U(i),i=i.return}while(i);var r=n}catch(s){r="\nError generating stack: "+s.message+"\n"+s.stack}return{value:t,source:e,stack:r,digest:null}}function ua(t,e,n){return{value:t,source:null,stack:null!=n?n:null,digest:null!=e?e:null}}function ha(t,e){try{console.error(e.value)}catch(n){setTimeout((function(){throw n}))}}var da="function"===typeof WeakMap?WeakMap:Map;function fa(t,e,n){(n=Is(-1,n)).tag=3,n.payload={element:null};var i=e.value;return n.callback=function(){Vl||(Vl=!0,$l=i),ha(0,e)},n}function pa(t,e,n){(n=Is(-1,n)).tag=3;var i=t.type.getDerivedStateFromError;if("function"===typeof i){var r=e.value;n.payload=function(){return i(r)},n.callback=function(){ha(0,e)}}var s=t.stateNode;return null!==s&&"function"===typeof s.componentDidCatch&&(n.callback=function(){ha(0,e),"function"!==typeof i&&(null===ql?ql=new Set([this]):ql.add(this));var t=e.stack;this.componentDidCatch(e.value,{componentStack:null!==t?t:""})}),n}function ga(t,e,n){var i=t.pingCache;if(null===i){i=t.pingCache=new da;var r=new Set;i.set(e,r)}else void 0===(r=i.get(e))&&(r=new Set,i.set(e,r));r.has(n)||(r.add(n),t=Ec.bind(null,t,e,n),e.then(t,t))}function ma(t){do{var e;if((e=13===t.tag)&&(e=null===(e=t.memoizedState)||null!==e.dehydrated),e)return t;t=t.return}while(null!==t);return null}function ya(t,e,n,i,r){return 0===(1&t.mode)?(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((e=Is(-1,1)).tag=2,Fs(n,e,1))),n.lanes|=1),t):(t.flags|=65536,t.lanes=r,t)}var ba=x.ReactCurrentOwner,va=!1;function xa(t,e,n,i){e.child=null===t?_s(e,null,n,i):xs(e,t.child,n,i)}function _a(t,e,n,i,r){n=n.render;var s=e.ref;return Ms(e,r),i=mo(t,e,n,i,s,r),n=yo(),null===t||va?(rs&&n&&ts(e),e.flags|=1,xa(t,e,i,r),e.child):(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~r,Va(t,e,r))}function wa(t,e,n,i,r){if(null===t){var s=n.type;return"function"!==typeof s||Rc(s)||void 0!==s.defaultProps||null!==n.compare||void 0!==n.defaultProps?((t=Lc(n.type,null,i,e,e.mode,r)).ref=e.ref,t.return=e,e.child=t):(e.tag=15,e.type=s,ka(t,e,s,i,r))}if(s=t.child,0===(t.lanes&r)){var o=s.memoizedProps;if((n=null!==(n=n.compare)?n:li)(o,i)&&t.ref===e.ref)return Va(t,e,r)}return e.flags|=1,(t=Ac(s,i)).ref=e.ref,t.return=e,e.child=t}function ka(t,e,n,i,r){if(null!==t){var s=t.memoizedProps;if(li(s,i)&&t.ref===e.ref){if(va=!1,e.pendingProps=i=s,0===(t.lanes&r))return e.lanes=t.lanes,Va(t,e,r);0!==(131072&t.flags)&&(va=!0)}}return Ca(t,e,n,i,r)}function Sa(t,e,n){var i=e.pendingProps,r=i.children,s=null!==t?t.memoizedState:null;if("hidden"===i.mode)if(0===(1&e.mode))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},Cr(Al,Rl),Rl|=n;else{if(0===(1073741824&n))return t=null!==s?s.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,Cr(Al,Rl),Rl|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=null!==s?s.baseLanes:n,Cr(Al,Rl),Rl|=i}else null!==s?(i=s.baseLanes|n,e.memoizedState=null):i=n,Cr(Al,Rl),Rl|=i;return xa(t,e,r,n),e.child}function Ea(t,e){var n=e.ref;(null===t&&null!==n||null!==t&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function Ca(t,e,n,i,r){var s=Rr(n)?Pr:Tr.current;return s=Nr(e,s),Ms(e,r),n=mo(t,e,n,i,s,r),i=yo(),null===t||va?(rs&&i&&ts(e),e.flags|=1,xa(t,e,n,r),e.child):(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~r,Va(t,e,r))}function Oa(t,e,n,i,r){if(Rr(n)){var s=!0;jr(e)}else s=!1;if(Ms(e,r),null===e.stateNode)Wa(t,e),oa(e,n,i),la(e,n,i,r),i=!0;else if(null===t){var o=e.stateNode,a=e.memoizedProps;o.props=a;var l=o.context,c=n.contextType;"object"===typeof c&&null!==c?c=Ps(c):c=Nr(e,c=Rr(n)?Pr:Tr.current);var u=n.getDerivedStateFromProps,h="function"===typeof u||"function"===typeof o.getSnapshotBeforeUpdate;h||"function"!==typeof o.UNSAFE_componentWillReceiveProps&&"function"!==typeof o.componentWillReceiveProps||(a!==i||l!==c)&&aa(e,o,i,c),Ds=!1;var d=e.memoizedState;o.state=d,Hs(e,i,o,r),l=e.memoizedState,a!==i||d!==l||Mr.current||Ds?("function"===typeof u&&(ia(e,n,u,i),l=e.memoizedState),(a=Ds||sa(e,n,a,i,d,l,c))?(h||"function"!==typeof o.UNSAFE_componentWillMount&&"function"!==typeof o.componentWillMount||("function"===typeof o.componentWillMount&&o.componentWillMount(),"function"===typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"===typeof o.componentDidMount&&(e.flags|=4194308)):("function"===typeof o.componentDidMount&&(e.flags|=4194308),e.memoizedProps=i,e.memoizedState=l),o.props=i,o.state=l,o.context=c,i=a):("function"===typeof o.componentDidMount&&(e.flags|=4194308),i=!1)}else{o=e.stateNode,zs(t,e),a=e.memoizedProps,c=e.type===e.elementType?a:na(e.type,a),o.props=c,h=e.pendingProps,d=o.context,"object"===typeof(l=n.contextType)&&null!==l?l=Ps(l):l=Nr(e,l=Rr(n)?Pr:Tr.current);var f=n.getDerivedStateFromProps;(u="function"===typeof f||"function"===typeof o.getSnapshotBeforeUpdate)||"function"!==typeof o.UNSAFE_componentWillReceiveProps&&"function"!==typeof o.componentWillReceiveProps||(a!==h||d!==l)&&aa(e,o,i,l),Ds=!1,d=e.memoizedState,o.state=d,Hs(e,i,o,r);var p=e.memoizedState;a!==h||d!==p||Mr.current||Ds?("function"===typeof f&&(ia(e,n,f,i),p=e.memoizedState),(c=Ds||sa(e,n,c,i,d,p,l)||!1)?(u||"function"!==typeof o.UNSAFE_componentWillUpdate&&"function"!==typeof o.componentWillUpdate||("function"===typeof o.componentWillUpdate&&o.componentWillUpdate(i,p,l),"function"===typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(i,p,l)),"function"===typeof o.componentDidUpdate&&(e.flags|=4),"function"===typeof o.getSnapshotBeforeUpdate&&(e.flags|=1024)):("function"!==typeof o.componentDidUpdate||a===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),"function"!==typeof o.getSnapshotBeforeUpdate||a===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),e.memoizedProps=i,e.memoizedState=p),o.props=i,o.state=p,o.context=l,i=c):("function"!==typeof o.componentDidUpdate||a===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),"function"!==typeof o.getSnapshotBeforeUpdate||a===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),i=!1)}return Ta(t,e,n,i,s,r)}function Ta(t,e,n,i,r,s){Ea(t,e);var o=0!==(128&e.flags);if(!i&&!o)return r&&zr(e,n,!1),Va(t,e,s);i=e.stateNode,ba.current=e;var a=o&&"function"!==typeof n.getDerivedStateFromError?null:i.render();return e.flags|=1,null!==t&&o?(e.child=xs(e,t.child,null,s),e.child=xs(e,null,a,s)):xa(t,e,a,s),e.memoizedState=i.state,r&&zr(e,n,!0),e.child}function Ma(t){var e=t.stateNode;e.pendingContext?Lr(0,e.pendingContext,e.pendingContext!==e.context):e.context&&Lr(0,e.context,!1),Qs(t,e.containerInfo)}function Pa(t,e,n,i,r){return fs(),ps(r),e.flags|=256,xa(t,e,n,i),e.child}var Na,Ra,Aa,La,Da={dehydrated:null,treeContext:null,retryLane:0};function ja(t){return{baseLanes:t,cachePool:null,transitions:null}}function za(t,e,n){var i,r=e.pendingProps,o=Zs.current,a=!1,l=0!==(128&e.flags);if((i=l)||(i=(null===t||null!==t.memoizedState)&&0!==(2&o)),i?(a=!0,e.flags&=-129):null!==t&&null===t.memoizedState||(o|=1),Cr(Zs,1&o),null===t)return cs(e),null!==(t=e.memoizedState)&&null!==(t=t.dehydrated)?(0===(1&e.mode)?e.lanes=1:"$!"===t.data?e.lanes=8:e.lanes=1073741824,null):(l=r.children,t=r.fallback,a?(r=e.mode,a=e.child,l={mode:"hidden",children:l},0===(1&r)&&null!==a?(a.childLanes=0,a.pendingProps=l):a=jc(l,r,0,null),t=Dc(t,r,n,null),a.return=e,t.return=e,a.sibling=t,e.child=a,e.child.memoizedState=ja(n),e.memoizedState=Da,t):Ia(e,l));if(null!==(o=t.memoizedState)&&null!==(i=o.dehydrated))return function(t,e,n,i,r,o,a){if(n)return 256&e.flags?(e.flags&=-257,Fa(t,e,a,i=ua(Error(s(422))))):null!==e.memoizedState?(e.child=t.child,e.flags|=128,null):(o=i.fallback,r=e.mode,i=jc({mode:"visible",children:i.children},r,0,null),(o=Dc(o,r,a,null)).flags|=2,i.return=e,o.return=e,i.sibling=o,e.child=i,0!==(1&e.mode)&&xs(e,t.child,null,a),e.child.memoizedState=ja(a),e.memoizedState=Da,o);if(0===(1&e.mode))return Fa(t,e,a,null);if("$!"===r.data){if(i=r.nextSibling&&r.nextSibling.dataset)var l=i.dgst;return i=l,Fa(t,e,a,i=ua(o=Error(s(419)),i,void 0))}if(l=0!==(a&t.childLanes),va||l){if(null!==(i=Ml)){switch(a&-a){case 4:r=2;break;case 16:r=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:r=32;break;case 536870912:r=268435456;break;default:r=0}0!==(r=0!==(r&(i.suspendedLanes|a))?0:r)&&r!==o.retryLane&&(o.retryLane=r,Ls(t,r),nc(i,t,r,-1))}return gc(),Fa(t,e,a,i=ua(Error(s(421))))}return"$?"===r.data?(e.flags|=128,e.child=t.child,e=Oc.bind(null,t),r._reactRetry=e,null):(t=o.treeContext,is=cr(r.nextSibling),ns=e,rs=!0,ss=null,null!==t&&(Yr[Kr++]=Xr,Yr[Kr++]=Jr,Yr[Kr++]=Qr,Xr=t.id,Jr=t.overflow,Qr=e),e=Ia(e,i.children),e.flags|=4096,e)}(t,e,l,r,i,o,n);if(a){a=r.fallback,l=e.mode,i=(o=t.child).sibling;var c={mode:"hidden",children:r.children};return 0===(1&l)&&e.child!==o?((r=e.child).childLanes=0,r.pendingProps=c,e.deletions=null):(r=Ac(o,c)).subtreeFlags=14680064&o.subtreeFlags,null!==i?a=Ac(i,a):(a=Dc(a,l,n,null)).flags|=2,a.return=e,r.return=e,r.sibling=a,e.child=r,r=a,a=e.child,l=null===(l=t.child.memoizedState)?ja(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},a.memoizedState=l,a.childLanes=t.childLanes&~n,e.memoizedState=Da,r}return t=(a=t.child).sibling,r=Ac(a,{mode:"visible",children:r.children}),0===(1&e.mode)&&(r.lanes=n),r.return=e,r.sibling=null,null!==t&&(null===(n=e.deletions)?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=r,e.memoizedState=null,r}function Ia(t,e){return(e=jc({mode:"visible",children:e},t.mode,0,null)).return=t,t.child=e}function Fa(t,e,n,i){return null!==i&&ps(i),xs(e,t.child,null,n),(t=Ia(e,e.pendingProps.children)).flags|=2,e.memoizedState=null,t}function Ba(t,e,n){t.lanes|=e;var i=t.alternate;null!==i&&(i.lanes|=e),Ts(t.return,e,n)}function Ua(t,e,n,i,r){var s=t.memoizedState;null===s?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:i,tail:n,tailMode:r}:(s.isBackwards=e,s.rendering=null,s.renderingStartTime=0,s.last=i,s.tail=n,s.tailMode=r)}function Ha(t,e,n){var i=e.pendingProps,r=i.revealOrder,s=i.tail;if(xa(t,e,i.children,n),0!==(2&(i=Zs.current)))i=1&i|2,e.flags|=128;else{if(null!==t&&0!==(128&t.flags))t:for(t=e.child;null!==t;){if(13===t.tag)null!==t.memoizedState&&Ba(t,n,e);else if(19===t.tag)Ba(t,n,e);else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break t;for(;null===t.sibling;){if(null===t.return||t.return===e)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}i&=1}if(Cr(Zs,i),0===(1&e.mode))e.memoizedState=null;else switch(r){case"forwards":for(n=e.child,r=null;null!==n;)null!==(t=n.alternate)&&null===to(t)&&(r=n),n=n.sibling;null===(n=r)?(r=e.child,e.child=null):(r=n.sibling,n.sibling=null),Ua(e,!1,r,n,s);break;case"backwards":for(n=null,r=e.child,e.child=null;null!==r;){if(null!==(t=r.alternate)&&null===to(t)){e.child=r;break}t=r.sibling,r.sibling=n,n=r,r=t}Ua(e,!0,n,null,s);break;case"together":Ua(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function Wa(t,e){0===(1&e.mode)&&null!==t&&(t.alternate=null,e.alternate=null,e.flags|=2)}function Va(t,e,n){if(null!==t&&(e.dependencies=t.dependencies),jl|=e.lanes,0===(n&e.childLanes))return null;if(null!==t&&e.child!==t.child)throw Error(s(153));if(null!==e.child){for(n=Ac(t=e.child,t.pendingProps),e.child=n,n.return=e;null!==t.sibling;)t=t.sibling,(n=n.sibling=Ac(t,t.pendingProps)).return=e;n.sibling=null}return e.child}function $a(t,e){if(!rs)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;null!==e;)null!==e.alternate&&(n=e),e=e.sibling;null===n?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var i=null;null!==n;)null!==n.alternate&&(i=n),n=n.sibling;null===i?e||null===t.tail?t.tail=null:t.tail.sibling=null:i.sibling=null}}function qa(t){var e=null!==t.alternate&&t.alternate.child===t.child,n=0,i=0;if(e)for(var r=t.child;null!==r;)n|=r.lanes|r.childLanes,i|=14680064&r.subtreeFlags,i|=14680064&r.flags,r.return=t,r=r.sibling;else for(r=t.child;null!==r;)n|=r.lanes|r.childLanes,i|=r.subtreeFlags,i|=r.flags,r.return=t,r=r.sibling;return t.subtreeFlags|=i,t.childLanes=n,e}function Ya(t,e,n){var i=e.pendingProps;switch(es(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qa(e),null;case 1:case 17:return Rr(e.type)&&Ar(),qa(e),null;case 3:return i=e.stateNode,Xs(),Er(Mr),Er(Tr),no(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),null!==t&&null!==t.child||(hs(e)?e.flags|=4:null===t||t.memoizedState.isDehydrated&&0===(256&e.flags)||(e.flags|=1024,null!==ss&&(oc(ss),ss=null))),Ra(t,e),qa(e),null;case 5:Gs(e);var r=Ks(Ys.current);if(n=e.type,null!==t&&null!=e.stateNode)Aa(t,e,n,i,r),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!i){if(null===e.stateNode)throw Error(s(166));return qa(e),null}if(t=Ks($s.current),hs(e)){i=e.stateNode,n=e.type;var o=e.memoizedProps;switch(i[dr]=e,i[fr]=o,t=0!==(1&e.mode),n){case"dialog":Fi("cancel",i),Fi("close",i);break;case"iframe":case"object":case"embed":Fi("load",i);break;case"video":case"audio":for(r=0;r<Di.length;r++)Fi(Di[r],i);break;case"source":Fi("error",i);break;case"img":case"image":case"link":Fi("error",i),Fi("load",i);break;case"details":Fi("toggle",i);break;case"input":X(i,o),Fi("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!o.multiple},Fi("invalid",i);break;case"textarea":rt(i,o),Fi("invalid",i)}for(var l in bt(n,o),r=null,o)if(o.hasOwnProperty(l)){var c=o[l];"children"===l?"string"===typeof c?i.textContent!==c&&(!0!==o.suppressHydrationWarning&&Gi(i.textContent,c,t),r=["children",c]):"number"===typeof c&&i.textContent!==""+c&&(!0!==o.suppressHydrationWarning&&Gi(i.textContent,c,t),r=["children",""+c]):a.hasOwnProperty(l)&&null!=c&&"onScroll"===l&&Fi("scroll",i)}switch(n){case"input":q(i),Z(i,o,!0);break;case"textarea":q(i),ot(i);break;case"select":case"option":break;default:"function"===typeof o.onClick&&(i.onclick=Zi)}i=r,e.updateQueue=i,null!==i&&(e.flags|=4)}else{l=9===r.nodeType?r:r.ownerDocument,"http://www.w3.org/1999/xhtml"===t&&(t=at(n)),"http://www.w3.org/1999/xhtml"===t?"script"===n?((t=l.createElement("div")).innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):"string"===typeof i.is?t=l.createElement(n,{is:i.is}):(t=l.createElement(n),"select"===n&&(l=t,i.multiple?l.multiple=!0:i.size&&(l.size=i.size))):t=l.createElementNS(t,n),t[dr]=e,t[fr]=i,Na(t,e,!1,!1),e.stateNode=t;t:{switch(l=vt(n,i),n){case"dialog":Fi("cancel",t),Fi("close",t),r=i;break;case"iframe":case"object":case"embed":Fi("load",t),r=i;break;case"video":case"audio":for(r=0;r<Di.length;r++)Fi(Di[r],t);r=i;break;case"source":Fi("error",t),r=i;break;case"img":case"image":case"link":Fi("error",t),Fi("load",t),r=i;break;case"details":Fi("toggle",t),r=i;break;case"input":X(t,i),r=Q(t,i),Fi("invalid",t);break;case"option":default:r=i;break;case"select":t._wrapperState={wasMultiple:!!i.multiple},r=z({},i,{value:void 0}),Fi("invalid",t);break;case"textarea":rt(t,i),r=it(t,i),Fi("invalid",t)}for(o in bt(n,r),c=r)if(c.hasOwnProperty(o)){var u=c[o];"style"===o?mt(t,u):"dangerouslySetInnerHTML"===o?null!=(u=u?u.__html:void 0)&&ht(t,u):"children"===o?"string"===typeof u?("textarea"!==n||""!==u)&&dt(t,u):"number"===typeof u&&dt(t,""+u):"suppressContentEditableWarning"!==o&&"suppressHydrationWarning"!==o&&"autoFocus"!==o&&(a.hasOwnProperty(o)?null!=u&&"onScroll"===o&&Fi("scroll",t):null!=u&&v(t,o,u,l))}switch(n){case"input":q(t),Z(t,i,!1);break;case"textarea":q(t),ot(t);break;case"option":null!=i.value&&t.setAttribute("value",""+V(i.value));break;case"select":t.multiple=!!i.multiple,null!=(o=i.value)?nt(t,!!i.multiple,o,!1):null!=i.defaultValue&&nt(t,!!i.multiple,i.defaultValue,!0);break;default:"function"===typeof r.onClick&&(t.onclick=Zi)}switch(n){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break t;case"img":i=!0;break t;default:i=!1}}i&&(e.flags|=4)}null!==e.ref&&(e.flags|=512,e.flags|=2097152)}return qa(e),null;case 6:if(t&&null!=e.stateNode)La(t,e,t.memoizedProps,i);else{if("string"!==typeof i&&null===e.stateNode)throw Error(s(166));if(n=Ks(Ys.current),Ks($s.current),hs(e)){if(i=e.stateNode,n=e.memoizedProps,i[dr]=e,(o=i.nodeValue!==n)&&null!==(t=ns))switch(t.tag){case 3:Gi(i.nodeValue,n,0!==(1&t.mode));break;case 5:!0!==t.memoizedProps.suppressHydrationWarning&&Gi(i.nodeValue,n,0!==(1&t.mode))}o&&(e.flags|=4)}else(i=(9===n.nodeType?n:n.ownerDocument).createTextNode(i))[dr]=e,e.stateNode=i}return qa(e),null;case 13:if(Er(Zs),i=e.memoizedState,null===t||null!==t.memoizedState&&null!==t.memoizedState.dehydrated){if(rs&&null!==is&&0!==(1&e.mode)&&0===(128&e.flags))ds(),fs(),e.flags|=98560,o=!1;else if(o=hs(e),null!==i&&null!==i.dehydrated){if(null===t){if(!o)throw Error(s(318));if(!(o=null!==(o=e.memoizedState)?o.dehydrated:null))throw Error(s(317));o[dr]=e}else fs(),0===(128&e.flags)&&(e.memoizedState=null),e.flags|=4;qa(e),o=!1}else null!==ss&&(oc(ss),ss=null),o=!0;if(!o)return 65536&e.flags?e:null}return 0!==(128&e.flags)?(e.lanes=n,e):((i=null!==i)!==(null!==t&&null!==t.memoizedState)&&i&&(e.child.flags|=8192,0!==(1&e.mode)&&(null===t||0!==(1&Zs.current)?0===Ll&&(Ll=3):gc())),null!==e.updateQueue&&(e.flags|=4),qa(e),null);case 4:return Xs(),Ra(t,e),null===t&&Hi(e.stateNode.containerInfo),qa(e),null;case 10:return Os(e.type._context),qa(e),null;case 19:if(Er(Zs),null===(o=e.memoizedState))return qa(e),null;if(i=0!==(128&e.flags),null===(l=o.rendering))if(i)$a(o,!1);else{if(0!==Ll||null!==t&&0!==(128&t.flags))for(t=e.child;null!==t;){if(null!==(l=to(t))){for(e.flags|=128,$a(o,!1),null!==(i=l.updateQueue)&&(e.updateQueue=i,e.flags|=4),e.subtreeFlags=0,i=n,n=e.child;null!==n;)t=i,(o=n).flags&=14680066,null===(l=o.alternate)?(o.childLanes=0,o.lanes=t,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=l.childLanes,o.lanes=l.lanes,o.child=l.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=l.memoizedProps,o.memoizedState=l.memoizedState,o.updateQueue=l.updateQueue,o.type=l.type,t=l.dependencies,o.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return Cr(Zs,1&Zs.current|2),e.child}t=t.sibling}null!==o.tail&&Jt()>Hl&&(e.flags|=128,i=!0,$a(o,!1),e.lanes=4194304)}else{if(!i)if(null!==(t=to(l))){if(e.flags|=128,i=!0,null!==(n=t.updateQueue)&&(e.updateQueue=n,e.flags|=4),$a(o,!0),null===o.tail&&"hidden"===o.tailMode&&!l.alternate&&!rs)return qa(e),null}else 2*Jt()-o.renderingStartTime>Hl&&1073741824!==n&&(e.flags|=128,i=!0,$a(o,!1),e.lanes=4194304);o.isBackwards?(l.sibling=e.child,e.child=l):(null!==(n=o.last)?n.sibling=l:e.child=l,o.last=l)}return null!==o.tail?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=Jt(),e.sibling=null,n=Zs.current,Cr(Zs,i?1&n|2:1&n),e):(qa(e),null);case 22:case 23:return hc(),i=null!==e.memoizedState,null!==t&&null!==t.memoizedState!==i&&(e.flags|=8192),i&&0!==(1&e.mode)?0!==(1073741824&Rl)&&(qa(e),6&e.subtreeFlags&&(e.flags|=8192)):qa(e),null;case 24:case 25:return null}throw Error(s(156,e.tag))}function Ka(t,e){switch(es(e),e.tag){case 1:return Rr(e.type)&&Ar(),65536&(t=e.flags)?(e.flags=-65537&t|128,e):null;case 3:return Xs(),Er(Mr),Er(Tr),no(),0!==(65536&(t=e.flags))&&0===(128&t)?(e.flags=-65537&t|128,e):null;case 5:return Gs(e),null;case 13:if(Er(Zs),null!==(t=e.memoizedState)&&null!==t.dehydrated){if(null===e.alternate)throw Error(s(340));fs()}return 65536&(t=e.flags)?(e.flags=-65537&t|128,e):null;case 19:return Er(Zs),null;case 4:return Xs(),null;case 10:return Os(e.type._context),null;case 22:case 23:return hc(),null;default:return null}}Na=function(t,e){for(var n=e.child;null!==n;){if(5===n.tag||6===n.tag)t.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ra=function(){},Aa=function(t,e,n,i){var r=t.memoizedProps;if(r!==i){t=e.stateNode,Ks($s.current);var s,o=null;switch(n){case"input":r=Q(t,r),i=Q(t,i),o=[];break;case"select":r=z({},r,{value:void 0}),i=z({},i,{value:void 0}),o=[];break;case"textarea":r=it(t,r),i=it(t,i),o=[];break;default:"function"!==typeof r.onClick&&"function"===typeof i.onClick&&(t.onclick=Zi)}for(u in bt(n,i),n=null,r)if(!i.hasOwnProperty(u)&&r.hasOwnProperty(u)&&null!=r[u])if("style"===u){var l=r[u];for(s in l)l.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(a.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in i){var c=i[u];if(l=null!=r?r[u]:void 0,i.hasOwnProperty(u)&&c!==l&&(null!=c||null!=l))if("style"===u)if(l){for(s in l)!l.hasOwnProperty(s)||c&&c.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in c)c.hasOwnProperty(s)&&l[s]!==c[s]&&(n||(n={}),n[s]=c[s])}else n||(o||(o=[]),o.push(u,n)),n=c;else"dangerouslySetInnerHTML"===u?(c=c?c.__html:void 0,l=l?l.__html:void 0,null!=c&&l!==c&&(o=o||[]).push(u,c)):"children"===u?"string"!==typeof c&&"number"!==typeof c||(o=o||[]).push(u,""+c):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(a.hasOwnProperty(u)?(null!=c&&"onScroll"===u&&Fi("scroll",t),o||l===c||(o=[])):(o=o||[]).push(u,c))}n&&(o=o||[]).push("style",n);var u=o;(e.updateQueue=u)&&(e.flags|=4)}},La=function(t,e,n,i){n!==i&&(e.flags|=4)};var Qa=!1,Xa=!1,Ja="function"===typeof WeakSet?WeakSet:Set,Ga=null;function Za(t,e){var n=t.ref;if(null!==n)if("function"===typeof n)try{n(null)}catch(i){Sc(t,e,i)}else n.current=null}function tl(t,e,n){try{n()}catch(i){Sc(t,e,i)}}var el=!1;function nl(t,e,n){var i=e.updateQueue;if(null!==(i=null!==i?i.lastEffect:null)){var r=i=i.next;do{if((r.tag&t)===t){var s=r.destroy;r.destroy=void 0,void 0!==s&&tl(e,n,s)}r=r.next}while(r!==i)}}function il(t,e){if(null!==(e=null!==(e=e.updateQueue)?e.lastEffect:null)){var n=e=e.next;do{if((n.tag&t)===t){var i=n.create;n.destroy=i()}n=n.next}while(n!==e)}}function rl(t){var e=t.ref;if(null!==e){var n=t.stateNode;t.tag,t=n,"function"===typeof e?e(t):e.current=t}}function sl(t){var e=t.alternate;null!==e&&(t.alternate=null,sl(e)),t.child=null,t.deletions=null,t.sibling=null,5===t.tag&&(null!==(e=t.stateNode)&&(delete e[dr],delete e[fr],delete e[gr],delete e[mr],delete e[yr])),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 ol(t){return 5===t.tag||3===t.tag||4===t.tag}function al(t){t:for(;;){for(;null===t.sibling;){if(null===t.return||ol(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;5!==t.tag&&6!==t.tag&&18!==t.tag;){if(2&t.flags)continue t;if(null===t.child||4===t.tag)continue t;t.child.return=t,t=t.child}if(!(2&t.flags))return t.stateNode}}function ll(t,e,n){var i=t.tag;if(5===i||6===i)t=t.stateNode,e?8===n.nodeType?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(8===n.nodeType?(e=n.parentNode).insertBefore(t,n):(e=n).appendChild(t),null!==(n=n._reactRootContainer)&&void 0!==n||null!==e.onclick||(e.onclick=Zi));else if(4!==i&&null!==(t=t.child))for(ll(t,e,n),t=t.sibling;null!==t;)ll(t,e,n),t=t.sibling}function cl(t,e,n){var i=t.tag;if(5===i||6===i)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(4!==i&&null!==(t=t.child))for(cl(t,e,n),t=t.sibling;null!==t;)cl(t,e,n),t=t.sibling}var ul=null,hl=!1;function dl(t,e,n){for(n=n.child;null!==n;)fl(t,e,n),n=n.sibling}function fl(t,e,n){if(se&&"function"===typeof se.onCommitFiberUnmount)try{se.onCommitFiberUnmount(re,n)}catch(a){}switch(n.tag){case 5:Xa||Za(n,e);case 6:var i=ul,r=hl;ul=null,dl(t,e,n),hl=r,null!==(ul=i)&&(hl?(t=ul,n=n.stateNode,8===t.nodeType?t.parentNode.removeChild(n):t.removeChild(n)):ul.removeChild(n.stateNode));break;case 18:null!==ul&&(hl?(t=ul,n=n.stateNode,8===t.nodeType?lr(t.parentNode,n):1===t.nodeType&&lr(t,n),He(t)):lr(ul,n.stateNode));break;case 4:i=ul,r=hl,ul=n.stateNode.containerInfo,hl=!0,dl(t,e,n),ul=i,hl=r;break;case 0:case 11:case 14:case 15:if(!Xa&&(null!==(i=n.updateQueue)&&null!==(i=i.lastEffect))){r=i=i.next;do{var s=r,o=s.destroy;s=s.tag,void 0!==o&&(0!==(2&s)||0!==(4&s))&&tl(n,e,o),r=r.next}while(r!==i)}dl(t,e,n);break;case 1:if(!Xa&&(Za(n,e),"function"===typeof(i=n.stateNode).componentWillUnmount))try{i.props=n.memoizedProps,i.state=n.memoizedState,i.componentWillUnmount()}catch(a){Sc(n,e,a)}dl(t,e,n);break;case 21:dl(t,e,n);break;case 22:1&n.mode?(Xa=(i=Xa)||null!==n.memoizedState,dl(t,e,n),Xa=i):dl(t,e,n);break;default:dl(t,e,n)}}function pl(t){var e=t.updateQueue;if(null!==e){t.updateQueue=null;var n=t.stateNode;null===n&&(n=t.stateNode=new Ja),e.forEach((function(e){var i=Tc.bind(null,t,e);n.has(e)||(n.add(e),e.then(i,i))}))}}function gl(t,e){var n=e.deletions;if(null!==n)for(var i=0;i<n.length;i++){var r=n[i];try{var o=t,a=e,l=a;t:for(;null!==l;){switch(l.tag){case 5:ul=l.stateNode,hl=!1;break t;case 3:case 4:ul=l.stateNode.containerInfo,hl=!0;break t}l=l.return}if(null===ul)throw Error(s(160));fl(o,a,r),ul=null,hl=!1;var c=r.alternate;null!==c&&(c.return=null),r.return=null}catch(u){Sc(r,e,u)}}if(12854&e.subtreeFlags)for(e=e.child;null!==e;)ml(e,t),e=e.sibling}function ml(t,e){var n=t.alternate,i=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(gl(e,t),yl(t),4&i){try{nl(3,t,t.return),il(3,t)}catch(m){Sc(t,t.return,m)}try{nl(5,t,t.return)}catch(m){Sc(t,t.return,m)}}break;case 1:gl(e,t),yl(t),512&i&&null!==n&&Za(n,n.return);break;case 5:if(gl(e,t),yl(t),512&i&&null!==n&&Za(n,n.return),32&t.flags){var r=t.stateNode;try{dt(r,"")}catch(m){Sc(t,t.return,m)}}if(4&i&&null!=(r=t.stateNode)){var o=t.memoizedProps,a=null!==n?n.memoizedProps:o,l=t.type,c=t.updateQueue;if(t.updateQueue=null,null!==c)try{"input"===l&&"radio"===o.type&&null!=o.name&&J(r,o),vt(l,a);var u=vt(l,o);for(a=0;a<c.length;a+=2){var h=c[a],d=c[a+1];"style"===h?mt(r,d):"dangerouslySetInnerHTML"===h?ht(r,d):"children"===h?dt(r,d):v(r,h,d,u)}switch(l){case"input":G(r,o);break;case"textarea":st(r,o);break;case"select":var f=r._wrapperState.wasMultiple;r._wrapperState.wasMultiple=!!o.multiple;var p=o.value;null!=p?nt(r,!!o.multiple,p,!1):f!==!!o.multiple&&(null!=o.defaultValue?nt(r,!!o.multiple,o.defaultValue,!0):nt(r,!!o.multiple,o.multiple?[]:"",!1))}r[fr]=o}catch(m){Sc(t,t.return,m)}}break;case 6:if(gl(e,t),yl(t),4&i){if(null===t.stateNode)throw Error(s(162));r=t.stateNode,o=t.memoizedProps;try{r.nodeValue=o}catch(m){Sc(t,t.return,m)}}break;case 3:if(gl(e,t),yl(t),4&i&&null!==n&&n.memoizedState.isDehydrated)try{He(e.containerInfo)}catch(m){Sc(t,t.return,m)}break;case 4:default:gl(e,t),yl(t);break;case 13:gl(e,t),yl(t),8192&(r=t.child).flags&&(o=null!==r.memoizedState,r.stateNode.isHidden=o,!o||null!==r.alternate&&null!==r.alternate.memoizedState||(Ul=Jt())),4&i&&pl(t);break;case 22:if(h=null!==n&&null!==n.memoizedState,1&t.mode?(Xa=(u=Xa)||h,gl(e,t),Xa=u):gl(e,t),yl(t),8192&i){if(u=null!==t.memoizedState,(t.stateNode.isHidden=u)&&!h&&0!==(1&t.mode))for(Ga=t,h=t.child;null!==h;){for(d=Ga=h;null!==Ga;){switch(p=(f=Ga).child,f.tag){case 0:case 11:case 14:case 15:nl(4,f,f.return);break;case 1:Za(f,f.return);var g=f.stateNode;if("function"===typeof g.componentWillUnmount){i=f,n=f.return;try{e=i,g.props=e.memoizedProps,g.state=e.memoizedState,g.componentWillUnmount()}catch(m){Sc(i,n,m)}}break;case 5:Za(f,f.return);break;case 22:if(null!==f.memoizedState){_l(d);continue}}null!==p?(p.return=f,Ga=p):_l(d)}h=h.sibling}t:for(h=null,d=t;;){if(5===d.tag){if(null===h){h=d;try{r=d.stateNode,u?"function"===typeof(o=r.style).setProperty?o.setProperty("display","none","important"):o.display="none":(l=d.stateNode,a=void 0!==(c=d.memoizedProps.style)&&null!==c&&c.hasOwnProperty("display")?c.display:null,l.style.display=gt("display",a))}catch(m){Sc(t,t.return,m)}}}else if(6===d.tag){if(null===h)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(m){Sc(t,t.return,m)}}else if((22!==d.tag&&23!==d.tag||null===d.memoizedState||d===t)&&null!==d.child){d.child.return=d,d=d.child;continue}if(d===t)break t;for(;null===d.sibling;){if(null===d.return||d.return===t)break t;h===d&&(h=null),d=d.return}h===d&&(h=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:gl(e,t),yl(t),4&i&&pl(t);case 21:}}function yl(t){var e=t.flags;if(2&e){try{t:{for(var n=t.return;null!==n;){if(ol(n)){var i=n;break t}n=n.return}throw Error(s(160))}switch(i.tag){case 5:var r=i.stateNode;32&i.flags&&(dt(r,""),i.flags&=-33),cl(t,al(t),r);break;case 3:case 4:var o=i.stateNode.containerInfo;ll(t,al(t),o);break;default:throw Error(s(161))}}catch(a){Sc(t,t.return,a)}t.flags&=-3}4096&e&&(t.flags&=-4097)}function bl(t,e,n){Ga=t,vl(t,e,n)}function vl(t,e,n){for(var i=0!==(1&t.mode);null!==Ga;){var r=Ga,s=r.child;if(22===r.tag&&i){var o=null!==r.memoizedState||Qa;if(!o){var a=r.alternate,l=null!==a&&null!==a.memoizedState||Xa;a=Qa;var c=Xa;if(Qa=o,(Xa=l)&&!c)for(Ga=r;null!==Ga;)l=(o=Ga).child,22===o.tag&&null!==o.memoizedState?wl(r):null!==l?(l.return=o,Ga=l):wl(r);for(;null!==s;)Ga=s,vl(s,e,n),s=s.sibling;Ga=r,Qa=a,Xa=c}xl(t)}else 0!==(8772&r.subtreeFlags)&&null!==s?(s.return=r,Ga=s):xl(t)}}function xl(t){for(;null!==Ga;){var e=Ga;if(0!==(8772&e.flags)){var n=e.alternate;try{if(0!==(8772&e.flags))switch(e.tag){case 0:case 11:case 15:Xa||il(5,e);break;case 1:var i=e.stateNode;if(4&e.flags&&!Xa)if(null===n)i.componentDidMount();else{var r=e.elementType===e.type?n.memoizedProps:na(e.type,n.memoizedProps);i.componentDidUpdate(r,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var o=e.updateQueue;null!==o&&Ws(e,o,i);break;case 3:var a=e.updateQueue;if(null!==a){if(n=null,null!==e.child)switch(e.child.tag){case 5:case 1:n=e.child.stateNode}Ws(e,a,n)}break;case 5:var l=e.stateNode;if(null===n&&4&e.flags){n=l;var c=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===e.memoizedState){var u=e.alternate;if(null!==u){var h=u.memoizedState;if(null!==h){var d=h.dehydrated;null!==d&&He(d)}}}break;default:throw Error(s(163))}Xa||512&e.flags&&rl(e)}catch(f){Sc(e,e.return,f)}}if(e===t){Ga=null;break}if(null!==(n=e.sibling)){n.return=e.return,Ga=n;break}Ga=e.return}}function _l(t){for(;null!==Ga;){var e=Ga;if(e===t){Ga=null;break}var n=e.sibling;if(null!==n){n.return=e.return,Ga=n;break}Ga=e.return}}function wl(t){for(;null!==Ga;){var e=Ga;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{il(4,e)}catch(l){Sc(e,n,l)}break;case 1:var i=e.stateNode;if("function"===typeof i.componentDidMount){var r=e.return;try{i.componentDidMount()}catch(l){Sc(e,r,l)}}var s=e.return;try{rl(e)}catch(l){Sc(e,s,l)}break;case 5:var o=e.return;try{rl(e)}catch(l){Sc(e,o,l)}}}catch(l){Sc(e,e.return,l)}if(e===t){Ga=null;break}var a=e.sibling;if(null!==a){a.return=e.return,Ga=a;break}Ga=e.return}}var kl,Sl=Math.ceil,El=x.ReactCurrentDispatcher,Cl=x.ReactCurrentOwner,Ol=x.ReactCurrentBatchConfig,Tl=0,Ml=null,Pl=null,Nl=0,Rl=0,Al=Sr(0),Ll=0,Dl=null,jl=0,zl=0,Il=0,Fl=null,Bl=null,Ul=0,Hl=1/0,Wl=null,Vl=!1,$l=null,ql=null,Yl=!1,Kl=null,Ql=0,Xl=0,Jl=null,Gl=-1,Zl=0;function tc(){return 0!==(6&Tl)?Jt():-1!==Gl?Gl:Gl=Jt()}function ec(t){return 0===(1&t.mode)?1:0!==(2&Tl)&&0!==Nl?Nl&-Nl:null!==gs.transition?(0===Zl&&(Zl=ge()),Zl):0!==(t=ve)?t:t=void 0===(t=window.event)?16:Xe(t.type)}function nc(t,e,n,i){if(50<Xl)throw Xl=0,Jl=null,Error(s(185));ye(t,n,i),0!==(2&Tl)&&t===Ml||(t===Ml&&(0===(2&Tl)&&(zl|=n),4===Ll&&ac(t,Nl)),ic(t,i),1===n&&0===Tl&&0===(1&e.mode)&&(Hl=Jt()+500,Fr&&Hr()))}function ic(t,e){var n=t.callbackNode;!function(t,e){for(var n=t.suspendedLanes,i=t.pingedLanes,r=t.expirationTimes,s=t.pendingLanes;0<s;){var o=31-oe(s),a=1<<o,l=r[o];-1===l?0!==(a&n)&&0===(a&i)||(r[o]=fe(a,e)):l<=e&&(t.expiredLanes|=a),s&=~a}}(t,e);var i=de(t,t===Ml?Nl:0);if(0===i)null!==n&&Kt(n),t.callbackNode=null,t.callbackPriority=0;else if(e=i&-i,t.callbackPriority!==e){if(null!=n&&Kt(n),1===e)0===t.tag?function(t){Fr=!0,Ur(t)}(lc.bind(null,t)):Ur(lc.bind(null,t)),or((function(){0===(6&Tl)&&Hr()})),n=null;else{switch(xe(i)){case 1:n=Zt;break;case 4:n=te;break;case 16:default:n=ee;break;case 536870912:n=ie}n=Mc(n,rc.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function rc(t,e){if(Gl=-1,Zl=0,0!==(6&Tl))throw Error(s(327));var n=t.callbackNode;if(wc()&&t.callbackNode!==n)return null;var i=de(t,t===Ml?Nl:0);if(0===i)return null;if(0!==(30&i)||0!==(i&t.expiredLanes)||e)e=mc(t,i);else{e=i;var r=Tl;Tl|=2;var o=pc();for(Ml===t&&Nl===e||(Wl=null,Hl=Jt()+500,dc(t,e));;)try{bc();break}catch(l){fc(t,l)}Cs(),El.current=o,Tl=r,null!==Pl?e=0:(Ml=null,Nl=0,e=Ll)}if(0!==e){if(2===e&&(0!==(r=pe(t))&&(i=r,e=sc(t,r))),1===e)throw n=Dl,dc(t,0),ac(t,i),ic(t,Jt()),n;if(6===e)ac(t,i);else{if(r=t.current.alternate,0===(30&i)&&!function(t){for(var e=t;;){if(16384&e.flags){var n=e.updateQueue;if(null!==n&&null!==(n=n.stores))for(var i=0;i<n.length;i++){var r=n[i],s=r.getSnapshot;r=r.value;try{if(!ai(s(),r))return!1}catch(a){return!1}}}if(n=e.child,16384&e.subtreeFlags&&null!==n)n.return=e,e=n;else{if(e===t)break;for(;null===e.sibling;){if(null===e.return||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}(r)&&(2===(e=mc(t,i))&&(0!==(o=pe(t))&&(i=o,e=sc(t,o))),1===e))throw n=Dl,dc(t,0),ac(t,i),ic(t,Jt()),n;switch(t.finishedWork=r,t.finishedLanes=i,e){case 0:case 1:throw Error(s(345));case 2:case 5:_c(t,Bl,Wl);break;case 3:if(ac(t,i),(130023424&i)===i&&10<(e=Ul+500-Jt())){if(0!==de(t,0))break;if(((r=t.suspendedLanes)&i)!==i){tc(),t.pingedLanes|=t.suspendedLanes&r;break}t.timeoutHandle=ir(_c.bind(null,t,Bl,Wl),e);break}_c(t,Bl,Wl);break;case 4:if(ac(t,i),(4194240&i)===i)break;for(e=t.eventTimes,r=-1;0<i;){var a=31-oe(i);o=1<<a,(a=e[a])>r&&(r=a),i&=~o}if(i=r,10<(i=(120>(i=Jt()-i)?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Sl(i/1960))-i)){t.timeoutHandle=ir(_c.bind(null,t,Bl,Wl),i);break}_c(t,Bl,Wl);break;default:throw Error(s(329))}}}return ic(t,Jt()),t.callbackNode===n?rc.bind(null,t):null}function sc(t,e){var n=Fl;return t.current.memoizedState.isDehydrated&&(dc(t,e).flags|=256),2!==(t=mc(t,e))&&(e=Bl,Bl=n,null!==e&&oc(e)),t}function oc(t){null===Bl?Bl=t:Bl.push.apply(Bl,t)}function ac(t,e){for(e&=~Il,e&=~zl,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-oe(e),i=1<<n;t[n]=-1,e&=~i}}function lc(t){if(0!==(6&Tl))throw Error(s(327));wc();var e=de(t,0);if(0===(1&e))return ic(t,Jt()),null;var n=mc(t,e);if(0!==t.tag&&2===n){var i=pe(t);0!==i&&(e=i,n=sc(t,i))}if(1===n)throw n=Dl,dc(t,0),ac(t,e),ic(t,Jt()),n;if(6===n)throw Error(s(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,_c(t,Bl,Wl),ic(t,Jt()),null}function cc(t,e){var n=Tl;Tl|=1;try{return t(e)}finally{0===(Tl=n)&&(Hl=Jt()+500,Fr&&Hr())}}function uc(t){null!==Kl&&0===Kl.tag&&0===(6&Tl)&&wc();var e=Tl;Tl|=1;var n=Ol.transition,i=ve;try{if(Ol.transition=null,ve=1,t)return t()}finally{ve=i,Ol.transition=n,0===(6&(Tl=e))&&Hr()}}function hc(){Rl=Al.current,Er(Al)}function dc(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(-1!==n&&(t.timeoutHandle=-1,rr(n)),null!==Pl)for(n=Pl.return;null!==n;){var i=n;switch(es(i),i.tag){case 1:null!==(i=i.type.childContextTypes)&&void 0!==i&&Ar();break;case 3:Xs(),Er(Mr),Er(Tr),no();break;case 5:Gs(i);break;case 4:Xs();break;case 13:case 19:Er(Zs);break;case 10:Os(i.type._context);break;case 22:case 23:hc()}n=n.return}if(Ml=t,Pl=t=Ac(t.current,null),Nl=Rl=e,Ll=0,Dl=null,Il=zl=jl=0,Bl=Fl=null,null!==Ns){for(e=0;e<Ns.length;e++)if(null!==(i=(n=Ns[e]).interleaved)){n.interleaved=null;var r=i.next,s=n.pending;if(null!==s){var o=s.next;s.next=r,i.next=o}n.pending=i}Ns=null}return t}function fc(t,e){for(;;){var n=Pl;try{if(Cs(),io.current=Go,co){for(var i=oo.memoizedState;null!==i;){var r=i.queue;null!==r&&(r.pending=null),i=i.next}co=!1}if(so=0,lo=ao=oo=null,uo=!1,ho=0,Cl.current=null,null===n||null===n.return){Ll=1,Dl=e,Pl=null;break}t:{var o=t,a=n.return,l=n,c=e;if(e=Nl,l.flags|=32768,null!==c&&"object"===typeof c&&"function"===typeof c.then){var u=c,h=l,d=h.tag;if(0===(1&h.mode)&&(0===d||11===d||15===d)){var f=h.alternate;f?(h.updateQueue=f.updateQueue,h.memoizedState=f.memoizedState,h.lanes=f.lanes):(h.updateQueue=null,h.memoizedState=null)}var p=ma(a);if(null!==p){p.flags&=-257,ya(p,a,l,0,e),1&p.mode&&ga(o,u,e),c=u;var g=(e=p).updateQueue;if(null===g){var m=new Set;m.add(c),e.updateQueue=m}else g.add(c);break t}if(0===(1&e)){ga(o,u,e),gc();break t}c=Error(s(426))}else if(rs&&1&l.mode){var y=ma(a);if(null!==y){0===(65536&y.flags)&&(y.flags|=256),ya(y,a,l,0,e),ps(ca(c,l));break t}}o=c=ca(c,l),4!==Ll&&(Ll=2),null===Fl?Fl=[o]:Fl.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,e&=-e,o.lanes|=e,Us(o,fa(0,c,e));break t;case 1:l=c;var b=o.type,v=o.stateNode;if(0===(128&o.flags)&&("function"===typeof b.getDerivedStateFromError||null!==v&&"function"===typeof v.componentDidCatch&&(null===ql||!ql.has(v)))){o.flags|=65536,e&=-e,o.lanes|=e,Us(o,pa(o,l,e));break t}}o=o.return}while(null!==o)}xc(n)}catch(x){e=x,Pl===n&&null!==n&&(Pl=n=n.return);continue}break}}function pc(){var t=El.current;return El.current=Go,null===t?Go:t}function gc(){0!==Ll&&3!==Ll&&2!==Ll||(Ll=4),null===Ml||0===(268435455&jl)&&0===(268435455&zl)||ac(Ml,Nl)}function mc(t,e){var n=Tl;Tl|=2;var i=pc();for(Ml===t&&Nl===e||(Wl=null,dc(t,e));;)try{yc();break}catch(r){fc(t,r)}if(Cs(),Tl=n,El.current=i,null!==Pl)throw Error(s(261));return Ml=null,Nl=0,Ll}function yc(){for(;null!==Pl;)vc(Pl)}function bc(){for(;null!==Pl&&!Qt();)vc(Pl)}function vc(t){var e=kl(t.alternate,t,Rl);t.memoizedProps=t.pendingProps,null===e?xc(t):Pl=e,Cl.current=null}function xc(t){var e=t;do{var n=e.alternate;if(t=e.return,0===(32768&e.flags)){if(null!==(n=Ya(n,e,Rl)))return void(Pl=n)}else{if(null!==(n=Ka(n,e)))return n.flags&=32767,void(Pl=n);if(null===t)return Ll=6,void(Pl=null);t.flags|=32768,t.subtreeFlags=0,t.deletions=null}if(null!==(e=e.sibling))return void(Pl=e);Pl=e=t}while(null!==e);0===Ll&&(Ll=5)}function _c(t,e,n){var i=ve,r=Ol.transition;try{Ol.transition=null,ve=1,function(t,e,n,i){do{wc()}while(null!==Kl);if(0!==(6&Tl))throw Error(s(327));n=t.finishedWork;var r=t.finishedLanes;if(null===n)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(s(177));t.callbackNode=null,t.callbackPriority=0;var o=n.lanes|n.childLanes;if(function(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 i=t.eventTimes;for(t=t.expirationTimes;0<n;){var r=31-oe(n),s=1<<r;e[r]=0,i[r]=-1,t[r]=-1,n&=~s}}(t,o),t===Ml&&(Pl=Ml=null,Nl=0),0===(2064&n.subtreeFlags)&&0===(2064&n.flags)||Yl||(Yl=!0,Mc(ee,(function(){return wc(),null}))),o=0!==(15990&n.flags),0!==(15990&n.subtreeFlags)||o){o=Ol.transition,Ol.transition=null;var a=ve;ve=1;var l=Tl;Tl|=4,Cl.current=null,function(t,e){if(tr=Ve,fi(t=di())){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else t:{var i=(n=(n=t.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(i&&0!==i.rangeCount){n=i.anchorNode;var r=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{n.nodeType,o.nodeType}catch(_){n=null;break t}var a=0,l=-1,c=-1,u=0,h=0,d=t,f=null;e:for(;;){for(var p;d!==n||0!==r&&3!==d.nodeType||(l=a+r),d!==o||0!==i&&3!==d.nodeType||(c=a+i),3===d.nodeType&&(a+=d.nodeValue.length),null!==(p=d.firstChild);)f=d,d=p;for(;;){if(d===t)break e;if(f===n&&++u===r&&(l=a),f===o&&++h===i&&(c=a),null!==(p=d.nextSibling))break;f=(d=f).parentNode}d=p}n=-1===l||-1===c?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(er={focusedElem:t,selectionRange:n},Ve=!1,Ga=e;null!==Ga;)if(t=(e=Ga).child,0!==(1028&e.subtreeFlags)&&null!==t)t.return=e,Ga=t;else for(;null!==Ga;){e=Ga;try{var g=e.alternate;if(0!==(1024&e.flags))switch(e.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==g){var m=g.memoizedProps,y=g.memoizedState,b=e.stateNode,v=b.getSnapshotBeforeUpdate(e.elementType===e.type?m:na(e.type,m),y);b.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var x=e.stateNode.containerInfo;1===x.nodeType?x.textContent="":9===x.nodeType&&x.documentElement&&x.removeChild(x.documentElement);break;default:throw Error(s(163))}}catch(_){Sc(e,e.return,_)}if(null!==(t=e.sibling)){t.return=e.return,Ga=t;break}Ga=e.return}g=el,el=!1}(t,n),ml(n,t),pi(er),Ve=!!tr,er=tr=null,t.current=n,bl(n,t,r),Xt(),Tl=l,ve=a,Ol.transition=o}else t.current=n;if(Yl&&(Yl=!1,Kl=t,Ql=r),o=t.pendingLanes,0===o&&(ql=null),function(t){if(se&&"function"===typeof se.onCommitFiberRoot)try{se.onCommitFiberRoot(re,t,void 0,128===(128&t.current.flags))}catch(e){}}(n.stateNode),ic(t,Jt()),null!==e)for(i=t.onRecoverableError,n=0;n<e.length;n++)r=e[n],i(r.value,{componentStack:r.stack,digest:r.digest});if(Vl)throw Vl=!1,t=$l,$l=null,t;0!==(1&Ql)&&0!==t.tag&&wc(),o=t.pendingLanes,0!==(1&o)?t===Jl?Xl++:(Xl=0,Jl=t):Xl=0,Hr()}(t,e,n,i)}finally{Ol.transition=r,ve=i}return null}function wc(){if(null!==Kl){var t=xe(Ql),e=Ol.transition,n=ve;try{if(Ol.transition=null,ve=16>t?16:t,null===Kl)var i=!1;else{if(t=Kl,Kl=null,Ql=0,0!==(6&Tl))throw Error(s(331));var r=Tl;for(Tl|=4,Ga=t.current;null!==Ga;){var o=Ga,a=o.child;if(0!==(16&Ga.flags)){var l=o.deletions;if(null!==l){for(var c=0;c<l.length;c++){var u=l[c];for(Ga=u;null!==Ga;){var h=Ga;switch(h.tag){case 0:case 11:case 15:nl(8,h,o)}var d=h.child;if(null!==d)d.return=h,Ga=d;else for(;null!==Ga;){var f=(h=Ga).sibling,p=h.return;if(sl(h),h===u){Ga=null;break}if(null!==f){f.return=p,Ga=f;break}Ga=p}}}var g=o.alternate;if(null!==g){var m=g.child;if(null!==m){g.child=null;do{var y=m.sibling;m.sibling=null,m=y}while(null!==m)}}Ga=o}}if(0!==(2064&o.subtreeFlags)&&null!==a)a.return=o,Ga=a;else t:for(;null!==Ga;){if(0!==(2048&(o=Ga).flags))switch(o.tag){case 0:case 11:case 15:nl(9,o,o.return)}var b=o.sibling;if(null!==b){b.return=o.return,Ga=b;break t}Ga=o.return}}var v=t.current;for(Ga=v;null!==Ga;){var x=(a=Ga).child;if(0!==(2064&a.subtreeFlags)&&null!==x)x.return=a,Ga=x;else t:for(a=v;null!==Ga;){if(0!==(2048&(l=Ga).flags))try{switch(l.tag){case 0:case 11:case 15:il(9,l)}}catch(w){Sc(l,l.return,w)}if(l===a){Ga=null;break t}var _=l.sibling;if(null!==_){_.return=l.return,Ga=_;break t}Ga=l.return}}if(Tl=r,Hr(),se&&"function"===typeof se.onPostCommitFiberRoot)try{se.onPostCommitFiberRoot(re,t)}catch(w){}i=!0}return i}finally{ve=n,Ol.transition=e}}return!1}function kc(t,e,n){t=Fs(t,e=fa(0,e=ca(n,e),1),1),e=tc(),null!==t&&(ye(t,1,e),ic(t,e))}function Sc(t,e,n){if(3===t.tag)kc(t,t,n);else for(;null!==e;){if(3===e.tag){kc(e,t,n);break}if(1===e.tag){var i=e.stateNode;if("function"===typeof e.type.getDerivedStateFromError||"function"===typeof i.componentDidCatch&&(null===ql||!ql.has(i))){e=Fs(e,t=pa(e,t=ca(n,t),1),1),t=tc(),null!==e&&(ye(e,1,t),ic(e,t));break}}e=e.return}}function Ec(t,e,n){var i=t.pingCache;null!==i&&i.delete(e),e=tc(),t.pingedLanes|=t.suspendedLanes&n,Ml===t&&(Nl&n)===n&&(4===Ll||3===Ll&&(130023424&Nl)===Nl&&500>Jt()-Ul?dc(t,0):Il|=n),ic(t,e)}function Cc(t,e){0===e&&(0===(1&t.mode)?e=1:(e=ue,0===(130023424&(ue<<=1))&&(ue=4194304)));var n=tc();null!==(t=Ls(t,e))&&(ye(t,e,n),ic(t,n))}function Oc(t){var e=t.memoizedState,n=0;null!==e&&(n=e.retryLane),Cc(t,n)}function Tc(t,e){var n=0;switch(t.tag){case 13:var i=t.stateNode,r=t.memoizedState;null!==r&&(n=r.retryLane);break;case 19:i=t.stateNode;break;default:throw Error(s(314))}null!==i&&i.delete(e),Cc(t,n)}function Mc(t,e){return Yt(t,e)}function Pc(t,e,n,i){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=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Nc(t,e,n,i){return new Pc(t,e,n,i)}function Rc(t){return!(!(t=t.prototype)||!t.isReactComponent)}function Ac(t,e){var n=t.alternate;return null===n?((n=Nc(t.tag,e,t.key,t.mode)).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=14680064&t.flags,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=null===e?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function Lc(t,e,n,i,r,o){var a=2;if(i=t,"function"===typeof t)Rc(t)&&(a=1);else if("string"===typeof t)a=5;else t:switch(t){case k:return Dc(n.children,r,o,e);case S:a=8,r|=8;break;case E:return(t=Nc(12,n,e,2|r)).elementType=E,t.lanes=o,t;case M:return(t=Nc(13,n,e,r)).elementType=M,t.lanes=o,t;case P:return(t=Nc(19,n,e,r)).elementType=P,t.lanes=o,t;case A:return jc(n,r,o,e);default:if("object"===typeof t&&null!==t)switch(t.$$typeof){case C:a=10;break t;case O:a=9;break t;case T:a=11;break t;case N:a=14;break t;case R:a=16,i=null;break t}throw Error(s(130,null==t?t:typeof t,""))}return(e=Nc(a,n,e,r)).elementType=t,e.type=i,e.lanes=o,e}function Dc(t,e,n,i){return(t=Nc(7,t,i,e)).lanes=n,t}function jc(t,e,n,i){return(t=Nc(22,t,i,e)).elementType=A,t.lanes=n,t.stateNode={isHidden:!1},t}function zc(t,e,n){return(t=Nc(6,t,null,e)).lanes=n,t}function Ic(t,e,n){return(e=Nc(4,null!==t.children?t.children:[],t.key,e)).lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function Fc(t,e,n,i,r){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=me(0),this.expirationTimes=me(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=me(0),this.identifierPrefix=i,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function Bc(t,e,n,i,r,s,o,a,l){return t=new Fc(t,e,n,a,l),1===e?(e=1,!0===s&&(e|=8)):e=0,s=Nc(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:i,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},js(s),t}function Uc(t){if(!t)return Or;t:{if(Ht(t=t._reactInternals)!==t||1!==t.tag)throw Error(s(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break t;case 1:if(Rr(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break t}}e=e.return}while(null!==e);throw Error(s(171))}if(1===t.tag){var n=t.type;if(Rr(n))return Dr(t,n,e)}return e}function Hc(t,e,n,i,r,s,o,a,l){return(t=Bc(n,i,!0,t,0,s,0,a,l)).context=Uc(null),n=t.current,(s=Is(i=tc(),r=ec(n))).callback=void 0!==e&&null!==e?e:null,Fs(n,s,r),t.current.lanes=r,ye(t,r,i),ic(t,i),t}function Wc(t,e,n,i){var r=e.current,s=tc(),o=ec(r);return n=Uc(n),null===e.context?e.context=n:e.pendingContext=n,(e=Is(s,o)).payload={element:t},null!==(i=void 0===i?null:i)&&(e.callback=i),null!==(t=Fs(r,e,o))&&(nc(t,r,o,s),Bs(t,r,o)),o}function Vc(t){return(t=t.current).child?(t.child.tag,t.child.stateNode):null}function $c(t,e){if(null!==(t=t.memoizedState)&&null!==t.dehydrated){var n=t.retryLane;t.retryLane=0!==n&&n<e?n:e}}function qc(t,e){$c(t,e),(t=t.alternate)&&$c(t,e)}kl=function(t,e,n){if(null!==t)if(t.memoizedProps!==e.pendingProps||Mr.current)va=!0;else{if(0===(t.lanes&n)&&0===(128&e.flags))return va=!1,function(t,e,n){switch(e.tag){case 3:Ma(e),fs();break;case 5:Js(e);break;case 1:Rr(e.type)&&jr(e);break;case 4:Qs(e,e.stateNode.containerInfo);break;case 10:var i=e.type._context,r=e.memoizedProps.value;Cr(ws,i._currentValue),i._currentValue=r;break;case 13:if(null!==(i=e.memoizedState))return null!==i.dehydrated?(Cr(Zs,1&Zs.current),e.flags|=128,null):0!==(n&e.child.childLanes)?za(t,e,n):(Cr(Zs,1&Zs.current),null!==(t=Va(t,e,n))?t.sibling:null);Cr(Zs,1&Zs.current);break;case 19:if(i=0!==(n&e.childLanes),0!==(128&t.flags)){if(i)return Ha(t,e,n);e.flags|=128}if(null!==(r=e.memoizedState)&&(r.rendering=null,r.tail=null,r.lastEffect=null),Cr(Zs,Zs.current),i)break;return null;case 22:case 23:return e.lanes=0,Sa(t,e,n)}return Va(t,e,n)}(t,e,n);va=0!==(131072&t.flags)}else va=!1,rs&&0!==(1048576&e.flags)&&Zr(e,qr,e.index);switch(e.lanes=0,e.tag){case 2:var i=e.type;Wa(t,e),t=e.pendingProps;var r=Nr(e,Tr.current);Ms(e,n),r=mo(null,e,i,t,r,n);var o=yo();return e.flags|=1,"object"===typeof r&&null!==r&&"function"===typeof r.render&&void 0===r.$$typeof?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Rr(i)?(o=!0,jr(e)):o=!1,e.memoizedState=null!==r.state&&void 0!==r.state?r.state:null,js(e),r.updater=ra,e.stateNode=r,r._reactInternals=e,la(e,i,t,n),e=Ta(null,e,i,!0,o,n)):(e.tag=0,rs&&o&&ts(e),xa(null,e,r,n),e=e.child),e;case 16:i=e.elementType;t:{switch(Wa(t,e),t=e.pendingProps,i=(r=i._init)(i._payload),e.type=i,r=e.tag=function(t){if("function"===typeof t)return Rc(t)?1:0;if(void 0!==t&&null!==t){if((t=t.$$typeof)===T)return 11;if(t===N)return 14}return 2}(i),t=na(i,t),r){case 0:e=Ca(null,e,i,t,n);break t;case 1:e=Oa(null,e,i,t,n);break t;case 11:e=_a(null,e,i,t,n);break t;case 14:e=wa(null,e,i,na(i.type,t),n);break t}throw Error(s(306,i,""))}return e;case 0:return i=e.type,r=e.pendingProps,Ca(t,e,i,r=e.elementType===i?r:na(i,r),n);case 1:return i=e.type,r=e.pendingProps,Oa(t,e,i,r=e.elementType===i?r:na(i,r),n);case 3:t:{if(Ma(e),null===t)throw Error(s(387));i=e.pendingProps,r=(o=e.memoizedState).element,zs(t,e),Hs(e,i,null,n);var a=e.memoizedState;if(i=a.element,o.isDehydrated){if(o={element:i,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},e.updateQueue.baseState=o,e.memoizedState=o,256&e.flags){e=Pa(t,e,i,n,r=ca(Error(s(423)),e));break t}if(i!==r){e=Pa(t,e,i,n,r=ca(Error(s(424)),e));break t}for(is=cr(e.stateNode.containerInfo.firstChild),ns=e,rs=!0,ss=null,n=_s(e,null,i,n),e.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(fs(),i===r){e=Va(t,e,n);break t}xa(t,e,i,n)}e=e.child}return e;case 5:return Js(e),null===t&&cs(e),i=e.type,r=e.pendingProps,o=null!==t?t.memoizedProps:null,a=r.children,nr(i,r)?a=null:null!==o&&nr(i,o)&&(e.flags|=32),Ea(t,e),xa(t,e,a,n),e.child;case 6:return null===t&&cs(e),null;case 13:return za(t,e,n);case 4:return Qs(e,e.stateNode.containerInfo),i=e.pendingProps,null===t?e.child=xs(e,null,i,n):xa(t,e,i,n),e.child;case 11:return i=e.type,r=e.pendingProps,_a(t,e,i,r=e.elementType===i?r:na(i,r),n);case 7:return xa(t,e,e.pendingProps,n),e.child;case 8:case 12:return xa(t,e,e.pendingProps.children,n),e.child;case 10:t:{if(i=e.type._context,r=e.pendingProps,o=e.memoizedProps,a=r.value,Cr(ws,i._currentValue),i._currentValue=a,null!==o)if(ai(o.value,a)){if(o.children===r.children&&!Mr.current){e=Va(t,e,n);break t}}else for(null!==(o=e.child)&&(o.return=e);null!==o;){var l=o.dependencies;if(null!==l){a=o.child;for(var c=l.firstContext;null!==c;){if(c.context===i){if(1===o.tag){(c=Is(-1,n&-n)).tag=2;var u=o.updateQueue;if(null!==u){var h=(u=u.shared).pending;null===h?c.next=c:(c.next=h.next,h.next=c),u.pending=c}}o.lanes|=n,null!==(c=o.alternate)&&(c.lanes|=n),Ts(o.return,n,e),l.lanes|=n;break}c=c.next}}else if(10===o.tag)a=o.type===e.type?null:o.child;else if(18===o.tag){if(null===(a=o.return))throw Error(s(341));a.lanes|=n,null!==(l=a.alternate)&&(l.lanes|=n),Ts(a,n,e),a=o.sibling}else a=o.child;if(null!==a)a.return=o;else for(a=o;null!==a;){if(a===e){a=null;break}if(null!==(o=a.sibling)){o.return=a.return,a=o;break}a=a.return}o=a}xa(t,e,r.children,n),e=e.child}return e;case 9:return r=e.type,i=e.pendingProps.children,Ms(e,n),i=i(r=Ps(r)),e.flags|=1,xa(t,e,i,n),e.child;case 14:return r=na(i=e.type,e.pendingProps),wa(t,e,i,r=na(i.type,r),n);case 15:return ka(t,e,e.type,e.pendingProps,n);case 17:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:na(i,r),Wa(t,e),e.tag=1,Rr(i)?(t=!0,jr(e)):t=!1,Ms(e,n),oa(e,i,r),la(e,i,r,n),Ta(null,e,i,!0,t,n);case 19:return Ha(t,e,n);case 22:return Sa(t,e,n)}throw Error(s(156,e.tag))};var Yc="function"===typeof reportError?reportError:function(t){console.error(t)};function Kc(t){this._internalRoot=t}function Qc(t){this._internalRoot=t}function Xc(t){return!(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType)}function Jc(t){return!(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType&&(8!==t.nodeType||" react-mount-point-unstable "!==t.nodeValue))}function Gc(){}function Zc(t,e,n,i,r){var s=n._reactRootContainer;if(s){var o=s;if("function"===typeof r){var a=r;r=function(){var t=Vc(o);a.call(t)}}Wc(e,o,t,r)}else o=function(t,e,n,i,r){if(r){if("function"===typeof i){var s=i;i=function(){var t=Vc(o);s.call(t)}}var o=Hc(e,i,t,0,null,!1,0,"",Gc);return t._reactRootContainer=o,t[pr]=o.current,Hi(8===t.nodeType?t.parentNode:t),uc(),o}for(;r=t.lastChild;)t.removeChild(r);if("function"===typeof i){var a=i;i=function(){var t=Vc(l);a.call(t)}}var l=Bc(t,0,!1,null,0,!1,0,"",Gc);return t._reactRootContainer=l,t[pr]=l.current,Hi(8===t.nodeType?t.parentNode:t),uc((function(){Wc(e,l,n,i)})),l}(n,e,t,r,i);return Vc(o)}Qc.prototype.render=Kc.prototype.render=function(t){var e=this._internalRoot;if(null===e)throw Error(s(409));Wc(t,e,null,null)},Qc.prototype.unmount=Kc.prototype.unmount=function(){var t=this._internalRoot;if(null!==t){this._internalRoot=null;var e=t.containerInfo;uc((function(){Wc(null,t,null,null)})),e[pr]=null}},Qc.prototype.unstable_scheduleHydration=function(t){if(t){var e=Se();t={blockedOn:null,target:t,priority:e};for(var n=0;n<Ae.length&&0!==e&&e<Ae[n].priority;n++);Ae.splice(n,0,t),0===n&&ze(t)}},_e=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=he(e.pendingLanes);0!==n&&(be(e,1|n),ic(e,Jt()),0===(6&Tl)&&(Hl=Jt()+500,Hr()))}break;case 13:uc((function(){var e=Ls(t,1);if(null!==e){var n=tc();nc(e,t,1,n)}})),qc(t,1)}},we=function(t){if(13===t.tag){var e=Ls(t,134217728);if(null!==e)nc(e,t,134217728,tc());qc(t,134217728)}},ke=function(t){if(13===t.tag){var e=ec(t),n=Ls(t,e);if(null!==n)nc(n,t,e,tc());qc(t,e)}},Se=function(){return ve},Ee=function(t,e){var n=ve;try{return ve=t,e()}finally{ve=n}},wt=function(t,e,n){switch(e){case"input":if(G(t,n),e=n.name,"radio"===n.type&&null!=e){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var i=n[e];if(i!==t&&i.form===t.form){var r=_r(i);if(!r)throw Error(s(90));Y(i),G(i,r)}}}break;case"textarea":st(t,n);break;case"select":null!=(e=n.value)&&nt(t,!!n.multiple,e,!1)}},Tt=cc,Mt=uc;var tu={usingClientEntryPoint:!1,Events:[vr,xr,_r,Ct,Ot,cc]},eu={findFiberByHostInstance:br,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},nu={bundleType:eu.bundleType,version:eu.version,rendererPackageName:eu.rendererPackageName,rendererConfig:eu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:x.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return null===(t=$t(t))?null:t.stateNode},findFiberByHostInstance:eu.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var iu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!iu.isDisabled&&iu.supportsFiber)try{re=iu.inject(nu),se=iu}catch(ut){}}e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tu,e.createPortal=function(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Xc(e))throw Error(s(200));return function(t,e,n){var i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:w,key:null==i?null:""+i,children:t,containerInfo:e,implementation:n}}(t,e,null,n)},e.createRoot=function(t,e){if(!Xc(t))throw Error(s(299));var n=!1,i="",r=Yc;return null!==e&&void 0!==e&&(!0===e.unstable_strictMode&&(n=!0),void 0!==e.identifierPrefix&&(i=e.identifierPrefix),void 0!==e.onRecoverableError&&(r=e.onRecoverableError)),e=Bc(t,1,!1,null,0,n,0,i,r),t[pr]=e.current,Hi(8===t.nodeType?t.parentNode:t),new Kc(e)},e.findDOMNode=function(t){if(null==t)return null;if(1===t.nodeType)return t;var e=t._reactInternals;if(void 0===e){if("function"===typeof t.render)throw Error(s(188));throw t=Object.keys(t).join(","),Error(s(268,t))}return t=null===(t=$t(e))?null:t.stateNode},e.flushSync=function(t){return uc(t)},e.hydrate=function(t,e,n){if(!Jc(e))throw Error(s(200));return Zc(null,t,e,!0,n)},e.hydrateRoot=function(t,e,n){if(!Xc(t))throw Error(s(405));var i=null!=n&&n.hydratedSources||null,r=!1,o="",a=Yc;if(null!==n&&void 0!==n&&(!0===n.unstable_strictMode&&(r=!0),void 0!==n.identifierPrefix&&(o=n.identifierPrefix),void 0!==n.onRecoverableError&&(a=n.onRecoverableError)),e=Hc(e,null,t,1,null!=n?n:null,r,0,o,a),t[pr]=e.current,Hi(t),i)for(t=0;t<i.length;t++)r=(r=(n=i[t])._getVersion)(n._source),null==e.mutableSourceEagerHydrationData?e.mutableSourceEagerHydrationData=[n,r]:e.mutableSourceEagerHydrationData.push(n,r);return new Qc(e)},e.render=function(t,e,n){if(!Jc(e))throw Error(s(200));return Zc(null,t,e,!1,n)},e.unmountComponentAtNode=function(t){if(!Jc(t))throw Error(s(40));return!!t._reactRootContainer&&(uc((function(){Zc(null,null,t,!1,(function(){t._reactRootContainer=null,t[pr]=null}))})),!0)},e.unstable_batchedUpdates=cc,e.unstable_renderSubtreeIntoContainer=function(t,e,n,i){if(!Jc(n))throw Error(s(200));if(null==t||void 0===t._reactInternals)throw Error(s(38));return Zc(t,e,n,!1,i)},e.version="18.3.1-next-f1338f8080-20240426"},853:(t,e,n)=>{t.exports=n(234)},950:(t,e,n)=>{!function t(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}(),t.exports=n(730)}},e={};function n(i){var r=e[i];if(void 0!==r)return r.exports;var s=e[i]={exports:{}};return t[i](s,s.exports,n),s.exports}n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};n.r(i),n.d(i,{Decoder:()=>xt,Encoder:()=>bt,PacketType:()=>yt,protocol:()=>mt});var r={};n.r(r),n.d(r,{hasBrowserEnv:()=>Re,hasStandardBrowserEnv:()=>Le,hasStandardBrowserWebWorkerEnv:()=>De,navigator:()=>Ae,origin:()=>je});var s=n(43),o=n(391);const a=Object.create(null);a.open="0",a.close="1",a.ping="2",a.pong="3",a.message="4",a.upgrade="5",a.noop="6";const l=Object.create(null);Object.keys(a).forEach((t=>{l[a[t]]=t}));const c={type:"error",data:"parser error"},u="function"===typeof Blob||"undefined"!==typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),h="function"===typeof ArrayBuffer,d=t=>"function"===typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,f=(t,e,n)=>{let{type:i,data:r}=t;return u&&r instanceof Blob?e?n(r):p(r,n):h&&(r instanceof ArrayBuffer||d(r))?e?n(r):p(new Blob([r]),n):n(a[i]+(r||""))},p=(t,e)=>{const n=new FileReader;return n.onload=function(){const t=n.result.split(",")[1];e("b"+(t||""))},n.readAsDataURL(t)};function g(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let m;const y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b="undefined"===typeof Uint8Array?[]:new Uint8Array(256);for(let bc=0;bc<64;bc++)b[y.charCodeAt(bc)]=bc;const v="function"===typeof ArrayBuffer,x=(t,e)=>{if("string"!==typeof t)return{type:"message",data:w(t,e)};const n=t.charAt(0);if("b"===n)return{type:"message",data:_(t.substring(1),e)};return l[n]?t.length>1?{type:l[n],data:t.substring(1)}:{type:l[n]}:c},_=(t,e)=>{if(v){const n=(t=>{let e,n,i,r,s,o=.75*t.length,a=t.length,l=0;"="===t[t.length-1]&&(o--,"="===t[t.length-2]&&o--);const c=new ArrayBuffer(o),u=new Uint8Array(c);for(e=0;e<a;e+=4)n=b[t.charCodeAt(e)],i=b[t.charCodeAt(e+1)],r=b[t.charCodeAt(e+2)],s=b[t.charCodeAt(e+3)],u[l++]=n<<2|i>>4,u[l++]=(15&i)<<4|r>>2,u[l++]=(3&r)<<6|63&s;return c})(t);return w(n,e)}return{base64:!0,data:t}},w=(t,e)=>"blob"===e?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer,k=String.fromCharCode(30);function S(){return new TransformStream({transform(t,e){!function(t,e){u&&t.data instanceof Blob?t.data.arrayBuffer().then(g).then(e):h&&(t.data instanceof ArrayBuffer||d(t.data))?e(g(t.data)):f(t,!1,(t=>{m||(m=new TextEncoder),e(m.encode(t))}))}(t,(n=>{const i=n.length;let r;if(i<126)r=new Uint8Array(1),new DataView(r.buffer).setUint8(0,i);else if(i<65536){r=new Uint8Array(3);const t=new DataView(r.buffer);t.setUint8(0,126),t.setUint16(1,i)}else{r=new Uint8Array(9);const t=new DataView(r.buffer);t.setUint8(0,127),t.setBigUint64(1,BigInt(i))}t.data&&"string"!==typeof t.data&&(r[0]|=128),e.enqueue(r),e.enqueue(n)}))}})}let E;function C(t){return t.reduce(((t,e)=>t+e.length),0)}function O(t,e){if(t[0].length===e)return t.shift();const n=new Uint8Array(e);let i=0;for(let r=0;r<e;r++)n[r]=t[0][i++],i===t[0].length&&(t.shift(),i=0);return t.length&&i<t[0].length&&(t[0]=t[0].slice(i)),n}function T(t){if(t)return function(t){for(var e in T.prototype)t[e]=T.prototype[e];return t}(t)}T.prototype.on=T.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},T.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},T.prototype.off=T.prototype.removeListener=T.prototype.removeAllListeners=T.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,i=this._callbacks["$"+t];if(!i)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var r=0;r<i.length;r++)if((n=i[r])===e||n.fn===e){i.splice(r,1);break}return 0===i.length&&delete this._callbacks["$"+t],this},T.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],i=1;i<arguments.length;i++)e[i-1]=arguments[i];if(n){i=0;for(var r=(n=n.slice(0)).length;i<r;++i)n[i].apply(this,e)}return this},T.prototype.emitReserved=T.prototype.emit,T.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},T.prototype.hasListeners=function(t){return!!this.listeners(t).length};const M="function"===typeof Promise&&"function"===typeof Promise.resolve?t=>Promise.resolve().then(t):(t,e)=>e(t,0),P="undefined"!==typeof self?self:"undefined"!==typeof window?window:Function("return this")();function N(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return n.reduce(((e,n)=>(t.hasOwnProperty(n)&&(e[n]=t[n]),e)),{})}const R=P.setTimeout,A=P.clearTimeout;function L(t,e){e.useNativeTimers?(t.setTimeoutFn=R.bind(P),t.clearTimeoutFn=A.bind(P)):(t.setTimeoutFn=P.setTimeout.bind(P),t.clearTimeoutFn=P.clearTimeout.bind(P))}function D(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}class j extends Error{constructor(t,e,n){super(t),this.description=e,this.context=n,this.type="TransportError"}}class z extends T{constructor(t){super(),this.writable=!1,L(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,e,n){return super.emitReserved("error",new j(t,e,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(t){"open"===this.readyState&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const e=x(t,this.socket.binaryType);this.onPacket(e)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(e)}_hostname(){const t=this.opts.hostname;return-1===t.indexOf(":")?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(t){const e=function(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e}(t);return e.length?"?"+e:""}}class I extends z{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const e=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let t=0;this._polling&&(t++,this.once("pollComplete",(function(){--t||e()}))),this.writable||(t++,this.once("drain",(function(){--t||e()})))}else e()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){((t,e)=>{const n=t.split(k),i=[];for(let r=0;r<n.length;r++){const t=x(n[r],e);if(i.push(t),"error"===t.type)break}return i})(t,this.socket.binaryType).forEach((t=>{if("opening"===this.readyState&&"open"===t.type&&this.onOpen(),"close"===t.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(t)})),"closed"!==this.readyState&&(this._polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};"open"===this.readyState?t():this.once("open",t)}write(t){this.writable=!1,((t,e)=>{const n=t.length,i=new Array(n);let r=0;t.forEach(((t,s)=>{f(t,!1,(t=>{i[s]=t,++r===n&&e(i.join(k))}))}))})(t,(t=>{this.doWrite(t,(()=>{this.writable=!0,this.emitReserved("drain")}))}))}uri(){const t=this.opts.secure?"https":"http",e=this.query||{};return!1!==this.opts.timestampRequests&&(e[this.opts.timestampParam]=D()),this.supportsBinary||e.sid||(e.b64=1),this.createUri(t,e)}}let F=!1;try{F="undefined"!==typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(yc){}const B=F;function U(){}class H extends I{constructor(t){if(super(t),"undefined"!==typeof location){const e="https:"===location.protocol;let n=location.port;n||(n=e?"443":"80"),this.xd="undefined"!==typeof location&&t.hostname!==location.hostname||n!==t.port}}doWrite(t,e){const n=this.request({method:"POST",data:t});n.on("success",e),n.on("error",((t,e)=>{this.onError("xhr post error",t,e)}))}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",((t,e)=>{this.onError("xhr poll error",t,e)})),this.pollXhr=t}}class W extends T{constructor(t,e,n){super(),this.createRequest=t,L(this,n),this._opts=n,this._method=n.method||"GET",this._uri=e,this._data=void 0!==n.data?n.data:null,this._create()}_create(){var t;const e=N(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this._opts.xd;const n=this._xhr=this.createRequest(e);try{n.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let t in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(t)&&n.setRequestHeader(t,this._opts.extraHeaders[t])}}catch(i){}if("POST"===this._method)try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(i){}try{n.setRequestHeader("Accept","*/*")}catch(i){}null===(t=this._opts.cookieJar)||void 0===t||t.addCookies(n),"withCredentials"in n&&(n.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(n.timeout=this._opts.requestTimeout),n.onreadystatechange=()=>{var t;3===n.readyState&&(null===(t=this._opts.cookieJar)||void 0===t||t.parseCookies(n.getResponseHeader("set-cookie"))),4===n.readyState&&(200===n.status||1223===n.status?this._onLoad():this.setTimeoutFn((()=>{this._onError("number"===typeof n.status?n.status:0)}),0))},n.send(this._data)}catch(i){return void this.setTimeoutFn((()=>{this._onError(i)}),0)}"undefined"!==typeof document&&(this._index=W.requestsCount++,W.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if("undefined"!==typeof this._xhr&&null!==this._xhr){if(this._xhr.onreadystatechange=U,t)try{this._xhr.abort()}catch(e){}"undefined"!==typeof document&&delete W.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;null!==t&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(W.requestsCount=0,W.requests={},"undefined"!==typeof document)if("function"===typeof attachEvent)attachEvent("onunload",V);else if("function"===typeof addEventListener){addEventListener("onpagehide"in P?"pagehide":"unload",V,!1)}function V(){for(let t in W.requests)W.requests.hasOwnProperty(t)&&W.requests[t].abort()}const $=function(){const t=q({xdomain:!1});return t&&null!==t.responseType}();function q(t){const e=t.xdomain;try{if("undefined"!==typeof XMLHttpRequest&&(!e||B))return new XMLHttpRequest}catch(n){}if(!e)try{return new(P[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(n){}}const Y="undefined"!==typeof navigator&&"string"===typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class K extends z{get name(){return"websocket"}doOpen(){const t=this.uri(),e=this.opts.protocols,n=Y?{}:N(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,e,n)}catch(yc){return this.emitReserved("error",yc)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let e=0;e<t.length;e++){const n=t[e],i=e===t.length-1;f(n,this.supportsBinary,(t=>{try{this.doWrite(n,t)}catch(e){}i&&M((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){"undefined"!==typeof this.ws&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",e=this.query||{};return this.opts.timestampRequests&&(e[this.opts.timestampParam]=D()),this.supportsBinary||(e.b64=1),this.createUri(t,e)}}const Q=P.WebSocket||P.MozWebSocket;const X={websocket:class extends K{createSocket(t,e,n){return Y?new Q(t,e,n):e?new Q(t,e):new Q(t)}doWrite(t,e){this.ws.send(e)}},webtransport:class extends z{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(yc){return this.emitReserved("error",yc)}this._transport.closed.then((()=>{this.onClose()})).catch((t=>{this.onError("webtransport error",t)})),this._transport.ready.then((()=>{this._transport.createBidirectionalStream().then((t=>{const e=function(t,e){E||(E=new TextDecoder);const n=[];let i=0,r=-1,s=!1;return new TransformStream({transform(o,a){for(n.push(o);;){if(0===i){if(C(n)<1)break;const t=O(n,1);s=128===(128&t[0]),r=127&t[0],i=r<126?3:126===r?1:2}else if(1===i){if(C(n)<2)break;const t=O(n,2);r=new DataView(t.buffer,t.byteOffset,t.length).getUint16(0),i=3}else if(2===i){if(C(n)<8)break;const t=O(n,8),e=new DataView(t.buffer,t.byteOffset,t.length),s=e.getUint32(0);if(s>Math.pow(2,21)-1){a.enqueue(c);break}r=s*Math.pow(2,32)+e.getUint32(4),i=3}else{if(C(n)<r)break;const t=O(n,r);a.enqueue(x(s?t:E.decode(t),e)),i=0}if(0===r||r>t){a.enqueue(c);break}}}})}(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=t.readable.pipeThrough(e).getReader(),i=S();i.readable.pipeTo(t.writable),this._writer=i.writable.getWriter();const r=()=>{n.read().then((t=>{let{done:e,value:n}=t;e||(this.onPacket(n),r())})).catch((t=>{}))};r();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this._writer.write(s).then((()=>this.onOpen()))}))}))}write(t){this.writable=!1;for(let e=0;e<t.length;e++){const n=t[e],i=e===t.length-1;this._writer.write(n).then((()=>{i&&M((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){var t;null===(t=this._transport)||void 0===t||t.close()}},polling:class extends H{constructor(t){super(t);const e=t&&t.forceBase64;this.supportsBinary=$&&!e}request(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.assign(t,{xd:this.xd},this.opts),new W(q,this.uri(),t)}}},J=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,G=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Z(t){if(t.length>8e3)throw"URI too long";const e=t,n=t.indexOf("["),i=t.indexOf("]");-1!=n&&-1!=i&&(t=t.substring(0,n)+t.substring(n,i).replace(/:/g,";")+t.substring(i,t.length));let r=J.exec(t||""),s={},o=14;for(;o--;)s[G[o]]=r[o]||"";return-1!=n&&-1!=i&&(s.source=e,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=function(t,e){const n=/\/{2,9}/g,i=e.replace(n,"/").split("/");"/"!=e.slice(0,1)&&0!==e.length||i.splice(0,1);"/"==e.slice(-1)&&i.splice(i.length-1,1);return i}(0,s.path),s.queryKey=function(t,e){const n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(t,e,i){e&&(n[e]=i)})),n}(0,s.query),s}const tt="function"===typeof addEventListener&&"function"===typeof removeEventListener,et=[];tt&&addEventListener("offline",(()=>{et.forEach((t=>t()))}),!1);class nt extends T{constructor(t,e){if(super(),this.binaryType="arraybuffer",this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&"object"===typeof t&&(e=t,t=null),t){const n=Z(t);e.hostname=n.host,e.secure="https"===n.protocol||"wss"===n.protocol,e.port=n.port,n.query&&(e.query=n.query)}else e.host&&(e.hostname=Z(e.host).host);L(this,e),this.secure=null!=e.secure?e.secure:"undefined"!==typeof location&&"https:"===location.protocol,e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.hostname=e.hostname||("undefined"!==typeof location?location.hostname:"localhost"),this.port=e.port||("undefined"!==typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},e.transports.forEach((t=>{const e=t.prototype.name;this.transports.push(e),this._transportsByName[e]=t})),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},e),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"===typeof this.opts.query&&(this.opts.query=function(t){let e={},n=t.split("&");for(let i=0,r=n.length;i<r;i++){let t=n[i].split("=");e[decodeURIComponent(t[0])]=decodeURIComponent(t[1])}return e}(this.opts.query)),tt&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},et.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const e=Object.assign({},this.opts.query);e.EIO=4,e.transport=t,this.id&&(e.sid=this.id);const n=Object.assign({},this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](n)}_open(){if(0===this.transports.length)return void this.setTimeoutFn((()=>{this.emitReserved("error","No transports available")}),0);const t=this.opts.rememberUpgrade&&nt.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket")?"websocket":this.transports[0];this.readyState="opening";const e=this.createTransport(t);e.open(),this.setTransport(e)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",(t=>this._onClose("transport close",t)))}onOpen(){this.readyState="open",nt.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush()}_onPacket(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const e=new Error("server error");e.code=t.data,this._onError(e);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data)}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),"closed"!==this.readyState&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn((()=>{this._onClose("ping timeout")}),t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let n=0;n<this.writeBuffer.length;n++){const i=this.writeBuffer[n].data;if(i&&(t+="string"===typeof(e=i)?function(t){let e=0,n=0;for(let i=0,r=t.length;i<r;i++)e=t.charCodeAt(i),e<128?n+=1:e<2048?n+=2:e<55296||e>=57344?n+=3:(i++,n+=4);return n}(e):Math.ceil(1.33*(e.byteLength||e.size))),n>0&&t>this._maxPayload)return this.writeBuffer.slice(0,n);t+=2}var e;return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,M((()=>{this._onClose("ping timeout")}),this.setTimeoutFn)),t}write(t,e,n){return this._sendPacket("message",t,e,n),this}send(t,e,n){return this._sendPacket("message",t,e,n),this}_sendPacket(t,e,n,i){if("function"===typeof e&&(i=e,e=void 0),"function"===typeof n&&(i=n,n=null),"closing"===this.readyState||"closed"===this.readyState)return;(n=n||{}).compress=!1!==n.compress;const r={type:t,data:e,options:n};this.emitReserved("packetCreate",r),this.writeBuffer.push(r),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},e=()=>{this.off("upgrade",e),this.off("upgradeError",e),t()},n=()=>{this.once("upgrade",e),this.once("upgradeError",e)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(()=>{this.upgrading?n():t()})):this.upgrading?n():t()),this}_onError(t){if(nt.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&"opening"===this.readyState)return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),tt&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const t=et.indexOf(this._offlineEventListener);-1!==t&&et.splice(t,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,e),this.writeBuffer=[],this._prevBufferLen=0}}}nt.protocol=4;class it extends nt{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),"open"===this.readyState&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let e=this.createTransport(t),n=!1;nt.priorWebsocketSuccess=!1;const i=()=>{n||(e.send([{type:"ping",data:"probe"}]),e.once("packet",(t=>{if(!n)if("pong"===t.type&&"probe"===t.data){if(this.upgrading=!0,this.emitReserved("upgrading",e),!e)return;nt.priorWebsocketSuccess="websocket"===e.name,this.transport.pause((()=>{n||"closed"!==this.readyState&&(c(),this.setTransport(e),e.send([{type:"upgrade"}]),this.emitReserved("upgrade",e),e=null,this.upgrading=!1,this.flush())}))}else{const t=new Error("probe error");t.transport=e.name,this.emitReserved("upgradeError",t)}})))};function r(){n||(n=!0,c(),e.close(),e=null)}const s=t=>{const n=new Error("probe error: "+t);n.transport=e.name,r(),this.emitReserved("upgradeError",n)};function o(){s("transport closed")}function a(){s("socket closed")}function l(t){e&&t.name!==e.name&&r()}const c=()=>{e.removeListener("open",i),e.removeListener("error",s),e.removeListener("close",o),this.off("close",a),this.off("upgrading",l)};e.once("open",i),e.once("error",s),e.once("close",o),this.once("close",a),this.once("upgrading",l),-1!==this._upgrades.indexOf("webtransport")&&"webtransport"!==t?this.setTimeoutFn((()=>{n||e.open()}),200):e.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const e=[];for(let n=0;n<t.length;n++)~this.transports.indexOf(t[n])&&e.push(t[n]);return e}}class rt extends it{constructor(t){const e="object"===typeof t?t:arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(!e.transports||e.transports&&"string"===typeof e.transports[0])&&(e.transports=(e.transports||["polling","websocket","webtransport"]).map((t=>X[t])).filter((t=>!!t))),super(t,e)}}const st="function"===typeof ArrayBuffer,ot=Object.prototype.toString,at="function"===typeof Blob||"undefined"!==typeof Blob&&"[object BlobConstructor]"===ot.call(Blob),lt="function"===typeof File||"undefined"!==typeof File&&"[object FileConstructor]"===ot.call(File);function ct(t){return st&&(t instanceof ArrayBuffer||(t=>"function"===typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(t))||at&&t instanceof Blob||lt&&t instanceof File}function ut(t,e){if(!t||"object"!==typeof t)return!1;if(Array.isArray(t)){for(let e=0,n=t.length;e<n;e++)if(ut(t[e]))return!0;return!1}if(ct(t))return!0;if(t.toJSON&&"function"===typeof t.toJSON&&1===arguments.length)return ut(t.toJSON(),!0);for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&ut(t[n]))return!0;return!1}function ht(t){const e=[],n=t.data,i=t;return i.data=dt(n,e),i.attachments=e.length,{packet:i,buffers:e}}function dt(t,e){if(!t)return t;if(ct(t)){const n={_placeholder:!0,num:e.length};return e.push(t),n}if(Array.isArray(t)){const n=new Array(t.length);for(let i=0;i<t.length;i++)n[i]=dt(t[i],e);return n}if("object"===typeof t&&!(t instanceof Date)){const n={};for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=dt(t[i],e));return n}return t}function ft(t,e){return t.data=pt(t.data,e),delete t.attachments,t}function pt(t,e){if(!t)return t;if(t&&!0===t._placeholder){if("number"===typeof t.num&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}if(Array.isArray(t))for(let n=0;n<t.length;n++)t[n]=pt(t[n],e);else if("object"===typeof t)for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(t[n]=pt(t[n],e));return t}const gt=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],mt=5;var yt;!function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"}(yt||(yt={}));class bt{constructor(t){this.replacer=t}encode(t){return t.type!==yt.EVENT&&t.type!==yt.ACK||!ut(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===yt.EVENT?yt.BINARY_EVENT:yt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let e=""+t.type;return t.type!==yt.BINARY_EVENT&&t.type!==yt.BINARY_ACK||(e+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(e+=t.nsp+","),null!=t.id&&(e+=t.id),null!=t.data&&(e+=JSON.stringify(t.data,this.replacer)),e}encodeAsBinary(t){const e=ht(t),n=this.encodeAsString(e.packet),i=e.buffers;return i.unshift(n),i}}function vt(t){return"[object Object]"===Object.prototype.toString.call(t)}class xt extends T{constructor(t){super(),this.reviver=t}add(t){let e;if("string"===typeof t){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");e=this.decodeString(t);const n=e.type===yt.BINARY_EVENT;n||e.type===yt.BINARY_ACK?(e.type=n?yt.EVENT:yt.ACK,this.reconstructor=new _t(e),0===e.attachments&&super.emitReserved("decoded",e)):super.emitReserved("decoded",e)}else{if(!ct(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");e=this.reconstructor.takeBinaryData(t),e&&(this.reconstructor=null,super.emitReserved("decoded",e))}}decodeString(t){let e=0;const n={type:Number(t.charAt(0))};if(void 0===yt[n.type])throw new Error("unknown packet type "+n.type);if(n.type===yt.BINARY_EVENT||n.type===yt.BINARY_ACK){const i=e+1;for(;"-"!==t.charAt(++e)&&e!=t.length;);const r=t.substring(i,e);if(r!=Number(r)||"-"!==t.charAt(e))throw new Error("Illegal attachments");n.attachments=Number(r)}if("/"===t.charAt(e+1)){const i=e+1;for(;++e;){if(","===t.charAt(e))break;if(e===t.length)break}n.nsp=t.substring(i,e)}else n.nsp="/";const i=t.charAt(e+1);if(""!==i&&Number(i)==i){const i=e+1;for(;++e;){const n=t.charAt(e);if(null==n||Number(n)!=n){--e;break}if(e===t.length)break}n.id=Number(t.substring(i,e+1))}if(t.charAt(++e)){const i=this.tryParse(t.substr(e));if(!xt.isPayloadValid(n.type,i))throw new Error("invalid payload");n.data=i}return n}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(e){return!1}}static isPayloadValid(t,e){switch(t){case yt.CONNECT:return vt(e);case yt.DISCONNECT:return void 0===e;case yt.CONNECT_ERROR:return"string"===typeof e||vt(e);case yt.EVENT:case yt.BINARY_EVENT:return Array.isArray(e)&&("number"===typeof e[0]||"string"===typeof e[0]&&-1===gt.indexOf(e[0]));case yt.ACK:case yt.BINARY_ACK:return Array.isArray(e)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class _t{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const t=ft(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function wt(t,e,n){return t.on(e,n),function(){t.off(e,n)}}const kt=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class St extends T{constructor(t,e,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=e,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[wt(t,"open",this.onopen.bind(this)),wt(t,"packet",this.onpacket.bind(this)),wt(t,"error",this.onerror.bind(this)),wt(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.unshift("message"),this.emit.apply(this,e),this}emit(t){var e,n,i;if(kt.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');for(var r=arguments.length,s=new Array(r>1?r-1:0),o=1;o<r;o++)s[o-1]=arguments[o];if(s.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(s),this;const a={type:yt.EVENT,data:s,options:{}};if(a.options.compress=!1!==this.flags.compress,"function"===typeof s[s.length-1]){const t=this.ids++,e=s.pop();this._registerAckCallback(t,e),a.id=t}const l=null===(n=null===(e=this.io.engine)||void 0===e?void 0:e.transport)||void 0===n?void 0:n.writable,c=this.connected&&!(null===(i=this.io.engine)||void 0===i?void 0:i._hasPingExpired());return this.flags.volatile&&!l||(c?(this.notifyOutgoingListeners(a),this.packet(a)):this.sendBuffer.push(a)),this.flags={},this}_registerAckCallback(t,e){var n,i=this;const r=null!==(n=this.flags.timeout)&&void 0!==n?n:this._opts.ackTimeout;if(void 0===r)return void(this.acks[t]=e);const s=this.io.setTimeoutFn((()=>{delete this.acks[t];for(let e=0;e<this.sendBuffer.length;e++)this.sendBuffer[e].id===t&&this.sendBuffer.splice(e,1);e.call(this,new Error("operation has timed out"))}),r),o=function(){i.io.clearTimeoutFn(s);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];e.apply(i,n)};o.withError=!0,this.acks[t]=o}emitWithAck(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return new Promise(((e,i)=>{const r=(t,n)=>t?i(t):e(n);r.withError=!0,n.push(r),this.emit(t,...n)}))}_addToQueue(t){var e=this;let n;"function"===typeof t[t.length-1]&&(n=t.pop());const i={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((function(t){if(i!==e._queue[0])return;if(null!==t)i.tryCount>e._opts.retries&&(e._queue.shift(),n&&n(t));else if(e._queue.shift(),n){for(var r=arguments.length,s=new Array(r>1?r-1:0),o=1;o<r;o++)s[o-1]=arguments[o];n(null,...s)}return i.pending=!1,e._drainQueue()})),this._queue.push(i),this._drainQueue()}_drainQueue(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.connected||0===this._queue.length)return;const e=this._queue[0];e.pending&&!t||(e.pending=!0,e.tryCount++,this.flags=e.flags,this.emit.apply(this,e.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){"function"==typeof this.auth?this.auth((t=>{this._sendConnectPacket(t)})):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:yt.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,e){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,e),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach((t=>{if(!this.sendBuffer.some((e=>String(e.id)===t))){const e=this.acks[t];delete this.acks[t],e.withError&&e.call(this,new Error("socket has been disconnected"))}}))}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case yt.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case yt.EVENT:case yt.BINARY_EVENT:this.onevent(t);break;case yt.ACK:case yt.BINARY_ACK:this.onack(t);break;case yt.DISCONNECT:this.ondisconnect();break;case yt.CONNECT_ERROR:this.destroy();const e=new Error(t.data.message);e.data=t.data.data,this.emitReserved("connect_error",e)}}onevent(t){const e=t.data||[];null!=t.id&&e.push(this.ack(t.id)),this.connected?this.emitEvent(e):this.receiveBuffer.push(Object.freeze(e))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const e=this._anyListeners.slice();for(const n of e)n.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&"string"===typeof t[t.length-1]&&(this._lastOffset=t[t.length-1])}ack(t){const e=this;let n=!1;return function(){if(!n){n=!0;for(var i=arguments.length,r=new Array(i),s=0;s<i;s++)r[s]=arguments[s];e.packet({type:yt.ACK,id:t,data:r})}}}onack(t){const e=this.acks[t.id];"function"===typeof e&&(delete this.acks[t.id],e.withError&&t.data.unshift(null),e.apply(this,t.data))}onconnect(t,e){this.id=t,this.recovered=e&&this._pid===e,this._pid=e,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach((t=>this.emitEvent(t))),this.receiveBuffer=[],this.sendBuffer.forEach((t=>{this.notifyOutgoingListeners(t),this.packet(t)})),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach((t=>t())),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:yt.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const e=this._anyListeners;for(let n=0;n<e.length;n++)if(t===e[n])return e.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const e=this._anyOutgoingListeners;for(let n=0;n<e.length;n++)if(t===e[n])return e.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const e=this._anyOutgoingListeners.slice();for(const n of e)n.apply(this,t.data)}}}function Et(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}Et.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=0==(1&Math.floor(10*e))?t-n:t+n}return 0|Math.min(t,this.max)},Et.prototype.reset=function(){this.attempts=0},Et.prototype.setMin=function(t){this.ms=t},Et.prototype.setMax=function(t){this.max=t},Et.prototype.setJitter=function(t){this.jitter=t};class Ct extends T{constructor(t,e){var n;super(),this.nsps={},this.subs=[],t&&"object"===typeof t&&(e=t,t=void 0),(e=e||{}).path=e.path||"/socket.io",this.opts=e,L(this,e),this.reconnection(!1!==e.reconnection),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(n=e.randomizationFactor)&&void 0!==n?n:.5),this.backoff=new Et({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==e.timeout?2e4:e.timeout),this._readyState="closed",this.uri=t;const r=e.parser||i;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=!1!==e.autoConnect,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return void 0===t?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var e;return void 0===t?this._reconnectionDelay:(this._reconnectionDelay=t,null===(e=this.backoff)||void 0===e||e.setMin(t),this)}randomizationFactor(t){var e;return void 0===t?this._randomizationFactor:(this._randomizationFactor=t,null===(e=this.backoff)||void 0===e||e.setJitter(t),this)}reconnectionDelayMax(t){var e;return void 0===t?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,null===(e=this.backoff)||void 0===e||e.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new rt(this.uri,this.opts);const e=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const i=wt(e,"open",(function(){n.onopen(),t&&t()})),r=e=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",e),t?t(e):this.maybeReconnectOnOpen()},s=wt(e,"error",r);if(!1!==this._timeout){const t=this._timeout,n=this.setTimeoutFn((()=>{i(),r(new Error("timeout")),e.close()}),t);this.opts.autoUnref&&n.unref(),this.subs.push((()=>{this.clearTimeoutFn(n)}))}return this.subs.push(i),this.subs.push(s),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(wt(t,"ping",this.onping.bind(this)),wt(t,"data",this.ondata.bind(this)),wt(t,"error",this.onerror.bind(this)),wt(t,"close",this.onclose.bind(this)),wt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(e){this.onclose("parse error",e)}}ondecoded(t){M((()=>{this.emitReserved("packet",t)}),this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,e){let n=this.nsps[t];return n?this._autoConnect&&!n.active&&n.connect():(n=new St(this,t,e),this.nsps[t]=n),n}_destroy(t){const e=Object.keys(this.nsps);for(const n of e){if(this.nsps[n].active)return}this._close()}_packet(t){const e=this.encoder.encode(t);for(let n=0;n<e.length;n++)this.engine.write(e[n],t.options)}cleanup(){this.subs.forEach((t=>t())),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,e){var n;this.cleanup(),null===(n=this.engine)||void 0===n||n.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,e),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const e=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn((()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),t.skipReconnect||t.open((e=>{e?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",e)):t.onreconnect()})))}),e);this.opts.autoUnref&&n.unref(),this.subs.push((()=>{this.clearTimeoutFn(n)}))}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Ot={};function Tt(t,e){"object"===typeof t&&(e=t,t=void 0);const n=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,i=t;n=n||"undefined"!==typeof location&&location,null==t&&(t=n.protocol+"//"+n.host),"string"===typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?n.protocol+t:n.host+t),/^(https?|wss?):\/\//.test(t)||(t="undefined"!==typeof n?n.protocol+"//"+t:"https://"+t),i=Z(t)),i.port||(/^(http|ws)$/.test(i.protocol)?i.port="80":/^(http|ws)s$/.test(i.protocol)&&(i.port="443")),i.path=i.path||"/";const r=-1!==i.host.indexOf(":")?"["+i.host+"]":i.host;return i.id=i.protocol+"://"+r+":"+i.port+e,i.href=i.protocol+"://"+r+(n&&n.port===i.port?"":":"+i.port),i}(t,(e=e||{}).path||"/socket.io"),i=n.source,r=n.id,s=n.path,o=Ot[r]&&s in Ot[r].nsps;let a;return e.forceNew||e["force new connection"]||!1===e.multiplex||o?a=new Ct(i,e):(Ot[r]||(Ot[r]=new Ct(i,e)),a=Ot[r]),n.query&&!e.query&&(e.query=n.queryKey),a.socket(n.path,e)}function Mt(t,e){return function(){return t.apply(e,arguments)}}Object.assign(Tt,{Manager:Ct,Socket:St,io:Tt,connect:Tt});const{toString:Pt}=Object.prototype,{getPrototypeOf:Nt}=Object,{iterator:Rt,toStringTag:At}=Symbol,Lt=(t=>e=>{const n=Pt.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Dt=t=>(t=t.toLowerCase(),e=>Lt(e)===t),jt=t=>e=>typeof e===t,{isArray:zt}=Array,It=jt("undefined");const Ft=Dt("ArrayBuffer");const Bt=jt("string"),Ut=jt("function"),Ht=jt("number"),Wt=t=>null!==t&&"object"===typeof t,Vt=t=>{if("object"!==Lt(t))return!1;const e=Nt(t);return(null===e||e===Object.prototype||null===Object.getPrototypeOf(e))&&!(At in t)&&!(Rt in t)},$t=Dt("Date"),qt=Dt("File"),Yt=Dt("Blob"),Kt=Dt("FileList"),Qt=Dt("URLSearchParams"),[Xt,Jt,Gt,Zt]=["ReadableStream","Request","Response","Headers"].map(Dt);function te(t,e){let n,i,{allOwnKeys:r=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null!==t&&"undefined"!==typeof t)if("object"!==typeof t&&(t=[t]),zt(t))for(n=0,i=t.length;n<i;n++)e.call(null,t[n],n,t);else{const i=r?Object.getOwnPropertyNames(t):Object.keys(t),s=i.length;let o;for(n=0;n<s;n++)o=i[n],e.call(null,t[o],o,t)}}function ee(t,e){e=e.toLowerCase();const n=Object.keys(t);let i,r=n.length;for(;r-- >0;)if(i=n[r],e===i.toLowerCase())return i;return null}const ne="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:global,ie=t=>!It(t)&&t!==ne;const re=(se="undefined"!==typeof Uint8Array&&Nt(Uint8Array),t=>se&&t instanceof se);var se;const oe=Dt("HTMLFormElement"),ae=(t=>{let{hasOwnProperty:e}=t;return(t,n)=>e.call(t,n)})(Object.prototype),le=Dt("RegExp"),ce=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),i={};te(n,((n,r)=>{let s;!1!==(s=e(n,r,t))&&(i[r]=s||n)})),Object.defineProperties(t,i)};const ue=Dt("AsyncFunction"),he=((t,e)=>{return t?setImmediate:e?(n=`axios@${Math.random()}`,i=[],ne.addEventListener("message",(t=>{let{source:e,data:r}=t;e===ne&&r===n&&i.length&&i.shift()()}),!1),t=>{i.push(t),ne.postMessage(n,"*")}):t=>setTimeout(t);var n,i})("function"===typeof setImmediate,Ut(ne.postMessage)),de="undefined"!==typeof queueMicrotask?queueMicrotask.bind(ne):"undefined"!==typeof process&&process.nextTick||he,fe={isArray:zt,isArrayBuffer:Ft,isBuffer:function(t){return null!==t&&!It(t)&&null!==t.constructor&&!It(t.constructor)&&Ut(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"===typeof FormData&&t instanceof FormData||Ut(t.append)&&("formdata"===(e=Lt(t))||"object"===e&&Ut(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&Ft(t.buffer),e},isString:Bt,isNumber:Ht,isBoolean:t=>!0===t||!1===t,isObject:Wt,isPlainObject:Vt,isReadableStream:Xt,isRequest:Jt,isResponse:Gt,isHeaders:Zt,isUndefined:It,isDate:$t,isFile:qt,isBlob:Yt,isRegExp:le,isFunction:Ut,isStream:t=>Wt(t)&&Ut(t.pipe),isURLSearchParams:Qt,isTypedArray:re,isFileList:Kt,forEach:te,merge:function t(){const{caseless:e}=ie(this)&&this||{},n={},i=(i,r)=>{const s=e&&ee(n,r)||r;Vt(n[s])&&Vt(i)?n[s]=t(n[s],i):Vt(i)?n[s]=t({},i):zt(i)?n[s]=i.slice():n[s]=i};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&te(arguments[r],i);return n},extend:function(t,e,n){let{allOwnKeys:i}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return te(e,((e,i)=>{n&&Ut(e)?t[i]=Mt(e,n):t[i]=e}),{allOwnKeys:i}),t},trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,n,i)=>{t.prototype=Object.create(e.prototype,i),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},toFlatObject:(t,e,n,i)=>{let r,s,o;const a={};if(e=e||{},null==t)return e;do{for(r=Object.getOwnPropertyNames(t),s=r.length;s-- >0;)o=r[s],i&&!i(o,t,e)||a[o]||(e[o]=t[o],a[o]=!0);t=!1!==n&&Nt(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:Lt,kindOfTest:Dt,endsWith:(t,e,n)=>{t=String(t),(void 0===n||n>t.length)&&(n=t.length),n-=e.length;const i=t.indexOf(e,n);return-1!==i&&i===n},toArray:t=>{if(!t)return null;if(zt(t))return t;let e=t.length;if(!Ht(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},forEachEntry:(t,e)=>{const n=(t&&t[Rt]).call(t);let i;for(;(i=n.next())&&!i.done;){const n=i.value;e.call(t,n[0],n[1])}},matchAll:(t,e)=>{let n;const i=[];for(;null!==(n=t.exec(e));)i.push(n);return i},isHTMLForm:oe,hasOwnProperty:ae,hasOwnProp:ae,reduceDescriptors:ce,freezeMethods:t=>{ce(t,((e,n)=>{if(Ut(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const i=t[n];Ut(i)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(t,e)=>{const n={},i=t=>{t.forEach((t=>{n[t]=!0}))};return zt(t)?i(t):i(String(t).split(e)),n},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,n){return e.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(t,e)=>null!=t&&Number.isFinite(t=+t)?t:e,findKey:ee,global:ne,isContextDefined:ie,isSpecCompliantForm:function(t){return!!(t&&Ut(t.append)&&"FormData"===t[At]&&t[Rt])},toJSONObject:t=>{const e=new Array(10),n=(t,i)=>{if(Wt(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[i]=t;const r=zt(t)?[]:{};return te(t,((t,e)=>{const s=n(t,i+1);!It(s)&&(r[e]=s)})),e[i]=void 0,r}}return t};return n(t,0)},isAsyncFn:ue,isThenable:t=>t&&(Wt(t)||Ut(t))&&Ut(t.then)&&Ut(t.catch),setImmediate:he,asap:de,isIterable:t=>null!=t&&Ut(t[Rt])};function pe(t,e,n,i,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),i&&(this.request=i),r&&(this.response=r,this.status=r.status?r.status:null)}fe.inherits(pe,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:fe.toJSONObject(this.config),code:this.code,status:this.status}}});const ge=pe.prototype,me={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{me[t]={value:t}})),Object.defineProperties(pe,me),Object.defineProperty(ge,"isAxiosError",{value:!0}),pe.from=(t,e,n,i,r,s)=>{const o=Object.create(ge);return fe.toFlatObject(t,o,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),pe.call(o,t.message,e,n,i,r),o.cause=t,o.name=t.name,s&&Object.assign(o,s),o};const ye=pe;function be(t){return fe.isPlainObject(t)||fe.isArray(t)}function ve(t){return fe.endsWith(t,"[]")?t.slice(0,-2):t}function xe(t,e,n){return t?t.concat(e).map((function(t,e){return t=ve(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}const _e=fe.toFlatObject(fe,{},null,(function(t){return/^is[A-Z]/.test(t)}));const we=function(t,e,n){if(!fe.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const i=(n=fe.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!fe.isUndefined(e[t])}))).metaTokens,r=n.visitor||c,s=n.dots,o=n.indexes,a=(n.Blob||"undefined"!==typeof Blob&&Blob)&&fe.isSpecCompliantForm(e);if(!fe.isFunction(r))throw new TypeError("visitor must be a function");function l(t){if(null===t)return"";if(fe.isDate(t))return t.toISOString();if(!a&&fe.isBlob(t))throw new ye("Blob is not supported. Use a Buffer instead.");return fe.isArrayBuffer(t)||fe.isTypedArray(t)?a&&"function"===typeof Blob?new Blob([t]):Buffer.from(t):t}function c(t,n,r){let a=t;if(t&&!r&&"object"===typeof t)if(fe.endsWith(n,"{}"))n=i?n:n.slice(0,-2),t=JSON.stringify(t);else if(fe.isArray(t)&&function(t){return fe.isArray(t)&&!t.some(be)}(t)||(fe.isFileList(t)||fe.endsWith(n,"[]"))&&(a=fe.toArray(t)))return n=ve(n),a.forEach((function(t,i){!fe.isUndefined(t)&&null!==t&&e.append(!0===o?xe([n],i,s):null===o?n:n+"[]",l(t))})),!1;return!!be(t)||(e.append(xe(r,n,s),l(t)),!1)}const u=[],h=Object.assign(_e,{defaultVisitor:c,convertValue:l,isVisitable:be});if(!fe.isObject(t))throw new TypeError("data must be an object");return function t(n,i){if(!fe.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+i.join("."));u.push(n),fe.forEach(n,(function(n,s){!0===(!(fe.isUndefined(n)||null===n)&&r.call(e,n,fe.isString(s)?s.trim():s,i,h))&&t(n,i?i.concat(s):[s])})),u.pop()}}(t),e};function ke(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function Se(t,e){this._pairs=[],t&&we(t,this,e)}const Ee=Se.prototype;Ee.append=function(t,e){this._pairs.push([t,e])},Ee.toString=function(t){const e=t?function(e){return t.call(this,e,ke)}:ke;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};const Ce=Se;function Oe(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Te(t,e,n){if(!e)return t;const i=n&&n.encode||Oe;fe.isFunction(n)&&(n={serialize:n});const r=n&&n.serialize;let s;if(s=r?r(e,n):fe.isURLSearchParams(e)?e.toString():new Ce(e,n).toString(i),s){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+s}return t}const Me=class{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){fe.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},Pe={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ne={isBrowser:!0,classes:{URLSearchParams:"undefined"!==typeof URLSearchParams?URLSearchParams:Ce,FormData:"undefined"!==typeof FormData?FormData:null,Blob:"undefined"!==typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Re="undefined"!==typeof window&&"undefined"!==typeof document,Ae="object"===typeof navigator&&navigator||void 0,Le=Re&&(!Ae||["ReactNative","NativeScript","NS"].indexOf(Ae.product)<0),De="undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"===typeof self.importScripts,je=Re&&window.location.href||"http://localhost",ze={...r,...Ne};const Ie=function(t){function e(t,n,i,r){let s=t[r++];if("__proto__"===s)return!0;const o=Number.isFinite(+s),a=r>=t.length;if(s=!s&&fe.isArray(i)?i.length:s,a)return fe.hasOwnProp(i,s)?i[s]=[i[s],n]:i[s]=n,!o;i[s]&&fe.isObject(i[s])||(i[s]=[]);return e(t,n,i[s],r)&&fe.isArray(i[s])&&(i[s]=function(t){const e={},n=Object.keys(t);let i;const r=n.length;let s;for(i=0;i<r;i++)s=n[i],e[s]=t[s];return e}(i[s])),!o}if(fe.isFormData(t)&&fe.isFunction(t.entries)){const n={};return fe.forEachEntry(t,((t,i)=>{e(function(t){return fe.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),i,n,0)})),n}return null};const Fe={transitional:Pe,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",i=n.indexOf("application/json")>-1,r=fe.isObject(t);r&&fe.isHTMLForm(t)&&(t=new FormData(t));if(fe.isFormData(t))return i?JSON.stringify(Ie(t)):t;if(fe.isArrayBuffer(t)||fe.isBuffer(t)||fe.isStream(t)||fe.isFile(t)||fe.isBlob(t)||fe.isReadableStream(t))return t;if(fe.isArrayBufferView(t))return t.buffer;if(fe.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(r){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return we(t,new ze.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,i){return ze.isNode&&fe.isBuffer(t)?(this.append(e,t.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((s=fe.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return we(s?{"files[]":t}:t,e&&new e,this.formSerializer)}}return r||i?(e.setContentType("application/json",!1),function(t,e,n){if(fe.isString(t))try{return(e||JSON.parse)(t),fe.trim(t)}catch(i){if("SyntaxError"!==i.name)throw i}return(n||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||Fe.transitional,n=e&&e.forcedJSONParsing,i="json"===this.responseType;if(fe.isResponse(t)||fe.isReadableStream(t))return t;if(t&&fe.isString(t)&&(n&&!this.responseType||i)){const n=!(e&&e.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(r){if(n){if("SyntaxError"===r.name)throw ye.from(r,ye.ERR_BAD_RESPONSE,this,null,this.response);throw r}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ze.classes.FormData,Blob:ze.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};fe.forEach(["delete","get","head","post","put","patch"],(t=>{Fe.headers[t]={}}));const Be=Fe,Ue=fe.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),He=Symbol("internals");function We(t){return t&&String(t).trim().toLowerCase()}function Ve(t){return!1===t||null==t?t:fe.isArray(t)?t.map(Ve):String(t)}function $e(t,e,n,i,r){return fe.isFunction(i)?i.call(this,e,n):(r&&(e=n),fe.isString(e)?fe.isString(i)?-1!==e.indexOf(i):fe.isRegExp(i)?i.test(e):void 0:void 0)}class qe{constructor(t){t&&this.set(t)}set(t,e,n){const i=this;function r(t,e,n){const r=We(e);if(!r)throw new Error("header name must be a non-empty string");const s=fe.findKey(i,r);(!s||void 0===i[s]||!0===n||void 0===n&&!1!==i[s])&&(i[s||e]=Ve(t))}const s=(t,e)=>fe.forEach(t,((t,n)=>r(t,n,e)));if(fe.isPlainObject(t)||t instanceof this.constructor)s(t,e);else if(fe.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim()))s((t=>{const e={};let n,i,r;return t&&t.split("\n").forEach((function(t){r=t.indexOf(":"),n=t.substring(0,r).trim().toLowerCase(),i=t.substring(r+1).trim(),!n||e[n]&&Ue[n]||("set-cookie"===n?e[n]?e[n].push(i):e[n]=[i]:e[n]=e[n]?e[n]+", "+i:i)})),e})(t),e);else if(fe.isObject(t)&&fe.isIterable(t)){let n,i,r={};for(const e of t){if(!fe.isArray(e))throw TypeError("Object iterator must return a key-value pair");r[i=e[0]]=(n=r[i])?fe.isArray(n)?[...n,e[1]]:[n,e[1]]:e[1]}s(r,e)}else null!=t&&r(e,t,n);return this}get(t,e){if(t=We(t)){const n=fe.findKey(this,t);if(n){const t=this[n];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(t);)e[i[1]]=i[2];return e}(t);if(fe.isFunction(e))return e.call(this,t,n);if(fe.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=We(t)){const n=fe.findKey(this,t);return!(!n||void 0===this[n]||e&&!$e(0,this[n],n,e))}return!1}delete(t,e){const n=this;let i=!1;function r(t){if(t=We(t)){const r=fe.findKey(n,t);!r||e&&!$e(0,n[r],r,e)||(delete n[r],i=!0)}}return fe.isArray(t)?t.forEach(r):r(t),i}clear(t){const e=Object.keys(this);let n=e.length,i=!1;for(;n--;){const r=e[n];t&&!$e(0,this[r],r,t,!0)||(delete this[r],i=!0)}return i}normalize(t){const e=this,n={};return fe.forEach(this,((i,r)=>{const s=fe.findKey(n,r);if(s)return e[s]=Ve(i),void delete e[r];const o=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}(r):String(r).trim();o!==r&&delete e[r],e[o]=Ve(i),n[o]=!0})),this}concat(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.constructor.concat(this,...e)}toJSON(t){const e=Object.create(null);return fe.forEach(this,((n,i)=>{null!=n&&!1!==n&&(e[i]=t&&fe.isArray(n)?n.join(", "):n)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((t=>{let[e,n]=t;return e+": "+n})).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t){const e=new this(t);for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return i.forEach((t=>e.set(t))),e}static accessor(t){const e=(this[He]=this[He]={accessors:{}}).accessors,n=this.prototype;function i(t){const i=We(t);e[i]||(!function(t,e){const n=fe.toCamelCase(" "+e);["get","set","has"].forEach((i=>{Object.defineProperty(t,i+n,{value:function(t,n,r){return this[i].call(this,e,t,n,r)},configurable:!0})}))}(n,t),e[i]=!0)}return fe.isArray(t)?t.forEach(i):i(t),this}}qe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),fe.reduceDescriptors(qe.prototype,((t,e)=>{let{value:n}=t,i=e[0].toUpperCase()+e.slice(1);return{get:()=>n,set(t){this[i]=t}}})),fe.freezeMethods(qe);const Ye=qe;function Ke(t,e){const n=this||Be,i=e||n,r=Ye.from(i.headers);let s=i.data;return fe.forEach(t,(function(t){s=t.call(n,s,r.normalize(),e?e.status:void 0)})),r.normalize(),s}function Qe(t){return!(!t||!t.__CANCEL__)}function Xe(t,e,n){ye.call(this,null==t?"canceled":t,ye.ERR_CANCELED,e,n),this.name="CanceledError"}fe.inherits(Xe,ye,{__CANCEL__:!0});const Je=Xe;function Ge(t,e,n){const i=n.config.validateStatus;n.status&&i&&!i(n.status)?e(new ye("Request failed with status code "+n.status,[ye.ERR_BAD_REQUEST,ye.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}const Ze=function(t,e){t=t||10;const n=new Array(t),i=new Array(t);let r,s=0,o=0;return e=void 0!==e?e:1e3,function(a){const l=Date.now(),c=i[o];r||(r=l),n[s]=a,i[s]=l;let u=o,h=0;for(;u!==s;)h+=n[u++],u%=t;if(s=(s+1)%t,s===o&&(o=(o+1)%t),l-r<e)return;const d=c&&l-c;return d?Math.round(1e3*h/d):void 0}};const tn=function(t,e){let n,i,r=0,s=1e3/e;const o=function(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now();r=s,n=null,i&&(clearTimeout(i),i=null),t.apply(null,e)};return[function(){const t=Date.now(),e=t-r;for(var a=arguments.length,l=new Array(a),c=0;c<a;c++)l[c]=arguments[c];e>=s?o(l,t):(n=l,i||(i=setTimeout((()=>{i=null,o(n)}),s-e)))},()=>n&&o(n)]},en=function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,i=0;const r=Ze(50,250);return tn((n=>{const s=n.loaded,o=n.lengthComputable?n.total:void 0,a=s-i,l=r(a);i=s;t({loaded:s,total:o,progress:o?s/o:void 0,bytes:a,rate:l||void 0,estimated:l&&o&&s<=o?(o-s)/l:void 0,event:n,lengthComputable:null!=o,[e?"download":"upload"]:!0})}),n)},nn=(t,e)=>{const n=null!=t;return[i=>e[0]({lengthComputable:n,total:t,loaded:i}),e[1]]},rn=t=>function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return fe.asap((()=>t(...n)))},sn=ze.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,ze.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(ze.origin),ze.navigator&&/(msie|trident)/i.test(ze.navigator.userAgent)):()=>!0,on=ze.hasStandardBrowserEnv?{write(t,e,n,i,r,s){const o=[t+"="+encodeURIComponent(e)];fe.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),fe.isString(i)&&o.push("path="+i),fe.isString(r)&&o.push("domain="+r),!0===s&&o.push("secure"),document.cookie=o.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function an(t,e,n){let i=!function(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}(e);return t&&(i||0==n)?function(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}const ln=t=>t instanceof Ye?{...t}:t;function cn(t,e){e=e||{};const n={};function i(t,e,n,i){return fe.isPlainObject(t)&&fe.isPlainObject(e)?fe.merge.call({caseless:i},t,e):fe.isPlainObject(e)?fe.merge({},e):fe.isArray(e)?e.slice():e}function r(t,e,n,r){return fe.isUndefined(e)?fe.isUndefined(t)?void 0:i(void 0,t,0,r):i(t,e,0,r)}function s(t,e){if(!fe.isUndefined(e))return i(void 0,e)}function o(t,e){return fe.isUndefined(e)?fe.isUndefined(t)?void 0:i(void 0,t):i(void 0,e)}function a(n,r,s){return s in e?i(n,r):s in t?i(void 0,n):void 0}const l={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(t,e,n)=>r(ln(t),ln(e),0,!0)};return fe.forEach(Object.keys(Object.assign({},t,e)),(function(i){const s=l[i]||r,o=s(t[i],e[i],i);fe.isUndefined(o)&&s!==a||(n[i]=o)})),n}const un=t=>{const e=cn({},t);let n,{data:i,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:o,headers:a,auth:l}=e;if(e.headers=a=Ye.from(a),e.url=Te(an(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),l&&a.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),fe.isFormData(i))if(ze.hasStandardBrowserEnv||ze.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(n=a.getContentType())){const[t,...e]=n?n.split(";").map((t=>t.trim())).filter(Boolean):[];a.setContentType([t||"multipart/form-data",...e].join("; "))}if(ze.hasStandardBrowserEnv&&(r&&fe.isFunction(r)&&(r=r(e)),r||!1!==r&&sn(e.url))){const t=s&&o&&on.read(o);t&&a.set(s,t)}return e},hn="undefined"!==typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){const i=un(t);let r=i.data;const s=Ye.from(i.headers).normalize();let o,a,l,c,u,{responseType:h,onUploadProgress:d,onDownloadProgress:f}=i;function p(){c&&c(),u&&u(),i.cancelToken&&i.cancelToken.unsubscribe(o),i.signal&&i.signal.removeEventListener("abort",o)}let g=new XMLHttpRequest;function m(){if(!g)return;const i=Ye.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders());Ge((function(t){e(t),p()}),(function(t){n(t),p()}),{data:h&&"text"!==h&&"json"!==h?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:i,config:t,request:g}),g=null}g.open(i.method.toUpperCase(),i.url,!0),g.timeout=i.timeout,"onloadend"in g?g.onloadend=m:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(m)},g.onabort=function(){g&&(n(new ye("Request aborted",ye.ECONNABORTED,t,g)),g=null)},g.onerror=function(){n(new ye("Network Error",ye.ERR_NETWORK,t,g)),g=null},g.ontimeout=function(){let e=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const r=i.transitional||Pe;i.timeoutErrorMessage&&(e=i.timeoutErrorMessage),n(new ye(e,r.clarifyTimeoutError?ye.ETIMEDOUT:ye.ECONNABORTED,t,g)),g=null},void 0===r&&s.setContentType(null),"setRequestHeader"in g&&fe.forEach(s.toJSON(),(function(t,e){g.setRequestHeader(e,t)})),fe.isUndefined(i.withCredentials)||(g.withCredentials=!!i.withCredentials),h&&"json"!==h&&(g.responseType=i.responseType),f&&([l,u]=en(f,!0),g.addEventListener("progress",l)),d&&g.upload&&([a,c]=en(d),g.upload.addEventListener("progress",a),g.upload.addEventListener("loadend",c)),(i.cancelToken||i.signal)&&(o=e=>{g&&(n(!e||e.type?new Je(null,t,g):e),g.abort(),g=null)},i.cancelToken&&i.cancelToken.subscribe(o),i.signal&&(i.signal.aborted?o():i.signal.addEventListener("abort",o)));const y=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(i.url);y&&-1===ze.protocols.indexOf(y)?n(new ye("Unsupported protocol "+y+":",ye.ERR_BAD_REQUEST,t)):g.send(r||null)}))},dn=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let n,i=new AbortController;const r=function(t){if(!n){n=!0,o();const e=t instanceof Error?t:this.reason;i.abort(e instanceof ye?e:new Je(e instanceof Error?e.message:e))}};let s=e&&setTimeout((()=>{s=null,r(new ye(`timeout ${e} of ms exceeded`,ye.ETIMEDOUT))}),e);const o=()=>{t&&(s&&clearTimeout(s),s=null,t.forEach((t=>{t.unsubscribe?t.unsubscribe(r):t.removeEventListener("abort",r)})),t=null)};t.forEach((t=>t.addEventListener("abort",r)));const{signal:a}=i;return a.unsubscribe=()=>fe.asap(o),a}},fn=function*(t,e){let n=t.byteLength;if(!e||n<e)return void(yield t);let i,r=0;for(;r<n;)i=r+e,yield t.slice(r,i),r=i},pn=async function*(t){if(t[Symbol.asyncIterator])return void(yield*t);const e=t.getReader();try{for(;;){const{done:t,value:n}=await e.read();if(t)break;yield n}}finally{await e.cancel()}},gn=(t,e,n,i)=>{const r=async function*(t,e){for await(const n of pn(t))yield*fn(n,e)}(t,e);let s,o=0,a=t=>{s||(s=!0,i&&i(t))};return new ReadableStream({async pull(t){try{const{done:e,value:i}=await r.next();if(e)return a(),void t.close();let s=i.byteLength;if(n){let t=o+=s;n(t)}t.enqueue(new Uint8Array(i))}catch(yc){throw a(yc),yc}},cancel:t=>(a(t),r.return())},{highWaterMark:2})},mn="function"===typeof fetch&&"function"===typeof Request&&"function"===typeof Response,yn=mn&&"function"===typeof ReadableStream,bn=mn&&("function"===typeof TextEncoder?(vn=new TextEncoder,t=>vn.encode(t)):async t=>new Uint8Array(await new Response(t).arrayBuffer()));var vn;const xn=function(t){try{for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return!!t(...n)}catch(r){return!1}},_n=yn&&xn((()=>{let t=!1;const e=new Request(ze.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e})),wn=yn&&xn((()=>fe.isReadableStream(new Response("").body))),kn={stream:wn&&(t=>t.body)};var Sn;mn&&(Sn=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((t=>{!kn[t]&&(kn[t]=fe.isFunction(Sn[t])?e=>e[t]():(e,n)=>{throw new ye(`Response type '${t}' is not supported`,ye.ERR_NOT_SUPPORT,n)})})));const En=async(t,e)=>{const n=fe.toFiniteNumber(t.getContentLength());return null==n?(async t=>{if(null==t)return 0;if(fe.isBlob(t))return t.size;if(fe.isSpecCompliantForm(t)){const e=new Request(ze.origin,{method:"POST",body:t});return(await e.arrayBuffer()).byteLength}return fe.isArrayBufferView(t)||fe.isArrayBuffer(t)?t.byteLength:(fe.isURLSearchParams(t)&&(t+=""),fe.isString(t)?(await bn(t)).byteLength:void 0)})(e):n},Cn=mn&&(async t=>{let{url:e,method:n,data:i,signal:r,cancelToken:s,timeout:o,onDownloadProgress:a,onUploadProgress:l,responseType:c,headers:u,withCredentials:h="same-origin",fetchOptions:d}=un(t);c=c?(c+"").toLowerCase():"text";let f,p=dn([r,s&&s.toAbortSignal()],o);const g=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let m;try{if(l&&_n&&"get"!==n&&"head"!==n&&0!==(m=await En(u,i))){let t,n=new Request(e,{method:"POST",body:i,duplex:"half"});if(fe.isFormData(i)&&(t=n.headers.get("content-type"))&&u.setContentType(t),n.body){const[t,e]=nn(m,en(rn(l)));i=gn(n.body,65536,t,e)}}fe.isString(h)||(h=h?"include":"omit");const r="credentials"in Request.prototype;f=new Request(e,{...d,signal:p,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:i,duplex:"half",credentials:r?h:void 0});let s=await fetch(f);const o=wn&&("stream"===c||"response"===c);if(wn&&(a||o&&g)){const t={};["status","statusText","headers"].forEach((e=>{t[e]=s[e]}));const e=fe.toFiniteNumber(s.headers.get("content-length")),[n,i]=a&&nn(e,en(rn(a),!0))||[];s=new Response(gn(s.body,65536,n,(()=>{i&&i(),g&&g()})),t)}c=c||"text";let y=await kn[fe.findKey(kn,c)||"text"](s,t);return!o&&g&&g(),await new Promise(((e,n)=>{Ge(e,n,{data:y,headers:Ye.from(s.headers),status:s.status,statusText:s.statusText,config:t,request:f})}))}catch(yc){if(g&&g(),yc&&"TypeError"===yc.name&&/Load failed|fetch/i.test(yc.message))throw Object.assign(new ye("Network Error",ye.ERR_NETWORK,t,f),{cause:yc.cause||yc});throw ye.from(yc,yc&&yc.code,t,f)}}),On={http:null,xhr:hn,fetch:Cn};fe.forEach(On,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(n){}Object.defineProperty(t,"adapterName",{value:e})}}));const Tn=t=>`- ${t}`,Mn=t=>fe.isFunction(t)||null===t||!1===t,Pn=t=>{t=fe.isArray(t)?t:[t];const{length:e}=t;let n,i;const r={};for(let s=0;s<e;s++){let e;if(n=t[s],i=n,!Mn(n)&&(i=On[(e=String(n)).toLowerCase()],void 0===i))throw new ye(`Unknown adapter '${e}'`);if(i)break;r[e||"#"+s]=i}if(!i){const t=Object.entries(r).map((t=>{let[e,n]=t;return`adapter ${e} `+(!1===n?"is not supported by the environment":"is not available in the build")}));let n=e?t.length>1?"since :\n"+t.map(Tn).join("\n"):" "+Tn(t[0]):"as no adapter specified";throw new ye("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return i};function Nn(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Je(null,t)}function Rn(t){Nn(t),t.headers=Ye.from(t.headers),t.data=Ke.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1);return Pn(t.adapter||Be.adapter)(t).then((function(e){return Nn(t),e.data=Ke.call(t,t.transformResponse,e),e.headers=Ye.from(e.headers),e}),(function(e){return Qe(e)||(Nn(t),e&&e.response&&(e.response.data=Ke.call(t,t.transformResponse,e.response),e.response.headers=Ye.from(e.response.headers))),Promise.reject(e)}))}const An="1.9.0",Ln={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{Ln[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const Dn={};Ln.transitional=function(t,e,n){function i(t,e){return"[Axios v1.9.0] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,r,s)=>{if(!1===t)throw new ye(i(r," has been removed"+(e?" in "+e:"")),ye.ERR_DEPRECATED);return e&&!Dn[r]&&(Dn[r]=!0,console.warn(i(r," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,r,s)}},Ln.spelling=function(t){return(e,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};const jn={assertOptions:function(t,e,n){if("object"!==typeof t)throw new ye("options must be an object",ye.ERR_BAD_OPTION_VALUE);const i=Object.keys(t);let r=i.length;for(;r-- >0;){const s=i[r],o=e[s];if(o){const e=t[s],n=void 0===e||o(e,s,t);if(!0!==n)throw new ye("option "+s+" must be "+n,ye.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new ye("Unknown option "+s,ye.ERR_BAD_OPTION)}},validators:Ln},zn=jn.validators;class In{constructor(t){this.defaults=t||{},this.interceptors={request:new Me,response:new Me}}async request(t,e){try{return await this._request(t,e)}catch(yc){if(yc instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;const i=e.stack?e.stack.replace(/^.+\n/,""):"";try{yc.stack?i&&!String(yc.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(yc.stack+="\n"+i):yc.stack=i}catch(n){}}throw yc}}_request(t,e){"string"===typeof t?(e=e||{}).url=t:e=t||{},e=cn(this.defaults,e);const{transitional:n,paramsSerializer:i,headers:r}=e;void 0!==n&&jn.assertOptions(n,{silentJSONParsing:zn.transitional(zn.boolean),forcedJSONParsing:zn.transitional(zn.boolean),clarifyTimeoutError:zn.transitional(zn.boolean)},!1),null!=i&&(fe.isFunction(i)?e.paramsSerializer={serialize:i}:jn.assertOptions(i,{encode:zn.function,serialize:zn.function},!0)),void 0!==e.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),jn.assertOptions(e,{baseUrl:zn.spelling("baseURL"),withXsrfToken:zn.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let s=r&&fe.merge(r.common,r[e.method]);r&&fe.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete r[t]})),e.headers=Ye.concat(s,r);const o=[];let a=!0;this.interceptors.request.forEach((function(t){"function"===typeof t.runWhen&&!1===t.runWhen(e)||(a=a&&t.synchronous,o.unshift(t.fulfilled,t.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(t){l.push(t.fulfilled,t.rejected)}));let u,h=0;if(!a){const t=[Rn.bind(this),void 0];for(t.unshift.apply(t,o),t.push.apply(t,l),u=t.length,c=Promise.resolve(e);h<u;)c=c.then(t[h++],t[h++]);return c}u=o.length;let d=e;for(h=0;h<u;){const t=o[h++],e=o[h++];try{d=t(d)}catch(f){e.call(this,f);break}}try{c=Rn.call(this,d)}catch(f){return Promise.reject(f)}for(h=0,u=l.length;h<u;)c=c.then(l[h++],l[h++]);return c}getUri(t){return Te(an((t=cn(this.defaults,t)).baseURL,t.url,t.allowAbsoluteUrls),t.params,t.paramsSerializer)}}fe.forEach(["delete","get","head","options"],(function(t){In.prototype[t]=function(e,n){return this.request(cn(n||{},{method:t,url:e,data:(n||{}).data}))}})),fe.forEach(["post","put","patch"],(function(t){function e(e){return function(n,i,r){return this.request(cn(r||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}In.prototype[t]=e(),In.prototype[t+"Form"]=e(!0)}));const Fn=In;class Bn{constructor(t){if("function"!==typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise((function(t){e=t}));const n=this;this.promise.then((t=>{if(!n._listeners)return;let e=n._listeners.length;for(;e-- >0;)n._listeners[e](t);n._listeners=null})),this.promise.then=t=>{let e;const i=new Promise((t=>{n.subscribe(t),e=t})).then(t);return i.cancel=function(){n.unsubscribe(e)},i},t((function(t,i,r){n.reason||(n.reason=new Je(t,i,r),e(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=e=>{t.abort(e)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new Bn((function(e){t=e})),cancel:t}}}const Un=Bn;const Hn={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Hn).forEach((t=>{let[e,n]=t;Hn[n]=e}));const Wn=Hn;const Vn=function t(e){const n=new Fn(e),i=Mt(Fn.prototype.request,n);return fe.extend(i,Fn.prototype,n,{allOwnKeys:!0}),fe.extend(i,n,null,{allOwnKeys:!0}),i.create=function(n){return t(cn(e,n))},i}(Be);Vn.Axios=Fn,Vn.CanceledError=Je,Vn.CancelToken=Un,Vn.isCancel=Qe,Vn.VERSION=An,Vn.toFormData=we,Vn.AxiosError=ye,Vn.Cancel=Vn.CanceledError,Vn.all=function(t){return Promise.all(t)},Vn.spread=function(t){return function(e){return t.apply(null,e)}},Vn.isAxiosError=function(t){return fe.isObject(t)&&!0===t.isAxiosError},Vn.mergeConfig=cn,Vn.AxiosHeaders=Ye,Vn.formToJSON=t=>Ie(fe.isHTMLForm(t)?new FormData(t):t),Vn.getAdapter=Pn,Vn.HttpStatusCode=Wn,Vn.default=Vn;const $n=Vn;var qn=n(579);const Yn=t=>{let{processId:e,processName:n}=t;const[i,r]=(0,s.useState)([]),[o,a]=(0,s.useState)(!0),[l,c]=(0,s.useState)(""),[u,h]=(0,s.useState)(!0),[d,f]=(0,s.useState)("out");(0,s.useEffect)((()=>{let t;const n=async()=>{try{a(!0);const t=await $n.get(`/api/logs/${e}/${d}`);r(t.data.logs),c("")}catch(yc){console.error("Error fetching logs:",yc),c(`Failed to fetch logs: ${yc.message}`)}finally{a(!1)}};return n(),u&&(t=setInterval(n,5e3)),()=>{t&&clearInterval(t)}}),[e,u,d]);const p=t=>{f(t)};return(0,qn.jsxs)("div",{className:"logs-container",children:[(0,qn.jsxs)("div",{className:"logs-header",children:[(0,qn.jsxs)("h3",{children:["Process Logs: ",n]}),(0,qn.jsxs)("div",{className:"logs-controls",children:[(0,qn.jsxs)("div",{className:"log-type-selector",children:[(0,qn.jsx)("button",{className:"log-type-btn "+("out"===d?"active":""),onClick:()=>p("out"),children:"Standard Output"}),(0,qn.jsx)("button",{className:"log-type-btn "+("err"===d?"active":""),onClick:()=>p("err"),children:"Error Output"})]}),(0,qn.jsx)("button",{className:"auto-refresh-btn "+(u?"active":""),onClick:()=>{h(!u)},children:u?"Auto-refresh ON":"Auto-refresh OFF"})]})]}),l&&(0,qn.jsx)("div",{className:"logs-error",children:l}),o?(0,qn.jsx)("div",{className:"logs-loading",children:"Loading logs..."}):0===i.length?(0,qn.jsx)("div",{className:"logs-empty",children:"No logs available for this process."}):(0,qn.jsx)("div",{className:"logs-content",children:(0,qn.jsx)("pre",{children:i.join("\n")})})]})};function Kn(t){return t+.5|0}const Qn=(t,e,n)=>Math.max(Math.min(t,n),e);function Xn(t){return Qn(Kn(2.55*t),0,255)}function Jn(t){return Qn(Kn(255*t),0,255)}function Gn(t){return Qn(Kn(t/2.55)/100,0,1)}function Zn(t){return Qn(Kn(100*t),0,100)}const ti={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},ei=[..."0123456789ABCDEF"],ni=t=>ei[15&t],ii=t=>ei[(240&t)>>4]+ei[15&t],ri=t=>(240&t)>>4===(15&t);function si(t){var e=(t=>ri(t.r)&&ri(t.g)&&ri(t.b)&&ri(t.a))(t)?ni:ii;return t?"#"+e(t.r)+e(t.g)+e(t.b)+((t,e)=>t<255?e(t):"")(t.a,e):void 0}const oi=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function ai(t,e,n){const i=e*Math.min(n,1-n),r=function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+t/30)%12;return n-i*Math.max(Math.min(r-3,9-r,1),-1)};return[r(0),r(8),r(4)]}function li(t,e,n){const i=function(i){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(i+t/60)%6;return n-n*e*Math.max(Math.min(r,4-r,1),0)};return[i(5),i(3),i(1)]}function ci(t,e,n){const i=ai(t,1,.5);let r;for(e+n>1&&(r=1/(e+n),e*=r,n*=r),r=0;r<3;r++)i[r]*=1-e-n,i[r]+=e;return i}function ui(t){const e=t.r/255,n=t.g/255,i=t.b/255,r=Math.max(e,n,i),s=Math.min(e,n,i),o=(r+s)/2;let a,l,c;return r!==s&&(c=r-s,l=o>.5?c/(2-r-s):c/(r+s),a=function(t,e,n,i,r){return t===r?(e-n)/i+(e<n?6:0):e===r?(n-t)/i+2:(t-e)/i+4}(e,n,i,c,r),a=60*a+.5),[0|a,l||0,o]}function hi(t,e,n,i){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,i)).map(Jn)}function di(t,e,n){return hi(ai,t,e,n)}function fi(t){return(t%360+360)%360}function pi(t){const e=oi.exec(t);let n,i=255;if(!e)return;e[5]!==n&&(i=e[6]?Xn(+e[5]):Jn(+e[5]));const r=fi(+e[2]),s=+e[3]/100,o=+e[4]/100;return n="hwb"===e[1]?function(t,e,n){return hi(ci,t,e,n)}(r,s,o):"hsv"===e[1]?function(t,e,n){return hi(li,t,e,n)}(r,s,o):di(r,s,o),{r:n[0],g:n[1],b:n[2],a:i}}const gi={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},mi={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let yi;function bi(t){yi||(yi=function(){const t={},e=Object.keys(mi),n=Object.keys(gi);let i,r,s,o,a;for(i=0;i<e.length;i++){for(o=a=e[i],r=0;r<n.length;r++)s=n[r],a=a.replace(s,gi[s]);s=parseInt(mi[o],16),t[a]=[s>>16&255,s>>8&255,255&s]}return t}(),yi.transparent=[0,0,0,0]);const e=yi[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}const vi=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const xi=t=>t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,_i=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function wi(t,e,n){if(t){let i=ui(t);i[e]=Math.max(0,Math.min(i[e]+i[e]*n,0===e?360:1)),i=di(i),t.r=i[0],t.g=i[1],t.b=i[2]}}function ki(t,e){return t?Object.assign(e||{},t):t}function Si(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=Jn(t[3]))):(e=ki(t,{r:0,g:0,b:0,a:1})).a=Jn(e.a),e}function Ei(t){return"r"===t.charAt(0)?function(t){const e=vi.exec(t);let n,i,r,s=255;if(e){if(e[7]!==n){const t=+e[7];s=e[8]?Xn(t):Qn(255*t,0,255)}return n=+e[1],i=+e[3],r=+e[5],n=255&(e[2]?Xn(n):Qn(n,0,255)),i=255&(e[4]?Xn(i):Qn(i,0,255)),r=255&(e[6]?Xn(r):Qn(r,0,255)),{r:n,g:i,b:r,a:s}}}(t):pi(t)}class Ci{constructor(t){if(t instanceof Ci)return t;const e=typeof t;let n;"object"===e?n=Si(t):"string"===e&&(n=function(t){var e,n=t.length;return"#"===t[0]&&(4===n||5===n?e={r:255&17*ti[t[1]],g:255&17*ti[t[2]],b:255&17*ti[t[3]],a:5===n?17*ti[t[4]]:255}:7!==n&&9!==n||(e={r:ti[t[1]]<<4|ti[t[2]],g:ti[t[3]]<<4|ti[t[4]],b:ti[t[5]]<<4|ti[t[6]],a:9===n?ti[t[7]]<<4|ti[t[8]]:255})),e}(t)||bi(t)||Ei(t)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var t=ki(this._rgb);return t&&(t.a=Gn(t.a)),t}set rgb(t){this._rgb=Si(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${Gn(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):void 0;var t}hexString(){return this._valid?si(this._rgb):void 0}hslString(){return this._valid?function(t){if(!t)return;const e=ui(t),n=e[0],i=Zn(e[1]),r=Zn(e[2]);return t.a<255?`hsla(${n}, ${i}%, ${r}%, ${Gn(t.a)})`:`hsl(${n}, ${i}%, ${r}%)`}(this._rgb):void 0}mix(t,e){if(t){const n=this.rgb,i=t.rgb;let r;const s=e===r?.5:e,o=2*s-1,a=n.a-i.a,l=((o*a===-1?o:(o+a)/(1+o*a))+1)/2;r=1-l,n.r=255&l*n.r+r*i.r+.5,n.g=255&l*n.g+r*i.g+.5,n.b=255&l*n.b+r*i.b+.5,n.a=s*n.a+(1-s)*i.a,this.rgb=n}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,n){const i=_i(Gn(t.r)),r=_i(Gn(t.g)),s=_i(Gn(t.b));return{r:Jn(xi(i+n*(_i(Gn(e.r))-i))),g:Jn(xi(r+n*(_i(Gn(e.g))-r))),b:Jn(xi(s+n*(_i(Gn(e.b))-s))),a:t.a+n*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new Ci(this.rgb)}alpha(t){return this._rgb.a=Jn(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=Kn(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return wi(this._rgb,2,t),this}darken(t){return wi(this._rgb,2,-t),this}saturate(t){return wi(this._rgb,1,t),this}desaturate(t){return wi(this._rgb,1,-t),this}rotate(t){return function(t,e){var n=ui(t);n[0]=fi(n[0]+e),n=di(n),t.r=n[0],t.g=n[1],t.b=n[2]}(this._rgb,t),this}}function Oi(){}const Ti=(()=>{let t=0;return()=>t++})();function Mi(t){return null===t||void 0===t}function Pi(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function Ni(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function Ri(t){return("number"===typeof t||t instanceof Number)&&isFinite(+t)}function Ai(t,e){return Ri(t)?t:e}function Li(t,e){return"undefined"===typeof t?e:t}const Di=(t,e)=>"string"===typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function ji(t,e,n){if(t&&"function"===typeof t.call)return t.apply(n,e)}function zi(t,e,n,i){let r,s,o;if(Pi(t))if(s=t.length,i)for(r=s-1;r>=0;r--)e.call(n,t[r],r);else for(r=0;r<s;r++)e.call(n,t[r],r);else if(Ni(t))for(o=Object.keys(t),s=o.length,r=0;r<s;r++)e.call(n,t[o[r]],o[r])}function Ii(t,e){let n,i,r,s;if(!t||!e||t.length!==e.length)return!1;for(n=0,i=t.length;n<i;++n)if(r=t[n],s=e[n],r.datasetIndex!==s.datasetIndex||r.index!==s.index)return!1;return!0}function Fi(t){if(Pi(t))return t.map(Fi);if(Ni(t)){const e=Object.create(null),n=Object.keys(t),i=n.length;let r=0;for(;r<i;++r)e[n[r]]=Fi(t[n[r]]);return e}return t}function Bi(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function Ui(t,e,n,i){if(!Bi(t))return;const r=e[t],s=n[t];Ni(r)&&Ni(s)?Hi(r,s,i):e[t]=Fi(s)}function Hi(t,e,n){const i=Pi(e)?e:[e],r=i.length;if(!Ni(t))return t;const s=(n=n||{}).merger||Ui;let o;for(let a=0;a<r;++a){if(o=i[a],!Ni(o))continue;const e=Object.keys(o);for(let i=0,r=e.length;i<r;++i)s(e[i],t,o,n)}return t}function Wi(t,e){return Hi(t,e,{merger:Vi})}function Vi(t,e,n){if(!Bi(t))return;const i=e[t],r=n[t];Ni(i)&&Ni(r)?Wi(i,r):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=Fi(r))}const $i={"":t=>t,x:t=>t.x,y:t=>t.y};function qi(t,e){const n=$i[e]||($i[e]=function(t){const e=function(t){const e=t.split("."),n=[];let i="";for(const r of e)i+=r,i.endsWith("\\")?i=i.slice(0,-1)+".":(n.push(i),i="");return n}(t);return t=>{for(const n of e){if(""===n)break;t=t&&t[n]}return t}}(e));return n(t)}function Yi(t){return t.charAt(0).toUpperCase()+t.slice(1)}const Ki=t=>"undefined"!==typeof t,Qi=t=>"function"===typeof t,Xi=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};const Ji=Math.PI,Gi=2*Ji,Zi=Gi+Ji,tr=Number.POSITIVE_INFINITY,er=Ji/180,nr=Ji/2,ir=Ji/4,rr=2*Ji/3,sr=Math.log10,or=Math.sign;function ar(t,e,n){return Math.abs(t-e)<n}function lr(t){const e=Math.round(t);t=ar(t,e,t/1e3)?e:t;const n=Math.pow(10,Math.floor(sr(t))),i=t/n;return(i<=1?1:i<=2?2:i<=5?5:10)*n}function cr(t){return!function(t){return"symbol"===typeof t||"object"===typeof t&&null!==t&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function ur(t,e,n){let i,r,s;for(i=0,r=t.length;i<r;i++)s=t[i][n],isNaN(s)||(e.min=Math.min(e.min,s),e.max=Math.max(e.max,s))}function hr(t){return t*(Ji/180)}function dr(t){return t*(180/Ji)}function fr(t){if(!Ri(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function pr(t,e){const n=e.x-t.x,i=e.y-t.y,r=Math.sqrt(n*n+i*i);let s=Math.atan2(i,n);return s<-.5*Ji&&(s+=Gi),{angle:s,distance:r}}function gr(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function mr(t,e){return(t-e+Zi)%Gi-Ji}function yr(t){return(t%Gi+Gi)%Gi}function br(t,e,n,i){const r=yr(t),s=yr(e),o=yr(n),a=yr(s-r),l=yr(o-r),c=yr(r-s),u=yr(r-o);return r===s||r===o||i&&s===o||a>l&&c<u}function vr(t,e,n){return Math.max(e,Math.min(n,t))}function xr(t,e,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e-6;return t>=Math.min(e,n)-i&&t<=Math.max(e,n)+i}function _r(t,e,n){n=n||(n=>t[n]<e);let i,r=t.length-1,s=0;for(;r-s>1;)i=s+r>>1,n(i)?s=i:r=i;return{lo:s,hi:r}}const wr=(t,e,n,i)=>_r(t,n,i?i=>{const r=t[i][e];return r<n||r===n&&t[i+1][e]===n}:i=>t[i][e]<n),kr=(t,e,n)=>_r(t,n,(i=>t[i][e]>=n));const Sr=["push","pop","shift","splice","unshift"];function Er(t,e){const n=t._chartjs;if(!n)return;const i=n.listeners,r=i.indexOf(e);-1!==r&&i.splice(r,1),i.length>0||(Sr.forEach((e=>{delete t[e]})),delete t._chartjs)}function Cr(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const Or="undefined"===typeof window?function(t){return t()}:window.requestAnimationFrame;function Tr(t,e){let n=[],i=!1;return function(){for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];n=s,i||(i=!0,Or.call(window,(()=>{i=!1,t.apply(e,n)})))}}const Mr=t=>"start"===t?"left":"end"===t?"right":"center",Pr=(t,e,n)=>"start"===t?e:"end"===t?n:(e+n)/2;function Nr(t,e,n){const i=e.length;let r=0,s=i;if(t._sorted){const{iScale:o,vScale:a,_parsed:l}=t,c=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null,u=o.axis,{min:h,max:d,minDefined:f,maxDefined:p}=o.getUserBounds();if(f){if(r=Math.min(wr(l,u,h).lo,n?i:wr(e,u,o.getPixelForValue(h)).lo),c){const t=l.slice(0,r+1).reverse().findIndex((t=>!Mi(t[a.axis])));r-=Math.max(0,t)}r=vr(r,0,i-1)}if(p){let t=Math.max(wr(l,o.axis,d,!0).hi+1,n?0:wr(e,u,o.getPixelForValue(d),!0).hi+1);if(c){const e=l.slice(t-1).findIndex((t=>!Mi(t[a.axis])));t+=Math.max(0,e)}s=vr(t,r,i)-r}else s=i-r}return{start:r,count:s}}function Rr(t){const{xScale:e,yScale:n,_scaleRanges:i}=t,r={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!i)return t._scaleRanges=r,!0;const s=i.xmin!==e.min||i.xmax!==e.max||i.ymin!==n.min||i.ymax!==n.max;return Object.assign(i,r),s}const Ar=t=>0===t||1===t,Lr=(t,e,n)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*Gi/n),Dr=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*Gi/n)+1,jr={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*nr),easeOutSine:t=>Math.sin(t*nr),easeInOutSine:t=>-.5*(Math.cos(Ji*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>Ar(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>Ar(t)?t:Lr(t,.075,.3),easeOutElastic:t=>Ar(t)?t:Dr(t,.075,.3),easeInOutElastic(t){const e=.1125;return Ar(t)?t:t<.5?.5*Lr(2*t,e,.45):.5+.5*Dr(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-jr.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,n=2.75;return t<1/n?e*t*t:t<2/n?e*(t-=1.5/n)*t+.75:t<2.5/n?e*(t-=2.25/n)*t+.9375:e*(t-=2.625/n)*t+.984375},easeInOutBounce:t=>t<.5?.5*jr.easeInBounce(2*t):.5*jr.easeOutBounce(2*t-1)+.5};function zr(t){if(t&&"object"===typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function Ir(t){return zr(t)?t:new Ci(t)}function Fr(t){return zr(t)?t:new Ci(t).saturate(.5).darken(.1).hexString()}const Br=["x","y","borderWidth","radius","tension"],Ur=["color","borderColor","backgroundColor"];const Hr=new Map;function Wr(t,e,n){return function(t,e){e=e||{};const n=t+JSON.stringify(e);let i=Hr.get(n);return i||(i=new Intl.NumberFormat(t,e),Hr.set(n,i)),i}(e,n).format(t)}const Vr={values:t=>Pi(t)?t:""+t,numeric(t,e,n){if(0===t)return"0";const i=this.chart.options.locale;let r,s=t;if(n.length>1){const e=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(e<1e-4||e>1e15)&&(r="scientific"),s=function(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t));return n}(t,n)}const o=sr(Math.abs(s)),a=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:r,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),Wr(t,i,l)},logarithmic(t,e,n){if(0===t)return"0";const i=n[e].significand||t/Math.pow(10,Math.floor(sr(t)));return[1,2,3,5,10,15].includes(i)||e>.8*n.length?Vr.numeric.call(this,t,e,n):""}};var $r={formatters:Vr};const qr=Object.create(null),Yr=Object.create(null);function Kr(t,e){if(!e)return t;const n=e.split(".");for(let i=0,r=n.length;i<r;++i){const e=n[i];t=t[e]||(t[e]=Object.create(null))}return t}function Qr(t,e,n){return"string"===typeof e?Hi(Kr(t,e),n):Hi(Kr(t,""),e)}class Xr{constructor(t,e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>Fr(e.backgroundColor),this.hoverBorderColor=(t,e)=>Fr(e.borderColor),this.hoverColor=(t,e)=>Fr(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return Qr(this,t,e)}get(t){return Kr(this,t)}describe(t,e){return Qr(Yr,t,e)}override(t,e){return Qr(qr,t,e)}route(t,e,n,i){const r=Kr(this,t),s=Kr(this,n),o="_"+e;Object.defineProperties(r,{[o]:{value:r[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[o],e=s[i];return Ni(t)?Object.assign({},e,t):Li(t,e)},set(t){this[o]=t}}})}apply(t){t.forEach((t=>t(this)))}}var Jr=new Xr({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),t.set("animations",{colors:{type:"color",properties:Ur},numbers:{type:"number",properties:Br}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}})},function(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:$r.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t&&"dash"!==t}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t})}]);function Gr(t,e,n,i,r){let s=e[r];return s||(s=e[r]=t.measureText(r).width,n.push(r)),s>i&&(i=s),i}function Zr(t,e,n){const i=t.currentDevicePixelRatio,r=0!==n?Math.max(n/2,.5):0;return Math.round((e-r)*i)/i+r}function ts(t,e){(e||t)&&((e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function es(t,e,n,i){ns(t,e,n,i,null)}function ns(t,e,n,i,r){let s,o,a,l,c,u,h,d;const f=e.pointStyle,p=e.rotation,g=e.radius;let m=(p||0)*er;if(f&&"object"===typeof f&&(s=f.toString(),"[object HTMLImageElement]"===s||"[object HTMLCanvasElement]"===s))return t.save(),t.translate(n,i),t.rotate(m),t.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),void t.restore();if(!(isNaN(g)||g<=0)){switch(t.beginPath(),f){default:r?t.ellipse(n,i,r/2,g,0,0,Gi):t.arc(n,i,g,0,Gi),t.closePath();break;case"triangle":u=r?r/2:g,t.moveTo(n+Math.sin(m)*u,i-Math.cos(m)*g),m+=rr,t.lineTo(n+Math.sin(m)*u,i-Math.cos(m)*g),m+=rr,t.lineTo(n+Math.sin(m)*u,i-Math.cos(m)*g),t.closePath();break;case"rectRounded":c=.516*g,l=g-c,o=Math.cos(m+ir)*l,h=Math.cos(m+ir)*(r?r/2-c:l),a=Math.sin(m+ir)*l,d=Math.sin(m+ir)*(r?r/2-c:l),t.arc(n-h,i-a,c,m-Ji,m-nr),t.arc(n+d,i-o,c,m-nr,m),t.arc(n+h,i+a,c,m,m+nr),t.arc(n-d,i+o,c,m+nr,m+Ji),t.closePath();break;case"rect":if(!p){l=Math.SQRT1_2*g,u=r?r/2:l,t.rect(n-u,i-l,2*u,2*l);break}m+=ir;case"rectRot":h=Math.cos(m)*(r?r/2:g),o=Math.cos(m)*g,a=Math.sin(m)*g,d=Math.sin(m)*(r?r/2:g),t.moveTo(n-h,i-a),t.lineTo(n+d,i-o),t.lineTo(n+h,i+a),t.lineTo(n-d,i+o),t.closePath();break;case"crossRot":m+=ir;case"cross":h=Math.cos(m)*(r?r/2:g),o=Math.cos(m)*g,a=Math.sin(m)*g,d=Math.sin(m)*(r?r/2:g),t.moveTo(n-h,i-a),t.lineTo(n+h,i+a),t.moveTo(n+d,i-o),t.lineTo(n-d,i+o);break;case"star":h=Math.cos(m)*(r?r/2:g),o=Math.cos(m)*g,a=Math.sin(m)*g,d=Math.sin(m)*(r?r/2:g),t.moveTo(n-h,i-a),t.lineTo(n+h,i+a),t.moveTo(n+d,i-o),t.lineTo(n-d,i+o),m+=ir,h=Math.cos(m)*(r?r/2:g),o=Math.cos(m)*g,a=Math.sin(m)*g,d=Math.sin(m)*(r?r/2:g),t.moveTo(n-h,i-a),t.lineTo(n+h,i+a),t.moveTo(n+d,i-o),t.lineTo(n-d,i+o);break;case"line":o=r?r/2:Math.cos(m)*g,a=Math.sin(m)*g,t.moveTo(n-o,i-a),t.lineTo(n+o,i+a);break;case"dash":t.moveTo(n,i),t.lineTo(n+Math.cos(m)*(r?r/2:g),i+Math.sin(m)*g);break;case!1:t.closePath()}t.fill(),e.borderWidth>0&&t.stroke()}}function is(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n}function rs(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function ss(t){t.restore()}function os(t,e,n,i,r){if(!e)return t.lineTo(n.x,n.y);if("middle"===r){const i=(e.x+n.x)/2;t.lineTo(i,e.y),t.lineTo(i,n.y)}else"after"===r!==!!i?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}function as(t,e,n,i){if(!e)return t.lineTo(n.x,n.y);t.bezierCurveTo(i?e.cp1x:e.cp2x,i?e.cp1y:e.cp2y,i?n.cp2x:n.cp1x,i?n.cp2y:n.cp1y,n.x,n.y)}function ls(t,e,n,i,r){if(r.strikethrough||r.underline){const s=t.measureText(i),o=e-s.actualBoundingBoxLeft,a=e+s.actualBoundingBoxRight,l=n-s.actualBoundingBoxAscent,c=n+s.actualBoundingBoxDescent,u=r.strikethrough?(l+c)/2:c;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=r.decorationWidth||2,t.moveTo(o,u),t.lineTo(a,u),t.stroke()}}function cs(t,e){const n=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=n}function us(t,e,n,i,r){let s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};const o=Pi(e)?e:[e],a=s.strokeWidth>0&&""!==s.strokeColor;let l,c;for(t.save(),t.font=r.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),Mi(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,s),l=0;l<o.length;++l)c=o[l],s.backdrop&&cs(t,s.backdrop),a&&(s.strokeColor&&(t.strokeStyle=s.strokeColor),Mi(s.strokeWidth)||(t.lineWidth=s.strokeWidth),t.strokeText(c,n,i,s.maxWidth)),t.fillText(c,n,i,s.maxWidth),ls(t,n,i,c,s),i+=Number(r.lineHeight);t.restore()}function hs(t,e){const{x:n,y:i,w:r,h:s,radius:o}=e;t.arc(n+o.topLeft,i+o.topLeft,o.topLeft,1.5*Ji,Ji,!0),t.lineTo(n,i+s-o.bottomLeft),t.arc(n+o.bottomLeft,i+s-o.bottomLeft,o.bottomLeft,Ji,nr,!0),t.lineTo(n+r-o.bottomRight,i+s),t.arc(n+r-o.bottomRight,i+s-o.bottomRight,o.bottomRight,nr,0,!0),t.lineTo(n+r,i+o.topRight),t.arc(n+r-o.topRight,i+o.topRight,o.topRight,0,-nr,!0),t.lineTo(n+o.topLeft,i)}const ds=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,fs=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function ps(t,e){const n=(""+t).match(ds);if(!n||"normal"===n[1])return 1.2*e;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100}return e*t}function gs(t,e){const n={},i=Ni(e),r=i?Object.keys(e):e,s=Ni(t)?i?n=>Li(t[n],t[e[n]]):e=>t[e]:()=>t;for(const o of r)n[o]=+s(o)||0;return n}function ms(t){return gs(t,{top:"y",right:"x",bottom:"y",left:"x"})}function ys(t){return gs(t,["topLeft","topRight","bottomLeft","bottomRight"])}function bs(t){const e=ms(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function vs(t,e){t=t||{},e=e||Jr.font;let n=Li(t.size,e.size);"string"===typeof n&&(n=parseInt(n,10));let i=Li(t.style,e.style);i&&!(""+i).match(fs)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const r={family:Li(t.family,e.family),lineHeight:ps(Li(t.lineHeight,e.lineHeight),n),size:n,style:i,weight:Li(t.weight,e.weight),string:""};return r.string=function(t){return!t||Mi(t.size)||Mi(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(r),r}function xs(t,e,n,i){let r,s,o,a=!0;for(r=0,s=t.length;r<s;++r)if(o=t[r],void 0!==o&&(void 0!==e&&"function"===typeof o&&(o=o(e),a=!1),void 0!==n&&Pi(o)&&(o=o[n%o.length],a=!1),void 0!==o))return i&&!a&&(i.cacheable=!1),o}function _s(t,e){return Object.assign(Object.create(t),e)}function ws(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[""],n=arguments.length>3?arguments[3]:void 0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:()=>t[0];const r=(arguments.length>2?arguments[2]:void 0)||t;"undefined"===typeof n&&(n=As("_fallback",t));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:r,_fallback:n,_getTarget:i,override:i=>ws([i,...t],e,r,n)};return new Proxy(s,{deleteProperty:(e,n)=>(delete e[n],delete e._keys,delete t[0][n],!0),get:(n,i)=>Os(n,i,(()=>function(t,e,n,i){let r;for(const s of e)if(r=As(Es(s,t),n),"undefined"!==typeof r)return Cs(t,r)?Ns(n,i,t,r):r}(i,e,t,n))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>Ls(t).includes(e),ownKeys:t=>Ls(t),set(t,e,n){const r=t._storage||(t._storage=i());return t[e]=r[e]=n,delete t._keys,!0}})}function ks(t,e,n,i){const r={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:Ss(t,i),setContext:e=>ks(t,e,n,i),override:r=>ks(t.override(r),e,n,i)};return new Proxy(r,{deleteProperty:(e,n)=>(delete e[n],delete t[n],!0),get:(t,e,n)=>Os(t,e,(()=>function(t,e,n){const{_proxy:i,_context:r,_subProxy:s,_descriptors:o}=t;let a=i[e];Qi(a)&&o.isScriptable(e)&&(a=function(t,e,n,i){const{_proxy:r,_context:s,_subProxy:o,_stack:a}=n;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t);let l=e(s,o||i);a.delete(t),Cs(t,l)&&(l=Ns(r._scopes,r,t,l));return l}(e,a,t,n));Pi(a)&&a.length&&(a=function(t,e,n,i){const{_proxy:r,_context:s,_subProxy:o,_descriptors:a}=n;if("undefined"!==typeof s.index&&i(t))return e[s.index%e.length];if(Ni(e[0])){const n=e,i=r._scopes.filter((t=>t!==n));e=[];for(const l of n){const n=Ns(i,r,t,l);e.push(ks(n,s,o&&o[t],a))}}return e}(e,a,t,o.isIndexable));Cs(e,a)&&(a=ks(a,r,s&&s[e],o));return a}(t,e,n))),getOwnPropertyDescriptor:(e,n)=>e._descriptors.allKeys?Reflect.has(t,n)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,n),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,n)=>Reflect.has(t,n),ownKeys:()=>Reflect.ownKeys(t),set:(e,n,i)=>(t[n]=i,delete e[n],!0)})}function Ss(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{scriptable:!0,indexable:!0};const{_scriptable:n=e.scriptable,_indexable:i=e.indexable,_allKeys:r=e.allKeys}=t;return{allKeys:r,scriptable:n,indexable:i,isScriptable:Qi(n)?n:()=>n,isIndexable:Qi(i)?i:()=>i}}const Es=(t,e)=>t?t+Yi(e):e,Cs=(t,e)=>Ni(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function Os(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e)||"constructor"===e)return t[e];const i=n();return t[e]=i,i}function Ts(t,e,n){return Qi(t)?t(e,n):t}const Ms=(t,e)=>!0===t?e:"string"===typeof t?qi(e,t):void 0;function Ps(t,e,n,i,r){for(const s of e){const e=Ms(n,s);if(e){t.add(e);const s=Ts(e._fallback,n,r);if("undefined"!==typeof s&&s!==n&&s!==i)return s}else if(!1===e&&"undefined"!==typeof i&&n!==i)return null}return!1}function Ns(t,e,n,i){const r=e._rootScopes,s=Ts(e._fallback,n,i),o=[...t,...r],a=new Set;a.add(i);let l=Rs(a,o,n,s||n,i);return null!==l&&(("undefined"===typeof s||s===n||(l=Rs(a,o,s,l,i),null!==l))&&ws(Array.from(a),[""],r,s,(()=>function(t,e,n){const i=t._getTarget();e in i||(i[e]={});const r=i[e];if(Pi(r)&&Ni(n))return n;return r||{}}(e,n,i))))}function Rs(t,e,n,i,r){for(;n;)n=Ps(t,e,n,i,r);return n}function As(t,e){for(const n of e){if(!n)continue;const e=n[t];if("undefined"!==typeof e)return e}}function Ls(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const n of t)for(const t of Object.keys(n).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}const Ds=Number.EPSILON||1e-14,js=(t,e)=>e<t.length&&!t[e].skip&&t[e],zs=t=>"x"===t?"y":"x";function Is(t,e,n,i){const r=t.skip?e:t,s=e,o=n.skip?e:n,a=gr(s,r),l=gr(o,s);let c=a/(a+l),u=l/(a+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const h=i*c,d=i*u;return{previous:{x:s.x-h*(o.x-r.x),y:s.y-h*(o.y-r.y)},next:{x:s.x+d*(o.x-r.x),y:s.y+d*(o.y-r.y)}}}function Fs(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"x";const n=zs(e),i=t.length,r=Array(i).fill(0),s=Array(i);let o,a,l,c=js(t,0);for(o=0;o<i;++o)if(a=l,l=c,c=js(t,o+1),l){if(c){const t=c[e]-l[e];r[o]=0!==t?(c[n]-l[n])/t:0}s[o]=a?c?or(r[o-1])!==or(r[o])?0:(r[o-1]+r[o])/2:r[o-1]:r[o]}!function(t,e,n){const i=t.length;let r,s,o,a,l,c=js(t,0);for(let u=0;u<i-1;++u)l=c,c=js(t,u+1),l&&c&&(ar(e[u],0,Ds)?n[u]=n[u+1]=0:(r=n[u]/e[u],s=n[u+1]/e[u],a=Math.pow(r,2)+Math.pow(s,2),a<=9||(o=3/Math.sqrt(a),n[u]=r*o*e[u],n[u+1]=s*o*e[u])))}(t,r,s),function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"x";const i=zs(n),r=t.length;let s,o,a,l=js(t,0);for(let c=0;c<r;++c){if(o=a,a=l,l=js(t,c+1),!a)continue;const r=a[n],u=a[i];o&&(s=(r-o[n])/3,a[`cp1${n}`]=r-s,a[`cp1${i}`]=u-s*e[c]),l&&(s=(l[n]-r)/3,a[`cp2${n}`]=r+s,a[`cp2${i}`]=u+s*e[c])}}(t,s,e)}function Bs(t,e,n){return Math.max(Math.min(t,n),e)}function Us(t,e,n,i,r){let s,o,a,l;if(e.spanGaps&&(t=t.filter((t=>!t.skip))),"monotone"===e.cubicInterpolationMode)Fs(t,r);else{let n=i?t[t.length-1]:t[0];for(s=0,o=t.length;s<o;++s)a=t[s],l=Is(n,a,t[Math.min(s+1,o-(i?0:1))%o],e.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,n=a}e.capBezierPoints&&function(t,e){let n,i,r,s,o,a=is(t[0],e);for(n=0,i=t.length;n<i;++n)o=s,s=a,a=n<i-1&&is(t[n+1],e),s&&(r=t[n],o&&(r.cp1x=Bs(r.cp1x,e.left,e.right),r.cp1y=Bs(r.cp1y,e.top,e.bottom)),a&&(r.cp2x=Bs(r.cp2x,e.left,e.right),r.cp2y=Bs(r.cp2y,e.top,e.bottom)))}(t,n)}function Hs(){return"undefined"!==typeof window&&"undefined"!==typeof document}function Ws(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function Vs(t,e,n){let i;return"string"===typeof t?(i=parseInt(t,10),-1!==t.indexOf("%")&&(i=i/100*e.parentNode[n])):i=t,i}const $s=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);const qs=["top","right","bottom","left"];function Ys(t,e,n){const i={};n=n?"-"+n:"";for(let r=0;r<4;r++){const s=qs[r];i[s]=parseFloat(t[e+"-"+s+n])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}function Ks(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:i}=e,r=$s(n),s="border-box"===r.boxSizing,o=Ys(r,"padding"),a=Ys(r,"border","width"),{x:l,y:c,box:u}=function(t,e){const n=t.touches,i=n&&n.length?n[0]:t,{offsetX:r,offsetY:s}=i;let o,a,l=!1;if(((t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot))(r,s,t.target))o=r,a=s;else{const t=e.getBoundingClientRect();o=i.clientX-t.left,a=i.clientY-t.top,l=!0}return{x:o,y:a,box:l}}(t,n),h=o.left+(u&&a.left),d=o.top+(u&&a.top);let{width:f,height:p}=e;return s&&(f-=o.width+a.width,p-=o.height+a.height),{x:Math.round((l-h)/f*n.width/i),y:Math.round((c-d)/p*n.height/i)}}const Qs=t=>Math.round(10*t)/10;function Xs(t,e,n,i){const r=$s(t),s=Ys(r,"margin"),o=Vs(r.maxWidth,t,"clientWidth")||tr,a=Vs(r.maxHeight,t,"clientHeight")||tr,l=function(t,e,n){let i,r;if(void 0===e||void 0===n){const s=t&&Ws(t);if(s){const t=s.getBoundingClientRect(),o=$s(s),a=Ys(o,"border","width"),l=Ys(o,"padding");e=t.width-l.width-a.width,n=t.height-l.height-a.height,i=Vs(o.maxWidth,s,"clientWidth"),r=Vs(o.maxHeight,s,"clientHeight")}else e=t.clientWidth,n=t.clientHeight}return{width:e,height:n,maxWidth:i||tr,maxHeight:r||tr}}(t,e,n);let{width:c,height:u}=l;if("content-box"===r.boxSizing){const t=Ys(r,"border","width"),e=Ys(r,"padding");c-=e.width+t.width,u-=e.height+t.height}c=Math.max(0,c-s.width),u=Math.max(0,i?c/i:u-s.height),c=Qs(Math.min(c,o,l.maxWidth)),u=Qs(Math.min(u,a,l.maxHeight)),c&&!u&&(u=Qs(c/2));return(void 0!==e||void 0!==n)&&i&&l.height&&u>l.height&&(u=l.height,c=Qs(Math.floor(u*i))),{width:c,height:u}}function Js(t,e,n){const i=e||1,r=Math.floor(t.height*i),s=Math.floor(t.width*i);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const o=t.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=`${t.height}px`,o.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==i||o.height!==r||o.width!==s)&&(t.currentDevicePixelRatio=i,o.height=r,o.width=s,t.ctx.setTransform(i,0,0,i,0,0),!0)}const Gs=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};Hs()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch(e){}return t}();function Zs(t,e){const n=function(t,e){return $s(t).getPropertyValue(e)}(t,e),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function to(t,e,n,i){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function eo(t,e,n,i){return{x:t.x+n*(e.x-t.x),y:"middle"===i?n<.5?t.y:e.y:"after"===i?n<1?t.y:e.y:n>0?e.y:t.y}}function no(t,e,n,i){const r={x:t.cp2x,y:t.cp2y},s={x:e.cp1x,y:e.cp1y},o=to(t,r,n),a=to(r,s,n),l=to(s,e,n),c=to(o,a,n),u=to(a,l,n);return to(c,u,n)}function io(t,e,n){return t?function(t,e){return{x:n=>t+t+e-n,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,n):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function ro(t,e){let n,i;"ltr"!==e&&"rtl"!==e||(n=t.canvas.style,i=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=i)}function so(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function oo(t){return"angle"===t?{between:br,compare:mr,normalize:yr}:{between:xr,compare:(t,e)=>t-e,normalize:t=>t}}function ao(t){let{start:e,end:n,count:i,loop:r,style:s}=t;return{start:e%i,end:n%i,loop:r&&(n-e+1)%i===0,style:s}}function lo(t,e,n){if(!n)return[t];const{property:i,start:r,end:s}=n,o=e.length,{compare:a,between:l,normalize:c}=oo(i),{start:u,end:h,loop:d,style:f}=function(t,e,n){const{property:i,start:r,end:s}=n,{between:o,normalize:a}=oo(i),l=e.length;let c,u,{start:h,end:d,loop:f}=t;if(f){for(h+=l,d+=l,c=0,u=l;c<u&&o(a(e[h%l][i]),r,s);++c)h--,d--;h%=l,d%=l}return d<h&&(d+=l),{start:h,end:d,loop:f,style:t.style}}(t,e,n),p=[];let g,m,y,b=!1,v=null;const x=()=>b||l(r,y,g)&&0!==a(r,y),_=()=>!b||0===a(s,g)||l(s,y,g);for(let w=u,k=u;w<=h;++w)m=e[w%o],m.skip||(g=c(m[i]),g!==y&&(b=l(g,r,s),null===v&&x()&&(v=0===a(g,r)?w:k),null!==v&&_()&&(p.push(ao({start:v,end:w,loop:d,count:o,style:f})),v=null),k=w,y=g));return null!==v&&p.push(ao({start:v,end:h,loop:d,count:o,style:f})),p}function co(t,e){const n=[],i=t.segments;for(let r=0;r<i.length;r++){const s=lo(i[r],t.points,e);s.length&&n.push(...s)}return n}function uo(t,e,n,i){return i&&i.setContext&&n?function(t,e,n,i){const r=t._chart.getContext(),s=ho(t.options),{_datasetIndex:o,options:{spanGaps:a}}=t,l=n.length,c=[];let u=s,h=e[0].start,d=h;function f(t,e,i,r){const s=a?-1:1;if(t!==e){for(t+=l;n[t%l].skip;)t-=s;for(;n[e%l].skip;)e+=s;t%l!==e%l&&(c.push({start:t%l,end:e%l,loop:i,style:r}),u=r,h=e%l)}}for(const p of e){h=a?h:p.start;let t,e=n[h%l];for(d=h+1;d<=p.end;d++){const s=n[d%l];t=ho(i.setContext(_s(r,{type:"segment",p0:e,p1:s,p0DataIndex:(d-1)%l,p1DataIndex:d%l,datasetIndex:o}))),fo(t,u)&&f(h,d-1,p.loop,u),e=s,u=t}h<d-1&&f(h,d-1,p.loop,u)}return c}(t,e,n,i):e}function ho(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function fo(t,e){if(!e)return!1;const n=[],i=function(t,e){return zr(e)?(n.includes(e)||n.push(e),n.indexOf(e)):e};return JSON.stringify(t,i)!==JSON.stringify(e,i)}function po(t,e,n){return t.options.clip?t[n]:e[n]}function go(t,e){const n=e._clip;if(n.disabled)return!1;const i=function(t,e){const{xScale:n,yScale:i}=t;return n&&i?{left:po(n,e,"left"),right:po(n,e,"right"),top:po(i,e,"top"),bottom:po(i,e,"bottom")}:e}(e,t.chartArea);return{left:!1===n.left?0:i.left-(!0===n.left?0:n.left),right:!1===n.right?t.width:i.right+(!0===n.right?0:n.right),top:!1===n.top?0:i.top-(!0===n.top?0:n.top),bottom:!1===n.bottom?t.height:i.bottom+(!0===n.bottom?0:n.bottom)}}class mo{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,n,i){const r=e.listeners[i],s=e.duration;r.forEach((i=>i({chart:t,initial:e.initial,numSteps:s,currentStep:Math.min(n-e.start,s)})))}_refresh(){this._request||(this._running=!0,this._request=Or.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now(),e=0;this._charts.forEach(((n,i)=>{if(!n.running||!n.items.length)return;const r=n.items;let s,o=r.length-1,a=!1;for(;o>=0;--o)s=r[o],s._active?(s._total>n.duration&&(n.duration=s._total),s.tick(t),a=!0):(r[o]=r[r.length-1],r.pop());a&&(i.draw(),this._notify(i,n,t,"progress")),r.length||(n.running=!1,this._notify(i,n,t,"complete"),n.initial=!1),e+=r.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let n=e.get(t);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,n)),n}listen(t,e,n){this._getAnims(t).listeners[e].push(n)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const n=e.items;let i=n.length-1;for(;i>=0;--i)n[i].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var yo=new mo;const bo="transparent",vo={boolean:(t,e,n)=>n>.5?e:t,color(t,e,n){const i=Ir(t||bo),r=i.valid&&Ir(e||bo);return r&&r.valid?r.mix(i,n).hexString():e},number:(t,e,n)=>t+(e-t)*n};class xo{constructor(t,e,n,i){const r=e[n];i=xs([t.to,i,r,t.from]);const s=xs([t.from,r,i]);this._active=!0,this._fn=t.fn||vo[t.type||typeof s],this._easing=jr[t.easing]||jr.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=n,this._from=s,this._to=i,this._promises=void 0}active(){return this._active}update(t,e,n){if(this._active){this._notify(!1);const i=this._target[this._prop],r=n-this._start,s=this._duration-r;this._start=n,this._duration=Math.floor(Math.max(s,t.duration)),this._total+=r,this._loop=!!t.loop,this._to=xs([t.to,e,i,t.from]),this._from=xs([t.from,i,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,n=this._duration,i=this._prop,r=this._from,s=this._loop,o=this._to;let a;if(this._active=r!==o&&(s||e<n),!this._active)return this._target[i]=o,void this._notify(!0);e<0?this._target[i]=r:(a=e/n%2,a=s&&a>1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[i]=this._fn(r,o,a))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,n)=>{t.push({res:e,rej:n})}))}_notify(t){const e=t?"res":"rej",n=this._promises||[];for(let i=0;i<n.length;i++)n[i][e]()}}class _o{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!Ni(t))return;const e=Object.keys(Jr.animation),n=this._properties;Object.getOwnPropertyNames(t).forEach((i=>{const r=t[i];if(!Ni(r))return;const s={};for(const t of e)s[t]=r[t];(Pi(r.properties)&&r.properties||[i]).forEach((t=>{t!==i&&n.has(t)||n.set(t,s)}))}))}_animateOptions(t,e){const n=e.options,i=function(t,e){if(!e)return;let n=t.options;if(!n)return void(t.options=e);n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}}));return n}(t,n);if(!i)return[];const r=this._createAnimations(i,n);return n.$shared&&function(t,e){const n=[],i=Object.keys(e);for(let r=0;r<i.length;r++){const e=t[i[r]];e&&e.active()&&n.push(e.wait())}return Promise.all(n)}(t.options.$animations,n).then((()=>{t.options=n}),(()=>{})),r}_createAnimations(t,e){const n=this._properties,i=[],r=t.$animations||(t.$animations={}),s=Object.keys(e),o=Date.now();let a;for(a=s.length-1;a>=0;--a){const l=s[a];if("$"===l.charAt(0))continue;if("options"===l){i.push(...this._animateOptions(t,e));continue}const c=e[l];let u=r[l];const h=n.get(l);if(u){if(h&&u.active()){u.update(h,c,o);continue}u.cancel()}h&&h.duration?(r[l]=u=new xo(h,t,l,c),i.push(u)):t[l]=c}return i}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const n=this._createAnimations(t,e);return n.length?(yo.add(this._chart,n),!0):void 0}}function wo(t,e){const n=t&&t.options||{},i=n.reverse,r=void 0===n.min?e:0,s=void 0===n.max?e:0;return{start:i?s:r,end:i?r:s}}function ko(t,e){const n=[],i=t._getSortedDatasetMetas(e);let r,s;for(r=0,s=i.length;r<s;++r)n.push(i[r].index);return n}function So(t,e,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const r=t.keys,s="single"===i.mode;let o,a,l,c;if(null===e)return;let u=!1;for(o=0,a=r.length;o<a;++o){if(l=+r[o],l===n){if(u=!0,i.all)continue;break}c=t.values[l],Ri(c)&&(s||0===e||or(e)===or(c))&&(e+=c)}return u||i.all?e:0}function Eo(t,e){const n=t&&t.options.stacked;return n||void 0===n&&void 0!==e.stack}function Co(t,e,n){const i=t[e]||(t[e]={});return i[n]||(i[n]={})}function Oo(t,e,n,i){for(const r of e.getMatchingVisibleMetas(i).reverse()){const e=t[r.index];if(n&&e>0||!n&&e<0)return r.index}return null}function To(t,e){const{chart:n,_cachedMeta:i}=t,r=n._stacks||(n._stacks={}),{iScale:s,vScale:o,index:a}=i,l=s.axis,c=o.axis,u=function(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}(s,o,i),h=e.length;let d;for(let f=0;f<h;++f){const t=e[f],{[l]:n,[c]:s}=t;d=(t._stacks||(t._stacks={}))[c]=Co(r,u,n),d[a]=s,d._top=Oo(d,o,!0,i.type),d._bottom=Oo(d,o,!1,i.type);(d._visualValues||(d._visualValues={}))[a]=s}}function Mo(t,e){const n=t.scales;return Object.keys(n).filter((t=>n[t].axis===e)).shift()}function Po(t,e){const n=t.controller.index,i=t.vScale&&t.vScale.axis;if(i){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[i]||void 0===e[i][n])return;delete e[i][n],void 0!==e[i]._visualValues&&void 0!==e[i]._visualValues[n]&&delete e[i]._visualValues[n]}}}const No=t=>"reset"===t||"none"===t,Ro=(t,e)=>e?t:Object.assign({},t);class Ao{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Eo(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&Po(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,n=this.getDataset(),i=(t,e,n,i)=>"x"===t?e:"r"===t?i:n,r=e.xAxisID=Li(n.xAxisID,Mo(t,"x")),s=e.yAxisID=Li(n.yAxisID,Mo(t,"y")),o=e.rAxisID=Li(n.rAxisID,Mo(t,"r")),a=e.indexAxis,l=e.iAxisID=i(a,r,s,o),c=e.vAxisID=i(a,s,r,o);e.xScale=this.getScaleForId(r),e.yScale=this.getScaleForId(s),e.rScale=this.getScaleForId(o),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Er(this._data,this),t._stacked&&Po(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),n=this._data;if(Ni(e)){const t=this._cachedMeta;this._data=function(t,e){const{iScale:n,vScale:i}=e,r="x"===n.axis?"x":"y",s="x"===i.axis?"x":"y",o=Object.keys(t),a=new Array(o.length);let l,c,u;for(l=0,c=o.length;l<c;++l)u=o[l],a[l]={[r]:u,[s]:t[u]};return a}(e,t)}else if(n!==e){if(n){Er(n,this);const t=this._cachedMeta;Po(t),t._parsed=[]}e&&Object.isExtensible(e)&&(r=this,(i=e)._chartjs?i._chartjs.listeners.push(r):(Object.defineProperty(i,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[r]}}),Sr.forEach((t=>{const e="_onData"+Yi(t),n=i[t];Object.defineProperty(i,t,{configurable:!0,enumerable:!1,value(){for(var t=arguments.length,r=new Array(t),s=0;s<t;s++)r[s]=arguments[s];const o=n.apply(this,r);return i._chartjs.listeners.forEach((t=>{"function"===typeof t[e]&&t[e](...r)})),o}})})))),this._syncList=[],this._data=e}var i,r}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,n=this.getDataset();let i=!1;this._dataCheck();const r=e._stacked;e._stacked=Eo(e.vScale,e),e.stack!==n.stack&&(i=!0,Po(e),e.stack=n.stack),this._resyncElements(t),(i||r!==e._stacked)&&(To(this,e._parsed),e._stacked=Eo(e.vScale,e))}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),n=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:n,_data:i}=this,{iScale:r,_stacked:s}=n,o=r.axis;let a,l,c,u=0===t&&e===i.length||n._sorted,h=t>0&&n._parsed[t-1];if(!1===this._parsing)n._parsed=i,n._sorted=!0,c=i;else{c=Pi(i[t])?this.parseArrayData(n,i,t,e):Ni(i[t])?this.parseObjectData(n,i,t,e):this.parsePrimitiveData(n,i,t,e);const r=()=>null===l[o]||h&&l[o]<h[o];for(a=0;a<e;++a)n._parsed[a+t]=l=c[a],u&&(r()&&(u=!1),h=l);n._sorted=u}s&&To(this,c)}parsePrimitiveData(t,e,n,i){const{iScale:r,vScale:s}=t,o=r.axis,a=s.axis,l=r.getLabels(),c=r===s,u=new Array(i);let h,d,f;for(h=0,d=i;h<d;++h)f=h+n,u[h]={[o]:c||r.parse(l[f],f),[a]:s.parse(e[f],f)};return u}parseArrayData(t,e,n,i){const{xScale:r,yScale:s}=t,o=new Array(i);let a,l,c,u;for(a=0,l=i;a<l;++a)c=a+n,u=e[c],o[a]={x:r.parse(u[0],c),y:s.parse(u[1],c)};return o}parseObjectData(t,e,n,i){const{xScale:r,yScale:s}=t,{xAxisKey:o="x",yAxisKey:a="y"}=this._parsing,l=new Array(i);let c,u,h,d;for(c=0,u=i;c<u;++c)h=c+n,d=e[h],l[c]={x:r.parse(qi(d,o),h),y:s.parse(qi(d,a),h)};return l}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,n){const i=this.chart,r=this._cachedMeta,s=e[t.axis];return So({keys:ko(i,!0),values:e._stacks[t.axis]._visualValues},s,r.index,{mode:n})}updateRangeFromParsed(t,e,n,i){const r=n[e.axis];let s=null===r?NaN:r;const o=i&&n._stacks[e.axis];i&&o&&(i.values=o,s=So(i,r,this._cachedMeta.index)),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s)}getMinMax(t,e){const n=this._cachedMeta,i=n._parsed,r=n._sorted&&t===n.iScale,s=i.length,o=this._getOtherScale(t),a=((t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:ko(n,!0),values:null})(e,n,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:u}=function(t){const{min:e,max:n,minDefined:i,maxDefined:r}=t.getUserBounds();return{min:i?e:Number.NEGATIVE_INFINITY,max:r?n:Number.POSITIVE_INFINITY}}(o);let h,d;function f(){d=i[h];const e=d[o.axis];return!Ri(d[t.axis])||c>e||u<e}for(h=0;h<s&&(f()||(this.updateRangeFromParsed(l,t,d,a),!r));++h);if(r)for(h=s-1;h>=0;--h)if(!f()){this.updateRangeFromParsed(l,t,d,a);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,n=[];let i,r,s;for(i=0,r=e.length;i<r;++i)s=e[i][t.axis],Ri(s)&&n.push(s);return n}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,n=e.iScale,i=e.vScale,r=this.getParsed(t);return{label:n?""+n.getLabelForValue(r[n.axis]):"",value:i?""+i.getLabelForValue(r[i.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=function(t){let e,n,i,r;return Ni(t)?(e=t.top,n=t.right,i=t.bottom,r=t.left):e=n=i=r=t,{top:e,right:n,bottom:i,left:r,disabled:!1===t}}(Li(this.options.clip,function(t,e,n){if(!1===n)return!1;const i=wo(t,n),r=wo(e,n);return{top:r.end,right:i.end,bottom:r.start,left:i.start}}(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,n=this._cachedMeta,i=n.data||[],r=e.chartArea,s=[],o=this._drawStart||0,a=this._drawCount||i.length-o,l=this.options.drawActiveElementsOnTop;let c;for(n.dataset&&n.dataset.draw(t,r,o,a),c=o;c<o+a;++c){const e=i[c];e.hidden||(e.active&&l?s.push(e):e.draw(t,r))}for(c=0;c<s.length;++c)s[c].draw(t,r)}getStyle(t,e){const n=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(n):this.resolveDataElementOptions(t||0,n)}getContext(t,e,n){const i=this.getDataset();let r;if(t>=0&&t<this._cachedMeta.data.length){const e=this._cachedMeta.data[t];r=e.$context||(e.$context=function(t,e,n){return _s(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}(this.getContext(),t,e)),r.parsed=this.getParsed(t),r.raw=i.data[t],r.index=r.dataIndex=t}else r=this.$context||(this.$context=function(t,e){return _s(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}(this.chart.getContext(),this.index)),r.dataset=i,r.index=r.datasetIndex=this.index;return r.active=!!e,r.mode=n,r}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",n=arguments.length>2?arguments[2]:void 0;const i="active"===e,r=this._cachedDataOpts,s=t+"-"+e,o=r[s],a=this.enableOptionSharing&&Ki(n);if(o)return Ro(o,a);const l=this.chart.config,c=l.datasetElementScopeKeys(this._type,t),u=i?[`${t}Hover`,"hover",t,""]:[t,""],h=l.getOptionScopes(this.getDataset(),c),d=Object.keys(Jr.elements[t]),f=l.resolveNamedOptions(h,d,(()=>this.getContext(n,i,e)),u);return f.$shared&&(f.$shared=a,r[s]=Object.freeze(Ro(f,a))),f}_resolveAnimations(t,e,n){const i=this.chart,r=this._cachedDataOpts,s=`animation-${e}`,o=r[s];if(o)return o;let a;if(!1!==i.options.animation){const i=this.chart.config,r=i.datasetAnimationScopeKeys(this._type,e),s=i.getOptionScopes(this.getDataset(),r);a=i.createResolver(s,this.getContext(t,n,e))}const l=new _o(i,a&&a.animations);return a&&a._cacheable&&(r[s]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||No(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const n=this.resolveDataElementOptions(t,e),i=this._sharedOptions,r=this.getSharedOptions(n),s=this.includeOptions(e,r)||r!==i;return this.updateSharedOptions(r,e,n),{sharedOptions:r,includeOptions:s}}updateElement(t,e,n,i){No(i)?Object.assign(t,n):this._resolveAnimations(e,i).update(t,n)}updateSharedOptions(t,e,n){t&&!No(e)&&this._resolveAnimations(void 0,e).update(t,n)}_setStyle(t,e,n,i){t.active=i;const r=this.getStyle(e,i);this._resolveAnimations(e,n,i).update(t,{options:!i&&this.getSharedOptions(r)||r})}removeHoverStyle(t,e,n){this._setStyle(t,n,"active",!1)}setHoverStyle(t,e,n){this._setStyle(t,n,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,n=this._cachedMeta.data;for(const[o,a,l]of this._syncList)this[o](a,l);this._syncList=[];const i=n.length,r=e.length,s=Math.min(r,i);s&&this.parse(0,s),r>i?this._insertElements(i,r-i,t):r<i&&this._removeElements(r,i-r)}_insertElements(t,e){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const i=this._cachedMeta,r=i.data,s=t+e;let o;const a=t=>{for(t.length+=e,o=t.length-1;o>=s;o--)t[o]=t[o-e]};for(a(r),o=t;o<s;++o)r[o]=new this.dataElementType;this._parsing&&a(i._parsed),this.parse(t,e),n&&this.updateElements(r,t,e,"reset")}updateElements(t,e,n,i){}_removeElements(t,e){const n=this._cachedMeta;if(this._parsing){const i=n._parsed.splice(t,e);n._stacked&&Po(n,i)}n.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,n,i]=t;this[e](n,i)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const n=arguments.length-2;n&&this._sync(["_insertElements",t,n])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}class Lo extends Ao{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:n,data:i=[],_dataset:r}=e,s=this.chart._animationsDisabled;let{start:o,count:a}=Nr(e,i,s);this._drawStart=o,this._drawCount=a,Rr(e)&&(o=0,a=i.length),n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!r._decimated,n.points=i;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(n,void 0,{animated:!s,options:l},t),this.updateElements(i,o,a,t)}updateElements(t,e,n,i){const r="reset"===i,{iScale:s,vScale:o,_stacked:a,_dataset:l}=this._cachedMeta,{sharedOptions:c,includeOptions:u}=this._getSharedOptions(e,i),h=s.axis,d=o.axis,{spanGaps:f,segment:p}=this.options,g=cr(f)?f:Number.POSITIVE_INFINITY,m=this.chart._animationsDisabled||r||"none"===i,y=e+n,b=t.length;let v=e>0&&this.getParsed(e-1);for(let x=0;x<b;++x){const n=t[x],f=m?n:{};if(x<e||x>=y){f.skip=!0;continue}const b=this.getParsed(x),_=Mi(b[d]),w=f[h]=s.getPixelForValue(b[h],x),k=f[d]=r||_?o.getBasePixel():o.getPixelForValue(a?this.applyStack(o,b,a):b[d],x);f.skip=isNaN(w)||isNaN(k)||_,f.stop=x>0&&Math.abs(b[h]-v[h])>g,p&&(f.parsed=b,f.raw=l.data[x]),u&&(f.options=c||this.resolveDataElementOptions(x,n.active?"active":i)),m||this.updateElement(n,x,f,i),v=b}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,n=e.options&&e.options.borderWidth||0,i=t.data||[];if(!i.length)return n;const r=i[0].size(this.resolveDataElementOptions(0)),s=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(n,r,s)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}function Do(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class jo{static override(t){Object.assign(jo.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return Do()}parse(){return Do()}format(){return Do()}add(){return Do()}diff(){return Do()}startOf(){return Do()}endOf(){return Do()}}var zo=jo;function Io(t,e,n,i){const{controller:r,data:s,_sorted:o}=t,a=r._cachedMeta.iScale,l=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(a&&e===a.axis&&"r"!==e&&o&&s.length){const o=a._reversePixels?kr:wr;if(!i){const i=o(s,e,n);if(l){const{vScale:e}=r._cachedMeta,{_parsed:n}=t,s=n.slice(0,i.lo+1).reverse().findIndex((t=>!Mi(t[e.axis])));i.lo-=Math.max(0,s);const o=n.slice(i.hi).findIndex((t=>!Mi(t[e.axis])));i.hi+=Math.max(0,o)}return i}if(r._sharedOptions){const t=s[0],i="function"===typeof t.getRange&&t.getRange(e);if(i){const t=o(s,e,n-i),r=o(s,e,n+i);return{lo:t.lo,hi:r.hi}}}}return{lo:0,hi:s.length-1}}function Fo(t,e,n,i,r){const s=t.getSortedVisibleDatasetMetas(),o=n[e];for(let a=0,l=s.length;a<l;++a){const{index:t,data:n}=s[a],{lo:l,hi:c}=Io(s[a],e,o,r);for(let e=l;e<=c;++e){const r=n[e];r.skip||i(r,t,e)}}}function Bo(t,e,n,i,r){const s=[];if(!r&&!t.isPointInArea(e))return s;return Fo(t,n,e,(function(n,o,a){(r||is(n,t.chartArea,0))&&n.inRange(e.x,e.y,i)&&s.push({element:n,datasetIndex:o,index:a})}),!0),s}function Uo(t,e,n,i,r,s){let o=[];const a=function(t){const e=-1!==t.indexOf("x"),n=-1!==t.indexOf("y");return function(t,i){const r=e?Math.abs(t.x-i.x):0,s=n?Math.abs(t.y-i.y):0;return Math.sqrt(Math.pow(r,2)+Math.pow(s,2))}}(n);let l=Number.POSITIVE_INFINITY;return Fo(t,n,e,(function(n,c,u){const h=n.inRange(e.x,e.y,r);if(i&&!h)return;const d=n.getCenterPoint(r);if(!(!!s||t.isPointInArea(d))&&!h)return;const f=a(e,d);f<l?(o=[{element:n,datasetIndex:c,index:u}],l=f):f===l&&o.push({element:n,datasetIndex:c,index:u})})),o}function Ho(t,e,n,i,r,s){return s||t.isPointInArea(e)?"r"!==n||i?Uo(t,e,n,i,r,s):function(t,e,n,i){let r=[];return Fo(t,n,e,(function(t,n,s){const{startAngle:o,endAngle:a}=t.getProps(["startAngle","endAngle"],i),{angle:l}=pr(t,{x:e.x,y:e.y});br(l,o,a)&&r.push({element:t,datasetIndex:n,index:s})})),r}(t,e,n,r):[]}function Wo(t,e,n,i,r){const s=[],o="x"===n?"inXRange":"inYRange";let a=!1;return Fo(t,n,e,((t,i,l)=>{t[o]&&t[o](e[n],r)&&(s.push({element:t,datasetIndex:i,index:l}),a=a||t.inRange(e.x,e.y,r))})),i&&!a?[]:s}var Vo={evaluateInteractionItems:Fo,modes:{index(t,e,n,i){const r=Ks(e,t),s=n.axis||"x",o=n.includeInvisible||!1,a=n.intersect?Bo(t,r,s,i,o):Ho(t,r,s,!1,i,o),l=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=a[0].index,n=t.data[e];n&&!n.skip&&l.push({element:n,datasetIndex:t.index,index:e})})),l):[]},dataset(t,e,n,i){const r=Ks(e,t),s=n.axis||"xy",o=n.includeInvisible||!1;let a=n.intersect?Bo(t,r,s,i,o):Ho(t,r,s,!1,i,o);if(a.length>0){const e=a[0].datasetIndex,n=t.getDatasetMeta(e).data;a=[];for(let t=0;t<n.length;++t)a.push({element:n[t],datasetIndex:e,index:t})}return a},point:(t,e,n,i)=>Bo(t,Ks(e,t),n.axis||"xy",i,n.includeInvisible||!1),nearest(t,e,n,i){const r=Ks(e,t),s=n.axis||"xy",o=n.includeInvisible||!1;return Ho(t,r,s,n.intersect,i,o)},x:(t,e,n,i)=>Wo(t,Ks(e,t),"x",n.intersect,i),y:(t,e,n,i)=>Wo(t,Ks(e,t),"y",n.intersect,i)}};const $o=["left","top","right","bottom"];function qo(t,e){return t.filter((t=>t.pos===e))}function Yo(t,e){return t.filter((t=>-1===$o.indexOf(t.pos)&&t.box.axis===e))}function Ko(t,e){return t.sort(((t,n)=>{const i=e?n:t,r=e?t:n;return i.weight===r.weight?i.index-r.index:i.weight-r.weight}))}function Qo(t,e){const n=function(t){const e={};for(const n of t){const{stack:t,pos:i,stackWeight:r}=n;if(!t||!$o.includes(i))continue;const s=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=r}return e}(t),{vBoxMaxWidth:i,hBoxMaxHeight:r}=e;let s,o,a;for(s=0,o=t.length;s<o;++s){a=t[s];const{fullSize:o}=a.box,l=n[a.stack],c=l&&a.stackWeight/l.weight;a.horizontal?(a.width=c?c*i:o&&e.availableWidth,a.height=r):(a.width=i,a.height=c?c*r:o&&e.availableHeight)}return n}function Xo(t,e,n,i){return Math.max(t[n],e[n])+Math.max(t[i],e[i])}function Jo(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function Go(t,e,n,i){const{pos:r,box:s}=n,o=t.maxPadding;if(!Ni(r)){n.size&&(t[r]-=n.size);const e=i[n.stack]||{size:0,count:1};e.size=Math.max(e.size,n.horizontal?s.height:s.width),n.size=e.size/e.count,t[r]+=n.size}s.getPadding&&Jo(o,s.getPadding());const a=Math.max(0,e.outerWidth-Xo(o,t,"left","right")),l=Math.max(0,e.outerHeight-Xo(o,t,"top","bottom")),c=a!==t.w,u=l!==t.h;return t.w=a,t.h=l,n.horizontal?{same:c,other:u}:{same:u,other:c}}function Zo(t,e){const n=e.maxPadding;function i(t){const i={left:0,top:0,right:0,bottom:0};return t.forEach((t=>{i[t]=Math.max(e[t],n[t])})),i}return i(t?["left","right"]:["top","bottom"])}function ta(t,e,n,i){const r=[];let s,o,a,l,c,u;for(s=0,o=t.length,c=0;s<o;++s){a=t[s],l=a.box,l.update(a.width||e.w,a.height||e.h,Zo(a.horizontal,e));const{same:o,other:h}=Go(e,n,a,i);c|=o&&r.length,u=u||h,l.fullSize||r.push(a)}return c&&ta(r,e,n,i)||u}function ea(t,e,n,i,r){t.top=n,t.left=e,t.right=e+i,t.bottom=n+r,t.width=i,t.height=r}function na(t,e,n,i){const r=n.padding;let{x:s,y:o}=e;for(const a of t){const t=a.box,l=i[a.stack]||{count:1,placed:0,weight:1},c=a.stackWeight/l.weight||1;if(a.horizontal){const i=e.w*c,s=l.size||t.height;Ki(l.start)&&(o=l.start),t.fullSize?ea(t,r.left,o,n.outerWidth-r.right-r.left,s):ea(t,e.left+l.placed,o,i,s),l.start=o,l.placed+=i,o=t.bottom}else{const i=e.h*c,o=l.size||t.width;Ki(l.start)&&(s=l.start),t.fullSize?ea(t,s,r.top,o,n.outerHeight-r.bottom-r.top):ea(t,s,e.top+l.placed,o,i),l.start=s,l.placed+=i,s=t.right}}e.x=s,e.y=o}var ia={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){const n=t.boxes?t.boxes.indexOf(e):-1;-1!==n&&t.boxes.splice(n,1)},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight},update(t,e,n,i){if(!t)return;const r=bs(t.options.layout.padding),s=Math.max(e-r.width,0),o=Math.max(n-r.height,0),a=function(t){const e=function(t){const e=[];let n,i,r,s,o,a;for(n=0,i=(t||[]).length;n<i;++n)r=t[n],({position:s,options:{stack:o,stackWeight:a=1}}=r),e.push({index:n,box:r,pos:s,horizontal:r.isHorizontal(),weight:r.weight,stack:o&&s+o,stackWeight:a});return e}(t),n=Ko(e.filter((t=>t.box.fullSize)),!0),i=Ko(qo(e,"left"),!0),r=Ko(qo(e,"right")),s=Ko(qo(e,"top"),!0),o=Ko(qo(e,"bottom")),a=Yo(e,"x"),l=Yo(e,"y");return{fullSize:n,leftAndTop:i.concat(s),rightAndBottom:r.concat(l).concat(o).concat(a),chartArea:qo(e,"chartArea"),vertical:i.concat(r).concat(l),horizontal:s.concat(o).concat(a)}}(t.boxes),l=a.vertical,c=a.horizontal;zi(t.boxes,(t=>{"function"===typeof t.beforeLayout&&t.beforeLayout()}));const u=l.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,h=Object.freeze({outerWidth:e,outerHeight:n,padding:r,availableWidth:s,availableHeight:o,vBoxMaxWidth:s/2/u,hBoxMaxHeight:o/2}),d=Object.assign({},r);Jo(d,bs(i));const f=Object.assign({maxPadding:d,w:s,h:o,x:r.left,y:r.top},r),p=Qo(l.concat(c),h);ta(a.fullSize,f,h,p),ta(l,f,h,p),ta(c,f,h,p)&&ta(l,f,h,p),function(t){const e=t.maxPadding;function n(n){const i=Math.max(e[n]-t[n],0);return t[n]+=i,i}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}(f),na(a.leftAndTop,f,h,p),f.x+=f.w,f.y+=f.h,na(a.rightAndBottom,f,h,p),t.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},zi(a.chartArea,(e=>{const n=e.box;Object.assign(n,t.chartArea),n.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})}))}};class ra{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,n){}removeEventListener(t,e,n){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,n,i){return e=Math.max(0,e||t.width),n=n||t.height,{width:e,height:Math.max(0,i?Math.floor(e/i):n)}}isAttached(t){return!0}updateConfig(t){}}class sa extends ra{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const oa="$chartjs",aa={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},la=t=>null===t||""===t;const ca=!!Gs&&{passive:!0};function ua(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,ca)}function ha(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function da(t,e,n){const i=t.canvas,r=new MutationObserver((t=>{let e=!1;for(const n of t)e=e||ha(n.addedNodes,i),e=e&&!ha(n.removedNodes,i);e&&n()}));return r.observe(document,{childList:!0,subtree:!0}),r}function fa(t,e,n){const i=t.canvas,r=new MutationObserver((t=>{let e=!1;for(const n of t)e=e||ha(n.removedNodes,i),e=e&&!ha(n.addedNodes,i);e&&n()}));return r.observe(document,{childList:!0,subtree:!0}),r}const pa=new Map;let ga=0;function ma(){const t=window.devicePixelRatio;t!==ga&&(ga=t,pa.forEach(((e,n)=>{n.currentDevicePixelRatio!==t&&e()})))}function ya(t,e,n){const i=t.canvas,r=i&&Ws(i);if(!r)return;const s=Tr(((t,e)=>{const i=r.clientWidth;n(t,e),i<r.clientWidth&&n()}),window),o=new ResizeObserver((t=>{const e=t[0],n=e.contentRect.width,i=e.contentRect.height;0===n&&0===i||s(n,i)}));return o.observe(r),function(t,e){pa.size||window.addEventListener("resize",ma),pa.set(t,e)}(t,s),o}function ba(t,e,n){n&&n.disconnect(),"resize"===e&&function(t){pa.delete(t),pa.size||window.removeEventListener("resize",ma)}(t)}function va(t,e,n){const i=t.canvas,r=Tr((e=>{null!==t.ctx&&n(function(t,e){const n=aa[t.type]||t.type,{x:i,y:r}=Ks(t,e);return{type:n,chart:e,native:t,x:void 0!==i?i:null,y:void 0!==r?r:null}}(e,t))}),t);return function(t,e,n){t&&t.addEventListener(e,n,ca)}(i,e,r),r}class xa extends ra{acquireContext(t,e){const n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(function(t,e){const n=t.style,i=t.getAttribute("height"),r=t.getAttribute("width");if(t[oa]={initial:{height:i,width:r,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",la(r)){const e=Zs(t,"width");void 0!==e&&(t.width=e)}if(la(i))if(""===t.style.height)t.height=t.width/(e||2);else{const e=Zs(t,"height");void 0!==e&&(t.height=e)}}(t,e),n):null}releaseContext(t){const e=t.canvas;if(!e[oa])return!1;const n=e[oa].initial;["height","width"].forEach((t=>{const i=n[t];Mi(i)?e.removeAttribute(t):e.setAttribute(t,i)}));const i=n.style||{};return Object.keys(i).forEach((t=>{e.style[t]=i[t]})),e.width=e.width,delete e[oa],!0}addEventListener(t,e,n){this.removeEventListener(t,e);const i=t.$proxies||(t.$proxies={}),r={attach:da,detach:fa,resize:ya}[e]||va;i[e]=r(t,e,n)}removeEventListener(t,e){const n=t.$proxies||(t.$proxies={}),i=n[e];if(!i)return;({attach:ba,detach:ba,resize:ba}[e]||ua)(t,e,i),n[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,n,i){return Xs(t,e,n,i)}isAttached(t){const e=t&&Ws(t);return!(!e||!e.isConnected)}}class _a{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:e,y:n}=this.getProps(["x","y"],t);return{x:e,y:n}}hasValue(){return cr(this.x)&&cr(this.y)}getProps(t,e){const n=this.$animations;if(!e||!n)return this;const i={};return t.forEach((t=>{i[t]=n[t]&&n[t].active()?n[t]._to:this[t]})),i}}function wa(t,e){const n=t.options.ticks,i=function(t){const e=t.options.offset,n=t._tickSize(),i=t._length/n+(e?0:1),r=t._maxLength/n;return Math.floor(Math.min(i,r))}(t),r=Math.min(n.maxTicksLimit||i,i),s=n.major.enabled?function(t){const e=[];let n,i;for(n=0,i=t.length;n<i;n++)t[n].major&&e.push(n);return e}(e):[],o=s.length,a=s[0],l=s[o-1],c=[];if(o>r)return function(t,e,n,i){let r,s=0,o=n[0];for(i=Math.ceil(i),r=0;r<t.length;r++)r===o&&(e.push(t[r]),s++,o=n[s*i])}(e,c,s,o/r),c;const u=function(t,e,n){const i=function(t){const e=t.length;let n,i;if(e<2)return!1;for(i=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==i)return!1;return i}(t),r=e.length/n;if(!i)return Math.max(r,1);const s=function(t){const e=[],n=Math.sqrt(t);let i;for(i=1;i<n;i++)t%i===0&&(e.push(i),e.push(t/i));return n===(0|n)&&e.push(n),e.sort(((t,e)=>t-e)).pop(),e}(i);for(let o=0,a=s.length-1;o<a;o++){const t=s[o];if(t>r)return t}return Math.max(r,1)}(s,e,r);if(o>0){let t,n;const i=o>1?Math.round((l-a)/(o-1)):null;for(ka(e,c,u,Mi(i)?0:a-i,a),t=0,n=o-1;t<n;t++)ka(e,c,u,s[t],s[t+1]);return ka(e,c,u,l,Mi(i)?e.length:l+i),c}return ka(e,c,u),c}function ka(t,e,n,i,r){const s=Li(i,0),o=Math.min(Li(r,t.length),t.length);let a,l,c,u=0;for(n=Math.ceil(n),r&&(a=r-i,n=a/Math.floor(a/n)),c=s;c<0;)u++,c=Math.round(s+u*n);for(l=Math.max(s,0);l<o;l++)l===c&&(e.push(t[l]),u++,c=Math.round(s+u*n))}const Sa=(t,e,n)=>"top"===e||"left"===e?t[e]+n:t[e]-n,Ea=(t,e)=>Math.min(e||t,t);function Ca(t,e){const n=[],i=t.length/e,r=t.length;let s=0;for(;s<r;s+=i)n.push(t[Math.floor(s)]);return n}function Oa(t,e,n){const i=t.ticks.length,r=Math.min(e,i-1),s=t._startPixel,o=t._endPixel,a=1e-6;let l,c=t.getPixelForTick(r);if(!(n&&(l=1===i?Math.max(c-s,o-c):0===e?(t.getPixelForTick(1)-c)/2:(c-t.getPixelForTick(r-1))/2,c+=r<e?l:-l,c<s-a||c>o+a)))return c}function Ta(t){return t.drawTicks?t.tickLength:0}function Ma(t,e){if(!t.display)return 0;const n=vs(t.font,e),i=bs(t.padding);return(Pi(t.text)?t.text.length:1)*n.lineHeight+i.height}function Pa(t,e,n){let i=Mr(t);return(n&&"right"!==e||!n&&"right"===e)&&(i=(t=>"left"===t?"right":"right"===t?"left":t)(i)),i}class Na extends _a{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:n,_suggestedMax:i}=this;return t=Ai(t,Number.POSITIVE_INFINITY),e=Ai(e,Number.NEGATIVE_INFINITY),n=Ai(n,Number.POSITIVE_INFINITY),i=Ai(i,Number.NEGATIVE_INFINITY),{min:Ai(t,n),max:Ai(e,i),minDefined:Ri(t),maxDefined:Ri(e)}}getMinMax(t){let e,{min:n,max:i,minDefined:r,maxDefined:s}=this.getUserBounds();if(r&&s)return{min:n,max:i};const o=this.getMatchingVisibleMetas();for(let a=0,l=o.length;a<l;++a)e=o[a].controller.getMinMax(this,t),r||(n=Math.min(n,e.min)),s||(i=Math.max(i,e.max));return n=s&&n>i?i:n,i=r&&n>i?n:i,{min:Ai(n,Ai(i,n)),max:Ai(i,Ai(n,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.chart.chartArea;return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){ji(this.options.beforeUpdate,[this])}update(t,e,n){const{beginAtZero:i,grace:r,ticks:s}=this.options,o=s.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,n){const{min:i,max:r}=t,s=Di(e,(r-i)/2),o=(t,e)=>n&&0===t?0:t+e;return{min:o(i,-Math.abs(s)),max:o(r,s)}}(this,r,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=o<this.ticks.length;this._convertTicksToLabels(a?Ca(this.ticks,o):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||"auto"===s.source)&&(this.ticks=wa(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),a&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t,e,n=this.options.reverse;this.isHorizontal()?(t=this.left,e=this.right):(t=this.top,e=this.bottom,n=!n),this._startPixel=t,this._endPixel=e,this._reversePixels=n,this._length=e-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){ji(this.options.afterUpdate,[this])}beforeSetDimensions(){ji(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){ji(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),ji(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){ji(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let n,i,r;for(n=0,i=t.length;n<i;n++)r=t[n],r.label=ji(e.callback,[r.value,n,t],this)}afterTickToLabelConversion(){ji(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){ji(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,n=Ea(this.ticks.length,t.ticks.maxTicksLimit),i=e.minRotation||0,r=e.maxRotation;let s,o,a,l=i;if(!this._isVisible()||!e.display||i>=r||n<=1||!this.isHorizontal())return void(this.labelRotation=i);const c=this._getLabelSizes(),u=c.widest.width,h=c.highest.height,d=vr(this.chart.width-u,0,this.maxWidth);s=t.offset?this.maxWidth/n:d/(n-1),u+6>s&&(s=d/(n-(t.offset?.5:1)),o=this.maxHeight-Ta(t.grid)-e.padding-Ma(t.title,this.chart.options.font),a=Math.sqrt(u*u+h*h),l=dr(Math.min(Math.asin(vr((c.highest.height+6)/s,-1,1)),Math.asin(vr(o/a,-1,1))-Math.asin(vr(h/a,-1,1)))),l=Math.max(i,Math.min(r,l))),this.labelRotation=l}afterCalculateLabelRotation(){ji(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){ji(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:n,title:i,grid:r}}=this,s=this._isVisible(),o=this.isHorizontal();if(s){const s=Ma(i,e.options.font);if(o?(t.width=this.maxWidth,t.height=Ta(r)+s):(t.height=this.maxHeight,t.width=Ta(r)+s),n.display&&this.ticks.length){const{first:e,last:i,widest:r,highest:s}=this._getLabelSizes(),a=2*n.padding,l=hr(this.labelRotation),c=Math.cos(l),u=Math.sin(l);if(o){const e=n.mirror?0:u*r.width+c*s.height;t.height=Math.min(this.maxHeight,t.height+e+a)}else{const e=n.mirror?0:c*r.width+u*s.height;t.width=Math.min(this.maxWidth,t.width+e+a)}this._calculatePadding(e,i,u,c)}}this._handleMargins(),o?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,n,i){const{ticks:{align:r,padding:s},position:o}=this.options,a=0!==this.labelRotation,l="top"!==o&&"x"===this.axis;if(this.isHorizontal()){const o=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let u=0,h=0;a?l?(u=i*t.width,h=n*e.height):(u=n*t.height,h=i*e.width):"start"===r?h=e.width:"end"===r?u=t.width:"inner"!==r&&(u=t.width/2,h=e.width/2),this.paddingLeft=Math.max((u-o+s)*this.width/(this.width-o),0),this.paddingRight=Math.max((h-c+s)*this.width/(this.width-c),0)}else{let n=e.height/2,i=t.height/2;"start"===r?(n=0,i=t.height):"end"===r&&(n=e.height,i=0),this.paddingTop=n+s,this.paddingBottom=i+s}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){ji(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,n;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,n=t.length;e<n;e++)Mi(t[e].label)&&(t.splice(e,1),n--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let n=this.ticks;e<n.length&&(n=Ca(n,e)),this._labelSizes=t=this._computeLabelSizes(n,n.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,n){const{ctx:i,_longestTextCache:r}=this,s=[],o=[],a=Math.floor(e/Ea(e,n));let l,c,u,h,d,f,p,g,m,y,b,v=0,x=0;for(l=0;l<e;l+=a){if(h=t[l].label,d=this._resolveTickFontOptions(l),i.font=f=d.string,p=r[f]=r[f]||{data:{},gc:[]},g=d.lineHeight,m=y=0,Mi(h)||Pi(h)){if(Pi(h))for(c=0,u=h.length;c<u;++c)b=h[c],Mi(b)||Pi(b)||(m=Gr(i,p.data,p.gc,m,b),y+=g)}else m=Gr(i,p.data,p.gc,m,h),y=g;s.push(m),o.push(y),v=Math.max(m,v),x=Math.max(y,x)}!function(t,e){zi(t,(t=>{const n=t.gc,i=n.length/2;let r;if(i>e){for(r=0;r<i;++r)delete t.data[n[r]];n.splice(0,i)}}))}(r,e);const _=s.indexOf(v),w=o.indexOf(x),k=t=>({width:s[t]||0,height:o[t]||0});return{first:k(0),last:k(e-1),widest:k(_),highest:k(w),widths:s,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return function(t){return vr(t,-32768,32767)}(this._alignToPixels?Zr(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const n=e[t];return n.$context||(n.$context=function(t,e,n){return _s(t,{tick:n,index:e,type:"tick"})}(this.getContext(),t,n))}return this.$context||(this.$context=_s(this.chart.getContext(),{scale:this,type:"scale"}))}_tickSize(){const t=this.options.ticks,e=hr(this.labelRotation),n=Math.abs(Math.cos(e)),i=Math.abs(Math.sin(e)),r=this._getLabelSizes(),s=t.autoSkipPadding||0,o=r?r.widest.width+s:0,a=r?r.highest.height+s:0;return this.isHorizontal()?a*n>o*i?o/n:a/i:a*i<o*n?a/n:o/i}_isVisible(){const t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,n=this.chart,i=this.options,{grid:r,position:s,border:o}=i,a=r.offset,l=this.isHorizontal(),c=this.ticks.length+(a?1:0),u=Ta(r),h=[],d=o.setContext(this.getContext()),f=d.display?d.width:0,p=f/2,g=function(t){return Zr(n,t,f)};let m,y,b,v,x,_,w,k,S,E,C,O;if("top"===s)m=g(this.bottom),_=this.bottom-u,k=m-p,E=g(t.top)+p,O=t.bottom;else if("bottom"===s)m=g(this.top),E=t.top,O=g(t.bottom)-p,_=m+p,k=this.top+u;else if("left"===s)m=g(this.right),x=this.right-u,w=m-p,S=g(t.left)+p,C=t.right;else if("right"===s)m=g(this.left),S=t.left,C=g(t.right)-p,x=m+p,w=this.left+u;else if("x"===e){if("center"===s)m=g((t.top+t.bottom)/2+.5);else if(Ni(s)){const t=Object.keys(s)[0],e=s[t];m=g(this.chart.scales[t].getPixelForValue(e))}E=t.top,O=t.bottom,_=m+p,k=_+u}else if("y"===e){if("center"===s)m=g((t.left+t.right)/2);else if(Ni(s)){const t=Object.keys(s)[0],e=s[t];m=g(this.chart.scales[t].getPixelForValue(e))}x=m-p,w=x-u,S=t.left,C=t.right}const T=Li(i.ticks.maxTicksLimit,c),M=Math.max(1,Math.ceil(c/T));for(y=0;y<c;y+=M){const t=this.getContext(y),e=r.setContext(t),i=o.setContext(t),s=e.lineWidth,c=e.color,u=i.dash||[],d=i.dashOffset,f=e.tickWidth,p=e.tickColor,g=e.tickBorderDash||[],m=e.tickBorderDashOffset;b=Oa(this,y,a),void 0!==b&&(v=Zr(n,b,s),l?x=w=S=C=v:_=k=E=O=v,h.push({tx1:x,ty1:_,tx2:w,ty2:k,x1:S,y1:E,x2:C,y2:O,width:s,color:c,borderDash:u,borderDashOffset:d,tickWidth:f,tickColor:p,tickBorderDash:g,tickBorderDashOffset:m}))}return this._ticksLength=c,this._borderValue=m,h}_computeLabelItems(t){const e=this.axis,n=this.options,{position:i,ticks:r}=n,s=this.isHorizontal(),o=this.ticks,{align:a,crossAlign:l,padding:c,mirror:u}=r,h=Ta(n.grid),d=h+c,f=u?-c:d,p=-hr(this.labelRotation),g=[];let m,y,b,v,x,_,w,k,S,E,C,O,T="middle";if("top"===i)_=this.bottom-f,w=this._getXAxisLabelAlignment();else if("bottom"===i)_=this.top+f,w=this._getXAxisLabelAlignment();else if("left"===i){const t=this._getYAxisLabelAlignment(h);w=t.textAlign,x=t.x}else if("right"===i){const t=this._getYAxisLabelAlignment(h);w=t.textAlign,x=t.x}else if("x"===e){if("center"===i)_=(t.top+t.bottom)/2+d;else if(Ni(i)){const t=Object.keys(i)[0],e=i[t];_=this.chart.scales[t].getPixelForValue(e)+d}w=this._getXAxisLabelAlignment()}else if("y"===e){if("center"===i)x=(t.left+t.right)/2-d;else if(Ni(i)){const t=Object.keys(i)[0],e=i[t];x=this.chart.scales[t].getPixelForValue(e)}w=this._getYAxisLabelAlignment(h).textAlign}"y"===e&&("start"===a?T="top":"end"===a&&(T="bottom"));const M=this._getLabelSizes();for(m=0,y=o.length;m<y;++m){b=o[m],v=b.label;const t=r.setContext(this.getContext(m));k=this.getPixelForTick(m)+r.labelOffset,S=this._resolveTickFontOptions(m),E=S.lineHeight,C=Pi(v)?v.length:1;const e=C/2,n=t.color,a=t.textStrokeColor,c=t.textStrokeWidth;let h,d=w;if(s?(x=k,"inner"===w&&(d=m===y-1?this.options.reverse?"left":"right":0===m?this.options.reverse?"right":"left":"center"),O="top"===i?"near"===l||0!==p?-C*E+E/2:"center"===l?-M.highest.height/2-e*E+E:-M.highest.height+E/2:"near"===l||0!==p?E/2:"center"===l?M.highest.height/2-e*E:M.highest.height-C*E,u&&(O*=-1),0===p||t.showLabelBackdrop||(x+=E/2*Math.sin(p))):(_=k,O=(1-C)*E/2),t.showLabelBackdrop){const e=bs(t.backdropPadding),n=M.heights[m],i=M.widths[m];let r=O-e.top,s=0-e.left;switch(T){case"middle":r-=n/2;break;case"bottom":r-=n}switch(w){case"center":s-=i/2;break;case"right":s-=i;break;case"inner":m===y-1?s-=i:m>0&&(s-=i/2)}h={left:s,top:r,width:i+e.width,height:n+e.height,color:t.backdropColor}}g.push({label:v,font:S,textOffset:O,options:{rotation:p,color:n,strokeColor:a,strokeWidth:c,textAlign:d,textBaseline:T,translation:[x,_],backdrop:h}})}return g}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-hr(this.labelRotation))return"top"===t?"left":"right";let n="center";return"start"===e.align?n="left":"end"===e.align?n="right":"inner"===e.align&&(n="inner"),n}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:n,mirror:i,padding:r}}=this.options,s=t+r,o=this._getLabelSizes().widest.width;let a,l;return"left"===e?i?(l=this.right+r,"near"===n?a="left":"center"===n?(a="center",l+=o/2):(a="right",l+=o)):(l=this.right-s,"near"===n?a="right":"center"===n?(a="center",l-=o/2):(a="left",l=this.left)):"right"===e?i?(l=this.left+r,"near"===n?a="right":"center"===n?(a="center",l-=o/2):(a="left",l-=o)):(l=this.left+s,"near"===n?a="left":"center"===n?(a="center",l+=o/2):(a="right",l=this.right)):a="right",{textAlign:a,x:l}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:n,top:i,width:r,height:s}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(n,i,r,s),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const n=this.ticks.findIndex((e=>e.value===t));if(n>=0){return e.setContext(this.getContext(n)).lineWidth}return 0}drawGrid(t){const e=this.options.grid,n=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let r,s;const o=(t,e,i)=>{i.width&&i.color&&(n.save(),n.lineWidth=i.width,n.strokeStyle=i.color,n.setLineDash(i.borderDash||[]),n.lineDashOffset=i.borderDashOffset,n.beginPath(),n.moveTo(t.x,t.y),n.lineTo(e.x,e.y),n.stroke(),n.restore())};if(e.display)for(r=0,s=i.length;r<s;++r){const t=i[r];e.drawOnChartArea&&o({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),e.drawTicks&&o({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{border:n,grid:i}}=this,r=n.setContext(this.getContext()),s=n.display?r.width:0;if(!s)return;const o=i.setContext(this.getContext(0)).lineWidth,a=this._borderValue;let l,c,u,h;this.isHorizontal()?(l=Zr(t,this.left,s)-s/2,c=Zr(t,this.right,o)+o/2,u=h=a):(u=Zr(t,this.top,s)-s/2,h=Zr(t,this.bottom,o)+o/2,l=c=a),e.save(),e.lineWidth=r.width,e.strokeStyle=r.color,e.beginPath(),e.moveTo(l,u),e.lineTo(c,h),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const e=this.ctx,n=this._computeLabelArea();n&&rs(e,n);const i=this.getLabelItems(t);for(const r of i){const t=r.options,n=r.font;us(e,r.label,0,r.textOffset,n,t)}n&&ss(e)}drawTitle(){const{ctx:t,options:{position:e,title:n,reverse:i}}=this;if(!n.display)return;const r=vs(n.font),s=bs(n.padding),o=n.align;let a=r.lineHeight/2;"bottom"===e||"center"===e||Ni(e)?(a+=s.bottom,Pi(n.text)&&(a+=r.lineHeight*(n.text.length-1))):a+=s.top;const{titleX:l,titleY:c,maxWidth:u,rotation:h}=function(t,e,n,i){const{top:r,left:s,bottom:o,right:a,chart:l}=t,{chartArea:c,scales:u}=l;let h,d,f,p=0;const g=o-r,m=a-s;if(t.isHorizontal()){if(d=Pr(i,s,a),Ni(n)){const t=Object.keys(n)[0],i=n[t];f=u[t].getPixelForValue(i)+g-e}else f="center"===n?(c.bottom+c.top)/2+g-e:Sa(t,n,e);h=a-s}else{if(Ni(n)){const t=Object.keys(n)[0],i=n[t];d=u[t].getPixelForValue(i)-m+e}else d="center"===n?(c.left+c.right)/2-m+e:Sa(t,n,e);f=Pr(i,o,r),p="left"===n?-nr:nr}return{titleX:d,titleY:f,maxWidth:h,rotation:p}}(this,a,e,o);us(t,n.text,0,0,r,{color:n.color,maxWidth:u,rotation:h,textAlign:Pa(o,e,i),textBaseline:"middle",translation:[l,c]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,n=Li(t.grid&&t.grid.z,-1),i=Li(t.border&&t.border.z,0);return this._isVisible()&&this.draw===Na.prototype.draw?[{z:n,draw:t=>{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",i=[];let r,s;for(r=0,s=e.length;r<s;++r){const s=e[r];s[n]!==this.id||t&&s.type!==t||i.push(s)}return i}_resolveTickFontOptions(t){return vs(this.options.ticks.setContext(this.getContext(t)).font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Ra{constructor(t,e,n){this.type=t,this.scope=e,this.override=n,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let n;(function(t){return"id"in t&&"defaults"in t})(e)&&(n=this.register(e));const i=this.items,r=t.id,s=this.scope+"."+r;if(!r)throw new Error("class does not have id: "+t);return r in i||(i[r]=t,function(t,e,n){const i=Hi(Object.create(null),[n?Jr.get(n):{},Jr.get(e),t.defaults]);Jr.set(e,i),t.defaultRoutes&&function(t,e){Object.keys(e).forEach((n=>{const i=n.split("."),r=i.pop(),s=[t].concat(i).join("."),o=e[n].split("."),a=o.pop(),l=o.join(".");Jr.route(s,r,l,a)}))}(e,t.defaultRoutes);t.descriptors&&Jr.describe(e,t.descriptors)}(t,s,n),this.override&&Jr.override(t.id,t.overrides)),s}get(t){return this.items[t]}unregister(t){const e=this.items,n=t.id,i=this.scope;n in e&&delete e[n],i&&n in Jr[i]&&(delete Jr[i][n],this.override&&delete qr[n])}}class Aa{constructor(){this.controllers=new Ra(Ao,"datasets",!0),this.elements=new Ra(_a,"elements"),this.plugins=new Ra(Object,"plugins"),this.scales=new Ra(Na,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this._each("register",e)}remove(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this._each("unregister",e)}addControllers(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this._each("register",e,this.controllers)}addElements(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this._each("register",e,this.elements)}addPlugins(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this._each("register",e,this.plugins)}addScales(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this._each("register",e,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this._each("unregister",e,this.controllers)}removeElements(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this._each("unregister",e,this.elements)}removePlugins(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this._each("unregister",e,this.plugins)}removeScales(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this._each("unregister",e,this.scales)}_each(t,e,n){[...e].forEach((e=>{const i=n||this._getRegistryForType(e);n||i.isForType(e)||i===this.plugins&&e.id?this._exec(t,i,e):zi(e,(e=>{const i=n||this._getRegistryForType(e);this._exec(t,i,e)}))}))}_exec(t,e,n){const i=Yi(t);ji(n["before"+i],[],n),e[t](n),ji(n["after"+i],[],n)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const n=this._typedRegistries[e];if(n.isForType(t))return n}return this.plugins}_get(t,e,n){const i=e.get(t);if(void 0===i)throw new Error('"'+t+'" is not a registered '+n+".");return i}}var La=new Aa;class Da{constructor(){this._init=[]}notify(t,e,n,i){"beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const r=i?this._descriptors(t).filter(i):this._descriptors(t),s=this._notify(r,t,e,n);return"afterDestroy"===e&&(this._notify(r,t,"stop"),this._notify(this._init,t,"uninstall")),s}_notify(t,e,n,i){i=i||{};for(const r of t){const t=r.plugin;if(!1===ji(t[n],[e,i,r.options],t)&&i.cancelable)return!1}return!0}invalidate(){Mi(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const n=t&&t.config,i=Li(n.options&&n.options.plugins,{}),r=function(t){const e={},n=[],i=Object.keys(La.plugins.items);for(let s=0;s<i.length;s++)n.push(La.getPlugin(i[s]));const r=t.plugins||[];for(let s=0;s<r.length;s++){const t=r[s];-1===n.indexOf(t)&&(n.push(t),e[t.id]=!0)}return{plugins:n,localIds:e}}(n);return!1!==i||e?function(t,e,n,i){let{plugins:r,localIds:s}=e;const o=[],a=t.getContext();for(const l of r){const e=l.id,r=ja(n[e],i);null!==r&&o.push({plugin:l,options:za(t.config,{plugin:l,local:s[e]},r,a)})}return o}(t,r,i,e):[]}_notifyStateChanges(t){const e=this._oldCache||[],n=this._cache,i=(t,e)=>t.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(i(e,n),t,"stop"),this._notify(i(n,e),t,"start")}}function ja(t,e){return e||!1!==t?!0===t?{}:t:null}function za(t,e,n,i){let{plugin:r,local:s}=e;const o=t.pluginScopeKeys(r),a=t.getOptionScopes(n,o);return s&&r.defaults&&a.push(r.defaults),t.createResolver(a,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Ia(t,e){const n=Jr.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function Fa(t){if("x"===t||"y"===t||"r"===t)return t}function Ba(t){if(Fa(t))return t;for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];for(const s of n){const e=s.axis||("top"===(r=s.position)||"bottom"===r?"x":"left"===r||"right"===r?"y":void 0)||t.length>1&&Fa(t[0].toLowerCase());if(e)return e}var r;throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function Ua(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function Ha(t,e){const n=qr[t.type]||{scales:{}},i=e.scales||{},r=Ia(t.type,e),s=Object.create(null);return Object.keys(i).forEach((e=>{const o=i[e];if(!Ni(o))return console.error(`Invalid scale configuration for scale: ${e}`);if(o._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${e}`);const a=Ba(e,o,function(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter((e=>e.xAxisID===t||e.yAxisID===t));if(n.length)return Ua(t,"x",n[0])||Ua(t,"y",n[0])}return{}}(e,t),Jr.scales[o.type]),l=function(t,e){return t===e?"_index_":"_value_"}(a,r),c=n.scales||{};s[e]=Wi(Object.create(null),[{axis:a},o,c[a],c[l]])})),t.data.datasets.forEach((n=>{const r=n.type||t.type,o=n.indexAxis||Ia(r,e),a=(qr[r]||{}).scales||{};Object.keys(a).forEach((t=>{const e=function(t,e){let n=t;return"_index_"===t?n=e:"_value_"===t&&(n="x"===e?"y":"x"),n}(t,o),r=n[e+"AxisID"]||e;s[r]=s[r]||Object.create(null),Wi(s[r],[{axis:e},i[r],a[t]])}))})),Object.keys(s).forEach((t=>{const e=s[t];Wi(e,[Jr.scales[e.type],Jr.scale])})),s}function Wa(t){const e=t.options||(t.options={});e.plugins=Li(e.plugins,{}),e.scales=Ha(t,e)}function Va(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const $a=new Map,qa=new Set;function Ya(t,e){let n=$a.get(t);return n||(n=e(),$a.set(t,n),qa.add(n)),n}const Ka=(t,e,n)=>{const i=qi(e,n);void 0!==i&&t.add(i)};class Qa{constructor(t){this._config=function(t){return(t=t||{}).data=Va(t.data),Wa(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Va(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),Wa(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Ya(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return Ya(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return Ya(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return Ya(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const n=this._scopeCache;let i=n.get(t);return i&&!e||(i=new Map,n.set(t,i)),i}getOptionScopes(t,e,n){const{options:i,type:r}=this,s=this._cachedScopes(t,n),o=s.get(e);if(o)return o;const a=new Set;e.forEach((e=>{t&&(a.add(t),e.forEach((e=>Ka(a,t,e)))),e.forEach((t=>Ka(a,i,t))),e.forEach((t=>Ka(a,qr[r]||{},t))),e.forEach((t=>Ka(a,Jr,t))),e.forEach((t=>Ka(a,Yr,t)))}));const l=Array.from(a);return 0===l.length&&l.push(Object.create(null)),qa.has(e)&&s.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,qr[e]||{},Jr.datasets[e]||{},{type:e},Jr,Yr]}resolveNamedOptions(t,e,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[""];const r={$shared:!0},{resolver:s,subPrefixes:o}=Xa(this._resolverCache,t,i);let a=s;if(function(t,e){const{isScriptable:n,isIndexable:i}=Ss(t);for(const r of e){const e=n(r),s=i(r),o=(s||e)&&t[r];if(e&&(Qi(o)||Ja(o))||s&&Pi(o))return!0}return!1}(s,e)){r.$shared=!1;a=ks(s,n=Qi(n)?n():n,this.createResolver(t,n,o))}for(const l of e)r[l]=a[l];return r}createResolver(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[""],i=arguments.length>3?arguments[3]:void 0;const{resolver:r}=Xa(this._resolverCache,t,n);return Ni(e)?ks(r,e,void 0,i):r}}function Xa(t,e,n){let i=t.get(e);i||(i=new Map,t.set(e,i));const r=n.join();let s=i.get(r);if(!s){s={resolver:ws(e,n),subPrefixes:n.filter((t=>!t.toLowerCase().includes("hover")))},i.set(r,s)}return s}const Ja=t=>Ni(t)&&Object.getOwnPropertyNames(t).some((e=>Qi(t[e])));const Ga=["top","bottom","left","right","chartArea"];function Za(t,e){return"top"===t||"bottom"===t||-1===Ga.indexOf(t)&&"x"===e}function tl(t,e){return function(n,i){return n[t]===i[t]?n[e]-i[e]:n[t]-i[t]}}function el(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),ji(n&&n.onComplete,[t],e)}function nl(t){const e=t.chart,n=e.options.animation;ji(n&&n.onProgress,[t],e)}function il(t){return Hs()&&"string"===typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const rl={},sl=t=>{const e=il(t);return Object.values(rl).filter((t=>t.canvas===e)).pop()};function ol(t,e,n){const i=Object.keys(t);for(const r of i){const i=+r;if(i>=e){const s=t[r];delete t[r],(n>0||i>e)&&(t[i+n]=s)}}}class al{static defaults=(()=>Jr)();static instances=(()=>rl)();static overrides=(()=>qr)();static registry=(()=>La)();static version="4.4.9";static getChart=(()=>sl)();static register(){La.add(...arguments),ll()}static unregister(){La.remove(...arguments),ll()}constructor(t,e){const n=this.config=new Qa(e),i=il(t),r=sl(i);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas with ID '"+r.canvas.id+"' can be reused.");const s=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||function(t){return!Hs()||"undefined"!==typeof OffscreenCanvas&&t instanceof OffscreenCanvas?sa:xa}(i)),this.platform.updateConfig(n);const o=this.platform.acquireContext(i,s.aspectRatio),a=o&&o.canvas,l=a&&a.height,c=a&&a.width;this.id=Ti(),this.ctx=o,this.canvas=a,this.width=c,this.height=l,this._options=s,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Da,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let n;return function(){for(var i=arguments.length,r=new Array(i),s=0;s<i;s++)r[s]=arguments[s];return e?(clearTimeout(n),n=setTimeout(t,e,r)):t.apply(this,r),e}}((t=>this.update(t)),s.resizeDelay||0),this._dataChanges=[],rl[this.id]=this,o&&a?(yo.listen(this,"complete",el),yo.listen(this,"progress",nl),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:n,height:i,_aspectRatio:r}=this;return Mi(t)?e&&r?r:i?n/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return La}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Js(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return ts(this.canvas,this.ctx),this}stop(){return yo.stop(this),this}resize(t,e){yo.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const n=this.options,i=this.canvas,r=n.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(i,t,e,r),o=n.devicePixelRatio||this.platform.getDevicePixelRatio(),a=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,Js(this,o,!0)&&(this.notifyPlugins("resize",{size:s}),ji(n.onResize,[this,s],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){zi(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,n=this.scales,i=Object.keys(n).reduce(((t,e)=>(t[e]=!1,t)),{});let r=[];e&&(r=r.concat(Object.keys(e).map((t=>{const n=e[t],i=Ba(t,n),r="r"===i,s="x"===i;return{options:n,dposition:r?"chartArea":s?"bottom":"left",dtype:r?"radialLinear":s?"category":"linear"}})))),zi(r,(e=>{const r=e.options,s=r.id,o=Ba(s,r),a=Li(r.type,e.dtype);void 0!==r.position&&Za(r.position,o)===Za(e.dposition)||(r.position=e.dposition),i[s]=!0;let l=null;if(s in n&&n[s].type===a)l=n[s];else{l=new(La.getScale(a))({id:s,type:a,ctx:this.ctx,chart:this}),n[l.id]=l}l.init(r,t)})),zi(i,((t,e)=>{t||delete n[e]})),zi(n,(t=>{ia.configure(this,t,t.options),ia.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,n=t.length;if(t.sort(((t,e)=>t.index-e.index)),n>e){for(let t=e;t<n;++t)this._destroyDatasetMeta(t);t.splice(e,n-e)}this._sortedMetasets=t.slice(0).sort(tl("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach(((t,n)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(n)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let n,i;for(this._removeUnreferencedMetasets(),n=0,i=e.length;n<i;n++){const i=e[n];let r=this.getDatasetMeta(n);const s=i.type||this.config.type;if(r.type&&r.type!==s&&(this._destroyDatasetMeta(n),r=this.getDatasetMeta(n)),r.type=s,r.indexAxis=i.indexAxis||Ia(s,this.options),r.order=i.order||0,r.index=n,r.label=""+i.label,r.visible=this.isDatasetVisible(n),r.controller)r.controller.updateIndex(n),r.controller.linkScales();else{const e=La.getController(s),{datasetElementType:i,dataElementType:o}=Jr.datasets[s];Object.assign(e,{dataElementType:La.getElement(o),datasetElementType:i&&La.getElement(i)}),r.controller=new e(this,n),t.push(r.controller)}}return this._updateMetasets(),t}_resetElements(){zi(this.data.datasets,((t,e)=>{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const n=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let l=0,c=this.data.datasets.length;l<c;l++){const{controller:t}=this.getDatasetMeta(l),e=!i&&-1===r.indexOf(t);t.buildOrUpdateElements(e),s=Math.max(+t.getMaxOverflow(),s)}s=this._minPadding=n.layout.autoPadding?s:0,this._updateLayout(s),i||zi(r,(t=>{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(tl("z","_idx"));const{_active:o,_lastEvent:a}=this;a?this._eventHandler(a,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){zi(this.scales,(t=>{ia.removeBox(this,t)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),n=new Set(t.events);Xi(e,n)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:n,start:i,count:r}of e){ol(t,i,"_removeElements"===n?-r:r)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,n=e=>new Set(t.filter((t=>t[0]===e)).map(((t,e)=>e+","+t.splice(1).join(",")))),i=n(0);for(let r=1;r<e;r++)if(!Xi(i,n(r)))return;return Array.from(i).map((t=>t.split(","))).map((t=>({method:t[1],start:+t[2],count:+t[3]})))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;ia.update(this,this.width,this.height,t);const e=this.chartArea,n=e.width<=0||e.height<=0;this._layers=[],zi(this.boxes,(t=>{n&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,e)=>{t._idx=e})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t<e;++t)this.getDatasetMeta(t).controller.configure();for(let e=0,n=this.data.datasets.length;e<n;++e)this._updateDataset(e,Qi(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const n=this.getDatasetMeta(t),i={meta:n,index:t,mode:e,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",i)&&(n.controller._update(e),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(yo.has(this)?this.attached&&!yo.running(this)&&yo.start(this):(this.draw(),el({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:t,height:e}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(t,e)}if(this.clear(),this.width<=0||this.height<=0)return;if(!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,n=[];let i,r;for(i=0,r=e.length;i<r;++i){const r=e[i];t&&!r.visible||n.push(r)}return n}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,n={meta:t,index:t.index,cancelable:!0},i=go(this,t);!1!==this.notifyPlugins("beforeDatasetDraw",n)&&(i&&rs(e,i),t.controller.draw(),i&&ss(e),n.cancelable=!1,this.notifyPlugins("afterDatasetDraw",n))}isPointInArea(t){return is(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,n,i){const r=Vo.modes[e];return"function"===typeof r?r(this,t,n,i):[]}getDatasetMeta(t){const e=this.data.datasets[t],n=this._metasets;let i=n.filter((t=>t&&t._dataset===e)).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},n.push(i)),i}getContext(){return this.$context||(this.$context=_s(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const n=this.getDatasetMeta(t);return"boolean"===typeof n.hidden?!n.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,n){const i=n?"show":"hide",r=this.getDatasetMeta(t),s=r.controller._resolveAnimations(void 0,i);Ki(e)?(r.data[e].hidden=!n,this.update()):(this.setDatasetVisibility(t,n),s.update(r,{visible:n}),this.update((e=>e.datasetIndex===t?i:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),yo.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),ts(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete rl[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(){return this.canvas.toDataURL(...arguments)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,n=(n,i)=>{e.addEventListener(this,n,i),t[n]=i},i=(t,e,n)=>{t.offsetX=e,t.offsetY=n,this._eventHandler(t)};zi(this.options.events,(t=>n(t,i)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,n=(n,i)=>{e.addEventListener(this,n,i),t[n]=i},i=(n,i)=>{t[n]&&(e.removeEventListener(this,n,i),delete t[n])},r=(t,e)=>{this.canvas&&this.resize(t,e)};let s;const o=()=>{i("attach",o),this.attached=!0,this.resize(),n("resize",r),n("detach",s)};s=()=>{this.attached=!1,i("resize",r),this._stop(),this._resize(0,0),n("attach",o)},e.isAttached(this.canvas)?o():s()}unbindEvents(){zi(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},zi(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,n){const i=n?"set":"remove";let r,s,o,a;for("dataset"===e&&(r=this.getDatasetMeta(t[0].datasetIndex),r.controller["_"+i+"DatasetHoverStyle"]()),o=0,a=t.length;o<a;++o){s=t[o];const e=s&&this.getDatasetMeta(s.datasetIndex).controller;e&&e[i+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],n=t.map((t=>{let{datasetIndex:e,index:n}=t;const i=this.getDatasetMeta(e);if(!i)throw new Error("No dataset found at index "+e);return{datasetIndex:e,element:i.data[n],index:n}}));!Ii(n,e)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,e))}notifyPlugins(t,e,n){return this._plugins.notify(this,t,e,n)}isPluginEnabled(t){return 1===this._plugins._cache.filter((e=>e.plugin.id===t)).length}_updateHoverStyles(t,e,n){const i=this.options.hover,r=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),s=r(e,t),o=n?t:r(t,e);s.length&&this.updateHoverStyle(s,i.mode,!1),o.length&&i.mode&&this.updateHoverStyle(o,i.mode,!0)}_eventHandler(t,e){const n={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},i=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",n,i))return;const r=this._handleEvent(t,e,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,i),(r||n.changed)&&this.render(),this}_handleEvent(t,e,n){const{_active:i=[],options:r}=this,s=e,o=this._getActiveElements(t,i,n,s),a=function(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}(t),l=function(t,e,n,i){return n&&"mouseout"!==t.type?i?e:t:null}(t,this._lastEvent,n,a);n&&(this._lastEvent=null,ji(r.onHover,[t,o,this],this),a&&ji(r.onClick,[t,o,this],this));const c=!Ii(o,i);return(c||e)&&(this._active=o,this._updateHoverStyles(o,i,e)),this._lastEvent=l,c}_getActiveElements(t,e,n,i){if("mouseout"===t.type)return[];if(!n)return e;const r=this.options.hover;return this.getElementsAtEventForMode(t,r.mode,r,i)}}function ll(){return zi(al.instances,(t=>t._plugins.invalidate()))}function cl(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;t.lineCap=Li(n.borderCapStyle,e.borderCapStyle),t.setLineDash(Li(n.borderDash,e.borderDash)),t.lineDashOffset=Li(n.borderDashOffset,e.borderDashOffset),t.lineJoin=Li(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=Li(n.borderWidth,e.borderWidth),t.strokeStyle=Li(n.borderColor,e.borderColor)}function ul(t,e,n){t.lineTo(n.x,n.y)}function hl(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=t.length,{start:r=0,end:s=i-1}=n,{start:o,end:a}=e,l=Math.max(r,o),c=Math.min(s,a),u=r<o&&s<o||r>a&&s>a;return{count:i,start:l,loop:e.loop,ilen:c<l&&!u?i+c-l:c-l}}function dl(t,e,n,i){const{points:r,options:s}=e,{count:o,start:a,loop:l,ilen:c}=hl(r,n,i),u=function(t){return t.stepped?os:t.tension||"monotone"===t.cubicInterpolationMode?as:ul}(s);let h,d,f,{move:p=!0,reverse:g}=i||{};for(h=0;h<=c;++h)d=r[(a+(g?c-h:h))%o],d.skip||(p?(t.moveTo(d.x,d.y),p=!1):u(t,f,d,g,s.stepped),f=d);return l&&(d=r[(a+(g?c:0))%o],u(t,f,d,g,s.stepped)),!!l}function fl(t,e,n,i){const r=e.points,{count:s,start:o,ilen:a}=hl(r,n,i),{move:l=!0,reverse:c}=i||{};let u,h,d,f,p,g,m=0,y=0;const b=t=>(o+(c?a-t:t))%s,v=()=>{f!==p&&(t.lineTo(m,p),t.lineTo(m,f),t.lineTo(m,g))};for(l&&(h=r[b(0)],t.moveTo(h.x,h.y)),u=0;u<=a;++u){if(h=r[b(u)],h.skip)continue;const e=h.x,n=h.y,i=0|e;i===d?(n<f?f=n:n>p&&(p=n),m=(y*m+e)/++y):(v(),t.lineTo(e,n),d=i,y=0,f=p=n),g=n}v()}function pl(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&"monotone"!==e.cubicInterpolationMode&&!e.stepped&&!n?fl:dl}const gl="function"===typeof Path2D;function ml(t,e,n,i){gl&&!e.options.segment?function(t,e,n,i){let r=e._path;r||(r=e._path=new Path2D,e.path(r,n,i)&&r.closePath()),cl(t,e.options),t.stroke(r)}(t,e,n,i):function(t,e,n,i){const{segments:r,options:s}=e,o=pl(e);for(const a of r)cl(t,s,a.style),t.beginPath(),o(t,e,a,{start:n,end:n+i-1})&&t.closePath(),t.stroke()}(t,e,n,i)}class yl extends _a{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const n=this.options;if((n.tension||"monotone"===n.cubicInterpolationMode)&&!n.stepped&&!this._pointsUpdated){const i=n.spanGaps?this._loop:this._fullLoop;Us(this._points,n,t,i,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const n=t.points,i=t.options.spanGaps,r=n.length;if(!r)return[];const s=!!t._loop,{start:o,end:a}=function(t,e,n,i){let r=0,s=e-1;if(n&&!i)for(;r<e&&!t[r].skip;)r++;for(;r<e&&t[r].skip;)r++;for(r%=e,n&&(s+=r);s>r&&t[s%e].skip;)s--;return s%=e,{start:r,end:s}}(n,r,s,i);return uo(t,!0===i?[{start:o,end:a,loop:s}]:function(t,e,n,i){const r=t.length,s=[];let o,a=e,l=t[e];for(o=e+1;o<=n;++o){const n=t[o%r];n.skip||n.stop?l.skip||(i=!1,s.push({start:e%r,end:(o-1)%r,loop:i}),e=a=n.stop?o:null):(a=o,l.skip&&(e=o)),l=n}return null!==a&&s.push({start:e%r,end:a%r,loop:i}),s}(n,o,a<o?a+r:a,!!t._fullLoop&&0===o&&a===r-1),n,e)}(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,n=t.length;return n&&e[t[n-1].end]}interpolate(t,e){const n=this.options,i=t[e],r=this.points,s=co(this,{property:e,start:i,end:i});if(!s.length)return;const o=[],a=function(t){return t.stepped?eo:t.tension||"monotone"===t.cubicInterpolationMode?no:to}(n);let l,c;for(l=0,c=s.length;l<c;++l){const{start:c,end:u}=s[l],h=r[c],d=r[u];if(h===d){o.push(h);continue}const f=a(h,d,Math.abs((i-h[e])/(d[e]-h[e])),n.stepped);f[e]=t[e],o.push(f)}return 1===o.length?o[0]:o}pathSegment(t,e,n){return pl(this)(t,this,e,n)}path(t,e,n){const i=this.segments,r=pl(this);let s=this._loop;e=e||0,n=n||this.points.length-e;for(const o of i)s&=r(t,this,o,{start:e,end:e+n-1});return!!s}draw(t,e,n,i){const r=this.options||{};(this.points||[]).length&&r.borderWidth&&(t.save(),ml(t,this,n,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function bl(t,e,n,i){const r=t.options,{[n]:s}=t.getProps([n],i);return Math.abs(e-s)<r.radius+r.hitRadius}class vl extends _a{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,n){const i=this.options,{x:r,y:s}=this.getProps(["x","y"],n);return Math.pow(t-r,2)+Math.pow(e-s,2)<Math.pow(i.hitRadius+i.radius,2)}inXRange(t,e){return bl(this,t,"x",e)}inYRange(t,e){return bl(this,t,"y",e)}getCenterPoint(t){const{x:e,y:n}=this.getProps(["x","y"],t);return{x:e,y:n}}size(t){let e=(t=t||this.options||{}).radius||0;e=Math.max(e,e&&t.hoverRadius||0);return 2*(e+(e&&t.borderWidth||0))}draw(t,e){const n=this.options;this.skip||n.radius<.1||!is(this,e,this.size(n)/2)||(t.strokeStyle=n.borderColor,t.lineWidth=n.borderWidth,t.fillStyle=n.backgroundColor,es(t,n,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}const xl=(t,e)=>{let{boxHeight:n=e,boxWidth:i=e}=t;return t.usePointStyle&&(n=Math.min(n,e),i=t.pointStyleWidth||Math.min(i,e)),{boxWidth:i,boxHeight:n,itemHeight:Math.max(e,n)}};class _l extends _a{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,n){this.maxWidth=t,this.maxHeight=e,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=ji(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter((e=>t.filter(e,this.chart.data)))),t.sort&&(e=e.sort(((e,n)=>t.sort(e,n,this.chart.data)))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const n=t.labels,i=vs(n.font),r=i.size,s=this._computeTitleHeight(),{boxWidth:o,itemHeight:a}=xl(n,r);let l,c;e.font=i.string,this.isHorizontal()?(l=this.maxWidth,c=this._fitRows(s,r,o,a)+10):(c=this.maxHeight,l=this._fitCols(s,i,o,a)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,e,n,i){const{ctx:r,maxWidth:s,options:{labels:{padding:o}}}=this,a=this.legendHitBoxes=[],l=this.lineWidths=[0],c=i+o;let u=t;r.textAlign="left",r.textBaseline="middle";let h=-1,d=-c;return this.legendItems.forEach(((t,f)=>{const p=n+e/2+r.measureText(t.text).width;(0===f||l[l.length-1]+p+2*o>s)&&(u+=c,l[l.length-(f>0?0:1)]=0,d+=c,h++),a[f]={left:0,top:d,row:h,width:p,height:i},l[l.length-1]+=p+o})),u}_fitCols(t,e,n,i){const{ctx:r,maxHeight:s,options:{labels:{padding:o}}}=this,a=this.legendHitBoxes=[],l=this.columnSizes=[],c=s-t;let u=o,h=0,d=0,f=0,p=0;return this.legendItems.forEach(((t,s)=>{const{itemWidth:g,itemHeight:m}=function(t,e,n,i,r){const s=function(t,e,n,i){let r=t.text;r&&"string"!==typeof r&&(r=r.reduce(((t,e)=>t.length>e.length?t:e)));return e+n.size/2+i.measureText(r).width}(i,t,e,n),o=function(t,e,n){let i=t;"string"!==typeof e.text&&(i=wl(e,n));return i}(r,i,e.lineHeight);return{itemWidth:s,itemHeight:o}}(n,e,r,t,i);s>0&&d+m+2*o>c&&(u+=h+o,l.push({width:h,height:d}),f+=h+o,p++,h=d=0),a[s]={left:f,top:d,col:p,width:g,height:m},h=Math.max(h,g),d+=m+o})),u+=h,l.push({width:h,height:d}),u}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:n,labels:{padding:i},rtl:r}}=this,s=io(r,this.left,this.width);if(this.isHorizontal()){let r=0,o=Pr(n,this.left+i,this.right-this.lineWidths[r]);for(const a of e)r!==a.row&&(r=a.row,o=Pr(n,this.left+i,this.right-this.lineWidths[r])),a.top+=this.top+t+i,a.left=s.leftForLtr(s.x(o),a.width),o+=a.width+i}else{let r=0,o=Pr(n,this.top+t+i,this.bottom-this.columnSizes[r].height);for(const a of e)a.col!==r&&(r=a.col,o=Pr(n,this.top+t+i,this.bottom-this.columnSizes[r].height)),a.top=o,a.left+=this.left+i,a.left=s.leftForLtr(s.x(a.left),a.width),o+=a.height+i}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;rs(t,this),this._draw(),ss(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:n,ctx:i}=this,{align:r,labels:s}=t,o=Jr.color,a=io(t.rtl,this.left,this.width),l=vs(s.font),{padding:c}=s,u=l.size,h=u/2;let d;this.drawTitle(),i.textAlign=a.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=l.string;const{boxWidth:f,boxHeight:p,itemHeight:g}=xl(s,u),m=this.isHorizontal(),y=this._computeTitleHeight();d=m?{x:Pr(r,this.left+c,this.right-n[0]),y:this.top+c+y,line:0}:{x:this.left+c,y:Pr(r,this.top+y+c,this.bottom-e[0].height),line:0},ro(this.ctx,t.textDirection);const b=g+c;this.legendItems.forEach(((v,x)=>{i.strokeStyle=v.fontColor,i.fillStyle=v.fontColor;const _=i.measureText(v.text).width,w=a.textAlign(v.textAlign||(v.textAlign=s.textAlign)),k=f+h+_;let S=d.x,E=d.y;a.setWidth(this.width),m?x>0&&S+k+c>this.right&&(E=d.y+=b,d.line++,S=d.x=Pr(r,this.left+c,this.right-n[d.line])):x>0&&E+b>this.bottom&&(S=d.x=S+e[d.line].width+c,d.line++,E=d.y=Pr(r,this.top+y+c,this.bottom-e[d.line].height));if(function(t,e,n){if(isNaN(f)||f<=0||isNaN(p)||p<0)return;i.save();const r=Li(n.lineWidth,1);if(i.fillStyle=Li(n.fillStyle,o),i.lineCap=Li(n.lineCap,"butt"),i.lineDashOffset=Li(n.lineDashOffset,0),i.lineJoin=Li(n.lineJoin,"miter"),i.lineWidth=r,i.strokeStyle=Li(n.strokeStyle,o),i.setLineDash(Li(n.lineDash,[])),s.usePointStyle){const o={radius:p*Math.SQRT2/2,pointStyle:n.pointStyle,rotation:n.rotation,borderWidth:r},l=a.xPlus(t,f/2);ns(i,o,l,e+h,s.pointStyleWidth&&f)}else{const s=e+Math.max((u-p)/2,0),o=a.leftForLtr(t,f),l=ys(n.borderRadius);i.beginPath(),Object.values(l).some((t=>0!==t))?hs(i,{x:o,y:s,w:f,h:p,radius:l}):i.rect(o,s,f,p),i.fill(),0!==r&&i.stroke()}i.restore()}(a.x(S),E,v),S=((t,e,n,i)=>t===(i?"left":"right")?n:"center"===t?(e+n)/2:e)(w,S+f+h,m?S+k:this.right,t.rtl),function(t,e,n){us(i,n.text,t,e+g/2,l,{strikethrough:n.hidden,textAlign:a.textAlign(n.textAlign)})}(a.x(S),E,v),m)d.x+=k+c;else if("string"!==typeof v.text){const t=l.lineHeight;d.y+=wl(v,t)+c}else d.y+=b})),so(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,n=vs(e.font),i=bs(e.padding);if(!e.display)return;const r=io(t.rtl,this.left,this.width),s=this.ctx,o=e.position,a=n.size/2,l=i.top+a;let c,u=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),c=this.top+l,u=Pr(t.align,u,this.right-h);else{const e=this.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);c=l+Pr(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const d=Pr(o,u,u+h);s.textAlign=r.textAlign(Mr(o)),s.textBaseline="middle",s.strokeStyle=e.color,s.fillStyle=e.color,s.font=n.string,us(s,e.text,d,c,n)}_computeTitleHeight(){const t=this.options.title,e=vs(t.font),n=bs(t.padding);return t.display?e.lineHeight+n.height:0}_getLegendItemAt(t,e){let n,i,r;if(xr(t,this.left,this.right)&&xr(e,this.top,this.bottom))for(r=this.legendHitBoxes,n=0;n<r.length;++n)if(i=r[n],xr(t,i.left,i.left+i.width)&&xr(e,i.top,i.top+i.height))return this.legendItems[n];return null}handleEvent(t){const e=this.options;if(!function(t,e){if(("mousemove"===t||"mouseout"===t)&&(e.onHover||e.onLeave))return!0;if(e.onClick&&("click"===t||"mouseup"===t))return!0;return!1}(t.type,e))return;const n=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type||"mouseout"===t.type){const s=this._hoveredItem,o=(r=n,null!==(i=s)&&null!==r&&i.datasetIndex===r.datasetIndex&&i.index===r.index);s&&!o&&ji(e.onLeave,[t,s,this],this),this._hoveredItem=n,n&&!o&&ji(e.onHover,[t,n,this],this)}else n&&ji(e.onClick,[t,n,this],this);var i,r}}function wl(t,e){return e*(t.text?t.text.length:0)}var kl={id:"legend",_element:_l,start(t,e,n){const i=t.legend=new _l({ctx:t.ctx,options:n,chart:t});ia.configure(t,i,n),ia.addBox(t,i)},stop(t){ia.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const i=t.legend;ia.configure(t,i,n),i.options=n},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,n){const i=e.datasetIndex,r=n.chart;r.isDatasetVisible(i)?(r.hide(i),e.hidden=!0):(r.show(i),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:n,pointStyle:i,textAlign:r,color:s,useBorderRadius:o,borderRadius:a}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const l=t.controller.getStyle(n?0:void 0),c=bs(l.borderWidth);return{text:e[t.index].label,fillStyle:l.backgroundColor,fontColor:s,hidden:!t.visible,lineCap:l.borderCapStyle,lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:l.borderColor,pointStyle:i||l.pointStyle,rotation:l.rotation,textAlign:r||l.textAlign,borderRadius:o&&(a||l.borderRadius),datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class Sl extends _a{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const n=this.options;if(this.left=0,this.top=0,!n.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const i=Pi(n.text)?n.text.length:1;this._padding=bs(n.padding);const r=i*vs(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=r:this.width=r}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:n,bottom:i,right:r,options:s}=this,o=s.align;let a,l,c,u=0;return this.isHorizontal()?(l=Pr(o,n,r),c=e+t,a=r-n):("left"===s.position?(l=n+t,c=Pr(o,i,e),u=-.5*Ji):(l=r-t,c=Pr(o,e,i),u=.5*Ji),a=i-e),{titleX:l,titleY:c,maxWidth:a,rotation:u}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const n=vs(e.font),i=n.lineHeight/2+this._padding.top,{titleX:r,titleY:s,maxWidth:o,rotation:a}=this._drawArgs(i);us(t,e.text,0,0,n,{color:e.color,maxWidth:o,rotation:a,textAlign:Mr(e.align),textBaseline:"middle",translation:[r,s]})}}var El={id:"title",_element:Sl,start(t,e,n){!function(t,e){const n=new Sl({ctx:t.ctx,options:e,chart:t});ia.configure(t,n,e),ia.addBox(t,n),t.titleBlock=n}(t,n)},stop(t){const e=t.titleBlock;ia.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const i=t.titleBlock;ia.configure(t,i,n),i.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};new WeakMap;const Cl={average(t){if(!t.length)return!1;let e,n,i=new Set,r=0,s=0;for(e=0,n=t.length;e<n;++e){const n=t[e].element;if(n&&n.hasValue()){const t=n.tooltipPosition();i.add(t.x),r+=t.y,++s}}if(0===s||0===i.size)return!1;return{x:[...i].reduce(((t,e)=>t+e))/i.size,y:r/s}},nearest(t,e){if(!t.length)return!1;let n,i,r,s=e.x,o=e.y,a=Number.POSITIVE_INFINITY;for(n=0,i=t.length;n<i;++n){const i=t[n].element;if(i&&i.hasValue()){const t=gr(e,i.getCenterPoint());t<a&&(a=t,r=i)}}if(r){const t=r.tooltipPosition();s=t.x,o=t.y}return{x:s,y:o}}};function Ol(t,e){return e&&(Pi(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Tl(t){return("string"===typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function Ml(t,e){const{element:n,datasetIndex:i,index:r}=e,s=t.getDatasetMeta(i).controller,{label:o,value:a}=s.getLabelAndValue(r);return{chart:t,label:o,parsed:s.getParsed(r),raw:t.data.datasets[i].data[r],formattedValue:a,dataset:s.getDataset(),dataIndex:r,datasetIndex:i,element:n}}function Pl(t,e){const n=t.chart.ctx,{body:i,footer:r,title:s}=t,{boxWidth:o,boxHeight:a}=e,l=vs(e.bodyFont),c=vs(e.titleFont),u=vs(e.footerFont),h=s.length,d=r.length,f=i.length,p=bs(e.padding);let g=p.height,m=0,y=i.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);if(y+=t.beforeBody.length+t.afterBody.length,h&&(g+=h*c.lineHeight+(h-1)*e.titleSpacing+e.titleMarginBottom),y){g+=f*(e.displayColors?Math.max(a,l.lineHeight):l.lineHeight)+(y-f)*l.lineHeight+(y-1)*e.bodySpacing}d&&(g+=e.footerMarginTop+d*u.lineHeight+(d-1)*e.footerSpacing);let b=0;const v=function(t){m=Math.max(m,n.measureText(t).width+b)};return n.save(),n.font=c.string,zi(t.title,v),n.font=l.string,zi(t.beforeBody.concat(t.afterBody),v),b=e.displayColors?o+2+e.boxPadding:0,zi(i,(t=>{zi(t.before,v),zi(t.lines,v),zi(t.after,v)})),b=0,n.font=u.string,zi(t.footer,v),n.restore(),m+=p.width,{width:m,height:g}}function Nl(t,e,n,i){const{x:r,width:s}=n,{width:o,chartArea:{left:a,right:l}}=t;let c="center";return"center"===i?c=r<=(a+l)/2?"left":"right":r<=s/2?c="left":r>=o-s/2&&(c="right"),function(t,e,n,i){const{x:r,width:s}=i,o=n.caretSize+n.caretPadding;return"left"===t&&r+s+o>e.width||"right"===t&&r-s-o<0||void 0}(c,t,e,n)&&(c="center"),c}function Rl(t,e,n){const i=n.yAlign||e.yAlign||function(t,e){const{y:n,height:i}=e;return n<i/2?"top":n>t.height-i/2?"bottom":"center"}(t,n);return{xAlign:n.xAlign||e.xAlign||Nl(t,e,n,i),yAlign:i}}function Al(t,e,n,i){const{caretSize:r,caretPadding:s,cornerRadius:o}=t,{xAlign:a,yAlign:l}=n,c=r+s,{topLeft:u,topRight:h,bottomLeft:d,bottomRight:f}=ys(o);let p=function(t,e){let{x:n,width:i}=t;return"right"===e?n-=i:"center"===e&&(n-=i/2),n}(e,a);const g=function(t,e,n){let{y:i,height:r}=t;return"top"===e?i+=n:i-="bottom"===e?r+n:r/2,i}(e,l,c);return"center"===l?"left"===a?p+=c:"right"===a&&(p-=c):"left"===a?p-=Math.max(u,d)+r:"right"===a&&(p+=Math.max(h,f)+r),{x:vr(p,0,i.width-e.width),y:vr(g,0,i.height-e.height)}}function Ll(t,e,n){const i=bs(n.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-i.right:t.x+i.left}function Dl(t){return Ol([],Tl(t))}function jl(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const zl={beforeTitle:Oi,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,i=n?n.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(i>0&&e.dataIndex<i)return n[e.dataIndex]}return""},afterTitle:Oi,beforeBody:Oi,beforeLabel:Oi,label(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return Mi(n)||(e+=n),e},labelColor(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:Oi,afterBody:Oi,beforeFooter:Oi,footer:Oi,afterFooter:Oi};function Il(t,e,n,i){const r=t[e].call(n,i);return"undefined"===typeof r?zl[e].call(n,i):r}class Fl extends _a{static positioners=(()=>Cl)();constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,n=this.options.setContext(this.getContext()),i=n.enabled&&e.options.animation&&n.animations,r=new _o(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=(t=this.chart.getContext(),e=this,n=this._tooltipItems,_s(t,{tooltip:e,tooltipItems:n,type:"tooltip"})));var t,e,n}getTitle(t,e){const{callbacks:n}=e,i=Il(n,"beforeTitle",this,t),r=Il(n,"title",this,t),s=Il(n,"afterTitle",this,t);let o=[];return o=Ol(o,Tl(i)),o=Ol(o,Tl(r)),o=Ol(o,Tl(s)),o}getBeforeBody(t,e){return Dl(Il(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:n}=e,i=[];return zi(t,(t=>{const e={before:[],lines:[],after:[]},r=jl(n,t);Ol(e.before,Tl(Il(r,"beforeLabel",this,t))),Ol(e.lines,Il(r,"label",this,t)),Ol(e.after,Tl(Il(r,"afterLabel",this,t))),i.push(e)})),i}getAfterBody(t,e){return Dl(Il(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:n}=e,i=Il(n,"beforeFooter",this,t),r=Il(n,"footer",this,t),s=Il(n,"afterFooter",this,t);let o=[];return o=Ol(o,Tl(i)),o=Ol(o,Tl(r)),o=Ol(o,Tl(s)),o}_createItems(t){const e=this._active,n=this.chart.data,i=[],r=[],s=[];let o,a,l=[];for(o=0,a=e.length;o<a;++o)l.push(Ml(this.chart,e[o]));return t.filter&&(l=l.filter(((e,i,r)=>t.filter(e,i,r,n)))),t.itemSort&&(l=l.sort(((e,i)=>t.itemSort(e,i,n)))),zi(l,(e=>{const n=jl(t.callbacks,e);i.push(Il(n,"labelColor",this,e)),r.push(Il(n,"labelPointStyle",this,e)),s.push(Il(n,"labelTextColor",this,e))})),this.labelColors=i,this.labelPointStyles=r,this.labelTextColors=s,this.dataPoints=l,l}update(t,e){const n=this.options.setContext(this.getContext()),i=this._active;let r,s=[];if(i.length){const t=Cl[n.position].call(this,i,this._eventPosition);s=this._createItems(n),this.title=this.getTitle(s,n),this.beforeBody=this.getBeforeBody(s,n),this.body=this.getBody(s,n),this.afterBody=this.getAfterBody(s,n),this.footer=this.getFooter(s,n);const e=this._size=Pl(this,n),o=Object.assign({},t,e),a=Rl(this.chart,n,o),l=Al(n,o,a,this.chart);this.xAlign=a.xAlign,this.yAlign=a.yAlign,r={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(r={opacity:0});this._tooltipItems=s,this.$context=void 0,r&&this._resolveAnimations().update(this,r),t&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,n,i){const r=this.getCaretPosition(t,n,i);e.lineTo(r.x1,r.y1),e.lineTo(r.x2,r.y2),e.lineTo(r.x3,r.y3)}getCaretPosition(t,e,n){const{xAlign:i,yAlign:r}=this,{caretSize:s,cornerRadius:o}=n,{topLeft:a,topRight:l,bottomLeft:c,bottomRight:u}=ys(o),{x:h,y:d}=t,{width:f,height:p}=e;let g,m,y,b,v,x;return"center"===r?(v=d+p/2,"left"===i?(g=h,m=g-s,b=v+s,x=v-s):(g=h+f,m=g+s,b=v-s,x=v+s),y=g):(m="left"===i?h+Math.max(a,c)+s:"right"===i?h+f-Math.max(l,u)-s:this.caretX,"top"===r?(b=d,v=b-s,g=m-s,y=m+s):(b=d+p,v=b+s,g=m+s,y=m-s),x=b),{x1:g,x2:m,x3:y,y1:b,y2:v,y3:x}}drawTitle(t,e,n){const i=this.title,r=i.length;let s,o,a;if(r){const l=io(n.rtl,this.x,this.width);for(t.x=Ll(this,n.titleAlign,n),e.textAlign=l.textAlign(n.titleAlign),e.textBaseline="middle",s=vs(n.titleFont),o=n.titleSpacing,e.fillStyle=n.titleColor,e.font=s.string,a=0;a<r;++a)e.fillText(i[a],l.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+o,a+1===r&&(t.y+=n.titleMarginBottom-o)}}_drawColorBox(t,e,n,i,r){const s=this.labelColors[n],o=this.labelPointStyles[n],{boxHeight:a,boxWidth:l}=r,c=vs(r.bodyFont),u=Ll(this,"left",r),h=i.x(u),d=a<c.lineHeight?(c.lineHeight-a)/2:0,f=e.y+d;if(r.usePointStyle){const e={radius:Math.min(l,a)/2,pointStyle:o.pointStyle,rotation:o.rotation,borderWidth:1},n=i.leftForLtr(h,l)+l/2,c=f+a/2;t.strokeStyle=r.multiKeyBackground,t.fillStyle=r.multiKeyBackground,es(t,e,n,c),t.strokeStyle=s.borderColor,t.fillStyle=s.backgroundColor,es(t,e,n,c)}else{t.lineWidth=Ni(s.borderWidth)?Math.max(...Object.values(s.borderWidth)):s.borderWidth||1,t.strokeStyle=s.borderColor,t.setLineDash(s.borderDash||[]),t.lineDashOffset=s.borderDashOffset||0;const e=i.leftForLtr(h,l),n=i.leftForLtr(i.xPlus(h,1),l-2),o=ys(s.borderRadius);Object.values(o).some((t=>0!==t))?(t.beginPath(),t.fillStyle=r.multiKeyBackground,hs(t,{x:e,y:f,w:l,h:a,radius:o}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),hs(t,{x:n,y:f+1,w:l-2,h:a-2,radius:o}),t.fill()):(t.fillStyle=r.multiKeyBackground,t.fillRect(e,f,l,a),t.strokeRect(e,f,l,a),t.fillStyle=s.backgroundColor,t.fillRect(n,f+1,l-2,a-2))}t.fillStyle=this.labelTextColors[n]}drawBody(t,e,n){const{body:i}=this,{bodySpacing:r,bodyAlign:s,displayColors:o,boxHeight:a,boxWidth:l,boxPadding:c}=n,u=vs(n.bodyFont);let h=u.lineHeight,d=0;const f=io(n.rtl,this.x,this.width),p=function(n){e.fillText(n,f.x(t.x+d),t.y+h/2),t.y+=h+r},g=f.textAlign(s);let m,y,b,v,x,_,w;for(e.textAlign=s,e.textBaseline="middle",e.font=u.string,t.x=Ll(this,g,n),e.fillStyle=n.bodyColor,zi(this.beforeBody,p),d=o&&"right"!==g?"center"===s?l/2+c:l+2+c:0,v=0,_=i.length;v<_;++v){for(m=i[v],y=this.labelTextColors[v],e.fillStyle=y,zi(m.before,p),b=m.lines,o&&b.length&&(this._drawColorBox(e,t,v,f,n),h=Math.max(u.lineHeight,a)),x=0,w=b.length;x<w;++x)p(b[x]),h=u.lineHeight;zi(m.after,p)}d=0,h=u.lineHeight,zi(this.afterBody,p),t.y-=r}drawFooter(t,e,n){const i=this.footer,r=i.length;let s,o;if(r){const a=io(n.rtl,this.x,this.width);for(t.x=Ll(this,n.footerAlign,n),t.y+=n.footerMarginTop,e.textAlign=a.textAlign(n.footerAlign),e.textBaseline="middle",s=vs(n.footerFont),e.fillStyle=n.footerColor,e.font=s.string,o=0;o<r;++o)e.fillText(i[o],a.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+n.footerSpacing}}drawBackground(t,e,n,i){const{xAlign:r,yAlign:s}=this,{x:o,y:a}=t,{width:l,height:c}=n,{topLeft:u,topRight:h,bottomLeft:d,bottomRight:f}=ys(i.cornerRadius);e.fillStyle=i.backgroundColor,e.strokeStyle=i.borderColor,e.lineWidth=i.borderWidth,e.beginPath(),e.moveTo(o+u,a),"top"===s&&this.drawCaret(t,e,n,i),e.lineTo(o+l-h,a),e.quadraticCurveTo(o+l,a,o+l,a+h),"center"===s&&"right"===r&&this.drawCaret(t,e,n,i),e.lineTo(o+l,a+c-f),e.quadraticCurveTo(o+l,a+c,o+l-f,a+c),"bottom"===s&&this.drawCaret(t,e,n,i),e.lineTo(o+d,a+c),e.quadraticCurveTo(o,a+c,o,a+c-d),"center"===s&&"left"===r&&this.drawCaret(t,e,n,i),e.lineTo(o,a+u),e.quadraticCurveTo(o,a,o+u,a),e.closePath(),e.fill(),i.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,n=this.$animations,i=n&&n.x,r=n&&n.y;if(i||r){const n=Cl[t.position].call(this,this._active,this._eventPosition);if(!n)return;const s=this._size=Pl(this,t),o=Object.assign({},n,this._size),a=Rl(e,t,o),l=Al(t,o,a,e);i._to===l.x&&r._to===l.y||(this.xAlign=a.xAlign,this.yAlign=a.yAlign,this.width=s.width,this.height=s.height,this.caretX=n.x,this.caretY=n.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let n=this.opacity;if(!n)return;this._updateAnimationTarget(e);const i={width:this.width,height:this.height},r={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;const s=bs(e.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&o&&(t.save(),t.globalAlpha=n,this.drawBackground(r,t,i,e),ro(t,e.textDirection),r.y+=s.top,this.drawTitle(r,t,e),this.drawBody(r,t,e),this.drawFooter(r,t,e),so(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const n=this._active,i=t.map((t=>{let{datasetIndex:e,index:n}=t;const i=this.chart.getDatasetMeta(e);if(!i)throw new Error("Cannot find a dataset at index "+e);return{datasetIndex:e,element:i.data[n],index:n}})),r=!Ii(n,i),s=this._positionChanged(i,e);(r||s)&&(this._active=i,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,r=this._active||[],s=this._getActiveElements(t,r,e,n),o=this._positionChanged(s,t),a=e||!Ii(s,r)||o;return a&&(this._active=s,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),a}_getActiveElements(t,e,n,i){const r=this.options;if("mouseout"===t.type)return[];if(!i)return e.filter((t=>this.chart.data.datasets[t.datasetIndex]&&void 0!==this.chart.getDatasetMeta(t.datasetIndex).controller.getParsed(t.index)));const s=this.chart.getElementsAtEventForMode(t,r.mode,r,n);return r.reverse&&s.reverse(),s}_positionChanged(t,e){const{caretX:n,caretY:i,options:r}=this,s=Cl[r.position].call(this,t,e);return!1!==s&&(n!==s.x||i!==s.y)}}var Bl={id:"tooltip",_element:Fl,positioners:Cl,afterInit(t,e,n){n&&(t.tooltip=new Fl({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0}))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:zl},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};function Ul(t,e,n,i){const r=t.indexOf(e);if(-1===r)return((t,e,n,i)=>("string"===typeof e?(n=t.push(e)-1,i.unshift({index:n,label:e})):isNaN(e)&&(n=null),n))(t,e,n,i);return r!==t.lastIndexOf(e)?n:r}function Hl(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class Wl extends Na{static id="category";static defaults=(()=>({ticks:{callback:Hl}}))();constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const t=this.getLabels();for(const{index:n,label:i}of e)t[n]===i&&t.splice(n,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(Mi(t))return null;const n=this.getLabels();return((t,e)=>null===t?null:vr(Math.round(t),0,e))(e=isFinite(e)&&n[e]===t?e:Ul(n,t,Li(e,t),this._addedLabels),n.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:n,max:i}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(n=0),e||(i=this.getLabels().length-1)),this.min=n,this.max=i}buildTicks(){const t=this.min,e=this.max,n=this.options.offset,i=[];let r=this.getLabels();r=0===t&&e===r.length-1?r:r.slice(t,e+1),this._valueRange=Math.max(r.length-(n?0:1),1),this._startValue=this.min-(n?.5:0);for(let s=t;s<=e;s++)i.push({value:s});return i}getLabelForValue(t){return Hl.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!==typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function Vl(t,e){const n=[],{bounds:i,step:r,min:s,max:o,precision:a,count:l,maxTicks:c,maxDigits:u,includeBounds:h}=t,d=r||1,f=c-1,{min:p,max:g}=e,m=!Mi(s),y=!Mi(o),b=!Mi(l),v=(g-p)/(u+1);let x,_,w,k,S=lr((g-p)/f/d)*d;if(S<1e-14&&!m&&!y)return[{value:p},{value:g}];k=Math.ceil(g/S)-Math.floor(p/S),k>f&&(S=lr(k*S/f/d)*d),Mi(a)||(x=Math.pow(10,a),S=Math.ceil(S*x)/x),"ticks"===i?(_=Math.floor(p/S)*S,w=Math.ceil(g/S)*S):(_=p,w=g),m&&y&&r&&function(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}((o-s)/r,S/1e3)?(k=Math.round(Math.min((o-s)/S,c)),S=(o-s)/k,_=s,w=o):b?(_=m?s:_,w=y?o:w,k=l-1,S=(w-_)/k):(k=(w-_)/S,k=ar(k,Math.round(k),S/1e3)?Math.round(k):Math.ceil(k));const E=Math.max(fr(S),fr(_));x=Math.pow(10,Mi(a)?E:a),_=Math.round(_*x)/x,w=Math.round(w*x)/x;let C=0;for(m&&(h&&_!==s?(n.push({value:s}),_<s&&C++,ar(Math.round((_+C*S)*x)/x,s,$l(s,v,t))&&C++):_<s&&C++);C<k;++C){const t=Math.round((_+C*S)*x)/x;if(y&&t>o)break;n.push({value:t})}return y&&h&&w!==o?n.length&&ar(n[n.length-1].value,o,$l(o,v,t))?n[n.length-1].value=o:n.push({value:o}):y&&w!==o||n.push({value:w}),n}function $l(t,e,n){let{horizontal:i,minRotation:r}=n;const s=hr(r),o=(i?Math.sin(s):Math.cos(s))||.001,a=.75*e*(""+t).length;return Math.min(e/o,a)}class ql extends Na{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return Mi(t)||("number"===typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:i,max:r}=this;const s=t=>i=e?i:t,o=t=>r=n?r:t;if(t){const t=or(i),e=or(r);t<0&&e<0?o(0):t>0&&e>0&&s(0)}if(i===r){let e=0===r?1:Math.abs(.05*r);o(r+e),t||s(i-e)}this.min=i,this.max=r}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:n,stepSize:i}=t;return i?(e=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),n=n||11),n&&(e=Math.min(n,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let n=this.getTickLimit();n=Math.max(2,n);const i=Vl({maxTicks:n,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&ur(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}configure(){const t=this.ticks;let e=this.min,n=this.max;if(super.configure(),this.options.offset&&t.length){const i=(n-e)/Math.max(t.length-1,1)/2;e-=i,n+=i}this._startValue=e,this._endValue=n,this._valueRange=n-e}getLabelForValue(t){return Wr(t,this.chart.options.locale,this.options.ticks.format)}}class Yl extends ql{static id="linear";static defaults=(()=>({ticks:{callback:$r.formatters.numeric}}))();determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=Ri(t)?t:0,this.max=Ri(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,n=hr(this.options.ticks.minRotation),i=(t?Math.sin(n):Math.cos(n))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,r.lineHeight/i))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}$r.formatters.logarithmic;$r.formatters.numeric;const Kl={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Ql=Object.keys(Kl);function Xl(t,e){return t-e}function Jl(t,e){if(Mi(e))return null;const n=t._adapter,{parser:i,round:r,isoWeekday:s}=t._parseOpts;let o=e;return"function"===typeof i&&(o=i(o)),Ri(o)||(o="string"===typeof i?n.parse(o,i):n.parse(o)),null===o?null:(r&&(o="week"!==r||!cr(s)&&!0!==s?n.startOf(o,r):n.startOf(o,"isoWeek",s)),+o)}function Gl(t,e,n,i){const r=Ql.length;for(let s=Ql.indexOf(t);s<r-1;++s){const t=Kl[Ql[s]],r=t.steps?t.steps:Number.MAX_SAFE_INTEGER;if(t.common&&Math.ceil((n-e)/(r*t.size))<=i)return Ql[s]}return Ql[r-1]}function Zl(t,e,n){if(n){if(n.length){const{lo:i,hi:r}=_r(n,e);t[n[i]>=e?n[i]:n[r]]=!0}}else t[e]=!0}function tc(t,e,n){const i=[],r={},s=e.length;let o,a;for(o=0;o<s;++o)a=e[o],r[a]=o,i.push({value:a,major:!1});return 0!==s&&n?function(t,e,n,i){const r=t._adapter,s=+r.startOf(e[0].value,i),o=e[e.length-1].value;let a,l;for(a=s;a<=o;a=+r.add(a,1,i))l=n[a],l>=0&&(e[l].major=!0);return e}(t,i,r,n):i}class ec extends Na{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=t.time||(t.time={}),i=this._adapter=new zo(t.adapters.date);i.init(e),Wi(n.displayFormats,i.formats()),this._parseOpts={parser:n.parser,round:n.round,isoWeekday:n.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:Jl(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,n=t.time.unit||"day";let{min:i,max:r,minDefined:s,maxDefined:o}=this.getUserBounds();function a(t){s||isNaN(t.min)||(i=Math.min(i,t.min)),o||isNaN(t.max)||(r=Math.max(r,t.max))}s&&o||(a(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||a(this.getMinMax(!1))),i=Ri(i)&&!isNaN(i)?i:+e.startOf(Date.now(),n),r=Ri(r)&&!isNaN(r)?r:+e.endOf(Date.now(),n)+1,this.min=Math.min(i,r-1),this.max=Math.max(i+1,r)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],n=t[t.length-1]),{min:e,max:n}}buildTicks(){const t=this.options,e=t.time,n=t.ticks,i="labels"===n.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const r=this.min,s=function(t,e,n){let i=0,r=t.length;for(;i<r&&t[i]<e;)i++;for(;r>i&&t[r-1]>n;)r--;return i>0||r<t.length?t.slice(i,r):t}(i,r,this.max);return this._unit=e.unit||(n.autoSkip?Gl(e.minUnit,this.min,this.max,this._getLabelCapacity(r)):function(t,e,n,i,r){for(let s=Ql.length-1;s>=Ql.indexOf(n);s--){const n=Ql[s];if(Kl[n].common&&t._adapter.diff(r,i,n)>=e-1)return n}return Ql[n?Ql.indexOf(n):0]}(this,s.length,e.minUnit,this.min,this.max)),this._majorUnit=n.major.enabled&&"year"!==this._unit?function(t){for(let e=Ql.indexOf(t)+1,n=Ql.length;e<n;++e)if(Kl[Ql[e]].common)return Ql[e]}(this._unit):void 0,this.initOffsets(i),t.reverse&&s.reverse(),tc(this,s,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map((t=>+t.value)))}initOffsets(){let t,e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=0,r=0;this.options.offset&&n.length&&(t=this.getDecimalForValue(n[0]),i=1===n.length?1-t:(this.getDecimalForValue(n[1])-t)/2,e=this.getDecimalForValue(n[n.length-1]),r=1===n.length?e:(e-this.getDecimalForValue(n[n.length-2]))/2);const s=n.length<3?.5:.25;i=vr(i,0,s),r=vr(r,0,s),this._offsets={start:i,end:r,factor:1/(i+1+r)}}_generate(){const t=this._adapter,e=this.min,n=this.max,i=this.options,r=i.time,s=r.unit||Gl(r.minUnit,e,n,this._getLabelCapacity(e)),o=Li(i.ticks.stepSize,1),a="week"===s&&r.isoWeekday,l=cr(a)||!0===a,c={};let u,h,d=e;if(l&&(d=+t.startOf(d,"isoWeek",a)),d=+t.startOf(d,l?"day":s),t.diff(n,e,s)>1e5*o)throw new Error(e+" and "+n+" are too far apart with stepSize of "+o+" "+s);const f="data"===i.ticks.source&&this.getDataTimestamps();for(u=d,h=0;u<n;u=+t.add(u,o,s),h++)Zl(c,u,f);return u!==n&&"ticks"!==i.bounds&&1!==h||Zl(c,u,f),Object.keys(c).sort(Xl).map((t=>+t))}getLabelForValue(t){const e=this._adapter,n=this.options.time;return n.tooltipFormat?e.format(t,n.tooltipFormat):e.format(t,n.displayFormats.datetime)}format(t,e){const n=this.options.time.displayFormats,i=this._unit,r=e||n[i];return this._adapter.format(t,r)}_tickFormatFunction(t,e,n,i){const r=this.options,s=r.ticks.callback;if(s)return ji(s,[t,e,n],this);const o=r.time.displayFormats,a=this._unit,l=this._majorUnit,c=a&&o[a],u=l&&o[l],h=n[e],d=l&&u&&h&&h.major;return this._adapter.format(t,i||(d?u:c))}generateTickLabels(t){let e,n,i;for(e=0,n=t.length;e<n;++e)i=t[e],i.label=this._tickFormatFunction(i.value,e,t)}getDecimalForValue(t){return null===t?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,n=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+n)*e.factor)}getValueForPixel(t){const e=this._offsets,n=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+n*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,n=this.ctx.measureText(t).width,i=hr(this.isHorizontal()?e.maxRotation:e.minRotation),r=Math.cos(i),s=Math.sin(i),o=this._resolveTickFontOptions(0).size;return{w:n*r+o*s,h:n*s+o*r}}_getLabelCapacity(t){const e=this.options.time,n=e.displayFormats,i=n[e.unit]||n.millisecond,r=this._tickFormatFunction(t,0,tc(this,[t],this._majorUnit),i),s=this._getLabelSize(r),o=Math.floor(this.isHorizontal()?this.width/s.w:this.height/s.h)-1;return o>0?o:1}getDataTimestamps(){let t,e,n=this._cache.data||[];if(n.length)return n;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(t=0,e=i.length;t<e;++t)n=n.concat(i[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(n)}getLabelTimestamps(){const t=this._cache.labels||[];let e,n;if(t.length)return t;const i=this.getLabels();for(e=0,n=i.length;e<n;++e)t.push(Jl(this,i[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Cr(t.sort(Xl))}}const nc="label";function ic(t,e){"function"===typeof t?t(e):t&&(t.current=e)}function rc(t,e){t.labels=e}function sc(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:nc;const i=[];t.datasets=e.map((e=>{const r=t.datasets.find((t=>t[n]===e[n]));return r&&e.data&&!i.includes(r)?(i.push(r),Object.assign(r,e),r):{...e}}))}function oc(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:nc;const n={labels:[],datasets:[]};return rc(n,t.labels),sc(n,t.datasets,e),n}function ac(t,e){const{height:n=150,width:i=300,redraw:r=!1,datasetIdKey:o,type:a,data:l,options:c,plugins:u=[],fallbackContent:h,updateMode:d,...f}=t,p=(0,s.useRef)(null),g=(0,s.useRef)(null),m=()=>{p.current&&(g.current=new al(p.current,{type:a,data:oc(l,o),options:c&&{...c},plugins:u}),ic(e,g.current))},y=()=>{ic(e,null),g.current&&(g.current.destroy(),g.current=null)};return(0,s.useEffect)((()=>{!r&&g.current&&c&&function(t,e){const n=t.options;n&&e&&Object.assign(n,e)}(g.current,c)}),[r,c]),(0,s.useEffect)((()=>{!r&&g.current&&rc(g.current.config.data,l.labels)}),[r,l.labels]),(0,s.useEffect)((()=>{!r&&g.current&&l.datasets&&sc(g.current.config.data,l.datasets,o)}),[r,l.datasets]),(0,s.useEffect)((()=>{g.current&&(r?(y(),setTimeout(m)):g.current.update(d))}),[r,c,l.labels,l.datasets,d]),(0,s.useEffect)((()=>{g.current&&(y(),setTimeout(m))}),[a]),(0,s.useEffect)((()=>(m(),()=>y())),[]),s.createElement("canvas",{ref:p,role:"img",height:n,width:i,...f},h)}const lc=(0,s.forwardRef)(ac);function cc(t,e){return al.register(e),(0,s.forwardRef)(((e,n)=>s.createElement(lc,{...e,ref:n,type:t})))}const uc=cc("line",Lo);al.register(Wl,Yl,vl,yl,El,Bl,kl);const hc=t=>{let{processId:e,initialData:n}=t;const[i,r]=(0,s.useState)({labels:[],datasets:[{label:"CPU (%)",data:[],borderColor:"rgb(74, 144, 226)",backgroundColor:"rgba(74, 144, 226, 0.5)"},{label:"Memory (MB)",data:[],borderColor:"rgb(80, 227, 194)",backgroundColor:"rgba(80, 227, 194, 0.5)"}]});(0,s.useEffect)((()=>{if(!n||!n.monit)return;const t=(new Date).toLocaleTimeString(),e=n.monit.cpu||0,i=n.monit.memory?(n.monit.memory/1048576).toFixed(2):0;r((n=>{const r=[...n.labels,t].slice(-20),s=[...n.datasets[0].data,e].slice(-20),o=[...n.datasets[1].data,i].slice(-20);return{labels:r,datasets:[{...n.datasets[0],data:s},{...n.datasets[1],data:o}]}}))}),[n]);const o={responsive:!0,maintainAspectRatio:!1,animation:{duration:250},scales:{y:{beginAtZero:!0,ticks:{callback:function(t){return t}}}},plugins:{legend:{position:"top"},title:{display:!0,text:`Process ${e} Metrics`}}};return(0,qn.jsx)("div",{className:"metrics-chart",children:(0,qn.jsx)("div",{style:{height:"300px"},children:(0,qn.jsx)(uc,{data:i,options:o})})})},dc=t=>{let{process:e,onClose:n}=t;const[i,r]=(0,s.useState)("info");if(!e)return null;const o=t=>{if(!t)return"N/A";return new Date(t).toLocaleString()};return(0,qn.jsx)("div",{className:"process-detail-overlay",children:(0,qn.jsxs)("div",{className:"process-detail-container",children:[(0,qn.jsxs)("div",{className:"process-detail-header",children:[(0,qn.jsxs)("h2",{children:[e.name," (ID: ",e.pm_id,")"]}),(0,qn.jsx)("button",{className:"close-btn",onClick:n,children:"\xd7"})]}),(0,qn.jsxs)("div",{className:"process-detail-tabs",children:[(0,qn.jsx)("button",{className:"tab-btn "+("info"===i?"active":""),onClick:()=>r("info"),children:"Information"}),(0,qn.jsx)("button",{className:"tab-btn "+("metrics"===i?"active":""),onClick:()=>r("metrics"),children:"Metrics"}),(0,qn.jsx)("button",{className:"tab-btn "+("logs"===i?"active":""),onClick:()=>r("logs"),children:"Logs"}),(0,qn.jsx)("button",{className:"tab-btn "+("env"===i?"active":""),onClick:()=>r("env"),children:"Environment"})]}),(0,qn.jsxs)("div",{className:"process-detail-content",children:["info"===i&&(0,qn.jsx)("div",{className:"process-info",children:(0,qn.jsxs)("div",{className:"info-grid",children:[(0,qn.jsxs)("div",{className:"info-item",children:[(0,qn.jsx)("div",{className:"info-label",children:"Status"}),(0,qn.jsx)("div",{className:`info-value status-${e.pm2_env.status}`,children:e.pm2_env.status})]}),(0,qn.jsxs)("div",{className:"info-item",children:[(0,qn.jsx)("div",{className:"info-label",children:"Restarts"}),(0,qn.jsx)("div",{className:"info-value",children:e.pm2_env.restart_time})]}),(0,qn.jsxs)("div",{className:"info-item",children:[(0,qn.jsx)("div",{className:"info-label",children:"Uptime"}),(0,qn.jsx)("div",{className:"info-value",children:"online"===e.pm2_env.status?o(e.pm2_env.pm_uptime):"Not running"})]}),(0,qn.jsxs)("div",{className:"info-item",children:[(0,qn.jsx)("div",{className:"info-label",children:"Created"}),(0,qn.jsx)("div",{className:"info-value",children:o(e.pm2_env.created_at)})]}),(0,qn.jsxs)("div",{className:"info-item",children:[(0,qn.jsx)("div",{className:"info-label",children:"Script"}),(0,qn.jsx)("div",{className:"info-value code",children:e.pm2_env.pm_exec_path})]}),(0,qn.jsxs)("div",{className:"info-item",children:[(0,qn.jsx)("div",{className:"info-label",children:"Working Directory"}),(0,qn.jsx)("div",{className:"info-value code",children:e.pm2_env.pm_cwd})]}),(0,qn.jsxs)("div",{className:"info-item",children:[(0,qn.jsx)("div",{className:"info-label",children:"Interpreter"}),(0,qn.jsx)("div",{className:"info-value",children:e.pm2_env.exec_interpreter})]}),(0,qn.jsxs)("div",{className:"info-item",children:[(0,qn.jsx)("div",{className:"info-label",children:"Watching"}),(0,qn.jsx)("div",{className:"info-value",children:e.pm2_env.watch?"Yes":"No"})]})]})}),"metrics"===i&&(0,qn.jsxs)("div",{className:"process-metrics",children:[(0,qn.jsxs)("div",{className:"current-metrics",children:[(0,qn.jsxs)("div",{className:"metric-item",children:[(0,qn.jsx)("div",{className:"metric-label",children:"CPU Usage"}),(0,qn.jsx)("div",{className:"metric-value",children:e.monit?`${e.monit.cpu}%`:"N/A"})]}),(0,qn.jsxs)("div",{className:"metric-item",children:[(0,qn.jsx)("div",{className:"metric-label",children:"Memory Usage"}),(0,qn.jsx)("div",{className:"metric-value",children:e.monit?(t=>{if(0===t)return"0 B";const e=Math.floor(Math.log(t)/Math.log(1024));return`${(t/Math.pow(1024,e)).toFixed(2)} ${["B","KB","MB","GB"][e]}`})(e.monit.memory):"N/A"})]})]}),(0,qn.jsx)(hc,{processId:e.pm_id,initialData:e})]}),"logs"===i&&(0,qn.jsx)(Yn,{processId:e.pm_id,processName:e.name}),"env"===i&&(0,qn.jsxs)("div",{className:"process-env",children:[(0,qn.jsx)("h3",{children:"Environment Variables"}),e.pm2_env.env?(0,qn.jsx)("div",{className:"env-list",children:Object.entries(e.pm2_env.env).filter((t=>{let[e]=t;return!e.startsWith("_")&&"PATH"!==e})).map((t=>{let[e,n]=t;return(0,qn.jsxs)("div",{className:"env-item",children:[(0,qn.jsx)("div",{className:"env-key",children:e}),(0,qn.jsx)("div",{className:"env-value",children:String(n)})]},e)}))}):(0,qn.jsx)("div",{className:"no-env",children:"No environment variables found."})]})]})]})})},fc=t=>{let{processes:e,onAction:n}=t;const[i,r]=(0,s.useState)(null),o=t=>{if(0===t)return"0 B";const e=Math.floor(Math.log(t)/Math.log(1024));return`${(t/Math.pow(1024,e)).toFixed(2)} ${["B","KB","MB","GB"][e]}`};return(0,qn.jsxs)("div",{className:"card",children:[(0,qn.jsx)("div",{className:"card-header",children:(0,qn.jsx)("h2",{className:"card-title",children:"PM2 Processes"})}),0===e.length?(0,qn.jsxs)("div",{className:"no-processes",children:[(0,qn.jsx)("p",{children:"No PM2 processes found."}),(0,qn.jsx)("p",{children:"Make sure PM2 is running and has active processes."})]}):(0,qn.jsxs)("div",{className:"process-list",children:[(0,qn.jsxs)("div",{className:"process-item header",style:{fontWeight:"bold"},children:[(0,qn.jsx)("div",{children:"Name"}),(0,qn.jsx)("div",{children:"ID"}),(0,qn.jsx)("div",{children:"Status"}),(0,qn.jsx)("div",{children:"CPU"}),(0,qn.jsx)("div",{children:"Memory"}),(0,qn.jsx)("div",{children:"Actions"})]}),e.map((t=>{return(0,qn.jsxs)("div",{className:"process-item",children:[(0,qn.jsx)("div",{className:"process-name",children:t.name}),(0,qn.jsx)("div",{children:t.pm_id}),(0,qn.jsx)("div",{className:"process-status "+(e=t.pm2_env.status,"online"===e?"status-online":"stopped"===e?"status-stopped":"status-errored"),children:t.pm2_env.status}),(0,qn.jsx)("div",{className:"process-cpu",children:t.monit?`${t.monit.cpu}%`:"N/A"}),(0,qn.jsx)("div",{className:"process-memory",children:t.monit?o(t.monit.memory):"N/A"}),(0,qn.jsxs)("div",{className:"process-actions",children:[(0,qn.jsx)("button",{className:"btn btn-info",onClick:()=>(t=>{r(t)})(t),children:"Details"}),"online"===t.pm2_env.status&&(0,qn.jsxs)(qn.Fragment,{children:[(0,qn.jsx)("button",{className:"btn btn-warning",onClick:()=>n(t.pm_id,"restart"),children:"Restart"}),(0,qn.jsx)("button",{className:"btn btn-danger",onClick:()=>n(t.pm_id,"stop"),children:"Stop"})]}),"online"!==t.pm2_env.status&&(0,qn.jsx)("button",{className:"btn btn-success",onClick:()=>n(t.pm_id,"start"),children:"Start"}),(0,qn.jsx)("button",{className:"btn btn-danger",onClick:()=>n(t.pm_id,"delete"),children:"Delete"})]})]},t.pm_id);var e}))]}),i&&(0,qn.jsx)(dc,{process:i,onClose:()=>{r(null)}})]})},pc=t=>{let{metrics:e}=t;const n=t=>{if(0===t)return"0 B";const e=Math.floor(Math.log(t)/Math.log(1024));return`${(t/Math.pow(1024,e)).toFixed(2)} ${["B","KB","MB","GB"][e]}`},i=Math.round(e.memory.used/e.memory.total*100);return(0,qn.jsxs)("div",{className:"card",children:[(0,qn.jsx)("div",{className:"card-header",children:(0,qn.jsx)("h2",{className:"card-title",children:"System Metrics"})}),(0,qn.jsxs)("div",{className:"system-metrics",children:[(0,qn.jsxs)("div",{className:"metric-card",children:[(0,qn.jsx)("div",{className:"metric-label",children:"CPU Cores"}),(0,qn.jsx)("div",{className:"metric-value",children:e.cpus})]}),(0,qn.jsxs)("div",{className:"metric-card",children:[(0,qn.jsx)("div",{className:"metric-label",children:"Load Average (1m)"}),(0,qn.jsx)("div",{className:"metric-value",children:e.loadAvg[0].toFixed(2)})]}),(0,qn.jsxs)("div",{className:"metric-card",children:[(0,qn.jsx)("div",{className:"metric-label",children:"Memory Usage"}),(0,qn.jsxs)("div",{className:"metric-value",children:[i,"%"]}),(0,qn.jsxs)("div",{className:"memory-details",children:[n(e.memory.used)," / ",n(e.memory.total)]}),(0,qn.jsx)("div",{className:"memory-bar",children:(0,qn.jsx)("div",{className:"memory-used",style:{width:`${i}%`}})})]}),(0,qn.jsxs)("div",{className:"metric-card",children:[(0,qn.jsx)("div",{className:"metric-label",children:"System Uptime"}),(0,qn.jsx)("div",{className:"metric-value",children:(t=>{const e=Math.floor(t/86400),n=Math.floor(t%86400/3600);let i="";return e>0&&(i+=`${e}d `),n>0&&(i+=`${n}h `),i+=`${Math.floor(t%3600/60)}m`,i})(e.uptime)})]})]})]})},gc=Tt({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.REACT_APP_API_URL||"http://localhost:3001");const mc=function(){const[t,e]=(0,s.useState)([]),[n,i]=(0,s.useState)([]),[r,o]=(0,s.useState)({loadAvg:[0,0,0],memory:{total:0,free:0,used:0},uptime:0,cpus:0}),[a,l]=(0,s.useState)(""),[c,u]=(0,s.useState)(!0),[h,d]=(0,s.useState)(""),[f,p]=(0,s.useState)("all"),[g,m]=(0,s.useState)(!1);return(0,s.useEffect)((()=>((async()=>{try{const[t,n]=await Promise.all([$n.get("/api/processes"),$n.get("/api/metrics")]);e(t.data),o(n.data),u(!1)}catch(yc){console.error("Error fetching initial data:",yc),l("Failed to connect to the server. Is PM2 running?"),u(!1)}})(),gc.on("processes",(t=>{e(t)})),gc.on("metrics",(t=>{o(t)})),gc.on("connect_error",(()=>{l("Connection to server lost. Trying to reconnect...")})),gc.on("connect",(()=>{l("")})),()=>{gc.off("processes"),gc.off("metrics"),gc.off("connect_error"),gc.off("connect")})),[]),(0,s.useEffect)((()=>{let e=[...t];if("all"!==f&&(e=e.filter((t=>t.pm2_env.status===f))),h.trim()){const t=h.toLowerCase();e=e.filter((e=>e.name.toLowerCase().includes(t)||String(e.pm_id).includes(t)))}i(e)}),[t,h,f]),c?(0,qn.jsx)("div",{className:"loading",children:"Loading PM2 data..."}):(0,qn.jsxs)("div",{className:"App",children:[(0,qn.jsx)("header",{className:"App-header",children:(0,qn.jsxs)("div",{className:"header-content",children:[(0,qn.jsxs)("div",{children:[(0,qn.jsx)("h1",{children:"ezPM2GUI"}),(0,qn.jsx)("p",{children:"A modern PM2 process manager interface"})]}),(0,qn.jsx)("button",{className:"about-button",onClick:()=>{m(!g)},children:g?"Hide About":"About"})]})}),g&&(0,qn.jsxs)("div",{className:"about-section",children:[(0,qn.jsx)("h2",{children:"About ezPM2GUI"}),(0,qn.jsx)("p",{children:"ezPM2GUI is a modern web-based interface for the PM2 process manager."}),(0,qn.jsx)("h3",{children:"Features:"}),(0,qn.jsxs)("ul",{children:[(0,qn.jsx)("li",{children:"Real-time monitoring of PM2 processes"}),(0,qn.jsx)("li",{children:"System resource usage metrics"}),(0,qn.jsx)("li",{children:"Process management (start, stop, restart, delete)"}),(0,qn.jsx)("li",{children:"Process logs and detailed metrics"})]}),(0,qn.jsx)("p",{children:"Version: 1.0.0"}),(0,qn.jsx)("p",{children:(0,qn.jsx)("a",{href:"https://github.com/yourusername/ezpm2gui",target:"_blank",rel:"noopener noreferrer",children:"GitHub Repository"})})]}),a&&(0,qn.jsx)("div",{className:"error-message",children:a}),(0,qn.jsxs)("div",{className:"filters",children:[(0,qn.jsx)("div",{className:"search-box",children:(0,qn.jsx)("input",{type:"text",placeholder:"Search processes...",value:h,onChange:t=>d(t.target.value)})}),(0,qn.jsxs)("div",{className:"status-filter",children:[(0,qn.jsx)("label",{children:"Status:"}),(0,qn.jsxs)("select",{value:f,onChange:t=>p(t.target.value),children:[(0,qn.jsx)("option",{value:"all",children:"All"}),(0,qn.jsx)("option",{value:"online",children:"Online"}),(0,qn.jsx)("option",{value:"stopped",children:"Stopped"}),(0,qn.jsx)("option",{value:"errored",children:"Errored"})]})]})]}),(0,qn.jsxs)("div",{className:"dashboard",children:[(0,qn.jsx)("div",{className:"metrics-panel",children:(0,qn.jsx)(pc,{metrics:r})}),(0,qn.jsxs)("div",{className:"processes-panel",children:[(0,qn.jsx)(fc,{processes:n,onAction:async(t,e)=>{try{await $n.post(`/api/process/${t}/${e}`)}catch(yc){console.error(`Error performing ${e}:`,yc),l(`Failed to ${e} process. ${yc.message}`)}}})," "]})]})]})};o.createRoot(document.getElementById("root")).render((0,qn.jsx)(s.StrictMode,{children:(0,qn.jsx)(mc,{})}))})();
|
|
3
|
-
//# sourceMappingURL=main.dde30e92.js.map
|