anarock-widgets 1.0.192 → 1.0.193
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/dist/index.cjs.js +23 -23
- package/dist/index.es.js +269 -252
- package/dist/index.umd.js +26 -26
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -17,17 +17,17 @@
|
|
|
17
17
|
*/var f1;function YI(){return f1||(f1=1,process.env.NODE_ENV!=="production"&&(function(){var e=k,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),m=Symbol.iterator,h="@@iterator";function g(F){if(F===null||typeof F!="object")return null;var Q=m&&F[m]||F[h];return typeof Q=="function"?Q:null}var b=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function S(F){{for(var Q=arguments.length,le=new Array(Q>1?Q-1:0),we=1;we<Q;we++)le[we-1]=arguments[we];w("error",F,le)}}function w(F,Q,le){{var we=b.ReactDebugCurrentFrame,Ye=we.getStackAddendum();Ye!==""&&(Q+="%s",le=le.concat([Ye]));var st=le.map(function(Ae){return String(Ae)});st.unshift("Warning: "+Q),Function.prototype.apply.call(console[F],console,st)}}var x=!1,_=!1,E=!1,C=!1,D=!1,T;T=Symbol.for("react.module.reference");function j(F){return!!(typeof F=="string"||typeof F=="function"||F===r||F===o||D||F===i||F===c||F===u||C||F===p||x||_||E||typeof F=="object"&&F!==null&&(F.$$typeof===f||F.$$typeof===d||F.$$typeof===a||F.$$typeof===s||F.$$typeof===l||F.$$typeof===T||F.getModuleId!==void 0))}function A(F,Q,le){var we=F.displayName;if(we)return we;var Ye=Q.displayName||Q.name||"";return Ye!==""?le+"("+Ye+")":le}function P(F){return F.displayName||"Context"}function N(F){if(F==null)return null;if(typeof F.tag=="number"&&S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof F=="function")return F.displayName||F.name||null;if(typeof F=="string")return F;switch(F){case r:return"Fragment";case n:return"Portal";case o:return"Profiler";case i:return"StrictMode";case c:return"Suspense";case u:return"SuspenseList"}if(typeof F=="object")switch(F.$$typeof){case s:var Q=F;return P(Q)+".Consumer";case a:var le=F;return P(le._context)+".Provider";case l:return A(F,F.render,"ForwardRef");case d:var we=F.displayName||null;return we!==null?we:N(F.type)||"Memo";case f:{var Ye=F,st=Ye._payload,Ae=Ye._init;try{return N(Ae(st))}catch{return null}}}return null}var M=Object.assign,R=0,L,$,V,z,B,X,q;function re(){}re.__reactDisabledLog=!0;function J(){{if(R===0){L=console.log,$=console.info,V=console.warn,z=console.error,B=console.group,X=console.groupCollapsed,q=console.groupEnd;var F={configurable:!0,enumerable:!0,value:re,writable:!0};Object.defineProperties(console,{info:F,log:F,warn:F,error:F,group:F,groupCollapsed:F,groupEnd:F})}R++}}function ee(){{if(R--,R===0){var F={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:M({},F,{value:L}),info:M({},F,{value:$}),warn:M({},F,{value:V}),error:M({},F,{value:z}),group:M({},F,{value:B}),groupCollapsed:M({},F,{value:X}),groupEnd:M({},F,{value:q})})}R<0&&S("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var oe=b.ReactCurrentDispatcher,se;function fe(F,Q,le){{if(se===void 0)try{throw Error()}catch(Ye){var we=Ye.stack.trim().match(/\n( *(at )?)/);se=we&&we[1]||""}return`
|
|
18
18
|
`+se+F}}var U=!1,K;{var Z=typeof WeakMap=="function"?WeakMap:Map;K=new Z}function I(F,Q){if(!F||U)return"";{var le=K.get(F);if(le!==void 0)return le}var we;U=!0;var Ye=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var st;st=oe.current,oe.current=null,J();try{if(Q){var Ae=function(){throw Error()};if(Object.defineProperty(Ae.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ae,[])}catch(ir){we=ir}Reflect.construct(F,[],Ae)}else{try{Ae.call()}catch(ir){we=ir}F.call(Ae.prototype)}}else{try{throw Error()}catch(ir){we=ir}F()}}catch(ir){if(ir&&we&&typeof ir.stack=="string"){for(var De=ir.stack.split(`
|
|
19
19
|
`),Bn=we.stack.split(`
|
|
20
|
-
`),$t=De.length-1,
|
|
21
|
-
`+De[$t].replace(" at new "," at ");return F.displayName&&Ur.includes("<anonymous>")&&(Ur=Ur.replace("<anonymous>",F.displayName)),typeof F=="function"&&K.set(F,Ur),Ur}while($t>=1&&
|
|
20
|
+
`),$t=De.length-1,Yt=Bn.length-1;$t>=1&&Yt>=0&&De[$t]!==Bn[Yt];)Yt--;for(;$t>=1&&Yt>=0;$t--,Yt--)if(De[$t]!==Bn[Yt]){if($t!==1||Yt!==1)do if($t--,Yt--,Yt<0||De[$t]!==Bn[Yt]){var Ur=`
|
|
21
|
+
`+De[$t].replace(" at new "," at ");return F.displayName&&Ur.includes("<anonymous>")&&(Ur=Ur.replace("<anonymous>",F.displayName)),typeof F=="function"&&K.set(F,Ur),Ur}while($t>=1&&Yt>=0);break}}}finally{U=!1,oe.current=st,ee(),Error.prepareStackTrace=Ye}var Cl=F?F.displayName||F.name:"",us=Cl?fe(Cl):"";return typeof F=="function"&&K.set(F,us),us}function ve(F,Q,le){return I(F,!1)}function te(F){var Q=F.prototype;return!!(Q&&Q.isReactComponent)}function ye(F,Q,le){if(F==null)return"";if(typeof F=="function")return I(F,te(F));if(typeof F=="string")return fe(F);switch(F){case c:return fe("Suspense");case u:return fe("SuspenseList")}if(typeof F=="object")switch(F.$$typeof){case l:return ve(F.render);case d:return ye(F.type,Q,le);case f:{var we=F,Ye=we._payload,st=we._init;try{return ye(st(Ye),Q,le)}catch{}}}return""}var _e=Object.prototype.hasOwnProperty,He={},ut=b.ReactDebugCurrentFrame;function Et(F){if(F){var Q=F._owner,le=ye(F.type,F._source,Q?Q.type:null);ut.setExtraStackFrame(le)}else ut.setExtraStackFrame(null)}function mt(F,Q,le,we,Ye){{var st=Function.call.bind(_e);for(var Ae in F)if(st(F,Ae)){var De=void 0;try{if(typeof F[Ae]!="function"){var Bn=Error((we||"React class")+": "+le+" type `"+Ae+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof F[Ae]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Bn.name="Invariant Violation",Bn}De=F[Ae](Q,Ae,we,le,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch($t){De=$t}De&&!(De instanceof Error)&&(Et(Ye),S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",we||"React class",le,Ae,typeof De),Et(null)),De instanceof Error&&!(De.message in He)&&(He[De.message]=!0,Et(Ye),S("Failed %s type: %s",le,De.message),Et(null))}}}var Je=Array.isArray;function Ft(F){return Je(F)}function Zt(F){{var Q=typeof Symbol=="function"&&Symbol.toStringTag,le=Q&&F[Symbol.toStringTag]||F.constructor.name||"Object";return le}}function wt(F){try{return Cn(F),!1}catch{return!0}}function Cn(F){return""+F}function gn(F){if(wt(F))return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Zt(F)),Cn(F)}var Dn=b.ReactCurrentOwner,nr={key:!0,ref:!0,__self:!0,__source:!0},on,rr;function be(F){if(_e.call(F,"ref")){var Q=Object.getOwnPropertyDescriptor(F,"ref").get;if(Q&&Q.isReactWarning)return!1}return F.ref!==void 0}function An(F){if(_e.call(F,"key")){var Q=Object.getOwnPropertyDescriptor(F,"key").get;if(Q&&Q.isReactWarning)return!1}return F.key!==void 0}function an(F,Q){typeof F.ref=="string"&&Dn.current}function H(F,Q){{var le=function(){on||(on=!0,S("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",Q))};le.isReactWarning=!0,Object.defineProperty(F,"key",{get:le,configurable:!0})}}function ue(F,Q){{var le=function(){rr||(rr=!0,S("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",Q))};le.isReactWarning=!0,Object.defineProperty(F,"ref",{get:le,configurable:!0})}}var G=function(F,Q,le,we,Ye,st,Ae){var De={$$typeof:t,type:F,key:Q,ref:le,props:Ae,_owner:st};return De._store={},Object.defineProperty(De._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(De,"_self",{configurable:!1,enumerable:!1,writable:!1,value:we}),Object.defineProperty(De,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Ye}),Object.freeze&&(Object.freeze(De.props),Object.freeze(De)),De};function pe(F,Q,le,we,Ye){{var st,Ae={},De=null,Bn=null;le!==void 0&&(gn(le),De=""+le),An(Q)&&(gn(Q.key),De=""+Q.key),be(Q)&&(Bn=Q.ref,an(Q,Ye));for(st in Q)_e.call(Q,st)&&!nr.hasOwnProperty(st)&&(Ae[st]=Q[st]);if(F&&F.defaultProps){var $t=F.defaultProps;for(st in $t)Ae[st]===void 0&&(Ae[st]=$t[st])}if(De||Bn){var Yt=typeof F=="function"?F.displayName||F.name||"Unknown":F;De&&H(Ae,Yt),Bn&&ue(Ae,Yt)}return G(F,De,Bn,Ye,we,Dn.current,Ae)}}var ge=b.ReactCurrentOwner,at=b.ReactDebugCurrentFrame;function _t(F){if(F){var Q=F._owner,le=ye(F.type,F._source,Q?Q.type:null);at.setExtraStackFrame(le)}else at.setExtraStackFrame(null)}var Hr;Hr=!1;function la(F){return typeof F=="object"&&F!==null&&F.$$typeof===t}function Yr(){{if(ge.current){var F=N(ge.current.type);if(F)return`
|
|
22
22
|
|
|
23
23
|
Check the render method of \``+F+"`."}return""}}function cs(F){return""}var ko={};function ji(F){{var Q=Yr();if(!Q){var le=typeof F=="string"?F:F.displayName||F.name;le&&(Q=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+le+">.")}return Q}}function xe(F,Q){{if(!F._store||F._store.validated||F.key!=null)return;F._store.validated=!0;var le=ji(Q);if(ko[le])return;ko[le]=!0;var we="";F&&F._owner&&F._owner!==ge.current&&(we=" It was passed a child from "+N(F._owner.type)+"."),_t(F),S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',le,we),_t(null)}}function $n(F,Q){{if(typeof F!="object")return;if(Ft(F))for(var le=0;le<F.length;le++){var we=F[le];la(we)&&xe(we,Q)}else if(la(F))F._store&&(F._store.validated=!0);else if(F){var Ye=g(F);if(typeof Ye=="function"&&Ye!==F.entries)for(var st=Ye.call(F),Ae;!(Ae=st.next()).done;)la(Ae.value)&&xe(Ae.value,Q)}}}function kl(F){{var Q=F.type;if(Q==null||typeof Q=="string")return;var le;if(typeof Q=="function")le=Q.propTypes;else if(typeof Q=="object"&&(Q.$$typeof===l||Q.$$typeof===d))le=Q.propTypes;else return;if(le){var we=N(Q);mt(le,F.props,"prop",we,F)}else if(Q.PropTypes!==void 0&&!Hr){Hr=!0;var Ye=N(Q);S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Ye||"Unknown")}typeof Q.getDefaultProps=="function"&&!Q.getDefaultProps.isReactClassApproved&&S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Wde(F){{for(var Q=Object.keys(F.props),le=0;le<Q.length;le++){var we=Q[le];if(we!=="children"&&we!=="key"){_t(F),S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",we),_t(null);break}}F.ref!==null&&(_t(F),S("Invalid attribute `ref` supplied to `React.Fragment`."),_t(null))}}var zI={};function VI(F,Q,le,we,Ye,st){{var Ae=j(F);if(!Ae){var De="";(F===void 0||typeof F=="object"&&F!==null&&Object.keys(F).length===0)&&(De+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Bn=cs();Bn?De+=Bn:De+=Yr();var $t;F===null?$t="null":Ft(F)?$t="array":F!==void 0&&F.$$typeof===t?($t="<"+(N(F.type)||"Unknown")+" />",De=" Did you accidentally export a JSX literal instead of a component?"):$t=typeof F,S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",$t,De)}var
|
|
25
|
+
Check the top-level render call using <`+le+">.")}return Q}}function xe(F,Q){{if(!F._store||F._store.validated||F.key!=null)return;F._store.validated=!0;var le=ji(Q);if(ko[le])return;ko[le]=!0;var we="";F&&F._owner&&F._owner!==ge.current&&(we=" It was passed a child from "+N(F._owner.type)+"."),_t(F),S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',le,we),_t(null)}}function $n(F,Q){{if(typeof F!="object")return;if(Ft(F))for(var le=0;le<F.length;le++){var we=F[le];la(we)&&xe(we,Q)}else if(la(F))F._store&&(F._store.validated=!0);else if(F){var Ye=g(F);if(typeof Ye=="function"&&Ye!==F.entries)for(var st=Ye.call(F),Ae;!(Ae=st.next()).done;)la(Ae.value)&&xe(Ae.value,Q)}}}function kl(F){{var Q=F.type;if(Q==null||typeof Q=="string")return;var le;if(typeof Q=="function")le=Q.propTypes;else if(typeof Q=="object"&&(Q.$$typeof===l||Q.$$typeof===d))le=Q.propTypes;else return;if(le){var we=N(Q);mt(le,F.props,"prop",we,F)}else if(Q.PropTypes!==void 0&&!Hr){Hr=!0;var Ye=N(Q);S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Ye||"Unknown")}typeof Q.getDefaultProps=="function"&&!Q.getDefaultProps.isReactClassApproved&&S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Wde(F){{for(var Q=Object.keys(F.props),le=0;le<Q.length;le++){var we=Q[le];if(we!=="children"&&we!=="key"){_t(F),S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",we),_t(null);break}}F.ref!==null&&(_t(F),S("Invalid attribute `ref` supplied to `React.Fragment`."),_t(null))}}var zI={};function VI(F,Q,le,we,Ye,st){{var Ae=j(F);if(!Ae){var De="";(F===void 0||typeof F=="object"&&F!==null&&Object.keys(F).length===0)&&(De+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Bn=cs();Bn?De+=Bn:De+=Yr();var $t;F===null?$t="null":Ft(F)?$t="array":F!==void 0&&F.$$typeof===t?($t="<"+(N(F.type)||"Unknown")+" />",De=" Did you accidentally export a JSX literal instead of a component?"):$t=typeof F,S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",$t,De)}var Yt=pe(F,Q,le,Ye,st);if(Yt==null)return Yt;if(Ae){var Ur=Q.children;if(Ur!==void 0)if(we)if(Ft(Ur)){for(var Cl=0;Cl<Ur.length;Cl++)$n(Ur[Cl],F);Object.freeze&&Object.freeze(Ur)}else S("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else $n(Ur,F)}if(_e.call(Q,"key")){var us=N(F),ir=Object.keys(Q).filter(function(Kde){return Kde!=="key"}),l1=ir.length>0?"{key: someKey, "+ir.join(": ..., ")+": ...}":"{key: someKey}";if(!zI[us+l1]){var Ude=ir.length>0?"{"+ir.join(": ..., ")+": ...}":"{}";S(`A props object containing a "key" prop is being spread into JSX:
|
|
26
26
|
let props = %s;
|
|
27
27
|
<%s {...props} />
|
|
28
28
|
React keys must be passed directly to JSX without using spread:
|
|
29
29
|
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,l1,us,Ude,us),zI[us+l1]=!0}}return F===r?Wde(
|
|
30
|
+
<%s key={someKey} {...props} />`,l1,us,Ude,us),zI[us+l1]=!0}}return F===r?Wde(Yt):kl(Yt),Yt}}function zde(F,Q,le){return VI(F,Q,le,!0)}function Vde(F,Q,le){return VI(F,Q,le,!1)}var Hde=Vde,Yde=zde;Al.Fragment=r,Al.jsx=Hde,Al.jsxs=Yde})()),Al}var p1;function UI(){return p1||(p1=1,process.env.NODE_ENV==="production"?Bu.exports=HI():Bu.exports=YI()),Bu.exports}var v=UI();const je=({title:e,icon:t,period:n,children:r,footer:i,className:o="",titleWeight:a,titleColor:s,iconClassName:l,titleClassName:c,childrenClassName:u})=>{const d=a==="semi-bold"?600:500;return v.jsxs("div",{className:`relative bg-white !border-[0.5px] !border-[#EBEBEB] !rounded-[12px] !shadow-[0_0_12px_0_#EAF2FF] p-[16px] flex flex-col gap-[16px] ${o}`,children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsxs("div",{className:`flex items-center gap-[12px] ${l}`,children:[t,v.jsx("div",{style:{fontWeight:d,fontSize:"16px",lineHeight:"20px",color:s||"#121212"},className:`!my-0 ${c||"!text-[16px] !leading-[20px]"}`,children:e})]}),n&&v.jsx("div",{className:"!text-[12px] !leading-[16px] !text-[#64748B]",children:n})]}),v.jsx("div",{className:`flex-1 min-h-0 space-y-[16px] ${u}`,children:r}),i&&v.jsx("div",{className:"mt-3 pt-3 border-t border-gray-100 !text-[12px] text-[#64748B]",children:i})]})},h1=e=>e,KI=(()=>{let e=h1;return{configure(t){e=t},generate(t){return e(t)},reset(){e=h1}}})();function ti(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}function sn(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":ti(7));return e.charAt(0).toUpperCase()+e.slice(1)}function m1(...e){return e.reduce((t,n)=>n==null?t:function(...i){t.apply(this,i),n.apply(this,i)},()=>{})}var Wu={exports:{}},zu={exports:{}},$e={};/** @license React v16.13.1
|
|
31
31
|
* react-is.production.min.js
|
|
32
32
|
*
|
|
33
33
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -124,7 +124,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
|
124
124
|
${i?"bg-[#FBF5FF] text-[#884EA7]":"bg-white text-[#64748B] hover:bg-gray-50"}`,children:[v.jsx(r,{className:"h-[15px] w-[15px] font-bold"}),n.name]},n.name)})})}function p3(e){return Xe({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M384 160c-17.7 0-32-14.3-32-32s14.3-32 32-32l160 0c17.7 0 32 14.3 32 32l0 160c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-82.7L342.6 374.6c-12.5 12.5-32.8 12.5-45.3 0L192 269.3 54.6 406.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l160-160c12.5-12.5 32.8-12.5 45.3 0L320 306.7 466.7 160 384 160z"},child:[]}]})(e)}function h3(e){return Xe({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M151.6 42.4C145.5 35.8 137 32 128 32s-17.5 3.8-23.6 10.4l-88 96c-11.9 13-11.1 33.3 2 45.2s33.3 11.1 45.2-2L96 146.3 96 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-301.7 32.4 35.4c11.9 13 32.2 13.9 45.2 2s13.9-32.2 2-45.2l-88-96zM320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-32 0zm0 128c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0zm0 128c-17.7 0-32 14.3-32 32s14.3 32 32 32l160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-160 0zm0 128c-17.7 0-32 14.3-32 32s14.3 32 32 32l224 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-224 0z"},child:[]}]})(e)}function m3(e){return Xe({attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z"},child:[]}]})(e)}function g3(e){return Xe({attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M182.6 137.4c-12.5-12.5-32.8-12.5-45.3 0l-128 128c-9.2 9.2-11.9 22.9-6.9 34.9s16.6 19.8 29.6 19.8l256 0c12.9 0 24.6-7.8 29.6-19.8s2.2-25.7-6.9-34.9l-128-128z"},child:[]}]})(e)}function v3(e){return Xe({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM232 120l0 136c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2 280 120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"},child:[]}]})(e)}const y3=({color:e})=>v.jsx("span",{style:{display:"inline-block",width:"8px",height:"8px",borderRadius:"50%",backgroundColor:e,marginRight:"6px"}}),ac=({active:e,payload:t,coordinate:n})=>{if(!e||!t||!t.length)return null;const r=60,i=235;let o=n?.y||0;return o+r/2>i&&(o=i-r/2-8),o-r/2<0&&(o=r/2+8),v.jsxs("div",{className:"relative bg-[#121212] text-white text-[12px] px-4 py-2 rounded-lg shadow-lg",style:{transform:`translateY(${o}px) translateY(-50%)`},children:[v.jsx("div",{className:`absolute left-[-6px] top-1/2 -translate-y-1/2 w-0 h-0
|
|
125
125
|
border-t-[6px] border-t-transparent
|
|
126
126
|
border-b-[6px] border-b-transparent
|
|
127
|
-
border-r-[6px] border-r-[#121212]`}),t.map((a,s)=>v.jsxs("div",{className:"flex items-center gap-2 capitalize",children:[a.payload.color&&v.jsx(y3,{color:a.payload.color}),v.jsx("span",{className:"text-[#D1D3D4] min-w-[70px]",children:a?.payload?.name}),v.jsx("span",{className:"font-semibold",children:a.value})]},s))]})},fg=({value:e})=>{const t=typeof e=="string"?parseFloat(e.replace("%","")):e??0,n=t>=0;return v.jsxs("div",{className:`w-fit p-1 rounded text-[10px] leading-[14px] font-medium flex items-center gap-1 ${n?"bg-[#F7FEFA] text-[#1FA05B]":"bg-[#FFF2F2] text-[#AB0000]"}`,children:[n?v.jsx(g3,{}):v.jsx(m3,{}),Math.abs(t).toFixed(1),"%"]})},Sa=({title:e,icon:t,period:n,actionButtons:r,children:i,footer:o,className:a="",titleWeight:s,titleColor:l,headingClassName:c,childrenClassName:u})=>{const d=s==="semi-bold"?600:500;return v.jsxs("div",{className:`relative bg-white !border-[0.5px] !border-[#EBEBEB] !rounded-[12px] !shadow-[0_0_12px_0_#EAF2FF] p-[16px] flex flex-col ${a||"gap-[24px]"}`,children:[v.jsxs("div",{className:`flex items-center justify-between ${c}`,children:[v.jsxs("div",{className:"flex items-center gap-[12px]",children:[t,v.jsx("div",{style:{fontWeight:d,fontSize:"16px",lineHeight:"20px"},className:"!my-0 !text-[16px] !leading-[20px] !text-[#121212]",children:e})]}),v.jsxs("div",{className:"flex items-center gap-2",children:[r&&r,n&&v.jsx("div",{className:"!text-[12px] !leading-[16px] !text-[#64748B]",children:n})]})]}),v.jsx("div",{className:`flex-1 min-h-0 ${u||"space-y-[24px]"}`,children:i}),o&&v.jsx("div",{className:"mt-3 pt-3 border-t border-gray-100 !text-[12px] text-[#64748B]",children:o})]})};function DS(e,t){sessionStorage.setItem(e,t),(e==="community_id"||e==="export"||e==="widget_id")&&window.dispatchEvent(new StorageEvent("dashboard-update",{key:e}))}var pg={},hg={},AS;function b3(){return AS||(AS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==="__proto__"}e.isUnsafeProperty=t})(hg)),hg}var mg={},TS;function MS(){return TS||(TS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){switch(typeof n){case"number":case"symbol":return!1;case"string":return n.includes(".")||n.includes("[")||n.includes("]")}}e.isDeepKey=t})(mg)),mg}var gg={},NS;function jS(){return NS||(NS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="string"||typeof n=="symbol"?n:Object.is(n?.valueOf?.(),-0)?"-0":String(n)}e.toKey=t})(gg)),gg}var vg={},IS;function yg(){return IS||(IS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){const r=[],i=n.length;if(i===0)return r;let o=0,a="",s="",l=!1;for(n.charCodeAt(0)===46&&(r.push(""),o++);o<i;){const c=n[o];s?c==="\\"&&o+1<i?(o++,a+=n[o]):c===s?s="":a+=c:l?c==='"'||c==="'"?s=c:c==="]"?(l=!1,r.push(a),a=""):a+=c:c==="["?(l=!0,a&&(r.push(a),a="")):c==="."?a&&(r.push(a),a=""):a+=c,o++}return a&&r.push(a),r}e.toPath=t})(vg)),vg}var RS;function bg(){return RS||(RS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=b3(),n=MS(),r=jS(),i=yg();function o(s,l,c){if(s==null)return c;switch(typeof l){case"string":{if(t.isUnsafeProperty(l))return c;const u=s[l];return u===void 0?n.isDeepKey(l)?o(s,i.toPath(l),c):c:u}case"number":case"symbol":{typeof l=="number"&&(l=r.toKey(l));const u=s[l];return u===void 0?c:u}default:{if(Array.isArray(l))return a(s,l,c);if(Object.is(l?.valueOf(),-0)?l="-0":l=String(l),t.isUnsafeProperty(l))return c;const u=s[l];return u===void 0?c:u}}}function a(s,l,c){if(l.length===0)return c;let u=s;for(let d=0;d<l.length;d++){if(u==null||t.isUnsafeProperty(l[d]))return c;u=u[l[d]]}return u===void 0?c:u}e.get=o})(pg)),pg}var xg,LS;function x3(){return LS||(LS=1,xg=bg().get),xg}var w3=x3();const Oa=Ri(w3);var Zt=e=>e===0?0:e>0?1:-1,Sn=e=>typeof e=="number"&&e!=+e,Ea=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,he=e=>(typeof e=="number"||e instanceof Number)&&!Sn(e),Pr=e=>he(e)||typeof e=="string",_3=0,sc=e=>{var t=++_3;return"".concat(e||"").concat(t)},On=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!he(t)&&typeof t!="string")return r;var o;if(Ea(t)){if(n==null)return r;var a=t.indexOf("%");o=n*parseFloat(t.slice(0,a))/100}else o=+t;return Sn(o)&&(o=r),i&&n!=null&&o>n&&(o=n),o},FS=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++)if(!n[e[r]])n[e[r]]=!0;else return!0;return!1};function nt(e,t,n){return he(e)&&he(t)?e+n*(t-e):t}function $S(e,t,n){if(!(!e||!e.length))return e.find(r=>r&&(typeof t=="function"?t(r):Oa(r,t))===n)}var ft=e=>e===null||typeof e>"u",lc=e=>ft(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1)),S3=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function wg(e){if(typeof e!="string")return!1;var t=S3;return t.includes(e)}var O3=["viewBox","children"],BS=["points","pathLength"],_g={svg:O3,polygon:BS,polyline:BS},Sg=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var n=e;if(k.isValidElement(e)&&(n=e.props),typeof n!="object"&&typeof n!="function")return null;var r={};return Object.keys(n).forEach(i=>{wg(i)&&(r[i]=(o=>n[i](n,o)))}),r},E3=(e,t,n)=>r=>(e(t,n,r),null),cc=(e,t,n)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var r=null;return Object.keys(e).forEach(i=>{var o=e[i];wg(i)&&typeof o=="function"&&(r||(r={}),r[i]=E3(o,t,n))}),r},P3=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"];function WS(e){if(typeof e!="string")return!1;var t=P3;return t.includes(e)}function kr(e){var t=Object.entries(e).filter(n=>{var[r]=n;return WS(r)});return Object.fromEntries(t)}var zS=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",VS=null,Og=null,HS=e=>{if(e===VS&&Array.isArray(Og))return Og;var t=[];return k.Children.forEach(e,n=>{ft(n)||(Co.isFragment(n)?t=t.concat(HS(n.props.children)):t.push(n))}),Og=t,VS=e,t};function Eg(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(i=>zS(i)):r=[zS(t)],HS(e).forEach(i=>{var o=Oa(i,"type.displayName")||Oa(i,"type.name");r.indexOf(o)!==-1&&n.push(i)}),n}var af=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0,k3=(e,t,n,r)=>{var i;if(typeof t=="symbol"||typeof t=="number")return!0;var o=(i=r&&_g?.[r])!==null&&i!==void 0?i:[],a=t.startsWith("data-"),s=typeof e!="function"&&(!!r&&o.includes(t)||WS(t)),l=!!n&&wg(t);return a||s||l},lt=(e,t,n)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(k.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var i={};return Object.keys(r).forEach(o=>{var a;k3((a=r)===null||a===void 0?void 0:a[o],o,t,n)&&(i[o]=r[o])}),i},C3=["children","width","height","viewBox","className","style","title","desc"];function Pg(){return Pg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pg.apply(null,arguments)}function D3(e,t){if(e==null)return{};var n,r,i=A3(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function A3(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var kg=k.forwardRef((e,t)=>{var{children:n,width:r,height:i,viewBox:o,className:a,style:s,title:l,desc:c}=e,u=D3(e,C3),d=o||{width:r,height:i,x:0,y:0},f=ie("recharts-surface",a);return O.createElement("svg",Pg({},lt(u,!0,"svg"),{className:f,width:r,height:i,style:s,viewBox:"".concat(d.x," ").concat(d.y," ").concat(d.width," ").concat(d.height),ref:t}),O.createElement("title",null,l),O.createElement("desc",null,c),n)}),T3=["children","className"];function Cg(){return Cg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cg.apply(null,arguments)}function M3(e,t){if(e==null)return{};var n,r,i=N3(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function N3(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Ot=O.forwardRef((e,t)=>{var{children:n,className:r}=e,i=M3(e,T3),o=ie("recharts-layer",r);return O.createElement("g",Cg({className:o},lt(i,!0),{ref:t}),n)}),YS=k.createContext(null),j3=()=>k.useContext(YS);function ct(e){return function(){return e}}const US=Math.cos,sf=Math.sin,Xr=Math.sqrt,lf=Math.PI,cf=2*lf,Dg=Math.PI,Ag=2*Dg,Pa=1e-6,I3=Ag-Pa;function KS(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function R3(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return KS;const n=10**t;return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class L3{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?KS:R3(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,o,a){this._append`C${+t},${+n},${+r},${+i},${this._x1=+o},${this._y1=+a}`}arcTo(t,n,r,i,o){if(t=+t,n=+n,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let a=this._x1,s=this._y1,l=r-t,c=i-n,u=a-t,d=s-n,f=u*u+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(f>Pa)if(!(Math.abs(d*l-c*u)>Pa)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let p=r-a,m=i-s,h=l*l+c*c,g=p*p+m*m,b=Math.sqrt(h),S=Math.sqrt(f),w=o*Math.tan((Dg-Math.acos((h+f-g)/(2*b*S)))/2),x=w/S,_=w/b;Math.abs(x-1)>Pa&&this._append`L${t+x*u},${n+x*d}`,this._append`A${o},${o},0,0,${+(d*p>u*m)},${this._x1=t+_*l},${this._y1=n+_*c}`}}arc(t,n,r,i,o,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),l=r*Math.sin(i),c=t+s,u=n+l,d=1^a,f=a?i-o:o-i;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>Pa||Math.abs(this._y1-u)>Pa)&&this._append`L${c},${u}`,r&&(f<0&&(f=f%Ag+Ag),f>I3?this._append`A${r},${r},0,1,${d},${t-s},${n-l}A${r},${r},0,1,${d},${this._x1=c},${this._y1=u}`:f>Pa&&this._append`A${r},${r},0,${+(f>=Dg)},${d},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function Tg(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new L3(t)}function Mg(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function qS(e){this._context=e}qS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function uf(e){return new qS(e)}function GS(e){return e[0]}function XS(e){return e[1]}function QS(e,t){var n=ct(!0),r=null,i=uf,o=null,a=Tg(s);e=typeof e=="function"?e:e===void 0?GS:ct(e),t=typeof t=="function"?t:t===void 0?XS:ct(t);function s(l){var c,u=(l=Mg(l)).length,d,f=!1,p;for(r==null&&(o=i(p=a())),c=0;c<=u;++c)!(c<u&&n(d=l[c],c,l))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+e(d,c,l),+t(d,c,l));if(p)return o=null,p+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:ct(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:ct(+l),s):t},s.defined=function(l){return arguments.length?(n=typeof l=="function"?l:ct(!!l),s):n},s.curve=function(l){return arguments.length?(i=l,r!=null&&(o=i(r)),s):i},s.context=function(l){return arguments.length?(l==null?r=o=null:o=i(r=l),s):r},s}function df(e,t,n){var r=null,i=ct(!0),o=null,a=uf,s=null,l=Tg(c);e=typeof e=="function"?e:e===void 0?GS:ct(+e),t=typeof t=="function"?t:ct(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?XS:ct(+n);function c(d){var f,p,m,h=(d=Mg(d)).length,g,b=!1,S,w=new Array(h),x=new Array(h);for(o==null&&(s=a(S=l())),f=0;f<=h;++f){if(!(f<h&&i(g=d[f],f,d))===b)if(b=!b)p=f,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),m=f-1;m>=p;--m)s.point(w[m],x[m]);s.lineEnd(),s.areaEnd()}b&&(w[f]=+e(g,f,d),x[f]=+t(g,f,d),s.point(r?+r(g,f,d):w[f],n?+n(g,f,d):x[f]))}if(S)return s=null,S+""||null}function u(){return QS().defined(i).curve(a).context(o)}return c.x=function(d){return arguments.length?(e=typeof d=="function"?d:ct(+d),r=null,c):e},c.x0=function(d){return arguments.length?(e=typeof d=="function"?d:ct(+d),c):e},c.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:ct(+d),c):r},c.y=function(d){return arguments.length?(t=typeof d=="function"?d:ct(+d),n=null,c):t},c.y0=function(d){return arguments.length?(t=typeof d=="function"?d:ct(+d),c):t},c.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:ct(+d),c):n},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(n)},c.lineX1=function(){return u().x(r).y(t)},c.defined=function(d){return arguments.length?(i=typeof d=="function"?d:ct(!!d),c):i},c.curve=function(d){return arguments.length?(a=d,o!=null&&(s=a(o)),c):a},c.context=function(d){return arguments.length?(d==null?o=s=null:s=a(o=d),c):o},c}class ZS{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function F3(e){return new ZS(e,!0)}function $3(e){return new ZS(e,!1)}const Ng={draw(e,t){const n=Xr(t/lf);e.moveTo(n,0),e.arc(0,0,n,0,cf)}},B3={draw(e,t){const n=Xr(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},JS=Xr(1/3),W3=JS*2,z3={draw(e,t){const n=Xr(t/W3),r=n*JS;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},V3={draw(e,t){const n=Xr(t),r=-n/2;e.rect(r,r,n,n)}},H3=.8908130915292852,eO=sf(lf/10)/sf(7*lf/10),Y3=sf(cf/10)*eO,U3=-US(cf/10)*eO,K3={draw(e,t){const n=Xr(t*H3),r=Y3*n,i=U3*n;e.moveTo(0,-n),e.lineTo(r,i);for(let o=1;o<5;++o){const a=cf*o/5,s=US(a),l=sf(a);e.lineTo(l*n,-s*n),e.lineTo(s*r-l*i,l*r+s*i)}e.closePath()}},jg=Xr(3),q3={draw(e,t){const n=-Xr(t/(jg*3));e.moveTo(0,n*2),e.lineTo(-jg*n,-n),e.lineTo(jg*n,-n),e.closePath()}},Cr=-.5,Dr=Xr(3)/2,Ig=1/Xr(12),G3=(Ig/2+1)*3,X3={draw(e,t){const n=Xr(t/G3),r=n/2,i=n*Ig,o=r,a=n*Ig+n,s=-o,l=a;e.moveTo(r,i),e.lineTo(o,a),e.lineTo(s,l),e.lineTo(Cr*r-Dr*i,Dr*r+Cr*i),e.lineTo(Cr*o-Dr*a,Dr*o+Cr*a),e.lineTo(Cr*s-Dr*l,Dr*s+Cr*l),e.lineTo(Cr*r+Dr*i,Cr*i-Dr*r),e.lineTo(Cr*o+Dr*a,Cr*a-Dr*o),e.lineTo(Cr*s+Dr*l,Cr*l-Dr*s),e.closePath()}};function Q3(e,t){let n=null,r=Tg(i);e=typeof e=="function"?e:ct(e||Ng),t=typeof t=="function"?t:ct(t===void 0?64:+t);function i(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:ct(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:ct(+o),i):t},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function ff(){}function pf(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function tO(e){this._context=e}tO.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:pf(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:pf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Z3(e){return new tO(e)}function nO(e){this._context=e}nO.prototype={areaStart:ff,areaEnd:ff,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:pf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function J3(e){return new nO(e)}function rO(e){this._context=e}rO.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:pf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function e8(e){return new rO(e)}function iO(e){this._context=e}iO.prototype={areaStart:ff,areaEnd:ff,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function t8(e){return new iO(e)}function oO(e){return e<0?-1:1}function aO(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(oO(o)+oO(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function sO(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Rg(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function hf(e){this._context=e}hf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Rg(this,this._t0,sO(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Rg(this,sO(this,n=aO(this,e,t)),n);break;default:Rg(this,this._t0,n=aO(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function lO(e){this._context=new cO(e)}(lO.prototype=Object.create(hf.prototype)).point=function(e,t){hf.prototype.point.call(this,t,e)};function cO(e){this._context=e}cO.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}};function n8(e){return new hf(e)}function r8(e){return new lO(e)}function uO(e){this._context=e}uO.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=dO(e),i=dO(t),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],e[a],t[a]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function dO(e){var t,n=e.length-1,r,i=new Array(n),o=new Array(n),a=new Array(n);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,o[n-1]=7,a[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/o[t-1],o[t]-=r,a[t]-=r*a[t-1];for(i[n-1]=a[n-1]/o[n-1],t=n-2;t>=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function i8(e){return new uO(e)}function mf(e,t){this._context=e,this._t=t}mf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function o8(e){return new mf(e,.5)}function a8(e){return new mf(e,0)}function s8(e){return new mf(e,1)}function js(e,t){if((a=e.length)>1)for(var n=1,r,i,o=e[t[0]],a,s=o.length;n<a;++n)for(i=o,o=e[t[n]],r=0;r<s;++r)o[r][1]+=o[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function Lg(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function l8(e,t){return e[t]}function c8(e){const t=[];return t.key=e,t}function u8(){var e=ct([]),t=Lg,n=js,r=l8;function i(o){var a=Array.from(e.apply(this,arguments),c8),s,l=a.length,c=-1,u;for(const d of o)for(s=0,++c;s<l;++s)(a[s][c]=[0,+r(d,a[s].key,c,o)]).data=d;for(s=0,u=Mg(t(a));s<l;++s)a[u[s]].index=s;return n(a,u),a}return i.keys=function(o){return arguments.length?(e=typeof o=="function"?o:ct(Array.from(o)),i):e},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:ct(+o),i):r},i.order=function(o){return arguments.length?(t=o==null?Lg:typeof o=="function"?o:ct(Array.from(o)),i):t},i.offset=function(o){return arguments.length?(n=o??js,i):n},i}function d8(e,t){if((r=e.length)>0){for(var n,r,i=0,o=e[0].length,a;i<o;++i){for(a=n=0;n<r;++n)a+=e[n][i][1]||0;if(a)for(n=0;n<r;++n)e[n][i][1]/=a}js(e,t)}}function f8(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,o=r.length;n<o;++n){for(var a=0,s=0;a<i;++a)s+=e[a][n][1]||0;r[n][1]+=r[n][0]=-s/2}js(e,t)}}function p8(e,t){if(!(!((a=e.length)>0)||!((o=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,o,a;r<o;++r){for(var s=0,l=0,c=0;s<a;++s){for(var u=e[t[s]],d=u[r][1]||0,f=u[r-1][1]||0,p=(d-f)/2,m=0;m<s;++m){var h=e[t[m]],g=h[r][1]||0,b=h[r-1][1]||0;p+=g-b}l+=d,c+=p*d}i[r-1][1]+=i[r-1][0]=n,l&&(n-=c/l)}i[r-1][1]+=i[r-1][0]=n,js(e,t)}}var h8=["type","size","sizeType"];function Fg(){return Fg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fg.apply(null,arguments)}function fO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function pO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fO(Object(n),!0).forEach(function(r){m8(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function m8(e,t,n){return(t=g8(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g8(e){var t=v8(e,"string");return typeof t=="symbol"?t:t+""}function v8(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function y8(e,t){if(e==null)return{};var n,r,i=b8(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function b8(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var hO={symbolCircle:Ng,symbolCross:B3,symbolDiamond:z3,symbolSquare:V3,symbolStar:K3,symbolTriangle:q3,symbolWye:X3},x8=Math.PI/180,w8=e=>{var t="symbol".concat(lc(e));return hO[t]||Ng},_8=(e,t,n)=>{if(t==="area")return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var r=18*x8;return 1.25*e*e*(Math.tan(r)-Math.tan(r*2)*Math.tan(r)**2)}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},S8=(e,t)=>{hO["symbol".concat(lc(e))]=t},$g=e=>{var{type:t="circle",size:n=64,sizeType:r="area"}=e,i=y8(e,h8),o=pO(pO({},i),{},{type:t,size:n,sizeType:r}),a="circle";typeof t=="string"&&(a=t);var s=()=>{var f=w8(a),p=Q3().type(f).size(_8(n,r,a));return p()},{className:l,cx:c,cy:u}=o,d=lt(o,!0);return c===+c&&u===+u&&n===+n?O.createElement("path",Fg({},d,{className:ie("recharts-symbols",l),transform:"translate(".concat(c,", ").concat(u,")"),d:s()})):null};$g.registerSymbol=S8;function Bg(){return Bg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bg.apply(null,arguments)}function mO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function O8(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?mO(Object(n),!0).forEach(function(r){Wg(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Wg(e,t,n){return(t=E8(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function E8(e){var t=P8(e,"string");return typeof t=="symbol"?t:t+""}function P8(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ar=32;class zg extends k.PureComponent{renderIcon(t,n){var{inactiveColor:r}=this.props,i=Ar/2,o=Ar/6,a=Ar/3,s=t.inactive?r:t.color,l=n??t.type;if(l==="none")return null;if(l==="plainline")return O.createElement("line",{strokeWidth:4,fill:"none",stroke:s,strokeDasharray:t.payload.strokeDasharray,x1:0,y1:i,x2:Ar,y2:i,className:"recharts-legend-icon"});if(l==="line")return O.createElement("path",{strokeWidth:4,fill:"none",stroke:s,d:"M0,".concat(i,"h").concat(a,`
|
|
127
|
+
border-r-[6px] border-r-[#121212]`}),t.map((a,s)=>v.jsxs("div",{className:"flex items-center gap-2 capitalize",children:[a.payload.color&&v.jsx(y3,{color:a.payload.color}),v.jsx("span",{className:"text-[#D1D3D4] min-w-[70px]",children:a?.payload?.name}),v.jsx("span",{className:"font-semibold",children:a.value})]},s))]})},fg=({value:e})=>{const t=typeof e=="string"?parseFloat(e.replace("%","")):e??0,n=t>=0;return v.jsxs("div",{className:`w-fit p-1 rounded text-[10px] leading-[14px] font-medium flex items-center gap-1 ${n?"bg-[#F7FEFA] text-[#1FA05B]":"bg-[#FFF2F2] text-[#AB0000]"}`,children:[n?v.jsx(g3,{}):v.jsx(m3,{}),Math.abs(t).toFixed(1),"%"]})},Sa=({title:e,icon:t,period:n,actionButtons:r,children:i,footer:o,className:a="",titleWeight:s,titleColor:l,headingClassName:c,childrenClassName:u})=>{const d=s==="semi-bold"?600:500;return v.jsxs("div",{className:`relative bg-white !border-[0.5px] !border-[#EBEBEB] !rounded-[12px] !shadow-[0_0_12px_0_#EAF2FF] p-[16px] flex flex-col ${a||"gap-[24px]"}`,children:[v.jsxs("div",{className:`flex items-center justify-between ${c}`,children:[v.jsxs("div",{className:"flex items-center gap-[12px]",children:[t,v.jsx("div",{style:{fontWeight:d,fontSize:"16px",lineHeight:"20px"},className:"!my-0 !text-[16px] !leading-[20px] !text-[#121212]",children:e})]}),v.jsxs("div",{className:"flex items-center gap-2",children:[r&&r,n&&v.jsx("div",{className:"!text-[12px] !leading-[16px] !text-[#64748B]",children:n})]})]}),v.jsx("div",{className:`flex-1 min-h-0 ${u||"space-y-[24px]"}`,children:i}),o&&v.jsx("div",{className:"mt-3 pt-3 border-t border-gray-100 !text-[12px] text-[#64748B]",children:o})]})};function DS(e,t){sessionStorage.setItem(e,t),(e==="community_id"||e==="export"||e==="widget_id")&&window.dispatchEvent(new StorageEvent("dashboard-update",{key:e}))}var pg={},hg={},AS;function b3(){return AS||(AS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==="__proto__"}e.isUnsafeProperty=t})(hg)),hg}var mg={},TS;function MS(){return TS||(TS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){switch(typeof n){case"number":case"symbol":return!1;case"string":return n.includes(".")||n.includes("[")||n.includes("]")}}e.isDeepKey=t})(mg)),mg}var gg={},NS;function jS(){return NS||(NS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="string"||typeof n=="symbol"?n:Object.is(n?.valueOf?.(),-0)?"-0":String(n)}e.toKey=t})(gg)),gg}var vg={},IS;function yg(){return IS||(IS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){const r=[],i=n.length;if(i===0)return r;let o=0,a="",s="",l=!1;for(n.charCodeAt(0)===46&&(r.push(""),o++);o<i;){const c=n[o];s?c==="\\"&&o+1<i?(o++,a+=n[o]):c===s?s="":a+=c:l?c==='"'||c==="'"?s=c:c==="]"?(l=!1,r.push(a),a=""):a+=c:c==="["?(l=!0,a&&(r.push(a),a="")):c==="."?a&&(r.push(a),a=""):a+=c,o++}return a&&r.push(a),r}e.toPath=t})(vg)),vg}var RS;function bg(){return RS||(RS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=b3(),n=MS(),r=jS(),i=yg();function o(s,l,c){if(s==null)return c;switch(typeof l){case"string":{if(t.isUnsafeProperty(l))return c;const u=s[l];return u===void 0?n.isDeepKey(l)?o(s,i.toPath(l),c):c:u}case"number":case"symbol":{typeof l=="number"&&(l=r.toKey(l));const u=s[l];return u===void 0?c:u}default:{if(Array.isArray(l))return a(s,l,c);if(Object.is(l?.valueOf(),-0)?l="-0":l=String(l),t.isUnsafeProperty(l))return c;const u=s[l];return u===void 0?c:u}}}function a(s,l,c){if(l.length===0)return c;let u=s;for(let d=0;d<l.length;d++){if(u==null||t.isUnsafeProperty(l[d]))return c;u=u[l[d]]}return u===void 0?c:u}e.get=o})(pg)),pg}var xg,LS;function x3(){return LS||(LS=1,xg=bg().get),xg}var w3=x3();const Oa=Ri(w3);var Jt=e=>e===0?0:e>0?1:-1,Sn=e=>typeof e=="number"&&e!=+e,Ea=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,he=e=>(typeof e=="number"||e instanceof Number)&&!Sn(e),Pr=e=>he(e)||typeof e=="string",_3=0,sc=e=>{var t=++_3;return"".concat(e||"").concat(t)},On=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!he(t)&&typeof t!="string")return r;var o;if(Ea(t)){if(n==null)return r;var a=t.indexOf("%");o=n*parseFloat(t.slice(0,a))/100}else o=+t;return Sn(o)&&(o=r),i&&n!=null&&o>n&&(o=n),o},FS=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++)if(!n[e[r]])n[e[r]]=!0;else return!0;return!1};function nt(e,t,n){return he(e)&&he(t)?e+n*(t-e):t}function $S(e,t,n){if(!(!e||!e.length))return e.find(r=>r&&(typeof t=="function"?t(r):Oa(r,t))===n)}var ft=e=>e===null||typeof e>"u",lc=e=>ft(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1)),S3=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function wg(e){if(typeof e!="string")return!1;var t=S3;return t.includes(e)}var O3=["viewBox","children"],BS=["points","pathLength"],_g={svg:O3,polygon:BS,polyline:BS},Sg=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var n=e;if(k.isValidElement(e)&&(n=e.props),typeof n!="object"&&typeof n!="function")return null;var r={};return Object.keys(n).forEach(i=>{wg(i)&&(r[i]=(o=>n[i](n,o)))}),r},E3=(e,t,n)=>r=>(e(t,n,r),null),cc=(e,t,n)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var r=null;return Object.keys(e).forEach(i=>{var o=e[i];wg(i)&&typeof o=="function"&&(r||(r={}),r[i]=E3(o,t,n))}),r},P3=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"];function WS(e){if(typeof e!="string")return!1;var t=P3;return t.includes(e)}function kr(e){var t=Object.entries(e).filter(n=>{var[r]=n;return WS(r)});return Object.fromEntries(t)}var zS=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",VS=null,Og=null,HS=e=>{if(e===VS&&Array.isArray(Og))return Og;var t=[];return k.Children.forEach(e,n=>{ft(n)||(Co.isFragment(n)?t=t.concat(HS(n.props.children)):t.push(n))}),Og=t,VS=e,t};function Eg(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(i=>zS(i)):r=[zS(t)],HS(e).forEach(i=>{var o=Oa(i,"type.displayName")||Oa(i,"type.name");r.indexOf(o)!==-1&&n.push(i)}),n}var af=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0,k3=(e,t,n,r)=>{var i;if(typeof t=="symbol"||typeof t=="number")return!0;var o=(i=r&&_g?.[r])!==null&&i!==void 0?i:[],a=t.startsWith("data-"),s=typeof e!="function"&&(!!r&&o.includes(t)||WS(t)),l=!!n&&wg(t);return a||s||l},lt=(e,t,n)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(k.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var i={};return Object.keys(r).forEach(o=>{var a;k3((a=r)===null||a===void 0?void 0:a[o],o,t,n)&&(i[o]=r[o])}),i},C3=["children","width","height","viewBox","className","style","title","desc"];function Pg(){return Pg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pg.apply(null,arguments)}function D3(e,t){if(e==null)return{};var n,r,i=A3(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function A3(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var kg=k.forwardRef((e,t)=>{var{children:n,width:r,height:i,viewBox:o,className:a,style:s,title:l,desc:c}=e,u=D3(e,C3),d=o||{width:r,height:i,x:0,y:0},f=ie("recharts-surface",a);return O.createElement("svg",Pg({},lt(u,!0,"svg"),{className:f,width:r,height:i,style:s,viewBox:"".concat(d.x," ").concat(d.y," ").concat(d.width," ").concat(d.height),ref:t}),O.createElement("title",null,l),O.createElement("desc",null,c),n)}),T3=["children","className"];function Cg(){return Cg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cg.apply(null,arguments)}function M3(e,t){if(e==null)return{};var n,r,i=N3(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function N3(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Ot=O.forwardRef((e,t)=>{var{children:n,className:r}=e,i=M3(e,T3),o=ie("recharts-layer",r);return O.createElement("g",Cg({className:o},lt(i,!0),{ref:t}),n)}),YS=k.createContext(null),j3=()=>k.useContext(YS);function ct(e){return function(){return e}}const US=Math.cos,sf=Math.sin,Xr=Math.sqrt,lf=Math.PI,cf=2*lf,Dg=Math.PI,Ag=2*Dg,Pa=1e-6,I3=Ag-Pa;function KS(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function R3(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return KS;const n=10**t;return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class L3{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?KS:R3(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,o,a){this._append`C${+t},${+n},${+r},${+i},${this._x1=+o},${this._y1=+a}`}arcTo(t,n,r,i,o){if(t=+t,n=+n,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let a=this._x1,s=this._y1,l=r-t,c=i-n,u=a-t,d=s-n,f=u*u+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(f>Pa)if(!(Math.abs(d*l-c*u)>Pa)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let p=r-a,m=i-s,h=l*l+c*c,g=p*p+m*m,b=Math.sqrt(h),S=Math.sqrt(f),w=o*Math.tan((Dg-Math.acos((h+f-g)/(2*b*S)))/2),x=w/S,_=w/b;Math.abs(x-1)>Pa&&this._append`L${t+x*u},${n+x*d}`,this._append`A${o},${o},0,0,${+(d*p>u*m)},${this._x1=t+_*l},${this._y1=n+_*c}`}}arc(t,n,r,i,o,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),l=r*Math.sin(i),c=t+s,u=n+l,d=1^a,f=a?i-o:o-i;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>Pa||Math.abs(this._y1-u)>Pa)&&this._append`L${c},${u}`,r&&(f<0&&(f=f%Ag+Ag),f>I3?this._append`A${r},${r},0,1,${d},${t-s},${n-l}A${r},${r},0,1,${d},${this._x1=c},${this._y1=u}`:f>Pa&&this._append`A${r},${r},0,${+(f>=Dg)},${d},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function Tg(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new L3(t)}function Mg(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function qS(e){this._context=e}qS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function uf(e){return new qS(e)}function GS(e){return e[0]}function XS(e){return e[1]}function QS(e,t){var n=ct(!0),r=null,i=uf,o=null,a=Tg(s);e=typeof e=="function"?e:e===void 0?GS:ct(e),t=typeof t=="function"?t:t===void 0?XS:ct(t);function s(l){var c,u=(l=Mg(l)).length,d,f=!1,p;for(r==null&&(o=i(p=a())),c=0;c<=u;++c)!(c<u&&n(d=l[c],c,l))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+e(d,c,l),+t(d,c,l));if(p)return o=null,p+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:ct(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:ct(+l),s):t},s.defined=function(l){return arguments.length?(n=typeof l=="function"?l:ct(!!l),s):n},s.curve=function(l){return arguments.length?(i=l,r!=null&&(o=i(r)),s):i},s.context=function(l){return arguments.length?(l==null?r=o=null:o=i(r=l),s):r},s}function df(e,t,n){var r=null,i=ct(!0),o=null,a=uf,s=null,l=Tg(c);e=typeof e=="function"?e:e===void 0?GS:ct(+e),t=typeof t=="function"?t:ct(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?XS:ct(+n);function c(d){var f,p,m,h=(d=Mg(d)).length,g,b=!1,S,w=new Array(h),x=new Array(h);for(o==null&&(s=a(S=l())),f=0;f<=h;++f){if(!(f<h&&i(g=d[f],f,d))===b)if(b=!b)p=f,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),m=f-1;m>=p;--m)s.point(w[m],x[m]);s.lineEnd(),s.areaEnd()}b&&(w[f]=+e(g,f,d),x[f]=+t(g,f,d),s.point(r?+r(g,f,d):w[f],n?+n(g,f,d):x[f]))}if(S)return s=null,S+""||null}function u(){return QS().defined(i).curve(a).context(o)}return c.x=function(d){return arguments.length?(e=typeof d=="function"?d:ct(+d),r=null,c):e},c.x0=function(d){return arguments.length?(e=typeof d=="function"?d:ct(+d),c):e},c.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:ct(+d),c):r},c.y=function(d){return arguments.length?(t=typeof d=="function"?d:ct(+d),n=null,c):t},c.y0=function(d){return arguments.length?(t=typeof d=="function"?d:ct(+d),c):t},c.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:ct(+d),c):n},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(n)},c.lineX1=function(){return u().x(r).y(t)},c.defined=function(d){return arguments.length?(i=typeof d=="function"?d:ct(!!d),c):i},c.curve=function(d){return arguments.length?(a=d,o!=null&&(s=a(o)),c):a},c.context=function(d){return arguments.length?(d==null?o=s=null:s=a(o=d),c):o},c}class ZS{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function F3(e){return new ZS(e,!0)}function $3(e){return new ZS(e,!1)}const Ng={draw(e,t){const n=Xr(t/lf);e.moveTo(n,0),e.arc(0,0,n,0,cf)}},B3={draw(e,t){const n=Xr(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},JS=Xr(1/3),W3=JS*2,z3={draw(e,t){const n=Xr(t/W3),r=n*JS;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},V3={draw(e,t){const n=Xr(t),r=-n/2;e.rect(r,r,n,n)}},H3=.8908130915292852,eO=sf(lf/10)/sf(7*lf/10),Y3=sf(cf/10)*eO,U3=-US(cf/10)*eO,K3={draw(e,t){const n=Xr(t*H3),r=Y3*n,i=U3*n;e.moveTo(0,-n),e.lineTo(r,i);for(let o=1;o<5;++o){const a=cf*o/5,s=US(a),l=sf(a);e.lineTo(l*n,-s*n),e.lineTo(s*r-l*i,l*r+s*i)}e.closePath()}},jg=Xr(3),q3={draw(e,t){const n=-Xr(t/(jg*3));e.moveTo(0,n*2),e.lineTo(-jg*n,-n),e.lineTo(jg*n,-n),e.closePath()}},Cr=-.5,Dr=Xr(3)/2,Ig=1/Xr(12),G3=(Ig/2+1)*3,X3={draw(e,t){const n=Xr(t/G3),r=n/2,i=n*Ig,o=r,a=n*Ig+n,s=-o,l=a;e.moveTo(r,i),e.lineTo(o,a),e.lineTo(s,l),e.lineTo(Cr*r-Dr*i,Dr*r+Cr*i),e.lineTo(Cr*o-Dr*a,Dr*o+Cr*a),e.lineTo(Cr*s-Dr*l,Dr*s+Cr*l),e.lineTo(Cr*r+Dr*i,Cr*i-Dr*r),e.lineTo(Cr*o+Dr*a,Cr*a-Dr*o),e.lineTo(Cr*s+Dr*l,Cr*l-Dr*s),e.closePath()}};function Q3(e,t){let n=null,r=Tg(i);e=typeof e=="function"?e:ct(e||Ng),t=typeof t=="function"?t:ct(t===void 0?64:+t);function i(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:ct(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:ct(+o),i):t},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function ff(){}function pf(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function tO(e){this._context=e}tO.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:pf(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:pf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Z3(e){return new tO(e)}function nO(e){this._context=e}nO.prototype={areaStart:ff,areaEnd:ff,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:pf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function J3(e){return new nO(e)}function rO(e){this._context=e}rO.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:pf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function e8(e){return new rO(e)}function iO(e){this._context=e}iO.prototype={areaStart:ff,areaEnd:ff,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function t8(e){return new iO(e)}function oO(e){return e<0?-1:1}function aO(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(oO(o)+oO(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function sO(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Rg(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function hf(e){this._context=e}hf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Rg(this,this._t0,sO(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Rg(this,sO(this,n=aO(this,e,t)),n);break;default:Rg(this,this._t0,n=aO(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function lO(e){this._context=new cO(e)}(lO.prototype=Object.create(hf.prototype)).point=function(e,t){hf.prototype.point.call(this,t,e)};function cO(e){this._context=e}cO.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}};function n8(e){return new hf(e)}function r8(e){return new lO(e)}function uO(e){this._context=e}uO.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=dO(e),i=dO(t),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],e[a],t[a]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function dO(e){var t,n=e.length-1,r,i=new Array(n),o=new Array(n),a=new Array(n);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,o[n-1]=7,a[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/o[t-1],o[t]-=r,a[t]-=r*a[t-1];for(i[n-1]=a[n-1]/o[n-1],t=n-2;t>=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function i8(e){return new uO(e)}function mf(e,t){this._context=e,this._t=t}mf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function o8(e){return new mf(e,.5)}function a8(e){return new mf(e,0)}function s8(e){return new mf(e,1)}function js(e,t){if((a=e.length)>1)for(var n=1,r,i,o=e[t[0]],a,s=o.length;n<a;++n)for(i=o,o=e[t[n]],r=0;r<s;++r)o[r][1]+=o[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function Lg(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function l8(e,t){return e[t]}function c8(e){const t=[];return t.key=e,t}function u8(){var e=ct([]),t=Lg,n=js,r=l8;function i(o){var a=Array.from(e.apply(this,arguments),c8),s,l=a.length,c=-1,u;for(const d of o)for(s=0,++c;s<l;++s)(a[s][c]=[0,+r(d,a[s].key,c,o)]).data=d;for(s=0,u=Mg(t(a));s<l;++s)a[u[s]].index=s;return n(a,u),a}return i.keys=function(o){return arguments.length?(e=typeof o=="function"?o:ct(Array.from(o)),i):e},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:ct(+o),i):r},i.order=function(o){return arguments.length?(t=o==null?Lg:typeof o=="function"?o:ct(Array.from(o)),i):t},i.offset=function(o){return arguments.length?(n=o??js,i):n},i}function d8(e,t){if((r=e.length)>0){for(var n,r,i=0,o=e[0].length,a;i<o;++i){for(a=n=0;n<r;++n)a+=e[n][i][1]||0;if(a)for(n=0;n<r;++n)e[n][i][1]/=a}js(e,t)}}function f8(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,o=r.length;n<o;++n){for(var a=0,s=0;a<i;++a)s+=e[a][n][1]||0;r[n][1]+=r[n][0]=-s/2}js(e,t)}}function p8(e,t){if(!(!((a=e.length)>0)||!((o=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,o,a;r<o;++r){for(var s=0,l=0,c=0;s<a;++s){for(var u=e[t[s]],d=u[r][1]||0,f=u[r-1][1]||0,p=(d-f)/2,m=0;m<s;++m){var h=e[t[m]],g=h[r][1]||0,b=h[r-1][1]||0;p+=g-b}l+=d,c+=p*d}i[r-1][1]+=i[r-1][0]=n,l&&(n-=c/l)}i[r-1][1]+=i[r-1][0]=n,js(e,t)}}var h8=["type","size","sizeType"];function Fg(){return Fg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fg.apply(null,arguments)}function fO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function pO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fO(Object(n),!0).forEach(function(r){m8(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function m8(e,t,n){return(t=g8(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g8(e){var t=v8(e,"string");return typeof t=="symbol"?t:t+""}function v8(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function y8(e,t){if(e==null)return{};var n,r,i=b8(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function b8(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var hO={symbolCircle:Ng,symbolCross:B3,symbolDiamond:z3,symbolSquare:V3,symbolStar:K3,symbolTriangle:q3,symbolWye:X3},x8=Math.PI/180,w8=e=>{var t="symbol".concat(lc(e));return hO[t]||Ng},_8=(e,t,n)=>{if(t==="area")return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var r=18*x8;return 1.25*e*e*(Math.tan(r)-Math.tan(r*2)*Math.tan(r)**2)}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},S8=(e,t)=>{hO["symbol".concat(lc(e))]=t},$g=e=>{var{type:t="circle",size:n=64,sizeType:r="area"}=e,i=y8(e,h8),o=pO(pO({},i),{},{type:t,size:n,sizeType:r}),a="circle";typeof t=="string"&&(a=t);var s=()=>{var f=w8(a),p=Q3().type(f).size(_8(n,r,a));return p()},{className:l,cx:c,cy:u}=o,d=lt(o,!0);return c===+c&&u===+u&&n===+n?O.createElement("path",Fg({},d,{className:ie("recharts-symbols",l),transform:"translate(".concat(c,", ").concat(u,")"),d:s()})):null};$g.registerSymbol=S8;function Bg(){return Bg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bg.apply(null,arguments)}function mO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function O8(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?mO(Object(n),!0).forEach(function(r){Wg(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Wg(e,t,n){return(t=E8(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function E8(e){var t=P8(e,"string");return typeof t=="symbol"?t:t+""}function P8(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ar=32;class zg extends k.PureComponent{renderIcon(t,n){var{inactiveColor:r}=this.props,i=Ar/2,o=Ar/6,a=Ar/3,s=t.inactive?r:t.color,l=n??t.type;if(l==="none")return null;if(l==="plainline")return O.createElement("line",{strokeWidth:4,fill:"none",stroke:s,strokeDasharray:t.payload.strokeDasharray,x1:0,y1:i,x2:Ar,y2:i,className:"recharts-legend-icon"});if(l==="line")return O.createElement("path",{strokeWidth:4,fill:"none",stroke:s,d:"M0,".concat(i,"h").concat(a,`
|
|
128
128
|
A`).concat(o,",").concat(o,",0,1,1,").concat(2*a,",").concat(i,`
|
|
129
129
|
H`).concat(Ar,"M").concat(2*a,",").concat(i,`
|
|
130
130
|
A`).concat(o,",").concat(o,",0,1,1,").concat(a,",").concat(i),className:"recharts-legend-icon"});if(l==="rect")return O.createElement("path",{stroke:"none",fill:s,d:"M0,".concat(Ar/8,"h").concat(Ar,"v").concat(Ar*3/4,"h").concat(-Ar,"z"),className:"recharts-legend-icon"});if(O.isValidElement(t.legendIcon)){var c=O8({},t);return delete c.legendIcon,O.cloneElement(t.legendIcon,c)}return O.createElement($g,{fill:s,cx:i,cy:i,size:Ar,sizeType:"diameter",type:l})}renderItems(){var{payload:t,iconSize:n,layout:r,formatter:i,inactiveColor:o,iconType:a}=this.props,s={x:0,y:0,width:Ar,height:Ar},l={display:r==="horizontal"?"inline-block":"block",marginRight:10},c={display:"inline-block",verticalAlign:"middle",marginRight:4};return t.map((u,d)=>{var f=u.formatter||i,p=ie({"recharts-legend-item":!0,["legend-item-".concat(d)]:!0,inactive:u.inactive});if(u.type==="none")return null;var m=u.inactive?o:u.color,h=f?f(u.value,u,d):u.value;return O.createElement("li",Bg({className:p,style:l,key:"legend-item-".concat(d)},cc(this.props,u,d)),O.createElement(kg,{width:n,height:n,viewBox:s,style:c,"aria-label":"".concat(h," legend icon")},this.renderIcon(u,a)),O.createElement("span",{className:"recharts-legend-item-text",style:{color:m}},h))})}render(){var{payload:t,layout:n,align:r}=this.props;if(!t||!t.length)return null;var i={padding:0,margin:0,textAlign:n==="horizontal"?r:"left"};return O.createElement("ul",{className:"recharts-default-legend",style:i},this.renderItems())}}Wg(zg,"displayName","Legend"),Wg(zg,"defaultProps",{align:"center",iconSize:14,inactiveColor:"#ccc",layout:"horizontal",verticalAlign:"middle"});var Vg={},Hg={},gO;function k8(){return gO||(gO=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){const i=new Map;for(let o=0;o<n.length;o++){const a=n[o],s=r(a);i.has(s)||i.set(s,a)}return Array.from(i.values())}e.uniqBy=t})(Hg)),Hg}var Yg={},vO;function yO(){return vO||(vO=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n}e.identity=t})(Yg)),Yg}var Ug={},Kg={},qg={},bO;function C8(){return bO||(bO=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Number.isSafeInteger(n)&&n>=0}e.isLength=t})(qg)),qg}var xO;function Gg(){return xO||(xO=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=C8();function n(r){return r!=null&&typeof r!="function"&&t.isLength(r.length)}e.isArrayLike=n})(Kg)),Kg}var Xg={},wO;function D8(){return wO||(wO=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="object"&&n!==null}e.isObjectLike=t})(Xg)),Xg}var _O;function A8(){return _O||(_O=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Gg(),n=D8();function r(i){return n.isObjectLike(i)&&t.isArrayLike(i)}e.isArrayLikeObject=r})(Ug)),Ug}var Qg={},Zg={},SO;function T8(){return SO||(SO=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=bg();function n(r){return function(i){return t.get(i,r)}}e.property=n})(Zg)),Zg}var Jg={},ev={},tv={},nv={},OO;function EO(){return OO||(OO=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n!==null&&(typeof n=="object"||typeof n=="function")}e.isObject=t})(nv)),nv}var rv={},PO;function kO(){return PO||(PO=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==null||typeof n!="object"&&typeof n!="function"}e.isPrimitive=t})(rv)),rv}var iv={},CO;function DO(){return CO||(CO=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){return n===r||Number.isNaN(n)&&Number.isNaN(r)}e.eq=t})(iv)),iv}var AO;function M8(){return AO||(AO=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ov(),n=EO(),r=kO(),i=DO();function o(d,f,p){return typeof p!="function"?t.isMatch(d,f):a(d,f,function m(h,g,b,S,w,x){const _=p(h,g,b,S,w,x);return _!==void 0?!!_:a(h,g,m,x)},new Map)}function a(d,f,p,m){if(f===d)return!0;switch(typeof f){case"object":return s(d,f,p,m);case"function":return Object.keys(f).length>0?a(d,{...f},p,m):i.eq(d,f);default:return n.isObject(d)?typeof f=="string"?f==="":!0:i.eq(d,f)}}function s(d,f,p,m){if(f==null)return!0;if(Array.isArray(f))return c(d,f,p,m);if(f instanceof Map)return l(d,f,p,m);if(f instanceof Set)return u(d,f,p,m);const h=Object.keys(f);if(d==null)return h.length===0;if(h.length===0)return!0;if(m&&m.has(f))return m.get(f)===d;m&&m.set(f,d);try{for(let g=0;g<h.length;g++){const b=h[g];if(!r.isPrimitive(d)&&!(b in d)||f[b]===void 0&&d[b]!==void 0||f[b]===null&&d[b]!==null||!p(d[b],f[b],b,d,f,m))return!1}return!0}finally{m&&m.delete(f)}}function l(d,f,p,m){if(f.size===0)return!0;if(!(d instanceof Map))return!1;for(const[h,g]of f.entries()){const b=d.get(h);if(p(b,g,h,d,f,m)===!1)return!1}return!0}function c(d,f,p,m){if(f.length===0)return!0;if(!Array.isArray(d))return!1;const h=new Set;for(let g=0;g<f.length;g++){const b=f[g];let S=!1;for(let w=0;w<d.length;w++){if(h.has(w))continue;const x=d[w];let _=!1;if(p(x,b,g,d,f,m)&&(_=!0),_){h.add(w),S=!0;break}}if(!S)return!1}return!0}function u(d,f,p,m){return f.size===0?!0:d instanceof Set?c([...d],[...f],p,m):!1}e.isMatchWith=o,e.isSetMatch=u})(tv)),tv}var TO;function ov(){return TO||(TO=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=M8();function n(r,i){return t.isMatchWith(r,i,()=>{})}e.isMatch=n})(ev)),ev}var av={},sv={},lv={},MO;function N8(){return MO||(MO=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Object.getOwnPropertySymbols(n).filter(r=>Object.prototype.propertyIsEnumerable.call(n,r))}e.getSymbols=t})(lv)),lv}var cv={},NO;function jO(){return NO||(NO=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}e.getTag=t})(cv)),cv}var uv={},IO;function RO(){return IO||(IO=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t="[object RegExp]",n="[object String]",r="[object Number]",i="[object Boolean]",o="[object Arguments]",a="[object Symbol]",s="[object Date]",l="[object Map]",c="[object Set]",u="[object Array]",d="[object Function]",f="[object ArrayBuffer]",p="[object Object]",m="[object Error]",h="[object DataView]",g="[object Uint8Array]",b="[object Uint8ClampedArray]",S="[object Uint16Array]",w="[object Uint32Array]",x="[object BigUint64Array]",_="[object Int8Array]",E="[object Int16Array]",C="[object Int32Array]",D="[object BigInt64Array]",T="[object Float32Array]",j="[object Float64Array]";e.argumentsTag=o,e.arrayBufferTag=f,e.arrayTag=u,e.bigInt64ArrayTag=D,e.bigUint64ArrayTag=x,e.booleanTag=i,e.dataViewTag=h,e.dateTag=s,e.errorTag=m,e.float32ArrayTag=T,e.float64ArrayTag=j,e.functionTag=d,e.int16ArrayTag=E,e.int32ArrayTag=C,e.int8ArrayTag=_,e.mapTag=l,e.numberTag=r,e.objectTag=p,e.regexpTag=t,e.setTag=c,e.stringTag=n,e.symbolTag=a,e.uint16ArrayTag=S,e.uint32ArrayTag=w,e.uint8ArrayTag=g,e.uint8ClampedArrayTag=b})(uv)),uv}var dv={},LO;function j8(){return LO||(LO=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}e.isTypedArray=t})(dv)),dv}var FO;function $O(){return FO||(FO=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=N8(),n=jO(),r=RO(),i=kO(),o=j8();function a(u,d){return s(u,void 0,u,new Map,d)}function s(u,d,f,p=new Map,m=void 0){const h=m?.(u,d,f,p);if(h!==void 0)return h;if(i.isPrimitive(u))return u;if(p.has(u))return p.get(u);if(Array.isArray(u)){const g=new Array(u.length);p.set(u,g);for(let b=0;b<u.length;b++)g[b]=s(u[b],b,f,p,m);return Object.hasOwn(u,"index")&&(g.index=u.index),Object.hasOwn(u,"input")&&(g.input=u.input),g}if(u instanceof Date)return new Date(u.getTime());if(u instanceof RegExp){const g=new RegExp(u.source,u.flags);return g.lastIndex=u.lastIndex,g}if(u instanceof Map){const g=new Map;p.set(u,g);for(const[b,S]of u)g.set(b,s(S,b,f,p,m));return g}if(u instanceof Set){const g=new Set;p.set(u,g);for(const b of u)g.add(s(b,void 0,f,p,m));return g}if(typeof Buffer<"u"&&Buffer.isBuffer(u))return u.subarray();if(o.isTypedArray(u)){const g=new(Object.getPrototypeOf(u)).constructor(u.length);p.set(u,g);for(let b=0;b<u.length;b++)g[b]=s(u[b],b,f,p,m);return g}if(u instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&u instanceof SharedArrayBuffer)return u.slice(0);if(u instanceof DataView){const g=new DataView(u.buffer.slice(0),u.byteOffset,u.byteLength);return p.set(u,g),l(g,u,f,p,m),g}if(typeof File<"u"&&u instanceof File){const g=new File([u],u.name,{type:u.type});return p.set(u,g),l(g,u,f,p,m),g}if(u instanceof Blob){const g=new Blob([u],{type:u.type});return p.set(u,g),l(g,u,f,p,m),g}if(u instanceof Error){const g=new u.constructor;return p.set(u,g),g.message=u.message,g.name=u.name,g.stack=u.stack,g.cause=u.cause,l(g,u,f,p,m),g}if(typeof u=="object"&&c(u)){const g=Object.create(Object.getPrototypeOf(u));return p.set(u,g),l(g,u,f,p,m),g}return u}function l(u,d,f=u,p,m){const h=[...Object.keys(d),...t.getSymbols(d)];for(let g=0;g<h.length;g++){const b=h[g],S=Object.getOwnPropertyDescriptor(u,b);(S==null||S.writable)&&(u[b]=s(d[b],b,f,p,m))}}function c(u){switch(n.getTag(u)){case r.argumentsTag:case r.arrayTag:case r.arrayBufferTag:case r.dataViewTag:case r.booleanTag:case r.dateTag:case r.float32ArrayTag:case r.float64ArrayTag:case r.int8ArrayTag:case r.int16ArrayTag:case r.int32ArrayTag:case r.mapTag:case r.numberTag:case r.objectTag:case r.regexpTag:case r.setTag:case r.stringTag:case r.symbolTag:case r.uint8ArrayTag:case r.uint8ClampedArrayTag:case r.uint16ArrayTag:case r.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=a,e.cloneDeepWithImpl=s,e.copyProperties=l})(sv)),sv}var BO;function I8(){return BO||(BO=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=$O();function n(r){return t.cloneDeepWithImpl(r,void 0,r,new Map,void 0)}e.cloneDeep=n})(av)),av}var WO;function R8(){return WO||(WO=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ov(),n=I8();function r(i){return i=n.cloneDeep(i),o=>t.isMatch(o,i)}e.matches=r})(Jg)),Jg}var fv={},pv={},hv={},zO;function L8(){return zO||(zO=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=$O(),n=RO();function r(i,o){return t.cloneDeepWith(i,(a,s,l,c)=>{const u=o?.(a,s,l,c);if(u!==void 0)return u;if(typeof i=="object")switch(Object.prototype.toString.call(i)){case n.numberTag:case n.stringTag:case n.booleanTag:{const d=new i.constructor(i?.valueOf());return t.copyProperties(d,i),d}case n.argumentsTag:{const d={};return t.copyProperties(d,i),d.length=i.length,d[Symbol.iterator]=i[Symbol.iterator],d}default:return}})}e.cloneDeepWith=r})(hv)),hv}var VO;function F8(){return VO||(VO=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=L8();function n(r){return t.cloneDeepWith(r)}e.cloneDeep=n})(pv)),pv}var mv={},gv={},HO;function YO(){return HO||(HO=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;function n(r,i=Number.MAX_SAFE_INTEGER){switch(typeof r){case"number":return Number.isInteger(r)&&r>=0&&r<i;case"symbol":return!1;case"string":return t.test(r)}}e.isIndex=n})(gv)),gv}var vv={},UO;function $8(){return UO||(UO=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=jO();function n(r){return r!==null&&typeof r=="object"&&t.getTag(r)==="[object Arguments]"}e.isArguments=n})(vv)),vv}var KO;function B8(){return KO||(KO=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=MS(),n=YO(),r=$8(),i=yg();function o(a,s){let l;if(Array.isArray(s)?l=s:typeof s=="string"&&t.isDeepKey(s)&&a?.[s]==null?l=i.toPath(s):l=[s],l.length===0)return!1;let c=a;for(let u=0;u<l.length;u++){const d=l[u];if((c==null||!Object.hasOwn(c,d))&&!((Array.isArray(c)||r.isArguments(c))&&n.isIndex(d)&&d<c.length))return!1;c=c[d]}return!0}e.has=o})(mv)),mv}var qO;function W8(){return qO||(qO=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ov(),n=jS(),r=F8(),i=bg(),o=B8();function a(s,l){switch(typeof s){case"object":{Object.is(s?.valueOf(),-0)&&(s="-0");break}case"number":{s=n.toKey(s);break}}return l=r.cloneDeep(l),function(c){const u=i.get(c,s);return u===void 0?o.has(c,s):l===void 0?u===void 0:t.isMatch(u,l)}}e.matchesProperty=a})(fv)),fv}var GO;function z8(){return GO||(GO=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=yO(),n=T8(),r=R8(),i=W8();function o(a){if(a==null)return t.identity;switch(typeof a){case"function":return a;case"object":return Array.isArray(a)&&a.length===2?i.matchesProperty(a[0],a[1]):r.matches(a);case"string":case"symbol":case"number":return n.property(a)}}e.iteratee=o})(Qg)),Qg}var XO;function V8(){return XO||(XO=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=k8(),n=yO(),r=A8(),i=z8();function o(a,s=n.identity){return r.isArrayLikeObject(a)?t.uniqBy(Array.from(a),i.iteratee(s)):[]}e.uniqBy=o})(Vg)),Vg}var yv,QO;function H8(){return QO||(QO=1,yv=V8().uniqBy),yv}var Y8=H8();const ZO=Ri(Y8);function JO(e,t,n){return t===!0?ZO(e,n):typeof t=="function"?ZO(e,t):e}var gf={exports:{}},bv={},vf={exports:{}},xv={};/**
|
|
@@ -173,7 +173,7 @@ Take a look at the logic that dispatched this action: `,p,`
|
|
|
173
173
|
(See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)`,`
|
|
174
174
|
(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)`)}}),s||(h.measureTime(()=>{const g=d.getState(),b=Hv(g,"",t,n,o,u);if(b){const{keyPath:S,value:w}=b;console.error(`A non-serializable value was detected in the state, in the path: \`${S}\`. Value:`,w,`
|
|
175
175
|
Take a look at the reducer(s) handling this action type: ${p.type}.
|
|
176
|
-
(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}}),h.warnIfExceeded()),m}}}function Tf(e){return typeof e=="boolean"}var tz=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let a=new WE;if(n&&(Tf(n)?a.push(HW):a.push(YW(n.extraArgument))),process.env.NODE_ENV!=="production"){if(r){let s={};Tf(r)||(s=r),a.unshift(JW(s))}if(i){let s={};Tf(i)||(s=i),a.push(ez(s))}if(o){let s={};Tf(o)||(s=o),a.unshift(XW(s))}}return a},nz="RTK_autoBatch",KE=e=>t=>{setTimeout(t,e)},rz=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,o=!1,a=!1;const s=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:KE(10):e.type==="callback"?e.queueNotification:KE(e.timeout),c=()=>{a=!1,o&&(o=!1,s.forEach(u=>u()))};return Object.assign({},r,{subscribe(u){const d=()=>i&&u(),f=r.subscribe(d);return s.add(u),()=>{f(),s.delete(u)}},dispatch(u){try{return i=!u?.meta?.[nz],o=!i,o&&(a||(a=!0,l(c))),r.dispatch(u)}finally{i=!0}}})},iz=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new WE(e);return r&&i.push(rz(typeof r=="object"?r:void 0)),i};function oz(e){const t=tz(),{reducer:n=void 0,middleware:r,devTools:i=!0,duplicateMiddlewareCheck:o=!0,preloadedState:a=void 0,enhancers:s=void 0}=e||{};let l;if(typeof n=="function")l=n;else if(uc(n))l=PE(n);else throw new Error(process.env.NODE_ENV==="production"?Fe(1):"`reducer` is a required argument, and must be a function or an object of functions that can be passed to combineReducers");if(process.env.NODE_ENV!=="production"&&r&&typeof r!="function")throw new Error(process.env.NODE_ENV==="production"?Fe(2):"`middleware` field must be a callback");let c;if(typeof r=="function"){if(c=r(t),process.env.NODE_ENV!=="production"&&!Array.isArray(c))throw new Error(process.env.NODE_ENV==="production"?Fe(3):"when using a middleware builder function, an array of middleware must be returned")}else c=t();if(process.env.NODE_ENV!=="production"&&c.some(h=>typeof h!="function"))throw new Error(process.env.NODE_ENV==="production"?Fe(4):"each middleware provided to configureStore must be a function");if(process.env.NODE_ENV!=="production"&&o){let h=new Set;c.forEach(g=>{if(h.has(g))throw new Error(process.env.NODE_ENV==="production"?Fe(42):"Duplicate middleware references found when creating the store. Ensure that each middleware is only included once.");h.add(g)})}let u=_f;i&&(u=UW({trace:process.env.NODE_ENV!=="production",...typeof i=="object"&&i}));const d=NW(...c),f=iz(d);if(process.env.NODE_ENV!=="production"&&s&&typeof s!="function")throw new Error(process.env.NODE_ENV==="production"?Fe(5):"`enhancers` field must be a callback");let p=typeof s=="function"?s(f):f();if(process.env.NODE_ENV!=="production"&&!Array.isArray(p))throw new Error(process.env.NODE_ENV==="production"?Fe(6):"`enhancers` callback must return an array");if(process.env.NODE_ENV!=="production"&&p.some(h=>typeof h!="function"))throw new Error(process.env.NODE_ENV==="production"?Fe(7):"each enhancer provided to configureStore must be a function");process.env.NODE_ENV!=="production"&&c.length&&!p.includes(d)&&console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");const m=u(...p);return OE(l,a,m)}function qE(e){const t={},n=[];let r;const i={addCase(o,a){if(process.env.NODE_ENV!=="production"){if(n.length>0)throw new Error(process.env.NODE_ENV==="production"?Fe(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(r)throw new Error(process.env.NODE_ENV==="production"?Fe(27):"`builder.addCase` should only be called before calling `builder.addDefaultCase`")}const s=typeof o=="string"?o:o.type;if(!s)throw new Error(process.env.NODE_ENV==="production"?Fe(28):"`builder.addCase` cannot be called with an empty action type");if(s in t)throw new Error(process.env.NODE_ENV==="production"?Fe(29):`\`builder.addCase\` cannot be called with two reducers for the same action type '${s}'`);return t[s]=a,i},addAsyncThunk(o,a){if(process.env.NODE_ENV!=="production"&&r)throw new Error(process.env.NODE_ENV==="production"?Fe(43):"`builder.addAsyncThunk` should only be called before calling `builder.addDefaultCase`");return a.pending&&(t[o.pending.type]=a.pending),a.rejected&&(t[o.rejected.type]=a.rejected),a.fulfilled&&(t[o.fulfilled.type]=a.fulfilled),a.settled&&n.push({matcher:o.settled,reducer:a.settled}),i},addMatcher(o,a){if(process.env.NODE_ENV!=="production"&&r)throw new Error(process.env.NODE_ENV==="production"?Fe(30):"`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return n.push({matcher:o,reducer:a}),i},addDefaultCase(o){if(process.env.NODE_ENV!=="production"&&r)throw new Error(process.env.NODE_ENV==="production"?Fe(31):"`builder.addDefaultCase` can only be called once");return r=o,i}};return e(i),[t,n,r]}function az(e){return typeof e=="function"}function sz(e,t){if(process.env.NODE_ENV!=="production"&&typeof t=="object")throw new Error(process.env.NODE_ENV==="production"?Fe(8):"The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");let[n,r,i]=qE(t),o;if(az(e))o=()=>zE(e());else{const s=zE(e);o=()=>s}function a(s=o(),l){let c=[n[l.type],...r.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return c.filter(u=>!!u).length===0&&(c=[i]),c.reduce((u,d)=>{if(d)if(Ca(u)){const p=d(u,l);return p===void 0?u:p}else{if(Xi(u))return FE(u,f=>d(f,l));{const f=d(u,l);if(f===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return f}}return u},s)}return a.getInitialState=o,a}var lz="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",cz=(e=21)=>{let t="",n=e;for(;n--;)t+=lz[Math.random()*64|0];return t},uz=Symbol.for("rtk-slice-createasyncthunk");function dz(e,t){return`${e}/${t}`}function fz({creators:e}={}){const t=e?.asyncThunk?.[uz];return function(r){const{name:i,reducerPath:o=i}=r;if(!i)throw new Error(process.env.NODE_ENV==="production"?Fe(11):"`name` is a required option for createSlice");typeof process<"u"&&process.env.NODE_ENV==="development"&&r.initialState===void 0&&console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");const a=(typeof r.reducers=="function"?r.reducers(hz()):r.reducers)||{},s=Object.keys(a),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(w,x){const _=typeof w=="string"?w:w.type;if(!_)throw new Error(process.env.NODE_ENV==="production"?Fe(12):"`context.addCase` cannot be called with an empty action type");if(_ in l.sliceCaseReducersByType)throw new Error(process.env.NODE_ENV==="production"?Fe(13):"`context.addCase` cannot be called with two reducers for the same action type: "+_);return l.sliceCaseReducersByType[_]=x,c},addMatcher(w,x){return l.sliceMatchers.push({matcher:w,reducer:x}),c},exposeAction(w,x){return l.actionCreators[w]=x,c},exposeCaseReducer(w,x){return l.sliceCaseReducersByName[w]=x,c}};s.forEach(w=>{const x=a[w],_={reducerName:w,type:dz(i,w),createNotation:typeof r.reducers=="function"};gz(x)?yz(_,x,c,t):mz(_,x,c)});function u(){if(process.env.NODE_ENV!=="production"&&typeof r.extraReducers=="object")throw new Error(process.env.NODE_ENV==="production"?Fe(14):"The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice");const[w={},x=[],_=void 0]=typeof r.extraReducers=="function"?qE(r.extraReducers):[r.extraReducers],E={...w,...l.sliceCaseReducersByType};return sz(r.initialState,C=>{for(let D in E)C.addCase(D,E[D]);for(let D of l.sliceMatchers)C.addMatcher(D.matcher,D.reducer);for(let D of x)C.addMatcher(D.matcher,D.reducer);_&&C.addDefaultCase(_)})}const d=w=>w,f=new Map,p=new WeakMap;let m;function h(w,x){return m||(m=u()),m(w,x)}function g(){return m||(m=u()),m.getInitialState()}function b(w,x=!1){function _(C){let D=C[w];if(typeof D>"u"){if(x)D=Af(p,_,g);else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?Fe(15):"selectSlice returned undefined for an uninjected slice reducer")}return D}function E(C=d){const D=Af(f,x,()=>new WeakMap);return Af(D,C,()=>{const T={};for(const[j,A]of Object.entries(r.selectors??{}))T[j]=pz(A,C,()=>Af(p,C,g),x);return T})}return{reducerPath:w,getSelectors:E,get selectors(){return E(_)},selectSlice:_}}const S={name:i,reducer:h,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:g,...b(o),injectInto(w,{reducerPath:x,..._}={}){const E=x??o;return w.inject({reducerPath:E,reducer:h},_),{...S,...b(E,!0)}}};return S}}function pz(e,t,n,r){function i(o,...a){let s=t(o);if(typeof s>"u"){if(r)s=n();else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?Fe(16):"selectState returned undefined for an uninjected slice reducer")}return e(s,...a)}return i.unwrapped=e,i}var dr=fz();function hz(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function mz({type:e,reducerName:t,createNotation:n},r,i){let o,a;if("reducer"in r){if(n&&!vz(r))throw new Error(process.env.NODE_ENV==="production"?Fe(17):"Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");o=r.reducer,a=r.prepare}else o=r;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,a?Tr(e,a):Tr(e))}function gz(e){return e._reducerDefinitionType==="asyncThunk"}function vz(e){return e._reducerDefinitionType==="reducerWithPrepare"}function yz({type:e,reducerName:t},n,r,i){if(!i)throw new Error(process.env.NODE_ENV==="production"?Fe(18):"Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");const{payloadCreator:o,fulfilled:a,pending:s,rejected:l,settled:c,options:u}=n,d=i(e,o,u);r.exposeAction(t,d),a&&r.addCase(d.fulfilled,a),s&&r.addCase(d.pending,s),l&&r.addCase(d.rejected,l),c&&r.addMatcher(d.settled,c),r.exposeCaseReducer(t,{fulfilled:a||Mf,pending:s||Mf,rejected:l||Mf,settled:c||Mf})}function Mf(){}var bz="task",GE="listener",XE="completed",Yv="cancelled",xz=`task-${Yv}`,wz=`task-${XE}`,Uv=`${GE}-${Yv}`,_z=`${GE}-${XE}`,Nf=class{constructor(e){this.code=e,this.message=`${bz} ${Yv} (reason: ${e})`}name="TaskAbortError";message},Kv=(e,t)=>{if(typeof e!="function")throw new TypeError(process.env.NODE_ENV==="production"?Fe(32):`${t} is not a function`)},jf=()=>{},QE=(e,t=jf)=>(e.catch(t),e),ZE=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),Ta=(e,t)=>{const n=e.signal;n.aborted||("reason"in n||Object.defineProperty(n,"reason",{enumerable:!0,value:t,configurable:!0,writable:!0}),e.abort(t))},Ma=e=>{if(e.aborted){const{reason:t}=e;throw new Nf(t)}};function JE(e,t){let n=jf;return new Promise((r,i)=>{const o=()=>i(new Nf(e.reason));if(e.aborted){o();return}n=ZE(e,o),t.finally(()=>n()).then(r,i)}).finally(()=>{n=jf})}var Sz=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(n){return{status:n instanceof Nf?"cancelled":"rejected",error:n}}finally{t?.()}},If=e=>t=>QE(JE(e,t).then(n=>(Ma(e),n))),e2=e=>{const t=If(e);return n=>t(new Promise(r=>setTimeout(r,n)))},{assign:Rs}=Object,t2={},hc="listenerMiddleware",Oz=(e,t)=>{const n=r=>ZE(e,()=>Ta(r,e.reason));return(r,i)=>{Kv(r,"taskExecutor");const o=new AbortController;n(o);const a=Sz(async()=>{Ma(e),Ma(o.signal);const s=await r({pause:If(o.signal),delay:e2(o.signal),signal:o.signal});return Ma(o.signal),s},()=>Ta(o,wz));return i?.autoJoin&&t.push(a.catch(jf)),{result:If(e)(a),cancel(){Ta(o,xz)}}}},Ez=(e,t)=>{const n=async(r,i)=>{Ma(t);let o=()=>{};const s=[new Promise((l,c)=>{let u=e({predicate:r,effect:(d,f)=>{f.unsubscribe(),l([d,f.getState(),f.getOriginalState()])}});o=()=>{u(),c()}})];i!=null&&s.push(new Promise(l=>setTimeout(l,i,null)));try{const l=await JE(t,Promise.race(s));return Ma(t),l}finally{o()}};return(r,i)=>QE(n(r,i))},n2=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:o}=e;if(t)i=Tr(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw new Error(process.env.NODE_ENV==="production"?Fe(21):"Creating or removing a listener requires one of the known fields for matching an action");return Kv(o,"options.listener"),{predicate:i,type:t,effect:o}},r2=Rs(e=>{const{type:t,predicate:n,effect:r}=n2(e);return{id:cz(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(process.env.NODE_ENV==="production"?Fe(22):"Unsubscribe not initialized")}}},{withTypes:()=>r2}),i2=(e,t)=>{const{type:n,effect:r,predicate:i}=n2(t);return Array.from(e.values()).find(o=>(typeof n=="string"?o.type===n:o.predicate===i)&&o.effect===r)},qv=e=>{e.pending.forEach(t=>{Ta(t,Uv)})},Pz=e=>()=>{e.forEach(qv),e.clear()},o2=(e,t,n)=>{try{e(t,n)}catch(r){setTimeout(()=>{throw r},0)}},a2=Rs(Tr(`${hc}/add`),{withTypes:()=>a2}),kz=Tr(`${hc}/removeAll`),s2=Rs(Tr(`${hc}/remove`),{withTypes:()=>s2}),Cz=(...e)=>{console.error(`${hc}/error`,...e)},mc=(e={})=>{const t=new Map,{extra:n,onError:r=Cz}=e;Kv(r,"onError");const i=u=>(u.unsubscribe=()=>t.delete(u.id),t.set(u.id,u),d=>{u.unsubscribe(),d?.cancelActive&&qv(u)}),o=u=>{const d=i2(t,u)??r2(u);return i(d)};Rs(o,{withTypes:()=>o});const a=u=>{const d=i2(t,u);return d&&(d.unsubscribe(),u.cancelActive&&qv(d)),!!d};Rs(a,{withTypes:()=>a});const s=async(u,d,f,p)=>{const m=new AbortController,h=Ez(o,m.signal),g=[];try{u.pending.add(m),await Promise.resolve(u.effect(d,Rs({},f,{getOriginalState:p,condition:(b,S)=>h(b,S).then(Boolean),take:h,delay:e2(m.signal),pause:If(m.signal),extra:n,signal:m.signal,fork:Oz(m.signal,g),unsubscribe:u.unsubscribe,subscribe:()=>{t.set(u.id,u)},cancelActiveListeners:()=>{u.pending.forEach((b,S,w)=>{b!==m&&(Ta(b,Uv),w.delete(b))})},cancel:()=>{Ta(m,Uv),u.pending.delete(m)},throwIfCancelled:()=>{Ma(m.signal)}})))}catch(b){b instanceof Nf||o2(r,b,{raisedBy:"effect"})}finally{await Promise.all(g),Ta(m,_z),u.pending.delete(m)}},l=Pz(t);return{middleware:u=>d=>f=>{if(!Nv(f))return d(f);if(a2.match(f))return o(f.payload);if(kz.match(f)){l();return}if(s2.match(f))return a(f.payload);let p=u.getState();const m=()=>{if(p===t2)throw new Error(process.env.NODE_ENV==="production"?Fe(23):`${hc}: getOriginalState can only be called synchronously`);return p};let h;try{if(h=d(f),t.size>0){const g=u.getState(),b=Array.from(t.values());for(const S of b){let w=!1;try{w=S.predicate(f,g,p)}catch(x){w=!1,o2(r,x,{raisedBy:"predicate"})}w&&s(S,f,u,m)}}}finally{p=t2}return h},startListening:o,stopListening:a,clearListeners:l}};function Fe(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Dz={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},l2=dr({name:"chartLayout",initialState:Dz,reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var n,r,i,o;e.margin.top=(n=t.payload.top)!==null&&n!==void 0?n:0,e.margin.right=(r=t.payload.right)!==null&&r!==void 0?r:0,e.margin.bottom=(i=t.payload.bottom)!==null&&i!==void 0?i:0,e.margin.left=(o=t.payload.left)!==null&&o!==void 0?o:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:Az,setLayout:Tz,setChartSize:Mz,setScale:Nz}=l2.actions,jz=l2.reducer;function c2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function u2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?c2(Object(n),!0).forEach(function(r){Iz(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Iz(e,t,n){return(t=Rz(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rz(e){var t=Lz(e,"string");return typeof t=="symbol"?t:t+""}function Lz(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Rf=Math.PI/180,Fz=e=>e*180/Math.PI,Wt=(e,t,n,r)=>({x:e+Math.cos(-Rf*r)*n,y:t+Math.sin(-Rf*r)*n}),d2=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},$z=(e,t)=>{var{x:n,y:r}=e,{x:i,y:o}=t;return Math.sqrt((n-i)**2+(r-o)**2)},Bz=(e,t)=>{var{x:n,y:r}=e,{cx:i,cy:o}=t,a=$z({x:n,y:r},{x:i,y:o});if(a<=0)return{radius:a,angle:0};var s=(n-i)/a,l=Math.acos(s);return r>o&&(l=2*Math.PI-l),{radius:a,angle:Fz(l),angleInRadian:l}},Wz=e=>{var{startAngle:t,endAngle:n}=e,r=Math.floor(t/360),i=Math.floor(n/360),o=Math.min(r,i);return{startAngle:t-o*360,endAngle:n-o*360}},zz=(e,t)=>{var{startAngle:n,endAngle:r}=t,i=Math.floor(n/360),o=Math.floor(r/360),a=Math.min(i,o);return e+a*360},Vz=(e,t)=>{var{x:n,y:r}=e,{radius:i,angle:o}=Bz({x:n,y:r},t),{innerRadius:a,outerRadius:s}=t;if(i<a||i>s||i===0)return null;var{startAngle:l,endAngle:c}=Wz(t),u=o,d;if(l<=c){for(;u>c;)u-=360;for(;u<l;)u+=360;d=u>=l&&u<=c}else{for(;u>l;)u-=360;for(;u<c;)u+=360;d=u>=c&&u<=l}return d?u2(u2({},t),{},{radius:i,angle:zz(u,t)}):null};function f2(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function p2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Mr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?p2(Object(n),!0).forEach(function(r){Hz(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Hz(e,t,n){return(t=Yz(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yz(e){var t=Uz(e,"string");return typeof t=="symbol"?t:t+""}function Uz(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function rt(e,t,n){return ft(e)||ft(t)?n:Pr(t)?Oa(e,t,n):typeof t=="function"?t(e):n}var Kz=(e,t,n,r,i)=>{var o,a=-1,s=(o=t?.length)!==null&&o!==void 0?o:0;if(s<=1||e==null)return 0;if(r==="angleAxis"&&i!=null&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var l=0;l<s;l++){var c=l>0?n[l-1].coordinate:n[s-1].coordinate,u=n[l].coordinate,d=l>=s-1?n[0].coordinate:n[l+1].coordinate,f=void 0;if(Zt(u-c)!==Zt(d-u)){var p=[];if(Zt(d-u)===Zt(i[1]-i[0])){f=d;var m=u+i[1]-i[0];p[0]=Math.min(m,(m+c)/2),p[1]=Math.max(m,(m+c)/2)}else{f=c;var h=d+i[1]-i[0];p[0]=Math.min(u,(h+u)/2),p[1]=Math.max(u,(h+u)/2)}var g=[Math.min(u,(f+u)/2),Math.max(u,(f+u)/2)];if(e>g[0]&&e<=g[1]||e>=p[0]&&e<=p[1]){({index:a}=n[l]);break}}else{var b=Math.min(c,d),S=Math.max(c,d);if(e>(b+u)/2&&e<=(S+u)/2){({index:a}=n[l]);break}}}else if(t){for(var w=0;w<s;w++)if(w===0&&e<=(t[w].coordinate+t[w+1].coordinate)/2||w>0&&w<s-1&&e>(t[w].coordinate+t[w-1].coordinate)/2&&e<=(t[w].coordinate+t[w+1].coordinate)/2||w===s-1&&e>(t[w].coordinate+t[w-1].coordinate)/2){({index:a}=t[w]);break}}return a},qz=(e,t,n)=>{if(t&&n){var{width:r,height:i}=n,{align:o,verticalAlign:a,layout:s}=t;if((s==="vertical"||s==="horizontal"&&a==="middle")&&o!=="center"&&he(e[o]))return Mr(Mr({},e),{},{[o]:e[o]+(r||0)});if((s==="horizontal"||s==="vertical"&&o==="center")&&a!=="middle"&&he(e[a]))return Mr(Mr({},e),{},{[a]:e[a]+(i||0)})}return e},gi=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",h2=(e,t,n,r)=>{if(r)return e.map(s=>s.coordinate);var i,o,a=e.map(s=>(s.coordinate===t&&(i=!0),s.coordinate===n&&(o=!0),s.coordinate));return i||a.push(t),o||a.push(n),a},m2=(e,t,n)=>{if(!e)return null;var{duplicateDomain:r,type:i,range:o,scale:a,realScaleType:s,isCategorical:l,categoricalDomain:c,tickCount:u,ticks:d,niceTicks:f,axisType:p}=e;if(!a)return null;var m=s==="scaleBand"&&a.bandwidth?a.bandwidth()/2:2,h=i==="category"&&a.bandwidth?a.bandwidth()/m:0;if(h=p==="angleAxis"&&o&&o.length>=2?Zt(o[0]-o[1])*2*h:h,d||f){var g=(d||f||[]).map((b,S)=>{var w=r?r.indexOf(b):b;return{coordinate:a(w)+h,value:b,offset:h,index:S}});return g.filter(b=>!Sn(b.coordinate))}return l&&c?c.map((b,S)=>({coordinate:a(b)+h,value:b,index:S,offset:h})):a.ticks&&u!=null?a.ticks(u).map((b,S)=>({coordinate:a(b)+h,value:b,offset:h,index:S})):a.domain().map((b,S)=>({coordinate:a(b)+h,value:r?r[b]:b,index:S,offset:h}))},g2=1e-4,Gz=e=>{var t=e.domain();if(!(!t||t.length<=2)){var n=t.length,r=e.range(),i=Math.min(r[0],r[1])-g2,o=Math.max(r[0],r[1])+g2,a=e(t[0]),s=e(t[n-1]);(a<i||a>o||s<i||s>o)&&e.domain([t[0],t[n-1]])}},Xz=(e,t)=>{if(!t||t.length!==2||!he(t[0])||!he(t[1]))return e;var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!he(e[0])||e[0]<n)&&(i[0]=n),(!he(e[1])||e[1]>r)&&(i[1]=r),i[0]>r&&(i[0]=r),i[1]<n&&(i[1]=n),i},Qz=e=>{var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var i=0,o=0,a=0;a<t;++a){var s=Sn(e[a][n][1])?e[a][n][0]:e[a][n][1];s>=0?(e[a][n][0]=i,e[a][n][1]=i+s,i=e[a][n][1]):(e[a][n][0]=o,e[a][n][1]=o+s,o=e[a][n][1])}},Zz=e=>{var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var i=0,o=0;o<t;++o){var a=Sn(e[o][n][1])?e[o][n][0]:e[o][n][1];a>=0?(e[o][n][0]=i,e[o][n][1]=i+a,i=e[o][n][1]):(e[o][n][0]=0,e[o][n][1]=0)}},Jz={sign:Qz,expand:d8,none:js,silhouette:f8,wiggle:p8,positive:Zz},e7=(e,t,n)=>{var r=Jz[n],i=u8().keys(t).value((o,a)=>+rt(o,a,0)).order(Lg).offset(r);return i(e)};function v2(e){return e==null?void 0:String(e)}function Lf(e){var{axis:t,ticks:n,bandSize:r,entry:i,index:o,dataKey:a}=e;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!ft(i[t.dataKey])){var s=$S(n,"value",i[t.dataKey]);if(s)return s.coordinate+r/2}return n[o]?n[o].coordinate+r/2:null}var l=rt(i,ft(a)?t.dataKey:a);return ft(l)?null:t.scale(l)}var y2=e=>{var{axis:t,ticks:n,offset:r,bandSize:i,entry:o,index:a}=e;if(t.type==="category")return n[a]?n[a].coordinate+r:null;var s=rt(o,t.dataKey,t.scale.domain()[a]);return ft(s)?null:t.scale(s)-i/2+r},t7=e=>{var{numericAxis:t}=e,n=t.scale.domain();if(t.type==="number"){var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]);return r<=0&&i>=0?0:i<0?i:r}return n[0]},n7=e=>{var t=e.flat(2).filter(he);return[Math.min(...t),Math.max(...t)]},r7=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],i7=(e,t,n)=>{if(e!=null)return r7(Object.keys(e).reduce((r,i)=>{var o=e[i],{stackedData:a}=o,s=a.reduce((l,c)=>{var u=f2(c,t,n),d=n7(u);return[Math.min(l[0],d[0]),Math.max(l[1],d[1])]},[1/0,-1/0]);return[Math.min(s[0],r[0]),Math.max(s[1],r[1])]},[1/0,-1/0]))},b2=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,x2=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Na=(e,t,n)=>{if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var i=xf(t,u=>u.coordinate),o=1/0,a=1,s=i.length;a<s;a++){var l=i[a],c=i[a-1];o=Math.min((l.coordinate||0)-(c.coordinate||0),o)}return o===1/0?0:o}return n?void 0:0};function w2(e){var{tooltipEntrySettings:t,dataKey:n,payload:r,value:i,name:o}=e;return Mr(Mr({},t),{},{dataKey:n,payload:r,value:i,name:o})}function $o(e,t){if(e)return String(e);if(typeof t=="string")return t}function o7(e,t,n,r,i){if(n==="horizontal"||n==="vertical"){var o=e>=i.left&&e<=i.left+i.width&&t>=i.top&&t<=i.top+i.height;return o?{x:e,y:t}:null}return r?Vz({x:e,y:t},r):null}var a7=(e,t,n,r)=>{var i=t.find(c=>c&&c.index===n);if(i){if(e==="horizontal")return{x:i.coordinate,y:r.y};if(e==="vertical")return{x:r.x,y:i.coordinate};if(e==="centric"){var o=i.coordinate,{radius:a}=r;return Mr(Mr(Mr({},r),Wt(r.cx,r.cy,a,o)),{},{angle:o,radius:a})}var s=i.coordinate,{angle:l}=r;return Mr(Mr(Mr({},r),Wt(r.cx,r.cy,s,l)),{},{angle:l,radius:s})}return{x:0,y:0}},s7=(e,t)=>t==="horizontal"?e.x:t==="vertical"?e.y:t==="centric"?e.angle:e.radius,Zi=e=>e.layout.width,Ji=e=>e.layout.height,l7=e=>e.layout.scale,_2=e=>e.layout.margin,Ff=W(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),$f=W(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),S2="data-recharts-item-index",O2="data-recharts-item-data-key",gc=60;function E2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Bf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?E2(Object(n),!0).forEach(function(r){c7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function c7(e,t,n){return(t=u7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u7(e){var t=d7(e,"string");return typeof t=="symbol"?t:t+""}function d7(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var f7=e=>e.brush.height;function p7(e){var t=$f(e);return t.reduce((n,r)=>{if(r.orientation==="left"&&!r.mirror&&!r.hide){var i=typeof r.width=="number"?r.width:gc;return n+i}return n},0)}function h7(e){var t=$f(e);return t.reduce((n,r)=>{if(r.orientation==="right"&&!r.mirror&&!r.hide){var i=typeof r.width=="number"?r.width:gc;return n+i}return n},0)}function m7(e){var t=Ff(e);return t.reduce((n,r)=>r.orientation==="top"&&!r.mirror&&!r.hide?n+r.height:n,0)}function g7(e){var t=Ff(e);return t.reduce((n,r)=>r.orientation==="bottom"&&!r.mirror&&!r.hide?n+r.height:n,0)}var Yt=W([Zi,Ji,_2,f7,p7,h7,m7,g7,wE,wW],(e,t,n,r,i,o,a,s,l,c)=>{var u={left:(n.left||0)+i,right:(n.right||0)+o},d={top:(n.top||0)+a,bottom:(n.bottom||0)+s},f=Bf(Bf({},d),u),p=f.bottom;f.bottom+=r,f=qz(f,l,c);var m=e-f.left-f.right,h=t-f.top-f.bottom;return Bf(Bf({brushBottom:p},f),{},{width:Math.max(m,0),height:Math.max(h,0)})}),v7=W(Yt,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),Gv=W(Zi,Ji,(e,t)=>({x:0,y:0,width:e,height:t})),y7=k.createContext(null),fn=()=>k.useContext(y7)!=null,Wf=e=>e.brush,zf=W([Wf,Yt,_2],(e,t,n)=>({height:e.height,x:he(e.x)?e.x:t.left,y:he(e.y)?e.y:t.top+t.height+t.brushBottom-(n?.bottom||0),width:he(e.width)?e.width:t.width})),Vf=()=>{var e,t=fn(),n=ce(v7),r=ce(zf),i=(e=ce(Wf))===null||e===void 0?void 0:e.padding;return!t||!r||!i?n:{width:r.width-i.left-i.right,height:r.height-i.top-i.bottom,x:i.left,y:i.top}},b7={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},P2=()=>{var e;return(e=ce(Yt))!==null&&e!==void 0?e:b7},Xv=()=>ce(Zi),Qv=()=>ce(Ji),x7=()=>ce(e=>e.layout.margin),Pe=e=>e.layout.layoutType,vc=()=>ce(Pe),w7={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},k2=dr({name:"legend",initialState:w7,reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload(e,t){e.payload.push(t.payload)},removeLegendPayload(e,t){var n=Qi(e).payload.indexOf(t.payload);n>-1&&e.payload.splice(n,1)}}}),{setLegendSize:C2,setLegendSettings:_7,addLegendPayload:D2,removeLegendPayload:A2}=k2.actions,S7=k2.reducer,O7=["contextPayload"];function Zv(){return Zv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zv.apply(null,arguments)}function T2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ls(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?T2(Object(n),!0).forEach(function(r){Jv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Jv(e,t,n){return(t=E7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function E7(e){var t=P7(e,"string");return typeof t=="symbol"?t:t+""}function P7(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function k7(e,t){if(e==null)return{};var n,r,i=C7(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function C7(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function D7(e){return e.value}function A7(e){var{contextPayload:t}=e,n=k7(e,O7),r=JO(t,e.payloadUniqBy,D7),i=Ls(Ls({},n),{},{payload:r});return O.isValidElement(e.content)?O.cloneElement(e.content,i):typeof e.content=="function"?O.createElement(e.content,i):O.createElement(zg,i)}function T7(e,t,n,r,i,o){var{layout:a,align:s,verticalAlign:l}=t,c,u;return(!e||(e.left===void 0||e.left===null)&&(e.right===void 0||e.right===null))&&(s==="center"&&a==="vertical"?c={left:((r||0)-o.width)/2}:c=s==="right"?{right:n&&n.right||0}:{left:n&&n.left||0}),(!e||(e.top===void 0||e.top===null)&&(e.bottom===void 0||e.bottom===null))&&(l==="middle"?u={top:((i||0)-o.height)/2}:u=l==="bottom"?{bottom:n&&n.bottom||0}:{top:n&&n.top||0}),Ls(Ls({},c),u)}function M7(e){var t=vt();return k.useEffect(()=>{t(_7(e))},[t,e]),null}function N7(e){var t=vt();return k.useEffect(()=>(t(C2(e)),()=>{t(C2({width:0,height:0}))}),[t,e]),null}function j7(e){var t=OW(),n=j3(),r=x7(),{width:i,height:o,wrapperStyle:a,portal:s}=e,[l,c]=_E([t]),u=Xv(),d=Qv();if(u==null||d==null)return null;var f=u-(r.left||0)-(r.right||0),p=Hf.getWidthOrHeight(e.layout,o,i,f),m=s?a:Ls(Ls({position:"absolute",width:p?.width||i||"auto",height:p?.height||o||"auto"},T7(a,e,r,u,d,l)),a),h=s??n;if(h==null)return null;var g=O.createElement("div",{className:"recharts-legend-wrapper",style:m,ref:c},O.createElement(M7,{layout:e.layout,align:e.align,verticalAlign:e.verticalAlign,itemSorter:e.itemSorter}),O.createElement(N7,{width:l.width,height:l.height}),O.createElement(A7,Zv({},e,p,{margin:r,chartWidth:u,chartHeight:d,contextPayload:t})));return Ii.createPortal(g,h)}let Hf=class extends k.PureComponent{static getWidthOrHeight(t,n,r,i){return t==="vertical"&&he(n)?{height:n}:t==="horizontal"?{width:r||i}:null}render(){return O.createElement(j7,this.props)}};Jv(Hf,"displayName","Legend"),Jv(Hf,"defaultProps",{align:"center",iconSize:14,itemSorter:"value",layout:"horizontal",verticalAlign:"bottom"});function ey(){return ey=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ey.apply(null,arguments)}function M2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ty(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?M2(Object(n),!0).forEach(function(r){I7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function I7(e,t,n){return(t=R7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function R7(e){var t=L7(e,"string");return typeof t=="symbol"?t:t+""}function L7(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function F7(e){return Array.isArray(e)&&Pr(e[0])&&Pr(e[1])?e.join(" ~ "):e}var $7=e=>{var{separator:t=" : ",contentStyle:n={},itemStyle:r={},labelStyle:i={},payload:o,formatter:a,itemSorter:s,wrapperClassName:l,labelClassName:c,label:u,labelFormatter:d,accessibilityLayer:f=!1}=e,p=()=>{if(o&&o.length){var _={padding:0,margin:0},E=(s?xf(o,s):o).map((C,D)=>{if(C.type==="none")return null;var T=C.formatter||a||F7,{value:j,name:A}=C,P=j,N=A;if(T){var M=T(j,A,C,D,o);if(Array.isArray(M))[P,N]=M;else if(M!=null)P=M;else return null}var R=ty({display:"block",paddingTop:4,paddingBottom:4,color:C.color||"#000"},r);return O.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(D),style:R},Pr(N)?O.createElement("span",{className:"recharts-tooltip-item-name"},N):null,Pr(N)?O.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,O.createElement("span",{className:"recharts-tooltip-item-value"},P),O.createElement("span",{className:"recharts-tooltip-item-unit"},C.unit||""))});return O.createElement("ul",{className:"recharts-tooltip-item-list",style:_},E)}return null},m=ty({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},n),h=ty({margin:0},i),g=!ft(u),b=g?u:"",S=ie("recharts-default-tooltip",l),w=ie("recharts-tooltip-label",c);g&&d&&o!==void 0&&o!==null&&(b=d(u,o));var x=f?{role:"status","aria-live":"assertive"}:{};return O.createElement("div",ey({className:S,style:m},x),O.createElement("p",{className:w,style:h},O.isValidElement(b)?b:"".concat(b)),p())},yc="recharts-tooltip-wrapper",B7={visibility:"hidden"};function W7(e){var{coordinate:t,translateX:n,translateY:r}=e;return ie(yc,{["".concat(yc,"-right")]:he(n)&&t&&he(t.x)&&n>=t.x,["".concat(yc,"-left")]:he(n)&&t&&he(t.x)&&n<t.x,["".concat(yc,"-bottom")]:he(r)&&t&&he(t.y)&&r>=t.y,["".concat(yc,"-top")]:he(r)&&t&&he(t.y)&&r<t.y})}function N2(e){var{allowEscapeViewBox:t,coordinate:n,key:r,offsetTopLeft:i,position:o,reverseDirection:a,tooltipDimension:s,viewBox:l,viewBoxDimension:c}=e;if(o&&he(o[r]))return o[r];var u=n[r]-s-(i>0?i:0),d=n[r]+i;if(t[r])return a[r]?u:d;var f=l[r];if(f==null)return 0;if(a[r]){var p=u,m=f;return p<m?Math.max(d,f):Math.max(u,f)}if(c==null)return 0;var h=d+s,g=f+c;return h>g?Math.max(u,f):Math.max(d,f)}function z7(e){var{translateX:t,translateY:n,useTranslate3d:r}=e;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function V7(e){var{allowEscapeViewBox:t,coordinate:n,offsetTopLeft:r,position:i,reverseDirection:o,tooltipBox:a,useTranslate3d:s,viewBox:l}=e,c,u,d;return a.height>0&&a.width>0&&n?(u=N2({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:a.width,viewBox:l,viewBoxDimension:l.width}),d=N2({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:a.height,viewBox:l,viewBoxDimension:l.height}),c=z7({translateX:u,translateY:d,useTranslate3d:s})):c=B7,{cssProperties:c,cssClasses:W7({translateX:u,translateY:d,coordinate:n})}}function j2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Yf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?j2(Object(n),!0).forEach(function(r){ny(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ny(e,t,n){return(t=H7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function H7(e){var t=Y7(e,"string");return typeof t=="symbol"?t:t+""}function Y7(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class U7 extends k.PureComponent{constructor(){super(...arguments),ny(this,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}),ny(this,"handleKeyDown",t=>{if(t.key==="Escape"){var n,r,i,o;this.setState({dismissed:!0,dismissedAtCoordinate:{x:(n=(r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==null&&n!==void 0?n:0,y:(i=(o=this.props.coordinate)===null||o===void 0?void 0:o.y)!==null&&i!==void 0?i:0}})}})}componentDidMount(){document.addEventListener("keydown",this.handleKeyDown)}componentWillUnmount(){document.removeEventListener("keydown",this.handleKeyDown)}componentDidUpdate(){var t,n;this.state.dismissed&&(((t=this.props.coordinate)===null||t===void 0?void 0:t.x)!==this.state.dismissedAtCoordinate.x||((n=this.props.coordinate)===null||n===void 0?void 0:n.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}render(){var{active:t,allowEscapeViewBox:n,animationDuration:r,animationEasing:i,children:o,coordinate:a,hasPayload:s,isAnimationActive:l,offset:c,position:u,reverseDirection:d,useTranslate3d:f,viewBox:p,wrapperStyle:m,lastBoundingBox:h,innerRef:g,hasPortalFromProps:b}=this.props,{cssClasses:S,cssProperties:w}=V7({allowEscapeViewBox:n,coordinate:a,offsetTopLeft:c,position:u,reverseDirection:d,tooltipBox:{height:h.height,width:h.width},useTranslate3d:f,viewBox:p}),x=b?{}:Yf(Yf({transition:l&&t?"transform ".concat(r,"ms ").concat(i):void 0},w),{},{pointerEvents:"none",visibility:!this.state.dismissed&&t&&s?"visible":"hidden",position:"absolute",top:0,left:0}),_=Yf(Yf({},x),{},{visibility:!this.state.dismissed&&t&&s?"visible":"hidden"},m);return O.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:S,style:_,ref:g},o)}}var K7=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),eo={devToolsEnabled:!1,isSsr:K7()},I2=()=>ce(e=>e.rootProps.accessibilityLayer);function pn(e){return Number.isFinite(e)}function Fs(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function ry(){return ry=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ry.apply(null,arguments)}function R2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function L2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?R2(Object(n),!0).forEach(function(r){q7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function q7(e,t,n){return(t=G7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function G7(e){var t=X7(e,"string");return typeof t=="symbol"?t:t+""}function X7(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var F2={curveBasisClosed:J3,curveBasisOpen:e8,curveBasis:Z3,curveBumpX:F3,curveBumpY:$3,curveLinearClosed:t8,curveLinear:uf,curveMonotoneX:n8,curveMonotoneY:r8,curveNatural:i8,curveStep:o8,curveStepAfter:s8,curveStepBefore:a8},Uf=e=>pn(e.x)&&pn(e.y),bc=e=>e.x,xc=e=>e.y,Q7=(e,t)=>{if(typeof e=="function")return e;var n="curve".concat(lc(e));return(n==="curveMonotone"||n==="curveBump")&&t?F2["".concat(n).concat(t==="vertical"?"Y":"X")]:F2[n]||uf},Z7=e=>{var{type:t="linear",points:n=[],baseLine:r,layout:i,connectNulls:o=!1}=e,a=Q7(t,i),s=o?n.filter(Uf):n,l;if(Array.isArray(r)){var c=o?r.filter(d=>Uf(d)):r,u=s.map((d,f)=>L2(L2({},d),{},{base:c[f]}));return i==="vertical"?l=df().y(xc).x1(bc).x0(d=>d.base.x):l=df().x(bc).y1(xc).y0(d=>d.base.y),l.defined(Uf).curve(a),l(u)}return i==="vertical"&&he(r)?l=df().y(xc).x1(bc).x0(r):he(r)?l=df().x(bc).y1(xc).y0(r):l=QS().x(bc).y(xc),l.defined(Uf).curve(a),l(s)},$s=e=>{var{className:t,points:n,path:r,pathRef:i}=e;if((!n||!n.length)&&!r)return null;var o=n&&n.length?Z7(e):r;return O.createElement("path",ry({},kr(e),Sg(e),{className:ie("recharts-curve",t),d:o===null?void 0:o,ref:i}))},J7=["x","y","top","left","width","height","className"];function iy(){return iy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},iy.apply(null,arguments)}function $2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function eV(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$2(Object(n),!0).forEach(function(r){tV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tV(e,t,n){return(t=nV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nV(e){var t=rV(e,"string");return typeof t=="symbol"?t:t+""}function rV(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function iV(e,t){if(e==null)return{};var n,r,i=oV(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function oV(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var aV=(e,t,n,r,i,o)=>"M".concat(e,",").concat(i,"v").concat(r,"M").concat(o,",").concat(t,"h").concat(n),sV=e=>{var{x:t=0,y:n=0,top:r=0,left:i=0,width:o=0,height:a=0,className:s}=e,l=iV(e,J7),c=eV({x:t,y:n,top:r,left:i,width:o,height:a},l);return!he(t)||!he(n)||!he(o)||!he(a)||!he(r)||!he(i)?null:O.createElement("path",iy({},lt(c,!0),{className:ie("recharts-cross",s),d:aV(t,n,o,a,r,i)}))};function lV(e,t,n,r){var i=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-i,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function B2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function cV(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?B2(Object(n),!0).forEach(function(r){uV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function uV(e,t,n){return(t=dV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dV(e){var t=fV(e,"string");return typeof t=="symbol"?t:t+""}function fV(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ut(e,t){var n=cV({},e),r=t,i=Object.keys(t),o=i.reduce((a,s)=>(a[s]===void 0&&r[s]!==void 0&&(a[s]=r[s]),a),n);return o}function pV(){}function W2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function z2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?W2(Object(n),!0).forEach(function(r){hV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hV(e,t,n){return(t=mV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mV(e){var t=gV(e,"string");return typeof t=="symbol"?t:t+""}function gV(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var vV=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),V2=(e,t,n)=>e.map(r=>"".concat(vV(r)," ").concat(t,"ms ").concat(n)).join(","),yV=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((n,r)=>n.filter(i=>r.includes(i))),wc=(e,t)=>Object.keys(t).reduce((n,r)=>z2(z2({},n),{},{[r]:e(r,t[r])}),{});function H2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function hn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?H2(Object(n),!0).forEach(function(r){bV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bV(e,t,n){return(t=xV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xV(e){var t=wV(e,"string");return typeof t=="symbol"?t:t+""}function wV(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Kf=(e,t,n)=>e+(t-e)*n,oy=e=>{var{from:t,to:n}=e;return t!==n},Y2=(e,t,n)=>{var r=wc((i,o)=>{if(oy(o)){var[a,s]=e(o.from,o.to,o.velocity);return hn(hn({},o),{},{from:a,velocity:s})}return o},t);return n<1?wc((i,o)=>oy(o)?hn(hn({},o),{},{velocity:Kf(o.velocity,r[i].velocity,n),from:Kf(o.from,r[i].from,n)}):o,t):Y2(e,r,n-1)};function _V(e,t,n,r,i,o){var a,s=r.reduce((f,p)=>hn(hn({},f),{},{[p]:{from:e[p],velocity:0,to:t[p]}}),{}),l=()=>wc((f,p)=>p.from,s),c=()=>!Object.values(s).filter(oy).length,u=null,d=f=>{a||(a=f);var p=f-a,m=p/n.dt;s=Y2(n,s,m),i(hn(hn(hn({},e),t),l())),a=f,c()||(u=o.setTimeout(d))};return()=>(u=o.setTimeout(d),()=>{u()})}function SV(e,t,n,r,i,o,a){var s=null,l=i.reduce((d,f)=>hn(hn({},d),{},{[f]:[e[f],t[f]]}),{}),c,u=d=>{c||(c=d);var f=(d-c)/r,p=wc((h,g)=>Kf(...g,n(f)),l);if(o(hn(hn(hn({},e),t),p)),f<1)s=a.setTimeout(u);else{var m=wc((h,g)=>Kf(...g,n(1)),l);o(hn(hn(hn({},e),t),m))}};return()=>(s=a.setTimeout(u),()=>{s()})}const OV=(e,t,n,r,i,o)=>{var a=yV(e,t);return n.isStepper===!0?_V(e,t,n,a,i,o):SV(e,t,n,r,a,i,o)};var qf=1e-4,U2=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],K2=(e,t)=>e.map((n,r)=>n*t**r).reduce((n,r)=>n+r),q2=(e,t)=>n=>{var r=U2(e,t);return K2(r,n)},EV=(e,t)=>n=>{var r=U2(e,t),i=[...r.map((o,a)=>o*a).slice(1),0];return K2(i,n)},G2=function(){for(var t,n,r,i,o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];if(a.length===1)switch(a[0]){case"linear":[t,r,n,i]=[0,0,1,1];break;case"ease":[t,r,n,i]=[.25,.1,.25,1];break;case"ease-in":[t,r,n,i]=[.42,0,1,1];break;case"ease-out":[t,r,n,i]=[.42,0,.58,1];break;case"ease-in-out":[t,r,n,i]=[0,0,.58,1];break;default:{var l=a[0].split("(");l[0]==="cubic-bezier"&&l[1].split(")")[0].split(",").length===4&&([t,r,n,i]=l[1].split(")")[0].split(",").map(m=>parseFloat(m)))}}else a.length===4&&([t,r,n,i]=a);var c=q2(t,n),u=q2(r,i),d=EV(t,n),f=m=>m>1?1:m<0?0:m,p=m=>{for(var h=m>1?1:m,g=h,b=0;b<8;++b){var S=c(g)-h,w=d(g);if(Math.abs(S-h)<qf||w<qf)return u(g);g=f(g-S/w)}return u(g)};return p.isStepper=!1,p},PV=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:n=100,damping:r=8,dt:i=17}=t,o=(a,s,l)=>{var c=-(a-s)*n,u=l*r,d=l+(c-u)*i/1e3,f=l*i/1e3+a;return Math.abs(f-s)<qf&&Math.abs(d)<qf?[s,0]:[f,d]};return o.isStepper=!0,o.dt=i,o},kV=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return G2(e);case"spring":return PV();default:if(e.split("(")[0]==="cubic-bezier")return G2(e)}return typeof e=="function"?e:null};function CV(e){var t,n=()=>null,r=!1,i=null,o=a=>{if(!r){if(Array.isArray(a)){if(!a.length)return;var s=a,[l,...c]=s;if(typeof l=="number"){i=e.setTimeout(o.bind(null,c),l);return}o(l),i=e.setTimeout(o.bind(null,c));return}typeof a=="string"&&(t=a,n(t)),typeof a=="object"&&(t=a,n(t)),typeof a=="function"&&a()}};return{stop:()=>{r=!0},start:a=>{r=!1,i&&(i(),i=null),o(a)},subscribe:a=>(n=a,()=>{n=()=>null}),getTimeoutController:()=>e}}class DV{setTimeout(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=performance.now(),i=null,o=a=>{a-r>=n?t(a):typeof requestAnimationFrame=="function"&&(i=requestAnimationFrame(o))};return i=requestAnimationFrame(o),()=>{cancelAnimationFrame(i)}}}function AV(){return CV(new DV)}var TV=k.createContext(AV);function MV(e,t){var n=k.useContext(TV);return k.useMemo(()=>t??n(e),[e,t,n])}var NV={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},X2={t:0},ay={t:1};function Bs(e){var t=Ut(e,NV),{isActive:n,canBegin:r,duration:i,easing:o,begin:a,onAnimationEnd:s,onAnimationStart:l,children:c}=t,u=MV(t.animationId,t.animationManager),[d,f]=k.useState(n?X2:ay),p=k.useRef(null);return k.useEffect(()=>{n||f(ay)},[n]),k.useEffect(()=>{if(!n||!r)return pV;var m=OV(X2,ay,kV(o),i,f,u.getTimeoutController()),h=()=>{p.current=m()};return u.start([l,a,h,i,s]),()=>{u.stop(),p.current&&p.current(),s()}},[n,r,i,o,a,l,s,u]),c(d.t)}function Ws(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",n=k.useRef(sc(t)),r=k.useRef(e);return r.current!==e&&(n.current=sc(t),r.current=e),n.current}function Q2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Z2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Q2(Object(n),!0).forEach(function(r){jV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jV(e,t,n){return(t=IV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function IV(e){var t=RV(e,"string");return typeof t=="symbol"?t:t+""}function RV(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Gf(){return Gf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gf.apply(null,arguments)}var J2=(e,t,n,r,i)=>{var o=Math.min(Math.abs(n)/2,Math.abs(r)/2),a=r>=0?1:-1,s=n>=0?1:-1,l=r>=0&&n>=0||r<0&&n<0?1:0,c;if(o>0&&i instanceof Array){for(var u=[0,0,0,0],d=0,f=4;d<f;d++)u[d]=i[d]>o?o:i[d];c="M".concat(e,",").concat(t+a*u[0]),u[0]>0&&(c+="A ".concat(u[0],",").concat(u[0],",0,0,").concat(l,",").concat(e+s*u[0],",").concat(t)),c+="L ".concat(e+n-s*u[1],",").concat(t),u[1]>0&&(c+="A ".concat(u[1],",").concat(u[1],",0,0,").concat(l,`,
|
|
176
|
+
(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}}),h.warnIfExceeded()),m}}}function Tf(e){return typeof e=="boolean"}var tz=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let a=new WE;if(n&&(Tf(n)?a.push(HW):a.push(YW(n.extraArgument))),process.env.NODE_ENV!=="production"){if(r){let s={};Tf(r)||(s=r),a.unshift(JW(s))}if(i){let s={};Tf(i)||(s=i),a.push(ez(s))}if(o){let s={};Tf(o)||(s=o),a.unshift(XW(s))}}return a},nz="RTK_autoBatch",KE=e=>t=>{setTimeout(t,e)},rz=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,o=!1,a=!1;const s=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:KE(10):e.type==="callback"?e.queueNotification:KE(e.timeout),c=()=>{a=!1,o&&(o=!1,s.forEach(u=>u()))};return Object.assign({},r,{subscribe(u){const d=()=>i&&u(),f=r.subscribe(d);return s.add(u),()=>{f(),s.delete(u)}},dispatch(u){try{return i=!u?.meta?.[nz],o=!i,o&&(a||(a=!0,l(c))),r.dispatch(u)}finally{i=!0}}})},iz=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new WE(e);return r&&i.push(rz(typeof r=="object"?r:void 0)),i};function oz(e){const t=tz(),{reducer:n=void 0,middleware:r,devTools:i=!0,duplicateMiddlewareCheck:o=!0,preloadedState:a=void 0,enhancers:s=void 0}=e||{};let l;if(typeof n=="function")l=n;else if(uc(n))l=PE(n);else throw new Error(process.env.NODE_ENV==="production"?Fe(1):"`reducer` is a required argument, and must be a function or an object of functions that can be passed to combineReducers");if(process.env.NODE_ENV!=="production"&&r&&typeof r!="function")throw new Error(process.env.NODE_ENV==="production"?Fe(2):"`middleware` field must be a callback");let c;if(typeof r=="function"){if(c=r(t),process.env.NODE_ENV!=="production"&&!Array.isArray(c))throw new Error(process.env.NODE_ENV==="production"?Fe(3):"when using a middleware builder function, an array of middleware must be returned")}else c=t();if(process.env.NODE_ENV!=="production"&&c.some(h=>typeof h!="function"))throw new Error(process.env.NODE_ENV==="production"?Fe(4):"each middleware provided to configureStore must be a function");if(process.env.NODE_ENV!=="production"&&o){let h=new Set;c.forEach(g=>{if(h.has(g))throw new Error(process.env.NODE_ENV==="production"?Fe(42):"Duplicate middleware references found when creating the store. Ensure that each middleware is only included once.");h.add(g)})}let u=_f;i&&(u=UW({trace:process.env.NODE_ENV!=="production",...typeof i=="object"&&i}));const d=NW(...c),f=iz(d);if(process.env.NODE_ENV!=="production"&&s&&typeof s!="function")throw new Error(process.env.NODE_ENV==="production"?Fe(5):"`enhancers` field must be a callback");let p=typeof s=="function"?s(f):f();if(process.env.NODE_ENV!=="production"&&!Array.isArray(p))throw new Error(process.env.NODE_ENV==="production"?Fe(6):"`enhancers` callback must return an array");if(process.env.NODE_ENV!=="production"&&p.some(h=>typeof h!="function"))throw new Error(process.env.NODE_ENV==="production"?Fe(7):"each enhancer provided to configureStore must be a function");process.env.NODE_ENV!=="production"&&c.length&&!p.includes(d)&&console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");const m=u(...p);return OE(l,a,m)}function qE(e){const t={},n=[];let r;const i={addCase(o,a){if(process.env.NODE_ENV!=="production"){if(n.length>0)throw new Error(process.env.NODE_ENV==="production"?Fe(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(r)throw new Error(process.env.NODE_ENV==="production"?Fe(27):"`builder.addCase` should only be called before calling `builder.addDefaultCase`")}const s=typeof o=="string"?o:o.type;if(!s)throw new Error(process.env.NODE_ENV==="production"?Fe(28):"`builder.addCase` cannot be called with an empty action type");if(s in t)throw new Error(process.env.NODE_ENV==="production"?Fe(29):`\`builder.addCase\` cannot be called with two reducers for the same action type '${s}'`);return t[s]=a,i},addAsyncThunk(o,a){if(process.env.NODE_ENV!=="production"&&r)throw new Error(process.env.NODE_ENV==="production"?Fe(43):"`builder.addAsyncThunk` should only be called before calling `builder.addDefaultCase`");return a.pending&&(t[o.pending.type]=a.pending),a.rejected&&(t[o.rejected.type]=a.rejected),a.fulfilled&&(t[o.fulfilled.type]=a.fulfilled),a.settled&&n.push({matcher:o.settled,reducer:a.settled}),i},addMatcher(o,a){if(process.env.NODE_ENV!=="production"&&r)throw new Error(process.env.NODE_ENV==="production"?Fe(30):"`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return n.push({matcher:o,reducer:a}),i},addDefaultCase(o){if(process.env.NODE_ENV!=="production"&&r)throw new Error(process.env.NODE_ENV==="production"?Fe(31):"`builder.addDefaultCase` can only be called once");return r=o,i}};return e(i),[t,n,r]}function az(e){return typeof e=="function"}function sz(e,t){if(process.env.NODE_ENV!=="production"&&typeof t=="object")throw new Error(process.env.NODE_ENV==="production"?Fe(8):"The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");let[n,r,i]=qE(t),o;if(az(e))o=()=>zE(e());else{const s=zE(e);o=()=>s}function a(s=o(),l){let c=[n[l.type],...r.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return c.filter(u=>!!u).length===0&&(c=[i]),c.reduce((u,d)=>{if(d)if(Ca(u)){const p=d(u,l);return p===void 0?u:p}else{if(Xi(u))return FE(u,f=>d(f,l));{const f=d(u,l);if(f===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return f}}return u},s)}return a.getInitialState=o,a}var lz="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",cz=(e=21)=>{let t="",n=e;for(;n--;)t+=lz[Math.random()*64|0];return t},uz=Symbol.for("rtk-slice-createasyncthunk");function dz(e,t){return`${e}/${t}`}function fz({creators:e}={}){const t=e?.asyncThunk?.[uz];return function(r){const{name:i,reducerPath:o=i}=r;if(!i)throw new Error(process.env.NODE_ENV==="production"?Fe(11):"`name` is a required option for createSlice");typeof process<"u"&&process.env.NODE_ENV==="development"&&r.initialState===void 0&&console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");const a=(typeof r.reducers=="function"?r.reducers(hz()):r.reducers)||{},s=Object.keys(a),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(w,x){const _=typeof w=="string"?w:w.type;if(!_)throw new Error(process.env.NODE_ENV==="production"?Fe(12):"`context.addCase` cannot be called with an empty action type");if(_ in l.sliceCaseReducersByType)throw new Error(process.env.NODE_ENV==="production"?Fe(13):"`context.addCase` cannot be called with two reducers for the same action type: "+_);return l.sliceCaseReducersByType[_]=x,c},addMatcher(w,x){return l.sliceMatchers.push({matcher:w,reducer:x}),c},exposeAction(w,x){return l.actionCreators[w]=x,c},exposeCaseReducer(w,x){return l.sliceCaseReducersByName[w]=x,c}};s.forEach(w=>{const x=a[w],_={reducerName:w,type:dz(i,w),createNotation:typeof r.reducers=="function"};gz(x)?yz(_,x,c,t):mz(_,x,c)});function u(){if(process.env.NODE_ENV!=="production"&&typeof r.extraReducers=="object")throw new Error(process.env.NODE_ENV==="production"?Fe(14):"The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice");const[w={},x=[],_=void 0]=typeof r.extraReducers=="function"?qE(r.extraReducers):[r.extraReducers],E={...w,...l.sliceCaseReducersByType};return sz(r.initialState,C=>{for(let D in E)C.addCase(D,E[D]);for(let D of l.sliceMatchers)C.addMatcher(D.matcher,D.reducer);for(let D of x)C.addMatcher(D.matcher,D.reducer);_&&C.addDefaultCase(_)})}const d=w=>w,f=new Map,p=new WeakMap;let m;function h(w,x){return m||(m=u()),m(w,x)}function g(){return m||(m=u()),m.getInitialState()}function b(w,x=!1){function _(C){let D=C[w];if(typeof D>"u"){if(x)D=Af(p,_,g);else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?Fe(15):"selectSlice returned undefined for an uninjected slice reducer")}return D}function E(C=d){const D=Af(f,x,()=>new WeakMap);return Af(D,C,()=>{const T={};for(const[j,A]of Object.entries(r.selectors??{}))T[j]=pz(A,C,()=>Af(p,C,g),x);return T})}return{reducerPath:w,getSelectors:E,get selectors(){return E(_)},selectSlice:_}}const S={name:i,reducer:h,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:g,...b(o),injectInto(w,{reducerPath:x,..._}={}){const E=x??o;return w.inject({reducerPath:E,reducer:h},_),{...S,...b(E,!0)}}};return S}}function pz(e,t,n,r){function i(o,...a){let s=t(o);if(typeof s>"u"){if(r)s=n();else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?Fe(16):"selectState returned undefined for an uninjected slice reducer")}return e(s,...a)}return i.unwrapped=e,i}var dr=fz();function hz(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function mz({type:e,reducerName:t,createNotation:n},r,i){let o,a;if("reducer"in r){if(n&&!vz(r))throw new Error(process.env.NODE_ENV==="production"?Fe(17):"Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");o=r.reducer,a=r.prepare}else o=r;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,a?Tr(e,a):Tr(e))}function gz(e){return e._reducerDefinitionType==="asyncThunk"}function vz(e){return e._reducerDefinitionType==="reducerWithPrepare"}function yz({type:e,reducerName:t},n,r,i){if(!i)throw new Error(process.env.NODE_ENV==="production"?Fe(18):"Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");const{payloadCreator:o,fulfilled:a,pending:s,rejected:l,settled:c,options:u}=n,d=i(e,o,u);r.exposeAction(t,d),a&&r.addCase(d.fulfilled,a),s&&r.addCase(d.pending,s),l&&r.addCase(d.rejected,l),c&&r.addMatcher(d.settled,c),r.exposeCaseReducer(t,{fulfilled:a||Mf,pending:s||Mf,rejected:l||Mf,settled:c||Mf})}function Mf(){}var bz="task",GE="listener",XE="completed",Yv="cancelled",xz=`task-${Yv}`,wz=`task-${XE}`,Uv=`${GE}-${Yv}`,_z=`${GE}-${XE}`,Nf=class{constructor(e){this.code=e,this.message=`${bz} ${Yv} (reason: ${e})`}name="TaskAbortError";message},Kv=(e,t)=>{if(typeof e!="function")throw new TypeError(process.env.NODE_ENV==="production"?Fe(32):`${t} is not a function`)},jf=()=>{},QE=(e,t=jf)=>(e.catch(t),e),ZE=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),Ta=(e,t)=>{const n=e.signal;n.aborted||("reason"in n||Object.defineProperty(n,"reason",{enumerable:!0,value:t,configurable:!0,writable:!0}),e.abort(t))},Ma=e=>{if(e.aborted){const{reason:t}=e;throw new Nf(t)}};function JE(e,t){let n=jf;return new Promise((r,i)=>{const o=()=>i(new Nf(e.reason));if(e.aborted){o();return}n=ZE(e,o),t.finally(()=>n()).then(r,i)}).finally(()=>{n=jf})}var Sz=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(n){return{status:n instanceof Nf?"cancelled":"rejected",error:n}}finally{t?.()}},If=e=>t=>QE(JE(e,t).then(n=>(Ma(e),n))),e2=e=>{const t=If(e);return n=>t(new Promise(r=>setTimeout(r,n)))},{assign:Rs}=Object,t2={},hc="listenerMiddleware",Oz=(e,t)=>{const n=r=>ZE(e,()=>Ta(r,e.reason));return(r,i)=>{Kv(r,"taskExecutor");const o=new AbortController;n(o);const a=Sz(async()=>{Ma(e),Ma(o.signal);const s=await r({pause:If(o.signal),delay:e2(o.signal),signal:o.signal});return Ma(o.signal),s},()=>Ta(o,wz));return i?.autoJoin&&t.push(a.catch(jf)),{result:If(e)(a),cancel(){Ta(o,xz)}}}},Ez=(e,t)=>{const n=async(r,i)=>{Ma(t);let o=()=>{};const s=[new Promise((l,c)=>{let u=e({predicate:r,effect:(d,f)=>{f.unsubscribe(),l([d,f.getState(),f.getOriginalState()])}});o=()=>{u(),c()}})];i!=null&&s.push(new Promise(l=>setTimeout(l,i,null)));try{const l=await JE(t,Promise.race(s));return Ma(t),l}finally{o()}};return(r,i)=>QE(n(r,i))},n2=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:o}=e;if(t)i=Tr(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw new Error(process.env.NODE_ENV==="production"?Fe(21):"Creating or removing a listener requires one of the known fields for matching an action");return Kv(o,"options.listener"),{predicate:i,type:t,effect:o}},r2=Rs(e=>{const{type:t,predicate:n,effect:r}=n2(e);return{id:cz(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(process.env.NODE_ENV==="production"?Fe(22):"Unsubscribe not initialized")}}},{withTypes:()=>r2}),i2=(e,t)=>{const{type:n,effect:r,predicate:i}=n2(t);return Array.from(e.values()).find(o=>(typeof n=="string"?o.type===n:o.predicate===i)&&o.effect===r)},qv=e=>{e.pending.forEach(t=>{Ta(t,Uv)})},Pz=e=>()=>{e.forEach(qv),e.clear()},o2=(e,t,n)=>{try{e(t,n)}catch(r){setTimeout(()=>{throw r},0)}},a2=Rs(Tr(`${hc}/add`),{withTypes:()=>a2}),kz=Tr(`${hc}/removeAll`),s2=Rs(Tr(`${hc}/remove`),{withTypes:()=>s2}),Cz=(...e)=>{console.error(`${hc}/error`,...e)},mc=(e={})=>{const t=new Map,{extra:n,onError:r=Cz}=e;Kv(r,"onError");const i=u=>(u.unsubscribe=()=>t.delete(u.id),t.set(u.id,u),d=>{u.unsubscribe(),d?.cancelActive&&qv(u)}),o=u=>{const d=i2(t,u)??r2(u);return i(d)};Rs(o,{withTypes:()=>o});const a=u=>{const d=i2(t,u);return d&&(d.unsubscribe(),u.cancelActive&&qv(d)),!!d};Rs(a,{withTypes:()=>a});const s=async(u,d,f,p)=>{const m=new AbortController,h=Ez(o,m.signal),g=[];try{u.pending.add(m),await Promise.resolve(u.effect(d,Rs({},f,{getOriginalState:p,condition:(b,S)=>h(b,S).then(Boolean),take:h,delay:e2(m.signal),pause:If(m.signal),extra:n,signal:m.signal,fork:Oz(m.signal,g),unsubscribe:u.unsubscribe,subscribe:()=>{t.set(u.id,u)},cancelActiveListeners:()=>{u.pending.forEach((b,S,w)=>{b!==m&&(Ta(b,Uv),w.delete(b))})},cancel:()=>{Ta(m,Uv),u.pending.delete(m)},throwIfCancelled:()=>{Ma(m.signal)}})))}catch(b){b instanceof Nf||o2(r,b,{raisedBy:"effect"})}finally{await Promise.all(g),Ta(m,_z),u.pending.delete(m)}},l=Pz(t);return{middleware:u=>d=>f=>{if(!Nv(f))return d(f);if(a2.match(f))return o(f.payload);if(kz.match(f)){l();return}if(s2.match(f))return a(f.payload);let p=u.getState();const m=()=>{if(p===t2)throw new Error(process.env.NODE_ENV==="production"?Fe(23):`${hc}: getOriginalState can only be called synchronously`);return p};let h;try{if(h=d(f),t.size>0){const g=u.getState(),b=Array.from(t.values());for(const S of b){let w=!1;try{w=S.predicate(f,g,p)}catch(x){w=!1,o2(r,x,{raisedBy:"predicate"})}w&&s(S,f,u,m)}}}finally{p=t2}return h},startListening:o,stopListening:a,clearListeners:l}};function Fe(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Dz={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},l2=dr({name:"chartLayout",initialState:Dz,reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var n,r,i,o;e.margin.top=(n=t.payload.top)!==null&&n!==void 0?n:0,e.margin.right=(r=t.payload.right)!==null&&r!==void 0?r:0,e.margin.bottom=(i=t.payload.bottom)!==null&&i!==void 0?i:0,e.margin.left=(o=t.payload.left)!==null&&o!==void 0?o:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:Az,setLayout:Tz,setChartSize:Mz,setScale:Nz}=l2.actions,jz=l2.reducer;function c2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function u2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?c2(Object(n),!0).forEach(function(r){Iz(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Iz(e,t,n){return(t=Rz(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rz(e){var t=Lz(e,"string");return typeof t=="symbol"?t:t+""}function Lz(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Rf=Math.PI/180,Fz=e=>e*180/Math.PI,Wt=(e,t,n,r)=>({x:e+Math.cos(-Rf*r)*n,y:t+Math.sin(-Rf*r)*n}),d2=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},$z=(e,t)=>{var{x:n,y:r}=e,{x:i,y:o}=t;return Math.sqrt((n-i)**2+(r-o)**2)},Bz=(e,t)=>{var{x:n,y:r}=e,{cx:i,cy:o}=t,a=$z({x:n,y:r},{x:i,y:o});if(a<=0)return{radius:a,angle:0};var s=(n-i)/a,l=Math.acos(s);return r>o&&(l=2*Math.PI-l),{radius:a,angle:Fz(l),angleInRadian:l}},Wz=e=>{var{startAngle:t,endAngle:n}=e,r=Math.floor(t/360),i=Math.floor(n/360),o=Math.min(r,i);return{startAngle:t-o*360,endAngle:n-o*360}},zz=(e,t)=>{var{startAngle:n,endAngle:r}=t,i=Math.floor(n/360),o=Math.floor(r/360),a=Math.min(i,o);return e+a*360},Vz=(e,t)=>{var{x:n,y:r}=e,{radius:i,angle:o}=Bz({x:n,y:r},t),{innerRadius:a,outerRadius:s}=t;if(i<a||i>s||i===0)return null;var{startAngle:l,endAngle:c}=Wz(t),u=o,d;if(l<=c){for(;u>c;)u-=360;for(;u<l;)u+=360;d=u>=l&&u<=c}else{for(;u>l;)u-=360;for(;u<c;)u+=360;d=u>=c&&u<=l}return d?u2(u2({},t),{},{radius:i,angle:zz(u,t)}):null};function f2(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function p2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Mr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?p2(Object(n),!0).forEach(function(r){Hz(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Hz(e,t,n){return(t=Yz(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yz(e){var t=Uz(e,"string");return typeof t=="symbol"?t:t+""}function Uz(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function rt(e,t,n){return ft(e)||ft(t)?n:Pr(t)?Oa(e,t,n):typeof t=="function"?t(e):n}var Kz=(e,t,n,r,i)=>{var o,a=-1,s=(o=t?.length)!==null&&o!==void 0?o:0;if(s<=1||e==null)return 0;if(r==="angleAxis"&&i!=null&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var l=0;l<s;l++){var c=l>0?n[l-1].coordinate:n[s-1].coordinate,u=n[l].coordinate,d=l>=s-1?n[0].coordinate:n[l+1].coordinate,f=void 0;if(Jt(u-c)!==Jt(d-u)){var p=[];if(Jt(d-u)===Jt(i[1]-i[0])){f=d;var m=u+i[1]-i[0];p[0]=Math.min(m,(m+c)/2),p[1]=Math.max(m,(m+c)/2)}else{f=c;var h=d+i[1]-i[0];p[0]=Math.min(u,(h+u)/2),p[1]=Math.max(u,(h+u)/2)}var g=[Math.min(u,(f+u)/2),Math.max(u,(f+u)/2)];if(e>g[0]&&e<=g[1]||e>=p[0]&&e<=p[1]){({index:a}=n[l]);break}}else{var b=Math.min(c,d),S=Math.max(c,d);if(e>(b+u)/2&&e<=(S+u)/2){({index:a}=n[l]);break}}}else if(t){for(var w=0;w<s;w++)if(w===0&&e<=(t[w].coordinate+t[w+1].coordinate)/2||w>0&&w<s-1&&e>(t[w].coordinate+t[w-1].coordinate)/2&&e<=(t[w].coordinate+t[w+1].coordinate)/2||w===s-1&&e>(t[w].coordinate+t[w-1].coordinate)/2){({index:a}=t[w]);break}}return a},qz=(e,t,n)=>{if(t&&n){var{width:r,height:i}=n,{align:o,verticalAlign:a,layout:s}=t;if((s==="vertical"||s==="horizontal"&&a==="middle")&&o!=="center"&&he(e[o]))return Mr(Mr({},e),{},{[o]:e[o]+(r||0)});if((s==="horizontal"||s==="vertical"&&o==="center")&&a!=="middle"&&he(e[a]))return Mr(Mr({},e),{},{[a]:e[a]+(i||0)})}return e},gi=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",h2=(e,t,n,r)=>{if(r)return e.map(s=>s.coordinate);var i,o,a=e.map(s=>(s.coordinate===t&&(i=!0),s.coordinate===n&&(o=!0),s.coordinate));return i||a.push(t),o||a.push(n),a},m2=(e,t,n)=>{if(!e)return null;var{duplicateDomain:r,type:i,range:o,scale:a,realScaleType:s,isCategorical:l,categoricalDomain:c,tickCount:u,ticks:d,niceTicks:f,axisType:p}=e;if(!a)return null;var m=s==="scaleBand"&&a.bandwidth?a.bandwidth()/2:2,h=i==="category"&&a.bandwidth?a.bandwidth()/m:0;if(h=p==="angleAxis"&&o&&o.length>=2?Jt(o[0]-o[1])*2*h:h,d||f){var g=(d||f||[]).map((b,S)=>{var w=r?r.indexOf(b):b;return{coordinate:a(w)+h,value:b,offset:h,index:S}});return g.filter(b=>!Sn(b.coordinate))}return l&&c?c.map((b,S)=>({coordinate:a(b)+h,value:b,index:S,offset:h})):a.ticks&&u!=null?a.ticks(u).map((b,S)=>({coordinate:a(b)+h,value:b,offset:h,index:S})):a.domain().map((b,S)=>({coordinate:a(b)+h,value:r?r[b]:b,index:S,offset:h}))},g2=1e-4,Gz=e=>{var t=e.domain();if(!(!t||t.length<=2)){var n=t.length,r=e.range(),i=Math.min(r[0],r[1])-g2,o=Math.max(r[0],r[1])+g2,a=e(t[0]),s=e(t[n-1]);(a<i||a>o||s<i||s>o)&&e.domain([t[0],t[n-1]])}},Xz=(e,t)=>{if(!t||t.length!==2||!he(t[0])||!he(t[1]))return e;var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!he(e[0])||e[0]<n)&&(i[0]=n),(!he(e[1])||e[1]>r)&&(i[1]=r),i[0]>r&&(i[0]=r),i[1]<n&&(i[1]=n),i},Qz=e=>{var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var i=0,o=0,a=0;a<t;++a){var s=Sn(e[a][n][1])?e[a][n][0]:e[a][n][1];s>=0?(e[a][n][0]=i,e[a][n][1]=i+s,i=e[a][n][1]):(e[a][n][0]=o,e[a][n][1]=o+s,o=e[a][n][1])}},Zz=e=>{var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var i=0,o=0;o<t;++o){var a=Sn(e[o][n][1])?e[o][n][0]:e[o][n][1];a>=0?(e[o][n][0]=i,e[o][n][1]=i+a,i=e[o][n][1]):(e[o][n][0]=0,e[o][n][1]=0)}},Jz={sign:Qz,expand:d8,none:js,silhouette:f8,wiggle:p8,positive:Zz},e7=(e,t,n)=>{var r=Jz[n],i=u8().keys(t).value((o,a)=>+rt(o,a,0)).order(Lg).offset(r);return i(e)};function v2(e){return e==null?void 0:String(e)}function Lf(e){var{axis:t,ticks:n,bandSize:r,entry:i,index:o,dataKey:a}=e;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!ft(i[t.dataKey])){var s=$S(n,"value",i[t.dataKey]);if(s)return s.coordinate+r/2}return n[o]?n[o].coordinate+r/2:null}var l=rt(i,ft(a)?t.dataKey:a);return ft(l)?null:t.scale(l)}var y2=e=>{var{axis:t,ticks:n,offset:r,bandSize:i,entry:o,index:a}=e;if(t.type==="category")return n[a]?n[a].coordinate+r:null;var s=rt(o,t.dataKey,t.scale.domain()[a]);return ft(s)?null:t.scale(s)-i/2+r},t7=e=>{var{numericAxis:t}=e,n=t.scale.domain();if(t.type==="number"){var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]);return r<=0&&i>=0?0:i<0?i:r}return n[0]},n7=e=>{var t=e.flat(2).filter(he);return[Math.min(...t),Math.max(...t)]},r7=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],i7=(e,t,n)=>{if(e!=null)return r7(Object.keys(e).reduce((r,i)=>{var o=e[i],{stackedData:a}=o,s=a.reduce((l,c)=>{var u=f2(c,t,n),d=n7(u);return[Math.min(l[0],d[0]),Math.max(l[1],d[1])]},[1/0,-1/0]);return[Math.min(s[0],r[0]),Math.max(s[1],r[1])]},[1/0,-1/0]))},b2=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,x2=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Na=(e,t,n)=>{if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var i=xf(t,u=>u.coordinate),o=1/0,a=1,s=i.length;a<s;a++){var l=i[a],c=i[a-1];o=Math.min((l.coordinate||0)-(c.coordinate||0),o)}return o===1/0?0:o}return n?void 0:0};function w2(e){var{tooltipEntrySettings:t,dataKey:n,payload:r,value:i,name:o}=e;return Mr(Mr({},t),{},{dataKey:n,payload:r,value:i,name:o})}function $o(e,t){if(e)return String(e);if(typeof t=="string")return t}function o7(e,t,n,r,i){if(n==="horizontal"||n==="vertical"){var o=e>=i.left&&e<=i.left+i.width&&t>=i.top&&t<=i.top+i.height;return o?{x:e,y:t}:null}return r?Vz({x:e,y:t},r):null}var a7=(e,t,n,r)=>{var i=t.find(c=>c&&c.index===n);if(i){if(e==="horizontal")return{x:i.coordinate,y:r.y};if(e==="vertical")return{x:r.x,y:i.coordinate};if(e==="centric"){var o=i.coordinate,{radius:a}=r;return Mr(Mr(Mr({},r),Wt(r.cx,r.cy,a,o)),{},{angle:o,radius:a})}var s=i.coordinate,{angle:l}=r;return Mr(Mr(Mr({},r),Wt(r.cx,r.cy,s,l)),{},{angle:l,radius:s})}return{x:0,y:0}},s7=(e,t)=>t==="horizontal"?e.x:t==="vertical"?e.y:t==="centric"?e.angle:e.radius,Zi=e=>e.layout.width,Ji=e=>e.layout.height,l7=e=>e.layout.scale,_2=e=>e.layout.margin,Ff=W(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),$f=W(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),S2="data-recharts-item-index",O2="data-recharts-item-data-key",gc=60;function E2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Bf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?E2(Object(n),!0).forEach(function(r){c7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function c7(e,t,n){return(t=u7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u7(e){var t=d7(e,"string");return typeof t=="symbol"?t:t+""}function d7(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var f7=e=>e.brush.height;function p7(e){var t=$f(e);return t.reduce((n,r)=>{if(r.orientation==="left"&&!r.mirror&&!r.hide){var i=typeof r.width=="number"?r.width:gc;return n+i}return n},0)}function h7(e){var t=$f(e);return t.reduce((n,r)=>{if(r.orientation==="right"&&!r.mirror&&!r.hide){var i=typeof r.width=="number"?r.width:gc;return n+i}return n},0)}function m7(e){var t=Ff(e);return t.reduce((n,r)=>r.orientation==="top"&&!r.mirror&&!r.hide?n+r.height:n,0)}function g7(e){var t=Ff(e);return t.reduce((n,r)=>r.orientation==="bottom"&&!r.mirror&&!r.hide?n+r.height:n,0)}var Ut=W([Zi,Ji,_2,f7,p7,h7,m7,g7,wE,wW],(e,t,n,r,i,o,a,s,l,c)=>{var u={left:(n.left||0)+i,right:(n.right||0)+o},d={top:(n.top||0)+a,bottom:(n.bottom||0)+s},f=Bf(Bf({},d),u),p=f.bottom;f.bottom+=r,f=qz(f,l,c);var m=e-f.left-f.right,h=t-f.top-f.bottom;return Bf(Bf({brushBottom:p},f),{},{width:Math.max(m,0),height:Math.max(h,0)})}),v7=W(Ut,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),Gv=W(Zi,Ji,(e,t)=>({x:0,y:0,width:e,height:t})),y7=k.createContext(null),fn=()=>k.useContext(y7)!=null,Wf=e=>e.brush,zf=W([Wf,Ut,_2],(e,t,n)=>({height:e.height,x:he(e.x)?e.x:t.left,y:he(e.y)?e.y:t.top+t.height+t.brushBottom-(n?.bottom||0),width:he(e.width)?e.width:t.width})),Vf=()=>{var e,t=fn(),n=ce(v7),r=ce(zf),i=(e=ce(Wf))===null||e===void 0?void 0:e.padding;return!t||!r||!i?n:{width:r.width-i.left-i.right,height:r.height-i.top-i.bottom,x:i.left,y:i.top}},b7={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},P2=()=>{var e;return(e=ce(Ut))!==null&&e!==void 0?e:b7},Xv=()=>ce(Zi),Qv=()=>ce(Ji),x7=()=>ce(e=>e.layout.margin),Pe=e=>e.layout.layoutType,vc=()=>ce(Pe),w7={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},k2=dr({name:"legend",initialState:w7,reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload(e,t){e.payload.push(t.payload)},removeLegendPayload(e,t){var n=Qi(e).payload.indexOf(t.payload);n>-1&&e.payload.splice(n,1)}}}),{setLegendSize:C2,setLegendSettings:_7,addLegendPayload:D2,removeLegendPayload:A2}=k2.actions,S7=k2.reducer,O7=["contextPayload"];function Zv(){return Zv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zv.apply(null,arguments)}function T2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ls(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?T2(Object(n),!0).forEach(function(r){Jv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Jv(e,t,n){return(t=E7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function E7(e){var t=P7(e,"string");return typeof t=="symbol"?t:t+""}function P7(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function k7(e,t){if(e==null)return{};var n,r,i=C7(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function C7(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function D7(e){return e.value}function A7(e){var{contextPayload:t}=e,n=k7(e,O7),r=JO(t,e.payloadUniqBy,D7),i=Ls(Ls({},n),{},{payload:r});return O.isValidElement(e.content)?O.cloneElement(e.content,i):typeof e.content=="function"?O.createElement(e.content,i):O.createElement(zg,i)}function T7(e,t,n,r,i,o){var{layout:a,align:s,verticalAlign:l}=t,c,u;return(!e||(e.left===void 0||e.left===null)&&(e.right===void 0||e.right===null))&&(s==="center"&&a==="vertical"?c={left:((r||0)-o.width)/2}:c=s==="right"?{right:n&&n.right||0}:{left:n&&n.left||0}),(!e||(e.top===void 0||e.top===null)&&(e.bottom===void 0||e.bottom===null))&&(l==="middle"?u={top:((i||0)-o.height)/2}:u=l==="bottom"?{bottom:n&&n.bottom||0}:{top:n&&n.top||0}),Ls(Ls({},c),u)}function M7(e){var t=vt();return k.useEffect(()=>{t(_7(e))},[t,e]),null}function N7(e){var t=vt();return k.useEffect(()=>(t(C2(e)),()=>{t(C2({width:0,height:0}))}),[t,e]),null}function j7(e){var t=OW(),n=j3(),r=x7(),{width:i,height:o,wrapperStyle:a,portal:s}=e,[l,c]=_E([t]),u=Xv(),d=Qv();if(u==null||d==null)return null;var f=u-(r.left||0)-(r.right||0),p=Hf.getWidthOrHeight(e.layout,o,i,f),m=s?a:Ls(Ls({position:"absolute",width:p?.width||i||"auto",height:p?.height||o||"auto"},T7(a,e,r,u,d,l)),a),h=s??n;if(h==null)return null;var g=O.createElement("div",{className:"recharts-legend-wrapper",style:m,ref:c},O.createElement(M7,{layout:e.layout,align:e.align,verticalAlign:e.verticalAlign,itemSorter:e.itemSorter}),O.createElement(N7,{width:l.width,height:l.height}),O.createElement(A7,Zv({},e,p,{margin:r,chartWidth:u,chartHeight:d,contextPayload:t})));return Ii.createPortal(g,h)}let Hf=class extends k.PureComponent{static getWidthOrHeight(t,n,r,i){return t==="vertical"&&he(n)?{height:n}:t==="horizontal"?{width:r||i}:null}render(){return O.createElement(j7,this.props)}};Jv(Hf,"displayName","Legend"),Jv(Hf,"defaultProps",{align:"center",iconSize:14,itemSorter:"value",layout:"horizontal",verticalAlign:"bottom"});function ey(){return ey=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ey.apply(null,arguments)}function M2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ty(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?M2(Object(n),!0).forEach(function(r){I7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function I7(e,t,n){return(t=R7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function R7(e){var t=L7(e,"string");return typeof t=="symbol"?t:t+""}function L7(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function F7(e){return Array.isArray(e)&&Pr(e[0])&&Pr(e[1])?e.join(" ~ "):e}var $7=e=>{var{separator:t=" : ",contentStyle:n={},itemStyle:r={},labelStyle:i={},payload:o,formatter:a,itemSorter:s,wrapperClassName:l,labelClassName:c,label:u,labelFormatter:d,accessibilityLayer:f=!1}=e,p=()=>{if(o&&o.length){var _={padding:0,margin:0},E=(s?xf(o,s):o).map((C,D)=>{if(C.type==="none")return null;var T=C.formatter||a||F7,{value:j,name:A}=C,P=j,N=A;if(T){var M=T(j,A,C,D,o);if(Array.isArray(M))[P,N]=M;else if(M!=null)P=M;else return null}var R=ty({display:"block",paddingTop:4,paddingBottom:4,color:C.color||"#000"},r);return O.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(D),style:R},Pr(N)?O.createElement("span",{className:"recharts-tooltip-item-name"},N):null,Pr(N)?O.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,O.createElement("span",{className:"recharts-tooltip-item-value"},P),O.createElement("span",{className:"recharts-tooltip-item-unit"},C.unit||""))});return O.createElement("ul",{className:"recharts-tooltip-item-list",style:_},E)}return null},m=ty({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},n),h=ty({margin:0},i),g=!ft(u),b=g?u:"",S=ie("recharts-default-tooltip",l),w=ie("recharts-tooltip-label",c);g&&d&&o!==void 0&&o!==null&&(b=d(u,o));var x=f?{role:"status","aria-live":"assertive"}:{};return O.createElement("div",ey({className:S,style:m},x),O.createElement("p",{className:w,style:h},O.isValidElement(b)?b:"".concat(b)),p())},yc="recharts-tooltip-wrapper",B7={visibility:"hidden"};function W7(e){var{coordinate:t,translateX:n,translateY:r}=e;return ie(yc,{["".concat(yc,"-right")]:he(n)&&t&&he(t.x)&&n>=t.x,["".concat(yc,"-left")]:he(n)&&t&&he(t.x)&&n<t.x,["".concat(yc,"-bottom")]:he(r)&&t&&he(t.y)&&r>=t.y,["".concat(yc,"-top")]:he(r)&&t&&he(t.y)&&r<t.y})}function N2(e){var{allowEscapeViewBox:t,coordinate:n,key:r,offsetTopLeft:i,position:o,reverseDirection:a,tooltipDimension:s,viewBox:l,viewBoxDimension:c}=e;if(o&&he(o[r]))return o[r];var u=n[r]-s-(i>0?i:0),d=n[r]+i;if(t[r])return a[r]?u:d;var f=l[r];if(f==null)return 0;if(a[r]){var p=u,m=f;return p<m?Math.max(d,f):Math.max(u,f)}if(c==null)return 0;var h=d+s,g=f+c;return h>g?Math.max(u,f):Math.max(d,f)}function z7(e){var{translateX:t,translateY:n,useTranslate3d:r}=e;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function V7(e){var{allowEscapeViewBox:t,coordinate:n,offsetTopLeft:r,position:i,reverseDirection:o,tooltipBox:a,useTranslate3d:s,viewBox:l}=e,c,u,d;return a.height>0&&a.width>0&&n?(u=N2({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:a.width,viewBox:l,viewBoxDimension:l.width}),d=N2({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:a.height,viewBox:l,viewBoxDimension:l.height}),c=z7({translateX:u,translateY:d,useTranslate3d:s})):c=B7,{cssProperties:c,cssClasses:W7({translateX:u,translateY:d,coordinate:n})}}function j2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Yf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?j2(Object(n),!0).forEach(function(r){ny(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ny(e,t,n){return(t=H7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function H7(e){var t=Y7(e,"string");return typeof t=="symbol"?t:t+""}function Y7(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class U7 extends k.PureComponent{constructor(){super(...arguments),ny(this,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}),ny(this,"handleKeyDown",t=>{if(t.key==="Escape"){var n,r,i,o;this.setState({dismissed:!0,dismissedAtCoordinate:{x:(n=(r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==null&&n!==void 0?n:0,y:(i=(o=this.props.coordinate)===null||o===void 0?void 0:o.y)!==null&&i!==void 0?i:0}})}})}componentDidMount(){document.addEventListener("keydown",this.handleKeyDown)}componentWillUnmount(){document.removeEventListener("keydown",this.handleKeyDown)}componentDidUpdate(){var t,n;this.state.dismissed&&(((t=this.props.coordinate)===null||t===void 0?void 0:t.x)!==this.state.dismissedAtCoordinate.x||((n=this.props.coordinate)===null||n===void 0?void 0:n.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}render(){var{active:t,allowEscapeViewBox:n,animationDuration:r,animationEasing:i,children:o,coordinate:a,hasPayload:s,isAnimationActive:l,offset:c,position:u,reverseDirection:d,useTranslate3d:f,viewBox:p,wrapperStyle:m,lastBoundingBox:h,innerRef:g,hasPortalFromProps:b}=this.props,{cssClasses:S,cssProperties:w}=V7({allowEscapeViewBox:n,coordinate:a,offsetTopLeft:c,position:u,reverseDirection:d,tooltipBox:{height:h.height,width:h.width},useTranslate3d:f,viewBox:p}),x=b?{}:Yf(Yf({transition:l&&t?"transform ".concat(r,"ms ").concat(i):void 0},w),{},{pointerEvents:"none",visibility:!this.state.dismissed&&t&&s?"visible":"hidden",position:"absolute",top:0,left:0}),_=Yf(Yf({},x),{},{visibility:!this.state.dismissed&&t&&s?"visible":"hidden"},m);return O.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:S,style:_,ref:g},o)}}var K7=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),eo={devToolsEnabled:!1,isSsr:K7()},I2=()=>ce(e=>e.rootProps.accessibilityLayer);function pn(e){return Number.isFinite(e)}function Fs(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function ry(){return ry=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ry.apply(null,arguments)}function R2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function L2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?R2(Object(n),!0).forEach(function(r){q7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function q7(e,t,n){return(t=G7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function G7(e){var t=X7(e,"string");return typeof t=="symbol"?t:t+""}function X7(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var F2={curveBasisClosed:J3,curveBasisOpen:e8,curveBasis:Z3,curveBumpX:F3,curveBumpY:$3,curveLinearClosed:t8,curveLinear:uf,curveMonotoneX:n8,curveMonotoneY:r8,curveNatural:i8,curveStep:o8,curveStepAfter:s8,curveStepBefore:a8},Uf=e=>pn(e.x)&&pn(e.y),bc=e=>e.x,xc=e=>e.y,Q7=(e,t)=>{if(typeof e=="function")return e;var n="curve".concat(lc(e));return(n==="curveMonotone"||n==="curveBump")&&t?F2["".concat(n).concat(t==="vertical"?"Y":"X")]:F2[n]||uf},Z7=e=>{var{type:t="linear",points:n=[],baseLine:r,layout:i,connectNulls:o=!1}=e,a=Q7(t,i),s=o?n.filter(Uf):n,l;if(Array.isArray(r)){var c=o?r.filter(d=>Uf(d)):r,u=s.map((d,f)=>L2(L2({},d),{},{base:c[f]}));return i==="vertical"?l=df().y(xc).x1(bc).x0(d=>d.base.x):l=df().x(bc).y1(xc).y0(d=>d.base.y),l.defined(Uf).curve(a),l(u)}return i==="vertical"&&he(r)?l=df().y(xc).x1(bc).x0(r):he(r)?l=df().x(bc).y1(xc).y0(r):l=QS().x(bc).y(xc),l.defined(Uf).curve(a),l(s)},$s=e=>{var{className:t,points:n,path:r,pathRef:i}=e;if((!n||!n.length)&&!r)return null;var o=n&&n.length?Z7(e):r;return O.createElement("path",ry({},kr(e),Sg(e),{className:ie("recharts-curve",t),d:o===null?void 0:o,ref:i}))},J7=["x","y","top","left","width","height","className"];function iy(){return iy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},iy.apply(null,arguments)}function $2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function eV(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$2(Object(n),!0).forEach(function(r){tV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tV(e,t,n){return(t=nV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nV(e){var t=rV(e,"string");return typeof t=="symbol"?t:t+""}function rV(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function iV(e,t){if(e==null)return{};var n,r,i=oV(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function oV(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var aV=(e,t,n,r,i,o)=>"M".concat(e,",").concat(i,"v").concat(r,"M").concat(o,",").concat(t,"h").concat(n),sV=e=>{var{x:t=0,y:n=0,top:r=0,left:i=0,width:o=0,height:a=0,className:s}=e,l=iV(e,J7),c=eV({x:t,y:n,top:r,left:i,width:o,height:a},l);return!he(t)||!he(n)||!he(o)||!he(a)||!he(r)||!he(i)?null:O.createElement("path",iy({},lt(c,!0),{className:ie("recharts-cross",s),d:aV(t,n,o,a,r,i)}))};function lV(e,t,n,r){var i=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-i,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function B2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function cV(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?B2(Object(n),!0).forEach(function(r){uV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function uV(e,t,n){return(t=dV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dV(e){var t=fV(e,"string");return typeof t=="symbol"?t:t+""}function fV(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Kt(e,t){var n=cV({},e),r=t,i=Object.keys(t),o=i.reduce((a,s)=>(a[s]===void 0&&r[s]!==void 0&&(a[s]=r[s]),a),n);return o}function pV(){}function W2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function z2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?W2(Object(n),!0).forEach(function(r){hV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hV(e,t,n){return(t=mV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mV(e){var t=gV(e,"string");return typeof t=="symbol"?t:t+""}function gV(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var vV=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),V2=(e,t,n)=>e.map(r=>"".concat(vV(r)," ").concat(t,"ms ").concat(n)).join(","),yV=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((n,r)=>n.filter(i=>r.includes(i))),wc=(e,t)=>Object.keys(t).reduce((n,r)=>z2(z2({},n),{},{[r]:e(r,t[r])}),{});function H2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function hn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?H2(Object(n),!0).forEach(function(r){bV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bV(e,t,n){return(t=xV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xV(e){var t=wV(e,"string");return typeof t=="symbol"?t:t+""}function wV(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Kf=(e,t,n)=>e+(t-e)*n,oy=e=>{var{from:t,to:n}=e;return t!==n},Y2=(e,t,n)=>{var r=wc((i,o)=>{if(oy(o)){var[a,s]=e(o.from,o.to,o.velocity);return hn(hn({},o),{},{from:a,velocity:s})}return o},t);return n<1?wc((i,o)=>oy(o)?hn(hn({},o),{},{velocity:Kf(o.velocity,r[i].velocity,n),from:Kf(o.from,r[i].from,n)}):o,t):Y2(e,r,n-1)};function _V(e,t,n,r,i,o){var a,s=r.reduce((f,p)=>hn(hn({},f),{},{[p]:{from:e[p],velocity:0,to:t[p]}}),{}),l=()=>wc((f,p)=>p.from,s),c=()=>!Object.values(s).filter(oy).length,u=null,d=f=>{a||(a=f);var p=f-a,m=p/n.dt;s=Y2(n,s,m),i(hn(hn(hn({},e),t),l())),a=f,c()||(u=o.setTimeout(d))};return()=>(u=o.setTimeout(d),()=>{u()})}function SV(e,t,n,r,i,o,a){var s=null,l=i.reduce((d,f)=>hn(hn({},d),{},{[f]:[e[f],t[f]]}),{}),c,u=d=>{c||(c=d);var f=(d-c)/r,p=wc((h,g)=>Kf(...g,n(f)),l);if(o(hn(hn(hn({},e),t),p)),f<1)s=a.setTimeout(u);else{var m=wc((h,g)=>Kf(...g,n(1)),l);o(hn(hn(hn({},e),t),m))}};return()=>(s=a.setTimeout(u),()=>{s()})}const OV=(e,t,n,r,i,o)=>{var a=yV(e,t);return n.isStepper===!0?_V(e,t,n,a,i,o):SV(e,t,n,r,a,i,o)};var qf=1e-4,U2=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],K2=(e,t)=>e.map((n,r)=>n*t**r).reduce((n,r)=>n+r),q2=(e,t)=>n=>{var r=U2(e,t);return K2(r,n)},EV=(e,t)=>n=>{var r=U2(e,t),i=[...r.map((o,a)=>o*a).slice(1),0];return K2(i,n)},G2=function(){for(var t,n,r,i,o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];if(a.length===1)switch(a[0]){case"linear":[t,r,n,i]=[0,0,1,1];break;case"ease":[t,r,n,i]=[.25,.1,.25,1];break;case"ease-in":[t,r,n,i]=[.42,0,1,1];break;case"ease-out":[t,r,n,i]=[.42,0,.58,1];break;case"ease-in-out":[t,r,n,i]=[0,0,.58,1];break;default:{var l=a[0].split("(");l[0]==="cubic-bezier"&&l[1].split(")")[0].split(",").length===4&&([t,r,n,i]=l[1].split(")")[0].split(",").map(m=>parseFloat(m)))}}else a.length===4&&([t,r,n,i]=a);var c=q2(t,n),u=q2(r,i),d=EV(t,n),f=m=>m>1?1:m<0?0:m,p=m=>{for(var h=m>1?1:m,g=h,b=0;b<8;++b){var S=c(g)-h,w=d(g);if(Math.abs(S-h)<qf||w<qf)return u(g);g=f(g-S/w)}return u(g)};return p.isStepper=!1,p},PV=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:n=100,damping:r=8,dt:i=17}=t,o=(a,s,l)=>{var c=-(a-s)*n,u=l*r,d=l+(c-u)*i/1e3,f=l*i/1e3+a;return Math.abs(f-s)<qf&&Math.abs(d)<qf?[s,0]:[f,d]};return o.isStepper=!0,o.dt=i,o},kV=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return G2(e);case"spring":return PV();default:if(e.split("(")[0]==="cubic-bezier")return G2(e)}return typeof e=="function"?e:null};function CV(e){var t,n=()=>null,r=!1,i=null,o=a=>{if(!r){if(Array.isArray(a)){if(!a.length)return;var s=a,[l,...c]=s;if(typeof l=="number"){i=e.setTimeout(o.bind(null,c),l);return}o(l),i=e.setTimeout(o.bind(null,c));return}typeof a=="string"&&(t=a,n(t)),typeof a=="object"&&(t=a,n(t)),typeof a=="function"&&a()}};return{stop:()=>{r=!0},start:a=>{r=!1,i&&(i(),i=null),o(a)},subscribe:a=>(n=a,()=>{n=()=>null}),getTimeoutController:()=>e}}class DV{setTimeout(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=performance.now(),i=null,o=a=>{a-r>=n?t(a):typeof requestAnimationFrame=="function"&&(i=requestAnimationFrame(o))};return i=requestAnimationFrame(o),()=>{cancelAnimationFrame(i)}}}function AV(){return CV(new DV)}var TV=k.createContext(AV);function MV(e,t){var n=k.useContext(TV);return k.useMemo(()=>t??n(e),[e,t,n])}var NV={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},X2={t:0},ay={t:1};function Bs(e){var t=Kt(e,NV),{isActive:n,canBegin:r,duration:i,easing:o,begin:a,onAnimationEnd:s,onAnimationStart:l,children:c}=t,u=MV(t.animationId,t.animationManager),[d,f]=k.useState(n?X2:ay),p=k.useRef(null);return k.useEffect(()=>{n||f(ay)},[n]),k.useEffect(()=>{if(!n||!r)return pV;var m=OV(X2,ay,kV(o),i,f,u.getTimeoutController()),h=()=>{p.current=m()};return u.start([l,a,h,i,s]),()=>{u.stop(),p.current&&p.current(),s()}},[n,r,i,o,a,l,s,u]),c(d.t)}function Ws(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",n=k.useRef(sc(t)),r=k.useRef(e);return r.current!==e&&(n.current=sc(t),r.current=e),n.current}function Q2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Z2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Q2(Object(n),!0).forEach(function(r){jV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jV(e,t,n){return(t=IV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function IV(e){var t=RV(e,"string");return typeof t=="symbol"?t:t+""}function RV(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Gf(){return Gf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gf.apply(null,arguments)}var J2=(e,t,n,r,i)=>{var o=Math.min(Math.abs(n)/2,Math.abs(r)/2),a=r>=0?1:-1,s=n>=0?1:-1,l=r>=0&&n>=0||r<0&&n<0?1:0,c;if(o>0&&i instanceof Array){for(var u=[0,0,0,0],d=0,f=4;d<f;d++)u[d]=i[d]>o?o:i[d];c="M".concat(e,",").concat(t+a*u[0]),u[0]>0&&(c+="A ".concat(u[0],",").concat(u[0],",0,0,").concat(l,",").concat(e+s*u[0],",").concat(t)),c+="L ".concat(e+n-s*u[1],",").concat(t),u[1]>0&&(c+="A ".concat(u[1],",").concat(u[1],",0,0,").concat(l,`,
|
|
177
177
|
`).concat(e+n,",").concat(t+a*u[1])),c+="L ".concat(e+n,",").concat(t+r-a*u[2]),u[2]>0&&(c+="A ".concat(u[2],",").concat(u[2],",0,0,").concat(l,`,
|
|
178
178
|
`).concat(e+n-s*u[2],",").concat(t+r)),c+="L ".concat(e+s*u[3],",").concat(t+r),u[3]>0&&(c+="A ".concat(u[3],",").concat(u[3],",0,0,").concat(l,`,
|
|
179
179
|
`).concat(e,",").concat(t+r-a*u[3])),c+="Z"}else if(o>0&&i===+i&&i>0){var p=Math.min(o,i);c="M ".concat(e,",").concat(t+a*p,`
|
|
@@ -183,14 +183,14 @@ Take a look at the reducer(s) handling this action type: ${p.type}.
|
|
|
183
183
|
L `).concat(e+n,",").concat(t+r-a*p,`
|
|
184
184
|
A `).concat(p,",").concat(p,",0,0,").concat(l,",").concat(e+n-s*p,",").concat(t+r,`
|
|
185
185
|
L `).concat(e+s*p,",").concat(t+r,`
|
|
186
|
-
A `).concat(p,",").concat(p,",0,0,").concat(l,",").concat(e,",").concat(t+r-a*p," Z")}else c="M ".concat(e,",").concat(t," h ").concat(n," v ").concat(r," h ").concat(-n," Z");return c},LV={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},eP=e=>{var t=
|
|
186
|
+
A `).concat(p,",").concat(p,",0,0,").concat(l,",").concat(e,",").concat(t+r-a*p," Z")}else c="M ".concat(e,",").concat(t," h ").concat(n," v ").concat(r," h ").concat(-n," Z");return c},LV={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},eP=e=>{var t=Kt(e,LV),n=k.useRef(null),[r,i]=k.useState(-1);k.useEffect(()=>{if(n.current&&n.current.getTotalLength)try{var M=n.current.getTotalLength();M&&i(M)}catch{}},[]);var{x:o,y:a,width:s,height:l,radius:c,className:u}=t,{animationEasing:d,animationDuration:f,animationBegin:p,isAnimationActive:m,isUpdateAnimationActive:h}=t,g=k.useRef(s),b=k.useRef(l),S=k.useRef(o),w=k.useRef(a),x=k.useMemo(()=>({x:o,y:a,width:s,height:l,radius:c}),[o,a,s,l,c]),_=Ws(x,"rectangle-");if(o!==+o||a!==+a||s!==+s||l!==+l||s===0||l===0)return null;var E=ie("recharts-rectangle",u);if(!h)return O.createElement("path",Gf({},lt(t,!0),{className:E,d:J2(o,a,s,l,c)}));var C=g.current,D=b.current,T=S.current,j=w.current,A="0px ".concat(r===-1?1:r,"px"),P="".concat(r,"px 0px"),N=V2(["strokeDasharray"],f,typeof d=="string"?d:void 0);return O.createElement(Bs,{animationId:_,key:_,canBegin:r>0,duration:f,easing:d,isActive:h,begin:p},M=>{var R=nt(C,s,M),L=nt(D,l,M),$=nt(T,o,M),V=nt(j,a,M);n.current&&(g.current=R,b.current=L,S.current=$,w.current=V);var z;return m?M>0?z={transition:N,strokeDasharray:P}:z={strokeDasharray:A}:z={strokeDasharray:P},O.createElement("path",Gf({},lt(t,!0),{className:E,d:J2($,V,R,L,c),ref:n,style:Z2(Z2({},z),t.style)}))})};function tP(e){var{cx:t,cy:n,radius:r,startAngle:i,endAngle:o}=e,a=Wt(t,n,r,i),s=Wt(t,n,r,o);return{points:[a,s],cx:t,cy:n,radius:r,startAngle:i,endAngle:o}}function sy(){return sy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sy.apply(null,arguments)}var FV=(e,t)=>{var n=Jt(t-e),r=Math.min(Math.abs(t-e),359.999);return n*r},Xf=e=>{var{cx:t,cy:n,radius:r,angle:i,sign:o,isExternal:a,cornerRadius:s,cornerIsExternal:l}=e,c=s*(a?1:-1)+r,u=Math.asin(s/c)/Rf,d=l?i:i+o*u,f=Wt(t,n,c,d),p=Wt(t,n,r,d),m=l?i-o*u:i,h=Wt(t,n,c*Math.cos(u*Rf),m);return{center:f,circleTangency:p,lineTangency:h,theta:u}},nP=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:o,endAngle:a}=e,s=FV(o,a),l=o+s,c=Wt(t,n,i,o),u=Wt(t,n,i,l),d="M ".concat(c.x,",").concat(c.y,`
|
|
187
187
|
A `).concat(i,",").concat(i,`,0,
|
|
188
188
|
`).concat(+(Math.abs(s)>180),",").concat(+(o>l),`,
|
|
189
189
|
`).concat(u.x,",").concat(u.y,`
|
|
190
190
|
`);if(r>0){var f=Wt(t,n,r,o),p=Wt(t,n,r,l);d+="L ".concat(p.x,",").concat(p.y,`
|
|
191
191
|
A `).concat(r,",").concat(r,`,0,
|
|
192
192
|
`).concat(+(Math.abs(s)>180),",").concat(+(o<=l),`,
|
|
193
|
-
`).concat(f.x,",").concat(f.y," Z")}else d+="L ".concat(t,",").concat(n," Z");return d},$V=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:i,cornerRadius:o,forceCornerRadius:a,cornerIsExternal:s,startAngle:l,endAngle:c}=e,u=
|
|
193
|
+
`).concat(f.x,",").concat(f.y," Z")}else d+="L ".concat(t,",").concat(n," Z");return d},$V=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:i,cornerRadius:o,forceCornerRadius:a,cornerIsExternal:s,startAngle:l,endAngle:c}=e,u=Jt(c-l),{circleTangency:d,lineTangency:f,theta:p}=Xf({cx:t,cy:n,radius:i,angle:l,sign:u,cornerRadius:o,cornerIsExternal:s}),{circleTangency:m,lineTangency:h,theta:g}=Xf({cx:t,cy:n,radius:i,angle:c,sign:-u,cornerRadius:o,cornerIsExternal:s}),b=s?Math.abs(l-c):Math.abs(l-c)-p-g;if(b<0)return a?"M ".concat(f.x,",").concat(f.y,`
|
|
194
194
|
a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0
|
|
195
195
|
a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0
|
|
196
196
|
`):nP({cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:l,endAngle:c});var S="M ".concat(f.x,",").concat(f.y,`
|
|
@@ -200,13 +200,13 @@ Take a look at the reducer(s) handling this action type: ${p.type}.
|
|
|
200
200
|
`);if(r>0){var{circleTangency:w,lineTangency:x,theta:_}=Xf({cx:t,cy:n,radius:r,angle:l,sign:u,isExternal:!0,cornerRadius:o,cornerIsExternal:s}),{circleTangency:E,lineTangency:C,theta:D}=Xf({cx:t,cy:n,radius:r,angle:c,sign:-u,isExternal:!0,cornerRadius:o,cornerIsExternal:s}),T=s?Math.abs(l-c):Math.abs(l-c)-_-D;if(T<0&&o===0)return"".concat(S,"L").concat(t,",").concat(n,"Z");S+="L".concat(C.x,",").concat(C.y,`
|
|
201
201
|
A`).concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(E.x,",").concat(E.y,`
|
|
202
202
|
A`).concat(r,",").concat(r,",0,").concat(+(T>180),",").concat(+(u>0),",").concat(w.x,",").concat(w.y,`
|
|
203
|
-
A`).concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(x.x,",").concat(x.y,"Z")}else S+="L".concat(t,",").concat(n,"Z");return S},BV={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},rP=e=>{var t=Ut(e,BV),{cx:n,cy:r,innerRadius:i,outerRadius:o,cornerRadius:a,forceCornerRadius:s,cornerIsExternal:l,startAngle:c,endAngle:u,className:d}=t;if(o<i||c===u)return null;var f=ie("recharts-sector",d),p=o-i,m=On(a,p,0,!0),h;return m>0&&Math.abs(c-u)<360?h=$V({cx:n,cy:r,innerRadius:i,outerRadius:o,cornerRadius:Math.min(m,p/2),forceCornerRadius:s,cornerIsExternal:l,startAngle:c,endAngle:u}):h=nP({cx:n,cy:r,innerRadius:i,outerRadius:o,startAngle:c,endAngle:u}),O.createElement("path",sy({},lt(t,!0),{className:f,d:h}))};function WV(e,t,n){var r,i,o,a;if(e==="horizontal")r=t.x,o=r,i=n.top,a=n.top+n.height;else if(e==="vertical")i=t.y,a=i,r=n.left,o=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var{cx:s,cy:l,innerRadius:c,outerRadius:u,angle:d}=t,f=Wt(s,l,c,d),p=Wt(s,l,u,d);r=f.x,i=f.y,o=p.x,a=p.y}else return tP(t);return[{x:r,y:i},{x:o,y:a}]}var ly={},cy={},uy={},iP;function zV(){return iP||(iP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=pE();function n(r){return t.isSymbol(r)?NaN:Number(r)}e.toNumber=n})(uy)),uy}var oP;function VV(){return oP||(oP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=zV();function n(r){return r?(r=t.toNumber(r),r===1/0||r===-1/0?(r<0?-1:1)*Number.MAX_VALUE:r===r?r:0):r===0?r:0}e.toFinite=n})(cy)),cy}var aP;function HV(){return aP||(aP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=yE(),n=VV();function r(i,o,a){a&&typeof a!="number"&&t.isIterateeCall(i,o,a)&&(o=a=void 0),i=n.toFinite(i),o===void 0?(o=i,i=0):o=n.toFinite(o),a=a===void 0?i<o?1:-1:n.toFinite(a);const s=Math.max(Math.ceil((o-i)/(a||1)),0),l=new Array(s);for(let c=0;c<s;c++)l[c]=i,i+=a;return l}e.range=r})(ly)),ly}var dy,sP;function YV(){return sP||(sP=1,dy=HV().range),dy}var UV=YV();const lP=Ri(UV);function Bo(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function KV(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function fy(e){let t,n,r;e.length!==2?(t=Bo,n=(s,l)=>Bo(e(s),l),r=(s,l)=>e(s)-l):(t=e===Bo||e===KV?e:qV,n=e,r=e);function i(s,l,c=0,u=s.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;n(s[d],l)<0?c=d+1:u=d}while(c<u)}return c}function o(s,l,c=0,u=s.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;n(s[d],l)<=0?c=d+1:u=d}while(c<u)}return c}function a(s,l,c=0,u=s.length){const d=i(s,l,c,u-1);return d>c&&r(s[d-1],l)>-r(s[d],l)?d-1:d}return{left:i,center:a,right:o}}function qV(){return 0}function cP(e){return e===null?NaN:+e}function*GV(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const _c=fy(Bo).right;fy(cP).center;class uP extends Map{constructor(t,n=ZV){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(dP(this,t))}has(t){return super.has(dP(this,t))}set(t,n){return super.set(XV(this,t),n)}delete(t){return super.delete(QV(this,t))}}function dP({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function XV({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function QV({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function ZV(e){return e!==null&&typeof e=="object"?e.valueOf():e}function JV(e=Bo){if(e===Bo)return fP;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function fP(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const eH=Math.sqrt(50),tH=Math.sqrt(10),nH=Math.sqrt(2);function Qf(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=eH?10:o>=tH?5:o>=nH?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,i)*a,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=n&&n<2?Qf(e,t,n*2):[s,l,c]}function py(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,o,a]=r?Qf(t,e,n):Qf(e,t,n);if(!(o>=i))return[];const s=o-i+1,l=new Array(s);if(r)if(a<0)for(let c=0;c<s;++c)l[c]=(o-c)/-a;else for(let c=0;c<s;++c)l[c]=(o-c)*a;else if(a<0)for(let c=0;c<s;++c)l[c]=(i+c)/-a;else for(let c=0;c<s;++c)l[c]=(i+c)*a;return l}function hy(e,t,n){return t=+t,e=+e,n=+n,Qf(e,t,n)[2]}function my(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?hy(t,e,n):hy(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function pP(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function hP(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function mP(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?fP:JV(i);r>n;){if(r-n>600){const l=r-n+1,c=t-n+1,u=Math.log(l),d=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*d*(l-d)/l)*(c-l/2<0?-1:1),p=Math.max(n,Math.floor(t-c*d/l+f)),m=Math.min(r,Math.floor(t+(l-c)*d/l+f));mP(e,t,p,m,i)}const o=e[t];let a=n,s=r;for(Sc(e,n,t),i(e[r],o)>0&&Sc(e,n,r);a<s;){for(Sc(e,a,s),++a,--s;i(e[a],o)<0;)++a;for(;i(e[s],o)>0;)--s}i(e[n],o)===0?Sc(e,n,s):(++s,Sc(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function Sc(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function rH(e,t,n){if(e=Float64Array.from(GV(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return hP(e);if(t>=1)return pP(e);var r,i=(r-1)*t,o=Math.floor(i),a=pP(mP(e,o).subarray(0,o+1)),s=hP(e.subarray(o+1));return a+(s-a)*(i-o)}}function iH(e,t,n=cP){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),a=+n(e[o],o,e),s=+n(e[o+1],o+1,e);return a+(s-a)*(i-o)}}function oH(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(i);++r<i;)o[r]=e+r*n;return o}function Nr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function to(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const gy=Symbol("implicit");function vy(){var e=new uP,t=[],n=[],r=gy;function i(o){let a=e.get(o);if(a===void 0){if(r!==gy)return r;e.set(o,a=t.push(o)-1)}return n[a%n.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new uP;for(const a of o)e.has(a)||e.set(a,t.push(a)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return vy(t,n).unknown(r)},Nr.apply(i,arguments),i}function yy(){var e=vy().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,o,a,s=!1,l=0,c=0,u=.5;delete e.unknown;function d(){var f=t().length,p=i<r,m=p?i:r,h=p?r:i;o=(h-m)/Math.max(1,f-l+c*2),s&&(o=Math.floor(o)),m+=(h-m-o*(f-l))*u,a=o*(1-l),s&&(m=Math.round(m),a=Math.round(a));var g=oH(f).map(function(b){return m+o*b});return n(p?g.reverse():g)}return e.domain=function(f){return arguments.length?(t(f),d()):t()},e.range=function(f){return arguments.length?([r,i]=f,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(f){return[r,i]=f,r=+r,i=+i,s=!0,d()},e.bandwidth=function(){return a},e.step=function(){return o},e.round=function(f){return arguments.length?(s=!!f,d()):s},e.padding=function(f){return arguments.length?(l=Math.min(1,c=+f),d()):l},e.paddingInner=function(f){return arguments.length?(l=Math.min(1,f),d()):l},e.paddingOuter=function(f){return arguments.length?(c=+f,d()):c},e.align=function(f){return arguments.length?(u=Math.max(0,Math.min(1,f)),d()):u},e.copy=function(){return yy(t(),[r,i]).round(s).paddingInner(l).paddingOuter(c).align(u)},Nr.apply(d(),arguments)}function gP(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return gP(t())},e}function aH(){return gP(yy.apply(null,arguments).paddingInner(1))}function by(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function vP(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Oc(){}var Ec=.7,Zf=1/Ec,zs="\\s*([+-]?\\d+)\\s*",Pc="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",vi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",sH=/^#([0-9a-f]{3,8})$/,lH=new RegExp(`^rgb\\(${zs},${zs},${zs}\\)$`),cH=new RegExp(`^rgb\\(${vi},${vi},${vi}\\)$`),uH=new RegExp(`^rgba\\(${zs},${zs},${zs},${Pc}\\)$`),dH=new RegExp(`^rgba\\(${vi},${vi},${vi},${Pc}\\)$`),fH=new RegExp(`^hsl\\(${Pc},${vi},${vi}\\)$`),pH=new RegExp(`^hsla\\(${Pc},${vi},${vi},${Pc}\\)$`),yP={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};by(Oc,kc,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:bP,formatHex:bP,formatHex8:hH,formatHsl:mH,formatRgb:xP,toString:xP});function bP(){return this.rgb().formatHex()}function hH(){return this.rgb().formatHex8()}function mH(){return EP(this).formatHsl()}function xP(){return this.rgb().formatRgb()}function kc(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=sH.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?wP(t):n===3?new Kn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Jf(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Jf(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=lH.exec(e))?new Kn(t[1],t[2],t[3],1):(t=cH.exec(e))?new Kn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=uH.exec(e))?Jf(t[1],t[2],t[3],t[4]):(t=dH.exec(e))?Jf(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=fH.exec(e))?OP(t[1],t[2]/100,t[3]/100,1):(t=pH.exec(e))?OP(t[1],t[2]/100,t[3]/100,t[4]):yP.hasOwnProperty(e)?wP(yP[e]):e==="transparent"?new Kn(NaN,NaN,NaN,0):null}function wP(e){return new Kn(e>>16&255,e>>8&255,e&255,1)}function Jf(e,t,n,r){return r<=0&&(e=t=n=NaN),new Kn(e,t,n,r)}function gH(e){return e instanceof Oc||(e=kc(e)),e?(e=e.rgb(),new Kn(e.r,e.g,e.b,e.opacity)):new Kn}function xy(e,t,n,r){return arguments.length===1?gH(e):new Kn(e,t,n,r??1)}function Kn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}by(Kn,xy,vP(Oc,{brighter(e){return e=e==null?Zf:Math.pow(Zf,e),new Kn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ec:Math.pow(Ec,e),new Kn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Kn(ja(this.r),ja(this.g),ja(this.b),ep(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:_P,formatHex:_P,formatHex8:vH,formatRgb:SP,toString:SP}));function _P(){return`#${Ia(this.r)}${Ia(this.g)}${Ia(this.b)}`}function vH(){return`#${Ia(this.r)}${Ia(this.g)}${Ia(this.b)}${Ia((isNaN(this.opacity)?1:this.opacity)*255)}`}function SP(){const e=ep(this.opacity);return`${e===1?"rgb(":"rgba("}${ja(this.r)}, ${ja(this.g)}, ${ja(this.b)}${e===1?")":`, ${e})`}`}function ep(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ja(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ia(e){return e=ja(e),(e<16?"0":"")+e.toString(16)}function OP(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Qr(e,t,n,r)}function EP(e){if(e instanceof Qr)return new Qr(e.h,e.s,e.l,e.opacity);if(e instanceof Oc||(e=kc(e)),!e)return new Qr;if(e instanceof Qr)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(t===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-t)/s+2:a=(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Qr(a,s,l,e.opacity)}function yH(e,t,n,r){return arguments.length===1?EP(e):new Qr(e,t,n,r??1)}function Qr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}by(Qr,yH,vP(Oc,{brighter(e){return e=e==null?Zf:Math.pow(Zf,e),new Qr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ec:Math.pow(Ec,e),new Qr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Kn(wy(e>=240?e-240:e+120,i,r),wy(e,i,r),wy(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Qr(PP(this.h),tp(this.s),tp(this.l),ep(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=ep(this.opacity);return`${e===1?"hsl(":"hsla("}${PP(this.h)}, ${tp(this.s)*100}%, ${tp(this.l)*100}%${e===1?")":`, ${e})`}`}}));function PP(e){return e=(e||0)%360,e<0?e+360:e}function tp(e){return Math.max(0,Math.min(1,e||0))}function wy(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const _y=e=>()=>e;function bH(e,t){return function(n){return e+n*t}}function xH(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function wH(e){return(e=+e)==1?kP:function(t,n){return n-t?xH(t,n,e):_y(isNaN(t)?n:t)}}function kP(e,t){var n=t-e;return n?bH(e,n):_y(isNaN(e)?t:e)}const CP=(function e(t){var n=wH(t);function r(i,o){var a=n((i=xy(i)).r,(o=xy(o)).r),s=n(i.g,o.g),l=n(i.b,o.b),c=kP(i.opacity,o.opacity);return function(u){return i.r=a(u),i.g=s(u),i.b=l(u),i.opacity=c(u),i+""}}return r.gamma=e,r})(1);function _H(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=e[i]*(1-o)+t[i]*o;return r}}function SH(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function OH(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=Vs(e[a],t[a]);for(;a<n;++a)o[a]=t[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function EH(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function np(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function PH(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=Vs(e[i],t[i]):r[i]=t[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var Sy=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Oy=new RegExp(Sy.source,"g");function kH(e){return function(){return e}}function CH(e){return function(t){return e(t)+""}}function DH(e,t){var n=Sy.lastIndex=Oy.lastIndex=0,r,i,o,a=-1,s=[],l=[];for(e=e+"",t=t+"";(r=Sy.exec(e))&&(i=Oy.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:np(r,i)})),n=Oy.lastIndex;return n<t.length&&(o=t.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?CH(l[0].x):kH(t):(t=l.length,function(c){for(var u=0,d;u<t;++u)s[(d=l[u]).i]=d.x(c);return s.join("")})}function Vs(e,t){var n=typeof t,r;return t==null||n==="boolean"?_y(t):(n==="number"?np:n==="string"?(r=kc(t))?(t=r,CP):DH:t instanceof kc?CP:t instanceof Date?EH:SH(t)?_H:Array.isArray(t)?OH:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?PH:np)(e,t)}function Ey(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function AH(e,t){t===void 0&&(t=e,e=Vs);for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(i,i=t[++n]);return function(a){var s=Math.max(0,Math.min(r-1,Math.floor(a*=r)));return o[s](a-s)}}function TH(e){return function(){return e}}function rp(e){return+e}var DP=[0,1];function In(e){return e}function Py(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:TH(isNaN(t)?NaN:.5)}function MH(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function NH(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=Py(i,r),o=n(a,o)):(r=Py(r,i),o=n(o,a)),function(s){return o(r(s))}}function jH(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=Py(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(s){var l=_c(e,s,1,r)-1;return o[l](i[l](s))}}function Cc(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function ip(){var e=DP,t=DP,n=Vs,r,i,o,a=In,s,l,c;function u(){var f=Math.min(e.length,t.length);return a!==In&&(a=MH(e[0],e[f-1])),s=f>2?jH:NH,l=c=null,d}function d(f){return f==null||isNaN(f=+f)?o:(l||(l=s(e.map(r),t,n)))(r(a(f)))}return d.invert=function(f){return a(i((c||(c=s(t,e.map(r),np)))(f)))},d.domain=function(f){return arguments.length?(e=Array.from(f,rp),u()):e.slice()},d.range=function(f){return arguments.length?(t=Array.from(f),u()):t.slice()},d.rangeRound=function(f){return t=Array.from(f),n=Ey,u()},d.clamp=function(f){return arguments.length?(a=f?!0:In,u()):a!==In},d.interpolate=function(f){return arguments.length?(n=f,u()):n},d.unknown=function(f){return arguments.length?(o=f,d):o},function(f,p){return r=f,i=p,u()}}function ky(){return ip()(In,In)}function IH(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function op(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Hs(e){return e=op(Math.abs(e)),e?e[1]:NaN}function RH(e,t){return function(n,r){for(var i=n.length,o=[],a=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}function LH(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var FH=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Dc(e){if(!(t=FH.exec(e)))throw new Error("invalid format: "+e);var t;return new Cy({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Dc.prototype=Cy.prototype;function Cy(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Cy.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function $H(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var AP;function BH(e,t){var n=op(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(AP=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+op(e,Math.max(0,t+o-1))[0]}function TP(e,t){var n=op(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const MP={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:IH,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>TP(e*100,t),r:TP,s:BH,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function NP(e){return e}var jP=Array.prototype.map,IP=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function WH(e){var t=e.grouping===void 0||e.thousands===void 0?NP:RH(jP.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?NP:LH(jP.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(d){d=Dc(d);var f=d.fill,p=d.align,m=d.sign,h=d.symbol,g=d.zero,b=d.width,S=d.comma,w=d.precision,x=d.trim,_=d.type;_==="n"?(S=!0,_="g"):MP[_]||(w===void 0&&(w=12),x=!0,_="g"),(g||f==="0"&&p==="=")&&(g=!0,f="0",p="=");var E=h==="$"?n:h==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",C=h==="$"?r:/[%p]/.test(_)?a:"",D=MP[_],T=/[defgprs%]/.test(_);w=w===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function j(A){var P=E,N=C,M,R,L;if(_==="c")N=D(A)+N,A="";else{A=+A;var $=A<0||1/A<0;if(A=isNaN(A)?l:D(Math.abs(A),w),x&&(A=$H(A)),$&&+A==0&&m!=="+"&&($=!1),P=($?m==="("?m:s:m==="-"||m==="("?"":m)+P,N=(_==="s"?IP[8+AP/3]:"")+N+($&&m==="("?")":""),T){for(M=-1,R=A.length;++M<R;)if(L=A.charCodeAt(M),48>L||L>57){N=(L===46?i+A.slice(M+1):A.slice(M))+N,A=A.slice(0,M);break}}}S&&!g&&(A=t(A,1/0));var V=P.length+A.length+N.length,z=V<b?new Array(b-V+1).join(f):"";switch(S&&g&&(A=t(z+A,z.length?b-N.length:1/0),z=""),p){case"<":A=P+A+N+z;break;case"=":A=P+z+A+N;break;case"^":A=z.slice(0,V=z.length>>1)+P+A+N+z.slice(V);break;default:A=z+P+A+N;break}return o(A)}return j.toString=function(){return d+""},j}function u(d,f){var p=c((d=Dc(d),d.type="f",d)),m=Math.max(-8,Math.min(8,Math.floor(Hs(f)/3)))*3,h=Math.pow(10,-m),g=IP[8+m/3];return function(b){return p(h*b)+g}}return{format:c,formatPrefix:u}}var ap,Dy,RP;zH({thousands:",",grouping:[3],currency:["$",""]});function zH(e){return ap=WH(e),Dy=ap.format,RP=ap.formatPrefix,ap}function VH(e){return Math.max(0,-Hs(Math.abs(e)))}function HH(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Hs(t)/3)))*3-Hs(Math.abs(e)))}function YH(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Hs(t)-Hs(e))+1}function LP(e,t,n,r){var i=my(e,t,n),o;switch(r=Dc(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=HH(i,a))&&(r.precision=o),RP(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=YH(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=VH(i))&&(r.precision=o-(r.type==="%")*2);break}}return Dy(r)}function Wo(e){var t=e.domain;return e.ticks=function(n){var r=t();return py(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return LP(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,a=r[i],s=r[o],l,c,u=10;for(s<a&&(c=a,a=s,s=c,c=i,i=o,o=c);u-- >0;){if(c=hy(a,s,n),c===l)return r[i]=a,r[o]=s,t(r);if(c>0)a=Math.floor(a/c)*c,s=Math.ceil(s/c)*c;else if(c<0)a=Math.ceil(a*c)/c,s=Math.floor(s*c)/c;else break;l=c}return e},e}function FP(){var e=ky();return e.copy=function(){return Cc(e,FP())},Nr.apply(e,arguments),Wo(e)}function $P(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,rp),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return $P(e).unknown(t)},e=arguments.length?Array.from(e,rp):[0,1],Wo(n)}function BP(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],a;return o<i&&(a=n,n=r,r=a,a=i,i=o,o=a),e[n]=t.floor(i),e[r]=t.ceil(o),e}function WP(e){return Math.log(e)}function zP(e){return Math.exp(e)}function UH(e){return-Math.log(-e)}function KH(e){return-Math.exp(-e)}function qH(e){return isFinite(e)?+("1e"+e):e<0?0:e}function GH(e){return e===10?qH:e===Math.E?Math.exp:t=>Math.pow(e,t)}function XH(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function VP(e){return(t,n)=>-e(-t,n)}function Ay(e){const t=e(WP,zP),n=t.domain;let r=10,i,o;function a(){return i=XH(r),o=GH(r),n()[0]<0?(i=VP(i),o=VP(o),e(UH,KH)):e(WP,zP),t}return t.base=function(s){return arguments.length?(r=+s,a()):r},t.domain=function(s){return arguments.length?(n(s),a()):n()},t.ticks=s=>{const l=n();let c=l[0],u=l[l.length-1];const d=u<c;d&&([c,u]=[u,c]);let f=i(c),p=i(u),m,h;const g=s==null?10:+s;let b=[];if(!(r%1)&&p-f<g){if(f=Math.floor(f),p=Math.ceil(p),c>0){for(;f<=p;++f)for(m=1;m<r;++m)if(h=f<0?m/o(-f):m*o(f),!(h<c)){if(h>u)break;b.push(h)}}else for(;f<=p;++f)for(m=r-1;m>=1;--m)if(h=f>0?m/o(-f):m*o(f),!(h<c)){if(h>u)break;b.push(h)}b.length*2<g&&(b=py(c,u,g))}else b=py(f,p,Math.min(p-f,g)).map(o);return d?b.reverse():b},t.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=Dc(l)).precision==null&&(l.trim=!0),l=Dy(l)),s===1/0)return l;const c=Math.max(1,r*s/t.ticks().length);return u=>{let d=u/o(Math.round(i(u)));return d*r<r-.5&&(d*=r),d<=c?l(u):""}},t.nice=()=>n(BP(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),t}function HP(){const e=Ay(ip()).domain([1,10]);return e.copy=()=>Cc(e,HP()).base(e.base()),Nr.apply(e,arguments),e}function YP(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function UP(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Ty(e){var t=1,n=e(YP(t),UP(t));return n.constant=function(r){return arguments.length?e(YP(t=+r),UP(t)):t},Wo(n)}function KP(){var e=Ty(ip());return e.copy=function(){return Cc(e,KP()).constant(e.constant())},Nr.apply(e,arguments)}function qP(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function QH(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function ZH(e){return e<0?-e*e:e*e}function My(e){var t=e(In,In),n=1;function r(){return n===1?e(In,In):n===.5?e(QH,ZH):e(qP(n),qP(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Wo(t)}function Ny(){var e=My(ip());return e.copy=function(){return Cc(e,Ny()).exponent(e.exponent())},Nr.apply(e,arguments),e}function JH(){return Ny.apply(null,arguments).exponent(.5)}function GP(e){return Math.sign(e)*e*e}function eY(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function XP(){var e=ky(),t=[0,1],n=!1,r;function i(o){var a=eY(e(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return e.invert(GP(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,rp)).map(GP)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return XP(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Nr.apply(i,arguments),Wo(i)}function QP(){var e=[],t=[],n=[],r;function i(){var a=0,s=Math.max(1,t.length);for(n=new Array(s-1);++a<s;)n[a-1]=iH(e,a/s);return o}function o(a){return a==null||isNaN(a=+a)?r:t[_c(n,a)]}return o.invertExtent=function(a){var s=t.indexOf(a);return s<0?[NaN,NaN]:[s>0?n[s-1]:e[0],s<n.length?n[s]:e[e.length-1]]},o.domain=function(a){if(!arguments.length)return e.slice();e=[];for(let s of a)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(Bo),i()},o.range=function(a){return arguments.length?(t=Array.from(a),i()):t.slice()},o.unknown=function(a){return arguments.length?(r=a,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return QP().domain(e).range(t).unknown(r)},Nr.apply(o,arguments)}function ZP(){var e=0,t=1,n=1,r=[.5],i=[0,1],o;function a(l){return l!=null&&l<=l?i[_c(r,l,0,n)]:o}function s(){var l=-1;for(r=new Array(n);++l<n;)r[l]=((l+1)*t-(l-n)*e)/(n+1);return a}return a.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,s()):[e,t]},a.range=function(l){return arguments.length?(n=(i=Array.from(l)).length-1,s()):i.slice()},a.invertExtent=function(l){var c=i.indexOf(l);return c<0?[NaN,NaN]:c<1?[e,r[0]]:c>=n?[r[n-1],t]:[r[c-1],r[c]]},a.unknown=function(l){return arguments.length&&(o=l),a},a.thresholds=function(){return r.slice()},a.copy=function(){return ZP().domain([e,t]).range(i).unknown(o)},Nr.apply(Wo(a),arguments)}function JP(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[_c(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var a=t.indexOf(o);return[e[a-1],e[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return JP().domain(e).range(t).unknown(n)},Nr.apply(i,arguments)}const jy=new Date,Iy=new Date;function Kt(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const a=i(o),s=i.ceil(o);return o-a<s-o?a:s},i.offset=(o,a)=>(t(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,s)=>{const l=[];if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o<a)||!(s>0))return l;let c;do l.push(c=new Date(+o)),t(o,s),e(o);while(c<o&&o<a);return l},i.filter=o=>Kt(a=>{if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!o(a););else for(;--s>=0;)for(;t(a,1),!o(a););}),n&&(i.count=(o,a)=>(jy.setTime(+o),Iy.setTime(+a),e(jy),e(Iy),Math.floor(n(jy,Iy))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?a=>r(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const sp=Kt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);sp.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Kt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):sp),sp.range;const no=1e3,jr=no*60,ro=jr*60,io=ro*24,Ry=io*7,ek=io*30,Ly=io*365,Ra=Kt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*no)},(e,t)=>(t-e)/no,e=>e.getUTCSeconds());Ra.range;const Fy=Kt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*no)},(e,t)=>{e.setTime(+e+t*jr)},(e,t)=>(t-e)/jr,e=>e.getMinutes());Fy.range;const $y=Kt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*jr)},(e,t)=>(t-e)/jr,e=>e.getUTCMinutes());$y.range;const By=Kt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*no-e.getMinutes()*jr)},(e,t)=>{e.setTime(+e+t*ro)},(e,t)=>(t-e)/ro,e=>e.getHours());By.range;const Wy=Kt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ro)},(e,t)=>(t-e)/ro,e=>e.getUTCHours());Wy.range;const Ac=Kt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*jr)/io,e=>e.getDate()-1);Ac.range;const lp=Kt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/io,e=>e.getUTCDate()-1);lp.range;const tk=Kt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/io,e=>Math.floor(e/io));tk.range;function La(e){return Kt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*jr)/Ry)}const cp=La(0),up=La(1),tY=La(2),nY=La(3),Ys=La(4),rY=La(5),iY=La(6);cp.range,up.range,tY.range,nY.range,Ys.range,rY.range,iY.range;function Fa(e){return Kt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/Ry)}const dp=Fa(0),fp=Fa(1),oY=Fa(2),aY=Fa(3),Us=Fa(4),sY=Fa(5),lY=Fa(6);dp.range,fp.range,oY.range,aY.range,Us.range,sY.range,lY.range;const zy=Kt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());zy.range;const Vy=Kt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());Vy.range;const oo=Kt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());oo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Kt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),oo.range;const ao=Kt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());ao.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Kt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),ao.range;function nk(e,t,n,r,i,o){const a=[[Ra,1,no],[Ra,5,5*no],[Ra,15,15*no],[Ra,30,30*no],[o,1,jr],[o,5,5*jr],[o,15,15*jr],[o,30,30*jr],[i,1,ro],[i,3,3*ro],[i,6,6*ro],[i,12,12*ro],[r,1,io],[r,2,2*io],[n,1,Ry],[t,1,ek],[t,3,3*ek],[e,1,Ly]];function s(c,u,d){const f=u<c;f&&([c,u]=[u,c]);const p=d&&typeof d.range=="function"?d:l(c,u,d),m=p?p.range(c,+u+1):[];return f?m.reverse():m}function l(c,u,d){const f=Math.abs(u-c)/d,p=fy(([,,g])=>g).right(a,f);if(p===a.length)return e.every(my(c/Ly,u/Ly,d));if(p===0)return sp.every(Math.max(my(c,u,d),1));const[m,h]=a[f/a[p-1][2]<a[p][2]/f?p-1:p];return m.every(h)}return[s,l]}const[cY,uY]=nk(ao,Vy,dp,tk,Wy,$y),[dY,fY]=nk(oo,zy,cp,Ac,By,Fy);function Hy(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Yy(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Tc(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function pY(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=Mc(i),u=Nc(i),d=Mc(o),f=Nc(o),p=Mc(a),m=Nc(a),h=Mc(s),g=Nc(s),b=Mc(l),S=Nc(l),w={a:$,A:V,b:z,B,c:null,d:lk,e:lk,f:RY,g:UY,G:qY,H:NY,I:jY,j:IY,L:ck,m:LY,M:FY,p:X,q,Q:mk,s:gk,S:$Y,u:BY,U:WY,V:zY,w:VY,W:HY,x:null,X:null,y:YY,Y:KY,Z:GY,"%":hk},x={a:re,A:J,b:ee,B:oe,c:null,d:dk,e:dk,f:JY,g:c9,G:d9,H:XY,I:QY,j:ZY,L:fk,m:e9,M:t9,p:se,q:fe,Q:mk,s:gk,S:n9,u:r9,U:i9,V:o9,w:a9,W:s9,x:null,X:null,y:l9,Y:u9,Z:f9,"%":hk},_={a:j,A,b:P,B:N,c:M,d:ak,e:ak,f:DY,g:ok,G:ik,H:sk,I:sk,j:EY,L:CY,m:OY,M:PY,p:T,q:SY,Q:TY,s:MY,S:kY,u:yY,U:bY,V:xY,w:vY,W:wY,x:R,X:L,y:ok,Y:ik,Z:_Y,"%":AY};w.x=E(n,w),w.X=E(r,w),w.c=E(t,w),x.x=E(n,x),x.X=E(r,x),x.c=E(t,x);function E(U,K){return function(Z){var I=[],ve=-1,te=0,ye=U.length,_e,He,ut;for(Z instanceof Date||(Z=new Date(+Z));++ve<ye;)U.charCodeAt(ve)===37&&(I.push(U.slice(te,ve)),(He=rk[_e=U.charAt(++ve)])!=null?_e=U.charAt(++ve):He=_e==="e"?" ":"0",(ut=K[_e])&&(_e=ut(Z,He)),I.push(_e),te=ve+1);return I.push(U.slice(te,ve)),I.join("")}}function C(U,K){return function(Z){var I=Tc(1900,void 0,1),ve=D(I,U,Z+="",0),te,ye;if(ve!=Z.length)return null;if("Q"in I)return new Date(I.Q);if("s"in I)return new Date(I.s*1e3+("L"in I?I.L:0));if(K&&!("Z"in I)&&(I.Z=0),"p"in I&&(I.H=I.H%12+I.p*12),I.m===void 0&&(I.m="q"in I?I.q:0),"V"in I){if(I.V<1||I.V>53)return null;"w"in I||(I.w=1),"Z"in I?(te=Yy(Tc(I.y,0,1)),ye=te.getUTCDay(),te=ye>4||ye===0?fp.ceil(te):fp(te),te=lp.offset(te,(I.V-1)*7),I.y=te.getUTCFullYear(),I.m=te.getUTCMonth(),I.d=te.getUTCDate()+(I.w+6)%7):(te=Hy(Tc(I.y,0,1)),ye=te.getDay(),te=ye>4||ye===0?up.ceil(te):up(te),te=Ac.offset(te,(I.V-1)*7),I.y=te.getFullYear(),I.m=te.getMonth(),I.d=te.getDate()+(I.w+6)%7)}else("W"in I||"U"in I)&&("w"in I||(I.w="u"in I?I.u%7:"W"in I?1:0),ye="Z"in I?Yy(Tc(I.y,0,1)).getUTCDay():Hy(Tc(I.y,0,1)).getDay(),I.m=0,I.d="W"in I?(I.w+6)%7+I.W*7-(ye+5)%7:I.w+I.U*7-(ye+6)%7);return"Z"in I?(I.H+=I.Z/100|0,I.M+=I.Z%100,Yy(I)):Hy(I)}}function D(U,K,Z,I){for(var ve=0,te=K.length,ye=Z.length,_e,He;ve<te;){if(I>=ye)return-1;if(_e=K.charCodeAt(ve++),_e===37){if(_e=K.charAt(ve++),He=_[_e in rk?K.charAt(ve++):_e],!He||(I=He(U,Z,I))<0)return-1}else if(_e!=Z.charCodeAt(I++))return-1}return I}function T(U,K,Z){var I=c.exec(K.slice(Z));return I?(U.p=u.get(I[0].toLowerCase()),Z+I[0].length):-1}function j(U,K,Z){var I=p.exec(K.slice(Z));return I?(U.w=m.get(I[0].toLowerCase()),Z+I[0].length):-1}function A(U,K,Z){var I=d.exec(K.slice(Z));return I?(U.w=f.get(I[0].toLowerCase()),Z+I[0].length):-1}function P(U,K,Z){var I=b.exec(K.slice(Z));return I?(U.m=S.get(I[0].toLowerCase()),Z+I[0].length):-1}function N(U,K,Z){var I=h.exec(K.slice(Z));return I?(U.m=g.get(I[0].toLowerCase()),Z+I[0].length):-1}function M(U,K,Z){return D(U,t,K,Z)}function R(U,K,Z){return D(U,n,K,Z)}function L(U,K,Z){return D(U,r,K,Z)}function $(U){return a[U.getDay()]}function V(U){return o[U.getDay()]}function z(U){return l[U.getMonth()]}function B(U){return s[U.getMonth()]}function X(U){return i[+(U.getHours()>=12)]}function q(U){return 1+~~(U.getMonth()/3)}function re(U){return a[U.getUTCDay()]}function J(U){return o[U.getUTCDay()]}function ee(U){return l[U.getUTCMonth()]}function oe(U){return s[U.getUTCMonth()]}function se(U){return i[+(U.getUTCHours()>=12)]}function fe(U){return 1+~~(U.getUTCMonth()/3)}return{format:function(U){var K=E(U+="",w);return K.toString=function(){return U},K},parse:function(U){var K=C(U+="",!1);return K.toString=function(){return U},K},utcFormat:function(U){var K=E(U+="",x);return K.toString=function(){return U},K},utcParse:function(U){var K=C(U+="",!0);return K.toString=function(){return U},K}}}var rk={"-":"",_:" ",0:"0"},Jt=/^\s*\d+/,hY=/^%/,mY=/[\\^$*+?|[\]().{}]/g;function Ne(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function gY(e){return e.replace(mY,"\\$&")}function Mc(e){return new RegExp("^(?:"+e.map(gY).join("|")+")","i")}function Nc(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function vY(e,t,n){var r=Jt.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function yY(e,t,n){var r=Jt.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function bY(e,t,n){var r=Jt.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function xY(e,t,n){var r=Jt.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function wY(e,t,n){var r=Jt.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function ik(e,t,n){var r=Jt.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function ok(e,t,n){var r=Jt.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function _Y(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function SY(e,t,n){var r=Jt.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function OY(e,t,n){var r=Jt.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function ak(e,t,n){var r=Jt.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function EY(e,t,n){var r=Jt.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function sk(e,t,n){var r=Jt.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function PY(e,t,n){var r=Jt.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function kY(e,t,n){var r=Jt.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function CY(e,t,n){var r=Jt.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function DY(e,t,n){var r=Jt.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function AY(e,t,n){var r=hY.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function TY(e,t,n){var r=Jt.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function MY(e,t,n){var r=Jt.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function lk(e,t){return Ne(e.getDate(),t,2)}function NY(e,t){return Ne(e.getHours(),t,2)}function jY(e,t){return Ne(e.getHours()%12||12,t,2)}function IY(e,t){return Ne(1+Ac.count(oo(e),e),t,3)}function ck(e,t){return Ne(e.getMilliseconds(),t,3)}function RY(e,t){return ck(e,t)+"000"}function LY(e,t){return Ne(e.getMonth()+1,t,2)}function FY(e,t){return Ne(e.getMinutes(),t,2)}function $Y(e,t){return Ne(e.getSeconds(),t,2)}function BY(e){var t=e.getDay();return t===0?7:t}function WY(e,t){return Ne(cp.count(oo(e)-1,e),t,2)}function uk(e){var t=e.getDay();return t>=4||t===0?Ys(e):Ys.ceil(e)}function zY(e,t){return e=uk(e),Ne(Ys.count(oo(e),e)+(oo(e).getDay()===4),t,2)}function VY(e){return e.getDay()}function HY(e,t){return Ne(up.count(oo(e)-1,e),t,2)}function YY(e,t){return Ne(e.getFullYear()%100,t,2)}function UY(e,t){return e=uk(e),Ne(e.getFullYear()%100,t,2)}function KY(e,t){return Ne(e.getFullYear()%1e4,t,4)}function qY(e,t){var n=e.getDay();return e=n>=4||n===0?Ys(e):Ys.ceil(e),Ne(e.getFullYear()%1e4,t,4)}function GY(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ne(t/60|0,"0",2)+Ne(t%60,"0",2)}function dk(e,t){return Ne(e.getUTCDate(),t,2)}function XY(e,t){return Ne(e.getUTCHours(),t,2)}function QY(e,t){return Ne(e.getUTCHours()%12||12,t,2)}function ZY(e,t){return Ne(1+lp.count(ao(e),e),t,3)}function fk(e,t){return Ne(e.getUTCMilliseconds(),t,3)}function JY(e,t){return fk(e,t)+"000"}function e9(e,t){return Ne(e.getUTCMonth()+1,t,2)}function t9(e,t){return Ne(e.getUTCMinutes(),t,2)}function n9(e,t){return Ne(e.getUTCSeconds(),t,2)}function r9(e){var t=e.getUTCDay();return t===0?7:t}function i9(e,t){return Ne(dp.count(ao(e)-1,e),t,2)}function pk(e){var t=e.getUTCDay();return t>=4||t===0?Us(e):Us.ceil(e)}function o9(e,t){return e=pk(e),Ne(Us.count(ao(e),e)+(ao(e).getUTCDay()===4),t,2)}function a9(e){return e.getUTCDay()}function s9(e,t){return Ne(fp.count(ao(e)-1,e),t,2)}function l9(e,t){return Ne(e.getUTCFullYear()%100,t,2)}function c9(e,t){return e=pk(e),Ne(e.getUTCFullYear()%100,t,2)}function u9(e,t){return Ne(e.getUTCFullYear()%1e4,t,4)}function d9(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Us(e):Us.ceil(e),Ne(e.getUTCFullYear()%1e4,t,4)}function f9(){return"+0000"}function hk(){return"%"}function mk(e){return+e}function gk(e){return Math.floor(+e/1e3)}var Ks,vk,yk;p9({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function p9(e){return Ks=pY(e),vk=Ks.format,Ks.parse,yk=Ks.utcFormat,Ks.utcParse,Ks}function h9(e){return new Date(e)}function m9(e){return e instanceof Date?+e:+new Date(+e)}function Uy(e,t,n,r,i,o,a,s,l,c){var u=ky(),d=u.invert,f=u.domain,p=c(".%L"),m=c(":%S"),h=c("%I:%M"),g=c("%I %p"),b=c("%a %d"),S=c("%b %d"),w=c("%B"),x=c("%Y");function _(E){return(l(E)<E?p:s(E)<E?m:a(E)<E?h:o(E)<E?g:r(E)<E?i(E)<E?b:S:n(E)<E?w:x)(E)}return u.invert=function(E){return new Date(d(E))},u.domain=function(E){return arguments.length?f(Array.from(E,m9)):f().map(h9)},u.ticks=function(E){var C=f();return e(C[0],C[C.length-1],E??10)},u.tickFormat=function(E,C){return C==null?_:c(C)},u.nice=function(E){var C=f();return(!E||typeof E.range!="function")&&(E=t(C[0],C[C.length-1],E??10)),E?f(BP(C,E)):u},u.copy=function(){return Cc(u,Uy(e,t,n,r,i,o,a,s,l,c))},u}function g9(){return Nr.apply(Uy(dY,fY,oo,zy,cp,Ac,By,Fy,Ra,vk).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function v9(){return Nr.apply(Uy(cY,uY,ao,Vy,dp,lp,Wy,$y,Ra,yk).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function pp(){var e=0,t=1,n,r,i,o,a=In,s=!1,l;function c(d){return d==null||isNaN(d=+d)?l:a(i===0?.5:(d=(o(d)-n)*i,s?Math.max(0,Math.min(1,d)):d))}c.domain=function(d){return arguments.length?([e,t]=d,n=o(e=+e),r=o(t=+t),i=n===r?0:1/(r-n),c):[e,t]},c.clamp=function(d){return arguments.length?(s=!!d,c):s},c.interpolator=function(d){return arguments.length?(a=d,c):a};function u(d){return function(f){var p,m;return arguments.length?([p,m]=f,a=d(p,m),c):[a(0),a(1)]}}return c.range=u(Vs),c.rangeRound=u(Ey),c.unknown=function(d){return arguments.length?(l=d,c):l},function(d){return o=d,n=d(e),r=d(t),i=n===r?0:1/(r-n),c}}function zo(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function bk(){var e=Wo(pp()(In));return e.copy=function(){return zo(e,bk())},to.apply(e,arguments)}function xk(){var e=Ay(pp()).domain([1,10]);return e.copy=function(){return zo(e,xk()).base(e.base())},to.apply(e,arguments)}function wk(){var e=Ty(pp());return e.copy=function(){return zo(e,wk()).constant(e.constant())},to.apply(e,arguments)}function Ky(){var e=My(pp());return e.copy=function(){return zo(e,Ky()).exponent(e.exponent())},to.apply(e,arguments)}function y9(){return Ky.apply(null,arguments).exponent(.5)}function _k(){var e=[],t=In;function n(r){if(r!=null&&!isNaN(r=+r))return t((_c(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let i of r)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(Bo),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,i)=>t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>rH(e,o/r))},n.copy=function(){return _k(t).domain(e)},to.apply(n,arguments)}function hp(){var e=0,t=.5,n=1,r=1,i,o,a,s,l,c=In,u,d=!1,f;function p(h){return isNaN(h=+h)?f:(h=.5+((h=+u(h))-o)*(r*h<r*o?s:l),c(d?Math.max(0,Math.min(1,h)):h))}p.domain=function(h){return arguments.length?([e,t,n]=h,i=u(e=+e),o=u(t=+t),a=u(n=+n),s=i===o?0:.5/(o-i),l=o===a?0:.5/(a-o),r=o<i?-1:1,p):[e,t,n]},p.clamp=function(h){return arguments.length?(d=!!h,p):d},p.interpolator=function(h){return arguments.length?(c=h,p):c};function m(h){return function(g){var b,S,w;return arguments.length?([b,S,w]=g,c=AH(h,[b,S,w]),p):[c(0),c(.5),c(1)]}}return p.range=m(Vs),p.rangeRound=m(Ey),p.unknown=function(h){return arguments.length?(f=h,p):f},function(h){return u=h,i=h(e),o=h(t),a=h(n),s=i===o?0:.5/(o-i),l=o===a?0:.5/(a-o),r=o<i?-1:1,p}}function Sk(){var e=Wo(hp()(In));return e.copy=function(){return zo(e,Sk())},to.apply(e,arguments)}function Ok(){var e=Ay(hp()).domain([.1,1,10]);return e.copy=function(){return zo(e,Ok()).base(e.base())},to.apply(e,arguments)}function Ek(){var e=Ty(hp());return e.copy=function(){return zo(e,Ek()).constant(e.constant())},to.apply(e,arguments)}function qy(){var e=My(hp());return e.copy=function(){return zo(e,qy()).exponent(e.exponent())},to.apply(e,arguments)}function b9(){return qy.apply(null,arguments).exponent(.5)}const jc=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:yy,scaleDiverging:Sk,scaleDivergingLog:Ok,scaleDivergingPow:qy,scaleDivergingSqrt:b9,scaleDivergingSymlog:Ek,scaleIdentity:$P,scaleImplicit:gy,scaleLinear:FP,scaleLog:HP,scaleOrdinal:vy,scalePoint:aH,scalePow:Ny,scaleQuantile:QP,scaleQuantize:ZP,scaleRadial:XP,scaleSequential:bk,scaleSequentialLog:xk,scaleSequentialPow:Ky,scaleSequentialQuantile:_k,scaleSequentialSqrt:y9,scaleSequentialSymlog:wk,scaleSqrt:JH,scaleSymlog:KP,scaleThreshold:JP,scaleTime:g9,scaleUtc:v9,tickFormat:LP},Symbol.toStringTag,{value:"Module"}));var Vo=e=>e.chartData,Gy=W([Vo],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),Ic=(e,t,n,r)=>r?Gy(e):Vo(e);function qs(e){if(Array.isArray(e)&&e.length===2){var[t,n]=e;if(pn(t)&&pn(n))return!0}return!1}function Pk(e,t,n){return n?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function x9(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[n,r]=e,i,o;if(pn(n))i=n;else if(typeof n=="function")return;if(pn(r))o=r;else if(typeof r=="function")return;var a=[i,o];if(qs(a))return a}}function w9(e,t,n){if(!(!n&&t==null)){if(typeof e=="function"&&t!=null)try{var r=e(t,n);if(qs(r))return Pk(r,t,n)}catch{}if(Array.isArray(e)&&e.length===2){var[i,o]=e,a,s;if(i==="auto")t!=null&&(a=Math.min(...t));else if(he(i))a=i;else if(typeof i=="function")try{t!=null&&(a=i(t?.[0]))}catch{}else if(typeof i=="string"&&b2.test(i)){var l=b2.exec(i);if(l==null||t==null)a=void 0;else{var c=+l[1];a=t[0]-c}}else a=t?.[0];if(o==="auto")t!=null&&(s=Math.max(...t));else if(he(o))s=o;else if(typeof o=="function")try{t!=null&&(s=o(t?.[1]))}catch{}else if(typeof o=="string"&&x2.test(o)){var u=x2.exec(o);if(u==null||t==null)s=void 0;else{var d=+u[1];s=t[1]+d}}else s=t?.[1];var f=[a,s];if(qs(f))return t==null?f:Pk(f,t,n)}}}var Gs=1e9,_9={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Zy,yt=!0,Ir="[DecimalError] ",$a=Ir+"Invalid argument: ",Xy=Ir+"Exponent out of range: ",Xs=Math.floor,Ba=Math.pow,S9=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,fr,en=1e7,pt=7,kk=9007199254740991,mp=Xs(kk/pt),de={};de.absoluteValue=de.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e},de.comparedTo=de.cmp=function(e){var t,n,r,i,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(r=o.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(o.d[t]!==e.d[t])return o.d[t]>e.d[t]^o.s<0?1:-1;return r===i?0:r>i^o.s<0?1:-1},de.decimalPlaces=de.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*pt;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n},de.dividedBy=de.div=function(e){return so(this,new this.constructor(e))},de.dividedToIntegerBy=de.idiv=function(e){var t=this,n=t.constructor;return it(so(t,new n(e),0,1),n.precision)},de.equals=de.eq=function(e){return!this.cmp(e)},de.exponent=function(){return zt(this)},de.greaterThan=de.gt=function(e){return this.cmp(e)>0},de.greaterThanOrEqualTo=de.gte=function(e){return this.cmp(e)>=0},de.isInteger=de.isint=function(){return this.e>this.d.length-2},de.isNegative=de.isneg=function(){return this.s<0},de.isPositive=de.ispos=function(){return this.s>0},de.isZero=function(){return this.s===0},de.lessThan=de.lt=function(e){return this.cmp(e)<0},de.lessThanOrEqualTo=de.lte=function(e){return this.cmp(e)<1},de.logarithm=de.log=function(e){var t,n=this,r=n.constructor,i=r.precision,o=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(fr))throw Error(Ir+"NaN");if(n.s<1)throw Error(Ir+(n.s?"NaN":"-Infinity"));return n.eq(fr)?new r(0):(yt=!1,t=so(Rc(n,o),Rc(e,o),o),yt=!0,it(t,i))},de.minus=de.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Tk(t,e):Ck(t,(e.s=-e.s,e))},de.modulo=de.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(Ir+"NaN");return n.s?(yt=!1,t=so(n,e,0,1).times(e),yt=!0,n.minus(t)):it(new r(n),i)},de.naturalExponential=de.exp=function(){return Dk(this)},de.naturalLogarithm=de.ln=function(){return Rc(this)},de.negated=de.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},de.plus=de.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Ck(t,e):Tk(t,(e.s=-e.s,e))},de.precision=de.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error($a+e);if(t=zt(i)+1,r=i.d.length-1,n=r*pt+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n},de.squareRoot=de.sqrt=function(){var e,t,n,r,i,o,a,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(Ir+"NaN")}for(e=zt(s),yt=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=bi(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Xs((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new l(t)):r=new l(i.toString()),n=l.precision,i=a=n+3;;)if(o=r,r=o.plus(so(s,o,a+2)).times(.5),bi(o.d).slice(0,a)===(t=bi(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),i==a&&t=="4999"){if(it(o,n+1,0),o.times(o).eq(s)){r=o;break}}else if(t!="9999")break;a+=4}return yt=!0,it(r,n)},de.times=de.mul=function(e){var t,n,r,i,o,a,s,l,c,u=this,d=u.constructor,f=u.d,p=(e=new d(e)).d;if(!u.s||!e.s)return new d(0);for(e.s*=u.s,n=u.e+e.e,l=f.length,c=p.length,l<c&&(o=f,f=p,p=o,a=l,l=c,c=a),o=[],a=l+c,r=a;r--;)o.push(0);for(r=c;--r>=0;){for(t=0,i=l+r;i>r;)s=o[i]+p[r]*f[i-r-1]+t,o[i--]=s%en|0,t=s/en|0;o[i]=(o[i]+t)%en|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,yt?it(e,d.precision):e},de.toDecimalPlaces=de.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(yi(e,0,Gs),t===void 0?t=r.rounding:yi(t,0,8),it(n,e+zt(n)+1,t))},de.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=Wa(r,!0):(yi(e,0,Gs),t===void 0?t=i.rounding:yi(t,0,8),r=it(new i(r),e+1,t),n=Wa(r,!0,e+1)),n},de.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?Wa(i):(yi(e,0,Gs),t===void 0?t=o.rounding:yi(t,0,8),r=it(new o(i),e+zt(i)+1,t),n=Wa(r.abs(),!1,e+zt(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)},de.toInteger=de.toint=function(){var e=this,t=e.constructor;return it(new t(e),zt(e)+1,t.rounding)},de.toNumber=function(){return+this},de.toPower=de.pow=function(e){var t,n,r,i,o,a,s=this,l=s.constructor,c=12,u=+(e=new l(e));if(!e.s)return new l(fr);if(s=new l(s),!s.s){if(e.s<1)throw Error(Ir+"Infinity");return s}if(s.eq(fr))return s;if(r=l.precision,e.eq(fr))return it(s,r);if(t=e.e,n=e.d.length-1,a=t>=n,o=s.s,a){if((n=u<0?-u:u)<=kk){for(i=new l(fr),t=Math.ceil(r/pt+4),yt=!1;n%2&&(i=i.times(s),Mk(i.d,t)),n=Xs(n/2),n!==0;)s=s.times(s),Mk(s.d,t);return yt=!0,e.s<0?new l(fr).div(i):it(i,r)}}else if(o<0)throw Error(Ir+"NaN");return o=o<0&&e.d[Math.max(t,n)]&1?-1:1,s.s=1,yt=!1,i=e.times(Rc(s,r+c)),yt=!0,i=Dk(i),i.s=o,i},de.toPrecision=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?(n=zt(i),r=Wa(i,n<=o.toExpNeg||n>=o.toExpPos)):(yi(e,1,Gs),t===void 0?t=o.rounding:yi(t,0,8),i=it(new o(i),e,t),n=zt(i),r=Wa(i,e<=n||n<=o.toExpNeg,e)),r},de.toSignificantDigits=de.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(yi(e,1,Gs),t===void 0?t=r.rounding:yi(t,0,8)),it(new r(n),e,t)},de.toString=de.valueOf=de.val=de.toJSON=de[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=zt(e),n=e.constructor;return Wa(e,t<=n.toExpNeg||t>=n.toExpPos)};function Ck(e,t){var n,r,i,o,a,s,l,c,u=e.constructor,d=u.precision;if(!e.s||!t.s)return t.s||(t=new u(e)),yt?it(t,d):t;if(l=e.d,c=t.d,a=e.e,i=t.e,l=l.slice(),o=a-i,o){for(o<0?(r=l,o=-o,s=c.length):(r=c,i=a,s=l.length),a=Math.ceil(d/pt),s=a>s?a+1:s+1,o>s&&(o=s,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(s=l.length,o=c.length,s-o<0&&(o=s,r=c,c=l,l=r),n=0;o;)n=(l[--o]=l[o]+c[o]+n)/en|0,l[o]%=en;for(n&&(l.unshift(n),++i),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=i,yt?it(t,d):t}function yi(e,t,n){if(e!==~~e||e<t||e>n)throw Error($a+e)}function bi(e){var t,n,r,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;t<i;t++)r=e[t]+"",n=pt-r.length,n&&(o+=Ho(n)),o+=r;a=e[t],r=a+"",n=pt-r.length,n&&(o+=Ho(n))}else if(a===0)return"0";for(;a%10===0;)a/=10;return o+a}var so=(function(){function e(r,i){var o,a=0,s=r.length;for(r=r.slice();s--;)o=r[s]*i+a,r[s]=o%en|0,a=o/en|0;return a&&r.unshift(a),r}function t(r,i,o,a){var s,l;if(o!=a)l=o>a?1:-1;else for(s=l=0;s<o;s++)if(r[s]!=i[s]){l=r[s]>i[s]?1:-1;break}return l}function n(r,i,o){for(var a=0;o--;)r[o]-=a,a=r[o]<i[o]?1:0,r[o]=a*en+r[o]-i[o];for(;!r[0]&&r.length>1;)r.shift()}return function(r,i,o,a){var s,l,c,u,d,f,p,m,h,g,b,S,w,x,_,E,C,D,T=r.constructor,j=r.s==i.s?1:-1,A=r.d,P=i.d;if(!r.s)return new T(r);if(!i.s)throw Error(Ir+"Division by zero");for(l=r.e-i.e,C=P.length,_=A.length,p=new T(j),m=p.d=[],c=0;P[c]==(A[c]||0);)++c;if(P[c]>(A[c]||0)&&--l,o==null?S=o=T.precision:a?S=o+(zt(r)-zt(i))+1:S=o,S<0)return new T(0);if(S=S/pt+2|0,c=0,C==1)for(u=0,P=P[0],S++;(c<_||u)&&S--;c++)w=u*en+(A[c]||0),m[c]=w/P|0,u=w%P|0;else{for(u=en/(P[0]+1)|0,u>1&&(P=e(P,u),A=e(A,u),C=P.length,_=A.length),x=C,h=A.slice(0,C),g=h.length;g<C;)h[g++]=0;D=P.slice(),D.unshift(0),E=P[0],P[1]>=en/2&&++E;do u=0,s=t(P,h,C,g),s<0?(b=h[0],C!=g&&(b=b*en+(h[1]||0)),u=b/E|0,u>1?(u>=en&&(u=en-1),d=e(P,u),f=d.length,g=h.length,s=t(d,h,f,g),s==1&&(u--,n(d,C<f?D:P,f))):(u==0&&(s=u=1),d=P.slice()),f=d.length,f<g&&d.unshift(0),n(h,d,g),s==-1&&(g=h.length,s=t(P,h,C,g),s<1&&(u++,n(h,C<g?D:P,g))),g=h.length):s===0&&(u++,h=[0]),m[c++]=u,s&&h[0]?h[g++]=A[x]||0:(h=[A[x]],g=1);while((x++<_||h[0]!==void 0)&&S--)}return m[0]||m.shift(),p.e=l,it(p,a?o+zt(p)+1:o)}})();function Dk(e,t){var n,r,i,o,a,s,l=0,c=0,u=e.constructor,d=u.precision;if(zt(e)>16)throw Error(Xy+zt(e));if(!e.s)return new u(fr);for(yt=!1,s=d,a=new u(.03125);e.abs().gte(.1);)e=e.times(a),c+=5;for(r=Math.log(Ba(2,c))/Math.LN10*2+5|0,s+=r,n=i=o=new u(fr),u.precision=s;;){if(i=it(i.times(e),s),n=n.times(++l),a=o.plus(so(i,n,s)),bi(a.d).slice(0,s)===bi(o.d).slice(0,s)){for(;c--;)o=it(o.times(o),s);return u.precision=d,t==null?(yt=!0,it(o,d)):o}o=a}}function zt(e){for(var t=e.e*pt,n=e.d[0];n>=10;n/=10)t++;return t}function Qy(e,t,n){if(t>e.LN10.sd())throw yt=!0,n&&(e.precision=n),Error(Ir+"LN10 precision limit exceeded");return it(new e(e.LN10),t)}function Ho(e){for(var t="";e--;)t+="0";return t}function Rc(e,t){var n,r,i,o,a,s,l,c,u,d=1,f=10,p=e,m=p.d,h=p.constructor,g=h.precision;if(p.s<1)throw Error(Ir+(p.s?"NaN":"-Infinity"));if(p.eq(fr))return new h(0);if(t==null?(yt=!1,c=g):c=t,p.eq(10))return t==null&&(yt=!0),Qy(h,c);if(c+=f,h.precision=c,n=bi(m),r=n.charAt(0),o=zt(p),Math.abs(o)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)p=p.times(e),n=bi(p.d),r=n.charAt(0),d++;o=zt(p),r>1?(p=new h("0."+n),o++):p=new h(r+"."+n.slice(1))}else return l=Qy(h,c+2,g).times(o+""),p=Rc(new h(r+"."+n.slice(1)),c-f).plus(l),h.precision=g,t==null?(yt=!0,it(p,g)):p;for(s=a=p=so(p.minus(fr),p.plus(fr),c),u=it(p.times(p),c),i=3;;){if(a=it(a.times(u),c),l=s.plus(so(a,new h(i),c)),bi(l.d).slice(0,c)===bi(s.d).slice(0,c))return s=s.times(2),o!==0&&(s=s.plus(Qy(h,c+2,g).times(o+""))),s=so(s,new h(d),c),h.precision=g,t==null?(yt=!0,it(s,g)):s;s=l,i+=2}}function Ak(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=Xs(n/pt),e.d=[],r=(n+1)%pt,n<0&&(r+=pt),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=pt;r<i;)e.d.push(+t.slice(r,r+=pt));t=t.slice(r),r=pt-t.length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),yt&&(e.e>mp||e.e<-mp))throw Error(Xy+n)}else e.s=0,e.e=0,e.d=[0];return e}function it(e,t,n){var r,i,o,a,s,l,c,u,d=e.d;for(a=1,o=d[0];o>=10;o/=10)a++;if(r=t-a,r<0)r+=pt,i=t,c=d[u=0];else{if(u=Math.ceil((r+1)/pt),o=d.length,u>=o)return e;for(c=o=d[u],a=1;o>=10;o/=10)a++;r%=pt,i=r-pt+a}if(n!==void 0&&(o=Ba(10,a-i-1),s=c/o%10|0,l=t<0||d[u+1]!==void 0||c%o,l=n<4?(s||l)&&(n==0||n==(e.s<0?3:2)):s>5||s==5&&(n==4||l||n==6&&(r>0?i>0?c/Ba(10,a-i):0:d[u-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return l?(o=zt(e),d.length=1,t=t-o-1,d[0]=Ba(10,(pt-t%pt)%pt),e.e=Xs(-t/pt)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(r==0?(d.length=u,o=1,u--):(d.length=u+1,o=Ba(10,pt-r),d[u]=i>0?(c/Ba(10,a-i)%Ba(10,i)|0)*o:0),l)for(;;)if(u==0){(d[0]+=o)==en&&(d[0]=1,++e.e);break}else{if(d[u]+=o,d[u]!=en)break;d[u--]=0,o=1}for(r=d.length;d[--r]===0;)d.pop();if(yt&&(e.e>mp||e.e<-mp))throw Error(Xy+zt(e));return e}function Tk(e,t){var n,r,i,o,a,s,l,c,u,d,f=e.constructor,p=f.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new f(e),yt?it(t,p):t;if(l=e.d,d=t.d,r=t.e,c=e.e,l=l.slice(),a=c-r,a){for(u=a<0,u?(n=l,a=-a,s=d.length):(n=d,r=c,s=l.length),i=Math.max(Math.ceil(p/pt),s)+2,a>i&&(a=i,n.length=1),n.reverse(),i=a;i--;)n.push(0);n.reverse()}else{for(i=l.length,s=d.length,u=i<s,u&&(s=i),i=0;i<s;i++)if(l[i]!=d[i]){u=l[i]<d[i];break}a=0}for(u&&(n=l,l=d,d=n,t.s=-t.s),s=l.length,i=d.length-s;i>0;--i)l[s++]=0;for(i=d.length;i>a;){if(l[--i]<d[i]){for(o=i;o&&l[--o]===0;)l[o]=en-1;--l[o],l[i]+=en}l[i]-=d[i]}for(;l[--s]===0;)l.pop();for(;l[0]===0;l.shift())--r;return l[0]?(t.d=l,t.e=r,yt?it(t,p):t):new f(0)}function Wa(e,t,n){var r,i=zt(e),o=bi(e.d),a=o.length;return t?(n&&(r=n-a)>0?o=o.charAt(0)+"."+o.slice(1)+Ho(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Ho(-i-1)+o,n&&(r=n-a)>0&&(o+=Ho(r))):i>=a?(o+=Ho(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+Ho(r))):((r=i+1)<a&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-a)>0&&(i+1===a&&(o+="."),o+=Ho(r))),e.s<0?"-"+o:o}function Mk(e,t){if(e.length>t)return e.length=t,!0}function Nk(e){var t,n,r;function i(o){var a=this;if(!(a instanceof i))return new i(o);if(a.constructor=i,o instanceof i){a.s=o.s,a.e=o.e,a.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error($a+o);if(o>0)a.s=1;else if(o<0)o=-o,a.s=-1;else{a.s=0,a.e=0,a.d=[0];return}if(o===~~o&&o<1e7){a.e=0,a.d=[o];return}return Ak(a,o.toString())}else if(typeof o!="string")throw Error($a+o);if(o.charCodeAt(0)===45?(o=o.slice(1),a.s=-1):a.s=1,S9.test(o))Ak(a,o);else throw Error($a+o)}if(i.prototype=de,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=Nk,i.config=i.set=O9,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return i.config(e),i}function O9(e){if(!e||typeof e!="object")throw Error(Ir+"Object expected");var t,n,r,i=["precision",1,Gs,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((r=e[n=i[t]])!==void 0)if(Xs(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error($a+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error($a+n+": "+r);return this}var Zy=Nk(_9);fr=new Zy(1);const Qe=Zy;var E9=e=>e,jk={},Ik=e=>e===jk,Rk=e=>function t(){return arguments.length===0||arguments.length===1&&Ik(arguments.length<=0?void 0:arguments[0])?t:e(...arguments)},Lk=(e,t)=>e===1?t:Rk(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=r.filter(a=>a!==jk).length;return o>=e?t(...r):Lk(e-o,Rk(function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];var c=r.map(u=>Ik(u)?s.shift():u);return t(...c,...s)}))}),gp=e=>Lk(e.length,e),Jy=(e,t)=>{for(var n=[],r=e;r<t;++r)n[r-e]=r;return n},P9=gp((e,t)=>Array.isArray(t)?t.map(e):Object.keys(t).map(n=>t[n]).map(e)),k9=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return E9;var i=n.reverse(),o=i[0],a=i.slice(1);return function(){return a.reduce((s,l)=>l(s),o(...arguments))}},eb=e=>Array.isArray(e)?e.reverse():e.split("").reverse().join(""),Fk=e=>{var t=null,n=null;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return t&&i.every((a,s)=>{var l;return a===((l=t)===null||l===void 0?void 0:l[s])})||(t=i,n=e(...i)),n}};function $k(e){var t;return e===0?t=1:t=Math.floor(new Qe(e).abs().log(10).toNumber())+1,t}function Bk(e,t,n){for(var r=new Qe(e),i=0,o=[];r.lt(t)&&i<1e5;)o.push(r.toNumber()),r=r.add(n),i++;return o}gp((e,t,n)=>{var r=+e,i=+t;return r+n*(i-r)}),gp((e,t,n)=>{var r=t-+e;return r=r||1/0,(n-e)/r}),gp((e,t,n)=>{var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});var Wk=e=>{var[t,n]=e,[r,i]=[t,n];return t>n&&([r,i]=[n,t]),[r,i]},zk=(e,t,n)=>{if(e.lte(0))return new Qe(0);var r=$k(e.toNumber()),i=new Qe(10).pow(r),o=e.div(i),a=r!==1?.05:.1,s=new Qe(Math.ceil(o.div(a).toNumber())).add(n).mul(a),l=s.mul(i);return t?new Qe(l.toNumber()):new Qe(Math.ceil(l.toNumber()))},C9=(e,t,n)=>{var r=new Qe(1),i=new Qe(e);if(!i.isint()&&n){var o=Math.abs(e);o<1?(r=new Qe(10).pow($k(e)-1),i=new Qe(Math.floor(i.div(r).toNumber())).mul(r)):o>1&&(i=new Qe(Math.floor(e)))}else e===0?i=new Qe(Math.floor((t-1)/2)):n||(i=new Qe(Math.floor(e)));var a=Math.floor((t-1)/2),s=k9(P9(l=>i.add(new Qe(l-a).mul(r)).toNumber()),Jy);return s(0,t)},Vk=function(t,n,r,i){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((n-t)/(r-1)))return{step:new Qe(0),tickMin:new Qe(0),tickMax:new Qe(0)};var a=zk(new Qe(n).sub(t).div(r-1),i,o),s;t<=0&&n>=0?s=new Qe(0):(s=new Qe(t).add(n).div(2),s=s.sub(new Qe(s).mod(a)));var l=Math.ceil(s.sub(t).div(a).toNumber()),c=Math.ceil(new Qe(n).sub(s).div(a).toNumber()),u=l+c+1;return u>r?Vk(t,n,r,i,o+1):(u<r&&(c=n>0?c+(r-u):c,l=n>0?l:l+(r-u)),{step:a,tickMin:s.sub(new Qe(l).mul(a)),tickMax:s.add(new Qe(c).mul(a))})};function D9(e){var[t,n]=e,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(r,2),[a,s]=Wk([t,n]);if(a===-1/0||s===1/0){var l=s===1/0?[a,...Jy(0,r-1).map(()=>1/0)]:[...Jy(0,r-1).map(()=>-1/0),s];return t>n?eb(l):l}if(a===s)return C9(a,r,i);var{step:c,tickMin:u,tickMax:d}=Vk(a,s,o,i,0),f=Bk(u,d.add(new Qe(.1).mul(c)),c);return t>n?eb(f):f}function A9(e,t){var[n,r]=e,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,[o,a]=Wk([n,r]);if(o===-1/0||a===1/0)return[n,r];if(o===a)return[o];var s=Math.max(t,2),l=zk(new Qe(a).sub(o).div(s-1),i,0),c=[...Bk(new Qe(o),new Qe(a),l),a];return i===!1&&(c=c.map(u=>Math.round(u))),n>r?eb(c):c}var T9=Fk(D9),M9=Fk(A9),Hk=e=>e.rootProps.maxBarSize,N9=e=>e.rootProps.barGap,Yk=e=>e.rootProps.barCategoryGap,j9=e=>e.rootProps.barSize,Lc=e=>e.rootProps.stackOffset,tb=e=>e.options.chartName,nb=e=>e.rootProps.syncId,Uk=e=>e.rootProps.syncMethod,rb=e=>e.options.eventEmitter,lo={allowDuplicatedCategory:!0,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"category"},pr={allowDataOverflow:!1,allowDuplicatedCategory:!0,radiusAxisId:0,scale:"auto",tick:!0,tickCount:5,type:"number"},vp=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t},I9={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:lo.angleAxisId,includeHidden:!1,name:void 0,reversed:lo.reversed,scale:lo.scale,tick:lo.tick,tickCount:void 0,ticks:void 0,type:lo.type,unit:void 0},R9={allowDataOverflow:pr.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:pr.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:pr.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:pr.scale,tick:pr.tick,tickCount:pr.tickCount,ticks:void 0,type:pr.type,unit:void 0},L9={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:lo.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:lo.angleAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:lo.scale,tick:lo.tick,tickCount:void 0,ticks:void 0,type:"number",unit:void 0},F9={allowDataOverflow:pr.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:pr.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:pr.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:pr.scale,tick:pr.tick,tickCount:pr.tickCount,ticks:void 0,type:"category",unit:void 0},ib=(e,t)=>e.polarAxis.angleAxis[t]!=null?e.polarAxis.angleAxis[t]:e.layout.layoutType==="radial"?L9:I9,ob=(e,t)=>e.polarAxis.radiusAxis[t]!=null?e.polarAxis.radiusAxis[t]:e.layout.layoutType==="radial"?F9:R9,yp=e=>e.polarOptions,ab=W([Zi,Ji,Yt],d2),Kk=W([yp,ab],(e,t)=>{if(e!=null)return On(e.innerRadius,t,0)}),qk=W([yp,ab],(e,t)=>{if(e!=null)return On(e.outerRadius,t,t*.8)}),$9=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:n}=e;return[t,n]},Gk=W([yp],$9);W([ib,Gk],vp);var Xk=W([ab,Kk,qk],(e,t,n)=>{if(!(e==null||t==null||n==null))return[t,n]});W([ob,Xk],vp);var Qk=W([Pe,yp,Kk,qk,Zi,Ji],(e,t,n,r,i,o)=>{if(!(e!=="centric"&&e!=="radial"||t==null||n==null||r==null)){var{cx:a,cy:s,startAngle:l,endAngle:c}=t;return{cx:On(a,i,i/2),cy:On(s,o,o/2),innerRadius:n,outerRadius:r,startAngle:l,endAngle:c,clockWise:!1}}}),bt=(e,t)=>t,Fc=(e,t,n)=>n;function bp(e){return e?.id}var qt=e=>{var t=Pe(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},Qs=e=>e.tooltip.settings.axisId,tn=e=>{var t=qt(e),n=Qs(e);return $c(e,t,n)},Zk=W([tn],e=>e?.dataKey);function Jk(e,t,n){var{chartData:r=[]}=t,{allowDuplicatedCategory:i,dataKey:o}=n,a=new Map;return e.forEach(s=>{var l,c=(l=s.data)!==null&&l!==void 0?l:r;if(!(c==null||c.length===0)){var u=bp(s);c.forEach((d,f)=>{var p=o==null||i?f:String(rt(d,o,null)),m=rt(d,s.dataKey,0),h;a.has(p)?h=a.get(p):h={},Object.assign(h,{[u]:m}),a.set(p,h)})}}),Array.from(a.values())}function xp(e){return e.stackId!=null&&e.dataKey!=null}function eC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function wp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?eC(Object(n),!0).forEach(function(r){B9(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function B9(e,t,n){return(t=W9(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function W9(e){var t=z9(e,"string");return typeof t=="symbol"?t:t+""}function z9(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var sb=[0,"auto"],hr={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0},tC=(e,t)=>e.cartesianAxis.xAxis[t],xi=(e,t)=>{var n=tC(e,t);return n??hr},mr={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:sb,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,width:gc},nC=(e,t)=>e.cartesianAxis.yAxis[t],wi=(e,t)=>{var n=nC(e,t);return n??mr},V9={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},lb=(e,t)=>{var n=e.cartesianAxis.zAxis[t];return n??V9},jt=(e,t,n)=>{switch(t){case"xAxis":return xi(e,n);case"yAxis":return wi(e,n);case"zAxis":return lb(e,n);case"angleAxis":return ib(e,n);case"radiusAxis":return ob(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},H9=(e,t,n)=>{switch(t){case"xAxis":return xi(e,n);case"yAxis":return wi(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},$c=(e,t,n)=>{switch(t){case"xAxis":return xi(e,n);case"yAxis":return wi(e,n);case"angleAxis":return ib(e,n);case"radiusAxis":return ob(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},rC=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function cb(e,t){return n=>{switch(e){case"xAxis":return"xAxisId"in n&&n.xAxisId===t;case"yAxis":return"yAxisId"in n&&n.yAxisId===t;case"zAxis":return"zAxisId"in n&&n.zAxisId===t;case"angleAxis":return"angleAxisId"in n&&n.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in n&&n.radiusAxisId===t;default:return!1}}}var Bc=e=>e.graphicalItems.cartesianItems,Y9=W([bt,Fc],cb),ub=(e,t,n)=>e.filter(n).filter(r=>t?.includeHidden===!0?!0:!r.hide),Wc=W([Bc,jt,Y9],ub),iC=W([Wc],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(xp)),oC=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),aC=W([Wc],oC),db=e=>e.map(t=>t.data).filter(Boolean).flat(1),U9=W([Wc],db),fb=(e,t)=>{var{chartData:n=[],dataStartIndex:r,dataEndIndex:i}=t;return e.length>0?e:n.slice(r,i+1)},pb=W([U9,Ic],fb),hb=(e,t,n)=>t?.dataKey!=null?e.map(r=>({value:rt(r,t.dataKey)})):n.length>0?n.map(r=>r.dataKey).flatMap(r=>e.map(i=>({value:rt(i,r)}))):e.map(r=>({value:r})),_p=W([pb,jt,Wc],hb);function sC(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function za(e){return e.filter(t=>Pr(t)||t instanceof Date).map(Number).filter(t=>Sn(t)===!1)}function K9(e,t,n){return!n||typeof t!="number"||Sn(t)?[]:n.length?za(n.flatMap(r=>{var i=rt(e,r.dataKey),o,a;if(Array.isArray(i)?[o,a]=i:o=a=i,!(!pn(o)||!pn(a)))return[t-o,t+a]})):[]}var q9=W([iC,Ic,tn],Jk),lC=(e,t,n)=>{var r={},i=t.reduce((o,a)=>(a.stackId==null||(o[a.stackId]==null&&(o[a.stackId]=[]),o[a.stackId].push(a)),o),r);return Object.fromEntries(Object.entries(i).map(o=>{var[a,s]=o,l=s.map(bp);return[a,{stackedData:e7(e,l,n),graphicalItems:s}]}))},zc=W([q9,iC,Lc],lC),cC=(e,t,n)=>{var{dataStartIndex:r,dataEndIndex:i}=t;if(n!=="zAxis"){var o=i7(e,r,i);if(!(o!=null&&o[0]===0&&o[1]===0))return o}},G9=W([zc,Vo,bt],cC),uC=(e,t,n,r,i)=>n.length>0?e.flatMap(o=>n.flatMap(a=>{var s,l,c=(s=r[a.id])===null||s===void 0?void 0:s.filter(d=>sC(i,d)),u=rt(o,(l=t.dataKey)!==null&&l!==void 0?l:a.dataKey);return{value:u,errorDomain:K9(o,u,c)}})).filter(Boolean):t?.dataKey!=null?e.map(o=>({value:rt(o,t.dataKey),errorDomain:[]})):e.map(o=>({value:o,errorDomain:[]})),Sp=e=>e.errorBars,dC=(e,t,n)=>e.flatMap(r=>t[r.id]).filter(Boolean).filter(r=>sC(n,r));W([aC,Sp,bt],dC);var X9=W([pb,jt,aC,Sp,bt],uC);function Q9(e){var{value:t}=e;if(Pr(t)||t instanceof Date)return t}var fC=e=>{var t=e.flatMap(r=>[r.value,r.errorDomain]).flat(1),n=za(t);if(n.length!==0)return[Math.min(...n),Math.max(...n)]},Z9=(e,t,n)=>{var r=e.map(Q9).filter(i=>i!=null);return n&&(t.dataKey==null||t.allowDuplicatedCategory&&FS(r))?lP(0,e.length):t.allowDuplicatedCategory?r:Array.from(new Set(r))},mb=e=>{var t;if(e==null||!("domain"in e))return sb;if(e.domain!=null)return e.domain;if(e.ticks!=null){if(e.type==="number"){var n=za(e.ticks);return[Math.min(...n),Math.max(...n)]}if(e.type==="category")return e.ticks.map(String)}return(t=e?.domain)!==null&&t!==void 0?t:sb},Op=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n.filter(Boolean);if(i.length!==0){var o=i.flat(),a=Math.min(...o),s=Math.max(...o);return[a,s]}},pC=e=>e.referenceElements.dots,Zs=(e,t,n)=>e.filter(r=>r.ifOverflow==="extendDomain").filter(r=>t==="xAxis"?r.xAxisId===n:r.yAxisId===n),J9=W([pC,bt,Fc],Zs),hC=e=>e.referenceElements.areas,eU=W([hC,bt,Fc],Zs),mC=e=>e.referenceElements.lines,tU=W([mC,bt,Fc],Zs),gC=(e,t)=>{var n=za(e.map(r=>t==="xAxis"?r.x:r.y));if(n.length!==0)return[Math.min(...n),Math.max(...n)]},nU=W(J9,bt,gC),vC=(e,t)=>{var n=za(e.flatMap(r=>[t==="xAxis"?r.x1:r.y1,t==="xAxis"?r.x2:r.y2]));if(n.length!==0)return[Math.min(...n),Math.max(...n)]},rU=W([eU,bt],vC),yC=(e,t)=>{var n=za(e.map(r=>t==="xAxis"?r.x:r.y));if(n.length!==0)return[Math.min(...n),Math.max(...n)]},iU=W(tU,bt,yC),oU=W(nU,iU,rU,(e,t,n)=>Op(e,n,t)),bC=W([jt],mb),gb=(e,t,n,r,i,o,a)=>{var s=x9(t,e.allowDataOverflow);if(s!=null)return s;var l=o==="vertical"&&a==="xAxis"||o==="horizontal"&&a==="yAxis",c=l?Op(n,i,fC(r)):Op(i,fC(r));return w9(t,c,e.allowDataOverflow)},aU=W([jt,bC,G9,X9,oU,Pe,bt],gb),sU=[0,1],vb=(e,t,n,r,i,o,a)=>{if(!((e==null||n==null||n.length===0)&&a===void 0)){var{dataKey:s,type:l}=e,c=gi(t,o);return c&&s==null?lP(0,n.length):l==="category"?Z9(r,e,c):i==="expand"?sU:a}},yb=W([jt,Pe,pb,_p,Lc,bt,aU],vb),xC=(e,t,n,r,i)=>{if(e!=null){var{scale:o,type:a}=e;if(o==="auto")return t==="radial"&&i==="radiusAxis"?"band":t==="radial"&&i==="angleAxis"?"linear":a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?"point":a==="category"?"band":"linear";if(typeof o=="string"){var s="scale".concat(lc(o));return s in jc?s:"point"}}},Js=W([jt,Pe,rC,tb,bt],xC);function lU(e){if(e!=null){if(e in jc)return jc[e]();var t="scale".concat(lc(e));if(t in jc)return jc[t]()}}function bb(e,t,n,r){if(!(n==null||r==null)){if(typeof e.scale=="function")return e.scale.copy().domain(n).range(r);var i=lU(t);if(i!=null){var o=i.domain(n).range(r);return Gz(o),o}}}var xb=(e,t,n)=>{var r=mb(t);if(!(n!=="auto"&&n!=="linear")){if(t!=null&&t.tickCount&&Array.isArray(r)&&(r[0]==="auto"||r[1]==="auto")&&qs(e))return T9(e,t.tickCount,t.allowDecimals);if(t!=null&&t.tickCount&&t.type==="number"&&qs(e))return M9(e,t.tickCount,t.allowDecimals)}},wb=W([yb,$c,Js],xb),_b=(e,t,n,r)=>{if(r!=="angleAxis"&&e?.type==="number"&&qs(t)&&Array.isArray(n)&&n.length>0){var i=t[0],o=n[0],a=t[1],s=n[n.length-1];return[Math.min(i,o),Math.max(a,s)]}return t},cU=W([jt,yb,wb,bt],_b),uU=W(_p,jt,(e,t)=>{if(!(!t||t.type!=="number")){var n=1/0,r=Array.from(za(e.map(s=>s.value))).sort((s,l)=>s-l);if(r.length<2)return 1/0;var i=r[r.length-1]-r[0];if(i===0)return 1/0;for(var o=0;o<r.length-1;o++){var a=r[o+1]-r[o];n=Math.min(n,a)}return n/i}}),wC=W(uU,Pe,Yk,Yt,(e,t,n,r)=>r,(e,t,n,r,i)=>{if(!pn(e))return 0;var o=t==="vertical"?r.height:r.width;if(i==="gap")return e*o/2;if(i==="no-gap"){var a=On(n,e*o),s=e*o/2;return s-a-(s-a)/o*a}return 0}),dU=(e,t)=>{var n=xi(e,t);return n==null||typeof n.padding!="string"?0:wC(e,"xAxis",t,n.padding)},fU=(e,t)=>{var n=wi(e,t);return n==null||typeof n.padding!="string"?0:wC(e,"yAxis",t,n.padding)},pU=W(xi,dU,(e,t)=>{var n,r;if(e==null)return{left:0,right:0};var{padding:i}=e;return typeof i=="string"?{left:t,right:t}:{left:((n=i.left)!==null&&n!==void 0?n:0)+t,right:((r=i.right)!==null&&r!==void 0?r:0)+t}}),hU=W(wi,fU,(e,t)=>{var n,r;if(e==null)return{top:0,bottom:0};var{padding:i}=e;return typeof i=="string"?{top:t,bottom:t}:{top:((n=i.top)!==null&&n!==void 0?n:0)+t,bottom:((r=i.bottom)!==null&&r!==void 0?r:0)+t}}),mU=W([Yt,pU,zf,Wf,(e,t,n)=>n],(e,t,n,r,i)=>{var{padding:o}=r;return i?[o.left,n.width-o.right]:[e.left+t.left,e.left+e.width-t.right]}),gU=W([Yt,Pe,hU,zf,Wf,(e,t,n)=>n],(e,t,n,r,i,o)=>{var{padding:a}=i;return o?[r.height-a.bottom,a.top]:t==="horizontal"?[e.top+e.height-n.bottom,e.top+n.top]:[e.top+n.top,e.top+e.height-n.bottom]}),Vc=(e,t,n,r)=>{var i;switch(t){case"xAxis":return mU(e,n,r);case"yAxis":return gU(e,n,r);case"zAxis":return(i=lb(e,n))===null||i===void 0?void 0:i.range;case"angleAxis":return Gk(e);case"radiusAxis":return Xk(e,n);default:return}},_C=W([jt,Vc],vp),Yo=W([jt,Js,cU,_C],bb);W([Wc,Sp,bt],dC);function SC(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var Ep=(e,t)=>t,Pp=(e,t,n)=>n,vU=W(Ff,Ep,Pp,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(SC)),yU=W($f,Ep,Pp,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(SC)),OC=(e,t)=>({width:e.width,height:t.height}),bU=(e,t)=>{var n=typeof t.width=="number"?t.width:gc;return{width:n,height:e.height}},EC=W(Yt,xi,OC),xU=(e,t,n)=>{switch(t){case"top":return e.top;case"bottom":return n-e.bottom;default:return 0}},wU=(e,t,n)=>{switch(t){case"left":return e.left;case"right":return n-e.right;default:return 0}},_U=W(Ji,Yt,vU,Ep,Pp,(e,t,n,r,i)=>{var o={},a;return n.forEach(s=>{var l=OC(t,s);a==null&&(a=xU(t,r,e));var c=r==="top"&&!i||r==="bottom"&&i;o[s.id]=a-Number(c)*l.height,a+=(c?-1:1)*l.height}),o}),SU=W(Zi,Yt,yU,Ep,Pp,(e,t,n,r,i)=>{var o={},a;return n.forEach(s=>{var l=bU(t,s);a==null&&(a=wU(t,r,e));var c=r==="left"&&!i||r==="right"&&i;o[s.id]=a-Number(c)*l.width,a+=(c?-1:1)*l.width}),o}),OU=(e,t)=>{var n=xi(e,t);if(n!=null)return _U(e,n.orientation,n.mirror)},EU=W([Yt,xi,OU,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var i=n?.[r];return i==null?{x:e.left,y:0}:{x:e.left,y:i}}}),PU=(e,t)=>{var n=wi(e,t);if(n!=null)return SU(e,n.orientation,n.mirror)},kU=W([Yt,wi,PU,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var i=n?.[r];return i==null?{x:0,y:e.top}:{x:i,y:e.top}}}),PC=W(Yt,wi,(e,t)=>{var n=typeof t.width=="number"?t.width:gc;return{width:n,height:e.height}}),kC=(e,t,n)=>{switch(t){case"xAxis":return EC(e,n).width;case"yAxis":return PC(e,n).height;default:return}},CC=(e,t,n,r)=>{if(n!=null){var{allowDuplicatedCategory:i,type:o,dataKey:a}=n,s=gi(e,r),l=t.map(c=>c.value);if(a&&s&&o==="category"&&i&&FS(l))return l}},Sb=W([Pe,_p,jt,bt],CC),DC=(e,t,n,r)=>{if(!(n==null||n.dataKey==null)){var{type:i,scale:o}=n,a=gi(e,r);if(a&&(i==="number"||o!=="auto"))return t.map(s=>s.value)}},Ob=W([Pe,_p,$c,bt],DC),AC=W([Pe,H9,Js,Yo,Sb,Ob,Vc,wb,bt],(e,t,n,r,i,o,a,s,l)=>{if(t==null)return null;var c=gi(e,l);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:l,categoricalDomain:o,duplicateDomain:i,isCategorical:c,niceTicks:s,range:a,realScaleType:n,scale:r}}),CU=(e,t,n,r,i,o,a,s,l)=>{if(!(t==null||r==null)){var c=gi(e,l),{type:u,ticks:d,tickCount:f}=t,p=n==="scaleBand"&&typeof r.bandwidth=="function"?r.bandwidth()/2:2,m=u==="category"&&r.bandwidth?r.bandwidth()/p:0;m=l==="angleAxis"&&o!=null&&o.length>=2?Zt(o[0]-o[1])*2*m:m;var h=d||i;if(h){var g=h.map((b,S)=>{var w=a?a.indexOf(b):b;return{index:S,coordinate:r(w)+m,value:b,offset:m}});return g.filter(b=>!Sn(b.coordinate))}return c&&s?s.map((b,S)=>({coordinate:r(b)+m,value:b,index:S,offset:m})):r.ticks?r.ticks(f).map(b=>({coordinate:r(b)+m,value:b,offset:m})):r.domain().map((b,S)=>({coordinate:r(b)+m,value:a?a[b]:b,index:S,offset:m}))}},TC=W([Pe,$c,Js,Yo,wb,Vc,Sb,Ob,bt],CU),DU=(e,t,n,r,i,o,a)=>{if(!(t==null||n==null||r==null||r[0]===r[1])){var s=gi(e,a),{tickCount:l}=t,c=0;return c=a==="angleAxis"&&r?.length>=2?Zt(r[0]-r[1])*2*c:c,s&&o?o.map((u,d)=>({coordinate:n(u)+c,value:u,index:d,offset:c})):n.ticks?n.ticks(l).map(u=>({coordinate:n(u)+c,value:u,offset:c})):n.domain().map((u,d)=>({coordinate:n(u)+c,value:i?i[u]:u,index:d,offset:c}))}},_i=W([Pe,$c,Yo,Vc,Sb,Ob,bt],DU),Si=W(jt,Yo,(e,t)=>{if(!(e==null||t==null))return wp(wp({},e),{},{scale:t})}),AU=W([jt,Js,yb,_C],bb);W((e,t,n)=>lb(e,n),AU,(e,t)=>{if(!(e==null||t==null))return wp(wp({},e),{},{scale:t})});var TU=W([Pe,Ff,$f],(e,t,n)=>{switch(e){case"horizontal":return t.some(r=>r.reversed)?"right-to-left":"left-to-right";case"vertical":return n.some(r=>r.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),MC=e=>e.options.defaultTooltipEventType,NC=e=>e.options.validateTooltipEventTypes;function jC(e,t,n){if(e==null)return t;var r=e?"axis":"item";return n==null?t:n.includes(r)?r:t}function Eb(e,t){var n=MC(e),r=NC(e);return jC(t,n,r)}function MU(e){return ce(t=>Eb(t,e))}var IC=(e,t)=>{var n,r=Number(t);if(!(Sn(r)||t==null))return r>=0?e==null||(n=e[r])===null||n===void 0?void 0:n.value:void 0},NU=e=>e.tooltip.settings,Uo={active:!1,index:null,dataKey:void 0,coordinate:void 0},jU={itemInteraction:{click:Uo,hover:Uo},axisInteraction:{click:Uo,hover:Uo},keyboardInteraction:Uo,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},RC=dr({name:"tooltip",initialState:jU,reducers:{addTooltipEntrySettings(e,t){e.tooltipItemPayloads.push(t.payload)},removeTooltipEntrySettings(e,t){var n=Qi(e).tooltipItemPayloads.indexOf(t.payload);n>-1&&e.tooltipItemPayloads.splice(n,1)},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate,e.keyboardInteraction.dataKey=t.payload.activeDataKey}}}),{addTooltipEntrySettings:IU,removeTooltipEntrySettings:RU,setTooltipSettingsState:LU,setActiveMouseOverItemIndex:LC,mouseLeaveItem:FU,mouseLeaveChart:FC,setActiveClickItemIndex:$U,setMouseOverAxisIndex:$C,setMouseClickAxisIndex:BU,setSyncInteraction:Pb,setKeyboardInteraction:kb}=RC.actions,WU=RC.reducer;function BC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function kp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?BC(Object(n),!0).forEach(function(r){zU(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zU(e,t,n){return(t=VU(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VU(e){var t=HU(e,"string");return typeof t=="symbol"?t:t+""}function HU(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function YU(e,t,n){return t==="axis"?n==="click"?e.axisInteraction.click:e.axisInteraction.hover:n==="click"?e.itemInteraction.click:e.itemInteraction.hover}function UU(e){return e.index!=null}var WC=(e,t,n,r)=>{if(t==null)return Uo;var i=YU(e,t,n);if(i==null)return Uo;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var o=e.settings.active===!0;if(UU(i)){if(o)return kp(kp({},i),{},{active:!0})}else if(r!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:r};return kp(kp({},Uo),{},{coordinate:i.coordinate})},Cb=(e,t)=>{var n=e?.index;if(n==null)return null;var r=Number(n);if(!pn(r))return n;var i=0,o=1/0;return t.length>0&&(o=t.length-1),String(Math.max(i,Math.min(r,o)))},zC=(e,t,n,r,i,o,a,s)=>{if(!(o==null||s==null)){var l=a[0],c=l==null?void 0:s(l.positions,o);if(c!=null)return c;var u=i?.[Number(o)];if(u)switch(n){case"horizontal":return{x:u.coordinate,y:(r.top+t)/2};default:return{x:(r.left+e)/2,y:u.coordinate}}}},VC=(e,t,n,r)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var i;return n==="hover"?i=e.itemInteraction.hover.dataKey:i=e.itemInteraction.click.dataKey,i==null&&r!=null?[e.tooltipItemPayloads[0]]:e.tooltipItemPayloads.filter(o=>{var a;return((a=o.settings)===null||a===void 0?void 0:a.dataKey)===i})},Hc=e=>e.options.tooltipPayloadSearcher,el=e=>e.tooltip;function HC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function YC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?HC(Object(n),!0).forEach(function(r){KU(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function KU(e,t,n){return(t=qU(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qU(e){var t=GU(e,"string");return typeof t=="symbol"?t:t+""}function GU(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function XU(e,t){return e??t}var UC=(e,t,n,r,i,o,a)=>{if(!(t==null||o==null)){var{chartData:s,computedData:l,dataStartIndex:c,dataEndIndex:u}=n,d=[];return e.reduce((f,p)=>{var m,{dataDefinedOnItem:h,settings:g}=p,b=XU(h,s),S=Array.isArray(b)?f2(b,c,u):b,w=(m=g?.dataKey)!==null&&m!==void 0?m:r,x=g?.nameKey,_;if(r&&Array.isArray(S)&&!Array.isArray(S[0])&&a==="axis"?_=$S(S,r,i):_=o(S,t,l,x),Array.isArray(_))_.forEach(C=>{var D=YC(YC({},g),{},{name:C.name,unit:C.unit,color:void 0,fill:void 0});f.push(w2({tooltipEntrySettings:D,dataKey:C.dataKey,payload:C.payload,value:rt(C.payload,C.dataKey),name:C.name}))});else{var E;f.push(w2({tooltipEntrySettings:g,dataKey:w,payload:_,value:rt(_,w),name:(E=rt(_,x))!==null&&E!==void 0?E:g?.name}))}return f},d)}},Db=W([tn,Pe,rC,tb,qt],xC),QU=W([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),ZU=W([qt,Qs],cb),Yc=W([QU,tn,ZU],ub),JU=W([Yc],e=>e.filter(xp)),eK=W([Yc],db),tl=W([eK,Vo],fb),tK=W([JU,Vo,tn],Jk),Ab=W([tl,tn,Yc],hb),nK=W([tn],mb),rK=W([Yc],e=>e.filter(xp)),iK=W([tK,rK,Lc],lC),oK=W([iK,Vo,qt],cC),aK=W([Yc],oC),sK=W([tl,tn,aK,Sp,qt],uC),lK=W([pC,qt,Qs],Zs),cK=W([lK,qt],gC),uK=W([hC,qt,Qs],Zs),dK=W([uK,qt],vC),fK=W([mC,qt,Qs],Zs),pK=W([fK,qt],yC),hK=W([cK,pK,dK],Op),mK=W([tn,nK,oK,sK,hK,Pe,qt],gb),KC=W([tn,Pe,tl,Ab,Lc,qt,mK],vb),gK=W([KC,tn,Db],xb),vK=W([tn,KC,gK,qt],_b),qC=e=>{var t=qt(e),n=Qs(e),r=!1;return Vc(e,t,n,r)},GC=W([tn,qC],vp),XC=W([tn,Db,vK,GC],bb),yK=W([Pe,Ab,tn,qt],CC),bK=W([Pe,Ab,tn,qt],DC),xK=(e,t,n,r,i,o,a,s)=>{if(t){var{type:l}=t,c=gi(e,s);if(r){var u=n==="scaleBand"&&r.bandwidth?r.bandwidth()/2:2,d=l==="category"&&r.bandwidth?r.bandwidth()/u:0;return d=s==="angleAxis"&&i!=null&&i?.length>=2?Zt(i[0]-i[1])*2*d:d,c&&a?a.map((f,p)=>({coordinate:r(f)+d,value:f,index:p,offset:d})):r.domain().map((f,p)=>({coordinate:r(f)+d,value:o?o[f]:f,index:p,offset:d}))}}},co=W([Pe,tn,Db,XC,qC,yK,bK,qt],xK),Tb=W([MC,NC,NU],(e,t,n)=>jC(n.shared,e,t)),QC=e=>e.tooltip.settings.trigger,Mb=e=>e.tooltip.settings.defaultIndex,Cp=W([el,Tb,QC,Mb],WC),Ko=W([Cp,tl],Cb),ZC=W([co,Ko],IC),JC=W([Cp],e=>{if(e)return e.dataKey}),eD=W([el,Tb,QC,Mb],VC),wK=W([Zi,Ji,Pe,Yt,co,Mb,eD,Hc],zC),_K=W([Cp,wK],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),SK=W([Cp],e=>e.active),OK=W([eD,Ko,Vo,Zk,ZC,Hc,Tb],UC),EK=W([OK],e=>{if(e!=null){var t=e.map(n=>n.payload).filter(n=>n!=null);return Array.from(new Set(t))}});function tD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function nD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tD(Object(n),!0).forEach(function(r){PK(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function PK(e,t,n){return(t=kK(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kK(e){var t=CK(e,"string");return typeof t=="symbol"?t:t+""}function CK(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var DK=()=>ce(tn),AK=()=>{var e=DK(),t=ce(co),n=ce(XC);return Na(nD(nD({},e),{},{scale:n}),t)},rD=()=>ce(tb),Nb=(e,t)=>t,iD=(e,t,n)=>n,jb=(e,t,n,r)=>r,TK=W(co,e=>xf(e,t=>t.coordinate)),Ib=W([el,Nb,iD,jb],WC),oD=W([Ib,tl],Cb),MK=(e,t,n)=>{if(t!=null){var r=el(e);return t==="axis"?n==="hover"?r.axisInteraction.hover.dataKey:r.axisInteraction.click.dataKey:n==="hover"?r.itemInteraction.hover.dataKey:r.itemInteraction.click.dataKey}},aD=W([el,Nb,iD,jb],VC),Dp=W([Zi,Ji,Pe,Yt,co,jb,aD,Hc],zC),NK=W([Ib,Dp],(e,t)=>{var n;return(n=e.coordinate)!==null&&n!==void 0?n:t}),sD=W(co,oD,IC),jK=W([aD,oD,Vo,Zk,sD,Hc,Nb],UC),IK=W([Ib],e=>({isActive:e.active,activeIndex:e.index})),RK=(e,t,n,r,i,o,a,s)=>{if(!(!e||!t||!r||!i||!o)){var l=o7(e.chartX,e.chartY,t,n,s);if(l){var c=s7(l,t),u=Kz(c,a,o,r,i),d=a7(t,o,u,l);return{activeIndex:String(u),activeCoordinate:d}}}};function Rb(){return Rb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rb.apply(null,arguments)}function lD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ap(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lD(Object(n),!0).forEach(function(r){LK(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function LK(e,t,n){return(t=FK(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function FK(e){var t=$K(e,"string");return typeof t=="symbol"?t:t+""}function $K(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function BK(e){var{coordinate:t,payload:n,index:r,offset:i,tooltipAxisBandSize:o,layout:a,cursor:s,tooltipEventType:l,chartName:c}=e,u=t,d=n,f=r;if(!s||!u||c!=="ScatterChart"&&l!=="axis")return null;var p,m;if(c==="ScatterChart")p=u,m=sV;else if(c==="BarChart")p=lV(a,u,i,o),m=eP;else if(a==="radial"){var{cx:h,cy:g,radius:b,startAngle:S,endAngle:w}=tP(u);p={cx:h,cy:g,startAngle:S,endAngle:w,innerRadius:b,outerRadius:b},m=rP}else p={points:WV(a,u,i)},m=$s;var x=typeof s=="object"&&"className"in s?s.className:void 0,_=Ap(Ap(Ap(Ap({stroke:"#ccc",pointerEvents:"none"},i),p),lt(s,!1)),{},{payload:d,payloadIndex:f,className:ie("recharts-tooltip-cursor",x)});return k.isValidElement(s)?k.cloneElement(s,_):k.createElement(m,_)}function WK(e){var t=AK(),n=P2(),r=vc(),i=rD();return O.createElement(BK,Rb({},e,{coordinate:e.coordinate,index:e.index,payload:e.payload,offset:n,layout:r,tooltipAxisBandSize:t,chartName:i}))}var cD=k.createContext(null),zK=()=>k.useContext(cD),Lb={exports:{}},uD;function VK(){return uD||(uD=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(l,c,u){this.fn=l,this.context=c,this.once=u||!1}function o(l,c,u,d,f){if(typeof u!="function")throw new TypeError("The listener must be a function");var p=new i(u,d||l,f),m=n?n+c:c;return l._events[m]?l._events[m].fn?l._events[m]=[l._events[m],p]:l._events[m].push(p):(l._events[m]=p,l._eventsCount++),l}function a(l,c){--l._eventsCount===0?l._events=new r:delete l._events[c]}function s(){this._events=new r,this._eventsCount=0}s.prototype.eventNames=function(){var c=[],u,d;if(this._eventsCount===0)return c;for(d in u=this._events)t.call(u,d)&&c.push(n?d.slice(1):d);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(u)):c},s.prototype.listeners=function(c){var u=n?n+c:c,d=this._events[u];if(!d)return[];if(d.fn)return[d.fn];for(var f=0,p=d.length,m=new Array(p);f<p;f++)m[f]=d[f].fn;return m},s.prototype.listenerCount=function(c){var u=n?n+c:c,d=this._events[u];return d?d.fn?1:d.length:0},s.prototype.emit=function(c,u,d,f,p,m){var h=n?n+c:c;if(!this._events[h])return!1;var g=this._events[h],b=arguments.length,S,w;if(g.fn){switch(g.once&&this.removeListener(c,g.fn,void 0,!0),b){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,u),!0;case 3:return g.fn.call(g.context,u,d),!0;case 4:return g.fn.call(g.context,u,d,f),!0;case 5:return g.fn.call(g.context,u,d,f,p),!0;case 6:return g.fn.call(g.context,u,d,f,p,m),!0}for(w=1,S=new Array(b-1);w<b;w++)S[w-1]=arguments[w];g.fn.apply(g.context,S)}else{var x=g.length,_;for(w=0;w<x;w++)switch(g[w].once&&this.removeListener(c,g[w].fn,void 0,!0),b){case 1:g[w].fn.call(g[w].context);break;case 2:g[w].fn.call(g[w].context,u);break;case 3:g[w].fn.call(g[w].context,u,d);break;case 4:g[w].fn.call(g[w].context,u,d,f);break;default:if(!S)for(_=1,S=new Array(b-1);_<b;_++)S[_-1]=arguments[_];g[w].fn.apply(g[w].context,S)}}return!0},s.prototype.on=function(c,u,d){return o(this,c,u,d,!1)},s.prototype.once=function(c,u,d){return o(this,c,u,d,!0)},s.prototype.removeListener=function(c,u,d,f){var p=n?n+c:c;if(!this._events[p])return this;if(!u)return a(this,p),this;var m=this._events[p];if(m.fn)m.fn===u&&(!f||m.once)&&(!d||m.context===d)&&a(this,p);else{for(var h=0,g=[],b=m.length;h<b;h++)(m[h].fn!==u||f&&!m[h].once||d&&m[h].context!==d)&&g.push(m[h]);g.length?this._events[p]=g.length===1?g[0]:g:a(this,p)}return this},s.prototype.removeAllListeners=function(c){var u;return c?(u=n?n+c:c,this._events[u]&&a(this,u)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s})(Lb)),Lb.exports}var HK=VK();const YK=Ri(HK);var Uc=new YK,Fb="recharts.syncEvent.tooltip",dD="recharts.syncEvent.brush";function Tp(e,t){if(t){var n=Number.parseInt(t,10);if(!Sn(n))return e?.[n]}}var UK={chartName:"",tooltipPayloadSearcher:void 0,eventEmitter:void 0,defaultTooltipEventType:"axis"},fD=dr({name:"options",initialState:UK,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),KK=fD.reducer,{createEventEmitter:qK}=fD.actions;function GK(e){return e.tooltip.syncInteraction}var XK={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},pD=dr({name:"chartData",initialState:XK,reducers:{setChartData(e,t){if(e.chartData=t.payload,t.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var{startIndex:n,endIndex:r}=t.payload;n!=null&&(e.dataStartIndex=n),r!=null&&(e.dataEndIndex=r)}}}),{setChartData:hD,setDataStartEndIndexes:QK,setComputedData:rfe}=pD.actions,ZK=pD.reducer,JK=["x","y"];function mD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Va(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?mD(Object(n),!0).forEach(function(r){eq(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function eq(e,t,n){return(t=tq(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tq(e){var t=nq(e,"string");return typeof t=="symbol"?t:t+""}function nq(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function rq(e,t){if(e==null)return{};var n,r,i=iq(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function iq(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var gD=()=>{};function oq(){var e=ce(nb),t=ce(rb),n=vt(),r=ce(Uk),i=ce(co),o=vc(),a=Vf(),s=ce(l=>l.rootProps.className);k.useEffect(()=>{if(e==null)return gD;var l=(c,u,d)=>{if(t!==d&&e===c){if(r==="index"){var f;if(a&&u!==null&&u!==void 0&&(f=u.payload)!==null&&f!==void 0&&f.coordinate){var p=u.payload.coordinate,{x:m,y:h}=p,g=rq(p,JK),b=Va(Va(Va({},g),typeof m=="number"&&{x:Math.max(a.x,Math.min(m,a.x+a.width))}),typeof h=="number"&&{y:Math.max(a.y,Math.min(h,a.y+a.height))}),S=Va(Va({},u),{},{payload:Va(Va({},u.payload),{},{coordinate:b})});n(S)}else n(u);return}if(i!=null){var w;if(typeof r=="function"){var x={activeTooltipIndex:u.payload.index==null?void 0:Number(u.payload.index),isTooltipActive:u.payload.active,activeIndex:u.payload.index==null?void 0:Number(u.payload.index),activeLabel:u.payload.label,activeDataKey:u.payload.dataKey,activeCoordinate:u.payload.coordinate},_=r(i,x);w=i[_]}else r==="value"&&(w=i.find(N=>String(N.value)===u.payload.label));var{coordinate:E}=u.payload;if(w==null||u.payload.active===!1||E==null||a==null){n(Pb({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0}));return}var{x:C,y:D}=E,T=Math.min(C,a.x+a.width),j=Math.min(D,a.y+a.height),A={x:o==="horizontal"?w.coordinate:T,y:o==="horizontal"?j:w.coordinate},P=Pb({active:u.payload.active,coordinate:A,dataKey:u.payload.dataKey,index:String(w.index),label:u.payload.label});n(P)}}};return Uc.on(Fb,l),()=>{Uc.off(Fb,l)}},[s,n,t,e,r,i,o,a])}function aq(){var e=ce(nb),t=ce(rb),n=vt();k.useEffect(()=>{if(e==null)return gD;var r=(i,o,a)=>{t!==a&&e===i&&n(QK(o))};return Uc.on(dD,r),()=>{Uc.off(dD,r)}},[n,t,e])}function sq(){var e=vt();k.useEffect(()=>{e(qK())},[e]),oq(),aq()}function lq(e,t,n,r,i,o){var a=ce(f=>MK(f,e,t)),s=ce(rb),l=ce(nb),c=ce(Uk),u=ce(GK),d=u?.active;k.useEffect(()=>{if(!d&&l!=null&&s!=null){var f=Pb({active:o,coordinate:n,dataKey:a,index:i,label:typeof r=="number"?String(r):r});Uc.emit(Fb,l,f,s)}},[d,n,a,i,r,s,l,c,o])}function vD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function yD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?vD(Object(n),!0).forEach(function(r){cq(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cq(e,t,n){return(t=uq(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uq(e){var t=dq(e,"string");return typeof t=="symbol"?t:t+""}function dq(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function fq(e){return e.dataKey}function pq(e,t){return O.isValidElement(e)?O.cloneElement(e,t):typeof e=="function"?O.createElement(e,t):O.createElement($7,t)}var bD=[],hq={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,isAnimationActive:!eo.isSsr,itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function nn(e){var t=Ut(e,hq),{active:n,allowEscapeViewBox:r,animationDuration:i,animationEasing:o,content:a,filterNull:s,isAnimationActive:l,offset:c,payloadUniqBy:u,position:d,reverseDirection:f,useTranslate3d:p,wrapperStyle:m,cursor:h,shared:g,trigger:b,defaultIndex:S,portal:w,axisId:x}=t,_=vt(),E=typeof S=="number"?String(S):S;k.useEffect(()=>{_(LU({shared:g,trigger:b,axisId:x,active:n,defaultIndex:E}))},[_,g,b,x,n,E]);var C=Vf(),D=I2(),T=MU(g),{activeIndex:j,isActive:A}=ce(ee=>IK(ee,T,b,E)),P=ce(ee=>jK(ee,T,b,E)),N=ce(ee=>sD(ee,T,b,E)),M=ce(ee=>NK(ee,T,b,E)),R=P,L=zK(),$=n??A,[V,z]=_E([R,$]),B=T==="axis"?N:void 0;lq(T,b,M,B,j,$);var X=w??L;if(X==null)return null;var q=R??bD;$||(q=bD),s&&q.length&&(q=JO(R.filter(ee=>ee.value!=null&&(ee.hide!==!0||t.includeHidden)),u,fq));var re=q.length>0,J=O.createElement(U7,{allowEscapeViewBox:r,animationDuration:i,animationEasing:o,isAnimationActive:l,active:$,coordinate:M,hasPayload:re,offset:c,position:d,reverseDirection:f,useTranslate3d:p,viewBox:C,wrapperStyle:m,lastBoundingBox:V,innerRef:z,hasPortalFromProps:!!w},pq(a,yD(yD({},t),{},{payload:q,label:B,active:$,coordinate:M,accessibilityLayer:D})));return O.createElement(O.Fragment,null,Ii.createPortal(J,X),$&&O.createElement(WK,{cursor:h,tooltipEventType:T,coordinate:M,payload:R,index:j}))}var $b={},Bb={},Wb={},xD;function mq(){return xD||(xD=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r,{signal:i,edges:o}={}){let a,s=null;const l=o!=null&&o.includes("leading"),c=o==null||o.includes("trailing"),u=()=>{s!==null&&(n.apply(a,s),a=void 0,s=null)},d=()=>{c&&u(),h()};let f=null;const p=()=>{f!=null&&clearTimeout(f),f=setTimeout(()=>{f=null,d()},r)},m=()=>{f!==null&&(clearTimeout(f),f=null)},h=()=>{m(),a=void 0,s=null},g=()=>{u()},b=function(...S){if(i?.aborted)return;a=this,s=S;const w=f==null;p(),l&&w&&u()};return b.schedule=p,b.cancel=h,b.flush=g,i?.addEventListener("abort",h,{once:!0}),b}e.debounce=t})(Wb)),Wb}var wD;function gq(){return wD||(wD=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=mq();function n(r,i=0,o={}){typeof o!="object"&&(o={});const{leading:a=!1,trailing:s=!0,maxWait:l}=o,c=Array(2);a&&(c[0]="leading"),s&&(c[1]="trailing");let u,d=null;const f=t.debounce(function(...h){u=r.apply(this,h),d=null},i,{edges:c}),p=function(...h){return l!=null&&(d===null&&(d=Date.now()),Date.now()-d>=l)?(u=r.apply(this,h),d=Date.now(),f.cancel(),f.schedule(),u):(f.apply(this,h),u)},m=()=>(f.flush(),u);return p.cancel=f.cancel,p.flush=m,p}e.debounce=n})(Bb)),Bb}var _D;function vq(){return _D||(_D=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=gq();function n(r,i=0,o={}){const{leading:a=!0,trailing:s=!0}=o;return t.debounce(r,i,{leading:a,maxWait:i,trailing:s})}e.throttle=n})($b)),$b}var zb,SD;function yq(){return SD||(SD=1,zb=vq().throttle),zb}var bq=yq();const xq=Ri(bq);var wq=process.env.NODE_ENV!=="production",Kc=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];if(wq&&typeof console<"u"&&console.warn&&(n===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(n===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var a=0;console.warn(n.replace(/%s/g,()=>i[a++]))}};function OD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Vb(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?OD(Object(n),!0).forEach(function(r){_q(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _q(e,t,n){return(t=Sq(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sq(e){var t=Oq(e,"string");return typeof t=="symbol"?t:t+""}function Oq(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var It=k.forwardRef((e,t)=>{var{aspect:n,initialDimension:r={width:-1,height:-1},width:i="100%",height:o="100%",minWidth:a=0,minHeight:s,maxHeight:l,children:c,debounce:u=0,id:d,className:f,onResize:p,style:m={}}=e,h=k.useRef(null),g=k.useRef();g.current=p,k.useImperativeHandle(t,()=>h.current);var[b,S]=k.useState({containerWidth:r.width,containerHeight:r.height}),w=k.useCallback((_,E)=>{S(C=>{var D=Math.round(_),T=Math.round(E);return C.containerWidth===D&&C.containerHeight===T?C:{containerWidth:D,containerHeight:T}})},[]);k.useEffect(()=>{var _=T=>{var j,{width:A,height:P}=T[0].contentRect;w(A,P),(j=g.current)===null||j===void 0||j.call(g,A,P)};u>0&&(_=xq(_,u,{trailing:!0,leading:!1}));var E=new ResizeObserver(_),{width:C,height:D}=h.current.getBoundingClientRect();return w(C,D),E.observe(h.current),()=>{E.disconnect()}},[w,u]);var x=k.useMemo(()=>{var{containerWidth:_,containerHeight:E}=b;if(_<0||E<0)return null;Kc(Ea(i)||Ea(o),`The width(%s) and height(%s) are both fixed numbers,
|
|
203
|
+
A`).concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(x.x,",").concat(x.y,"Z")}else S+="L".concat(t,",").concat(n,"Z");return S},BV={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},rP=e=>{var t=Kt(e,BV),{cx:n,cy:r,innerRadius:i,outerRadius:o,cornerRadius:a,forceCornerRadius:s,cornerIsExternal:l,startAngle:c,endAngle:u,className:d}=t;if(o<i||c===u)return null;var f=ie("recharts-sector",d),p=o-i,m=On(a,p,0,!0),h;return m>0&&Math.abs(c-u)<360?h=$V({cx:n,cy:r,innerRadius:i,outerRadius:o,cornerRadius:Math.min(m,p/2),forceCornerRadius:s,cornerIsExternal:l,startAngle:c,endAngle:u}):h=nP({cx:n,cy:r,innerRadius:i,outerRadius:o,startAngle:c,endAngle:u}),O.createElement("path",sy({},lt(t,!0),{className:f,d:h}))};function WV(e,t,n){var r,i,o,a;if(e==="horizontal")r=t.x,o=r,i=n.top,a=n.top+n.height;else if(e==="vertical")i=t.y,a=i,r=n.left,o=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var{cx:s,cy:l,innerRadius:c,outerRadius:u,angle:d}=t,f=Wt(s,l,c,d),p=Wt(s,l,u,d);r=f.x,i=f.y,o=p.x,a=p.y}else return tP(t);return[{x:r,y:i},{x:o,y:a}]}var ly={},cy={},uy={},iP;function zV(){return iP||(iP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=pE();function n(r){return t.isSymbol(r)?NaN:Number(r)}e.toNumber=n})(uy)),uy}var oP;function VV(){return oP||(oP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=zV();function n(r){return r?(r=t.toNumber(r),r===1/0||r===-1/0?(r<0?-1:1)*Number.MAX_VALUE:r===r?r:0):r===0?r:0}e.toFinite=n})(cy)),cy}var aP;function HV(){return aP||(aP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=yE(),n=VV();function r(i,o,a){a&&typeof a!="number"&&t.isIterateeCall(i,o,a)&&(o=a=void 0),i=n.toFinite(i),o===void 0?(o=i,i=0):o=n.toFinite(o),a=a===void 0?i<o?1:-1:n.toFinite(a);const s=Math.max(Math.ceil((o-i)/(a||1)),0),l=new Array(s);for(let c=0;c<s;c++)l[c]=i,i+=a;return l}e.range=r})(ly)),ly}var dy,sP;function YV(){return sP||(sP=1,dy=HV().range),dy}var UV=YV();const lP=Ri(UV);function Bo(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function KV(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function fy(e){let t,n,r;e.length!==2?(t=Bo,n=(s,l)=>Bo(e(s),l),r=(s,l)=>e(s)-l):(t=e===Bo||e===KV?e:qV,n=e,r=e);function i(s,l,c=0,u=s.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;n(s[d],l)<0?c=d+1:u=d}while(c<u)}return c}function o(s,l,c=0,u=s.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;n(s[d],l)<=0?c=d+1:u=d}while(c<u)}return c}function a(s,l,c=0,u=s.length){const d=i(s,l,c,u-1);return d>c&&r(s[d-1],l)>-r(s[d],l)?d-1:d}return{left:i,center:a,right:o}}function qV(){return 0}function cP(e){return e===null?NaN:+e}function*GV(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const _c=fy(Bo).right;fy(cP).center;class uP extends Map{constructor(t,n=ZV){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(dP(this,t))}has(t){return super.has(dP(this,t))}set(t,n){return super.set(XV(this,t),n)}delete(t){return super.delete(QV(this,t))}}function dP({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function XV({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function QV({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function ZV(e){return e!==null&&typeof e=="object"?e.valueOf():e}function JV(e=Bo){if(e===Bo)return fP;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function fP(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const eH=Math.sqrt(50),tH=Math.sqrt(10),nH=Math.sqrt(2);function Qf(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=eH?10:o>=tH?5:o>=nH?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,i)*a,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=n&&n<2?Qf(e,t,n*2):[s,l,c]}function py(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,o,a]=r?Qf(t,e,n):Qf(e,t,n);if(!(o>=i))return[];const s=o-i+1,l=new Array(s);if(r)if(a<0)for(let c=0;c<s;++c)l[c]=(o-c)/-a;else for(let c=0;c<s;++c)l[c]=(o-c)*a;else if(a<0)for(let c=0;c<s;++c)l[c]=(i+c)/-a;else for(let c=0;c<s;++c)l[c]=(i+c)*a;return l}function hy(e,t,n){return t=+t,e=+e,n=+n,Qf(e,t,n)[2]}function my(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?hy(t,e,n):hy(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function pP(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function hP(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function mP(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?fP:JV(i);r>n;){if(r-n>600){const l=r-n+1,c=t-n+1,u=Math.log(l),d=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*d*(l-d)/l)*(c-l/2<0?-1:1),p=Math.max(n,Math.floor(t-c*d/l+f)),m=Math.min(r,Math.floor(t+(l-c)*d/l+f));mP(e,t,p,m,i)}const o=e[t];let a=n,s=r;for(Sc(e,n,t),i(e[r],o)>0&&Sc(e,n,r);a<s;){for(Sc(e,a,s),++a,--s;i(e[a],o)<0;)++a;for(;i(e[s],o)>0;)--s}i(e[n],o)===0?Sc(e,n,s):(++s,Sc(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function Sc(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function rH(e,t,n){if(e=Float64Array.from(GV(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return hP(e);if(t>=1)return pP(e);var r,i=(r-1)*t,o=Math.floor(i),a=pP(mP(e,o).subarray(0,o+1)),s=hP(e.subarray(o+1));return a+(s-a)*(i-o)}}function iH(e,t,n=cP){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),a=+n(e[o],o,e),s=+n(e[o+1],o+1,e);return a+(s-a)*(i-o)}}function oH(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(i);++r<i;)o[r]=e+r*n;return o}function Nr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function to(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const gy=Symbol("implicit");function vy(){var e=new uP,t=[],n=[],r=gy;function i(o){let a=e.get(o);if(a===void 0){if(r!==gy)return r;e.set(o,a=t.push(o)-1)}return n[a%n.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new uP;for(const a of o)e.has(a)||e.set(a,t.push(a)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return vy(t,n).unknown(r)},Nr.apply(i,arguments),i}function yy(){var e=vy().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,o,a,s=!1,l=0,c=0,u=.5;delete e.unknown;function d(){var f=t().length,p=i<r,m=p?i:r,h=p?r:i;o=(h-m)/Math.max(1,f-l+c*2),s&&(o=Math.floor(o)),m+=(h-m-o*(f-l))*u,a=o*(1-l),s&&(m=Math.round(m),a=Math.round(a));var g=oH(f).map(function(b){return m+o*b});return n(p?g.reverse():g)}return e.domain=function(f){return arguments.length?(t(f),d()):t()},e.range=function(f){return arguments.length?([r,i]=f,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(f){return[r,i]=f,r=+r,i=+i,s=!0,d()},e.bandwidth=function(){return a},e.step=function(){return o},e.round=function(f){return arguments.length?(s=!!f,d()):s},e.padding=function(f){return arguments.length?(l=Math.min(1,c=+f),d()):l},e.paddingInner=function(f){return arguments.length?(l=Math.min(1,f),d()):l},e.paddingOuter=function(f){return arguments.length?(c=+f,d()):c},e.align=function(f){return arguments.length?(u=Math.max(0,Math.min(1,f)),d()):u},e.copy=function(){return yy(t(),[r,i]).round(s).paddingInner(l).paddingOuter(c).align(u)},Nr.apply(d(),arguments)}function gP(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return gP(t())},e}function aH(){return gP(yy.apply(null,arguments).paddingInner(1))}function by(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function vP(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Oc(){}var Ec=.7,Zf=1/Ec,zs="\\s*([+-]?\\d+)\\s*",Pc="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",vi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",sH=/^#([0-9a-f]{3,8})$/,lH=new RegExp(`^rgb\\(${zs},${zs},${zs}\\)$`),cH=new RegExp(`^rgb\\(${vi},${vi},${vi}\\)$`),uH=new RegExp(`^rgba\\(${zs},${zs},${zs},${Pc}\\)$`),dH=new RegExp(`^rgba\\(${vi},${vi},${vi},${Pc}\\)$`),fH=new RegExp(`^hsl\\(${Pc},${vi},${vi}\\)$`),pH=new RegExp(`^hsla\\(${Pc},${vi},${vi},${Pc}\\)$`),yP={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};by(Oc,kc,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:bP,formatHex:bP,formatHex8:hH,formatHsl:mH,formatRgb:xP,toString:xP});function bP(){return this.rgb().formatHex()}function hH(){return this.rgb().formatHex8()}function mH(){return EP(this).formatHsl()}function xP(){return this.rgb().formatRgb()}function kc(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=sH.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?wP(t):n===3?new Kn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Jf(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Jf(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=lH.exec(e))?new Kn(t[1],t[2],t[3],1):(t=cH.exec(e))?new Kn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=uH.exec(e))?Jf(t[1],t[2],t[3],t[4]):(t=dH.exec(e))?Jf(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=fH.exec(e))?OP(t[1],t[2]/100,t[3]/100,1):(t=pH.exec(e))?OP(t[1],t[2]/100,t[3]/100,t[4]):yP.hasOwnProperty(e)?wP(yP[e]):e==="transparent"?new Kn(NaN,NaN,NaN,0):null}function wP(e){return new Kn(e>>16&255,e>>8&255,e&255,1)}function Jf(e,t,n,r){return r<=0&&(e=t=n=NaN),new Kn(e,t,n,r)}function gH(e){return e instanceof Oc||(e=kc(e)),e?(e=e.rgb(),new Kn(e.r,e.g,e.b,e.opacity)):new Kn}function xy(e,t,n,r){return arguments.length===1?gH(e):new Kn(e,t,n,r??1)}function Kn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}by(Kn,xy,vP(Oc,{brighter(e){return e=e==null?Zf:Math.pow(Zf,e),new Kn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ec:Math.pow(Ec,e),new Kn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Kn(ja(this.r),ja(this.g),ja(this.b),ep(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:_P,formatHex:_P,formatHex8:vH,formatRgb:SP,toString:SP}));function _P(){return`#${Ia(this.r)}${Ia(this.g)}${Ia(this.b)}`}function vH(){return`#${Ia(this.r)}${Ia(this.g)}${Ia(this.b)}${Ia((isNaN(this.opacity)?1:this.opacity)*255)}`}function SP(){const e=ep(this.opacity);return`${e===1?"rgb(":"rgba("}${ja(this.r)}, ${ja(this.g)}, ${ja(this.b)}${e===1?")":`, ${e})`}`}function ep(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ja(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ia(e){return e=ja(e),(e<16?"0":"")+e.toString(16)}function OP(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Qr(e,t,n,r)}function EP(e){if(e instanceof Qr)return new Qr(e.h,e.s,e.l,e.opacity);if(e instanceof Oc||(e=kc(e)),!e)return new Qr;if(e instanceof Qr)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(t===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-t)/s+2:a=(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Qr(a,s,l,e.opacity)}function yH(e,t,n,r){return arguments.length===1?EP(e):new Qr(e,t,n,r??1)}function Qr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}by(Qr,yH,vP(Oc,{brighter(e){return e=e==null?Zf:Math.pow(Zf,e),new Qr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ec:Math.pow(Ec,e),new Qr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Kn(wy(e>=240?e-240:e+120,i,r),wy(e,i,r),wy(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Qr(PP(this.h),tp(this.s),tp(this.l),ep(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=ep(this.opacity);return`${e===1?"hsl(":"hsla("}${PP(this.h)}, ${tp(this.s)*100}%, ${tp(this.l)*100}%${e===1?")":`, ${e})`}`}}));function PP(e){return e=(e||0)%360,e<0?e+360:e}function tp(e){return Math.max(0,Math.min(1,e||0))}function wy(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const _y=e=>()=>e;function bH(e,t){return function(n){return e+n*t}}function xH(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function wH(e){return(e=+e)==1?kP:function(t,n){return n-t?xH(t,n,e):_y(isNaN(t)?n:t)}}function kP(e,t){var n=t-e;return n?bH(e,n):_y(isNaN(e)?t:e)}const CP=(function e(t){var n=wH(t);function r(i,o){var a=n((i=xy(i)).r,(o=xy(o)).r),s=n(i.g,o.g),l=n(i.b,o.b),c=kP(i.opacity,o.opacity);return function(u){return i.r=a(u),i.g=s(u),i.b=l(u),i.opacity=c(u),i+""}}return r.gamma=e,r})(1);function _H(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=e[i]*(1-o)+t[i]*o;return r}}function SH(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function OH(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=Vs(e[a],t[a]);for(;a<n;++a)o[a]=t[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function EH(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function np(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function PH(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=Vs(e[i],t[i]):r[i]=t[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var Sy=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Oy=new RegExp(Sy.source,"g");function kH(e){return function(){return e}}function CH(e){return function(t){return e(t)+""}}function DH(e,t){var n=Sy.lastIndex=Oy.lastIndex=0,r,i,o,a=-1,s=[],l=[];for(e=e+"",t=t+"";(r=Sy.exec(e))&&(i=Oy.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:np(r,i)})),n=Oy.lastIndex;return n<t.length&&(o=t.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?CH(l[0].x):kH(t):(t=l.length,function(c){for(var u=0,d;u<t;++u)s[(d=l[u]).i]=d.x(c);return s.join("")})}function Vs(e,t){var n=typeof t,r;return t==null||n==="boolean"?_y(t):(n==="number"?np:n==="string"?(r=kc(t))?(t=r,CP):DH:t instanceof kc?CP:t instanceof Date?EH:SH(t)?_H:Array.isArray(t)?OH:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?PH:np)(e,t)}function Ey(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function AH(e,t){t===void 0&&(t=e,e=Vs);for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(i,i=t[++n]);return function(a){var s=Math.max(0,Math.min(r-1,Math.floor(a*=r)));return o[s](a-s)}}function TH(e){return function(){return e}}function rp(e){return+e}var DP=[0,1];function In(e){return e}function Py(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:TH(isNaN(t)?NaN:.5)}function MH(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function NH(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=Py(i,r),o=n(a,o)):(r=Py(r,i),o=n(o,a)),function(s){return o(r(s))}}function jH(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=Py(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(s){var l=_c(e,s,1,r)-1;return o[l](i[l](s))}}function Cc(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function ip(){var e=DP,t=DP,n=Vs,r,i,o,a=In,s,l,c;function u(){var f=Math.min(e.length,t.length);return a!==In&&(a=MH(e[0],e[f-1])),s=f>2?jH:NH,l=c=null,d}function d(f){return f==null||isNaN(f=+f)?o:(l||(l=s(e.map(r),t,n)))(r(a(f)))}return d.invert=function(f){return a(i((c||(c=s(t,e.map(r),np)))(f)))},d.domain=function(f){return arguments.length?(e=Array.from(f,rp),u()):e.slice()},d.range=function(f){return arguments.length?(t=Array.from(f),u()):t.slice()},d.rangeRound=function(f){return t=Array.from(f),n=Ey,u()},d.clamp=function(f){return arguments.length?(a=f?!0:In,u()):a!==In},d.interpolate=function(f){return arguments.length?(n=f,u()):n},d.unknown=function(f){return arguments.length?(o=f,d):o},function(f,p){return r=f,i=p,u()}}function ky(){return ip()(In,In)}function IH(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function op(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Hs(e){return e=op(Math.abs(e)),e?e[1]:NaN}function RH(e,t){return function(n,r){for(var i=n.length,o=[],a=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}function LH(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var FH=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Dc(e){if(!(t=FH.exec(e)))throw new Error("invalid format: "+e);var t;return new Cy({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Dc.prototype=Cy.prototype;function Cy(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Cy.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function $H(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var AP;function BH(e,t){var n=op(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(AP=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+op(e,Math.max(0,t+o-1))[0]}function TP(e,t){var n=op(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const MP={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:IH,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>TP(e*100,t),r:TP,s:BH,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function NP(e){return e}var jP=Array.prototype.map,IP=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function WH(e){var t=e.grouping===void 0||e.thousands===void 0?NP:RH(jP.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?NP:LH(jP.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(d){d=Dc(d);var f=d.fill,p=d.align,m=d.sign,h=d.symbol,g=d.zero,b=d.width,S=d.comma,w=d.precision,x=d.trim,_=d.type;_==="n"?(S=!0,_="g"):MP[_]||(w===void 0&&(w=12),x=!0,_="g"),(g||f==="0"&&p==="=")&&(g=!0,f="0",p="=");var E=h==="$"?n:h==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",C=h==="$"?r:/[%p]/.test(_)?a:"",D=MP[_],T=/[defgprs%]/.test(_);w=w===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function j(A){var P=E,N=C,M,R,L;if(_==="c")N=D(A)+N,A="";else{A=+A;var $=A<0||1/A<0;if(A=isNaN(A)?l:D(Math.abs(A),w),x&&(A=$H(A)),$&&+A==0&&m!=="+"&&($=!1),P=($?m==="("?m:s:m==="-"||m==="("?"":m)+P,N=(_==="s"?IP[8+AP/3]:"")+N+($&&m==="("?")":""),T){for(M=-1,R=A.length;++M<R;)if(L=A.charCodeAt(M),48>L||L>57){N=(L===46?i+A.slice(M+1):A.slice(M))+N,A=A.slice(0,M);break}}}S&&!g&&(A=t(A,1/0));var V=P.length+A.length+N.length,z=V<b?new Array(b-V+1).join(f):"";switch(S&&g&&(A=t(z+A,z.length?b-N.length:1/0),z=""),p){case"<":A=P+A+N+z;break;case"=":A=P+z+A+N;break;case"^":A=z.slice(0,V=z.length>>1)+P+A+N+z.slice(V);break;default:A=z+P+A+N;break}return o(A)}return j.toString=function(){return d+""},j}function u(d,f){var p=c((d=Dc(d),d.type="f",d)),m=Math.max(-8,Math.min(8,Math.floor(Hs(f)/3)))*3,h=Math.pow(10,-m),g=IP[8+m/3];return function(b){return p(h*b)+g}}return{format:c,formatPrefix:u}}var ap,Dy,RP;zH({thousands:",",grouping:[3],currency:["$",""]});function zH(e){return ap=WH(e),Dy=ap.format,RP=ap.formatPrefix,ap}function VH(e){return Math.max(0,-Hs(Math.abs(e)))}function HH(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Hs(t)/3)))*3-Hs(Math.abs(e)))}function YH(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Hs(t)-Hs(e))+1}function LP(e,t,n,r){var i=my(e,t,n),o;switch(r=Dc(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=HH(i,a))&&(r.precision=o),RP(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=YH(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=VH(i))&&(r.precision=o-(r.type==="%")*2);break}}return Dy(r)}function Wo(e){var t=e.domain;return e.ticks=function(n){var r=t();return py(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return LP(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,a=r[i],s=r[o],l,c,u=10;for(s<a&&(c=a,a=s,s=c,c=i,i=o,o=c);u-- >0;){if(c=hy(a,s,n),c===l)return r[i]=a,r[o]=s,t(r);if(c>0)a=Math.floor(a/c)*c,s=Math.ceil(s/c)*c;else if(c<0)a=Math.ceil(a*c)/c,s=Math.floor(s*c)/c;else break;l=c}return e},e}function FP(){var e=ky();return e.copy=function(){return Cc(e,FP())},Nr.apply(e,arguments),Wo(e)}function $P(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,rp),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return $P(e).unknown(t)},e=arguments.length?Array.from(e,rp):[0,1],Wo(n)}function BP(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],a;return o<i&&(a=n,n=r,r=a,a=i,i=o,o=a),e[n]=t.floor(i),e[r]=t.ceil(o),e}function WP(e){return Math.log(e)}function zP(e){return Math.exp(e)}function UH(e){return-Math.log(-e)}function KH(e){return-Math.exp(-e)}function qH(e){return isFinite(e)?+("1e"+e):e<0?0:e}function GH(e){return e===10?qH:e===Math.E?Math.exp:t=>Math.pow(e,t)}function XH(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function VP(e){return(t,n)=>-e(-t,n)}function Ay(e){const t=e(WP,zP),n=t.domain;let r=10,i,o;function a(){return i=XH(r),o=GH(r),n()[0]<0?(i=VP(i),o=VP(o),e(UH,KH)):e(WP,zP),t}return t.base=function(s){return arguments.length?(r=+s,a()):r},t.domain=function(s){return arguments.length?(n(s),a()):n()},t.ticks=s=>{const l=n();let c=l[0],u=l[l.length-1];const d=u<c;d&&([c,u]=[u,c]);let f=i(c),p=i(u),m,h;const g=s==null?10:+s;let b=[];if(!(r%1)&&p-f<g){if(f=Math.floor(f),p=Math.ceil(p),c>0){for(;f<=p;++f)for(m=1;m<r;++m)if(h=f<0?m/o(-f):m*o(f),!(h<c)){if(h>u)break;b.push(h)}}else for(;f<=p;++f)for(m=r-1;m>=1;--m)if(h=f>0?m/o(-f):m*o(f),!(h<c)){if(h>u)break;b.push(h)}b.length*2<g&&(b=py(c,u,g))}else b=py(f,p,Math.min(p-f,g)).map(o);return d?b.reverse():b},t.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=Dc(l)).precision==null&&(l.trim=!0),l=Dy(l)),s===1/0)return l;const c=Math.max(1,r*s/t.ticks().length);return u=>{let d=u/o(Math.round(i(u)));return d*r<r-.5&&(d*=r),d<=c?l(u):""}},t.nice=()=>n(BP(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),t}function HP(){const e=Ay(ip()).domain([1,10]);return e.copy=()=>Cc(e,HP()).base(e.base()),Nr.apply(e,arguments),e}function YP(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function UP(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Ty(e){var t=1,n=e(YP(t),UP(t));return n.constant=function(r){return arguments.length?e(YP(t=+r),UP(t)):t},Wo(n)}function KP(){var e=Ty(ip());return e.copy=function(){return Cc(e,KP()).constant(e.constant())},Nr.apply(e,arguments)}function qP(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function QH(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function ZH(e){return e<0?-e*e:e*e}function My(e){var t=e(In,In),n=1;function r(){return n===1?e(In,In):n===.5?e(QH,ZH):e(qP(n),qP(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Wo(t)}function Ny(){var e=My(ip());return e.copy=function(){return Cc(e,Ny()).exponent(e.exponent())},Nr.apply(e,arguments),e}function JH(){return Ny.apply(null,arguments).exponent(.5)}function GP(e){return Math.sign(e)*e*e}function eY(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function XP(){var e=ky(),t=[0,1],n=!1,r;function i(o){var a=eY(e(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return e.invert(GP(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,rp)).map(GP)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return XP(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Nr.apply(i,arguments),Wo(i)}function QP(){var e=[],t=[],n=[],r;function i(){var a=0,s=Math.max(1,t.length);for(n=new Array(s-1);++a<s;)n[a-1]=iH(e,a/s);return o}function o(a){return a==null||isNaN(a=+a)?r:t[_c(n,a)]}return o.invertExtent=function(a){var s=t.indexOf(a);return s<0?[NaN,NaN]:[s>0?n[s-1]:e[0],s<n.length?n[s]:e[e.length-1]]},o.domain=function(a){if(!arguments.length)return e.slice();e=[];for(let s of a)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(Bo),i()},o.range=function(a){return arguments.length?(t=Array.from(a),i()):t.slice()},o.unknown=function(a){return arguments.length?(r=a,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return QP().domain(e).range(t).unknown(r)},Nr.apply(o,arguments)}function ZP(){var e=0,t=1,n=1,r=[.5],i=[0,1],o;function a(l){return l!=null&&l<=l?i[_c(r,l,0,n)]:o}function s(){var l=-1;for(r=new Array(n);++l<n;)r[l]=((l+1)*t-(l-n)*e)/(n+1);return a}return a.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,s()):[e,t]},a.range=function(l){return arguments.length?(n=(i=Array.from(l)).length-1,s()):i.slice()},a.invertExtent=function(l){var c=i.indexOf(l);return c<0?[NaN,NaN]:c<1?[e,r[0]]:c>=n?[r[n-1],t]:[r[c-1],r[c]]},a.unknown=function(l){return arguments.length&&(o=l),a},a.thresholds=function(){return r.slice()},a.copy=function(){return ZP().domain([e,t]).range(i).unknown(o)},Nr.apply(Wo(a),arguments)}function JP(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[_c(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var a=t.indexOf(o);return[e[a-1],e[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return JP().domain(e).range(t).unknown(n)},Nr.apply(i,arguments)}const jy=new Date,Iy=new Date;function qt(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const a=i(o),s=i.ceil(o);return o-a<s-o?a:s},i.offset=(o,a)=>(t(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,s)=>{const l=[];if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o<a)||!(s>0))return l;let c;do l.push(c=new Date(+o)),t(o,s),e(o);while(c<o&&o<a);return l},i.filter=o=>qt(a=>{if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!o(a););else for(;--s>=0;)for(;t(a,1),!o(a););}),n&&(i.count=(o,a)=>(jy.setTime(+o),Iy.setTime(+a),e(jy),e(Iy),Math.floor(n(jy,Iy))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?a=>r(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const sp=qt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);sp.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?qt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):sp),sp.range;const no=1e3,jr=no*60,ro=jr*60,io=ro*24,Ry=io*7,ek=io*30,Ly=io*365,Ra=qt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*no)},(e,t)=>(t-e)/no,e=>e.getUTCSeconds());Ra.range;const Fy=qt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*no)},(e,t)=>{e.setTime(+e+t*jr)},(e,t)=>(t-e)/jr,e=>e.getMinutes());Fy.range;const $y=qt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*jr)},(e,t)=>(t-e)/jr,e=>e.getUTCMinutes());$y.range;const By=qt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*no-e.getMinutes()*jr)},(e,t)=>{e.setTime(+e+t*ro)},(e,t)=>(t-e)/ro,e=>e.getHours());By.range;const Wy=qt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ro)},(e,t)=>(t-e)/ro,e=>e.getUTCHours());Wy.range;const Ac=qt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*jr)/io,e=>e.getDate()-1);Ac.range;const lp=qt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/io,e=>e.getUTCDate()-1);lp.range;const tk=qt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/io,e=>Math.floor(e/io));tk.range;function La(e){return qt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*jr)/Ry)}const cp=La(0),up=La(1),tY=La(2),nY=La(3),Ys=La(4),rY=La(5),iY=La(6);cp.range,up.range,tY.range,nY.range,Ys.range,rY.range,iY.range;function Fa(e){return qt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/Ry)}const dp=Fa(0),fp=Fa(1),oY=Fa(2),aY=Fa(3),Us=Fa(4),sY=Fa(5),lY=Fa(6);dp.range,fp.range,oY.range,aY.range,Us.range,sY.range,lY.range;const zy=qt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());zy.range;const Vy=qt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());Vy.range;const oo=qt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());oo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:qt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),oo.range;const ao=qt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());ao.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:qt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),ao.range;function nk(e,t,n,r,i,o){const a=[[Ra,1,no],[Ra,5,5*no],[Ra,15,15*no],[Ra,30,30*no],[o,1,jr],[o,5,5*jr],[o,15,15*jr],[o,30,30*jr],[i,1,ro],[i,3,3*ro],[i,6,6*ro],[i,12,12*ro],[r,1,io],[r,2,2*io],[n,1,Ry],[t,1,ek],[t,3,3*ek],[e,1,Ly]];function s(c,u,d){const f=u<c;f&&([c,u]=[u,c]);const p=d&&typeof d.range=="function"?d:l(c,u,d),m=p?p.range(c,+u+1):[];return f?m.reverse():m}function l(c,u,d){const f=Math.abs(u-c)/d,p=fy(([,,g])=>g).right(a,f);if(p===a.length)return e.every(my(c/Ly,u/Ly,d));if(p===0)return sp.every(Math.max(my(c,u,d),1));const[m,h]=a[f/a[p-1][2]<a[p][2]/f?p-1:p];return m.every(h)}return[s,l]}const[cY,uY]=nk(ao,Vy,dp,tk,Wy,$y),[dY,fY]=nk(oo,zy,cp,Ac,By,Fy);function Hy(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Yy(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Tc(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function pY(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=Mc(i),u=Nc(i),d=Mc(o),f=Nc(o),p=Mc(a),m=Nc(a),h=Mc(s),g=Nc(s),b=Mc(l),S=Nc(l),w={a:$,A:V,b:z,B,c:null,d:lk,e:lk,f:RY,g:UY,G:qY,H:NY,I:jY,j:IY,L:ck,m:LY,M:FY,p:X,q,Q:mk,s:gk,S:$Y,u:BY,U:WY,V:zY,w:VY,W:HY,x:null,X:null,y:YY,Y:KY,Z:GY,"%":hk},x={a:re,A:J,b:ee,B:oe,c:null,d:dk,e:dk,f:JY,g:c9,G:d9,H:XY,I:QY,j:ZY,L:fk,m:e9,M:t9,p:se,q:fe,Q:mk,s:gk,S:n9,u:r9,U:i9,V:o9,w:a9,W:s9,x:null,X:null,y:l9,Y:u9,Z:f9,"%":hk},_={a:j,A,b:P,B:N,c:M,d:ak,e:ak,f:DY,g:ok,G:ik,H:sk,I:sk,j:EY,L:CY,m:OY,M:PY,p:T,q:SY,Q:TY,s:MY,S:kY,u:yY,U:bY,V:xY,w:vY,W:wY,x:R,X:L,y:ok,Y:ik,Z:_Y,"%":AY};w.x=E(n,w),w.X=E(r,w),w.c=E(t,w),x.x=E(n,x),x.X=E(r,x),x.c=E(t,x);function E(U,K){return function(Z){var I=[],ve=-1,te=0,ye=U.length,_e,He,ut;for(Z instanceof Date||(Z=new Date(+Z));++ve<ye;)U.charCodeAt(ve)===37&&(I.push(U.slice(te,ve)),(He=rk[_e=U.charAt(++ve)])!=null?_e=U.charAt(++ve):He=_e==="e"?" ":"0",(ut=K[_e])&&(_e=ut(Z,He)),I.push(_e),te=ve+1);return I.push(U.slice(te,ve)),I.join("")}}function C(U,K){return function(Z){var I=Tc(1900,void 0,1),ve=D(I,U,Z+="",0),te,ye;if(ve!=Z.length)return null;if("Q"in I)return new Date(I.Q);if("s"in I)return new Date(I.s*1e3+("L"in I?I.L:0));if(K&&!("Z"in I)&&(I.Z=0),"p"in I&&(I.H=I.H%12+I.p*12),I.m===void 0&&(I.m="q"in I?I.q:0),"V"in I){if(I.V<1||I.V>53)return null;"w"in I||(I.w=1),"Z"in I?(te=Yy(Tc(I.y,0,1)),ye=te.getUTCDay(),te=ye>4||ye===0?fp.ceil(te):fp(te),te=lp.offset(te,(I.V-1)*7),I.y=te.getUTCFullYear(),I.m=te.getUTCMonth(),I.d=te.getUTCDate()+(I.w+6)%7):(te=Hy(Tc(I.y,0,1)),ye=te.getDay(),te=ye>4||ye===0?up.ceil(te):up(te),te=Ac.offset(te,(I.V-1)*7),I.y=te.getFullYear(),I.m=te.getMonth(),I.d=te.getDate()+(I.w+6)%7)}else("W"in I||"U"in I)&&("w"in I||(I.w="u"in I?I.u%7:"W"in I?1:0),ye="Z"in I?Yy(Tc(I.y,0,1)).getUTCDay():Hy(Tc(I.y,0,1)).getDay(),I.m=0,I.d="W"in I?(I.w+6)%7+I.W*7-(ye+5)%7:I.w+I.U*7-(ye+6)%7);return"Z"in I?(I.H+=I.Z/100|0,I.M+=I.Z%100,Yy(I)):Hy(I)}}function D(U,K,Z,I){for(var ve=0,te=K.length,ye=Z.length,_e,He;ve<te;){if(I>=ye)return-1;if(_e=K.charCodeAt(ve++),_e===37){if(_e=K.charAt(ve++),He=_[_e in rk?K.charAt(ve++):_e],!He||(I=He(U,Z,I))<0)return-1}else if(_e!=Z.charCodeAt(I++))return-1}return I}function T(U,K,Z){var I=c.exec(K.slice(Z));return I?(U.p=u.get(I[0].toLowerCase()),Z+I[0].length):-1}function j(U,K,Z){var I=p.exec(K.slice(Z));return I?(U.w=m.get(I[0].toLowerCase()),Z+I[0].length):-1}function A(U,K,Z){var I=d.exec(K.slice(Z));return I?(U.w=f.get(I[0].toLowerCase()),Z+I[0].length):-1}function P(U,K,Z){var I=b.exec(K.slice(Z));return I?(U.m=S.get(I[0].toLowerCase()),Z+I[0].length):-1}function N(U,K,Z){var I=h.exec(K.slice(Z));return I?(U.m=g.get(I[0].toLowerCase()),Z+I[0].length):-1}function M(U,K,Z){return D(U,t,K,Z)}function R(U,K,Z){return D(U,n,K,Z)}function L(U,K,Z){return D(U,r,K,Z)}function $(U){return a[U.getDay()]}function V(U){return o[U.getDay()]}function z(U){return l[U.getMonth()]}function B(U){return s[U.getMonth()]}function X(U){return i[+(U.getHours()>=12)]}function q(U){return 1+~~(U.getMonth()/3)}function re(U){return a[U.getUTCDay()]}function J(U){return o[U.getUTCDay()]}function ee(U){return l[U.getUTCMonth()]}function oe(U){return s[U.getUTCMonth()]}function se(U){return i[+(U.getUTCHours()>=12)]}function fe(U){return 1+~~(U.getUTCMonth()/3)}return{format:function(U){var K=E(U+="",w);return K.toString=function(){return U},K},parse:function(U){var K=C(U+="",!1);return K.toString=function(){return U},K},utcFormat:function(U){var K=E(U+="",x);return K.toString=function(){return U},K},utcParse:function(U){var K=C(U+="",!0);return K.toString=function(){return U},K}}}var rk={"-":"",_:" ",0:"0"},en=/^\s*\d+/,hY=/^%/,mY=/[\\^$*+?|[\]().{}]/g;function Ne(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function gY(e){return e.replace(mY,"\\$&")}function Mc(e){return new RegExp("^(?:"+e.map(gY).join("|")+")","i")}function Nc(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function vY(e,t,n){var r=en.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function yY(e,t,n){var r=en.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function bY(e,t,n){var r=en.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function xY(e,t,n){var r=en.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function wY(e,t,n){var r=en.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function ik(e,t,n){var r=en.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function ok(e,t,n){var r=en.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function _Y(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function SY(e,t,n){var r=en.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function OY(e,t,n){var r=en.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function ak(e,t,n){var r=en.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function EY(e,t,n){var r=en.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function sk(e,t,n){var r=en.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function PY(e,t,n){var r=en.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function kY(e,t,n){var r=en.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function CY(e,t,n){var r=en.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function DY(e,t,n){var r=en.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function AY(e,t,n){var r=hY.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function TY(e,t,n){var r=en.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function MY(e,t,n){var r=en.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function lk(e,t){return Ne(e.getDate(),t,2)}function NY(e,t){return Ne(e.getHours(),t,2)}function jY(e,t){return Ne(e.getHours()%12||12,t,2)}function IY(e,t){return Ne(1+Ac.count(oo(e),e),t,3)}function ck(e,t){return Ne(e.getMilliseconds(),t,3)}function RY(e,t){return ck(e,t)+"000"}function LY(e,t){return Ne(e.getMonth()+1,t,2)}function FY(e,t){return Ne(e.getMinutes(),t,2)}function $Y(e,t){return Ne(e.getSeconds(),t,2)}function BY(e){var t=e.getDay();return t===0?7:t}function WY(e,t){return Ne(cp.count(oo(e)-1,e),t,2)}function uk(e){var t=e.getDay();return t>=4||t===0?Ys(e):Ys.ceil(e)}function zY(e,t){return e=uk(e),Ne(Ys.count(oo(e),e)+(oo(e).getDay()===4),t,2)}function VY(e){return e.getDay()}function HY(e,t){return Ne(up.count(oo(e)-1,e),t,2)}function YY(e,t){return Ne(e.getFullYear()%100,t,2)}function UY(e,t){return e=uk(e),Ne(e.getFullYear()%100,t,2)}function KY(e,t){return Ne(e.getFullYear()%1e4,t,4)}function qY(e,t){var n=e.getDay();return e=n>=4||n===0?Ys(e):Ys.ceil(e),Ne(e.getFullYear()%1e4,t,4)}function GY(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ne(t/60|0,"0",2)+Ne(t%60,"0",2)}function dk(e,t){return Ne(e.getUTCDate(),t,2)}function XY(e,t){return Ne(e.getUTCHours(),t,2)}function QY(e,t){return Ne(e.getUTCHours()%12||12,t,2)}function ZY(e,t){return Ne(1+lp.count(ao(e),e),t,3)}function fk(e,t){return Ne(e.getUTCMilliseconds(),t,3)}function JY(e,t){return fk(e,t)+"000"}function e9(e,t){return Ne(e.getUTCMonth()+1,t,2)}function t9(e,t){return Ne(e.getUTCMinutes(),t,2)}function n9(e,t){return Ne(e.getUTCSeconds(),t,2)}function r9(e){var t=e.getUTCDay();return t===0?7:t}function i9(e,t){return Ne(dp.count(ao(e)-1,e),t,2)}function pk(e){var t=e.getUTCDay();return t>=4||t===0?Us(e):Us.ceil(e)}function o9(e,t){return e=pk(e),Ne(Us.count(ao(e),e)+(ao(e).getUTCDay()===4),t,2)}function a9(e){return e.getUTCDay()}function s9(e,t){return Ne(fp.count(ao(e)-1,e),t,2)}function l9(e,t){return Ne(e.getUTCFullYear()%100,t,2)}function c9(e,t){return e=pk(e),Ne(e.getUTCFullYear()%100,t,2)}function u9(e,t){return Ne(e.getUTCFullYear()%1e4,t,4)}function d9(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Us(e):Us.ceil(e),Ne(e.getUTCFullYear()%1e4,t,4)}function f9(){return"+0000"}function hk(){return"%"}function mk(e){return+e}function gk(e){return Math.floor(+e/1e3)}var Ks,vk,yk;p9({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function p9(e){return Ks=pY(e),vk=Ks.format,Ks.parse,yk=Ks.utcFormat,Ks.utcParse,Ks}function h9(e){return new Date(e)}function m9(e){return e instanceof Date?+e:+new Date(+e)}function Uy(e,t,n,r,i,o,a,s,l,c){var u=ky(),d=u.invert,f=u.domain,p=c(".%L"),m=c(":%S"),h=c("%I:%M"),g=c("%I %p"),b=c("%a %d"),S=c("%b %d"),w=c("%B"),x=c("%Y");function _(E){return(l(E)<E?p:s(E)<E?m:a(E)<E?h:o(E)<E?g:r(E)<E?i(E)<E?b:S:n(E)<E?w:x)(E)}return u.invert=function(E){return new Date(d(E))},u.domain=function(E){return arguments.length?f(Array.from(E,m9)):f().map(h9)},u.ticks=function(E){var C=f();return e(C[0],C[C.length-1],E??10)},u.tickFormat=function(E,C){return C==null?_:c(C)},u.nice=function(E){var C=f();return(!E||typeof E.range!="function")&&(E=t(C[0],C[C.length-1],E??10)),E?f(BP(C,E)):u},u.copy=function(){return Cc(u,Uy(e,t,n,r,i,o,a,s,l,c))},u}function g9(){return Nr.apply(Uy(dY,fY,oo,zy,cp,Ac,By,Fy,Ra,vk).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function v9(){return Nr.apply(Uy(cY,uY,ao,Vy,dp,lp,Wy,$y,Ra,yk).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function pp(){var e=0,t=1,n,r,i,o,a=In,s=!1,l;function c(d){return d==null||isNaN(d=+d)?l:a(i===0?.5:(d=(o(d)-n)*i,s?Math.max(0,Math.min(1,d)):d))}c.domain=function(d){return arguments.length?([e,t]=d,n=o(e=+e),r=o(t=+t),i=n===r?0:1/(r-n),c):[e,t]},c.clamp=function(d){return arguments.length?(s=!!d,c):s},c.interpolator=function(d){return arguments.length?(a=d,c):a};function u(d){return function(f){var p,m;return arguments.length?([p,m]=f,a=d(p,m),c):[a(0),a(1)]}}return c.range=u(Vs),c.rangeRound=u(Ey),c.unknown=function(d){return arguments.length?(l=d,c):l},function(d){return o=d,n=d(e),r=d(t),i=n===r?0:1/(r-n),c}}function zo(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function bk(){var e=Wo(pp()(In));return e.copy=function(){return zo(e,bk())},to.apply(e,arguments)}function xk(){var e=Ay(pp()).domain([1,10]);return e.copy=function(){return zo(e,xk()).base(e.base())},to.apply(e,arguments)}function wk(){var e=Ty(pp());return e.copy=function(){return zo(e,wk()).constant(e.constant())},to.apply(e,arguments)}function Ky(){var e=My(pp());return e.copy=function(){return zo(e,Ky()).exponent(e.exponent())},to.apply(e,arguments)}function y9(){return Ky.apply(null,arguments).exponent(.5)}function _k(){var e=[],t=In;function n(r){if(r!=null&&!isNaN(r=+r))return t((_c(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let i of r)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(Bo),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,i)=>t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>rH(e,o/r))},n.copy=function(){return _k(t).domain(e)},to.apply(n,arguments)}function hp(){var e=0,t=.5,n=1,r=1,i,o,a,s,l,c=In,u,d=!1,f;function p(h){return isNaN(h=+h)?f:(h=.5+((h=+u(h))-o)*(r*h<r*o?s:l),c(d?Math.max(0,Math.min(1,h)):h))}p.domain=function(h){return arguments.length?([e,t,n]=h,i=u(e=+e),o=u(t=+t),a=u(n=+n),s=i===o?0:.5/(o-i),l=o===a?0:.5/(a-o),r=o<i?-1:1,p):[e,t,n]},p.clamp=function(h){return arguments.length?(d=!!h,p):d},p.interpolator=function(h){return arguments.length?(c=h,p):c};function m(h){return function(g){var b,S,w;return arguments.length?([b,S,w]=g,c=AH(h,[b,S,w]),p):[c(0),c(.5),c(1)]}}return p.range=m(Vs),p.rangeRound=m(Ey),p.unknown=function(h){return arguments.length?(f=h,p):f},function(h){return u=h,i=h(e),o=h(t),a=h(n),s=i===o?0:.5/(o-i),l=o===a?0:.5/(a-o),r=o<i?-1:1,p}}function Sk(){var e=Wo(hp()(In));return e.copy=function(){return zo(e,Sk())},to.apply(e,arguments)}function Ok(){var e=Ay(hp()).domain([.1,1,10]);return e.copy=function(){return zo(e,Ok()).base(e.base())},to.apply(e,arguments)}function Ek(){var e=Ty(hp());return e.copy=function(){return zo(e,Ek()).constant(e.constant())},to.apply(e,arguments)}function qy(){var e=My(hp());return e.copy=function(){return zo(e,qy()).exponent(e.exponent())},to.apply(e,arguments)}function b9(){return qy.apply(null,arguments).exponent(.5)}const jc=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:yy,scaleDiverging:Sk,scaleDivergingLog:Ok,scaleDivergingPow:qy,scaleDivergingSqrt:b9,scaleDivergingSymlog:Ek,scaleIdentity:$P,scaleImplicit:gy,scaleLinear:FP,scaleLog:HP,scaleOrdinal:vy,scalePoint:aH,scalePow:Ny,scaleQuantile:QP,scaleQuantize:ZP,scaleRadial:XP,scaleSequential:bk,scaleSequentialLog:xk,scaleSequentialPow:Ky,scaleSequentialQuantile:_k,scaleSequentialSqrt:y9,scaleSequentialSymlog:wk,scaleSqrt:JH,scaleSymlog:KP,scaleThreshold:JP,scaleTime:g9,scaleUtc:v9,tickFormat:LP},Symbol.toStringTag,{value:"Module"}));var Vo=e=>e.chartData,Gy=W([Vo],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),Ic=(e,t,n,r)=>r?Gy(e):Vo(e);function qs(e){if(Array.isArray(e)&&e.length===2){var[t,n]=e;if(pn(t)&&pn(n))return!0}return!1}function Pk(e,t,n){return n?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function x9(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[n,r]=e,i,o;if(pn(n))i=n;else if(typeof n=="function")return;if(pn(r))o=r;else if(typeof r=="function")return;var a=[i,o];if(qs(a))return a}}function w9(e,t,n){if(!(!n&&t==null)){if(typeof e=="function"&&t!=null)try{var r=e(t,n);if(qs(r))return Pk(r,t,n)}catch{}if(Array.isArray(e)&&e.length===2){var[i,o]=e,a,s;if(i==="auto")t!=null&&(a=Math.min(...t));else if(he(i))a=i;else if(typeof i=="function")try{t!=null&&(a=i(t?.[0]))}catch{}else if(typeof i=="string"&&b2.test(i)){var l=b2.exec(i);if(l==null||t==null)a=void 0;else{var c=+l[1];a=t[0]-c}}else a=t?.[0];if(o==="auto")t!=null&&(s=Math.max(...t));else if(he(o))s=o;else if(typeof o=="function")try{t!=null&&(s=o(t?.[1]))}catch{}else if(typeof o=="string"&&x2.test(o)){var u=x2.exec(o);if(u==null||t==null)s=void 0;else{var d=+u[1];s=t[1]+d}}else s=t?.[1];var f=[a,s];if(qs(f))return t==null?f:Pk(f,t,n)}}}var Gs=1e9,_9={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Zy,yt=!0,Ir="[DecimalError] ",$a=Ir+"Invalid argument: ",Xy=Ir+"Exponent out of range: ",Xs=Math.floor,Ba=Math.pow,S9=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,fr,tn=1e7,pt=7,kk=9007199254740991,mp=Xs(kk/pt),de={};de.absoluteValue=de.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e},de.comparedTo=de.cmp=function(e){var t,n,r,i,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(r=o.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(o.d[t]!==e.d[t])return o.d[t]>e.d[t]^o.s<0?1:-1;return r===i?0:r>i^o.s<0?1:-1},de.decimalPlaces=de.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*pt;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n},de.dividedBy=de.div=function(e){return so(this,new this.constructor(e))},de.dividedToIntegerBy=de.idiv=function(e){var t=this,n=t.constructor;return it(so(t,new n(e),0,1),n.precision)},de.equals=de.eq=function(e){return!this.cmp(e)},de.exponent=function(){return zt(this)},de.greaterThan=de.gt=function(e){return this.cmp(e)>0},de.greaterThanOrEqualTo=de.gte=function(e){return this.cmp(e)>=0},de.isInteger=de.isint=function(){return this.e>this.d.length-2},de.isNegative=de.isneg=function(){return this.s<0},de.isPositive=de.ispos=function(){return this.s>0},de.isZero=function(){return this.s===0},de.lessThan=de.lt=function(e){return this.cmp(e)<0},de.lessThanOrEqualTo=de.lte=function(e){return this.cmp(e)<1},de.logarithm=de.log=function(e){var t,n=this,r=n.constructor,i=r.precision,o=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(fr))throw Error(Ir+"NaN");if(n.s<1)throw Error(Ir+(n.s?"NaN":"-Infinity"));return n.eq(fr)?new r(0):(yt=!1,t=so(Rc(n,o),Rc(e,o),o),yt=!0,it(t,i))},de.minus=de.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Tk(t,e):Ck(t,(e.s=-e.s,e))},de.modulo=de.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(Ir+"NaN");return n.s?(yt=!1,t=so(n,e,0,1).times(e),yt=!0,n.minus(t)):it(new r(n),i)},de.naturalExponential=de.exp=function(){return Dk(this)},de.naturalLogarithm=de.ln=function(){return Rc(this)},de.negated=de.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},de.plus=de.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Ck(t,e):Tk(t,(e.s=-e.s,e))},de.precision=de.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error($a+e);if(t=zt(i)+1,r=i.d.length-1,n=r*pt+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n},de.squareRoot=de.sqrt=function(){var e,t,n,r,i,o,a,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(Ir+"NaN")}for(e=zt(s),yt=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=bi(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Xs((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new l(t)):r=new l(i.toString()),n=l.precision,i=a=n+3;;)if(o=r,r=o.plus(so(s,o,a+2)).times(.5),bi(o.d).slice(0,a)===(t=bi(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),i==a&&t=="4999"){if(it(o,n+1,0),o.times(o).eq(s)){r=o;break}}else if(t!="9999")break;a+=4}return yt=!0,it(r,n)},de.times=de.mul=function(e){var t,n,r,i,o,a,s,l,c,u=this,d=u.constructor,f=u.d,p=(e=new d(e)).d;if(!u.s||!e.s)return new d(0);for(e.s*=u.s,n=u.e+e.e,l=f.length,c=p.length,l<c&&(o=f,f=p,p=o,a=l,l=c,c=a),o=[],a=l+c,r=a;r--;)o.push(0);for(r=c;--r>=0;){for(t=0,i=l+r;i>r;)s=o[i]+p[r]*f[i-r-1]+t,o[i--]=s%tn|0,t=s/tn|0;o[i]=(o[i]+t)%tn|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,yt?it(e,d.precision):e},de.toDecimalPlaces=de.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(yi(e,0,Gs),t===void 0?t=r.rounding:yi(t,0,8),it(n,e+zt(n)+1,t))},de.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=Wa(r,!0):(yi(e,0,Gs),t===void 0?t=i.rounding:yi(t,0,8),r=it(new i(r),e+1,t),n=Wa(r,!0,e+1)),n},de.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?Wa(i):(yi(e,0,Gs),t===void 0?t=o.rounding:yi(t,0,8),r=it(new o(i),e+zt(i)+1,t),n=Wa(r.abs(),!1,e+zt(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)},de.toInteger=de.toint=function(){var e=this,t=e.constructor;return it(new t(e),zt(e)+1,t.rounding)},de.toNumber=function(){return+this},de.toPower=de.pow=function(e){var t,n,r,i,o,a,s=this,l=s.constructor,c=12,u=+(e=new l(e));if(!e.s)return new l(fr);if(s=new l(s),!s.s){if(e.s<1)throw Error(Ir+"Infinity");return s}if(s.eq(fr))return s;if(r=l.precision,e.eq(fr))return it(s,r);if(t=e.e,n=e.d.length-1,a=t>=n,o=s.s,a){if((n=u<0?-u:u)<=kk){for(i=new l(fr),t=Math.ceil(r/pt+4),yt=!1;n%2&&(i=i.times(s),Mk(i.d,t)),n=Xs(n/2),n!==0;)s=s.times(s),Mk(s.d,t);return yt=!0,e.s<0?new l(fr).div(i):it(i,r)}}else if(o<0)throw Error(Ir+"NaN");return o=o<0&&e.d[Math.max(t,n)]&1?-1:1,s.s=1,yt=!1,i=e.times(Rc(s,r+c)),yt=!0,i=Dk(i),i.s=o,i},de.toPrecision=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?(n=zt(i),r=Wa(i,n<=o.toExpNeg||n>=o.toExpPos)):(yi(e,1,Gs),t===void 0?t=o.rounding:yi(t,0,8),i=it(new o(i),e,t),n=zt(i),r=Wa(i,e<=n||n<=o.toExpNeg,e)),r},de.toSignificantDigits=de.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(yi(e,1,Gs),t===void 0?t=r.rounding:yi(t,0,8)),it(new r(n),e,t)},de.toString=de.valueOf=de.val=de.toJSON=de[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=zt(e),n=e.constructor;return Wa(e,t<=n.toExpNeg||t>=n.toExpPos)};function Ck(e,t){var n,r,i,o,a,s,l,c,u=e.constructor,d=u.precision;if(!e.s||!t.s)return t.s||(t=new u(e)),yt?it(t,d):t;if(l=e.d,c=t.d,a=e.e,i=t.e,l=l.slice(),o=a-i,o){for(o<0?(r=l,o=-o,s=c.length):(r=c,i=a,s=l.length),a=Math.ceil(d/pt),s=a>s?a+1:s+1,o>s&&(o=s,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(s=l.length,o=c.length,s-o<0&&(o=s,r=c,c=l,l=r),n=0;o;)n=(l[--o]=l[o]+c[o]+n)/tn|0,l[o]%=tn;for(n&&(l.unshift(n),++i),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=i,yt?it(t,d):t}function yi(e,t,n){if(e!==~~e||e<t||e>n)throw Error($a+e)}function bi(e){var t,n,r,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;t<i;t++)r=e[t]+"",n=pt-r.length,n&&(o+=Ho(n)),o+=r;a=e[t],r=a+"",n=pt-r.length,n&&(o+=Ho(n))}else if(a===0)return"0";for(;a%10===0;)a/=10;return o+a}var so=(function(){function e(r,i){var o,a=0,s=r.length;for(r=r.slice();s--;)o=r[s]*i+a,r[s]=o%tn|0,a=o/tn|0;return a&&r.unshift(a),r}function t(r,i,o,a){var s,l;if(o!=a)l=o>a?1:-1;else for(s=l=0;s<o;s++)if(r[s]!=i[s]){l=r[s]>i[s]?1:-1;break}return l}function n(r,i,o){for(var a=0;o--;)r[o]-=a,a=r[o]<i[o]?1:0,r[o]=a*tn+r[o]-i[o];for(;!r[0]&&r.length>1;)r.shift()}return function(r,i,o,a){var s,l,c,u,d,f,p,m,h,g,b,S,w,x,_,E,C,D,T=r.constructor,j=r.s==i.s?1:-1,A=r.d,P=i.d;if(!r.s)return new T(r);if(!i.s)throw Error(Ir+"Division by zero");for(l=r.e-i.e,C=P.length,_=A.length,p=new T(j),m=p.d=[],c=0;P[c]==(A[c]||0);)++c;if(P[c]>(A[c]||0)&&--l,o==null?S=o=T.precision:a?S=o+(zt(r)-zt(i))+1:S=o,S<0)return new T(0);if(S=S/pt+2|0,c=0,C==1)for(u=0,P=P[0],S++;(c<_||u)&&S--;c++)w=u*tn+(A[c]||0),m[c]=w/P|0,u=w%P|0;else{for(u=tn/(P[0]+1)|0,u>1&&(P=e(P,u),A=e(A,u),C=P.length,_=A.length),x=C,h=A.slice(0,C),g=h.length;g<C;)h[g++]=0;D=P.slice(),D.unshift(0),E=P[0],P[1]>=tn/2&&++E;do u=0,s=t(P,h,C,g),s<0?(b=h[0],C!=g&&(b=b*tn+(h[1]||0)),u=b/E|0,u>1?(u>=tn&&(u=tn-1),d=e(P,u),f=d.length,g=h.length,s=t(d,h,f,g),s==1&&(u--,n(d,C<f?D:P,f))):(u==0&&(s=u=1),d=P.slice()),f=d.length,f<g&&d.unshift(0),n(h,d,g),s==-1&&(g=h.length,s=t(P,h,C,g),s<1&&(u++,n(h,C<g?D:P,g))),g=h.length):s===0&&(u++,h=[0]),m[c++]=u,s&&h[0]?h[g++]=A[x]||0:(h=[A[x]],g=1);while((x++<_||h[0]!==void 0)&&S--)}return m[0]||m.shift(),p.e=l,it(p,a?o+zt(p)+1:o)}})();function Dk(e,t){var n,r,i,o,a,s,l=0,c=0,u=e.constructor,d=u.precision;if(zt(e)>16)throw Error(Xy+zt(e));if(!e.s)return new u(fr);for(yt=!1,s=d,a=new u(.03125);e.abs().gte(.1);)e=e.times(a),c+=5;for(r=Math.log(Ba(2,c))/Math.LN10*2+5|0,s+=r,n=i=o=new u(fr),u.precision=s;;){if(i=it(i.times(e),s),n=n.times(++l),a=o.plus(so(i,n,s)),bi(a.d).slice(0,s)===bi(o.d).slice(0,s)){for(;c--;)o=it(o.times(o),s);return u.precision=d,t==null?(yt=!0,it(o,d)):o}o=a}}function zt(e){for(var t=e.e*pt,n=e.d[0];n>=10;n/=10)t++;return t}function Qy(e,t,n){if(t>e.LN10.sd())throw yt=!0,n&&(e.precision=n),Error(Ir+"LN10 precision limit exceeded");return it(new e(e.LN10),t)}function Ho(e){for(var t="";e--;)t+="0";return t}function Rc(e,t){var n,r,i,o,a,s,l,c,u,d=1,f=10,p=e,m=p.d,h=p.constructor,g=h.precision;if(p.s<1)throw Error(Ir+(p.s?"NaN":"-Infinity"));if(p.eq(fr))return new h(0);if(t==null?(yt=!1,c=g):c=t,p.eq(10))return t==null&&(yt=!0),Qy(h,c);if(c+=f,h.precision=c,n=bi(m),r=n.charAt(0),o=zt(p),Math.abs(o)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)p=p.times(e),n=bi(p.d),r=n.charAt(0),d++;o=zt(p),r>1?(p=new h("0."+n),o++):p=new h(r+"."+n.slice(1))}else return l=Qy(h,c+2,g).times(o+""),p=Rc(new h(r+"."+n.slice(1)),c-f).plus(l),h.precision=g,t==null?(yt=!0,it(p,g)):p;for(s=a=p=so(p.minus(fr),p.plus(fr),c),u=it(p.times(p),c),i=3;;){if(a=it(a.times(u),c),l=s.plus(so(a,new h(i),c)),bi(l.d).slice(0,c)===bi(s.d).slice(0,c))return s=s.times(2),o!==0&&(s=s.plus(Qy(h,c+2,g).times(o+""))),s=so(s,new h(d),c),h.precision=g,t==null?(yt=!0,it(s,g)):s;s=l,i+=2}}function Ak(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=Xs(n/pt),e.d=[],r=(n+1)%pt,n<0&&(r+=pt),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=pt;r<i;)e.d.push(+t.slice(r,r+=pt));t=t.slice(r),r=pt-t.length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),yt&&(e.e>mp||e.e<-mp))throw Error(Xy+n)}else e.s=0,e.e=0,e.d=[0];return e}function it(e,t,n){var r,i,o,a,s,l,c,u,d=e.d;for(a=1,o=d[0];o>=10;o/=10)a++;if(r=t-a,r<0)r+=pt,i=t,c=d[u=0];else{if(u=Math.ceil((r+1)/pt),o=d.length,u>=o)return e;for(c=o=d[u],a=1;o>=10;o/=10)a++;r%=pt,i=r-pt+a}if(n!==void 0&&(o=Ba(10,a-i-1),s=c/o%10|0,l=t<0||d[u+1]!==void 0||c%o,l=n<4?(s||l)&&(n==0||n==(e.s<0?3:2)):s>5||s==5&&(n==4||l||n==6&&(r>0?i>0?c/Ba(10,a-i):0:d[u-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return l?(o=zt(e),d.length=1,t=t-o-1,d[0]=Ba(10,(pt-t%pt)%pt),e.e=Xs(-t/pt)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(r==0?(d.length=u,o=1,u--):(d.length=u+1,o=Ba(10,pt-r),d[u]=i>0?(c/Ba(10,a-i)%Ba(10,i)|0)*o:0),l)for(;;)if(u==0){(d[0]+=o)==tn&&(d[0]=1,++e.e);break}else{if(d[u]+=o,d[u]!=tn)break;d[u--]=0,o=1}for(r=d.length;d[--r]===0;)d.pop();if(yt&&(e.e>mp||e.e<-mp))throw Error(Xy+zt(e));return e}function Tk(e,t){var n,r,i,o,a,s,l,c,u,d,f=e.constructor,p=f.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new f(e),yt?it(t,p):t;if(l=e.d,d=t.d,r=t.e,c=e.e,l=l.slice(),a=c-r,a){for(u=a<0,u?(n=l,a=-a,s=d.length):(n=d,r=c,s=l.length),i=Math.max(Math.ceil(p/pt),s)+2,a>i&&(a=i,n.length=1),n.reverse(),i=a;i--;)n.push(0);n.reverse()}else{for(i=l.length,s=d.length,u=i<s,u&&(s=i),i=0;i<s;i++)if(l[i]!=d[i]){u=l[i]<d[i];break}a=0}for(u&&(n=l,l=d,d=n,t.s=-t.s),s=l.length,i=d.length-s;i>0;--i)l[s++]=0;for(i=d.length;i>a;){if(l[--i]<d[i]){for(o=i;o&&l[--o]===0;)l[o]=tn-1;--l[o],l[i]+=tn}l[i]-=d[i]}for(;l[--s]===0;)l.pop();for(;l[0]===0;l.shift())--r;return l[0]?(t.d=l,t.e=r,yt?it(t,p):t):new f(0)}function Wa(e,t,n){var r,i=zt(e),o=bi(e.d),a=o.length;return t?(n&&(r=n-a)>0?o=o.charAt(0)+"."+o.slice(1)+Ho(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Ho(-i-1)+o,n&&(r=n-a)>0&&(o+=Ho(r))):i>=a?(o+=Ho(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+Ho(r))):((r=i+1)<a&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-a)>0&&(i+1===a&&(o+="."),o+=Ho(r))),e.s<0?"-"+o:o}function Mk(e,t){if(e.length>t)return e.length=t,!0}function Nk(e){var t,n,r;function i(o){var a=this;if(!(a instanceof i))return new i(o);if(a.constructor=i,o instanceof i){a.s=o.s,a.e=o.e,a.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error($a+o);if(o>0)a.s=1;else if(o<0)o=-o,a.s=-1;else{a.s=0,a.e=0,a.d=[0];return}if(o===~~o&&o<1e7){a.e=0,a.d=[o];return}return Ak(a,o.toString())}else if(typeof o!="string")throw Error($a+o);if(o.charCodeAt(0)===45?(o=o.slice(1),a.s=-1):a.s=1,S9.test(o))Ak(a,o);else throw Error($a+o)}if(i.prototype=de,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=Nk,i.config=i.set=O9,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return i.config(e),i}function O9(e){if(!e||typeof e!="object")throw Error(Ir+"Object expected");var t,n,r,i=["precision",1,Gs,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((r=e[n=i[t]])!==void 0)if(Xs(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error($a+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error($a+n+": "+r);return this}var Zy=Nk(_9);fr=new Zy(1);const Qe=Zy;var E9=e=>e,jk={},Ik=e=>e===jk,Rk=e=>function t(){return arguments.length===0||arguments.length===1&&Ik(arguments.length<=0?void 0:arguments[0])?t:e(...arguments)},Lk=(e,t)=>e===1?t:Rk(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=r.filter(a=>a!==jk).length;return o>=e?t(...r):Lk(e-o,Rk(function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];var c=r.map(u=>Ik(u)?s.shift():u);return t(...c,...s)}))}),gp=e=>Lk(e.length,e),Jy=(e,t)=>{for(var n=[],r=e;r<t;++r)n[r-e]=r;return n},P9=gp((e,t)=>Array.isArray(t)?t.map(e):Object.keys(t).map(n=>t[n]).map(e)),k9=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return E9;var i=n.reverse(),o=i[0],a=i.slice(1);return function(){return a.reduce((s,l)=>l(s),o(...arguments))}},eb=e=>Array.isArray(e)?e.reverse():e.split("").reverse().join(""),Fk=e=>{var t=null,n=null;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return t&&i.every((a,s)=>{var l;return a===((l=t)===null||l===void 0?void 0:l[s])})||(t=i,n=e(...i)),n}};function $k(e){var t;return e===0?t=1:t=Math.floor(new Qe(e).abs().log(10).toNumber())+1,t}function Bk(e,t,n){for(var r=new Qe(e),i=0,o=[];r.lt(t)&&i<1e5;)o.push(r.toNumber()),r=r.add(n),i++;return o}gp((e,t,n)=>{var r=+e,i=+t;return r+n*(i-r)}),gp((e,t,n)=>{var r=t-+e;return r=r||1/0,(n-e)/r}),gp((e,t,n)=>{var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});var Wk=e=>{var[t,n]=e,[r,i]=[t,n];return t>n&&([r,i]=[n,t]),[r,i]},zk=(e,t,n)=>{if(e.lte(0))return new Qe(0);var r=$k(e.toNumber()),i=new Qe(10).pow(r),o=e.div(i),a=r!==1?.05:.1,s=new Qe(Math.ceil(o.div(a).toNumber())).add(n).mul(a),l=s.mul(i);return t?new Qe(l.toNumber()):new Qe(Math.ceil(l.toNumber()))},C9=(e,t,n)=>{var r=new Qe(1),i=new Qe(e);if(!i.isint()&&n){var o=Math.abs(e);o<1?(r=new Qe(10).pow($k(e)-1),i=new Qe(Math.floor(i.div(r).toNumber())).mul(r)):o>1&&(i=new Qe(Math.floor(e)))}else e===0?i=new Qe(Math.floor((t-1)/2)):n||(i=new Qe(Math.floor(e)));var a=Math.floor((t-1)/2),s=k9(P9(l=>i.add(new Qe(l-a).mul(r)).toNumber()),Jy);return s(0,t)},Vk=function(t,n,r,i){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((n-t)/(r-1)))return{step:new Qe(0),tickMin:new Qe(0),tickMax:new Qe(0)};var a=zk(new Qe(n).sub(t).div(r-1),i,o),s;t<=0&&n>=0?s=new Qe(0):(s=new Qe(t).add(n).div(2),s=s.sub(new Qe(s).mod(a)));var l=Math.ceil(s.sub(t).div(a).toNumber()),c=Math.ceil(new Qe(n).sub(s).div(a).toNumber()),u=l+c+1;return u>r?Vk(t,n,r,i,o+1):(u<r&&(c=n>0?c+(r-u):c,l=n>0?l:l+(r-u)),{step:a,tickMin:s.sub(new Qe(l).mul(a)),tickMax:s.add(new Qe(c).mul(a))})};function D9(e){var[t,n]=e,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(r,2),[a,s]=Wk([t,n]);if(a===-1/0||s===1/0){var l=s===1/0?[a,...Jy(0,r-1).map(()=>1/0)]:[...Jy(0,r-1).map(()=>-1/0),s];return t>n?eb(l):l}if(a===s)return C9(a,r,i);var{step:c,tickMin:u,tickMax:d}=Vk(a,s,o,i,0),f=Bk(u,d.add(new Qe(.1).mul(c)),c);return t>n?eb(f):f}function A9(e,t){var[n,r]=e,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,[o,a]=Wk([n,r]);if(o===-1/0||a===1/0)return[n,r];if(o===a)return[o];var s=Math.max(t,2),l=zk(new Qe(a).sub(o).div(s-1),i,0),c=[...Bk(new Qe(o),new Qe(a),l),a];return i===!1&&(c=c.map(u=>Math.round(u))),n>r?eb(c):c}var T9=Fk(D9),M9=Fk(A9),Hk=e=>e.rootProps.maxBarSize,N9=e=>e.rootProps.barGap,Yk=e=>e.rootProps.barCategoryGap,j9=e=>e.rootProps.barSize,Lc=e=>e.rootProps.stackOffset,tb=e=>e.options.chartName,nb=e=>e.rootProps.syncId,Uk=e=>e.rootProps.syncMethod,rb=e=>e.options.eventEmitter,lo={allowDuplicatedCategory:!0,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"category"},pr={allowDataOverflow:!1,allowDuplicatedCategory:!0,radiusAxisId:0,scale:"auto",tick:!0,tickCount:5,type:"number"},vp=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t},I9={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:lo.angleAxisId,includeHidden:!1,name:void 0,reversed:lo.reversed,scale:lo.scale,tick:lo.tick,tickCount:void 0,ticks:void 0,type:lo.type,unit:void 0},R9={allowDataOverflow:pr.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:pr.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:pr.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:pr.scale,tick:pr.tick,tickCount:pr.tickCount,ticks:void 0,type:pr.type,unit:void 0},L9={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:lo.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:lo.angleAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:lo.scale,tick:lo.tick,tickCount:void 0,ticks:void 0,type:"number",unit:void 0},F9={allowDataOverflow:pr.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:pr.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:pr.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:pr.scale,tick:pr.tick,tickCount:pr.tickCount,ticks:void 0,type:"category",unit:void 0},ib=(e,t)=>e.polarAxis.angleAxis[t]!=null?e.polarAxis.angleAxis[t]:e.layout.layoutType==="radial"?L9:I9,ob=(e,t)=>e.polarAxis.radiusAxis[t]!=null?e.polarAxis.radiusAxis[t]:e.layout.layoutType==="radial"?F9:R9,yp=e=>e.polarOptions,ab=W([Zi,Ji,Ut],d2),Kk=W([yp,ab],(e,t)=>{if(e!=null)return On(e.innerRadius,t,0)}),qk=W([yp,ab],(e,t)=>{if(e!=null)return On(e.outerRadius,t,t*.8)}),$9=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:n}=e;return[t,n]},Gk=W([yp],$9);W([ib,Gk],vp);var Xk=W([ab,Kk,qk],(e,t,n)=>{if(!(e==null||t==null||n==null))return[t,n]});W([ob,Xk],vp);var Qk=W([Pe,yp,Kk,qk,Zi,Ji],(e,t,n,r,i,o)=>{if(!(e!=="centric"&&e!=="radial"||t==null||n==null||r==null)){var{cx:a,cy:s,startAngle:l,endAngle:c}=t;return{cx:On(a,i,i/2),cy:On(s,o,o/2),innerRadius:n,outerRadius:r,startAngle:l,endAngle:c,clockWise:!1}}}),bt=(e,t)=>t,Fc=(e,t,n)=>n;function bp(e){return e?.id}var Gt=e=>{var t=Pe(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},Qs=e=>e.tooltip.settings.axisId,nn=e=>{var t=Gt(e),n=Qs(e);return $c(e,t,n)},Zk=W([nn],e=>e?.dataKey);function Jk(e,t,n){var{chartData:r=[]}=t,{allowDuplicatedCategory:i,dataKey:o}=n,a=new Map;return e.forEach(s=>{var l,c=(l=s.data)!==null&&l!==void 0?l:r;if(!(c==null||c.length===0)){var u=bp(s);c.forEach((d,f)=>{var p=o==null||i?f:String(rt(d,o,null)),m=rt(d,s.dataKey,0),h;a.has(p)?h=a.get(p):h={},Object.assign(h,{[u]:m}),a.set(p,h)})}}),Array.from(a.values())}function xp(e){return e.stackId!=null&&e.dataKey!=null}function eC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function wp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?eC(Object(n),!0).forEach(function(r){B9(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function B9(e,t,n){return(t=W9(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function W9(e){var t=z9(e,"string");return typeof t=="symbol"?t:t+""}function z9(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var sb=[0,"auto"],hr={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0},tC=(e,t)=>e.cartesianAxis.xAxis[t],xi=(e,t)=>{var n=tC(e,t);return n??hr},mr={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:sb,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,width:gc},nC=(e,t)=>e.cartesianAxis.yAxis[t],wi=(e,t)=>{var n=nC(e,t);return n??mr},V9={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},lb=(e,t)=>{var n=e.cartesianAxis.zAxis[t];return n??V9},jt=(e,t,n)=>{switch(t){case"xAxis":return xi(e,n);case"yAxis":return wi(e,n);case"zAxis":return lb(e,n);case"angleAxis":return ib(e,n);case"radiusAxis":return ob(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},H9=(e,t,n)=>{switch(t){case"xAxis":return xi(e,n);case"yAxis":return wi(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},$c=(e,t,n)=>{switch(t){case"xAxis":return xi(e,n);case"yAxis":return wi(e,n);case"angleAxis":return ib(e,n);case"radiusAxis":return ob(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},rC=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function cb(e,t){return n=>{switch(e){case"xAxis":return"xAxisId"in n&&n.xAxisId===t;case"yAxis":return"yAxisId"in n&&n.yAxisId===t;case"zAxis":return"zAxisId"in n&&n.zAxisId===t;case"angleAxis":return"angleAxisId"in n&&n.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in n&&n.radiusAxisId===t;default:return!1}}}var Bc=e=>e.graphicalItems.cartesianItems,Y9=W([bt,Fc],cb),ub=(e,t,n)=>e.filter(n).filter(r=>t?.includeHidden===!0?!0:!r.hide),Wc=W([Bc,jt,Y9],ub),iC=W([Wc],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(xp)),oC=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),aC=W([Wc],oC),db=e=>e.map(t=>t.data).filter(Boolean).flat(1),U9=W([Wc],db),fb=(e,t)=>{var{chartData:n=[],dataStartIndex:r,dataEndIndex:i}=t;return e.length>0?e:n.slice(r,i+1)},pb=W([U9,Ic],fb),hb=(e,t,n)=>t?.dataKey!=null?e.map(r=>({value:rt(r,t.dataKey)})):n.length>0?n.map(r=>r.dataKey).flatMap(r=>e.map(i=>({value:rt(i,r)}))):e.map(r=>({value:r})),_p=W([pb,jt,Wc],hb);function sC(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function za(e){return e.filter(t=>Pr(t)||t instanceof Date).map(Number).filter(t=>Sn(t)===!1)}function K9(e,t,n){return!n||typeof t!="number"||Sn(t)?[]:n.length?za(n.flatMap(r=>{var i=rt(e,r.dataKey),o,a;if(Array.isArray(i)?[o,a]=i:o=a=i,!(!pn(o)||!pn(a)))return[t-o,t+a]})):[]}var q9=W([iC,Ic,nn],Jk),lC=(e,t,n)=>{var r={},i=t.reduce((o,a)=>(a.stackId==null||(o[a.stackId]==null&&(o[a.stackId]=[]),o[a.stackId].push(a)),o),r);return Object.fromEntries(Object.entries(i).map(o=>{var[a,s]=o,l=s.map(bp);return[a,{stackedData:e7(e,l,n),graphicalItems:s}]}))},zc=W([q9,iC,Lc],lC),cC=(e,t,n)=>{var{dataStartIndex:r,dataEndIndex:i}=t;if(n!=="zAxis"){var o=i7(e,r,i);if(!(o!=null&&o[0]===0&&o[1]===0))return o}},G9=W([zc,Vo,bt],cC),uC=(e,t,n,r,i)=>n.length>0?e.flatMap(o=>n.flatMap(a=>{var s,l,c=(s=r[a.id])===null||s===void 0?void 0:s.filter(d=>sC(i,d)),u=rt(o,(l=t.dataKey)!==null&&l!==void 0?l:a.dataKey);return{value:u,errorDomain:K9(o,u,c)}})).filter(Boolean):t?.dataKey!=null?e.map(o=>({value:rt(o,t.dataKey),errorDomain:[]})):e.map(o=>({value:o,errorDomain:[]})),Sp=e=>e.errorBars,dC=(e,t,n)=>e.flatMap(r=>t[r.id]).filter(Boolean).filter(r=>sC(n,r));W([aC,Sp,bt],dC);var X9=W([pb,jt,aC,Sp,bt],uC);function Q9(e){var{value:t}=e;if(Pr(t)||t instanceof Date)return t}var fC=e=>{var t=e.flatMap(r=>[r.value,r.errorDomain]).flat(1),n=za(t);if(n.length!==0)return[Math.min(...n),Math.max(...n)]},Z9=(e,t,n)=>{var r=e.map(Q9).filter(i=>i!=null);return n&&(t.dataKey==null||t.allowDuplicatedCategory&&FS(r))?lP(0,e.length):t.allowDuplicatedCategory?r:Array.from(new Set(r))},mb=e=>{var t;if(e==null||!("domain"in e))return sb;if(e.domain!=null)return e.domain;if(e.ticks!=null){if(e.type==="number"){var n=za(e.ticks);return[Math.min(...n),Math.max(...n)]}if(e.type==="category")return e.ticks.map(String)}return(t=e?.domain)!==null&&t!==void 0?t:sb},Op=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n.filter(Boolean);if(i.length!==0){var o=i.flat(),a=Math.min(...o),s=Math.max(...o);return[a,s]}},pC=e=>e.referenceElements.dots,Zs=(e,t,n)=>e.filter(r=>r.ifOverflow==="extendDomain").filter(r=>t==="xAxis"?r.xAxisId===n:r.yAxisId===n),J9=W([pC,bt,Fc],Zs),hC=e=>e.referenceElements.areas,eU=W([hC,bt,Fc],Zs),mC=e=>e.referenceElements.lines,tU=W([mC,bt,Fc],Zs),gC=(e,t)=>{var n=za(e.map(r=>t==="xAxis"?r.x:r.y));if(n.length!==0)return[Math.min(...n),Math.max(...n)]},nU=W(J9,bt,gC),vC=(e,t)=>{var n=za(e.flatMap(r=>[t==="xAxis"?r.x1:r.y1,t==="xAxis"?r.x2:r.y2]));if(n.length!==0)return[Math.min(...n),Math.max(...n)]},rU=W([eU,bt],vC),yC=(e,t)=>{var n=za(e.map(r=>t==="xAxis"?r.x:r.y));if(n.length!==0)return[Math.min(...n),Math.max(...n)]},iU=W(tU,bt,yC),oU=W(nU,iU,rU,(e,t,n)=>Op(e,n,t)),bC=W([jt],mb),gb=(e,t,n,r,i,o,a)=>{var s=x9(t,e.allowDataOverflow);if(s!=null)return s;var l=o==="vertical"&&a==="xAxis"||o==="horizontal"&&a==="yAxis",c=l?Op(n,i,fC(r)):Op(i,fC(r));return w9(t,c,e.allowDataOverflow)},aU=W([jt,bC,G9,X9,oU,Pe,bt],gb),sU=[0,1],vb=(e,t,n,r,i,o,a)=>{if(!((e==null||n==null||n.length===0)&&a===void 0)){var{dataKey:s,type:l}=e,c=gi(t,o);return c&&s==null?lP(0,n.length):l==="category"?Z9(r,e,c):i==="expand"?sU:a}},yb=W([jt,Pe,pb,_p,Lc,bt,aU],vb),xC=(e,t,n,r,i)=>{if(e!=null){var{scale:o,type:a}=e;if(o==="auto")return t==="radial"&&i==="radiusAxis"?"band":t==="radial"&&i==="angleAxis"?"linear":a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?"point":a==="category"?"band":"linear";if(typeof o=="string"){var s="scale".concat(lc(o));return s in jc?s:"point"}}},Js=W([jt,Pe,rC,tb,bt],xC);function lU(e){if(e!=null){if(e in jc)return jc[e]();var t="scale".concat(lc(e));if(t in jc)return jc[t]()}}function bb(e,t,n,r){if(!(n==null||r==null)){if(typeof e.scale=="function")return e.scale.copy().domain(n).range(r);var i=lU(t);if(i!=null){var o=i.domain(n).range(r);return Gz(o),o}}}var xb=(e,t,n)=>{var r=mb(t);if(!(n!=="auto"&&n!=="linear")){if(t!=null&&t.tickCount&&Array.isArray(r)&&(r[0]==="auto"||r[1]==="auto")&&qs(e))return T9(e,t.tickCount,t.allowDecimals);if(t!=null&&t.tickCount&&t.type==="number"&&qs(e))return M9(e,t.tickCount,t.allowDecimals)}},wb=W([yb,$c,Js],xb),_b=(e,t,n,r)=>{if(r!=="angleAxis"&&e?.type==="number"&&qs(t)&&Array.isArray(n)&&n.length>0){var i=t[0],o=n[0],a=t[1],s=n[n.length-1];return[Math.min(i,o),Math.max(a,s)]}return t},cU=W([jt,yb,wb,bt],_b),uU=W(_p,jt,(e,t)=>{if(!(!t||t.type!=="number")){var n=1/0,r=Array.from(za(e.map(s=>s.value))).sort((s,l)=>s-l);if(r.length<2)return 1/0;var i=r[r.length-1]-r[0];if(i===0)return 1/0;for(var o=0;o<r.length-1;o++){var a=r[o+1]-r[o];n=Math.min(n,a)}return n/i}}),wC=W(uU,Pe,Yk,Ut,(e,t,n,r)=>r,(e,t,n,r,i)=>{if(!pn(e))return 0;var o=t==="vertical"?r.height:r.width;if(i==="gap")return e*o/2;if(i==="no-gap"){var a=On(n,e*o),s=e*o/2;return s-a-(s-a)/o*a}return 0}),dU=(e,t)=>{var n=xi(e,t);return n==null||typeof n.padding!="string"?0:wC(e,"xAxis",t,n.padding)},fU=(e,t)=>{var n=wi(e,t);return n==null||typeof n.padding!="string"?0:wC(e,"yAxis",t,n.padding)},pU=W(xi,dU,(e,t)=>{var n,r;if(e==null)return{left:0,right:0};var{padding:i}=e;return typeof i=="string"?{left:t,right:t}:{left:((n=i.left)!==null&&n!==void 0?n:0)+t,right:((r=i.right)!==null&&r!==void 0?r:0)+t}}),hU=W(wi,fU,(e,t)=>{var n,r;if(e==null)return{top:0,bottom:0};var{padding:i}=e;return typeof i=="string"?{top:t,bottom:t}:{top:((n=i.top)!==null&&n!==void 0?n:0)+t,bottom:((r=i.bottom)!==null&&r!==void 0?r:0)+t}}),mU=W([Ut,pU,zf,Wf,(e,t,n)=>n],(e,t,n,r,i)=>{var{padding:o}=r;return i?[o.left,n.width-o.right]:[e.left+t.left,e.left+e.width-t.right]}),gU=W([Ut,Pe,hU,zf,Wf,(e,t,n)=>n],(e,t,n,r,i,o)=>{var{padding:a}=i;return o?[r.height-a.bottom,a.top]:t==="horizontal"?[e.top+e.height-n.bottom,e.top+n.top]:[e.top+n.top,e.top+e.height-n.bottom]}),Vc=(e,t,n,r)=>{var i;switch(t){case"xAxis":return mU(e,n,r);case"yAxis":return gU(e,n,r);case"zAxis":return(i=lb(e,n))===null||i===void 0?void 0:i.range;case"angleAxis":return Gk(e);case"radiusAxis":return Xk(e,n);default:return}},_C=W([jt,Vc],vp),Yo=W([jt,Js,cU,_C],bb);W([Wc,Sp,bt],dC);function SC(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var Ep=(e,t)=>t,Pp=(e,t,n)=>n,vU=W(Ff,Ep,Pp,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(SC)),yU=W($f,Ep,Pp,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(SC)),OC=(e,t)=>({width:e.width,height:t.height}),bU=(e,t)=>{var n=typeof t.width=="number"?t.width:gc;return{width:n,height:e.height}},EC=W(Ut,xi,OC),xU=(e,t,n)=>{switch(t){case"top":return e.top;case"bottom":return n-e.bottom;default:return 0}},wU=(e,t,n)=>{switch(t){case"left":return e.left;case"right":return n-e.right;default:return 0}},_U=W(Ji,Ut,vU,Ep,Pp,(e,t,n,r,i)=>{var o={},a;return n.forEach(s=>{var l=OC(t,s);a==null&&(a=xU(t,r,e));var c=r==="top"&&!i||r==="bottom"&&i;o[s.id]=a-Number(c)*l.height,a+=(c?-1:1)*l.height}),o}),SU=W(Zi,Ut,yU,Ep,Pp,(e,t,n,r,i)=>{var o={},a;return n.forEach(s=>{var l=bU(t,s);a==null&&(a=wU(t,r,e));var c=r==="left"&&!i||r==="right"&&i;o[s.id]=a-Number(c)*l.width,a+=(c?-1:1)*l.width}),o}),OU=(e,t)=>{var n=xi(e,t);if(n!=null)return _U(e,n.orientation,n.mirror)},EU=W([Ut,xi,OU,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var i=n?.[r];return i==null?{x:e.left,y:0}:{x:e.left,y:i}}}),PU=(e,t)=>{var n=wi(e,t);if(n!=null)return SU(e,n.orientation,n.mirror)},kU=W([Ut,wi,PU,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var i=n?.[r];return i==null?{x:0,y:e.top}:{x:i,y:e.top}}}),PC=W(Ut,wi,(e,t)=>{var n=typeof t.width=="number"?t.width:gc;return{width:n,height:e.height}}),kC=(e,t,n)=>{switch(t){case"xAxis":return EC(e,n).width;case"yAxis":return PC(e,n).height;default:return}},CC=(e,t,n,r)=>{if(n!=null){var{allowDuplicatedCategory:i,type:o,dataKey:a}=n,s=gi(e,r),l=t.map(c=>c.value);if(a&&s&&o==="category"&&i&&FS(l))return l}},Sb=W([Pe,_p,jt,bt],CC),DC=(e,t,n,r)=>{if(!(n==null||n.dataKey==null)){var{type:i,scale:o}=n,a=gi(e,r);if(a&&(i==="number"||o!=="auto"))return t.map(s=>s.value)}},Ob=W([Pe,_p,$c,bt],DC),AC=W([Pe,H9,Js,Yo,Sb,Ob,Vc,wb,bt],(e,t,n,r,i,o,a,s,l)=>{if(t==null)return null;var c=gi(e,l);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:l,categoricalDomain:o,duplicateDomain:i,isCategorical:c,niceTicks:s,range:a,realScaleType:n,scale:r}}),CU=(e,t,n,r,i,o,a,s,l)=>{if(!(t==null||r==null)){var c=gi(e,l),{type:u,ticks:d,tickCount:f}=t,p=n==="scaleBand"&&typeof r.bandwidth=="function"?r.bandwidth()/2:2,m=u==="category"&&r.bandwidth?r.bandwidth()/p:0;m=l==="angleAxis"&&o!=null&&o.length>=2?Jt(o[0]-o[1])*2*m:m;var h=d||i;if(h){var g=h.map((b,S)=>{var w=a?a.indexOf(b):b;return{index:S,coordinate:r(w)+m,value:b,offset:m}});return g.filter(b=>!Sn(b.coordinate))}return c&&s?s.map((b,S)=>({coordinate:r(b)+m,value:b,index:S,offset:m})):r.ticks?r.ticks(f).map(b=>({coordinate:r(b)+m,value:b,offset:m})):r.domain().map((b,S)=>({coordinate:r(b)+m,value:a?a[b]:b,index:S,offset:m}))}},TC=W([Pe,$c,Js,Yo,wb,Vc,Sb,Ob,bt],CU),DU=(e,t,n,r,i,o,a)=>{if(!(t==null||n==null||r==null||r[0]===r[1])){var s=gi(e,a),{tickCount:l}=t,c=0;return c=a==="angleAxis"&&r?.length>=2?Jt(r[0]-r[1])*2*c:c,s&&o?o.map((u,d)=>({coordinate:n(u)+c,value:u,index:d,offset:c})):n.ticks?n.ticks(l).map(u=>({coordinate:n(u)+c,value:u,offset:c})):n.domain().map((u,d)=>({coordinate:n(u)+c,value:i?i[u]:u,index:d,offset:c}))}},_i=W([Pe,$c,Yo,Vc,Sb,Ob,bt],DU),Si=W(jt,Yo,(e,t)=>{if(!(e==null||t==null))return wp(wp({},e),{},{scale:t})}),AU=W([jt,Js,yb,_C],bb);W((e,t,n)=>lb(e,n),AU,(e,t)=>{if(!(e==null||t==null))return wp(wp({},e),{},{scale:t})});var TU=W([Pe,Ff,$f],(e,t,n)=>{switch(e){case"horizontal":return t.some(r=>r.reversed)?"right-to-left":"left-to-right";case"vertical":return n.some(r=>r.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),MC=e=>e.options.defaultTooltipEventType,NC=e=>e.options.validateTooltipEventTypes;function jC(e,t,n){if(e==null)return t;var r=e?"axis":"item";return n==null?t:n.includes(r)?r:t}function Eb(e,t){var n=MC(e),r=NC(e);return jC(t,n,r)}function MU(e){return ce(t=>Eb(t,e))}var IC=(e,t)=>{var n,r=Number(t);if(!(Sn(r)||t==null))return r>=0?e==null||(n=e[r])===null||n===void 0?void 0:n.value:void 0},NU=e=>e.tooltip.settings,Uo={active:!1,index:null,dataKey:void 0,coordinate:void 0},jU={itemInteraction:{click:Uo,hover:Uo},axisInteraction:{click:Uo,hover:Uo},keyboardInteraction:Uo,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},RC=dr({name:"tooltip",initialState:jU,reducers:{addTooltipEntrySettings(e,t){e.tooltipItemPayloads.push(t.payload)},removeTooltipEntrySettings(e,t){var n=Qi(e).tooltipItemPayloads.indexOf(t.payload);n>-1&&e.tooltipItemPayloads.splice(n,1)},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate,e.keyboardInteraction.dataKey=t.payload.activeDataKey}}}),{addTooltipEntrySettings:IU,removeTooltipEntrySettings:RU,setTooltipSettingsState:LU,setActiveMouseOverItemIndex:LC,mouseLeaveItem:FU,mouseLeaveChart:FC,setActiveClickItemIndex:$U,setMouseOverAxisIndex:$C,setMouseClickAxisIndex:BU,setSyncInteraction:Pb,setKeyboardInteraction:kb}=RC.actions,WU=RC.reducer;function BC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function kp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?BC(Object(n),!0).forEach(function(r){zU(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zU(e,t,n){return(t=VU(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VU(e){var t=HU(e,"string");return typeof t=="symbol"?t:t+""}function HU(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function YU(e,t,n){return t==="axis"?n==="click"?e.axisInteraction.click:e.axisInteraction.hover:n==="click"?e.itemInteraction.click:e.itemInteraction.hover}function UU(e){return e.index!=null}var WC=(e,t,n,r)=>{if(t==null)return Uo;var i=YU(e,t,n);if(i==null)return Uo;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var o=e.settings.active===!0;if(UU(i)){if(o)return kp(kp({},i),{},{active:!0})}else if(r!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:r};return kp(kp({},Uo),{},{coordinate:i.coordinate})},Cb=(e,t)=>{var n=e?.index;if(n==null)return null;var r=Number(n);if(!pn(r))return n;var i=0,o=1/0;return t.length>0&&(o=t.length-1),String(Math.max(i,Math.min(r,o)))},zC=(e,t,n,r,i,o,a,s)=>{if(!(o==null||s==null)){var l=a[0],c=l==null?void 0:s(l.positions,o);if(c!=null)return c;var u=i?.[Number(o)];if(u)switch(n){case"horizontal":return{x:u.coordinate,y:(r.top+t)/2};default:return{x:(r.left+e)/2,y:u.coordinate}}}},VC=(e,t,n,r)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var i;return n==="hover"?i=e.itemInteraction.hover.dataKey:i=e.itemInteraction.click.dataKey,i==null&&r!=null?[e.tooltipItemPayloads[0]]:e.tooltipItemPayloads.filter(o=>{var a;return((a=o.settings)===null||a===void 0?void 0:a.dataKey)===i})},Hc=e=>e.options.tooltipPayloadSearcher,el=e=>e.tooltip;function HC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function YC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?HC(Object(n),!0).forEach(function(r){KU(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function KU(e,t,n){return(t=qU(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qU(e){var t=GU(e,"string");return typeof t=="symbol"?t:t+""}function GU(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function XU(e,t){return e??t}var UC=(e,t,n,r,i,o,a)=>{if(!(t==null||o==null)){var{chartData:s,computedData:l,dataStartIndex:c,dataEndIndex:u}=n,d=[];return e.reduce((f,p)=>{var m,{dataDefinedOnItem:h,settings:g}=p,b=XU(h,s),S=Array.isArray(b)?f2(b,c,u):b,w=(m=g?.dataKey)!==null&&m!==void 0?m:r,x=g?.nameKey,_;if(r&&Array.isArray(S)&&!Array.isArray(S[0])&&a==="axis"?_=$S(S,r,i):_=o(S,t,l,x),Array.isArray(_))_.forEach(C=>{var D=YC(YC({},g),{},{name:C.name,unit:C.unit,color:void 0,fill:void 0});f.push(w2({tooltipEntrySettings:D,dataKey:C.dataKey,payload:C.payload,value:rt(C.payload,C.dataKey),name:C.name}))});else{var E;f.push(w2({tooltipEntrySettings:g,dataKey:w,payload:_,value:rt(_,w),name:(E=rt(_,x))!==null&&E!==void 0?E:g?.name}))}return f},d)}},Db=W([nn,Pe,rC,tb,Gt],xC),QU=W([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),ZU=W([Gt,Qs],cb),Yc=W([QU,nn,ZU],ub),JU=W([Yc],e=>e.filter(xp)),eK=W([Yc],db),tl=W([eK,Vo],fb),tK=W([JU,Vo,nn],Jk),Ab=W([tl,nn,Yc],hb),nK=W([nn],mb),rK=W([Yc],e=>e.filter(xp)),iK=W([tK,rK,Lc],lC),oK=W([iK,Vo,Gt],cC),aK=W([Yc],oC),sK=W([tl,nn,aK,Sp,Gt],uC),lK=W([pC,Gt,Qs],Zs),cK=W([lK,Gt],gC),uK=W([hC,Gt,Qs],Zs),dK=W([uK,Gt],vC),fK=W([mC,Gt,Qs],Zs),pK=W([fK,Gt],yC),hK=W([cK,pK,dK],Op),mK=W([nn,nK,oK,sK,hK,Pe,Gt],gb),KC=W([nn,Pe,tl,Ab,Lc,Gt,mK],vb),gK=W([KC,nn,Db],xb),vK=W([nn,KC,gK,Gt],_b),qC=e=>{var t=Gt(e),n=Qs(e),r=!1;return Vc(e,t,n,r)},GC=W([nn,qC],vp),XC=W([nn,Db,vK,GC],bb),yK=W([Pe,Ab,nn,Gt],CC),bK=W([Pe,Ab,nn,Gt],DC),xK=(e,t,n,r,i,o,a,s)=>{if(t){var{type:l}=t,c=gi(e,s);if(r){var u=n==="scaleBand"&&r.bandwidth?r.bandwidth()/2:2,d=l==="category"&&r.bandwidth?r.bandwidth()/u:0;return d=s==="angleAxis"&&i!=null&&i?.length>=2?Jt(i[0]-i[1])*2*d:d,c&&a?a.map((f,p)=>({coordinate:r(f)+d,value:f,index:p,offset:d})):r.domain().map((f,p)=>({coordinate:r(f)+d,value:o?o[f]:f,index:p,offset:d}))}}},co=W([Pe,nn,Db,XC,qC,yK,bK,Gt],xK),Tb=W([MC,NC,NU],(e,t,n)=>jC(n.shared,e,t)),QC=e=>e.tooltip.settings.trigger,Mb=e=>e.tooltip.settings.defaultIndex,Cp=W([el,Tb,QC,Mb],WC),Ko=W([Cp,tl],Cb),ZC=W([co,Ko],IC),JC=W([Cp],e=>{if(e)return e.dataKey}),eD=W([el,Tb,QC,Mb],VC),wK=W([Zi,Ji,Pe,Ut,co,Mb,eD,Hc],zC),_K=W([Cp,wK],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),SK=W([Cp],e=>e.active),OK=W([eD,Ko,Vo,Zk,ZC,Hc,Tb],UC),EK=W([OK],e=>{if(e!=null){var t=e.map(n=>n.payload).filter(n=>n!=null);return Array.from(new Set(t))}});function tD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function nD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tD(Object(n),!0).forEach(function(r){PK(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function PK(e,t,n){return(t=kK(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kK(e){var t=CK(e,"string");return typeof t=="symbol"?t:t+""}function CK(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var DK=()=>ce(nn),AK=()=>{var e=DK(),t=ce(co),n=ce(XC);return Na(nD(nD({},e),{},{scale:n}),t)},rD=()=>ce(tb),Nb=(e,t)=>t,iD=(e,t,n)=>n,jb=(e,t,n,r)=>r,TK=W(co,e=>xf(e,t=>t.coordinate)),Ib=W([el,Nb,iD,jb],WC),oD=W([Ib,tl],Cb),MK=(e,t,n)=>{if(t!=null){var r=el(e);return t==="axis"?n==="hover"?r.axisInteraction.hover.dataKey:r.axisInteraction.click.dataKey:n==="hover"?r.itemInteraction.hover.dataKey:r.itemInteraction.click.dataKey}},aD=W([el,Nb,iD,jb],VC),Dp=W([Zi,Ji,Pe,Ut,co,jb,aD,Hc],zC),NK=W([Ib,Dp],(e,t)=>{var n;return(n=e.coordinate)!==null&&n!==void 0?n:t}),sD=W(co,oD,IC),jK=W([aD,oD,Vo,Zk,sD,Hc,Nb],UC),IK=W([Ib],e=>({isActive:e.active,activeIndex:e.index})),RK=(e,t,n,r,i,o,a,s)=>{if(!(!e||!t||!r||!i||!o)){var l=o7(e.chartX,e.chartY,t,n,s);if(l){var c=s7(l,t),u=Kz(c,a,o,r,i),d=a7(t,o,u,l);return{activeIndex:String(u),activeCoordinate:d}}}};function Rb(){return Rb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rb.apply(null,arguments)}function lD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ap(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lD(Object(n),!0).forEach(function(r){LK(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function LK(e,t,n){return(t=FK(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function FK(e){var t=$K(e,"string");return typeof t=="symbol"?t:t+""}function $K(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function BK(e){var{coordinate:t,payload:n,index:r,offset:i,tooltipAxisBandSize:o,layout:a,cursor:s,tooltipEventType:l,chartName:c}=e,u=t,d=n,f=r;if(!s||!u||c!=="ScatterChart"&&l!=="axis")return null;var p,m;if(c==="ScatterChart")p=u,m=sV;else if(c==="BarChart")p=lV(a,u,i,o),m=eP;else if(a==="radial"){var{cx:h,cy:g,radius:b,startAngle:S,endAngle:w}=tP(u);p={cx:h,cy:g,startAngle:S,endAngle:w,innerRadius:b,outerRadius:b},m=rP}else p={points:WV(a,u,i)},m=$s;var x=typeof s=="object"&&"className"in s?s.className:void 0,_=Ap(Ap(Ap(Ap({stroke:"#ccc",pointerEvents:"none"},i),p),lt(s,!1)),{},{payload:d,payloadIndex:f,className:ie("recharts-tooltip-cursor",x)});return k.isValidElement(s)?k.cloneElement(s,_):k.createElement(m,_)}function WK(e){var t=AK(),n=P2(),r=vc(),i=rD();return O.createElement(BK,Rb({},e,{coordinate:e.coordinate,index:e.index,payload:e.payload,offset:n,layout:r,tooltipAxisBandSize:t,chartName:i}))}var cD=k.createContext(null),zK=()=>k.useContext(cD),Lb={exports:{}},uD;function VK(){return uD||(uD=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(l,c,u){this.fn=l,this.context=c,this.once=u||!1}function o(l,c,u,d,f){if(typeof u!="function")throw new TypeError("The listener must be a function");var p=new i(u,d||l,f),m=n?n+c:c;return l._events[m]?l._events[m].fn?l._events[m]=[l._events[m],p]:l._events[m].push(p):(l._events[m]=p,l._eventsCount++),l}function a(l,c){--l._eventsCount===0?l._events=new r:delete l._events[c]}function s(){this._events=new r,this._eventsCount=0}s.prototype.eventNames=function(){var c=[],u,d;if(this._eventsCount===0)return c;for(d in u=this._events)t.call(u,d)&&c.push(n?d.slice(1):d);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(u)):c},s.prototype.listeners=function(c){var u=n?n+c:c,d=this._events[u];if(!d)return[];if(d.fn)return[d.fn];for(var f=0,p=d.length,m=new Array(p);f<p;f++)m[f]=d[f].fn;return m},s.prototype.listenerCount=function(c){var u=n?n+c:c,d=this._events[u];return d?d.fn?1:d.length:0},s.prototype.emit=function(c,u,d,f,p,m){var h=n?n+c:c;if(!this._events[h])return!1;var g=this._events[h],b=arguments.length,S,w;if(g.fn){switch(g.once&&this.removeListener(c,g.fn,void 0,!0),b){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,u),!0;case 3:return g.fn.call(g.context,u,d),!0;case 4:return g.fn.call(g.context,u,d,f),!0;case 5:return g.fn.call(g.context,u,d,f,p),!0;case 6:return g.fn.call(g.context,u,d,f,p,m),!0}for(w=1,S=new Array(b-1);w<b;w++)S[w-1]=arguments[w];g.fn.apply(g.context,S)}else{var x=g.length,_;for(w=0;w<x;w++)switch(g[w].once&&this.removeListener(c,g[w].fn,void 0,!0),b){case 1:g[w].fn.call(g[w].context);break;case 2:g[w].fn.call(g[w].context,u);break;case 3:g[w].fn.call(g[w].context,u,d);break;case 4:g[w].fn.call(g[w].context,u,d,f);break;default:if(!S)for(_=1,S=new Array(b-1);_<b;_++)S[_-1]=arguments[_];g[w].fn.apply(g[w].context,S)}}return!0},s.prototype.on=function(c,u,d){return o(this,c,u,d,!1)},s.prototype.once=function(c,u,d){return o(this,c,u,d,!0)},s.prototype.removeListener=function(c,u,d,f){var p=n?n+c:c;if(!this._events[p])return this;if(!u)return a(this,p),this;var m=this._events[p];if(m.fn)m.fn===u&&(!f||m.once)&&(!d||m.context===d)&&a(this,p);else{for(var h=0,g=[],b=m.length;h<b;h++)(m[h].fn!==u||f&&!m[h].once||d&&m[h].context!==d)&&g.push(m[h]);g.length?this._events[p]=g.length===1?g[0]:g:a(this,p)}return this},s.prototype.removeAllListeners=function(c){var u;return c?(u=n?n+c:c,this._events[u]&&a(this,u)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s})(Lb)),Lb.exports}var HK=VK();const YK=Ri(HK);var Uc=new YK,Fb="recharts.syncEvent.tooltip",dD="recharts.syncEvent.brush";function Tp(e,t){if(t){var n=Number.parseInt(t,10);if(!Sn(n))return e?.[n]}}var UK={chartName:"",tooltipPayloadSearcher:void 0,eventEmitter:void 0,defaultTooltipEventType:"axis"},fD=dr({name:"options",initialState:UK,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),KK=fD.reducer,{createEventEmitter:qK}=fD.actions;function GK(e){return e.tooltip.syncInteraction}var XK={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},pD=dr({name:"chartData",initialState:XK,reducers:{setChartData(e,t){if(e.chartData=t.payload,t.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var{startIndex:n,endIndex:r}=t.payload;n!=null&&(e.dataStartIndex=n),r!=null&&(e.dataEndIndex=r)}}}),{setChartData:hD,setDataStartEndIndexes:QK,setComputedData:rfe}=pD.actions,ZK=pD.reducer,JK=["x","y"];function mD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Va(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?mD(Object(n),!0).forEach(function(r){eq(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function eq(e,t,n){return(t=tq(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tq(e){var t=nq(e,"string");return typeof t=="symbol"?t:t+""}function nq(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function rq(e,t){if(e==null)return{};var n,r,i=iq(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function iq(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var gD=()=>{};function oq(){var e=ce(nb),t=ce(rb),n=vt(),r=ce(Uk),i=ce(co),o=vc(),a=Vf(),s=ce(l=>l.rootProps.className);k.useEffect(()=>{if(e==null)return gD;var l=(c,u,d)=>{if(t!==d&&e===c){if(r==="index"){var f;if(a&&u!==null&&u!==void 0&&(f=u.payload)!==null&&f!==void 0&&f.coordinate){var p=u.payload.coordinate,{x:m,y:h}=p,g=rq(p,JK),b=Va(Va(Va({},g),typeof m=="number"&&{x:Math.max(a.x,Math.min(m,a.x+a.width))}),typeof h=="number"&&{y:Math.max(a.y,Math.min(h,a.y+a.height))}),S=Va(Va({},u),{},{payload:Va(Va({},u.payload),{},{coordinate:b})});n(S)}else n(u);return}if(i!=null){var w;if(typeof r=="function"){var x={activeTooltipIndex:u.payload.index==null?void 0:Number(u.payload.index),isTooltipActive:u.payload.active,activeIndex:u.payload.index==null?void 0:Number(u.payload.index),activeLabel:u.payload.label,activeDataKey:u.payload.dataKey,activeCoordinate:u.payload.coordinate},_=r(i,x);w=i[_]}else r==="value"&&(w=i.find(N=>String(N.value)===u.payload.label));var{coordinate:E}=u.payload;if(w==null||u.payload.active===!1||E==null||a==null){n(Pb({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0}));return}var{x:C,y:D}=E,T=Math.min(C,a.x+a.width),j=Math.min(D,a.y+a.height),A={x:o==="horizontal"?w.coordinate:T,y:o==="horizontal"?j:w.coordinate},P=Pb({active:u.payload.active,coordinate:A,dataKey:u.payload.dataKey,index:String(w.index),label:u.payload.label});n(P)}}};return Uc.on(Fb,l),()=>{Uc.off(Fb,l)}},[s,n,t,e,r,i,o,a])}function aq(){var e=ce(nb),t=ce(rb),n=vt();k.useEffect(()=>{if(e==null)return gD;var r=(i,o,a)=>{t!==a&&e===i&&n(QK(o))};return Uc.on(dD,r),()=>{Uc.off(dD,r)}},[n,t,e])}function sq(){var e=vt();k.useEffect(()=>{e(qK())},[e]),oq(),aq()}function lq(e,t,n,r,i,o){var a=ce(f=>MK(f,e,t)),s=ce(rb),l=ce(nb),c=ce(Uk),u=ce(GK),d=u?.active;k.useEffect(()=>{if(!d&&l!=null&&s!=null){var f=Pb({active:o,coordinate:n,dataKey:a,index:i,label:typeof r=="number"?String(r):r});Uc.emit(Fb,l,f,s)}},[d,n,a,i,r,s,l,c,o])}function vD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function yD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?vD(Object(n),!0).forEach(function(r){cq(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cq(e,t,n){return(t=uq(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uq(e){var t=dq(e,"string");return typeof t=="symbol"?t:t+""}function dq(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function fq(e){return e.dataKey}function pq(e,t){return O.isValidElement(e)?O.cloneElement(e,t):typeof e=="function"?O.createElement(e,t):O.createElement($7,t)}var bD=[],hq={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,isAnimationActive:!eo.isSsr,itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function Vt(e){var t=Kt(e,hq),{active:n,allowEscapeViewBox:r,animationDuration:i,animationEasing:o,content:a,filterNull:s,isAnimationActive:l,offset:c,payloadUniqBy:u,position:d,reverseDirection:f,useTranslate3d:p,wrapperStyle:m,cursor:h,shared:g,trigger:b,defaultIndex:S,portal:w,axisId:x}=t,_=vt(),E=typeof S=="number"?String(S):S;k.useEffect(()=>{_(LU({shared:g,trigger:b,axisId:x,active:n,defaultIndex:E}))},[_,g,b,x,n,E]);var C=Vf(),D=I2(),T=MU(g),{activeIndex:j,isActive:A}=ce(ee=>IK(ee,T,b,E)),P=ce(ee=>jK(ee,T,b,E)),N=ce(ee=>sD(ee,T,b,E)),M=ce(ee=>NK(ee,T,b,E)),R=P,L=zK(),$=n??A,[V,z]=_E([R,$]),B=T==="axis"?N:void 0;lq(T,b,M,B,j,$);var X=w??L;if(X==null)return null;var q=R??bD;$||(q=bD),s&&q.length&&(q=JO(R.filter(ee=>ee.value!=null&&(ee.hide!==!0||t.includeHidden)),u,fq));var re=q.length>0,J=O.createElement(U7,{allowEscapeViewBox:r,animationDuration:i,animationEasing:o,isAnimationActive:l,active:$,coordinate:M,hasPayload:re,offset:c,position:d,reverseDirection:f,useTranslate3d:p,viewBox:C,wrapperStyle:m,lastBoundingBox:V,innerRef:z,hasPortalFromProps:!!w},pq(a,yD(yD({},t),{},{payload:q,label:B,active:$,coordinate:M,accessibilityLayer:D})));return O.createElement(O.Fragment,null,Ii.createPortal(J,X),$&&O.createElement(WK,{cursor:h,tooltipEventType:T,coordinate:M,payload:R,index:j}))}var $b={},Bb={},Wb={},xD;function mq(){return xD||(xD=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r,{signal:i,edges:o}={}){let a,s=null;const l=o!=null&&o.includes("leading"),c=o==null||o.includes("trailing"),u=()=>{s!==null&&(n.apply(a,s),a=void 0,s=null)},d=()=>{c&&u(),h()};let f=null;const p=()=>{f!=null&&clearTimeout(f),f=setTimeout(()=>{f=null,d()},r)},m=()=>{f!==null&&(clearTimeout(f),f=null)},h=()=>{m(),a=void 0,s=null},g=()=>{u()},b=function(...S){if(i?.aborted)return;a=this,s=S;const w=f==null;p(),l&&w&&u()};return b.schedule=p,b.cancel=h,b.flush=g,i?.addEventListener("abort",h,{once:!0}),b}e.debounce=t})(Wb)),Wb}var wD;function gq(){return wD||(wD=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=mq();function n(r,i=0,o={}){typeof o!="object"&&(o={});const{leading:a=!1,trailing:s=!0,maxWait:l}=o,c=Array(2);a&&(c[0]="leading"),s&&(c[1]="trailing");let u,d=null;const f=t.debounce(function(...h){u=r.apply(this,h),d=null},i,{edges:c}),p=function(...h){return l!=null&&(d===null&&(d=Date.now()),Date.now()-d>=l)?(u=r.apply(this,h),d=Date.now(),f.cancel(),f.schedule(),u):(f.apply(this,h),u)},m=()=>(f.flush(),u);return p.cancel=f.cancel,p.flush=m,p}e.debounce=n})(Bb)),Bb}var _D;function vq(){return _D||(_D=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=gq();function n(r,i=0,o={}){const{leading:a=!0,trailing:s=!0}=o;return t.debounce(r,i,{leading:a,maxWait:i,trailing:s})}e.throttle=n})($b)),$b}var zb,SD;function yq(){return SD||(SD=1,zb=vq().throttle),zb}var bq=yq();const xq=Ri(bq);var wq=process.env.NODE_ENV!=="production",Kc=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];if(wq&&typeof console<"u"&&console.warn&&(n===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(n===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var a=0;console.warn(n.replace(/%s/g,()=>i[a++]))}};function OD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Vb(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?OD(Object(n),!0).forEach(function(r){_q(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _q(e,t,n){return(t=Sq(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sq(e){var t=Oq(e,"string");return typeof t=="symbol"?t:t+""}function Oq(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var It=k.forwardRef((e,t)=>{var{aspect:n,initialDimension:r={width:-1,height:-1},width:i="100%",height:o="100%",minWidth:a=0,minHeight:s,maxHeight:l,children:c,debounce:u=0,id:d,className:f,onResize:p,style:m={}}=e,h=k.useRef(null),g=k.useRef();g.current=p,k.useImperativeHandle(t,()=>h.current);var[b,S]=k.useState({containerWidth:r.width,containerHeight:r.height}),w=k.useCallback((_,E)=>{S(C=>{var D=Math.round(_),T=Math.round(E);return C.containerWidth===D&&C.containerHeight===T?C:{containerWidth:D,containerHeight:T}})},[]);k.useEffect(()=>{var _=T=>{var j,{width:A,height:P}=T[0].contentRect;w(A,P),(j=g.current)===null||j===void 0||j.call(g,A,P)};u>0&&(_=xq(_,u,{trailing:!0,leading:!1}));var E=new ResizeObserver(_),{width:C,height:D}=h.current.getBoundingClientRect();return w(C,D),E.observe(h.current),()=>{E.disconnect()}},[w,u]);var x=k.useMemo(()=>{var{containerWidth:_,containerHeight:E}=b;if(_<0||E<0)return null;Kc(Ea(i)||Ea(o),`The width(%s) and height(%s) are both fixed numbers,
|
|
204
204
|
maybe you don't need to use a ResponsiveContainer.`,i,o),Kc(!n||n>0,"The aspect(%s) must be greater than zero.",n);var C=Ea(i)?_:i,D=Ea(o)?E:o;return n&&n>0&&(C?D=C/n:D&&(C=D*n),l&&D>l&&(D=l)),Kc(C>0||D>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
|
205
205
|
please check the style of container, or the props width(%s) and height(%s),
|
|
206
206
|
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
|
|
207
|
-
height and width.`,C,D,i,o,a,s,n),O.Children.map(c,T=>k.cloneElement(T,{width:C,height:D,style:Vb({width:C,height:D},T.props.style)}))},[n,c,o,l,s,a,b,i]);return O.createElement("div",{id:d?"".concat(d):void 0,className:ie("recharts-responsive-container",f),style:Vb(Vb({},m),{},{width:i,height:o,minWidth:a,minHeight:s,maxHeight:l}),ref:h},O.createElement("div",{style:{width:0,height:0,overflow:"visible"}},x))}),Vt=e=>null;Vt.displayName="Cell";function Eq(e,t,n){return(t=Pq(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pq(e){var t=kq(e,"string");return typeof t=="symbol"?t:t+""}function kq(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class Cq{constructor(t){Eq(this,"cache",new Map),this.maxSize=t}get(t){var n=this.cache.get(t);return n!==void 0&&(this.cache.delete(t),this.cache.set(t,n)),n}set(t,n){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var r=this.cache.keys().next().value;this.cache.delete(r)}this.cache.set(t,n)}clear(){this.cache.clear()}size(){return this.cache.size}}function ED(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Dq(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ED(Object(n),!0).forEach(function(r){Aq(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ED(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Aq(e,t,n){return(t=Tq(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tq(e){var t=Mq(e,"string");return typeof t=="symbol"?t:t+""}function Mq(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Nq={cacheSize:2e3,enableCache:!0},PD=Dq({},Nq),kD=new Cq(PD.cacheSize),jq={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},CD="recharts_measurement_span";function Iq(e,t){var n=t.fontSize||"",r=t.fontFamily||"",i=t.fontWeight||"",o=t.fontStyle||"",a=t.letterSpacing||"",s=t.textTransform||"";return"".concat(e,"|").concat(n,"|").concat(r,"|").concat(i,"|").concat(o,"|").concat(a,"|").concat(s)}var DD=(e,t)=>{try{var n=document.getElementById(CD);n||(n=document.createElement("span"),n.setAttribute("id",CD),n.setAttribute("aria-hidden","true"),document.body.appendChild(n)),Object.assign(n.style,jq,t),n.textContent="".concat(e);var r=n.getBoundingClientRect();return{width:r.width,height:r.height}}catch{return{width:0,height:0}}},qc=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||eo.isSsr)return{width:0,height:0};if(!PD.enableCache)return DD(t,n);var r=Iq(t,n),i=kD.get(r);if(i)return i;var o=DD(t,n);return kD.set(r,o),o},AD=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,TD=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Rq=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,Lq=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,MD={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},Fq=Object.keys(MD),nl="NaN";function $q(e,t){return e*MD[t]}class qn{static parse(t){var n,[,r,i]=(n=Lq.exec(t))!==null&&n!==void 0?n:[];return new qn(parseFloat(r),i??"")}constructor(t,n){this.num=t,this.unit=n,this.num=t,this.unit=n,Sn(t)&&(this.unit=""),n!==""&&!Rq.test(n)&&(this.num=NaN,this.unit=""),Fq.includes(n)&&(this.num=$q(t,n),this.unit="px")}add(t){return this.unit!==t.unit?new qn(NaN,""):new qn(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new qn(NaN,""):new qn(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new qn(NaN,""):new qn(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new qn(NaN,""):new qn(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return Sn(this.num)}}function ND(e){if(e.includes(nl))return nl;for(var t=e;t.includes("*")||t.includes("/");){var n,[,r,i,o]=(n=AD.exec(t))!==null&&n!==void 0?n:[],a=qn.parse(r??""),s=qn.parse(o??""),l=i==="*"?a.multiply(s):a.divide(s);if(l.isNaN())return nl;t=t.replace(AD,l.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var c,[,u,d,f]=(c=TD.exec(t))!==null&&c!==void 0?c:[],p=qn.parse(u??""),m=qn.parse(f??""),h=d==="+"?p.add(m):p.subtract(m);if(h.isNaN())return nl;t=t.replace(TD,h.toString())}return t}var jD=/\(([^()]*)\)/;function Bq(e){for(var t=e,n;(n=jD.exec(t))!=null;){var[,r]=n;t=t.replace(jD,ND(r))}return t}function Wq(e){var t=e.replace(/\s+/g,"");return t=Bq(t),t=ND(t),t}function zq(e){try{return Wq(e)}catch{return nl}}function Hb(e){var t=zq(e.slice(5,-1));return t===nl?"":t}var Vq=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],Hq=["dx","dy","angle","className","breakAll"];function Yb(){return Yb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yb.apply(null,arguments)}function ID(e,t){if(e==null)return{};var n,r,i=Yq(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Yq(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var RD=/[ \f\n\r\t\v\u2028\u2029]+/,LD=e=>{var{children:t,breakAll:n,style:r}=e;try{var i=[];ft(t)||(n?i=t.toString().split(""):i=t.toString().split(RD));var o=i.map(s=>({word:s,width:qc(s,r).width})),a=n?0:qc(" ",r).width;return{wordsWithComputedWidth:o,spaceWidth:a}}catch{return null}},Uq=(e,t,n,r,i)=>{var{maxLines:o,children:a,style:s,breakAll:l}=e,c=he(o),u=a,d=function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return A.reduce((P,N)=>{var{word:M,width:R}=N,L=P[P.length-1];if(L&&(r==null||i||L.width+R+n<Number(r)))L.words.push(M),L.width+=R+n;else{var $={words:[M],width:R};P.push($)}return P},[])},f=d(t),p=j=>j.reduce((A,P)=>A.width>P.width?A:P);if(!c||i)return f;var m=f.length>o||p(f).width>Number(r);if(!m)return f;for(var h="…",g=j=>{var A=u.slice(0,j),P=LD({breakAll:l,style:s,children:A+h}).wordsWithComputedWidth,N=d(P),M=N.length>o||p(N).width>Number(r);return[M,N]},b=0,S=u.length-1,w=0,x;b<=S&&w<=u.length-1;){var _=Math.floor((b+S)/2),E=_-1,[C,D]=g(E),[T]=g(_);if(!C&&!T&&(b=_+1),C&&T&&(S=_-1),!C&&T){x=D;break}w++}return x||f},FD=e=>{var t=ft(e)?[]:e.toString().split(RD);return[{words:t}]},Kq=e=>{var{width:t,scaleToFit:n,children:r,style:i,breakAll:o,maxLines:a}=e;if((t||n)&&!eo.isSsr){var s,l,c=LD({breakAll:o,children:r,style:i});if(c){var{wordsWithComputedWidth:u,spaceWidth:d}=c;s=u,l=d}else return FD(r);return Uq({breakAll:o,children:r,maxLines:a,style:i},s,l,t,n)}return FD(r)},$D="#808080",Mp=k.forwardRef((e,t)=>{var{x:n=0,y:r=0,lineHeight:i="1em",capHeight:o="0.71em",scaleToFit:a=!1,textAnchor:s="start",verticalAnchor:l="end",fill:c=$D}=e,u=ID(e,Vq),d=k.useMemo(()=>Kq({breakAll:u.breakAll,children:u.children,maxLines:u.maxLines,scaleToFit:a,style:u.style,width:u.width}),[u.breakAll,u.children,u.maxLines,a,u.style,u.width]),{dx:f,dy:p,angle:m,className:h,breakAll:g}=u,b=ID(u,Hq);if(!Pr(n)||!Pr(r)||d.length===0)return null;var S=n+(he(f)?f:0),w=r+(he(p)?p:0),x;switch(l){case"start":x=Hb("calc(".concat(o,")"));break;case"middle":x=Hb("calc(".concat((d.length-1)/2," * -").concat(i," + (").concat(o," / 2))"));break;default:x=Hb("calc(".concat(d.length-1," * -").concat(i,")"));break}var _=[];if(a){var E=d[0].width,{width:C}=u;_.push("scale(".concat(he(C)?C/E:1,")"))}return m&&_.push("rotate(".concat(m,", ").concat(S,", ").concat(w,")")),_.length&&(b.transform=_.join(" ")),O.createElement("text",Yb({},lt(b,!0),{ref:t,x:S,y:w,className:ie("recharts-text",h),textAnchor:s,fill:c.includes("url")?$D:c}),d.map((D,T)=>{var j=D.words.join(g?"":" ");return O.createElement("tspan",{x:S,dy:T===0?x:i,key:"".concat(j,"-").concat(T)},j)}))});Mp.displayName="Text";var qq=["labelRef"];function Gq(e,t){if(e==null)return{};var n,r,i=Xq(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Xq(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function BD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Rt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?BD(Object(n),!0).forEach(function(r){Qq(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Qq(e,t,n){return(t=Zq(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zq(e){var t=Jq(e,"string");return typeof t=="symbol"?t:t+""}function Jq(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function uo(){return uo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uo.apply(null,arguments)}var WD=k.createContext(null),zD=e=>{var{x:t,y:n,width:r,height:i,children:o}=e,a=k.useMemo(()=>({x:t,y:n,width:r,height:i}),[t,n,r,i]);return O.createElement(WD.Provider,{value:a},o)},VD=()=>{var e=k.useContext(WD),t=Vf();return e||t},eG=k.createContext(null),tG=()=>{var e=k.useContext(eG),t=ce(Qk);return e||t},nG=e=>{var{value:t,formatter:n}=e,r=ft(e.children)?t:e.children;return typeof n=="function"?n(r):r},Ub=e=>e!=null&&typeof e=="function",rG=(e,t)=>{var n=Zt(t-e),r=Math.min(Math.abs(t-e),360);return n*r},iG=(e,t,n,r,i)=>{var{offset:o,className:a}=e,{cx:s,cy:l,innerRadius:c,outerRadius:u,startAngle:d,endAngle:f,clockWise:p}=i,m=(c+u)/2,h=rG(d,f),g=h>=0?1:-1,b,S;switch(t){case"insideStart":b=d+g*o,S=p;break;case"insideEnd":b=f-g*o,S=!p;break;case"end":b=f+g*o,S=p;break;default:throw new Error("Unsupported position ".concat(t))}S=h<=0?S:!S;var w=Wt(s,l,m,b),x=Wt(s,l,m,b+(S?1:-1)*359),_="M".concat(w.x,",").concat(w.y,`
|
|
207
|
+
height and width.`,C,D,i,o,a,s,n),O.Children.map(c,T=>k.cloneElement(T,{width:C,height:D,style:Vb({width:C,height:D},T.props.style)}))},[n,c,o,l,s,a,b,i]);return O.createElement("div",{id:d?"".concat(d):void 0,className:ie("recharts-responsive-container",f),style:Vb(Vb({},m),{},{width:i,height:o,minWidth:a,minHeight:s,maxHeight:l}),ref:h},O.createElement("div",{style:{width:0,height:0,overflow:"visible"}},x))}),Ht=e=>null;Ht.displayName="Cell";function Eq(e,t,n){return(t=Pq(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pq(e){var t=kq(e,"string");return typeof t=="symbol"?t:t+""}function kq(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class Cq{constructor(t){Eq(this,"cache",new Map),this.maxSize=t}get(t){var n=this.cache.get(t);return n!==void 0&&(this.cache.delete(t),this.cache.set(t,n)),n}set(t,n){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var r=this.cache.keys().next().value;this.cache.delete(r)}this.cache.set(t,n)}clear(){this.cache.clear()}size(){return this.cache.size}}function ED(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Dq(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ED(Object(n),!0).forEach(function(r){Aq(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ED(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Aq(e,t,n){return(t=Tq(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tq(e){var t=Mq(e,"string");return typeof t=="symbol"?t:t+""}function Mq(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Nq={cacheSize:2e3,enableCache:!0},PD=Dq({},Nq),kD=new Cq(PD.cacheSize),jq={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},CD="recharts_measurement_span";function Iq(e,t){var n=t.fontSize||"",r=t.fontFamily||"",i=t.fontWeight||"",o=t.fontStyle||"",a=t.letterSpacing||"",s=t.textTransform||"";return"".concat(e,"|").concat(n,"|").concat(r,"|").concat(i,"|").concat(o,"|").concat(a,"|").concat(s)}var DD=(e,t)=>{try{var n=document.getElementById(CD);n||(n=document.createElement("span"),n.setAttribute("id",CD),n.setAttribute("aria-hidden","true"),document.body.appendChild(n)),Object.assign(n.style,jq,t),n.textContent="".concat(e);var r=n.getBoundingClientRect();return{width:r.width,height:r.height}}catch{return{width:0,height:0}}},qc=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||eo.isSsr)return{width:0,height:0};if(!PD.enableCache)return DD(t,n);var r=Iq(t,n),i=kD.get(r);if(i)return i;var o=DD(t,n);return kD.set(r,o),o},AD=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,TD=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Rq=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,Lq=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,MD={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},Fq=Object.keys(MD),nl="NaN";function $q(e,t){return e*MD[t]}class qn{static parse(t){var n,[,r,i]=(n=Lq.exec(t))!==null&&n!==void 0?n:[];return new qn(parseFloat(r),i??"")}constructor(t,n){this.num=t,this.unit=n,this.num=t,this.unit=n,Sn(t)&&(this.unit=""),n!==""&&!Rq.test(n)&&(this.num=NaN,this.unit=""),Fq.includes(n)&&(this.num=$q(t,n),this.unit="px")}add(t){return this.unit!==t.unit?new qn(NaN,""):new qn(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new qn(NaN,""):new qn(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new qn(NaN,""):new qn(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new qn(NaN,""):new qn(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return Sn(this.num)}}function ND(e){if(e.includes(nl))return nl;for(var t=e;t.includes("*")||t.includes("/");){var n,[,r,i,o]=(n=AD.exec(t))!==null&&n!==void 0?n:[],a=qn.parse(r??""),s=qn.parse(o??""),l=i==="*"?a.multiply(s):a.divide(s);if(l.isNaN())return nl;t=t.replace(AD,l.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var c,[,u,d,f]=(c=TD.exec(t))!==null&&c!==void 0?c:[],p=qn.parse(u??""),m=qn.parse(f??""),h=d==="+"?p.add(m):p.subtract(m);if(h.isNaN())return nl;t=t.replace(TD,h.toString())}return t}var jD=/\(([^()]*)\)/;function Bq(e){for(var t=e,n;(n=jD.exec(t))!=null;){var[,r]=n;t=t.replace(jD,ND(r))}return t}function Wq(e){var t=e.replace(/\s+/g,"");return t=Bq(t),t=ND(t),t}function zq(e){try{return Wq(e)}catch{return nl}}function Hb(e){var t=zq(e.slice(5,-1));return t===nl?"":t}var Vq=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],Hq=["dx","dy","angle","className","breakAll"];function Yb(){return Yb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yb.apply(null,arguments)}function ID(e,t){if(e==null)return{};var n,r,i=Yq(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Yq(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var RD=/[ \f\n\r\t\v\u2028\u2029]+/,LD=e=>{var{children:t,breakAll:n,style:r}=e;try{var i=[];ft(t)||(n?i=t.toString().split(""):i=t.toString().split(RD));var o=i.map(s=>({word:s,width:qc(s,r).width})),a=n?0:qc(" ",r).width;return{wordsWithComputedWidth:o,spaceWidth:a}}catch{return null}},Uq=(e,t,n,r,i)=>{var{maxLines:o,children:a,style:s,breakAll:l}=e,c=he(o),u=a,d=function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return A.reduce((P,N)=>{var{word:M,width:R}=N,L=P[P.length-1];if(L&&(r==null||i||L.width+R+n<Number(r)))L.words.push(M),L.width+=R+n;else{var $={words:[M],width:R};P.push($)}return P},[])},f=d(t),p=j=>j.reduce((A,P)=>A.width>P.width?A:P);if(!c||i)return f;var m=f.length>o||p(f).width>Number(r);if(!m)return f;for(var h="…",g=j=>{var A=u.slice(0,j),P=LD({breakAll:l,style:s,children:A+h}).wordsWithComputedWidth,N=d(P),M=N.length>o||p(N).width>Number(r);return[M,N]},b=0,S=u.length-1,w=0,x;b<=S&&w<=u.length-1;){var _=Math.floor((b+S)/2),E=_-1,[C,D]=g(E),[T]=g(_);if(!C&&!T&&(b=_+1),C&&T&&(S=_-1),!C&&T){x=D;break}w++}return x||f},FD=e=>{var t=ft(e)?[]:e.toString().split(RD);return[{words:t}]},Kq=e=>{var{width:t,scaleToFit:n,children:r,style:i,breakAll:o,maxLines:a}=e;if((t||n)&&!eo.isSsr){var s,l,c=LD({breakAll:o,children:r,style:i});if(c){var{wordsWithComputedWidth:u,spaceWidth:d}=c;s=u,l=d}else return FD(r);return Uq({breakAll:o,children:r,maxLines:a,style:i},s,l,t,n)}return FD(r)},$D="#808080",Mp=k.forwardRef((e,t)=>{var{x:n=0,y:r=0,lineHeight:i="1em",capHeight:o="0.71em",scaleToFit:a=!1,textAnchor:s="start",verticalAnchor:l="end",fill:c=$D}=e,u=ID(e,Vq),d=k.useMemo(()=>Kq({breakAll:u.breakAll,children:u.children,maxLines:u.maxLines,scaleToFit:a,style:u.style,width:u.width}),[u.breakAll,u.children,u.maxLines,a,u.style,u.width]),{dx:f,dy:p,angle:m,className:h,breakAll:g}=u,b=ID(u,Hq);if(!Pr(n)||!Pr(r)||d.length===0)return null;var S=n+(he(f)?f:0),w=r+(he(p)?p:0),x;switch(l){case"start":x=Hb("calc(".concat(o,")"));break;case"middle":x=Hb("calc(".concat((d.length-1)/2," * -").concat(i," + (").concat(o," / 2))"));break;default:x=Hb("calc(".concat(d.length-1," * -").concat(i,")"));break}var _=[];if(a){var E=d[0].width,{width:C}=u;_.push("scale(".concat(he(C)?C/E:1,")"))}return m&&_.push("rotate(".concat(m,", ").concat(S,", ").concat(w,")")),_.length&&(b.transform=_.join(" ")),O.createElement("text",Yb({},lt(b,!0),{ref:t,x:S,y:w,className:ie("recharts-text",h),textAnchor:s,fill:c.includes("url")?$D:c}),d.map((D,T)=>{var j=D.words.join(g?"":" ");return O.createElement("tspan",{x:S,dy:T===0?x:i,key:"".concat(j,"-").concat(T)},j)}))});Mp.displayName="Text";var qq=["labelRef"];function Gq(e,t){if(e==null)return{};var n,r,i=Xq(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Xq(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function BD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Rt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?BD(Object(n),!0).forEach(function(r){Qq(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Qq(e,t,n){return(t=Zq(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zq(e){var t=Jq(e,"string");return typeof t=="symbol"?t:t+""}function Jq(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function uo(){return uo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uo.apply(null,arguments)}var WD=k.createContext(null),zD=e=>{var{x:t,y:n,width:r,height:i,children:o}=e,a=k.useMemo(()=>({x:t,y:n,width:r,height:i}),[t,n,r,i]);return O.createElement(WD.Provider,{value:a},o)},VD=()=>{var e=k.useContext(WD),t=Vf();return e||t},eG=k.createContext(null),tG=()=>{var e=k.useContext(eG),t=ce(Qk);return e||t},nG=e=>{var{value:t,formatter:n}=e,r=ft(e.children)?t:e.children;return typeof n=="function"?n(r):r},Ub=e=>e!=null&&typeof e=="function",rG=(e,t)=>{var n=Jt(t-e),r=Math.min(Math.abs(t-e),360);return n*r},iG=(e,t,n,r,i)=>{var{offset:o,className:a}=e,{cx:s,cy:l,innerRadius:c,outerRadius:u,startAngle:d,endAngle:f,clockWise:p}=i,m=(c+u)/2,h=rG(d,f),g=h>=0?1:-1,b,S;switch(t){case"insideStart":b=d+g*o,S=p;break;case"insideEnd":b=f-g*o,S=!p;break;case"end":b=f+g*o,S=p;break;default:throw new Error("Unsupported position ".concat(t))}S=h<=0?S:!S;var w=Wt(s,l,m,b),x=Wt(s,l,m,b+(S?1:-1)*359),_="M".concat(w.x,",").concat(w.y,`
|
|
208
208
|
A`).concat(m,",").concat(m,",0,1,").concat(S?0:1,`,
|
|
209
|
-
`).concat(x.x,",").concat(x.y),E=ft(e.id)?sc("recharts-radial-line-"):e.id;return O.createElement("text",uo({},r,{dominantBaseline:"central",className:ie("recharts-radial-bar-label",a)}),O.createElement("defs",null,O.createElement("path",{id:E,d:_})),O.createElement("textPath",{xlinkHref:"#".concat(E)},n))},oG=(e,t,n)=>{var{cx:r,cy:i,innerRadius:o,outerRadius:a,startAngle:s,endAngle:l}=e,c=(s+l)/2;if(n==="outside"){var{x:u,y:d}=Wt(r,i,a+t,c);return{x:u,y:d,textAnchor:u>=r?"start":"end",verticalAnchor:"middle"}}if(n==="center")return{x:r,y:i,textAnchor:"middle",verticalAnchor:"middle"};if(n==="centerTop")return{x:r,y:i,textAnchor:"middle",verticalAnchor:"start"};if(n==="centerBottom")return{x:r,y:i,textAnchor:"middle",verticalAnchor:"end"};var f=(o+a)/2,{x:p,y:m}=Wt(r,i,f,c);return{x:p,y:m,textAnchor:"middle",verticalAnchor:"middle"}},HD=e=>"cx"in e&&he(e.cx),aG=(e,t)=>{var{parentViewBox:n,offset:r,position:i}=e,o;n!=null&&!HD(n)&&(o=n);var{x:a,y:s,width:l,height:c}=t,u=c>=0?1:-1,d=u*r,f=u>0?"end":"start",p=u>0?"start":"end",m=l>=0?1:-1,h=m*r,g=m>0?"end":"start",b=m>0?"start":"end";if(i==="top"){var S={x:a+l/2,y:s-u*r,textAnchor:"middle",verticalAnchor:f};return Rt(Rt({},S),o?{height:Math.max(s-o.y,0),width:l}:{})}if(i==="bottom"){var w={x:a+l/2,y:s+c+d,textAnchor:"middle",verticalAnchor:p};return Rt(Rt({},w),o?{height:Math.max(o.y+o.height-(s+c),0),width:l}:{})}if(i==="left"){var x={x:a-h,y:s+c/2,textAnchor:g,verticalAnchor:"middle"};return Rt(Rt({},x),o?{width:Math.max(x.x-o.x,0),height:c}:{})}if(i==="right"){var _={x:a+l+h,y:s+c/2,textAnchor:b,verticalAnchor:"middle"};return Rt(Rt({},_),o?{width:Math.max(o.x+o.width-_.x,0),height:c}:{})}var E=o?{width:l,height:c}:{};return i==="insideLeft"?Rt({x:a+h,y:s+c/2,textAnchor:b,verticalAnchor:"middle"},E):i==="insideRight"?Rt({x:a+l-h,y:s+c/2,textAnchor:g,verticalAnchor:"middle"},E):i==="insideTop"?Rt({x:a+l/2,y:s+d,textAnchor:"middle",verticalAnchor:p},E):i==="insideBottom"?Rt({x:a+l/2,y:s+c-d,textAnchor:"middle",verticalAnchor:f},E):i==="insideTopLeft"?Rt({x:a+h,y:s+d,textAnchor:b,verticalAnchor:p},E):i==="insideTopRight"?Rt({x:a+l-h,y:s+d,textAnchor:g,verticalAnchor:p},E):i==="insideBottomLeft"?Rt({x:a+h,y:s+c-d,textAnchor:b,verticalAnchor:f},E):i==="insideBottomRight"?Rt({x:a+l-h,y:s+c-d,textAnchor:g,verticalAnchor:f},E):i&&typeof i=="object"&&(he(i.x)||Ea(i.x))&&(he(i.y)||Ea(i.y))?Rt({x:a+On(i.x,l),y:s+On(i.y,c),textAnchor:"end",verticalAnchor:"end"},E):Rt({x:a+l/2,y:s+c/2,textAnchor:"middle",verticalAnchor:"middle"},E)},sG={offset:5};function qo(e){var t=Ut(e,sG),{viewBox:n,position:r,value:i,children:o,content:a,className:s="",textBreakAll:l,labelRef:c}=t,u=tG(),d=VD(),f=r==="center"?d:u??d,p=n||f;if(!p||ft(i)&&ft(o)&&!k.isValidElement(a)&&typeof a!="function")return null;var m=Rt(Rt({},t),{},{viewBox:p});if(k.isValidElement(a)){var{labelRef:h}=m,g=Gq(m,qq);return k.cloneElement(a,g)}var b;if(typeof a=="function"){if(b=k.createElement(a,m),k.isValidElement(b))return b}else b=nG(t);var S=HD(p),w=lt(t,!0);if(S&&(r==="insideStart"||r==="insideEnd"||r==="end"))return iG(t,r,b,w,p);var x=S?oG(p,t.offset,t.position):aG(t,p);return O.createElement(Mp,uo({ref:c,className:ie("recharts-label",s)},w,x,{breakAll:l}),b)}qo.displayName="Label";var lG=(e,t,n)=>{if(!e)return null;var r={viewBox:t,labelRef:n};return e===!0?O.createElement(qo,uo({key:"label-implicit"},r)):Pr(e)?O.createElement(qo,uo({key:"label-implicit",value:e},r)):k.isValidElement(e)?e.type===qo?k.cloneElement(e,Rt({key:"label-implicit"},r)):O.createElement(qo,uo({key:"label-implicit",content:e},r)):Ub(e)?O.createElement(qo,uo({key:"label-implicit",content:e},r)):e&&typeof e=="object"?O.createElement(qo,uo({},e,{key:"label-implicit"},r)):null};function YD(e){var{label:t}=e,n=VD();return lG(t,n)||null}var Kb={},qb={},UD;function cG(){return UD||(UD=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n[n.length-1]}e.last=t})(qb)),qb}var Gb={},KD;function uG(){return KD||(KD=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Array.isArray(n)?n:Array.from(n)}e.toArray=t})(Gb)),Gb}var qD;function dG(){return qD||(qD=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=cG(),n=uG(),r=Gg();function i(o){if(r.isArrayLike(o))return t.last(n.toArray(o))}e.last=i})(Kb)),Kb}var Xb,GD;function fG(){return GD||(GD=1,Xb=dG().last),Xb}var pG=fG();const hG=Ri(pG);var mG=["valueAccessor"],gG=["dataKey","clockWise","id","textBreakAll"];function Np(){return Np=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Np.apply(null,arguments)}function XD(e,t){if(e==null)return{};var n,r,i=vG(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function vG(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var yG=e=>Array.isArray(e.value)?hG(e.value):e.value,QD=k.createContext(void 0),Qb=QD.Provider,ZD=k.createContext(void 0),bG=ZD.Provider;function xG(){return k.useContext(QD)}function wG(){return k.useContext(ZD)}function jp(e){var{valueAccessor:t=yG}=e,n=XD(e,mG),{dataKey:r,clockWise:i,id:o,textBreakAll:a}=n,s=XD(n,gG),l=xG(),c=wG(),u=l||c;return!u||!u.length?null:O.createElement(Ot,{className:"recharts-label-list"},u.map((d,f)=>{var p,m=ft(r)?t(d,f):rt(d&&d.payload,r),h=ft(o)?{}:{id:"".concat(o,"-").concat(f)};return O.createElement(qo,Np({},lt(d,!0),s,h,{fill:(p=n.fill)!==null&&p!==void 0?p:d.fill,parentViewBox:d.parentViewBox,value:m,textBreakAll:a,viewBox:d.viewBox,key:"label-".concat(f),index:f}))}))}jp.displayName="LabelList";function Ip(e){var{label:t}=e;return t?t===!0?O.createElement(jp,{key:"labelList-implicit"}):O.isValidElement(t)||Ub(t)?O.createElement(jp,{key:"labelList-implicit",content:t}):typeof t=="object"?O.createElement(jp,Np({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function Zb(){return Zb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zb.apply(null,arguments)}var Jb=e=>{var{cx:t,cy:n,r,className:i}=e,o=ie("recharts-dot",i);return t===+t&&n===+n&&r===+r?O.createElement("circle",Zb({},kr(e),Sg(e),{className:o,cx:t,cy:n,r})):null},JD=e=>e.graphicalItems.polarItems,_G=W([bt,Fc],cb),e0=W([JD,jt,_G],ub),SG=W([e0],db),t0=W([SG,Gy],fb),OG=W([t0,jt,e0],hb),EG=W([t0,jt,e0],(e,t,n)=>n.length>0?e.flatMap(r=>n.flatMap(i=>{var o,a=rt(r,(o=t.dataKey)!==null&&o!==void 0?o:i.dataKey);return{value:a,errorDomain:[]}})).filter(Boolean):t?.dataKey!=null?e.map(r=>({value:rt(r,t.dataKey),errorDomain:[]})):e.map(r=>({value:r,errorDomain:[]}))),eA=()=>{},PG=W([jt,bC,eA,EG,eA,Pe,bt],gb),tA=W([jt,Pe,t0,OG,Lc,bt,PG],vb),kG=W([tA,jt,Js],xb);W([jt,tA,kG,bt],_b);var CG={radiusAxis:{},angleAxis:{}},nA=dr({name:"polarAxis",initialState:CG,reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),{addRadiusAxis:ife,removeRadiusAxis:ofe,addAngleAxis:afe,removeAngleAxis:sfe}=nA.actions,DG=nA.reducer;function rA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function iA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rA(Object(n),!0).forEach(function(r){AG(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function AG(e,t,n){return(t=TG(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TG(e){var t=MG(e,"string");return typeof t=="symbol"?t:t+""}function MG(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var NG=(e,t)=>t,n0=W([JD,NG],(e,t)=>e.filter(n=>n.type==="pie").find(n=>n.id===t)),jG=[],r0=(e,t,n)=>n?.length===0?jG:n,oA=W([Gy,n0,r0],(e,t,n)=>{var{chartData:r}=e;if(t!=null){var i;if(t?.data!=null&&t.data.length>0?i=t.data:i=r,(!i||!i.length)&&n!=null&&(i=n.map(o=>iA(iA({},t.presentationProps),o.props))),i!=null)return i}}),IG=W([oA,n0,r0],(e,t,n)=>{if(!(e==null||t==null))return e.map((r,i)=>{var o,a=rt(r,t.nameKey,t.name),s;return n!=null&&(o=n[i])!==null&&o!==void 0&&(o=o.props)!==null&&o!==void 0&&o.fill?s=n[i].props.fill:typeof r=="object"&&r!=null&&"fill"in r?s=r.fill:s=t.fill,{value:$o(a,t.dataKey),color:s,payload:r,type:t.legendType}})}),RG=W([oA,n0,r0,Yt],(e,t,n,r)=>{if(!(t==null||e==null))return NX({offset:r,pieSettings:t,displayedData:e,cells:n})}),i0={},aA;function LG(){return aA||(aA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){if(typeof n!="object"||n==null)return!1;if(Object.getPrototypeOf(n)===null)return!0;if(Object.prototype.toString.call(n)!=="[object Object]"){const i=n[Symbol.toStringTag];return i==null||!Object.getOwnPropertyDescriptor(n,Symbol.toStringTag)?.writable?!1:n.toString()===`[object ${i}]`}let r=n;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(n)===r}e.isPlainObject=t})(i0)),i0}var o0,sA;function FG(){return sA||(sA=1,o0=LG().isPlainObject),o0}var $G=FG();const BG=Ri($G);function lA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function cA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lA(Object(n),!0).forEach(function(r){WG(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function WG(e,t,n){return(t=zG(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zG(e){var t=VG(e,"string");return typeof t=="symbol"?t:t+""}function VG(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Rp(){return Rp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rp.apply(null,arguments)}var uA=(e,t,n,r,i)=>{var o=n-r,a;return a="M ".concat(e,",").concat(t),a+="L ".concat(e+n,",").concat(t),a+="L ".concat(e+n-o/2,",").concat(t+i),a+="L ".concat(e+n-o/2-r,",").concat(t+i),a+="L ".concat(e,",").concat(t," Z"),a},HG={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},YG=e=>{var t=Ut(e,HG),{x:n,y:r,upperWidth:i,lowerWidth:o,height:a,className:s}=t,{animationEasing:l,animationDuration:c,animationBegin:u,isUpdateAnimationActive:d}=t,f=k.useRef(),[p,m]=k.useState(-1),h=k.useRef(i),g=k.useRef(o),b=k.useRef(a),S=k.useRef(n),w=k.useRef(r),x=Ws(e,"trapezoid-");if(k.useEffect(()=>{if(f.current&&f.current.getTotalLength)try{var M=f.current.getTotalLength();M&&m(M)}catch{}},[]),n!==+n||r!==+r||i!==+i||o!==+o||a!==+a||i===0&&o===0||a===0)return null;var _=ie("recharts-trapezoid",s);if(!d)return O.createElement("g",null,O.createElement("path",Rp({},lt(t,!0),{className:_,d:uA(n,r,i,o,a)})));var E=h.current,C=g.current,D=b.current,T=S.current,j=w.current,A="0px ".concat(p===-1?1:p,"px"),P="".concat(p,"px 0px"),N=V2(["strokeDasharray"],c,l);return O.createElement(Bs,{animationId:x,key:x,canBegin:p>0,duration:c,easing:l,isActive:d,begin:u},M=>{var R=nt(E,i,M),L=nt(C,o,M),$=nt(D,a,M),V=nt(T,n,M),z=nt(j,r,M);f.current&&(h.current=R,g.current=L,b.current=$,S.current=V,w.current=z);var B=M>0?{transition:N,strokeDasharray:P}:{strokeDasharray:A};return O.createElement("path",Rp({},lt(t,!0),{className:_,d:uA(V,z,R,L,$),ref:f,style:cA(cA({},B),t.style)}))})},UG=["option","shapeType","propTransformer","activeClassName","isActive"];function KG(e,t){if(e==null)return{};var n,r,i=qG(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function qG(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function dA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Lp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dA(Object(n),!0).forEach(function(r){GG(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function GG(e,t,n){return(t=XG(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function XG(e){var t=QG(e,"string");return typeof t=="symbol"?t:t+""}function QG(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ZG(e,t){return Lp(Lp({},t),e)}function JG(e,t){return e==="symbols"}function fA(e){var{shapeType:t,elementProps:n}=e;switch(t){case"rectangle":return O.createElement(eP,n);case"trapezoid":return O.createElement(YG,n);case"sector":return O.createElement(rP,n);case"symbols":if(JG(t))return O.createElement($g,n);break;default:return null}}function eX(e){return k.isValidElement(e)?e.props:e}function pA(e){var{option:t,shapeType:n,propTransformer:r=ZG,activeClassName:i="recharts-active-shape",isActive:o}=e,a=KG(e,UG),s;if(k.isValidElement(t))s=k.cloneElement(t,Lp(Lp({},a),eX(t)));else if(typeof t=="function")s=t(a);else if(BG(t)&&typeof t!="boolean"){var l=r(t,a);s=O.createElement(fA,{shapeType:n,elementProps:l})}else{var c=a;s=O.createElement(fA,{shapeType:n,elementProps:c})}return o?O.createElement(Ot,{className:i},s):s}var a0=(e,t)=>{var n=vt();return(r,i)=>o=>{e?.(r,i,o),n(LC({activeIndex:String(i),activeDataKey:t,activeCoordinate:r.tooltipPosition}))}},s0=e=>{var t=vt();return(n,r)=>i=>{e?.(n,r,i),t(FU())}},l0=(e,t)=>{var n=vt();return(r,i)=>o=>{e?.(r,i,o),n($U({activeIndex:String(i),activeDataKey:t,activeCoordinate:r.tooltipPosition}))}};function Fp(e){var{fn:t,args:n}=e,r=vt(),i=fn();return k.useEffect(()=>{if(!i){var o=t(n);return r(IU(o)),()=>{r(RU(o))}}},[t,n,r,i]),null}var hA=()=>{};function c0(e){var{legendPayload:t}=e,n=vt(),r=fn();return k.useEffect(()=>r?hA:(n(D2(t)),()=>{n(A2(t))}),[n,r,t]),null}function tX(e){var{legendPayload:t}=e,n=vt(),r=ce(Pe);return k.useEffect(()=>r!=="centric"&&r!=="radial"?hA:(n(D2(t)),()=>{n(A2(t))}),[n,r,t]),null}var u0,nX=()=>{var[e]=O.useState(()=>sc("uid-"));return e},rX=(u0=O.useId)!==null&&u0!==void 0?u0:nX;function iX(e,t){var n=rX();return t||(e?"".concat(e,"-").concat(n):n)}var oX=k.createContext(void 0),$p=e=>{var{id:t,type:n,children:r}=e,i=iX("recharts-".concat(n),t);return O.createElement(oX.Provider,{value:i},r(i))},aX={cartesianItems:[],polarItems:[]},mA=dr({name:"graphicalItems",initialState:aX,reducers:{addCartesianGraphicalItem(e,t){e.cartesianItems.push(t.payload)},replaceCartesianGraphicalItem(e,t){var{prev:n,next:r}=t.payload,i=Qi(e).cartesianItems.indexOf(n);i>-1&&(e.cartesianItems[i]=r)},removeCartesianGraphicalItem(e,t){var n=Qi(e).cartesianItems.indexOf(t.payload);n>-1&&e.cartesianItems.splice(n,1)},addPolarGraphicalItem(e,t){e.polarItems.push(t.payload)},removePolarGraphicalItem(e,t){var n=Qi(e).polarItems.indexOf(t.payload);n>-1&&e.polarItems.splice(n,1)}}}),{addCartesianGraphicalItem:sX,replaceCartesianGraphicalItem:lX,removeCartesianGraphicalItem:cX,addPolarGraphicalItem:uX,removePolarGraphicalItem:dX}=mA.actions,fX=mA.reducer;function d0(e){var t=vt(),n=k.useRef(null);return k.useEffect(()=>{n.current===null?t(sX(e)):n.current!==e&&t(lX({prev:n.current,next:e})),n.current=e},[t,e]),k.useEffect(()=>()=>{n.current&&(t(cX(n.current)),n.current=null)},[t]),null}function pX(e){var t=vt();return k.useEffect(()=>(t(uX(e)),()=>{t(dX(e))}),[t,e]),null}var hX=["onMouseEnter","onClick","onMouseLeave"],mX=["id"],gX=["id"];function f0(e,t){if(e==null)return{};var n,r,i=vX(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function vX(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function gA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function xt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gA(Object(n),!0).forEach(function(r){yX(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yX(e,t,n){return(t=bX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bX(e){var t=xX(e,"string");return typeof t=="symbol"?t:t+""}function xX(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Go(){return Go=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Go.apply(null,arguments)}function wX(e){var t=k.useMemo(()=>Eg(e.children,Vt),[e.children]),n=ce(r=>IG(r,e.id,t));return n==null?null:O.createElement(tX,{legendPayload:n})}function _X(e){var{dataKey:t,nameKey:n,sectors:r,stroke:i,strokeWidth:o,fill:a,name:s,hide:l,tooltipType:c}=e;return{dataDefinedOnItem:r.map(u=>u.tooltipPayload),positions:r.map(u=>u.tooltipPosition),settings:{stroke:i,strokeWidth:o,fill:a,dataKey:t,nameKey:n,name:$o(s,t),hide:l,type:c,color:a,unit:""}}}var SX=(e,t)=>e>t?"start":e<t?"end":"middle",OX=(e,t,n)=>On(typeof t=="function"?t(e):t,n,n*.8),EX=(e,t,n)=>{var{top:r,left:i,width:o,height:a}=t,s=d2(o,a),l=i+On(e.cx,o,o/2),c=r+On(e.cy,a,a/2),u=On(e.innerRadius,s,0),d=OX(n,e.outerRadius,s),f=e.maxRadius||Math.sqrt(o*o+a*a)/2;return{cx:l,cy:c,innerRadius:u,outerRadius:d,maxRadius:f}},PX=(e,t)=>{var n=Zt(t-e),r=Math.min(Math.abs(t-e),360);return n*r};function kX(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var CX=(e,t)=>{if(O.isValidElement(e))return O.cloneElement(e,t);if(typeof e=="function")return e(t);var n=ie("recharts-pie-label-line",typeof e!="boolean"?e.className:"");return O.createElement($s,Go({},t,{type:"linear",className:n}))},DX=(e,t,n)=>{if(O.isValidElement(e))return O.cloneElement(e,t);var r=n;if(typeof e=="function"&&(r=e(t),O.isValidElement(r)))return r;var i=ie("recharts-pie-label-text",kX(e));return O.createElement(Mp,Go({},t,{alignmentBaseline:"middle",className:i}),r)};function AX(e){var{sectors:t,props:n,showLabels:r}=e,{label:i,labelLine:o,dataKey:a}=n;if(!r||!i||!t)return null;var s=kr(n),l=lt(i,!1),c=lt(o,!1),u=typeof i=="object"&&"offsetRadius"in i&&typeof i.offsetRadius=="number"&&i.offsetRadius||20,d=t.map((f,p)=>{var m=(f.startAngle+f.endAngle)/2,h=Wt(f.cx,f.cy,f.outerRadius+u,m),g=xt(xt(xt(xt({},s),f),{},{stroke:"none"},l),{},{index:p,textAnchor:SX(h.x,f.cx)},h),b=xt(xt(xt(xt({},s),f),{},{fill:"none",stroke:f.fill},c),{},{index:p,points:[Wt(f.cx,f.cy,f.outerRadius,m),h],key:"line"});return O.createElement(Ot,{key:"label-".concat(f.startAngle,"-").concat(f.endAngle,"-").concat(f.midAngle,"-").concat(p)},o&&CX(o,b),DX(i,g,rt(f,a)))});return O.createElement(Ot,{className:"recharts-pie-labels"},d)}function TX(e){var{sectors:t,props:n,showLabels:r}=e,{label:i}=n;return typeof i=="object"&&i!=null&&"position"in i?O.createElement(Ip,{label:i}):O.createElement(AX,{sectors:t,props:n,showLabels:r})}function MX(e){var{sectors:t,activeShape:n,inactiveShape:r,allOtherPieProps:i}=e,o=ce(Ko),{onMouseEnter:a,onClick:s,onMouseLeave:l}=i,c=f0(i,hX),u=a0(a,i.dataKey),d=s0(l),f=l0(s,i.dataKey);return t==null||t.length===0?null:O.createElement(O.Fragment,null,t.map((p,m)=>{if(p?.startAngle===0&&p?.endAngle===0&&t.length!==1)return null;var h=n&&String(m)===o,g=o?r:null,b=h?n:g,S=xt(xt({},p),{},{stroke:p.stroke,tabIndex:-1,[S2]:m,[O2]:i.dataKey});return O.createElement(Ot,Go({tabIndex:-1,className:"recharts-pie-sector"},cc(c,p,m),{onMouseEnter:u(p,m),onMouseLeave:d(p,m),onClick:f(p,m),key:"sector-".concat(p?.startAngle,"-").concat(p?.endAngle,"-").concat(p.midAngle,"-").concat(m)}),O.createElement(pA,Go({option:b,isActive:h,shapeType:"sector"},S)))}))}function NX(e){var t,{pieSettings:n,displayedData:r,cells:i,offset:o}=e,{cornerRadius:a,startAngle:s,endAngle:l,dataKey:c,nameKey:u,tooltipType:d}=n,f=Math.abs(n.minAngle),p=PX(s,l),m=Math.abs(p),h=r.length<=1?0:(t=n.paddingAngle)!==null&&t!==void 0?t:0,g=r.filter(E=>rt(E,c,0)!==0).length,b=(m>=360?g:g-1)*h,S=m-g*f-b,w=r.reduce((E,C)=>{var D=rt(C,c,0);return E+(he(D)?D:0)},0),x;if(w>0){var _;x=r.map((E,C)=>{var D=rt(E,c,0),T=rt(E,u,C),j=EX(n,o,E),A=(he(D)?D:0)/w,P,N=xt(xt({},E),i&&i[C]&&i[C].props);C?P=_.endAngle+Zt(p)*h*(D!==0?1:0):P=s;var M=P+Zt(p)*((D!==0?f:0)+A*S),R=(P+M)/2,L=(j.innerRadius+j.outerRadius)/2,$=[{name:T,value:D,payload:N,dataKey:c,type:d}],V=Wt(j.cx,j.cy,L,R);return _=xt(xt(xt(xt({},n.presentationProps),{},{percent:A,cornerRadius:a,name:T,tooltipPayload:$,midAngle:R,middleRadius:L,tooltipPosition:V},N),j),{},{value:D,startAngle:P,endAngle:M,payload:N,paddingAngle:Zt(p)*h}),_})}return x}function jX(e){var{showLabels:t,sectors:n,children:r}=e,i=k.useMemo(()=>!t||!n?[]:n.map(o=>({value:o.value,payload:o.payload,clockWise:!1,parentViewBox:void 0,viewBox:{cx:o.cx,cy:o.cy,innerRadius:o.innerRadius,outerRadius:o.outerRadius,startAngle:o.startAngle,endAngle:o.endAngle,clockWise:!1},fill:o.fill})),[n,t]);return O.createElement(bG,{value:t?i:void 0},r)}function IX(e){var{props:t,previousSectorsRef:n}=e,{sectors:r,isAnimationActive:i,animationBegin:o,animationDuration:a,animationEasing:s,activeShape:l,inactiveShape:c,onAnimationStart:u,onAnimationEnd:d}=t,f=Ws(t,"recharts-pie-"),p=n.current,[m,h]=k.useState(!1),g=k.useCallback(()=>{typeof d=="function"&&d(),h(!1)},[d]),b=k.useCallback(()=>{typeof u=="function"&&u(),h(!0)},[u]);return O.createElement(jX,{showLabels:!m,sectors:r},O.createElement(Bs,{animationId:f,begin:o,duration:a,isActive:i,easing:s,onAnimationStart:b,onAnimationEnd:g,key:f},S=>{var w=[],x=r&&r[0],_=x?.startAngle;return r?.forEach((E,C)=>{var D=p&&p[C],T=C>0?Oa(E,"paddingAngle",0):0;if(D){var j=nt(D.endAngle-D.startAngle,E.endAngle-E.startAngle,S),A=xt(xt({},E),{},{startAngle:_+T,endAngle:_+j+T});w.push(A),_=A.endAngle}else{var{endAngle:P,startAngle:N}=E,M=nt(0,P-N,S),R=xt(xt({},E),{},{startAngle:_+T,endAngle:_+M+T});w.push(R),_=R.endAngle}}),n.current=w,O.createElement(Ot,null,O.createElement(MX,{sectors:w,activeShape:l,inactiveShape:c,allOtherPieProps:t}))}),O.createElement(TX,{showLabels:!m,sectors:r,props:t}),t.children)}var RX={animationBegin:400,animationDuration:1500,animationEasing:"ease",cx:"50%",cy:"50%",dataKey:"value",endAngle:360,fill:"#808080",hide:!1,innerRadius:0,isAnimationActive:!eo.isSsr,labelLine:!0,legendType:"rect",minAngle:0,nameKey:"name",outerRadius:"80%",paddingAngle:0,rootTabIndex:0,startAngle:0,stroke:"#fff"};function LX(e){var{id:t}=e,n=f0(e,mX),{hide:r,className:i,rootTabIndex:o}=e,a=k.useMemo(()=>Eg(e.children,Vt),[e.children]),s=ce(u=>RG(u,t,a)),l=k.useRef(null),c=ie("recharts-pie",i);return r||s==null?(l.current=null,O.createElement(Ot,{tabIndex:o,className:c})):O.createElement(O.Fragment,null,O.createElement(Fp,{fn:_X,args:xt(xt({},e),{},{sectors:s})}),O.createElement(Ot,{tabIndex:o,className:c},O.createElement(IX,{props:xt(xt({},n),{},{sectors:s}),previousSectorsRef:l})))}function Oi(e){var t=Ut(e,RX),{id:n}=t,r=f0(t,gX),i=kr(r);return O.createElement($p,{id:n,type:"pie"},o=>O.createElement(O.Fragment,null,O.createElement(pX,{type:"pie",id:o,data:r.data,dataKey:r.dataKey,hide:r.hide,angleAxisId:0,radiusAxisId:0,name:r.name,nameKey:r.nameKey,tooltipType:r.tooltipType,legendType:r.legendType,fill:r.fill,cx:r.cx,cy:r.cy,startAngle:r.startAngle,endAngle:r.endAngle,paddingAngle:r.paddingAngle,minAngle:r.minAngle,innerRadius:r.innerRadius,outerRadius:r.outerRadius,cornerRadius:r.cornerRadius,presentationProps:i,maxRadius:t.maxRadius}),O.createElement(wX,Go({},r,{id:o})),O.createElement(LX,Go({},r,{id:o}))))}Oi.displayName="Pie";function vA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function yA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?vA(Object(n),!0).forEach(function(r){FX(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function FX(e,t,n){return(t=$X(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $X(e){var t=BX(e,"string");return typeof t=="symbol"?t:t+""}function BX(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var WX={xAxis:{},yAxis:{},zAxis:{}},bA=dr({name:"cartesianAxis",initialState:WX,reducers:{addXAxis(e,t){e.xAxis[t.payload.id]=t.payload},removeXAxis(e,t){delete e.xAxis[t.payload.id]},addYAxis(e,t){e.yAxis[t.payload.id]=t.payload},removeYAxis(e,t){delete e.yAxis[t.payload.id]},addZAxis(e,t){e.zAxis[t.payload.id]=t.payload},removeZAxis(e,t){delete e.zAxis[t.payload.id]},updateYAxisWidth(e,t){var{id:n,width:r}=t.payload;e.yAxis[n]&&(e.yAxis[n]=yA(yA({},e.yAxis[n]),{},{width:r}))}}}),{addXAxis:zX,removeXAxis:VX,addYAxis:HX,removeYAxis:YX,addZAxis:lfe,removeZAxis:cfe,updateYAxisWidth:UX}=bA.actions,KX=bA.reducer,qX=W([Yt],e=>{if(e)return{top:e.top,bottom:e.bottom,left:e.left,right:e.right}}),GX=W([qX,Zi,Ji],(e,t,n)=>{if(!(!e||t==null||n==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,n-e.top-e.bottom)}}),Bp=()=>ce(GX),XX=()=>ce(EK);function xA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function wA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xA(Object(n),!0).forEach(function(r){QX(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function QX(e,t,n){return(t=ZX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZX(e){var t=JX(e,"string");return typeof t=="symbol"?t:t+""}function JX(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var eQ=e=>{var{point:t,childIndex:n,mainColor:r,activeDot:i,dataKey:o}=e;if(i===!1||t.x==null||t.y==null)return null;var a=wA(wA({index:n,dataKey:o,cx:t.x,cy:t.y,r:4,fill:r??"none",strokeWidth:2,stroke:"#fff",payload:t.payload,value:t.value},lt(i,!1)),Sg(i)),s;return k.isValidElement(i)?s=k.cloneElement(i,a):typeof i=="function"?s=i(a):s=O.createElement(Jb,a),O.createElement(Ot,{className:"recharts-active-dot"},s)};function p0(e){var{points:t,mainColor:n,activeDot:r,itemDataKey:i}=e,o=ce(Ko),a=XX();if(t==null||a==null)return null;var s=t.find(l=>a.includes(l.payload));return ft(s)?null:eQ({point:s,childIndex:Number(o),mainColor:n,dataKey:i,activeDot:r})}var tQ=process.env.NODE_ENV==="production",h0="Invariant failed";function _A(e,t){if(tQ)throw new Error(h0);var n=typeof t=="function"?t():t,r=n?"".concat(h0,": ").concat(n):h0;throw new Error(r)}var nQ=["x","y"];function m0(){return m0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},m0.apply(null,arguments)}function SA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Gc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?SA(Object(n),!0).forEach(function(r){rQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rQ(e,t,n){return(t=iQ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iQ(e){var t=oQ(e,"string");return typeof t=="symbol"?t:t+""}function oQ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function aQ(e,t){if(e==null)return{};var n,r,i=sQ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function sQ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function lQ(e,t){var{x:n,y:r}=e,i=aQ(e,nQ),o="".concat(n),a=parseInt(o,10),s="".concat(r),l=parseInt(s,10),c="".concat(t.height||i.height),u=parseInt(c,10),d="".concat(t.width||i.width),f=parseInt(d,10);return Gc(Gc(Gc(Gc(Gc({},t),i),a?{x:a}:{}),l?{y:l}:{}),{},{height:u,width:f,name:t.name,radius:t.radius})}function g0(e){return O.createElement(pA,m0({shapeType:"rectangle",propTransformer:lQ,activeClassName:"recharts-active-bar"},e))}var cQ=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(r,i)=>{if(he(t))return t;var o=he(r)||ft(r);return o?t(r,i):(o||(process.env.NODE_ENV!=="production"?_A(!1,"minPointSize callback function received a value with type of ".concat(typeof r,". Currently only numbers or null/undefined are supported.")):_A()),n)}},uQ={},OA=dr({name:"errorBars",initialState:uQ,reducers:{addErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]||(e[n]=[]),e[n].push(r)},replaceErrorBar:(e,t)=>{var{itemId:n,prev:r,next:i}=t.payload;e[n]&&(e[n]=e[n].map(o=>o.dataKey===r.dataKey&&o.direction===r.direction?i:o))},removeErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]&&(e[n]=e[n].filter(i=>i.dataKey!==r.dataKey||i.direction!==r.direction))}}}),{addErrorBar:ufe,replaceErrorBar:dfe,removeErrorBar:ffe}=OA.actions,dQ=OA.reducer,fQ=["children"];function pQ(e,t){if(e==null)return{};var n,r,i=hQ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function hQ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var mQ={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},gQ=k.createContext(mQ);function EA(e){var{children:t}=e,n=pQ(e,fQ);return O.createElement(gQ.Provider,{value:n},t)}function Wp(e,t){var n,r,i=ce(c=>xi(c,e)),o=ce(c=>wi(c,t)),a=(n=i?.allowDataOverflow)!==null&&n!==void 0?n:hr.allowDataOverflow,s=(r=o?.allowDataOverflow)!==null&&r!==void 0?r:mr.allowDataOverflow,l=a||s;return{needClip:l,needClipX:a,needClipY:s}}function v0(e){var{xAxisId:t,yAxisId:n,clipPathId:r}=e,i=Bp(),{needClipX:o,needClipY:a,needClip:s}=Wp(t,n);if(!s)return null;var{x:l,y:c,width:u,height:d}=i;return O.createElement("clipPath",{id:"clipPath-".concat(r)},O.createElement("rect",{x:o?l:l-u/2,y:a?c:c-d/2,width:o?u:u*2,height:a?d:d*2}))}var vQ=["onMouseEnter","onMouseLeave","onClick"],yQ=["value","background","tooltipPosition"],bQ=["id"],xQ=["onMouseEnter","onClick","onMouseLeave"];function Xo(){return Xo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xo.apply(null,arguments)}function PA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Rn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?PA(Object(n),!0).forEach(function(r){wQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wQ(e,t,n){return(t=_Q(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _Q(e){var t=SQ(e,"string");return typeof t=="symbol"?t:t+""}function SQ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zp(e,t){if(e==null)return{};var n,r,i=OQ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function OQ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var EQ=e=>{var{dataKey:t,name:n,fill:r,legendType:i,hide:o}=e;return[{inactive:o,dataKey:t,type:i,color:r,value:$o(n,t),payload:e}]};function PQ(e){var{dataKey:t,stroke:n,strokeWidth:r,fill:i,name:o,hide:a,unit:s}=e;return{dataDefinedOnItem:void 0,positions:void 0,settings:{stroke:n,strokeWidth:r,fill:i,dataKey:t,nameKey:void 0,name:$o(o,t),hide:a,type:e.tooltipType,color:e.fill,unit:s}}}function kQ(e){var t=ce(Ko),{data:n,dataKey:r,background:i,allOtherBarProps:o}=e,{onMouseEnter:a,onMouseLeave:s,onClick:l}=o,c=zp(o,vQ),u=a0(a,r),d=s0(s),f=l0(l,r);if(!i||n==null)return null;var p=lt(i,!1);return O.createElement(O.Fragment,null,n.map((m,h)=>{var{value:g,background:b,tooltipPosition:S}=m,w=zp(m,yQ);if(!b)return null;var x=u(m,h),_=d(m,h),E=f(m,h),C=Rn(Rn(Rn(Rn(Rn({option:i,isActive:String(h)===t},w),{},{fill:"#eee"},b),p),cc(c,m,h)),{},{onMouseEnter:x,onMouseLeave:_,onClick:E,dataKey:r,index:h,className:"recharts-bar-background-rectangle"});return O.createElement(g0,Xo({key:"background-bar-".concat(C.index)},C))}))}function CQ(e){var{showLabels:t,children:n,rects:r}=e,i=r?.map(o=>{var a={x:o.x,y:o.y,width:o.width,height:o.height};return Rn(Rn({},a),{},{value:o.value,payload:o.payload,parentViewBox:o.parentViewBox,viewBox:a,fill:o.fill})});return O.createElement(Qb,{value:t?i:void 0},n)}function DQ(e){var{shape:t,activeBar:n,baseProps:r,entry:i,index:o,dataKey:a}=e,s=ce(Ko),l=ce(JC),c=n&&String(o)===s&&(l==null||a===l),u=c?n:t;return O.createElement(g0,Xo({},r,i,{isActive:c,option:u,index:o,dataKey:a}))}function AQ(e){var{shape:t,baseProps:n,entry:r,index:i,dataKey:o}=e;return O.createElement(g0,Xo({},n,r,{isActive:!1,option:t,index:i,dataKey:o}))}function TQ(e){var{data:t,props:n}=e,r=kr(n),{id:i}=r,o=zp(r,bQ),{shape:a,dataKey:s,activeBar:l}=n,{onMouseEnter:c,onClick:u,onMouseLeave:d}=n,f=zp(n,xQ),p=a0(c,s),m=s0(d),h=l0(u,s);return t?O.createElement(O.Fragment,null,t.map((g,b)=>O.createElement(Ot,Xo({className:"recharts-bar-rectangle"},cc(f,g,b),{onMouseEnter:p(g,b),onMouseLeave:m(g,b),onClick:h(g,b),key:"rectangle-".concat(g?.x,"-").concat(g?.y,"-").concat(g?.value,"-").concat(b)}),l?O.createElement(DQ,{shape:a,activeBar:l,baseProps:o,entry:g,index:b,dataKey:s}):O.createElement(AQ,{shape:a,baseProps:o,entry:g,index:b,dataKey:s})))):null}function MQ(e){var{props:t,previousRectanglesRef:n}=e,{data:r,layout:i,isAnimationActive:o,animationBegin:a,animationDuration:s,animationEasing:l,onAnimationEnd:c,onAnimationStart:u}=t,d=n.current,f=Ws(t,"recharts-bar-"),[p,m]=k.useState(!1),h=!p,g=k.useCallback(()=>{typeof c=="function"&&c(),m(!1)},[c]),b=k.useCallback(()=>{typeof u=="function"&&u(),m(!0)},[u]);return O.createElement(CQ,{showLabels:h,rects:r},O.createElement(Bs,{animationId:f,begin:a,duration:s,isActive:o,easing:l,onAnimationEnd:g,onAnimationStart:b,key:f},S=>{var w=S===1?r:r?.map((x,_)=>{var E=d&&d[_];if(E)return Rn(Rn({},x),{},{x:nt(E.x,x.x,S),y:nt(E.y,x.y,S),width:nt(E.width,x.width,S),height:nt(E.height,x.height,S)});if(i==="horizontal"){var C=nt(0,x.height,S);return Rn(Rn({},x),{},{y:x.y+x.height-C,height:C})}var D=nt(0,x.width,S);return Rn(Rn({},x),{},{width:D})});return S>0&&(n.current=w??null),w==null?null:O.createElement(Ot,null,O.createElement(TQ,{props:t,data:w}))}),O.createElement(Ip,{label:t.label}),t.children)}function NQ(e){var t=k.useRef(null);return O.createElement(MQ,{previousRectanglesRef:t,props:e})}var kA=0,jQ=(e,t)=>{var n=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:n,errorVal:rt(e,t)}};class IQ extends k.PureComponent{render(){var{hide:t,data:n,dataKey:r,className:i,xAxisId:o,yAxisId:a,needClip:s,background:l,id:c}=this.props;if(t||n==null)return null;var u=ie("recharts-bar",i),d=c;return O.createElement(Ot,{className:u,id:c},s&&O.createElement("defs",null,O.createElement(v0,{clipPathId:d,xAxisId:o,yAxisId:a})),O.createElement(Ot,{className:"recharts-bar-rectangles",clipPath:s?"url(#clipPath-".concat(d,")"):void 0},O.createElement(kQ,{data:n,dataKey:r,background:l,allOtherBarProps:this.props}),O.createElement(NQ,this.props)))}}var RQ={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",hide:!1,isAnimationActive:!eo.isSsr,legendType:"rect",minPointSize:kA,xAxisId:0,yAxisId:0};function LQ(e){var{xAxisId:t,yAxisId:n,hide:r,legendType:i,minPointSize:o,activeBar:a,animationBegin:s,animationDuration:l,animationEasing:c,isAnimationActive:u}=e,{needClip:d}=Wp(t,n),f=vc(),p=fn(),m=Eg(e.children,Vt),h=ce(S=>dZ(S,t,n,p,e.id,m));if(f!=="vertical"&&f!=="horizontal")return null;var g,b=h?.[0];return b==null||b.height==null||b.width==null?g=0:g=f==="vertical"?b.height/2:b.width/2,O.createElement(EA,{xAxisId:t,yAxisId:n,data:h,dataPointFormatter:jQ,errorBarOffset:g},O.createElement(IQ,Xo({},e,{layout:f,needClip:d,data:h,xAxisId:t,yAxisId:n,hide:r,legendType:i,minPointSize:o,activeBar:a,animationBegin:s,animationDuration:l,animationEasing:c,isAnimationActive:u})))}function FQ(e){var{layout:t,barSettings:{dataKey:n,minPointSize:r},pos:i,bandSize:o,xAxis:a,yAxis:s,xAxisTicks:l,yAxisTicks:c,stackedData:u,displayedData:d,offset:f,cells:p,parentViewBox:m}=e,h=t==="horizontal"?s:a,g=u?h.scale.domain():null,b=t7({numericAxis:h});return d.map((S,w)=>{var x,_,E,C,D,T;u?x=Xz(u[w],g):(x=rt(S,n),Array.isArray(x)||(x=[b,x]));var j=cQ(r,kA)(x[1],w);if(t==="horizontal"){var A,[P,N]=[s.scale(x[0]),s.scale(x[1])];_=y2({axis:a,ticks:l,bandSize:o,offset:i.offset,entry:S,index:w}),E=(A=N??P)!==null&&A!==void 0?A:void 0,C=i.size;var M=P-N;if(D=Sn(M)?0:M,T={x:_,y:f.top,width:C,height:f.height},Math.abs(j)>0&&Math.abs(D)<Math.abs(j)){var R=Zt(D||j)*(Math.abs(j)-Math.abs(D));E-=R,D+=R}}else{var[L,$]=[a.scale(x[0]),a.scale(x[1])];if(_=L,E=y2({axis:s,ticks:c,bandSize:o,offset:i.offset,entry:S,index:w}),C=$-L,D=i.size,T={x:f.left,y:E,width:f.width,height:D},Math.abs(j)>0&&Math.abs(C)<Math.abs(j)){var V=Zt(C||j)*(Math.abs(j)-Math.abs(C));C+=V}}if(_==null||E==null||C==null||D==null)return null;var z=Rn(Rn({},S),{},{x:_,y:E,width:C,height:D,value:u?x:x[1],payload:S,background:T,tooltipPosition:{x:_+C/2,y:E+D/2},parentViewBox:m},p&&p[w]&&p[w].props);return z}).filter(Boolean)}function $Q(e){var t=Ut(e,RQ),n=fn();return O.createElement($p,{id:t.id,type:"bar"},r=>O.createElement(O.Fragment,null,O.createElement(c0,{legendPayload:EQ(t)}),O.createElement(Fp,{fn:PQ,args:t}),O.createElement(d0,{type:"bar",id:r,data:void 0,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,stackId:v2(t.stackId),hide:t.hide,barSize:t.barSize,minPointSize:t.minPointSize,maxBarSize:t.maxBarSize,isPanorama:n}),O.createElement(LQ,Xo({},t,{id:r}))))}var Ln=O.memo($Q);Ln.displayName="Bar";function CA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Vp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?CA(Object(n),!0).forEach(function(r){BQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function BQ(e,t,n){return(t=WQ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WQ(e){var t=zQ(e,"string");return typeof t=="symbol"?t:t+""}function zQ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var VQ=(e,t)=>t,HQ=(e,t,n)=>n,YQ=(e,t,n,r)=>r,UQ=(e,t,n,r,i)=>i,Xc=W([Bc,UQ],(e,t)=>e.filter(n=>n.type==="bar").find(n=>n.id===t)),KQ=W([Xc],e=>e?.maxBarSize),qQ=(e,t,n,r,i,o)=>o,DA=(e,t,n)=>{var r=n??e;if(!ft(r))return On(r,t,0)},GQ=W([Pe,Bc,VQ,HQ,YQ],(e,t,n,r,i)=>t.filter(o=>e==="horizontal"?o.xAxisId===n:o.yAxisId===r).filter(o=>o.isPanorama===i).filter(o=>o.hide===!1).filter(o=>o.type==="bar")),XQ=(e,t,n,r)=>{var i=Pe(e);return i==="horizontal"?zc(e,"yAxis",n,r):zc(e,"xAxis",t,r)},QQ=(e,t,n)=>{var r=Pe(e);return r==="horizontal"?kC(e,"xAxis",t):kC(e,"yAxis",n)},ZQ=(e,t,n)=>{var r={},i=e.filter(xp),o=e.filter(c=>c.stackId==null),a=i.reduce((c,u)=>(c[u.stackId]||(c[u.stackId]=[]),c[u.stackId].push(u),c),r),s=Object.entries(a).map(c=>{var[u,d]=c,f=d.map(m=>m.dataKey),p=DA(t,n,d[0].barSize);return{stackId:u,dataKeys:f,barSize:p}}),l=o.map(c=>{var u=[c.dataKey].filter(f=>f!=null),d=DA(t,n,c.barSize);return{stackId:void 0,dataKeys:u,barSize:d}});return[...s,...l]},JQ=W([GQ,j9,QQ],ZQ),eZ=(e,t,n,r,i)=>{var o,a,s=Xc(e,t,n,r,i);if(s!=null){var l=Pe(e),c=Hk(e),{maxBarSize:u}=s,d=ft(u)?c:u,f,p;return l==="horizontal"?(f=Si(e,"xAxis",t,r),p=_i(e,"xAxis",t,r)):(f=Si(e,"yAxis",n,r),p=_i(e,"yAxis",n,r)),(o=(a=Na(f,p,!0))!==null&&a!==void 0?a:d)!==null&&o!==void 0?o:0}},AA=(e,t,n,r)=>{var i=Pe(e),o,a;return i==="horizontal"?(o=Si(e,"xAxis",t,r),a=_i(e,"xAxis",t,r)):(o=Si(e,"yAxis",n,r),a=_i(e,"yAxis",n,r)),Na(o,a)};function tZ(e,t,n,r,i){var o=r.length;if(!(o<1)){var a=On(e,n,0,!0),s,l=[];if(pn(r[0].barSize)){var c=!1,u=n/o,d=r.reduce((b,S)=>b+(S.barSize||0),0);d+=(o-1)*a,d>=n&&(d-=(o-1)*a,a=0),d>=n&&u>0&&(c=!0,u*=.9,d=o*u);var f=(n-d)/2>>0,p={offset:f-a,size:0};s=r.reduce((b,S)=>{var w,x={stackId:S.stackId,dataKeys:S.dataKeys,position:{offset:p.offset+p.size+a,size:c?u:(w=S.barSize)!==null&&w!==void 0?w:0}},_=[...b,x];return p=_[_.length-1].position,_},l)}else{var m=On(t,n,0,!0);n-2*m-(o-1)*a<=0&&(a=0);var h=(n-2*m-(o-1)*a)/o;h>1&&(h>>=0);var g=pn(i)?Math.min(h,i):h;s=r.reduce((b,S,w)=>[...b,{stackId:S.stackId,dataKeys:S.dataKeys,position:{offset:m+(h+a)*w+(h-g)/2,size:g}}],l)}return s}}var nZ=(e,t,n,r,i,o,a)=>{var s=ft(a)?t:a,l=tZ(n,r,i!==o?i:o,e,s);return i!==o&&l!=null&&(l=l.map(c=>Vp(Vp({},c),{},{position:Vp(Vp({},c.position),{},{offset:c.position.offset-i/2})}))),l},rZ=W([JQ,Hk,N9,Yk,eZ,AA,KQ],nZ),iZ=(e,t,n,r)=>Si(e,"xAxis",t,r),oZ=(e,t,n,r)=>Si(e,"yAxis",n,r),aZ=(e,t,n,r)=>_i(e,"xAxis",t,r),sZ=(e,t,n,r)=>_i(e,"yAxis",n,r),lZ=W([rZ,Xc],(e,t)=>{if(!(e==null||t==null)){var n=e.find(r=>r.stackId===t.stackId&&t.dataKey!=null&&r.dataKeys.includes(t.dataKey));if(n!=null)return n.position}}),cZ=(e,t)=>{var n=bp(t);if(!(!e||n==null||t==null)){var{stackId:r}=t;if(r!=null){var i=e[r];if(i){var{stackedData:o}=i;if(o)return o.find(a=>a.key===n)}}}},uZ=W([XQ,Xc],cZ),dZ=W([Yt,Gv,iZ,oZ,aZ,sZ,lZ,Pe,Ic,AA,uZ,Xc,qQ],(e,t,n,r,i,o,a,s,l,c,u,d,f)=>{var{chartData:p,dataStartIndex:m,dataEndIndex:h}=l;if(!(d==null||a==null||t==null||s!=="horizontal"&&s!=="vertical"||n==null||r==null||i==null||o==null||c==null)){var{data:g}=d,b;if(g!=null&&g.length>0?b=g:b=p?.slice(m,h+1),b!=null)return FQ({layout:s,barSettings:d,pos:a,parentViewBox:t,bandSize:c,xAxis:n,yAxis:r,xAxisTicks:i,yAxisTicks:o,stackedData:u,displayedData:b,offset:e,cells:f})}}),TA=e=>{var{chartData:t}=e,n=vt(),r=fn();return k.useEffect(()=>r?()=>{}:(n(hD(t)),()=>{n(hD(void 0))}),[t,n,r]),null},MA={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},NA=dr({name:"brush",initialState:MA,reducers:{setBrushSettings(e,t){return t.payload==null?MA:t.payload}}}),{setBrushSettings:pfe}=NA.actions,fZ=NA.reducer;function jA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Hp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jA(Object(n),!0).forEach(function(r){IA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function IA(e,t,n){return(t=pZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pZ(e){var t=hZ(e,"string");return typeof t=="symbol"?t:t+""}function hZ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var mZ=(e,t)=>{var{x:n,y:r}=e,{x:i,y:o}=t;return{x:Math.min(n,i),y:Math.min(r,o),width:Math.abs(i-n),height:Math.abs(o-r)}},gZ=e=>{var{x1:t,y1:n,x2:r,y2:i}=e;return mZ({x:t,y:n},{x:r,y:i})};class Yp{static create(t){return new Yp(t)}constructor(t){this.scale=t}get domain(){return this.scale.domain}get range(){return this.scale.range}get rangeMin(){return this.range()[0]}get rangeMax(){return this.range()[1]}get bandwidth(){return this.scale.bandwidth}apply(t){var{bandAware:n,position:r}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t!==void 0){if(r)switch(r){case"start":return this.scale(t);case"middle":{var i=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+i}case"end":{var o=this.bandwidth?this.bandwidth():0;return this.scale(t)+o}default:return this.scale(t)}if(n){var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+a}return this.scale(t)}}isInRange(t){var n=this.range(),r=n[0],i=n[n.length-1];return r<=i?t>=r&&t<=i:t>=i&&t<=r}}IA(Yp,"EPS",1e-4);var vZ=e=>{var t=Object.keys(e).reduce((n,r)=>Hp(Hp({},n),{},{[r]:Yp.create(e[r])}),{});return Hp(Hp({},t),{},{apply(n){var{bandAware:r,position:i}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.fromEntries(Object.entries(n).map(o=>{var[a,s]=o;return[a,t[a].apply(s,{bandAware:r,position:i})]}))},isInRange(n){return Object.keys(n).every(r=>t[r].isInRange(n[r]))}})};function yZ(e){return(e%180+180)%180}var bZ=function(t){var{width:n,height:r}=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=yZ(i),a=o*Math.PI/180,s=Math.atan(r/n),l=a>s&&a<Math.PI-s?r/Math.sin(a):n/Math.cos(a);return Math.abs(l)},xZ={dots:[],areas:[],lines:[]},RA=dr({name:"referenceElements",initialState:xZ,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var n=Qi(e).dots.findIndex(r=>r===t.payload);n!==-1&&e.dots.splice(n,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var n=Qi(e).areas.findIndex(r=>r===t.payload);n!==-1&&e.areas.splice(n,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var n=Qi(e).lines.findIndex(r=>r===t.payload);n!==-1&&e.lines.splice(n,1)}}}),{addDot:hfe,removeDot:mfe,addArea:gfe,removeArea:vfe,addLine:wZ,removeLine:_Z}=RA.actions,SZ=RA.reducer,LA=k.createContext(void 0),OZ=e=>{var{children:t}=e,[n]=k.useState("".concat(sc("recharts"),"-clip")),r=Bp();if(r==null)return null;var{x:i,y:o,width:a,height:s}=r;return O.createElement(LA.Provider,{value:n},O.createElement("defs",null,O.createElement("clipPath",{id:n},O.createElement("rect",{x:i,y:o,height:s,width:a}))),t)},EZ=()=>k.useContext(LA);function FA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function $A(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?FA(Object(n),!0).forEach(function(r){y0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function y0(e,t,n){return(t=PZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PZ(e){var t=kZ(e,"string");return typeof t=="symbol"?t:t+""}function kZ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function b0(){return b0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b0.apply(null,arguments)}var CZ=(e,t)=>{var n;return O.isValidElement(e)?n=O.cloneElement(e,t):typeof e=="function"?n=e(t):n=O.createElement("line",b0({},t,{className:"recharts-reference-line-line"})),n},DZ=(e,t,n,r,i,o,a,s,l)=>{var{x:c,y:u,width:d,height:f}=i;if(n){var{y:p}=l,m=e.y.apply(p,{position:o});if(Sn(m)||l.ifOverflow==="discard"&&!e.y.isInRange(m))return null;var h=[{x:c+d,y:m},{x:c,y:m}];return s==="left"?h.reverse():h}if(t){var{x:g}=l,b=e.x.apply(g,{position:o});if(Sn(b)||l.ifOverflow==="discard"&&!e.x.isInRange(b))return null;var S=[{x:b,y:u+f},{x:b,y:u}];return a==="top"?S.reverse():S}if(r){var{segment:w}=l,x=w.map(_=>e.apply(_,{position:o}));return l.ifOverflow==="discard"&&x.some(_=>!e.isInRange(_))?null:x}return null};function AZ(e){var t=vt();return k.useEffect(()=>(t(wZ(e)),()=>{t(_Z(e))})),null}function TZ(e){var{x:t,y:n,segment:r,xAxisId:i,yAxisId:o,shape:a,className:s,ifOverflow:l}=e,c=fn(),u=EZ(),d=ce(A=>xi(A,i)),f=ce(A=>wi(A,o)),p=ce(A=>Yo(A,"xAxis",i,c)),m=ce(A=>Yo(A,"yAxis",o,c)),h=Vf(),g=Pr(t),b=Pr(n);if(!u||!h||d==null||f==null||p==null||m==null)return null;var S=vZ({x:p,y:m}),w=r&&r.length===2,x=DZ(S,g,b,w,h,e.position,d.orientation,f.orientation,e);if(!x)return null;var[{x:_,y:E},{x:C,y:D}]=x,T=l==="hidden"?"url(#".concat(u,")"):void 0,j=$A($A({clipPath:T},lt(e,!0)),{},{x1:_,y1:E,x2:C,y2:D});return O.createElement(Ot,{className:ie("recharts-reference-line",s)},CZ(a,j),O.createElement(zD,gZ({x1:_,y1:E,x2:C,y2:D}),O.createElement(YD,{label:e.label}),e.children))}function MZ(e){return O.createElement(O.Fragment,null,O.createElement(AZ,{yAxisId:e.yAxisId,xAxisId:e.xAxisId,ifOverflow:e.ifOverflow,x:e.x,y:e.y}),O.createElement(TZ,e))}class x0 extends k.Component{render(){return O.createElement(MZ,this.props)}}y0(x0,"displayName","ReferenceLine"),y0(x0,"defaultProps",{ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function rl(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}function BA(e,t,n){if(t<1)return[];if(t===1&&n===void 0)return e;for(var r=[],i=0;i<e.length;i+=t)r.push(e[i]);return r}function NZ(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return bZ(r,n)}function jZ(e,t,n){var r=n==="width",{x:i,y:o,width:a,height:s}=e;return t===1?{start:r?i:o,end:r?i+a:o+s}:{start:r?i+a:o+s,end:r?i:o}}function Up(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var o=n();return e*(t-e*o/2-r)>=0&&e*(t+e*o/2-i)<=0}function IZ(e,t){return BA(e,t+1)}function RZ(e,t,n,r,i){for(var o=(r||[]).slice(),{start:a,end:s}=t,l=0,c=1,u=a,d=function(){var m=r?.[l];if(m===void 0)return{v:BA(r,c)};var h=l,g,b=()=>(g===void 0&&(g=n(m,h)),g),S=m.coordinate,w=l===0||Up(e,S,b,u,s);w||(l=0,u=a,c+=1),w&&(u=S+e*(b()/2+i),l+=c)},f;c<=o.length;)if(f=d(),f)return f.v;return[]}function WA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function En(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?WA(Object(n),!0).forEach(function(r){LZ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function LZ(e,t,n){return(t=FZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function FZ(e){var t=$Z(e,"string");return typeof t=="symbol"?t:t+""}function $Z(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function BZ(e,t,n,r,i){for(var o=(r||[]).slice(),a=o.length,{start:s}=t,{end:l}=t,c=function(f){var p=o[f],m,h=()=>(m===void 0&&(m=n(p,f)),m);if(f===a-1){var g=e*(p.coordinate+e*h()/2-l);o[f]=p=En(En({},p),{},{tickCoord:g>0?p.coordinate-g*e:p.coordinate})}else o[f]=p=En(En({},p),{},{tickCoord:p.coordinate});var b=Up(e,p.tickCoord,h,s,l);b&&(l=p.tickCoord-e*(h()/2+i),o[f]=En(En({},p),{},{isShow:!0}))},u=a-1;u>=0;u--)c(u);return o}function WZ(e,t,n,r,i,o){var a=(r||[]).slice(),s=a.length,{start:l,end:c}=t;if(o){var u=r[s-1],d=n(u,s-1),f=e*(u.coordinate+e*d/2-c);a[s-1]=u=En(En({},u),{},{tickCoord:f>0?u.coordinate-f*e:u.coordinate});var p=Up(e,u.tickCoord,()=>d,l,c);p&&(c=u.tickCoord-e*(d/2+i),a[s-1]=En(En({},u),{},{isShow:!0}))}for(var m=o?s-1:s,h=function(S){var w=a[S],x,_=()=>(x===void 0&&(x=n(w,S)),x);if(S===0){var E=e*(w.coordinate-e*_()/2-l);a[S]=w=En(En({},w),{},{tickCoord:E<0?w.coordinate-E*e:w.coordinate})}else a[S]=w=En(En({},w),{},{tickCoord:w.coordinate});var C=Up(e,w.tickCoord,_,l,c);C&&(l=w.tickCoord+e*(_()/2+i),a[S]=En(En({},w),{},{isShow:!0}))},g=0;g<m;g++)h(g);return a}function w0(e,t,n){var{tick:r,ticks:i,viewBox:o,minTickGap:a,orientation:s,interval:l,tickFormatter:c,unit:u,angle:d}=e;if(!i||!i.length||!r)return[];if(he(l)||eo.isSsr){var f;return(f=IZ(i,he(l)?l:0))!==null&&f!==void 0?f:[]}var p=[],m=s==="top"||s==="bottom"?"width":"height",h=u&&m==="width"?qc(u,{fontSize:t,letterSpacing:n}):{width:0,height:0},g=(w,x)=>{var _=typeof c=="function"?c(w.value,x):w.value;return m==="width"?NZ(qc(_,{fontSize:t,letterSpacing:n}),h,d):qc(_,{fontSize:t,letterSpacing:n})[m]},b=i.length>=2?Zt(i[1].coordinate-i[0].coordinate):1,S=jZ(o,b,m);return l==="equidistantPreserveStart"?RZ(b,S,g,i,a):(l==="preserveStart"||l==="preserveStartEnd"?p=WZ(b,S,g,i,a,l==="preserveStartEnd"):p=BZ(b,S,g,i,a),p.filter(w=>w.isShow))}var zZ=e=>{var{ticks:t,label:n,labelGapWithTick:r=5,tickSize:i=0,tickMargin:o=0}=e,a=0;if(t){t.forEach(u=>{if(u){var d=u.getBoundingClientRect();d.width>a&&(a=d.width)}});var s=n?n.getBoundingClientRect().width:0,l=i+o,c=a+l+s+(n?r:0);return Math.round(c)}return 0},VZ=["axisLine","width","height","className","hide","ticks"],HZ=["viewBox"],YZ=["viewBox"];function _0(e,t){if(e==null)return{};var n,r,i=UZ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function UZ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Ha(){return Ha=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ha.apply(null,arguments)}function zA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Gt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zA(Object(n),!0).forEach(function(r){KZ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function KZ(e,t,n){return(t=qZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qZ(e){var t=GZ(e,"string");return typeof t=="symbol"?t:t+""}function GZ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var S0={x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"};function XZ(e){var{x:t,y:n,width:r,height:i,orientation:o,mirror:a,axisLine:s,otherSvgProps:l}=e;if(!s)return null;var c=Gt(Gt(Gt({},l),lt(s,!1)),{},{fill:"none"});if(o==="top"||o==="bottom"){var u=+(o==="top"&&!a||o==="bottom"&&a);c=Gt(Gt({},c),{},{x1:t,y1:n+u*i,x2:t+r,y2:n+u*i})}else{var d=+(o==="left"&&!a||o==="right"&&a);c=Gt(Gt({},c),{},{x1:t+d*r,y1:n,x2:t+d*r,y2:n+i})}return O.createElement("line",Ha({},c,{className:ie("recharts-cartesian-axis-line",Oa(s,"className"))}))}function QZ(e,t,n,r,i,o,a,s,l){var c,u,d,f,p,m,h=s?-1:1,g=e.tickSize||a,b=he(e.tickCoord)?e.tickCoord:e.coordinate;switch(o){case"top":c=u=e.coordinate,f=n+ +!s*i,d=f-h*g,m=d-h*l,p=b;break;case"left":d=f=e.coordinate,u=t+ +!s*r,c=u-h*g,p=c-h*l,m=b;break;case"right":d=f=e.coordinate,u=t+ +s*r,c=u+h*g,p=c+h*l,m=b;break;default:c=u=e.coordinate,f=n+ +s*i,d=f+h*g,m=d+h*l,p=b;break}return{line:{x1:c,y1:d,x2:u,y2:f},tick:{x:p,y:m}}}function ZZ(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function JZ(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function eJ(e){var{option:t,tickProps:n,value:r}=e,i,o=ie(n.className,"recharts-cartesian-axis-tick-value");if(O.isValidElement(t))i=O.cloneElement(t,Gt(Gt({},n),{},{className:o}));else if(typeof t=="function")i=t(Gt(Gt({},n),{},{className:o}));else{var a="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(a=ie(a,t?.className)),i=O.createElement(Mp,Ha({},n,{className:a}),r)}return i}function tJ(e){var{ticks:t=[],tick:n,tickLine:r,stroke:i,tickFormatter:o,unit:a,padding:s,tickTextProps:l,orientation:c,mirror:u,x:d,y:f,width:p,height:m,tickSize:h,tickMargin:g,fontSize:b,letterSpacing:S,getTicksConfig:w,events:x}=e,_=w0(Gt(Gt({},w),{},{ticks:t}),b,S),E=ZZ(c,u),C=JZ(c,u),D=kr(w),T=lt(n,!1),j=Gt(Gt({},D),{},{fill:"none"},lt(r,!1)),A=_.map((P,N)=>{var{line:M,tick:R}=QZ(P,d,f,p,m,c,h,u,g),L=Gt(Gt(Gt(Gt({textAnchor:E,verticalAnchor:C},D),{},{stroke:"none",fill:i},T),R),{},{index:N,payload:P,visibleTicksCount:_.length,tickFormatter:o,padding:s},l);return O.createElement(Ot,Ha({className:"recharts-cartesian-axis-tick",key:"tick-".concat(P.value,"-").concat(P.coordinate,"-").concat(P.tickCoord)},cc(x,P,N)),r&&O.createElement("line",Ha({},j,M,{className:ie("recharts-cartesian-axis-tick-line",Oa(r,"className"))})),n&&O.createElement(eJ,{option:n,tickProps:L,value:"".concat(typeof o=="function"?o(P.value,N):P.value).concat(a||"")}))});return A.length>0?O.createElement("g",{className:"recharts-cartesian-axis-ticks"},A):null}var nJ=k.forwardRef((e,t)=>{var{axisLine:n,width:r,height:i,className:o,hide:a,ticks:s}=e,l=_0(e,VZ),[c,u]=k.useState(""),[d,f]=k.useState(""),p=k.useRef([]);k.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var h;return zZ({ticks:p.current,label:(h=e.labelRef)===null||h===void 0?void 0:h.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var m=k.useCallback(h=>{if(h){var g=h.getElementsByClassName("recharts-cartesian-axis-tick-value");p.current=Array.from(g);var b=g[0];if(b){var S=window.getComputedStyle(b),w=S.fontSize,x=S.letterSpacing;(w!==c||x!==d)&&(u(w),f(x))}}},[c,d]);return a||r!=null&&r<=0||i!=null&&i<=0?null:O.createElement(Ot,{className:ie("recharts-cartesian-axis",o),ref:m},O.createElement(XZ,{x:e.x,y:e.y,width:r,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:n,otherSvgProps:kr(e)}),O.createElement(tJ,{ticks:s,tick:e.tick,tickLine:e.tickLine,stroke:e.stroke,tickFormatter:e.tickFormatter,unit:e.unit,padding:e.padding,tickTextProps:e.tickTextProps,orientation:e.orientation,mirror:e.mirror,x:e.x,y:e.y,width:e.width,height:e.height,tickSize:e.tickSize,tickMargin:e.tickMargin,fontSize:c,letterSpacing:d,getTicksConfig:e,events:l}),O.createElement(zD,{x:e.x,y:e.y,width:e.width,height:e.height},O.createElement(YD,{label:e.label}),e.children))}),rJ=O.memo(nJ,(e,t)=>{var{viewBox:n}=e,r=_0(e,HZ),{viewBox:i}=t,o=_0(t,YZ);return rl(n,i)&&rl(r,o)}),O0=O.forwardRef((e,t)=>{var n=Ut(e,S0);return O.createElement(rJ,Ha({},n,{ref:t}))});O0.displayName="CartesianAxis";var iJ=["x1","y1","x2","y2","key"],oJ=["offset"],aJ=["xAxisId","yAxisId"],sJ=["xAxisId","yAxisId"];function VA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Pn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?VA(Object(n),!0).forEach(function(r){lJ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lJ(e,t,n){return(t=cJ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cJ(e){var t=uJ(e,"string");return typeof t=="symbol"?t:t+""}function uJ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ya(){return Ya=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ya.apply(null,arguments)}function Kp(e,t){if(e==null)return{};var n,r,i=dJ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function dJ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var fJ=e=>{var{fill:t}=e;if(!t||t==="none")return null;var{fillOpacity:n,x:r,y:i,width:o,height:a,ry:s}=e;return O.createElement("rect",{x:r,y:i,ry:s,width:o,height:a,stroke:"none",fill:t,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function HA(e,t){var n;if(O.isValidElement(e))n=O.cloneElement(e,t);else if(typeof e=="function")n=e(t);else{var{x1:r,y1:i,x2:o,y2:a,key:s}=t,l=Kp(t,iJ),c=kr(l),{offset:u}=c,d=Kp(c,oJ);n=O.createElement("line",Ya({},d,{x1:r,y1:i,x2:o,y2:a,fill:"none",key:s}))}return n}function pJ(e){var{x:t,width:n,horizontal:r=!0,horizontalPoints:i}=e;if(!r||!i||!i.length)return null;var{xAxisId:o,yAxisId:a}=e,s=Kp(e,aJ),l=i.map((c,u)=>{var d=Pn(Pn({},s),{},{x1:t,y1:c,x2:t+n,y2:c,key:"line-".concat(u),index:u});return HA(r,d)});return O.createElement("g",{className:"recharts-cartesian-grid-horizontal"},l)}function hJ(e){var{y:t,height:n,vertical:r=!0,verticalPoints:i}=e;if(!r||!i||!i.length)return null;var{xAxisId:o,yAxisId:a}=e,s=Kp(e,sJ),l=i.map((c,u)=>{var d=Pn(Pn({},s),{},{x1:c,y1:t,x2:c,y2:t+n,key:"line-".concat(u),index:u});return HA(r,d)});return O.createElement("g",{className:"recharts-cartesian-grid-vertical"},l)}function mJ(e){var{horizontalFill:t,fillOpacity:n,x:r,y:i,width:o,height:a,horizontalPoints:s,horizontal:l=!0}=e;if(!l||!t||!t.length)return null;var c=s.map(d=>Math.round(d+i-i)).sort((d,f)=>d-f);i!==c[0]&&c.unshift(0);var u=c.map((d,f)=>{var p=!c[f+1],m=p?i+a-d:c[f+1]-d;if(m<=0)return null;var h=f%t.length;return O.createElement("rect",{key:"react-".concat(f),y:d,x:r,height:m,width:o,stroke:"none",fill:t[h],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return O.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},u)}function gJ(e){var{vertical:t=!0,verticalFill:n,fillOpacity:r,x:i,y:o,width:a,height:s,verticalPoints:l}=e;if(!t||!n||!n.length)return null;var c=l.map(d=>Math.round(d+i-i)).sort((d,f)=>d-f);i!==c[0]&&c.unshift(0);var u=c.map((d,f)=>{var p=!c[f+1],m=p?i+a-d:c[f+1]-d;if(m<=0)return null;var h=f%n.length;return O.createElement("rect",{key:"react-".concat(f),x:d,y:o,width:m,height:s,stroke:"none",fill:n[h],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return O.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},u)}var vJ=(e,t)=>{var{xAxis:n,width:r,height:i,offset:o}=e;return h2(w0(Pn(Pn(Pn({},S0),n),{},{ticks:m2(n),viewBox:{x:0,y:0,width:r,height:i}})),o.left,o.left+o.width,t)},yJ=(e,t)=>{var{yAxis:n,width:r,height:i,offset:o}=e;return h2(w0(Pn(Pn(Pn({},S0),n),{},{ticks:m2(n),viewBox:{x:0,y:0,width:r,height:i}})),o.top,o.top+o.height,t)},bJ={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0};function Rr(e){var t=Xv(),n=Qv(),r=P2(),i=Pn(Pn({},Ut(e,bJ)),{},{x:he(e.x)?e.x:r.left,y:he(e.y)?e.y:r.top,width:he(e.width)?e.width:r.width,height:he(e.height)?e.height:r.height}),{xAxisId:o,yAxisId:a,x:s,y:l,width:c,height:u,syncWithTicks:d,horizontalValues:f,verticalValues:p}=i,m=fn(),h=ce(T=>AC(T,"xAxis",o,m)),g=ce(T=>AC(T,"yAxis",a,m));if(!he(c)||c<=0||!he(u)||u<=0||!he(s)||s!==+s||!he(l)||l!==+l)return null;var b=i.verticalCoordinatesGenerator||vJ,S=i.horizontalCoordinatesGenerator||yJ,{horizontalPoints:w,verticalPoints:x}=i;if((!w||!w.length)&&typeof S=="function"){var _=f&&f.length,E=S({yAxis:g?Pn(Pn({},g),{},{ticks:_?f:g.ticks}):void 0,width:t,height:n,offset:r},_?!0:d);Kc(Array.isArray(E),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof E,"]")),Array.isArray(E)&&(w=E)}if((!x||!x.length)&&typeof b=="function"){var C=p&&p.length,D=b({xAxis:h?Pn(Pn({},h),{},{ticks:C?p:h.ticks}):void 0,width:t,height:n,offset:r},C?!0:d);Kc(Array.isArray(D),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof D,"]")),Array.isArray(D)&&(x=D)}return O.createElement("g",{className:"recharts-cartesian-grid"},O.createElement(fJ,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),O.createElement(mJ,Ya({},i,{horizontalPoints:w})),O.createElement(gJ,Ya({},i,{verticalPoints:x})),O.createElement(pJ,Ya({},i,{offset:r,horizontalPoints:w,xAxis:h,yAxis:g})),O.createElement(hJ,Ya({},i,{offset:r,verticalPoints:x,xAxis:h,yAxis:g})))}Rr.displayName="CartesianGrid";var YA=(e,t,n,r)=>Si(e,"xAxis",t,r),UA=(e,t,n,r)=>_i(e,"xAxis",t,r),KA=(e,t,n,r)=>Si(e,"yAxis",n,r),qA=(e,t,n,r)=>_i(e,"yAxis",n,r),xJ=W([Pe,YA,KA,UA,qA],(e,t,n,r,i)=>gi(e,"xAxis")?Na(t,r,!1):Na(n,i,!1)),wJ=(e,t,n,r,i)=>i;function _J(e){return e.type==="line"}var SJ=W([Bc,wJ],(e,t)=>e.filter(_J).find(n=>n.id===t)),OJ=W([Pe,YA,KA,UA,qA,SJ,xJ,Ic],(e,t,n,r,i,o,a,s)=>{var{chartData:l,dataStartIndex:c,dataEndIndex:u}=s;if(!(o==null||t==null||n==null||r==null||i==null||r.length===0||i.length===0||a==null)){var{dataKey:d,data:f}=o,p;if(f!=null&&f.length>0?p=f:p=l?.slice(c,u+1),p!=null)return UJ({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataKey:d,bandSize:a,displayedData:p})}}),EJ=["id"],PJ=["type","layout","connectNulls","needClip"],kJ=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function GA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function gr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?GA(Object(n),!0).forEach(function(r){CJ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function CJ(e,t,n){return(t=DJ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DJ(e){var t=AJ(e,"string");return typeof t=="symbol"?t:t+""}function AJ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function E0(e,t){if(e==null)return{};var n,r,i=TJ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function TJ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Ua(){return Ua=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ua.apply(null,arguments)}var MJ=e=>{var{dataKey:t,name:n,stroke:r,legendType:i,hide:o}=e;return[{inactive:o,dataKey:t,type:i,color:r,value:$o(n,t),payload:e}]};function NJ(e){var{dataKey:t,data:n,stroke:r,strokeWidth:i,fill:o,name:a,hide:s,unit:l}=e;return{dataDefinedOnItem:n,positions:void 0,settings:{stroke:r,strokeWidth:i,fill:o,dataKey:t,nameKey:void 0,name:$o(a,t),hide:s,type:e.tooltipType,color:e.stroke,unit:l}}}var XA=(e,t)=>"".concat(t,"px ").concat(e-t,"px");function jJ(e,t){for(var n=e.length%2!==0?[...e,0]:e,r=[],i=0;i<t;++i)r=[...r,...n];return r}var IJ=(e,t,n)=>{var r=n.reduce((d,f)=>d+f);if(!r)return XA(t,e);for(var i=Math.floor(e/r),o=e%r,a=t-e,s=[],l=0,c=0;l<n.length;c+=n[l],++l)if(c+n[l]>o){s=[...n.slice(0,l),o-c];break}var u=s.length%2===0?[0,a]:[a];return[...jJ(n,i),...s,...u].map(d=>"".concat(d,"px")).join(", ")};function RJ(e,t){var n;if(O.isValidElement(e))n=O.cloneElement(e,t);else if(typeof e=="function")n=e(t);else{var r=ie("recharts-line-dot",typeof e!="boolean"?e.className:"");n=O.createElement(Jb,Ua({},t,{className:r}))}return n}function LJ(e,t){return e==null?!1:t?!0:e.length===1}function FJ(e){var{clipPathId:t,points:n,props:r}=e,{dot:i,dataKey:o,needClip:a}=r;if(!LJ(n,i))return null;var{id:s}=r,l=E0(r,EJ),c=af(i),u=kr(l),d=lt(i,!0),f=n.map((m,h)=>{var g=gr(gr(gr({key:"dot-".concat(h),r:3},u),d),{},{index:h,cx:m.x,cy:m.y,dataKey:o,value:m.value,payload:m.payload,points:n});return RJ(i,g)}),p={clipPath:a?"url(#clipPath-".concat(c?"":"dots-").concat(t,")"):void 0};return O.createElement(Ot,Ua({className:"recharts-line-dots",key:"dots"},p),f)}function $J(e){var{showLabels:t,children:n,points:r}=e,i=k.useMemo(()=>r?.map(o=>{var a={x:o.x,y:o.y,width:0,height:0};return gr(gr({},a),{},{value:o.value,payload:o.payload,viewBox:a,parentViewBox:void 0,fill:void 0})}),[r]);return O.createElement(Qb,{value:t?i:null},n)}function QA(e){var{clipPathId:t,pathRef:n,points:r,strokeDasharray:i,props:o}=e,{type:a,layout:s,connectNulls:l,needClip:c}=o,u=E0(o,PJ),d=gr(gr({},lt(u,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:c?"url(#clipPath-".concat(t,")"):void 0,points:r,type:a,layout:s,connectNulls:l,strokeDasharray:i??o.strokeDasharray});return O.createElement(O.Fragment,null,r?.length>1&&O.createElement($s,Ua({},d,{pathRef:n})),O.createElement(FJ,{points:r,clipPathId:t,props:o}))}function BJ(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function WJ(e){var{clipPathId:t,props:n,pathRef:r,previousPointsRef:i,longestAnimatedLengthRef:o}=e,{points:a,strokeDasharray:s,isAnimationActive:l,animationBegin:c,animationDuration:u,animationEasing:d,animateNewValues:f,width:p,height:m,onAnimationEnd:h,onAnimationStart:g}=n,b=i.current,S=Ws(n,"recharts-line-"),[w,x]=k.useState(!1),_=!w,E=k.useCallback(()=>{typeof h=="function"&&h(),x(!1)},[h]),C=k.useCallback(()=>{typeof g=="function"&&g(),x(!0)},[g]),D=BJ(r.current),T=o.current;return O.createElement($J,{points:a,showLabels:_},n.children,O.createElement(Bs,{animationId:S,begin:c,duration:u,isActive:l,easing:d,onAnimationEnd:E,onAnimationStart:C,key:S},j=>{var A=nt(T,D+T,j),P=Math.min(A,D),N;if(l)if(s){var M="".concat(s).split(/[,\s]+/gim).map($=>parseFloat($));N=IJ(P,D,M)}else N=XA(D,P);else N=s==null?void 0:String(s);if(b){var R=b.length/a.length,L=j===1?a:a.map(($,V)=>{var z=Math.floor(V*R);if(b[z]){var B=b[z];return gr(gr({},$),{},{x:nt(B.x,$.x,j),y:nt(B.y,$.y,j)})}return f?gr(gr({},$),{},{x:nt(p*2,$.x,j),y:nt(m/2,$.y,j)}):gr(gr({},$),{},{x:$.x,y:$.y})});return i.current=L,O.createElement(QA,{props:n,points:L,clipPathId:t,pathRef:r,strokeDasharray:N})}return j>0&&D>0&&(i.current=a,o.current=P),O.createElement(QA,{props:n,points:a,clipPathId:t,pathRef:r,strokeDasharray:N})}),O.createElement(Ip,{label:n.label}))}function zJ(e){var{clipPathId:t,props:n}=e,r=k.useRef(null),i=k.useRef(0),o=k.useRef(null);return O.createElement(WJ,{props:n,clipPathId:t,previousPointsRef:r,longestAnimatedLengthRef:i,pathRef:o})}var VJ=(e,t)=>({x:e.x,y:e.y,value:e.value,errorVal:rt(e.payload,t)});class HJ extends k.Component{render(){var t,{hide:n,dot:r,points:i,className:o,xAxisId:a,yAxisId:s,top:l,left:c,width:u,height:d,id:f,needClip:p}=this.props;if(n)return null;var m=ie("recharts-line",o),h=f,{r:g=3,strokeWidth:b=2}=(t=lt(r,!1))!==null&&t!==void 0?t:{r:3,strokeWidth:2},S=af(r),w=g*2+b;return O.createElement(O.Fragment,null,O.createElement(Ot,{className:m},p&&O.createElement("defs",null,O.createElement(v0,{clipPathId:h,xAxisId:a,yAxisId:s}),!S&&O.createElement("clipPath",{id:"clipPath-dots-".concat(h)},O.createElement("rect",{x:c-w/2,y:l-w/2,width:u+w,height:d+w}))),O.createElement(EA,{xAxisId:a,yAxisId:s,data:i,dataPointFormatter:VJ,errorBarOffset:0},O.createElement(zJ,{props:this.props,clipPathId:h}))),O.createElement(p0,{activeDot:this.props.activeDot,points:i,mainColor:this.props.stroke,itemDataKey:this.props.dataKey}))}}var ZA={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:!eo.isSsr,label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0};function YJ(e){var t=Ut(e,ZA),{activeDot:n,animateNewValues:r,animationBegin:i,animationDuration:o,animationEasing:a,connectNulls:s,dot:l,hide:c,isAnimationActive:u,label:d,legendType:f,xAxisId:p,yAxisId:m,id:h}=t,g=E0(t,kJ),{needClip:b}=Wp(p,m),S=Bp(),w=vc(),x=fn(),_=ce(j=>OJ(j,p,m,x,h));if(w!=="horizontal"&&w!=="vertical"||_==null||S==null)return null;var{height:E,width:C,x:D,y:T}=S;return O.createElement(HJ,Ua({},g,{id:h,connectNulls:s,dot:l,activeDot:n,animateNewValues:r,animationBegin:i,animationDuration:o,animationEasing:a,isAnimationActive:u,hide:c,label:d,legendType:f,xAxisId:p,yAxisId:m,points:_,layout:w,height:E,width:C,left:D,top:T,needClip:b}))}function UJ(e){var{layout:t,xAxis:n,yAxis:r,xAxisTicks:i,yAxisTicks:o,dataKey:a,bandSize:s,displayedData:l}=e;return l.map((c,u)=>{var d=rt(c,a);if(t==="horizontal"){var f=Lf({axis:n,ticks:i,bandSize:s,entry:c,index:u}),p=ft(d)?null:r.scale(d);return{x:f,y:p,value:d,payload:c}}var m=ft(d)?null:n.scale(d),h=Lf({axis:r,ticks:o,bandSize:s,entry:c,index:u});return m==null||h==null?null:{x:m,y:h,value:d,payload:c}}).filter(Boolean)}function KJ(e){var t=Ut(e,ZA),n=fn();return O.createElement($p,{id:t.id,type:"line"},r=>O.createElement(O.Fragment,null,O.createElement(c0,{legendPayload:MJ(t)}),O.createElement(Fp,{fn:NJ,args:t}),O.createElement(d0,{type:"line",id:r,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:n}),O.createElement(YJ,Ua({},t,{id:r}))))}var Qo=O.memo(KJ);Qo.displayName="Line";var JA=(e,t,n,r)=>Si(e,"xAxis",t,r),eT=(e,t,n,r)=>_i(e,"xAxis",t,r),tT=(e,t,n,r)=>Si(e,"yAxis",n,r),nT=(e,t,n,r)=>_i(e,"yAxis",n,r),qJ=W([Pe,JA,tT,eT,nT],(e,t,n,r,i)=>gi(e,"xAxis")?Na(t,r,!1):Na(n,i,!1)),GJ=(e,t,n,r,i)=>i,rT=W([Bc,GJ],(e,t)=>e.filter(n=>n.type==="area").find(n=>n.id===t)),XJ=(e,t,n,r,i)=>{var o,a=rT(e,t,n,r,i);if(a!=null){var s=Pe(e),l=gi(s,"xAxis"),c;if(l?c=zc(e,"yAxis",n,r):c=zc(e,"xAxis",t,r),c!=null){var{stackId:u}=a,d=bp(a);if(!(u==null||d==null)){var f=(o=c[u])===null||o===void 0?void 0:o.stackedData;return f?.find(p=>p.key===d)}}}},QJ=W([Pe,JA,tT,eT,nT,XJ,Ic,qJ,rT],(e,t,n,r,i,o,a,s,l)=>{var{chartData:c,dataStartIndex:u,dataEndIndex:d}=a;if(!(l==null||e!=="horizontal"&&e!=="vertical"||t==null||n==null||r==null||i==null||r.length===0||i.length===0||s==null)){var{data:f}=l,p;if(f&&f.length>0?p=f:p=c?.slice(u,d+1),p!=null){var m=void 0;return yee({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataStartIndex:u,areaSettings:l,stackedData:o,displayedData:p,chartBaseValue:m,bandSize:s})}}}),ZJ=["id"],JJ=["activeDot","animationBegin","animationDuration","animationEasing","connectNulls","dot","fill","fillOpacity","hide","isAnimationActive","legendType","stroke","xAxisId","yAxisId"];function iT(e,t){if(e==null)return{};var n,r,i=eee(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function eee(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function oT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function fo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?oT(Object(n),!0).forEach(function(r){tee(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tee(e,t,n){return(t=nee(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nee(e){var t=ree(e,"string");return typeof t=="symbol"?t:t+""}function ree(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function po(){return po=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},po.apply(null,arguments)}function qp(e,t){return e&&e!=="none"?e:t}var iee=e=>{var{dataKey:t,name:n,stroke:r,fill:i,legendType:o,hide:a}=e;return[{inactive:a,dataKey:t,type:o,color:qp(r,i),value:$o(n,t),payload:e}]};function oee(e){var{dataKey:t,data:n,stroke:r,strokeWidth:i,fill:o,name:a,hide:s,unit:l}=e;return{dataDefinedOnItem:n,positions:void 0,settings:{stroke:r,strokeWidth:i,fill:o,dataKey:t,nameKey:void 0,name:$o(a,t),hide:s,type:e.tooltipType,color:qp(r,o),unit:l}}}var aee=(e,t)=>{var n;if(O.isValidElement(e))n=O.cloneElement(e,t);else if(typeof e=="function")n=e(t);else{var r=ie("recharts-area-dot",typeof e!="boolean"?e.className:"");n=O.createElement(Jb,po({},t,{className:r}))}return n};function see(e,t){return e==null?!1:t?!0:e.length===1}function lee(e){var{clipPathId:t,points:n,props:r}=e,{needClip:i,dot:o,dataKey:a}=r;if(!see(n,o))return null;var s=af(o),l=kr(r),c=lt(o,!0),u=n.map((f,p)=>{var m=fo(fo(fo({key:"dot-".concat(p),r:3},l),c),{},{index:p,cx:f.x,cy:f.y,dataKey:a,value:f.value,payload:f.payload,points:n});return aee(o,m)}),d={clipPath:i?"url(#clipPath-".concat(s?"":"dots-").concat(t,")"):void 0};return O.createElement(Ot,po({className:"recharts-area-dots"},d),u)}function cee(e){var{showLabels:t,children:n,points:r}=e,i=r.map(o=>{var a={x:o.x,y:o.y,width:0,height:0};return fo(fo({},a),{},{value:o.value,payload:o.payload,parentViewBox:void 0,viewBox:a,fill:void 0})});return O.createElement(Qb,{value:t?i:null},n)}function aT(e){var{points:t,baseLine:n,needClip:r,clipPathId:i,props:o}=e,{layout:a,type:s,stroke:l,connectNulls:c,isRange:u}=o,{id:d}=o,f=iT(o,ZJ),p=kr(f);return O.createElement(O.Fragment,null,t?.length>1&&O.createElement(Ot,{clipPath:r?"url(#clipPath-".concat(i,")"):void 0},O.createElement($s,po({},p,{id:d,points:t,connectNulls:c,type:s,baseLine:n,layout:a,stroke:"none",className:"recharts-area-area"})),l!=="none"&&O.createElement($s,po({},p,{className:"recharts-area-curve",layout:a,type:s,connectNulls:c,fill:"none",points:t})),l!=="none"&&u&&O.createElement($s,po({},p,{className:"recharts-area-curve",layout:a,type:s,connectNulls:c,fill:"none",points:n}))),O.createElement(lee,{points:t,props:f,clipPathId:i}))}function uee(e){var{alpha:t,baseLine:n,points:r,strokeWidth:i}=e,o=r[0].y,a=r[r.length-1].y;if(!pn(o)||!pn(a))return null;var s=t*Math.abs(o-a),l=Math.max(...r.map(c=>c.x||0));return he(n)?l=Math.max(n,l):n&&Array.isArray(n)&&n.length&&(l=Math.max(...n.map(c=>c.x||0),l)),he(l)?O.createElement("rect",{x:0,y:o<a?o:o-s,width:l+(i?parseInt("".concat(i),10):1),height:Math.floor(s)}):null}function dee(e){var{alpha:t,baseLine:n,points:r,strokeWidth:i}=e,o=r[0].x,a=r[r.length-1].x;if(!pn(o)||!pn(a))return null;var s=t*Math.abs(o-a),l=Math.max(...r.map(c=>c.y||0));return he(n)?l=Math.max(n,l):n&&Array.isArray(n)&&n.length&&(l=Math.max(...n.map(c=>c.y||0),l)),he(l)?O.createElement("rect",{x:o<a?o:o-s,y:0,width:s,height:Math.floor(l+(i?parseInt("".concat(i),10):1))}):null}function fee(e){var{alpha:t,layout:n,points:r,baseLine:i,strokeWidth:o}=e;return n==="vertical"?O.createElement(uee,{alpha:t,points:r,baseLine:i,strokeWidth:o}):O.createElement(dee,{alpha:t,points:r,baseLine:i,strokeWidth:o})}function pee(e){var{needClip:t,clipPathId:n,props:r,previousPointsRef:i,previousBaselineRef:o}=e,{points:a,baseLine:s,isAnimationActive:l,animationBegin:c,animationDuration:u,animationEasing:d,onAnimationStart:f,onAnimationEnd:p}=r,m=Ws(r,"recharts-area-"),[h,g]=k.useState(!1),b=!h,S=k.useCallback(()=>{typeof p=="function"&&p(),g(!1)},[p]),w=k.useCallback(()=>{typeof f=="function"&&f(),g(!0)},[f]),x=i.current,_=o.current;return O.createElement(cee,{showLabels:b,points:a},r.children,O.createElement(Bs,{animationId:m,begin:c,duration:u,isActive:l,easing:d,onAnimationEnd:S,onAnimationStart:w,key:m},E=>{if(x){var C=x.length/a.length,D=E===1?a:a.map((j,A)=>{var P=Math.floor(A*C);if(x[P]){var N=x[P];return fo(fo({},j),{},{x:nt(N.x,j.x,E),y:nt(N.y,j.y,E)})}return j}),T;return he(s)?T=nt(_,s,E):ft(s)||Sn(s)?T=nt(_,0,E):T=s.map((j,A)=>{var P=Math.floor(A*C);if(Array.isArray(_)&&_[P]){var N=_[P];return fo(fo({},j),{},{x:nt(N.x,j.x,E),y:nt(N.y,j.y,E)})}return j}),E>0&&(i.current=D,o.current=T),O.createElement(aT,{points:D,baseLine:T,needClip:t,clipPathId:n,props:r})}return E>0&&(i.current=a,o.current=s),O.createElement(Ot,null,l&&O.createElement("defs",null,O.createElement("clipPath",{id:"animationClipPath-".concat(n)},O.createElement(fee,{alpha:E,points:a,baseLine:s,layout:r.layout,strokeWidth:r.strokeWidth}))),O.createElement(Ot,{clipPath:"url(#animationClipPath-".concat(n,")")},O.createElement(aT,{points:a,baseLine:s,needClip:t,clipPathId:n,props:r})))}),O.createElement(Ip,{label:r.label}))}function hee(e){var{needClip:t,clipPathId:n,props:r}=e,i=k.useRef(null),o=k.useRef();return O.createElement(pee,{needClip:t,clipPathId:n,props:r,previousPointsRef:i,previousBaselineRef:o})}class mee extends k.PureComponent{render(){var t,{hide:n,dot:r,points:i,className:o,top:a,left:s,needClip:l,xAxisId:c,yAxisId:u,width:d,height:f,id:p,baseLine:m}=this.props;if(n)return null;var h=ie("recharts-area",o),g=p,{r:b=3,strokeWidth:S=2}=(t=lt(r,!1))!==null&&t!==void 0?t:{r:3,strokeWidth:2},w=af(r),x=b*2+S;return O.createElement(O.Fragment,null,O.createElement(Ot,{className:h},l&&O.createElement("defs",null,O.createElement(v0,{clipPathId:g,xAxisId:c,yAxisId:u}),!w&&O.createElement("clipPath",{id:"clipPath-dots-".concat(g)},O.createElement("rect",{x:s-x/2,y:a-x/2,width:d+x,height:f+x}))),O.createElement(hee,{needClip:l,clipPathId:g,props:this.props})),O.createElement(p0,{points:i,mainColor:qp(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot}),this.props.isRange&&Array.isArray(m)&&O.createElement(p0,{points:m,mainColor:qp(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot}))}}var sT={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:!eo.isSsr,legendType:"line",stroke:"#3182bd",xAxisId:0,yAxisId:0};function gee(e){var t,n=Ut(e,sT),{activeDot:r,animationBegin:i,animationDuration:o,animationEasing:a,connectNulls:s,dot:l,fill:c,fillOpacity:u,hide:d,isAnimationActive:f,legendType:p,stroke:m,xAxisId:h,yAxisId:g}=n,b=iT(n,JJ),S=vc(),w=rD(),{needClip:x}=Wp(h,g),_=fn(),{points:E,isRange:C,baseLine:D}=(t=ce(M=>QJ(M,h,g,_,e.id)))!==null&&t!==void 0?t:{},T=Bp();if(S!=="horizontal"&&S!=="vertical"||T==null||w!=="AreaChart"&&w!=="ComposedChart")return null;var{height:j,width:A,x:P,y:N}=T;return!E||!E.length?null:O.createElement(mee,po({},b,{activeDot:r,animationBegin:i,animationDuration:o,animationEasing:a,baseLine:D,connectNulls:s,dot:l,fill:c,fillOpacity:u,height:j,hide:d,layout:S,isAnimationActive:f,isRange:C,legendType:p,needClip:x,points:E,stroke:m,width:A,left:P,top:N,xAxisId:h,yAxisId:g}))}var vee=(e,t,n,r,i)=>{var o=n??t;if(he(o))return o;var a=e==="horizontal"?i:r,s=a.scale.domain();if(a.type==="number"){var l=Math.max(s[0],s[1]),c=Math.min(s[0],s[1]);return o==="dataMin"?c:o==="dataMax"||l<0?l:Math.max(Math.min(s[0],s[1]),0)}return o==="dataMin"?s[0]:o==="dataMax"?s[1]:s[0]};function yee(e){var{areaSettings:{connectNulls:t,baseValue:n,dataKey:r},stackedData:i,layout:o,chartBaseValue:a,xAxis:s,yAxis:l,displayedData:c,dataStartIndex:u,xAxisTicks:d,yAxisTicks:f,bandSize:p}=e,m=i&&i.length,h=vee(o,a,n,s,l),g=o==="horizontal",b=!1,S=c.map((x,_)=>{var E;m?E=i[u+_]:(E=rt(x,r),Array.isArray(E)?b=!0:E=[h,E]);var C=E[1]==null||m&&!t&&rt(x,r)==null;return g?{x:Lf({axis:s,ticks:d,bandSize:p,entry:x,index:_}),y:C?null:l.scale(E[1]),value:E,payload:x}:{x:C?null:s.scale(E[1]),y:Lf({axis:l,ticks:f,bandSize:p,entry:x,index:_}),value:E,payload:x}}),w;return m||b?w=S.map(x=>{var _=Array.isArray(x.value)?x.value[0]:null;return g?{x:x.x,y:_!=null&&x.y!=null?l.scale(_):null,payload:x.payload}:{x:_!=null?s.scale(_):null,y:x.y,payload:x.payload}}):w=g?l.scale(h):s.scale(h),{points:S,baseLine:w,isRange:b}}function bee(e){var t=Ut(e,sT),n=fn();return O.createElement($p,{id:t.id,type:"area"},r=>O.createElement(O.Fragment,null,O.createElement(c0,{legendPayload:iee(t)}),O.createElement(Fp,{fn:oee,args:t}),O.createElement(d0,{type:"area",id:r,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:v2(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:n,connectNulls:t.connectNulls}),O.createElement(gee,po({},t,{id:r}))))}var lT=O.memo(bee);lT.displayName="Area";var xee=["dangerouslySetInnerHTML","ticks"],wee=["id"],_ee=["domain"],See=["domain"];function P0(){return P0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},P0.apply(null,arguments)}function Gp(e,t){if(e==null)return{};var n,r,i=Oee(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Oee(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Eee(e){var t=vt();return k.useEffect(()=>(t(zX(e)),()=>{t(VX(e))}),[e,t]),null}var Pee=e=>{var{xAxisId:t,className:n}=e,r=ce(Gv),i=fn(),o="xAxis",a=ce(g=>Yo(g,o,t,i)),s=ce(g=>TC(g,o,t,i)),l=ce(g=>EC(g,t)),c=ce(g=>EU(g,t)),u=ce(g=>tC(g,t));if(l==null||c==null||u==null)return null;var{dangerouslySetInnerHTML:d,ticks:f}=e,p=Gp(e,xee),{id:m}=u,h=Gp(u,wee);return O.createElement(O0,P0({},p,h,{scale:a,x:c.x,y:c.y,width:l.width,height:l.height,className:ie("recharts-".concat(o," ").concat(o),n),viewBox:r,ticks:s}))},kee={allowDataOverflow:hr.allowDataOverflow,allowDecimals:hr.allowDecimals,allowDuplicatedCategory:hr.allowDuplicatedCategory,height:hr.height,hide:!1,mirror:hr.mirror,orientation:hr.orientation,padding:hr.padding,reversed:hr.reversed,scale:hr.scale,tickCount:hr.tickCount,type:hr.type,xAxisId:0},Cee=e=>{var t,n,r,i,o,a=Ut(e,kee);return O.createElement(O.Fragment,null,O.createElement(Eee,{interval:(t=a.interval)!==null&&t!==void 0?t:"preserveEnd",id:a.xAxisId,scale:a.scale,type:a.type,padding:a.padding,allowDataOverflow:a.allowDataOverflow,domain:a.domain,dataKey:a.dataKey,allowDuplicatedCategory:a.allowDuplicatedCategory,allowDecimals:a.allowDecimals,tickCount:a.tickCount,includeHidden:(n=a.includeHidden)!==null&&n!==void 0?n:!1,reversed:a.reversed,ticks:a.ticks,height:a.height,orientation:a.orientation,mirror:a.mirror,hide:a.hide,unit:a.unit,name:a.name,angle:(r=a.angle)!==null&&r!==void 0?r:0,minTickGap:(i=a.minTickGap)!==null&&i!==void 0?i:5,tick:(o=a.tick)!==null&&o!==void 0?o:!0,tickFormatter:a.tickFormatter}),O.createElement(Pee,a))},Dee=(e,t)=>{var{domain:n}=e,r=Gp(e,_ee),{domain:i}=t,o=Gp(t,See);return rl(r,o)?Array.isArray(n)&&n.length===2&&Array.isArray(i)&&i.length===2?n[0]===i[0]&&n[1]===i[1]:rl({domain:n},{domain:i}):!1},vr=O.memo(Cee,Dee);vr.displayName="XAxis";var Aee=["dangerouslySetInnerHTML","ticks"],Tee=["id"],Mee=["domain"],Nee=["domain"];function k0(){return k0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},k0.apply(null,arguments)}function Xp(e,t){if(e==null)return{};var n,r,i=jee(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function jee(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Iee(e){var t=vt();return k.useEffect(()=>(t(HX(e)),()=>{t(YX(e))}),[e,t]),null}var Ree=e=>{var{yAxisId:t,className:n,width:r,label:i}=e,o=k.useRef(null),a=k.useRef(null),s=ce(Gv),l=fn(),c=vt(),u="yAxis",d=ce(_=>Yo(_,u,t,l)),f=ce(_=>PC(_,t)),p=ce(_=>kU(_,t)),m=ce(_=>TC(_,u,t,l)),h=ce(_=>nC(_,t));if(k.useLayoutEffect(()=>{if(!(r!=="auto"||!f||Ub(i)||k.isValidElement(i)||h==null)){var _=o.current;if(_){var E=_.getCalculatedWidth();Math.round(f.width)!==Math.round(E)&&c(UX({id:t,width:E}))}}},[m,f,c,i,t,r,h]),f==null||p==null||h==null)return null;var{dangerouslySetInnerHTML:g,ticks:b}=e,S=Xp(e,Aee),{id:w}=h,x=Xp(h,Tee);return O.createElement(O0,k0({},S,x,{ref:o,labelRef:a,scale:d,x:p.x,y:p.y,tickTextProps:r==="auto"?{width:void 0}:{width:r},width:f.width,height:f.height,className:ie("recharts-".concat(u," ").concat(u),n),viewBox:s,ticks:m}))},Lee={allowDataOverflow:mr.allowDataOverflow,allowDecimals:mr.allowDecimals,allowDuplicatedCategory:mr.allowDuplicatedCategory,hide:!1,mirror:mr.mirror,orientation:mr.orientation,padding:mr.padding,reversed:mr.reversed,scale:mr.scale,tickCount:mr.tickCount,type:mr.type,width:mr.width,yAxisId:0},Fee=e=>{var t,n,r,i,o,a=Ut(e,Lee);return O.createElement(O.Fragment,null,O.createElement(Iee,{interval:(t=a.interval)!==null&&t!==void 0?t:"preserveEnd",id:a.yAxisId,scale:a.scale,type:a.type,domain:a.domain,allowDataOverflow:a.allowDataOverflow,dataKey:a.dataKey,allowDuplicatedCategory:a.allowDuplicatedCategory,allowDecimals:a.allowDecimals,tickCount:a.tickCount,padding:a.padding,includeHidden:(n=a.includeHidden)!==null&&n!==void 0?n:!1,reversed:a.reversed,ticks:a.ticks,width:a.width,orientation:a.orientation,mirror:a.mirror,hide:a.hide,unit:a.unit,name:a.name,angle:(r=a.angle)!==null&&r!==void 0?r:0,minTickGap:(i=a.minTickGap)!==null&&i!==void 0?i:5,tick:(o=a.tick)!==null&&o!==void 0?o:!0,tickFormatter:a.tickFormatter}),O.createElement(Ree,a))},$ee=(e,t)=>{var{domain:n}=e,r=Xp(e,Mee),{domain:i}=t,o=Xp(t,Nee);return rl(r,o)?Array.isArray(n)&&n.length===2&&Array.isArray(i)&&i.length===2?n[0]===i[0]&&n[1]===i[1]:rl({domain:n},{domain:i}):!1},Gn=O.memo(Fee,$ee);Gn.displayName="YAxis";var Qp={exports:{}},C0={};/**
|
|
209
|
+
`).concat(x.x,",").concat(x.y),E=ft(e.id)?sc("recharts-radial-line-"):e.id;return O.createElement("text",uo({},r,{dominantBaseline:"central",className:ie("recharts-radial-bar-label",a)}),O.createElement("defs",null,O.createElement("path",{id:E,d:_})),O.createElement("textPath",{xlinkHref:"#".concat(E)},n))},oG=(e,t,n)=>{var{cx:r,cy:i,innerRadius:o,outerRadius:a,startAngle:s,endAngle:l}=e,c=(s+l)/2;if(n==="outside"){var{x:u,y:d}=Wt(r,i,a+t,c);return{x:u,y:d,textAnchor:u>=r?"start":"end",verticalAnchor:"middle"}}if(n==="center")return{x:r,y:i,textAnchor:"middle",verticalAnchor:"middle"};if(n==="centerTop")return{x:r,y:i,textAnchor:"middle",verticalAnchor:"start"};if(n==="centerBottom")return{x:r,y:i,textAnchor:"middle",verticalAnchor:"end"};var f=(o+a)/2,{x:p,y:m}=Wt(r,i,f,c);return{x:p,y:m,textAnchor:"middle",verticalAnchor:"middle"}},HD=e=>"cx"in e&&he(e.cx),aG=(e,t)=>{var{parentViewBox:n,offset:r,position:i}=e,o;n!=null&&!HD(n)&&(o=n);var{x:a,y:s,width:l,height:c}=t,u=c>=0?1:-1,d=u*r,f=u>0?"end":"start",p=u>0?"start":"end",m=l>=0?1:-1,h=m*r,g=m>0?"end":"start",b=m>0?"start":"end";if(i==="top"){var S={x:a+l/2,y:s-u*r,textAnchor:"middle",verticalAnchor:f};return Rt(Rt({},S),o?{height:Math.max(s-o.y,0),width:l}:{})}if(i==="bottom"){var w={x:a+l/2,y:s+c+d,textAnchor:"middle",verticalAnchor:p};return Rt(Rt({},w),o?{height:Math.max(o.y+o.height-(s+c),0),width:l}:{})}if(i==="left"){var x={x:a-h,y:s+c/2,textAnchor:g,verticalAnchor:"middle"};return Rt(Rt({},x),o?{width:Math.max(x.x-o.x,0),height:c}:{})}if(i==="right"){var _={x:a+l+h,y:s+c/2,textAnchor:b,verticalAnchor:"middle"};return Rt(Rt({},_),o?{width:Math.max(o.x+o.width-_.x,0),height:c}:{})}var E=o?{width:l,height:c}:{};return i==="insideLeft"?Rt({x:a+h,y:s+c/2,textAnchor:b,verticalAnchor:"middle"},E):i==="insideRight"?Rt({x:a+l-h,y:s+c/2,textAnchor:g,verticalAnchor:"middle"},E):i==="insideTop"?Rt({x:a+l/2,y:s+d,textAnchor:"middle",verticalAnchor:p},E):i==="insideBottom"?Rt({x:a+l/2,y:s+c-d,textAnchor:"middle",verticalAnchor:f},E):i==="insideTopLeft"?Rt({x:a+h,y:s+d,textAnchor:b,verticalAnchor:p},E):i==="insideTopRight"?Rt({x:a+l-h,y:s+d,textAnchor:g,verticalAnchor:p},E):i==="insideBottomLeft"?Rt({x:a+h,y:s+c-d,textAnchor:b,verticalAnchor:f},E):i==="insideBottomRight"?Rt({x:a+l-h,y:s+c-d,textAnchor:g,verticalAnchor:f},E):i&&typeof i=="object"&&(he(i.x)||Ea(i.x))&&(he(i.y)||Ea(i.y))?Rt({x:a+On(i.x,l),y:s+On(i.y,c),textAnchor:"end",verticalAnchor:"end"},E):Rt({x:a+l/2,y:s+c/2,textAnchor:"middle",verticalAnchor:"middle"},E)},sG={offset:5};function qo(e){var t=Kt(e,sG),{viewBox:n,position:r,value:i,children:o,content:a,className:s="",textBreakAll:l,labelRef:c}=t,u=tG(),d=VD(),f=r==="center"?d:u??d,p=n||f;if(!p||ft(i)&&ft(o)&&!k.isValidElement(a)&&typeof a!="function")return null;var m=Rt(Rt({},t),{},{viewBox:p});if(k.isValidElement(a)){var{labelRef:h}=m,g=Gq(m,qq);return k.cloneElement(a,g)}var b;if(typeof a=="function"){if(b=k.createElement(a,m),k.isValidElement(b))return b}else b=nG(t);var S=HD(p),w=lt(t,!0);if(S&&(r==="insideStart"||r==="insideEnd"||r==="end"))return iG(t,r,b,w,p);var x=S?oG(p,t.offset,t.position):aG(t,p);return O.createElement(Mp,uo({ref:c,className:ie("recharts-label",s)},w,x,{breakAll:l}),b)}qo.displayName="Label";var lG=(e,t,n)=>{if(!e)return null;var r={viewBox:t,labelRef:n};return e===!0?O.createElement(qo,uo({key:"label-implicit"},r)):Pr(e)?O.createElement(qo,uo({key:"label-implicit",value:e},r)):k.isValidElement(e)?e.type===qo?k.cloneElement(e,Rt({key:"label-implicit"},r)):O.createElement(qo,uo({key:"label-implicit",content:e},r)):Ub(e)?O.createElement(qo,uo({key:"label-implicit",content:e},r)):e&&typeof e=="object"?O.createElement(qo,uo({},e,{key:"label-implicit"},r)):null};function YD(e){var{label:t}=e,n=VD();return lG(t,n)||null}var Kb={},qb={},UD;function cG(){return UD||(UD=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n[n.length-1]}e.last=t})(qb)),qb}var Gb={},KD;function uG(){return KD||(KD=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Array.isArray(n)?n:Array.from(n)}e.toArray=t})(Gb)),Gb}var qD;function dG(){return qD||(qD=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=cG(),n=uG(),r=Gg();function i(o){if(r.isArrayLike(o))return t.last(n.toArray(o))}e.last=i})(Kb)),Kb}var Xb,GD;function fG(){return GD||(GD=1,Xb=dG().last),Xb}var pG=fG();const hG=Ri(pG);var mG=["valueAccessor"],gG=["dataKey","clockWise","id","textBreakAll"];function Np(){return Np=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Np.apply(null,arguments)}function XD(e,t){if(e==null)return{};var n,r,i=vG(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function vG(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var yG=e=>Array.isArray(e.value)?hG(e.value):e.value,QD=k.createContext(void 0),Qb=QD.Provider,ZD=k.createContext(void 0),bG=ZD.Provider;function xG(){return k.useContext(QD)}function wG(){return k.useContext(ZD)}function jp(e){var{valueAccessor:t=yG}=e,n=XD(e,mG),{dataKey:r,clockWise:i,id:o,textBreakAll:a}=n,s=XD(n,gG),l=xG(),c=wG(),u=l||c;return!u||!u.length?null:O.createElement(Ot,{className:"recharts-label-list"},u.map((d,f)=>{var p,m=ft(r)?t(d,f):rt(d&&d.payload,r),h=ft(o)?{}:{id:"".concat(o,"-").concat(f)};return O.createElement(qo,Np({},lt(d,!0),s,h,{fill:(p=n.fill)!==null&&p!==void 0?p:d.fill,parentViewBox:d.parentViewBox,value:m,textBreakAll:a,viewBox:d.viewBox,key:"label-".concat(f),index:f}))}))}jp.displayName="LabelList";function Ip(e){var{label:t}=e;return t?t===!0?O.createElement(jp,{key:"labelList-implicit"}):O.isValidElement(t)||Ub(t)?O.createElement(jp,{key:"labelList-implicit",content:t}):typeof t=="object"?O.createElement(jp,Np({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function Zb(){return Zb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zb.apply(null,arguments)}var Jb=e=>{var{cx:t,cy:n,r,className:i}=e,o=ie("recharts-dot",i);return t===+t&&n===+n&&r===+r?O.createElement("circle",Zb({},kr(e),Sg(e),{className:o,cx:t,cy:n,r})):null},JD=e=>e.graphicalItems.polarItems,_G=W([bt,Fc],cb),e0=W([JD,jt,_G],ub),SG=W([e0],db),t0=W([SG,Gy],fb),OG=W([t0,jt,e0],hb),EG=W([t0,jt,e0],(e,t,n)=>n.length>0?e.flatMap(r=>n.flatMap(i=>{var o,a=rt(r,(o=t.dataKey)!==null&&o!==void 0?o:i.dataKey);return{value:a,errorDomain:[]}})).filter(Boolean):t?.dataKey!=null?e.map(r=>({value:rt(r,t.dataKey),errorDomain:[]})):e.map(r=>({value:r,errorDomain:[]}))),eA=()=>{},PG=W([jt,bC,eA,EG,eA,Pe,bt],gb),tA=W([jt,Pe,t0,OG,Lc,bt,PG],vb),kG=W([tA,jt,Js],xb);W([jt,tA,kG,bt],_b);var CG={radiusAxis:{},angleAxis:{}},nA=dr({name:"polarAxis",initialState:CG,reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),{addRadiusAxis:ife,removeRadiusAxis:ofe,addAngleAxis:afe,removeAngleAxis:sfe}=nA.actions,DG=nA.reducer;function rA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function iA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rA(Object(n),!0).forEach(function(r){AG(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function AG(e,t,n){return(t=TG(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TG(e){var t=MG(e,"string");return typeof t=="symbol"?t:t+""}function MG(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var NG=(e,t)=>t,n0=W([JD,NG],(e,t)=>e.filter(n=>n.type==="pie").find(n=>n.id===t)),jG=[],r0=(e,t,n)=>n?.length===0?jG:n,oA=W([Gy,n0,r0],(e,t,n)=>{var{chartData:r}=e;if(t!=null){var i;if(t?.data!=null&&t.data.length>0?i=t.data:i=r,(!i||!i.length)&&n!=null&&(i=n.map(o=>iA(iA({},t.presentationProps),o.props))),i!=null)return i}}),IG=W([oA,n0,r0],(e,t,n)=>{if(!(e==null||t==null))return e.map((r,i)=>{var o,a=rt(r,t.nameKey,t.name),s;return n!=null&&(o=n[i])!==null&&o!==void 0&&(o=o.props)!==null&&o!==void 0&&o.fill?s=n[i].props.fill:typeof r=="object"&&r!=null&&"fill"in r?s=r.fill:s=t.fill,{value:$o(a,t.dataKey),color:s,payload:r,type:t.legendType}})}),RG=W([oA,n0,r0,Ut],(e,t,n,r)=>{if(!(t==null||e==null))return NX({offset:r,pieSettings:t,displayedData:e,cells:n})}),i0={},aA;function LG(){return aA||(aA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){if(typeof n!="object"||n==null)return!1;if(Object.getPrototypeOf(n)===null)return!0;if(Object.prototype.toString.call(n)!=="[object Object]"){const i=n[Symbol.toStringTag];return i==null||!Object.getOwnPropertyDescriptor(n,Symbol.toStringTag)?.writable?!1:n.toString()===`[object ${i}]`}let r=n;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(n)===r}e.isPlainObject=t})(i0)),i0}var o0,sA;function FG(){return sA||(sA=1,o0=LG().isPlainObject),o0}var $G=FG();const BG=Ri($G);function lA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function cA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lA(Object(n),!0).forEach(function(r){WG(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function WG(e,t,n){return(t=zG(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zG(e){var t=VG(e,"string");return typeof t=="symbol"?t:t+""}function VG(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Rp(){return Rp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rp.apply(null,arguments)}var uA=(e,t,n,r,i)=>{var o=n-r,a;return a="M ".concat(e,",").concat(t),a+="L ".concat(e+n,",").concat(t),a+="L ".concat(e+n-o/2,",").concat(t+i),a+="L ".concat(e+n-o/2-r,",").concat(t+i),a+="L ".concat(e,",").concat(t," Z"),a},HG={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},YG=e=>{var t=Kt(e,HG),{x:n,y:r,upperWidth:i,lowerWidth:o,height:a,className:s}=t,{animationEasing:l,animationDuration:c,animationBegin:u,isUpdateAnimationActive:d}=t,f=k.useRef(),[p,m]=k.useState(-1),h=k.useRef(i),g=k.useRef(o),b=k.useRef(a),S=k.useRef(n),w=k.useRef(r),x=Ws(e,"trapezoid-");if(k.useEffect(()=>{if(f.current&&f.current.getTotalLength)try{var M=f.current.getTotalLength();M&&m(M)}catch{}},[]),n!==+n||r!==+r||i!==+i||o!==+o||a!==+a||i===0&&o===0||a===0)return null;var _=ie("recharts-trapezoid",s);if(!d)return O.createElement("g",null,O.createElement("path",Rp({},lt(t,!0),{className:_,d:uA(n,r,i,o,a)})));var E=h.current,C=g.current,D=b.current,T=S.current,j=w.current,A="0px ".concat(p===-1?1:p,"px"),P="".concat(p,"px 0px"),N=V2(["strokeDasharray"],c,l);return O.createElement(Bs,{animationId:x,key:x,canBegin:p>0,duration:c,easing:l,isActive:d,begin:u},M=>{var R=nt(E,i,M),L=nt(C,o,M),$=nt(D,a,M),V=nt(T,n,M),z=nt(j,r,M);f.current&&(h.current=R,g.current=L,b.current=$,S.current=V,w.current=z);var B=M>0?{transition:N,strokeDasharray:P}:{strokeDasharray:A};return O.createElement("path",Rp({},lt(t,!0),{className:_,d:uA(V,z,R,L,$),ref:f,style:cA(cA({},B),t.style)}))})},UG=["option","shapeType","propTransformer","activeClassName","isActive"];function KG(e,t){if(e==null)return{};var n,r,i=qG(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function qG(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function dA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Lp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dA(Object(n),!0).forEach(function(r){GG(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function GG(e,t,n){return(t=XG(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function XG(e){var t=QG(e,"string");return typeof t=="symbol"?t:t+""}function QG(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ZG(e,t){return Lp(Lp({},t),e)}function JG(e,t){return e==="symbols"}function fA(e){var{shapeType:t,elementProps:n}=e;switch(t){case"rectangle":return O.createElement(eP,n);case"trapezoid":return O.createElement(YG,n);case"sector":return O.createElement(rP,n);case"symbols":if(JG(t))return O.createElement($g,n);break;default:return null}}function eX(e){return k.isValidElement(e)?e.props:e}function pA(e){var{option:t,shapeType:n,propTransformer:r=ZG,activeClassName:i="recharts-active-shape",isActive:o}=e,a=KG(e,UG),s;if(k.isValidElement(t))s=k.cloneElement(t,Lp(Lp({},a),eX(t)));else if(typeof t=="function")s=t(a);else if(BG(t)&&typeof t!="boolean"){var l=r(t,a);s=O.createElement(fA,{shapeType:n,elementProps:l})}else{var c=a;s=O.createElement(fA,{shapeType:n,elementProps:c})}return o?O.createElement(Ot,{className:i},s):s}var a0=(e,t)=>{var n=vt();return(r,i)=>o=>{e?.(r,i,o),n(LC({activeIndex:String(i),activeDataKey:t,activeCoordinate:r.tooltipPosition}))}},s0=e=>{var t=vt();return(n,r)=>i=>{e?.(n,r,i),t(FU())}},l0=(e,t)=>{var n=vt();return(r,i)=>o=>{e?.(r,i,o),n($U({activeIndex:String(i),activeDataKey:t,activeCoordinate:r.tooltipPosition}))}};function Fp(e){var{fn:t,args:n}=e,r=vt(),i=fn();return k.useEffect(()=>{if(!i){var o=t(n);return r(IU(o)),()=>{r(RU(o))}}},[t,n,r,i]),null}var hA=()=>{};function c0(e){var{legendPayload:t}=e,n=vt(),r=fn();return k.useEffect(()=>r?hA:(n(D2(t)),()=>{n(A2(t))}),[n,r,t]),null}function tX(e){var{legendPayload:t}=e,n=vt(),r=ce(Pe);return k.useEffect(()=>r!=="centric"&&r!=="radial"?hA:(n(D2(t)),()=>{n(A2(t))}),[n,r,t]),null}var u0,nX=()=>{var[e]=O.useState(()=>sc("uid-"));return e},rX=(u0=O.useId)!==null&&u0!==void 0?u0:nX;function iX(e,t){var n=rX();return t||(e?"".concat(e,"-").concat(n):n)}var oX=k.createContext(void 0),$p=e=>{var{id:t,type:n,children:r}=e,i=iX("recharts-".concat(n),t);return O.createElement(oX.Provider,{value:i},r(i))},aX={cartesianItems:[],polarItems:[]},mA=dr({name:"graphicalItems",initialState:aX,reducers:{addCartesianGraphicalItem(e,t){e.cartesianItems.push(t.payload)},replaceCartesianGraphicalItem(e,t){var{prev:n,next:r}=t.payload,i=Qi(e).cartesianItems.indexOf(n);i>-1&&(e.cartesianItems[i]=r)},removeCartesianGraphicalItem(e,t){var n=Qi(e).cartesianItems.indexOf(t.payload);n>-1&&e.cartesianItems.splice(n,1)},addPolarGraphicalItem(e,t){e.polarItems.push(t.payload)},removePolarGraphicalItem(e,t){var n=Qi(e).polarItems.indexOf(t.payload);n>-1&&e.polarItems.splice(n,1)}}}),{addCartesianGraphicalItem:sX,replaceCartesianGraphicalItem:lX,removeCartesianGraphicalItem:cX,addPolarGraphicalItem:uX,removePolarGraphicalItem:dX}=mA.actions,fX=mA.reducer;function d0(e){var t=vt(),n=k.useRef(null);return k.useEffect(()=>{n.current===null?t(sX(e)):n.current!==e&&t(lX({prev:n.current,next:e})),n.current=e},[t,e]),k.useEffect(()=>()=>{n.current&&(t(cX(n.current)),n.current=null)},[t]),null}function pX(e){var t=vt();return k.useEffect(()=>(t(uX(e)),()=>{t(dX(e))}),[t,e]),null}var hX=["onMouseEnter","onClick","onMouseLeave"],mX=["id"],gX=["id"];function f0(e,t){if(e==null)return{};var n,r,i=vX(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function vX(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function gA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function xt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gA(Object(n),!0).forEach(function(r){yX(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yX(e,t,n){return(t=bX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bX(e){var t=xX(e,"string");return typeof t=="symbol"?t:t+""}function xX(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Go(){return Go=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Go.apply(null,arguments)}function wX(e){var t=k.useMemo(()=>Eg(e.children,Ht),[e.children]),n=ce(r=>IG(r,e.id,t));return n==null?null:O.createElement(tX,{legendPayload:n})}function _X(e){var{dataKey:t,nameKey:n,sectors:r,stroke:i,strokeWidth:o,fill:a,name:s,hide:l,tooltipType:c}=e;return{dataDefinedOnItem:r.map(u=>u.tooltipPayload),positions:r.map(u=>u.tooltipPosition),settings:{stroke:i,strokeWidth:o,fill:a,dataKey:t,nameKey:n,name:$o(s,t),hide:l,type:c,color:a,unit:""}}}var SX=(e,t)=>e>t?"start":e<t?"end":"middle",OX=(e,t,n)=>On(typeof t=="function"?t(e):t,n,n*.8),EX=(e,t,n)=>{var{top:r,left:i,width:o,height:a}=t,s=d2(o,a),l=i+On(e.cx,o,o/2),c=r+On(e.cy,a,a/2),u=On(e.innerRadius,s,0),d=OX(n,e.outerRadius,s),f=e.maxRadius||Math.sqrt(o*o+a*a)/2;return{cx:l,cy:c,innerRadius:u,outerRadius:d,maxRadius:f}},PX=(e,t)=>{var n=Jt(t-e),r=Math.min(Math.abs(t-e),360);return n*r};function kX(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var CX=(e,t)=>{if(O.isValidElement(e))return O.cloneElement(e,t);if(typeof e=="function")return e(t);var n=ie("recharts-pie-label-line",typeof e!="boolean"?e.className:"");return O.createElement($s,Go({},t,{type:"linear",className:n}))},DX=(e,t,n)=>{if(O.isValidElement(e))return O.cloneElement(e,t);var r=n;if(typeof e=="function"&&(r=e(t),O.isValidElement(r)))return r;var i=ie("recharts-pie-label-text",kX(e));return O.createElement(Mp,Go({},t,{alignmentBaseline:"middle",className:i}),r)};function AX(e){var{sectors:t,props:n,showLabels:r}=e,{label:i,labelLine:o,dataKey:a}=n;if(!r||!i||!t)return null;var s=kr(n),l=lt(i,!1),c=lt(o,!1),u=typeof i=="object"&&"offsetRadius"in i&&typeof i.offsetRadius=="number"&&i.offsetRadius||20,d=t.map((f,p)=>{var m=(f.startAngle+f.endAngle)/2,h=Wt(f.cx,f.cy,f.outerRadius+u,m),g=xt(xt(xt(xt({},s),f),{},{stroke:"none"},l),{},{index:p,textAnchor:SX(h.x,f.cx)},h),b=xt(xt(xt(xt({},s),f),{},{fill:"none",stroke:f.fill},c),{},{index:p,points:[Wt(f.cx,f.cy,f.outerRadius,m),h],key:"line"});return O.createElement(Ot,{key:"label-".concat(f.startAngle,"-").concat(f.endAngle,"-").concat(f.midAngle,"-").concat(p)},o&&CX(o,b),DX(i,g,rt(f,a)))});return O.createElement(Ot,{className:"recharts-pie-labels"},d)}function TX(e){var{sectors:t,props:n,showLabels:r}=e,{label:i}=n;return typeof i=="object"&&i!=null&&"position"in i?O.createElement(Ip,{label:i}):O.createElement(AX,{sectors:t,props:n,showLabels:r})}function MX(e){var{sectors:t,activeShape:n,inactiveShape:r,allOtherPieProps:i}=e,o=ce(Ko),{onMouseEnter:a,onClick:s,onMouseLeave:l}=i,c=f0(i,hX),u=a0(a,i.dataKey),d=s0(l),f=l0(s,i.dataKey);return t==null||t.length===0?null:O.createElement(O.Fragment,null,t.map((p,m)=>{if(p?.startAngle===0&&p?.endAngle===0&&t.length!==1)return null;var h=n&&String(m)===o,g=o?r:null,b=h?n:g,S=xt(xt({},p),{},{stroke:p.stroke,tabIndex:-1,[S2]:m,[O2]:i.dataKey});return O.createElement(Ot,Go({tabIndex:-1,className:"recharts-pie-sector"},cc(c,p,m),{onMouseEnter:u(p,m),onMouseLeave:d(p,m),onClick:f(p,m),key:"sector-".concat(p?.startAngle,"-").concat(p?.endAngle,"-").concat(p.midAngle,"-").concat(m)}),O.createElement(pA,Go({option:b,isActive:h,shapeType:"sector"},S)))}))}function NX(e){var t,{pieSettings:n,displayedData:r,cells:i,offset:o}=e,{cornerRadius:a,startAngle:s,endAngle:l,dataKey:c,nameKey:u,tooltipType:d}=n,f=Math.abs(n.minAngle),p=PX(s,l),m=Math.abs(p),h=r.length<=1?0:(t=n.paddingAngle)!==null&&t!==void 0?t:0,g=r.filter(E=>rt(E,c,0)!==0).length,b=(m>=360?g:g-1)*h,S=m-g*f-b,w=r.reduce((E,C)=>{var D=rt(C,c,0);return E+(he(D)?D:0)},0),x;if(w>0){var _;x=r.map((E,C)=>{var D=rt(E,c,0),T=rt(E,u,C),j=EX(n,o,E),A=(he(D)?D:0)/w,P,N=xt(xt({},E),i&&i[C]&&i[C].props);C?P=_.endAngle+Jt(p)*h*(D!==0?1:0):P=s;var M=P+Jt(p)*((D!==0?f:0)+A*S),R=(P+M)/2,L=(j.innerRadius+j.outerRadius)/2,$=[{name:T,value:D,payload:N,dataKey:c,type:d}],V=Wt(j.cx,j.cy,L,R);return _=xt(xt(xt(xt({},n.presentationProps),{},{percent:A,cornerRadius:a,name:T,tooltipPayload:$,midAngle:R,middleRadius:L,tooltipPosition:V},N),j),{},{value:D,startAngle:P,endAngle:M,payload:N,paddingAngle:Jt(p)*h}),_})}return x}function jX(e){var{showLabels:t,sectors:n,children:r}=e,i=k.useMemo(()=>!t||!n?[]:n.map(o=>({value:o.value,payload:o.payload,clockWise:!1,parentViewBox:void 0,viewBox:{cx:o.cx,cy:o.cy,innerRadius:o.innerRadius,outerRadius:o.outerRadius,startAngle:o.startAngle,endAngle:o.endAngle,clockWise:!1},fill:o.fill})),[n,t]);return O.createElement(bG,{value:t?i:void 0},r)}function IX(e){var{props:t,previousSectorsRef:n}=e,{sectors:r,isAnimationActive:i,animationBegin:o,animationDuration:a,animationEasing:s,activeShape:l,inactiveShape:c,onAnimationStart:u,onAnimationEnd:d}=t,f=Ws(t,"recharts-pie-"),p=n.current,[m,h]=k.useState(!1),g=k.useCallback(()=>{typeof d=="function"&&d(),h(!1)},[d]),b=k.useCallback(()=>{typeof u=="function"&&u(),h(!0)},[u]);return O.createElement(jX,{showLabels:!m,sectors:r},O.createElement(Bs,{animationId:f,begin:o,duration:a,isActive:i,easing:s,onAnimationStart:b,onAnimationEnd:g,key:f},S=>{var w=[],x=r&&r[0],_=x?.startAngle;return r?.forEach((E,C)=>{var D=p&&p[C],T=C>0?Oa(E,"paddingAngle",0):0;if(D){var j=nt(D.endAngle-D.startAngle,E.endAngle-E.startAngle,S),A=xt(xt({},E),{},{startAngle:_+T,endAngle:_+j+T});w.push(A),_=A.endAngle}else{var{endAngle:P,startAngle:N}=E,M=nt(0,P-N,S),R=xt(xt({},E),{},{startAngle:_+T,endAngle:_+M+T});w.push(R),_=R.endAngle}}),n.current=w,O.createElement(Ot,null,O.createElement(MX,{sectors:w,activeShape:l,inactiveShape:c,allOtherPieProps:t}))}),O.createElement(TX,{showLabels:!m,sectors:r,props:t}),t.children)}var RX={animationBegin:400,animationDuration:1500,animationEasing:"ease",cx:"50%",cy:"50%",dataKey:"value",endAngle:360,fill:"#808080",hide:!1,innerRadius:0,isAnimationActive:!eo.isSsr,labelLine:!0,legendType:"rect",minAngle:0,nameKey:"name",outerRadius:"80%",paddingAngle:0,rootTabIndex:0,startAngle:0,stroke:"#fff"};function LX(e){var{id:t}=e,n=f0(e,mX),{hide:r,className:i,rootTabIndex:o}=e,a=k.useMemo(()=>Eg(e.children,Ht),[e.children]),s=ce(u=>RG(u,t,a)),l=k.useRef(null),c=ie("recharts-pie",i);return r||s==null?(l.current=null,O.createElement(Ot,{tabIndex:o,className:c})):O.createElement(O.Fragment,null,O.createElement(Fp,{fn:_X,args:xt(xt({},e),{},{sectors:s})}),O.createElement(Ot,{tabIndex:o,className:c},O.createElement(IX,{props:xt(xt({},n),{},{sectors:s}),previousSectorsRef:l})))}function Oi(e){var t=Kt(e,RX),{id:n}=t,r=f0(t,gX),i=kr(r);return O.createElement($p,{id:n,type:"pie"},o=>O.createElement(O.Fragment,null,O.createElement(pX,{type:"pie",id:o,data:r.data,dataKey:r.dataKey,hide:r.hide,angleAxisId:0,radiusAxisId:0,name:r.name,nameKey:r.nameKey,tooltipType:r.tooltipType,legendType:r.legendType,fill:r.fill,cx:r.cx,cy:r.cy,startAngle:r.startAngle,endAngle:r.endAngle,paddingAngle:r.paddingAngle,minAngle:r.minAngle,innerRadius:r.innerRadius,outerRadius:r.outerRadius,cornerRadius:r.cornerRadius,presentationProps:i,maxRadius:t.maxRadius}),O.createElement(wX,Go({},r,{id:o})),O.createElement(LX,Go({},r,{id:o}))))}Oi.displayName="Pie";function vA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function yA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?vA(Object(n),!0).forEach(function(r){FX(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function FX(e,t,n){return(t=$X(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $X(e){var t=BX(e,"string");return typeof t=="symbol"?t:t+""}function BX(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var WX={xAxis:{},yAxis:{},zAxis:{}},bA=dr({name:"cartesianAxis",initialState:WX,reducers:{addXAxis(e,t){e.xAxis[t.payload.id]=t.payload},removeXAxis(e,t){delete e.xAxis[t.payload.id]},addYAxis(e,t){e.yAxis[t.payload.id]=t.payload},removeYAxis(e,t){delete e.yAxis[t.payload.id]},addZAxis(e,t){e.zAxis[t.payload.id]=t.payload},removeZAxis(e,t){delete e.zAxis[t.payload.id]},updateYAxisWidth(e,t){var{id:n,width:r}=t.payload;e.yAxis[n]&&(e.yAxis[n]=yA(yA({},e.yAxis[n]),{},{width:r}))}}}),{addXAxis:zX,removeXAxis:VX,addYAxis:HX,removeYAxis:YX,addZAxis:lfe,removeZAxis:cfe,updateYAxisWidth:UX}=bA.actions,KX=bA.reducer,qX=W([Ut],e=>{if(e)return{top:e.top,bottom:e.bottom,left:e.left,right:e.right}}),GX=W([qX,Zi,Ji],(e,t,n)=>{if(!(!e||t==null||n==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,n-e.top-e.bottom)}}),Bp=()=>ce(GX),XX=()=>ce(EK);function xA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function wA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xA(Object(n),!0).forEach(function(r){QX(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function QX(e,t,n){return(t=ZX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZX(e){var t=JX(e,"string");return typeof t=="symbol"?t:t+""}function JX(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var eQ=e=>{var{point:t,childIndex:n,mainColor:r,activeDot:i,dataKey:o}=e;if(i===!1||t.x==null||t.y==null)return null;var a=wA(wA({index:n,dataKey:o,cx:t.x,cy:t.y,r:4,fill:r??"none",strokeWidth:2,stroke:"#fff",payload:t.payload,value:t.value},lt(i,!1)),Sg(i)),s;return k.isValidElement(i)?s=k.cloneElement(i,a):typeof i=="function"?s=i(a):s=O.createElement(Jb,a),O.createElement(Ot,{className:"recharts-active-dot"},s)};function p0(e){var{points:t,mainColor:n,activeDot:r,itemDataKey:i}=e,o=ce(Ko),a=XX();if(t==null||a==null)return null;var s=t.find(l=>a.includes(l.payload));return ft(s)?null:eQ({point:s,childIndex:Number(o),mainColor:n,dataKey:i,activeDot:r})}var tQ=process.env.NODE_ENV==="production",h0="Invariant failed";function _A(e,t){if(tQ)throw new Error(h0);var n=typeof t=="function"?t():t,r=n?"".concat(h0,": ").concat(n):h0;throw new Error(r)}var nQ=["x","y"];function m0(){return m0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},m0.apply(null,arguments)}function SA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Gc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?SA(Object(n),!0).forEach(function(r){rQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rQ(e,t,n){return(t=iQ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iQ(e){var t=oQ(e,"string");return typeof t=="symbol"?t:t+""}function oQ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function aQ(e,t){if(e==null)return{};var n,r,i=sQ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function sQ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function lQ(e,t){var{x:n,y:r}=e,i=aQ(e,nQ),o="".concat(n),a=parseInt(o,10),s="".concat(r),l=parseInt(s,10),c="".concat(t.height||i.height),u=parseInt(c,10),d="".concat(t.width||i.width),f=parseInt(d,10);return Gc(Gc(Gc(Gc(Gc({},t),i),a?{x:a}:{}),l?{y:l}:{}),{},{height:u,width:f,name:t.name,radius:t.radius})}function g0(e){return O.createElement(pA,m0({shapeType:"rectangle",propTransformer:lQ,activeClassName:"recharts-active-bar"},e))}var cQ=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(r,i)=>{if(he(t))return t;var o=he(r)||ft(r);return o?t(r,i):(o||(process.env.NODE_ENV!=="production"?_A(!1,"minPointSize callback function received a value with type of ".concat(typeof r,". Currently only numbers or null/undefined are supported.")):_A()),n)}},uQ={},OA=dr({name:"errorBars",initialState:uQ,reducers:{addErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]||(e[n]=[]),e[n].push(r)},replaceErrorBar:(e,t)=>{var{itemId:n,prev:r,next:i}=t.payload;e[n]&&(e[n]=e[n].map(o=>o.dataKey===r.dataKey&&o.direction===r.direction?i:o))},removeErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]&&(e[n]=e[n].filter(i=>i.dataKey!==r.dataKey||i.direction!==r.direction))}}}),{addErrorBar:ufe,replaceErrorBar:dfe,removeErrorBar:ffe}=OA.actions,dQ=OA.reducer,fQ=["children"];function pQ(e,t){if(e==null)return{};var n,r,i=hQ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function hQ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var mQ={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},gQ=k.createContext(mQ);function EA(e){var{children:t}=e,n=pQ(e,fQ);return O.createElement(gQ.Provider,{value:n},t)}function Wp(e,t){var n,r,i=ce(c=>xi(c,e)),o=ce(c=>wi(c,t)),a=(n=i?.allowDataOverflow)!==null&&n!==void 0?n:hr.allowDataOverflow,s=(r=o?.allowDataOverflow)!==null&&r!==void 0?r:mr.allowDataOverflow,l=a||s;return{needClip:l,needClipX:a,needClipY:s}}function v0(e){var{xAxisId:t,yAxisId:n,clipPathId:r}=e,i=Bp(),{needClipX:o,needClipY:a,needClip:s}=Wp(t,n);if(!s)return null;var{x:l,y:c,width:u,height:d}=i;return O.createElement("clipPath",{id:"clipPath-".concat(r)},O.createElement("rect",{x:o?l:l-u/2,y:a?c:c-d/2,width:o?u:u*2,height:a?d:d*2}))}var vQ=["onMouseEnter","onMouseLeave","onClick"],yQ=["value","background","tooltipPosition"],bQ=["id"],xQ=["onMouseEnter","onClick","onMouseLeave"];function Xo(){return Xo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xo.apply(null,arguments)}function PA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Rn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?PA(Object(n),!0).forEach(function(r){wQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wQ(e,t,n){return(t=_Q(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _Q(e){var t=SQ(e,"string");return typeof t=="symbol"?t:t+""}function SQ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zp(e,t){if(e==null)return{};var n,r,i=OQ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function OQ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var EQ=e=>{var{dataKey:t,name:n,fill:r,legendType:i,hide:o}=e;return[{inactive:o,dataKey:t,type:i,color:r,value:$o(n,t),payload:e}]};function PQ(e){var{dataKey:t,stroke:n,strokeWidth:r,fill:i,name:o,hide:a,unit:s}=e;return{dataDefinedOnItem:void 0,positions:void 0,settings:{stroke:n,strokeWidth:r,fill:i,dataKey:t,nameKey:void 0,name:$o(o,t),hide:a,type:e.tooltipType,color:e.fill,unit:s}}}function kQ(e){var t=ce(Ko),{data:n,dataKey:r,background:i,allOtherBarProps:o}=e,{onMouseEnter:a,onMouseLeave:s,onClick:l}=o,c=zp(o,vQ),u=a0(a,r),d=s0(s),f=l0(l,r);if(!i||n==null)return null;var p=lt(i,!1);return O.createElement(O.Fragment,null,n.map((m,h)=>{var{value:g,background:b,tooltipPosition:S}=m,w=zp(m,yQ);if(!b)return null;var x=u(m,h),_=d(m,h),E=f(m,h),C=Rn(Rn(Rn(Rn(Rn({option:i,isActive:String(h)===t},w),{},{fill:"#eee"},b),p),cc(c,m,h)),{},{onMouseEnter:x,onMouseLeave:_,onClick:E,dataKey:r,index:h,className:"recharts-bar-background-rectangle"});return O.createElement(g0,Xo({key:"background-bar-".concat(C.index)},C))}))}function CQ(e){var{showLabels:t,children:n,rects:r}=e,i=r?.map(o=>{var a={x:o.x,y:o.y,width:o.width,height:o.height};return Rn(Rn({},a),{},{value:o.value,payload:o.payload,parentViewBox:o.parentViewBox,viewBox:a,fill:o.fill})});return O.createElement(Qb,{value:t?i:void 0},n)}function DQ(e){var{shape:t,activeBar:n,baseProps:r,entry:i,index:o,dataKey:a}=e,s=ce(Ko),l=ce(JC),c=n&&String(o)===s&&(l==null||a===l),u=c?n:t;return O.createElement(g0,Xo({},r,i,{isActive:c,option:u,index:o,dataKey:a}))}function AQ(e){var{shape:t,baseProps:n,entry:r,index:i,dataKey:o}=e;return O.createElement(g0,Xo({},n,r,{isActive:!1,option:t,index:i,dataKey:o}))}function TQ(e){var{data:t,props:n}=e,r=kr(n),{id:i}=r,o=zp(r,bQ),{shape:a,dataKey:s,activeBar:l}=n,{onMouseEnter:c,onClick:u,onMouseLeave:d}=n,f=zp(n,xQ),p=a0(c,s),m=s0(d),h=l0(u,s);return t?O.createElement(O.Fragment,null,t.map((g,b)=>O.createElement(Ot,Xo({className:"recharts-bar-rectangle"},cc(f,g,b),{onMouseEnter:p(g,b),onMouseLeave:m(g,b),onClick:h(g,b),key:"rectangle-".concat(g?.x,"-").concat(g?.y,"-").concat(g?.value,"-").concat(b)}),l?O.createElement(DQ,{shape:a,activeBar:l,baseProps:o,entry:g,index:b,dataKey:s}):O.createElement(AQ,{shape:a,baseProps:o,entry:g,index:b,dataKey:s})))):null}function MQ(e){var{props:t,previousRectanglesRef:n}=e,{data:r,layout:i,isAnimationActive:o,animationBegin:a,animationDuration:s,animationEasing:l,onAnimationEnd:c,onAnimationStart:u}=t,d=n.current,f=Ws(t,"recharts-bar-"),[p,m]=k.useState(!1),h=!p,g=k.useCallback(()=>{typeof c=="function"&&c(),m(!1)},[c]),b=k.useCallback(()=>{typeof u=="function"&&u(),m(!0)},[u]);return O.createElement(CQ,{showLabels:h,rects:r},O.createElement(Bs,{animationId:f,begin:a,duration:s,isActive:o,easing:l,onAnimationEnd:g,onAnimationStart:b,key:f},S=>{var w=S===1?r:r?.map((x,_)=>{var E=d&&d[_];if(E)return Rn(Rn({},x),{},{x:nt(E.x,x.x,S),y:nt(E.y,x.y,S),width:nt(E.width,x.width,S),height:nt(E.height,x.height,S)});if(i==="horizontal"){var C=nt(0,x.height,S);return Rn(Rn({},x),{},{y:x.y+x.height-C,height:C})}var D=nt(0,x.width,S);return Rn(Rn({},x),{},{width:D})});return S>0&&(n.current=w??null),w==null?null:O.createElement(Ot,null,O.createElement(TQ,{props:t,data:w}))}),O.createElement(Ip,{label:t.label}),t.children)}function NQ(e){var t=k.useRef(null);return O.createElement(MQ,{previousRectanglesRef:t,props:e})}var kA=0,jQ=(e,t)=>{var n=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:n,errorVal:rt(e,t)}};class IQ extends k.PureComponent{render(){var{hide:t,data:n,dataKey:r,className:i,xAxisId:o,yAxisId:a,needClip:s,background:l,id:c}=this.props;if(t||n==null)return null;var u=ie("recharts-bar",i),d=c;return O.createElement(Ot,{className:u,id:c},s&&O.createElement("defs",null,O.createElement(v0,{clipPathId:d,xAxisId:o,yAxisId:a})),O.createElement(Ot,{className:"recharts-bar-rectangles",clipPath:s?"url(#clipPath-".concat(d,")"):void 0},O.createElement(kQ,{data:n,dataKey:r,background:l,allOtherBarProps:this.props}),O.createElement(NQ,this.props)))}}var RQ={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",hide:!1,isAnimationActive:!eo.isSsr,legendType:"rect",minPointSize:kA,xAxisId:0,yAxisId:0};function LQ(e){var{xAxisId:t,yAxisId:n,hide:r,legendType:i,minPointSize:o,activeBar:a,animationBegin:s,animationDuration:l,animationEasing:c,isAnimationActive:u}=e,{needClip:d}=Wp(t,n),f=vc(),p=fn(),m=Eg(e.children,Ht),h=ce(S=>dZ(S,t,n,p,e.id,m));if(f!=="vertical"&&f!=="horizontal")return null;var g,b=h?.[0];return b==null||b.height==null||b.width==null?g=0:g=f==="vertical"?b.height/2:b.width/2,O.createElement(EA,{xAxisId:t,yAxisId:n,data:h,dataPointFormatter:jQ,errorBarOffset:g},O.createElement(IQ,Xo({},e,{layout:f,needClip:d,data:h,xAxisId:t,yAxisId:n,hide:r,legendType:i,minPointSize:o,activeBar:a,animationBegin:s,animationDuration:l,animationEasing:c,isAnimationActive:u})))}function FQ(e){var{layout:t,barSettings:{dataKey:n,minPointSize:r},pos:i,bandSize:o,xAxis:a,yAxis:s,xAxisTicks:l,yAxisTicks:c,stackedData:u,displayedData:d,offset:f,cells:p,parentViewBox:m}=e,h=t==="horizontal"?s:a,g=u?h.scale.domain():null,b=t7({numericAxis:h});return d.map((S,w)=>{var x,_,E,C,D,T;u?x=Xz(u[w],g):(x=rt(S,n),Array.isArray(x)||(x=[b,x]));var j=cQ(r,kA)(x[1],w);if(t==="horizontal"){var A,[P,N]=[s.scale(x[0]),s.scale(x[1])];_=y2({axis:a,ticks:l,bandSize:o,offset:i.offset,entry:S,index:w}),E=(A=N??P)!==null&&A!==void 0?A:void 0,C=i.size;var M=P-N;if(D=Sn(M)?0:M,T={x:_,y:f.top,width:C,height:f.height},Math.abs(j)>0&&Math.abs(D)<Math.abs(j)){var R=Jt(D||j)*(Math.abs(j)-Math.abs(D));E-=R,D+=R}}else{var[L,$]=[a.scale(x[0]),a.scale(x[1])];if(_=L,E=y2({axis:s,ticks:c,bandSize:o,offset:i.offset,entry:S,index:w}),C=$-L,D=i.size,T={x:f.left,y:E,width:f.width,height:D},Math.abs(j)>0&&Math.abs(C)<Math.abs(j)){var V=Jt(C||j)*(Math.abs(j)-Math.abs(C));C+=V}}if(_==null||E==null||C==null||D==null)return null;var z=Rn(Rn({},S),{},{x:_,y:E,width:C,height:D,value:u?x:x[1],payload:S,background:T,tooltipPosition:{x:_+C/2,y:E+D/2},parentViewBox:m},p&&p[w]&&p[w].props);return z}).filter(Boolean)}function $Q(e){var t=Kt(e,RQ),n=fn();return O.createElement($p,{id:t.id,type:"bar"},r=>O.createElement(O.Fragment,null,O.createElement(c0,{legendPayload:EQ(t)}),O.createElement(Fp,{fn:PQ,args:t}),O.createElement(d0,{type:"bar",id:r,data:void 0,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,stackId:v2(t.stackId),hide:t.hide,barSize:t.barSize,minPointSize:t.minPointSize,maxBarSize:t.maxBarSize,isPanorama:n}),O.createElement(LQ,Xo({},t,{id:r}))))}var Ln=O.memo($Q);Ln.displayName="Bar";function CA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Vp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?CA(Object(n),!0).forEach(function(r){BQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function BQ(e,t,n){return(t=WQ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WQ(e){var t=zQ(e,"string");return typeof t=="symbol"?t:t+""}function zQ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var VQ=(e,t)=>t,HQ=(e,t,n)=>n,YQ=(e,t,n,r)=>r,UQ=(e,t,n,r,i)=>i,Xc=W([Bc,UQ],(e,t)=>e.filter(n=>n.type==="bar").find(n=>n.id===t)),KQ=W([Xc],e=>e?.maxBarSize),qQ=(e,t,n,r,i,o)=>o,DA=(e,t,n)=>{var r=n??e;if(!ft(r))return On(r,t,0)},GQ=W([Pe,Bc,VQ,HQ,YQ],(e,t,n,r,i)=>t.filter(o=>e==="horizontal"?o.xAxisId===n:o.yAxisId===r).filter(o=>o.isPanorama===i).filter(o=>o.hide===!1).filter(o=>o.type==="bar")),XQ=(e,t,n,r)=>{var i=Pe(e);return i==="horizontal"?zc(e,"yAxis",n,r):zc(e,"xAxis",t,r)},QQ=(e,t,n)=>{var r=Pe(e);return r==="horizontal"?kC(e,"xAxis",t):kC(e,"yAxis",n)},ZQ=(e,t,n)=>{var r={},i=e.filter(xp),o=e.filter(c=>c.stackId==null),a=i.reduce((c,u)=>(c[u.stackId]||(c[u.stackId]=[]),c[u.stackId].push(u),c),r),s=Object.entries(a).map(c=>{var[u,d]=c,f=d.map(m=>m.dataKey),p=DA(t,n,d[0].barSize);return{stackId:u,dataKeys:f,barSize:p}}),l=o.map(c=>{var u=[c.dataKey].filter(f=>f!=null),d=DA(t,n,c.barSize);return{stackId:void 0,dataKeys:u,barSize:d}});return[...s,...l]},JQ=W([GQ,j9,QQ],ZQ),eZ=(e,t,n,r,i)=>{var o,a,s=Xc(e,t,n,r,i);if(s!=null){var l=Pe(e),c=Hk(e),{maxBarSize:u}=s,d=ft(u)?c:u,f,p;return l==="horizontal"?(f=Si(e,"xAxis",t,r),p=_i(e,"xAxis",t,r)):(f=Si(e,"yAxis",n,r),p=_i(e,"yAxis",n,r)),(o=(a=Na(f,p,!0))!==null&&a!==void 0?a:d)!==null&&o!==void 0?o:0}},AA=(e,t,n,r)=>{var i=Pe(e),o,a;return i==="horizontal"?(o=Si(e,"xAxis",t,r),a=_i(e,"xAxis",t,r)):(o=Si(e,"yAxis",n,r),a=_i(e,"yAxis",n,r)),Na(o,a)};function tZ(e,t,n,r,i){var o=r.length;if(!(o<1)){var a=On(e,n,0,!0),s,l=[];if(pn(r[0].barSize)){var c=!1,u=n/o,d=r.reduce((b,S)=>b+(S.barSize||0),0);d+=(o-1)*a,d>=n&&(d-=(o-1)*a,a=0),d>=n&&u>0&&(c=!0,u*=.9,d=o*u);var f=(n-d)/2>>0,p={offset:f-a,size:0};s=r.reduce((b,S)=>{var w,x={stackId:S.stackId,dataKeys:S.dataKeys,position:{offset:p.offset+p.size+a,size:c?u:(w=S.barSize)!==null&&w!==void 0?w:0}},_=[...b,x];return p=_[_.length-1].position,_},l)}else{var m=On(t,n,0,!0);n-2*m-(o-1)*a<=0&&(a=0);var h=(n-2*m-(o-1)*a)/o;h>1&&(h>>=0);var g=pn(i)?Math.min(h,i):h;s=r.reduce((b,S,w)=>[...b,{stackId:S.stackId,dataKeys:S.dataKeys,position:{offset:m+(h+a)*w+(h-g)/2,size:g}}],l)}return s}}var nZ=(e,t,n,r,i,o,a)=>{var s=ft(a)?t:a,l=tZ(n,r,i!==o?i:o,e,s);return i!==o&&l!=null&&(l=l.map(c=>Vp(Vp({},c),{},{position:Vp(Vp({},c.position),{},{offset:c.position.offset-i/2})}))),l},rZ=W([JQ,Hk,N9,Yk,eZ,AA,KQ],nZ),iZ=(e,t,n,r)=>Si(e,"xAxis",t,r),oZ=(e,t,n,r)=>Si(e,"yAxis",n,r),aZ=(e,t,n,r)=>_i(e,"xAxis",t,r),sZ=(e,t,n,r)=>_i(e,"yAxis",n,r),lZ=W([rZ,Xc],(e,t)=>{if(!(e==null||t==null)){var n=e.find(r=>r.stackId===t.stackId&&t.dataKey!=null&&r.dataKeys.includes(t.dataKey));if(n!=null)return n.position}}),cZ=(e,t)=>{var n=bp(t);if(!(!e||n==null||t==null)){var{stackId:r}=t;if(r!=null){var i=e[r];if(i){var{stackedData:o}=i;if(o)return o.find(a=>a.key===n)}}}},uZ=W([XQ,Xc],cZ),dZ=W([Ut,Gv,iZ,oZ,aZ,sZ,lZ,Pe,Ic,AA,uZ,Xc,qQ],(e,t,n,r,i,o,a,s,l,c,u,d,f)=>{var{chartData:p,dataStartIndex:m,dataEndIndex:h}=l;if(!(d==null||a==null||t==null||s!=="horizontal"&&s!=="vertical"||n==null||r==null||i==null||o==null||c==null)){var{data:g}=d,b;if(g!=null&&g.length>0?b=g:b=p?.slice(m,h+1),b!=null)return FQ({layout:s,barSettings:d,pos:a,parentViewBox:t,bandSize:c,xAxis:n,yAxis:r,xAxisTicks:i,yAxisTicks:o,stackedData:u,displayedData:b,offset:e,cells:f})}}),TA=e=>{var{chartData:t}=e,n=vt(),r=fn();return k.useEffect(()=>r?()=>{}:(n(hD(t)),()=>{n(hD(void 0))}),[t,n,r]),null},MA={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},NA=dr({name:"brush",initialState:MA,reducers:{setBrushSettings(e,t){return t.payload==null?MA:t.payload}}}),{setBrushSettings:pfe}=NA.actions,fZ=NA.reducer;function jA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Hp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jA(Object(n),!0).forEach(function(r){IA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function IA(e,t,n){return(t=pZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pZ(e){var t=hZ(e,"string");return typeof t=="symbol"?t:t+""}function hZ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var mZ=(e,t)=>{var{x:n,y:r}=e,{x:i,y:o}=t;return{x:Math.min(n,i),y:Math.min(r,o),width:Math.abs(i-n),height:Math.abs(o-r)}},gZ=e=>{var{x1:t,y1:n,x2:r,y2:i}=e;return mZ({x:t,y:n},{x:r,y:i})};class Yp{static create(t){return new Yp(t)}constructor(t){this.scale=t}get domain(){return this.scale.domain}get range(){return this.scale.range}get rangeMin(){return this.range()[0]}get rangeMax(){return this.range()[1]}get bandwidth(){return this.scale.bandwidth}apply(t){var{bandAware:n,position:r}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t!==void 0){if(r)switch(r){case"start":return this.scale(t);case"middle":{var i=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+i}case"end":{var o=this.bandwidth?this.bandwidth():0;return this.scale(t)+o}default:return this.scale(t)}if(n){var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+a}return this.scale(t)}}isInRange(t){var n=this.range(),r=n[0],i=n[n.length-1];return r<=i?t>=r&&t<=i:t>=i&&t<=r}}IA(Yp,"EPS",1e-4);var vZ=e=>{var t=Object.keys(e).reduce((n,r)=>Hp(Hp({},n),{},{[r]:Yp.create(e[r])}),{});return Hp(Hp({},t),{},{apply(n){var{bandAware:r,position:i}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.fromEntries(Object.entries(n).map(o=>{var[a,s]=o;return[a,t[a].apply(s,{bandAware:r,position:i})]}))},isInRange(n){return Object.keys(n).every(r=>t[r].isInRange(n[r]))}})};function yZ(e){return(e%180+180)%180}var bZ=function(t){var{width:n,height:r}=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=yZ(i),a=o*Math.PI/180,s=Math.atan(r/n),l=a>s&&a<Math.PI-s?r/Math.sin(a):n/Math.cos(a);return Math.abs(l)},xZ={dots:[],areas:[],lines:[]},RA=dr({name:"referenceElements",initialState:xZ,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var n=Qi(e).dots.findIndex(r=>r===t.payload);n!==-1&&e.dots.splice(n,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var n=Qi(e).areas.findIndex(r=>r===t.payload);n!==-1&&e.areas.splice(n,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var n=Qi(e).lines.findIndex(r=>r===t.payload);n!==-1&&e.lines.splice(n,1)}}}),{addDot:hfe,removeDot:mfe,addArea:gfe,removeArea:vfe,addLine:wZ,removeLine:_Z}=RA.actions,SZ=RA.reducer,LA=k.createContext(void 0),OZ=e=>{var{children:t}=e,[n]=k.useState("".concat(sc("recharts"),"-clip")),r=Bp();if(r==null)return null;var{x:i,y:o,width:a,height:s}=r;return O.createElement(LA.Provider,{value:n},O.createElement("defs",null,O.createElement("clipPath",{id:n},O.createElement("rect",{x:i,y:o,height:s,width:a}))),t)},EZ=()=>k.useContext(LA);function FA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function $A(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?FA(Object(n),!0).forEach(function(r){y0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function y0(e,t,n){return(t=PZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PZ(e){var t=kZ(e,"string");return typeof t=="symbol"?t:t+""}function kZ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function b0(){return b0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b0.apply(null,arguments)}var CZ=(e,t)=>{var n;return O.isValidElement(e)?n=O.cloneElement(e,t):typeof e=="function"?n=e(t):n=O.createElement("line",b0({},t,{className:"recharts-reference-line-line"})),n},DZ=(e,t,n,r,i,o,a,s,l)=>{var{x:c,y:u,width:d,height:f}=i;if(n){var{y:p}=l,m=e.y.apply(p,{position:o});if(Sn(m)||l.ifOverflow==="discard"&&!e.y.isInRange(m))return null;var h=[{x:c+d,y:m},{x:c,y:m}];return s==="left"?h.reverse():h}if(t){var{x:g}=l,b=e.x.apply(g,{position:o});if(Sn(b)||l.ifOverflow==="discard"&&!e.x.isInRange(b))return null;var S=[{x:b,y:u+f},{x:b,y:u}];return a==="top"?S.reverse():S}if(r){var{segment:w}=l,x=w.map(_=>e.apply(_,{position:o}));return l.ifOverflow==="discard"&&x.some(_=>!e.isInRange(_))?null:x}return null};function AZ(e){var t=vt();return k.useEffect(()=>(t(wZ(e)),()=>{t(_Z(e))})),null}function TZ(e){var{x:t,y:n,segment:r,xAxisId:i,yAxisId:o,shape:a,className:s,ifOverflow:l}=e,c=fn(),u=EZ(),d=ce(A=>xi(A,i)),f=ce(A=>wi(A,o)),p=ce(A=>Yo(A,"xAxis",i,c)),m=ce(A=>Yo(A,"yAxis",o,c)),h=Vf(),g=Pr(t),b=Pr(n);if(!u||!h||d==null||f==null||p==null||m==null)return null;var S=vZ({x:p,y:m}),w=r&&r.length===2,x=DZ(S,g,b,w,h,e.position,d.orientation,f.orientation,e);if(!x)return null;var[{x:_,y:E},{x:C,y:D}]=x,T=l==="hidden"?"url(#".concat(u,")"):void 0,j=$A($A({clipPath:T},lt(e,!0)),{},{x1:_,y1:E,x2:C,y2:D});return O.createElement(Ot,{className:ie("recharts-reference-line",s)},CZ(a,j),O.createElement(zD,gZ({x1:_,y1:E,x2:C,y2:D}),O.createElement(YD,{label:e.label}),e.children))}function MZ(e){return O.createElement(O.Fragment,null,O.createElement(AZ,{yAxisId:e.yAxisId,xAxisId:e.xAxisId,ifOverflow:e.ifOverflow,x:e.x,y:e.y}),O.createElement(TZ,e))}class x0 extends k.Component{render(){return O.createElement(MZ,this.props)}}y0(x0,"displayName","ReferenceLine"),y0(x0,"defaultProps",{ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function rl(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}function BA(e,t,n){if(t<1)return[];if(t===1&&n===void 0)return e;for(var r=[],i=0;i<e.length;i+=t)r.push(e[i]);return r}function NZ(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return bZ(r,n)}function jZ(e,t,n){var r=n==="width",{x:i,y:o,width:a,height:s}=e;return t===1?{start:r?i:o,end:r?i+a:o+s}:{start:r?i+a:o+s,end:r?i:o}}function Up(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var o=n();return e*(t-e*o/2-r)>=0&&e*(t+e*o/2-i)<=0}function IZ(e,t){return BA(e,t+1)}function RZ(e,t,n,r,i){for(var o=(r||[]).slice(),{start:a,end:s}=t,l=0,c=1,u=a,d=function(){var m=r?.[l];if(m===void 0)return{v:BA(r,c)};var h=l,g,b=()=>(g===void 0&&(g=n(m,h)),g),S=m.coordinate,w=l===0||Up(e,S,b,u,s);w||(l=0,u=a,c+=1),w&&(u=S+e*(b()/2+i),l+=c)},f;c<=o.length;)if(f=d(),f)return f.v;return[]}function WA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function En(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?WA(Object(n),!0).forEach(function(r){LZ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function LZ(e,t,n){return(t=FZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function FZ(e){var t=$Z(e,"string");return typeof t=="symbol"?t:t+""}function $Z(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function BZ(e,t,n,r,i){for(var o=(r||[]).slice(),a=o.length,{start:s}=t,{end:l}=t,c=function(f){var p=o[f],m,h=()=>(m===void 0&&(m=n(p,f)),m);if(f===a-1){var g=e*(p.coordinate+e*h()/2-l);o[f]=p=En(En({},p),{},{tickCoord:g>0?p.coordinate-g*e:p.coordinate})}else o[f]=p=En(En({},p),{},{tickCoord:p.coordinate});var b=Up(e,p.tickCoord,h,s,l);b&&(l=p.tickCoord-e*(h()/2+i),o[f]=En(En({},p),{},{isShow:!0}))},u=a-1;u>=0;u--)c(u);return o}function WZ(e,t,n,r,i,o){var a=(r||[]).slice(),s=a.length,{start:l,end:c}=t;if(o){var u=r[s-1],d=n(u,s-1),f=e*(u.coordinate+e*d/2-c);a[s-1]=u=En(En({},u),{},{tickCoord:f>0?u.coordinate-f*e:u.coordinate});var p=Up(e,u.tickCoord,()=>d,l,c);p&&(c=u.tickCoord-e*(d/2+i),a[s-1]=En(En({},u),{},{isShow:!0}))}for(var m=o?s-1:s,h=function(S){var w=a[S],x,_=()=>(x===void 0&&(x=n(w,S)),x);if(S===0){var E=e*(w.coordinate-e*_()/2-l);a[S]=w=En(En({},w),{},{tickCoord:E<0?w.coordinate-E*e:w.coordinate})}else a[S]=w=En(En({},w),{},{tickCoord:w.coordinate});var C=Up(e,w.tickCoord,_,l,c);C&&(l=w.tickCoord+e*(_()/2+i),a[S]=En(En({},w),{},{isShow:!0}))},g=0;g<m;g++)h(g);return a}function w0(e,t,n){var{tick:r,ticks:i,viewBox:o,minTickGap:a,orientation:s,interval:l,tickFormatter:c,unit:u,angle:d}=e;if(!i||!i.length||!r)return[];if(he(l)||eo.isSsr){var f;return(f=IZ(i,he(l)?l:0))!==null&&f!==void 0?f:[]}var p=[],m=s==="top"||s==="bottom"?"width":"height",h=u&&m==="width"?qc(u,{fontSize:t,letterSpacing:n}):{width:0,height:0},g=(w,x)=>{var _=typeof c=="function"?c(w.value,x):w.value;return m==="width"?NZ(qc(_,{fontSize:t,letterSpacing:n}),h,d):qc(_,{fontSize:t,letterSpacing:n})[m]},b=i.length>=2?Jt(i[1].coordinate-i[0].coordinate):1,S=jZ(o,b,m);return l==="equidistantPreserveStart"?RZ(b,S,g,i,a):(l==="preserveStart"||l==="preserveStartEnd"?p=WZ(b,S,g,i,a,l==="preserveStartEnd"):p=BZ(b,S,g,i,a),p.filter(w=>w.isShow))}var zZ=e=>{var{ticks:t,label:n,labelGapWithTick:r=5,tickSize:i=0,tickMargin:o=0}=e,a=0;if(t){t.forEach(u=>{if(u){var d=u.getBoundingClientRect();d.width>a&&(a=d.width)}});var s=n?n.getBoundingClientRect().width:0,l=i+o,c=a+l+s+(n?r:0);return Math.round(c)}return 0},VZ=["axisLine","width","height","className","hide","ticks"],HZ=["viewBox"],YZ=["viewBox"];function _0(e,t){if(e==null)return{};var n,r,i=UZ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function UZ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Ha(){return Ha=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ha.apply(null,arguments)}function zA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Xt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zA(Object(n),!0).forEach(function(r){KZ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function KZ(e,t,n){return(t=qZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qZ(e){var t=GZ(e,"string");return typeof t=="symbol"?t:t+""}function GZ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var S0={x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"};function XZ(e){var{x:t,y:n,width:r,height:i,orientation:o,mirror:a,axisLine:s,otherSvgProps:l}=e;if(!s)return null;var c=Xt(Xt(Xt({},l),lt(s,!1)),{},{fill:"none"});if(o==="top"||o==="bottom"){var u=+(o==="top"&&!a||o==="bottom"&&a);c=Xt(Xt({},c),{},{x1:t,y1:n+u*i,x2:t+r,y2:n+u*i})}else{var d=+(o==="left"&&!a||o==="right"&&a);c=Xt(Xt({},c),{},{x1:t+d*r,y1:n,x2:t+d*r,y2:n+i})}return O.createElement("line",Ha({},c,{className:ie("recharts-cartesian-axis-line",Oa(s,"className"))}))}function QZ(e,t,n,r,i,o,a,s,l){var c,u,d,f,p,m,h=s?-1:1,g=e.tickSize||a,b=he(e.tickCoord)?e.tickCoord:e.coordinate;switch(o){case"top":c=u=e.coordinate,f=n+ +!s*i,d=f-h*g,m=d-h*l,p=b;break;case"left":d=f=e.coordinate,u=t+ +!s*r,c=u-h*g,p=c-h*l,m=b;break;case"right":d=f=e.coordinate,u=t+ +s*r,c=u+h*g,p=c+h*l,m=b;break;default:c=u=e.coordinate,f=n+ +s*i,d=f+h*g,m=d+h*l,p=b;break}return{line:{x1:c,y1:d,x2:u,y2:f},tick:{x:p,y:m}}}function ZZ(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function JZ(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function eJ(e){var{option:t,tickProps:n,value:r}=e,i,o=ie(n.className,"recharts-cartesian-axis-tick-value");if(O.isValidElement(t))i=O.cloneElement(t,Xt(Xt({},n),{},{className:o}));else if(typeof t=="function")i=t(Xt(Xt({},n),{},{className:o}));else{var a="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(a=ie(a,t?.className)),i=O.createElement(Mp,Ha({},n,{className:a}),r)}return i}function tJ(e){var{ticks:t=[],tick:n,tickLine:r,stroke:i,tickFormatter:o,unit:a,padding:s,tickTextProps:l,orientation:c,mirror:u,x:d,y:f,width:p,height:m,tickSize:h,tickMargin:g,fontSize:b,letterSpacing:S,getTicksConfig:w,events:x}=e,_=w0(Xt(Xt({},w),{},{ticks:t}),b,S),E=ZZ(c,u),C=JZ(c,u),D=kr(w),T=lt(n,!1),j=Xt(Xt({},D),{},{fill:"none"},lt(r,!1)),A=_.map((P,N)=>{var{line:M,tick:R}=QZ(P,d,f,p,m,c,h,u,g),L=Xt(Xt(Xt(Xt({textAnchor:E,verticalAnchor:C},D),{},{stroke:"none",fill:i},T),R),{},{index:N,payload:P,visibleTicksCount:_.length,tickFormatter:o,padding:s},l);return O.createElement(Ot,Ha({className:"recharts-cartesian-axis-tick",key:"tick-".concat(P.value,"-").concat(P.coordinate,"-").concat(P.tickCoord)},cc(x,P,N)),r&&O.createElement("line",Ha({},j,M,{className:ie("recharts-cartesian-axis-tick-line",Oa(r,"className"))})),n&&O.createElement(eJ,{option:n,tickProps:L,value:"".concat(typeof o=="function"?o(P.value,N):P.value).concat(a||"")}))});return A.length>0?O.createElement("g",{className:"recharts-cartesian-axis-ticks"},A):null}var nJ=k.forwardRef((e,t)=>{var{axisLine:n,width:r,height:i,className:o,hide:a,ticks:s}=e,l=_0(e,VZ),[c,u]=k.useState(""),[d,f]=k.useState(""),p=k.useRef([]);k.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var h;return zZ({ticks:p.current,label:(h=e.labelRef)===null||h===void 0?void 0:h.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var m=k.useCallback(h=>{if(h){var g=h.getElementsByClassName("recharts-cartesian-axis-tick-value");p.current=Array.from(g);var b=g[0];if(b){var S=window.getComputedStyle(b),w=S.fontSize,x=S.letterSpacing;(w!==c||x!==d)&&(u(w),f(x))}}},[c,d]);return a||r!=null&&r<=0||i!=null&&i<=0?null:O.createElement(Ot,{className:ie("recharts-cartesian-axis",o),ref:m},O.createElement(XZ,{x:e.x,y:e.y,width:r,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:n,otherSvgProps:kr(e)}),O.createElement(tJ,{ticks:s,tick:e.tick,tickLine:e.tickLine,stroke:e.stroke,tickFormatter:e.tickFormatter,unit:e.unit,padding:e.padding,tickTextProps:e.tickTextProps,orientation:e.orientation,mirror:e.mirror,x:e.x,y:e.y,width:e.width,height:e.height,tickSize:e.tickSize,tickMargin:e.tickMargin,fontSize:c,letterSpacing:d,getTicksConfig:e,events:l}),O.createElement(zD,{x:e.x,y:e.y,width:e.width,height:e.height},O.createElement(YD,{label:e.label}),e.children))}),rJ=O.memo(nJ,(e,t)=>{var{viewBox:n}=e,r=_0(e,HZ),{viewBox:i}=t,o=_0(t,YZ);return rl(n,i)&&rl(r,o)}),O0=O.forwardRef((e,t)=>{var n=Kt(e,S0);return O.createElement(rJ,Ha({},n,{ref:t}))});O0.displayName="CartesianAxis";var iJ=["x1","y1","x2","y2","key"],oJ=["offset"],aJ=["xAxisId","yAxisId"],sJ=["xAxisId","yAxisId"];function VA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Pn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?VA(Object(n),!0).forEach(function(r){lJ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lJ(e,t,n){return(t=cJ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cJ(e){var t=uJ(e,"string");return typeof t=="symbol"?t:t+""}function uJ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ya(){return Ya=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ya.apply(null,arguments)}function Kp(e,t){if(e==null)return{};var n,r,i=dJ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function dJ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var fJ=e=>{var{fill:t}=e;if(!t||t==="none")return null;var{fillOpacity:n,x:r,y:i,width:o,height:a,ry:s}=e;return O.createElement("rect",{x:r,y:i,ry:s,width:o,height:a,stroke:"none",fill:t,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function HA(e,t){var n;if(O.isValidElement(e))n=O.cloneElement(e,t);else if(typeof e=="function")n=e(t);else{var{x1:r,y1:i,x2:o,y2:a,key:s}=t,l=Kp(t,iJ),c=kr(l),{offset:u}=c,d=Kp(c,oJ);n=O.createElement("line",Ya({},d,{x1:r,y1:i,x2:o,y2:a,fill:"none",key:s}))}return n}function pJ(e){var{x:t,width:n,horizontal:r=!0,horizontalPoints:i}=e;if(!r||!i||!i.length)return null;var{xAxisId:o,yAxisId:a}=e,s=Kp(e,aJ),l=i.map((c,u)=>{var d=Pn(Pn({},s),{},{x1:t,y1:c,x2:t+n,y2:c,key:"line-".concat(u),index:u});return HA(r,d)});return O.createElement("g",{className:"recharts-cartesian-grid-horizontal"},l)}function hJ(e){var{y:t,height:n,vertical:r=!0,verticalPoints:i}=e;if(!r||!i||!i.length)return null;var{xAxisId:o,yAxisId:a}=e,s=Kp(e,sJ),l=i.map((c,u)=>{var d=Pn(Pn({},s),{},{x1:c,y1:t,x2:c,y2:t+n,key:"line-".concat(u),index:u});return HA(r,d)});return O.createElement("g",{className:"recharts-cartesian-grid-vertical"},l)}function mJ(e){var{horizontalFill:t,fillOpacity:n,x:r,y:i,width:o,height:a,horizontalPoints:s,horizontal:l=!0}=e;if(!l||!t||!t.length)return null;var c=s.map(d=>Math.round(d+i-i)).sort((d,f)=>d-f);i!==c[0]&&c.unshift(0);var u=c.map((d,f)=>{var p=!c[f+1],m=p?i+a-d:c[f+1]-d;if(m<=0)return null;var h=f%t.length;return O.createElement("rect",{key:"react-".concat(f),y:d,x:r,height:m,width:o,stroke:"none",fill:t[h],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return O.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},u)}function gJ(e){var{vertical:t=!0,verticalFill:n,fillOpacity:r,x:i,y:o,width:a,height:s,verticalPoints:l}=e;if(!t||!n||!n.length)return null;var c=l.map(d=>Math.round(d+i-i)).sort((d,f)=>d-f);i!==c[0]&&c.unshift(0);var u=c.map((d,f)=>{var p=!c[f+1],m=p?i+a-d:c[f+1]-d;if(m<=0)return null;var h=f%n.length;return O.createElement("rect",{key:"react-".concat(f),x:d,y:o,width:m,height:s,stroke:"none",fill:n[h],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return O.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},u)}var vJ=(e,t)=>{var{xAxis:n,width:r,height:i,offset:o}=e;return h2(w0(Pn(Pn(Pn({},S0),n),{},{ticks:m2(n),viewBox:{x:0,y:0,width:r,height:i}})),o.left,o.left+o.width,t)},yJ=(e,t)=>{var{yAxis:n,width:r,height:i,offset:o}=e;return h2(w0(Pn(Pn(Pn({},S0),n),{},{ticks:m2(n),viewBox:{x:0,y:0,width:r,height:i}})),o.top,o.top+o.height,t)},bJ={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0};function Rr(e){var t=Xv(),n=Qv(),r=P2(),i=Pn(Pn({},Kt(e,bJ)),{},{x:he(e.x)?e.x:r.left,y:he(e.y)?e.y:r.top,width:he(e.width)?e.width:r.width,height:he(e.height)?e.height:r.height}),{xAxisId:o,yAxisId:a,x:s,y:l,width:c,height:u,syncWithTicks:d,horizontalValues:f,verticalValues:p}=i,m=fn(),h=ce(T=>AC(T,"xAxis",o,m)),g=ce(T=>AC(T,"yAxis",a,m));if(!he(c)||c<=0||!he(u)||u<=0||!he(s)||s!==+s||!he(l)||l!==+l)return null;var b=i.verticalCoordinatesGenerator||vJ,S=i.horizontalCoordinatesGenerator||yJ,{horizontalPoints:w,verticalPoints:x}=i;if((!w||!w.length)&&typeof S=="function"){var _=f&&f.length,E=S({yAxis:g?Pn(Pn({},g),{},{ticks:_?f:g.ticks}):void 0,width:t,height:n,offset:r},_?!0:d);Kc(Array.isArray(E),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof E,"]")),Array.isArray(E)&&(w=E)}if((!x||!x.length)&&typeof b=="function"){var C=p&&p.length,D=b({xAxis:h?Pn(Pn({},h),{},{ticks:C?p:h.ticks}):void 0,width:t,height:n,offset:r},C?!0:d);Kc(Array.isArray(D),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof D,"]")),Array.isArray(D)&&(x=D)}return O.createElement("g",{className:"recharts-cartesian-grid"},O.createElement(fJ,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),O.createElement(mJ,Ya({},i,{horizontalPoints:w})),O.createElement(gJ,Ya({},i,{verticalPoints:x})),O.createElement(pJ,Ya({},i,{offset:r,horizontalPoints:w,xAxis:h,yAxis:g})),O.createElement(hJ,Ya({},i,{offset:r,verticalPoints:x,xAxis:h,yAxis:g})))}Rr.displayName="CartesianGrid";var YA=(e,t,n,r)=>Si(e,"xAxis",t,r),UA=(e,t,n,r)=>_i(e,"xAxis",t,r),KA=(e,t,n,r)=>Si(e,"yAxis",n,r),qA=(e,t,n,r)=>_i(e,"yAxis",n,r),xJ=W([Pe,YA,KA,UA,qA],(e,t,n,r,i)=>gi(e,"xAxis")?Na(t,r,!1):Na(n,i,!1)),wJ=(e,t,n,r,i)=>i;function _J(e){return e.type==="line"}var SJ=W([Bc,wJ],(e,t)=>e.filter(_J).find(n=>n.id===t)),OJ=W([Pe,YA,KA,UA,qA,SJ,xJ,Ic],(e,t,n,r,i,o,a,s)=>{var{chartData:l,dataStartIndex:c,dataEndIndex:u}=s;if(!(o==null||t==null||n==null||r==null||i==null||r.length===0||i.length===0||a==null)){var{dataKey:d,data:f}=o,p;if(f!=null&&f.length>0?p=f:p=l?.slice(c,u+1),p!=null)return UJ({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataKey:d,bandSize:a,displayedData:p})}}),EJ=["id"],PJ=["type","layout","connectNulls","needClip"],kJ=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function GA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function gr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?GA(Object(n),!0).forEach(function(r){CJ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function CJ(e,t,n){return(t=DJ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DJ(e){var t=AJ(e,"string");return typeof t=="symbol"?t:t+""}function AJ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function E0(e,t){if(e==null)return{};var n,r,i=TJ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function TJ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Ua(){return Ua=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ua.apply(null,arguments)}var MJ=e=>{var{dataKey:t,name:n,stroke:r,legendType:i,hide:o}=e;return[{inactive:o,dataKey:t,type:i,color:r,value:$o(n,t),payload:e}]};function NJ(e){var{dataKey:t,data:n,stroke:r,strokeWidth:i,fill:o,name:a,hide:s,unit:l}=e;return{dataDefinedOnItem:n,positions:void 0,settings:{stroke:r,strokeWidth:i,fill:o,dataKey:t,nameKey:void 0,name:$o(a,t),hide:s,type:e.tooltipType,color:e.stroke,unit:l}}}var XA=(e,t)=>"".concat(t,"px ").concat(e-t,"px");function jJ(e,t){for(var n=e.length%2!==0?[...e,0]:e,r=[],i=0;i<t;++i)r=[...r,...n];return r}var IJ=(e,t,n)=>{var r=n.reduce((d,f)=>d+f);if(!r)return XA(t,e);for(var i=Math.floor(e/r),o=e%r,a=t-e,s=[],l=0,c=0;l<n.length;c+=n[l],++l)if(c+n[l]>o){s=[...n.slice(0,l),o-c];break}var u=s.length%2===0?[0,a]:[a];return[...jJ(n,i),...s,...u].map(d=>"".concat(d,"px")).join(", ")};function RJ(e,t){var n;if(O.isValidElement(e))n=O.cloneElement(e,t);else if(typeof e=="function")n=e(t);else{var r=ie("recharts-line-dot",typeof e!="boolean"?e.className:"");n=O.createElement(Jb,Ua({},t,{className:r}))}return n}function LJ(e,t){return e==null?!1:t?!0:e.length===1}function FJ(e){var{clipPathId:t,points:n,props:r}=e,{dot:i,dataKey:o,needClip:a}=r;if(!LJ(n,i))return null;var{id:s}=r,l=E0(r,EJ),c=af(i),u=kr(l),d=lt(i,!0),f=n.map((m,h)=>{var g=gr(gr(gr({key:"dot-".concat(h),r:3},u),d),{},{index:h,cx:m.x,cy:m.y,dataKey:o,value:m.value,payload:m.payload,points:n});return RJ(i,g)}),p={clipPath:a?"url(#clipPath-".concat(c?"":"dots-").concat(t,")"):void 0};return O.createElement(Ot,Ua({className:"recharts-line-dots",key:"dots"},p),f)}function $J(e){var{showLabels:t,children:n,points:r}=e,i=k.useMemo(()=>r?.map(o=>{var a={x:o.x,y:o.y,width:0,height:0};return gr(gr({},a),{},{value:o.value,payload:o.payload,viewBox:a,parentViewBox:void 0,fill:void 0})}),[r]);return O.createElement(Qb,{value:t?i:null},n)}function QA(e){var{clipPathId:t,pathRef:n,points:r,strokeDasharray:i,props:o}=e,{type:a,layout:s,connectNulls:l,needClip:c}=o,u=E0(o,PJ),d=gr(gr({},lt(u,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:c?"url(#clipPath-".concat(t,")"):void 0,points:r,type:a,layout:s,connectNulls:l,strokeDasharray:i??o.strokeDasharray});return O.createElement(O.Fragment,null,r?.length>1&&O.createElement($s,Ua({},d,{pathRef:n})),O.createElement(FJ,{points:r,clipPathId:t,props:o}))}function BJ(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function WJ(e){var{clipPathId:t,props:n,pathRef:r,previousPointsRef:i,longestAnimatedLengthRef:o}=e,{points:a,strokeDasharray:s,isAnimationActive:l,animationBegin:c,animationDuration:u,animationEasing:d,animateNewValues:f,width:p,height:m,onAnimationEnd:h,onAnimationStart:g}=n,b=i.current,S=Ws(n,"recharts-line-"),[w,x]=k.useState(!1),_=!w,E=k.useCallback(()=>{typeof h=="function"&&h(),x(!1)},[h]),C=k.useCallback(()=>{typeof g=="function"&&g(),x(!0)},[g]),D=BJ(r.current),T=o.current;return O.createElement($J,{points:a,showLabels:_},n.children,O.createElement(Bs,{animationId:S,begin:c,duration:u,isActive:l,easing:d,onAnimationEnd:E,onAnimationStart:C,key:S},j=>{var A=nt(T,D+T,j),P=Math.min(A,D),N;if(l)if(s){var M="".concat(s).split(/[,\s]+/gim).map($=>parseFloat($));N=IJ(P,D,M)}else N=XA(D,P);else N=s==null?void 0:String(s);if(b){var R=b.length/a.length,L=j===1?a:a.map(($,V)=>{var z=Math.floor(V*R);if(b[z]){var B=b[z];return gr(gr({},$),{},{x:nt(B.x,$.x,j),y:nt(B.y,$.y,j)})}return f?gr(gr({},$),{},{x:nt(p*2,$.x,j),y:nt(m/2,$.y,j)}):gr(gr({},$),{},{x:$.x,y:$.y})});return i.current=L,O.createElement(QA,{props:n,points:L,clipPathId:t,pathRef:r,strokeDasharray:N})}return j>0&&D>0&&(i.current=a,o.current=P),O.createElement(QA,{props:n,points:a,clipPathId:t,pathRef:r,strokeDasharray:N})}),O.createElement(Ip,{label:n.label}))}function zJ(e){var{clipPathId:t,props:n}=e,r=k.useRef(null),i=k.useRef(0),o=k.useRef(null);return O.createElement(WJ,{props:n,clipPathId:t,previousPointsRef:r,longestAnimatedLengthRef:i,pathRef:o})}var VJ=(e,t)=>({x:e.x,y:e.y,value:e.value,errorVal:rt(e.payload,t)});class HJ extends k.Component{render(){var t,{hide:n,dot:r,points:i,className:o,xAxisId:a,yAxisId:s,top:l,left:c,width:u,height:d,id:f,needClip:p}=this.props;if(n)return null;var m=ie("recharts-line",o),h=f,{r:g=3,strokeWidth:b=2}=(t=lt(r,!1))!==null&&t!==void 0?t:{r:3,strokeWidth:2},S=af(r),w=g*2+b;return O.createElement(O.Fragment,null,O.createElement(Ot,{className:m},p&&O.createElement("defs",null,O.createElement(v0,{clipPathId:h,xAxisId:a,yAxisId:s}),!S&&O.createElement("clipPath",{id:"clipPath-dots-".concat(h)},O.createElement("rect",{x:c-w/2,y:l-w/2,width:u+w,height:d+w}))),O.createElement(EA,{xAxisId:a,yAxisId:s,data:i,dataPointFormatter:VJ,errorBarOffset:0},O.createElement(zJ,{props:this.props,clipPathId:h}))),O.createElement(p0,{activeDot:this.props.activeDot,points:i,mainColor:this.props.stroke,itemDataKey:this.props.dataKey}))}}var ZA={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:!eo.isSsr,label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0};function YJ(e){var t=Kt(e,ZA),{activeDot:n,animateNewValues:r,animationBegin:i,animationDuration:o,animationEasing:a,connectNulls:s,dot:l,hide:c,isAnimationActive:u,label:d,legendType:f,xAxisId:p,yAxisId:m,id:h}=t,g=E0(t,kJ),{needClip:b}=Wp(p,m),S=Bp(),w=vc(),x=fn(),_=ce(j=>OJ(j,p,m,x,h));if(w!=="horizontal"&&w!=="vertical"||_==null||S==null)return null;var{height:E,width:C,x:D,y:T}=S;return O.createElement(HJ,Ua({},g,{id:h,connectNulls:s,dot:l,activeDot:n,animateNewValues:r,animationBegin:i,animationDuration:o,animationEasing:a,isAnimationActive:u,hide:c,label:d,legendType:f,xAxisId:p,yAxisId:m,points:_,layout:w,height:E,width:C,left:D,top:T,needClip:b}))}function UJ(e){var{layout:t,xAxis:n,yAxis:r,xAxisTicks:i,yAxisTicks:o,dataKey:a,bandSize:s,displayedData:l}=e;return l.map((c,u)=>{var d=rt(c,a);if(t==="horizontal"){var f=Lf({axis:n,ticks:i,bandSize:s,entry:c,index:u}),p=ft(d)?null:r.scale(d);return{x:f,y:p,value:d,payload:c}}var m=ft(d)?null:n.scale(d),h=Lf({axis:r,ticks:o,bandSize:s,entry:c,index:u});return m==null||h==null?null:{x:m,y:h,value:d,payload:c}}).filter(Boolean)}function KJ(e){var t=Kt(e,ZA),n=fn();return O.createElement($p,{id:t.id,type:"line"},r=>O.createElement(O.Fragment,null,O.createElement(c0,{legendPayload:MJ(t)}),O.createElement(Fp,{fn:NJ,args:t}),O.createElement(d0,{type:"line",id:r,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:n}),O.createElement(YJ,Ua({},t,{id:r}))))}var Qo=O.memo(KJ);Qo.displayName="Line";var JA=(e,t,n,r)=>Si(e,"xAxis",t,r),eT=(e,t,n,r)=>_i(e,"xAxis",t,r),tT=(e,t,n,r)=>Si(e,"yAxis",n,r),nT=(e,t,n,r)=>_i(e,"yAxis",n,r),qJ=W([Pe,JA,tT,eT,nT],(e,t,n,r,i)=>gi(e,"xAxis")?Na(t,r,!1):Na(n,i,!1)),GJ=(e,t,n,r,i)=>i,rT=W([Bc,GJ],(e,t)=>e.filter(n=>n.type==="area").find(n=>n.id===t)),XJ=(e,t,n,r,i)=>{var o,a=rT(e,t,n,r,i);if(a!=null){var s=Pe(e),l=gi(s,"xAxis"),c;if(l?c=zc(e,"yAxis",n,r):c=zc(e,"xAxis",t,r),c!=null){var{stackId:u}=a,d=bp(a);if(!(u==null||d==null)){var f=(o=c[u])===null||o===void 0?void 0:o.stackedData;return f?.find(p=>p.key===d)}}}},QJ=W([Pe,JA,tT,eT,nT,XJ,Ic,qJ,rT],(e,t,n,r,i,o,a,s,l)=>{var{chartData:c,dataStartIndex:u,dataEndIndex:d}=a;if(!(l==null||e!=="horizontal"&&e!=="vertical"||t==null||n==null||r==null||i==null||r.length===0||i.length===0||s==null)){var{data:f}=l,p;if(f&&f.length>0?p=f:p=c?.slice(u,d+1),p!=null){var m=void 0;return yee({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataStartIndex:u,areaSettings:l,stackedData:o,displayedData:p,chartBaseValue:m,bandSize:s})}}}),ZJ=["id"],JJ=["activeDot","animationBegin","animationDuration","animationEasing","connectNulls","dot","fill","fillOpacity","hide","isAnimationActive","legendType","stroke","xAxisId","yAxisId"];function iT(e,t){if(e==null)return{};var n,r,i=eee(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function eee(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function oT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function fo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?oT(Object(n),!0).forEach(function(r){tee(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tee(e,t,n){return(t=nee(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nee(e){var t=ree(e,"string");return typeof t=="symbol"?t:t+""}function ree(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function po(){return po=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},po.apply(null,arguments)}function qp(e,t){return e&&e!=="none"?e:t}var iee=e=>{var{dataKey:t,name:n,stroke:r,fill:i,legendType:o,hide:a}=e;return[{inactive:a,dataKey:t,type:o,color:qp(r,i),value:$o(n,t),payload:e}]};function oee(e){var{dataKey:t,data:n,stroke:r,strokeWidth:i,fill:o,name:a,hide:s,unit:l}=e;return{dataDefinedOnItem:n,positions:void 0,settings:{stroke:r,strokeWidth:i,fill:o,dataKey:t,nameKey:void 0,name:$o(a,t),hide:s,type:e.tooltipType,color:qp(r,o),unit:l}}}var aee=(e,t)=>{var n;if(O.isValidElement(e))n=O.cloneElement(e,t);else if(typeof e=="function")n=e(t);else{var r=ie("recharts-area-dot",typeof e!="boolean"?e.className:"");n=O.createElement(Jb,po({},t,{className:r}))}return n};function see(e,t){return e==null?!1:t?!0:e.length===1}function lee(e){var{clipPathId:t,points:n,props:r}=e,{needClip:i,dot:o,dataKey:a}=r;if(!see(n,o))return null;var s=af(o),l=kr(r),c=lt(o,!0),u=n.map((f,p)=>{var m=fo(fo(fo({key:"dot-".concat(p),r:3},l),c),{},{index:p,cx:f.x,cy:f.y,dataKey:a,value:f.value,payload:f.payload,points:n});return aee(o,m)}),d={clipPath:i?"url(#clipPath-".concat(s?"":"dots-").concat(t,")"):void 0};return O.createElement(Ot,po({className:"recharts-area-dots"},d),u)}function cee(e){var{showLabels:t,children:n,points:r}=e,i=r.map(o=>{var a={x:o.x,y:o.y,width:0,height:0};return fo(fo({},a),{},{value:o.value,payload:o.payload,parentViewBox:void 0,viewBox:a,fill:void 0})});return O.createElement(Qb,{value:t?i:null},n)}function aT(e){var{points:t,baseLine:n,needClip:r,clipPathId:i,props:o}=e,{layout:a,type:s,stroke:l,connectNulls:c,isRange:u}=o,{id:d}=o,f=iT(o,ZJ),p=kr(f);return O.createElement(O.Fragment,null,t?.length>1&&O.createElement(Ot,{clipPath:r?"url(#clipPath-".concat(i,")"):void 0},O.createElement($s,po({},p,{id:d,points:t,connectNulls:c,type:s,baseLine:n,layout:a,stroke:"none",className:"recharts-area-area"})),l!=="none"&&O.createElement($s,po({},p,{className:"recharts-area-curve",layout:a,type:s,connectNulls:c,fill:"none",points:t})),l!=="none"&&u&&O.createElement($s,po({},p,{className:"recharts-area-curve",layout:a,type:s,connectNulls:c,fill:"none",points:n}))),O.createElement(lee,{points:t,props:f,clipPathId:i}))}function uee(e){var{alpha:t,baseLine:n,points:r,strokeWidth:i}=e,o=r[0].y,a=r[r.length-1].y;if(!pn(o)||!pn(a))return null;var s=t*Math.abs(o-a),l=Math.max(...r.map(c=>c.x||0));return he(n)?l=Math.max(n,l):n&&Array.isArray(n)&&n.length&&(l=Math.max(...n.map(c=>c.x||0),l)),he(l)?O.createElement("rect",{x:0,y:o<a?o:o-s,width:l+(i?parseInt("".concat(i),10):1),height:Math.floor(s)}):null}function dee(e){var{alpha:t,baseLine:n,points:r,strokeWidth:i}=e,o=r[0].x,a=r[r.length-1].x;if(!pn(o)||!pn(a))return null;var s=t*Math.abs(o-a),l=Math.max(...r.map(c=>c.y||0));return he(n)?l=Math.max(n,l):n&&Array.isArray(n)&&n.length&&(l=Math.max(...n.map(c=>c.y||0),l)),he(l)?O.createElement("rect",{x:o<a?o:o-s,y:0,width:s,height:Math.floor(l+(i?parseInt("".concat(i),10):1))}):null}function fee(e){var{alpha:t,layout:n,points:r,baseLine:i,strokeWidth:o}=e;return n==="vertical"?O.createElement(uee,{alpha:t,points:r,baseLine:i,strokeWidth:o}):O.createElement(dee,{alpha:t,points:r,baseLine:i,strokeWidth:o})}function pee(e){var{needClip:t,clipPathId:n,props:r,previousPointsRef:i,previousBaselineRef:o}=e,{points:a,baseLine:s,isAnimationActive:l,animationBegin:c,animationDuration:u,animationEasing:d,onAnimationStart:f,onAnimationEnd:p}=r,m=Ws(r,"recharts-area-"),[h,g]=k.useState(!1),b=!h,S=k.useCallback(()=>{typeof p=="function"&&p(),g(!1)},[p]),w=k.useCallback(()=>{typeof f=="function"&&f(),g(!0)},[f]),x=i.current,_=o.current;return O.createElement(cee,{showLabels:b,points:a},r.children,O.createElement(Bs,{animationId:m,begin:c,duration:u,isActive:l,easing:d,onAnimationEnd:S,onAnimationStart:w,key:m},E=>{if(x){var C=x.length/a.length,D=E===1?a:a.map((j,A)=>{var P=Math.floor(A*C);if(x[P]){var N=x[P];return fo(fo({},j),{},{x:nt(N.x,j.x,E),y:nt(N.y,j.y,E)})}return j}),T;return he(s)?T=nt(_,s,E):ft(s)||Sn(s)?T=nt(_,0,E):T=s.map((j,A)=>{var P=Math.floor(A*C);if(Array.isArray(_)&&_[P]){var N=_[P];return fo(fo({},j),{},{x:nt(N.x,j.x,E),y:nt(N.y,j.y,E)})}return j}),E>0&&(i.current=D,o.current=T),O.createElement(aT,{points:D,baseLine:T,needClip:t,clipPathId:n,props:r})}return E>0&&(i.current=a,o.current=s),O.createElement(Ot,null,l&&O.createElement("defs",null,O.createElement("clipPath",{id:"animationClipPath-".concat(n)},O.createElement(fee,{alpha:E,points:a,baseLine:s,layout:r.layout,strokeWidth:r.strokeWidth}))),O.createElement(Ot,{clipPath:"url(#animationClipPath-".concat(n,")")},O.createElement(aT,{points:a,baseLine:s,needClip:t,clipPathId:n,props:r})))}),O.createElement(Ip,{label:r.label}))}function hee(e){var{needClip:t,clipPathId:n,props:r}=e,i=k.useRef(null),o=k.useRef();return O.createElement(pee,{needClip:t,clipPathId:n,props:r,previousPointsRef:i,previousBaselineRef:o})}class mee extends k.PureComponent{render(){var t,{hide:n,dot:r,points:i,className:o,top:a,left:s,needClip:l,xAxisId:c,yAxisId:u,width:d,height:f,id:p,baseLine:m}=this.props;if(n)return null;var h=ie("recharts-area",o),g=p,{r:b=3,strokeWidth:S=2}=(t=lt(r,!1))!==null&&t!==void 0?t:{r:3,strokeWidth:2},w=af(r),x=b*2+S;return O.createElement(O.Fragment,null,O.createElement(Ot,{className:h},l&&O.createElement("defs",null,O.createElement(v0,{clipPathId:g,xAxisId:c,yAxisId:u}),!w&&O.createElement("clipPath",{id:"clipPath-dots-".concat(g)},O.createElement("rect",{x:s-x/2,y:a-x/2,width:d+x,height:f+x}))),O.createElement(hee,{needClip:l,clipPathId:g,props:this.props})),O.createElement(p0,{points:i,mainColor:qp(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot}),this.props.isRange&&Array.isArray(m)&&O.createElement(p0,{points:m,mainColor:qp(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot}))}}var sT={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:!eo.isSsr,legendType:"line",stroke:"#3182bd",xAxisId:0,yAxisId:0};function gee(e){var t,n=Kt(e,sT),{activeDot:r,animationBegin:i,animationDuration:o,animationEasing:a,connectNulls:s,dot:l,fill:c,fillOpacity:u,hide:d,isAnimationActive:f,legendType:p,stroke:m,xAxisId:h,yAxisId:g}=n,b=iT(n,JJ),S=vc(),w=rD(),{needClip:x}=Wp(h,g),_=fn(),{points:E,isRange:C,baseLine:D}=(t=ce(M=>QJ(M,h,g,_,e.id)))!==null&&t!==void 0?t:{},T=Bp();if(S!=="horizontal"&&S!=="vertical"||T==null||w!=="AreaChart"&&w!=="ComposedChart")return null;var{height:j,width:A,x:P,y:N}=T;return!E||!E.length?null:O.createElement(mee,po({},b,{activeDot:r,animationBegin:i,animationDuration:o,animationEasing:a,baseLine:D,connectNulls:s,dot:l,fill:c,fillOpacity:u,height:j,hide:d,layout:S,isAnimationActive:f,isRange:C,legendType:p,needClip:x,points:E,stroke:m,width:A,left:P,top:N,xAxisId:h,yAxisId:g}))}var vee=(e,t,n,r,i)=>{var o=n??t;if(he(o))return o;var a=e==="horizontal"?i:r,s=a.scale.domain();if(a.type==="number"){var l=Math.max(s[0],s[1]),c=Math.min(s[0],s[1]);return o==="dataMin"?c:o==="dataMax"||l<0?l:Math.max(Math.min(s[0],s[1]),0)}return o==="dataMin"?s[0]:o==="dataMax"?s[1]:s[0]};function yee(e){var{areaSettings:{connectNulls:t,baseValue:n,dataKey:r},stackedData:i,layout:o,chartBaseValue:a,xAxis:s,yAxis:l,displayedData:c,dataStartIndex:u,xAxisTicks:d,yAxisTicks:f,bandSize:p}=e,m=i&&i.length,h=vee(o,a,n,s,l),g=o==="horizontal",b=!1,S=c.map((x,_)=>{var E;m?E=i[u+_]:(E=rt(x,r),Array.isArray(E)?b=!0:E=[h,E]);var C=E[1]==null||m&&!t&&rt(x,r)==null;return g?{x:Lf({axis:s,ticks:d,bandSize:p,entry:x,index:_}),y:C?null:l.scale(E[1]),value:E,payload:x}:{x:C?null:s.scale(E[1]),y:Lf({axis:l,ticks:f,bandSize:p,entry:x,index:_}),value:E,payload:x}}),w;return m||b?w=S.map(x=>{var _=Array.isArray(x.value)?x.value[0]:null;return g?{x:x.x,y:_!=null&&x.y!=null?l.scale(_):null,payload:x.payload}:{x:_!=null?s.scale(_):null,y:x.y,payload:x.payload}}):w=g?l.scale(h):s.scale(h),{points:S,baseLine:w,isRange:b}}function bee(e){var t=Kt(e,sT),n=fn();return O.createElement($p,{id:t.id,type:"area"},r=>O.createElement(O.Fragment,null,O.createElement(c0,{legendPayload:iee(t)}),O.createElement(Fp,{fn:oee,args:t}),O.createElement(d0,{type:"area",id:r,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:v2(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:n,connectNulls:t.connectNulls}),O.createElement(gee,po({},t,{id:r}))))}var lT=O.memo(bee);lT.displayName="Area";var xee=["dangerouslySetInnerHTML","ticks"],wee=["id"],_ee=["domain"],See=["domain"];function P0(){return P0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},P0.apply(null,arguments)}function Gp(e,t){if(e==null)return{};var n,r,i=Oee(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Oee(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Eee(e){var t=vt();return k.useEffect(()=>(t(zX(e)),()=>{t(VX(e))}),[e,t]),null}var Pee=e=>{var{xAxisId:t,className:n}=e,r=ce(Gv),i=fn(),o="xAxis",a=ce(g=>Yo(g,o,t,i)),s=ce(g=>TC(g,o,t,i)),l=ce(g=>EC(g,t)),c=ce(g=>EU(g,t)),u=ce(g=>tC(g,t));if(l==null||c==null||u==null)return null;var{dangerouslySetInnerHTML:d,ticks:f}=e,p=Gp(e,xee),{id:m}=u,h=Gp(u,wee);return O.createElement(O0,P0({},p,h,{scale:a,x:c.x,y:c.y,width:l.width,height:l.height,className:ie("recharts-".concat(o," ").concat(o),n),viewBox:r,ticks:s}))},kee={allowDataOverflow:hr.allowDataOverflow,allowDecimals:hr.allowDecimals,allowDuplicatedCategory:hr.allowDuplicatedCategory,height:hr.height,hide:!1,mirror:hr.mirror,orientation:hr.orientation,padding:hr.padding,reversed:hr.reversed,scale:hr.scale,tickCount:hr.tickCount,type:hr.type,xAxisId:0},Cee=e=>{var t,n,r,i,o,a=Kt(e,kee);return O.createElement(O.Fragment,null,O.createElement(Eee,{interval:(t=a.interval)!==null&&t!==void 0?t:"preserveEnd",id:a.xAxisId,scale:a.scale,type:a.type,padding:a.padding,allowDataOverflow:a.allowDataOverflow,domain:a.domain,dataKey:a.dataKey,allowDuplicatedCategory:a.allowDuplicatedCategory,allowDecimals:a.allowDecimals,tickCount:a.tickCount,includeHidden:(n=a.includeHidden)!==null&&n!==void 0?n:!1,reversed:a.reversed,ticks:a.ticks,height:a.height,orientation:a.orientation,mirror:a.mirror,hide:a.hide,unit:a.unit,name:a.name,angle:(r=a.angle)!==null&&r!==void 0?r:0,minTickGap:(i=a.minTickGap)!==null&&i!==void 0?i:5,tick:(o=a.tick)!==null&&o!==void 0?o:!0,tickFormatter:a.tickFormatter}),O.createElement(Pee,a))},Dee=(e,t)=>{var{domain:n}=e,r=Gp(e,_ee),{domain:i}=t,o=Gp(t,See);return rl(r,o)?Array.isArray(n)&&n.length===2&&Array.isArray(i)&&i.length===2?n[0]===i[0]&&n[1]===i[1]:rl({domain:n},{domain:i}):!1},vr=O.memo(Cee,Dee);vr.displayName="XAxis";var Aee=["dangerouslySetInnerHTML","ticks"],Tee=["id"],Mee=["domain"],Nee=["domain"];function k0(){return k0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},k0.apply(null,arguments)}function Xp(e,t){if(e==null)return{};var n,r,i=jee(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function jee(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Iee(e){var t=vt();return k.useEffect(()=>(t(HX(e)),()=>{t(YX(e))}),[e,t]),null}var Ree=e=>{var{yAxisId:t,className:n,width:r,label:i}=e,o=k.useRef(null),a=k.useRef(null),s=ce(Gv),l=fn(),c=vt(),u="yAxis",d=ce(_=>Yo(_,u,t,l)),f=ce(_=>PC(_,t)),p=ce(_=>kU(_,t)),m=ce(_=>TC(_,u,t,l)),h=ce(_=>nC(_,t));if(k.useLayoutEffect(()=>{if(!(r!=="auto"||!f||Ub(i)||k.isValidElement(i)||h==null)){var _=o.current;if(_){var E=_.getCalculatedWidth();Math.round(f.width)!==Math.round(E)&&c(UX({id:t,width:E}))}}},[m,f,c,i,t,r,h]),f==null||p==null||h==null)return null;var{dangerouslySetInnerHTML:g,ticks:b}=e,S=Xp(e,Aee),{id:w}=h,x=Xp(h,Tee);return O.createElement(O0,k0({},S,x,{ref:o,labelRef:a,scale:d,x:p.x,y:p.y,tickTextProps:r==="auto"?{width:void 0}:{width:r},width:f.width,height:f.height,className:ie("recharts-".concat(u," ").concat(u),n),viewBox:s,ticks:m}))},Lee={allowDataOverflow:mr.allowDataOverflow,allowDecimals:mr.allowDecimals,allowDuplicatedCategory:mr.allowDuplicatedCategory,hide:!1,mirror:mr.mirror,orientation:mr.orientation,padding:mr.padding,reversed:mr.reversed,scale:mr.scale,tickCount:mr.tickCount,type:mr.type,width:mr.width,yAxisId:0},Fee=e=>{var t,n,r,i,o,a=Kt(e,Lee);return O.createElement(O.Fragment,null,O.createElement(Iee,{interval:(t=a.interval)!==null&&t!==void 0?t:"preserveEnd",id:a.yAxisId,scale:a.scale,type:a.type,domain:a.domain,allowDataOverflow:a.allowDataOverflow,dataKey:a.dataKey,allowDuplicatedCategory:a.allowDuplicatedCategory,allowDecimals:a.allowDecimals,tickCount:a.tickCount,padding:a.padding,includeHidden:(n=a.includeHidden)!==null&&n!==void 0?n:!1,reversed:a.reversed,ticks:a.ticks,width:a.width,orientation:a.orientation,mirror:a.mirror,hide:a.hide,unit:a.unit,name:a.name,angle:(r=a.angle)!==null&&r!==void 0?r:0,minTickGap:(i=a.minTickGap)!==null&&i!==void 0?i:5,tick:(o=a.tick)!==null&&o!==void 0?o:!0,tickFormatter:a.tickFormatter}),O.createElement(Ree,a))},$ee=(e,t)=>{var{domain:n}=e,r=Xp(e,Mee),{domain:i}=t,o=Xp(t,Nee);return rl(r,o)?Array.isArray(n)&&n.length===2&&Array.isArray(i)&&i.length===2?n[0]===i[0]&&n[1]===i[1]:rl({domain:n},{domain:i}):!1},Gn=O.memo(Fee,$ee);Gn.displayName="YAxis";var Qp={exports:{}},C0={};/**
|
|
210
210
|
* @license React
|
|
211
211
|
* use-sync-external-store-with-selector.production.js
|
|
212
212
|
*
|
|
@@ -222,27 +222,27 @@ Take a look at the reducer(s) handling this action type: ${p.type}.
|
|
|
222
222
|
*
|
|
223
223
|
* This source code is licensed under the MIT license found in the
|
|
224
224
|
* LICENSE file in the root directory of this source tree.
|
|
225
|
-
*/var uT;function Wee(){return uT||(uT=1,process.env.NODE_ENV!=="production"&&(function(){function e(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=k,n=typeof Object.is=="function"?Object.is:e,r=t.useSyncExternalStore,i=t.useRef,o=t.useEffect,a=t.useMemo,s=t.useDebugValue;D0.useSyncExternalStoreWithSelector=function(l,c,u,d,f){var p=i(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=a(function(){function g(_){if(!b){if(b=!0,S=_,_=d(_),f!==void 0&&m.hasValue){var E=m.value;if(f(E,_))return w=E}return w=_}if(E=w,n(S,_))return E;var C=d(_);return f!==void 0&&f(E,C)?(S=_,E):(S=_,w=C)}var b=!1,S,w,x=u===void 0?null:u;return[function(){return g(c())},x===null?void 0:function(){return g(x())}]},[c,u,d,f]);var h=r(l,p[0],p[1]);return o(function(){m.hasValue=!0,m.value=h},[h]),s(h),h},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),D0}var dT;function zee(){return dT||(dT=1,process.env.NODE_ENV==="production"?Qp.exports=Bee():Qp.exports=Wee()),Qp.exports}zee();function Vee(e){e()}function Hee(){let e=null,t=null;return{clear(){e=null,t=null},notify(){Vee(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!r||e===null||(r=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var fT={notify(){},get:()=>[]};function Yee(e,t){let n,r=fT,i=0,o=!1;function a(h){u();const g=r.subscribe(h);let b=!1;return()=>{b||(b=!0,g(),d())}}function s(){r.notify()}function l(){m.onStateChange&&m.onStateChange()}function c(){return o}function u(){i++,n||(n=e.subscribe(l),r=Hee())}function d(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=fT)}function f(){o||(o=!0,u())}function p(){o&&(o=!1,d())}const m={addNestedSub:a,notifyNestedSubs:s,handleChangeWrapper:l,isSubscribed:c,trySubscribe:f,tryUnsubscribe:p,getListeners:()=>r};return m}var Uee=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Kee=Uee(),qee=()=>typeof navigator<"u"&&navigator.product==="ReactNative",Gee=qee(),Xee=()=>Kee||Gee?O.useLayoutEffect:O.useEffect,Qee=Xee(),Zee=Symbol.for("react-redux-context"),Jee=typeof globalThis<"u"?globalThis:{};function ete(){if(!O.createContext)return{};const e=Jee[Zee]??=new Map;let t=e.get(O.createContext);return t||(t=O.createContext(null),process.env.NODE_ENV!=="production"&&(t.displayName="ReactRedux"),e.set(O.createContext,t)),t}var tte=ete();function nte(e){const{children:t,context:n,serverState:r,store:i}=e,o=O.useMemo(()=>{const l=Yee(i),c={store:i,subscription:l,getServerState:r?()=>r:void 0};if(process.env.NODE_ENV==="production")return c;{const{identityFunctionCheck:u="once",stabilityCheck:d="once"}=e;return Object.assign(c,{stabilityCheck:d,identityFunctionCheck:u})}},[i,r]),a=O.useMemo(()=>i.getState(),[i]);Qee(()=>{const{subscription:l}=o;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),a!==i.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[o,a]);const s=n||tte;return O.createElement(s.Provider,{value:o},t)}var rte=nte,ite=(e,t)=>t,A0=W([ite,Pe,Qk,qt,GC,co,TK,Yt],RK),T0=e=>{var t=e.currentTarget.getBoundingClientRect(),n=t.width/e.currentTarget.offsetWidth,r=t.height/e.currentTarget.offsetHeight;return{chartX:Math.round((e.clientX-t.left)/n),chartY:Math.round((e.clientY-t.top)/r)}},pT=Tr("mouseClick"),hT=mc();hT.startListening({actionCreator:pT,effect:(e,t)=>{var n=e.payload,r=A0(t.getState(),T0(n));r?.activeIndex!=null&&t.dispatch(BU({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate}))}});var M0=Tr("mouseMove"),mT=mc();mT.startListening({actionCreator:M0,effect:(e,t)=>{var n=e.payload,r=t.getState(),i=Eb(r,r.tooltip.settings.shared),o=A0(r,T0(n));i==="axis"&&(o?.activeIndex!=null?t.dispatch($C({activeIndex:o.activeIndex,activeDataKey:void 0,activeCoordinate:o.activeCoordinate})):t.dispatch(FC()))}});var gT={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index"},vT=dr({name:"rootProps",initialState:gT,reducers:{updateOptions:(e,t)=>{var n;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(n=t.payload.barGap)!==null&&n!==void 0?n:gT.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className}}}),ote=vT.reducer,{updateOptions:ate}=vT.actions,yT=dr({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(e,t)=>t.payload}}),{updatePolarOptions:ste}=yT.actions,lte=yT.reducer,bT=Tr("keyDown"),xT=Tr("focus"),N0=mc();N0.startListening({actionCreator:bT,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:i}=n.tooltip,o=e.payload;if(!(o!=="ArrowRight"&&o!=="ArrowLeft"&&o!=="Enter")){var a=Number(Cb(i,tl(n))),s=co(n);if(o==="Enter"){var l=Dp(n,"axis","hover",String(i.index));t.dispatch(kb({active:!i.active,activeIndex:i.index,activeDataKey:i.dataKey,activeCoordinate:l}));return}var c=TU(n),u=c==="left-to-right"?1:-1,d=o==="ArrowRight"?1:-1,f=a+d*u;if(!(s==null||f>=s.length||f<0)){var p=Dp(n,"axis","hover",String(f));t.dispatch(kb({active:!0,activeIndex:f.toString(),activeDataKey:void 0,activeCoordinate:p}))}}}}}),N0.startListening({actionCreator:xT,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:i}=n.tooltip;if(!i.active&&i.index==null){var o="0",a=Dp(n,"axis","hover",String(o));t.dispatch(kb({activeDataKey:void 0,active:!0,activeIndex:o,activeCoordinate:a}))}}}});var Lr=Tr("externalEvent"),wT=mc();wT.startListening({actionCreator:Lr,effect:(e,t)=>{if(e.payload.handler!=null){var n=t.getState(),r={activeCoordinate:_K(n),activeDataKey:JC(n),activeIndex:Ko(n),activeLabel:ZC(n),activeTooltipIndex:Ko(n),isTooltipActive:SK(n)};e.payload.handler(r,e.payload.reactEvent)}}});var cte=W([el],e=>e.tooltipItemPayloads),ute=W([cte,Hc,(e,t,n)=>t,(e,t,n)=>n],(e,t,n,r)=>{var i=e.find(s=>s.settings.dataKey===r);if(i!=null){var{positions:o}=i;if(o!=null){var a=t(o,n);return a}}}),_T=Tr("touchMove"),ST=mc();ST.startListening({actionCreator:_T,effect:(e,t)=>{var n=e.payload,r=t.getState(),i=Eb(r,r.tooltip.settings.shared);if(i==="axis"){var o=A0(r,T0({clientX:n.touches[0].clientX,clientY:n.touches[0].clientY,currentTarget:n.currentTarget}));o?.activeIndex!=null&&t.dispatch($C({activeIndex:o.activeIndex,activeDataKey:void 0,activeCoordinate:o.activeCoordinate}))}else if(i==="item"){var a,s=n.touches[0],l=document.elementFromPoint(s.clientX,s.clientY);if(!l||!l.getAttribute)return;var c=l.getAttribute(S2),u=(a=l.getAttribute(O2))!==null&&a!==void 0?a:void 0,d=ute(t.getState(),c,u);t.dispatch(LC({activeDataKey:u,activeIndex:c,activeCoordinate:d}))}}});var dte=PE({brush:fZ,cartesianAxis:KX,chartData:ZK,errorBars:dQ,graphicalItems:fX,layout:jz,legend:S7,options:KK,polarAxis:DG,polarOptions:lte,referenceElements:SZ,rootProps:ote,tooltip:WU}),fte=function(t){return oz({reducer:dte,preloadedState:t,middleware:n=>n({serializableCheck:!1}).concat([hT.middleware,mT.middleware,N0.middleware,wT.middleware,ST.middleware]),devTools:eo.devToolsEnabled})};function OT(e){var{preloadedState:t,children:n,reduxStoreName:r}=e,i=fn(),o=k.useRef(null);if(i)return n;o.current==null&&(o.current=fte(t));var a=Sv;return O.createElement(rte,{context:a,store:o.current},n)}function ET(e){var{layout:t,width:n,height:r,margin:i}=e,o=vt(),a=fn();return k.useEffect(()=>{a||(o(Tz(t)),o(Mz({width:n,height:r})),o(Az(i)))},[o,a,t,n,r,i]),null}function PT(e){var t=vt();return k.useEffect(()=>{t(ate(e))},[t,e]),null}var pte=["children"];function hte(e,t){if(e==null)return{};var n,r,i=mte(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function mte(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Zp(){return Zp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zp.apply(null,arguments)}var gte={width:"100%",height:"100%"},vte=k.forwardRef((e,t)=>{var n=Xv(),r=Qv(),i=I2();if(!Fs(n)||!Fs(r))return null;var{children:o,otherAttributes:a,title:s,desc:l}=e,c,u;return typeof a.tabIndex=="number"?c=a.tabIndex:c=i?0:void 0,typeof a.role=="string"?u=a.role:u=i?"application":void 0,O.createElement(kg,Zp({},a,{title:s,desc:l,role:u,tabIndex:c,width:n,height:r,style:gte,ref:t}),o)}),yte=e=>{var{children:t}=e,n=ce(zf);if(!n)return null;var{width:r,height:i,y:o,x:a}=n;return O.createElement(kg,{width:r,height:i,x:a,y:o},t)},kT=k.forwardRef((e,t)=>{var{children:n}=e,r=hte(e,pte),i=fn();return i?O.createElement(yte,null,n):O.createElement(vte,Zp({ref:t},r),n)});function bte(){var e=vt(),[t,n]=k.useState(null),r=ce(l7);return k.useEffect(()=>{if(t!=null){var i=t.getBoundingClientRect(),o=i.width/t.offsetWidth;pn(o)&&o!==r&&e(Nz(o))}},[t,e,r]),n}function CT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function xte(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?CT(Object(n),!0).forEach(function(r){wte(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wte(e,t,n){return(t=_te(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _te(e){var t=Ste(e,"string");return typeof t=="symbol"?t:t+""}function Ste(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ote=k.forwardRef((e,t)=>{var{children:n,className:r,height:i,onClick:o,onContextMenu:a,onDoubleClick:s,onMouseDown:l,onMouseEnter:c,onMouseLeave:u,onMouseMove:d,onMouseUp:f,onTouchEnd:p,onTouchMove:m,onTouchStart:h,style:g,width:b}=e,S=vt(),[w,x]=k.useState(null),[_,E]=k.useState(null);sq();var C=bte(),D=k.useCallback(q=>{C(q),typeof t=="function"&&t(q),x(q),E(q)},[C,t,x,E]),T=k.useCallback(q=>{S(pT(q)),S(Lr({handler:o,reactEvent:q}))},[S,o]),j=k.useCallback(q=>{S(M0(q)),S(Lr({handler:c,reactEvent:q}))},[S,c]),A=k.useCallback(q=>{S(FC()),S(Lr({handler:u,reactEvent:q}))},[S,u]),P=k.useCallback(q=>{S(M0(q)),S(Lr({handler:d,reactEvent:q}))},[S,d]),N=k.useCallback(()=>{S(xT())},[S]),M=k.useCallback(q=>{S(bT(q.key))},[S]),R=k.useCallback(q=>{S(Lr({handler:a,reactEvent:q}))},[S,a]),L=k.useCallback(q=>{S(Lr({handler:s,reactEvent:q}))},[S,s]),$=k.useCallback(q=>{S(Lr({handler:l,reactEvent:q}))},[S,l]),V=k.useCallback(q=>{S(Lr({handler:f,reactEvent:q}))},[S,f]),z=k.useCallback(q=>{S(Lr({handler:h,reactEvent:q}))},[S,h]),B=k.useCallback(q=>{S(_T(q)),S(Lr({handler:m,reactEvent:q}))},[S,m]),X=k.useCallback(q=>{S(Lr({handler:p,reactEvent:q}))},[S,p]);return O.createElement(cD.Provider,{value:w},O.createElement(YS.Provider,{value:_},O.createElement("div",{className:ie("recharts-wrapper",r),style:xte({position:"relative",cursor:"default",width:b,height:i},g),onClick:T,onContextMenu:R,onDoubleClick:L,onFocus:N,onKeyDown:M,onMouseDown:$,onMouseEnter:j,onMouseLeave:A,onMouseMove:P,onMouseUp:V,onTouchEnd:X,onTouchMove:B,onTouchStart:z,ref:D},n)))}),Ete=["children","className","width","height","style","compact","title","desc"];function Pte(e,t){if(e==null)return{};var n,r,i=kte(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function kte(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var DT=k.forwardRef((e,t)=>{var{children:n,className:r,width:i,height:o,style:a,compact:s,title:l,desc:c}=e,u=Pte(e,Ete),d=kr(u);return s?O.createElement(kT,{otherAttributes:d,title:l,desc:c},n):O.createElement(Ote,{className:r,style:a,width:i,height:o,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},O.createElement(kT,{otherAttributes:d,title:l,desc:c,ref:t},O.createElement(OZ,null,n)))}),Cte=["width","height"];function j0(){return j0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},j0.apply(null,arguments)}function Dte(e,t){if(e==null)return{};var n,r,i=Ate(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Ate(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Tte={top:5,right:5,bottom:5,left:5},Mte={accessibilityLayer:!0,layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:Tte,reverseStackOrder:!1,syncMethod:"index"},I0=k.forwardRef(function(t,n){var r,i=Ut(t.categoricalChartProps,Mte),{width:o,height:a}=i,s=Dte(i,Cte);if(!Fs(o)||!Fs(a))return null;var{chartName:l,defaultTooltipEventType:c,validateTooltipEventTypes:u,tooltipPayloadSearcher:d,categoricalChartProps:f}=t,p={chartName:l,defaultTooltipEventType:c,validateTooltipEventTypes:u,tooltipPayloadSearcher:d,eventEmitter:void 0};return O.createElement(OT,{preloadedState:{options:p},reduxStoreName:(r=f.id)!==null&&r!==void 0?r:l},O.createElement(TA,{chartData:f.data}),O.createElement(ET,{width:o,height:a,layout:i.layout,margin:i.margin}),O.createElement(PT,{accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className}),O.createElement(DT,j0({},s,{width:o,height:a,ref:n})))}),Nte=["axis"],R0=k.forwardRef((e,t)=>O.createElement(I0,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:Nte,tooltipPayloadSearcher:Tp,categoricalChartProps:e,ref:t})),jte=["axis","item"],Zo=k.forwardRef((e,t)=>O.createElement(I0,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:jte,tooltipPayloadSearcher:Tp,categoricalChartProps:e,ref:t}));function Ite(e){var t=vt();return k.useEffect(()=>{t(ste(e))},[t,e]),null}var Rte=["width","height","layout"];function L0(){return L0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},L0.apply(null,arguments)}function Lte(e,t){if(e==null)return{};var n,r,i=Fte(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Fte(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var $te={top:5,right:5,bottom:5,left:5},Bte={accessibilityLayer:!0,stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:$te,reverseStackOrder:!1,syncMethod:"index",layout:"radial"},Wte=k.forwardRef(function(t,n){var r,i=Ut(t.categoricalChartProps,Bte),{width:o,height:a,layout:s}=i,l=Lte(i,Rte);if(!Fs(o)||!Fs(a))return null;var{chartName:c,defaultTooltipEventType:u,validateTooltipEventTypes:d,tooltipPayloadSearcher:f}=t,p={chartName:c,defaultTooltipEventType:u,validateTooltipEventTypes:d,tooltipPayloadSearcher:f,eventEmitter:void 0};return O.createElement(OT,{preloadedState:{options:p},reduxStoreName:(r=i.id)!==null&&r!==void 0?r:c},O.createElement(TA,{chartData:i.data}),O.createElement(ET,{width:o,height:a,layout:s,margin:i.margin}),O.createElement(PT,{accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className}),O.createElement(Ite,{cx:i.cx,cy:i.cy,startAngle:i.startAngle,endAngle:i.endAngle,innerRadius:i.innerRadius,outerRadius:i.outerRadius}),O.createElement(DT,L0({width:o,height:a},l,{ref:n})))}),zte=["item"],Vte={layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"},ho=k.forwardRef((e,t)=>{var n=Ut(e,Vte);return O.createElement(Wte,{chartName:"PieChart",defaultTooltipEventType:"item",validateTooltipEventTypes:zte,tooltipPayloadSearcher:Tp,categoricalChartProps:n,ref:t})}),Hte=["axis"],Yte=k.forwardRef((e,t)=>O.createElement(I0,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:Hte,tooltipPayloadSearcher:Tp,categoricalChartProps:e,ref:t}));function il(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...r){return e(...r)||t(...r)}}function Ute(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function F0(e,t){return F0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},F0(e,t)}function Kte(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,F0(e,t)}const AT={disabled:!1};var qte=process.env.NODE_ENV!=="production"?y.oneOfType([y.number,y.shape({enter:y.number,exit:y.number,appear:y.number}).isRequired]):null;process.env.NODE_ENV!=="production"&&y.oneOfType([y.string,y.shape({enter:y.string,exit:y.string,active:y.string}),y.shape({enter:y.string,enterDone:y.string,enterActive:y.string,exit:y.string,exitDone:y.string,exitActive:y.string})]);const TT=k.createContext(null);var Gte=function(t){return t.scrollTop},Qc="unmounted",Ka="exited",qa="entering",ol="entered",$0="exiting",Ei=(function(e){Kte(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=Ka,o.appearStatus=qa):l=ol:r.unmountOnExit||r.mountOnEnter?l=Qc:l=Ka,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===Qc?{status:Ka}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==qa&&a!==ol&&(o=qa):(a===qa||a===ol)&&(o=$0)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===qa){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:Ii.findDOMNode(this);a&&Gte(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ka&&this.setState({status:Qc})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[Ii.findDOMNode(this),s],c=l[0],u=l[1],d=this.getTimeouts(),f=s?d.appear:d.enter;if(!i&&!a||AT.disabled){this.safeSetState({status:ol},function(){o.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:qa},function(){o.props.onEntering(c,u),o.onTransitionEnd(f,function(){o.safeSetState({status:ol},function(){o.props.onEntered(c,u)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:Ii.findDOMNode(this);if(!o||AT.disabled){this.safeSetState({status:Ka},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:$0},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:Ka},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:Ii.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],c=l[0],u=l[1];this.props.addEndListener(c,u)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Qc)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=Ute(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return k.createElement(TT.Provider,{value:null},typeof a=="function"?a(i,s):k.cloneElement(k.Children.only(a),s))},t})(k.Component);Ei.contextType=TT,Ei.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:y.shape({current:typeof Element>"u"?y.any:function(e,t,n,r,i,o){var a=e[t];return y.instanceOf(a&&"ownerDocument"in a?a.ownerDocument.defaultView.Element:Element)(e,t,n,r,i,o)}}),children:y.oneOfType([y.func.isRequired,y.element.isRequired]).isRequired,in:y.bool,mountOnEnter:y.bool,unmountOnExit:y.bool,appear:y.bool,enter:y.bool,exit:y.bool,timeout:function(t){var n=qte;t.addEndListener||(n=n.isRequired);for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return n.apply(void 0,[t].concat(i))},addEndListener:y.func,onEnter:y.func,onEntering:y.func,onEntered:y.func,onExit:y.func,onExiting:y.func,onExited:y.func}:{};function al(){}Ei.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:al,onEntering:al,onEntered:al,onExit:al,onExiting:al,onExited:al},Ei.UNMOUNTED=Qc,Ei.EXITED=Ka,Ei.ENTERING=qa,Ei.ENTERED=ol,Ei.EXITING=$0;const MT={};function Xte(e,t){const n=O.useRef(MT);return n.current===MT&&(n.current=e(t)),n}const Qte=[];function Zte(e){O.useEffect(e,Qte)}class Jp{static create(){return new Jp}currentId=null;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear}function Zc(){const e=Xte(Jp.create).current;return Zte(e.disposeEffect),e}function Jte(e){const{prototype:t={}}=e;return!!t.isReactComponent}function ene(e,t,n,r,i){const o=e[t],a=i||t;if(o==null||typeof window>"u")return null;let s;return typeof o=="function"&&!Jte(o)&&(s="Did you accidentally provide a plain function component instead?"),s!==void 0?new Error(`Invalid ${r} \`${a}\` supplied to \`${n}\`. Expected an element type that can hold a ref. ${s} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const NT=il(y.elementType,ene),jT=e=>e.scrollTop;function eh(e,t){const{timeout:n,easing:r,style:i={}}=e;return{duration:i.transitionDuration??(typeof n=="number"?n:n[t.mode]||0),easing:i.transitionTimingFunction??(typeof r=="object"?r[t.mode]:r),delay:i.transitionDelay}}function tne(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":Number.isFinite(e)?e!==Math.floor(e)?"float":"number":"Infinity";case"object":return e===null?"null":e.constructor.name;default:return t}}function IT(e,t,n,r){const i=e[t];if(i==null||!Number.isInteger(i)){const o=tne(i);return new RangeError(`Invalid ${r} \`${t}\` of type \`${o}\` supplied to \`${n}\`, expected \`integer\`.`)}return null}function RT(e,t,n,r){return e[t]===void 0?null:IT(e,t,n,r)}function B0(){return null}RT.isRequired=IT,B0.isRequired=B0;const LT=process.env.NODE_ENV==="production"?B0:RT;function nne(e){return cn("MuiPaper",e)}Tn("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const rne=e=>{const{square:t,elevation:n,variant:r,classes:i}=e,o={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return vn(o,nne,i)},ine=ke("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(Mn(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow"),variants:[{props:({ownerState:t})=>!t.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),FT=O.forwardRef(function(t,n){const r=zn({props:t,name:"MuiPaper"}),i=bd(),{className:o,component:a="div",elevation:s=1,square:l=!1,variant:c="elevation",...u}=r,d={...r,component:a,elevation:s,square:l,variant:c},f=rne(d);return process.env.NODE_ENV!=="production"&&i.shadows[s]===void 0&&console.error([`MUI: The elevation provided <Paper elevation={${s}}> is not available in the theme.`,`Please make sure that \`theme.shadows[${s}]\` is defined.`].join(`
|
|
225
|
+
*/var uT;function Wee(){return uT||(uT=1,process.env.NODE_ENV!=="production"&&(function(){function e(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=k,n=typeof Object.is=="function"?Object.is:e,r=t.useSyncExternalStore,i=t.useRef,o=t.useEffect,a=t.useMemo,s=t.useDebugValue;D0.useSyncExternalStoreWithSelector=function(l,c,u,d,f){var p=i(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=a(function(){function g(_){if(!b){if(b=!0,S=_,_=d(_),f!==void 0&&m.hasValue){var E=m.value;if(f(E,_))return w=E}return w=_}if(E=w,n(S,_))return E;var C=d(_);return f!==void 0&&f(E,C)?(S=_,E):(S=_,w=C)}var b=!1,S,w,x=u===void 0?null:u;return[function(){return g(c())},x===null?void 0:function(){return g(x())}]},[c,u,d,f]);var h=r(l,p[0],p[1]);return o(function(){m.hasValue=!0,m.value=h},[h]),s(h),h},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),D0}var dT;function zee(){return dT||(dT=1,process.env.NODE_ENV==="production"?Qp.exports=Bee():Qp.exports=Wee()),Qp.exports}zee();function Vee(e){e()}function Hee(){let e=null,t=null;return{clear(){e=null,t=null},notify(){Vee(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!r||e===null||(r=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var fT={notify(){},get:()=>[]};function Yee(e,t){let n,r=fT,i=0,o=!1;function a(h){u();const g=r.subscribe(h);let b=!1;return()=>{b||(b=!0,g(),d())}}function s(){r.notify()}function l(){m.onStateChange&&m.onStateChange()}function c(){return o}function u(){i++,n||(n=e.subscribe(l),r=Hee())}function d(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=fT)}function f(){o||(o=!0,u())}function p(){o&&(o=!1,d())}const m={addNestedSub:a,notifyNestedSubs:s,handleChangeWrapper:l,isSubscribed:c,trySubscribe:f,tryUnsubscribe:p,getListeners:()=>r};return m}var Uee=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Kee=Uee(),qee=()=>typeof navigator<"u"&&navigator.product==="ReactNative",Gee=qee(),Xee=()=>Kee||Gee?O.useLayoutEffect:O.useEffect,Qee=Xee(),Zee=Symbol.for("react-redux-context"),Jee=typeof globalThis<"u"?globalThis:{};function ete(){if(!O.createContext)return{};const e=Jee[Zee]??=new Map;let t=e.get(O.createContext);return t||(t=O.createContext(null),process.env.NODE_ENV!=="production"&&(t.displayName="ReactRedux"),e.set(O.createContext,t)),t}var tte=ete();function nte(e){const{children:t,context:n,serverState:r,store:i}=e,o=O.useMemo(()=>{const l=Yee(i),c={store:i,subscription:l,getServerState:r?()=>r:void 0};if(process.env.NODE_ENV==="production")return c;{const{identityFunctionCheck:u="once",stabilityCheck:d="once"}=e;return Object.assign(c,{stabilityCheck:d,identityFunctionCheck:u})}},[i,r]),a=O.useMemo(()=>i.getState(),[i]);Qee(()=>{const{subscription:l}=o;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),a!==i.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[o,a]);const s=n||tte;return O.createElement(s.Provider,{value:o},t)}var rte=nte,ite=(e,t)=>t,A0=W([ite,Pe,Qk,Gt,GC,co,TK,Ut],RK),T0=e=>{var t=e.currentTarget.getBoundingClientRect(),n=t.width/e.currentTarget.offsetWidth,r=t.height/e.currentTarget.offsetHeight;return{chartX:Math.round((e.clientX-t.left)/n),chartY:Math.round((e.clientY-t.top)/r)}},pT=Tr("mouseClick"),hT=mc();hT.startListening({actionCreator:pT,effect:(e,t)=>{var n=e.payload,r=A0(t.getState(),T0(n));r?.activeIndex!=null&&t.dispatch(BU({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate}))}});var M0=Tr("mouseMove"),mT=mc();mT.startListening({actionCreator:M0,effect:(e,t)=>{var n=e.payload,r=t.getState(),i=Eb(r,r.tooltip.settings.shared),o=A0(r,T0(n));i==="axis"&&(o?.activeIndex!=null?t.dispatch($C({activeIndex:o.activeIndex,activeDataKey:void 0,activeCoordinate:o.activeCoordinate})):t.dispatch(FC()))}});var gT={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index"},vT=dr({name:"rootProps",initialState:gT,reducers:{updateOptions:(e,t)=>{var n;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(n=t.payload.barGap)!==null&&n!==void 0?n:gT.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className}}}),ote=vT.reducer,{updateOptions:ate}=vT.actions,yT=dr({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(e,t)=>t.payload}}),{updatePolarOptions:ste}=yT.actions,lte=yT.reducer,bT=Tr("keyDown"),xT=Tr("focus"),N0=mc();N0.startListening({actionCreator:bT,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:i}=n.tooltip,o=e.payload;if(!(o!=="ArrowRight"&&o!=="ArrowLeft"&&o!=="Enter")){var a=Number(Cb(i,tl(n))),s=co(n);if(o==="Enter"){var l=Dp(n,"axis","hover",String(i.index));t.dispatch(kb({active:!i.active,activeIndex:i.index,activeDataKey:i.dataKey,activeCoordinate:l}));return}var c=TU(n),u=c==="left-to-right"?1:-1,d=o==="ArrowRight"?1:-1,f=a+d*u;if(!(s==null||f>=s.length||f<0)){var p=Dp(n,"axis","hover",String(f));t.dispatch(kb({active:!0,activeIndex:f.toString(),activeDataKey:void 0,activeCoordinate:p}))}}}}}),N0.startListening({actionCreator:xT,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:i}=n.tooltip;if(!i.active&&i.index==null){var o="0",a=Dp(n,"axis","hover",String(o));t.dispatch(kb({activeDataKey:void 0,active:!0,activeIndex:o,activeCoordinate:a}))}}}});var Lr=Tr("externalEvent"),wT=mc();wT.startListening({actionCreator:Lr,effect:(e,t)=>{if(e.payload.handler!=null){var n=t.getState(),r={activeCoordinate:_K(n),activeDataKey:JC(n),activeIndex:Ko(n),activeLabel:ZC(n),activeTooltipIndex:Ko(n),isTooltipActive:SK(n)};e.payload.handler(r,e.payload.reactEvent)}}});var cte=W([el],e=>e.tooltipItemPayloads),ute=W([cte,Hc,(e,t,n)=>t,(e,t,n)=>n],(e,t,n,r)=>{var i=e.find(s=>s.settings.dataKey===r);if(i!=null){var{positions:o}=i;if(o!=null){var a=t(o,n);return a}}}),_T=Tr("touchMove"),ST=mc();ST.startListening({actionCreator:_T,effect:(e,t)=>{var n=e.payload,r=t.getState(),i=Eb(r,r.tooltip.settings.shared);if(i==="axis"){var o=A0(r,T0({clientX:n.touches[0].clientX,clientY:n.touches[0].clientY,currentTarget:n.currentTarget}));o?.activeIndex!=null&&t.dispatch($C({activeIndex:o.activeIndex,activeDataKey:void 0,activeCoordinate:o.activeCoordinate}))}else if(i==="item"){var a,s=n.touches[0],l=document.elementFromPoint(s.clientX,s.clientY);if(!l||!l.getAttribute)return;var c=l.getAttribute(S2),u=(a=l.getAttribute(O2))!==null&&a!==void 0?a:void 0,d=ute(t.getState(),c,u);t.dispatch(LC({activeDataKey:u,activeIndex:c,activeCoordinate:d}))}}});var dte=PE({brush:fZ,cartesianAxis:KX,chartData:ZK,errorBars:dQ,graphicalItems:fX,layout:jz,legend:S7,options:KK,polarAxis:DG,polarOptions:lte,referenceElements:SZ,rootProps:ote,tooltip:WU}),fte=function(t){return oz({reducer:dte,preloadedState:t,middleware:n=>n({serializableCheck:!1}).concat([hT.middleware,mT.middleware,N0.middleware,wT.middleware,ST.middleware]),devTools:eo.devToolsEnabled})};function OT(e){var{preloadedState:t,children:n,reduxStoreName:r}=e,i=fn(),o=k.useRef(null);if(i)return n;o.current==null&&(o.current=fte(t));var a=Sv;return O.createElement(rte,{context:a,store:o.current},n)}function ET(e){var{layout:t,width:n,height:r,margin:i}=e,o=vt(),a=fn();return k.useEffect(()=>{a||(o(Tz(t)),o(Mz({width:n,height:r})),o(Az(i)))},[o,a,t,n,r,i]),null}function PT(e){var t=vt();return k.useEffect(()=>{t(ate(e))},[t,e]),null}var pte=["children"];function hte(e,t){if(e==null)return{};var n,r,i=mte(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function mte(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Zp(){return Zp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zp.apply(null,arguments)}var gte={width:"100%",height:"100%"},vte=k.forwardRef((e,t)=>{var n=Xv(),r=Qv(),i=I2();if(!Fs(n)||!Fs(r))return null;var{children:o,otherAttributes:a,title:s,desc:l}=e,c,u;return typeof a.tabIndex=="number"?c=a.tabIndex:c=i?0:void 0,typeof a.role=="string"?u=a.role:u=i?"application":void 0,O.createElement(kg,Zp({},a,{title:s,desc:l,role:u,tabIndex:c,width:n,height:r,style:gte,ref:t}),o)}),yte=e=>{var{children:t}=e,n=ce(zf);if(!n)return null;var{width:r,height:i,y:o,x:a}=n;return O.createElement(kg,{width:r,height:i,x:a,y:o},t)},kT=k.forwardRef((e,t)=>{var{children:n}=e,r=hte(e,pte),i=fn();return i?O.createElement(yte,null,n):O.createElement(vte,Zp({ref:t},r),n)});function bte(){var e=vt(),[t,n]=k.useState(null),r=ce(l7);return k.useEffect(()=>{if(t!=null){var i=t.getBoundingClientRect(),o=i.width/t.offsetWidth;pn(o)&&o!==r&&e(Nz(o))}},[t,e,r]),n}function CT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function xte(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?CT(Object(n),!0).forEach(function(r){wte(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wte(e,t,n){return(t=_te(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _te(e){var t=Ste(e,"string");return typeof t=="symbol"?t:t+""}function Ste(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ote=k.forwardRef((e,t)=>{var{children:n,className:r,height:i,onClick:o,onContextMenu:a,onDoubleClick:s,onMouseDown:l,onMouseEnter:c,onMouseLeave:u,onMouseMove:d,onMouseUp:f,onTouchEnd:p,onTouchMove:m,onTouchStart:h,style:g,width:b}=e,S=vt(),[w,x]=k.useState(null),[_,E]=k.useState(null);sq();var C=bte(),D=k.useCallback(q=>{C(q),typeof t=="function"&&t(q),x(q),E(q)},[C,t,x,E]),T=k.useCallback(q=>{S(pT(q)),S(Lr({handler:o,reactEvent:q}))},[S,o]),j=k.useCallback(q=>{S(M0(q)),S(Lr({handler:c,reactEvent:q}))},[S,c]),A=k.useCallback(q=>{S(FC()),S(Lr({handler:u,reactEvent:q}))},[S,u]),P=k.useCallback(q=>{S(M0(q)),S(Lr({handler:d,reactEvent:q}))},[S,d]),N=k.useCallback(()=>{S(xT())},[S]),M=k.useCallback(q=>{S(bT(q.key))},[S]),R=k.useCallback(q=>{S(Lr({handler:a,reactEvent:q}))},[S,a]),L=k.useCallback(q=>{S(Lr({handler:s,reactEvent:q}))},[S,s]),$=k.useCallback(q=>{S(Lr({handler:l,reactEvent:q}))},[S,l]),V=k.useCallback(q=>{S(Lr({handler:f,reactEvent:q}))},[S,f]),z=k.useCallback(q=>{S(Lr({handler:h,reactEvent:q}))},[S,h]),B=k.useCallback(q=>{S(_T(q)),S(Lr({handler:m,reactEvent:q}))},[S,m]),X=k.useCallback(q=>{S(Lr({handler:p,reactEvent:q}))},[S,p]);return O.createElement(cD.Provider,{value:w},O.createElement(YS.Provider,{value:_},O.createElement("div",{className:ie("recharts-wrapper",r),style:xte({position:"relative",cursor:"default",width:b,height:i},g),onClick:T,onContextMenu:R,onDoubleClick:L,onFocus:N,onKeyDown:M,onMouseDown:$,onMouseEnter:j,onMouseLeave:A,onMouseMove:P,onMouseUp:V,onTouchEnd:X,onTouchMove:B,onTouchStart:z,ref:D},n)))}),Ete=["children","className","width","height","style","compact","title","desc"];function Pte(e,t){if(e==null)return{};var n,r,i=kte(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function kte(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var DT=k.forwardRef((e,t)=>{var{children:n,className:r,width:i,height:o,style:a,compact:s,title:l,desc:c}=e,u=Pte(e,Ete),d=kr(u);return s?O.createElement(kT,{otherAttributes:d,title:l,desc:c},n):O.createElement(Ote,{className:r,style:a,width:i,height:o,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},O.createElement(kT,{otherAttributes:d,title:l,desc:c,ref:t},O.createElement(OZ,null,n)))}),Cte=["width","height"];function j0(){return j0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},j0.apply(null,arguments)}function Dte(e,t){if(e==null)return{};var n,r,i=Ate(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Ate(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Tte={top:5,right:5,bottom:5,left:5},Mte={accessibilityLayer:!0,layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:Tte,reverseStackOrder:!1,syncMethod:"index"},I0=k.forwardRef(function(t,n){var r,i=Kt(t.categoricalChartProps,Mte),{width:o,height:a}=i,s=Dte(i,Cte);if(!Fs(o)||!Fs(a))return null;var{chartName:l,defaultTooltipEventType:c,validateTooltipEventTypes:u,tooltipPayloadSearcher:d,categoricalChartProps:f}=t,p={chartName:l,defaultTooltipEventType:c,validateTooltipEventTypes:u,tooltipPayloadSearcher:d,eventEmitter:void 0};return O.createElement(OT,{preloadedState:{options:p},reduxStoreName:(r=f.id)!==null&&r!==void 0?r:l},O.createElement(TA,{chartData:f.data}),O.createElement(ET,{width:o,height:a,layout:i.layout,margin:i.margin}),O.createElement(PT,{accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className}),O.createElement(DT,j0({},s,{width:o,height:a,ref:n})))}),Nte=["axis"],R0=k.forwardRef((e,t)=>O.createElement(I0,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:Nte,tooltipPayloadSearcher:Tp,categoricalChartProps:e,ref:t})),jte=["axis","item"],Zo=k.forwardRef((e,t)=>O.createElement(I0,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:jte,tooltipPayloadSearcher:Tp,categoricalChartProps:e,ref:t}));function Ite(e){var t=vt();return k.useEffect(()=>{t(ste(e))},[t,e]),null}var Rte=["width","height","layout"];function L0(){return L0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},L0.apply(null,arguments)}function Lte(e,t){if(e==null)return{};var n,r,i=Fte(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Fte(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var $te={top:5,right:5,bottom:5,left:5},Bte={accessibilityLayer:!0,stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:$te,reverseStackOrder:!1,syncMethod:"index",layout:"radial"},Wte=k.forwardRef(function(t,n){var r,i=Kt(t.categoricalChartProps,Bte),{width:o,height:a,layout:s}=i,l=Lte(i,Rte);if(!Fs(o)||!Fs(a))return null;var{chartName:c,defaultTooltipEventType:u,validateTooltipEventTypes:d,tooltipPayloadSearcher:f}=t,p={chartName:c,defaultTooltipEventType:u,validateTooltipEventTypes:d,tooltipPayloadSearcher:f,eventEmitter:void 0};return O.createElement(OT,{preloadedState:{options:p},reduxStoreName:(r=i.id)!==null&&r!==void 0?r:c},O.createElement(TA,{chartData:i.data}),O.createElement(ET,{width:o,height:a,layout:s,margin:i.margin}),O.createElement(PT,{accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className}),O.createElement(Ite,{cx:i.cx,cy:i.cy,startAngle:i.startAngle,endAngle:i.endAngle,innerRadius:i.innerRadius,outerRadius:i.outerRadius}),O.createElement(DT,L0({width:o,height:a},l,{ref:n})))}),zte=["item"],Vte={layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"},ho=k.forwardRef((e,t)=>{var n=Kt(e,Vte);return O.createElement(Wte,{chartName:"PieChart",defaultTooltipEventType:"item",validateTooltipEventTypes:zte,tooltipPayloadSearcher:Tp,categoricalChartProps:n,ref:t})}),Hte=["axis"],Yte=k.forwardRef((e,t)=>O.createElement(I0,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:Hte,tooltipPayloadSearcher:Tp,categoricalChartProps:e,ref:t}));function il(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...r){return e(...r)||t(...r)}}function Ute(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function F0(e,t){return F0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},F0(e,t)}function Kte(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,F0(e,t)}const AT={disabled:!1};var qte=process.env.NODE_ENV!=="production"?y.oneOfType([y.number,y.shape({enter:y.number,exit:y.number,appear:y.number}).isRequired]):null;process.env.NODE_ENV!=="production"&&y.oneOfType([y.string,y.shape({enter:y.string,exit:y.string,active:y.string}),y.shape({enter:y.string,enterDone:y.string,enterActive:y.string,exit:y.string,exitDone:y.string,exitActive:y.string})]);const TT=k.createContext(null);var Gte=function(t){return t.scrollTop},Qc="unmounted",Ka="exited",qa="entering",ol="entered",$0="exiting",Ei=(function(e){Kte(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=Ka,o.appearStatus=qa):l=ol:r.unmountOnExit||r.mountOnEnter?l=Qc:l=Ka,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===Qc?{status:Ka}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==qa&&a!==ol&&(o=qa):(a===qa||a===ol)&&(o=$0)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===qa){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:Ii.findDOMNode(this);a&&Gte(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ka&&this.setState({status:Qc})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[Ii.findDOMNode(this),s],c=l[0],u=l[1],d=this.getTimeouts(),f=s?d.appear:d.enter;if(!i&&!a||AT.disabled){this.safeSetState({status:ol},function(){o.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:qa},function(){o.props.onEntering(c,u),o.onTransitionEnd(f,function(){o.safeSetState({status:ol},function(){o.props.onEntered(c,u)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:Ii.findDOMNode(this);if(!o||AT.disabled){this.safeSetState({status:Ka},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:$0},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:Ka},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:Ii.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],c=l[0],u=l[1];this.props.addEndListener(c,u)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Qc)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=Ute(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return k.createElement(TT.Provider,{value:null},typeof a=="function"?a(i,s):k.cloneElement(k.Children.only(a),s))},t})(k.Component);Ei.contextType=TT,Ei.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:y.shape({current:typeof Element>"u"?y.any:function(e,t,n,r,i,o){var a=e[t];return y.instanceOf(a&&"ownerDocument"in a?a.ownerDocument.defaultView.Element:Element)(e,t,n,r,i,o)}}),children:y.oneOfType([y.func.isRequired,y.element.isRequired]).isRequired,in:y.bool,mountOnEnter:y.bool,unmountOnExit:y.bool,appear:y.bool,enter:y.bool,exit:y.bool,timeout:function(t){var n=qte;t.addEndListener||(n=n.isRequired);for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return n.apply(void 0,[t].concat(i))},addEndListener:y.func,onEnter:y.func,onEntering:y.func,onEntered:y.func,onExit:y.func,onExiting:y.func,onExited:y.func}:{};function al(){}Ei.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:al,onEntering:al,onEntered:al,onExit:al,onExiting:al,onExited:al},Ei.UNMOUNTED=Qc,Ei.EXITED=Ka,Ei.ENTERING=qa,Ei.ENTERED=ol,Ei.EXITING=$0;const MT={};function Xte(e,t){const n=O.useRef(MT);return n.current===MT&&(n.current=e(t)),n}const Qte=[];function Zte(e){O.useEffect(e,Qte)}class Jp{static create(){return new Jp}currentId=null;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear}function Zc(){const e=Xte(Jp.create).current;return Zte(e.disposeEffect),e}function Jte(e){const{prototype:t={}}=e;return!!t.isReactComponent}function ene(e,t,n,r,i){const o=e[t],a=i||t;if(o==null||typeof window>"u")return null;let s;return typeof o=="function"&&!Jte(o)&&(s="Did you accidentally provide a plain function component instead?"),s!==void 0?new Error(`Invalid ${r} \`${a}\` supplied to \`${n}\`. Expected an element type that can hold a ref. ${s} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const NT=il(y.elementType,ene),jT=e=>e.scrollTop;function eh(e,t){const{timeout:n,easing:r,style:i={}}=e;return{duration:i.transitionDuration??(typeof n=="number"?n:n[t.mode]||0),easing:i.transitionTimingFunction??(typeof r=="object"?r[t.mode]:r),delay:i.transitionDelay}}function tne(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":Number.isFinite(e)?e!==Math.floor(e)?"float":"number":"Infinity";case"object":return e===null?"null":e.constructor.name;default:return t}}function IT(e,t,n,r){const i=e[t];if(i==null||!Number.isInteger(i)){const o=tne(i);return new RangeError(`Invalid ${r} \`${t}\` of type \`${o}\` supplied to \`${n}\`, expected \`integer\`.`)}return null}function RT(e,t,n,r){return e[t]===void 0?null:IT(e,t,n,r)}function B0(){return null}RT.isRequired=IT,B0.isRequired=B0;const LT=process.env.NODE_ENV==="production"?B0:RT;function nne(e){return cn("MuiPaper",e)}Tn("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const rne=e=>{const{square:t,elevation:n,variant:r,classes:i}=e,o={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return vn(o,nne,i)},ine=ke("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(Mn(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow"),variants:[{props:({ownerState:t})=>!t.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),FT=O.forwardRef(function(t,n){const r=zn({props:t,name:"MuiPaper"}),i=bd(),{className:o,component:a="div",elevation:s=1,square:l=!1,variant:c="elevation",...u}=r,d={...r,component:a,elevation:s,square:l,variant:c},f=rne(d);return process.env.NODE_ENV!=="production"&&i.shadows[s]===void 0&&console.error([`MUI: The elevation provided <Paper elevation={${s}}> is not available in the theme.`,`Please make sure that \`theme.shadows[${s}]\` is defined.`].join(`
|
|
226
226
|
`)),v.jsx(ine,{as:a,ownerState:d,className:ie(f.root,o),ref:n,...u,style:{...c==="elevation"&&{"--Paper-shadow":(i.vars||i).shadows[s],...i.vars&&{"--Paper-overlay":i.vars.overlays?.[s]},...!i.vars&&i.palette.mode==="dark"&&{"--Paper-overlay":`linear-gradient(${md("#fff",Am(s))}, ${md("#fff",Am(s))})`}},...u.style}})});process.env.NODE_ENV!=="production"&&(FT.propTypes={children:y.node,classes:y.object,className:y.string,component:y.elementType,elevation:il(LT,e=>{const{elevation:t,variant:n}=e;return t>0&&n==="outlined"?new Error(`MUI: Combining \`elevation={${t}}\` with \`variant="${n}"\` has no effect. Either use \`elevation={0}\` or use a different \`variant\`.`):null}),square:y.bool,style:y.object,sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),variant:y.oneOfType([y.oneOf(["elevation","outlined"]),y.string])});function th(e){return typeof e=="string"}function $T(e,t,n){return e===void 0||th(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function BT(e,t,n){return typeof e=="function"?e(t,n):e}function WT(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function zT(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function VT(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const p=ie(n?.className,o,i?.className,r?.className),m={...n?.style,...i?.style,...r?.style},h={...n,...i,...r};return p.length>0&&(h.className=p),Object.keys(m).length>0&&(h.style=m),{props:h,internalRef:void 0}}const a=WT({...i,...r}),s=zT(r),l=zT(i),c=t(a),u=ie(c?.className,n?.className,o,i?.className,r?.className),d={...c?.style,...n?.style,...i?.style,...r?.style},f={...c,...n,...l,...s};return u.length>0&&(f.className=u),Object.keys(d).length>0&&(f.style=d),{props:f,internalRef:c.ref}}function Xn(e,t){const{className:n,elementType:r,ownerState:i,externalForwardedProps:o,internalForwardedProps:a,shouldForwardComponentProp:s=!1,...l}=t,{component:c,slots:u={[e]:void 0},slotProps:d={[e]:void 0},...f}=o,p=u[e]||r,m=BT(d[e],i),{props:{component:h,...g},internalRef:b}=VT({className:n,...l,externalForwardedProps:e==="root"?f:void 0,externalSlotProps:m}),S=Nn(b,m?.ref,t.ref),w=e==="root"?h||c:h,x=$T(p,{...e==="root"&&!c&&!u[e]&&a,...e!=="root"&&!u[e]&&a,...g,...w&&!s&&{as:w},...w&&s&&{component:w},ref:S},i);return[p,x]}const mo=y.oneOfType([y.func,y.object]);function HT(e){try{return e.matches(":focus-visible")}catch{process.env.NODE_ENV!=="production"&&!/jsdom/.test(window.navigator.userAgent)&&console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.","Some components rely on this feature to work properly."].join(`
|
|
227
|
-
`))}return!1}function one(e){return typeof e.main=="string"}function ane(e,t=[]){if(!one(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||typeof e[n]!="string")return!1;return!0}function W0(e=[]){return([,t])=>t&&ane(t,e)}function go(e,t,n,r,i){if(process.env.NODE_ENV==="production")return null;const o=e[t],a=i||t;return o==null?null:o&&o.nodeType!==1?new Error(`Invalid ${r} \`${a}\` supplied to \`${n}\`. Expected an HTMLElement.`):null}var Qn="top",Fr="bottom",$r="right",Zn="left",z0="auto",Jc=[Qn,Fr,$r,Zn],sl="start",eu="end",sne="clippingParents",YT="viewport",tu="popper",lne="reference",UT=Jc.reduce(function(e,t){return e.concat([t+"-"+sl,t+"-"+eu])},[]),KT=[].concat(Jc,[z0]).reduce(function(e,t){return e.concat([t,t+"-"+sl,t+"-"+eu])},[]),cne="beforeRead",une="read",dne="afterRead",fne="beforeMain",pne="main",hne="afterMain",mne="beforeWrite",gne="write",vne="afterWrite",yne=[cne,une,dne,fne,pne,hne,mne,gne,vne];function Pi(e){return e?(e.nodeName||"").toLowerCase():null}function yr(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Ga(e){var t=yr(e).Element;return e instanceof t||e instanceof Element}function Br(e){var t=yr(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function V0(e){if(typeof ShadowRoot>"u")return!1;var t=yr(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function bne(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Br(o)||!Pi(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function xne(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,c){return l[c]="",l},{});!Br(i)||!Pi(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const qT={name:"applyStyles",enabled:!0,phase:"write",fn:bne,effect:xne,requires:["computeStyles"]};function ki(e){return e.split("-")[0]}var Xa=Math.max,nh=Math.min,ll=Math.round;function H0(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function GT(){return!/^((?!chrome|android).)*safari/i.test(H0())}function cl(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Br(e)&&(i=e.offsetWidth>0&&ll(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&ll(r.height)/e.offsetHeight||1);var a=Ga(e)?yr(e):window,s=a.visualViewport,l=!GT()&&n,c=(r.left+(l&&s?s.offsetLeft:0))/i,u=(r.top+(l&&s?s.offsetTop:0))/o,d=r.width/i,f=r.height/o;return{width:d,height:f,top:u,right:c+d,bottom:u+f,left:c,x:c,y:u}}function Y0(e){var t=cl(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function XT(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&V0(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function vo(e){return yr(e).getComputedStyle(e)}function wne(e){return["table","td","th"].indexOf(Pi(e))>=0}function Jo(e){return((Ga(e)?e.ownerDocument:e.document)||window.document).documentElement}function rh(e){return Pi(e)==="html"?e:e.assignedSlot||e.parentNode||(V0(e)?e.host:null)||Jo(e)}function QT(e){return!Br(e)||vo(e).position==="fixed"?null:e.offsetParent}function _ne(e){var t=/firefox/i.test(H0()),n=/Trident/i.test(H0());if(n&&Br(e)){var r=vo(e);if(r.position==="fixed")return null}var i=rh(e);for(V0(i)&&(i=i.host);Br(i)&&["html","body"].indexOf(Pi(i))<0;){var o=vo(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function nu(e){for(var t=yr(e),n=QT(e);n&&wne(n)&&vo(n).position==="static";)n=QT(n);return n&&(Pi(n)==="html"||Pi(n)==="body"&&vo(n).position==="static")?t:n||_ne(e)||t}function U0(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ru(e,t,n){return Xa(e,nh(t,n))}function Sne(e,t,n){var r=ru(e,t,n);return r>n?n:r}function ZT(){return{top:0,right:0,bottom:0,left:0}}function JT(e){return Object.assign({},ZT(),e)}function eM(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var One=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,JT(typeof t!="number"?t:eM(t,Jc))};function Ene(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=ki(n.placement),l=U0(s),c=[Zn,$r].indexOf(s)>=0,u=c?"height":"width";if(!(!o||!a)){var d=One(i.padding,n),f=Y0(o),p=l==="y"?Qn:Zn,m=l==="y"?Fr:$r,h=n.rects.reference[u]+n.rects.reference[l]-a[l]-n.rects.popper[u],g=a[l]-n.rects.reference[l],b=nu(o),S=b?l==="y"?b.clientHeight||0:b.clientWidth||0:0,w=h/2-g/2,x=d[p],_=S-f[u]-d[m],E=S/2-f[u]/2+w,C=ru(x,E,_),D=l;n.modifiersData[r]=(t={},t[D]=C,t.centerOffset=C-E,t)}}function Pne(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||XT(t.elements.popper,i)&&(t.elements.arrow=i))}const kne={name:"arrow",enabled:!0,phase:"main",fn:Ene,effect:Pne,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ul(e){return e.split("-")[1]}var Cne={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Dne(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:ll(n*i)/i||0,y:ll(r*i)/i||0}}function tM(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=a.x,p=f===void 0?0:f,m=a.y,h=m===void 0?0:m,g=typeof u=="function"?u({x:p,y:h}):{x:p,y:h};p=g.x,h=g.y;var b=a.hasOwnProperty("x"),S=a.hasOwnProperty("y"),w=Zn,x=Qn,_=window;if(c){var E=nu(n),C="clientHeight",D="clientWidth";if(E===yr(n)&&(E=Jo(n),vo(E).position!=="static"&&s==="absolute"&&(C="scrollHeight",D="scrollWidth")),E=E,i===Qn||(i===Zn||i===$r)&&o===eu){x=Fr;var T=d&&E===_&&_.visualViewport?_.visualViewport.height:E[C];h-=T-r.height,h*=l?1:-1}if(i===Zn||(i===Qn||i===Fr)&&o===eu){w=$r;var j=d&&E===_&&_.visualViewport?_.visualViewport.width:E[D];p-=j-r.width,p*=l?1:-1}}var A=Object.assign({position:s},c&&Cne),P=u===!0?Dne({x:p,y:h},yr(n)):{x:p,y:h};if(p=P.x,h=P.y,l){var N;return Object.assign({},A,(N={},N[x]=S?"0":"",N[w]=b?"0":"",N.transform=(_.devicePixelRatio||1)<=1?"translate("+p+"px, "+h+"px)":"translate3d("+p+"px, "+h+"px, 0)",N))}return Object.assign({},A,(t={},t[x]=S?h+"px":"",t[w]=b?p+"px":"",t.transform="",t))}function Ane(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,c={placement:ki(t.placement),variation:ul(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,tM(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,tM(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Tne={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Ane,data:{}};var ih={passive:!0};function Mne(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=yr(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(u){u.addEventListener("scroll",n.update,ih)}),s&&l.addEventListener("resize",n.update,ih),function(){o&&c.forEach(function(u){u.removeEventListener("scroll",n.update,ih)}),s&&l.removeEventListener("resize",n.update,ih)}}const Nne={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Mne,data:{}};var jne={left:"right",right:"left",bottom:"top",top:"bottom"};function oh(e){return e.replace(/left|right|bottom|top/g,function(t){return jne[t]})}var Ine={start:"end",end:"start"};function nM(e){return e.replace(/start|end/g,function(t){return Ine[t]})}function K0(e){var t=yr(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function q0(e){return cl(Jo(e)).left+K0(e).scrollLeft}function Rne(e,t){var n=yr(e),r=Jo(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var c=GT();(c||!c&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+q0(e),y:l}}function Lne(e){var t,n=Jo(e),r=K0(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Xa(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Xa(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+q0(e),l=-r.scrollTop;return vo(i||n).direction==="rtl"&&(s+=Xa(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function G0(e){var t=vo(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function rM(e){return["html","body","#document"].indexOf(Pi(e))>=0?e.ownerDocument.body:Br(e)&&G0(e)?e:rM(rh(e))}function iu(e,t){var n;t===void 0&&(t=[]);var r=rM(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=yr(r),a=i?[o].concat(o.visualViewport||[],G0(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(iu(rh(a)))}function X0(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Fne(e,t){var n=cl(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function iM(e,t,n){return t===YT?X0(Rne(e,n)):Ga(t)?Fne(t,n):X0(Lne(Jo(e)))}function $ne(e){var t=iu(rh(e)),n=["absolute","fixed"].indexOf(vo(e).position)>=0,r=n&&Br(e)?nu(e):e;return Ga(r)?t.filter(function(i){return Ga(i)&&XT(i,r)&&Pi(i)!=="body"}):[]}function Bne(e,t,n,r){var i=t==="clippingParents"?$ne(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,c){var u=iM(e,c,r);return l.top=Xa(u.top,l.top),l.right=nh(u.right,l.right),l.bottom=nh(u.bottom,l.bottom),l.left=Xa(u.left,l.left),l},iM(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function oM(e){var t=e.reference,n=e.element,r=e.placement,i=r?ki(r):null,o=r?ul(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Qn:l={x:a,y:t.y-n.height};break;case Fr:l={x:a,y:t.y+t.height};break;case $r:l={x:t.x+t.width,y:s};break;case Zn:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var c=i?U0(i):null;if(c!=null){var u=c==="y"?"height":"width";switch(o){case sl:l[c]=l[c]-(t[u]/2-n[u]/2);break;case eu:l[c]=l[c]+(t[u]/2-n[u]/2);break}}return l}function ou(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?sne:s,c=n.rootBoundary,u=c===void 0?YT:c,d=n.elementContext,f=d===void 0?tu:d,p=n.altBoundary,m=p===void 0?!1:p,h=n.padding,g=h===void 0?0:h,b=JT(typeof g!="number"?g:eM(g,Jc)),S=f===tu?lne:tu,w=e.rects.popper,x=e.elements[m?S:f],_=Bne(Ga(x)?x:x.contextElement||Jo(e.elements.popper),l,u,a),E=cl(e.elements.reference),C=oM({reference:E,element:w,placement:i}),D=X0(Object.assign({},w,C)),T=f===tu?D:E,j={top:_.top-T.top+b.top,bottom:T.bottom-_.bottom+b.bottom,left:_.left-T.left+b.left,right:T.right-_.right+b.right},A=e.modifiersData.offset;if(f===tu&&A){var P=A[i];Object.keys(j).forEach(function(N){var M=[$r,Fr].indexOf(N)>=0?1:-1,R=[Qn,Fr].indexOf(N)>=0?"y":"x";j[N]+=P[R]*M})}return j}function Wne(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?KT:l,u=ul(r),d=u?s?UT:UT.filter(function(m){return ul(m)===u}):Jc,f=d.filter(function(m){return c.indexOf(m)>=0});f.length===0&&(f=d);var p=f.reduce(function(m,h){return m[h]=ou(e,{placement:h,boundary:i,rootBoundary:o,padding:a})[ki(h)],m},{});return Object.keys(p).sort(function(m,h){return p[m]-p[h]})}function zne(e){if(ki(e)===z0)return[];var t=oh(e);return[nM(e),t,nM(t)]}function Vne(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,m=p===void 0?!0:p,h=n.allowedAutoPlacements,g=t.options.placement,b=ki(g),S=b===g,w=l||(S||!m?[oh(g)]:zne(g)),x=[g].concat(w).reduce(function(J,ee){return J.concat(ki(ee)===z0?Wne(t,{placement:ee,boundary:u,rootBoundary:d,padding:c,flipVariations:m,allowedAutoPlacements:h}):ee)},[]),_=t.rects.reference,E=t.rects.popper,C=new Map,D=!0,T=x[0],j=0;j<x.length;j++){var A=x[j],P=ki(A),N=ul(A)===sl,M=[Qn,Fr].indexOf(P)>=0,R=M?"width":"height",L=ou(t,{placement:A,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),$=M?N?$r:Zn:N?Fr:Qn;_[R]>E[R]&&($=oh($));var V=oh($),z=[];if(o&&z.push(L[P]<=0),s&&z.push(L[$]<=0,L[V]<=0),z.every(function(J){return J})){T=A,D=!1;break}C.set(A,z)}if(D)for(var B=m?3:1,X=function(ee){var oe=x.find(function(se){var fe=C.get(se);if(fe)return fe.slice(0,ee).every(function(U){return U})});if(oe)return T=oe,"break"},q=B;q>0;q--){var re=X(q);if(re==="break")break}t.placement!==T&&(t.modifiersData[r]._skip=!0,t.placement=T,t.reset=!0)}}const Hne={name:"flip",enabled:!0,phase:"main",fn:Vne,requiresIfExists:["offset"],data:{_skip:!1}};function aM(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function sM(e){return[Qn,$r,Fr,Zn].some(function(t){return e[t]>=0})}function Yne(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=ou(t,{elementContext:"reference"}),s=ou(t,{altBoundary:!0}),l=aM(a,r),c=aM(s,i,o),u=sM(l),d=sM(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}const Une={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Yne};function Kne(e,t,n){var r=ki(e),i=[Zn,Qn].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Zn,$r].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function qne(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=KT.reduce(function(u,d){return u[d]=Kne(d,t.rects,o),u},{}),s=a[t.placement],l=s.x,c=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}const Gne={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:qne};function Xne(e){var t=e.state,n=e.name;t.modifiersData[n]=oM({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const Qne={name:"popperOffsets",enabled:!0,phase:"read",fn:Xne,data:{}};function Zne(e){return e==="x"?"y":"x"}function Jne(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,p=f===void 0?!0:f,m=n.tetherOffset,h=m===void 0?0:m,g=ou(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),b=ki(t.placement),S=ul(t.placement),w=!S,x=U0(b),_=Zne(x),E=t.modifiersData.popperOffsets,C=t.rects.reference,D=t.rects.popper,T=typeof h=="function"?h(Object.assign({},t.rects,{placement:t.placement})):h,j=typeof T=="number"?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),A=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,P={x:0,y:0};if(E){if(o){var N,M=x==="y"?Qn:Zn,R=x==="y"?Fr:$r,L=x==="y"?"height":"width",$=E[x],V=$+g[M],z=$-g[R],B=p?-D[L]/2:0,X=S===sl?C[L]:D[L],q=S===sl?-D[L]:-C[L],re=t.elements.arrow,J=p&&re?Y0(re):{width:0,height:0},ee=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:ZT(),oe=ee[M],se=ee[R],fe=ru(0,C[L],J[L]),U=w?C[L]/2-B-fe-oe-j.mainAxis:X-fe-oe-j.mainAxis,K=w?-C[L]/2+B+fe+se+j.mainAxis:q+fe+se+j.mainAxis,Z=t.elements.arrow&&nu(t.elements.arrow),I=Z?x==="y"?Z.clientTop||0:Z.clientLeft||0:0,ve=(N=A?.[x])!=null?N:0,te=$+U-ve-I,ye=$+K-ve,_e=ru(p?nh(V,te):V,$,p?Xa(z,ye):z);E[x]=_e,P[x]=_e-$}if(s){var He,ut=x==="x"?Qn:Zn,Et=x==="x"?Fr:$r,mt=E[_],Je=_==="y"?"height":"width",Ft=mt+g[ut],Qt=mt-g[Et],wt=[Qn,Zn].indexOf(b)!==-1,Cn=(He=A?.[_])!=null?He:0,gn=wt?Ft:mt-C[Je]-D[Je]-Cn+j.altAxis,Dn=wt?mt+C[Je]+D[Je]-Cn-j.altAxis:Qt,nr=p&&wt?Sne(gn,mt,Dn):ru(p?gn:Ft,mt,p?Dn:Qt);E[_]=nr,P[_]=nr-mt}t.modifiersData[r]=P}}const ere={name:"preventOverflow",enabled:!0,phase:"main",fn:Jne,requiresIfExists:["offset"]};function tre(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function nre(e){return e===yr(e)||!Br(e)?K0(e):tre(e)}function rre(e){var t=e.getBoundingClientRect(),n=ll(t.width)/e.offsetWidth||1,r=ll(t.height)/e.offsetHeight||1;return n!==1||r!==1}function ire(e,t,n){n===void 0&&(n=!1);var r=Br(t),i=Br(t)&&rre(t),o=Jo(t),a=cl(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Pi(t)!=="body"||G0(o))&&(s=nre(t)),Br(t)?(l=cl(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=q0(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function ore(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function are(e){var t=ore(e);return yne.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function sre(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function lre(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var lM={placement:"bottom",modifiers:[],strategy:"absolute"};function cM(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function cre(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,o=i===void 0?lM:i;return function(s,l,c){c===void 0&&(c=o);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},lM,o),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},d=[],f=!1,p={state:u,setOptions:function(b){var S=typeof b=="function"?b(u.options):b;h(),u.options=Object.assign({},o,u.options,S),u.scrollParents={reference:Ga(s)?iu(s):s.contextElement?iu(s.contextElement):[],popper:iu(l)};var w=are(lre([].concat(r,u.options.modifiers)));return u.orderedModifiers=w.filter(function(x){return x.enabled}),m(),p.update()},forceUpdate:function(){if(!f){var b=u.elements,S=b.reference,w=b.popper;if(cM(S,w)){u.rects={reference:ire(S,nu(w),u.options.strategy==="fixed"),popper:Y0(w)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(j){return u.modifiersData[j.name]=Object.assign({},j.data)});for(var x=0;x<u.orderedModifiers.length;x++){if(u.reset===!0){u.reset=!1,x=-1;continue}var _=u.orderedModifiers[x],E=_.fn,C=_.options,D=C===void 0?{}:C,T=_.name;typeof E=="function"&&(u=E({state:u,options:D,name:T,instance:p})||u)}}}},update:sre(function(){return new Promise(function(g){p.forceUpdate(),g(u)})}),destroy:function(){h(),f=!0}};if(!cM(s,l))return p;p.setOptions(c).then(function(g){!f&&c.onFirstUpdate&&c.onFirstUpdate(g)});function m(){u.orderedModifiers.forEach(function(g){var b=g.name,S=g.options,w=S===void 0?{}:S,x=g.effect;if(typeof x=="function"){var _=x({state:u,name:b,instance:p,options:w}),E=function(){};d.push(_||E)}})}function h(){d.forEach(function(g){return g()}),d=[]}return p}}var ure=[Nne,Qne,Tne,qT,Gne,Hne,ere,kne,Une],uM=cre({defaultModifiers:ure});function dM(e){const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:i=!1,...o}=e,a=i?{}:BT(n,r),{props:s,internalRef:l}=VT({...o,externalSlotProps:a}),c=Nn(l,a?.ref,e.additionalProps?.ref);return $T(t,{...s,ref:c},r)}function dl(e){return parseInt(O.version,10)>=19?e?.props?.ref||null:e?.ref||null}function dre(e){return typeof e=="function"?e():e}const au=O.forwardRef(function(t,n){const{children:r,container:i,disablePortal:o=!1}=t,[a,s]=O.useState(null),l=Nn(O.isValidElement(r)?dl(r):null,n);if($i(()=>{o||s(dre(i)||document.body)},[i,o]),$i(()=>{if(a&&!o)return Yw(n,a),()=>{Yw(n,null)}},[n,a,o]),o){if(O.isValidElement(r)){const c={ref:l};return O.cloneElement(r,c)}return r}return a&&u1.createPortal(r,a)});process.env.NODE_ENV!=="production"&&(au.propTypes={children:y.node,container:y.oneOfType([go,y.func]),disablePortal:y.bool}),process.env.NODE_ENV!=="production"&&(au.propTypes=Sw(au.propTypes));function fre(e){return cn("MuiPopper",e)}Tn("MuiPopper",["root"]);function pre(e,t){if(t==="ltr")return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function ah(e){return typeof e=="function"?e():e}function sh(e){return e.nodeType!==void 0}function hre(e){return!sh(e)}const mre=e=>{const{classes:t}=e;return vn({root:["root"]},fre,t)},gre={},vre=O.forwardRef(function(t,n){const{anchorEl:r,children:i,direction:o,disablePortal:a,modifiers:s,open:l,placement:c,popperOptions:u,popperRef:d,slotProps:f={},slots:p={},TransitionProps:m,ownerState:h,...g}=t,b=O.useRef(null),S=Nn(b,n),w=O.useRef(null),x=Nn(w,d),_=O.useRef(x);$i(()=>{_.current=x},[x]),O.useImperativeHandle(d,()=>w.current,[]);const E=pre(c,o),[C,D]=O.useState(E),[T,j]=O.useState(ah(r));O.useEffect(()=>{w.current&&w.current.forceUpdate()}),O.useEffect(()=>{r&&j(ah(r))},[r]),$i(()=>{if(!T||!l)return;const R=V=>{D(V.placement)};if(process.env.NODE_ENV!=="production"&&T&&sh(T)&&T.nodeType===1){const V=T.getBoundingClientRect();process.env.NODE_ENV!=="test"&&V.top===0&&V.left===0&&V.right===0&&V.bottom===0&&console.warn(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
|
|
227
|
+
`))}return!1}function one(e){return typeof e.main=="string"}function ane(e,t=[]){if(!one(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||typeof e[n]!="string")return!1;return!0}function W0(e=[]){return([,t])=>t&&ane(t,e)}function go(e,t,n,r,i){if(process.env.NODE_ENV==="production")return null;const o=e[t],a=i||t;return o==null?null:o&&o.nodeType!==1?new Error(`Invalid ${r} \`${a}\` supplied to \`${n}\`. Expected an HTMLElement.`):null}var Qn="top",Fr="bottom",$r="right",Zn="left",z0="auto",Jc=[Qn,Fr,$r,Zn],sl="start",eu="end",sne="clippingParents",YT="viewport",tu="popper",lne="reference",UT=Jc.reduce(function(e,t){return e.concat([t+"-"+sl,t+"-"+eu])},[]),KT=[].concat(Jc,[z0]).reduce(function(e,t){return e.concat([t,t+"-"+sl,t+"-"+eu])},[]),cne="beforeRead",une="read",dne="afterRead",fne="beforeMain",pne="main",hne="afterMain",mne="beforeWrite",gne="write",vne="afterWrite",yne=[cne,une,dne,fne,pne,hne,mne,gne,vne];function Pi(e){return e?(e.nodeName||"").toLowerCase():null}function yr(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Ga(e){var t=yr(e).Element;return e instanceof t||e instanceof Element}function Br(e){var t=yr(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function V0(e){if(typeof ShadowRoot>"u")return!1;var t=yr(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function bne(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Br(o)||!Pi(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function xne(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,c){return l[c]="",l},{});!Br(i)||!Pi(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const qT={name:"applyStyles",enabled:!0,phase:"write",fn:bne,effect:xne,requires:["computeStyles"]};function ki(e){return e.split("-")[0]}var Xa=Math.max,nh=Math.min,ll=Math.round;function H0(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function GT(){return!/^((?!chrome|android).)*safari/i.test(H0())}function cl(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Br(e)&&(i=e.offsetWidth>0&&ll(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&ll(r.height)/e.offsetHeight||1);var a=Ga(e)?yr(e):window,s=a.visualViewport,l=!GT()&&n,c=(r.left+(l&&s?s.offsetLeft:0))/i,u=(r.top+(l&&s?s.offsetTop:0))/o,d=r.width/i,f=r.height/o;return{width:d,height:f,top:u,right:c+d,bottom:u+f,left:c,x:c,y:u}}function Y0(e){var t=cl(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function XT(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&V0(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function vo(e){return yr(e).getComputedStyle(e)}function wne(e){return["table","td","th"].indexOf(Pi(e))>=0}function Jo(e){return((Ga(e)?e.ownerDocument:e.document)||window.document).documentElement}function rh(e){return Pi(e)==="html"?e:e.assignedSlot||e.parentNode||(V0(e)?e.host:null)||Jo(e)}function QT(e){return!Br(e)||vo(e).position==="fixed"?null:e.offsetParent}function _ne(e){var t=/firefox/i.test(H0()),n=/Trident/i.test(H0());if(n&&Br(e)){var r=vo(e);if(r.position==="fixed")return null}var i=rh(e);for(V0(i)&&(i=i.host);Br(i)&&["html","body"].indexOf(Pi(i))<0;){var o=vo(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function nu(e){for(var t=yr(e),n=QT(e);n&&wne(n)&&vo(n).position==="static";)n=QT(n);return n&&(Pi(n)==="html"||Pi(n)==="body"&&vo(n).position==="static")?t:n||_ne(e)||t}function U0(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ru(e,t,n){return Xa(e,nh(t,n))}function Sne(e,t,n){var r=ru(e,t,n);return r>n?n:r}function ZT(){return{top:0,right:0,bottom:0,left:0}}function JT(e){return Object.assign({},ZT(),e)}function eM(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var One=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,JT(typeof t!="number"?t:eM(t,Jc))};function Ene(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=ki(n.placement),l=U0(s),c=[Zn,$r].indexOf(s)>=0,u=c?"height":"width";if(!(!o||!a)){var d=One(i.padding,n),f=Y0(o),p=l==="y"?Qn:Zn,m=l==="y"?Fr:$r,h=n.rects.reference[u]+n.rects.reference[l]-a[l]-n.rects.popper[u],g=a[l]-n.rects.reference[l],b=nu(o),S=b?l==="y"?b.clientHeight||0:b.clientWidth||0:0,w=h/2-g/2,x=d[p],_=S-f[u]-d[m],E=S/2-f[u]/2+w,C=ru(x,E,_),D=l;n.modifiersData[r]=(t={},t[D]=C,t.centerOffset=C-E,t)}}function Pne(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||XT(t.elements.popper,i)&&(t.elements.arrow=i))}const kne={name:"arrow",enabled:!0,phase:"main",fn:Ene,effect:Pne,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ul(e){return e.split("-")[1]}var Cne={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Dne(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:ll(n*i)/i||0,y:ll(r*i)/i||0}}function tM(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=a.x,p=f===void 0?0:f,m=a.y,h=m===void 0?0:m,g=typeof u=="function"?u({x:p,y:h}):{x:p,y:h};p=g.x,h=g.y;var b=a.hasOwnProperty("x"),S=a.hasOwnProperty("y"),w=Zn,x=Qn,_=window;if(c){var E=nu(n),C="clientHeight",D="clientWidth";if(E===yr(n)&&(E=Jo(n),vo(E).position!=="static"&&s==="absolute"&&(C="scrollHeight",D="scrollWidth")),E=E,i===Qn||(i===Zn||i===$r)&&o===eu){x=Fr;var T=d&&E===_&&_.visualViewport?_.visualViewport.height:E[C];h-=T-r.height,h*=l?1:-1}if(i===Zn||(i===Qn||i===Fr)&&o===eu){w=$r;var j=d&&E===_&&_.visualViewport?_.visualViewport.width:E[D];p-=j-r.width,p*=l?1:-1}}var A=Object.assign({position:s},c&&Cne),P=u===!0?Dne({x:p,y:h},yr(n)):{x:p,y:h};if(p=P.x,h=P.y,l){var N;return Object.assign({},A,(N={},N[x]=S?"0":"",N[w]=b?"0":"",N.transform=(_.devicePixelRatio||1)<=1?"translate("+p+"px, "+h+"px)":"translate3d("+p+"px, "+h+"px, 0)",N))}return Object.assign({},A,(t={},t[x]=S?h+"px":"",t[w]=b?p+"px":"",t.transform="",t))}function Ane(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,c={placement:ki(t.placement),variation:ul(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,tM(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,tM(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Tne={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Ane,data:{}};var ih={passive:!0};function Mne(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=yr(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(u){u.addEventListener("scroll",n.update,ih)}),s&&l.addEventListener("resize",n.update,ih),function(){o&&c.forEach(function(u){u.removeEventListener("scroll",n.update,ih)}),s&&l.removeEventListener("resize",n.update,ih)}}const Nne={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Mne,data:{}};var jne={left:"right",right:"left",bottom:"top",top:"bottom"};function oh(e){return e.replace(/left|right|bottom|top/g,function(t){return jne[t]})}var Ine={start:"end",end:"start"};function nM(e){return e.replace(/start|end/g,function(t){return Ine[t]})}function K0(e){var t=yr(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function q0(e){return cl(Jo(e)).left+K0(e).scrollLeft}function Rne(e,t){var n=yr(e),r=Jo(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var c=GT();(c||!c&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+q0(e),y:l}}function Lne(e){var t,n=Jo(e),r=K0(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Xa(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Xa(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+q0(e),l=-r.scrollTop;return vo(i||n).direction==="rtl"&&(s+=Xa(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function G0(e){var t=vo(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function rM(e){return["html","body","#document"].indexOf(Pi(e))>=0?e.ownerDocument.body:Br(e)&&G0(e)?e:rM(rh(e))}function iu(e,t){var n;t===void 0&&(t=[]);var r=rM(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=yr(r),a=i?[o].concat(o.visualViewport||[],G0(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(iu(rh(a)))}function X0(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Fne(e,t){var n=cl(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function iM(e,t,n){return t===YT?X0(Rne(e,n)):Ga(t)?Fne(t,n):X0(Lne(Jo(e)))}function $ne(e){var t=iu(rh(e)),n=["absolute","fixed"].indexOf(vo(e).position)>=0,r=n&&Br(e)?nu(e):e;return Ga(r)?t.filter(function(i){return Ga(i)&&XT(i,r)&&Pi(i)!=="body"}):[]}function Bne(e,t,n,r){var i=t==="clippingParents"?$ne(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,c){var u=iM(e,c,r);return l.top=Xa(u.top,l.top),l.right=nh(u.right,l.right),l.bottom=nh(u.bottom,l.bottom),l.left=Xa(u.left,l.left),l},iM(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function oM(e){var t=e.reference,n=e.element,r=e.placement,i=r?ki(r):null,o=r?ul(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Qn:l={x:a,y:t.y-n.height};break;case Fr:l={x:a,y:t.y+t.height};break;case $r:l={x:t.x+t.width,y:s};break;case Zn:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var c=i?U0(i):null;if(c!=null){var u=c==="y"?"height":"width";switch(o){case sl:l[c]=l[c]-(t[u]/2-n[u]/2);break;case eu:l[c]=l[c]+(t[u]/2-n[u]/2);break}}return l}function ou(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?sne:s,c=n.rootBoundary,u=c===void 0?YT:c,d=n.elementContext,f=d===void 0?tu:d,p=n.altBoundary,m=p===void 0?!1:p,h=n.padding,g=h===void 0?0:h,b=JT(typeof g!="number"?g:eM(g,Jc)),S=f===tu?lne:tu,w=e.rects.popper,x=e.elements[m?S:f],_=Bne(Ga(x)?x:x.contextElement||Jo(e.elements.popper),l,u,a),E=cl(e.elements.reference),C=oM({reference:E,element:w,placement:i}),D=X0(Object.assign({},w,C)),T=f===tu?D:E,j={top:_.top-T.top+b.top,bottom:T.bottom-_.bottom+b.bottom,left:_.left-T.left+b.left,right:T.right-_.right+b.right},A=e.modifiersData.offset;if(f===tu&&A){var P=A[i];Object.keys(j).forEach(function(N){var M=[$r,Fr].indexOf(N)>=0?1:-1,R=[Qn,Fr].indexOf(N)>=0?"y":"x";j[N]+=P[R]*M})}return j}function Wne(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?KT:l,u=ul(r),d=u?s?UT:UT.filter(function(m){return ul(m)===u}):Jc,f=d.filter(function(m){return c.indexOf(m)>=0});f.length===0&&(f=d);var p=f.reduce(function(m,h){return m[h]=ou(e,{placement:h,boundary:i,rootBoundary:o,padding:a})[ki(h)],m},{});return Object.keys(p).sort(function(m,h){return p[m]-p[h]})}function zne(e){if(ki(e)===z0)return[];var t=oh(e);return[nM(e),t,nM(t)]}function Vne(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,m=p===void 0?!0:p,h=n.allowedAutoPlacements,g=t.options.placement,b=ki(g),S=b===g,w=l||(S||!m?[oh(g)]:zne(g)),x=[g].concat(w).reduce(function(J,ee){return J.concat(ki(ee)===z0?Wne(t,{placement:ee,boundary:u,rootBoundary:d,padding:c,flipVariations:m,allowedAutoPlacements:h}):ee)},[]),_=t.rects.reference,E=t.rects.popper,C=new Map,D=!0,T=x[0],j=0;j<x.length;j++){var A=x[j],P=ki(A),N=ul(A)===sl,M=[Qn,Fr].indexOf(P)>=0,R=M?"width":"height",L=ou(t,{placement:A,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),$=M?N?$r:Zn:N?Fr:Qn;_[R]>E[R]&&($=oh($));var V=oh($),z=[];if(o&&z.push(L[P]<=0),s&&z.push(L[$]<=0,L[V]<=0),z.every(function(J){return J})){T=A,D=!1;break}C.set(A,z)}if(D)for(var B=m?3:1,X=function(ee){var oe=x.find(function(se){var fe=C.get(se);if(fe)return fe.slice(0,ee).every(function(U){return U})});if(oe)return T=oe,"break"},q=B;q>0;q--){var re=X(q);if(re==="break")break}t.placement!==T&&(t.modifiersData[r]._skip=!0,t.placement=T,t.reset=!0)}}const Hne={name:"flip",enabled:!0,phase:"main",fn:Vne,requiresIfExists:["offset"],data:{_skip:!1}};function aM(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function sM(e){return[Qn,$r,Fr,Zn].some(function(t){return e[t]>=0})}function Yne(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=ou(t,{elementContext:"reference"}),s=ou(t,{altBoundary:!0}),l=aM(a,r),c=aM(s,i,o),u=sM(l),d=sM(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}const Une={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Yne};function Kne(e,t,n){var r=ki(e),i=[Zn,Qn].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Zn,$r].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function qne(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=KT.reduce(function(u,d){return u[d]=Kne(d,t.rects,o),u},{}),s=a[t.placement],l=s.x,c=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}const Gne={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:qne};function Xne(e){var t=e.state,n=e.name;t.modifiersData[n]=oM({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const Qne={name:"popperOffsets",enabled:!0,phase:"read",fn:Xne,data:{}};function Zne(e){return e==="x"?"y":"x"}function Jne(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,p=f===void 0?!0:f,m=n.tetherOffset,h=m===void 0?0:m,g=ou(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),b=ki(t.placement),S=ul(t.placement),w=!S,x=U0(b),_=Zne(x),E=t.modifiersData.popperOffsets,C=t.rects.reference,D=t.rects.popper,T=typeof h=="function"?h(Object.assign({},t.rects,{placement:t.placement})):h,j=typeof T=="number"?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),A=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,P={x:0,y:0};if(E){if(o){var N,M=x==="y"?Qn:Zn,R=x==="y"?Fr:$r,L=x==="y"?"height":"width",$=E[x],V=$+g[M],z=$-g[R],B=p?-D[L]/2:0,X=S===sl?C[L]:D[L],q=S===sl?-D[L]:-C[L],re=t.elements.arrow,J=p&&re?Y0(re):{width:0,height:0},ee=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:ZT(),oe=ee[M],se=ee[R],fe=ru(0,C[L],J[L]),U=w?C[L]/2-B-fe-oe-j.mainAxis:X-fe-oe-j.mainAxis,K=w?-C[L]/2+B+fe+se+j.mainAxis:q+fe+se+j.mainAxis,Z=t.elements.arrow&&nu(t.elements.arrow),I=Z?x==="y"?Z.clientTop||0:Z.clientLeft||0:0,ve=(N=A?.[x])!=null?N:0,te=$+U-ve-I,ye=$+K-ve,_e=ru(p?nh(V,te):V,$,p?Xa(z,ye):z);E[x]=_e,P[x]=_e-$}if(s){var He,ut=x==="x"?Qn:Zn,Et=x==="x"?Fr:$r,mt=E[_],Je=_==="y"?"height":"width",Ft=mt+g[ut],Zt=mt-g[Et],wt=[Qn,Zn].indexOf(b)!==-1,Cn=(He=A?.[_])!=null?He:0,gn=wt?Ft:mt-C[Je]-D[Je]-Cn+j.altAxis,Dn=wt?mt+C[Je]+D[Je]-Cn-j.altAxis:Zt,nr=p&&wt?Sne(gn,mt,Dn):ru(p?gn:Ft,mt,p?Dn:Zt);E[_]=nr,P[_]=nr-mt}t.modifiersData[r]=P}}const ere={name:"preventOverflow",enabled:!0,phase:"main",fn:Jne,requiresIfExists:["offset"]};function tre(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function nre(e){return e===yr(e)||!Br(e)?K0(e):tre(e)}function rre(e){var t=e.getBoundingClientRect(),n=ll(t.width)/e.offsetWidth||1,r=ll(t.height)/e.offsetHeight||1;return n!==1||r!==1}function ire(e,t,n){n===void 0&&(n=!1);var r=Br(t),i=Br(t)&&rre(t),o=Jo(t),a=cl(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Pi(t)!=="body"||G0(o))&&(s=nre(t)),Br(t)?(l=cl(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=q0(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function ore(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function are(e){var t=ore(e);return yne.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function sre(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function lre(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var lM={placement:"bottom",modifiers:[],strategy:"absolute"};function cM(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function cre(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,o=i===void 0?lM:i;return function(s,l,c){c===void 0&&(c=o);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},lM,o),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},d=[],f=!1,p={state:u,setOptions:function(b){var S=typeof b=="function"?b(u.options):b;h(),u.options=Object.assign({},o,u.options,S),u.scrollParents={reference:Ga(s)?iu(s):s.contextElement?iu(s.contextElement):[],popper:iu(l)};var w=are(lre([].concat(r,u.options.modifiers)));return u.orderedModifiers=w.filter(function(x){return x.enabled}),m(),p.update()},forceUpdate:function(){if(!f){var b=u.elements,S=b.reference,w=b.popper;if(cM(S,w)){u.rects={reference:ire(S,nu(w),u.options.strategy==="fixed"),popper:Y0(w)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(j){return u.modifiersData[j.name]=Object.assign({},j.data)});for(var x=0;x<u.orderedModifiers.length;x++){if(u.reset===!0){u.reset=!1,x=-1;continue}var _=u.orderedModifiers[x],E=_.fn,C=_.options,D=C===void 0?{}:C,T=_.name;typeof E=="function"&&(u=E({state:u,options:D,name:T,instance:p})||u)}}}},update:sre(function(){return new Promise(function(g){p.forceUpdate(),g(u)})}),destroy:function(){h(),f=!0}};if(!cM(s,l))return p;p.setOptions(c).then(function(g){!f&&c.onFirstUpdate&&c.onFirstUpdate(g)});function m(){u.orderedModifiers.forEach(function(g){var b=g.name,S=g.options,w=S===void 0?{}:S,x=g.effect;if(typeof x=="function"){var _=x({state:u,name:b,instance:p,options:w}),E=function(){};d.push(_||E)}})}function h(){d.forEach(function(g){return g()}),d=[]}return p}}var ure=[Nne,Qne,Tne,qT,Gne,Hne,ere,kne,Une],uM=cre({defaultModifiers:ure});function dM(e){const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:i=!1,...o}=e,a=i?{}:BT(n,r),{props:s,internalRef:l}=VT({...o,externalSlotProps:a}),c=Nn(l,a?.ref,e.additionalProps?.ref);return $T(t,{...s,ref:c},r)}function dl(e){return parseInt(O.version,10)>=19?e?.props?.ref||null:e?.ref||null}function dre(e){return typeof e=="function"?e():e}const au=O.forwardRef(function(t,n){const{children:r,container:i,disablePortal:o=!1}=t,[a,s]=O.useState(null),l=Nn(O.isValidElement(r)?dl(r):null,n);if($i(()=>{o||s(dre(i)||document.body)},[i,o]),$i(()=>{if(a&&!o)return Yw(n,a),()=>{Yw(n,null)}},[n,a,o]),o){if(O.isValidElement(r)){const c={ref:l};return O.cloneElement(r,c)}return r}return a&&u1.createPortal(r,a)});process.env.NODE_ENV!=="production"&&(au.propTypes={children:y.node,container:y.oneOfType([go,y.func]),disablePortal:y.bool}),process.env.NODE_ENV!=="production"&&(au.propTypes=Sw(au.propTypes));function fre(e){return cn("MuiPopper",e)}Tn("MuiPopper",["root"]);function pre(e,t){if(t==="ltr")return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function ah(e){return typeof e=="function"?e():e}function sh(e){return e.nodeType!==void 0}function hre(e){return!sh(e)}const mre=e=>{const{classes:t}=e;return vn({root:["root"]},fre,t)},gre={},vre=O.forwardRef(function(t,n){const{anchorEl:r,children:i,direction:o,disablePortal:a,modifiers:s,open:l,placement:c,popperOptions:u,popperRef:d,slotProps:f={},slots:p={},TransitionProps:m,ownerState:h,...g}=t,b=O.useRef(null),S=Nn(b,n),w=O.useRef(null),x=Nn(w,d),_=O.useRef(x);$i(()=>{_.current=x},[x]),O.useImperativeHandle(d,()=>w.current,[]);const E=pre(c,o),[C,D]=O.useState(E),[T,j]=O.useState(ah(r));O.useEffect(()=>{w.current&&w.current.forceUpdate()}),O.useEffect(()=>{r&&j(ah(r))},[r]),$i(()=>{if(!T||!l)return;const R=V=>{D(V.placement)};if(process.env.NODE_ENV!=="production"&&T&&sh(T)&&T.nodeType===1){const V=T.getBoundingClientRect();process.env.NODE_ENV!=="test"&&V.top===0&&V.left===0&&V.right===0&&V.bottom===0&&console.warn(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
|
|
228
228
|
`))}let L=[{name:"preventOverflow",options:{altBoundary:a}},{name:"flip",options:{altBoundary:a}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:V})=>{R(V)}}];s!=null&&(L=L.concat(s)),u&&u.modifiers!=null&&(L=L.concat(u.modifiers));const $=uM(T,b.current,{placement:E,...u,modifiers:L});return _.current($),()=>{$.destroy(),_.current(null)}},[T,a,s,l,u,E]);const A={placement:C};m!==null&&(A.TransitionProps=m);const P=mre(t),N=p.root??"div",M=dM({elementType:N,externalSlotProps:f.root,externalForwardedProps:g,additionalProps:{role:"tooltip",ref:S},ownerState:t,className:P.root});return v.jsx(N,{...M,children:typeof i=="function"?i(A):i})}),fM=O.forwardRef(function(t,n){const{anchorEl:r,children:i,container:o,direction:a="ltr",disablePortal:s=!1,keepMounted:l=!1,modifiers:c,open:u,placement:d="bottom",popperOptions:f=gre,popperRef:p,style:m,transition:h=!1,slotProps:g={},slots:b={},...S}=t,[w,x]=O.useState(!0),_=()=>{x(!1)},E=()=>{x(!0)};if(!l&&!u&&(!h||w))return null;let C;if(o)C=o;else if(r){const j=ah(r);C=j&&sh(j)?sr(j).body:sr(null).body}const D=!u&&l&&(!h||w)?"none":void 0,T=h?{in:u,onEnter:_,onExited:E}:void 0;return v.jsx(au,{disablePortal:s,container:C,children:v.jsx(vre,{anchorEl:r,direction:a,disablePortal:s,modifiers:c,ref:n,open:h?!w:u,placement:d,popperOptions:f,popperRef:p,slotProps:g,slots:b,...S,style:{position:"fixed",top:0,left:0,display:D,...m},TransitionProps:T,children:i})})});process.env.NODE_ENV!=="production"&&(fM.propTypes={anchorEl:il(y.oneOfType([go,y.object,y.func]),e=>{if(e.open){const t=ah(e.anchorEl);if(t&&sh(t)&&t.nodeType===1){const n=t.getBoundingClientRect();if(process.env.NODE_ENV!=="test"&&n.top===0&&n.left===0&&n.right===0&&n.bottom===0)return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
|
|
229
229
|
`))}else if(!t||typeof t.getBoundingClientRect!="function"||hre(t)&&t.contextElement!=null&&t.contextElement.nodeType!==1)return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.","It should be an HTML element instance or a virtualElement ","(https://popper.js.org/docs/v2/virtual-elements/)."].join(`
|
|
230
230
|
`))}return null}),children:y.oneOfType([y.node,y.func]),container:y.oneOfType([go,y.func]),direction:y.oneOf(["ltr","rtl"]),disablePortal:y.bool,keepMounted:y.bool,modifiers:y.arrayOf(y.shape({data:y.object,effect:y.func,enabled:y.bool,fn:y.func,name:y.any,options:y.object,phase:y.oneOf(["afterMain","afterRead","afterWrite","beforeMain","beforeRead","beforeWrite","main","read","write"]),requires:y.arrayOf(y.string),requiresIfExists:y.arrayOf(y.string)})),open:y.bool.isRequired,placement:y.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),popperOptions:y.shape({modifiers:y.array,onFirstUpdate:y.func,placement:y.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),strategy:y.oneOf(["absolute","fixed"])}),popperRef:mo,slotProps:y.shape({root:y.oneOfType([y.func,y.object])}),slots:y.shape({root:y.elementType}),transition:y.bool});const yre=ke(fM,{name:"MuiPopper",slot:"Root"})({}),Q0=O.forwardRef(function(t,n){const r=Em(),i=zn({props:t,name:"MuiPopper"}),{anchorEl:o,component:a,components:s,componentsProps:l,container:c,disablePortal:u,keepMounted:d,modifiers:f,open:p,placement:m,popperOptions:h,popperRef:g,transition:b,slots:S,slotProps:w,...x}=i,_=S?.root??s?.Root,E={anchorEl:o,container:c,disablePortal:u,keepMounted:d,modifiers:f,open:p,placement:m,popperOptions:h,popperRef:g,transition:b,...x};return v.jsx(yre,{as:a,direction:r?"rtl":"ltr",slots:{root:_},slotProps:w??l,...E,ref:n})});process.env.NODE_ENV!=="production"&&(Q0.propTypes={anchorEl:y.oneOfType([go,y.object,y.func]),children:y.oneOfType([y.node,y.func]),component:y.elementType,components:y.shape({Root:y.elementType}),componentsProps:y.shape({root:y.oneOfType([y.func,y.object])}),container:y.oneOfType([go,y.func]),disablePortal:y.bool,keepMounted:y.bool,modifiers:y.arrayOf(y.shape({data:y.object,effect:y.func,enabled:y.bool,fn:y.func,name:y.any,options:y.object,phase:y.oneOf(["afterMain","afterRead","afterWrite","beforeMain","beforeRead","beforeWrite","main","read","write"]),requires:y.arrayOf(y.string),requiresIfExists:y.arrayOf(y.string)})),open:y.bool.isRequired,placement:y.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),popperOptions:y.shape({modifiers:y.array,onFirstUpdate:y.func,placement:y.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),strategy:y.oneOf(["absolute","fixed"])}),popperRef:mo,slotProps:y.shape({root:y.oneOfType([y.func,y.object])}),slots:y.shape({root:y.elementType}),sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),transition:y.bool});function lh(e){return parseInt(e,10)||0}const bre={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function xre(e){for(const t in e)return!1;return!0}function pM(e){return xre(e)||e.outerHeightStyle===0&&!e.overflowing}const hM=O.forwardRef(function(t,n){const{onChange:r,maxRows:i,minRows:o=1,style:a,value:s,...l}=t,{current:c}=O.useRef(s!=null),u=O.useRef(null),d=Nn(n,u),f=O.useRef(null),p=O.useRef(null),m=O.useCallback(()=>{const w=u.current,x=p.current;if(!w||!x)return;const E=zi(w).getComputedStyle(w);if(E.width==="0px")return{outerHeightStyle:0,overflowing:!1};x.style.width=E.width,x.value=w.value||t.placeholder||"x",x.value.slice(-1)===`
|
|
231
231
|
`&&(x.value+=" ");const C=E.boxSizing,D=lh(E.paddingBottom)+lh(E.paddingTop),T=lh(E.borderBottomWidth)+lh(E.borderTopWidth),j=x.scrollHeight;x.value="x";const A=x.scrollHeight;let P=j;o&&(P=Math.max(Number(o)*A,P)),i&&(P=Math.min(Number(i)*A,P)),P=Math.max(P,A);const N=P+(C==="border-box"?D+T:0),M=Math.abs(P-j)<=1;return{outerHeightStyle:N,overflowing:M}},[i,o,t.placeholder]),h=Vl(()=>{const w=u.current,x=m();if(!w||!x||pM(x))return!1;const _=x.outerHeightStyle;return f.current!=null&&f.current!==_}),g=O.useCallback(()=>{const w=u.current,x=m();if(!w||!x||pM(x))return;const _=x.outerHeightStyle;f.current!==_&&(f.current=_,w.style.height=`${_}px`),w.style.overflow=x.overflowing?"hidden":""},[m]),b=O.useRef(-1);$i(()=>{const w=Hw(g),x=u?.current;if(!x)return;const _=zi(x);_.addEventListener("resize",w);let E;return typeof ResizeObserver<"u"&&(E=new ResizeObserver(()=>{h()&&(E.unobserve(x),cancelAnimationFrame(b.current),g(),b.current=requestAnimationFrame(()=>{E.observe(x)}))}),E.observe(x)),()=>{w.clear(),cancelAnimationFrame(b.current),_.removeEventListener("resize",w),E&&E.disconnect()}},[m,g,h]),$i(()=>{g()});const S=w=>{c||g();const x=w.target,_=x.value.length,E=x.value.endsWith(`
|
|
232
232
|
`),C=x.selectionStart===_;E&&C&&x.setSelectionRange(_,_),r&&r(w)};return v.jsxs(O.Fragment,{children:[v.jsx("textarea",{value:s,onChange:S,ref:d,rows:o,style:a,...l}),v.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:p,tabIndex:-1,style:{...bre.shadow,...a,paddingTop:0,paddingBottom:0}})]})});process.env.NODE_ENV!=="production"&&(hM.propTypes={className:y.string,maxRows:y.oneOfType([y.number,y.string]),minRows:y.oneOfType([y.number,y.string]),onChange:y.func,placeholder:y.string,style:y.object,value:y.oneOfType([y.arrayOf(y.string),y.number,y.string])});function Z0({props:e,states:t,muiFormControl:n}){return t.reduce((r,i)=>(r[i]=e[i],n&&typeof e[i]>"u"&&(r[i]=n[i]),r),{})}const J0=O.createContext(void 0);process.env.NODE_ENV!=="production"&&(J0.displayName="FormControlContext");function ex(){return O.useContext(J0)}function mM(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function gM(e,t=!1){return e&&(mM(e.value)&&e.value!==""||t&&mM(e.defaultValue)&&e.defaultValue!=="")}function wre(e){return cn("MuiInputBase",e)}const fl=Tn("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var vM;const ch=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size==="small"&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${sn(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},uh=(e,t)=>{const{ownerState:n}=e;return[t.input,n.size==="small"&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type==="search"&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},_re=e=>{const{classes:t,color:n,disabled:r,error:i,endAdornment:o,focused:a,formControl:s,fullWidth:l,hiddenLabel:c,multiline:u,readOnly:d,size:f,startAdornment:p,type:m}=e,h={root:["root",`color${sn(n)}`,r&&"disabled",i&&"error",l&&"fullWidth",a&&"focused",s&&"formControl",f&&f!=="medium"&&`size${sn(f)}`,u&&"multiline",p&&"adornedStart",o&&"adornedEnd",c&&"hiddenLabel",d&&"readOnly"],input:["input",r&&"disabled",m==="search"&&"inputTypeSearch",u&&"inputMultiline",f==="small"&&"inputSizeSmall",c&&"inputHiddenLabel",p&&"inputAdornedStart",o&&"inputAdornedEnd",d&&"readOnly"]};return vn(h,wre,t)},dh=ke("div",{name:"MuiInputBase",slot:"Root",overridesResolver:ch})(Mn(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${fl.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:t})=>t.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:t,size:n})=>t.multiline&&n==="small",style:{paddingTop:1}},{props:({ownerState:t})=>t.fullWidth,style:{width:"100%"}}]}))),fh=ke("input",{name:"MuiInputBase",slot:"Input",overridesResolver:uh})(Mn(({theme:e})=>{const t=e.palette.mode==="light",n={color:"currentColor",...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},r={opacity:"0 !important"},i=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${fl.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":i,"&:focus::-moz-placeholder":i,"&:focus::-ms-input-placeholder":i},[`&.${fl.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:o})=>!o.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:o})=>o.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),yM=u5({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),ph=O.forwardRef(function(t,n){const r=zn({props:t,name:"MuiInputBase"}),{"aria-describedby":i,autoComplete:o,autoFocus:a,className:s,color:l,components:c={},componentsProps:u={},defaultValue:d,disabled:f,disableInjectingGlobalStyles:p,endAdornment:m,error:h,fullWidth:g=!1,id:b,inputComponent:S="input",inputProps:w={},inputRef:x,margin:_,maxRows:E,minRows:C,multiline:D=!1,name:T,onBlur:j,onChange:A,onClick:P,onFocus:N,onKeyDown:M,onKeyUp:R,placeholder:L,readOnly:$,renderSuffix:V,rows:z,size:B,slotProps:X={},slots:q={},startAdornment:re,type:J="text",value:ee,...oe}=r,se=w.value!=null?w.value:ee,{current:fe}=O.useRef(se!=null),U=O.useRef(),K=O.useCallback(be=>{process.env.NODE_ENV!=="production"&&be&&be.nodeName!=="INPUT"&&!be.focus&&console.error(["MUI: You have provided a `inputComponent` to the input component","that does not correctly handle the `ref` prop.","Make sure the `ref` prop is called with a HTMLInputElement."].join(`
|
|
233
|
-
`))},[]),Z=Nn(U,x,w.ref,K),[I,ve]=O.useState(!1),te=ex();process.env.NODE_ENV!=="production"&&O.useEffect(()=>{if(te)return te.registerEffect()},[te]);const ye=Z0({props:r,muiFormControl:te,states:["color","disabled","error","hiddenLabel","size","required","filled"]});ye.focused=te?te.focused:I,O.useEffect(()=>{!te&&f&&I&&(ve(!1),j&&j())},[te,f,I,j]);const _e=te&&te.onFilled,He=te&&te.onEmpty,ut=O.useCallback(be=>{gM(be)?_e&&_e():He&&He()},[_e,He]);$i(()=>{fe&&ut({value:se})},[se,ut,fe]);const Et=be=>{N&&N(be),w.onFocus&&w.onFocus(be),te&&te.onFocus?te.onFocus(be):ve(!0)},mt=be=>{j&&j(be),w.onBlur&&w.onBlur(be),te&&te.onBlur?te.onBlur(be):ve(!1)},Je=(be,...An)=>{if(!fe){const an=be.target||U.current;if(an==null)throw new Error(process.env.NODE_ENV!=="production"?"MUI: Expected valid input target. Did you use a custom `inputComponent` and forget to forward refs? See https://mui.com/r/input-component-ref-interface for more info.":ti(1));ut({value:an.value})}w.onChange&&w.onChange(be,...An),A&&A(be,...An)};O.useEffect(()=>{ut(U.current)},[]);const Ft=be=>{U.current&&be.currentTarget===be.target&&U.current.focus(),P&&P(be)};let Qt=S,wt=w;D&&Qt==="input"&&(z?(process.env.NODE_ENV!=="production"&&(C||E)&&console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."),wt={type:void 0,minRows:z,maxRows:z,...wt}):wt={type:void 0,maxRows:E,minRows:C,...wt},Qt=hM);const Cn=be=>{ut(be.animationName==="mui-auto-fill-cancel"?U.current:{value:"x"})};O.useEffect(()=>{te&&te.setAdornedStart(!!re)},[te,re]);const gn={...r,color:ye.color||"primary",disabled:ye.disabled,endAdornment:m,error:ye.error,focused:ye.focused,formControl:te,fullWidth:g,hiddenLabel:ye.hiddenLabel,multiline:D,size:ye.size,startAdornment:re,type:J},Dn=_re(gn),nr=q.root||c.Root||dh,on=X.root||u.root||{},rr=q.input||c.Input||fh;return wt={...wt,...X.input??u.input},v.jsxs(O.Fragment,{children:[!p&&typeof yM=="function"&&(vM||(vM=v.jsx(yM,{}))),v.jsxs(nr,{...on,ref:n,onClick:Ft,...oe,...!th(nr)&&{ownerState:{...gn,...on.ownerState}},className:ie(Dn.root,on.className,s,$&&"MuiInputBase-readOnly"),children:[re,v.jsx(J0.Provider,{value:null,children:v.jsx(rr,{"aria-invalid":ye.error,"aria-describedby":i,autoComplete:o,autoFocus:a,defaultValue:d,disabled:ye.disabled,id:b,onAnimationStart:Cn,name:T,placeholder:L,readOnly:$,required:ye.required,rows:z,value:se,onKeyDown:M,onKeyUp:R,type:J,...wt,...!th(rr)&&{as:Qt,ownerState:{...gn,...wt.ownerState}},ref:Z,className:ie(Dn.input,wt.className,$&&"MuiInputBase-readOnly"),onBlur:mt,onChange:Je,onFocus:Et})}),m,V?V({...ye,startAdornment:re}):null]})]})});process.env.NODE_ENV!=="production"&&(ph.propTypes={"aria-describedby":y.string,autoComplete:y.string,autoFocus:y.bool,classes:y.object,className:y.string,color:y.oneOfType([y.oneOf(["primary","secondary","error","info","success","warning"]),y.string]),components:y.shape({Input:y.elementType,Root:y.elementType}),componentsProps:y.shape({input:y.object,root:y.object}),defaultValue:y.any,disabled:y.bool,disableInjectingGlobalStyles:y.bool,endAdornment:y.node,error:y.bool,fullWidth:y.bool,id:y.string,inputComponent:NT,inputProps:y.object,inputRef:mo,margin:y.oneOf(["dense","none"]),maxRows:y.oneOfType([y.number,y.string]),minRows:y.oneOfType([y.number,y.string]),multiline:y.bool,name:y.string,onBlur:y.func,onChange:y.func,onClick:y.func,onFocus:y.func,onInvalid:y.func,onKeyDown:y.func,onKeyUp:y.func,placeholder:y.string,readOnly:y.bool,renderSuffix:y.func,required:y.bool,rows:y.oneOfType([y.number,y.string]),size:y.oneOfType([y.oneOf(["medium","small"]),y.string]),slotProps:y.shape({input:y.object,root:y.object}),slots:y.shape({input:y.elementType,root:y.elementType}),startAdornment:y.node,sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),type:y.string,value:y.any});function Sre(e){return cn("MuiInput",e)}const su={...fl,...Tn("MuiInput",["root","underline","input"])};function Ore(e){return cn("MuiOutlinedInput",e)}const Ci={...fl,...Tn("MuiOutlinedInput",["root","notchedOutline","input"])};function Ere(e){return cn("MuiFilledInput",e)}const Qa={...fl,...Tn("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},Pre=da(v.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");function kre(e){const{prototype:t={}}=e;return!!t.isReactComponent}function bM(e,t,n,r,i){const o=e[t],a=i||t;if(o==null||typeof window>"u")return null;let s;const l=o.type;return typeof l=="function"&&!kre(l)&&(s="Did you accidentally use a plain function component for an element instead?"),s!==void 0?new Error(`Invalid ${r} \`${a}\` supplied to \`${n}\`. Expected an element that can hold a ref. ${s} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const pl=il(y.element,bM);pl.isRequired=il(y.element.isRequired,bM);const Cre={entering:{opacity:1},entered:{opacity:1}},xM=O.forwardRef(function(t,n){const r=bd(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:o,appear:a=!0,children:s,easing:l,in:c,onEnter:u,onEntered:d,onEntering:f,onExit:p,onExited:m,onExiting:h,style:g,timeout:b=i,TransitionComponent:S=Ei,...w}=t,x=O.useRef(null),_=Nn(x,dl(s),n),E=M=>R=>{if(M){const L=x.current;R===void 0?M(L):M(L,R)}},C=E(f),D=E((M,R)=>{jT(M);const L=eh({style:g,timeout:b,easing:l},{mode:"enter"});M.style.webkitTransition=r.transitions.create("opacity",L),M.style.transition=r.transitions.create("opacity",L),u&&u(M,R)}),T=E(d),j=E(h),A=E(M=>{const R=eh({style:g,timeout:b,easing:l},{mode:"exit"});M.style.webkitTransition=r.transitions.create("opacity",R),M.style.transition=r.transitions.create("opacity",R),p&&p(M)}),P=E(m),N=M=>{o&&o(x.current,M)};return v.jsx(S,{appear:a,in:c,nodeRef:x,onEnter:D,onEntered:T,onEntering:C,onExit:A,onExited:P,onExiting:j,addEndListener:N,timeout:b,...w,children:(M,{ownerState:R,...L})=>O.cloneElement(s,{style:{opacity:0,visibility:M==="exited"&&!c?"hidden":void 0,...Cre[M],...g,...s.props.style},ref:_,...L})})});process.env.NODE_ENV!=="production"&&(xM.propTypes={addEndListener:y.func,appear:y.bool,children:pl.isRequired,easing:y.oneOfType([y.shape({enter:y.string,exit:y.string}),y.string]),in:y.bool,onEnter:y.func,onEntered:y.func,onEntering:y.func,onExit:y.func,onExited:y.func,onExiting:y.func,style:y.object,timeout:y.oneOfType([y.number,y.shape({appear:y.number,enter:y.number,exit:y.number})])});function Dre(e){return cn("MuiBackdrop",e)}Tn("MuiBackdrop",["root","invisible"]);const Are=e=>{const{classes:t,invisible:n}=e;return vn({root:["root",n&&"invisible"]},Dre,t)},Tre=ke("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),wM=O.forwardRef(function(t,n){const r=zn({props:t,name:"MuiBackdrop"}),{children:i,className:o,component:a="div",invisible:s=!1,open:l,components:c={},componentsProps:u={},slotProps:d={},slots:f={},TransitionComponent:p,transitionDuration:m,...h}=r,g={...r,component:a,invisible:s},b=Are(g),S={transition:p,root:c.Root,...f},w={...u,...d},x={component:a,slots:S,slotProps:w},[_,E]=Xn("root",{elementType:Tre,externalForwardedProps:x,className:ie(b.root,o),ownerState:g}),[C,D]=Xn("transition",{elementType:xM,externalForwardedProps:x,ownerState:g});return v.jsx(C,{in:l,timeout:m,...h,...D,children:v.jsx(_,{"aria-hidden":!0,...E,classes:b,ref:n,children:i})})});process.env.NODE_ENV!=="production"&&(wM.propTypes={children:y.node,classes:y.object,className:y.string,component:y.elementType,components:y.shape({Root:y.elementType}),componentsProps:y.shape({root:y.object}),invisible:y.bool,open:y.bool.isRequired,slotProps:y.shape({root:y.oneOfType([y.func,y.object]),transition:y.oneOfType([y.func,y.object])}),slots:y.shape({root:y.elementType,transition:y.elementType}),sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),TransitionComponent:y.elementType,transitionDuration:y.oneOfType([y.number,y.shape({appear:y.number,enter:y.number,exit:y.number})])});function _M(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}function Mre(e){const t=sr(e);return t.body===e?zi(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function lu(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function SM(e){return parseInt(zi(e).getComputedStyle(e).paddingRight,10)||0}function Nre(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function OM(e,t,n,r,i){const o=[t,n,...r];[].forEach.call(e.children,a=>{const s=!o.includes(a),l=!Nre(a);s&&l&&lu(a,i)})}function tx(e,t){let n=-1;return e.some((r,i)=>t(r)?(n=i,!0):!1),n}function jre(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(Mre(r)){const a=_M(zi(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${SM(r)+a}px`;const s=sr(r).querySelectorAll(".mui-fixed");[].forEach.call(s,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${SM(l)+a}px`})}let o;if(r.parentNode instanceof DocumentFragment)o=sr(r).body;else{const a=r.parentElement,s=zi(r);o=a?.nodeName==="HTML"&&s.getComputedStyle(a).overflowY==="scroll"?a:r}n.push({value:o.style.overflow,property:"overflow",el:o},{value:o.style.overflowX,property:"overflow-x",el:o},{value:o.style.overflowY,property:"overflow-y",el:o}),o.style.overflow="hidden"}return()=>{n.forEach(({value:o,el:a,property:s})=>{o?a.style.setProperty(s,o):a.style.removeProperty(s)})}}function Ire(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class Rre{constructor(){this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&lu(t.modalRef,!1);const i=Ire(n);OM(n,t.mount,t.modalRef,i,!0);const o=tx(this.containers,a=>a.container===n);return o!==-1?(this.containers[o].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:i}),r)}mount(t,n){const r=tx(this.containers,o=>o.modals.includes(t)),i=this.containers[r];i.restore||(i.restore=jre(i,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const i=tx(this.containers,a=>a.modals.includes(t)),o=this.containers[i];if(o.modals.splice(o.modals.indexOf(t),1),this.modals.splice(r,1),o.modals.length===0)o.restore&&o.restore(),t.modalRef&&lu(t.modalRef,n),OM(o.container,t.mount,t.modalRef,o.hiddenSiblings,!1),this.containers.splice(i,1);else{const a=o.modals[o.modals.length-1];a.modalRef&&lu(a.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}const Lre=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function Fre(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function $re(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function Bre(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||$re(e))}function Wre(e){const t=[],n=[];return Array.from(e.querySelectorAll(Lre)).forEach((r,i)=>{const o=Fre(r);o===-1||!Bre(r)||(o===0?t.push(r):n.push({documentOrder:i,tabIndex:o,node:r}))}),n.sort((r,i)=>r.tabIndex===i.tabIndex?r.documentOrder-i.documentOrder:r.tabIndex-i.tabIndex).map(r=>r.node).concat(t)}function zre(){return!0}function hh(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:o=Wre,isEnabled:a=zre,open:s}=e,l=O.useRef(!1),c=O.useRef(null),u=O.useRef(null),d=O.useRef(null),f=O.useRef(null),p=O.useRef(!1),m=O.useRef(null),h=Nn(dl(t),m),g=O.useRef(null);O.useEffect(()=>{!s||!m.current||(p.current=!n)},[n,s]),O.useEffect(()=>{if(!s||!m.current)return;const w=sr(m.current);return m.current.contains(w.activeElement)||(m.current.hasAttribute("tabIndex")||(process.env.NODE_ENV!=="production"&&console.error(["MUI: The modal content node does not accept focus.",'For the benefit of assistive technologies, the tabIndex of the node is being set to "-1".'].join(`
|
|
233
|
+
`))},[]),Z=Nn(U,x,w.ref,K),[I,ve]=O.useState(!1),te=ex();process.env.NODE_ENV!=="production"&&O.useEffect(()=>{if(te)return te.registerEffect()},[te]);const ye=Z0({props:r,muiFormControl:te,states:["color","disabled","error","hiddenLabel","size","required","filled"]});ye.focused=te?te.focused:I,O.useEffect(()=>{!te&&f&&I&&(ve(!1),j&&j())},[te,f,I,j]);const _e=te&&te.onFilled,He=te&&te.onEmpty,ut=O.useCallback(be=>{gM(be)?_e&&_e():He&&He()},[_e,He]);$i(()=>{fe&&ut({value:se})},[se,ut,fe]);const Et=be=>{N&&N(be),w.onFocus&&w.onFocus(be),te&&te.onFocus?te.onFocus(be):ve(!0)},mt=be=>{j&&j(be),w.onBlur&&w.onBlur(be),te&&te.onBlur?te.onBlur(be):ve(!1)},Je=(be,...An)=>{if(!fe){const an=be.target||U.current;if(an==null)throw new Error(process.env.NODE_ENV!=="production"?"MUI: Expected valid input target. Did you use a custom `inputComponent` and forget to forward refs? See https://mui.com/r/input-component-ref-interface for more info.":ti(1));ut({value:an.value})}w.onChange&&w.onChange(be,...An),A&&A(be,...An)};O.useEffect(()=>{ut(U.current)},[]);const Ft=be=>{U.current&&be.currentTarget===be.target&&U.current.focus(),P&&P(be)};let Zt=S,wt=w;D&&Zt==="input"&&(z?(process.env.NODE_ENV!=="production"&&(C||E)&&console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."),wt={type:void 0,minRows:z,maxRows:z,...wt}):wt={type:void 0,maxRows:E,minRows:C,...wt},Zt=hM);const Cn=be=>{ut(be.animationName==="mui-auto-fill-cancel"?U.current:{value:"x"})};O.useEffect(()=>{te&&te.setAdornedStart(!!re)},[te,re]);const gn={...r,color:ye.color||"primary",disabled:ye.disabled,endAdornment:m,error:ye.error,focused:ye.focused,formControl:te,fullWidth:g,hiddenLabel:ye.hiddenLabel,multiline:D,size:ye.size,startAdornment:re,type:J},Dn=_re(gn),nr=q.root||c.Root||dh,on=X.root||u.root||{},rr=q.input||c.Input||fh;return wt={...wt,...X.input??u.input},v.jsxs(O.Fragment,{children:[!p&&typeof yM=="function"&&(vM||(vM=v.jsx(yM,{}))),v.jsxs(nr,{...on,ref:n,onClick:Ft,...oe,...!th(nr)&&{ownerState:{...gn,...on.ownerState}},className:ie(Dn.root,on.className,s,$&&"MuiInputBase-readOnly"),children:[re,v.jsx(J0.Provider,{value:null,children:v.jsx(rr,{"aria-invalid":ye.error,"aria-describedby":i,autoComplete:o,autoFocus:a,defaultValue:d,disabled:ye.disabled,id:b,onAnimationStart:Cn,name:T,placeholder:L,readOnly:$,required:ye.required,rows:z,value:se,onKeyDown:M,onKeyUp:R,type:J,...wt,...!th(rr)&&{as:Zt,ownerState:{...gn,...wt.ownerState}},ref:Z,className:ie(Dn.input,wt.className,$&&"MuiInputBase-readOnly"),onBlur:mt,onChange:Je,onFocus:Et})}),m,V?V({...ye,startAdornment:re}):null]})]})});process.env.NODE_ENV!=="production"&&(ph.propTypes={"aria-describedby":y.string,autoComplete:y.string,autoFocus:y.bool,classes:y.object,className:y.string,color:y.oneOfType([y.oneOf(["primary","secondary","error","info","success","warning"]),y.string]),components:y.shape({Input:y.elementType,Root:y.elementType}),componentsProps:y.shape({input:y.object,root:y.object}),defaultValue:y.any,disabled:y.bool,disableInjectingGlobalStyles:y.bool,endAdornment:y.node,error:y.bool,fullWidth:y.bool,id:y.string,inputComponent:NT,inputProps:y.object,inputRef:mo,margin:y.oneOf(["dense","none"]),maxRows:y.oneOfType([y.number,y.string]),minRows:y.oneOfType([y.number,y.string]),multiline:y.bool,name:y.string,onBlur:y.func,onChange:y.func,onClick:y.func,onFocus:y.func,onInvalid:y.func,onKeyDown:y.func,onKeyUp:y.func,placeholder:y.string,readOnly:y.bool,renderSuffix:y.func,required:y.bool,rows:y.oneOfType([y.number,y.string]),size:y.oneOfType([y.oneOf(["medium","small"]),y.string]),slotProps:y.shape({input:y.object,root:y.object}),slots:y.shape({input:y.elementType,root:y.elementType}),startAdornment:y.node,sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),type:y.string,value:y.any});function Sre(e){return cn("MuiInput",e)}const su={...fl,...Tn("MuiInput",["root","underline","input"])};function Ore(e){return cn("MuiOutlinedInput",e)}const Ci={...fl,...Tn("MuiOutlinedInput",["root","notchedOutline","input"])};function Ere(e){return cn("MuiFilledInput",e)}const Qa={...fl,...Tn("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},Pre=da(v.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");function kre(e){const{prototype:t={}}=e;return!!t.isReactComponent}function bM(e,t,n,r,i){const o=e[t],a=i||t;if(o==null||typeof window>"u")return null;let s;const l=o.type;return typeof l=="function"&&!kre(l)&&(s="Did you accidentally use a plain function component for an element instead?"),s!==void 0?new Error(`Invalid ${r} \`${a}\` supplied to \`${n}\`. Expected an element that can hold a ref. ${s} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const pl=il(y.element,bM);pl.isRequired=il(y.element.isRequired,bM);const Cre={entering:{opacity:1},entered:{opacity:1}},xM=O.forwardRef(function(t,n){const r=bd(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:o,appear:a=!0,children:s,easing:l,in:c,onEnter:u,onEntered:d,onEntering:f,onExit:p,onExited:m,onExiting:h,style:g,timeout:b=i,TransitionComponent:S=Ei,...w}=t,x=O.useRef(null),_=Nn(x,dl(s),n),E=M=>R=>{if(M){const L=x.current;R===void 0?M(L):M(L,R)}},C=E(f),D=E((M,R)=>{jT(M);const L=eh({style:g,timeout:b,easing:l},{mode:"enter"});M.style.webkitTransition=r.transitions.create("opacity",L),M.style.transition=r.transitions.create("opacity",L),u&&u(M,R)}),T=E(d),j=E(h),A=E(M=>{const R=eh({style:g,timeout:b,easing:l},{mode:"exit"});M.style.webkitTransition=r.transitions.create("opacity",R),M.style.transition=r.transitions.create("opacity",R),p&&p(M)}),P=E(m),N=M=>{o&&o(x.current,M)};return v.jsx(S,{appear:a,in:c,nodeRef:x,onEnter:D,onEntered:T,onEntering:C,onExit:A,onExited:P,onExiting:j,addEndListener:N,timeout:b,...w,children:(M,{ownerState:R,...L})=>O.cloneElement(s,{style:{opacity:0,visibility:M==="exited"&&!c?"hidden":void 0,...Cre[M],...g,...s.props.style},ref:_,...L})})});process.env.NODE_ENV!=="production"&&(xM.propTypes={addEndListener:y.func,appear:y.bool,children:pl.isRequired,easing:y.oneOfType([y.shape({enter:y.string,exit:y.string}),y.string]),in:y.bool,onEnter:y.func,onEntered:y.func,onEntering:y.func,onExit:y.func,onExited:y.func,onExiting:y.func,style:y.object,timeout:y.oneOfType([y.number,y.shape({appear:y.number,enter:y.number,exit:y.number})])});function Dre(e){return cn("MuiBackdrop",e)}Tn("MuiBackdrop",["root","invisible"]);const Are=e=>{const{classes:t,invisible:n}=e;return vn({root:["root",n&&"invisible"]},Dre,t)},Tre=ke("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),wM=O.forwardRef(function(t,n){const r=zn({props:t,name:"MuiBackdrop"}),{children:i,className:o,component:a="div",invisible:s=!1,open:l,components:c={},componentsProps:u={},slotProps:d={},slots:f={},TransitionComponent:p,transitionDuration:m,...h}=r,g={...r,component:a,invisible:s},b=Are(g),S={transition:p,root:c.Root,...f},w={...u,...d},x={component:a,slots:S,slotProps:w},[_,E]=Xn("root",{elementType:Tre,externalForwardedProps:x,className:ie(b.root,o),ownerState:g}),[C,D]=Xn("transition",{elementType:xM,externalForwardedProps:x,ownerState:g});return v.jsx(C,{in:l,timeout:m,...h,...D,children:v.jsx(_,{"aria-hidden":!0,...E,classes:b,ref:n,children:i})})});process.env.NODE_ENV!=="production"&&(wM.propTypes={children:y.node,classes:y.object,className:y.string,component:y.elementType,components:y.shape({Root:y.elementType}),componentsProps:y.shape({root:y.object}),invisible:y.bool,open:y.bool.isRequired,slotProps:y.shape({root:y.oneOfType([y.func,y.object]),transition:y.oneOfType([y.func,y.object])}),slots:y.shape({root:y.elementType,transition:y.elementType}),sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),TransitionComponent:y.elementType,transitionDuration:y.oneOfType([y.number,y.shape({appear:y.number,enter:y.number,exit:y.number})])});function _M(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}function Mre(e){const t=sr(e);return t.body===e?zi(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function lu(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function SM(e){return parseInt(zi(e).getComputedStyle(e).paddingRight,10)||0}function Nre(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function OM(e,t,n,r,i){const o=[t,n,...r];[].forEach.call(e.children,a=>{const s=!o.includes(a),l=!Nre(a);s&&l&&lu(a,i)})}function tx(e,t){let n=-1;return e.some((r,i)=>t(r)?(n=i,!0):!1),n}function jre(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(Mre(r)){const a=_M(zi(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${SM(r)+a}px`;const s=sr(r).querySelectorAll(".mui-fixed");[].forEach.call(s,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${SM(l)+a}px`})}let o;if(r.parentNode instanceof DocumentFragment)o=sr(r).body;else{const a=r.parentElement,s=zi(r);o=a?.nodeName==="HTML"&&s.getComputedStyle(a).overflowY==="scroll"?a:r}n.push({value:o.style.overflow,property:"overflow",el:o},{value:o.style.overflowX,property:"overflow-x",el:o},{value:o.style.overflowY,property:"overflow-y",el:o}),o.style.overflow="hidden"}return()=>{n.forEach(({value:o,el:a,property:s})=>{o?a.style.setProperty(s,o):a.style.removeProperty(s)})}}function Ire(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class Rre{constructor(){this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&lu(t.modalRef,!1);const i=Ire(n);OM(n,t.mount,t.modalRef,i,!0);const o=tx(this.containers,a=>a.container===n);return o!==-1?(this.containers[o].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:i}),r)}mount(t,n){const r=tx(this.containers,o=>o.modals.includes(t)),i=this.containers[r];i.restore||(i.restore=jre(i,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const i=tx(this.containers,a=>a.modals.includes(t)),o=this.containers[i];if(o.modals.splice(o.modals.indexOf(t),1),this.modals.splice(r,1),o.modals.length===0)o.restore&&o.restore(),t.modalRef&&lu(t.modalRef,n),OM(o.container,t.mount,t.modalRef,o.hiddenSiblings,!1),this.containers.splice(i,1);else{const a=o.modals[o.modals.length-1];a.modalRef&&lu(a.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}const Lre=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function Fre(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function $re(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function Bre(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||$re(e))}function Wre(e){const t=[],n=[];return Array.from(e.querySelectorAll(Lre)).forEach((r,i)=>{const o=Fre(r);o===-1||!Bre(r)||(o===0?t.push(r):n.push({documentOrder:i,tabIndex:o,node:r}))}),n.sort((r,i)=>r.tabIndex===i.tabIndex?r.documentOrder-i.documentOrder:r.tabIndex-i.tabIndex).map(r=>r.node).concat(t)}function zre(){return!0}function hh(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:o=Wre,isEnabled:a=zre,open:s}=e,l=O.useRef(!1),c=O.useRef(null),u=O.useRef(null),d=O.useRef(null),f=O.useRef(null),p=O.useRef(!1),m=O.useRef(null),h=Nn(dl(t),m),g=O.useRef(null);O.useEffect(()=>{!s||!m.current||(p.current=!n)},[n,s]),O.useEffect(()=>{if(!s||!m.current)return;const w=sr(m.current);return m.current.contains(w.activeElement)||(m.current.hasAttribute("tabIndex")||(process.env.NODE_ENV!=="production"&&console.error(["MUI: The modal content node does not accept focus.",'For the benefit of assistive technologies, the tabIndex of the node is being set to "-1".'].join(`
|
|
234
234
|
`)),m.current.setAttribute("tabIndex","-1")),p.current&&m.current.focus()),()=>{i||(d.current&&d.current.focus&&(l.current=!0,d.current.focus()),d.current=null)}},[s]),O.useEffect(()=>{if(!s||!m.current)return;const w=sr(m.current),x=C=>{g.current=C,!(r||!a()||C.key!=="Tab")&&w.activeElement===m.current&&C.shiftKey&&(l.current=!0,u.current&&u.current.focus())},_=()=>{const C=m.current;if(C===null)return;if(!w.hasFocus()||!a()||l.current){l.current=!1;return}if(C.contains(w.activeElement)||r&&w.activeElement!==c.current&&w.activeElement!==u.current)return;if(w.activeElement!==f.current)f.current=null;else if(f.current!==null)return;if(!p.current)return;let D=[];if((w.activeElement===c.current||w.activeElement===u.current)&&(D=o(m.current)),D.length>0){const T=!!(g.current?.shiftKey&&g.current?.key==="Tab"),j=D[0],A=D[D.length-1];typeof j!="string"&&typeof A!="string"&&(T?A.focus():j.focus())}else C.focus()};w.addEventListener("focusin",_),w.addEventListener("keydown",x,!0);const E=setInterval(()=>{w.activeElement&&w.activeElement.tagName==="BODY"&&_()},50);return()=>{clearInterval(E),w.removeEventListener("focusin",_),w.removeEventListener("keydown",x,!0)}},[n,r,i,a,s,o]);const b=w=>{d.current===null&&(d.current=w.relatedTarget),p.current=!0,f.current=w.target;const x=t.props.onFocus;x&&x(w)},S=w=>{d.current===null&&(d.current=w.relatedTarget),p.current=!0};return v.jsxs(O.Fragment,{children:[v.jsx("div",{tabIndex:s?0:-1,onFocus:S,ref:c,"data-testid":"sentinelStart"}),O.cloneElement(t,{ref:h,onFocus:b}),v.jsx("div",{tabIndex:s?0:-1,onFocus:S,ref:u,"data-testid":"sentinelEnd"})]})}process.env.NODE_ENV!=="production"&&(hh.propTypes={children:pl,disableAutoFocus:y.bool,disableEnforceFocus:y.bool,disableRestoreFocus:y.bool,getTabbable:y.func,isEnabled:y.func,open:y.bool.isRequired}),process.env.NODE_ENV!=="production"&&(hh.propTypes=Sw(hh.propTypes));function Vre(e){return typeof e=="function"?e():e}function Hre(e){return e?e.props.hasOwnProperty("in"):!1}const EM=()=>{},mh=new Rre;function Yre(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:i=!1,onTransitionEnter:o,onTransitionExited:a,children:s,onClose:l,open:c,rootRef:u}=e,d=O.useRef({}),f=O.useRef(null),p=O.useRef(null),m=Nn(p,u),[h,g]=O.useState(!c),b=Hre(s);let S=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(S=!1);const w=()=>sr(f.current),x=()=>(d.current.modalRef=p.current,d.current.mount=f.current,d.current),_=()=>{mh.mount(x(),{disableScrollLock:r}),p.current&&(p.current.scrollTop=0)},E=Vl(()=>{const R=Vre(t)||w().body;mh.add(x(),R),p.current&&_()}),C=()=>mh.isTopModal(x()),D=Vl(R=>{f.current=R,R&&(c&&C()?_():p.current&&lu(p.current,S))}),T=O.useCallback(()=>{mh.remove(x(),S)},[S]);O.useEffect(()=>()=>{T()},[T]),O.useEffect(()=>{c?E():(!b||!i)&&T()},[c,T,b,i,E]);const j=R=>L=>{R.onKeyDown?.(L),!(L.key!=="Escape"||L.which===229||!C())&&(n||(L.stopPropagation(),l&&l(L,"escapeKeyDown")))},A=R=>L=>{R.onClick?.(L),L.target===L.currentTarget&&l&&l(L,"backdropClick")};return{getRootProps:(R={})=>{const L=WT(e);delete L.onTransitionEnter,delete L.onTransitionExited;const $={...L,...R};return{role:"presentation",...$,onKeyDown:j($),ref:m}},getBackdropProps:(R={})=>{const L=R;return{"aria-hidden":!0,...L,onClick:A(L),open:c}},getTransitionProps:()=>{const R=()=>{g(!1),o&&o()},L=()=>{g(!0),a&&a(),i&&T()};return{onEnter:m1(R,s?.props.onEnter??EM),onExited:m1(L,s?.props.onExited??EM)}},rootRef:m,portalRef:D,isTopModal:C,exited:h,hasTransition:b}}function Ure(e){return cn("MuiModal",e)}Tn("MuiModal",["root","hidden","backdrop"]);const Kre=e=>{const{open:t,exited:n,classes:r}=e;return vn({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},Ure,r)},qre=ke("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(Mn(({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:t})=>!t.open&&t.exited,style:{visibility:"hidden"}}]}))),Gre=ke(wM,{name:"MuiModal",slot:"Backdrop"})({zIndex:-1}),PM=O.forwardRef(function(t,n){const r=zn({name:"MuiModal",props:t}),{BackdropComponent:i=Gre,BackdropProps:o,classes:a,className:s,closeAfterTransition:l=!1,children:c,container:u,component:d,components:f={},componentsProps:p={},disableAutoFocus:m=!1,disableEnforceFocus:h=!1,disableEscapeKeyDown:g=!1,disablePortal:b=!1,disableRestoreFocus:S=!1,disableScrollLock:w=!1,hideBackdrop:x=!1,keepMounted:_=!1,onClose:E,onTransitionEnter:C,onTransitionExited:D,open:T,slotProps:j={},slots:A={},theme:P,...N}=r,M={...r,closeAfterTransition:l,disableAutoFocus:m,disableEnforceFocus:h,disableEscapeKeyDown:g,disablePortal:b,disableRestoreFocus:S,disableScrollLock:w,hideBackdrop:x,keepMounted:_},{getRootProps:R,getBackdropProps:L,getTransitionProps:$,portalRef:V,isTopModal:z,exited:B,hasTransition:X}=Yre({...M,rootRef:n}),q={...M,exited:B},re=Kre(q),J={};if(c.props.tabIndex===void 0&&(J.tabIndex="-1"),X){const{onEnter:K,onExited:Z}=$();J.onEnter=K,J.onExited=Z}const ee={slots:{root:f.Root,backdrop:f.Backdrop,...A},slotProps:{...p,...j}},[oe,se]=Xn("root",{ref:n,elementType:qre,externalForwardedProps:{...ee,...N,component:d},getSlotProps:R,ownerState:q,className:ie(s,re?.root,!q.open&&q.exited&&re?.hidden)}),[fe,U]=Xn("backdrop",{ref:o?.ref,elementType:i,externalForwardedProps:ee,shouldForwardComponentProp:!0,additionalProps:o,getSlotProps:K=>L({...K,onClick:Z=>{K?.onClick&&K.onClick(Z)}}),className:ie(o?.className,re?.backdrop),ownerState:q});return!_&&!T&&(!X||B)?null:v.jsx(au,{ref:V,container:u,disablePortal:b,children:v.jsxs(oe,{...se,children:[!x&&i?v.jsx(fe,{...U}):null,v.jsx(hh,{disableEnforceFocus:h,disableAutoFocus:m,disableRestoreFocus:S,isEnabled:z,open:T,children:O.cloneElement(c,J)})]})})});process.env.NODE_ENV!=="production"&&(PM.propTypes={BackdropComponent:y.elementType,BackdropProps:y.object,children:pl.isRequired,classes:y.object,className:y.string,closeAfterTransition:y.bool,component:y.elementType,components:y.shape({Backdrop:y.elementType,Root:y.elementType}),componentsProps:y.shape({backdrop:y.oneOfType([y.func,y.object]),root:y.oneOfType([y.func,y.object])}),container:y.oneOfType([go,y.func]),disableAutoFocus:y.bool,disableEnforceFocus:y.bool,disableEscapeKeyDown:y.bool,disablePortal:y.bool,disableRestoreFocus:y.bool,disableScrollLock:y.bool,hideBackdrop:y.bool,keepMounted:y.bool,onClose:y.func,onTransitionEnter:y.func,onTransitionExited:y.func,open:y.bool.isRequired,slotProps:y.shape({backdrop:y.oneOfType([y.func,y.object]),root:y.oneOfType([y.func,y.object])}),slots:y.shape({backdrop:y.elementType,root:y.elementType}),sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object])});const Xre=e=>{const{classes:t,disableUnderline:n,startAdornment:r,endAdornment:i,size:o,hiddenLabel:a,multiline:s}=e,l={root:["root",!n&&"underline",r&&"adornedStart",i&&"adornedEnd",o==="small"&&`size${sn(o)}`,a&&"hiddenLabel",s&&"multiline"],input:["input"]},c=vn(l,Ere,t);return{...t,...c}},Qre=ke(dh,{shouldForwardProp:e=>Wi(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...ch(e,t),!n.disableUnderline&&t.underline]}})(Mn(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",i=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",o=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:i,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${Qa.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${Qa.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:o},variants:[{props:({ownerState:a})=>!a.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Qa.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Qa.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline):n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Qa.disabled}, .${Qa.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${Qa.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(W0()).map(([a])=>({props:{disableUnderline:!1,color:a},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[a]?.main}`}}})),{props:({ownerState:a})=>a.startAdornment,style:{paddingLeft:12}},{props:({ownerState:a})=>a.endAdornment,style:{paddingRight:12}},{props:({ownerState:a})=>a.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:a,size:s})=>a.multiline&&s==="small",style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:a})=>a.multiline&&a.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:a})=>a.multiline&&a.hiddenLabel&&a.size==="small",style:{paddingTop:8,paddingBottom:9}}]}})),Zre=ke(fh,{name:"MuiFilledInput",slot:"Input",overridesResolver:uh})(Mn(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:t})=>t.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}},{props:({ownerState:t})=>t.hiddenLabel&&t.size==="small",style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:t})=>t.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),nx=O.forwardRef(function(t,n){const r=zn({props:t,name:"MuiFilledInput"}),{disableUnderline:i=!1,components:o={},componentsProps:a,fullWidth:s=!1,hiddenLabel:l,inputComponent:c="input",multiline:u=!1,slotProps:d,slots:f={},type:p="text",...m}=r,h={...r,disableUnderline:i,fullWidth:s,inputComponent:c,multiline:u,type:p},g=Xre(r),b={root:{ownerState:h},input:{ownerState:h}},S=d??a?yn(b,d??a):b,w=f.root??o.Root??Qre,x=f.input??o.Input??Zre;return v.jsx(ph,{slots:{root:w,input:x},slotProps:S,fullWidth:s,inputComponent:c,multiline:u,ref:n,type:p,...m,classes:g})});process.env.NODE_ENV!=="production"&&(nx.propTypes={autoComplete:y.string,autoFocus:y.bool,classes:y.object,color:y.oneOfType([y.oneOf(["primary","secondary"]),y.string]),components:y.shape({Input:y.elementType,Root:y.elementType}),componentsProps:y.shape({input:y.object,root:y.object}),defaultValue:y.any,disabled:y.bool,disableUnderline:y.bool,endAdornment:y.node,error:y.bool,fullWidth:y.bool,hiddenLabel:y.bool,id:y.string,inputComponent:y.elementType,inputProps:y.object,inputRef:mo,margin:y.oneOf(["dense","none"]),maxRows:y.oneOfType([y.number,y.string]),minRows:y.oneOfType([y.number,y.string]),multiline:y.bool,name:y.string,onChange:y.func,placeholder:y.string,readOnly:y.bool,required:y.bool,rows:y.oneOfType([y.number,y.string]),slotProps:y.shape({input:y.object,root:y.object}),slots:y.shape({input:y.elementType,root:y.elementType}),startAdornment:y.node,sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),type:y.string,value:y.any}),nx.muiName="Input";function rx(e){return`scale(${e}, ${e**2})`}const Jre={entering:{opacity:1,transform:rx(1)},entered:{opacity:1,transform:"none"}},ix=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),cu=O.forwardRef(function(t,n){const{addEndListener:r,appear:i=!0,children:o,easing:a,in:s,onEnter:l,onEntered:c,onEntering:u,onExit:d,onExited:f,onExiting:p,style:m,timeout:h="auto",TransitionComponent:g=Ei,...b}=t,S=Zc(),w=O.useRef(),x=bd(),_=O.useRef(null),E=Nn(_,dl(o),n),C=R=>L=>{if(R){const $=_.current;L===void 0?R($):R($,L)}},D=C(u),T=C((R,L)=>{jT(R);const{duration:$,delay:V,easing:z}=eh({style:m,timeout:h,easing:a},{mode:"enter"});let B;h==="auto"?(B=x.transitions.getAutoHeightDuration(R.clientHeight),w.current=B):B=$,R.style.transition=[x.transitions.create("opacity",{duration:B,delay:V}),x.transitions.create("transform",{duration:ix?B:B*.666,delay:V,easing:z})].join(","),l&&l(R,L)}),j=C(c),A=C(p),P=C(R=>{const{duration:L,delay:$,easing:V}=eh({style:m,timeout:h,easing:a},{mode:"exit"});let z;h==="auto"?(z=x.transitions.getAutoHeightDuration(R.clientHeight),w.current=z):z=L,R.style.transition=[x.transitions.create("opacity",{duration:z,delay:$}),x.transitions.create("transform",{duration:ix?z:z*.666,delay:ix?$:$||z*.333,easing:V})].join(","),R.style.opacity=0,R.style.transform=rx(.75),d&&d(R)}),N=C(f),M=R=>{h==="auto"&&S.start(w.current||0,R),r&&r(_.current,R)};return v.jsx(g,{appear:i,in:s,nodeRef:_,onEnter:T,onEntered:j,onEntering:D,onExit:P,onExited:N,onExiting:A,addEndListener:M,timeout:h==="auto"?null:h,...b,children:(R,{ownerState:L,...$})=>O.cloneElement(o,{style:{opacity:0,transform:rx(.75),visibility:R==="exited"&&!s?"hidden":void 0,...Jre[R],...m,...o.props.style},ref:E,...$})})});process.env.NODE_ENV!=="production"&&(cu.propTypes={addEndListener:y.func,appear:y.bool,children:pl.isRequired,easing:y.oneOfType([y.shape({enter:y.string,exit:y.string}),y.string]),in:y.bool,onEnter:y.func,onEntered:y.func,onEntering:y.func,onExit:y.func,onExited:y.func,onExiting:y.func,style:y.object,timeout:y.oneOfType([y.oneOf(["auto"]),y.number,y.shape({appear:y.number,enter:y.number,exit:y.number})])}),cu&&(cu.muiSupportAuto=!0);const eie=e=>{const{classes:t,disableUnderline:n}=e,i=vn({root:["root",!n&&"underline"],input:["input"]},Sre,t);return{...t,...i}},tie=ke(dh,{shouldForwardProp:e=>Wi(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...ch(e,t),!n.disableUnderline&&t.underline]}})(Mn(({theme:e})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline)),{position:"relative",variants:[{props:({ownerState:r})=>r.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:r})=>!r.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${su.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${su.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${su.disabled}, .${su.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${su.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(W0()).map(([r])=>({props:{color:r,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[r].main}`}}}))]}})),nie=ke(fh,{name:"MuiInput",slot:"Input",overridesResolver:uh})({}),ox=O.forwardRef(function(t,n){const r=zn({props:t,name:"MuiInput"}),{disableUnderline:i=!1,components:o={},componentsProps:a,fullWidth:s=!1,inputComponent:l="input",multiline:c=!1,slotProps:u,slots:d={},type:f="text",...p}=r,m=eie(r),g={root:{ownerState:{disableUnderline:i}}},b=u??a?yn(u??a,g):g,S=d.root??o.Root??tie,w=d.input??o.Input??nie;return v.jsx(ph,{slots:{root:S,input:w},slotProps:b,fullWidth:s,inputComponent:l,multiline:c,ref:n,type:f,...p,classes:m})});process.env.NODE_ENV!=="production"&&(ox.propTypes={autoComplete:y.string,autoFocus:y.bool,classes:y.object,color:y.oneOfType([y.oneOf(["primary","secondary"]),y.string]),components:y.shape({Input:y.elementType,Root:y.elementType}),componentsProps:y.shape({input:y.object,root:y.object}),defaultValue:y.any,disabled:y.bool,disableUnderline:y.bool,endAdornment:y.node,error:y.bool,fullWidth:y.bool,id:y.string,inputComponent:y.elementType,inputProps:y.object,inputRef:mo,margin:y.oneOf(["dense","none"]),maxRows:y.oneOfType([y.number,y.string]),minRows:y.oneOfType([y.number,y.string]),multiline:y.bool,name:y.string,onChange:y.func,placeholder:y.string,readOnly:y.bool,required:y.bool,rows:y.oneOfType([y.number,y.string]),slotProps:y.shape({input:y.object,root:y.object}),slots:y.shape({input:y.elementType,root:y.elementType}),startAdornment:y.node,sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),type:y.string,value:y.any}),ox.muiName="Input";const kM=O.createContext({});process.env.NODE_ENV!=="production"&&(kM.displayName="ListContext");function rie(e){return cn("MuiList",e)}Tn("MuiList",["root","padding","dense","subheader"]);const iie=e=>{const{classes:t,disablePadding:n,dense:r,subheader:i}=e;return vn({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},rie,t)},oie=ke("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),CM=O.forwardRef(function(t,n){const r=zn({props:t,name:"MuiList"}),{children:i,className:o,component:a="ul",dense:s=!1,disablePadding:l=!1,subheader:c,...u}=r,d=O.useMemo(()=>({dense:s}),[s]),f={...r,component:a,dense:s,disablePadding:l},p=iie(f);return v.jsx(kM.Provider,{value:d,children:v.jsxs(oie,{as:a,className:ie(p.root,o),ref:n,ownerState:f,...u,children:[c,i]})})});process.env.NODE_ENV!=="production"&&(CM.propTypes={children:y.node,classes:y.object,className:y.string,component:y.elementType,dense:y.bool,disablePadding:y.bool,subheader:y.node,sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object])});function ax(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function DM(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function AM(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join(""))}function uu(e,t,n,r,i,o){let a=!1,s=i(e,t,t?n:!1);for(;s;){if(s===e.firstChild){if(a)return!1;a=!0}const l=r?!1:s.disabled||s.getAttribute("aria-disabled")==="true";if(!s.hasAttribute("tabindex")||!AM(s,o)||l)s=i(e,s,n);else return s.focus(),!0}return!1}const TM=O.forwardRef(function(t,n){const{actions:r,autoFocus:i=!1,autoFocusItem:o=!1,children:a,className:s,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:u,variant:d="selectedMenu",...f}=t,p=O.useRef(null),m=O.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});$i(()=>{i&&p.current.focus()},[i]),O.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(w,{direction:x})=>{const _=!p.current.style.width;if(w.clientHeight<p.current.clientHeight&&_){const E=`${_M(zi(w))}px`;p.current.style[x==="rtl"?"paddingLeft":"paddingRight"]=E,p.current.style.width=`calc(100% + ${E})`}return p.current}}),[]);const h=w=>{const x=p.current,_=w.key;if(w.ctrlKey||w.metaKey||w.altKey){u&&u(w);return}const C=sr(x).activeElement;if(_==="ArrowDown")w.preventDefault(),uu(x,C,c,l,ax);else if(_==="ArrowUp")w.preventDefault(),uu(x,C,c,l,DM);else if(_==="Home")w.preventDefault(),uu(x,null,c,l,ax);else if(_==="End")w.preventDefault(),uu(x,null,c,l,DM);else if(_.length===1){const D=m.current,T=_.toLowerCase(),j=performance.now();D.keys.length>0&&(j-D.lastTime>500?(D.keys=[],D.repeating=!0,D.previousKeyMatched=!0):D.repeating&&T!==D.keys[0]&&(D.repeating=!1)),D.lastTime=j,D.keys.push(T);const A=C&&!D.repeating&&AM(C,D);D.previousKeyMatched&&(A||uu(x,C,!1,l,ax,D))?w.preventDefault():D.previousKeyMatched=!1}u&&u(w)},g=Nn(p,n);let b=-1;O.Children.forEach(a,(w,x)=>{if(!O.isValidElement(w)){b===x&&(b+=1,b>=a.length&&(b=-1));return}process.env.NODE_ENV!=="production"&&Co.isFragment(w)&&console.error(["MUI: The Menu component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
|
|
235
235
|
`)),w.props.disabled||(d==="selectedMenu"&&w.props.selected||b===-1)&&(b=x),b===x&&(w.props.disabled||w.props.muiSkipListHighlight||w.type.muiSkipListHighlight)&&(b+=1,b>=a.length&&(b=-1))});const S=O.Children.map(a,(w,x)=>{if(x===b){const _={};return o&&(_.autoFocus=!0),w.props.tabIndex===void 0&&d==="selectedMenu"&&(_.tabIndex=0),O.cloneElement(w,_)}return w});return v.jsx(CM,{role:"menu",ref:g,className:s,onKeyDown:h,tabIndex:i?0:-1,...f,children:S})});process.env.NODE_ENV!=="production"&&(TM.propTypes={autoFocus:y.bool,autoFocusItem:y.bool,children:y.node,className:y.string,disabledItemsFocusable:y.bool,disableListWrap:y.bool,onKeyDown:y.func,variant:y.oneOf(["menu","selectedMenu"])});function aie(e){return cn("MuiPopover",e)}Tn("MuiPopover",["root","paper"]);function MM(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function NM(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function jM(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function du(e){return typeof e=="function"?e():e}const sie=e=>{const{classes:t}=e;return vn({root:["root"],paper:["paper"]},aie,t)},lie=ke(PM,{name:"MuiPopover",slot:"Root"})({}),IM=ke(FT,{name:"MuiPopover",slot:"Paper"})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),RM=O.forwardRef(function(t,n){const r=zn({props:t,name:"MuiPopover"}),{action:i,anchorEl:o,anchorOrigin:a={vertical:"top",horizontal:"left"},anchorPosition:s,anchorReference:l="anchorEl",children:c,className:u,container:d,elevation:f=8,marginThreshold:p=16,open:m,PaperProps:h={},slots:g={},slotProps:b={},transformOrigin:S={vertical:"top",horizontal:"left"},TransitionComponent:w,transitionDuration:x="auto",TransitionProps:_={},disableScrollLock:E=!1,...C}=r,D=O.useRef(),T={...r,anchorOrigin:a,anchorReference:l,elevation:f,marginThreshold:p,transformOrigin:S,TransitionComponent:w,transitionDuration:x,TransitionProps:_},j=sie(T),A=O.useCallback(()=>{if(l==="anchorPosition")return process.env.NODE_ENV!=="production"&&(s||console.error('MUI: You need to provide a `anchorPosition` prop when using <Popover anchorReference="anchorPosition" />.')),s;const K=du(o),Z=K&&K.nodeType===1?K:sr(D.current).body,I=Z.getBoundingClientRect();if(process.env.NODE_ENV!=="production"){const ve=Z.getBoundingClientRect();process.env.NODE_ENV!=="test"&&ve.top===0&&ve.left===0&&ve.right===0&&ve.bottom===0&&console.warn(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
|
|
236
236
|
`))}return{top:I.top+MM(I,a.vertical),left:I.left+NM(I,a.horizontal)}},[o,a.horizontal,a.vertical,s,l]),P=O.useCallback(K=>({vertical:MM(K,S.vertical),horizontal:NM(K,S.horizontal)}),[S.horizontal,S.vertical]),N=O.useCallback(K=>{const Z={width:K.offsetWidth,height:K.offsetHeight},I=P(Z);if(l==="none")return{top:null,left:null,transformOrigin:jM(I)};const ve=A();let te=ve.top-I.vertical,ye=ve.left-I.horizontal;const _e=te+Z.height,He=ye+Z.width,ut=zi(du(o)),Et=ut.innerHeight-p,mt=ut.innerWidth-p;if(p!==null&&te<p){const Je=te-p;te-=Je,I.vertical+=Je}else if(p!==null&&_e>Et){const Je=_e-Et;te-=Je,I.vertical+=Je}if(process.env.NODE_ENV!=="production"&&Z.height>Et&&Z.height&&Et&&console.error(["MUI: The popover component is too tall.",`Some part of it can not be seen on the screen (${Z.height-Et}px).`,"Please consider adding a `max-height` to improve the user-experience."].join(`
|
|
237
237
|
`)),p!==null&&ye<p){const Je=ye-p;ye-=Je,I.horizontal+=Je}else if(He>mt){const Je=He-mt;ye-=Je,I.horizontal+=Je}return{top:`${Math.round(te)}px`,left:`${Math.round(ye)}px`,transformOrigin:jM(I)}},[o,l,A,P,p]),[M,R]=O.useState(m),L=O.useCallback(()=>{const K=D.current;if(!K)return;const Z=N(K);Z.top!==null&&K.style.setProperty("top",Z.top),Z.left!==null&&(K.style.left=Z.left),K.style.transformOrigin=Z.transformOrigin,R(!0)},[N]);O.useEffect(()=>(E&&window.addEventListener("scroll",L),()=>window.removeEventListener("scroll",L)),[o,E,L]);const $=()=>{L()},V=()=>{R(!1)};O.useEffect(()=>{m&&L()}),O.useImperativeHandle(i,()=>m?{updatePosition:()=>{L()}}:null,[m,L]),O.useEffect(()=>{if(!m)return;const K=Hw(()=>{L()}),Z=zi(du(o));return Z.addEventListener("resize",K),()=>{K.clear(),Z.removeEventListener("resize",K)}},[o,m,L]);let z=x;const B={slots:{transition:w,...g},slotProps:{transition:_,paper:h,...b}},[X,q]=Xn("transition",{elementType:cu,externalForwardedProps:B,ownerState:T,getSlotProps:K=>({...K,onEntering:(Z,I)=>{K.onEntering?.(Z,I),$()},onExited:Z=>{K.onExited?.(Z),V()}}),additionalProps:{appear:!0,in:m}});x==="auto"&&!X.muiSupportAuto&&(z=void 0);const re=d||(o?sr(du(o)).body:void 0),[J,{slots:ee,slotProps:oe,...se}]=Xn("root",{ref:n,elementType:lie,externalForwardedProps:{...B,...C},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:g.backdrop},slotProps:{backdrop:m5(typeof b.backdrop=="function"?b.backdrop(T):b.backdrop,{invisible:!0})},container:re,open:m},ownerState:T,className:ie(j.root,u)}),[fe,U]=Xn("paper",{ref:D,className:j.paper,elementType:IM,externalForwardedProps:B,shouldForwardComponentProp:!0,additionalProps:{elevation:f,style:M?void 0:{opacity:0}},ownerState:T});return v.jsx(J,{...se,...!th(J)&&{slots:ee,slotProps:oe,disableScrollLock:E},children:v.jsx(X,{...q,timeout:z,children:v.jsx(fe,{...U,children:c})})})});process.env.NODE_ENV!=="production"&&(RM.propTypes={action:mo,anchorEl:il(y.oneOfType([go,y.func]),e=>{if(e.open&&(!e.anchorReference||e.anchorReference==="anchorEl")){const t=du(e.anchorEl);if(t&&t.nodeType===1){const n=t.getBoundingClientRect();if(process.env.NODE_ENV!=="test"&&n.top===0&&n.left===0&&n.right===0&&n.bottom===0)return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
|
|
238
238
|
`))}else return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.",`It should be an Element or PopoverVirtualElement instance but it's \`${t}\` instead.`].join(`
|
|
239
239
|
`))}return null}),anchorOrigin:y.shape({horizontal:y.oneOfType([y.oneOf(["center","left","right"]),y.number]).isRequired,vertical:y.oneOfType([y.oneOf(["bottom","center","top"]),y.number]).isRequired}),anchorPosition:y.shape({left:y.number.isRequired,top:y.number.isRequired}),anchorReference:y.oneOf(["anchorEl","anchorPosition","none"]),BackdropComponent:y.elementType,BackdropProps:y.object,children:y.node,classes:y.object,className:y.string,container:y.oneOfType([go,y.func]),disableScrollLock:y.bool,elevation:LT,marginThreshold:y.number,onClose:y.func,open:y.bool.isRequired,PaperProps:y.shape({component:NT}),slotProps:y.shape({backdrop:y.oneOfType([y.func,y.object]),paper:y.oneOfType([y.func,y.object]),root:y.oneOfType([y.func,y.object]),transition:y.oneOfType([y.func,y.object])}),slots:y.shape({backdrop:y.elementType,paper:y.elementType,root:y.elementType,transition:y.elementType}),sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),transformOrigin:y.shape({horizontal:y.oneOfType([y.oneOf(["center","left","right"]),y.number]).isRequired,vertical:y.oneOfType([y.oneOf(["bottom","center","top"]),y.number]).isRequired}),TransitionComponent:y.elementType,transitionDuration:y.oneOfType([y.oneOf(["auto"]),y.number,y.shape({appear:y.number,enter:y.number,exit:y.number})]),TransitionProps:y.object});function cie(e){return cn("MuiMenu",e)}Tn("MuiMenu",["root","paper","list"]);const uie={vertical:"top",horizontal:"right"},die={vertical:"top",horizontal:"left"},fie=e=>{const{classes:t}=e;return vn({root:["root"],paper:["paper"],list:["list"]},cie,t)},pie=ke(RM,{shouldForwardProp:e=>Wi(e)||e==="classes",name:"MuiMenu",slot:"Root"})({}),hie=ke(IM,{name:"MuiMenu",slot:"Paper"})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),mie=ke(TM,{name:"MuiMenu",slot:"List"})({outline:0}),LM=O.forwardRef(function(t,n){const r=zn({props:t,name:"MuiMenu"}),{autoFocus:i=!0,children:o,className:a,disableAutoFocusItem:s=!1,MenuListProps:l={},onClose:c,open:u,PaperProps:d={},PopoverClasses:f,transitionDuration:p="auto",TransitionProps:{onEntering:m,...h}={},variant:g="selectedMenu",slots:b={},slotProps:S={},...w}=r,x=Em(),_={...r,autoFocus:i,disableAutoFocusItem:s,MenuListProps:l,onEntering:m,PaperProps:d,transitionDuration:p,TransitionProps:h,variant:g},E=fie(_),C=i&&!s&&u,D=O.useRef(null),T=(z,B)=>{D.current&&D.current.adjustStyleForScrollbar(z,{direction:x?"rtl":"ltr"}),m&&m(z,B)},j=z=>{z.key==="Tab"&&(z.preventDefault(),c&&c(z,"tabKeyDown"))};let A=-1;O.Children.map(o,(z,B)=>{O.isValidElement(z)&&(process.env.NODE_ENV!=="production"&&Co.isFragment(z)&&console.error(["MUI: The Menu component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
|
|
240
|
-
`)),z.props.disabled||(g==="selectedMenu"&&z.props.selected||A===-1)&&(A=B))});const P={slots:b,slotProps:{list:l,transition:h,paper:d,...S}},N=dM({elementType:b.root,externalSlotProps:S.root,ownerState:_,className:[E.root,a]}),[M,R]=Xn("paper",{className:E.paper,elementType:hie,externalForwardedProps:P,shouldForwardComponentProp:!0,ownerState:_}),[L,$]=Xn("list",{className:ie(E.list,l.className),elementType:mie,shouldForwardComponentProp:!0,externalForwardedProps:P,getSlotProps:z=>({...z,onKeyDown:B=>{j(B),z.onKeyDown?.(B)}}),ownerState:_}),V=typeof P.slotProps.transition=="function"?P.slotProps.transition(_):P.slotProps.transition;return v.jsx(pie,{onClose:c,anchorOrigin:{vertical:"bottom",horizontal:x?"right":"left"},transformOrigin:x?uie:die,slots:{root:b.root,paper:M,backdrop:b.backdrop,...b.transition&&{transition:b.transition}},slotProps:{root:N,paper:R,backdrop:typeof S.backdrop=="function"?S.backdrop(_):S.backdrop,transition:{...V,onEntering:(...z)=>{T(...z),V?.onEntering?.(...z)}}},open:u,ref:n,transitionDuration:p,ownerState:_,...w,classes:f,children:v.jsx(L,{actions:D,autoFocus:i&&(A===-1||s),autoFocusItem:C,variant:g,...$,children:o})})});process.env.NODE_ENV!=="production"&&(LM.propTypes={anchorEl:y.oneOfType([go,y.func]),autoFocus:y.bool,children:y.node,classes:y.object,className:y.string,disableAutoFocusItem:y.bool,MenuListProps:y.object,onClose:y.func,open:y.bool.isRequired,PaperProps:y.object,PopoverClasses:y.object,slotProps:y.shape({backdrop:y.oneOfType([y.func,y.object]),list:y.oneOfType([y.func,y.object]),paper:y.oneOfType([y.func,y.object]),root:y.oneOfType([y.func,y.object]),transition:y.oneOfType([y.func,y.object])}),slots:y.shape({backdrop:y.elementType,list:y.elementType,paper:y.elementType,root:y.elementType,transition:y.elementType}),sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),transitionDuration:y.oneOfType([y.oneOf(["auto"]),y.number,y.shape({appear:y.number,enter:y.number,exit:y.number})]),TransitionProps:y.object,variant:y.oneOf(["menu","selectedMenu"])});function gie(e){return cn("MuiNativeSelect",e)}const sx=Tn("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),vie=e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:a}=e,s={select:["select",n,r&&"disabled",i&&"multiple",a&&"error"],icon:["icon",`icon${sn(n)}`,o&&"iconOpen",r&&"disabled"]};return vn(s,gie,t)},FM=ke("select",{name:"MuiNativeSelect"})(({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${sx.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:t})=>t.variant!=="filled"&&t.variant!=="outlined",style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),yie=ke(FM,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:Wi,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${sx.multiple}`]:t.multiple}]}})({}),$M=ke("svg",{name:"MuiNativeSelect"})(({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${sx.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:t})=>t.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]})),bie=ke($M,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${sn(n.variant)}`],n.open&&t.iconOpen]}})({}),BM=O.forwardRef(function(t,n){const{className:r,disabled:i,error:o,IconComponent:a,inputRef:s,variant:l="standard",...c}=t,u={...t,disabled:i,variant:l,error:o},d=vie(u);return v.jsxs(O.Fragment,{children:[v.jsx(yie,{ownerState:u,className:ie(d.select,r),disabled:i,ref:s||n,...c}),t.multiple?null:v.jsx(bie,{as:a,ownerState:u,className:d.icon})]})});process.env.NODE_ENV!=="production"&&(BM.propTypes={children:y.node,classes:y.object,className:y.string,disabled:y.bool,error:y.bool,IconComponent:y.elementType.isRequired,inputRef:mo,multiple:y.bool,name:y.string,onChange:y.func,value:y.any,variant:y.oneOf(["standard","outlined","filled"])});var WM;const xie=ke("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:Wi})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),wie=ke("legend",{name:"MuiNotchedOutlined",shouldForwardProp:Wi})(Mn(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:t})=>!t.withLabel,style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:t})=>t.withLabel,style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:({ownerState:t})=>t.withLabel&&t.notched,style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function zM(e){const{children:t,classes:n,className:r,label:i,notched:o,...a}=e,s=i!=null&&i!=="",l={...e,notched:o,withLabel:s};return v.jsx(xie,{"aria-hidden":!0,className:r,ownerState:l,...a,children:v.jsx(wie,{ownerState:l,children:s?v.jsx("span",{children:i}):WM||(WM=v.jsx("span",{className:"notranslate","aria-hidden":!0,children:""}))})})}process.env.NODE_ENV!=="production"&&(zM.propTypes={children:y.node,classes:y.object,className:y.string,label:y.node,notched:y.bool.isRequired,style:y.object});const _ie=e=>{const{classes:t}=e,r=vn({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},Ore,t);return{...t,...r}},Sie=ke(dh,{shouldForwardProp:e=>Wi(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:ch})(Mn(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${Ci.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Ci.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${Ci.focused} .${Ci.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(W0()).map(([n])=>({props:{color:n},style:{[`&.${Ci.focused} .${Ci.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}})),{props:{},style:{[`&.${Ci.error} .${Ci.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${Ci.disabled} .${Ci.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:n})=>n.startAdornment,style:{paddingLeft:14}},{props:({ownerState:n})=>n.endAdornment,style:{paddingRight:14}},{props:({ownerState:n})=>n.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:n,size:r})=>n.multiline&&r==="small",style:{padding:"8.5px 14px"}}]}})),Oie=ke(zM,{name:"MuiOutlinedInput",slot:"NotchedOutline"})(Mn(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}})),Eie=ke(fh,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:uh})(Mn(({theme:e})=>({padding:"16.5px 14px",...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:t})=>t.multiline,style:{padding:0}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}}]}))),lx=O.forwardRef(function(t,n){const r=zn({props:t,name:"MuiOutlinedInput"}),{components:i={},fullWidth:o=!1,inputComponent:a="input",label:s,multiline:l=!1,notched:c,slots:u={},slotProps:d={},type:f="text",...p}=r,m=_ie(r),h=ex(),g=Z0({props:r,muiFormControl:h,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),b={...r,color:g.color||"primary",disabled:g.disabled,error:g.error,focused:g.focused,formControl:h,fullWidth:o,hiddenLabel:g.hiddenLabel,multiline:l,size:g.size,type:f},S=u.root??i.Root??Sie,w=u.input??i.Input??Eie,[x,_]=Xn("notchedOutline",{elementType:Oie,className:m.notchedOutline,shouldForwardComponentProp:!0,ownerState:b,externalForwardedProps:{slots:u,slotProps:d},additionalProps:{label:s!=null&&s!==""&&g.required?v.jsxs(O.Fragment,{children:[s," ","*"]}):s}});return v.jsx(ph,{slots:{root:S,input:w},slotProps:d,renderSuffix:E=>v.jsx(x,{..._,notched:typeof c<"u"?c:!!(E.startAdornment||E.filled||E.focused)}),fullWidth:o,inputComponent:a,multiline:l,ref:n,type:f,...p,classes:{...m,notchedOutline:null}})});process.env.NODE_ENV!=="production"&&(lx.propTypes={autoComplete:y.string,autoFocus:y.bool,classes:y.object,color:y.oneOfType([y.oneOf(["primary","secondary"]),y.string]),components:y.shape({Input:y.elementType,Root:y.elementType}),defaultValue:y.any,disabled:y.bool,endAdornment:y.node,error:y.bool,fullWidth:y.bool,id:y.string,inputComponent:y.elementType,inputProps:y.object,inputRef:mo,label:y.node,margin:y.oneOf(["dense","none"]),maxRows:y.oneOfType([y.number,y.string]),minRows:y.oneOfType([y.number,y.string]),multiline:y.bool,name:y.string,notched:y.bool,onChange:y.func,placeholder:y.string,readOnly:y.bool,required:y.bool,rows:y.oneOfType([y.number,y.string]),slotProps:y.shape({input:y.object,notchedOutline:y.oneOfType([y.func,y.object]),root:y.object}),slots:y.shape({input:y.elementType,notchedOutline:y.elementType,root:y.elementType}),startAdornment:y.node,sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),type:y.string,value:y.any}),lx.muiName="Input";function VM(e){return cn("MuiSelect",e)}const fu=Tn("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var HM;const Pie=ke(FM,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${fu.select}`]:t.select},{[`&.${fu.select}`]:t[n.variant]},{[`&.${fu.error}`]:t.error},{[`&.${fu.multiple}`]:t.multiple}]}})({[`&.${fu.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),kie=ke($M,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${sn(n.variant)}`],n.open&&t.iconOpen]}})({}),Cie=ke("input",{shouldForwardProp:e=>Vw(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput"})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function YM(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function Die(e){return e==null||typeof e=="string"&&!e.trim()}const Aie=e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:a}=e,s={select:["select",n,r&&"disabled",i&&"multiple",a&&"error"],icon:["icon",`icon${sn(n)}`,o&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return vn(s,VM,t)},UM=O.forwardRef(function(t,n){const{"aria-describedby":r,"aria-label":i,autoFocus:o,autoWidth:a,children:s,className:l,defaultOpen:c,defaultValue:u,disabled:d,displayEmpty:f,error:p=!1,IconComponent:m,inputRef:h,labelId:g,MenuProps:b={},multiple:S,name:w,onBlur:x,onChange:_,onClose:E,onFocus:C,onOpen:D,open:T,readOnly:j,renderValue:A,required:P,SelectDisplayProps:N={},tabIndex:M,type:R,value:L,variant:$="standard",...V}=t,[z,B]=jm({controlled:L,default:u,name:"Select"}),[X,q]=jm({controlled:T,default:c,name:"Select"}),re=O.useRef(null),J=O.useRef(null),[ee,oe]=O.useState(null),{current:se}=O.useRef(T!=null),[fe,U]=O.useState(),K=Nn(n,h),Z=O.useCallback(G=>{J.current=G,G&&oe(G)},[]),I=ee?.parentNode;O.useImperativeHandle(K,()=>({focus:()=>{J.current.focus()},node:re.current,value:z}),[z]),O.useEffect(()=>{c&&X&&ee&&!se&&(U(a?null:I.clientWidth),J.current.focus())},[ee,a]),O.useEffect(()=>{o&&J.current.focus()},[o]),O.useEffect(()=>{if(!g)return;const G=sr(J.current).getElementById(g);if(G){const pe=()=>{getSelection().isCollapsed&&J.current.focus()};return G.addEventListener("click",pe),()=>{G.removeEventListener("click",pe)}}},[g]);const ve=(G,pe)=>{G?D&&D(pe):E&&E(pe),se||(U(a?null:I.clientWidth),q(G))},te=G=>{G.button===0&&(G.preventDefault(),J.current.focus(),ve(!0,G))},ye=G=>{ve(!1,G)},_e=O.Children.toArray(s),He=G=>{const pe=_e.find(ge=>ge.props.value===G.target.value);pe!==void 0&&(B(pe.props.value),_&&_(G,pe))},ut=G=>pe=>{let ge;if(pe.currentTarget.hasAttribute("tabindex")){if(S){ge=Array.isArray(z)?z.slice():[];const at=z.indexOf(G.props.value);at===-1?ge.push(G.props.value):ge.splice(at,1)}else ge=G.props.value;if(G.props.onClick&&G.props.onClick(pe),z!==ge&&(B(ge),_)){const at=pe.nativeEvent||pe,_t=new at.constructor(at.type,at);Object.defineProperty(_t,"target",{writable:!0,value:{value:ge,name:w}}),_(_t,G)}S||ve(!1,pe)}},Et=G=>{j||[" ","ArrowUp","ArrowDown","Enter"].includes(G.key)&&(G.preventDefault(),ve(!0,G))},mt=ee!==null&&X,Je=G=>{!mt&&x&&(Object.defineProperty(G,"target",{writable:!0,value:{value:z,name:w}}),x(G))};delete V["aria-invalid"];let Ft,Qt;const wt=[];let Cn=!1,gn=!1;(gM({value:z})||f)&&(A?Ft=A(z):Cn=!0);const Dn=_e.map(G=>{if(!O.isValidElement(G))return null;process.env.NODE_ENV!=="production"&&Co.isFragment(G)&&console.error(["MUI: The Select component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
|
|
241
|
-
`));let pe;if(S){if(!Array.isArray(z))throw new Error(process.env.NODE_ENV!=="production"?"MUI: The `value` prop must be an array when using the `Select` component with `multiple`.":ti(2));pe=z.some(ge=>YM(ge,G.props.value)),pe&&Cn&&wt.push(G.props.children)}else pe=YM(z,G.props.value),pe&&Cn&&(
|
|
242
|
-
`))}},[gn,_e,S,w,z]),Cn&&(S?wt.length===0?Ft=null:Ft=wt.reduce((G,pe,ge)=>(G.push(pe),ge<wt.length-1&&G.push(", "),G),[]):Ft=Qt);let nr=fe;!a&&se&&ee&&(nr=I.clientWidth);let on;typeof M<"u"?on=M:on=d?null:0;const rr=N.id||(w?`mui-component-select-${w}`:void 0),be={...t,variant:$,value:z,open:mt,error:p},An=Aie(be),an={...b.PaperProps,...typeof b.slotProps?.paper=="function"?b.slotProps.paper(be):b.slotProps?.paper},H={...b.MenuListProps,...typeof b.slotProps?.list=="function"?b.slotProps.list(be):b.slotProps?.list},ue=Pw();return v.jsxs(O.Fragment,{children:[v.jsx(Pie,{as:"div",ref:Z,tabIndex:on,role:"combobox","aria-controls":mt?ue:void 0,"aria-disabled":d?"true":void 0,"aria-expanded":mt?"true":"false","aria-haspopup":"listbox","aria-label":i,"aria-labelledby":[g,rr].filter(Boolean).join(" ")||void 0,"aria-describedby":r,"aria-required":P?"true":void 0,"aria-invalid":p?"true":void 0,onKeyDown:Et,onMouseDown:d||j?null:te,onBlur:Je,onFocus:C,...N,ownerState:be,className:ie(N.className,An.select,l),id:rr,children:Die(Ft)?HM||(HM=v.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):Ft}),v.jsx(Cie,{"aria-invalid":p,value:Array.isArray(z)?z.join(","):z,name:w,ref:re,"aria-hidden":!0,onChange:He,tabIndex:-1,disabled:d,className:An.nativeInput,autoFocus:o,required:P,...V,ownerState:be}),v.jsx(kie,{as:m,className:An.icon,ownerState:be}),v.jsx(LM,{id:`menu-${w||""}`,anchorEl:I,open:mt,onClose:ye,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...b,slotProps:{...b.slotProps,list:{"aria-labelledby":g,role:"listbox","aria-multiselectable":S?"true":void 0,disableListWrap:!0,id:ue,...H},paper:{...an,style:{minWidth:nr,...an!=null?an.style:null}}},children:Dn})]})});process.env.NODE_ENV!=="production"&&(UM.propTypes={"aria-describedby":y.string,"aria-label":y.string,autoFocus:y.bool,autoWidth:y.bool,children:y.node,classes:y.object,className:y.string,defaultOpen:y.bool,defaultValue:y.any,disabled:y.bool,displayEmpty:y.bool,error:y.bool,IconComponent:y.elementType.isRequired,inputRef:mo,labelId:y.string,MenuProps:y.object,multiple:y.bool,name:y.string,onBlur:y.func,onChange:y.func,onClose:y.func,onFocus:y.func,onOpen:y.func,open:y.bool,readOnly:y.bool,renderValue:y.func,required:y.bool,SelectDisplayProps:y.object,tabIndex:y.oneOfType([y.number,y.string]),type:y.any,value:y.any,variant:y.oneOf(["standard","outlined","filled"])});const Tie=e=>{const{classes:t}=e,r=vn({root:["root"]},VM,t);return{...t,...r}},cx={name:"MuiSelect",slot:"Root",shouldForwardProp:e=>Wi(e)&&e!=="variant"},Mie=ke(ox,cx)(""),Nie=ke(lx,cx)(""),jie=ke(nx,cx)(""),ux=O.forwardRef(function(t,n){const r=zn({name:"MuiSelect",props:t}),{autoWidth:i=!1,children:o,classes:a={},className:s,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:u=Pre,id:d,input:f,inputProps:p,label:m,labelId:h,MenuProps:g,multiple:b=!1,native:S=!1,onClose:w,onOpen:x,open:_,renderValue:E,SelectDisplayProps:C,variant:D="outlined",...T}=r,j=S?BM:UM,A=ex(),P=Z0({props:r,muiFormControl:A,states:["variant","error"]}),N=P.variant||D,M={...r,variant:N,classes:a},R=Tie(M),{root:L,...$}=R,V=f||{standard:v.jsx(Mie,{ownerState:M}),outlined:v.jsx(Nie,{label:m,ownerState:M}),filled:v.jsx(jie,{ownerState:M})}[N],z=Nn(n,dl(V));return v.jsx(O.Fragment,{children:O.cloneElement(V,{inputComponent:j,inputProps:{children:o,error:P.error,IconComponent:u,variant:N,type:void 0,multiple:b,...S?{id:d}:{autoWidth:i,defaultOpen:l,displayEmpty:c,labelId:h,MenuProps:g,onClose:w,onOpen:x,open:_,renderValue:E,SelectDisplayProps:{id:d,...C}},...p,classes:p?yn($,p.classes):$,...f?f.props.inputProps:{}},...(b&&S||c)&&N==="outlined"?{notched:!0}:{},ref:z,className:ie(V.props.className,s,R.root),...!f&&{variant:N},...T})})});process.env.NODE_ENV!=="production"&&(ux.propTypes={autoWidth:y.bool,children:y.node,classes:y.object,className:y.string,defaultOpen:y.bool,defaultValue:y.any,displayEmpty:y.bool,IconComponent:y.elementType,id:y.string,input:y.element,inputProps:y.object,label:y.node,labelId:y.string,MenuProps:y.object,multiple:y.bool,native:y.bool,onChange:y.func,onClose:y.func,onOpen:y.func,open:y.bool,renderValue:y.func,SelectDisplayProps:y.object,sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),value:y.oneOfType([y.oneOf([""]),y.any]),variant:y.oneOf(["filled","outlined","standard"])}),ux.muiName="Select";function Iie(e){return cn("MuiTooltip",e)}const Dt=Tn("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);function Rie(e){return Math.round(e*1e5)/1e5}const Lie=e=>{const{classes:t,disableInteractive:n,arrow:r,touch:i,placement:o}=e,a={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",i&&"touch",`tooltipPlacement${sn(o.split("-")[0])}`],arrow:["arrow"]};return vn(a,Iie,t)},Fie=ke(Q0,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(Mn(({theme:e})=>({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none",variants:[{props:({ownerState:t})=>!t.disableInteractive,style:{pointerEvents:"auto"}},{props:({open:t})=>!t,style:{pointerEvents:"none"}},{props:({ownerState:t})=>t.arrow,style:{[`&[data-popper-placement*="bottom"] .${Dt.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${Dt.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${Dt.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${Dt.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="right"] .${Dt.arrow}`]:{left:0,marginLeft:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="right"] .${Dt.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="left"] .${Dt.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="left"] .${Dt.arrow}`]:{left:0,marginLeft:"-0.71em"}}}]}))),$ie=ke("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${sn(n.placement.split("-")[0])}`]]}})(Mn(({theme:e})=>({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium,[`.${Dt.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center"},[`.${Dt.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center"},[`.${Dt.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${Dt.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:"center top",marginTop:"14px"},variants:[{props:({ownerState:t})=>t.arrow,style:{position:"relative",margin:0}},{props:({ownerState:t})=>t.touch,style:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${Rie(16/14)}em`,fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:t})=>!t.isRtl,style:{[`.${Dt.popper}[data-popper-placement*="left"] &`]:{marginRight:"14px"},[`.${Dt.popper}[data-popper-placement*="right"] &`]:{marginLeft:"14px"}}},{props:({ownerState:t})=>!t.isRtl&&t.touch,style:{[`.${Dt.popper}[data-popper-placement*="left"] &`]:{marginRight:"24px"},[`.${Dt.popper}[data-popper-placement*="right"] &`]:{marginLeft:"24px"}}},{props:({ownerState:t})=>!!t.isRtl,style:{[`.${Dt.popper}[data-popper-placement*="left"] &`]:{marginLeft:"14px"},[`.${Dt.popper}[data-popper-placement*="right"] &`]:{marginRight:"14px"}}},{props:({ownerState:t})=>!!t.isRtl&&t.touch,style:{[`.${Dt.popper}[data-popper-placement*="left"] &`]:{marginLeft:"24px"},[`.${Dt.popper}[data-popper-placement*="right"] &`]:{marginRight:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${Dt.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${Dt.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]}))),Bie=ke("span",{name:"MuiTooltip",slot:"Arrow"})(Mn(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let gh=!1;const KM=new Jp;let pu={x:0,y:0};function vh(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}const qM=O.forwardRef(function(t,n){const r=zn({props:t,name:"MuiTooltip"}),{arrow:i=!1,children:o,classes:a,components:s={},componentsProps:l={},describeChild:c=!1,disableFocusListener:u=!1,disableHoverListener:d=!1,disableInteractive:f=!1,disableTouchListener:p=!1,enterDelay:m=100,enterNextDelay:h=0,enterTouchDelay:g=700,followCursor:b=!1,id:S,leaveDelay:w=0,leaveTouchDelay:x=1500,onClose:_,onOpen:E,open:C,placement:D="bottom",PopperComponent:T,PopperProps:j={},slotProps:A={},slots:P={},title:N,TransitionComponent:M,TransitionProps:R,...L}=r,$=O.isValidElement(o)?o:v.jsx("span",{children:o}),V=bd(),z=Em(),[B,X]=O.useState(),[q,re]=O.useState(null),J=O.useRef(!1),ee=f||b,oe=Zc(),se=Zc(),fe=Zc(),U=Zc(),[K,Z]=jm({controlled:C,default:!1,name:"Tooltip",state:"open"});let I=K;if(process.env.NODE_ENV!=="production"){const{current:xe}=O.useRef(C!==void 0);O.useEffect(()=>{B&&B.disabled&&!xe&&N!==""&&B.tagName.toLowerCase()==="button"&&console.warn(["MUI: You are providing a disabled `button` child to the Tooltip component.","A disabled element does not fire events.","Tooltip needs to listen to the child element's events to display the title.","","Add a simple wrapper element, such as a `span`."].join(`
|
|
243
|
-
`))},[N,B,xe])}const ve=Pw(S),te=O.useRef(),ye=Vl(()=>{te.current!==void 0&&(document.body.style.WebkitUserSelect=te.current,te.current=void 0),U.clear()});O.useEffect(()=>ye,[ye]);const _e=xe=>{KM.clear(),gh=!0,Z(!0),E&&!I&&E(xe)},He=Vl(xe=>{KM.start(800+w,()=>{gh=!1}),Z(!1),_&&I&&_(xe),oe.start(V.transitions.duration.shortest,()=>{J.current=!1})}),ut=xe=>{J.current&&xe.type!=="touchstart"||(B&&B.removeAttribute("title"),se.clear(),fe.clear(),m||gh&&h?se.start(gh?h:m,()=>{_e(xe)}):_e(xe))},Et=xe=>{se.clear(),fe.start(w,()=>{He(xe)})},[,mt]=O.useState(!1),Je=xe=>{HT(xe.target)||(mt(!1),Et(xe))},Ft=xe=>{B||X(xe.currentTarget),HT(xe.target)&&(mt(!0),ut(xe))},
|
|
240
|
+
`)),z.props.disabled||(g==="selectedMenu"&&z.props.selected||A===-1)&&(A=B))});const P={slots:b,slotProps:{list:l,transition:h,paper:d,...S}},N=dM({elementType:b.root,externalSlotProps:S.root,ownerState:_,className:[E.root,a]}),[M,R]=Xn("paper",{className:E.paper,elementType:hie,externalForwardedProps:P,shouldForwardComponentProp:!0,ownerState:_}),[L,$]=Xn("list",{className:ie(E.list,l.className),elementType:mie,shouldForwardComponentProp:!0,externalForwardedProps:P,getSlotProps:z=>({...z,onKeyDown:B=>{j(B),z.onKeyDown?.(B)}}),ownerState:_}),V=typeof P.slotProps.transition=="function"?P.slotProps.transition(_):P.slotProps.transition;return v.jsx(pie,{onClose:c,anchorOrigin:{vertical:"bottom",horizontal:x?"right":"left"},transformOrigin:x?uie:die,slots:{root:b.root,paper:M,backdrop:b.backdrop,...b.transition&&{transition:b.transition}},slotProps:{root:N,paper:R,backdrop:typeof S.backdrop=="function"?S.backdrop(_):S.backdrop,transition:{...V,onEntering:(...z)=>{T(...z),V?.onEntering?.(...z)}}},open:u,ref:n,transitionDuration:p,ownerState:_,...w,classes:f,children:v.jsx(L,{actions:D,autoFocus:i&&(A===-1||s),autoFocusItem:C,variant:g,...$,children:o})})});process.env.NODE_ENV!=="production"&&(LM.propTypes={anchorEl:y.oneOfType([go,y.func]),autoFocus:y.bool,children:y.node,classes:y.object,className:y.string,disableAutoFocusItem:y.bool,MenuListProps:y.object,onClose:y.func,open:y.bool.isRequired,PaperProps:y.object,PopoverClasses:y.object,slotProps:y.shape({backdrop:y.oneOfType([y.func,y.object]),list:y.oneOfType([y.func,y.object]),paper:y.oneOfType([y.func,y.object]),root:y.oneOfType([y.func,y.object]),transition:y.oneOfType([y.func,y.object])}),slots:y.shape({backdrop:y.elementType,list:y.elementType,paper:y.elementType,root:y.elementType,transition:y.elementType}),sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),transitionDuration:y.oneOfType([y.oneOf(["auto"]),y.number,y.shape({appear:y.number,enter:y.number,exit:y.number})]),TransitionProps:y.object,variant:y.oneOf(["menu","selectedMenu"])});function gie(e){return cn("MuiNativeSelect",e)}const sx=Tn("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),vie=e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:a}=e,s={select:["select",n,r&&"disabled",i&&"multiple",a&&"error"],icon:["icon",`icon${sn(n)}`,o&&"iconOpen",r&&"disabled"]};return vn(s,gie,t)},FM=ke("select",{name:"MuiNativeSelect"})(({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${sx.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:t})=>t.variant!=="filled"&&t.variant!=="outlined",style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),yie=ke(FM,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:Wi,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${sx.multiple}`]:t.multiple}]}})({}),$M=ke("svg",{name:"MuiNativeSelect"})(({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${sx.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:t})=>t.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]})),bie=ke($M,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${sn(n.variant)}`],n.open&&t.iconOpen]}})({}),BM=O.forwardRef(function(t,n){const{className:r,disabled:i,error:o,IconComponent:a,inputRef:s,variant:l="standard",...c}=t,u={...t,disabled:i,variant:l,error:o},d=vie(u);return v.jsxs(O.Fragment,{children:[v.jsx(yie,{ownerState:u,className:ie(d.select,r),disabled:i,ref:s||n,...c}),t.multiple?null:v.jsx(bie,{as:a,ownerState:u,className:d.icon})]})});process.env.NODE_ENV!=="production"&&(BM.propTypes={children:y.node,classes:y.object,className:y.string,disabled:y.bool,error:y.bool,IconComponent:y.elementType.isRequired,inputRef:mo,multiple:y.bool,name:y.string,onChange:y.func,value:y.any,variant:y.oneOf(["standard","outlined","filled"])});var WM;const xie=ke("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:Wi})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),wie=ke("legend",{name:"MuiNotchedOutlined",shouldForwardProp:Wi})(Mn(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:t})=>!t.withLabel,style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:t})=>t.withLabel,style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:({ownerState:t})=>t.withLabel&&t.notched,style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function zM(e){const{children:t,classes:n,className:r,label:i,notched:o,...a}=e,s=i!=null&&i!=="",l={...e,notched:o,withLabel:s};return v.jsx(xie,{"aria-hidden":!0,className:r,ownerState:l,...a,children:v.jsx(wie,{ownerState:l,children:s?v.jsx("span",{children:i}):WM||(WM=v.jsx("span",{className:"notranslate","aria-hidden":!0,children:""}))})})}process.env.NODE_ENV!=="production"&&(zM.propTypes={children:y.node,classes:y.object,className:y.string,label:y.node,notched:y.bool.isRequired,style:y.object});const _ie=e=>{const{classes:t}=e,r=vn({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},Ore,t);return{...t,...r}},Sie=ke(dh,{shouldForwardProp:e=>Wi(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:ch})(Mn(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${Ci.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Ci.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${Ci.focused} .${Ci.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(W0()).map(([n])=>({props:{color:n},style:{[`&.${Ci.focused} .${Ci.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}})),{props:{},style:{[`&.${Ci.error} .${Ci.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${Ci.disabled} .${Ci.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:n})=>n.startAdornment,style:{paddingLeft:14}},{props:({ownerState:n})=>n.endAdornment,style:{paddingRight:14}},{props:({ownerState:n})=>n.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:n,size:r})=>n.multiline&&r==="small",style:{padding:"8.5px 14px"}}]}})),Oie=ke(zM,{name:"MuiOutlinedInput",slot:"NotchedOutline"})(Mn(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}})),Eie=ke(fh,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:uh})(Mn(({theme:e})=>({padding:"16.5px 14px",...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:t})=>t.multiline,style:{padding:0}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}}]}))),lx=O.forwardRef(function(t,n){const r=zn({props:t,name:"MuiOutlinedInput"}),{components:i={},fullWidth:o=!1,inputComponent:a="input",label:s,multiline:l=!1,notched:c,slots:u={},slotProps:d={},type:f="text",...p}=r,m=_ie(r),h=ex(),g=Z0({props:r,muiFormControl:h,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),b={...r,color:g.color||"primary",disabled:g.disabled,error:g.error,focused:g.focused,formControl:h,fullWidth:o,hiddenLabel:g.hiddenLabel,multiline:l,size:g.size,type:f},S=u.root??i.Root??Sie,w=u.input??i.Input??Eie,[x,_]=Xn("notchedOutline",{elementType:Oie,className:m.notchedOutline,shouldForwardComponentProp:!0,ownerState:b,externalForwardedProps:{slots:u,slotProps:d},additionalProps:{label:s!=null&&s!==""&&g.required?v.jsxs(O.Fragment,{children:[s," ","*"]}):s}});return v.jsx(ph,{slots:{root:S,input:w},slotProps:d,renderSuffix:E=>v.jsx(x,{..._,notched:typeof c<"u"?c:!!(E.startAdornment||E.filled||E.focused)}),fullWidth:o,inputComponent:a,multiline:l,ref:n,type:f,...p,classes:{...m,notchedOutline:null}})});process.env.NODE_ENV!=="production"&&(lx.propTypes={autoComplete:y.string,autoFocus:y.bool,classes:y.object,color:y.oneOfType([y.oneOf(["primary","secondary"]),y.string]),components:y.shape({Input:y.elementType,Root:y.elementType}),defaultValue:y.any,disabled:y.bool,endAdornment:y.node,error:y.bool,fullWidth:y.bool,id:y.string,inputComponent:y.elementType,inputProps:y.object,inputRef:mo,label:y.node,margin:y.oneOf(["dense","none"]),maxRows:y.oneOfType([y.number,y.string]),minRows:y.oneOfType([y.number,y.string]),multiline:y.bool,name:y.string,notched:y.bool,onChange:y.func,placeholder:y.string,readOnly:y.bool,required:y.bool,rows:y.oneOfType([y.number,y.string]),slotProps:y.shape({input:y.object,notchedOutline:y.oneOfType([y.func,y.object]),root:y.object}),slots:y.shape({input:y.elementType,notchedOutline:y.elementType,root:y.elementType}),startAdornment:y.node,sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),type:y.string,value:y.any}),lx.muiName="Input";function VM(e){return cn("MuiSelect",e)}const fu=Tn("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var HM;const Pie=ke(FM,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${fu.select}`]:t.select},{[`&.${fu.select}`]:t[n.variant]},{[`&.${fu.error}`]:t.error},{[`&.${fu.multiple}`]:t.multiple}]}})({[`&.${fu.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),kie=ke($M,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${sn(n.variant)}`],n.open&&t.iconOpen]}})({}),Cie=ke("input",{shouldForwardProp:e=>Vw(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput"})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function YM(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function Die(e){return e==null||typeof e=="string"&&!e.trim()}const Aie=e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:a}=e,s={select:["select",n,r&&"disabled",i&&"multiple",a&&"error"],icon:["icon",`icon${sn(n)}`,o&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return vn(s,VM,t)},UM=O.forwardRef(function(t,n){const{"aria-describedby":r,"aria-label":i,autoFocus:o,autoWidth:a,children:s,className:l,defaultOpen:c,defaultValue:u,disabled:d,displayEmpty:f,error:p=!1,IconComponent:m,inputRef:h,labelId:g,MenuProps:b={},multiple:S,name:w,onBlur:x,onChange:_,onClose:E,onFocus:C,onOpen:D,open:T,readOnly:j,renderValue:A,required:P,SelectDisplayProps:N={},tabIndex:M,type:R,value:L,variant:$="standard",...V}=t,[z,B]=jm({controlled:L,default:u,name:"Select"}),[X,q]=jm({controlled:T,default:c,name:"Select"}),re=O.useRef(null),J=O.useRef(null),[ee,oe]=O.useState(null),{current:se}=O.useRef(T!=null),[fe,U]=O.useState(),K=Nn(n,h),Z=O.useCallback(G=>{J.current=G,G&&oe(G)},[]),I=ee?.parentNode;O.useImperativeHandle(K,()=>({focus:()=>{J.current.focus()},node:re.current,value:z}),[z]),O.useEffect(()=>{c&&X&&ee&&!se&&(U(a?null:I.clientWidth),J.current.focus())},[ee,a]),O.useEffect(()=>{o&&J.current.focus()},[o]),O.useEffect(()=>{if(!g)return;const G=sr(J.current).getElementById(g);if(G){const pe=()=>{getSelection().isCollapsed&&J.current.focus()};return G.addEventListener("click",pe),()=>{G.removeEventListener("click",pe)}}},[g]);const ve=(G,pe)=>{G?D&&D(pe):E&&E(pe),se||(U(a?null:I.clientWidth),q(G))},te=G=>{G.button===0&&(G.preventDefault(),J.current.focus(),ve(!0,G))},ye=G=>{ve(!1,G)},_e=O.Children.toArray(s),He=G=>{const pe=_e.find(ge=>ge.props.value===G.target.value);pe!==void 0&&(B(pe.props.value),_&&_(G,pe))},ut=G=>pe=>{let ge;if(pe.currentTarget.hasAttribute("tabindex")){if(S){ge=Array.isArray(z)?z.slice():[];const at=z.indexOf(G.props.value);at===-1?ge.push(G.props.value):ge.splice(at,1)}else ge=G.props.value;if(G.props.onClick&&G.props.onClick(pe),z!==ge&&(B(ge),_)){const at=pe.nativeEvent||pe,_t=new at.constructor(at.type,at);Object.defineProperty(_t,"target",{writable:!0,value:{value:ge,name:w}}),_(_t,G)}S||ve(!1,pe)}},Et=G=>{j||[" ","ArrowUp","ArrowDown","Enter"].includes(G.key)&&(G.preventDefault(),ve(!0,G))},mt=ee!==null&&X,Je=G=>{!mt&&x&&(Object.defineProperty(G,"target",{writable:!0,value:{value:z,name:w}}),x(G))};delete V["aria-invalid"];let Ft,Zt;const wt=[];let Cn=!1,gn=!1;(gM({value:z})||f)&&(A?Ft=A(z):Cn=!0);const Dn=_e.map(G=>{if(!O.isValidElement(G))return null;process.env.NODE_ENV!=="production"&&Co.isFragment(G)&&console.error(["MUI: The Select component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
|
|
241
|
+
`));let pe;if(S){if(!Array.isArray(z))throw new Error(process.env.NODE_ENV!=="production"?"MUI: The `value` prop must be an array when using the `Select` component with `multiple`.":ti(2));pe=z.some(ge=>YM(ge,G.props.value)),pe&&Cn&&wt.push(G.props.children)}else pe=YM(z,G.props.value),pe&&Cn&&(Zt=G.props.children);return pe&&(gn=!0),O.cloneElement(G,{"aria-selected":pe?"true":"false",onClick:ut(G),onKeyUp:ge=>{ge.key===" "&&ge.preventDefault(),G.props.onKeyUp&&G.props.onKeyUp(ge)},role:"option",selected:pe,value:void 0,"data-value":G.props.value})});process.env.NODE_ENV!=="production"&&O.useEffect(()=>{if(!gn&&!S&&z!==""){const G=_e.map(pe=>pe.props.value);console.warn([`MUI: You have provided an out-of-range value \`${z}\` for the select ${w?`(name="${w}") `:""}component.`,"Consider providing a value that matches one of the available options or ''.",`The available values are ${G.filter(pe=>pe!=null).map(pe=>`\`${pe}\``).join(", ")||'""'}.`].join(`
|
|
242
|
+
`))}},[gn,_e,S,w,z]),Cn&&(S?wt.length===0?Ft=null:Ft=wt.reduce((G,pe,ge)=>(G.push(pe),ge<wt.length-1&&G.push(", "),G),[]):Ft=Zt);let nr=fe;!a&&se&&ee&&(nr=I.clientWidth);let on;typeof M<"u"?on=M:on=d?null:0;const rr=N.id||(w?`mui-component-select-${w}`:void 0),be={...t,variant:$,value:z,open:mt,error:p},An=Aie(be),an={...b.PaperProps,...typeof b.slotProps?.paper=="function"?b.slotProps.paper(be):b.slotProps?.paper},H={...b.MenuListProps,...typeof b.slotProps?.list=="function"?b.slotProps.list(be):b.slotProps?.list},ue=Pw();return v.jsxs(O.Fragment,{children:[v.jsx(Pie,{as:"div",ref:Z,tabIndex:on,role:"combobox","aria-controls":mt?ue:void 0,"aria-disabled":d?"true":void 0,"aria-expanded":mt?"true":"false","aria-haspopup":"listbox","aria-label":i,"aria-labelledby":[g,rr].filter(Boolean).join(" ")||void 0,"aria-describedby":r,"aria-required":P?"true":void 0,"aria-invalid":p?"true":void 0,onKeyDown:Et,onMouseDown:d||j?null:te,onBlur:Je,onFocus:C,...N,ownerState:be,className:ie(N.className,An.select,l),id:rr,children:Die(Ft)?HM||(HM=v.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):Ft}),v.jsx(Cie,{"aria-invalid":p,value:Array.isArray(z)?z.join(","):z,name:w,ref:re,"aria-hidden":!0,onChange:He,tabIndex:-1,disabled:d,className:An.nativeInput,autoFocus:o,required:P,...V,ownerState:be}),v.jsx(kie,{as:m,className:An.icon,ownerState:be}),v.jsx(LM,{id:`menu-${w||""}`,anchorEl:I,open:mt,onClose:ye,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...b,slotProps:{...b.slotProps,list:{"aria-labelledby":g,role:"listbox","aria-multiselectable":S?"true":void 0,disableListWrap:!0,id:ue,...H},paper:{...an,style:{minWidth:nr,...an!=null?an.style:null}}},children:Dn})]})});process.env.NODE_ENV!=="production"&&(UM.propTypes={"aria-describedby":y.string,"aria-label":y.string,autoFocus:y.bool,autoWidth:y.bool,children:y.node,classes:y.object,className:y.string,defaultOpen:y.bool,defaultValue:y.any,disabled:y.bool,displayEmpty:y.bool,error:y.bool,IconComponent:y.elementType.isRequired,inputRef:mo,labelId:y.string,MenuProps:y.object,multiple:y.bool,name:y.string,onBlur:y.func,onChange:y.func,onClose:y.func,onFocus:y.func,onOpen:y.func,open:y.bool,readOnly:y.bool,renderValue:y.func,required:y.bool,SelectDisplayProps:y.object,tabIndex:y.oneOfType([y.number,y.string]),type:y.any,value:y.any,variant:y.oneOf(["standard","outlined","filled"])});const Tie=e=>{const{classes:t}=e,r=vn({root:["root"]},VM,t);return{...t,...r}},cx={name:"MuiSelect",slot:"Root",shouldForwardProp:e=>Wi(e)&&e!=="variant"},Mie=ke(ox,cx)(""),Nie=ke(lx,cx)(""),jie=ke(nx,cx)(""),ux=O.forwardRef(function(t,n){const r=zn({name:"MuiSelect",props:t}),{autoWidth:i=!1,children:o,classes:a={},className:s,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:u=Pre,id:d,input:f,inputProps:p,label:m,labelId:h,MenuProps:g,multiple:b=!1,native:S=!1,onClose:w,onOpen:x,open:_,renderValue:E,SelectDisplayProps:C,variant:D="outlined",...T}=r,j=S?BM:UM,A=ex(),P=Z0({props:r,muiFormControl:A,states:["variant","error"]}),N=P.variant||D,M={...r,variant:N,classes:a},R=Tie(M),{root:L,...$}=R,V=f||{standard:v.jsx(Mie,{ownerState:M}),outlined:v.jsx(Nie,{label:m,ownerState:M}),filled:v.jsx(jie,{ownerState:M})}[N],z=Nn(n,dl(V));return v.jsx(O.Fragment,{children:O.cloneElement(V,{inputComponent:j,inputProps:{children:o,error:P.error,IconComponent:u,variant:N,type:void 0,multiple:b,...S?{id:d}:{autoWidth:i,defaultOpen:l,displayEmpty:c,labelId:h,MenuProps:g,onClose:w,onOpen:x,open:_,renderValue:E,SelectDisplayProps:{id:d,...C}},...p,classes:p?yn($,p.classes):$,...f?f.props.inputProps:{}},...(b&&S||c)&&N==="outlined"?{notched:!0}:{},ref:z,className:ie(V.props.className,s,R.root),...!f&&{variant:N},...T})})});process.env.NODE_ENV!=="production"&&(ux.propTypes={autoWidth:y.bool,children:y.node,classes:y.object,className:y.string,defaultOpen:y.bool,defaultValue:y.any,displayEmpty:y.bool,IconComponent:y.elementType,id:y.string,input:y.element,inputProps:y.object,label:y.node,labelId:y.string,MenuProps:y.object,multiple:y.bool,native:y.bool,onChange:y.func,onClose:y.func,onOpen:y.func,open:y.bool,renderValue:y.func,SelectDisplayProps:y.object,sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),value:y.oneOfType([y.oneOf([""]),y.any]),variant:y.oneOf(["filled","outlined","standard"])}),ux.muiName="Select";function Iie(e){return cn("MuiTooltip",e)}const Dt=Tn("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);function Rie(e){return Math.round(e*1e5)/1e5}const Lie=e=>{const{classes:t,disableInteractive:n,arrow:r,touch:i,placement:o}=e,a={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",i&&"touch",`tooltipPlacement${sn(o.split("-")[0])}`],arrow:["arrow"]};return vn(a,Iie,t)},Fie=ke(Q0,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(Mn(({theme:e})=>({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none",variants:[{props:({ownerState:t})=>!t.disableInteractive,style:{pointerEvents:"auto"}},{props:({open:t})=>!t,style:{pointerEvents:"none"}},{props:({ownerState:t})=>t.arrow,style:{[`&[data-popper-placement*="bottom"] .${Dt.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${Dt.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${Dt.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${Dt.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="right"] .${Dt.arrow}`]:{left:0,marginLeft:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="right"] .${Dt.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="left"] .${Dt.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="left"] .${Dt.arrow}`]:{left:0,marginLeft:"-0.71em"}}}]}))),$ie=ke("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${sn(n.placement.split("-")[0])}`]]}})(Mn(({theme:e})=>({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium,[`.${Dt.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center"},[`.${Dt.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center"},[`.${Dt.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${Dt.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:"center top",marginTop:"14px"},variants:[{props:({ownerState:t})=>t.arrow,style:{position:"relative",margin:0}},{props:({ownerState:t})=>t.touch,style:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${Rie(16/14)}em`,fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:t})=>!t.isRtl,style:{[`.${Dt.popper}[data-popper-placement*="left"] &`]:{marginRight:"14px"},[`.${Dt.popper}[data-popper-placement*="right"] &`]:{marginLeft:"14px"}}},{props:({ownerState:t})=>!t.isRtl&&t.touch,style:{[`.${Dt.popper}[data-popper-placement*="left"] &`]:{marginRight:"24px"},[`.${Dt.popper}[data-popper-placement*="right"] &`]:{marginLeft:"24px"}}},{props:({ownerState:t})=>!!t.isRtl,style:{[`.${Dt.popper}[data-popper-placement*="left"] &`]:{marginLeft:"14px"},[`.${Dt.popper}[data-popper-placement*="right"] &`]:{marginRight:"14px"}}},{props:({ownerState:t})=>!!t.isRtl&&t.touch,style:{[`.${Dt.popper}[data-popper-placement*="left"] &`]:{marginLeft:"24px"},[`.${Dt.popper}[data-popper-placement*="right"] &`]:{marginRight:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${Dt.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${Dt.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]}))),Bie=ke("span",{name:"MuiTooltip",slot:"Arrow"})(Mn(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let gh=!1;const KM=new Jp;let pu={x:0,y:0};function vh(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}const qM=O.forwardRef(function(t,n){const r=zn({props:t,name:"MuiTooltip"}),{arrow:i=!1,children:o,classes:a,components:s={},componentsProps:l={},describeChild:c=!1,disableFocusListener:u=!1,disableHoverListener:d=!1,disableInteractive:f=!1,disableTouchListener:p=!1,enterDelay:m=100,enterNextDelay:h=0,enterTouchDelay:g=700,followCursor:b=!1,id:S,leaveDelay:w=0,leaveTouchDelay:x=1500,onClose:_,onOpen:E,open:C,placement:D="bottom",PopperComponent:T,PopperProps:j={},slotProps:A={},slots:P={},title:N,TransitionComponent:M,TransitionProps:R,...L}=r,$=O.isValidElement(o)?o:v.jsx("span",{children:o}),V=bd(),z=Em(),[B,X]=O.useState(),[q,re]=O.useState(null),J=O.useRef(!1),ee=f||b,oe=Zc(),se=Zc(),fe=Zc(),U=Zc(),[K,Z]=jm({controlled:C,default:!1,name:"Tooltip",state:"open"});let I=K;if(process.env.NODE_ENV!=="production"){const{current:xe}=O.useRef(C!==void 0);O.useEffect(()=>{B&&B.disabled&&!xe&&N!==""&&B.tagName.toLowerCase()==="button"&&console.warn(["MUI: You are providing a disabled `button` child to the Tooltip component.","A disabled element does not fire events.","Tooltip needs to listen to the child element's events to display the title.","","Add a simple wrapper element, such as a `span`."].join(`
|
|
243
|
+
`))},[N,B,xe])}const ve=Pw(S),te=O.useRef(),ye=Vl(()=>{te.current!==void 0&&(document.body.style.WebkitUserSelect=te.current,te.current=void 0),U.clear()});O.useEffect(()=>ye,[ye]);const _e=xe=>{KM.clear(),gh=!0,Z(!0),E&&!I&&E(xe)},He=Vl(xe=>{KM.start(800+w,()=>{gh=!1}),Z(!1),_&&I&&_(xe),oe.start(V.transitions.duration.shortest,()=>{J.current=!1})}),ut=xe=>{J.current&&xe.type!=="touchstart"||(B&&B.removeAttribute("title"),se.clear(),fe.clear(),m||gh&&h?se.start(gh?h:m,()=>{_e(xe)}):_e(xe))},Et=xe=>{se.clear(),fe.start(w,()=>{He(xe)})},[,mt]=O.useState(!1),Je=xe=>{HT(xe.target)||(mt(!1),Et(xe))},Ft=xe=>{B||X(xe.currentTarget),HT(xe.target)&&(mt(!0),ut(xe))},Zt=xe=>{J.current=!0;const $n=$.props;$n.onTouchStart&&$n.onTouchStart(xe)},wt=xe=>{Zt(xe),fe.clear(),oe.clear(),ye(),te.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",U.start(g,()=>{document.body.style.WebkitUserSelect=te.current,ut(xe)})},Cn=xe=>{$.props.onTouchEnd&&$.props.onTouchEnd(xe),ye(),fe.start(x,()=>{He(xe)})};O.useEffect(()=>{if(!I)return;function xe($n){$n.key==="Escape"&&He($n)}return document.addEventListener("keydown",xe),()=>{document.removeEventListener("keydown",xe)}},[He,I]);const gn=Nn(dl($),X,n);!N&&N!==0&&(I=!1);const Dn=O.useRef(),nr=xe=>{const $n=$.props;$n.onMouseMove&&$n.onMouseMove(xe),pu={x:xe.clientX,y:xe.clientY},Dn.current&&Dn.current.update()},on={},rr=typeof N=="string";c?(on.title=!I&&rr&&!d?N:null,on["aria-describedby"]=I?ve:null):(on["aria-label"]=rr?N:null,on["aria-labelledby"]=I&&!rr?ve:null);const be={...on,...L,...$.props,className:ie(L.className,$.props.className),onTouchStart:Zt,ref:gn,...b?{onMouseMove:nr}:{}};process.env.NODE_ENV!=="production"&&(be["data-mui-internal-clone-element"]=!0,O.useEffect(()=>{B&&!B.getAttribute("data-mui-internal-clone-element")&&console.error(["MUI: The `children` component of the Tooltip is not forwarding its props correctly.","Please make sure that props are spread on the same element that the ref is applied to."].join(`
|
|
244
244
|
`))},[B]));const An={};p||(be.onTouchStart=wt,be.onTouchEnd=Cn),d||(be.onMouseOver=vh(ut,be.onMouseOver),be.onMouseLeave=vh(Et,be.onMouseLeave),ee||(An.onMouseOver=ut,An.onMouseLeave=Et)),u||(be.onFocus=vh(Ft,be.onFocus),be.onBlur=vh(Je,be.onBlur),ee||(An.onFocus=Ft,An.onBlur=Je)),process.env.NODE_ENV!=="production"&&$.props.title&&console.error(["MUI: You have provided a `title` prop to the child of <Tooltip />.",`Remove this title prop \`${$.props.title}\` or the Tooltip component.`].join(`
|
|
245
|
-
`));const an={...r,isRtl:z,arrow:i,disableInteractive:ee,placement:D,PopperComponentProp:T,touch:J.current},H=typeof A.popper=="function"?A.popper(an):A.popper,ue=O.useMemo(()=>{let xe=[{name:"arrow",enabled:!!q,options:{element:q,padding:4}}];return j.popperOptions?.modifiers&&(xe=xe.concat(j.popperOptions.modifiers)),H?.popperOptions?.modifiers&&(xe=xe.concat(H.popperOptions.modifiers)),{...j.popperOptions,...H?.popperOptions,modifiers:xe}},[q,j.popperOptions,H?.popperOptions]),G=Lie(an),pe=typeof A.transition=="function"?A.transition(an):A.transition,ge={slots:{popper:s.Popper,transition:s.Transition??M,tooltip:s.Tooltip,arrow:s.Arrow,...P},slotProps:{arrow:A.arrow??l.arrow,popper:{...j,...H??l.popper},tooltip:A.tooltip??l.tooltip,transition:{...R,...pe??l.transition}}},[at,_t]=Xn("popper",{elementType:Fie,externalForwardedProps:ge,ownerState:an,className:ie(G.popper,j?.className)}),[Hr,la]=Xn("transition",{elementType:cu,externalForwardedProps:ge,ownerState:an}),[Yr,cs]=Xn("tooltip",{elementType:$ie,className:G.tooltip,externalForwardedProps:ge,ownerState:an}),[ko,ji]=Xn("arrow",{elementType:Bie,className:G.arrow,externalForwardedProps:ge,ownerState:an,ref:re});return v.jsxs(O.Fragment,{children:[O.cloneElement($,be),v.jsx(at,{as:T??Q0,placement:D,anchorEl:b?{getBoundingClientRect:()=>({top:pu.y,left:pu.x,right:pu.x,bottom:pu.y,width:0,height:0})}:B,popperRef:Dn,open:B?I:!1,id:ve,transition:!0,...An,..._t,popperOptions:ue,children:({TransitionProps:xe})=>v.jsx(Hr,{timeout:V.transitions.duration.shorter,...xe,...la,children:v.jsxs(Yr,{...cs,children:[N,i?v.jsx(ko,{...ji}):null]})})})]})});process.env.NODE_ENV!=="production"&&(qM.propTypes={arrow:y.bool,children:pl.isRequired,classes:y.object,className:y.string,components:y.shape({Arrow:y.elementType,Popper:y.elementType,Tooltip:y.elementType,Transition:y.elementType}),componentsProps:y.shape({arrow:y.object,popper:y.object,tooltip:y.object,transition:y.object}),describeChild:y.bool,disableFocusListener:y.bool,disableHoverListener:y.bool,disableInteractive:y.bool,disableTouchListener:y.bool,enterDelay:y.number,enterNextDelay:y.number,enterTouchDelay:y.number,followCursor:y.bool,id:y.string,leaveDelay:y.number,leaveTouchDelay:y.number,onClose:y.func,onOpen:y.func,open:y.bool,placement:y.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),PopperComponent:y.elementType,PopperProps:y.object,slotProps:y.shape({arrow:y.oneOfType([y.func,y.object]),popper:y.oneOfType([y.func,y.object]),tooltip:y.oneOfType([y.func,y.object]),transition:y.oneOfType([y.func,y.object])}),slots:y.shape({arrow:y.elementType,popper:y.elementType,tooltip:y.elementType,transition:y.elementType}),sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),title:y.node,TransitionComponent:y.elementType,TransitionProps:y.object});function Wie(e){return Xe({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Box_List"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M6.562,8.062h-2a1.5,1.5,0,0,1-1.5-1.5v-2a1.5,1.5,0,0,1,1.5-1.5h2a1.5,1.5,0,0,1,1.5,1.5v2A1.5,1.5,0,0,1,6.562,8.062Zm-2-4a.5.5,0,0,0-.5.5v2a.5.5,0,0,0,.5.5h2a.5.5,0,0,0,.5-.5v-2a.5.5,0,0,0-.5-.5Z"},child:[]},{tag:"path",attr:{d:"M6.562,20.938h-2a1.5,1.5,0,0,1-1.5-1.5v-2a1.5,1.5,0,0,1,1.5-1.5h2a1.5,1.5,0,0,1,1.5,1.5v2A1.5,1.5,0,0,1,6.562,20.938Zm-2-4a.5.5,0,0,0-.5.5v2a.5.5,0,0,0,.5.5h2a.5.5,0,0,0,.5-.5v-2a.5.5,0,0,0-.5-.5Z"},child:[]},{tag:"path",attr:{d:"M6.562,14.5h-2a1.5,1.5,0,0,1-1.5-1.5V11a1.5,1.5,0,0,1,1.5-1.5h2a1.5,1.5,0,0,1,1.5,1.5v2A1.5,1.5,0,0,1,6.562,14.5Zm-2-4a.5.5,0,0,0-.5.5v2a.5.5,0,0,0,.5.5h2a.5.5,0,0,0,.5-.5V11a.5.5,0,0,0-.5-.5Z"},child:[]},{tag:"path",attr:{d:"M20.438,6.062h-9a.5.5,0,0,1,0-1h9a.5.5,0,0,1,0,1Z"},child:[]},{tag:"path",attr:{d:"M20.438,12.5h-9a.5.5,0,0,1,0-1h9a.5.5,0,0,1,0,1Z"},child:[]},{tag:"path",attr:{d:"M20.438,18.935h-9a.5.5,0,1,1,0-1h9a.5.5,0,0,1,0,1Z"},child:[]}]}]}]})(e)}function zie(e){return Xe({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Export"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M5.552,20.968a2.577,2.577,0,0,1-2.5-2.73c-.012-2.153,0-4.306,0-6.459a.5.5,0,0,1,1,0c0,2.2-.032,4.4,0,6.6.016,1.107.848,1.589,1.838,1.589H18.353A1.546,1.546,0,0,0,19.825,19a3.023,3.023,0,0,0,.1-1.061V11.779h0a.5.5,0,0,1,1,0c0,2.224.085,4.465,0,6.687a2.567,2.567,0,0,1-2.67,2.5Z"},child:[]},{tag:"path",attr:{d:"M12.337,3.176a.455.455,0,0,0-.311-.138c-.015,0-.028,0-.043-.006s-.027,0-.041.006a.457.457,0,0,0-.312.138L7.961,6.845a.5.5,0,0,0,.707.707l2.816-2.815V15.479a.5.5,0,0,0,1,0V4.737L15.3,7.552a.5.5,0,0,0,.707-.707Z"},child:[]}]}]}]})(e)}function Vie(e){return Xe({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Warning"},child:[{tag:"g",attr:{},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M12.5,8.752a.5.5,0,0,0-1,0h0v6a.5.5,0,0,0,1,0Z"},child:[]},{tag:"circle",attr:{cx:"11.999",cy:"16.736",r:"0.5"},child:[]}]},{tag:"path",attr:{d:"M18.642,20.934H5.385A2.5,2.5,0,0,1,3.163,17.29L9.792,4.421a2.5,2.5,0,0,1,4.444,0L20.865,17.29a2.5,2.5,0,0,1-2.223,3.644ZM12.014,4.065a1.478,1.478,0,0,0-1.334.814L4.052,17.748a1.5,1.5,0,0,0,1.333,2.186H18.642a1.5,1.5,0,0,0,1.334-2.186L13.348,4.879A1.478,1.478,0,0,0,12.014,4.065Z"},child:[]}]}]}]})(e)}fd(ux)(()=>({width:"fit-content",maxWidth:"100px",height:"28px",padding:"0 6px",display:"flex",fontSize:"12px",alignItems:"center","& .MuiSelect-select":{padding:0},"& .MuiOutlinedInput-notchedOutline":{borderColor:"#C6C6C6",transition:"all 0.2s ease"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"#B084CC"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"#884EA7 !important",boxShadow:"0 0 0 3px rgba(136, 78, 167, 0.2)"}}));function hl({widgetId:e,options:t=[],defaultValue:n=["all"],onFilterChange:r=()=>{},onExport:i=()=>{}}){const o=JSON.parse(sessionStorage.getItem("community_id"))||[],[a,s]=k.useState(o),[l,c]=k.useState("");t.filter(d=>d.community_name.toLowerCase().includes(l.toLowerCase()));const u=()=>{DS("widget_id",e),DS("export",!0),i()};return v.jsx("div",{className:"flex items-center gap-2",children:v.jsx(qM,{title:"Export CSV for this widget",children:v.jsx("button",{onClick:u,className:"px-3 py-2 bg-[#FBF5FF] rounded cursor-pointer",children:v.jsx(zie,{className:"stroke-[#884EA7] stroke-[1.4]"})})})})}function Hie({isStatic:e,data:t}){const n=Number(t?.thisMonthMoveIns??t?.lastMonthMoveIns??0),r=Number(t?.thisMonthMoveOuts??t?.lastMonthMoveOuts??0),i=Number(t?.moveInPercentChange??t?.moveInChange??0),o=Number(t?.moveOutPercentChange??t?.moveOutChange??0),a=["#8B5CF6","#EBE4F9"],s=[{name:"Move-ins",value:n,color:a[0]},{name:"Move-outs",value:r,color:a[1]}];function l(c,u){return((Number(c)+Number(u))/2).toFixed(2)+"%"}return v.jsx(Sa,{title:"Community",period:"This Month",icon:v.jsx(OS,{className:"!text-[24px] text-[#329DFF]"}),className:`${e&&"max-h-[184px]"} h-[184px] mb-4 break-inside-avoid gap-[20px]`,actionButtons:v.jsx(hl,{widgetId:t?.widget_id,options:t?.communities}),children:v.jsxs("div",{className:"flex",children:[v.jsxs("div",{className:"w-[50%] flex flex-col gap-[28px]",children:[v.jsxs("div",{className:"flex flex-col gap-[8px]",children:[v.jsx("div",{className:"!m-0 !text-[12px] !leading-[16px] !text-[#64748B]",children:"Move-in/Out Count"}),v.jsx("div",{className:"!m-0 !text-[28px] !leading-[32px] !font-medium !text-[#8B5CF6]",children:n+r})]}),v.jsxs("div",{className:"!m-0 !text-[10px] !leading-[14px] !text-[#64748B] flex items-center gap-[4px]",children:[v.jsx(fg,{value:l(i,o)}),v.jsx("div",{className:"whitespace-nowrap",children:"Compared to last month"})]})]}),v.jsx("div",{className:"w-[50%] h-[111px] flex justify-end",children:v.jsx(It,{width:"75%",height:"100%",children:v.jsxs(ho,{children:[v.jsxs(Oi,{data:s,innerRadius:36,outerRadius:52,paddingAngle:2,dataKey:"value",children:[v.jsx(Vt,{fill:a[0]}),v.jsx(Vt,{fill:a[1]})]}),v.jsx(nn,{content:v.jsx(ac,{})})]})})})]})})}function Yie({isStatic:e,data:t,communities:n}){const r=["#8B5CF6","#22C55E","#3B82F6","#F59E0B"],i=[{name:"Notice",value:Number(t?.total_notices||0),color:r[0]},{name:"Post",value:Number(t?.total_topics||0),color:r[1]},{name:"Poll",value:Number(t?.total_polls||0),color:r[2]},{name:"Survey",value:Number(t?.total_surveys||0),color:r[3]}],o=t?.widget==="commercial";return v.jsx(Sa,{title:"Engagement",period:"This Month",icon:v.jsx(ES,{className:"!text-[24px] text-[#DBB467]"}),className:`${e&&"max-h-[303px]"} ${o?"h-[324px]":"h-[303px]"} gap-[20px]`,actionButtons:!o&&v.jsx(hl,{widgetId:t?.widget_id,options:t?.communities}),children:v.jsx("div",{className:"w-full h-[235px]",children:v.jsx(It,{width:"100%",height:"100%",children:v.jsxs(Zo,{data:i,layout:"vertical",margin:{top:4,right:8,left:0,bottom:0},children:[v.jsx(Rr,{stroke:"#e5e7eb",strokeDasharray:"3 3",horizontal:!1}),v.jsx(Gn,{type:"category",dataKey:"name",width:40,axisLine:!1,tickLine:!1,tick:{fontSize:10,lineHeight:14,fill:"#121212",fontWeight:400}}),v.jsx(vr,{type:"number",allowDecimals:!1,axisLine:!1,tickLine:!1,tick:{fontSize:10,lineHeight:14,fill:"#64748B",fontWeight:400}}),v.jsx(nn,{content:v.jsx(ac,{}),cursor:{fill:"transparent"},wrapperStyle:{outline:"none"},position:{x:160,y:0}}),v.jsx(Ln,{dataKey:"value",barSize:40,isAnimationActive:!1,children:i.map((a,s)=>v.jsx(Vt,{fill:r[s]},a.name))})]})})})})}function Uie({isStatic:e,data:t}){const n=Number(t?.totalBookings||0),r=Number(t?.averageUtilizationPercentage||0),i=k.useMemo(()=>{if(!t?.graph)return[];const{labels:s=[],bookings:l=[],utilization:c=[]}=t.graph;return s.map((u,d)=>({time:u,bookings:l[d]||0,utilization:c[d]||0}))},[t]),o=s=>["12 AM","6 AM","12 PM","6 PM","11 PM"].includes(s)?s:"",a=i.length?i:Array.from({length:24},(s,l)=>({time:`${l%12||12} ${l>=12?"PM":"AM"}`,bookings:0,utilization:0}));return v.jsxs(Sa,{title:"Facilities",period:"Today",icon:v.jsx(of,{className:"!text-[24px] text-[#8B5CF6]"}),className:`${e&&"max-h-[305px]"} h-[305px] mb-4 break-inside-avoid`,actionButtons:v.jsx(hl,{widgetId:t?.widget_id,options:t?.communities}),children:[v.jsxs("div",{className:"grid grid-cols-2 gap-[24px] mt-[16px] mb-[16px]",children:[v.jsxs("div",{children:[v.jsx("div",{className:"!text-[12px] text-[#64748B]",children:"Bookings"}),v.jsx("div",{className:"!text-[24px] font-medium text-[#8B5CF6]",children:n})]}),v.jsxs("div",{children:[v.jsx("div",{className:"!text-[12px] text-[#64748B]",children:"Utilisation Rate"}),v.jsxs("div",{className:"!text-[24px] font-medium text-[#329DFF]",children:[r.toFixed(2),"%"]})]})]}),v.jsx("div",{className:"w-full h-[170px]",children:v.jsx(It,{width:"100%",height:"100%",children:v.jsxs(R0,{data:a,margin:{top:5,right:-30,left:-35,bottom:0},children:[v.jsx(Rr,{strokeDasharray:"3 3",stroke:"#EBEBEB"}),v.jsx(vr,{dataKey:"time",interval:0,tickFormatter:o,tick:{fontSize:10,fill:"#121212",fontWeight:400},axisLine:!1,tickLine:!1,minTickGap:0}),v.jsx(Gn,{yAxisId:"left",tick:{fontSize:10,fill:"#64748B"},axisLine:!1,tickLine:!1}),v.jsx(Gn,{yAxisId:"right",orientation:"right",domain:[0,100],ticks:[0,20,40,60,80,100],tickFormatter:s=>`${s}%`,tick:{fontSize:10,fill:"#64748B"},axisLine:!1,tickLine:!1}),v.jsx(nn,{content:v.jsx(ac,{})}),v.jsx(Qo,{yAxisId:"left",type:"monotone",dataKey:"bookings",name:"Bookings",stroke:"#8B5CF6",strokeWidth:2,dot:!1,isAnimationActive:!1}),v.jsx(Qo,{yAxisId:"right",type:"monotone",dataKey:"utilization",name:"Utilization Rate",stroke:"#329DFF",strokeWidth:2,dot:!1,strokeDasharray:"2 4",isAnimationActive:!1})]})})})]})}function Kie({data:e}){const t=e?.incomeSummary||{},n=e?.expenditureSummary||{},r=["AED","USD","EUR"],i=["Rs","INR","₹"];function o(s){if(s==null||isNaN(s))return"0";const l=Number(s),c=Math.abs(l),u=l<0?"-":"";return c>=1e9?u+(c/1e9).toFixed(c%1e9===0?0:2)+"B":c>=1e6?u+(c/1e6).toFixed(c%1e6===0?0:2)+"M":c>=1e3?u+(c/1e3).toFixed(c%1e3===0?0:2)+"K":u+c.toFixed(c%1===0?0:2)}function a(s,l){return l?i.includes(l)?`${l} ${o(s)}`:r.includes(l)?`${o(s)} ${l}`:`${o(s)} ${l}`:o(s)}return v.jsx(Sa,{title:"Income",period:"This Month",icon:v.jsx(cg,{className:"!text-[24px] text-green-600"}),className:"!gap-[16px] break-inside-avoid h-[232px] overflow-hidden",actionButtons:v.jsx(hl,{widgetId:e?.widget_id,options:e?.communities}),children:v.jsxs("div",{children:[v.jsxs("div",{className:"grid grid-cols-4 !text-[12px] text-[#64748B] mb-2",children:[v.jsx("div",{children:"Opening"}),v.jsx("div",{children:"Income"}),v.jsx("div",{children:"Collection"}),v.jsx("div",{children:"Closing"})]}),v.jsxs("div",{className:"grid grid-cols-4 !text-[12px] font-medium text-[#121212] mb-2",children:[v.jsx("div",{children:a(t.opening_balance,t?.currency_type)}),v.jsx("div",{children:a(t.income,t?.currency_type)}),v.jsx("div",{children:a(t.collection,t?.currency_type)}),v.jsx("div",{children:a(t.closing_balance,t?.currency_type)})]}),v.jsx("hr",{className:"my-4 border-t border-dashed border-gray-300"}),v.jsx("div",{className:"flex items-center justify-between",children:v.jsxs("div",{className:"flex items-center gap-[12px]",children:[v.jsx(cg,{className:"!text-[24px] text-red-600"}),v.jsx("div",{className:"!my-0 !font-medium !text-[16px] !leading-[20px] !text-[#121212]",children:"Expenditure"})]})}),v.jsxs("div",{className:"grid grid-cols-4 !text-[12px] text-[#64748B] mt-4 mb-2",children:[v.jsx("div",{children:"Opening"}),v.jsx("div",{children:"Expenditure"}),v.jsx("div",{children:"Payment"}),v.jsx("div",{children:"Outstanding"})]}),v.jsxs("div",{className:"grid grid-cols-4 !text-[12px] font-medium text-[#121212]",children:[v.jsx("div",{children:a(n.opening_balance,n?.currency_type)}),v.jsx("div",{children:a(n.expenditure,n?.currency_type)}),v.jsx("div",{children:a(n.payment,n?.currency_type)}),v.jsx("div",{children:a(n.outstanding,n?.currency_type)})]})]})})}var qie="tippy-box",GM="tippy-content",Gie="tippy-backdrop",XM="tippy-arrow",QM="tippy-svg-arrow",Za={passive:!0,capture:!0},ZM=function(){return document.body};function Xie(e,t){return{}.hasOwnProperty.call(e,t)}function dx(e,t,n){if(Array.isArray(e)){var r=e[t];return r??(Array.isArray(n)?n[t]:n)}return e}function fx(e,t){var n={}.toString.call(e);return n.indexOf("[object")===0&&n.indexOf(t+"]")>-1}function JM(e,t){return typeof e=="function"?e.apply(void 0,t):e}function eN(e,t){if(t===0)return e;var n;return function(r){clearTimeout(n),n=setTimeout(function(){e(r)},t)}}function Qie(e,t){var n=Object.assign({},e);return t.forEach(function(r){delete n[r]}),n}function Zie(e){return e.split(/\s+/).filter(Boolean)}function ml(e){return[].concat(e)}function tN(e,t){e.indexOf(t)===-1&&e.push(t)}function Jie(e){return e.filter(function(t,n){return e.indexOf(t)===n})}function eoe(e){return e.split("-")[0]}function yh(e){return[].slice.call(e)}function nN(e){return Object.keys(e).reduce(function(t,n){return e[n]!==void 0&&(t[n]=e[n]),t},{})}function hu(){return document.createElement("div")}function mu(e){return["Element","Fragment"].some(function(t){return fx(e,t)})}function toe(e){return fx(e,"NodeList")}function noe(e){return fx(e,"MouseEvent")}function roe(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function ioe(e){return mu(e)?[e]:toe(e)?yh(e):Array.isArray(e)?e:yh(document.querySelectorAll(e))}function px(e,t){e.forEach(function(n){n&&(n.style.transitionDuration=t+"ms")})}function rN(e,t){e.forEach(function(n){n&&n.setAttribute("data-state",t)})}function ooe(e){var t,n=ml(e),r=n[0];return r!=null&&(t=r.ownerDocument)!=null&&t.body?r.ownerDocument:document}function aoe(e,t){var n=t.clientX,r=t.clientY;return e.every(function(i){var o=i.popperRect,a=i.popperState,s=i.props,l=s.interactiveBorder,c=eoe(a.placement),u=a.modifiersData.offset;if(!u)return!0;var d=c==="bottom"?u.top.y:0,f=c==="top"?u.bottom.y:0,p=c==="right"?u.left.x:0,m=c==="left"?u.right.x:0,h=o.top-r+d>l,g=r-o.bottom-f>l,b=o.left-n+p>l,S=n-o.right-m>l;return h||g||b||S})}function hx(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){e[r](i,n)})}function iN(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=n.getRootNode==null||(r=n.getRootNode())==null?void 0:r.host}return!1}var Di={isTouch:!1},oN=0;function soe(){Di.isTouch||(Di.isTouch=!0,window.performance&&document.addEventListener("mousemove",aN))}function aN(){var e=performance.now();e-oN<20&&(Di.isTouch=!1,document.removeEventListener("mousemove",aN)),oN=e}function loe(){var e=document.activeElement;if(roe(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function coe(){document.addEventListener("touchstart",soe,Za),window.addEventListener("blur",loe)}var uoe=typeof window<"u"&&typeof document<"u",doe=uoe?!!window.msCrypto:!1;function gl(e){var t=e==="destroy"?"n already-":" ";return[e+"() was called on a"+t+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function sN(e){var t=/[ \t]{2,}/g,n=/^[ \t]*/gm;return e.replace(t," ").replace(n,"").trim()}function foe(e){return sN(`
|
|
245
|
+
`));const an={...r,isRtl:z,arrow:i,disableInteractive:ee,placement:D,PopperComponentProp:T,touch:J.current},H=typeof A.popper=="function"?A.popper(an):A.popper,ue=O.useMemo(()=>{let xe=[{name:"arrow",enabled:!!q,options:{element:q,padding:4}}];return j.popperOptions?.modifiers&&(xe=xe.concat(j.popperOptions.modifiers)),H?.popperOptions?.modifiers&&(xe=xe.concat(H.popperOptions.modifiers)),{...j.popperOptions,...H?.popperOptions,modifiers:xe}},[q,j.popperOptions,H?.popperOptions]),G=Lie(an),pe=typeof A.transition=="function"?A.transition(an):A.transition,ge={slots:{popper:s.Popper,transition:s.Transition??M,tooltip:s.Tooltip,arrow:s.Arrow,...P},slotProps:{arrow:A.arrow??l.arrow,popper:{...j,...H??l.popper},tooltip:A.tooltip??l.tooltip,transition:{...R,...pe??l.transition}}},[at,_t]=Xn("popper",{elementType:Fie,externalForwardedProps:ge,ownerState:an,className:ie(G.popper,j?.className)}),[Hr,la]=Xn("transition",{elementType:cu,externalForwardedProps:ge,ownerState:an}),[Yr,cs]=Xn("tooltip",{elementType:$ie,className:G.tooltip,externalForwardedProps:ge,ownerState:an}),[ko,ji]=Xn("arrow",{elementType:Bie,className:G.arrow,externalForwardedProps:ge,ownerState:an,ref:re});return v.jsxs(O.Fragment,{children:[O.cloneElement($,be),v.jsx(at,{as:T??Q0,placement:D,anchorEl:b?{getBoundingClientRect:()=>({top:pu.y,left:pu.x,right:pu.x,bottom:pu.y,width:0,height:0})}:B,popperRef:Dn,open:B?I:!1,id:ve,transition:!0,...An,..._t,popperOptions:ue,children:({TransitionProps:xe})=>v.jsx(Hr,{timeout:V.transitions.duration.shorter,...xe,...la,children:v.jsxs(Yr,{...cs,children:[N,i?v.jsx(ko,{...ji}):null]})})})]})});process.env.NODE_ENV!=="production"&&(qM.propTypes={arrow:y.bool,children:pl.isRequired,classes:y.object,className:y.string,components:y.shape({Arrow:y.elementType,Popper:y.elementType,Tooltip:y.elementType,Transition:y.elementType}),componentsProps:y.shape({arrow:y.object,popper:y.object,tooltip:y.object,transition:y.object}),describeChild:y.bool,disableFocusListener:y.bool,disableHoverListener:y.bool,disableInteractive:y.bool,disableTouchListener:y.bool,enterDelay:y.number,enterNextDelay:y.number,enterTouchDelay:y.number,followCursor:y.bool,id:y.string,leaveDelay:y.number,leaveTouchDelay:y.number,onClose:y.func,onOpen:y.func,open:y.bool,placement:y.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),PopperComponent:y.elementType,PopperProps:y.object,slotProps:y.shape({arrow:y.oneOfType([y.func,y.object]),popper:y.oneOfType([y.func,y.object]),tooltip:y.oneOfType([y.func,y.object]),transition:y.oneOfType([y.func,y.object])}),slots:y.shape({arrow:y.elementType,popper:y.elementType,tooltip:y.elementType,transition:y.elementType}),sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),title:y.node,TransitionComponent:y.elementType,TransitionProps:y.object});function Wie(e){return Xe({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Box_List"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M6.562,8.062h-2a1.5,1.5,0,0,1-1.5-1.5v-2a1.5,1.5,0,0,1,1.5-1.5h2a1.5,1.5,0,0,1,1.5,1.5v2A1.5,1.5,0,0,1,6.562,8.062Zm-2-4a.5.5,0,0,0-.5.5v2a.5.5,0,0,0,.5.5h2a.5.5,0,0,0,.5-.5v-2a.5.5,0,0,0-.5-.5Z"},child:[]},{tag:"path",attr:{d:"M6.562,20.938h-2a1.5,1.5,0,0,1-1.5-1.5v-2a1.5,1.5,0,0,1,1.5-1.5h2a1.5,1.5,0,0,1,1.5,1.5v2A1.5,1.5,0,0,1,6.562,20.938Zm-2-4a.5.5,0,0,0-.5.5v2a.5.5,0,0,0,.5.5h2a.5.5,0,0,0,.5-.5v-2a.5.5,0,0,0-.5-.5Z"},child:[]},{tag:"path",attr:{d:"M6.562,14.5h-2a1.5,1.5,0,0,1-1.5-1.5V11a1.5,1.5,0,0,1,1.5-1.5h2a1.5,1.5,0,0,1,1.5,1.5v2A1.5,1.5,0,0,1,6.562,14.5Zm-2-4a.5.5,0,0,0-.5.5v2a.5.5,0,0,0,.5.5h2a.5.5,0,0,0,.5-.5V11a.5.5,0,0,0-.5-.5Z"},child:[]},{tag:"path",attr:{d:"M20.438,6.062h-9a.5.5,0,0,1,0-1h9a.5.5,0,0,1,0,1Z"},child:[]},{tag:"path",attr:{d:"M20.438,12.5h-9a.5.5,0,0,1,0-1h9a.5.5,0,0,1,0,1Z"},child:[]},{tag:"path",attr:{d:"M20.438,18.935h-9a.5.5,0,1,1,0-1h9a.5.5,0,0,1,0,1Z"},child:[]}]}]}]})(e)}function zie(e){return Xe({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Export"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M5.552,20.968a2.577,2.577,0,0,1-2.5-2.73c-.012-2.153,0-4.306,0-6.459a.5.5,0,0,1,1,0c0,2.2-.032,4.4,0,6.6.016,1.107.848,1.589,1.838,1.589H18.353A1.546,1.546,0,0,0,19.825,19a3.023,3.023,0,0,0,.1-1.061V11.779h0a.5.5,0,0,1,1,0c0,2.224.085,4.465,0,6.687a2.567,2.567,0,0,1-2.67,2.5Z"},child:[]},{tag:"path",attr:{d:"M12.337,3.176a.455.455,0,0,0-.311-.138c-.015,0-.028,0-.043-.006s-.027,0-.041.006a.457.457,0,0,0-.312.138L7.961,6.845a.5.5,0,0,0,.707.707l2.816-2.815V15.479a.5.5,0,0,0,1,0V4.737L15.3,7.552a.5.5,0,0,0,.707-.707Z"},child:[]}]}]}]})(e)}function Vie(e){return Xe({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Warning"},child:[{tag:"g",attr:{},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M12.5,8.752a.5.5,0,0,0-1,0h0v6a.5.5,0,0,0,1,0Z"},child:[]},{tag:"circle",attr:{cx:"11.999",cy:"16.736",r:"0.5"},child:[]}]},{tag:"path",attr:{d:"M18.642,20.934H5.385A2.5,2.5,0,0,1,3.163,17.29L9.792,4.421a2.5,2.5,0,0,1,4.444,0L20.865,17.29a2.5,2.5,0,0,1-2.223,3.644ZM12.014,4.065a1.478,1.478,0,0,0-1.334.814L4.052,17.748a1.5,1.5,0,0,0,1.333,2.186H18.642a1.5,1.5,0,0,0,1.334-2.186L13.348,4.879A1.478,1.478,0,0,0,12.014,4.065Z"},child:[]}]}]}]})(e)}fd(ux)(()=>({width:"fit-content",maxWidth:"100px",height:"28px",padding:"0 6px",display:"flex",fontSize:"12px",alignItems:"center","& .MuiSelect-select":{padding:0},"& .MuiOutlinedInput-notchedOutline":{borderColor:"#C6C6C6",transition:"all 0.2s ease"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"#B084CC"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"#884EA7 !important",boxShadow:"0 0 0 3px rgba(136, 78, 167, 0.2)"}}));function hl({widgetId:e,options:t=[],defaultValue:n=["all"],onFilterChange:r=()=>{},onExport:i=()=>{}}){const o=JSON.parse(sessionStorage.getItem("community_id"))||[],[a,s]=k.useState(o),[l,c]=k.useState("");t.filter(d=>d.community_name.toLowerCase().includes(l.toLowerCase()));const u=()=>{DS("widget_id",e),DS("export",!0),i()};return v.jsx("div",{className:"flex items-center gap-2",children:v.jsx(qM,{title:"Export CSV for this widget",children:v.jsx("button",{onClick:u,className:"px-3 py-2 bg-[#FBF5FF] rounded cursor-pointer",children:v.jsx(zie,{className:"stroke-[#884EA7] stroke-[1.4]"})})})})}function Hie({isStatic:e,data:t}){const n=Number(t?.thisMonthMoveIns??t?.lastMonthMoveIns??0),r=Number(t?.thisMonthMoveOuts??t?.lastMonthMoveOuts??0),i=Number(t?.moveInPercentChange??t?.moveInChange??0),o=Number(t?.moveOutPercentChange??t?.moveOutChange??0),a=["#8B5CF6","#EBE4F9"],s=[{name:"Move-ins",value:n,color:a[0]},{name:"Move-outs",value:r,color:a[1]}];function l(c,u){return((Number(c)+Number(u))/2).toFixed(2)+"%"}return v.jsx(Sa,{title:"Community",period:"This Month",icon:v.jsx(OS,{className:"!text-[24px] text-[#329DFF]"}),className:`${e&&"max-h-[184px]"} h-[184px] mb-4 break-inside-avoid gap-[20px]`,actionButtons:v.jsx(hl,{widgetId:t?.widget_id,options:t?.communities}),children:v.jsxs("div",{className:"flex",children:[v.jsxs("div",{className:"w-[50%] flex flex-col gap-[28px]",children:[v.jsxs("div",{className:"flex flex-col gap-[8px]",children:[v.jsx("div",{className:"!m-0 !text-[12px] !leading-[16px] !text-[#64748B]",children:"Move-in/Out Count"}),v.jsx("div",{className:"!m-0 !text-[28px] !leading-[32px] !font-medium !text-[#8B5CF6]",children:n+r})]}),v.jsxs("div",{className:"!m-0 !text-[10px] !leading-[14px] !text-[#64748B] flex items-center gap-[4px]",children:[v.jsx(fg,{value:l(i,o)}),v.jsx("div",{className:"whitespace-nowrap",children:"Compared to last month"})]})]}),v.jsx("div",{className:"w-[50%] h-[111px] flex justify-end",children:v.jsx(It,{width:"75%",height:"100%",children:v.jsxs(ho,{children:[v.jsxs(Oi,{data:s,innerRadius:36,outerRadius:52,paddingAngle:2,dataKey:"value",children:[v.jsx(Ht,{fill:a[0]}),v.jsx(Ht,{fill:a[1]})]}),v.jsx(Vt,{content:v.jsx(ac,{})})]})})})]})})}function Yie({isStatic:e,data:t,communities:n}){const r=["#8B5CF6","#22C55E","#3B82F6","#F59E0B"],i=[{name:"Notice",value:Number(t?.total_notices||0),color:r[0]},{name:"Post",value:Number(t?.total_topics||0),color:r[1]},{name:"Poll",value:Number(t?.total_polls||0),color:r[2]},{name:"Survey",value:Number(t?.total_surveys||0),color:r[3]}],o=t?.widget==="commercial";return v.jsx(Sa,{title:"Engagement",period:"This Month",icon:v.jsx(ES,{className:"!text-[24px] text-[#DBB467]"}),className:`${e&&"max-h-[303px]"} ${o?"h-[324px]":"h-[303px]"} gap-[20px]`,actionButtons:!o&&v.jsx(hl,{widgetId:t?.widget_id,options:t?.communities}),children:v.jsx("div",{className:"w-full h-[235px]",children:v.jsx(It,{width:"100%",height:"100%",children:v.jsxs(Zo,{data:i,layout:"vertical",margin:{top:4,right:8,left:0,bottom:0},children:[v.jsx(Rr,{stroke:"#e5e7eb",strokeDasharray:"3 3",horizontal:!1}),v.jsx(Gn,{type:"category",dataKey:"name",width:40,axisLine:!1,tickLine:!1,tick:{fontSize:10,lineHeight:14,fill:"#121212",fontWeight:400}}),v.jsx(vr,{type:"number",allowDecimals:!1,axisLine:!1,tickLine:!1,tick:{fontSize:10,lineHeight:14,fill:"#64748B",fontWeight:400}}),v.jsx(Vt,{content:v.jsx(ac,{}),cursor:{fill:"transparent"},wrapperStyle:{outline:"none"},position:{x:160,y:0}}),v.jsx(Ln,{dataKey:"value",barSize:40,isAnimationActive:!1,children:i.map((a,s)=>v.jsx(Ht,{fill:r[s]},a.name))})]})})})})}function Uie({isStatic:e,data:t}){const n=Number(t?.totalBookings||0),r=Number(t?.averageUtilizationPercentage||0),i=k.useMemo(()=>{if(!t?.graph)return[];const{labels:s=[],bookings:l=[],utilization:c=[]}=t.graph;return s.map((u,d)=>({time:u,bookings:l[d]||0,utilization:c[d]||0}))},[t]),o=s=>["12 AM","6 AM","12 PM","6 PM","11 PM"].includes(s)?s:"",a=i.length?i:Array.from({length:24},(s,l)=>({time:`${l%12||12} ${l>=12?"PM":"AM"}`,bookings:0,utilization:0}));return v.jsxs(Sa,{title:"Facilities",period:"Today",icon:v.jsx(of,{className:"!text-[24px] text-[#8B5CF6]"}),className:`${e&&"max-h-[305px]"} h-[305px] mb-4 break-inside-avoid`,actionButtons:v.jsx(hl,{widgetId:t?.widget_id,options:t?.communities}),children:[v.jsxs("div",{className:"grid grid-cols-2 gap-[24px] mt-[16px] mb-[16px]",children:[v.jsxs("div",{children:[v.jsx("div",{className:"!text-[12px] text-[#64748B]",children:"Bookings"}),v.jsx("div",{className:"!text-[24px] font-medium text-[#8B5CF6]",children:n})]}),v.jsxs("div",{children:[v.jsx("div",{className:"!text-[12px] text-[#64748B]",children:"Utilisation Rate"}),v.jsxs("div",{className:"!text-[24px] font-medium text-[#329DFF]",children:[r.toFixed(2),"%"]})]})]}),v.jsx("div",{className:"w-full h-[170px]",children:v.jsx(It,{width:"100%",height:"100%",children:v.jsxs(R0,{data:a,margin:{top:5,right:-30,left:-35,bottom:0},children:[v.jsx(Rr,{strokeDasharray:"3 3",stroke:"#EBEBEB"}),v.jsx(vr,{dataKey:"time",interval:0,tickFormatter:o,tick:{fontSize:10,fill:"#121212",fontWeight:400},axisLine:!1,tickLine:!1,minTickGap:0}),v.jsx(Gn,{yAxisId:"left",tick:{fontSize:10,fill:"#64748B"},axisLine:!1,tickLine:!1}),v.jsx(Gn,{yAxisId:"right",orientation:"right",domain:[0,100],ticks:[0,20,40,60,80,100],tickFormatter:s=>`${s}%`,tick:{fontSize:10,fill:"#64748B"},axisLine:!1,tickLine:!1}),v.jsx(Vt,{content:v.jsx(ac,{})}),v.jsx(Qo,{yAxisId:"left",type:"monotone",dataKey:"bookings",name:"Bookings",stroke:"#8B5CF6",strokeWidth:2,dot:!1,isAnimationActive:!1}),v.jsx(Qo,{yAxisId:"right",type:"monotone",dataKey:"utilization",name:"Utilization Rate",stroke:"#329DFF",strokeWidth:2,dot:!1,strokeDasharray:"2 4",isAnimationActive:!1})]})})})]})}function Kie({data:e}){const t=e?.incomeSummary||{},n=e?.expenditureSummary||{},r=["AED","USD","EUR"],i=["Rs","INR","₹"];function o(s){if(s==null||isNaN(s))return"0";const l=Number(s),c=Math.abs(l),u=l<0?"-":"";return c>=1e9?u+(c/1e9).toFixed(c%1e9===0?0:2)+"B":c>=1e6?u+(c/1e6).toFixed(c%1e6===0?0:2)+"M":c>=1e3?u+(c/1e3).toFixed(c%1e3===0?0:2)+"K":u+c.toFixed(c%1===0?0:2)}function a(s,l){return l?i.includes(l)?`${l} ${o(s)}`:r.includes(l)?`${o(s)} ${l}`:`${o(s)} ${l}`:o(s)}return v.jsx(Sa,{title:"Income",period:"This Month",icon:v.jsx(cg,{className:"!text-[24px] text-green-600"}),className:"!gap-[16px] break-inside-avoid h-[232px] overflow-hidden",actionButtons:v.jsx(hl,{widgetId:e?.widget_id,options:e?.communities}),children:v.jsxs("div",{children:[v.jsxs("div",{className:"grid grid-cols-4 !text-[12px] text-[#64748B] mb-2",children:[v.jsx("div",{children:"Opening"}),v.jsx("div",{children:"Income"}),v.jsx("div",{children:"Collection"}),v.jsx("div",{children:"Closing"})]}),v.jsxs("div",{className:"grid grid-cols-4 !text-[12px] font-medium text-[#121212] mb-2",children:[v.jsx("div",{children:a(t.opening_balance,t?.currency_type)}),v.jsx("div",{children:a(t.income,t?.currency_type)}),v.jsx("div",{children:a(t.collection,t?.currency_type)}),v.jsx("div",{children:a(t.closing_balance,t?.currency_type)})]}),v.jsx("hr",{className:"my-4 border-t border-dashed border-gray-300"}),v.jsx("div",{className:"flex items-center justify-between",children:v.jsxs("div",{className:"flex items-center gap-[12px]",children:[v.jsx(cg,{className:"!text-[24px] text-red-600"}),v.jsx("div",{className:"!my-0 !font-medium !text-[16px] !leading-[20px] !text-[#121212]",children:"Expenditure"})]})}),v.jsxs("div",{className:"grid grid-cols-4 !text-[12px] text-[#64748B] mt-4 mb-2",children:[v.jsx("div",{children:"Opening"}),v.jsx("div",{children:"Expenditure"}),v.jsx("div",{children:"Payment"}),v.jsx("div",{children:"Outstanding"})]}),v.jsxs("div",{className:"grid grid-cols-4 !text-[12px] font-medium text-[#121212]",children:[v.jsx("div",{children:a(n.opening_balance,n?.currency_type)}),v.jsx("div",{children:a(n.expenditure,n?.currency_type)}),v.jsx("div",{children:a(n.payment,n?.currency_type)}),v.jsx("div",{children:a(n.outstanding,n?.currency_type)})]})]})})}var qie="tippy-box",GM="tippy-content",Gie="tippy-backdrop",XM="tippy-arrow",QM="tippy-svg-arrow",Za={passive:!0,capture:!0},ZM=function(){return document.body};function Xie(e,t){return{}.hasOwnProperty.call(e,t)}function dx(e,t,n){if(Array.isArray(e)){var r=e[t];return r??(Array.isArray(n)?n[t]:n)}return e}function fx(e,t){var n={}.toString.call(e);return n.indexOf("[object")===0&&n.indexOf(t+"]")>-1}function JM(e,t){return typeof e=="function"?e.apply(void 0,t):e}function eN(e,t){if(t===0)return e;var n;return function(r){clearTimeout(n),n=setTimeout(function(){e(r)},t)}}function Qie(e,t){var n=Object.assign({},e);return t.forEach(function(r){delete n[r]}),n}function Zie(e){return e.split(/\s+/).filter(Boolean)}function ml(e){return[].concat(e)}function tN(e,t){e.indexOf(t)===-1&&e.push(t)}function Jie(e){return e.filter(function(t,n){return e.indexOf(t)===n})}function eoe(e){return e.split("-")[0]}function yh(e){return[].slice.call(e)}function nN(e){return Object.keys(e).reduce(function(t,n){return e[n]!==void 0&&(t[n]=e[n]),t},{})}function hu(){return document.createElement("div")}function mu(e){return["Element","Fragment"].some(function(t){return fx(e,t)})}function toe(e){return fx(e,"NodeList")}function noe(e){return fx(e,"MouseEvent")}function roe(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function ioe(e){return mu(e)?[e]:toe(e)?yh(e):Array.isArray(e)?e:yh(document.querySelectorAll(e))}function px(e,t){e.forEach(function(n){n&&(n.style.transitionDuration=t+"ms")})}function rN(e,t){e.forEach(function(n){n&&n.setAttribute("data-state",t)})}function ooe(e){var t,n=ml(e),r=n[0];return r!=null&&(t=r.ownerDocument)!=null&&t.body?r.ownerDocument:document}function aoe(e,t){var n=t.clientX,r=t.clientY;return e.every(function(i){var o=i.popperRect,a=i.popperState,s=i.props,l=s.interactiveBorder,c=eoe(a.placement),u=a.modifiersData.offset;if(!u)return!0;var d=c==="bottom"?u.top.y:0,f=c==="top"?u.bottom.y:0,p=c==="right"?u.left.x:0,m=c==="left"?u.right.x:0,h=o.top-r+d>l,g=r-o.bottom-f>l,b=o.left-n+p>l,S=n-o.right-m>l;return h||g||b||S})}function hx(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){e[r](i,n)})}function iN(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=n.getRootNode==null||(r=n.getRootNode())==null?void 0:r.host}return!1}var Di={isTouch:!1},oN=0;function soe(){Di.isTouch||(Di.isTouch=!0,window.performance&&document.addEventListener("mousemove",aN))}function aN(){var e=performance.now();e-oN<20&&(Di.isTouch=!1,document.removeEventListener("mousemove",aN)),oN=e}function loe(){var e=document.activeElement;if(roe(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function coe(){document.addEventListener("touchstart",soe,Za),window.addEventListener("blur",loe)}var uoe=typeof window<"u"&&typeof document<"u",doe=uoe?!!window.msCrypto:!1;function gl(e){var t=e==="destroy"?"n already-":" ";return[e+"() was called on a"+t+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function sN(e){var t=/[ \t]{2,}/g,n=/^[ \t]*/gm;return e.replace(t," ").replace(n,"").trim()}function foe(e){return sN(`
|
|
246
246
|
%ctippy.js
|
|
247
247
|
|
|
248
248
|
%c`+sN(e)+`
|
|
@@ -251,18 +251,18 @@ Take a look at the reducer(s) handling this action type: ${p.type}.
|
|
|
251
251
|
`)}function lN(e){return[foe(e),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}var gu;process.env.NODE_ENV!=="production"&&poe();function poe(){gu=new Set}function yo(e,t){if(e&&!gu.has(t)){var n;gu.add(t),(n=console).warn.apply(n,lN(t))}}function mx(e,t){if(e&&!gu.has(t)){var n;gu.add(t),(n=console).error.apply(n,lN(t))}}function hoe(e){var t=!e,n=Object.prototype.toString.call(e)==="[object Object]"&&!e.addEventListener;mx(t,["tippy() was passed","`"+String(e)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),mx(n,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var cN={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},moe={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},br=Object.assign({appendTo:ZM,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},cN,moe),goe=Object.keys(br),voe=function(t){process.env.NODE_ENV!=="production"&&fN(t,[]);var n=Object.keys(t);n.forEach(function(r){br[r]=t[r]})};function uN(e){var t=e.plugins||[],n=t.reduce(function(r,i){var o=i.name,a=i.defaultValue;if(o){var s;r[o]=e[o]!==void 0?e[o]:(s=br[o])!=null?s:a}return r},{});return Object.assign({},e,n)}function yoe(e,t){var n=t?Object.keys(uN(Object.assign({},br,{plugins:t}))):goe,r=n.reduce(function(i,o){var a=(e.getAttribute("data-tippy-"+o)||"").trim();if(!a)return i;if(o==="content")i[o]=a;else try{i[o]=JSON.parse(a)}catch{i[o]=a}return i},{});return r}function dN(e,t){var n=Object.assign({},t,{content:JM(t.content,[e])},t.ignoreAttributes?{}:yoe(e,t.plugins));return n.aria=Object.assign({},br.aria,n.aria),n.aria={expanded:n.aria.expanded==="auto"?t.interactive:n.aria.expanded,content:n.aria.content==="auto"?t.interactive?null:"describedby":n.aria.content},n}function fN(e,t){e===void 0&&(e={}),t===void 0&&(t=[]);var n=Object.keys(e);n.forEach(function(r){var i=Qie(br,Object.keys(cN)),o=!Xie(i,r);o&&(o=t.filter(function(a){return a.name===r}).length===0),yo(o,["`"+r+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.",`
|
|
252
252
|
|
|
253
253
|
`,`All props: https://atomiks.github.io/tippyjs/v6/all-props/
|
|
254
|
-
`,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var boe=function(){return"innerHTML"};function gx(e,t){e[boe()]=t}function pN(e){var t=hu();return e===!0?t.className=XM:(t.className=QM,mu(e)?t.appendChild(e):gx(t,e)),t}function hN(e,t){mu(t.content)?(gx(e,""),e.appendChild(t.content)):typeof t.content!="function"&&(t.allowHTML?gx(e,t.content):e.textContent=t.content)}function vx(e){var t=e.firstElementChild,n=yh(t.children);return{box:t,content:n.find(function(r){return r.classList.contains(GM)}),arrow:n.find(function(r){return r.classList.contains(XM)||r.classList.contains(QM)}),backdrop:n.find(function(r){return r.classList.contains(Gie)})}}function mN(e){var t=hu(),n=hu();n.className=qie,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=hu();r.className=GM,r.setAttribute("data-state","hidden"),hN(r,e.props),t.appendChild(n),n.appendChild(r),i(e.props,e.props);function i(o,a){var s=vx(t),l=s.box,c=s.content,u=s.arrow;a.theme?l.setAttribute("data-theme",a.theme):l.removeAttribute("data-theme"),typeof a.animation=="string"?l.setAttribute("data-animation",a.animation):l.removeAttribute("data-animation"),a.inertia?l.setAttribute("data-inertia",""):l.removeAttribute("data-inertia"),l.style.maxWidth=typeof a.maxWidth=="number"?a.maxWidth+"px":a.maxWidth,a.role?l.setAttribute("role",a.role):l.removeAttribute("role"),(o.content!==a.content||o.allowHTML!==a.allowHTML)&&hN(c,e.props),a.arrow?u?o.arrow!==a.arrow&&(l.removeChild(u),l.appendChild(pN(a.arrow))):l.appendChild(pN(a.arrow)):u&&l.removeChild(u)}return{popper:t,onUpdate:i}}mN.$$tippy=!0;var xoe=1,bh=[],yx=[];function woe(e,t){var n=dN(e,Object.assign({},br,uN(nN(t)))),r,i,o,a=!1,s=!1,l=!1,c=!1,u,d,f,p=[],m=eN(te,n.interactiveDebounce),h,g=xoe++,b=null,S=Jie(n.plugins),w={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},x={id:g,reference:e,popper:hu(),popperInstance:b,props:n,state:w,plugins:S,clearDelayTimeouts:gn,setProps:Dn,setContent:nr,show:on,hide:rr,hideWithInteractivity:be,enable:wt,disable:Cn,unmount:An,destroy:an};if(!n.render)return process.env.NODE_ENV!=="production"&&mx(!0,"render() function has not been supplied."),x;var _=n.render(x),E=_.popper,C=_.onUpdate;E.setAttribute("data-tippy-root",""),E.id="tippy-"+x.id,x.popper=E,e._tippy=x,E._tippy=x;var D=S.map(function(H){return H.fn(x)}),T=e.hasAttribute("aria-expanded");return Z(),B(),$(),V("onCreate",[x]),n.showOnCreate&&Ft(),E.addEventListener("mouseenter",function(){x.props.interactive&&x.state.isVisible&&x.clearDelayTimeouts()}),E.addEventListener("mouseleave",function(){x.props.interactive&&x.props.trigger.indexOf("mouseenter")>=0&&M().addEventListener("mousemove",m)}),x;function j(){var H=x.props.touch;return Array.isArray(H)?H:[H,0]}function A(){return j()[0]==="hold"}function P(){var H;return!!((H=x.props.render)!=null&&H.$$tippy)}function N(){return h||e}function M(){var H=N().parentNode;return H?ooe(H):document}function R(){return vx(E)}function L(H){return x.state.isMounted&&!x.state.isVisible||Di.isTouch||u&&u.type==="focus"?0:dx(x.props.delay,H?0:1,br.delay)}function $(H){H===void 0&&(H=!1),E.style.pointerEvents=x.props.interactive&&!H?"":"none",E.style.zIndex=""+x.props.zIndex}function V(H,ue,G){if(G===void 0&&(G=!0),D.forEach(function(ge){ge[H]&&ge[H].apply(ge,ue)}),G){var pe;(pe=x.props)[H].apply(pe,ue)}}function z(){var H=x.props.aria;if(H.content){var ue="aria-"+H.content,G=E.id,pe=ml(x.props.triggerTarget||e);pe.forEach(function(ge){var at=ge.getAttribute(ue);if(x.state.isVisible)ge.setAttribute(ue,at?at+" "+G:G);else{var _t=at&&at.replace(G,"").trim();_t?ge.setAttribute(ue,_t):ge.removeAttribute(ue)}})}}function B(){if(!(T||!x.props.aria.expanded)){var H=ml(x.props.triggerTarget||e);H.forEach(function(ue){x.props.interactive?ue.setAttribute("aria-expanded",x.state.isVisible&&ue===N()?"true":"false"):ue.removeAttribute("aria-expanded")})}}function X(){M().removeEventListener("mousemove",m),bh=bh.filter(function(H){return H!==m})}function q(H){if(!(Di.isTouch&&(l||H.type==="mousedown"))){var ue=H.composedPath&&H.composedPath()[0]||H.target;if(!(x.props.interactive&&iN(E,ue))){if(ml(x.props.triggerTarget||e).some(function(G){return iN(G,ue)})){if(Di.isTouch||x.state.isVisible&&x.props.trigger.indexOf("click")>=0)return}else V("onClickOutside",[x,H]);x.props.hideOnClick===!0&&(x.clearDelayTimeouts(),x.hide(),s=!0,setTimeout(function(){s=!1}),x.state.isMounted||oe())}}}function re(){l=!0}function J(){l=!1}function ee(){var H=M();H.addEventListener("mousedown",q,!0),H.addEventListener("touchend",q,Za),H.addEventListener("touchstart",J,Za),H.addEventListener("touchmove",re,Za)}function oe(){var H=M();H.removeEventListener("mousedown",q,!0),H.removeEventListener("touchend",q,Za),H.removeEventListener("touchstart",J,Za),H.removeEventListener("touchmove",re,Za)}function se(H,ue){U(H,function(){!x.state.isVisible&&E.parentNode&&E.parentNode.contains(E)&&ue()})}function fe(H,ue){U(H,ue)}function U(H,ue){var G=R().box;function pe(ge){ge.target===G&&(hx(G,"remove",pe),ue())}if(H===0)return ue();hx(G,"remove",d),hx(G,"add",pe),d=pe}function K(H,ue,G){G===void 0&&(G=!1);var pe=ml(x.props.triggerTarget||e);pe.forEach(function(ge){ge.addEventListener(H,ue,G),p.push({node:ge,eventType:H,handler:ue,options:G})})}function Z(){A()&&(K("touchstart",ve,{passive:!0}),K("touchend",ye,{passive:!0})),Zie(x.props.trigger).forEach(function(H){if(H!=="manual")switch(K(H,ve),H){case"mouseenter":K("mouseleave",ye);break;case"focus":K(doe?"focusout":"blur",_e);break;case"focusin":K("focusout",_e);break}})}function I(){p.forEach(function(H){var ue=H.node,G=H.eventType,pe=H.handler,ge=H.options;ue.removeEventListener(G,pe,ge)}),p=[]}function ve(H){var ue,G=!1;if(!(!x.state.isEnabled||He(H)||s)){var pe=((ue=u)==null?void 0:ue.type)==="focus";u=H,h=H.currentTarget,B(),!x.state.isVisible&&noe(H)&&bh.forEach(function(ge){return ge(H)}),H.type==="click"&&(x.props.trigger.indexOf("mouseenter")<0||a)&&x.props.hideOnClick!==!1&&x.state.isVisible?G=!0:Ft(H),H.type==="click"&&(a=!G),G&&!pe&&
|
|
254
|
+
`,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var boe=function(){return"innerHTML"};function gx(e,t){e[boe()]=t}function pN(e){var t=hu();return e===!0?t.className=XM:(t.className=QM,mu(e)?t.appendChild(e):gx(t,e)),t}function hN(e,t){mu(t.content)?(gx(e,""),e.appendChild(t.content)):typeof t.content!="function"&&(t.allowHTML?gx(e,t.content):e.textContent=t.content)}function vx(e){var t=e.firstElementChild,n=yh(t.children);return{box:t,content:n.find(function(r){return r.classList.contains(GM)}),arrow:n.find(function(r){return r.classList.contains(XM)||r.classList.contains(QM)}),backdrop:n.find(function(r){return r.classList.contains(Gie)})}}function mN(e){var t=hu(),n=hu();n.className=qie,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=hu();r.className=GM,r.setAttribute("data-state","hidden"),hN(r,e.props),t.appendChild(n),n.appendChild(r),i(e.props,e.props);function i(o,a){var s=vx(t),l=s.box,c=s.content,u=s.arrow;a.theme?l.setAttribute("data-theme",a.theme):l.removeAttribute("data-theme"),typeof a.animation=="string"?l.setAttribute("data-animation",a.animation):l.removeAttribute("data-animation"),a.inertia?l.setAttribute("data-inertia",""):l.removeAttribute("data-inertia"),l.style.maxWidth=typeof a.maxWidth=="number"?a.maxWidth+"px":a.maxWidth,a.role?l.setAttribute("role",a.role):l.removeAttribute("role"),(o.content!==a.content||o.allowHTML!==a.allowHTML)&&hN(c,e.props),a.arrow?u?o.arrow!==a.arrow&&(l.removeChild(u),l.appendChild(pN(a.arrow))):l.appendChild(pN(a.arrow)):u&&l.removeChild(u)}return{popper:t,onUpdate:i}}mN.$$tippy=!0;var xoe=1,bh=[],yx=[];function woe(e,t){var n=dN(e,Object.assign({},br,uN(nN(t)))),r,i,o,a=!1,s=!1,l=!1,c=!1,u,d,f,p=[],m=eN(te,n.interactiveDebounce),h,g=xoe++,b=null,S=Jie(n.plugins),w={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},x={id:g,reference:e,popper:hu(),popperInstance:b,props:n,state:w,plugins:S,clearDelayTimeouts:gn,setProps:Dn,setContent:nr,show:on,hide:rr,hideWithInteractivity:be,enable:wt,disable:Cn,unmount:An,destroy:an};if(!n.render)return process.env.NODE_ENV!=="production"&&mx(!0,"render() function has not been supplied."),x;var _=n.render(x),E=_.popper,C=_.onUpdate;E.setAttribute("data-tippy-root",""),E.id="tippy-"+x.id,x.popper=E,e._tippy=x,E._tippy=x;var D=S.map(function(H){return H.fn(x)}),T=e.hasAttribute("aria-expanded");return Z(),B(),$(),V("onCreate",[x]),n.showOnCreate&&Ft(),E.addEventListener("mouseenter",function(){x.props.interactive&&x.state.isVisible&&x.clearDelayTimeouts()}),E.addEventListener("mouseleave",function(){x.props.interactive&&x.props.trigger.indexOf("mouseenter")>=0&&M().addEventListener("mousemove",m)}),x;function j(){var H=x.props.touch;return Array.isArray(H)?H:[H,0]}function A(){return j()[0]==="hold"}function P(){var H;return!!((H=x.props.render)!=null&&H.$$tippy)}function N(){return h||e}function M(){var H=N().parentNode;return H?ooe(H):document}function R(){return vx(E)}function L(H){return x.state.isMounted&&!x.state.isVisible||Di.isTouch||u&&u.type==="focus"?0:dx(x.props.delay,H?0:1,br.delay)}function $(H){H===void 0&&(H=!1),E.style.pointerEvents=x.props.interactive&&!H?"":"none",E.style.zIndex=""+x.props.zIndex}function V(H,ue,G){if(G===void 0&&(G=!0),D.forEach(function(ge){ge[H]&&ge[H].apply(ge,ue)}),G){var pe;(pe=x.props)[H].apply(pe,ue)}}function z(){var H=x.props.aria;if(H.content){var ue="aria-"+H.content,G=E.id,pe=ml(x.props.triggerTarget||e);pe.forEach(function(ge){var at=ge.getAttribute(ue);if(x.state.isVisible)ge.setAttribute(ue,at?at+" "+G:G);else{var _t=at&&at.replace(G,"").trim();_t?ge.setAttribute(ue,_t):ge.removeAttribute(ue)}})}}function B(){if(!(T||!x.props.aria.expanded)){var H=ml(x.props.triggerTarget||e);H.forEach(function(ue){x.props.interactive?ue.setAttribute("aria-expanded",x.state.isVisible&&ue===N()?"true":"false"):ue.removeAttribute("aria-expanded")})}}function X(){M().removeEventListener("mousemove",m),bh=bh.filter(function(H){return H!==m})}function q(H){if(!(Di.isTouch&&(l||H.type==="mousedown"))){var ue=H.composedPath&&H.composedPath()[0]||H.target;if(!(x.props.interactive&&iN(E,ue))){if(ml(x.props.triggerTarget||e).some(function(G){return iN(G,ue)})){if(Di.isTouch||x.state.isVisible&&x.props.trigger.indexOf("click")>=0)return}else V("onClickOutside",[x,H]);x.props.hideOnClick===!0&&(x.clearDelayTimeouts(),x.hide(),s=!0,setTimeout(function(){s=!1}),x.state.isMounted||oe())}}}function re(){l=!0}function J(){l=!1}function ee(){var H=M();H.addEventListener("mousedown",q,!0),H.addEventListener("touchend",q,Za),H.addEventListener("touchstart",J,Za),H.addEventListener("touchmove",re,Za)}function oe(){var H=M();H.removeEventListener("mousedown",q,!0),H.removeEventListener("touchend",q,Za),H.removeEventListener("touchstart",J,Za),H.removeEventListener("touchmove",re,Za)}function se(H,ue){U(H,function(){!x.state.isVisible&&E.parentNode&&E.parentNode.contains(E)&&ue()})}function fe(H,ue){U(H,ue)}function U(H,ue){var G=R().box;function pe(ge){ge.target===G&&(hx(G,"remove",pe),ue())}if(H===0)return ue();hx(G,"remove",d),hx(G,"add",pe),d=pe}function K(H,ue,G){G===void 0&&(G=!1);var pe=ml(x.props.triggerTarget||e);pe.forEach(function(ge){ge.addEventListener(H,ue,G),p.push({node:ge,eventType:H,handler:ue,options:G})})}function Z(){A()&&(K("touchstart",ve,{passive:!0}),K("touchend",ye,{passive:!0})),Zie(x.props.trigger).forEach(function(H){if(H!=="manual")switch(K(H,ve),H){case"mouseenter":K("mouseleave",ye);break;case"focus":K(doe?"focusout":"blur",_e);break;case"focusin":K("focusout",_e);break}})}function I(){p.forEach(function(H){var ue=H.node,G=H.eventType,pe=H.handler,ge=H.options;ue.removeEventListener(G,pe,ge)}),p=[]}function ve(H){var ue,G=!1;if(!(!x.state.isEnabled||He(H)||s)){var pe=((ue=u)==null?void 0:ue.type)==="focus";u=H,h=H.currentTarget,B(),!x.state.isVisible&&noe(H)&&bh.forEach(function(ge){return ge(H)}),H.type==="click"&&(x.props.trigger.indexOf("mouseenter")<0||a)&&x.props.hideOnClick!==!1&&x.state.isVisible?G=!0:Ft(H),H.type==="click"&&(a=!G),G&&!pe&&Zt(H)}}function te(H){var ue=H.target,G=N().contains(ue)||E.contains(ue);if(!(H.type==="mousemove"&&G)){var pe=Je().concat(E).map(function(ge){var at,_t=ge._tippy,Hr=(at=_t.popperInstance)==null?void 0:at.state;return Hr?{popperRect:ge.getBoundingClientRect(),popperState:Hr,props:n}:null}).filter(Boolean);aoe(pe,H)&&(X(),Zt(H))}}function ye(H){var ue=He(H)||x.props.trigger.indexOf("click")>=0&&a;if(!ue){if(x.props.interactive){x.hideWithInteractivity(H);return}Zt(H)}}function _e(H){x.props.trigger.indexOf("focusin")<0&&H.target!==N()||x.props.interactive&&H.relatedTarget&&E.contains(H.relatedTarget)||Zt(H)}function He(H){return Di.isTouch?A()!==H.type.indexOf("touch")>=0:!1}function ut(){Et();var H=x.props,ue=H.popperOptions,G=H.placement,pe=H.offset,ge=H.getReferenceClientRect,at=H.moveTransition,_t=P()?vx(E).arrow:null,Hr=ge?{getBoundingClientRect:ge,contextElement:ge.contextElement||N()}:e,la={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(ko){var ji=ko.state;if(P()){var xe=R(),$n=xe.box;["placement","reference-hidden","escaped"].forEach(function(kl){kl==="placement"?$n.setAttribute("data-placement",ji.placement):ji.attributes.popper["data-popper-"+kl]?$n.setAttribute("data-"+kl,""):$n.removeAttribute("data-"+kl)}),ji.attributes.popper={}}}},Yr=[{name:"offset",options:{offset:pe}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!at}},la];P()&&_t&&Yr.push({name:"arrow",options:{element:_t,padding:3}}),Yr.push.apply(Yr,ue?.modifiers||[]),x.popperInstance=uM(Hr,E,Object.assign({},ue,{placement:G,onFirstUpdate:f,modifiers:Yr}))}function Et(){x.popperInstance&&(x.popperInstance.destroy(),x.popperInstance=null)}function mt(){var H=x.props.appendTo,ue,G=N();x.props.interactive&&H===ZM||H==="parent"?ue=G.parentNode:ue=JM(H,[G]),ue.contains(E)||ue.appendChild(E),x.state.isMounted=!0,ut(),process.env.NODE_ENV!=="production"&&yo(x.props.interactive&&H===br.appendTo&&G.nextElementSibling!==E,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.",`
|
|
255
255
|
|
|
256
256
|
`,"Using a wrapper <div> or <span> tag around the reference element","solves this by creating a new parentNode context.",`
|
|
257
257
|
|
|
258
258
|
`,"Specifying `appendTo: document.body` silences this warning, but it","assumes you are using a focus management solution to handle","keyboard navigation.",`
|
|
259
259
|
|
|
260
|
-
`,"See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}function Je(){return yh(E.querySelectorAll("[data-tippy-root]"))}function Ft(H){x.clearDelayTimeouts(),H&&V("onTrigger",[x,H]),ee();var ue=L(!0),G=j(),pe=G[0],ge=G[1];Di.isTouch&&pe==="hold"&&ge&&(ue=ge),ue?r=setTimeout(function(){x.show()},ue):x.show()}function
|
|
260
|
+
`,"See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}function Je(){return yh(E.querySelectorAll("[data-tippy-root]"))}function Ft(H){x.clearDelayTimeouts(),H&&V("onTrigger",[x,H]),ee();var ue=L(!0),G=j(),pe=G[0],ge=G[1];Di.isTouch&&pe==="hold"&&ge&&(ue=ge),ue?r=setTimeout(function(){x.show()},ue):x.show()}function Zt(H){if(x.clearDelayTimeouts(),V("onUntrigger",[x,H]),!x.state.isVisible){oe();return}if(!(x.props.trigger.indexOf("mouseenter")>=0&&x.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(H.type)>=0&&a)){var ue=L(!1);ue?i=setTimeout(function(){x.state.isVisible&&x.hide()},ue):o=requestAnimationFrame(function(){x.hide()})}}function wt(){x.state.isEnabled=!0}function Cn(){x.hide(),x.state.isEnabled=!1}function gn(){clearTimeout(r),clearTimeout(i),cancelAnimationFrame(o)}function Dn(H){if(process.env.NODE_ENV!=="production"&&yo(x.state.isDestroyed,gl("setProps")),!x.state.isDestroyed){V("onBeforeUpdate",[x,H]),I();var ue=x.props,G=dN(e,Object.assign({},ue,nN(H),{ignoreAttributes:!0}));x.props=G,Z(),ue.interactiveDebounce!==G.interactiveDebounce&&(X(),m=eN(te,G.interactiveDebounce)),ue.triggerTarget&&!G.triggerTarget?ml(ue.triggerTarget).forEach(function(pe){pe.removeAttribute("aria-expanded")}):G.triggerTarget&&e.removeAttribute("aria-expanded"),B(),$(),C&&C(ue,G),x.popperInstance&&(ut(),Je().forEach(function(pe){requestAnimationFrame(pe._tippy.popperInstance.forceUpdate)})),V("onAfterUpdate",[x,H])}}function nr(H){x.setProps({content:H})}function on(){process.env.NODE_ENV!=="production"&&yo(x.state.isDestroyed,gl("show"));var H=x.state.isVisible,ue=x.state.isDestroyed,G=!x.state.isEnabled,pe=Di.isTouch&&!x.props.touch,ge=dx(x.props.duration,0,br.duration);if(!(H||ue||G||pe)&&!N().hasAttribute("disabled")&&(V("onShow",[x],!1),x.props.onShow(x)!==!1)){if(x.state.isVisible=!0,P()&&(E.style.visibility="visible"),$(),ee(),x.state.isMounted||(E.style.transition="none"),P()){var at=R(),_t=at.box,Hr=at.content;px([_t,Hr],0)}f=function(){var Yr;if(!(!x.state.isVisible||c)){if(c=!0,E.offsetHeight,E.style.transition=x.props.moveTransition,P()&&x.props.animation){var cs=R(),ko=cs.box,ji=cs.content;px([ko,ji],ge),rN([ko,ji],"visible")}z(),B(),tN(yx,x),(Yr=x.popperInstance)==null||Yr.forceUpdate(),V("onMount",[x]),x.props.animation&&P()&&fe(ge,function(){x.state.isShown=!0,V("onShown",[x])})}},mt()}}function rr(){process.env.NODE_ENV!=="production"&&yo(x.state.isDestroyed,gl("hide"));var H=!x.state.isVisible,ue=x.state.isDestroyed,G=!x.state.isEnabled,pe=dx(x.props.duration,1,br.duration);if(!(H||ue||G)&&(V("onHide",[x],!1),x.props.onHide(x)!==!1)){if(x.state.isVisible=!1,x.state.isShown=!1,c=!1,a=!1,P()&&(E.style.visibility="hidden"),X(),oe(),$(!0),P()){var ge=R(),at=ge.box,_t=ge.content;x.props.animation&&(px([at,_t],pe),rN([at,_t],"hidden"))}z(),B(),x.props.animation?P()&&se(pe,x.unmount):x.unmount()}}function be(H){process.env.NODE_ENV!=="production"&&yo(x.state.isDestroyed,gl("hideWithInteractivity")),M().addEventListener("mousemove",m),tN(bh,m),m(H)}function An(){process.env.NODE_ENV!=="production"&&yo(x.state.isDestroyed,gl("unmount")),x.state.isVisible&&x.hide(),x.state.isMounted&&(Et(),Je().forEach(function(H){H._tippy.unmount()}),E.parentNode&&E.parentNode.removeChild(E),yx=yx.filter(function(H){return H!==x}),x.state.isMounted=!1,V("onHidden",[x]))}function an(){process.env.NODE_ENV!=="production"&&yo(x.state.isDestroyed,gl("destroy")),!x.state.isDestroyed&&(x.clearDelayTimeouts(),x.unmount(),I(),delete e._tippy,x.state.isDestroyed=!0,V("onDestroy",[x]))}}function vu(e,t){t===void 0&&(t={});var n=br.plugins.concat(t.plugins||[]);process.env.NODE_ENV!=="production"&&(hoe(e),fN(t,n)),coe();var r=Object.assign({},t,{plugins:n}),i=ioe(e);if(process.env.NODE_ENV!=="production"){var o=mu(r.content),a=i.length>1;yo(o&&a,["tippy() was passed an Element as the `content` prop, but more than","one tippy instance was created by this invocation. This means the","content element will only be appended to the last tippy instance.",`
|
|
261
261
|
|
|
262
262
|
`,"Instead, pass the .innerHTML of the element, or use a function that","returns a cloned version of the element instead.",`
|
|
263
263
|
|
|
264
264
|
`,`1) content: element.innerHTML
|
|
265
|
-
`,"2) content: () => element.cloneNode(true)"].join(" "))}var s=i.reduce(function(l,c){var u=c&&woe(c,r);return u&&l.push(u),l},[]);return mu(e)?s[0]:s}vu.defaultProps=br,vu.setDefaultProps=voe,vu.currentInput=Di,Object.assign({},qT,{effect:function(t){var n=t.state,r={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(n.elements.popper.style,r.popper),n.styles=r,n.elements.arrow&&Object.assign(n.elements.arrow.style,r.arrow)}}),vu.setDefaultProps({render:mN});function gN(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var vN=typeof window<"u"&&typeof document<"u";function bx(e,t){e&&(typeof e=="function"&&e(t),{}.hasOwnProperty.call(e,"current")&&(e.current=t))}function yN(){return vN&&document.createElement("div")}function _oe(e){var t={"data-placement":e.placement};return e.referenceHidden&&(t["data-reference-hidden"]=""),e.escaped&&(t["data-escaped"]=""),t}function bN(e,t){if(e===t)return!0;if(typeof e=="object"&&e!=null&&typeof t=="object"&&t!=null){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(t.hasOwnProperty(n)){if(!bN(e[n],t[n]))return!1}else return!1;return!0}else return!1}function Soe(e){var t=[];return e.forEach(function(n){t.find(function(r){return bN(n,r)})||t.push(n)}),t}function Ooe(e,t){var n,r;return Object.assign({},t,{popperOptions:Object.assign({},e.popperOptions,t.popperOptions,{modifiers:Soe([].concat(((n=e.popperOptions)==null?void 0:n.modifiers)||[],((r=t.popperOptions)==null?void 0:r.modifiers)||[]))})})}var xx=vN?k.useLayoutEffect:k.useEffect;function Eoe(e){var t=k.useRef();return t.current||(t.current=typeof e=="function"?e():e),t.current}function xN(e,t,n){n.split(/\s+/).forEach(function(r){r&&e.classList[t](r)})}var Poe={name:"className",defaultValue:"",fn:function(t){var n=t.popper.firstElementChild,r=function(){var s;return!!((s=t.props.render)!=null&&s.$$tippy)};function i(){if(t.props.className&&!r()){process.env.NODE_ENV!=="production"&&console.warn(["@tippyjs/react: Cannot use `className` prop in conjunction with","`render` prop. Place the className on the element you are","rendering."].join(" "));return}xN(n,"add",t.props.className)}function o(){r()&&xN(n,"remove",t.props.className)}return{onCreate:i,onBeforeUpdate:o,onAfterUpdate:i}}};function koe(e){function t(n){var r=n.children,i=n.content,o=n.visible,a=n.singleton,s=n.render,l=n.reference,c=n.disabled,u=c===void 0?!1:c,d=n.ignoreAttributes,f=d===void 0?!0:d;n.__source,n.__self;var p=gN(n,["children","content","visible","singleton","render","reference","disabled","ignoreAttributes","__source","__self"]),m=o!==void 0,h=a!==void 0,g=k.useState(!1),b=g[0],S=g[1],w=k.useState({}),x=w[0],_=w[1],E=k.useState(),C=E[0],D=E[1],T=Eoe(function(){return{container:yN(),renders:1}}),j=Object.assign({ignoreAttributes:f},p,{content:T.container});m&&(process.env.NODE_ENV!=="production"&&["trigger","hideOnClick","showOnCreate"].forEach(function(M){j[M]!==void 0&&console.warn(["@tippyjs/react: Cannot specify `"+M+"` prop in","controlled mode (`visible` prop)"].join(" "))}),j.trigger="manual",j.hideOnClick=!1),h&&(u=!0);var A=j,P=j.plugins||[];s&&(A=Object.assign({},j,{plugins:h&&a.data!=null?[].concat(P,[{fn:function(){return{onTrigger:function(L,$){var V=a.data.children.find(function(z){var B=z.instance;return B.reference===$.currentTarget});L.state.$$activeSingletonInstance=V.instance,D(V.content)}}}}]):P,render:function(){return{popper:T.container}}}));var N=[l].concat(r?[r.type]:[]);return xx(function(){var M=l;l&&l.hasOwnProperty("current")&&(M=l.current);var R=e(M||T.ref||yN(),Object.assign({},A,{plugins:[Poe].concat(j.plugins||[])}));return T.instance=R,u&&R.disable(),o&&R.show(),h&&a.hook({instance:R,content:i,props:A,setSingletonContent:D}),S(!0),function(){R.destroy(),a?.cleanup(R)}},N),xx(function(){var M;if(T.renders===1){T.renders++;return}var R=T.instance;R.setProps(Ooe(R.props,A)),(M=R.popperInstance)==null||M.forceUpdate(),u?R.disable():R.enable(),m&&(o?R.show():R.hide()),h&&a.hook({instance:R,content:i,props:A,setSingletonContent:D})}),xx(function(){var M;if(s){var R=T.instance;R.setProps({popperOptions:Object.assign({},R.props.popperOptions,{modifiers:[].concat((((M=R.props.popperOptions)==null?void 0:M.modifiers)||[]).filter(function(L){var $=L.name;return $!=="$$tippyReact"}),[{name:"$$tippyReact",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function($){var V,z=$.state,B=(V=z.modifiersData)==null?void 0:V.hide;(x.placement!==z.placement||x.referenceHidden!==B?.isReferenceHidden||x.escaped!==B?.hasPopperEscaped)&&_({placement:z.placement,referenceHidden:B?.isReferenceHidden,escaped:B?.hasPopperEscaped}),z.attributes.popper={}}}])})})}},[x.placement,x.referenceHidden,x.escaped].concat(N)),k.createElement(k.Fragment,null,r?k.cloneElement(r,{ref:function(R){T.ref=R,bx(r.ref,R)}}):null,b&&Ii.createPortal(s?s(_oe(x),C,T.instance):i,T.container))}return t}var Coe=(function(e,t){return k.forwardRef(function(r,i){var o=r.children,a=gN(r,["children"]);return k.createElement(e,Object.assign({},t,a),o?k.cloneElement(o,{ref:function(l){bx(i,l),bx(o.ref,l)}}):null)})}),wN=Coe(koe(vu));function Doe(e){const t=e>=12?"PM":"AM";let n=e%12;return n===0&&(n=12),`${n} ${t}`}function Aoe(e=[]){return Array.from({length:24},(t,n)=>{const r=e.find(i=>i.hour===n)||{};return{hour:n,time:Doe(n),walkins:r.walkins??0,checkins:r.preApproved??0,staffAttendance:r.staffAttendance??0}})}const vl={walkins:"#1FA05B",preApproved:"#E7A015",staffAttendance:"#329DFF"};function Toe({type:e,data:t,children:n}){if(!e||!t)return n;const r={activeWalkins:[["Currently Inside",t.visitor_in],["Total Visited Today",t.total_pass]],preApprovedCheckins:[["Currently Inside",t.currently_inside],["Total Visited Today",t.expected_pass_scanned],["No show",t.expected_pass_not_scanned],["Total Scheduled",t.total_expected_pass]],staffAttendance:[["Currently Inside",t.total_in_now],["Absent Today",t.absent_staff],["Total Visited Today",t.total_in_today],["Total Staff",t.total_staff]]},i={activeWalkins:"Active Walk-ins",preApprovedCheckins:"Pre-approved Check-ins",staffAttendance:"Staff Attendance"},o={activeWalkins:"text-[#1FA05B]",preApprovedCheckins:"text-[#E7A015]",staffAttendance:"text-[#329DFF]"},a=v.jsx(Sa,{title:i[e],period:"Today",icon:v.jsx(ug,{className:`${o[e]} !text-[24px]`}),className:"!gap-0 min-w-[353px] bg-white shadow-xl rounded-lg border border-gray-200",children:v.jsx("div",{className:"flex flex-col gap-[8px] mt-[12px] pt-[12px] border-t border-dashed border-[#EBEBEB]",children:r[e].map(([s,l])=>v.jsxs("div",{className:"flex justify-between text-[14px] text-[#64748B]",children:[v.jsx("div",{children:s}),v.jsx("div",{className:"font-semibold text-gray-800",children:l??0})]},s))})});return v.jsx(wN,{content:a,placement:"bottom-start",interactive:!0,delay:[100,0],offset:[0,8],appendTo:document.body,theme:"light-border",maxWidth:"none",children:n})}function Moe({isStatic:e,data:t}){const n=t?.summary?.activeWalkins||{},r=t?.summary?.preApprovedCheckins||{},i=t?.summary?.staffAttendance||{},o=k.useMemo(()=>Aoe(t?.chart||[]),[t]),{yAxisTicks:a,yAxisMax:s}=k.useMemo(()=>{const l=Math.max(...o.flatMap(u=>[u.walkins,u.checkins,u.staffAttendance])),c=l>0?l:5;return{yAxisTicks:[0,Math.ceil(c/2),c],yAxisMax:c}},[o]);return v.jsx(Sa,{title:"Gate Updates",period:"Today",icon:v.jsx(ug,{className:"!text-[24px] text-[#37CC6D]"}),className:`${e?"max-h-[303px]":""} h-[251px] mb-4 break-inside-avoid`,actionButtons:v.jsx(hl,{widgetId:t?.widget_id,options:t?.communities}),children:v.jsxs("div",{children:[v.jsx("div",{className:"grid grid-cols-3 gap-[24px] mt-[16px] mb-[16px]",children:[{key:"activeWalkins",data:n,color:vl.walkins,label:"Active Walk-ins"},{key:"staffAttendance",data:i,color:vl.staffAttendance,label:"Staff Checked-in"},{key:"preApprovedCheckins",data:r,color:vl.preApproved,label:"Pre-approved"}].map(l=>v.jsx(Toe,{type:l.key,data:l.data,children:v.jsxs("div",{className:"flex flex-col gap-[8px] cursor-pointer",children:[v.jsx("div",{className:"text-[10px] text-[#64748B] whitespace-nowrap",children:l.label}),v.jsxs("div",{className:"text-[28px] font-medium flex items-center",style:{color:l.color},children:[l.key==="activeWalkins"?l.data?.visitor_in??0:l.key==="preApprovedCheckins"?l.data?.currently_inside??0:l.data?.total_in_now??0,v.jsxs("div",{className:"text-[20px] text-[#64748B] ml-1",children:["/",l.key==="activeWalkins"?l.data?.total_pass??0:l.key==="preApprovedCheckins"?l.data?.total_expected_pass??0:l.data?.total_staff??0]})]})]})},l.key))}),v.jsx("div",{className:"w-full h-[105px]",children:v.jsx(It,{width:"100%",height:"100%",children:v.jsxs(R0,{data:o,margin:{top:5,right:0,left:-40,bottom:0},children:[v.jsx(Rr,{strokeDasharray:"3 3",stroke:"#EBEBEB"}),v.jsx(vr,{dataKey:"time",tickFormatter:(l,c)=>c%4===0?l:"",tick:{fontSize:10,fill:"#121212",fontWeight:400},axisLine:!1,tickLine:!1}),v.jsx(Gn,{tick:{fontSize:10,fill:"#64748B",fontWeight:400},ticks:a,domain:[0,s],allowDecimals:!1,axisLine:!1,tickLine:!1}),v.jsx(nn,{content:v.jsx(ac,{})}),v.jsx(Qo,{type:"monotone",dataKey:"walkins",stroke:vl.walkins,strokeWidth:2,dot:!1,name:"Active Walk-ins",isAnimationActive:!1}),v.jsx(Qo,{type:"monotone",dataKey:"checkins",stroke:vl.preApproved,strokeWidth:2,strokeDasharray:"5 5",dot:!1,name:"Pre-approved",isAnimationActive:!1}),v.jsx(Qo,{type:"monotone",dataKey:"staffAttendance",stroke:vl.staffAttendance,strokeWidth:2,dot:!1,name:"Staff Attendance",isAnimationActive:!1})]})})})]})})}function Noe({isStatic:e,data:t}){const n=["#1FA05B","#E7A015","#FA7E28","#EF4444","#CBD5E1"],r=[{name:"L1 Level",value:Number(t?.total_L1||0),color:n[0]},{name:"L2 Level",value:Number(t?.total_L2||0),color:n[1]},{name:"L3 Level",value:Number(t?.total_L3||0),color:n[2]},{name:"No Level",value:Number(t?.total_NoLevel||0),color:n[3]}];r.reduce((o,a)=>o+a.value,0);const i=r;return v.jsx(Sa,{title:"Helpdesk",period:"As of Today",icon:v.jsx(u3,{className:"!text-[24px] text-[#FA7E28]"}),className:`${e&&"max-h-[186px]"} h-[186px] mb-4 break-inside-avoid gap-[20px]`,actionButtons:v.jsx(hl,{widgetId:t?.widget_id,options:t?.communities}),children:v.jsxs("div",{className:"flex gap-[12px] h-fit",children:[v.jsxs("div",{className:"w-[50%] flex flex-col gap-[28px]",children:[v.jsxs("div",{className:"flex flex-col gap-[8px]",children:[v.jsx("div",{className:"!m-0 !text-[12px] !leading-[16px] !text-[#64748B]",children:"Un-resolved Complaints"}),v.jsx("div",{className:"!m-0 !text-[28px] !leading-[32px] !font-medium text-[#FA7E28]",children:t?.total_open_complaints??0})]}),v.jsxs("div",{className:"!m-0 !text-[10px] !leading-[14px] !text-[#64748B] flex items-center gap-[4px]",children:[v.jsx(fg,{value:t?.percent_change}),v.jsx("div",{className:"whitespace-nowrap",children:"Compared to yesterday"})]})]}),v.jsx("div",{className:"w-[50%] h-[110px] flex justify-end",children:v.jsx(It,{width:"75%",height:"100%",children:v.jsxs(ho,{children:[v.jsx(Oi,{data:i,innerRadius:36,outerRadius:52,paddingAngle:2,dataKey:"value",children:i.map((o,a)=>v.jsx(Vt,{fill:n[a]||"#CBD5E1"},o.name))}),v.jsx(nn,{content:v.jsx(ac,{})})]})})})]})})}/*!
|
|
265
|
+
`,"2) content: () => element.cloneNode(true)"].join(" "))}var s=i.reduce(function(l,c){var u=c&&woe(c,r);return u&&l.push(u),l},[]);return mu(e)?s[0]:s}vu.defaultProps=br,vu.setDefaultProps=voe,vu.currentInput=Di,Object.assign({},qT,{effect:function(t){var n=t.state,r={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(n.elements.popper.style,r.popper),n.styles=r,n.elements.arrow&&Object.assign(n.elements.arrow.style,r.arrow)}}),vu.setDefaultProps({render:mN});function gN(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var vN=typeof window<"u"&&typeof document<"u";function bx(e,t){e&&(typeof e=="function"&&e(t),{}.hasOwnProperty.call(e,"current")&&(e.current=t))}function yN(){return vN&&document.createElement("div")}function _oe(e){var t={"data-placement":e.placement};return e.referenceHidden&&(t["data-reference-hidden"]=""),e.escaped&&(t["data-escaped"]=""),t}function bN(e,t){if(e===t)return!0;if(typeof e=="object"&&e!=null&&typeof t=="object"&&t!=null){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(t.hasOwnProperty(n)){if(!bN(e[n],t[n]))return!1}else return!1;return!0}else return!1}function Soe(e){var t=[];return e.forEach(function(n){t.find(function(r){return bN(n,r)})||t.push(n)}),t}function Ooe(e,t){var n,r;return Object.assign({},t,{popperOptions:Object.assign({},e.popperOptions,t.popperOptions,{modifiers:Soe([].concat(((n=e.popperOptions)==null?void 0:n.modifiers)||[],((r=t.popperOptions)==null?void 0:r.modifiers)||[]))})})}var xx=vN?k.useLayoutEffect:k.useEffect;function Eoe(e){var t=k.useRef();return t.current||(t.current=typeof e=="function"?e():e),t.current}function xN(e,t,n){n.split(/\s+/).forEach(function(r){r&&e.classList[t](r)})}var Poe={name:"className",defaultValue:"",fn:function(t){var n=t.popper.firstElementChild,r=function(){var s;return!!((s=t.props.render)!=null&&s.$$tippy)};function i(){if(t.props.className&&!r()){process.env.NODE_ENV!=="production"&&console.warn(["@tippyjs/react: Cannot use `className` prop in conjunction with","`render` prop. Place the className on the element you are","rendering."].join(" "));return}xN(n,"add",t.props.className)}function o(){r()&&xN(n,"remove",t.props.className)}return{onCreate:i,onBeforeUpdate:o,onAfterUpdate:i}}};function koe(e){function t(n){var r=n.children,i=n.content,o=n.visible,a=n.singleton,s=n.render,l=n.reference,c=n.disabled,u=c===void 0?!1:c,d=n.ignoreAttributes,f=d===void 0?!0:d;n.__source,n.__self;var p=gN(n,["children","content","visible","singleton","render","reference","disabled","ignoreAttributes","__source","__self"]),m=o!==void 0,h=a!==void 0,g=k.useState(!1),b=g[0],S=g[1],w=k.useState({}),x=w[0],_=w[1],E=k.useState(),C=E[0],D=E[1],T=Eoe(function(){return{container:yN(),renders:1}}),j=Object.assign({ignoreAttributes:f},p,{content:T.container});m&&(process.env.NODE_ENV!=="production"&&["trigger","hideOnClick","showOnCreate"].forEach(function(M){j[M]!==void 0&&console.warn(["@tippyjs/react: Cannot specify `"+M+"` prop in","controlled mode (`visible` prop)"].join(" "))}),j.trigger="manual",j.hideOnClick=!1),h&&(u=!0);var A=j,P=j.plugins||[];s&&(A=Object.assign({},j,{plugins:h&&a.data!=null?[].concat(P,[{fn:function(){return{onTrigger:function(L,$){var V=a.data.children.find(function(z){var B=z.instance;return B.reference===$.currentTarget});L.state.$$activeSingletonInstance=V.instance,D(V.content)}}}}]):P,render:function(){return{popper:T.container}}}));var N=[l].concat(r?[r.type]:[]);return xx(function(){var M=l;l&&l.hasOwnProperty("current")&&(M=l.current);var R=e(M||T.ref||yN(),Object.assign({},A,{plugins:[Poe].concat(j.plugins||[])}));return T.instance=R,u&&R.disable(),o&&R.show(),h&&a.hook({instance:R,content:i,props:A,setSingletonContent:D}),S(!0),function(){R.destroy(),a?.cleanup(R)}},N),xx(function(){var M;if(T.renders===1){T.renders++;return}var R=T.instance;R.setProps(Ooe(R.props,A)),(M=R.popperInstance)==null||M.forceUpdate(),u?R.disable():R.enable(),m&&(o?R.show():R.hide()),h&&a.hook({instance:R,content:i,props:A,setSingletonContent:D})}),xx(function(){var M;if(s){var R=T.instance;R.setProps({popperOptions:Object.assign({},R.props.popperOptions,{modifiers:[].concat((((M=R.props.popperOptions)==null?void 0:M.modifiers)||[]).filter(function(L){var $=L.name;return $!=="$$tippyReact"}),[{name:"$$tippyReact",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function($){var V,z=$.state,B=(V=z.modifiersData)==null?void 0:V.hide;(x.placement!==z.placement||x.referenceHidden!==B?.isReferenceHidden||x.escaped!==B?.hasPopperEscaped)&&_({placement:z.placement,referenceHidden:B?.isReferenceHidden,escaped:B?.hasPopperEscaped}),z.attributes.popper={}}}])})})}},[x.placement,x.referenceHidden,x.escaped].concat(N)),k.createElement(k.Fragment,null,r?k.cloneElement(r,{ref:function(R){T.ref=R,bx(r.ref,R)}}):null,b&&Ii.createPortal(s?s(_oe(x),C,T.instance):i,T.container))}return t}var Coe=(function(e,t){return k.forwardRef(function(r,i){var o=r.children,a=gN(r,["children"]);return k.createElement(e,Object.assign({},t,a),o?k.cloneElement(o,{ref:function(l){bx(i,l),bx(o.ref,l)}}):null)})}),wN=Coe(koe(vu));function Doe(e){const t=e>=12?"PM":"AM";let n=e%12;return n===0&&(n=12),`${n} ${t}`}function Aoe(e=[]){return Array.from({length:24},(t,n)=>{const r=e.find(i=>i.hour===n)||{};return{hour:n,time:Doe(n),walkins:r.walkins??0,checkins:r.preApproved??0,staffAttendance:r.staffAttendance??0}})}const vl={walkins:"#1FA05B",preApproved:"#E7A015",staffAttendance:"#329DFF"};function Toe({type:e,data:t,children:n}){if(!e||!t)return n;const r={activeWalkins:[["Currently Inside",t.visitor_in],["Total Visited Today",t.total_pass]],preApprovedCheckins:[["Currently Inside",t.currently_inside],["Total Visited Today",t.expected_pass_scanned],["No show",t.expected_pass_not_scanned],["Total Scheduled",t.total_expected_pass]],staffAttendance:[["Currently Inside",t.total_in_now],["Absent Today",t.absent_staff],["Total Visited Today",t.total_in_today],["Total Staff",t.total_staff]]},i={activeWalkins:"Active Walk-ins",preApprovedCheckins:"Pre-approved Check-ins",staffAttendance:"Staff Attendance"},o={activeWalkins:"text-[#1FA05B]",preApprovedCheckins:"text-[#E7A015]",staffAttendance:"text-[#329DFF]"},a=v.jsx(Sa,{title:i[e],period:"Today",icon:v.jsx(ug,{className:`${o[e]} !text-[24px]`}),className:"!gap-0 min-w-[353px] bg-white shadow-xl rounded-lg border border-gray-200",children:v.jsx("div",{className:"flex flex-col gap-[8px] mt-[12px] pt-[12px] border-t border-dashed border-[#EBEBEB]",children:r[e].map(([s,l])=>v.jsxs("div",{className:"flex justify-between text-[14px] text-[#64748B]",children:[v.jsx("div",{children:s}),v.jsx("div",{className:"font-semibold text-gray-800",children:l??0})]},s))})});return v.jsx(wN,{content:a,placement:"bottom-start",interactive:!0,delay:[100,0],offset:[0,8],appendTo:document.body,theme:"light-border",maxWidth:"none",children:n})}function Moe({isStatic:e,data:t}){const n=t?.summary?.activeWalkins||{},r=t?.summary?.preApprovedCheckins||{},i=t?.summary?.staffAttendance||{},o=k.useMemo(()=>Aoe(t?.chart||[]),[t]),{yAxisTicks:a,yAxisMax:s}=k.useMemo(()=>{const l=Math.max(...o.flatMap(u=>[u.walkins,u.checkins,u.staffAttendance])),c=l>0?l:5;return{yAxisTicks:[0,Math.ceil(c/2),c],yAxisMax:c}},[o]);return v.jsx(Sa,{title:"Gate Updates",period:"Today",icon:v.jsx(ug,{className:"!text-[24px] text-[#37CC6D]"}),className:`${e?"max-h-[303px]":""} h-[251px] mb-4 break-inside-avoid`,actionButtons:v.jsx(hl,{widgetId:t?.widget_id,options:t?.communities}),children:v.jsxs("div",{children:[v.jsx("div",{className:"grid grid-cols-3 gap-[24px] mt-[16px] mb-[16px]",children:[{key:"activeWalkins",data:n,color:vl.walkins,label:"Active Walk-ins"},{key:"staffAttendance",data:i,color:vl.staffAttendance,label:"Staff Checked-in"},{key:"preApprovedCheckins",data:r,color:vl.preApproved,label:"Pre-approved"}].map(l=>v.jsx(Toe,{type:l.key,data:l.data,children:v.jsxs("div",{className:"flex flex-col gap-[8px] cursor-pointer",children:[v.jsx("div",{className:"text-[10px] text-[#64748B] whitespace-nowrap",children:l.label}),v.jsxs("div",{className:"text-[28px] font-medium flex items-center",style:{color:l.color},children:[l.key==="activeWalkins"?l.data?.visitor_in??0:l.key==="preApprovedCheckins"?l.data?.currently_inside??0:l.data?.total_in_now??0,v.jsxs("div",{className:"text-[20px] text-[#64748B] ml-1",children:["/",l.key==="activeWalkins"?l.data?.total_pass??0:l.key==="preApprovedCheckins"?l.data?.total_expected_pass??0:l.data?.total_staff??0]})]})]})},l.key))}),v.jsx("div",{className:"w-full h-[105px]",children:v.jsx(It,{width:"100%",height:"100%",children:v.jsxs(R0,{data:o,margin:{top:5,right:0,left:-40,bottom:0},children:[v.jsx(Rr,{strokeDasharray:"3 3",stroke:"#EBEBEB"}),v.jsx(vr,{dataKey:"time",tickFormatter:(l,c)=>c%4===0?l:"",tick:{fontSize:10,fill:"#121212",fontWeight:400},axisLine:!1,tickLine:!1}),v.jsx(Gn,{tick:{fontSize:10,fill:"#64748B",fontWeight:400},ticks:a,domain:[0,s],allowDecimals:!1,axisLine:!1,tickLine:!1}),v.jsx(Vt,{content:v.jsx(ac,{})}),v.jsx(Qo,{type:"monotone",dataKey:"walkins",stroke:vl.walkins,strokeWidth:2,dot:!1,name:"Active Walk-ins",isAnimationActive:!1}),v.jsx(Qo,{type:"monotone",dataKey:"checkins",stroke:vl.preApproved,strokeWidth:2,strokeDasharray:"5 5",dot:!1,name:"Pre-approved",isAnimationActive:!1}),v.jsx(Qo,{type:"monotone",dataKey:"staffAttendance",stroke:vl.staffAttendance,strokeWidth:2,dot:!1,name:"Staff Attendance",isAnimationActive:!1})]})})})]})})}function Noe({isStatic:e,data:t}){const n=["#1FA05B","#E7A015","#FA7E28","#EF4444","#CBD5E1"],r=[{name:"L1 Level",value:Number(t?.total_L1||0),color:n[0]},{name:"L2 Level",value:Number(t?.total_L2||0),color:n[1]},{name:"L3 Level",value:Number(t?.total_L3||0),color:n[2]},{name:"No Level",value:Number(t?.total_NoLevel||0),color:n[3]}];r.reduce((o,a)=>o+a.value,0);const i=r;return v.jsx(Sa,{title:"Helpdesk",period:"As of Today",icon:v.jsx(u3,{className:"!text-[24px] text-[#FA7E28]"}),className:`${e&&"max-h-[186px]"} h-[186px] mb-4 break-inside-avoid gap-[20px]`,actionButtons:v.jsx(hl,{widgetId:t?.widget_id,options:t?.communities}),children:v.jsxs("div",{className:"flex gap-[12px] h-fit",children:[v.jsxs("div",{className:"w-[50%] flex flex-col gap-[28px]",children:[v.jsxs("div",{className:"flex flex-col gap-[8px]",children:[v.jsx("div",{className:"!m-0 !text-[12px] !leading-[16px] !text-[#64748B]",children:"Un-resolved Complaints"}),v.jsx("div",{className:"!m-0 !text-[28px] !leading-[32px] !font-medium text-[#FA7E28]",children:t?.total_open_complaints??0})]}),v.jsxs("div",{className:"!m-0 !text-[10px] !leading-[14px] !text-[#64748B] flex items-center gap-[4px]",children:[v.jsx(fg,{value:t?.percent_change}),v.jsx("div",{className:"whitespace-nowrap",children:"Compared to yesterday"})]})]}),v.jsx("div",{className:"w-[50%] h-[110px] flex justify-end",children:v.jsx(It,{width:"75%",height:"100%",children:v.jsxs(ho,{children:[v.jsx(Oi,{data:i,innerRadius:36,outerRadius:52,paddingAngle:2,dataKey:"value",children:i.map((o,a)=>v.jsx(Ht,{fill:n[a]||"#CBD5E1"},o.name))}),v.jsx(Vt,{content:v.jsx(ac,{})})]})})})]})})}/*!
|
|
266
266
|
* @kurkle/color v0.3.4
|
|
267
267
|
* https://github.com/kurkle/color#readme
|
|
268
268
|
* (c) 2024 Jukka Kurkela
|
|
@@ -272,14 +272,14 @@ Take a look at the reducer(s) handling this action type: ${p.type}.
|
|
|
272
272
|
* https://www.chartjs.org
|
|
273
273
|
* (c) 2025 Chart.js Contributors
|
|
274
274
|
* Released under the MIT License
|
|
275
|
-
*/function xo(){}const nae=(()=>{let e=0;return()=>e++})();function Ve(e){return e==null}function rn(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function Me(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function zr(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Ai(e,t){return zr(e)?e:t}function Oe(e,t){return typeof e>"u"?t:e}const rae=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,DN=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function ht(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function Ze(e,t,n,r){let i,o,a;if(rn(e))for(o=e.length,i=0;i<o;i++)t.call(n,e[i],i);else if(Me(e))for(a=Object.keys(e),o=a.length,i=0;i<o;i++)t.call(n,e[a[i]],a[i])}function Sh(e,t){let n,r,i,o;if(!e||!t||e.length!==t.length)return!1;for(n=0,r=e.length;n<r;++n)if(i=e[n],o=t[n],i.datasetIndex!==o.datasetIndex||i.index!==o.index)return!1;return!0}function Oh(e){if(rn(e))return e.map(Oh);if(Me(e)){const t=Object.create(null),n=Object.keys(e),r=n.length;let i=0;for(;i<r;++i)t[n[i]]=Oh(e[n[i]]);return t}return e}function AN(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function iae(e,t,n,r){if(!AN(e))return;const i=t[e],o=n[e];Me(i)&&Me(o)?wu(i,o,r):t[e]=Oh(o)}function wu(e,t,n){const r=rn(t)?t:[t],i=r.length;if(!Me(e))return e;n=n||{};const o=n.merger||iae;let a;for(let s=0;s<i;++s){if(a=r[s],!Me(a))continue;const l=Object.keys(a);for(let c=0,u=l.length;c<u;++c)o(l[c],e,a,n)}return e}function _u(e,t){return wu(e,t,{merger:oae})}function oae(e,t,n){if(!AN(e))return;const r=t[e],i=n[e];Me(r)&&Me(i)?_u(r,i):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=Oh(i))}const TN={"":e=>e,x:e=>e.x,y:e=>e.y};function aae(e){const t=e.split("."),n=[];let r="";for(const i of t)r+=i,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function sae(e){const t=aae(e);return n=>{for(const r of t){if(r==="")break;n=n&&n[r]}return n}}function Ja(e,t){return(TN[t]||(TN[t]=sae(t)))(e)}function Px(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Su=e=>typeof e<"u",na=e=>typeof e=="function",MN=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function lae(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const ot=Math.PI,At=2*ot,cae=At+ot,Eh=Number.POSITIVE_INFINITY,uae=ot/180,Xt=ot/2,es=ot/4,NN=ot*2/3,jN=Math.log10,Ti=Math.sign;function Ou(e,t,n){return Math.abs(e-t)<n}function IN(e){const t=Math.round(e);e=Ou(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(jN(e))),r=e/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function dae(e){const t=[],n=Math.sqrt(e);let r;for(r=1;r<n;r++)e%r===0&&(t.push(r),t.push(e/r));return n===(n|0)&&t.push(n),t.sort((i,o)=>i-o).pop(),t}function fae(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function Eu(e){return!fae(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function pae(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function hae(e,t,n){let r,i,o;for(r=0,i=e.length;r<i;r++)o=e[r][n],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function wo(e){return e*(ot/180)}function mae(e){return e*(180/ot)}function RN(e){if(!zr(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function LN(e,t){const n=t.x-e.x,r=t.y-e.y,i=Math.sqrt(n*n+r*r);let o=Math.atan2(r,n);return o<-.5*ot&&(o+=At),{angle:o,distance:i}}function kx(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function gae(e,t){return(e-t+cae)%At-ot}function Zr(e){return(e%At+At)%At}function Pu(e,t,n,r){const i=Zr(e),o=Zr(t),a=Zr(n),s=Zr(o-i),l=Zr(a-i),c=Zr(i-o),u=Zr(i-a);return i===o||i===a||r&&o===a||s>l&&c<u}function kn(e,t,n){return Math.max(t,Math.min(n,e))}function vae(e){return kn(e,-32768,32767)}function ra(e,t,n,r=1e-6){return e>=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function Cx(e,t,n){n=n||(a=>e[a]<t);let r=e.length-1,i=0,o;for(;r-i>1;)o=i+r>>1,n(o)?i=o:r=o;return{lo:i,hi:r}}const ts=(e,t,n,r)=>Cx(e,n,r?i=>{const o=e[i][t];return o<n||o===n&&e[i+1][t]===n}:i=>e[i][t]<n),yae=(e,t,n)=>Cx(e,n,r=>e[r][t]>=n);function bae(e,t,n){let r=0,i=e.length;for(;r<i&&e[r]<t;)r++;for(;i>r&&e[i-1]>n;)i--;return r>0||i<e.length?e.slice(r,i):e}const FN=["push","pop","shift","splice","unshift"];function xae(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),FN.forEach(n=>{const r="_onData"+Px(n),i=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...o){const a=i.apply(this,o);return e._chartjs.listeners.forEach(s=>{typeof s[r]=="function"&&s[r](...o)}),a}})})}function $N(e,t){const n=e._chartjs;if(!n)return;const r=n.listeners,i=r.indexOf(t);i!==-1&&r.splice(i,1),!(r.length>0)&&(FN.forEach(o=>{delete e[o]}),delete e._chartjs)}function BN(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const WN=(function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame})();function zN(e,t){let n=[],r=!1;return function(...i){n=i,r||(r=!0,WN.call(window,()=>{r=!1,e.apply(t,n)}))}}function wae(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}const VN=e=>e==="start"?"left":e==="end"?"right":"center",xr=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,_ae=(e,t,n,r)=>e===(r?"left":"right")?n:e==="center"?(t+n)/2:t;function Sae(e,t,n){const r=t.length;let i=0,o=r;if(e._sorted){const{iScale:a,vScale:s,_parsed:l}=e,c=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,u=a.axis,{min:d,max:f,minDefined:p,maxDefined:m}=a.getUserBounds();if(p){if(i=Math.min(ts(l,u,d).lo,n?r:ts(t,u,a.getPixelForValue(d)).lo),c){const h=l.slice(0,i+1).reverse().findIndex(g=>!Ve(g[s.axis]));i-=Math.max(0,h)}i=kn(i,0,r-1)}if(m){let h=Math.max(ts(l,a.axis,f,!0).hi+1,n?0:ts(t,u,a.getPixelForValue(f),!0).hi+1);if(c){const g=l.slice(h-1).findIndex(b=>!Ve(b[s.axis]));h+=Math.max(0,g)}o=kn(h,i,r)-i}else o=r-i}return{start:i,count:o}}function Oae(e){const{xScale:t,yScale:n,_scaleRanges:r}=e,i={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!r)return e._scaleRanges=i,!0;const o=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),o}const Ph=e=>e===0||e===1,HN=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*At/n)),YN=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*At/n)+1,ku={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*Xt)+1,easeOutSine:e=>Math.sin(e*Xt),easeInOutSine:e=>-.5*(Math.cos(ot*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>Ph(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>Ph(e)?e:HN(e,.075,.3),easeOutElastic:e=>Ph(e)?e:YN(e,.075,.3),easeInOutElastic(e){return Ph(e)?e:e<.5?.5*HN(e*2,.1125,.45):.5+.5*YN(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-ku.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?ku.easeInBounce(e*2)*.5:ku.easeOutBounce(e*2-1)*.5+.5};function Dx(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function UN(e){return Dx(e)?e:new xu(e)}function Ax(e){return Dx(e)?e:new xu(e).saturate(.5).darken(.1).hexString()}const Eae=["x","y","borderWidth","radius","tension"],Pae=["color","borderColor","backgroundColor"];function kae(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:Pae},numbers:{type:"number",properties:Eae}}),e.describe("animations",{_fallback:"animation"}),e.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=>t|0}}}})}function Cae(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const KN=new Map;function Dae(e,t){t=t||{};const n=e+JSON.stringify(t);let r=KN.get(n);return r||(r=new Intl.NumberFormat(e,t),KN.set(n,r)),r}function Tx(e,t,n){return Dae(t,n).format(e)}const Aae={values(e){return rn(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const r=this.chart.options.locale;let i,o=e;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(i="scientific"),o=Tae(e,n)}const a=jN(Math.abs(o)),s=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:i,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(l,this.options.ticks.format),Tx(e,r,l)}};function Tae(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var qN={formatters:Aae};function Mae(e){e.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,n)=>n.lineWidth,tickColor:(t,n)=>n.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:qN.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const ns=Object.create(null),Mx=Object.create(null);function Cu(e,t){if(!t)return e;const n=t.split(".");for(let r=0,i=n.length;r<i;++r){const o=n[r];e=e[o]||(e[o]=Object.create(null))}return e}function Nx(e,t,n){return typeof t=="string"?wu(Cu(e,t),n):wu(Cu(e,""),t)}class Nae{constructor(t,n){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=r=>r.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=(r,i)=>Ax(i.backgroundColor),this.hoverBorderColor=(r,i)=>Ax(i.borderColor),this.hoverColor=(r,i)=>Ax(i.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(n)}set(t,n){return Nx(this,t,n)}get(t){return Cu(this,t)}describe(t,n){return Nx(Mx,t,n)}override(t,n){return Nx(ns,t,n)}route(t,n,r,i){const o=Cu(this,t),a=Cu(this,r),s="_"+n;Object.defineProperties(o,{[s]:{value:o[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[s],c=a[i];return Me(l)?Object.assign({},c,l):Oe(l,c)},set(l){this[s]=l}}})}apply(t){t.forEach(n=>n(this))}}var Lt=new Nae({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[kae,Cae,Mae]);function jae(e){return!e||Ve(e.size)||Ve(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function GN(e,t,n,r,i){let o=t[i];return o||(o=t[i]=e.measureText(i).width,n.push(i)),o>r&&(r=o),r}function rs(e,t,n){const r=e.currentDevicePixelRatio,i=n!==0?Math.max(n/2,.5):0;return Math.round((t-i)*r)/r+i}function XN(e,t){!t&&!e||(t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function jx(e,t,n,r){QN(e,t,n,r,null)}function QN(e,t,n,r,i){let o,a,s,l,c,u,d,f;const p=t.pointStyle,m=t.rotation,h=t.radius;let g=(m||0)*uae;if(p&&typeof p=="object"&&(o=p.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){e.save(),e.translate(n,r),e.rotate(g),e.drawImage(p,-p.width/2,-p.height/2,p.width,p.height),e.restore();return}if(!(isNaN(h)||h<=0)){switch(e.beginPath(),p){default:i?e.ellipse(n,r,i/2,h,0,0,At):e.arc(n,r,h,0,At),e.closePath();break;case"triangle":u=i?i/2:h,e.moveTo(n+Math.sin(g)*u,r-Math.cos(g)*h),g+=NN,e.lineTo(n+Math.sin(g)*u,r-Math.cos(g)*h),g+=NN,e.lineTo(n+Math.sin(g)*u,r-Math.cos(g)*h),e.closePath();break;case"rectRounded":c=h*.516,l=h-c,a=Math.cos(g+es)*l,d=Math.cos(g+es)*(i?i/2-c:l),s=Math.sin(g+es)*l,f=Math.sin(g+es)*(i?i/2-c:l),e.arc(n-d,r-s,c,g-ot,g-Xt),e.arc(n+f,r-a,c,g-Xt,g),e.arc(n+d,r+s,c,g,g+Xt),e.arc(n-f,r+a,c,g+Xt,g+ot),e.closePath();break;case"rect":if(!m){l=Math.SQRT1_2*h,u=i?i/2:l,e.rect(n-u,r-l,2*u,2*l);break}g+=es;case"rectRot":d=Math.cos(g)*(i?i/2:h),a=Math.cos(g)*h,s=Math.sin(g)*h,f=Math.sin(g)*(i?i/2:h),e.moveTo(n-d,r-s),e.lineTo(n+f,r-a),e.lineTo(n+d,r+s),e.lineTo(n-f,r+a),e.closePath();break;case"crossRot":g+=es;case"cross":d=Math.cos(g)*(i?i/2:h),a=Math.cos(g)*h,s=Math.sin(g)*h,f=Math.sin(g)*(i?i/2:h),e.moveTo(n-d,r-s),e.lineTo(n+d,r+s),e.moveTo(n+f,r-a),e.lineTo(n-f,r+a);break;case"star":d=Math.cos(g)*(i?i/2:h),a=Math.cos(g)*h,s=Math.sin(g)*h,f=Math.sin(g)*(i?i/2:h),e.moveTo(n-d,r-s),e.lineTo(n+d,r+s),e.moveTo(n+f,r-a),e.lineTo(n-f,r+a),g+=es,d=Math.cos(g)*(i?i/2:h),a=Math.cos(g)*h,s=Math.sin(g)*h,f=Math.sin(g)*(i?i/2:h),e.moveTo(n-d,r-s),e.lineTo(n+d,r+s),e.moveTo(n+f,r-a),e.lineTo(n-f,r+a);break;case"line":a=i?i/2:Math.cos(g)*h,s=Math.sin(g)*h,e.moveTo(n-a,r-s),e.lineTo(n+a,r+s);break;case"dash":e.moveTo(n,r),e.lineTo(n+Math.cos(g)*(i?i/2:h),r+Math.sin(g)*h);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function Du(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function Ix(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function Rx(e){e.restore()}function Iae(e,t,n,r,i){if(!t)return e.lineTo(n.x,n.y);if(i==="middle"){const o=(t.x+n.x)/2;e.lineTo(o,t.y),e.lineTo(o,n.y)}else i==="after"!=!!r?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}function Rae(e,t,n,r){if(!t)return e.lineTo(n.x,n.y);e.bezierCurveTo(r?t.cp1x:t.cp2x,r?t.cp1y:t.cp2y,r?n.cp2x:n.cp1x,r?n.cp2y:n.cp1y,n.x,n.y)}function Lae(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),Ve(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}function Fae(e,t,n,r,i){if(i.strikethrough||i.underline){const o=e.measureText(r),a=t-o.actualBoundingBoxLeft,s=t+o.actualBoundingBoxRight,l=n-o.actualBoundingBoxAscent,c=n+o.actualBoundingBoxDescent,u=i.strikethrough?(l+c)/2:c;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=i.decorationWidth||2,e.moveTo(a,u),e.lineTo(s,u),e.stroke()}}function $ae(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function kh(e,t,n,r,i,o={}){const a=rn(t)?t:[t],s=o.strokeWidth>0&&o.strokeColor!=="";let l,c;for(e.save(),e.font=i.string,Lae(e,o),l=0;l<a.length;++l)c=a[l],o.backdrop&&$ae(e,o.backdrop),s&&(o.strokeColor&&(e.strokeStyle=o.strokeColor),Ve(o.strokeWidth)||(e.lineWidth=o.strokeWidth),e.strokeText(c,n,r,o.maxWidth)),e.fillText(c,n,r,o.maxWidth),Fae(e,n,r,c,o),r+=Number(i.lineHeight);e.restore()}function Ch(e,t){const{x:n,y:r,w:i,h:o,radius:a}=t;e.arc(n+a.topLeft,r+a.topLeft,a.topLeft,1.5*ot,ot,!0),e.lineTo(n,r+o-a.bottomLeft),e.arc(n+a.bottomLeft,r+o-a.bottomLeft,a.bottomLeft,ot,Xt,!0),e.lineTo(n+i-a.bottomRight,r+o),e.arc(n+i-a.bottomRight,r+o-a.bottomRight,a.bottomRight,Xt,0,!0),e.lineTo(n+i,r+a.topRight),e.arc(n+i-a.topRight,r+a.topRight,a.topRight,0,-Xt,!0),e.lineTo(n+a.topLeft,r)}const Bae=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Wae=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function zae(e,t){const n=(""+e).match(Bae);if(!n||n[1]==="normal")return t*1.2;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100;break}return t*e}const Vae=e=>+e||0;function Lx(e,t){const n={},r=Me(t),i=r?Object.keys(t):t,o=Me(e)?r?a=>Oe(e[a],e[t[a]]):a=>e[a]:()=>e;for(const a of i)n[a]=Vae(o(a));return n}function ZN(e){return Lx(e,{top:"y",right:"x",bottom:"y",left:"x"})}function bl(e){return Lx(e,["topLeft","topRight","bottomLeft","bottomRight"])}function Jr(e){const t=ZN(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function Jn(e,t){e=e||{},t=t||Lt.font;let n=Oe(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let r=Oe(e.style,t.style);r&&!(""+r).match(Wae)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:Oe(e.family,t.family),lineHeight:zae(Oe(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:Oe(e.weight,t.weight),string:""};return i.string=jae(i),i}function Dh(e,t,n,r){let i,o,a;for(i=0,o=e.length;i<o;++i)if(a=e[i],a!==void 0&&a!==void 0)return a}function Hae(e,t,n){const{min:r,max:i}=e,o=DN(t,(i-r)/2),a=(s,l)=>n&&s===0?0:s+l;return{min:a(r,-Math.abs(o)),max:a(i,o)}}function is(e,t){return Object.assign(Object.create(e),t)}function Fx(e,t=[""],n,r,i=()=>e[0]){const o=n||e;typeof r>"u"&&(r=rj("_fallback",e));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:o,_fallback:r,_getTarget:i,override:s=>Fx([s,...e],t,o,r)};return new Proxy(a,{deleteProperty(s,l){return delete s[l],delete s._keys,delete e[0][l],!0},get(s,l){return ej(s,l,()=>Zae(l,t,e,s))},getOwnPropertyDescriptor(s,l){return Reflect.getOwnPropertyDescriptor(s._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(s,l){return ij(s).includes(l)},ownKeys(s){return ij(s)},set(s,l,c){const u=s._storage||(s._storage=i());return s[l]=u[l]=c,delete s._keys,!0}})}function xl(e,t,n,r){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:JN(e,r),setContext:o=>xl(e,o,n,r),override:o=>xl(e.override(o),t,n,r)};return new Proxy(i,{deleteProperty(o,a){return delete o[a],delete e[a],!0},get(o,a,s){return ej(o,a,()=>Uae(o,a,s))},getOwnPropertyDescriptor(o,a){return o._descriptors.allKeys?Reflect.has(e,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,a)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(o,a){return Reflect.has(e,a)},ownKeys(){return Reflect.ownKeys(e)},set(o,a,s){return e[a]=s,delete o[a],!0}})}function JN(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:r=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:n,indexable:r,isScriptable:na(n)?n:()=>n,isIndexable:na(r)?r:()=>r}}const Yae=(e,t)=>e?e+Px(t):t,$x=(e,t)=>Me(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function ej(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];const r=n();return e[t]=r,r}function Uae(e,t,n){const{_proxy:r,_context:i,_subProxy:o,_descriptors:a}=e;let s=r[t];return na(s)&&a.isScriptable(t)&&(s=Kae(t,s,e,n)),rn(s)&&s.length&&(s=qae(t,s,e,a.isIndexable)),$x(t,s)&&(s=xl(s,i,o&&o[t],a)),s}function Kae(e,t,n,r){const{_proxy:i,_context:o,_subProxy:a,_stack:s}=n;if(s.has(e))throw new Error("Recursion detected: "+Array.from(s).join("->")+"->"+e);s.add(e);let l=t(o,a||r);return s.delete(e),$x(e,l)&&(l=Bx(i._scopes,i,e,l)),l}function qae(e,t,n,r){const{_proxy:i,_context:o,_subProxy:a,_descriptors:s}=n;if(typeof o.index<"u"&&r(e))return t[o.index%t.length];if(Me(t[0])){const l=t,c=i._scopes.filter(u=>u!==l);t=[];for(const u of l){const d=Bx(c,i,e,u);t.push(xl(d,o,a&&a[e],s))}}return t}function tj(e,t,n){return na(e)?e(t,n):e}const Gae=(e,t)=>e===!0?t:typeof e=="string"?Ja(t,e):void 0;function Xae(e,t,n,r,i){for(const o of t){const a=Gae(n,o);if(a){e.add(a);const s=tj(a._fallback,n,i);if(typeof s<"u"&&s!==n&&s!==r)return s}else if(a===!1&&typeof r<"u"&&n!==r)return null}return!1}function Bx(e,t,n,r){const i=t._rootScopes,o=tj(t._fallback,n,r),a=[...e,...i],s=new Set;s.add(r);let l=nj(s,a,n,o||n,r);return l===null||typeof o<"u"&&o!==n&&(l=nj(s,a,o,l,r),l===null)?!1:Fx(Array.from(s),[""],i,o,()=>Qae(t,n,r))}function nj(e,t,n,r,i){for(;n;)n=Xae(e,t,n,r,i);return n}function Qae(e,t,n){const r=e._getTarget();t in r||(r[t]={});const i=r[t];return rn(i)&&Me(n)?n:i||{}}function Zae(e,t,n,r){let i;for(const o of t)if(i=rj(Yae(o,e),n),typeof i<"u")return $x(e,i)?Bx(n,r,e,i):i}function rj(e,t){for(const n of t){if(!n)continue;const r=n[e];if(typeof r<"u")return r}}function ij(e){let t=e._keys;return t||(t=e._keys=Jae(e._scopes)),t}function Jae(e){const t=new Set;for(const n of e)for(const r of Object.keys(n).filter(i=>!i.startsWith("_")))t.add(r);return Array.from(t)}const ese=Number.EPSILON||1e-14,wl=(e,t)=>t<e.length&&!e[t].skip&&e[t],oj=e=>e==="x"?"y":"x";function tse(e,t,n,r){const i=e.skip?t:e,o=t,a=n.skip?t:n,s=kx(o,i),l=kx(a,o);let c=s/(s+l),u=l/(s+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const d=r*c,f=r*u;return{previous:{x:o.x-d*(a.x-i.x),y:o.y-d*(a.y-i.y)},next:{x:o.x+f*(a.x-i.x),y:o.y+f*(a.y-i.y)}}}function nse(e,t,n){const r=e.length;let i,o,a,s,l,c=wl(e,0);for(let u=0;u<r-1;++u)if(l=c,c=wl(e,u+1),!(!l||!c)){if(Ou(t[u],0,ese)){n[u]=n[u+1]=0;continue}i=n[u]/t[u],o=n[u+1]/t[u],s=Math.pow(i,2)+Math.pow(o,2),!(s<=9)&&(a=3/Math.sqrt(s),n[u]=i*a*t[u],n[u+1]=o*a*t[u])}}function rse(e,t,n="x"){const r=oj(n),i=e.length;let o,a,s,l=wl(e,0);for(let c=0;c<i;++c){if(a=s,s=l,l=wl(e,c+1),!s)continue;const u=s[n],d=s[r];a&&(o=(u-a[n])/3,s[`cp1${n}`]=u-o,s[`cp1${r}`]=d-o*t[c]),l&&(o=(l[n]-u)/3,s[`cp2${n}`]=u+o,s[`cp2${r}`]=d+o*t[c])}}function ise(e,t="x"){const n=oj(t),r=e.length,i=Array(r).fill(0),o=Array(r);let a,s,l,c=wl(e,0);for(a=0;a<r;++a)if(s=l,l=c,c=wl(e,a+1),!!l){if(c){const u=c[t]-l[t];i[a]=u!==0?(c[n]-l[n])/u:0}o[a]=s?c?Ti(i[a-1])!==Ti(i[a])?0:(i[a-1]+i[a])/2:i[a-1]:i[a]}nse(e,i,o),rse(e,o,t)}function Ah(e,t,n){return Math.max(Math.min(e,n),t)}function ose(e,t){let n,r,i,o,a,s=Du(e[0],t);for(n=0,r=e.length;n<r;++n)a=o,o=s,s=n<r-1&&Du(e[n+1],t),o&&(i=e[n],a&&(i.cp1x=Ah(i.cp1x,t.left,t.right),i.cp1y=Ah(i.cp1y,t.top,t.bottom)),s&&(i.cp2x=Ah(i.cp2x,t.left,t.right),i.cp2y=Ah(i.cp2y,t.top,t.bottom)))}function ase(e,t,n,r,i){let o,a,s,l;if(t.spanGaps&&(e=e.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")ise(e,i);else{let c=r?e[e.length-1]:e[0];for(o=0,a=e.length;o<a;++o)s=e[o],l=tse(c,s,e[Math.min(o+1,a-(r?0:1))%a],t.tension),s.cp1x=l.previous.x,s.cp1y=l.previous.y,s.cp2x=l.next.x,s.cp2y=l.next.y,c=s}t.capBezierPoints&&ose(e,n)}function Wx(){return typeof window<"u"&&typeof document<"u"}function zx(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function Th(e,t,n){let r;return typeof e=="string"?(r=parseInt(e,10),e.indexOf("%")!==-1&&(r=r/100*t.parentNode[n])):r=e,r}const Mh=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function sse(e,t){return Mh(e).getPropertyValue(t)}const lse=["top","right","bottom","left"];function os(e,t,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const o=lse[i];r[o]=parseFloat(e[t+"-"+o+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const cse=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function use(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:i,offsetY:o}=r;let a=!1,s,l;if(cse(i,o,e.target))s=i,l=o;else{const c=t.getBoundingClientRect();s=r.clientX-c.left,l=r.clientY-c.top,a=!0}return{x:s,y:l,box:a}}function as(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,i=Mh(n),o=i.boxSizing==="border-box",a=os(i,"padding"),s=os(i,"border","width"),{x:l,y:c,box:u}=use(e,n),d=a.left+(u&&s.left),f=a.top+(u&&s.top);let{width:p,height:m}=t;return o&&(p-=a.width+s.width,m-=a.height+s.height),{x:Math.round((l-d)/p*n.width/r),y:Math.round((c-f)/m*n.height/r)}}function dse(e,t,n){let r,i;if(t===void 0||n===void 0){const o=e&&zx(e);if(!o)t=e.clientWidth,n=e.clientHeight;else{const a=o.getBoundingClientRect(),s=Mh(o),l=os(s,"border","width"),c=os(s,"padding");t=a.width-c.width-l.width,n=a.height-c.height-l.height,r=Th(s.maxWidth,o,"clientWidth"),i=Th(s.maxHeight,o,"clientHeight")}}return{width:t,height:n,maxWidth:r||Eh,maxHeight:i||Eh}}const Nh=e=>Math.round(e*10)/10;function fse(e,t,n,r){const i=Mh(e),o=os(i,"margin"),a=Th(i.maxWidth,e,"clientWidth")||Eh,s=Th(i.maxHeight,e,"clientHeight")||Eh,l=dse(e,t,n);let{width:c,height:u}=l;if(i.boxSizing==="content-box"){const f=os(i,"border","width"),p=os(i,"padding");c-=p.width+f.width,u-=p.height+f.height}return c=Math.max(0,c-o.width),u=Math.max(0,r?c/r:u-o.height),c=Nh(Math.min(c,a,l.maxWidth)),u=Nh(Math.min(u,s,l.maxHeight)),c&&!u&&(u=Nh(c/2)),(t!==void 0||n!==void 0)&&r&&l.height&&u>l.height&&(u=l.height,c=Nh(Math.floor(u*r))),{width:c,height:u}}function aj(e,t,n){const r=t||1,i=Math.floor(e.height*r),o=Math.floor(e.width*r);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const a=e.canvas;return a.style&&(n||!a.style.height&&!a.style.width)&&(a.style.height=`${e.height}px`,a.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||a.height!==i||a.width!==o?(e.currentDevicePixelRatio=r,a.height=i,a.width=o,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}const pse=(function(){let e=!1;try{const t={get passive(){return e=!0,!1}};Wx()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e})();function sj(e,t){const n=sse(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function ss(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function hse(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:r==="middle"?n<.5?e.y:t.y:r==="after"?n<1?e.y:t.y:n>0?t.y:e.y}}function mse(e,t,n,r){const i={x:e.cp2x,y:e.cp2y},o={x:t.cp1x,y:t.cp1y},a=ss(e,i,n),s=ss(i,o,n),l=ss(o,t,n),c=ss(a,s,n),u=ss(s,l,n);return ss(c,u,n)}const gse=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,r){return n-r},leftForLtr(n,r){return n-r}}},vse=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function _l(e,t,n){return e?gse(t,n):vse()}function lj(e,t){let n,r;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=r)}function cj(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function uj(e){return e==="angle"?{between:Pu,compare:gae,normalize:Zr}:{between:ra,compare:(t,n)=>t-n,normalize:t=>t}}function dj({start:e,end:t,count:n,loop:r,style:i}){return{start:e%n,end:t%n,loop:r&&(t-e+1)%n===0,style:i}}function yse(e,t,n){const{property:r,start:i,end:o}=n,{between:a,normalize:s}=uj(r),l=t.length;let{start:c,end:u,loop:d}=e,f,p;if(d){for(c+=l,u+=l,f=0,p=l;f<p&&a(s(t[c%l][r]),i,o);++f)c--,u--;c%=l,u%=l}return u<c&&(u+=l),{start:c,end:u,loop:d,style:e.style}}function bse(e,t,n){if(!n)return[e];const{property:r,start:i,end:o}=n,a=t.length,{compare:s,between:l,normalize:c}=uj(r),{start:u,end:d,loop:f,style:p}=yse(e,t,n),m=[];let h=!1,g=null,b,S,w;const x=()=>l(i,w,b)&&s(i,w)!==0,_=()=>s(o,b)===0||l(o,w,b),E=()=>h||x(),C=()=>!h||_();for(let D=u,T=u;D<=d;++D)S=t[D%a],!S.skip&&(b=c(S[r]),b!==w&&(h=l(b,i,o),g===null&&E()&&(g=s(b,i)===0?D:T),g!==null&&C()&&(m.push(dj({start:g,end:D,loop:f,count:a,style:p})),g=null),T=D,w=b));return g!==null&&m.push(dj({start:g,end:d,loop:f,count:a,style:p})),m}function xse(e,t){const n=[],r=e.segments;for(let i=0;i<r.length;i++){const o=bse(r[i],e.points,t);o.length&&n.push(...o)}return n}function wse(e,t,n,r){let i=0,o=t-1;if(n&&!r)for(;i<t&&!e[i].skip;)i++;for(;i<t&&e[i].skip;)i++;for(i%=t,n&&(o+=i);o>i&&e[o%t].skip;)o--;return o%=t,{start:i,end:o}}function _se(e,t,n,r){const i=e.length,o=[];let a=t,s=e[t],l;for(l=t+1;l<=n;++l){const c=e[l%i];c.skip||c.stop?s.skip||(r=!1,o.push({start:t%i,end:(l-1)%i,loop:r}),t=a=c.stop?l:null):(a=l,s.skip&&(t=l)),s=c}return a!==null&&o.push({start:t%i,end:a%i,loop:r}),o}function Sse(e,t){const n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];const o=!!e._loop,{start:a,end:s}=wse(n,i,o,r);if(r===!0)return fj(e,[{start:a,end:s,loop:o}],n,t);const l=s<a?s+i:s,c=!!e._fullLoop&&a===0&&s===i-1;return fj(e,_se(n,a,l,c),n,t)}function fj(e,t,n,r){return!r||!r.setContext||!n?t:Ose(e,t,n,r)}function Ose(e,t,n,r){const i=e._chart.getContext(),o=pj(e.options),{_datasetIndex:a,options:{spanGaps:s}}=e,l=n.length,c=[];let u=o,d=t[0].start,f=d;function p(m,h,g,b){const S=s?-1:1;if(m!==h){for(m+=l;n[m%l].skip;)m-=S;for(;n[h%l].skip;)h+=S;m%l!==h%l&&(c.push({start:m%l,end:h%l,loop:g,style:b}),u=b,d=h%l)}}for(const m of t){d=s?d:m.start;let h=n[d%l],g;for(f=d+1;f<=m.end;f++){const b=n[f%l];g=pj(r.setContext(is(i,{type:"segment",p0:h,p1:b,p0DataIndex:(f-1)%l,p1DataIndex:f%l,datasetIndex:a}))),Ese(g,u)&&p(d,f-1,m.loop,u),h=b,u=g}d<f-1&&p(d,f-1,m.loop,u)}return c}function pj(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function Ese(e,t){if(!t)return!1;const n=[],r=function(i,o){return Dx(o)?(n.includes(o)||n.push(o),n.indexOf(o)):o};return JSON.stringify(e,r)!==JSON.stringify(t,r)}function jh(e,t,n){return e.options.clip?e[n]:t[n]}function Pse(e,t){const{xScale:n,yScale:r}=e;return n&&r?{left:jh(n,t,"left"),right:jh(n,t,"right"),top:jh(r,t,"top"),bottom:jh(r,t,"bottom")}:t}function kse(e,t){const n=t._clip;if(n.disabled)return!1;const r=Pse(t,e.chartArea);return{left:n.left===!1?0:r.left-(n.left===!0?0:n.left),right:n.right===!1?e.width:r.right+(n.right===!0?0:n.right),top:n.top===!1?0:r.top-(n.top===!0?0:n.top),bottom:n.bottom===!1?e.height:r.bottom+(n.bottom===!0?0:n.bottom)}}/*!
|
|
275
|
+
*/function xo(){}const nae=(()=>{let e=0;return()=>e++})();function Ve(e){return e==null}function rn(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function Me(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function zr(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Ai(e,t){return zr(e)?e:t}function Oe(e,t){return typeof e>"u"?t:e}const rae=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,DN=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function ht(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function Ze(e,t,n,r){let i,o,a;if(rn(e))for(o=e.length,i=0;i<o;i++)t.call(n,e[i],i);else if(Me(e))for(a=Object.keys(e),o=a.length,i=0;i<o;i++)t.call(n,e[a[i]],a[i])}function Sh(e,t){let n,r,i,o;if(!e||!t||e.length!==t.length)return!1;for(n=0,r=e.length;n<r;++n)if(i=e[n],o=t[n],i.datasetIndex!==o.datasetIndex||i.index!==o.index)return!1;return!0}function Oh(e){if(rn(e))return e.map(Oh);if(Me(e)){const t=Object.create(null),n=Object.keys(e),r=n.length;let i=0;for(;i<r;++i)t[n[i]]=Oh(e[n[i]]);return t}return e}function AN(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function iae(e,t,n,r){if(!AN(e))return;const i=t[e],o=n[e];Me(i)&&Me(o)?wu(i,o,r):t[e]=Oh(o)}function wu(e,t,n){const r=rn(t)?t:[t],i=r.length;if(!Me(e))return e;n=n||{};const o=n.merger||iae;let a;for(let s=0;s<i;++s){if(a=r[s],!Me(a))continue;const l=Object.keys(a);for(let c=0,u=l.length;c<u;++c)o(l[c],e,a,n)}return e}function _u(e,t){return wu(e,t,{merger:oae})}function oae(e,t,n){if(!AN(e))return;const r=t[e],i=n[e];Me(r)&&Me(i)?_u(r,i):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=Oh(i))}const TN={"":e=>e,x:e=>e.x,y:e=>e.y};function aae(e){const t=e.split("."),n=[];let r="";for(const i of t)r+=i,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function sae(e){const t=aae(e);return n=>{for(const r of t){if(r==="")break;n=n&&n[r]}return n}}function Ja(e,t){return(TN[t]||(TN[t]=sae(t)))(e)}function Px(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Su=e=>typeof e<"u",na=e=>typeof e=="function",MN=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function lae(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const ot=Math.PI,At=2*ot,cae=At+ot,Eh=Number.POSITIVE_INFINITY,uae=ot/180,Qt=ot/2,es=ot/4,NN=ot*2/3,jN=Math.log10,Ti=Math.sign;function Ou(e,t,n){return Math.abs(e-t)<n}function IN(e){const t=Math.round(e);e=Ou(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(jN(e))),r=e/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function dae(e){const t=[],n=Math.sqrt(e);let r;for(r=1;r<n;r++)e%r===0&&(t.push(r),t.push(e/r));return n===(n|0)&&t.push(n),t.sort((i,o)=>i-o).pop(),t}function fae(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function Eu(e){return!fae(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function pae(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function hae(e,t,n){let r,i,o;for(r=0,i=e.length;r<i;r++)o=e[r][n],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function wo(e){return e*(ot/180)}function mae(e){return e*(180/ot)}function RN(e){if(!zr(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function LN(e,t){const n=t.x-e.x,r=t.y-e.y,i=Math.sqrt(n*n+r*r);let o=Math.atan2(r,n);return o<-.5*ot&&(o+=At),{angle:o,distance:i}}function kx(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function gae(e,t){return(e-t+cae)%At-ot}function Zr(e){return(e%At+At)%At}function Pu(e,t,n,r){const i=Zr(e),o=Zr(t),a=Zr(n),s=Zr(o-i),l=Zr(a-i),c=Zr(i-o),u=Zr(i-a);return i===o||i===a||r&&o===a||s>l&&c<u}function kn(e,t,n){return Math.max(t,Math.min(n,e))}function vae(e){return kn(e,-32768,32767)}function ra(e,t,n,r=1e-6){return e>=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function Cx(e,t,n){n=n||(a=>e[a]<t);let r=e.length-1,i=0,o;for(;r-i>1;)o=i+r>>1,n(o)?i=o:r=o;return{lo:i,hi:r}}const ts=(e,t,n,r)=>Cx(e,n,r?i=>{const o=e[i][t];return o<n||o===n&&e[i+1][t]===n}:i=>e[i][t]<n),yae=(e,t,n)=>Cx(e,n,r=>e[r][t]>=n);function bae(e,t,n){let r=0,i=e.length;for(;r<i&&e[r]<t;)r++;for(;i>r&&e[i-1]>n;)i--;return r>0||i<e.length?e.slice(r,i):e}const FN=["push","pop","shift","splice","unshift"];function xae(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),FN.forEach(n=>{const r="_onData"+Px(n),i=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...o){const a=i.apply(this,o);return e._chartjs.listeners.forEach(s=>{typeof s[r]=="function"&&s[r](...o)}),a}})})}function $N(e,t){const n=e._chartjs;if(!n)return;const r=n.listeners,i=r.indexOf(t);i!==-1&&r.splice(i,1),!(r.length>0)&&(FN.forEach(o=>{delete e[o]}),delete e._chartjs)}function BN(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const WN=(function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame})();function zN(e,t){let n=[],r=!1;return function(...i){n=i,r||(r=!0,WN.call(window,()=>{r=!1,e.apply(t,n)}))}}function wae(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}const VN=e=>e==="start"?"left":e==="end"?"right":"center",xr=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,_ae=(e,t,n,r)=>e===(r?"left":"right")?n:e==="center"?(t+n)/2:t;function Sae(e,t,n){const r=t.length;let i=0,o=r;if(e._sorted){const{iScale:a,vScale:s,_parsed:l}=e,c=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,u=a.axis,{min:d,max:f,minDefined:p,maxDefined:m}=a.getUserBounds();if(p){if(i=Math.min(ts(l,u,d).lo,n?r:ts(t,u,a.getPixelForValue(d)).lo),c){const h=l.slice(0,i+1).reverse().findIndex(g=>!Ve(g[s.axis]));i-=Math.max(0,h)}i=kn(i,0,r-1)}if(m){let h=Math.max(ts(l,a.axis,f,!0).hi+1,n?0:ts(t,u,a.getPixelForValue(f),!0).hi+1);if(c){const g=l.slice(h-1).findIndex(b=>!Ve(b[s.axis]));h+=Math.max(0,g)}o=kn(h,i,r)-i}else o=r-i}return{start:i,count:o}}function Oae(e){const{xScale:t,yScale:n,_scaleRanges:r}=e,i={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!r)return e._scaleRanges=i,!0;const o=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),o}const Ph=e=>e===0||e===1,HN=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*At/n)),YN=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*At/n)+1,ku={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*Qt)+1,easeOutSine:e=>Math.sin(e*Qt),easeInOutSine:e=>-.5*(Math.cos(ot*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>Ph(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>Ph(e)?e:HN(e,.075,.3),easeOutElastic:e=>Ph(e)?e:YN(e,.075,.3),easeInOutElastic(e){return Ph(e)?e:e<.5?.5*HN(e*2,.1125,.45):.5+.5*YN(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-ku.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?ku.easeInBounce(e*2)*.5:ku.easeOutBounce(e*2-1)*.5+.5};function Dx(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function UN(e){return Dx(e)?e:new xu(e)}function Ax(e){return Dx(e)?e:new xu(e).saturate(.5).darken(.1).hexString()}const Eae=["x","y","borderWidth","radius","tension"],Pae=["color","borderColor","backgroundColor"];function kae(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:Pae},numbers:{type:"number",properties:Eae}}),e.describe("animations",{_fallback:"animation"}),e.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=>t|0}}}})}function Cae(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const KN=new Map;function Dae(e,t){t=t||{};const n=e+JSON.stringify(t);let r=KN.get(n);return r||(r=new Intl.NumberFormat(e,t),KN.set(n,r)),r}function Tx(e,t,n){return Dae(t,n).format(e)}const Aae={values(e){return rn(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const r=this.chart.options.locale;let i,o=e;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(i="scientific"),o=Tae(e,n)}const a=jN(Math.abs(o)),s=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:i,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(l,this.options.ticks.format),Tx(e,r,l)}};function Tae(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var qN={formatters:Aae};function Mae(e){e.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,n)=>n.lineWidth,tickColor:(t,n)=>n.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:qN.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const ns=Object.create(null),Mx=Object.create(null);function Cu(e,t){if(!t)return e;const n=t.split(".");for(let r=0,i=n.length;r<i;++r){const o=n[r];e=e[o]||(e[o]=Object.create(null))}return e}function Nx(e,t,n){return typeof t=="string"?wu(Cu(e,t),n):wu(Cu(e,""),t)}class Nae{constructor(t,n){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=r=>r.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=(r,i)=>Ax(i.backgroundColor),this.hoverBorderColor=(r,i)=>Ax(i.borderColor),this.hoverColor=(r,i)=>Ax(i.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(n)}set(t,n){return Nx(this,t,n)}get(t){return Cu(this,t)}describe(t,n){return Nx(Mx,t,n)}override(t,n){return Nx(ns,t,n)}route(t,n,r,i){const o=Cu(this,t),a=Cu(this,r),s="_"+n;Object.defineProperties(o,{[s]:{value:o[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[s],c=a[i];return Me(l)?Object.assign({},c,l):Oe(l,c)},set(l){this[s]=l}}})}apply(t){t.forEach(n=>n(this))}}var Lt=new Nae({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[kae,Cae,Mae]);function jae(e){return!e||Ve(e.size)||Ve(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function GN(e,t,n,r,i){let o=t[i];return o||(o=t[i]=e.measureText(i).width,n.push(i)),o>r&&(r=o),r}function rs(e,t,n){const r=e.currentDevicePixelRatio,i=n!==0?Math.max(n/2,.5):0;return Math.round((t-i)*r)/r+i}function XN(e,t){!t&&!e||(t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function jx(e,t,n,r){QN(e,t,n,r,null)}function QN(e,t,n,r,i){let o,a,s,l,c,u,d,f;const p=t.pointStyle,m=t.rotation,h=t.radius;let g=(m||0)*uae;if(p&&typeof p=="object"&&(o=p.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){e.save(),e.translate(n,r),e.rotate(g),e.drawImage(p,-p.width/2,-p.height/2,p.width,p.height),e.restore();return}if(!(isNaN(h)||h<=0)){switch(e.beginPath(),p){default:i?e.ellipse(n,r,i/2,h,0,0,At):e.arc(n,r,h,0,At),e.closePath();break;case"triangle":u=i?i/2:h,e.moveTo(n+Math.sin(g)*u,r-Math.cos(g)*h),g+=NN,e.lineTo(n+Math.sin(g)*u,r-Math.cos(g)*h),g+=NN,e.lineTo(n+Math.sin(g)*u,r-Math.cos(g)*h),e.closePath();break;case"rectRounded":c=h*.516,l=h-c,a=Math.cos(g+es)*l,d=Math.cos(g+es)*(i?i/2-c:l),s=Math.sin(g+es)*l,f=Math.sin(g+es)*(i?i/2-c:l),e.arc(n-d,r-s,c,g-ot,g-Qt),e.arc(n+f,r-a,c,g-Qt,g),e.arc(n+d,r+s,c,g,g+Qt),e.arc(n-f,r+a,c,g+Qt,g+ot),e.closePath();break;case"rect":if(!m){l=Math.SQRT1_2*h,u=i?i/2:l,e.rect(n-u,r-l,2*u,2*l);break}g+=es;case"rectRot":d=Math.cos(g)*(i?i/2:h),a=Math.cos(g)*h,s=Math.sin(g)*h,f=Math.sin(g)*(i?i/2:h),e.moveTo(n-d,r-s),e.lineTo(n+f,r-a),e.lineTo(n+d,r+s),e.lineTo(n-f,r+a),e.closePath();break;case"crossRot":g+=es;case"cross":d=Math.cos(g)*(i?i/2:h),a=Math.cos(g)*h,s=Math.sin(g)*h,f=Math.sin(g)*(i?i/2:h),e.moveTo(n-d,r-s),e.lineTo(n+d,r+s),e.moveTo(n+f,r-a),e.lineTo(n-f,r+a);break;case"star":d=Math.cos(g)*(i?i/2:h),a=Math.cos(g)*h,s=Math.sin(g)*h,f=Math.sin(g)*(i?i/2:h),e.moveTo(n-d,r-s),e.lineTo(n+d,r+s),e.moveTo(n+f,r-a),e.lineTo(n-f,r+a),g+=es,d=Math.cos(g)*(i?i/2:h),a=Math.cos(g)*h,s=Math.sin(g)*h,f=Math.sin(g)*(i?i/2:h),e.moveTo(n-d,r-s),e.lineTo(n+d,r+s),e.moveTo(n+f,r-a),e.lineTo(n-f,r+a);break;case"line":a=i?i/2:Math.cos(g)*h,s=Math.sin(g)*h,e.moveTo(n-a,r-s),e.lineTo(n+a,r+s);break;case"dash":e.moveTo(n,r),e.lineTo(n+Math.cos(g)*(i?i/2:h),r+Math.sin(g)*h);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function Du(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function Ix(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function Rx(e){e.restore()}function Iae(e,t,n,r,i){if(!t)return e.lineTo(n.x,n.y);if(i==="middle"){const o=(t.x+n.x)/2;e.lineTo(o,t.y),e.lineTo(o,n.y)}else i==="after"!=!!r?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}function Rae(e,t,n,r){if(!t)return e.lineTo(n.x,n.y);e.bezierCurveTo(r?t.cp1x:t.cp2x,r?t.cp1y:t.cp2y,r?n.cp2x:n.cp1x,r?n.cp2y:n.cp1y,n.x,n.y)}function Lae(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),Ve(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}function Fae(e,t,n,r,i){if(i.strikethrough||i.underline){const o=e.measureText(r),a=t-o.actualBoundingBoxLeft,s=t+o.actualBoundingBoxRight,l=n-o.actualBoundingBoxAscent,c=n+o.actualBoundingBoxDescent,u=i.strikethrough?(l+c)/2:c;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=i.decorationWidth||2,e.moveTo(a,u),e.lineTo(s,u),e.stroke()}}function $ae(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function kh(e,t,n,r,i,o={}){const a=rn(t)?t:[t],s=o.strokeWidth>0&&o.strokeColor!=="";let l,c;for(e.save(),e.font=i.string,Lae(e,o),l=0;l<a.length;++l)c=a[l],o.backdrop&&$ae(e,o.backdrop),s&&(o.strokeColor&&(e.strokeStyle=o.strokeColor),Ve(o.strokeWidth)||(e.lineWidth=o.strokeWidth),e.strokeText(c,n,r,o.maxWidth)),e.fillText(c,n,r,o.maxWidth),Fae(e,n,r,c,o),r+=Number(i.lineHeight);e.restore()}function Ch(e,t){const{x:n,y:r,w:i,h:o,radius:a}=t;e.arc(n+a.topLeft,r+a.topLeft,a.topLeft,1.5*ot,ot,!0),e.lineTo(n,r+o-a.bottomLeft),e.arc(n+a.bottomLeft,r+o-a.bottomLeft,a.bottomLeft,ot,Qt,!0),e.lineTo(n+i-a.bottomRight,r+o),e.arc(n+i-a.bottomRight,r+o-a.bottomRight,a.bottomRight,Qt,0,!0),e.lineTo(n+i,r+a.topRight),e.arc(n+i-a.topRight,r+a.topRight,a.topRight,0,-Qt,!0),e.lineTo(n+a.topLeft,r)}const Bae=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Wae=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function zae(e,t){const n=(""+e).match(Bae);if(!n||n[1]==="normal")return t*1.2;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100;break}return t*e}const Vae=e=>+e||0;function Lx(e,t){const n={},r=Me(t),i=r?Object.keys(t):t,o=Me(e)?r?a=>Oe(e[a],e[t[a]]):a=>e[a]:()=>e;for(const a of i)n[a]=Vae(o(a));return n}function ZN(e){return Lx(e,{top:"y",right:"x",bottom:"y",left:"x"})}function bl(e){return Lx(e,["topLeft","topRight","bottomLeft","bottomRight"])}function Jr(e){const t=ZN(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function Jn(e,t){e=e||{},t=t||Lt.font;let n=Oe(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let r=Oe(e.style,t.style);r&&!(""+r).match(Wae)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:Oe(e.family,t.family),lineHeight:zae(Oe(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:Oe(e.weight,t.weight),string:""};return i.string=jae(i),i}function Dh(e,t,n,r){let i,o,a;for(i=0,o=e.length;i<o;++i)if(a=e[i],a!==void 0&&a!==void 0)return a}function Hae(e,t,n){const{min:r,max:i}=e,o=DN(t,(i-r)/2),a=(s,l)=>n&&s===0?0:s+l;return{min:a(r,-Math.abs(o)),max:a(i,o)}}function is(e,t){return Object.assign(Object.create(e),t)}function Fx(e,t=[""],n,r,i=()=>e[0]){const o=n||e;typeof r>"u"&&(r=rj("_fallback",e));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:o,_fallback:r,_getTarget:i,override:s=>Fx([s,...e],t,o,r)};return new Proxy(a,{deleteProperty(s,l){return delete s[l],delete s._keys,delete e[0][l],!0},get(s,l){return ej(s,l,()=>Zae(l,t,e,s))},getOwnPropertyDescriptor(s,l){return Reflect.getOwnPropertyDescriptor(s._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(s,l){return ij(s).includes(l)},ownKeys(s){return ij(s)},set(s,l,c){const u=s._storage||(s._storage=i());return s[l]=u[l]=c,delete s._keys,!0}})}function xl(e,t,n,r){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:JN(e,r),setContext:o=>xl(e,o,n,r),override:o=>xl(e.override(o),t,n,r)};return new Proxy(i,{deleteProperty(o,a){return delete o[a],delete e[a],!0},get(o,a,s){return ej(o,a,()=>Uae(o,a,s))},getOwnPropertyDescriptor(o,a){return o._descriptors.allKeys?Reflect.has(e,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,a)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(o,a){return Reflect.has(e,a)},ownKeys(){return Reflect.ownKeys(e)},set(o,a,s){return e[a]=s,delete o[a],!0}})}function JN(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:r=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:n,indexable:r,isScriptable:na(n)?n:()=>n,isIndexable:na(r)?r:()=>r}}const Yae=(e,t)=>e?e+Px(t):t,$x=(e,t)=>Me(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function ej(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];const r=n();return e[t]=r,r}function Uae(e,t,n){const{_proxy:r,_context:i,_subProxy:o,_descriptors:a}=e;let s=r[t];return na(s)&&a.isScriptable(t)&&(s=Kae(t,s,e,n)),rn(s)&&s.length&&(s=qae(t,s,e,a.isIndexable)),$x(t,s)&&(s=xl(s,i,o&&o[t],a)),s}function Kae(e,t,n,r){const{_proxy:i,_context:o,_subProxy:a,_stack:s}=n;if(s.has(e))throw new Error("Recursion detected: "+Array.from(s).join("->")+"->"+e);s.add(e);let l=t(o,a||r);return s.delete(e),$x(e,l)&&(l=Bx(i._scopes,i,e,l)),l}function qae(e,t,n,r){const{_proxy:i,_context:o,_subProxy:a,_descriptors:s}=n;if(typeof o.index<"u"&&r(e))return t[o.index%t.length];if(Me(t[0])){const l=t,c=i._scopes.filter(u=>u!==l);t=[];for(const u of l){const d=Bx(c,i,e,u);t.push(xl(d,o,a&&a[e],s))}}return t}function tj(e,t,n){return na(e)?e(t,n):e}const Gae=(e,t)=>e===!0?t:typeof e=="string"?Ja(t,e):void 0;function Xae(e,t,n,r,i){for(const o of t){const a=Gae(n,o);if(a){e.add(a);const s=tj(a._fallback,n,i);if(typeof s<"u"&&s!==n&&s!==r)return s}else if(a===!1&&typeof r<"u"&&n!==r)return null}return!1}function Bx(e,t,n,r){const i=t._rootScopes,o=tj(t._fallback,n,r),a=[...e,...i],s=new Set;s.add(r);let l=nj(s,a,n,o||n,r);return l===null||typeof o<"u"&&o!==n&&(l=nj(s,a,o,l,r),l===null)?!1:Fx(Array.from(s),[""],i,o,()=>Qae(t,n,r))}function nj(e,t,n,r,i){for(;n;)n=Xae(e,t,n,r,i);return n}function Qae(e,t,n){const r=e._getTarget();t in r||(r[t]={});const i=r[t];return rn(i)&&Me(n)?n:i||{}}function Zae(e,t,n,r){let i;for(const o of t)if(i=rj(Yae(o,e),n),typeof i<"u")return $x(e,i)?Bx(n,r,e,i):i}function rj(e,t){for(const n of t){if(!n)continue;const r=n[e];if(typeof r<"u")return r}}function ij(e){let t=e._keys;return t||(t=e._keys=Jae(e._scopes)),t}function Jae(e){const t=new Set;for(const n of e)for(const r of Object.keys(n).filter(i=>!i.startsWith("_")))t.add(r);return Array.from(t)}const ese=Number.EPSILON||1e-14,wl=(e,t)=>t<e.length&&!e[t].skip&&e[t],oj=e=>e==="x"?"y":"x";function tse(e,t,n,r){const i=e.skip?t:e,o=t,a=n.skip?t:n,s=kx(o,i),l=kx(a,o);let c=s/(s+l),u=l/(s+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const d=r*c,f=r*u;return{previous:{x:o.x-d*(a.x-i.x),y:o.y-d*(a.y-i.y)},next:{x:o.x+f*(a.x-i.x),y:o.y+f*(a.y-i.y)}}}function nse(e,t,n){const r=e.length;let i,o,a,s,l,c=wl(e,0);for(let u=0;u<r-1;++u)if(l=c,c=wl(e,u+1),!(!l||!c)){if(Ou(t[u],0,ese)){n[u]=n[u+1]=0;continue}i=n[u]/t[u],o=n[u+1]/t[u],s=Math.pow(i,2)+Math.pow(o,2),!(s<=9)&&(a=3/Math.sqrt(s),n[u]=i*a*t[u],n[u+1]=o*a*t[u])}}function rse(e,t,n="x"){const r=oj(n),i=e.length;let o,a,s,l=wl(e,0);for(let c=0;c<i;++c){if(a=s,s=l,l=wl(e,c+1),!s)continue;const u=s[n],d=s[r];a&&(o=(u-a[n])/3,s[`cp1${n}`]=u-o,s[`cp1${r}`]=d-o*t[c]),l&&(o=(l[n]-u)/3,s[`cp2${n}`]=u+o,s[`cp2${r}`]=d+o*t[c])}}function ise(e,t="x"){const n=oj(t),r=e.length,i=Array(r).fill(0),o=Array(r);let a,s,l,c=wl(e,0);for(a=0;a<r;++a)if(s=l,l=c,c=wl(e,a+1),!!l){if(c){const u=c[t]-l[t];i[a]=u!==0?(c[n]-l[n])/u:0}o[a]=s?c?Ti(i[a-1])!==Ti(i[a])?0:(i[a-1]+i[a])/2:i[a-1]:i[a]}nse(e,i,o),rse(e,o,t)}function Ah(e,t,n){return Math.max(Math.min(e,n),t)}function ose(e,t){let n,r,i,o,a,s=Du(e[0],t);for(n=0,r=e.length;n<r;++n)a=o,o=s,s=n<r-1&&Du(e[n+1],t),o&&(i=e[n],a&&(i.cp1x=Ah(i.cp1x,t.left,t.right),i.cp1y=Ah(i.cp1y,t.top,t.bottom)),s&&(i.cp2x=Ah(i.cp2x,t.left,t.right),i.cp2y=Ah(i.cp2y,t.top,t.bottom)))}function ase(e,t,n,r,i){let o,a,s,l;if(t.spanGaps&&(e=e.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")ise(e,i);else{let c=r?e[e.length-1]:e[0];for(o=0,a=e.length;o<a;++o)s=e[o],l=tse(c,s,e[Math.min(o+1,a-(r?0:1))%a],t.tension),s.cp1x=l.previous.x,s.cp1y=l.previous.y,s.cp2x=l.next.x,s.cp2y=l.next.y,c=s}t.capBezierPoints&&ose(e,n)}function Wx(){return typeof window<"u"&&typeof document<"u"}function zx(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function Th(e,t,n){let r;return typeof e=="string"?(r=parseInt(e,10),e.indexOf("%")!==-1&&(r=r/100*t.parentNode[n])):r=e,r}const Mh=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function sse(e,t){return Mh(e).getPropertyValue(t)}const lse=["top","right","bottom","left"];function os(e,t,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const o=lse[i];r[o]=parseFloat(e[t+"-"+o+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const cse=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function use(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:i,offsetY:o}=r;let a=!1,s,l;if(cse(i,o,e.target))s=i,l=o;else{const c=t.getBoundingClientRect();s=r.clientX-c.left,l=r.clientY-c.top,a=!0}return{x:s,y:l,box:a}}function as(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,i=Mh(n),o=i.boxSizing==="border-box",a=os(i,"padding"),s=os(i,"border","width"),{x:l,y:c,box:u}=use(e,n),d=a.left+(u&&s.left),f=a.top+(u&&s.top);let{width:p,height:m}=t;return o&&(p-=a.width+s.width,m-=a.height+s.height),{x:Math.round((l-d)/p*n.width/r),y:Math.round((c-f)/m*n.height/r)}}function dse(e,t,n){let r,i;if(t===void 0||n===void 0){const o=e&&zx(e);if(!o)t=e.clientWidth,n=e.clientHeight;else{const a=o.getBoundingClientRect(),s=Mh(o),l=os(s,"border","width"),c=os(s,"padding");t=a.width-c.width-l.width,n=a.height-c.height-l.height,r=Th(s.maxWidth,o,"clientWidth"),i=Th(s.maxHeight,o,"clientHeight")}}return{width:t,height:n,maxWidth:r||Eh,maxHeight:i||Eh}}const Nh=e=>Math.round(e*10)/10;function fse(e,t,n,r){const i=Mh(e),o=os(i,"margin"),a=Th(i.maxWidth,e,"clientWidth")||Eh,s=Th(i.maxHeight,e,"clientHeight")||Eh,l=dse(e,t,n);let{width:c,height:u}=l;if(i.boxSizing==="content-box"){const f=os(i,"border","width"),p=os(i,"padding");c-=p.width+f.width,u-=p.height+f.height}return c=Math.max(0,c-o.width),u=Math.max(0,r?c/r:u-o.height),c=Nh(Math.min(c,a,l.maxWidth)),u=Nh(Math.min(u,s,l.maxHeight)),c&&!u&&(u=Nh(c/2)),(t!==void 0||n!==void 0)&&r&&l.height&&u>l.height&&(u=l.height,c=Nh(Math.floor(u*r))),{width:c,height:u}}function aj(e,t,n){const r=t||1,i=Math.floor(e.height*r),o=Math.floor(e.width*r);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const a=e.canvas;return a.style&&(n||!a.style.height&&!a.style.width)&&(a.style.height=`${e.height}px`,a.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||a.height!==i||a.width!==o?(e.currentDevicePixelRatio=r,a.height=i,a.width=o,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}const pse=(function(){let e=!1;try{const t={get passive(){return e=!0,!1}};Wx()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e})();function sj(e,t){const n=sse(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function ss(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function hse(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:r==="middle"?n<.5?e.y:t.y:r==="after"?n<1?e.y:t.y:n>0?t.y:e.y}}function mse(e,t,n,r){const i={x:e.cp2x,y:e.cp2y},o={x:t.cp1x,y:t.cp1y},a=ss(e,i,n),s=ss(i,o,n),l=ss(o,t,n),c=ss(a,s,n),u=ss(s,l,n);return ss(c,u,n)}const gse=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,r){return n-r},leftForLtr(n,r){return n-r}}},vse=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function _l(e,t,n){return e?gse(t,n):vse()}function lj(e,t){let n,r;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=r)}function cj(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function uj(e){return e==="angle"?{between:Pu,compare:gae,normalize:Zr}:{between:ra,compare:(t,n)=>t-n,normalize:t=>t}}function dj({start:e,end:t,count:n,loop:r,style:i}){return{start:e%n,end:t%n,loop:r&&(t-e+1)%n===0,style:i}}function yse(e,t,n){const{property:r,start:i,end:o}=n,{between:a,normalize:s}=uj(r),l=t.length;let{start:c,end:u,loop:d}=e,f,p;if(d){for(c+=l,u+=l,f=0,p=l;f<p&&a(s(t[c%l][r]),i,o);++f)c--,u--;c%=l,u%=l}return u<c&&(u+=l),{start:c,end:u,loop:d,style:e.style}}function bse(e,t,n){if(!n)return[e];const{property:r,start:i,end:o}=n,a=t.length,{compare:s,between:l,normalize:c}=uj(r),{start:u,end:d,loop:f,style:p}=yse(e,t,n),m=[];let h=!1,g=null,b,S,w;const x=()=>l(i,w,b)&&s(i,w)!==0,_=()=>s(o,b)===0||l(o,w,b),E=()=>h||x(),C=()=>!h||_();for(let D=u,T=u;D<=d;++D)S=t[D%a],!S.skip&&(b=c(S[r]),b!==w&&(h=l(b,i,o),g===null&&E()&&(g=s(b,i)===0?D:T),g!==null&&C()&&(m.push(dj({start:g,end:D,loop:f,count:a,style:p})),g=null),T=D,w=b));return g!==null&&m.push(dj({start:g,end:d,loop:f,count:a,style:p})),m}function xse(e,t){const n=[],r=e.segments;for(let i=0;i<r.length;i++){const o=bse(r[i],e.points,t);o.length&&n.push(...o)}return n}function wse(e,t,n,r){let i=0,o=t-1;if(n&&!r)for(;i<t&&!e[i].skip;)i++;for(;i<t&&e[i].skip;)i++;for(i%=t,n&&(o+=i);o>i&&e[o%t].skip;)o--;return o%=t,{start:i,end:o}}function _se(e,t,n,r){const i=e.length,o=[];let a=t,s=e[t],l;for(l=t+1;l<=n;++l){const c=e[l%i];c.skip||c.stop?s.skip||(r=!1,o.push({start:t%i,end:(l-1)%i,loop:r}),t=a=c.stop?l:null):(a=l,s.skip&&(t=l)),s=c}return a!==null&&o.push({start:t%i,end:a%i,loop:r}),o}function Sse(e,t){const n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];const o=!!e._loop,{start:a,end:s}=wse(n,i,o,r);if(r===!0)return fj(e,[{start:a,end:s,loop:o}],n,t);const l=s<a?s+i:s,c=!!e._fullLoop&&a===0&&s===i-1;return fj(e,_se(n,a,l,c),n,t)}function fj(e,t,n,r){return!r||!r.setContext||!n?t:Ose(e,t,n,r)}function Ose(e,t,n,r){const i=e._chart.getContext(),o=pj(e.options),{_datasetIndex:a,options:{spanGaps:s}}=e,l=n.length,c=[];let u=o,d=t[0].start,f=d;function p(m,h,g,b){const S=s?-1:1;if(m!==h){for(m+=l;n[m%l].skip;)m-=S;for(;n[h%l].skip;)h+=S;m%l!==h%l&&(c.push({start:m%l,end:h%l,loop:g,style:b}),u=b,d=h%l)}}for(const m of t){d=s?d:m.start;let h=n[d%l],g;for(f=d+1;f<=m.end;f++){const b=n[f%l];g=pj(r.setContext(is(i,{type:"segment",p0:h,p1:b,p0DataIndex:(f-1)%l,p1DataIndex:f%l,datasetIndex:a}))),Ese(g,u)&&p(d,f-1,m.loop,u),h=b,u=g}d<f-1&&p(d,f-1,m.loop,u)}return c}function pj(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function Ese(e,t){if(!t)return!1;const n=[],r=function(i,o){return Dx(o)?(n.includes(o)||n.push(o),n.indexOf(o)):o};return JSON.stringify(e,r)!==JSON.stringify(t,r)}function jh(e,t,n){return e.options.clip?e[n]:t[n]}function Pse(e,t){const{xScale:n,yScale:r}=e;return n&&r?{left:jh(n,t,"left"),right:jh(n,t,"right"),top:jh(r,t,"top"),bottom:jh(r,t,"bottom")}:t}function kse(e,t){const n=t._clip;if(n.disabled)return!1;const r=Pse(t,e.chartArea);return{left:n.left===!1?0:r.left-(n.left===!0?0:n.left),right:n.right===!1?e.width:r.right+(n.right===!0?0:n.right),top:n.top===!1?0:r.top-(n.top===!0?0:n.top),bottom:n.bottom===!1?e.height:r.bottom+(n.bottom===!0?0:n.bottom)}}/*!
|
|
276
276
|
* Chart.js v4.5.0
|
|
277
277
|
* https://www.chartjs.org
|
|
278
278
|
* (c) 2025 Chart.js Contributors
|
|
279
279
|
* Released under the MIT License
|
|
280
|
-
*/class Cse{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,r,i){const o=n.listeners[i],a=n.duration;o.forEach(s=>s({chart:t,initial:n.initial,numSteps:a,currentStep:Math.min(r-n.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=WN.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((r,i)=>{if(!r.running||!r.items.length)return;const o=r.items;let a=o.length-1,s=!1,l;for(;a>=0;--a)l=o[a],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(t),s=!0):(o[a]=o[o.length-1],o.pop());s&&(i.draw(),this._notify(i,r,t,"progress")),o.length||(r.running=!1,this._notify(i,r,t,"complete"),r.initial=!1),n+=o.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let r=n.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,r)),r}listen(t,n,r){this._getAnims(t).listeners[n].push(r)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,i)=>Math.max(r,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const r=n.items;let i=r.length-1;for(;i>=0;--i)r[i].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var _o=new Cse;const hj="transparent",Dse={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=UN(e||hj),i=r.valid&&UN(t||hj);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class Ase{constructor(t,n,r,i){const o=n[r];i=Dh([t.to,i,o,t.from]);const a=Dh([t.from,o,i]);this._active=!0,this._fn=t.fn||Dse[t.type||typeof a],this._easing=ku[t.easing]||ku.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=r,this._from=a,this._to=i,this._promises=void 0}active(){return this._active}update(t,n,r){if(this._active){this._notify(!1);const i=this._target[this._prop],o=r-this._start,a=this._duration-o;this._start=r,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=Dh([t.to,n,i,t.from]),this._from=Dh([t.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,r=this._duration,i=this._prop,o=this._from,a=this._loop,s=this._to;let l;if(this._active=o!==s&&(a||n<r),!this._active){this._target[i]=s,this._notify(!0);return}if(n<0){this._target[i]=o;return}l=n/r%2,l=a&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(o,s,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,r)=>{t.push({res:n,rej:r})})}_notify(t){const n=t?"res":"rej",r=this._promises||[];for(let i=0;i<r.length;i++)r[i][n]()}}class mj{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!Me(t))return;const n=Object.keys(Lt.animation),r=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const o=t[i];if(!Me(o))return;const a={};for(const s of n)a[s]=o[s];(rn(o.properties)&&o.properties||[i]).forEach(s=>{(s===i||!r.has(s))&&r.set(s,a)})})}_animateOptions(t,n){const r=n.options,i=Mse(t,r);if(!i)return[];const o=this._createAnimations(i,r);return r.$shared&&Tse(t.options.$animations,r).then(()=>{t.options=r},()=>{}),o}_createAnimations(t,n){const r=this._properties,i=[],o=t.$animations||(t.$animations={}),a=Object.keys(n),s=Date.now();let l;for(l=a.length-1;l>=0;--l){const c=a[l];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(t,n));continue}const u=n[c];let d=o[c];const f=r.get(c);if(d)if(f&&d.active()){d.update(f,u,s);continue}else d.cancel();if(!f||!f.duration){t[c]=u;continue}o[c]=d=new Ase(f,t,c,u),i.push(d)}return i}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const r=this._createAnimations(t,n);if(r.length)return _o.add(this._chart,r),!0}}function Tse(e,t){const n=[],r=Object.keys(t);for(let i=0;i<r.length;i++){const o=e[r[i]];o&&o.active()&&n.push(o.wait())}return Promise.all(n)}function Mse(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function gj(e,t){const n=e&&e.options||{},r=n.reverse,i=n.min===void 0?t:0,o=n.max===void 0?t:0;return{start:r?o:i,end:r?i:o}}function Nse(e,t,n){if(n===!1)return!1;const r=gj(e,n),i=gj(t,n);return{top:i.end,right:r.end,bottom:i.start,left:r.start}}function jse(e){let t,n,r,i;return Me(e)?(t=e.top,n=e.right,r=e.bottom,i=e.left):t=n=r=i=e,{top:t,right:n,bottom:r,left:i,disabled:e===!1}}function vj(e,t){const n=[],r=e._getSortedDatasetMetas(t);let i,o;for(i=0,o=r.length;i<o;++i)n.push(r[i].index);return n}function yj(e,t,n,r={}){const i=e.keys,o=r.mode==="single";let a,s,l,c;if(t===null)return;let u=!1;for(a=0,s=i.length;a<s;++a){if(l=+i[a],l===n){if(u=!0,r.all)continue;break}c=e.values[l],zr(c)&&(o||t===0||Ti(t)===Ti(c))&&(t+=c)}return!u&&!r.all?0:t}function Ise(e,t){const{iScale:n,vScale:r}=t,i=n.axis==="x"?"x":"y",o=r.axis==="x"?"x":"y",a=Object.keys(e),s=new Array(a.length);let l,c,u;for(l=0,c=a.length;l<c;++l)u=a[l],s[l]={[i]:u,[o]:e[u]};return s}function Vx(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function Rse(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function Lse(e){const{min:t,max:n,minDefined:r,maxDefined:i}=e.getUserBounds();return{min:r?t:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function Fse(e,t,n){const r=e[t]||(e[t]={});return r[n]||(r[n]={})}function bj(e,t,n,r){for(const i of t.getMatchingVisibleMetas(r).reverse()){const o=e[i.index];if(n&&o>0||!n&&o<0)return i.index}return null}function xj(e,t){const{chart:n,_cachedMeta:r}=e,i=n._stacks||(n._stacks={}),{iScale:o,vScale:a,index:s}=r,l=o.axis,c=a.axis,u=Rse(o,a,r),d=t.length;let f;for(let p=0;p<d;++p){const m=t[p],{[l]:h,[c]:g}=m,b=m._stacks||(m._stacks={});f=b[c]=Fse(i,u,h),f[s]=g,f._top=bj(f,a,!0,r.type),f._bottom=bj(f,a,!1,r.type);const S=f._visualValues||(f._visualValues={});S[s]=g}}function Hx(e,t){const n=e.scales;return Object.keys(n).filter(r=>n[r].axis===t).shift()}function $se(e,t){return is(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function Bse(e,t,n){return is(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function Au(e,t){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t=t||e._parsed;for(const i of t){const o=i._stacks;if(!o||o[r]===void 0||o[r][n]===void 0)return;delete o[r][n],o[r]._visualValues!==void 0&&o[r]._visualValues[n]!==void 0&&delete o[r]._visualValues[n]}}}const Yx=e=>e==="reset"||e==="none",wj=(e,t)=>t?e:Object.assign({},e),Wse=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:vj(n,!0),values:null};class Ih{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,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=Vx(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&&Au(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(d,f,p,m)=>d==="x"?f:d==="r"?m:p,o=n.xAxisID=Oe(r.xAxisID,Hx(t,"x")),a=n.yAxisID=Oe(r.yAxisID,Hx(t,"y")),s=n.rAxisID=Oe(r.rAxisID,Hx(t,"r")),l=n.indexAxis,c=n.iAxisID=i(l,o,a,s),u=n.vAxisID=i(l,a,o,s);n.xScale=this.getScaleForId(o),n.yScale=this.getScaleForId(a),n.rScale=this.getScaleForId(s),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(u)}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 n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&$N(this._data,this),t._stacked&&Au(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(Me(n)){const i=this._cachedMeta;this._data=Ise(n,i)}else if(r!==n){if(r){$N(r,this);const i=this._cachedMeta;Au(i),i._parsed=[]}n&&Object.isExtensible(n)&&xae(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,r=this.getDataset();let i=!1;this._dataCheck();const o=n._stacked;n._stacked=Vx(n.vScale,n),n.stack!==r.stack&&(i=!0,Au(n),n.stack=r.stack),this._resyncElements(t),(i||o!==n._stacked)&&(xj(this,n._parsed),n._stacked=Vx(n.vScale,n))}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:r,_data:i}=this,{iScale:o,_stacked:a}=r,s=o.axis;let l=t===0&&n===i.length?!0:r._sorted,c=t>0&&r._parsed[t-1],u,d,f;if(this._parsing===!1)r._parsed=i,r._sorted=!0,f=i;else{rn(i[t])?f=this.parseArrayData(r,i,t,n):Me(i[t])?f=this.parseObjectData(r,i,t,n):f=this.parsePrimitiveData(r,i,t,n);const p=()=>d[s]===null||c&&d[s]<c[s];for(u=0;u<n;++u)r._parsed[u+t]=d=f[u],l&&(p()&&(l=!1),c=d);r._sorted=l}a&&xj(this,f)}parsePrimitiveData(t,n,r,i){const{iScale:o,vScale:a}=t,s=o.axis,l=a.axis,c=o.getLabels(),u=o===a,d=new Array(i);let f,p,m;for(f=0,p=i;f<p;++f)m=f+r,d[f]={[s]:u||o.parse(c[m],m),[l]:a.parse(n[m],m)};return d}parseArrayData(t,n,r,i){const{xScale:o,yScale:a}=t,s=new Array(i);let l,c,u,d;for(l=0,c=i;l<c;++l)u=l+r,d=n[u],s[l]={x:o.parse(d[0],u),y:a.parse(d[1],u)};return s}parseObjectData(t,n,r,i){const{xScale:o,yScale:a}=t,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,c=new Array(i);let u,d,f,p;for(u=0,d=i;u<d;++u)f=u+r,p=n[f],c[u]={x:o.parse(Ja(p,s),f),y:a.parse(Ja(p,l),f)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,r){const i=this.chart,o=this._cachedMeta,a=n[t.axis],s={keys:vj(i,!0),values:n._stacks[t.axis]._visualValues};return yj(s,a,o.index,{mode:r})}updateRangeFromParsed(t,n,r,i){const o=r[n.axis];let a=o===null?NaN:o;const s=i&&r._stacks[n.axis];i&&s&&(i.values=s,a=yj(i,o,this._cachedMeta.index)),t.min=Math.min(t.min,a),t.max=Math.max(t.max,a)}getMinMax(t,n){const r=this._cachedMeta,i=r._parsed,o=r._sorted&&t===r.iScale,a=i.length,s=this._getOtherScale(t),l=Wse(n,r,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:d}=Lse(s);let f,p;function m(){p=i[f];const h=p[s.axis];return!zr(p[t.axis])||u>h||d<h}for(f=0;f<a&&!(!m()&&(this.updateRangeFromParsed(c,t,p,l),o));++f);if(o){for(f=a-1;f>=0;--f)if(!m()){this.updateRangeFromParsed(c,t,p,l);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed,r=[];let i,o,a;for(i=0,o=n.length;i<o;++i)a=n[i][t.axis],zr(a)&&r.push(a);return r}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,r=n.iScale,i=n.vScale,o=this.getParsed(t);return{label:r?""+r.getLabelForValue(o[r.axis]):"",value:i?""+i.getLabelForValue(o[i.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=jse(Oe(this.options.clip,Nse(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,r=this._cachedMeta,i=r.data||[],o=n.chartArea,a=[],s=this._drawStart||0,l=this._drawCount||i.length-s,c=this.options.drawActiveElementsOnTop;let u;for(r.dataset&&r.dataset.draw(t,o,s,l),u=s;u<s+l;++u){const d=i[u];d.hidden||(d.active&&c?a.push(d):d.draw(t,o))}for(u=0;u<a.length;++u)a[u].draw(t,o)}getStyle(t,n){const r=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(t||0,r)}getContext(t,n,r){const i=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const a=this._cachedMeta.data[t];o=a.$context||(a.$context=Bse(this.getContext(),t,a)),o.parsed=this.getParsed(t),o.raw=i.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=$se(this.chart.getContext(),this.index)),o.dataset=i,o.index=o.datasetIndex=this.index;return o.active=!!n,o.mode=r,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",r){const i=n==="active",o=this._cachedDataOpts,a=t+"-"+n,s=o[a],l=this.enableOptionSharing&&Su(r);if(s)return wj(s,l);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,t),d=i?[`${t}Hover`,"hover",t,""]:[t,""],f=c.getOptionScopes(this.getDataset(),u),p=Object.keys(Lt.elements[t]),m=()=>this.getContext(r,i,n),h=c.resolveNamedOptions(f,p,m,d);return h.$shared&&(h.$shared=l,o[a]=Object.freeze(wj(h,l))),h}_resolveAnimations(t,n,r){const i=this.chart,o=this._cachedDataOpts,a=`animation-${n}`,s=o[a];if(s)return s;let l;if(i.options.animation!==!1){const u=this.chart.config,d=u.datasetAnimationScopeKeys(this._type,n),f=u.getOptionScopes(this.getDataset(),d);l=u.createResolver(f,this.getContext(t,r,n))}const c=new mj(i,l&&l.animations);return l&&l._cacheable&&(o[a]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||Yx(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const r=this.resolveDataElementOptions(t,n),i=this._sharedOptions,o=this.getSharedOptions(r),a=this.includeOptions(n,o)||o!==i;return this.updateSharedOptions(o,n,r),{sharedOptions:o,includeOptions:a}}updateElement(t,n,r,i){Yx(i)?Object.assign(t,r):this._resolveAnimations(n,i).update(t,r)}updateSharedOptions(t,n,r){t&&!Yx(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,i){t.active=i;const o=this.getStyle(n,i);this._resolveAnimations(n,r,i).update(t,{options:!i&&this.getSharedOptions(o)||o})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"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 n=this._data,r=this._cachedMeta.data;for(const[s,l,c]of this._syncList)this[s](l,c);this._syncList=[];const i=r.length,o=n.length,a=Math.min(o,i);a&&this.parse(0,a),o>i?this._insertElements(i,o-i,t):o<i&&this._removeElements(o,i-o)}_insertElements(t,n,r=!0){const i=this._cachedMeta,o=i.data,a=t+n;let s;const l=c=>{for(c.length+=n,s=c.length-1;s>=a;s--)c[s]=c[s-n]};for(l(o),s=t;s<a;++s)o[s]=new this.dataElementType;this._parsing&&l(i._parsed),this.parse(t,n),r&&this.updateElements(o,t,n,"reset")}updateElements(t,n,r,i){}_removeElements(t,n){const r=this._cachedMeta;if(this._parsing){const i=r._parsed.splice(t,n);r._stacked&&Au(r,i)}r.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,r,i]=t;this[n](r,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,n){n&&this._sync(["_removeElements",t,n]);const r=arguments.length-2;r&&this._sync(["_insertElements",t,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function zse(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let r=[];for(let i=0,o=n.length;i<o;i++)r=r.concat(n[i].controller.getAllParsedValues(e));e._cache.$bar=BN(r.sort((i,o)=>i-o))}return e._cache.$bar}function Vse(e){const t=e.iScale,n=zse(t,e.type);let r=t._length,i,o,a,s;const l=()=>{a===32767||a===-32768||(Su(s)&&(r=Math.min(r,Math.abs(a-s)||r)),s=a)};for(i=0,o=n.length;i<o;++i)a=t.getPixelForValue(n[i]),l();for(s=void 0,i=0,o=t.ticks.length;i<o;++i)a=t.getPixelForTick(i),l();return r}function Hse(e,t,n,r){const i=n.barThickness;let o,a;return Ve(i)?(o=t.min*n.categoryPercentage,a=n.barPercentage):(o=i*r,a=1),{chunk:o/r,ratio:a,start:t.pixels[e]-o/2}}function Yse(e,t,n,r){const i=t.pixels,o=i[e];let a=e>0?i[e-1]:null,s=e<i.length-1?i[e+1]:null;const l=n.categoryPercentage;a===null&&(a=o-(s===null?t.end-t.start:s-o)),s===null&&(s=o+o-a);const c=o-(o-Math.min(a,s))/2*l;return{chunk:Math.abs(s-a)/2*l/r,ratio:n.barPercentage,start:c}}function Use(e,t,n,r){const i=n.parse(e[0],r),o=n.parse(e[1],r),a=Math.min(i,o),s=Math.max(i,o);let l=a,c=s;Math.abs(a)>Math.abs(s)&&(l=s,c=a),t[n.axis]=c,t._custom={barStart:l,barEnd:c,start:i,end:o,min:a,max:s}}function _j(e,t,n,r){return rn(e)?Use(e,t,n,r):t[n.axis]=n.parse(e,r),t}function Sj(e,t,n,r){const i=e.iScale,o=e.vScale,a=i.getLabels(),s=i===o,l=[];let c,u,d,f;for(c=n,u=n+r;c<u;++c)f=t[c],d={},d[i.axis]=s||i.parse(a[c],c),l.push(_j(f,d,o,c));return l}function Ux(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function Kse(e,t,n){return e!==0?Ti(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function qse(e){let t,n,r,i,o;return e.horizontal?(t=e.base>e.x,n="left",r="right"):(t=e.base<e.y,n="bottom",r="top"),t?(i="end",o="start"):(i="start",o="end"),{start:n,end:r,reverse:t,top:i,bottom:o}}function Gse(e,t,n,r){let i=t.borderSkipped;const o={};if(!i){e.borderSkipped=o;return}if(i===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:a,end:s,reverse:l,top:c,bottom:u}=qse(e);i==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===r?i=c:(n._bottom||0)===r?i=u:(o[Oj(u,a,s,l)]=!0,i=c)),o[Oj(i,a,s,l)]=!0,e.borderSkipped=o}function Oj(e,t,n,r){return r?(e=Xse(e,t,n),e=Ej(e,n,t)):e=Ej(e,t,n),e}function Xse(e,t,n){return e===t?n:e===n?t:e}function Ej(e,t,n){return e==="start"?t:e==="end"?n:e}function Qse(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class Zse extends Ih{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,n,r,i){return Sj(t,n,r,i)}parseArrayData(t,n,r,i){return Sj(t,n,r,i)}parseObjectData(t,n,r,i){const{iScale:o,vScale:a}=t,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,c=o.axis==="x"?s:l,u=a.axis==="x"?s:l,d=[];let f,p,m,h;for(f=r,p=r+i;f<p;++f)h=n[f],m={},m[o.axis]=o.parse(Ja(h,c),f),d.push(_j(Ja(h,u),m,a,f));return d}updateRangeFromParsed(t,n,r,i){super.updateRangeFromParsed(t,n,r,i);const o=r._custom;o&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const n=this._cachedMeta,{iScale:r,vScale:i}=n,o=this.getParsed(t),a=o._custom,s=Ux(a)?"["+a.start+", "+a.end+"]":""+i.getLabelForValue(o[i.axis]);return{label:""+r.getLabelForValue(o[r.axis]),value:s}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,r,i){const o=i==="reset",{index:a,_cachedMeta:{vScale:s}}=this,l=s.getBasePixel(),c=s.isHorizontal(),u=this._getRuler(),{sharedOptions:d,includeOptions:f}=this._getSharedOptions(n,i);for(let p=n;p<n+r;p++){const m=this.getParsed(p),h=o||Ve(m[s.axis])?{base:l,head:l}:this._calculateBarValuePixels(p),g=this._calculateBarIndexPixels(p,u),b=(m._stacks||{})[s.axis],S={horizontal:c,base:h.base,enableBorderRadius:!b||Ux(m._custom)||a===b._top||a===b._bottom,x:c?h.head:g.center,y:c?g.center:h.head,height:c?g.size:Math.abs(h.size),width:c?Math.abs(h.size):g.size};f&&(S.options=d||this.resolveDataElementOptions(p,t[p].active?"active":i));const w=S.options||t[p].options;Gse(S,w,b,a),Qse(S,w,u.ratio),this.updateElement(t[p],p,S,i)}}_getStacks(t,n){const{iScale:r}=this._cachedMeta,i=r.getMatchingVisibleMetas(this._type).filter(u=>u.controller.options.grouped),o=r.options.stacked,a=[],s=this._cachedMeta.controller.getParsed(n),l=s&&s[r.axis],c=u=>{const d=u._parsed.find(p=>p[r.axis]===l),f=d&&d[u.vScale.axis];if(Ve(f)||isNaN(f))return!0};for(const u of i)if(!(n!==void 0&&c(u))&&((o===!1||a.indexOf(u.stack)===-1||o===void 0&&u.stack===void 0)&&a.push(u.stack),u.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,n=this.chart.options.indexAxis;return Object.keys(t).filter(r=>t[r].axis===n).shift()}_getAxis(){const t={},n=this.getFirstScaleIdForIndexAxis();for(const r of this.chart.data.datasets)t[Oe(this.chart.options.indexAxis==="x"?r.xAxisID:r.yAxisID,n)]=!0;return Object.keys(t)}_getStackIndex(t,n,r){const i=this._getStacks(t,r),o=n!==void 0?i.indexOf(n):-1;return o===-1?i.length-1:o}_getRuler(){const t=this.options,n=this._cachedMeta,r=n.iScale,i=[];let o,a;for(o=0,a=n.data.length;o<a;++o)i.push(r.getPixelForValue(this.getParsed(o)[r.axis],o));const s=t.barThickness;return{min:s||Vse(n),pixels:i,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:t.grouped,ratio:s?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:n,_stacked:r,index:i},options:{base:o,minBarLength:a}}=this,s=o||0,l=this.getParsed(t),c=l._custom,u=Ux(c);let d=l[n.axis],f=0,p=r?this.applyStack(n,l,r):d,m,h;p!==d&&(f=p-d,p=d),u&&(d=c.barStart,p=c.barEnd-c.barStart,d!==0&&Ti(d)!==Ti(c.barEnd)&&(f=0),f+=d);const g=!Ve(o)&&!u?o:f;let b=n.getPixelForValue(g);if(this.chart.getDataVisibility(t)?m=n.getPixelForValue(f+p):m=b,h=m-b,Math.abs(h)<a){h=Kse(h,n,s)*a,d===s&&(b-=h/2);const S=n.getPixelForDecimal(0),w=n.getPixelForDecimal(1),x=Math.min(S,w),_=Math.max(S,w);b=Math.max(Math.min(b,_),x),m=b+h,r&&!u&&(l._stacks[n.axis]._visualValues[i]=n.getValueForPixel(m)-n.getValueForPixel(b))}if(b===n.getPixelForValue(s)){const S=Ti(h)*n.getLineWidthForValue(s)/2;b+=S,h-=S}return{size:h,base:b,head:m,center:m+h/2}}_calculateBarIndexPixels(t,n){const r=n.scale,i=this.options,o=i.skipNull,a=Oe(i.maxBarThickness,1/0);let s,l;const c=this._getAxisCount();if(n.grouped){const u=o?this._getStackCount(t):n.stackCount,d=i.barThickness==="flex"?Yse(t,n,i,u*c):Hse(t,n,i,u*c),f=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,p=this._getAxis().indexOf(Oe(f,this.getFirstScaleIdForIndexAxis())),m=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0)+p;s=d.start+d.chunk*m+d.chunk/2,l=Math.min(a,d.chunk*d.ratio)}else s=r.getPixelForValue(this.getParsed(t)[r.axis],t),l=Math.min(a,n.min*n.ratio);return{base:s-l/2,head:s+l/2,center:s,size:l}}draw(){const t=this._cachedMeta,n=t.vScale,r=t.data,i=r.length;let o=0;for(;o<i;++o)this.getParsed(o)[n.axis]!==null&&!r[o].hidden&&r[o].draw(this._ctx)}}function Jse(e,t,n){let r=1,i=1,o=0,a=0;if(t<At){const s=e,l=s+t,c=Math.cos(s),u=Math.sin(s),d=Math.cos(l),f=Math.sin(l),p=(w,x,_)=>Pu(w,s,l,!0)?1:Math.max(x,x*n,_,_*n),m=(w,x,_)=>Pu(w,s,l,!0)?-1:Math.min(x,x*n,_,_*n),h=p(0,c,d),g=p(Xt,u,f),b=m(ot,c,d),S=m(ot+Xt,u,f);r=(h-b)/2,i=(g-S)/2,o=-(h+b)/2,a=-(g+S)/2}return{ratioX:r,ratioY:i,offsetX:o,offsetY:a}}class ele extends Ih{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:i}}=t.legend.options;return n.labels.map((o,a)=>{const l=t.getDatasetMeta(0).controller.getStyle(a);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}}};constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){const r=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=r;else{let o=l=>+r[l];if(Me(r[t])){const{key:l="value"}=this._parsing;o=c=>+Ja(r[c],l)}let a,s;for(a=t,s=t+n;a<s;++a)i._parsed[a]=o(a)}}_getRotation(){return wo(this.options.rotation-90)}_getCircumference(){return wo(this.options.circumference)}_getRotationExtents(){let t=At,n=-At;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)&&this.chart.getDatasetMeta(r).type===this._type){const i=this.chart.getDatasetMeta(r).controller,o=i._getRotation(),a=i._getCircumference();t=Math.min(t,o),n=Math.max(n,o+a)}return{rotation:t,circumference:n-t}}update(t){const n=this.chart,{chartArea:r}=n,i=this._cachedMeta,o=i.data,a=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,s=Math.max((Math.min(r.width,r.height)-a)/2,0),l=Math.min(rae(this.options.cutout,s),1),c=this._getRingWeight(this.index),{circumference:u,rotation:d}=this._getRotationExtents(),{ratioX:f,ratioY:p,offsetX:m,offsetY:h}=Jse(d,u,l),g=(r.width-a)/f,b=(r.height-a)/p,S=Math.max(Math.min(g,b)/2,0),w=DN(this.options.radius,S),x=Math.max(w*l,0),_=(w-x)/this._getVisibleDatasetWeightTotal();this.offsetX=m*w,this.offsetY=h*w,i.total=this.calculateTotal(),this.outerRadius=w-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*c,0),this.updateElements(o,0,o.length,t)}_circumference(t,n){const r=this.options,i=this._cachedMeta,o=this._getCircumference();return n&&r.animation.animateRotate||!this.chart.getDataVisibility(t)||i._parsed[t]===null||i.data[t].hidden?0:this.calculateCircumference(i._parsed[t]*o/At)}updateElements(t,n,r,i){const o=i==="reset",a=this.chart,s=a.chartArea,c=a.options.animation,u=(s.left+s.right)/2,d=(s.top+s.bottom)/2,f=o&&c.animateScale,p=f?0:this.innerRadius,m=f?0:this.outerRadius,{sharedOptions:h,includeOptions:g}=this._getSharedOptions(n,i);let b=this._getRotation(),S;for(S=0;S<n;++S)b+=this._circumference(S,o);for(S=n;S<n+r;++S){const w=this._circumference(S,o),x=t[S],_={x:u+this.offsetX,y:d+this.offsetY,startAngle:b,endAngle:b+w,circumference:w,outerRadius:m,innerRadius:p};g&&(_.options=h||this.resolveDataElementOptions(S,x.active?"active":i)),b+=w,this.updateElement(x,S,_,i)}}calculateTotal(){const t=this._cachedMeta,n=t.data;let r=0,i;for(i=0;i<n.length;i++){const o=t._parsed[i];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(i)&&!n[i].hidden&&(r+=Math.abs(o))}return r}calculateCircumference(t){const n=this._cachedMeta.total;return n>0&&!isNaN(t)?At*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],o=Tx(n._parsed[t],r.options.locale);return{label:i[t]||"",value:o}}getMaxBorderWidth(t){let n=0;const r=this.chart;let i,o,a,s,l;if(!t){for(i=0,o=r.data.datasets.length;i<o;++i)if(r.isDatasetVisible(i)){a=r.getDatasetMeta(i),t=a.data,s=a.controller;break}}if(!t)return 0;for(i=0,o=t.length;i<o;++i)l=s.resolveDataElementOptions(i),l.borderAlign!=="inner"&&(n=Math.max(n,l.borderWidth||0,l.hoverBorderWidth||0));return n}getMaxOffset(t){let n=0;for(let r=0,i=t.length;r<i;++r){const o=this.resolveDataElementOptions(r);n=Math.max(n,o.offset||0,o.hoverOffset||0)}return n}_getRingWeightOffset(t){let n=0;for(let r=0;r<t;++r)this.chart.isDatasetVisible(r)&&(n+=this._getRingWeight(r));return n}_getRingWeight(t){return Math.max(Oe(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class tle extends Ih{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 n=this._cachedMeta,{dataset:r,data:i=[],_dataset:o}=n,a=this.chart._animationsDisabled;let{start:s,count:l}=Sae(n,i,a);this._drawStart=s,this._drawCount=l,Oae(n)&&(s=0,l=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!o._decimated,r.points=i;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(r,void 0,{animated:!a,options:c},t),this.updateElements(i,s,l,t)}updateElements(t,n,r,i){const o=i==="reset",{iScale:a,vScale:s,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:d}=this._getSharedOptions(n,i),f=a.axis,p=s.axis,{spanGaps:m,segment:h}=this.options,g=Eu(m)?m:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||o||i==="none",S=n+r,w=t.length;let x=n>0&&this.getParsed(n-1);for(let _=0;_<w;++_){const E=t[_],C=b?E:{};if(_<n||_>=S){C.skip=!0;continue}const D=this.getParsed(_),T=Ve(D[p]),j=C[f]=a.getPixelForValue(D[f],_),A=C[p]=o||T?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,D,l):D[p],_);C.skip=isNaN(j)||isNaN(A)||T,C.stop=_>0&&Math.abs(D[f]-x[f])>g,h&&(C.parsed=D,C.raw=c.data[_]),d&&(C.options=u||this.resolveDataElementOptions(_,E.active?"active":i)),b||this.updateElement(E,_,C,i),x=D}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,r=n.options&&n.options.borderWidth||0,i=t.data||[];if(!i.length)return r;const o=i[0].size(this.resolveDataElementOptions(0)),a=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,o,a)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}function ls(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Kx{static override(t){Object.assign(Kx.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return ls()}parse(){return ls()}format(){return ls()}add(){return ls()}diff(){return ls()}startOf(){return ls()}endOf(){return ls()}}var nle={_date:Kx};function rle(e,t,n,r){const{controller:i,data:o,_sorted:a}=e,s=i._cachedMeta.iScale,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(s&&t===s.axis&&t!=="r"&&a&&o.length){const c=s._reversePixels?yae:ts;if(r){if(i._sharedOptions){const u=o[0],d=typeof u.getRange=="function"&&u.getRange(t);if(d){const f=c(o,t,n-d),p=c(o,t,n+d);return{lo:f.lo,hi:p.hi}}}}else{const u=c(o,t,n);if(l){const{vScale:d}=i._cachedMeta,{_parsed:f}=e,p=f.slice(0,u.lo+1).reverse().findIndex(h=>!Ve(h[d.axis]));u.lo-=Math.max(0,p);const m=f.slice(u.hi).findIndex(h=>!Ve(h[d.axis]));u.hi+=Math.max(0,m)}return u}}return{lo:0,hi:o.length-1}}function Rh(e,t,n,r,i){const o=e.getSortedVisibleDatasetMetas(),a=n[t];for(let s=0,l=o.length;s<l;++s){const{index:c,data:u}=o[s],{lo:d,hi:f}=rle(o[s],t,a,i);for(let p=d;p<=f;++p){const m=u[p];m.skip||r(m,c,p)}}}function ile(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(r,i){const o=t?Math.abs(r.x-i.x):0,a=n?Math.abs(r.y-i.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(a,2))}}function qx(e,t,n,r,i){const o=[];return!i&&!e.isPointInArea(t)||Rh(e,n,t,function(s,l,c){!i&&!Du(s,e.chartArea,0)||s.inRange(t.x,t.y,r)&&o.push({element:s,datasetIndex:l,index:c})},!0),o}function ole(e,t,n,r){let i=[];function o(a,s,l){const{startAngle:c,endAngle:u}=a.getProps(["startAngle","endAngle"],r),{angle:d}=LN(a,{x:t.x,y:t.y});Pu(d,c,u)&&i.push({element:a,datasetIndex:s,index:l})}return Rh(e,n,t,o),i}function ale(e,t,n,r,i,o){let a=[];const s=ile(n);let l=Number.POSITIVE_INFINITY;function c(u,d,f){const p=u.inRange(t.x,t.y,i);if(r&&!p)return;const m=u.getCenterPoint(i);if(!(!!o||e.isPointInArea(m))&&!p)return;const g=s(t,m);g<l?(a=[{element:u,datasetIndex:d,index:f}],l=g):g===l&&a.push({element:u,datasetIndex:d,index:f})}return Rh(e,n,t,c),a}function Gx(e,t,n,r,i,o){return!o&&!e.isPointInArea(t)?[]:n==="r"&&!r?ole(e,t,n,i):ale(e,t,n,r,i,o)}function Pj(e,t,n,r,i){const o=[],a=n==="x"?"inXRange":"inYRange";let s=!1;return Rh(e,n,t,(l,c,u)=>{l[a]&&l[a](t[n],i)&&(o.push({element:l,datasetIndex:c,index:u}),s=s||l.inRange(t.x,t.y,i))}),r&&!s?[]:o}var sle={modes:{index(e,t,n,r){const i=as(t,e),o=n.axis||"x",a=n.includeInvisible||!1,s=n.intersect?qx(e,i,o,r,a):Gx(e,i,o,!1,r,a),l=[];return s.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const u=s[0].index,d=c.data[u];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:u})}),l):[]},dataset(e,t,n,r){const i=as(t,e),o=n.axis||"xy",a=n.includeInvisible||!1;let s=n.intersect?qx(e,i,o,r,a):Gx(e,i,o,!1,r,a);if(s.length>0){const l=s[0].datasetIndex,c=e.getDatasetMeta(l).data;s=[];for(let u=0;u<c.length;++u)s.push({element:c[u],datasetIndex:l,index:u})}return s},point(e,t,n,r){const i=as(t,e),o=n.axis||"xy",a=n.includeInvisible||!1;return qx(e,i,o,r,a)},nearest(e,t,n,r){const i=as(t,e),o=n.axis||"xy",a=n.includeInvisible||!1;return Gx(e,i,o,n.intersect,r,a)},x(e,t,n,r){const i=as(t,e);return Pj(e,i,"x",n.intersect,r)},y(e,t,n,r){const i=as(t,e);return Pj(e,i,"y",n.intersect,r)}}};const kj=["left","top","right","bottom"];function Tu(e,t){return e.filter(n=>n.pos===t)}function Cj(e,t){return e.filter(n=>kj.indexOf(n.pos)===-1&&n.box.axis===t)}function Mu(e,t){return e.sort((n,r)=>{const i=t?r:n,o=t?n:r;return i.weight===o.weight?i.index-o.index:i.weight-o.weight})}function lle(e){const t=[];let n,r,i,o,a,s;for(n=0,r=(e||[]).length;n<r;++n)i=e[n],{position:o,options:{stack:a,stackWeight:s=1}}=i,t.push({index:n,box:i,pos:o,horizontal:i.isHorizontal(),weight:i.weight,stack:a&&o+a,stackWeight:s});return t}function cle(e){const t={};for(const n of e){const{stack:r,pos:i,stackWeight:o}=n;if(!r||!kj.includes(i))continue;const a=t[r]||(t[r]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=o}return t}function ule(e,t){const n=cle(e),{vBoxMaxWidth:r,hBoxMaxHeight:i}=t;let o,a,s;for(o=0,a=e.length;o<a;++o){s=e[o];const{fullSize:l}=s.box,c=n[s.stack],u=c&&s.stackWeight/c.weight;s.horizontal?(s.width=u?u*r:l&&t.availableWidth,s.height=i):(s.width=r,s.height=u?u*i:l&&t.availableHeight)}return n}function dle(e){const t=lle(e),n=Mu(t.filter(c=>c.box.fullSize),!0),r=Mu(Tu(t,"left"),!0),i=Mu(Tu(t,"right")),o=Mu(Tu(t,"top"),!0),a=Mu(Tu(t,"bottom")),s=Cj(t,"x"),l=Cj(t,"y");return{fullSize:n,leftAndTop:r.concat(o),rightAndBottom:i.concat(l).concat(a).concat(s),chartArea:Tu(t,"chartArea"),vertical:r.concat(i).concat(l),horizontal:o.concat(a).concat(s)}}function Dj(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function Aj(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function fle(e,t,n,r){const{pos:i,box:o}=n,a=e.maxPadding;if(!Me(i)){n.size&&(e[i]-=n.size);const d=r[n.stack]||{size:0,count:1};d.size=Math.max(d.size,n.horizontal?o.height:o.width),n.size=d.size/d.count,e[i]+=n.size}o.getPadding&&Aj(a,o.getPadding());const s=Math.max(0,t.outerWidth-Dj(a,e,"left","right")),l=Math.max(0,t.outerHeight-Dj(a,e,"top","bottom")),c=s!==e.w,u=l!==e.h;return e.w=s,e.h=l,n.horizontal?{same:c,other:u}:{same:u,other:c}}function ple(e){const t=e.maxPadding;function n(r){const i=Math.max(t[r]-e[r],0);return e[r]+=i,i}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function hle(e,t){const n=t.maxPadding;function r(i){const o={left:0,top:0,right:0,bottom:0};return i.forEach(a=>{o[a]=Math.max(t[a],n[a])}),o}return r(e?["left","right"]:["top","bottom"])}function Nu(e,t,n,r){const i=[];let o,a,s,l,c,u;for(o=0,a=e.length,c=0;o<a;++o){s=e[o],l=s.box,l.update(s.width||t.w,s.height||t.h,hle(s.horizontal,t));const{same:d,other:f}=fle(t,n,s,r);c|=d&&i.length,u=u||f,l.fullSize||i.push(s)}return c&&Nu(i,t,n,r)||u}function Lh(e,t,n,r,i){e.top=n,e.left=t,e.right=t+r,e.bottom=n+i,e.width=r,e.height=i}function Tj(e,t,n,r){const i=n.padding;let{x:o,y:a}=t;for(const s of e){const l=s.box,c=r[s.stack]||{placed:0,weight:1},u=s.stackWeight/c.weight||1;if(s.horizontal){const d=t.w*u,f=c.size||l.height;Su(c.start)&&(a=c.start),l.fullSize?Lh(l,i.left,a,n.outerWidth-i.right-i.left,f):Lh(l,t.left+c.placed,a,d,f),c.start=a,c.placed+=d,a=l.bottom}else{const d=t.h*u,f=c.size||l.width;Su(c.start)&&(o=c.start),l.fullSize?Lh(l,o,i.top,f,n.outerHeight-i.bottom-i.top):Lh(l,o,t.top+c.placed,f,d),c.start=o,c.placed+=d,o=l.right}}t.x=o,t.y=a}var ia={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,r){if(!e)return;const i=Jr(e.options.layout.padding),o=Math.max(t-i.width,0),a=Math.max(n-i.height,0),s=dle(e.boxes),l=s.vertical,c=s.horizontal;Ze(e.boxes,h=>{typeof h.beforeLayout=="function"&&h.beforeLayout()});const u=l.reduce((h,g)=>g.box.options&&g.box.options.display===!1?h:h+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/u,hBoxMaxHeight:a/2}),f=Object.assign({},i);Aj(f,Jr(r));const p=Object.assign({maxPadding:f,w:o,h:a,x:i.left,y:i.top},i),m=ule(l.concat(c),d);Nu(s.fullSize,p,d,m),Nu(l,p,d,m),Nu(c,p,d,m)&&Nu(l,p,d,m),ple(p),Tj(s.leftAndTop,p,d,m),p.x+=p.w,p.y+=p.h,Tj(s.rightAndBottom,p,d,m),e.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},Ze(s.chartArea,h=>{const g=h.box;Object.assign(g,e.chartArea),g.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}};class Mj{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,r){}removeEventListener(t,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,r,i){return n=Math.max(0,n||t.width),r=r||t.height,{width:n,height:Math.max(0,i?Math.floor(n/i):r)}}isAttached(t){return!0}updateConfig(t){}}class mle extends Mj{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Fh="$chartjs",gle={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Nj=e=>e===null||e==="";function vle(e,t){const n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[Fh]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Nj(i)){const o=sj(e,"width");o!==void 0&&(e.width=o)}if(Nj(r))if(e.style.height==="")e.height=e.width/(t||2);else{const o=sj(e,"height");o!==void 0&&(e.height=o)}return e}const jj=pse?{passive:!0}:!1;function yle(e,t,n){e&&e.addEventListener(t,n,jj)}function ble(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,jj)}function xle(e,t){const n=gle[e.type]||e.type,{x:r,y:i}=as(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:i!==void 0?i:null}}function $h(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function wle(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let a=!1;for(const s of o)a=a||$h(s.addedNodes,r),a=a&&!$h(s.removedNodes,r);a&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function _le(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let a=!1;for(const s of o)a=a||$h(s.removedNodes,r),a=a&&!$h(s.addedNodes,r);a&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const ju=new Map;let Ij=0;function Rj(){const e=window.devicePixelRatio;e!==Ij&&(Ij=e,ju.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function Sle(e,t){ju.size||window.addEventListener("resize",Rj),ju.set(e,t)}function Ole(e){ju.delete(e),ju.size||window.removeEventListener("resize",Rj)}function Ele(e,t,n){const r=e.canvas,i=r&&zx(r);if(!i)return;const o=zN((s,l)=>{const c=i.clientWidth;n(s,l),c<i.clientWidth&&n()},window),a=new ResizeObserver(s=>{const l=s[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||o(c,u)});return a.observe(i),Sle(e,o),a}function Xx(e,t,n){n&&n.disconnect(),t==="resize"&&Ole(e)}function Ple(e,t,n){const r=e.canvas,i=zN(o=>{e.ctx!==null&&n(xle(o,e))},e);return yle(r,t,i),i}class kle extends Mj{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(vle(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[Fh])return!1;const r=n[Fh].initial;["height","width"].forEach(o=>{const a=r[o];Ve(a)?n.removeAttribute(o):n.setAttribute(o,a)});const i=r.style||{};return Object.keys(i).forEach(o=>{n.style[o]=i[o]}),n.width=n.width,delete n[Fh],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),a={attach:wle,detach:_le,resize:Ele}[n]||Ple;i[n]=a(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),i=r[n];if(!i)return;({attach:Xx,detach:Xx,resize:Xx}[n]||ble)(t,n,i),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,i){return fse(t,n,r,i)}isAttached(t){const n=t&&zx(t);return!!(n&&n.isConnected)}}function Cle(e){return!Wx()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?mle:kle}let oa=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}hasValue(){return Eu(this.x)&&Eu(this.y)}getProps(t,n){const r=this.$animations;if(!n||!r)return this;const i={};return t.forEach(o=>{i[o]=r[o]&&r[o].active()?r[o]._to:this[o]}),i}};function Dle(e,t){const n=e.options.ticks,r=Ale(e),i=Math.min(n.maxTicksLimit||r,r),o=n.major.enabled?Mle(t):[],a=o.length,s=o[0],l=o[a-1],c=[];if(a>i)return Nle(t,c,o,a/i),c;const u=Tle(o,t,i);if(a>0){let d,f;const p=a>1?Math.round((l-s)/(a-1)):null;for(Bh(t,c,u,Ve(p)?0:s-p,s),d=0,f=a-1;d<f;d++)Bh(t,c,u,o[d],o[d+1]);return Bh(t,c,u,l,Ve(p)?t.length:l+p),c}return Bh(t,c,u),c}function Ale(e){const t=e.options.offset,n=e._tickSize(),r=e._length/n+(t?0:1),i=e._maxLength/n;return Math.floor(Math.min(r,i))}function Tle(e,t,n){const r=jle(e),i=t.length/n;if(!r)return Math.max(i,1);const o=dae(r);for(let a=0,s=o.length-1;a<s;a++){const l=o[a];if(l>i)return l}return Math.max(i,1)}function Mle(e){const t=[];let n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&t.push(n);return t}function Nle(e,t,n,r){let i=0,o=n[0],a;for(r=Math.ceil(r),a=0;a<e.length;a++)a===o&&(t.push(e[a]),i++,o=n[i*r])}function Bh(e,t,n,r,i){const o=Oe(r,0),a=Math.min(Oe(i,e.length),e.length);let s=0,l,c,u;for(n=Math.ceil(n),i&&(l=i-r,n=l/Math.floor(l/n)),u=o;u<0;)s++,u=Math.round(o+s*n);for(c=Math.max(o,0);c<a;c++)c===u&&(t.push(e[c]),s++,u=Math.round(o+s*n))}function jle(e){const t=e.length;let n,r;if(t<2)return!1;for(r=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==r)return!1;return r}const Ile=e=>e==="left"?"right":e==="right"?"left":e,Lj=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,Fj=(e,t)=>Math.min(t||e,e);function $j(e,t){const n=[],r=e.length/t,i=e.length;let o=0;for(;o<i;o+=r)n.push(e[Math.floor(o)]);return n}function Rle(e,t,n){const r=e.ticks.length,i=Math.min(t,r-1),o=e._startPixel,a=e._endPixel,s=1e-6;let l=e.getPixelForTick(i),c;if(!(n&&(r===1?c=Math.max(l-o,a-l):t===0?c=(e.getPixelForTick(1)-l)/2:c=(l-e.getPixelForTick(i-1))/2,l+=i<t?c:-c,l<o-s||l>a+s)))return l}function Lle(e,t){Ze(e,n=>{const r=n.gc,i=r.length/2;let o;if(i>t){for(o=0;o<i;++o)delete n.data[r[o]];r.splice(0,i)}})}function Iu(e){return e.drawTicks?e.tickLength:0}function Bj(e,t){if(!e.display)return 0;const n=Jn(e.font,t),r=Jr(e.padding);return(rn(e.text)?e.text.length:1)*n.lineHeight+r.height}function Fle(e,t){return is(e,{scale:t,type:"scale"})}function $le(e,t,n){return is(e,{tick:n,index:t,type:"tick"})}function Ble(e,t,n){let r=VN(e);return(n&&t!=="right"||!n&&t==="right")&&(r=Ile(r)),r}function Wle(e,t,n,r){const{top:i,left:o,bottom:a,right:s,chart:l}=e,{chartArea:c,scales:u}=l;let d=0,f,p,m;const h=a-i,g=s-o;if(e.isHorizontal()){if(p=xr(r,o,s),Me(n)){const b=Object.keys(n)[0],S=n[b];m=u[b].getPixelForValue(S)+h-t}else n==="center"?m=(c.bottom+c.top)/2+h-t:m=Lj(e,n,t);f=s-o}else{if(Me(n)){const b=Object.keys(n)[0],S=n[b];p=u[b].getPixelForValue(S)-g+t}else n==="center"?p=(c.left+c.right)/2-g+t:p=Lj(e,n,t);m=xr(r,a,i),d=n==="left"?-Xt:Xt}return{titleX:p,titleY:m,maxWidth:f,rotation:d}}class Sl extends oa{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,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:r,_suggestedMax:i}=this;return t=Ai(t,Number.POSITIVE_INFINITY),n=Ai(n,Number.NEGATIVE_INFINITY),r=Ai(r,Number.POSITIVE_INFINITY),i=Ai(i,Number.NEGATIVE_INFINITY),{min:Ai(t,r),max:Ai(n,i),minDefined:zr(t),maxDefined:zr(n)}}getMinMax(t){let{min:n,max:r,minDefined:i,maxDefined:o}=this.getUserBounds(),a;if(i&&o)return{min:n,max:r};const s=this.getMatchingVisibleMetas();for(let l=0,c=s.length;l<c;++l)a=s[l].controller.getMinMax(this,t),i||(n=Math.min(n,a.min)),o||(r=Math.max(r,a.max));return n=o&&n>r?r:n,r=i&&n>r?n:r,{min:Ai(n,Ai(r,n)),max:Ai(r,Ai(n,r))}}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(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){ht(this.options.beforeUpdate,[this])}update(t,n,r){const{beginAtZero:i,grace:o,ticks:a}=this.options,s=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Hae(this,o,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=s<this.ticks.length;this._convertTicksToLabels(l?$j(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source==="auto")&&(this.ticks=Dle(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,n,r;this.isHorizontal()?(n=this.left,r=this.right):(n=this.top,r=this.bottom,t=!t),this._startPixel=n,this._endPixel=r,this._reversePixels=t,this._length=r-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){ht(this.options.afterUpdate,[this])}beforeSetDimensions(){ht(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(){ht(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),ht(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){ht(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let r,i,o;for(r=0,i=t.length;r<i;r++)o=t[r],o.label=ht(n.callback,[o.value,r,t],this)}afterTickToLabelConversion(){ht(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){ht(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,r=Fj(this.ticks.length,t.ticks.maxTicksLimit),i=n.minRotation||0,o=n.maxRotation;let a=i,s,l,c;if(!this._isVisible()||!n.display||i>=o||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const u=this._getLabelSizes(),d=u.widest.width,f=u.highest.height,p=kn(this.chart.width-d,0,this.maxWidth);s=t.offset?this.maxWidth/r:p/(r-1),d+6>s&&(s=p/(r-(t.offset?.5:1)),l=this.maxHeight-Iu(t.grid)-n.padding-Bj(t.title,this.chart.options.font),c=Math.sqrt(d*d+f*f),a=mae(Math.min(Math.asin(kn((u.highest.height+6)/s,-1,1)),Math.asin(kn(l/c,-1,1))-Math.asin(kn(f/c,-1,1)))),a=Math.max(i,Math.min(o,a))),this.labelRotation=a}afterCalculateLabelRotation(){ht(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){ht(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:o}}=this,a=this._isVisible(),s=this.isHorizontal();if(a){const l=Bj(i,n.options.font);if(s?(t.width=this.maxWidth,t.height=Iu(o)+l):(t.height=this.maxHeight,t.width=Iu(o)+l),r.display&&this.ticks.length){const{first:c,last:u,widest:d,highest:f}=this._getLabelSizes(),p=r.padding*2,m=wo(this.labelRotation),h=Math.cos(m),g=Math.sin(m);if(s){const b=r.mirror?0:g*d.width+h*f.height;t.height=Math.min(this.maxHeight,t.height+b+p)}else{const b=r.mirror?0:h*d.width+g*f.height;t.width=Math.min(this.maxWidth,t.width+b+p)}this._calculatePadding(c,u,g,h)}}this._handleMargins(),s?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,r,i){const{ticks:{align:o,padding:a},position:s}=this.options,l=this.labelRotation!==0,c=s!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,p=0;l?c?(f=i*t.width,p=r*n.height):(f=r*t.height,p=i*n.width):o==="start"?p=n.width:o==="end"?f=t.width:o!=="inner"&&(f=t.width/2,p=n.width/2),this.paddingLeft=Math.max((f-u+a)*this.width/(this.width-u),0),this.paddingRight=Math.max((p-d+a)*this.width/(this.width-d),0)}else{let u=n.height/2,d=t.height/2;o==="start"?(u=0,d=t.height):o==="end"&&(u=n.height,d=0),this.paddingTop=u+a,this.paddingBottom=d+a}}_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(){ht(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,r;for(n=0,r=t.length;n<r;n++)Ve(t[n].label)&&(t.splice(n,1),r--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let r=this.ticks;n<r.length&&(r=$j(r,n)),this._labelSizes=t=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,r){const{ctx:i,_longestTextCache:o}=this,a=[],s=[],l=Math.floor(n/Fj(n,r));let c=0,u=0,d,f,p,m,h,g,b,S,w,x,_;for(d=0;d<n;d+=l){if(m=t[d].label,h=this._resolveTickFontOptions(d),i.font=g=h.string,b=o[g]=o[g]||{data:{},gc:[]},S=h.lineHeight,w=x=0,!Ve(m)&&!rn(m))w=GN(i,b.data,b.gc,w,m),x=S;else if(rn(m))for(f=0,p=m.length;f<p;++f)_=m[f],!Ve(_)&&!rn(_)&&(w=GN(i,b.data,b.gc,w,_),x+=S);a.push(w),s.push(x),c=Math.max(w,c),u=Math.max(x,u)}Lle(o,n);const E=a.indexOf(c),C=s.indexOf(u),D=T=>({width:a[T]||0,height:s[T]||0});return{first:D(0),last:D(n-1),widest:D(E),highest:D(C),widths:a,heights:s}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return vae(this._alignToPixels?rs(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const r=n[t];return r.$context||(r.$context=$le(this.getContext(),t,r))}return this.$context||(this.$context=Fle(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=wo(this.labelRotation),r=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),o=this._getLabelSizes(),a=t.autoSkipPadding||0,s=o?o.widest.width+a:0,l=o?o.highest.height+a:0;return this.isHorizontal()?l*r>s*i?s/r:l/i:l*i<s*r?l/r:s/i}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis,r=this.chart,i=this.options,{grid:o,position:a,border:s}=i,l=o.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),f=Iu(o),p=[],m=s.setContext(this.getContext()),h=m.display?m.width:0,g=h/2,b=function(L){return rs(r,L,h)};let S,w,x,_,E,C,D,T,j,A,P,N;if(a==="top")S=b(this.bottom),C=this.bottom-f,T=S-g,A=b(t.top)+g,N=t.bottom;else if(a==="bottom")S=b(this.top),A=t.top,N=b(t.bottom)-g,C=S+g,T=this.top+f;else if(a==="left")S=b(this.right),E=this.right-f,D=S-g,j=b(t.left)+g,P=t.right;else if(a==="right")S=b(this.left),j=t.left,P=b(t.right)-g,E=S+g,D=this.left+f;else if(n==="x"){if(a==="center")S=b((t.top+t.bottom)/2+.5);else if(Me(a)){const L=Object.keys(a)[0],$=a[L];S=b(this.chart.scales[L].getPixelForValue($))}A=t.top,N=t.bottom,C=S+g,T=C+f}else if(n==="y"){if(a==="center")S=b((t.left+t.right)/2);else if(Me(a)){const L=Object.keys(a)[0],$=a[L];S=b(this.chart.scales[L].getPixelForValue($))}E=S-g,D=E-f,j=t.left,P=t.right}const M=Oe(i.ticks.maxTicksLimit,d),R=Math.max(1,Math.ceil(d/M));for(w=0;w<d;w+=R){const L=this.getContext(w),$=o.setContext(L),V=s.setContext(L),z=$.lineWidth,B=$.color,X=V.dash||[],q=V.dashOffset,re=$.tickWidth,J=$.tickColor,ee=$.tickBorderDash||[],oe=$.tickBorderDashOffset;x=Rle(this,w,l),x!==void 0&&(_=rs(r,x,z),c?E=D=j=P=_:C=T=A=N=_,p.push({tx1:E,ty1:C,tx2:D,ty2:T,x1:j,y1:A,x2:P,y2:N,width:z,color:B,borderDash:X,borderDashOffset:q,tickWidth:re,tickColor:J,tickBorderDash:ee,tickBorderDashOffset:oe}))}return this._ticksLength=d,this._borderValue=S,p}_computeLabelItems(t){const n=this.axis,r=this.options,{position:i,ticks:o}=r,a=this.isHorizontal(),s=this.ticks,{align:l,crossAlign:c,padding:u,mirror:d}=o,f=Iu(r.grid),p=f+u,m=d?-u:p,h=-wo(this.labelRotation),g=[];let b,S,w,x,_,E,C,D,T,j,A,P,N="middle";if(i==="top")E=this.bottom-m,C=this._getXAxisLabelAlignment();else if(i==="bottom")E=this.top+m,C=this._getXAxisLabelAlignment();else if(i==="left"){const R=this._getYAxisLabelAlignment(f);C=R.textAlign,_=R.x}else if(i==="right"){const R=this._getYAxisLabelAlignment(f);C=R.textAlign,_=R.x}else if(n==="x"){if(i==="center")E=(t.top+t.bottom)/2+p;else if(Me(i)){const R=Object.keys(i)[0],L=i[R];E=this.chart.scales[R].getPixelForValue(L)+p}C=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")_=(t.left+t.right)/2-p;else if(Me(i)){const R=Object.keys(i)[0],L=i[R];_=this.chart.scales[R].getPixelForValue(L)}C=this._getYAxisLabelAlignment(f).textAlign}n==="y"&&(l==="start"?N="top":l==="end"&&(N="bottom"));const M=this._getLabelSizes();for(b=0,S=s.length;b<S;++b){w=s[b],x=w.label;const R=o.setContext(this.getContext(b));D=this.getPixelForTick(b)+o.labelOffset,T=this._resolveTickFontOptions(b),j=T.lineHeight,A=rn(x)?x.length:1;const L=A/2,$=R.color,V=R.textStrokeColor,z=R.textStrokeWidth;let B=C;a?(_=D,C==="inner"&&(b===S-1?B=this.options.reverse?"left":"right":b===0?B=this.options.reverse?"right":"left":B="center"),i==="top"?c==="near"||h!==0?P=-A*j+j/2:c==="center"?P=-M.highest.height/2-L*j+j:P=-M.highest.height+j/2:c==="near"||h!==0?P=j/2:c==="center"?P=M.highest.height/2-L*j:P=M.highest.height-A*j,d&&(P*=-1),h!==0&&!R.showLabelBackdrop&&(_+=j/2*Math.sin(h))):(E=D,P=(1-A)*j/2);let X;if(R.showLabelBackdrop){const q=Jr(R.backdropPadding),re=M.heights[b],J=M.widths[b];let ee=P-q.top,oe=0-q.left;switch(N){case"middle":ee-=re/2;break;case"bottom":ee-=re;break}switch(C){case"center":oe-=J/2;break;case"right":oe-=J;break;case"inner":b===S-1?oe-=J:b>0&&(oe-=J/2);break}X={left:oe,top:ee,width:J+q.width,height:re+q.height,color:R.backdropColor}}g.push({label:x,font:T,textOffset:P,options:{rotation:h,color:$,strokeColor:V,strokeWidth:z,textAlign:B,textBaseline:N,translation:[_,E],backdrop:X}})}return g}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-wo(this.labelRotation))return t==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:r,mirror:i,padding:o}}=this.options,a=this._getLabelSizes(),s=t+o,l=a.widest.width;let c,u;return n==="left"?i?(u=this.right+o,r==="near"?c="left":r==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-s,r==="near"?c="right":r==="center"?(c="center",u-=l/2):(c="left",u=this.left)):n==="right"?i?(u=this.left+o,r==="near"?c="right":r==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+s,r==="near"?c="left":r==="center"?(c="center",u+=l/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:r,top:i,width:o,height:a}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(r,i,o,a),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(o=>o.value===t);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const n=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,a;const s=(l,c,u)=>{!u.width||!u.color||(r.save(),r.lineWidth=u.width,r.strokeStyle=u.color,r.setLineDash(u.borderDash||[]),r.lineDashOffset=u.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(c.x,c.y),r.stroke(),r.restore())};if(n.display)for(o=0,a=i.length;o<a;++o){const l=i[o];n.drawOnChartArea&&s({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.drawTicks&&s({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:n,options:{border:r,grid:i}}=this,o=r.setContext(this.getContext()),a=r.display?o.width:0;if(!a)return;const s=i.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,u,d,f;this.isHorizontal()?(c=rs(t,this.left,a)-a/2,u=rs(t,this.right,s)+s/2,d=f=l):(d=rs(t,this.top,a)-a/2,f=rs(t,this.bottom,s)+s/2,c=u=l),n.save(),n.lineWidth=o.width,n.strokeStyle=o.color,n.beginPath(),n.moveTo(c,d),n.lineTo(u,f),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const r=this.ctx,i=this._computeLabelArea();i&&Ix(r,i);const o=this.getLabelItems(t);for(const a of o){const s=a.options,l=a.font,c=a.label,u=a.textOffset;kh(r,c,0,u,l,s)}i&&Rx(r)}drawTitle(){const{ctx:t,options:{position:n,title:r,reverse:i}}=this;if(!r.display)return;const o=Jn(r.font),a=Jr(r.padding),s=r.align;let l=o.lineHeight/2;n==="bottom"||n==="center"||Me(n)?(l+=a.bottom,rn(r.text)&&(l+=o.lineHeight*(r.text.length-1))):l+=a.top;const{titleX:c,titleY:u,maxWidth:d,rotation:f}=Wle(this,l,n,s);kh(t,r.text,0,0,o,{color:r.color,maxWidth:d,rotation:f,textAlign:Ble(s,n,i),textBaseline:"middle",translation:[c,u]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,n=t.ticks&&t.ticks.z||0,r=Oe(t.grid&&t.grid.z,-1),i=Oe(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==Sl.prototype.draw?[{z:n,draw:o=>{this.draw(o)}}]:[{z:r,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[];let o,a;for(o=0,a=n.length;o<a;++o){const s=n[o];s[r]===this.id&&(!t||s.type===t)&&i.push(s)}return i}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return Jn(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Wh{constructor(t,n,r){this.type=t,this.scope=n,this.override=r,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let r;Hle(n)&&(r=this.register(n));const i=this.items,o=t.id,a=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in i||(i[o]=t,zle(t,a,r),this.override&&Lt.override(t.id,t.overrides)),a}get(t){return this.items[t]}unregister(t){const n=this.items,r=t.id,i=this.scope;r in n&&delete n[r],i&&r in Lt[i]&&(delete Lt[i][r],this.override&&delete ns[r])}}function zle(e,t,n){const r=wu(Object.create(null),[n?Lt.get(n):{},Lt.get(t),e.defaults]);Lt.set(t,r),e.defaultRoutes&&Vle(t,e.defaultRoutes),e.descriptors&&Lt.describe(t,e.descriptors)}function Vle(e,t){Object.keys(t).forEach(n=>{const r=n.split("."),i=r.pop(),o=[e].concat(r).join("."),a=t[n].split("."),s=a.pop(),l=a.join(".");Lt.route(o,i,l,s)})}function Hle(e){return"id"in e&&"defaults"in e}class Yle{constructor(){this.controllers=new Wh(Ih,"datasets",!0),this.elements=new Wh(oa,"elements"),this.plugins=new Wh(Object,"plugins"),this.scales=new Wh(Sl,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,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(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,r){[...n].forEach(i=>{const o=r||this._getRegistryForType(i);r||o.isForType(i)||o===this.plugins&&i.id?this._exec(t,o,i):Ze(i,a=>{const s=r||this._getRegistryForType(a);this._exec(t,s,a)})})}_exec(t,n,r){const i=Px(t);ht(r["before"+i],[],r),n[t](r),ht(r["after"+i],[],r)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const r=this._typedRegistries[n];if(r.isForType(t))return r}return this.plugins}_get(t,n,r){const i=n.get(t);if(i===void 0)throw new Error('"'+t+'" is not a registered '+r+".");return i}}var Mi=new Yle;class Ule{constructor(){this._init=[]}notify(t,n,r,i){n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const o=i?this._descriptors(t).filter(i):this._descriptors(t),a=this._notify(o,t,n,r);return n==="afterDestroy"&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall")),a}_notify(t,n,r,i){i=i||{};for(const o of t){const a=o.plugin,s=a[r],l=[n,i,o.options];if(ht(s,l,a)===!1&&i.cancelable)return!1}return!0}invalidate(){Ve(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){const r=t&&t.config,i=Oe(r.options&&r.options.plugins,{}),o=Kle(r);return i===!1&&!n?[]:Gle(t,o,i,n)}_notifyStateChanges(t){const n=this._oldCache||[],r=this._cache,i=(o,a)=>o.filter(s=>!a.some(l=>s.plugin.id===l.plugin.id));this._notify(i(n,r),t,"stop"),this._notify(i(r,n),t,"start")}}function Kle(e){const t={},n=[],r=Object.keys(Mi.plugins.items);for(let o=0;o<r.length;o++)n.push(Mi.getPlugin(r[o]));const i=e.plugins||[];for(let o=0;o<i.length;o++){const a=i[o];n.indexOf(a)===-1&&(n.push(a),t[a.id]=!0)}return{plugins:n,localIds:t}}function qle(e,t){return!t&&e===!1?null:e===!0?{}:e}function Gle(e,{plugins:t,localIds:n},r,i){const o=[],a=e.getContext();for(const s of t){const l=s.id,c=qle(r[l],i);c!==null&&o.push({plugin:s,options:Xle(e.config,{plugin:s,local:n[l]},c,a)})}return o}function Xle(e,{plugin:t,local:n},r,i){const o=e.pluginScopeKeys(t),a=e.getOptionScopes(r,o);return n&&t.defaults&&a.push(t.defaults),e.createResolver(a,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Qx(e,t){const n=Lt.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function Qle(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function Zle(e,t){return e===t?"_index_":"_value_"}function Wj(e){if(e==="x"||e==="y"||e==="r")return e}function Jle(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function Zx(e,...t){if(Wj(e))return e;for(const n of t){const r=n.axis||Jle(n.position)||e.length>1&&Wj(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function zj(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function ece(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(r=>r.xAxisID===e||r.yAxisID===e);if(n.length)return zj(e,"x",n[0])||zj(e,"y",n[0])}return{}}function tce(e,t){const n=ns[e.type]||{scales:{}},r=t.scales||{},i=Qx(e.type,t),o=Object.create(null);return Object.keys(r).forEach(a=>{const s=r[a];if(!Me(s))return console.error(`Invalid scale configuration for scale: ${a}`);if(s._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);const l=Zx(a,s,ece(a,e),Lt.scales[s.type]),c=Zle(l,i),u=n.scales||{};o[a]=_u(Object.create(null),[{axis:l},s,u[l],u[c]])}),e.data.datasets.forEach(a=>{const s=a.type||e.type,l=a.indexAxis||Qx(s,t),u=(ns[s]||{}).scales||{};Object.keys(u).forEach(d=>{const f=Qle(d,l),p=a[f+"AxisID"]||f;o[p]=o[p]||Object.create(null),_u(o[p],[{axis:f},r[p],u[d]])})}),Object.keys(o).forEach(a=>{const s=o[a];_u(s,[Lt.scales[s.type],Lt.scale])}),o}function Vj(e){const t=e.options||(e.options={});t.plugins=Oe(t.plugins,{}),t.scales=tce(e,t)}function Hj(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function nce(e){return e=e||{},e.data=Hj(e.data),Vj(e),e}const Yj=new Map,Uj=new Set;function zh(e,t){let n=Yj.get(e);return n||(n=t(),Yj.set(e,n),Uj.add(n)),n}const Ru=(e,t,n)=>{const r=Ja(t,n);r!==void 0&&e.add(r)};class rce{constructor(t){this._config=nce(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=Hj(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(),Vj(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return zh(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return zh(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return zh(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return zh(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const r=this._scopeCache;let i=r.get(t);return(!i||n)&&(i=new Map,r.set(t,i)),i}getOptionScopes(t,n,r){const{options:i,type:o}=this,a=this._cachedScopes(t,r),s=a.get(n);if(s)return s;const l=new Set;n.forEach(u=>{t&&(l.add(t),u.forEach(d=>Ru(l,t,d))),u.forEach(d=>Ru(l,i,d)),u.forEach(d=>Ru(l,ns[o]||{},d)),u.forEach(d=>Ru(l,Lt,d)),u.forEach(d=>Ru(l,Mx,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),Uj.has(n)&&a.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,ns[n]||{},Lt.datasets[n]||{},{type:n},Lt,Mx]}resolveNamedOptions(t,n,r,i=[""]){const o={$shared:!0},{resolver:a,subPrefixes:s}=Kj(this._resolverCache,t,i);let l=a;if(oce(a,n)){o.$shared=!1,r=na(r)?r():r;const c=this.createResolver(t,r,s);l=xl(a,r,c)}for(const c of n)o[c]=l[c];return o}createResolver(t,n,r=[""],i){const{resolver:o}=Kj(this._resolverCache,t,r);return Me(n)?xl(o,n,void 0,i):o}}function Kj(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));const i=n.join();let o=r.get(i);return o||(o={resolver:Fx(t,n),subPrefixes:n.filter(s=>!s.toLowerCase().includes("hover"))},r.set(i,o)),o}const ice=e=>Me(e)&&Object.getOwnPropertyNames(e).some(t=>na(e[t]));function oce(e,t){const{isScriptable:n,isIndexable:r}=JN(e);for(const i of t){const o=n(i),a=r(i),s=(a||o)&&e[i];if(o&&(na(s)||ice(s))||a&&rn(s))return!0}return!1}var ace="4.5.0";const sce=["top","bottom","left","right","chartArea"];function qj(e,t){return e==="top"||e==="bottom"||sce.indexOf(e)===-1&&t==="x"}function Gj(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function Xj(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),ht(n&&n.onComplete,[e],t)}function lce(e){const t=e.chart,n=t.options.animation;ht(n&&n.onProgress,[e],t)}function Qj(e){return Wx()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const Vh={},Zj=e=>{const t=Qj(e);return Object.values(Vh).filter(n=>n.canvas===t).pop()};function cce(e,t,n){const r=Object.keys(e);for(const i of r){const o=+i;if(o>=t){const a=e[i];delete e[i],(n>0||o>t)&&(e[o+n]=a)}}}function uce(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}let Fn=class{static defaults=Lt;static instances=Vh;static overrides=ns;static registry=Mi;static version=ace;static getChart=Zj;static register(...t){Mi.add(...t),Jj()}static unregister(...t){Mi.remove(...t),Jj()}constructor(t,n){const r=this.config=new rce(n),i=Qj(t),o=Zj(i);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const a=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||Cle(i)),this.platform.updateConfig(r);const s=this.platform.acquireContext(i,a.aspectRatio),l=s&&s.canvas,c=l&&l.height,u=l&&l.width;if(this.id=nae(),this.ctx=s,this.canvas=l,this.width=u,this.height=c,this._options=a,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 Ule,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=wae(d=>this.update(d),a.resizeDelay||0),this._dataChanges=[],Vh[this.id]=this,!s||!l){console.error("Failed to create chart: can't acquire context from the given item");return}_o.listen(this,"complete",Xj),_o.listen(this,"progress",lce),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:i,_aspectRatio:o}=this;return Ve(t)?n&&o?o:i?r/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 Mi}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():aj(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return XN(this.canvas,this.ctx),this}stop(){return _o.stop(this),this}resize(t,n){_o.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const r=this.options,i=this.canvas,o=r.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(i,t,n,o),s=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,aj(this,s,!0)&&(this.notifyPlugins("resize",{size:a}),ht(r.onResize,[this,a],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Ze(n,(r,i)=>{r.id=i})}buildOrUpdateScales(){const t=this.options,n=t.scales,r=this.scales,i=Object.keys(r).reduce((a,s)=>(a[s]=!1,a),{});let o=[];n&&(o=o.concat(Object.keys(n).map(a=>{const s=n[a],l=Zx(a,s),c=l==="r",u=l==="x";return{options:s,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),Ze(o,a=>{const s=a.options,l=s.id,c=Zx(l,s),u=Oe(s.type,a.dtype);(s.position===void 0||qj(s.position,c)!==qj(a.dposition))&&(s.position=a.dposition),i[l]=!0;let d=null;if(l in r&&r[l].type===u)d=r[l];else{const f=Mi.getScale(u);d=new f({id:l,type:u,ctx:this.ctx,chart:this}),r[d.id]=d}d.init(s,t)}),Ze(i,(a,s)=>{a||delete r[s]}),Ze(r,a=>{ia.configure(this,a,a.options),ia.addBox(this,a)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,r=t.length;if(t.sort((i,o)=>i.index-o.index),r>n){for(let i=n;i<r;++i)this._destroyDatasetMeta(i);t.splice(n,r-n)}this._sortedMetasets=t.slice(0).sort(Gj("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((r,i)=>{n.filter(o=>o===r._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let r,i;for(this._removeUnreferencedMetasets(),r=0,i=n.length;r<i;r++){const o=n[r];let a=this.getDatasetMeta(r);const s=o.type||this.config.type;if(a.type&&a.type!==s&&(this._destroyDatasetMeta(r),a=this.getDatasetMeta(r)),a.type=s,a.indexAxis=o.indexAxis||Qx(s,this.options),a.order=o.order||0,a.index=r,a.label=""+o.label,a.visible=this.isDatasetVisible(r),a.controller)a.controller.updateIndex(r),a.controller.linkScales();else{const l=Mi.getController(s),{datasetElementType:c,dataElementType:u}=Lt.datasets[s];Object.assign(l,{dataElementType:Mi.getElement(u),datasetElementType:c&&Mi.getElement(c)}),a.controller=new l(this,r),t.push(a.controller)}}return this._updateMetasets(),t}_resetElements(){Ze(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:d}=this.getDatasetMeta(c),f=!i&&o.indexOf(d)===-1;d.buildOrUpdateElements(f),a=Math.max(+d.getMaxOverflow(),a)}a=this._minPadding=r.layout.autoPadding?a:0,this._updateLayout(a),i||Ze(o,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Gj("z","_idx"));const{_active:s,_lastEvent:l}=this;l?this._eventHandler(l,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){Ze(this.scales,t=>{ia.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!MN(n,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:i,count:o}of n){const a=r==="_removeElements"?-o:o;cce(t,i,a)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=o=>new Set(t.filter(a=>a[0]===o).map((a,s)=>s+","+a.splice(1).join(","))),i=r(0);for(let o=1;o<n;o++)if(!MN(i,r(o)))return;return Array.from(i).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;ia.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],Ze(this.boxes,i=>{r&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,o)=>{i._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n<r;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,r=this.data.datasets.length;n<r;++n)this._updateDataset(n,na(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const r=this.getDatasetMeta(t),i={meta:r,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(r.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(_o.has(this)?this.attached&&!_o.running(this)&&_o.start(this):(this.draw(),Xj({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:r,height:i}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(r,i)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets,r=[];let i,o;for(i=0,o=n.length;i<o;++i){const a=n[i];(!t||a.visible)&&r.push(a)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,r={meta:t,index:t.index,cancelable:!0},i=kse(this,t);this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(i&&Ix(n,i),t.controller.draw(),i&&Rx(n),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(t){return Du(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,i){const o=sle.modes[n];return typeof o=="function"?o(this,t,r,i):[]}getDatasetMeta(t){const n=this.data.datasets[t],r=this._metasets;let i=r.filter(o=>o&&o._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},r.push(i)),i}getContext(){return this.$context||(this.$context=is(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(t,n){const r=this.getDatasetMeta(t);r.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,r){const i=r?"show":"hide",o=this.getDatasetMeta(t),a=o.controller._resolveAnimations(void 0,i);Su(n)?(o.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),a.update(o,{visible:r}),this.update(s=>s.datasetIndex===t?i:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),_o.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),XN(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete Vh[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,n=this.platform,r=(o,a)=>{n.addEventListener(this,o,a),t[o]=a},i=(o,a,s)=>{o.offsetX=a,o.offsetY=s,this._eventHandler(o)};Ze(this.options.events,o=>r(o,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,r=(l,c)=>{n.addEventListener(this,l,c),t[l]=c},i=(l,c)=>{t[l]&&(n.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let a;const s=()=>{i("attach",s),this.attached=!0,this.resize(),r("resize",o),r("detach",a)};a=()=>{this.attached=!1,i("resize",o),this._stop(),this._resize(0,0),r("attach",s)},n.isAttached(this.canvas)?s():a()}unbindEvents(){Ze(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},Ze(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,r){const i=r?"set":"remove";let o,a,s,l;for(n==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+i+"DatasetHoverStyle"]()),s=0,l=t.length;s<l;++s){a=t[s];const c=a&&this.getDatasetMeta(a.datasetIndex).controller;c&&c[i+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],r=t.map(({datasetIndex:o,index:a})=>{const s=this.getDatasetMeta(o);if(!s)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:s.data[a],index:a}});!Sh(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(t,n,r){return this._plugins.notify(this,t,n,r)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,r){const i=this.options.hover,o=(l,c)=>l.filter(u=>!c.some(d=>u.datasetIndex===d.datasetIndex&&u.index===d.index)),a=o(n,t),s=r?t:o(t,n);a.length&&this.updateHoverStyle(a,i.mode,!1),s.length&&i.mode&&this.updateHoverStyle(s,i.mode,!0)}_eventHandler(t,n){const r={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},i=a=>(a.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,i)===!1)return;const o=this._handleEvent(t,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,i),(o||r.changed)&&this.render(),this}_handleEvent(t,n,r){const{_active:i=[],options:o}=this,a=n,s=this._getActiveElements(t,i,r,a),l=lae(t),c=uce(t,this._lastEvent,r,l);r&&(this._lastEvent=null,ht(o.onHover,[t,s,this],this),l&&ht(o.onClick,[t,s,this],this));const u=!Sh(s,i);return(u||n)&&(this._active=s,this._updateHoverStyles(s,i,n)),this._lastEvent=c,u}_getActiveElements(t,n,r,i){if(t.type==="mouseout")return[];if(!r)return n;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,i)}};function Jj(){return Ze(Fn.instances,e=>e._plugins.invalidate())}function dce(e,t,n){const{startAngle:r,x:i,y:o,outerRadius:a,innerRadius:s,options:l}=t,{borderWidth:c,borderJoinStyle:u}=l,d=Math.min(c/a,Zr(r-n));if(e.beginPath(),e.arc(i,o,a-c/2,r+d/2,n-d/2),s>0){const f=Math.min(c/s,Zr(r-n));e.arc(i,o,s+c/2,n-f/2,r+f/2,!0)}else{const f=Math.min(c/2,a*Zr(r-n));if(u==="round")e.arc(i,o,f,n-ot/2,r+ot/2,!0);else if(u==="bevel"){const p=2*f*f,m=-p*Math.cos(n+ot/2)+i,h=-p*Math.sin(n+ot/2)+o,g=p*Math.cos(r+ot/2)+i,b=p*Math.sin(r+ot/2)+o;e.lineTo(m,h),e.lineTo(g,b)}}e.closePath(),e.moveTo(0,0),e.rect(0,0,e.canvas.width,e.canvas.height),e.clip("evenodd")}function fce(e,t,n){const{startAngle:r,pixelMargin:i,x:o,y:a,outerRadius:s,innerRadius:l}=t;let c=i/s;e.beginPath(),e.arc(o,a,s,r-c,n+c),l>i?(c=i/l,e.arc(o,a,l,n+c,r-c,!0)):e.arc(o,a,i,n+Xt,r-Xt),e.closePath(),e.clip()}function pce(e){return Lx(e,["outerStart","outerEnd","innerStart","innerEnd"])}function hce(e,t,n,r){const i=pce(e.options.borderRadius),o=(n-t)/2,a=Math.min(o,r*t/2),s=l=>{const c=(n-Math.min(o,l))*r/2;return kn(l,0,Math.min(o,c))};return{outerStart:s(i.outerStart),outerEnd:s(i.outerEnd),innerStart:kn(i.innerStart,0,a),innerEnd:kn(i.innerEnd,0,a)}}function Ol(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function Hh(e,t,n,r,i,o){const{x:a,y:s,startAngle:l,pixelMargin:c,innerRadius:u}=t,d=Math.max(t.outerRadius+r+n-c,0),f=u>0?u+r+n+c:0;let p=0;const m=i-l;if(r){const R=u>0?u-r:0,L=d>0?d-r:0,$=(R+L)/2,V=$!==0?m*$/($+r):m;p=(m-V)/2}const h=Math.max(.001,m*d-n/ot)/d,g=(m-h)/2,b=l+g+p,S=i-g-p,{outerStart:w,outerEnd:x,innerStart:_,innerEnd:E}=hce(t,f,d,S-b),C=d-w,D=d-x,T=b+w/C,j=S-x/D,A=f+_,P=f+E,N=b+_/A,M=S-E/P;if(e.beginPath(),o){const R=(T+j)/2;if(e.arc(a,s,d,T,R),e.arc(a,s,d,R,j),x>0){const z=Ol(D,j,a,s);e.arc(z.x,z.y,x,j,S+Xt)}const L=Ol(P,S,a,s);if(e.lineTo(L.x,L.y),E>0){const z=Ol(P,M,a,s);e.arc(z.x,z.y,E,S+Xt,M+Math.PI)}const $=(S-E/f+(b+_/f))/2;if(e.arc(a,s,f,S-E/f,$,!0),e.arc(a,s,f,$,b+_/f,!0),_>0){const z=Ol(A,N,a,s);e.arc(z.x,z.y,_,N+Math.PI,b-Xt)}const V=Ol(C,b,a,s);if(e.lineTo(V.x,V.y),w>0){const z=Ol(C,T,a,s);e.arc(z.x,z.y,w,b-Xt,T)}}else{e.moveTo(a,s);const R=Math.cos(T)*d+a,L=Math.sin(T)*d+s;e.lineTo(R,L);const $=Math.cos(j)*d+a,V=Math.sin(j)*d+s;e.lineTo($,V)}e.closePath()}function mce(e,t,n,r,i){const{fullCircles:o,startAngle:a,circumference:s}=t;let l=t.endAngle;if(o){Hh(e,t,n,r,l,i);for(let c=0;c<o;++c)e.fill();isNaN(s)||(l=a+(s%At||At))}return Hh(e,t,n,r,l,i),e.fill(),l}function gce(e,t,n,r,i){const{fullCircles:o,startAngle:a,circumference:s,options:l}=t,{borderWidth:c,borderJoinStyle:u,borderDash:d,borderDashOffset:f,borderRadius:p}=l,m=l.borderAlign==="inner";if(!c)return;e.setLineDash(d||[]),e.lineDashOffset=f,m?(e.lineWidth=c*2,e.lineJoin=u||"round"):(e.lineWidth=c,e.lineJoin=u||"bevel");let h=t.endAngle;if(o){Hh(e,t,n,r,h,i);for(let g=0;g<o;++g)e.stroke();isNaN(s)||(h=a+(s%At||At))}m&&fce(e,t,h),l.selfJoin&&h-a>=ot&&p===0&&u!=="miter"&&dce(e,t,h),o||(Hh(e,t,n,r,h,i),e.stroke())}class Jx extends oa{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:t=>t!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,n,r){const i=this.getProps(["x","y"],r),{angle:o,distance:a}=LN(i,{x:t,y:n}),{startAngle:s,endAngle:l,innerRadius:c,outerRadius:u,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],r),f=(this.options.spacing+this.options.borderWidth)/2,p=Oe(d,l-s),m=Pu(o,s,l)&&s!==l,h=p>=At||m,g=ra(a,c+f,u+f);return h&&g}getCenterPoint(t){const{x:n,y:r,startAngle:i,endAngle:o,innerRadius:a,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:l,spacing:c}=this.options,u=(i+o)/2,d=(a+s+c+l)/2;return{x:n+Math.cos(u)*d,y:r+Math.sin(u)*d}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:n,circumference:r}=this,i=(n.offset||0)/4,o=(n.spacing||0)/2,a=n.circular;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=r>At?Math.floor(r/At):0,r===0||this.innerRadius<0||this.outerRadius<0)return;t.save();const s=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(s)*i,Math.sin(s)*i);const l=1-Math.sin(Math.min(ot,r||0)),c=i*l;t.fillStyle=n.backgroundColor,t.strokeStyle=n.borderColor,mce(t,this,c,o,a),gce(t,this,c,o,a),t.restore()}}function eI(e,t,n=t){e.lineCap=Oe(n.borderCapStyle,t.borderCapStyle),e.setLineDash(Oe(n.borderDash,t.borderDash)),e.lineDashOffset=Oe(n.borderDashOffset,t.borderDashOffset),e.lineJoin=Oe(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=Oe(n.borderWidth,t.borderWidth),e.strokeStyle=Oe(n.borderColor,t.borderColor)}function vce(e,t,n){e.lineTo(n.x,n.y)}function yce(e){return e.stepped?Iae:e.tension||e.cubicInterpolationMode==="monotone"?Rae:vce}function tI(e,t,n={}){const r=e.length,{start:i=0,end:o=r-1}=n,{start:a,end:s}=t,l=Math.max(i,a),c=Math.min(o,s),u=i<a&&o<a||i>s&&o>s;return{count:r,start:l,loop:t.loop,ilen:c<l&&!u?r+c-l:c-l}}function bce(e,t,n,r){const{points:i,options:o}=t,{count:a,start:s,loop:l,ilen:c}=tI(i,n,r),u=yce(o);let{move:d=!0,reverse:f}=r||{},p,m,h;for(p=0;p<=c;++p)m=i[(s+(f?c-p:p))%a],!m.skip&&(d?(e.moveTo(m.x,m.y),d=!1):u(e,h,m,f,o.stepped),h=m);return l&&(m=i[(s+(f?c:0))%a],u(e,h,m,f,o.stepped)),!!l}function xce(e,t,n,r){const i=t.points,{count:o,start:a,ilen:s}=tI(i,n,r),{move:l=!0,reverse:c}=r||{};let u=0,d=0,f,p,m,h,g,b;const S=x=>(a+(c?s-x:x))%o,w=()=>{h!==g&&(e.lineTo(u,g),e.lineTo(u,h),e.lineTo(u,b))};for(l&&(p=i[S(0)],e.moveTo(p.x,p.y)),f=0;f<=s;++f){if(p=i[S(f)],p.skip)continue;const x=p.x,_=p.y,E=x|0;E===m?(_<h?h=_:_>g&&(g=_),u=(d*u+x)/++d):(w(),e.lineTo(x,_),m=E,d=0,h=g=_),b=_}w()}function e1(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?xce:bce}function wce(e){return e.stepped?hse:e.tension||e.cubicInterpolationMode==="monotone"?mse:ss}function _ce(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),eI(e,t.options),e.stroke(i)}function Sce(e,t,n,r){const{segments:i,options:o}=t,a=e1(t);for(const s of i)eI(e,o,s.style),e.beginPath(),a(e,t,s,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const Oce=typeof Path2D=="function";function Ece(e,t,n,r){Oce&&!t.options.segment?_ce(e,t,n,r):Sce(e,t,n,r)}class t1 extends oa{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=>t!=="borderDash"&&t!=="fill"};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,n){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const i=r.spanGaps?this._loop:this._fullLoop;ase(this._points,r,t,i,n),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=Sse(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,r=t.length;return r&&n[t[r-1].end]}interpolate(t,n){const r=this.options,i=t[n],o=this.points,a=xse(this,{property:n,start:i,end:i});if(!a.length)return;const s=[],l=wce(r);let c,u;for(c=0,u=a.length;c<u;++c){const{start:d,end:f}=a[c],p=o[d],m=o[f];if(p===m){s.push(p);continue}const h=Math.abs((i-p[n])/(m[n]-p[n])),g=l(p,m,h,r.stepped);g[n]=t[n],s.push(g)}return s.length===1?s[0]:s}pathSegment(t,n,r){return e1(this)(t,this,n,r)}path(t,n,r){const i=this.segments,o=e1(this);let a=this._loop;n=n||0,r=r||this.points.length-n;for(const s of i)a&=o(t,this,s,{start:n,end:n+r-1});return!!a}draw(t,n,r,i){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),Ece(t,this,r,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function nI(e,t,n,r){const i=e.options,{[n]:o}=e.getProps([n],r);return Math.abs(t-o)<i.radius+i.hitRadius}class n1 extends oa{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,n,r){const i=this.options,{x:o,y:a}=this.getProps(["x","y"],r);return Math.pow(t-o,2)+Math.pow(n-a,2)<Math.pow(i.hitRadius+i.radius,2)}inXRange(t,n){return nI(this,t,"x",n)}inYRange(t,n){return nI(this,t,"y",n)}getCenterPoint(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}size(t){t=t||this.options||{};let n=t.radius||0;n=Math.max(n,n&&t.hoverRadius||0);const r=n&&t.borderWidth||0;return(n+r)*2}draw(t,n){const r=this.options;this.skip||r.radius<.1||!Du(this,n,this.size(r)/2)||(t.strokeStyle=r.borderColor,t.lineWidth=r.borderWidth,t.fillStyle=r.backgroundColor,jx(t,r,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function rI(e,t){const{x:n,y:r,base:i,width:o,height:a}=e.getProps(["x","y","base","width","height"],t);let s,l,c,u,d;return e.horizontal?(d=a/2,s=Math.min(n,i),l=Math.max(n,i),c=r-d,u=r+d):(d=o/2,s=n-d,l=n+d,c=Math.min(r,i),u=Math.max(r,i)),{left:s,top:c,right:l,bottom:u}}function aa(e,t,n,r){return e?0:kn(t,n,r)}function Pce(e,t,n){const r=e.options.borderWidth,i=e.borderSkipped,o=ZN(r);return{t:aa(i.top,o.top,0,n),r:aa(i.right,o.right,0,t),b:aa(i.bottom,o.bottom,0,n),l:aa(i.left,o.left,0,t)}}function kce(e,t,n){const{enableBorderRadius:r}=e.getProps(["enableBorderRadius"]),i=e.options.borderRadius,o=bl(i),a=Math.min(t,n),s=e.borderSkipped,l=r||Me(i);return{topLeft:aa(!l||s.top||s.left,o.topLeft,0,a),topRight:aa(!l||s.top||s.right,o.topRight,0,a),bottomLeft:aa(!l||s.bottom||s.left,o.bottomLeft,0,a),bottomRight:aa(!l||s.bottom||s.right,o.bottomRight,0,a)}}function Cce(e){const t=rI(e),n=t.right-t.left,r=t.bottom-t.top,i=Pce(e,n/2,r/2),o=kce(e,n/2,r/2);return{outer:{x:t.left,y:t.top,w:n,h:r,radius:o},inner:{x:t.left+i.l,y:t.top+i.t,w:n-i.l-i.r,h:r-i.t-i.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,o.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(i.b,i.r))}}}}function r1(e,t,n,r){const i=t===null,o=n===null,s=e&&!(i&&o)&&rI(e,r);return s&&(i||ra(t,s.left,s.right))&&(o||ra(n,s.top,s.bottom))}function Dce(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function Ace(e,t){e.rect(t.x,t.y,t.w,t.h)}function i1(e,t,n={}){const r=e.x!==n.x?-t:0,i=e.y!==n.y?-t:0,o=(e.x+e.w!==n.x+n.w?t:0)-r,a=(e.y+e.h!==n.y+n.h?t:0)-i;return{x:e.x+r,y:e.y+i,w:e.w+o,h:e.h+a,radius:e.radius}}class El extends oa{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:n,options:{borderColor:r,backgroundColor:i}}=this,{inner:o,outer:a}=Cce(this),s=Dce(a.radius)?Ch:Ace;t.save(),(a.w!==o.w||a.h!==o.h)&&(t.beginPath(),s(t,i1(a,n,o)),t.clip(),s(t,i1(o,-n,a)),t.fillStyle=r,t.fill("evenodd")),t.beginPath(),s(t,i1(o,n)),t.fillStyle=i,t.fill(),t.restore()}inRange(t,n,r){return r1(this,t,n,r)}inXRange(t,n){return r1(this,t,null,n)}inYRange(t,n){return r1(this,null,t,n)}getCenterPoint(t){const{x:n,y:r,base:i,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(n+i)/2:n,y:o?r:(r+i)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}const iI=(e,t)=>{let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}},Tce=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class oI extends oa{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,n,r){this.maxWidth=t,this.maxHeight=n,this._margins=r,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 n=ht(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(r=>t.filter(r,this.chart.data))),t.sort&&(n=n.sort((r,i)=>t.sort(r,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const r=t.labels,i=Jn(r.font),o=i.size,a=this._computeTitleHeight(),{boxWidth:s,itemHeight:l}=iI(r,o);let c,u;n.font=i.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(a,o,s,l)+10):(u=this.maxHeight,c=this._fitCols(a,i,s,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(u,t.maxHeight||this.maxHeight)}_fitRows(t,n,r,i){const{ctx:o,maxWidth:a,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],u=i+s;let d=t;o.textAlign="left",o.textBaseline="middle";let f=-1,p=-u;return this.legendItems.forEach((m,h)=>{const g=r+n/2+o.measureText(m.text).width;(h===0||c[c.length-1]+g+2*s>a)&&(d+=u,c[c.length-(h>0?0:1)]=0,p+=u,f++),l[h]={left:0,top:p,row:f,width:g,height:i},c[c.length-1]+=g+s}),d}_fitCols(t,n,r,i){const{ctx:o,maxHeight:a,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=a-t;let d=s,f=0,p=0,m=0,h=0;return this.legendItems.forEach((g,b)=>{const{itemWidth:S,itemHeight:w}=Mce(r,n,o,g,i);b>0&&p+w+2*s>u&&(d+=f+s,c.push({width:f,height:p}),m+=f+s,h++,f=p=0),l[b]={left:m,top:p,col:h,width:S,height:w},f=Math.max(f,S),p+=w+s}),d+=f,c.push({width:f,height:p}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:i},rtl:o}}=this,a=_l(o,this.left,this.width);if(this.isHorizontal()){let s=0,l=xr(r,this.left+i,this.right-this.lineWidths[s]);for(const c of n)s!==c.row&&(s=c.row,l=xr(r,this.left+i,this.right-this.lineWidths[s])),c.top+=this.top+t+i,c.left=a.leftForLtr(a.x(l),c.width),l+=c.width+i}else{let s=0,l=xr(r,this.top+t+i,this.bottom-this.columnSizes[s].height);for(const c of n)c.col!==s&&(s=c.col,l=xr(r,this.top+t+i,this.bottom-this.columnSizes[s].height)),c.top=l,c.left+=this.left+i,c.left=a.leftForLtr(a.x(c.left),c.width),l+=c.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Ix(t,this),this._draw(),Rx(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:i}=this,{align:o,labels:a}=t,s=Lt.color,l=_l(t.rtl,this.left,this.width),c=Jn(a.font),{padding:u}=a,d=c.size,f=d/2;let p;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=c.string;const{boxWidth:m,boxHeight:h,itemHeight:g}=iI(a,d),b=function(E,C,D){if(isNaN(m)||m<=0||isNaN(h)||h<0)return;i.save();const T=Oe(D.lineWidth,1);if(i.fillStyle=Oe(D.fillStyle,s),i.lineCap=Oe(D.lineCap,"butt"),i.lineDashOffset=Oe(D.lineDashOffset,0),i.lineJoin=Oe(D.lineJoin,"miter"),i.lineWidth=T,i.strokeStyle=Oe(D.strokeStyle,s),i.setLineDash(Oe(D.lineDash,[])),a.usePointStyle){const j={radius:h*Math.SQRT2/2,pointStyle:D.pointStyle,rotation:D.rotation,borderWidth:T},A=l.xPlus(E,m/2),P=C+f;QN(i,j,A,P,a.pointStyleWidth&&m)}else{const j=C+Math.max((d-h)/2,0),A=l.leftForLtr(E,m),P=bl(D.borderRadius);i.beginPath(),Object.values(P).some(N=>N!==0)?Ch(i,{x:A,y:j,w:m,h,radius:P}):i.rect(A,j,m,h),i.fill(),T!==0&&i.stroke()}i.restore()},S=function(E,C,D){kh(i,D.text,E,C+g/2,c,{strikethrough:D.hidden,textAlign:l.textAlign(D.textAlign)})},w=this.isHorizontal(),x=this._computeTitleHeight();w?p={x:xr(o,this.left+u,this.right-r[0]),y:this.top+u+x,line:0}:p={x:this.left+u,y:xr(o,this.top+x+u,this.bottom-n[0].height),line:0},lj(this.ctx,t.textDirection);const _=g+u;this.legendItems.forEach((E,C)=>{i.strokeStyle=E.fontColor,i.fillStyle=E.fontColor;const D=i.measureText(E.text).width,T=l.textAlign(E.textAlign||(E.textAlign=a.textAlign)),j=m+f+D;let A=p.x,P=p.y;l.setWidth(this.width),w?C>0&&A+j+u>this.right&&(P=p.y+=_,p.line++,A=p.x=xr(o,this.left+u,this.right-r[p.line])):C>0&&P+_>this.bottom&&(A=p.x=A+n[p.line].width+u,p.line++,P=p.y=xr(o,this.top+x+u,this.bottom-n[p.line].height));const N=l.x(A);if(b(N,P,E),A=_ae(T,A+m+f,w?A+j:this.right,t.rtl),S(l.x(A),P,E),w)p.x+=j+u;else if(typeof E.text!="string"){const M=c.lineHeight;p.y+=aI(E,M)+u}else p.y+=_}),cj(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=Jn(n.font),i=Jr(n.padding);if(!n.display)return;const o=_l(t.rtl,this.left,this.width),a=this.ctx,s=n.position,l=r.size/2,c=i.top+l;let u,d=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),u=this.top+c,d=xr(t.align,d,this.right-f);else{const m=this.columnSizes.reduce((h,g)=>Math.max(h,g.height),0);u=c+xr(t.align,this.top,this.bottom-m-t.labels.padding-this._computeTitleHeight())}const p=xr(s,d,d+f);a.textAlign=o.textAlign(VN(s)),a.textBaseline="middle",a.strokeStyle=n.color,a.fillStyle=n.color,a.font=r.string,kh(a,n.text,p,u,r)}_computeTitleHeight(){const t=this.options.title,n=Jn(t.font),r=Jr(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,i,o;if(ra(t,this.left,this.right)&&ra(n,this.top,this.bottom)){for(o=this.legendHitBoxes,r=0;r<o.length;++r)if(i=o[r],ra(t,i.left,i.left+i.width)&&ra(n,i.top,i.top+i.height))return this.legendItems[r]}return null}handleEvent(t){const n=this.options;if(!Ice(t.type,n))return;const r=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const i=this._hoveredItem,o=Tce(i,r);i&&!o&&ht(n.onLeave,[t,i,this],this),this._hoveredItem=r,r&&!o&&ht(n.onHover,[t,r,this],this)}else r&&ht(n.onClick,[t,r,this],this)}}function Mce(e,t,n,r,i){const o=Nce(r,e,t,n),a=jce(i,r,t.lineHeight);return{itemWidth:o,itemHeight:a}}function Nce(e,t,n,r){let i=e.text;return i&&typeof i!="string"&&(i=i.reduce((o,a)=>o.length>a.length?o:a)),t+n.size/2+r.measureText(i).width}function jce(e,t,n){let r=e;return typeof t.text!="string"&&(r=aI(t,n)),r}function aI(e,t){const n=e.text?e.text.length:0;return t*n}function Ice(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var ei={id:"legend",_element:oI,start(e,t,n){const r=e.legend=new oI({ctx:e.ctx,options:n,chart:e});ia.configure(e,r,n),ia.addBox(e,r)},stop(e){ia.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;ia.configure(e,r,n),r.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const r=t.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),t.hidden=!0):(i.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:i,color:o,useBorderRadius:a,borderRadius:s}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(n?0:void 0),u=Jr(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:r||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:a&&(s||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};const Lu={average(e){if(!e.length)return!1;let t,n,r=new Set,i=0,o=0;for(t=0,n=e.length;t<n;++t){const s=e[t].element;if(s&&s.hasValue()){const l=s.tooltipPosition();r.add(l.x),i+=l.y,++o}}return o===0||r.size===0?!1:{x:[...r].reduce((s,l)=>s+l)/r.size,y:i/o}},nearest(e,t){if(!e.length)return!1;let n=t.x,r=t.y,i=Number.POSITIVE_INFINITY,o,a,s;for(o=0,a=e.length;o<a;++o){const l=e[o].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),u=kx(t,c);u<i&&(i=u,s=l)}}if(s){const l=s.tooltipPosition();n=l.x,r=l.y}return{x:n,y:r}}};function Ni(e,t){return t&&(rn(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function So(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
|
|
280
|
+
*/class Cse{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,r,i){const o=n.listeners[i],a=n.duration;o.forEach(s=>s({chart:t,initial:n.initial,numSteps:a,currentStep:Math.min(r-n.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=WN.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((r,i)=>{if(!r.running||!r.items.length)return;const o=r.items;let a=o.length-1,s=!1,l;for(;a>=0;--a)l=o[a],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(t),s=!0):(o[a]=o[o.length-1],o.pop());s&&(i.draw(),this._notify(i,r,t,"progress")),o.length||(r.running=!1,this._notify(i,r,t,"complete"),r.initial=!1),n+=o.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let r=n.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,r)),r}listen(t,n,r){this._getAnims(t).listeners[n].push(r)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,i)=>Math.max(r,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const r=n.items;let i=r.length-1;for(;i>=0;--i)r[i].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var _o=new Cse;const hj="transparent",Dse={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=UN(e||hj),i=r.valid&&UN(t||hj);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class Ase{constructor(t,n,r,i){const o=n[r];i=Dh([t.to,i,o,t.from]);const a=Dh([t.from,o,i]);this._active=!0,this._fn=t.fn||Dse[t.type||typeof a],this._easing=ku[t.easing]||ku.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=r,this._from=a,this._to=i,this._promises=void 0}active(){return this._active}update(t,n,r){if(this._active){this._notify(!1);const i=this._target[this._prop],o=r-this._start,a=this._duration-o;this._start=r,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=Dh([t.to,n,i,t.from]),this._from=Dh([t.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,r=this._duration,i=this._prop,o=this._from,a=this._loop,s=this._to;let l;if(this._active=o!==s&&(a||n<r),!this._active){this._target[i]=s,this._notify(!0);return}if(n<0){this._target[i]=o;return}l=n/r%2,l=a&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(o,s,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,r)=>{t.push({res:n,rej:r})})}_notify(t){const n=t?"res":"rej",r=this._promises||[];for(let i=0;i<r.length;i++)r[i][n]()}}class mj{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!Me(t))return;const n=Object.keys(Lt.animation),r=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const o=t[i];if(!Me(o))return;const a={};for(const s of n)a[s]=o[s];(rn(o.properties)&&o.properties||[i]).forEach(s=>{(s===i||!r.has(s))&&r.set(s,a)})})}_animateOptions(t,n){const r=n.options,i=Mse(t,r);if(!i)return[];const o=this._createAnimations(i,r);return r.$shared&&Tse(t.options.$animations,r).then(()=>{t.options=r},()=>{}),o}_createAnimations(t,n){const r=this._properties,i=[],o=t.$animations||(t.$animations={}),a=Object.keys(n),s=Date.now();let l;for(l=a.length-1;l>=0;--l){const c=a[l];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(t,n));continue}const u=n[c];let d=o[c];const f=r.get(c);if(d)if(f&&d.active()){d.update(f,u,s);continue}else d.cancel();if(!f||!f.duration){t[c]=u;continue}o[c]=d=new Ase(f,t,c,u),i.push(d)}return i}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const r=this._createAnimations(t,n);if(r.length)return _o.add(this._chart,r),!0}}function Tse(e,t){const n=[],r=Object.keys(t);for(let i=0;i<r.length;i++){const o=e[r[i]];o&&o.active()&&n.push(o.wait())}return Promise.all(n)}function Mse(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function gj(e,t){const n=e&&e.options||{},r=n.reverse,i=n.min===void 0?t:0,o=n.max===void 0?t:0;return{start:r?o:i,end:r?i:o}}function Nse(e,t,n){if(n===!1)return!1;const r=gj(e,n),i=gj(t,n);return{top:i.end,right:r.end,bottom:i.start,left:r.start}}function jse(e){let t,n,r,i;return Me(e)?(t=e.top,n=e.right,r=e.bottom,i=e.left):t=n=r=i=e,{top:t,right:n,bottom:r,left:i,disabled:e===!1}}function vj(e,t){const n=[],r=e._getSortedDatasetMetas(t);let i,o;for(i=0,o=r.length;i<o;++i)n.push(r[i].index);return n}function yj(e,t,n,r={}){const i=e.keys,o=r.mode==="single";let a,s,l,c;if(t===null)return;let u=!1;for(a=0,s=i.length;a<s;++a){if(l=+i[a],l===n){if(u=!0,r.all)continue;break}c=e.values[l],zr(c)&&(o||t===0||Ti(t)===Ti(c))&&(t+=c)}return!u&&!r.all?0:t}function Ise(e,t){const{iScale:n,vScale:r}=t,i=n.axis==="x"?"x":"y",o=r.axis==="x"?"x":"y",a=Object.keys(e),s=new Array(a.length);let l,c,u;for(l=0,c=a.length;l<c;++l)u=a[l],s[l]={[i]:u,[o]:e[u]};return s}function Vx(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function Rse(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function Lse(e){const{min:t,max:n,minDefined:r,maxDefined:i}=e.getUserBounds();return{min:r?t:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function Fse(e,t,n){const r=e[t]||(e[t]={});return r[n]||(r[n]={})}function bj(e,t,n,r){for(const i of t.getMatchingVisibleMetas(r).reverse()){const o=e[i.index];if(n&&o>0||!n&&o<0)return i.index}return null}function xj(e,t){const{chart:n,_cachedMeta:r}=e,i=n._stacks||(n._stacks={}),{iScale:o,vScale:a,index:s}=r,l=o.axis,c=a.axis,u=Rse(o,a,r),d=t.length;let f;for(let p=0;p<d;++p){const m=t[p],{[l]:h,[c]:g}=m,b=m._stacks||(m._stacks={});f=b[c]=Fse(i,u,h),f[s]=g,f._top=bj(f,a,!0,r.type),f._bottom=bj(f,a,!1,r.type);const S=f._visualValues||(f._visualValues={});S[s]=g}}function Hx(e,t){const n=e.scales;return Object.keys(n).filter(r=>n[r].axis===t).shift()}function $se(e,t){return is(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function Bse(e,t,n){return is(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function Au(e,t){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t=t||e._parsed;for(const i of t){const o=i._stacks;if(!o||o[r]===void 0||o[r][n]===void 0)return;delete o[r][n],o[r]._visualValues!==void 0&&o[r]._visualValues[n]!==void 0&&delete o[r]._visualValues[n]}}}const Yx=e=>e==="reset"||e==="none",wj=(e,t)=>t?e:Object.assign({},e),Wse=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:vj(n,!0),values:null};class Ih{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,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=Vx(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&&Au(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(d,f,p,m)=>d==="x"?f:d==="r"?m:p,o=n.xAxisID=Oe(r.xAxisID,Hx(t,"x")),a=n.yAxisID=Oe(r.yAxisID,Hx(t,"y")),s=n.rAxisID=Oe(r.rAxisID,Hx(t,"r")),l=n.indexAxis,c=n.iAxisID=i(l,o,a,s),u=n.vAxisID=i(l,a,o,s);n.xScale=this.getScaleForId(o),n.yScale=this.getScaleForId(a),n.rScale=this.getScaleForId(s),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(u)}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 n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&$N(this._data,this),t._stacked&&Au(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(Me(n)){const i=this._cachedMeta;this._data=Ise(n,i)}else if(r!==n){if(r){$N(r,this);const i=this._cachedMeta;Au(i),i._parsed=[]}n&&Object.isExtensible(n)&&xae(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,r=this.getDataset();let i=!1;this._dataCheck();const o=n._stacked;n._stacked=Vx(n.vScale,n),n.stack!==r.stack&&(i=!0,Au(n),n.stack=r.stack),this._resyncElements(t),(i||o!==n._stacked)&&(xj(this,n._parsed),n._stacked=Vx(n.vScale,n))}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:r,_data:i}=this,{iScale:o,_stacked:a}=r,s=o.axis;let l=t===0&&n===i.length?!0:r._sorted,c=t>0&&r._parsed[t-1],u,d,f;if(this._parsing===!1)r._parsed=i,r._sorted=!0,f=i;else{rn(i[t])?f=this.parseArrayData(r,i,t,n):Me(i[t])?f=this.parseObjectData(r,i,t,n):f=this.parsePrimitiveData(r,i,t,n);const p=()=>d[s]===null||c&&d[s]<c[s];for(u=0;u<n;++u)r._parsed[u+t]=d=f[u],l&&(p()&&(l=!1),c=d);r._sorted=l}a&&xj(this,f)}parsePrimitiveData(t,n,r,i){const{iScale:o,vScale:a}=t,s=o.axis,l=a.axis,c=o.getLabels(),u=o===a,d=new Array(i);let f,p,m;for(f=0,p=i;f<p;++f)m=f+r,d[f]={[s]:u||o.parse(c[m],m),[l]:a.parse(n[m],m)};return d}parseArrayData(t,n,r,i){const{xScale:o,yScale:a}=t,s=new Array(i);let l,c,u,d;for(l=0,c=i;l<c;++l)u=l+r,d=n[u],s[l]={x:o.parse(d[0],u),y:a.parse(d[1],u)};return s}parseObjectData(t,n,r,i){const{xScale:o,yScale:a}=t,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,c=new Array(i);let u,d,f,p;for(u=0,d=i;u<d;++u)f=u+r,p=n[f],c[u]={x:o.parse(Ja(p,s),f),y:a.parse(Ja(p,l),f)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,r){const i=this.chart,o=this._cachedMeta,a=n[t.axis],s={keys:vj(i,!0),values:n._stacks[t.axis]._visualValues};return yj(s,a,o.index,{mode:r})}updateRangeFromParsed(t,n,r,i){const o=r[n.axis];let a=o===null?NaN:o;const s=i&&r._stacks[n.axis];i&&s&&(i.values=s,a=yj(i,o,this._cachedMeta.index)),t.min=Math.min(t.min,a),t.max=Math.max(t.max,a)}getMinMax(t,n){const r=this._cachedMeta,i=r._parsed,o=r._sorted&&t===r.iScale,a=i.length,s=this._getOtherScale(t),l=Wse(n,r,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:d}=Lse(s);let f,p;function m(){p=i[f];const h=p[s.axis];return!zr(p[t.axis])||u>h||d<h}for(f=0;f<a&&!(!m()&&(this.updateRangeFromParsed(c,t,p,l),o));++f);if(o){for(f=a-1;f>=0;--f)if(!m()){this.updateRangeFromParsed(c,t,p,l);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed,r=[];let i,o,a;for(i=0,o=n.length;i<o;++i)a=n[i][t.axis],zr(a)&&r.push(a);return r}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,r=n.iScale,i=n.vScale,o=this.getParsed(t);return{label:r?""+r.getLabelForValue(o[r.axis]):"",value:i?""+i.getLabelForValue(o[i.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=jse(Oe(this.options.clip,Nse(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,r=this._cachedMeta,i=r.data||[],o=n.chartArea,a=[],s=this._drawStart||0,l=this._drawCount||i.length-s,c=this.options.drawActiveElementsOnTop;let u;for(r.dataset&&r.dataset.draw(t,o,s,l),u=s;u<s+l;++u){const d=i[u];d.hidden||(d.active&&c?a.push(d):d.draw(t,o))}for(u=0;u<a.length;++u)a[u].draw(t,o)}getStyle(t,n){const r=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(t||0,r)}getContext(t,n,r){const i=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const a=this._cachedMeta.data[t];o=a.$context||(a.$context=Bse(this.getContext(),t,a)),o.parsed=this.getParsed(t),o.raw=i.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=$se(this.chart.getContext(),this.index)),o.dataset=i,o.index=o.datasetIndex=this.index;return o.active=!!n,o.mode=r,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",r){const i=n==="active",o=this._cachedDataOpts,a=t+"-"+n,s=o[a],l=this.enableOptionSharing&&Su(r);if(s)return wj(s,l);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,t),d=i?[`${t}Hover`,"hover",t,""]:[t,""],f=c.getOptionScopes(this.getDataset(),u),p=Object.keys(Lt.elements[t]),m=()=>this.getContext(r,i,n),h=c.resolveNamedOptions(f,p,m,d);return h.$shared&&(h.$shared=l,o[a]=Object.freeze(wj(h,l))),h}_resolveAnimations(t,n,r){const i=this.chart,o=this._cachedDataOpts,a=`animation-${n}`,s=o[a];if(s)return s;let l;if(i.options.animation!==!1){const u=this.chart.config,d=u.datasetAnimationScopeKeys(this._type,n),f=u.getOptionScopes(this.getDataset(),d);l=u.createResolver(f,this.getContext(t,r,n))}const c=new mj(i,l&&l.animations);return l&&l._cacheable&&(o[a]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||Yx(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const r=this.resolveDataElementOptions(t,n),i=this._sharedOptions,o=this.getSharedOptions(r),a=this.includeOptions(n,o)||o!==i;return this.updateSharedOptions(o,n,r),{sharedOptions:o,includeOptions:a}}updateElement(t,n,r,i){Yx(i)?Object.assign(t,r):this._resolveAnimations(n,i).update(t,r)}updateSharedOptions(t,n,r){t&&!Yx(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,i){t.active=i;const o=this.getStyle(n,i);this._resolveAnimations(n,r,i).update(t,{options:!i&&this.getSharedOptions(o)||o})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"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 n=this._data,r=this._cachedMeta.data;for(const[s,l,c]of this._syncList)this[s](l,c);this._syncList=[];const i=r.length,o=n.length,a=Math.min(o,i);a&&this.parse(0,a),o>i?this._insertElements(i,o-i,t):o<i&&this._removeElements(o,i-o)}_insertElements(t,n,r=!0){const i=this._cachedMeta,o=i.data,a=t+n;let s;const l=c=>{for(c.length+=n,s=c.length-1;s>=a;s--)c[s]=c[s-n]};for(l(o),s=t;s<a;++s)o[s]=new this.dataElementType;this._parsing&&l(i._parsed),this.parse(t,n),r&&this.updateElements(o,t,n,"reset")}updateElements(t,n,r,i){}_removeElements(t,n){const r=this._cachedMeta;if(this._parsing){const i=r._parsed.splice(t,n);r._stacked&&Au(r,i)}r.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,r,i]=t;this[n](r,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,n){n&&this._sync(["_removeElements",t,n]);const r=arguments.length-2;r&&this._sync(["_insertElements",t,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function zse(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let r=[];for(let i=0,o=n.length;i<o;i++)r=r.concat(n[i].controller.getAllParsedValues(e));e._cache.$bar=BN(r.sort((i,o)=>i-o))}return e._cache.$bar}function Vse(e){const t=e.iScale,n=zse(t,e.type);let r=t._length,i,o,a,s;const l=()=>{a===32767||a===-32768||(Su(s)&&(r=Math.min(r,Math.abs(a-s)||r)),s=a)};for(i=0,o=n.length;i<o;++i)a=t.getPixelForValue(n[i]),l();for(s=void 0,i=0,o=t.ticks.length;i<o;++i)a=t.getPixelForTick(i),l();return r}function Hse(e,t,n,r){const i=n.barThickness;let o,a;return Ve(i)?(o=t.min*n.categoryPercentage,a=n.barPercentage):(o=i*r,a=1),{chunk:o/r,ratio:a,start:t.pixels[e]-o/2}}function Yse(e,t,n,r){const i=t.pixels,o=i[e];let a=e>0?i[e-1]:null,s=e<i.length-1?i[e+1]:null;const l=n.categoryPercentage;a===null&&(a=o-(s===null?t.end-t.start:s-o)),s===null&&(s=o+o-a);const c=o-(o-Math.min(a,s))/2*l;return{chunk:Math.abs(s-a)/2*l/r,ratio:n.barPercentage,start:c}}function Use(e,t,n,r){const i=n.parse(e[0],r),o=n.parse(e[1],r),a=Math.min(i,o),s=Math.max(i,o);let l=a,c=s;Math.abs(a)>Math.abs(s)&&(l=s,c=a),t[n.axis]=c,t._custom={barStart:l,barEnd:c,start:i,end:o,min:a,max:s}}function _j(e,t,n,r){return rn(e)?Use(e,t,n,r):t[n.axis]=n.parse(e,r),t}function Sj(e,t,n,r){const i=e.iScale,o=e.vScale,a=i.getLabels(),s=i===o,l=[];let c,u,d,f;for(c=n,u=n+r;c<u;++c)f=t[c],d={},d[i.axis]=s||i.parse(a[c],c),l.push(_j(f,d,o,c));return l}function Ux(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function Kse(e,t,n){return e!==0?Ti(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function qse(e){let t,n,r,i,o;return e.horizontal?(t=e.base>e.x,n="left",r="right"):(t=e.base<e.y,n="bottom",r="top"),t?(i="end",o="start"):(i="start",o="end"),{start:n,end:r,reverse:t,top:i,bottom:o}}function Gse(e,t,n,r){let i=t.borderSkipped;const o={};if(!i){e.borderSkipped=o;return}if(i===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:a,end:s,reverse:l,top:c,bottom:u}=qse(e);i==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===r?i=c:(n._bottom||0)===r?i=u:(o[Oj(u,a,s,l)]=!0,i=c)),o[Oj(i,a,s,l)]=!0,e.borderSkipped=o}function Oj(e,t,n,r){return r?(e=Xse(e,t,n),e=Ej(e,n,t)):e=Ej(e,t,n),e}function Xse(e,t,n){return e===t?n:e===n?t:e}function Ej(e,t,n){return e==="start"?t:e==="end"?n:e}function Qse(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class Zse extends Ih{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,n,r,i){return Sj(t,n,r,i)}parseArrayData(t,n,r,i){return Sj(t,n,r,i)}parseObjectData(t,n,r,i){const{iScale:o,vScale:a}=t,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,c=o.axis==="x"?s:l,u=a.axis==="x"?s:l,d=[];let f,p,m,h;for(f=r,p=r+i;f<p;++f)h=n[f],m={},m[o.axis]=o.parse(Ja(h,c),f),d.push(_j(Ja(h,u),m,a,f));return d}updateRangeFromParsed(t,n,r,i){super.updateRangeFromParsed(t,n,r,i);const o=r._custom;o&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const n=this._cachedMeta,{iScale:r,vScale:i}=n,o=this.getParsed(t),a=o._custom,s=Ux(a)?"["+a.start+", "+a.end+"]":""+i.getLabelForValue(o[i.axis]);return{label:""+r.getLabelForValue(o[r.axis]),value:s}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,r,i){const o=i==="reset",{index:a,_cachedMeta:{vScale:s}}=this,l=s.getBasePixel(),c=s.isHorizontal(),u=this._getRuler(),{sharedOptions:d,includeOptions:f}=this._getSharedOptions(n,i);for(let p=n;p<n+r;p++){const m=this.getParsed(p),h=o||Ve(m[s.axis])?{base:l,head:l}:this._calculateBarValuePixels(p),g=this._calculateBarIndexPixels(p,u),b=(m._stacks||{})[s.axis],S={horizontal:c,base:h.base,enableBorderRadius:!b||Ux(m._custom)||a===b._top||a===b._bottom,x:c?h.head:g.center,y:c?g.center:h.head,height:c?g.size:Math.abs(h.size),width:c?Math.abs(h.size):g.size};f&&(S.options=d||this.resolveDataElementOptions(p,t[p].active?"active":i));const w=S.options||t[p].options;Gse(S,w,b,a),Qse(S,w,u.ratio),this.updateElement(t[p],p,S,i)}}_getStacks(t,n){const{iScale:r}=this._cachedMeta,i=r.getMatchingVisibleMetas(this._type).filter(u=>u.controller.options.grouped),o=r.options.stacked,a=[],s=this._cachedMeta.controller.getParsed(n),l=s&&s[r.axis],c=u=>{const d=u._parsed.find(p=>p[r.axis]===l),f=d&&d[u.vScale.axis];if(Ve(f)||isNaN(f))return!0};for(const u of i)if(!(n!==void 0&&c(u))&&((o===!1||a.indexOf(u.stack)===-1||o===void 0&&u.stack===void 0)&&a.push(u.stack),u.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,n=this.chart.options.indexAxis;return Object.keys(t).filter(r=>t[r].axis===n).shift()}_getAxis(){const t={},n=this.getFirstScaleIdForIndexAxis();for(const r of this.chart.data.datasets)t[Oe(this.chart.options.indexAxis==="x"?r.xAxisID:r.yAxisID,n)]=!0;return Object.keys(t)}_getStackIndex(t,n,r){const i=this._getStacks(t,r),o=n!==void 0?i.indexOf(n):-1;return o===-1?i.length-1:o}_getRuler(){const t=this.options,n=this._cachedMeta,r=n.iScale,i=[];let o,a;for(o=0,a=n.data.length;o<a;++o)i.push(r.getPixelForValue(this.getParsed(o)[r.axis],o));const s=t.barThickness;return{min:s||Vse(n),pixels:i,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:t.grouped,ratio:s?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:n,_stacked:r,index:i},options:{base:o,minBarLength:a}}=this,s=o||0,l=this.getParsed(t),c=l._custom,u=Ux(c);let d=l[n.axis],f=0,p=r?this.applyStack(n,l,r):d,m,h;p!==d&&(f=p-d,p=d),u&&(d=c.barStart,p=c.barEnd-c.barStart,d!==0&&Ti(d)!==Ti(c.barEnd)&&(f=0),f+=d);const g=!Ve(o)&&!u?o:f;let b=n.getPixelForValue(g);if(this.chart.getDataVisibility(t)?m=n.getPixelForValue(f+p):m=b,h=m-b,Math.abs(h)<a){h=Kse(h,n,s)*a,d===s&&(b-=h/2);const S=n.getPixelForDecimal(0),w=n.getPixelForDecimal(1),x=Math.min(S,w),_=Math.max(S,w);b=Math.max(Math.min(b,_),x),m=b+h,r&&!u&&(l._stacks[n.axis]._visualValues[i]=n.getValueForPixel(m)-n.getValueForPixel(b))}if(b===n.getPixelForValue(s)){const S=Ti(h)*n.getLineWidthForValue(s)/2;b+=S,h-=S}return{size:h,base:b,head:m,center:m+h/2}}_calculateBarIndexPixels(t,n){const r=n.scale,i=this.options,o=i.skipNull,a=Oe(i.maxBarThickness,1/0);let s,l;const c=this._getAxisCount();if(n.grouped){const u=o?this._getStackCount(t):n.stackCount,d=i.barThickness==="flex"?Yse(t,n,i,u*c):Hse(t,n,i,u*c),f=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,p=this._getAxis().indexOf(Oe(f,this.getFirstScaleIdForIndexAxis())),m=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0)+p;s=d.start+d.chunk*m+d.chunk/2,l=Math.min(a,d.chunk*d.ratio)}else s=r.getPixelForValue(this.getParsed(t)[r.axis],t),l=Math.min(a,n.min*n.ratio);return{base:s-l/2,head:s+l/2,center:s,size:l}}draw(){const t=this._cachedMeta,n=t.vScale,r=t.data,i=r.length;let o=0;for(;o<i;++o)this.getParsed(o)[n.axis]!==null&&!r[o].hidden&&r[o].draw(this._ctx)}}function Jse(e,t,n){let r=1,i=1,o=0,a=0;if(t<At){const s=e,l=s+t,c=Math.cos(s),u=Math.sin(s),d=Math.cos(l),f=Math.sin(l),p=(w,x,_)=>Pu(w,s,l,!0)?1:Math.max(x,x*n,_,_*n),m=(w,x,_)=>Pu(w,s,l,!0)?-1:Math.min(x,x*n,_,_*n),h=p(0,c,d),g=p(Qt,u,f),b=m(ot,c,d),S=m(ot+Qt,u,f);r=(h-b)/2,i=(g-S)/2,o=-(h+b)/2,a=-(g+S)/2}return{ratioX:r,ratioY:i,offsetX:o,offsetY:a}}class ele extends Ih{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:i}}=t.legend.options;return n.labels.map((o,a)=>{const l=t.getDatasetMeta(0).controller.getStyle(a);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}}};constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){const r=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=r;else{let o=l=>+r[l];if(Me(r[t])){const{key:l="value"}=this._parsing;o=c=>+Ja(r[c],l)}let a,s;for(a=t,s=t+n;a<s;++a)i._parsed[a]=o(a)}}_getRotation(){return wo(this.options.rotation-90)}_getCircumference(){return wo(this.options.circumference)}_getRotationExtents(){let t=At,n=-At;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)&&this.chart.getDatasetMeta(r).type===this._type){const i=this.chart.getDatasetMeta(r).controller,o=i._getRotation(),a=i._getCircumference();t=Math.min(t,o),n=Math.max(n,o+a)}return{rotation:t,circumference:n-t}}update(t){const n=this.chart,{chartArea:r}=n,i=this._cachedMeta,o=i.data,a=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,s=Math.max((Math.min(r.width,r.height)-a)/2,0),l=Math.min(rae(this.options.cutout,s),1),c=this._getRingWeight(this.index),{circumference:u,rotation:d}=this._getRotationExtents(),{ratioX:f,ratioY:p,offsetX:m,offsetY:h}=Jse(d,u,l),g=(r.width-a)/f,b=(r.height-a)/p,S=Math.max(Math.min(g,b)/2,0),w=DN(this.options.radius,S),x=Math.max(w*l,0),_=(w-x)/this._getVisibleDatasetWeightTotal();this.offsetX=m*w,this.offsetY=h*w,i.total=this.calculateTotal(),this.outerRadius=w-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*c,0),this.updateElements(o,0,o.length,t)}_circumference(t,n){const r=this.options,i=this._cachedMeta,o=this._getCircumference();return n&&r.animation.animateRotate||!this.chart.getDataVisibility(t)||i._parsed[t]===null||i.data[t].hidden?0:this.calculateCircumference(i._parsed[t]*o/At)}updateElements(t,n,r,i){const o=i==="reset",a=this.chart,s=a.chartArea,c=a.options.animation,u=(s.left+s.right)/2,d=(s.top+s.bottom)/2,f=o&&c.animateScale,p=f?0:this.innerRadius,m=f?0:this.outerRadius,{sharedOptions:h,includeOptions:g}=this._getSharedOptions(n,i);let b=this._getRotation(),S;for(S=0;S<n;++S)b+=this._circumference(S,o);for(S=n;S<n+r;++S){const w=this._circumference(S,o),x=t[S],_={x:u+this.offsetX,y:d+this.offsetY,startAngle:b,endAngle:b+w,circumference:w,outerRadius:m,innerRadius:p};g&&(_.options=h||this.resolveDataElementOptions(S,x.active?"active":i)),b+=w,this.updateElement(x,S,_,i)}}calculateTotal(){const t=this._cachedMeta,n=t.data;let r=0,i;for(i=0;i<n.length;i++){const o=t._parsed[i];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(i)&&!n[i].hidden&&(r+=Math.abs(o))}return r}calculateCircumference(t){const n=this._cachedMeta.total;return n>0&&!isNaN(t)?At*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],o=Tx(n._parsed[t],r.options.locale);return{label:i[t]||"",value:o}}getMaxBorderWidth(t){let n=0;const r=this.chart;let i,o,a,s,l;if(!t){for(i=0,o=r.data.datasets.length;i<o;++i)if(r.isDatasetVisible(i)){a=r.getDatasetMeta(i),t=a.data,s=a.controller;break}}if(!t)return 0;for(i=0,o=t.length;i<o;++i)l=s.resolveDataElementOptions(i),l.borderAlign!=="inner"&&(n=Math.max(n,l.borderWidth||0,l.hoverBorderWidth||0));return n}getMaxOffset(t){let n=0;for(let r=0,i=t.length;r<i;++r){const o=this.resolveDataElementOptions(r);n=Math.max(n,o.offset||0,o.hoverOffset||0)}return n}_getRingWeightOffset(t){let n=0;for(let r=0;r<t;++r)this.chart.isDatasetVisible(r)&&(n+=this._getRingWeight(r));return n}_getRingWeight(t){return Math.max(Oe(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class tle extends Ih{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 n=this._cachedMeta,{dataset:r,data:i=[],_dataset:o}=n,a=this.chart._animationsDisabled;let{start:s,count:l}=Sae(n,i,a);this._drawStart=s,this._drawCount=l,Oae(n)&&(s=0,l=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!o._decimated,r.points=i;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(r,void 0,{animated:!a,options:c},t),this.updateElements(i,s,l,t)}updateElements(t,n,r,i){const o=i==="reset",{iScale:a,vScale:s,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:d}=this._getSharedOptions(n,i),f=a.axis,p=s.axis,{spanGaps:m,segment:h}=this.options,g=Eu(m)?m:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||o||i==="none",S=n+r,w=t.length;let x=n>0&&this.getParsed(n-1);for(let _=0;_<w;++_){const E=t[_],C=b?E:{};if(_<n||_>=S){C.skip=!0;continue}const D=this.getParsed(_),T=Ve(D[p]),j=C[f]=a.getPixelForValue(D[f],_),A=C[p]=o||T?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,D,l):D[p],_);C.skip=isNaN(j)||isNaN(A)||T,C.stop=_>0&&Math.abs(D[f]-x[f])>g,h&&(C.parsed=D,C.raw=c.data[_]),d&&(C.options=u||this.resolveDataElementOptions(_,E.active?"active":i)),b||this.updateElement(E,_,C,i),x=D}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,r=n.options&&n.options.borderWidth||0,i=t.data||[];if(!i.length)return r;const o=i[0].size(this.resolveDataElementOptions(0)),a=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,o,a)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}function ls(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Kx{static override(t){Object.assign(Kx.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return ls()}parse(){return ls()}format(){return ls()}add(){return ls()}diff(){return ls()}startOf(){return ls()}endOf(){return ls()}}var nle={_date:Kx};function rle(e,t,n,r){const{controller:i,data:o,_sorted:a}=e,s=i._cachedMeta.iScale,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(s&&t===s.axis&&t!=="r"&&a&&o.length){const c=s._reversePixels?yae:ts;if(r){if(i._sharedOptions){const u=o[0],d=typeof u.getRange=="function"&&u.getRange(t);if(d){const f=c(o,t,n-d),p=c(o,t,n+d);return{lo:f.lo,hi:p.hi}}}}else{const u=c(o,t,n);if(l){const{vScale:d}=i._cachedMeta,{_parsed:f}=e,p=f.slice(0,u.lo+1).reverse().findIndex(h=>!Ve(h[d.axis]));u.lo-=Math.max(0,p);const m=f.slice(u.hi).findIndex(h=>!Ve(h[d.axis]));u.hi+=Math.max(0,m)}return u}}return{lo:0,hi:o.length-1}}function Rh(e,t,n,r,i){const o=e.getSortedVisibleDatasetMetas(),a=n[t];for(let s=0,l=o.length;s<l;++s){const{index:c,data:u}=o[s],{lo:d,hi:f}=rle(o[s],t,a,i);for(let p=d;p<=f;++p){const m=u[p];m.skip||r(m,c,p)}}}function ile(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(r,i){const o=t?Math.abs(r.x-i.x):0,a=n?Math.abs(r.y-i.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(a,2))}}function qx(e,t,n,r,i){const o=[];return!i&&!e.isPointInArea(t)||Rh(e,n,t,function(s,l,c){!i&&!Du(s,e.chartArea,0)||s.inRange(t.x,t.y,r)&&o.push({element:s,datasetIndex:l,index:c})},!0),o}function ole(e,t,n,r){let i=[];function o(a,s,l){const{startAngle:c,endAngle:u}=a.getProps(["startAngle","endAngle"],r),{angle:d}=LN(a,{x:t.x,y:t.y});Pu(d,c,u)&&i.push({element:a,datasetIndex:s,index:l})}return Rh(e,n,t,o),i}function ale(e,t,n,r,i,o){let a=[];const s=ile(n);let l=Number.POSITIVE_INFINITY;function c(u,d,f){const p=u.inRange(t.x,t.y,i);if(r&&!p)return;const m=u.getCenterPoint(i);if(!(!!o||e.isPointInArea(m))&&!p)return;const g=s(t,m);g<l?(a=[{element:u,datasetIndex:d,index:f}],l=g):g===l&&a.push({element:u,datasetIndex:d,index:f})}return Rh(e,n,t,c),a}function Gx(e,t,n,r,i,o){return!o&&!e.isPointInArea(t)?[]:n==="r"&&!r?ole(e,t,n,i):ale(e,t,n,r,i,o)}function Pj(e,t,n,r,i){const o=[],a=n==="x"?"inXRange":"inYRange";let s=!1;return Rh(e,n,t,(l,c,u)=>{l[a]&&l[a](t[n],i)&&(o.push({element:l,datasetIndex:c,index:u}),s=s||l.inRange(t.x,t.y,i))}),r&&!s?[]:o}var sle={modes:{index(e,t,n,r){const i=as(t,e),o=n.axis||"x",a=n.includeInvisible||!1,s=n.intersect?qx(e,i,o,r,a):Gx(e,i,o,!1,r,a),l=[];return s.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const u=s[0].index,d=c.data[u];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:u})}),l):[]},dataset(e,t,n,r){const i=as(t,e),o=n.axis||"xy",a=n.includeInvisible||!1;let s=n.intersect?qx(e,i,o,r,a):Gx(e,i,o,!1,r,a);if(s.length>0){const l=s[0].datasetIndex,c=e.getDatasetMeta(l).data;s=[];for(let u=0;u<c.length;++u)s.push({element:c[u],datasetIndex:l,index:u})}return s},point(e,t,n,r){const i=as(t,e),o=n.axis||"xy",a=n.includeInvisible||!1;return qx(e,i,o,r,a)},nearest(e,t,n,r){const i=as(t,e),o=n.axis||"xy",a=n.includeInvisible||!1;return Gx(e,i,o,n.intersect,r,a)},x(e,t,n,r){const i=as(t,e);return Pj(e,i,"x",n.intersect,r)},y(e,t,n,r){const i=as(t,e);return Pj(e,i,"y",n.intersect,r)}}};const kj=["left","top","right","bottom"];function Tu(e,t){return e.filter(n=>n.pos===t)}function Cj(e,t){return e.filter(n=>kj.indexOf(n.pos)===-1&&n.box.axis===t)}function Mu(e,t){return e.sort((n,r)=>{const i=t?r:n,o=t?n:r;return i.weight===o.weight?i.index-o.index:i.weight-o.weight})}function lle(e){const t=[];let n,r,i,o,a,s;for(n=0,r=(e||[]).length;n<r;++n)i=e[n],{position:o,options:{stack:a,stackWeight:s=1}}=i,t.push({index:n,box:i,pos:o,horizontal:i.isHorizontal(),weight:i.weight,stack:a&&o+a,stackWeight:s});return t}function cle(e){const t={};for(const n of e){const{stack:r,pos:i,stackWeight:o}=n;if(!r||!kj.includes(i))continue;const a=t[r]||(t[r]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=o}return t}function ule(e,t){const n=cle(e),{vBoxMaxWidth:r,hBoxMaxHeight:i}=t;let o,a,s;for(o=0,a=e.length;o<a;++o){s=e[o];const{fullSize:l}=s.box,c=n[s.stack],u=c&&s.stackWeight/c.weight;s.horizontal?(s.width=u?u*r:l&&t.availableWidth,s.height=i):(s.width=r,s.height=u?u*i:l&&t.availableHeight)}return n}function dle(e){const t=lle(e),n=Mu(t.filter(c=>c.box.fullSize),!0),r=Mu(Tu(t,"left"),!0),i=Mu(Tu(t,"right")),o=Mu(Tu(t,"top"),!0),a=Mu(Tu(t,"bottom")),s=Cj(t,"x"),l=Cj(t,"y");return{fullSize:n,leftAndTop:r.concat(o),rightAndBottom:i.concat(l).concat(a).concat(s),chartArea:Tu(t,"chartArea"),vertical:r.concat(i).concat(l),horizontal:o.concat(a).concat(s)}}function Dj(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function Aj(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function fle(e,t,n,r){const{pos:i,box:o}=n,a=e.maxPadding;if(!Me(i)){n.size&&(e[i]-=n.size);const d=r[n.stack]||{size:0,count:1};d.size=Math.max(d.size,n.horizontal?o.height:o.width),n.size=d.size/d.count,e[i]+=n.size}o.getPadding&&Aj(a,o.getPadding());const s=Math.max(0,t.outerWidth-Dj(a,e,"left","right")),l=Math.max(0,t.outerHeight-Dj(a,e,"top","bottom")),c=s!==e.w,u=l!==e.h;return e.w=s,e.h=l,n.horizontal?{same:c,other:u}:{same:u,other:c}}function ple(e){const t=e.maxPadding;function n(r){const i=Math.max(t[r]-e[r],0);return e[r]+=i,i}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function hle(e,t){const n=t.maxPadding;function r(i){const o={left:0,top:0,right:0,bottom:0};return i.forEach(a=>{o[a]=Math.max(t[a],n[a])}),o}return r(e?["left","right"]:["top","bottom"])}function Nu(e,t,n,r){const i=[];let o,a,s,l,c,u;for(o=0,a=e.length,c=0;o<a;++o){s=e[o],l=s.box,l.update(s.width||t.w,s.height||t.h,hle(s.horizontal,t));const{same:d,other:f}=fle(t,n,s,r);c|=d&&i.length,u=u||f,l.fullSize||i.push(s)}return c&&Nu(i,t,n,r)||u}function Lh(e,t,n,r,i){e.top=n,e.left=t,e.right=t+r,e.bottom=n+i,e.width=r,e.height=i}function Tj(e,t,n,r){const i=n.padding;let{x:o,y:a}=t;for(const s of e){const l=s.box,c=r[s.stack]||{placed:0,weight:1},u=s.stackWeight/c.weight||1;if(s.horizontal){const d=t.w*u,f=c.size||l.height;Su(c.start)&&(a=c.start),l.fullSize?Lh(l,i.left,a,n.outerWidth-i.right-i.left,f):Lh(l,t.left+c.placed,a,d,f),c.start=a,c.placed+=d,a=l.bottom}else{const d=t.h*u,f=c.size||l.width;Su(c.start)&&(o=c.start),l.fullSize?Lh(l,o,i.top,f,n.outerHeight-i.bottom-i.top):Lh(l,o,t.top+c.placed,f,d),c.start=o,c.placed+=d,o=l.right}}t.x=o,t.y=a}var ia={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,r){if(!e)return;const i=Jr(e.options.layout.padding),o=Math.max(t-i.width,0),a=Math.max(n-i.height,0),s=dle(e.boxes),l=s.vertical,c=s.horizontal;Ze(e.boxes,h=>{typeof h.beforeLayout=="function"&&h.beforeLayout()});const u=l.reduce((h,g)=>g.box.options&&g.box.options.display===!1?h:h+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/u,hBoxMaxHeight:a/2}),f=Object.assign({},i);Aj(f,Jr(r));const p=Object.assign({maxPadding:f,w:o,h:a,x:i.left,y:i.top},i),m=ule(l.concat(c),d);Nu(s.fullSize,p,d,m),Nu(l,p,d,m),Nu(c,p,d,m)&&Nu(l,p,d,m),ple(p),Tj(s.leftAndTop,p,d,m),p.x+=p.w,p.y+=p.h,Tj(s.rightAndBottom,p,d,m),e.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},Ze(s.chartArea,h=>{const g=h.box;Object.assign(g,e.chartArea),g.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}};class Mj{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,r){}removeEventListener(t,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,r,i){return n=Math.max(0,n||t.width),r=r||t.height,{width:n,height:Math.max(0,i?Math.floor(n/i):r)}}isAttached(t){return!0}updateConfig(t){}}class mle extends Mj{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Fh="$chartjs",gle={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Nj=e=>e===null||e==="";function vle(e,t){const n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[Fh]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Nj(i)){const o=sj(e,"width");o!==void 0&&(e.width=o)}if(Nj(r))if(e.style.height==="")e.height=e.width/(t||2);else{const o=sj(e,"height");o!==void 0&&(e.height=o)}return e}const jj=pse?{passive:!0}:!1;function yle(e,t,n){e&&e.addEventListener(t,n,jj)}function ble(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,jj)}function xle(e,t){const n=gle[e.type]||e.type,{x:r,y:i}=as(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:i!==void 0?i:null}}function $h(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function wle(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let a=!1;for(const s of o)a=a||$h(s.addedNodes,r),a=a&&!$h(s.removedNodes,r);a&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function _le(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let a=!1;for(const s of o)a=a||$h(s.removedNodes,r),a=a&&!$h(s.addedNodes,r);a&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const ju=new Map;let Ij=0;function Rj(){const e=window.devicePixelRatio;e!==Ij&&(Ij=e,ju.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function Sle(e,t){ju.size||window.addEventListener("resize",Rj),ju.set(e,t)}function Ole(e){ju.delete(e),ju.size||window.removeEventListener("resize",Rj)}function Ele(e,t,n){const r=e.canvas,i=r&&zx(r);if(!i)return;const o=zN((s,l)=>{const c=i.clientWidth;n(s,l),c<i.clientWidth&&n()},window),a=new ResizeObserver(s=>{const l=s[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||o(c,u)});return a.observe(i),Sle(e,o),a}function Xx(e,t,n){n&&n.disconnect(),t==="resize"&&Ole(e)}function Ple(e,t,n){const r=e.canvas,i=zN(o=>{e.ctx!==null&&n(xle(o,e))},e);return yle(r,t,i),i}class kle extends Mj{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(vle(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[Fh])return!1;const r=n[Fh].initial;["height","width"].forEach(o=>{const a=r[o];Ve(a)?n.removeAttribute(o):n.setAttribute(o,a)});const i=r.style||{};return Object.keys(i).forEach(o=>{n.style[o]=i[o]}),n.width=n.width,delete n[Fh],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),a={attach:wle,detach:_le,resize:Ele}[n]||Ple;i[n]=a(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),i=r[n];if(!i)return;({attach:Xx,detach:Xx,resize:Xx}[n]||ble)(t,n,i),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,i){return fse(t,n,r,i)}isAttached(t){const n=t&&zx(t);return!!(n&&n.isConnected)}}function Cle(e){return!Wx()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?mle:kle}let oa=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}hasValue(){return Eu(this.x)&&Eu(this.y)}getProps(t,n){const r=this.$animations;if(!n||!r)return this;const i={};return t.forEach(o=>{i[o]=r[o]&&r[o].active()?r[o]._to:this[o]}),i}};function Dle(e,t){const n=e.options.ticks,r=Ale(e),i=Math.min(n.maxTicksLimit||r,r),o=n.major.enabled?Mle(t):[],a=o.length,s=o[0],l=o[a-1],c=[];if(a>i)return Nle(t,c,o,a/i),c;const u=Tle(o,t,i);if(a>0){let d,f;const p=a>1?Math.round((l-s)/(a-1)):null;for(Bh(t,c,u,Ve(p)?0:s-p,s),d=0,f=a-1;d<f;d++)Bh(t,c,u,o[d],o[d+1]);return Bh(t,c,u,l,Ve(p)?t.length:l+p),c}return Bh(t,c,u),c}function Ale(e){const t=e.options.offset,n=e._tickSize(),r=e._length/n+(t?0:1),i=e._maxLength/n;return Math.floor(Math.min(r,i))}function Tle(e,t,n){const r=jle(e),i=t.length/n;if(!r)return Math.max(i,1);const o=dae(r);for(let a=0,s=o.length-1;a<s;a++){const l=o[a];if(l>i)return l}return Math.max(i,1)}function Mle(e){const t=[];let n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&t.push(n);return t}function Nle(e,t,n,r){let i=0,o=n[0],a;for(r=Math.ceil(r),a=0;a<e.length;a++)a===o&&(t.push(e[a]),i++,o=n[i*r])}function Bh(e,t,n,r,i){const o=Oe(r,0),a=Math.min(Oe(i,e.length),e.length);let s=0,l,c,u;for(n=Math.ceil(n),i&&(l=i-r,n=l/Math.floor(l/n)),u=o;u<0;)s++,u=Math.round(o+s*n);for(c=Math.max(o,0);c<a;c++)c===u&&(t.push(e[c]),s++,u=Math.round(o+s*n))}function jle(e){const t=e.length;let n,r;if(t<2)return!1;for(r=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==r)return!1;return r}const Ile=e=>e==="left"?"right":e==="right"?"left":e,Lj=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,Fj=(e,t)=>Math.min(t||e,e);function $j(e,t){const n=[],r=e.length/t,i=e.length;let o=0;for(;o<i;o+=r)n.push(e[Math.floor(o)]);return n}function Rle(e,t,n){const r=e.ticks.length,i=Math.min(t,r-1),o=e._startPixel,a=e._endPixel,s=1e-6;let l=e.getPixelForTick(i),c;if(!(n&&(r===1?c=Math.max(l-o,a-l):t===0?c=(e.getPixelForTick(1)-l)/2:c=(l-e.getPixelForTick(i-1))/2,l+=i<t?c:-c,l<o-s||l>a+s)))return l}function Lle(e,t){Ze(e,n=>{const r=n.gc,i=r.length/2;let o;if(i>t){for(o=0;o<i;++o)delete n.data[r[o]];r.splice(0,i)}})}function Iu(e){return e.drawTicks?e.tickLength:0}function Bj(e,t){if(!e.display)return 0;const n=Jn(e.font,t),r=Jr(e.padding);return(rn(e.text)?e.text.length:1)*n.lineHeight+r.height}function Fle(e,t){return is(e,{scale:t,type:"scale"})}function $le(e,t,n){return is(e,{tick:n,index:t,type:"tick"})}function Ble(e,t,n){let r=VN(e);return(n&&t!=="right"||!n&&t==="right")&&(r=Ile(r)),r}function Wle(e,t,n,r){const{top:i,left:o,bottom:a,right:s,chart:l}=e,{chartArea:c,scales:u}=l;let d=0,f,p,m;const h=a-i,g=s-o;if(e.isHorizontal()){if(p=xr(r,o,s),Me(n)){const b=Object.keys(n)[0],S=n[b];m=u[b].getPixelForValue(S)+h-t}else n==="center"?m=(c.bottom+c.top)/2+h-t:m=Lj(e,n,t);f=s-o}else{if(Me(n)){const b=Object.keys(n)[0],S=n[b];p=u[b].getPixelForValue(S)-g+t}else n==="center"?p=(c.left+c.right)/2-g+t:p=Lj(e,n,t);m=xr(r,a,i),d=n==="left"?-Qt:Qt}return{titleX:p,titleY:m,maxWidth:f,rotation:d}}class Sl extends oa{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,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:r,_suggestedMax:i}=this;return t=Ai(t,Number.POSITIVE_INFINITY),n=Ai(n,Number.NEGATIVE_INFINITY),r=Ai(r,Number.POSITIVE_INFINITY),i=Ai(i,Number.NEGATIVE_INFINITY),{min:Ai(t,r),max:Ai(n,i),minDefined:zr(t),maxDefined:zr(n)}}getMinMax(t){let{min:n,max:r,minDefined:i,maxDefined:o}=this.getUserBounds(),a;if(i&&o)return{min:n,max:r};const s=this.getMatchingVisibleMetas();for(let l=0,c=s.length;l<c;++l)a=s[l].controller.getMinMax(this,t),i||(n=Math.min(n,a.min)),o||(r=Math.max(r,a.max));return n=o&&n>r?r:n,r=i&&n>r?n:r,{min:Ai(n,Ai(r,n)),max:Ai(r,Ai(n,r))}}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(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){ht(this.options.beforeUpdate,[this])}update(t,n,r){const{beginAtZero:i,grace:o,ticks:a}=this.options,s=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Hae(this,o,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=s<this.ticks.length;this._convertTicksToLabels(l?$j(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source==="auto")&&(this.ticks=Dle(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,n,r;this.isHorizontal()?(n=this.left,r=this.right):(n=this.top,r=this.bottom,t=!t),this._startPixel=n,this._endPixel=r,this._reversePixels=t,this._length=r-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){ht(this.options.afterUpdate,[this])}beforeSetDimensions(){ht(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(){ht(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),ht(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){ht(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let r,i,o;for(r=0,i=t.length;r<i;r++)o=t[r],o.label=ht(n.callback,[o.value,r,t],this)}afterTickToLabelConversion(){ht(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){ht(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,r=Fj(this.ticks.length,t.ticks.maxTicksLimit),i=n.minRotation||0,o=n.maxRotation;let a=i,s,l,c;if(!this._isVisible()||!n.display||i>=o||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const u=this._getLabelSizes(),d=u.widest.width,f=u.highest.height,p=kn(this.chart.width-d,0,this.maxWidth);s=t.offset?this.maxWidth/r:p/(r-1),d+6>s&&(s=p/(r-(t.offset?.5:1)),l=this.maxHeight-Iu(t.grid)-n.padding-Bj(t.title,this.chart.options.font),c=Math.sqrt(d*d+f*f),a=mae(Math.min(Math.asin(kn((u.highest.height+6)/s,-1,1)),Math.asin(kn(l/c,-1,1))-Math.asin(kn(f/c,-1,1)))),a=Math.max(i,Math.min(o,a))),this.labelRotation=a}afterCalculateLabelRotation(){ht(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){ht(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:o}}=this,a=this._isVisible(),s=this.isHorizontal();if(a){const l=Bj(i,n.options.font);if(s?(t.width=this.maxWidth,t.height=Iu(o)+l):(t.height=this.maxHeight,t.width=Iu(o)+l),r.display&&this.ticks.length){const{first:c,last:u,widest:d,highest:f}=this._getLabelSizes(),p=r.padding*2,m=wo(this.labelRotation),h=Math.cos(m),g=Math.sin(m);if(s){const b=r.mirror?0:g*d.width+h*f.height;t.height=Math.min(this.maxHeight,t.height+b+p)}else{const b=r.mirror?0:h*d.width+g*f.height;t.width=Math.min(this.maxWidth,t.width+b+p)}this._calculatePadding(c,u,g,h)}}this._handleMargins(),s?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,r,i){const{ticks:{align:o,padding:a},position:s}=this.options,l=this.labelRotation!==0,c=s!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,p=0;l?c?(f=i*t.width,p=r*n.height):(f=r*t.height,p=i*n.width):o==="start"?p=n.width:o==="end"?f=t.width:o!=="inner"&&(f=t.width/2,p=n.width/2),this.paddingLeft=Math.max((f-u+a)*this.width/(this.width-u),0),this.paddingRight=Math.max((p-d+a)*this.width/(this.width-d),0)}else{let u=n.height/2,d=t.height/2;o==="start"?(u=0,d=t.height):o==="end"&&(u=n.height,d=0),this.paddingTop=u+a,this.paddingBottom=d+a}}_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(){ht(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,r;for(n=0,r=t.length;n<r;n++)Ve(t[n].label)&&(t.splice(n,1),r--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let r=this.ticks;n<r.length&&(r=$j(r,n)),this._labelSizes=t=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,r){const{ctx:i,_longestTextCache:o}=this,a=[],s=[],l=Math.floor(n/Fj(n,r));let c=0,u=0,d,f,p,m,h,g,b,S,w,x,_;for(d=0;d<n;d+=l){if(m=t[d].label,h=this._resolveTickFontOptions(d),i.font=g=h.string,b=o[g]=o[g]||{data:{},gc:[]},S=h.lineHeight,w=x=0,!Ve(m)&&!rn(m))w=GN(i,b.data,b.gc,w,m),x=S;else if(rn(m))for(f=0,p=m.length;f<p;++f)_=m[f],!Ve(_)&&!rn(_)&&(w=GN(i,b.data,b.gc,w,_),x+=S);a.push(w),s.push(x),c=Math.max(w,c),u=Math.max(x,u)}Lle(o,n);const E=a.indexOf(c),C=s.indexOf(u),D=T=>({width:a[T]||0,height:s[T]||0});return{first:D(0),last:D(n-1),widest:D(E),highest:D(C),widths:a,heights:s}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return vae(this._alignToPixels?rs(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const r=n[t];return r.$context||(r.$context=$le(this.getContext(),t,r))}return this.$context||(this.$context=Fle(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=wo(this.labelRotation),r=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),o=this._getLabelSizes(),a=t.autoSkipPadding||0,s=o?o.widest.width+a:0,l=o?o.highest.height+a:0;return this.isHorizontal()?l*r>s*i?s/r:l/i:l*i<s*r?l/r:s/i}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis,r=this.chart,i=this.options,{grid:o,position:a,border:s}=i,l=o.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),f=Iu(o),p=[],m=s.setContext(this.getContext()),h=m.display?m.width:0,g=h/2,b=function(L){return rs(r,L,h)};let S,w,x,_,E,C,D,T,j,A,P,N;if(a==="top")S=b(this.bottom),C=this.bottom-f,T=S-g,A=b(t.top)+g,N=t.bottom;else if(a==="bottom")S=b(this.top),A=t.top,N=b(t.bottom)-g,C=S+g,T=this.top+f;else if(a==="left")S=b(this.right),E=this.right-f,D=S-g,j=b(t.left)+g,P=t.right;else if(a==="right")S=b(this.left),j=t.left,P=b(t.right)-g,E=S+g,D=this.left+f;else if(n==="x"){if(a==="center")S=b((t.top+t.bottom)/2+.5);else if(Me(a)){const L=Object.keys(a)[0],$=a[L];S=b(this.chart.scales[L].getPixelForValue($))}A=t.top,N=t.bottom,C=S+g,T=C+f}else if(n==="y"){if(a==="center")S=b((t.left+t.right)/2);else if(Me(a)){const L=Object.keys(a)[0],$=a[L];S=b(this.chart.scales[L].getPixelForValue($))}E=S-g,D=E-f,j=t.left,P=t.right}const M=Oe(i.ticks.maxTicksLimit,d),R=Math.max(1,Math.ceil(d/M));for(w=0;w<d;w+=R){const L=this.getContext(w),$=o.setContext(L),V=s.setContext(L),z=$.lineWidth,B=$.color,X=V.dash||[],q=V.dashOffset,re=$.tickWidth,J=$.tickColor,ee=$.tickBorderDash||[],oe=$.tickBorderDashOffset;x=Rle(this,w,l),x!==void 0&&(_=rs(r,x,z),c?E=D=j=P=_:C=T=A=N=_,p.push({tx1:E,ty1:C,tx2:D,ty2:T,x1:j,y1:A,x2:P,y2:N,width:z,color:B,borderDash:X,borderDashOffset:q,tickWidth:re,tickColor:J,tickBorderDash:ee,tickBorderDashOffset:oe}))}return this._ticksLength=d,this._borderValue=S,p}_computeLabelItems(t){const n=this.axis,r=this.options,{position:i,ticks:o}=r,a=this.isHorizontal(),s=this.ticks,{align:l,crossAlign:c,padding:u,mirror:d}=o,f=Iu(r.grid),p=f+u,m=d?-u:p,h=-wo(this.labelRotation),g=[];let b,S,w,x,_,E,C,D,T,j,A,P,N="middle";if(i==="top")E=this.bottom-m,C=this._getXAxisLabelAlignment();else if(i==="bottom")E=this.top+m,C=this._getXAxisLabelAlignment();else if(i==="left"){const R=this._getYAxisLabelAlignment(f);C=R.textAlign,_=R.x}else if(i==="right"){const R=this._getYAxisLabelAlignment(f);C=R.textAlign,_=R.x}else if(n==="x"){if(i==="center")E=(t.top+t.bottom)/2+p;else if(Me(i)){const R=Object.keys(i)[0],L=i[R];E=this.chart.scales[R].getPixelForValue(L)+p}C=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")_=(t.left+t.right)/2-p;else if(Me(i)){const R=Object.keys(i)[0],L=i[R];_=this.chart.scales[R].getPixelForValue(L)}C=this._getYAxisLabelAlignment(f).textAlign}n==="y"&&(l==="start"?N="top":l==="end"&&(N="bottom"));const M=this._getLabelSizes();for(b=0,S=s.length;b<S;++b){w=s[b],x=w.label;const R=o.setContext(this.getContext(b));D=this.getPixelForTick(b)+o.labelOffset,T=this._resolveTickFontOptions(b),j=T.lineHeight,A=rn(x)?x.length:1;const L=A/2,$=R.color,V=R.textStrokeColor,z=R.textStrokeWidth;let B=C;a?(_=D,C==="inner"&&(b===S-1?B=this.options.reverse?"left":"right":b===0?B=this.options.reverse?"right":"left":B="center"),i==="top"?c==="near"||h!==0?P=-A*j+j/2:c==="center"?P=-M.highest.height/2-L*j+j:P=-M.highest.height+j/2:c==="near"||h!==0?P=j/2:c==="center"?P=M.highest.height/2-L*j:P=M.highest.height-A*j,d&&(P*=-1),h!==0&&!R.showLabelBackdrop&&(_+=j/2*Math.sin(h))):(E=D,P=(1-A)*j/2);let X;if(R.showLabelBackdrop){const q=Jr(R.backdropPadding),re=M.heights[b],J=M.widths[b];let ee=P-q.top,oe=0-q.left;switch(N){case"middle":ee-=re/2;break;case"bottom":ee-=re;break}switch(C){case"center":oe-=J/2;break;case"right":oe-=J;break;case"inner":b===S-1?oe-=J:b>0&&(oe-=J/2);break}X={left:oe,top:ee,width:J+q.width,height:re+q.height,color:R.backdropColor}}g.push({label:x,font:T,textOffset:P,options:{rotation:h,color:$,strokeColor:V,strokeWidth:z,textAlign:B,textBaseline:N,translation:[_,E],backdrop:X}})}return g}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-wo(this.labelRotation))return t==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:r,mirror:i,padding:o}}=this.options,a=this._getLabelSizes(),s=t+o,l=a.widest.width;let c,u;return n==="left"?i?(u=this.right+o,r==="near"?c="left":r==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-s,r==="near"?c="right":r==="center"?(c="center",u-=l/2):(c="left",u=this.left)):n==="right"?i?(u=this.left+o,r==="near"?c="right":r==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+s,r==="near"?c="left":r==="center"?(c="center",u+=l/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:r,top:i,width:o,height:a}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(r,i,o,a),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(o=>o.value===t);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const n=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,a;const s=(l,c,u)=>{!u.width||!u.color||(r.save(),r.lineWidth=u.width,r.strokeStyle=u.color,r.setLineDash(u.borderDash||[]),r.lineDashOffset=u.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(c.x,c.y),r.stroke(),r.restore())};if(n.display)for(o=0,a=i.length;o<a;++o){const l=i[o];n.drawOnChartArea&&s({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.drawTicks&&s({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:n,options:{border:r,grid:i}}=this,o=r.setContext(this.getContext()),a=r.display?o.width:0;if(!a)return;const s=i.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,u,d,f;this.isHorizontal()?(c=rs(t,this.left,a)-a/2,u=rs(t,this.right,s)+s/2,d=f=l):(d=rs(t,this.top,a)-a/2,f=rs(t,this.bottom,s)+s/2,c=u=l),n.save(),n.lineWidth=o.width,n.strokeStyle=o.color,n.beginPath(),n.moveTo(c,d),n.lineTo(u,f),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const r=this.ctx,i=this._computeLabelArea();i&&Ix(r,i);const o=this.getLabelItems(t);for(const a of o){const s=a.options,l=a.font,c=a.label,u=a.textOffset;kh(r,c,0,u,l,s)}i&&Rx(r)}drawTitle(){const{ctx:t,options:{position:n,title:r,reverse:i}}=this;if(!r.display)return;const o=Jn(r.font),a=Jr(r.padding),s=r.align;let l=o.lineHeight/2;n==="bottom"||n==="center"||Me(n)?(l+=a.bottom,rn(r.text)&&(l+=o.lineHeight*(r.text.length-1))):l+=a.top;const{titleX:c,titleY:u,maxWidth:d,rotation:f}=Wle(this,l,n,s);kh(t,r.text,0,0,o,{color:r.color,maxWidth:d,rotation:f,textAlign:Ble(s,n,i),textBaseline:"middle",translation:[c,u]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,n=t.ticks&&t.ticks.z||0,r=Oe(t.grid&&t.grid.z,-1),i=Oe(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==Sl.prototype.draw?[{z:n,draw:o=>{this.draw(o)}}]:[{z:r,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[];let o,a;for(o=0,a=n.length;o<a;++o){const s=n[o];s[r]===this.id&&(!t||s.type===t)&&i.push(s)}return i}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return Jn(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Wh{constructor(t,n,r){this.type=t,this.scope=n,this.override=r,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let r;Hle(n)&&(r=this.register(n));const i=this.items,o=t.id,a=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in i||(i[o]=t,zle(t,a,r),this.override&&Lt.override(t.id,t.overrides)),a}get(t){return this.items[t]}unregister(t){const n=this.items,r=t.id,i=this.scope;r in n&&delete n[r],i&&r in Lt[i]&&(delete Lt[i][r],this.override&&delete ns[r])}}function zle(e,t,n){const r=wu(Object.create(null),[n?Lt.get(n):{},Lt.get(t),e.defaults]);Lt.set(t,r),e.defaultRoutes&&Vle(t,e.defaultRoutes),e.descriptors&&Lt.describe(t,e.descriptors)}function Vle(e,t){Object.keys(t).forEach(n=>{const r=n.split("."),i=r.pop(),o=[e].concat(r).join("."),a=t[n].split("."),s=a.pop(),l=a.join(".");Lt.route(o,i,l,s)})}function Hle(e){return"id"in e&&"defaults"in e}class Yle{constructor(){this.controllers=new Wh(Ih,"datasets",!0),this.elements=new Wh(oa,"elements"),this.plugins=new Wh(Object,"plugins"),this.scales=new Wh(Sl,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,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(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,r){[...n].forEach(i=>{const o=r||this._getRegistryForType(i);r||o.isForType(i)||o===this.plugins&&i.id?this._exec(t,o,i):Ze(i,a=>{const s=r||this._getRegistryForType(a);this._exec(t,s,a)})})}_exec(t,n,r){const i=Px(t);ht(r["before"+i],[],r),n[t](r),ht(r["after"+i],[],r)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const r=this._typedRegistries[n];if(r.isForType(t))return r}return this.plugins}_get(t,n,r){const i=n.get(t);if(i===void 0)throw new Error('"'+t+'" is not a registered '+r+".");return i}}var Mi=new Yle;class Ule{constructor(){this._init=[]}notify(t,n,r,i){n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const o=i?this._descriptors(t).filter(i):this._descriptors(t),a=this._notify(o,t,n,r);return n==="afterDestroy"&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall")),a}_notify(t,n,r,i){i=i||{};for(const o of t){const a=o.plugin,s=a[r],l=[n,i,o.options];if(ht(s,l,a)===!1&&i.cancelable)return!1}return!0}invalidate(){Ve(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){const r=t&&t.config,i=Oe(r.options&&r.options.plugins,{}),o=Kle(r);return i===!1&&!n?[]:Gle(t,o,i,n)}_notifyStateChanges(t){const n=this._oldCache||[],r=this._cache,i=(o,a)=>o.filter(s=>!a.some(l=>s.plugin.id===l.plugin.id));this._notify(i(n,r),t,"stop"),this._notify(i(r,n),t,"start")}}function Kle(e){const t={},n=[],r=Object.keys(Mi.plugins.items);for(let o=0;o<r.length;o++)n.push(Mi.getPlugin(r[o]));const i=e.plugins||[];for(let o=0;o<i.length;o++){const a=i[o];n.indexOf(a)===-1&&(n.push(a),t[a.id]=!0)}return{plugins:n,localIds:t}}function qle(e,t){return!t&&e===!1?null:e===!0?{}:e}function Gle(e,{plugins:t,localIds:n},r,i){const o=[],a=e.getContext();for(const s of t){const l=s.id,c=qle(r[l],i);c!==null&&o.push({plugin:s,options:Xle(e.config,{plugin:s,local:n[l]},c,a)})}return o}function Xle(e,{plugin:t,local:n},r,i){const o=e.pluginScopeKeys(t),a=e.getOptionScopes(r,o);return n&&t.defaults&&a.push(t.defaults),e.createResolver(a,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Qx(e,t){const n=Lt.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function Qle(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function Zle(e,t){return e===t?"_index_":"_value_"}function Wj(e){if(e==="x"||e==="y"||e==="r")return e}function Jle(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function Zx(e,...t){if(Wj(e))return e;for(const n of t){const r=n.axis||Jle(n.position)||e.length>1&&Wj(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function zj(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function ece(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(r=>r.xAxisID===e||r.yAxisID===e);if(n.length)return zj(e,"x",n[0])||zj(e,"y",n[0])}return{}}function tce(e,t){const n=ns[e.type]||{scales:{}},r=t.scales||{},i=Qx(e.type,t),o=Object.create(null);return Object.keys(r).forEach(a=>{const s=r[a];if(!Me(s))return console.error(`Invalid scale configuration for scale: ${a}`);if(s._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);const l=Zx(a,s,ece(a,e),Lt.scales[s.type]),c=Zle(l,i),u=n.scales||{};o[a]=_u(Object.create(null),[{axis:l},s,u[l],u[c]])}),e.data.datasets.forEach(a=>{const s=a.type||e.type,l=a.indexAxis||Qx(s,t),u=(ns[s]||{}).scales||{};Object.keys(u).forEach(d=>{const f=Qle(d,l),p=a[f+"AxisID"]||f;o[p]=o[p]||Object.create(null),_u(o[p],[{axis:f},r[p],u[d]])})}),Object.keys(o).forEach(a=>{const s=o[a];_u(s,[Lt.scales[s.type],Lt.scale])}),o}function Vj(e){const t=e.options||(e.options={});t.plugins=Oe(t.plugins,{}),t.scales=tce(e,t)}function Hj(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function nce(e){return e=e||{},e.data=Hj(e.data),Vj(e),e}const Yj=new Map,Uj=new Set;function zh(e,t){let n=Yj.get(e);return n||(n=t(),Yj.set(e,n),Uj.add(n)),n}const Ru=(e,t,n)=>{const r=Ja(t,n);r!==void 0&&e.add(r)};class rce{constructor(t){this._config=nce(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=Hj(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(),Vj(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return zh(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return zh(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return zh(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return zh(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const r=this._scopeCache;let i=r.get(t);return(!i||n)&&(i=new Map,r.set(t,i)),i}getOptionScopes(t,n,r){const{options:i,type:o}=this,a=this._cachedScopes(t,r),s=a.get(n);if(s)return s;const l=new Set;n.forEach(u=>{t&&(l.add(t),u.forEach(d=>Ru(l,t,d))),u.forEach(d=>Ru(l,i,d)),u.forEach(d=>Ru(l,ns[o]||{},d)),u.forEach(d=>Ru(l,Lt,d)),u.forEach(d=>Ru(l,Mx,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),Uj.has(n)&&a.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,ns[n]||{},Lt.datasets[n]||{},{type:n},Lt,Mx]}resolveNamedOptions(t,n,r,i=[""]){const o={$shared:!0},{resolver:a,subPrefixes:s}=Kj(this._resolverCache,t,i);let l=a;if(oce(a,n)){o.$shared=!1,r=na(r)?r():r;const c=this.createResolver(t,r,s);l=xl(a,r,c)}for(const c of n)o[c]=l[c];return o}createResolver(t,n,r=[""],i){const{resolver:o}=Kj(this._resolverCache,t,r);return Me(n)?xl(o,n,void 0,i):o}}function Kj(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));const i=n.join();let o=r.get(i);return o||(o={resolver:Fx(t,n),subPrefixes:n.filter(s=>!s.toLowerCase().includes("hover"))},r.set(i,o)),o}const ice=e=>Me(e)&&Object.getOwnPropertyNames(e).some(t=>na(e[t]));function oce(e,t){const{isScriptable:n,isIndexable:r}=JN(e);for(const i of t){const o=n(i),a=r(i),s=(a||o)&&e[i];if(o&&(na(s)||ice(s))||a&&rn(s))return!0}return!1}var ace="4.5.0";const sce=["top","bottom","left","right","chartArea"];function qj(e,t){return e==="top"||e==="bottom"||sce.indexOf(e)===-1&&t==="x"}function Gj(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function Xj(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),ht(n&&n.onComplete,[e],t)}function lce(e){const t=e.chart,n=t.options.animation;ht(n&&n.onProgress,[e],t)}function Qj(e){return Wx()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const Vh={},Zj=e=>{const t=Qj(e);return Object.values(Vh).filter(n=>n.canvas===t).pop()};function cce(e,t,n){const r=Object.keys(e);for(const i of r){const o=+i;if(o>=t){const a=e[i];delete e[i],(n>0||o>t)&&(e[o+n]=a)}}}function uce(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}let Fn=class{static defaults=Lt;static instances=Vh;static overrides=ns;static registry=Mi;static version=ace;static getChart=Zj;static register(...t){Mi.add(...t),Jj()}static unregister(...t){Mi.remove(...t),Jj()}constructor(t,n){const r=this.config=new rce(n),i=Qj(t),o=Zj(i);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const a=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||Cle(i)),this.platform.updateConfig(r);const s=this.platform.acquireContext(i,a.aspectRatio),l=s&&s.canvas,c=l&&l.height,u=l&&l.width;if(this.id=nae(),this.ctx=s,this.canvas=l,this.width=u,this.height=c,this._options=a,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 Ule,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=wae(d=>this.update(d),a.resizeDelay||0),this._dataChanges=[],Vh[this.id]=this,!s||!l){console.error("Failed to create chart: can't acquire context from the given item");return}_o.listen(this,"complete",Xj),_o.listen(this,"progress",lce),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:i,_aspectRatio:o}=this;return Ve(t)?n&&o?o:i?r/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 Mi}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():aj(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return XN(this.canvas,this.ctx),this}stop(){return _o.stop(this),this}resize(t,n){_o.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const r=this.options,i=this.canvas,o=r.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(i,t,n,o),s=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,aj(this,s,!0)&&(this.notifyPlugins("resize",{size:a}),ht(r.onResize,[this,a],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Ze(n,(r,i)=>{r.id=i})}buildOrUpdateScales(){const t=this.options,n=t.scales,r=this.scales,i=Object.keys(r).reduce((a,s)=>(a[s]=!1,a),{});let o=[];n&&(o=o.concat(Object.keys(n).map(a=>{const s=n[a],l=Zx(a,s),c=l==="r",u=l==="x";return{options:s,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),Ze(o,a=>{const s=a.options,l=s.id,c=Zx(l,s),u=Oe(s.type,a.dtype);(s.position===void 0||qj(s.position,c)!==qj(a.dposition))&&(s.position=a.dposition),i[l]=!0;let d=null;if(l in r&&r[l].type===u)d=r[l];else{const f=Mi.getScale(u);d=new f({id:l,type:u,ctx:this.ctx,chart:this}),r[d.id]=d}d.init(s,t)}),Ze(i,(a,s)=>{a||delete r[s]}),Ze(r,a=>{ia.configure(this,a,a.options),ia.addBox(this,a)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,r=t.length;if(t.sort((i,o)=>i.index-o.index),r>n){for(let i=n;i<r;++i)this._destroyDatasetMeta(i);t.splice(n,r-n)}this._sortedMetasets=t.slice(0).sort(Gj("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((r,i)=>{n.filter(o=>o===r._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let r,i;for(this._removeUnreferencedMetasets(),r=0,i=n.length;r<i;r++){const o=n[r];let a=this.getDatasetMeta(r);const s=o.type||this.config.type;if(a.type&&a.type!==s&&(this._destroyDatasetMeta(r),a=this.getDatasetMeta(r)),a.type=s,a.indexAxis=o.indexAxis||Qx(s,this.options),a.order=o.order||0,a.index=r,a.label=""+o.label,a.visible=this.isDatasetVisible(r),a.controller)a.controller.updateIndex(r),a.controller.linkScales();else{const l=Mi.getController(s),{datasetElementType:c,dataElementType:u}=Lt.datasets[s];Object.assign(l,{dataElementType:Mi.getElement(u),datasetElementType:c&&Mi.getElement(c)}),a.controller=new l(this,r),t.push(a.controller)}}return this._updateMetasets(),t}_resetElements(){Ze(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:d}=this.getDatasetMeta(c),f=!i&&o.indexOf(d)===-1;d.buildOrUpdateElements(f),a=Math.max(+d.getMaxOverflow(),a)}a=this._minPadding=r.layout.autoPadding?a:0,this._updateLayout(a),i||Ze(o,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Gj("z","_idx"));const{_active:s,_lastEvent:l}=this;l?this._eventHandler(l,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){Ze(this.scales,t=>{ia.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!MN(n,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:i,count:o}of n){const a=r==="_removeElements"?-o:o;cce(t,i,a)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=o=>new Set(t.filter(a=>a[0]===o).map((a,s)=>s+","+a.splice(1).join(","))),i=r(0);for(let o=1;o<n;o++)if(!MN(i,r(o)))return;return Array.from(i).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;ia.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],Ze(this.boxes,i=>{r&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,o)=>{i._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n<r;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,r=this.data.datasets.length;n<r;++n)this._updateDataset(n,na(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const r=this.getDatasetMeta(t),i={meta:r,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(r.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(_o.has(this)?this.attached&&!_o.running(this)&&_o.start(this):(this.draw(),Xj({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:r,height:i}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(r,i)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets,r=[];let i,o;for(i=0,o=n.length;i<o;++i){const a=n[i];(!t||a.visible)&&r.push(a)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,r={meta:t,index:t.index,cancelable:!0},i=kse(this,t);this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(i&&Ix(n,i),t.controller.draw(),i&&Rx(n),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(t){return Du(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,i){const o=sle.modes[n];return typeof o=="function"?o(this,t,r,i):[]}getDatasetMeta(t){const n=this.data.datasets[t],r=this._metasets;let i=r.filter(o=>o&&o._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},r.push(i)),i}getContext(){return this.$context||(this.$context=is(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(t,n){const r=this.getDatasetMeta(t);r.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,r){const i=r?"show":"hide",o=this.getDatasetMeta(t),a=o.controller._resolveAnimations(void 0,i);Su(n)?(o.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),a.update(o,{visible:r}),this.update(s=>s.datasetIndex===t?i:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),_o.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),XN(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete Vh[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,n=this.platform,r=(o,a)=>{n.addEventListener(this,o,a),t[o]=a},i=(o,a,s)=>{o.offsetX=a,o.offsetY=s,this._eventHandler(o)};Ze(this.options.events,o=>r(o,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,r=(l,c)=>{n.addEventListener(this,l,c),t[l]=c},i=(l,c)=>{t[l]&&(n.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let a;const s=()=>{i("attach",s),this.attached=!0,this.resize(),r("resize",o),r("detach",a)};a=()=>{this.attached=!1,i("resize",o),this._stop(),this._resize(0,0),r("attach",s)},n.isAttached(this.canvas)?s():a()}unbindEvents(){Ze(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},Ze(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,r){const i=r?"set":"remove";let o,a,s,l;for(n==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+i+"DatasetHoverStyle"]()),s=0,l=t.length;s<l;++s){a=t[s];const c=a&&this.getDatasetMeta(a.datasetIndex).controller;c&&c[i+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],r=t.map(({datasetIndex:o,index:a})=>{const s=this.getDatasetMeta(o);if(!s)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:s.data[a],index:a}});!Sh(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(t,n,r){return this._plugins.notify(this,t,n,r)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,r){const i=this.options.hover,o=(l,c)=>l.filter(u=>!c.some(d=>u.datasetIndex===d.datasetIndex&&u.index===d.index)),a=o(n,t),s=r?t:o(t,n);a.length&&this.updateHoverStyle(a,i.mode,!1),s.length&&i.mode&&this.updateHoverStyle(s,i.mode,!0)}_eventHandler(t,n){const r={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},i=a=>(a.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,i)===!1)return;const o=this._handleEvent(t,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,i),(o||r.changed)&&this.render(),this}_handleEvent(t,n,r){const{_active:i=[],options:o}=this,a=n,s=this._getActiveElements(t,i,r,a),l=lae(t),c=uce(t,this._lastEvent,r,l);r&&(this._lastEvent=null,ht(o.onHover,[t,s,this],this),l&&ht(o.onClick,[t,s,this],this));const u=!Sh(s,i);return(u||n)&&(this._active=s,this._updateHoverStyles(s,i,n)),this._lastEvent=c,u}_getActiveElements(t,n,r,i){if(t.type==="mouseout")return[];if(!r)return n;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,i)}};function Jj(){return Ze(Fn.instances,e=>e._plugins.invalidate())}function dce(e,t,n){const{startAngle:r,x:i,y:o,outerRadius:a,innerRadius:s,options:l}=t,{borderWidth:c,borderJoinStyle:u}=l,d=Math.min(c/a,Zr(r-n));if(e.beginPath(),e.arc(i,o,a-c/2,r+d/2,n-d/2),s>0){const f=Math.min(c/s,Zr(r-n));e.arc(i,o,s+c/2,n-f/2,r+f/2,!0)}else{const f=Math.min(c/2,a*Zr(r-n));if(u==="round")e.arc(i,o,f,n-ot/2,r+ot/2,!0);else if(u==="bevel"){const p=2*f*f,m=-p*Math.cos(n+ot/2)+i,h=-p*Math.sin(n+ot/2)+o,g=p*Math.cos(r+ot/2)+i,b=p*Math.sin(r+ot/2)+o;e.lineTo(m,h),e.lineTo(g,b)}}e.closePath(),e.moveTo(0,0),e.rect(0,0,e.canvas.width,e.canvas.height),e.clip("evenodd")}function fce(e,t,n){const{startAngle:r,pixelMargin:i,x:o,y:a,outerRadius:s,innerRadius:l}=t;let c=i/s;e.beginPath(),e.arc(o,a,s,r-c,n+c),l>i?(c=i/l,e.arc(o,a,l,n+c,r-c,!0)):e.arc(o,a,i,n+Qt,r-Qt),e.closePath(),e.clip()}function pce(e){return Lx(e,["outerStart","outerEnd","innerStart","innerEnd"])}function hce(e,t,n,r){const i=pce(e.options.borderRadius),o=(n-t)/2,a=Math.min(o,r*t/2),s=l=>{const c=(n-Math.min(o,l))*r/2;return kn(l,0,Math.min(o,c))};return{outerStart:s(i.outerStart),outerEnd:s(i.outerEnd),innerStart:kn(i.innerStart,0,a),innerEnd:kn(i.innerEnd,0,a)}}function Ol(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function Hh(e,t,n,r,i,o){const{x:a,y:s,startAngle:l,pixelMargin:c,innerRadius:u}=t,d=Math.max(t.outerRadius+r+n-c,0),f=u>0?u+r+n+c:0;let p=0;const m=i-l;if(r){const R=u>0?u-r:0,L=d>0?d-r:0,$=(R+L)/2,V=$!==0?m*$/($+r):m;p=(m-V)/2}const h=Math.max(.001,m*d-n/ot)/d,g=(m-h)/2,b=l+g+p,S=i-g-p,{outerStart:w,outerEnd:x,innerStart:_,innerEnd:E}=hce(t,f,d,S-b),C=d-w,D=d-x,T=b+w/C,j=S-x/D,A=f+_,P=f+E,N=b+_/A,M=S-E/P;if(e.beginPath(),o){const R=(T+j)/2;if(e.arc(a,s,d,T,R),e.arc(a,s,d,R,j),x>0){const z=Ol(D,j,a,s);e.arc(z.x,z.y,x,j,S+Qt)}const L=Ol(P,S,a,s);if(e.lineTo(L.x,L.y),E>0){const z=Ol(P,M,a,s);e.arc(z.x,z.y,E,S+Qt,M+Math.PI)}const $=(S-E/f+(b+_/f))/2;if(e.arc(a,s,f,S-E/f,$,!0),e.arc(a,s,f,$,b+_/f,!0),_>0){const z=Ol(A,N,a,s);e.arc(z.x,z.y,_,N+Math.PI,b-Qt)}const V=Ol(C,b,a,s);if(e.lineTo(V.x,V.y),w>0){const z=Ol(C,T,a,s);e.arc(z.x,z.y,w,b-Qt,T)}}else{e.moveTo(a,s);const R=Math.cos(T)*d+a,L=Math.sin(T)*d+s;e.lineTo(R,L);const $=Math.cos(j)*d+a,V=Math.sin(j)*d+s;e.lineTo($,V)}e.closePath()}function mce(e,t,n,r,i){const{fullCircles:o,startAngle:a,circumference:s}=t;let l=t.endAngle;if(o){Hh(e,t,n,r,l,i);for(let c=0;c<o;++c)e.fill();isNaN(s)||(l=a+(s%At||At))}return Hh(e,t,n,r,l,i),e.fill(),l}function gce(e,t,n,r,i){const{fullCircles:o,startAngle:a,circumference:s,options:l}=t,{borderWidth:c,borderJoinStyle:u,borderDash:d,borderDashOffset:f,borderRadius:p}=l,m=l.borderAlign==="inner";if(!c)return;e.setLineDash(d||[]),e.lineDashOffset=f,m?(e.lineWidth=c*2,e.lineJoin=u||"round"):(e.lineWidth=c,e.lineJoin=u||"bevel");let h=t.endAngle;if(o){Hh(e,t,n,r,h,i);for(let g=0;g<o;++g)e.stroke();isNaN(s)||(h=a+(s%At||At))}m&&fce(e,t,h),l.selfJoin&&h-a>=ot&&p===0&&u!=="miter"&&dce(e,t,h),o||(Hh(e,t,n,r,h,i),e.stroke())}class Jx extends oa{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:t=>t!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,n,r){const i=this.getProps(["x","y"],r),{angle:o,distance:a}=LN(i,{x:t,y:n}),{startAngle:s,endAngle:l,innerRadius:c,outerRadius:u,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],r),f=(this.options.spacing+this.options.borderWidth)/2,p=Oe(d,l-s),m=Pu(o,s,l)&&s!==l,h=p>=At||m,g=ra(a,c+f,u+f);return h&&g}getCenterPoint(t){const{x:n,y:r,startAngle:i,endAngle:o,innerRadius:a,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:l,spacing:c}=this.options,u=(i+o)/2,d=(a+s+c+l)/2;return{x:n+Math.cos(u)*d,y:r+Math.sin(u)*d}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:n,circumference:r}=this,i=(n.offset||0)/4,o=(n.spacing||0)/2,a=n.circular;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=r>At?Math.floor(r/At):0,r===0||this.innerRadius<0||this.outerRadius<0)return;t.save();const s=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(s)*i,Math.sin(s)*i);const l=1-Math.sin(Math.min(ot,r||0)),c=i*l;t.fillStyle=n.backgroundColor,t.strokeStyle=n.borderColor,mce(t,this,c,o,a),gce(t,this,c,o,a),t.restore()}}function eI(e,t,n=t){e.lineCap=Oe(n.borderCapStyle,t.borderCapStyle),e.setLineDash(Oe(n.borderDash,t.borderDash)),e.lineDashOffset=Oe(n.borderDashOffset,t.borderDashOffset),e.lineJoin=Oe(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=Oe(n.borderWidth,t.borderWidth),e.strokeStyle=Oe(n.borderColor,t.borderColor)}function vce(e,t,n){e.lineTo(n.x,n.y)}function yce(e){return e.stepped?Iae:e.tension||e.cubicInterpolationMode==="monotone"?Rae:vce}function tI(e,t,n={}){const r=e.length,{start:i=0,end:o=r-1}=n,{start:a,end:s}=t,l=Math.max(i,a),c=Math.min(o,s),u=i<a&&o<a||i>s&&o>s;return{count:r,start:l,loop:t.loop,ilen:c<l&&!u?r+c-l:c-l}}function bce(e,t,n,r){const{points:i,options:o}=t,{count:a,start:s,loop:l,ilen:c}=tI(i,n,r),u=yce(o);let{move:d=!0,reverse:f}=r||{},p,m,h;for(p=0;p<=c;++p)m=i[(s+(f?c-p:p))%a],!m.skip&&(d?(e.moveTo(m.x,m.y),d=!1):u(e,h,m,f,o.stepped),h=m);return l&&(m=i[(s+(f?c:0))%a],u(e,h,m,f,o.stepped)),!!l}function xce(e,t,n,r){const i=t.points,{count:o,start:a,ilen:s}=tI(i,n,r),{move:l=!0,reverse:c}=r||{};let u=0,d=0,f,p,m,h,g,b;const S=x=>(a+(c?s-x:x))%o,w=()=>{h!==g&&(e.lineTo(u,g),e.lineTo(u,h),e.lineTo(u,b))};for(l&&(p=i[S(0)],e.moveTo(p.x,p.y)),f=0;f<=s;++f){if(p=i[S(f)],p.skip)continue;const x=p.x,_=p.y,E=x|0;E===m?(_<h?h=_:_>g&&(g=_),u=(d*u+x)/++d):(w(),e.lineTo(x,_),m=E,d=0,h=g=_),b=_}w()}function e1(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?xce:bce}function wce(e){return e.stepped?hse:e.tension||e.cubicInterpolationMode==="monotone"?mse:ss}function _ce(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),eI(e,t.options),e.stroke(i)}function Sce(e,t,n,r){const{segments:i,options:o}=t,a=e1(t);for(const s of i)eI(e,o,s.style),e.beginPath(),a(e,t,s,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const Oce=typeof Path2D=="function";function Ece(e,t,n,r){Oce&&!t.options.segment?_ce(e,t,n,r):Sce(e,t,n,r)}class t1 extends oa{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=>t!=="borderDash"&&t!=="fill"};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,n){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const i=r.spanGaps?this._loop:this._fullLoop;ase(this._points,r,t,i,n),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=Sse(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,r=t.length;return r&&n[t[r-1].end]}interpolate(t,n){const r=this.options,i=t[n],o=this.points,a=xse(this,{property:n,start:i,end:i});if(!a.length)return;const s=[],l=wce(r);let c,u;for(c=0,u=a.length;c<u;++c){const{start:d,end:f}=a[c],p=o[d],m=o[f];if(p===m){s.push(p);continue}const h=Math.abs((i-p[n])/(m[n]-p[n])),g=l(p,m,h,r.stepped);g[n]=t[n],s.push(g)}return s.length===1?s[0]:s}pathSegment(t,n,r){return e1(this)(t,this,n,r)}path(t,n,r){const i=this.segments,o=e1(this);let a=this._loop;n=n||0,r=r||this.points.length-n;for(const s of i)a&=o(t,this,s,{start:n,end:n+r-1});return!!a}draw(t,n,r,i){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),Ece(t,this,r,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function nI(e,t,n,r){const i=e.options,{[n]:o}=e.getProps([n],r);return Math.abs(t-o)<i.radius+i.hitRadius}class n1 extends oa{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,n,r){const i=this.options,{x:o,y:a}=this.getProps(["x","y"],r);return Math.pow(t-o,2)+Math.pow(n-a,2)<Math.pow(i.hitRadius+i.radius,2)}inXRange(t,n){return nI(this,t,"x",n)}inYRange(t,n){return nI(this,t,"y",n)}getCenterPoint(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}size(t){t=t||this.options||{};let n=t.radius||0;n=Math.max(n,n&&t.hoverRadius||0);const r=n&&t.borderWidth||0;return(n+r)*2}draw(t,n){const r=this.options;this.skip||r.radius<.1||!Du(this,n,this.size(r)/2)||(t.strokeStyle=r.borderColor,t.lineWidth=r.borderWidth,t.fillStyle=r.backgroundColor,jx(t,r,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function rI(e,t){const{x:n,y:r,base:i,width:o,height:a}=e.getProps(["x","y","base","width","height"],t);let s,l,c,u,d;return e.horizontal?(d=a/2,s=Math.min(n,i),l=Math.max(n,i),c=r-d,u=r+d):(d=o/2,s=n-d,l=n+d,c=Math.min(r,i),u=Math.max(r,i)),{left:s,top:c,right:l,bottom:u}}function aa(e,t,n,r){return e?0:kn(t,n,r)}function Pce(e,t,n){const r=e.options.borderWidth,i=e.borderSkipped,o=ZN(r);return{t:aa(i.top,o.top,0,n),r:aa(i.right,o.right,0,t),b:aa(i.bottom,o.bottom,0,n),l:aa(i.left,o.left,0,t)}}function kce(e,t,n){const{enableBorderRadius:r}=e.getProps(["enableBorderRadius"]),i=e.options.borderRadius,o=bl(i),a=Math.min(t,n),s=e.borderSkipped,l=r||Me(i);return{topLeft:aa(!l||s.top||s.left,o.topLeft,0,a),topRight:aa(!l||s.top||s.right,o.topRight,0,a),bottomLeft:aa(!l||s.bottom||s.left,o.bottomLeft,0,a),bottomRight:aa(!l||s.bottom||s.right,o.bottomRight,0,a)}}function Cce(e){const t=rI(e),n=t.right-t.left,r=t.bottom-t.top,i=Pce(e,n/2,r/2),o=kce(e,n/2,r/2);return{outer:{x:t.left,y:t.top,w:n,h:r,radius:o},inner:{x:t.left+i.l,y:t.top+i.t,w:n-i.l-i.r,h:r-i.t-i.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,o.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(i.b,i.r))}}}}function r1(e,t,n,r){const i=t===null,o=n===null,s=e&&!(i&&o)&&rI(e,r);return s&&(i||ra(t,s.left,s.right))&&(o||ra(n,s.top,s.bottom))}function Dce(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function Ace(e,t){e.rect(t.x,t.y,t.w,t.h)}function i1(e,t,n={}){const r=e.x!==n.x?-t:0,i=e.y!==n.y?-t:0,o=(e.x+e.w!==n.x+n.w?t:0)-r,a=(e.y+e.h!==n.y+n.h?t:0)-i;return{x:e.x+r,y:e.y+i,w:e.w+o,h:e.h+a,radius:e.radius}}class El extends oa{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:n,options:{borderColor:r,backgroundColor:i}}=this,{inner:o,outer:a}=Cce(this),s=Dce(a.radius)?Ch:Ace;t.save(),(a.w!==o.w||a.h!==o.h)&&(t.beginPath(),s(t,i1(a,n,o)),t.clip(),s(t,i1(o,-n,a)),t.fillStyle=r,t.fill("evenodd")),t.beginPath(),s(t,i1(o,n)),t.fillStyle=i,t.fill(),t.restore()}inRange(t,n,r){return r1(this,t,n,r)}inXRange(t,n){return r1(this,t,null,n)}inYRange(t,n){return r1(this,null,t,n)}getCenterPoint(t){const{x:n,y:r,base:i,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(n+i)/2:n,y:o?r:(r+i)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}const iI=(e,t)=>{let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}},Tce=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class oI extends oa{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,n,r){this.maxWidth=t,this.maxHeight=n,this._margins=r,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 n=ht(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(r=>t.filter(r,this.chart.data))),t.sort&&(n=n.sort((r,i)=>t.sort(r,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const r=t.labels,i=Jn(r.font),o=i.size,a=this._computeTitleHeight(),{boxWidth:s,itemHeight:l}=iI(r,o);let c,u;n.font=i.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(a,o,s,l)+10):(u=this.maxHeight,c=this._fitCols(a,i,s,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(u,t.maxHeight||this.maxHeight)}_fitRows(t,n,r,i){const{ctx:o,maxWidth:a,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],u=i+s;let d=t;o.textAlign="left",o.textBaseline="middle";let f=-1,p=-u;return this.legendItems.forEach((m,h)=>{const g=r+n/2+o.measureText(m.text).width;(h===0||c[c.length-1]+g+2*s>a)&&(d+=u,c[c.length-(h>0?0:1)]=0,p+=u,f++),l[h]={left:0,top:p,row:f,width:g,height:i},c[c.length-1]+=g+s}),d}_fitCols(t,n,r,i){const{ctx:o,maxHeight:a,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=a-t;let d=s,f=0,p=0,m=0,h=0;return this.legendItems.forEach((g,b)=>{const{itemWidth:S,itemHeight:w}=Mce(r,n,o,g,i);b>0&&p+w+2*s>u&&(d+=f+s,c.push({width:f,height:p}),m+=f+s,h++,f=p=0),l[b]={left:m,top:p,col:h,width:S,height:w},f=Math.max(f,S),p+=w+s}),d+=f,c.push({width:f,height:p}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:i},rtl:o}}=this,a=_l(o,this.left,this.width);if(this.isHorizontal()){let s=0,l=xr(r,this.left+i,this.right-this.lineWidths[s]);for(const c of n)s!==c.row&&(s=c.row,l=xr(r,this.left+i,this.right-this.lineWidths[s])),c.top+=this.top+t+i,c.left=a.leftForLtr(a.x(l),c.width),l+=c.width+i}else{let s=0,l=xr(r,this.top+t+i,this.bottom-this.columnSizes[s].height);for(const c of n)c.col!==s&&(s=c.col,l=xr(r,this.top+t+i,this.bottom-this.columnSizes[s].height)),c.top=l,c.left+=this.left+i,c.left=a.leftForLtr(a.x(c.left),c.width),l+=c.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Ix(t,this),this._draw(),Rx(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:i}=this,{align:o,labels:a}=t,s=Lt.color,l=_l(t.rtl,this.left,this.width),c=Jn(a.font),{padding:u}=a,d=c.size,f=d/2;let p;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=c.string;const{boxWidth:m,boxHeight:h,itemHeight:g}=iI(a,d),b=function(E,C,D){if(isNaN(m)||m<=0||isNaN(h)||h<0)return;i.save();const T=Oe(D.lineWidth,1);if(i.fillStyle=Oe(D.fillStyle,s),i.lineCap=Oe(D.lineCap,"butt"),i.lineDashOffset=Oe(D.lineDashOffset,0),i.lineJoin=Oe(D.lineJoin,"miter"),i.lineWidth=T,i.strokeStyle=Oe(D.strokeStyle,s),i.setLineDash(Oe(D.lineDash,[])),a.usePointStyle){const j={radius:h*Math.SQRT2/2,pointStyle:D.pointStyle,rotation:D.rotation,borderWidth:T},A=l.xPlus(E,m/2),P=C+f;QN(i,j,A,P,a.pointStyleWidth&&m)}else{const j=C+Math.max((d-h)/2,0),A=l.leftForLtr(E,m),P=bl(D.borderRadius);i.beginPath(),Object.values(P).some(N=>N!==0)?Ch(i,{x:A,y:j,w:m,h,radius:P}):i.rect(A,j,m,h),i.fill(),T!==0&&i.stroke()}i.restore()},S=function(E,C,D){kh(i,D.text,E,C+g/2,c,{strikethrough:D.hidden,textAlign:l.textAlign(D.textAlign)})},w=this.isHorizontal(),x=this._computeTitleHeight();w?p={x:xr(o,this.left+u,this.right-r[0]),y:this.top+u+x,line:0}:p={x:this.left+u,y:xr(o,this.top+x+u,this.bottom-n[0].height),line:0},lj(this.ctx,t.textDirection);const _=g+u;this.legendItems.forEach((E,C)=>{i.strokeStyle=E.fontColor,i.fillStyle=E.fontColor;const D=i.measureText(E.text).width,T=l.textAlign(E.textAlign||(E.textAlign=a.textAlign)),j=m+f+D;let A=p.x,P=p.y;l.setWidth(this.width),w?C>0&&A+j+u>this.right&&(P=p.y+=_,p.line++,A=p.x=xr(o,this.left+u,this.right-r[p.line])):C>0&&P+_>this.bottom&&(A=p.x=A+n[p.line].width+u,p.line++,P=p.y=xr(o,this.top+x+u,this.bottom-n[p.line].height));const N=l.x(A);if(b(N,P,E),A=_ae(T,A+m+f,w?A+j:this.right,t.rtl),S(l.x(A),P,E),w)p.x+=j+u;else if(typeof E.text!="string"){const M=c.lineHeight;p.y+=aI(E,M)+u}else p.y+=_}),cj(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=Jn(n.font),i=Jr(n.padding);if(!n.display)return;const o=_l(t.rtl,this.left,this.width),a=this.ctx,s=n.position,l=r.size/2,c=i.top+l;let u,d=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),u=this.top+c,d=xr(t.align,d,this.right-f);else{const m=this.columnSizes.reduce((h,g)=>Math.max(h,g.height),0);u=c+xr(t.align,this.top,this.bottom-m-t.labels.padding-this._computeTitleHeight())}const p=xr(s,d,d+f);a.textAlign=o.textAlign(VN(s)),a.textBaseline="middle",a.strokeStyle=n.color,a.fillStyle=n.color,a.font=r.string,kh(a,n.text,p,u,r)}_computeTitleHeight(){const t=this.options.title,n=Jn(t.font),r=Jr(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,i,o;if(ra(t,this.left,this.right)&&ra(n,this.top,this.bottom)){for(o=this.legendHitBoxes,r=0;r<o.length;++r)if(i=o[r],ra(t,i.left,i.left+i.width)&&ra(n,i.top,i.top+i.height))return this.legendItems[r]}return null}handleEvent(t){const n=this.options;if(!Ice(t.type,n))return;const r=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const i=this._hoveredItem,o=Tce(i,r);i&&!o&&ht(n.onLeave,[t,i,this],this),this._hoveredItem=r,r&&!o&&ht(n.onHover,[t,r,this],this)}else r&&ht(n.onClick,[t,r,this],this)}}function Mce(e,t,n,r,i){const o=Nce(r,e,t,n),a=jce(i,r,t.lineHeight);return{itemWidth:o,itemHeight:a}}function Nce(e,t,n,r){let i=e.text;return i&&typeof i!="string"&&(i=i.reduce((o,a)=>o.length>a.length?o:a)),t+n.size/2+r.measureText(i).width}function jce(e,t,n){let r=e;return typeof t.text!="string"&&(r=aI(t,n)),r}function aI(e,t){const n=e.text?e.text.length:0;return t*n}function Ice(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var ei={id:"legend",_element:oI,start(e,t,n){const r=e.legend=new oI({ctx:e.ctx,options:n,chart:e});ia.configure(e,r,n),ia.addBox(e,r)},stop(e){ia.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;ia.configure(e,r,n),r.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const r=t.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),t.hidden=!0):(i.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:i,color:o,useBorderRadius:a,borderRadius:s}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(n?0:void 0),u=Jr(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:r||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:a&&(s||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};const Lu={average(e){if(!e.length)return!1;let t,n,r=new Set,i=0,o=0;for(t=0,n=e.length;t<n;++t){const s=e[t].element;if(s&&s.hasValue()){const l=s.tooltipPosition();r.add(l.x),i+=l.y,++o}}return o===0||r.size===0?!1:{x:[...r].reduce((s,l)=>s+l)/r.size,y:i/o}},nearest(e,t){if(!e.length)return!1;let n=t.x,r=t.y,i=Number.POSITIVE_INFINITY,o,a,s;for(o=0,a=e.length;o<a;++o){const l=e[o].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),u=kx(t,c);u<i&&(i=u,s=l)}}if(s){const l=s.tooltipPosition();n=l.x,r=l.y}return{x:n,y:r}}};function Ni(e,t){return t&&(rn(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function So(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
|
|
281
281
|
`)>-1?e.split(`
|
|
282
|
-
`):e}function Rce(e,t){const{element:n,datasetIndex:r,index:i}=t,o=e.getDatasetMeta(r).controller,{label:a,value:s}=o.getLabelAndValue(i);return{chart:e,label:a,parsed:o.getParsed(i),raw:e.data.datasets[r].data[i],formattedValue:s,dataset:o.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function sI(e,t){const n=e.chart.ctx,{body:r,footer:i,title:o}=e,{boxWidth:a,boxHeight:s}=t,l=Jn(t.bodyFont),c=Jn(t.titleFont),u=Jn(t.footerFont),d=o.length,f=i.length,p=r.length,m=Jr(t.padding);let h=m.height,g=0,b=r.reduce((x,_)=>x+_.before.length+_.lines.length+_.after.length,0);if(b+=e.beforeBody.length+e.afterBody.length,d&&(h+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),b){const x=t.displayColors?Math.max(s,l.lineHeight):l.lineHeight;h+=p*x+(b-p)*l.lineHeight+(b-1)*t.bodySpacing}f&&(h+=t.footerMarginTop+f*u.lineHeight+(f-1)*t.footerSpacing);let S=0;const w=function(x){g=Math.max(g,n.measureText(x).width+S)};return n.save(),n.font=c.string,Ze(e.title,w),n.font=l.string,Ze(e.beforeBody.concat(e.afterBody),w),S=t.displayColors?a+2+t.boxPadding:0,Ze(r,x=>{Ze(x.before,w),Ze(x.lines,w),Ze(x.after,w)}),S=0,n.font=u.string,Ze(e.footer,w),n.restore(),g+=m.width,{width:g,height:h}}function Lce(e,t){const{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}function Fce(e,t,n,r){const{x:i,width:o}=r,a=n.caretSize+n.caretPadding;if(e==="left"&&i+o+a>t.width||e==="right"&&i-o-a<0)return!0}function $ce(e,t,n,r){const{x:i,width:o}=n,{width:a,chartArea:{left:s,right:l}}=e;let c="center";return r==="center"?c=i<=(s+l)/2?"left":"right":i<=o/2?c="left":i>=a-o/2&&(c="right"),Fce(c,e,t,n)&&(c="center"),c}function lI(e,t,n){const r=n.yAlign||t.yAlign||Lce(e,n);return{xAlign:n.xAlign||t.xAlign||$ce(e,t,n,r),yAlign:r}}function Bce(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function Wce(e,t,n){let{y:r,height:i}=e;return t==="top"?r+=n:t==="bottom"?r-=i+n:r-=i/2,r}function cI(e,t,n,r){const{caretSize:i,caretPadding:o,cornerRadius:a}=e,{xAlign:s,yAlign:l}=n,c=i+o,{topLeft:u,topRight:d,bottomLeft:f,bottomRight:p}=bl(a);let m=Bce(t,s);const h=Wce(t,l,c);return l==="center"?s==="left"?m+=c:s==="right"&&(m-=c):s==="left"?m-=Math.max(u,f)+i:s==="right"&&(m+=Math.max(d,p)+i),{x:kn(m,0,r.width-t.width),y:kn(h,0,r.height-t.height)}}function Yh(e,t,n){const r=Jr(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function uI(e){return Ni([],So(e))}function zce(e,t,n){return is(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function dI(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const fI={beforeTitle:xo,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return n[t.dataIndex]}return""},afterTitle:xo,beforeBody:xo,beforeLabel:xo,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return Ve(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:xo,afterBody:xo,beforeFooter:xo,footer:xo,afterFooter:xo};function er(e,t,n,r){const i=e[t].call(n,r);return typeof i>"u"?fI[t].call(n,r):i}class pI extends oa{static positioners=Lu;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 n=this.chart,r=this.options.setContext(this.getContext()),i=r.enabled&&n.options.animation&&r.animations,o=new mj(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=zce(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,i=er(r,"beforeTitle",this,t),o=er(r,"title",this,t),a=er(r,"afterTitle",this,t);let s=[];return s=Ni(s,So(i)),s=Ni(s,So(o)),s=Ni(s,So(a)),s}getBeforeBody(t,n){return uI(er(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,i=[];return Ze(t,o=>{const a={before:[],lines:[],after:[]},s=dI(r,o);Ni(a.before,So(er(s,"beforeLabel",this,o))),Ni(a.lines,er(s,"label",this,o)),Ni(a.after,So(er(s,"afterLabel",this,o))),i.push(a)}),i}getAfterBody(t,n){return uI(er(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,i=er(r,"beforeFooter",this,t),o=er(r,"footer",this,t),a=er(r,"afterFooter",this,t);let s=[];return s=Ni(s,So(i)),s=Ni(s,So(o)),s=Ni(s,So(a)),s}_createItems(t){const n=this._active,r=this.chart.data,i=[],o=[],a=[];let s=[],l,c;for(l=0,c=n.length;l<c;++l)s.push(Rce(this.chart,n[l]));return t.filter&&(s=s.filter((u,d,f)=>t.filter(u,d,f,r))),t.itemSort&&(s=s.sort((u,d)=>t.itemSort(u,d,r))),Ze(s,u=>{const d=dI(t.callbacks,u);i.push(er(d,"labelColor",this,u)),o.push(er(d,"labelPointStyle",this,u)),a.push(er(d,"labelTextColor",this,u))}),this.labelColors=i,this.labelPointStyles=o,this.labelTextColors=a,this.dataPoints=s,s}update(t,n){const r=this.options.setContext(this.getContext()),i=this._active;let o,a=[];if(!i.length)this.opacity!==0&&(o={opacity:0});else{const s=Lu[r.position].call(this,i,this._eventPosition);a=this._createItems(r),this.title=this.getTitle(a,r),this.beforeBody=this.getBeforeBody(a,r),this.body=this.getBody(a,r),this.afterBody=this.getAfterBody(a,r),this.footer=this.getFooter(a,r);const l=this._size=sI(this,r),c=Object.assign({},s,l),u=lI(this.chart,r,c),d=cI(r,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,o={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:s.x,caretY:s.y}}this._tooltipItems=a,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,i){const o=this.getCaretPosition(t,r,i);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)}getCaretPosition(t,n,r){const{xAlign:i,yAlign:o}=this,{caretSize:a,cornerRadius:s}=r,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:d}=bl(s),{x:f,y:p}=t,{width:m,height:h}=n;let g,b,S,w,x,_;return o==="center"?(x=p+h/2,i==="left"?(g=f,b=g-a,w=x+a,_=x-a):(g=f+m,b=g+a,w=x-a,_=x+a),S=g):(i==="left"?b=f+Math.max(l,u)+a:i==="right"?b=f+m-Math.max(c,d)-a:b=this.caretX,o==="top"?(w=p,x=w-a,g=b-a,S=b+a):(w=p+h,x=w+a,g=b+a,S=b-a),_=w),{x1:g,x2:b,x3:S,y1:w,y2:x,y3:_}}drawTitle(t,n,r){const i=this.title,o=i.length;let a,s,l;if(o){const c=_l(r.rtl,this.x,this.width);for(t.x=Yh(this,r.titleAlign,r),n.textAlign=c.textAlign(r.titleAlign),n.textBaseline="middle",a=Jn(r.titleFont),s=r.titleSpacing,n.fillStyle=r.titleColor,n.font=a.string,l=0;l<o;++l)n.fillText(i[l],c.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+s,l+1===o&&(t.y+=r.titleMarginBottom-s)}}_drawColorBox(t,n,r,i,o){const a=this.labelColors[r],s=this.labelPointStyles[r],{boxHeight:l,boxWidth:c}=o,u=Jn(o.bodyFont),d=Yh(this,"left",o),f=i.x(d),p=l<u.lineHeight?(u.lineHeight-l)/2:0,m=n.y+p;if(o.usePointStyle){const h={radius:Math.min(c,l)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},g=i.leftForLtr(f,c)+c/2,b=m+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,jx(t,h,g,b),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,jx(t,h,g,b)}else{t.lineWidth=Me(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,t.strokeStyle=a.borderColor,t.setLineDash(a.borderDash||[]),t.lineDashOffset=a.borderDashOffset||0;const h=i.leftForLtr(f,c),g=i.leftForLtr(i.xPlus(f,1),c-2),b=bl(a.borderRadius);Object.values(b).some(S=>S!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,Ch(t,{x:h,y:m,w:c,h:l,radius:b}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),Ch(t,{x:g,y:m+1,w:c-2,h:l-2,radius:b}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(h,m,c,l),t.strokeRect(h,m,c,l),t.fillStyle=a.backgroundColor,t.fillRect(g,m+1,c-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:i}=this,{bodySpacing:o,bodyAlign:a,displayColors:s,boxHeight:l,boxWidth:c,boxPadding:u}=r,d=Jn(r.bodyFont);let f=d.lineHeight,p=0;const m=_l(r.rtl,this.x,this.width),h=function(D){n.fillText(D,m.x(t.x+p),t.y+f/2),t.y+=f+o},g=m.textAlign(a);let b,S,w,x,_,E,C;for(n.textAlign=a,n.textBaseline="middle",n.font=d.string,t.x=Yh(this,g,r),n.fillStyle=r.bodyColor,Ze(this.beforeBody,h),p=s&&g!=="right"?a==="center"?c/2+u:c+2+u:0,x=0,E=i.length;x<E;++x){for(b=i[x],S=this.labelTextColors[x],n.fillStyle=S,Ze(b.before,h),w=b.lines,s&&w.length&&(this._drawColorBox(n,t,x,m,r),f=Math.max(d.lineHeight,l)),_=0,C=w.length;_<C;++_)h(w[_]),f=d.lineHeight;Ze(b.after,h)}p=0,f=d.lineHeight,Ze(this.afterBody,h),t.y-=o}drawFooter(t,n,r){const i=this.footer,o=i.length;let a,s;if(o){const l=_l(r.rtl,this.x,this.width);for(t.x=Yh(this,r.footerAlign,r),t.y+=r.footerMarginTop,n.textAlign=l.textAlign(r.footerAlign),n.textBaseline="middle",a=Jn(r.footerFont),n.fillStyle=r.footerColor,n.font=a.string,s=0;s<o;++s)n.fillText(i[s],l.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+r.footerSpacing}}drawBackground(t,n,r,i){const{xAlign:o,yAlign:a}=this,{x:s,y:l}=t,{width:c,height:u}=r,{topLeft:d,topRight:f,bottomLeft:p,bottomRight:m}=bl(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(s+d,l),a==="top"&&this.drawCaret(t,n,r,i),n.lineTo(s+c-f,l),n.quadraticCurveTo(s+c,l,s+c,l+f),a==="center"&&o==="right"&&this.drawCaret(t,n,r,i),n.lineTo(s+c,l+u-m),n.quadraticCurveTo(s+c,l+u,s+c-m,l+u),a==="bottom"&&this.drawCaret(t,n,r,i),n.lineTo(s+p,l+u),n.quadraticCurveTo(s,l+u,s,l+u-p),a==="center"&&o==="left"&&this.drawCaret(t,n,r,i),n.lineTo(s,l+d),n.quadraticCurveTo(s,l,s+d,l),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,i=r&&r.x,o=r&&r.y;if(i||o){const a=Lu[t.position].call(this,this._active,this._eventPosition);if(!a)return;const s=this._size=sI(this,t),l=Object.assign({},a,this._size),c=lI(n,t,l),u=cI(t,l,c,n);(i._to!==u.x||o._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=s.width,this.height=s.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},o={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const a=Jr(n.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&s&&(t.save(),t.globalAlpha=r,this.drawBackground(o,t,i,n),lj(t,n.textDirection),o.y+=a.top,this.drawTitle(o,t,n),this.drawBody(o,t,n),this.drawFooter(o,t,n),cj(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,i=t.map(({datasetIndex:s,index:l})=>{const c=this.chart.getDatasetMeta(s);if(!c)throw new Error("Cannot find a dataset at index "+s);return{datasetIndex:s,element:c.data[l],index:l}}),o=!Sh(r,i),a=this._positionChanged(i,n);(o||a)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,o=this._active||[],a=this._getActiveElements(t,o,n,r),s=this._positionChanged(a,t),l=n||!Sh(a,o)||s;return l&&(this._active=a,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,r,i){const o=this.options;if(t.type==="mouseout")return[];if(!i)return n.filter(s=>this.chart.data.datasets[s.datasetIndex]&&this.chart.getDatasetMeta(s.datasetIndex).controller.getParsed(s.index)!==void 0);const a=this.chart.getElementsAtEventForMode(t,o.mode,o,r);return o.reverse&&a.reverse(),a}_positionChanged(t,n){const{caretX:r,caretY:i,options:o}=this,a=Lu[o.position].call(this,t,n);return a!==!1&&(r!==a.x||i!==a.y)}}var Vr={id:"tooltip",_element:pI,positioners:Lu,afterInit(e,t,n){n&&(e.tooltip=new pI({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.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:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.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:fI},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const Vce=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function Hce(e,t,n,r){const i=e.indexOf(t);if(i===-1)return Vce(e,t,n,r);const o=e.lastIndexOf(t);return i!==o?n:i}const Yce=(e,t)=>e===null?null:kn(Math.round(e),0,t);function hI(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class Oo extends Sl{static id="category";static defaults={ticks:{callback:hI}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const r=this.getLabels();for(const{index:i,label:o}of n)r[i]===o&&r.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(Ve(t))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===t?n:Hce(r,t,Oe(n,t),this._addedLabels),Yce(n,r.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:r,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(r=0),n||(i=this.getLabels().length-1)),this.min=r,this.max=i}buildTicks(){const t=this.min,n=this.max,r=this.options.offset,i=[];let o=this.getLabels();o=t===0&&n===o.length-1?o:o.slice(t,n+1),this._valueRange=Math.max(o.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let a=t;a<=n;a++)i.push({value:a});return i}getLabelForValue(t){return hI.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function Uce(e,t){const n=[],{bounds:i,step:o,min:a,max:s,precision:l,count:c,maxTicks:u,maxDigits:d,includeBounds:f}=e,p=o||1,m=u-1,{min:h,max:g}=t,b=!Ve(a),S=!Ve(s),w=!Ve(c),x=(g-h)/(d+1);let _=IN((g-h)/m/p)*p,E,C,D,T;if(_<1e-14&&!b&&!S)return[{value:h},{value:g}];T=Math.ceil(g/_)-Math.floor(h/_),T>m&&(_=IN(T*_/m/p)*p),Ve(l)||(E=Math.pow(10,l),_=Math.ceil(_*E)/E),i==="ticks"?(C=Math.floor(h/_)*_,D=Math.ceil(g/_)*_):(C=h,D=g),b&&S&&o&&pae((s-a)/o,_/1e3)?(T=Math.round(Math.min((s-a)/_,u)),_=(s-a)/T,C=a,D=s):w?(C=b?a:C,D=S?s:D,T=c-1,_=(D-C)/T):(T=(D-C)/_,Ou(T,Math.round(T),_/1e3)?T=Math.round(T):T=Math.ceil(T));const j=Math.max(RN(_),RN(C));E=Math.pow(10,Ve(l)?j:l),C=Math.round(C*E)/E,D=Math.round(D*E)/E;let A=0;for(b&&(f&&C!==a?(n.push({value:a}),C<a&&A++,Ou(Math.round((C+A*_)*E)/E,a,mI(a,x,e))&&A++):C<a&&A++);A<T;++A){const P=Math.round((C+A*_)*E)/E;if(S&&P>s)break;n.push({value:P})}return S&&f&&D!==s?n.length&&Ou(n[n.length-1].value,s,mI(s,x,e))?n[n.length-1].value=s:n.push({value:s}):(!S||D===s)&&n.push({value:D}),n}function mI(e,t,{horizontal:n,minRotation:r}){const i=wo(r),o=(n?Math.sin(i):Math.cos(i))||.001,a=.75*t*(""+e).length;return Math.min(t/o,a)}class Kce extends Sl{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,n){return Ve(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:i,max:o}=this;const a=l=>i=n?i:l,s=l=>o=r?o:l;if(t){const l=Ti(i),c=Ti(o);l<0&&c<0?s(0):l>0&&c>0&&a(0)}if(i===o){let l=o===0?1:Math.abs(o*.05);s(o+l),t||a(i-l)}this.min=i,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=t,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},o=this._range||this,a=Uce(i,o);return t.bounds==="ticks"&&hae(a,this,"value"),t.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){const t=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const i=(r-n)/Math.max(t.length-1,1)/2;n-=i,r+=i}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(t){return Tx(t,this.chart.options.locale,this.options.ticks.format)}}class Eo extends Kce{static id="linear";static defaults={ticks:{callback:qN.formatters.numeric}};determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=zr(t)?t:0,this.max=zr(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=wo(this.options.ticks.minRotation),i=(t?Math.sin(r):Math.cos(r))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,o.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}const Uh={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}},tr=Object.keys(Uh);function gI(e,t){return e-t}function vI(e,t){if(Ve(t))return null;const n=e._adapter,{parser:r,round:i,isoWeekday:o}=e._parseOpts;let a=t;return typeof r=="function"&&(a=r(a)),zr(a)||(a=typeof r=="string"?n.parse(a,r):n.parse(a)),a===null?null:(i&&(a=i==="week"&&(Eu(o)||o===!0)?n.startOf(a,"isoWeek",o):n.startOf(a,i)),+a)}function yI(e,t,n,r){const i=tr.length;for(let o=tr.indexOf(e);o<i-1;++o){const a=Uh[tr[o]],s=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((n-t)/(s*a.size))<=r)return tr[o]}return tr[i-1]}function qce(e,t,n,r,i){for(let o=tr.length-1;o>=tr.indexOf(n);o--){const a=tr[o];if(Uh[a].common&&e._adapter.diff(i,r,a)>=t-1)return a}return tr[n?tr.indexOf(n):0]}function Gce(e){for(let t=tr.indexOf(e)+1,n=tr.length;t<n;++t)if(Uh[tr[t]].common)return tr[t]}function bI(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:r,hi:i}=Cx(n,t),o=n[r]>=t?n[r]:n[i];e[o]=!0}}function Xce(e,t,n,r){const i=e._adapter,o=+i.startOf(t[0].value,r),a=t[t.length-1].value;let s,l;for(s=o;s<=a;s=+i.add(s,1,r))l=n[s],l>=0&&(t[l].major=!0);return t}function xI(e,t,n){const r=[],i={},o=t.length;let a,s;for(a=0;a<o;++a)s=t[a],i[s]=a,r.push({value:s,major:!1});return o===0||!n?r:Xce(e,r,i,n)}class wI extends Sl{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,n={}){const r=t.time||(t.time={}),i=this._adapter=new nle._date(t.adapters.date);i.init(n),_u(r.displayFormats,i.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:vI(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,r=t.time.unit||"day";let{min:i,max:o,minDefined:a,maxDefined:s}=this.getUserBounds();function l(c){!a&&!isNaN(c.min)&&(i=Math.min(i,c.min)),!s&&!isNaN(c.max)&&(o=Math.max(o,c.max))}(!a||!s)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),i=zr(i)&&!isNaN(i)?i:+n.startOf(Date.now(),r),o=zr(o)&&!isNaN(o)?o:+n.endOf(Date.now(),r)+1,this.min=Math.min(i,o-1),this.max=Math.max(i+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],r=t[t.length-1]),{min:n,max:r}}buildTicks(){const t=this.options,n=t.time,r=t.ticks,i=r.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const o=this.min,a=this.max,s=bae(i,o,a);return this._unit=n.unit||(r.autoSkip?yI(n.minUnit,this.min,this.max,this._getLabelCapacity(o)):qce(this,s.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:Gce(this._unit),this.initOffsets(i),t.reverse&&s.reverse(),xI(this,s,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,r=0,i,o;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?r=o:r=(o-this.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;n=kn(n,0,a),r=kn(r,0,a),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,i=this.options,o=i.time,a=o.unit||yI(o.minUnit,n,r,this._getLabelCapacity(n)),s=Oe(i.ticks.stepSize,1),l=a==="week"?o.isoWeekday:!1,c=Eu(l)||l===!0,u={};let d=n,f,p;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":a),t.diff(r,n,a)>1e5*s)throw new Error(n+" and "+r+" are too far apart with stepSize of "+s+" "+a);const m=i.ticks.source==="data"&&this.getDataTimestamps();for(f=d,p=0;f<r;f=+t.add(f,s,a),p++)bI(u,f,m);return(f===r||i.bounds==="ticks"||p===1)&&bI(u,f,m),Object.keys(u).sort(gI).map(h=>+h)}getLabelForValue(t){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}format(t,n){const i=this.options.time.displayFormats,o=this._unit,a=n||i[o];return this._adapter.format(t,a)}_tickFormatFunction(t,n,r,i){const o=this.options,a=o.ticks.callback;if(a)return ht(a,[t,n,r],this);const s=o.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&s[l],d=c&&s[c],f=r[n],p=c&&d&&f&&f.major;return this._adapter.format(t,i||(p?d:u))}generateTickLabels(t){let n,r,i;for(n=0,r=t.length;n<r;++n)i=t[n],i.label=this._tickFormatFunction(i.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,r=this.ctx.measureText(t).width,i=wo(this.isHorizontal()?n.maxRotation:n.minRotation),o=Math.cos(i),a=Math.sin(i),s=this._resolveTickFontOptions(0).size;return{w:r*o+s*a,h:r*a+s*o}}_getLabelCapacity(t){const n=this.options.time,r=n.displayFormats,i=r[n.unit]||r.millisecond,o=this._tickFormatFunction(t,0,xI(this,[t],this._majorUnit),i),a=this._getLabelSize(o),s=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return s>0?s:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,r=i.length;n<r;++n)t=t.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,r;if(t.length)return t;const i=this.getLabels();for(n=0,r=i.length;n<r;++n)t.push(vI(this,i[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return BN(t.sort(gI))}}function Kh(e,t,n){let r=0,i=e.length-1,o,a,s,l;n?(t>=e[r].pos&&t<=e[i].pos&&({lo:r,hi:i}=ts(e,"pos",t)),{pos:o,time:s}=e[r],{pos:a,time:l}=e[i]):(t>=e[r].time&&t<=e[i].time&&({lo:r,hi:i}=ts(e,"time",t)),{time:o,pos:s}=e[r],{time:a,pos:l}=e[i]);const c=a-o;return c?s+(l-s)*(t-o)/c:s}class yfe extends wI{static id="timeseries";static defaults=wI.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=Kh(n,this.min),this._tableRange=Kh(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,i=[],o=[];let a,s,l,c,u;for(a=0,s=t.length;a<s;++a)c=t[a],c>=n&&c<=r&&i.push(c);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(a=0,s=i.length;a<s;++a)u=i[a+1],l=i[a-1],c=i[a],Math.round((u+l)/2)!==c&&o.push({time:c,pos:a/(s-1)});return o}_generate(){const t=this.min,n=this.max;let r=super.getDataTimestamps();return(!r.includes(t)||!r.length)&&r.splice(0,0,t),(!r.includes(n)||r.length===1)&&r.push(n),r.sort((i,o)=>i-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?t=this.normalize(n.concat(r)):t=n.length?n:r,t=this._cache.all=t,t}getDecimalForValue(t){return(Kh(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return Kh(this._table,r*this._tableRange+this._minPos,!0)}}const _I="label";function SI(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function Qce(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function OI(e,t){e.labels=t}function EI(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:_I;const r=[];e.datasets=t.map(i=>{const o=e.datasets.find(a=>a[n]===i[n]);return!o||!i.data||r.includes(o)?{...i}:(r.push(o),Object.assign(o,i),o)})}function Zce(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_I;const n={labels:[],datasets:[]};return OI(n,e.labels),EI(n,e.datasets,t),n}function Jce(e,t){const{height:n=150,width:r=300,redraw:i=!1,datasetIdKey:o,type:a,data:s,options:l,plugins:c=[],fallbackContent:u,updateMode:d,...f}=e,p=k.useRef(null),m=k.useRef(null),h=()=>{p.current&&(m.current=new Fn(p.current,{type:a,data:Zce(s,o),options:l&&{...l},plugins:c}),SI(t,m.current))},g=()=>{SI(t,null),m.current&&(m.current.destroy(),m.current=null)};return k.useEffect(()=>{!i&&m.current&&l&&Qce(m.current,l)},[i,l]),k.useEffect(()=>{!i&&m.current&&OI(m.current.config.data,s.labels)},[i,s.labels]),k.useEffect(()=>{!i&&m.current&&s.datasets&&EI(m.current.config.data,s.datasets,o)},[i,s.datasets]),k.useEffect(()=>{m.current&&(i?(g(),setTimeout(h)):m.current.update(d))},[i,l,s.labels,s.datasets,d]),k.useEffect(()=>{m.current&&(g(),setTimeout(h))},[a]),k.useEffect(()=>(h(),()=>g()),[]),k.createElement("canvas",{ref:p,role:"img",height:n,width:r,...f},u)}const eue=k.forwardRef(Jce);function o1(e,t){return Fn.register(t),k.forwardRef((n,r)=>k.createElement(eue,{...n,ref:r,type:e}))}const a1=o1("line",tle),Pl=o1("bar",Zse),s1=o1("doughnut",ele);Fn.register(Jx,Vr,ei);const tue={id:"centerText",afterDraw(e,t,n){const{ctx:r}=e,i=e.getDatasetMeta(0);if(!i?.data?.[0])return;const{x:o,y:a}=i.data[0],{top:s="",bottom:l="",topSize:c=20,bottomSize:u=10,topColor:d="#0F172A",bottomColor:f="#64748B"}=n||{};r.save(),r.textAlign="center",r.textBaseline="middle",r.fillStyle=d,r.font=`600 ${c}px Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif`,r.fillText(s,o,a-5),r.fillStyle=f,r.font=`500 ${u}px Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif`,r.fillText(l,o,a+12),r.restore()}},PI=({title:e="Tickets",icon:t,firstLabel:n="First",firstValue:r=0,firstColor:i="#12B981",secondLabel:o="Second",secondValue:a=0,secondColor:s="#AB0000",growthPercentage:l="+0%",growthColor:c="#1FA05B",growthText:u="Compared to last month",totalLabel:d="Total",centerTopColor:f="#0F172A",centerBottomColor:p="#64748B",widgetType:m=""})=>{const h=r+a,g={labels:[n,o],datasets:[{data:[r,a],backgroundColor:[i,s],borderWidth:2,hoverOffset:4}]},b={responsive:!0,maintainAspectRatio:!1,cutout:"68%",plugins:{legend:{display:!1},tooltip:{callbacks:{label:E=>`${E.label}: ${E.parsed}`},displayColors:!1},centerText:{top:`${h}`,bottom:d,topSize:20,bottomSize:10,topColor:f,bottomColor:p}}},S=[{label:n,value:r,color:i},{label:o,value:a,color:s}],w=l.toString().includes("+"),x=l.toString().includes("-"),_=w?"#1FA05B":"#AB0000";return v.jsx(je,{title:e,icon:t,className:m==="commercial"?"h-[362px]":"h-[238px]",children:v.jsxs("div",{className:"grid grid-cols-12 gap-[16px] items-center",children:[v.jsxs("div",{className:"col-span-5 space-y-3",children:[S.map((E,C)=>v.jsxs("div",{children:[v.jsx("div",{className:"text-[12px] text-[#64748B]",children:E.label}),v.jsx("div",{className:"text-[28px] leading-[32px]",style:{color:E.color},children:E.value})]},C)),v.jsxs("div",{className:"text-[10px] flex gap-[4px] items-center",style:{color:_},children:[w&&v.jsx(oc,{}),x&&v.jsx(rf,{}),v.jsx("div",{children:l.replace("+","").replace("-","")}),v.jsx("div",{className:"text-[#64748B] text-[10px] ml-[4px]",children:u})]})]}),v.jsx("div",{className:"col-span-7",children:v.jsx("div",{className:`${m==="commercial"?"h-[260px] w-[263px]":"h-[158px] w-[158px]"} ml-auto mr-2`,children:v.jsx(s1,{data:g,options:b,plugins:[tue]})})})]})})},kI=({value:e=0,total:t=1,colorClass:n="",label:r=""})=>{const i=Math.max(0,Math.min(100,e/(t||1)*100)),o=n==="bg-[#8B5CF6]"?"text-[#8B5CF6]":n==="bg-[#12B981]"?"text-[#12B981]":"text-slate-600";return v.jsxs("div",{className:"flex flex-col items-start",children:[v.jsx("div",{className:"w-2/3 min-w-[80px] h-3 rounded-full overflow-hidden",children:v.jsx("div",{className:`h-3 rounded-full ${n}`,style:{width:`${i}%`}})}),v.jsx("div",{className:`${o} !text-[12px] font-bold mt-1`,children:e}),v.jsx("div",{className:"!text-[12px] text-[#64748B] mt-1",children:r})]})},CI=({title:e,value:t,suffix:n,valueClass:r=""})=>v.jsxs("div",{className:"bg-white border border-[#EBEBEB] rounded-xl shadow-[0_0_12px_0_#EAF2FF] h-[98px] p-4 flex flex-col justify-center",children:[v.jsx("div",{className:"!text-[12px] leading-[16px] text-[#121212] mb-1",children:e}),v.jsxs("div",{className:`text-[28px] leading-[32px] flex item gap-[4px] font-medium ${r}`,children:[t," ",n&&v.jsx("div",{className:"text-[28px] leading-[32px] font-medium",children:n})]})]}),nue=({totalUnits:e=847,occupiedUnits:t=756,ownerCount:n=700,tenantCount:r=56,avgResidents:i=4.4,avgLeaseMonths:o=18})=>{const a=n+r;return v.jsxs("div",{children:[v.jsxs("div",{className:"bg-white border border-[#EBEBEB] rounded-xl shadow-[0_0_12px_0_#EAF2FF] p-4 h-[128px]",children:[v.jsxs("div",{className:"flex items-center gap-[12px] mb-4",children:[v.jsx(dg,{className:"h-6 w-6 text-[#329DFF]"}),v.jsx("div",{className:"font-medium text-[#121212]",children:"Occupancy Overview"})]}),v.jsxs("div",{className:"flex items-center justify-between gap-",children:[v.jsxs("div",{children:[v.jsx("div",{className:"text-xs leading-[16px] text-[#64748B]",children:"Occupied Units"}),v.jsxs("div",{className:"flex items-center gap-1",children:[v.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t}),v.jsxs("div",{className:"text-[#64748B] text-[20px] leading-[32px]",children:["/",e]})]})]}),v.jsxs("div",{className:"flex items-end",children:[v.jsx(kI,{value:n,total:a,colorClass:"bg-[#8B5CF6]",label:"Owner"}),v.jsx(kI,{value:r,total:a,colorClass:"bg-[#12B981]",label:"Tenant"})]})]})]}),v.jsxs("div",{className:"mt-2.5 grid grid-cols-2 gap-[12px]",children:[v.jsx(CI,{title:"Avg Residents Per Unit",value:i,valueClass:"text-[#8B5CF6]"}),v.jsx(CI,{title:"Avg Lease Period",value:o,suffix:"months",valueClass:"text-[#E7A015]"})]})]})};Fn.register(Jx,Vr,ei);const rue={id:"centerText",afterDraw(e,t,n){const{ctx:r}=e,i=e.getDatasetMeta(0);if(!i?.data?.[0])return;const{x:o,y:a}=i.data[0],{top:s="",bottom:l="",topSize:c=20,bottomSize:u=10,topColor:d="#0F172A",bottomColor:f="#64748B"}=n||{};r.save(),r.textAlign="center",r.textBaseline="middle",r.fillStyle=d,r.font=`600 ${c}px Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif`,r.fillText(s,o,a-5),r.fillStyle=f,r.font=`500 ${u}px Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif`,r.fillText(l,o,a+12),r.restore()}},iue=({ownerCount:e=1e3,tenantCount:t=200,nonResidingOwners:n=26,growthPct:r="+9.1%"})=>{const i=Math.max(e-n,0),o=e+t,a={labels:["Owners","Tenants","Non-residing Owner"],datasets:[{data:[i,t,n],backgroundColor:["#3C81F6","#08B6D4","#8B5CF6"],borderWidth:2,hoverOffset:4}]},s={responsive:!0,maintainAspectRatio:!1,cutout:"68%",plugins:{legend:{display:!1},tooltip:{callbacks:{label:l=>`${l.label}: ${l.parsed}`},displayColors:!1},centerText:{top:`${o}`,bottom:"Total Members",topSize:20,bottomSize:10}}};return v.jsx(je,{title:"Resident Overview",icon:v.jsx(kS,{className:"h-6 w-6 text-[#8B5CF6]"}),className:"h-[238px]",children:v.jsxs("div",{className:" flex-1 min-h-0 grid grid-cols-12 gap-[16px] items-center",children:[v.jsxs("div",{className:"col-span-5",children:[v.jsxs("div",{children:[v.jsx("div",{className:"!text-[12px] text-[#64748B] leading-[16px]",children:"Total Owners"}),v.jsx("div",{className:"text-[28px] leading-[32px ] text-[#3C81F6]",children:e})]}),v.jsxs("div",{children:[v.jsx("div",{className:"!text-[12px] text-[#64748B] leading-[16px]",children:"Total Tenants"}),v.jsx("div",{className:"text-[28px] leading-[32px ] text-[#08B6D4]",children:t})]}),v.jsxs("div",{className:"text-[10px] text-[#1FA05B] flex gap-2 items-center",children:[r," ",v.jsx("div",{className:"text-[#64748B] ",children:"Compared to last month"})]})]}),v.jsx("div",{className:"col-span-7",children:v.jsx("div",{className:"h-[162px] w-[162px] ml-auto mr-2",children:v.jsx(s1,{data:a,options:s,plugins:[rue]})})})]})})};Fn.register(Oo,Eo,El,Vr,ei);const oue=({blocks:e=[{name:"Block A",owner:110,rented:24,vacant:8},{name:"Block B",owner:95,rented:18,vacant:6},{name:"Block C",owner:65,rented:12,vacant:18},{name:"Block D",owner:78,rented:16,vacant:30}]})=>{const t=e.map(s=>s.name),n=e.map(s=>s.owner),r=e.map(s=>s.rented),i=e.map(s=>s.vacant),o={labels:t,datasets:[{label:"Owner",data:n,backgroundColor:"#3C81F6",barThickness:40},{label:"",data:n.map(()=>2),backgroundColor:"transparent",barThickness:40},{label:"Rented",data:r,backgroundColor:"#8B5CF6",barThickness:40},{label:"",data:r.map(()=>2),backgroundColor:"transparent",barThickness:40},{label:"Vacant",data:i,backgroundColor:"#08B6D4",barThickness:40}]},a={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,boxWidth:10,boxHeight:10,pointStyle:"rectRot",padding:20}},tooltip:{callbacks:{label:s=>`${s.dataset.label}: ${s.parsed.y}`}}},scales:{x:{stacked:!0,grid:{display:!1},ticks:{color:"#64748B"}},y:{stacked:!0,beginAtZero:!0,suggestedMax:180,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",stepSize:20}}}};return v.jsx(je,{title:"Block-wise Occupancy",period:v.jsx(Sr,{className:"text-xl text-[#884EA7]"}),className:"w-full h-[360px]",titleWeight:"semi-bold",children:v.jsx(Pl,{data:o,options:a})})};Fn.register(Oo,Eo,n1,t1,Vr,ei);const aue=e=>{const[t,n]=String(e).split(" ");return`${{Jan:"January",Feb:"February",Mar:"March",Apr:"April",May:"May",Jun:"June",Jul:"July",Aug:"August",Sep:"September",Oct:"October",Nov:"November",Dec:"December"}[t]||t} 20${n}`},sue=({labels:e=["Jan 25","Feb 25","Mar 25","Apr 25","May 25"],moveIn:t=[24,27,20,26,23],moveOut:n=[12,17,8,5,16]})=>{const r={labels:e,datasets:[{label:"Move-in",data:t,borderColor:"#12B981",backgroundColor:"rgba(16,185,129,0.15)",pointBackgroundColor:"#12B981",pointStyle:"rectRot",fill:!1},{label:"Move-out",data:n,borderColor:"#8B5CF6",backgroundColor:"rgba(124,58,237,0.15)",pointBackgroundColor:"#8B5CF6",pointStyle:"rectRot",fill:!1}]},i={responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,boxWidth:10,boxHeight:10,padding:20}},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:12,caretSize:0,callbacks:{title:o=>aue(o[0].label),label:o=>`${o.dataset.label}: ${o.parsed.y}`}}},scales:{x:{grid:{color:"#F1F5F9"},ticks:{color:"#64748B"}},y:{beginAtZero:!0,suggestedMax:28,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",stepSize:4,precision:0}}},elements:{line:{borderWidth:2,tension:0},point:{radius:0,hoverRadius:3,hitRadius:10}}};return v.jsx(je,{title:"Move-in/Out Trends",className:"w-full h-[360px]",period:v.jsx(Sr,{className:"text-[20px] text-[#884EA7]"}),titleWeight:"semi-bold",children:v.jsx(a1,{data:r,options:i})})};Fn.register(Oo,Eo,n1,t1,Vr,ei);const lue=e=>{const[t,n]=String(e).split(" ");return`${{Jan:"January",Feb:"February",Mar:"March",Apr:"April",May:"May",Jun:"June",Jul:"July",Aug:"August",Sep:"September",Oct:"October",Nov:"November",Dec:"December"}[t]||t} 20${n}`},DI=({labels:e=["Jan 25","Feb 25","Mar 25","Apr 25","May 25"],moveIn:t=[24,27,20,26,23],moveOut:n=[4,17,8,5,16,4,7]})=>{const r={labels:e,datasets:[{label:"Income",data:t,borderColor:"#10B981",backgroundColor:"rgba(16,185,129,0.15)",pointBackgroundColor:"#10B981",pointStyle:"rectRot",fill:!1},{label:"Expenditure",data:n,borderColor:"#AB0000",backgroundColor:"rgba(124,58,237,0.15)",pointBackgroundColor:"#AB0000",pointStyle:"rectRot",fill:!1}]},i={responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,boxWidth:10,boxHeight:10,padding:20}},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:12,caretSize:0,callbacks:{title:o=>lue(o[0].label),label:o=>`${o.dataset.label}: ${o.parsed.y}`}}},scales:{x:{grid:{color:"#F1F5F9"},ticks:{color:"#64748B"}},y:{beginAtZero:!0,suggestedMax:28,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",stepSize:4,precision:0}}},elements:{line:{borderWidth:2,tension:0},point:{radius:0,hoverRadius:3,hitRadius:10}}};return v.jsx(a1,{data:r,options:i})};function AI({label:e,value:t,positive:n,bgColor:r,delta:i,deltaLabel:o,textColor:a}){return v.jsxs("div",{className:`rounded-lg p-4 ${r} border border-[#EBEBEB] h-[126px]`,children:[v.jsx("div",{className:`text-[16px] leading-[20px] ${a}`,children:e}),v.jsx("div",{className:"mt-[16px] leading-[28px] !text-[24px] font-medium text-[#121212]",children:t}),v.jsxs("div",{className:"mt-[8px] flex items-center gap-[8px] leading-[14px] text-[10px]",children:[v.jsx("div",{className:n?"text-[#1FA05B] font-medium":"text-[#EF4444] font-medium",children:i}),v.jsx("div",{className:"text-[#64748B] ",children:o})]})]})}function cue(){return v.jsxs(je,{title:"Accounting",className:"w-full h-[523px]",period:v.jsx(Sr,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:[v.jsxs("div",{className:"grid grid-cols-2 gap-[16px]",children:[v.jsx(AI,{label:"Total Income",value:"AED 5.68M",delta:"+4.4%",positive:!0,bgColor:"bg-slate-50",deltaLabel:"Compared to last month",textColor:"text-[#1FA05B]"}),v.jsx(AI,{label:"Total Expenditure",value:"AED 1.83M",delta:"-1.1%",positive:!1,bgColor:"bg-slate-50",deltaLabel:"Compared to last month",textColor:"text-[#AB0000]"})]}),v.jsx("div",{className:"h-[254px] mt-[35.5px]",children:v.jsx(DI,{})})]})}Fn.register(Oo,Eo,El,Vr,ei);const uue=()=>{const e=["Maintenance","Security","Utilities","Housekeeping","Administration","Others"],r={labels:e,datasets:[{label:"Budget",data:[55e3,56e3,64e3,38e3,54e3,65e3],backgroundColor:"#93C5FD",barThickness:60},{label:"Actual",data:[63e3,48e3,51300,28e3,42e3,35e3],backgroundColor:"#3B82F6",barThickness:60}]},i={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,pointStyle:"rectRot",padding:20}},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:12,caretSize:6,callbacks:{title:o=>e[o[0].dataIndex],label:o=>{const a=o.parsed.y;return`${o.dataset.label}: AED ${(a/1e3).toFixed(1)}K`}}}},scales:{x:{grid:{display:!1},ticks:{color:"#64748B"}},y:{beginAtZero:!0,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",callback:o=>`${o/1e3}K`}}}};return v.jsx(je,{title:"Budget vs Actuals",className:"w-full h-[362px]",period:v.jsx(Sr,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:v.jsx(Pl,{data:r,options:i})})},due=()=>{const e=[{title:"Primary Account",amount:285e4,subtitle:"Savings"},{title:"Emergency Fund",amount:12e5,subtitle:"Fixed deposit"},{title:"Maintenance Fund",amount:68e4,subtitle:"Current"}],t=e.reduce((r,i)=>r+i.amount,0),n=r=>r>=1e6?`AED ${(r/1e6).toFixed(2)}M`:r>=1e3?`AED ${(r/1e3).toFixed(1)}K`:`AED ${r}`;return v.jsxs(je,{title:"Cash & Bank Balance",className:"w-full h-[362px]",period:v.jsx(Sr,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),children:[v.jsx("div",{className:"flex flex-col gap-[12px]",children:e.map((r,i)=>v.jsxs("div",{className:"flex items-center justify-between bg-[#F9FAFB] rounded-lg p-3",children:[v.jsxs("div",{className:"flex flex-col",children:[v.jsx("div",{className:"text-[14px] font-medium text-[#121212]",children:r.title}),v.jsx("div",{className:"!text-[12px] text-[#64748B]",children:r?.subtitle})]}),v.jsx("div",{className:"flex flex-col items-end",children:v.jsx("div",{className:"text-[14px] text-[#1FA05B] font-semibold",children:n(r.amount)})})]},i))}),v.jsxs("div",{className:"flex items-center justify-between border-t border-[#EBEBEB] h-[68px] px-3",children:[v.jsx("div",{className:"text-[14px] font-medium text-[#121212]",children:"Total"}),v.jsx("div",{className:"text-[16px] text-[#1FA05B] font-bold",children:n(t)})]})]})};Fn.register(Oo,Eo,El,Vr,ei);const fue=()=>{const e=["Current Month","1-3 Months","3-6 Months","6+ Months"],t=[13e3,9400,8800,7200],n=[18,12,18,6],r={labels:e,datasets:[{label:"Due",data:t,backgroundColor:"#EF4444",barThickness:60}]},i={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:12,caretSize:6,callbacks:{title:o=>e[o[0].dataIndex],label:o=>`Due: AED ${(o.parsed.y/1e3).toFixed(1)}K`,afterLabel:o=>`Units Count: ${n[o.dataIndex]}`}}},scales:{x:{grid:{display:!1},ticks:{color:"#64748B"}},y:{beginAtZero:!0,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",callback:o=>`${o/1e3}K`}}}};return v.jsxs(je,{title:"Dues Ageing",className:"w-full h-[362px]",period:v.jsx(Sr,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:[v.jsx("div",{className:"grid grid-cols-4 md:grid-cols-4 gap-[12px] h-[48px]",children:e.map((o,a)=>v.jsx("div",{className:"p-2 rounded-lg bg-slate-50",children:v.jsxs("div",{className:"flex justify-between items-start",children:[v.jsx("div",{className:"font-medium leading-[16px] !text-[12px] rounded",children:o}),v.jsxs("div",{className:"text-right",children:[v.jsxs("div",{className:"text-red-600 font-medium leading-[16px] !text-[12px]",children:["AED ",(t[a]/1e3).toFixed(1),"K"]}),v.jsxs("div",{className:" text-gray-500 leading-[14px] text-[10px]",children:[n[a]," Units"]})]})]})},o))}),v.jsx("div",{className:"h-[192px]",children:v.jsx(Pl,{data:r,options:i})})]})};Fn.register(Jx,Vr,ei);const pue=()=>{const e=["Maintenance","Utilities","Security","Administration","Others"],t=[45e4,32e4,28e4,18e4,12e4],n={labels:e,datasets:[{label:"Expenses",data:t,backgroundColor:["#08B6D4","#8B5CF6","#EF4444","#F69E0A","#12B981"],borderColor:"#FFFFFF",borderWidth:2,cutout:"70%"}]},r=t.reduce((o,a)=>o+a,0),i={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:10,callbacks:{label:o=>`${o.label}: AED ${o.formattedValue}`}}}};return v.jsxs(je,{title:"Expense Categories",className:"w-full h-[523px]",period:v.jsx(Sr,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:[v.jsxs("div",{className:"relative h-[259px] flex justify-center items-center",children:[v.jsx(s1,{data:n,options:i}),v.jsxs("div",{className:"absolute text-center",children:[v.jsxs("div",{className:"!text-[24px] font-medium leading-[28px] text-[#121212]",children:["AED ",(r/1e6).toFixed(2),"M"]}),v.jsx("div",{className:"text-[#121212] leading-[18px] text-[14px]",children:"Total Expenses"})]})]}),v.jsx("div",{className:"space-y-2",children:e.map((o,a)=>v.jsxs("div",{className:"flex justify-between items-center text-[14px] pb-2",children:[v.jsxs("div",{className:"flex items-center gap-[8px] !text-[12px] leading-[16px] text-[#64748B]",children:[v.jsx("div",{className:"w-[7px] h-[7px] rotate-45",style:{backgroundColor:n.datasets[0].backgroundColor[a]}}),o]}),v.jsxs("div",{className:"leading-[16px] !text-[12px] text-[#64748B]",children:["AED ",(t[a]/1e3).toFixed(0),"K"]})]},o))})]})},Fu=[{name:"Gym Equipment",value:1e6,color:"#08B6D4"},{name:"Security",value:8e5,color:"#EF4444"},{name:"Others",value:6e5,color:"#F59E0B"},{name:"Pool Maintenance",value:7e5,color:"#8B5CF6"},{name:"Administration",value:52e4,color:"#10B981"}];function hue(){const e=Fu.reduce((t,n)=>t+n.value,0);return v.jsx(je,{title:"Asset Value Breakdown",period:v.jsx(Sr,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"h-[362px]",titleWeight:"semi-bold",children:v.jsxs("div",{className:"flex flex-col items-center justify-center",children:[v.jsxs("div",{className:"w-[214px] h-[181px] relative",children:[v.jsx(It,{width:"100%",height:"100%",children:v.jsxs(ho,{children:[v.jsx(Oi,{data:Fu,innerRadius:60,outerRadius:90,paddingAngle:2,dataKey:"value",nameKey:"name",children:Fu.map((t,n)=>v.jsx(Vt,{fill:t.color},`cell-${n}`))}),v.jsx(nn,{formatter:t=>`AED ${t.toLocaleString()}`})]})}),v.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[v.jsxs("div",{className:"font-medium text-lg leading-[12px] ",children:["AED ",(e/1e6).toFixed(2),"M"]}),v.jsx("div",{className:"text-[10px] leading-[12.59px] text-[#121212] mt-[6px]",children:"Total Assets"})]})]}),v.jsxs("div",{className:"flex justify-between w-full px-4 sm:px-8 mt-4 text-[14px]",children:[v.jsx("div",{className:"flex flex-col gap-[8px]",children:Fu.slice(0,3).map(t=>v.jsxs("div",{className:"flex items-center gap-[8px]",children:[v.jsx("div",{className:"inline-block h-[7px] w-[7px] rotate-45",style:{backgroundColor:t.color}}),v.jsx("div",{className:"text-[#64748B] leading-[16px] !text-[12px]",children:t.name})]},t.name))}),v.jsx("div",{className:"flex flex-col gap-[8px] items-start",children:Fu.slice(3).map(t=>v.jsxs("div",{className:"flex items-center gap-[8px]",children:[v.jsx("div",{className:"inline-block h-[7px] w-[7px] rotate-45",style:{backgroundColor:t.color}}),v.jsx("div",{className:"text-[#64748B] leading-[16px] !text-[12px]",children:t.name})]},t.name))})]})]})})}Fn.register(Oo,Eo,El,Vr,ei);const mue=()=>{const e=["Gym","Parking","Swimming Pool","Community Hall","Tennis Court"],t=[13e3,9400,8800,7200,6e3],n=[18,12,18,6],r={labels:e,datasets:[{label:"Due",data:t,backgroundColor:"#8B5CF6",barThickness:60}]},i={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:12,caretSize:6,callbacks:{title:o=>e[o[0].dataIndex],label:o=>`Due: AED ${(o.parsed.y/1e3).toFixed(1)}K`,afterLabel:o=>`Units Count: ${n[o.dataIndex]}`}}},scales:{x:{grid:{display:!1},ticks:{color:"#64748B"}},y:{beginAtZero:!0,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",callback:o=>`${o/1e3}K`}}}};return v.jsx(je,{title:"Revenue by Category",className:"w-full h-[362px]",period:v.jsx(Sr,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:v.jsx(Pl,{data:r,options:i})})};function gue(e){return Xe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M15 5l0 2"},child:[]},{tag:"path",attr:{d:"M15 11l0 2"},child:[]},{tag:"path",attr:{d:"M15 17l0 2"},child:[]},{tag:"path",attr:{d:"M5 5h14a2 2 0 0 1 2 2v3a2 2 0 0 0 0 4v3a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-3a2 2 0 0 0 0 -4v-3a2 2 0 0 1 2 -2"},child:[]}]})(e)}function vue(e){return Xe({attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M855.7 210.8l-42.4-42.4a8.03 8.03 0 0 0-11.3 0L168.3 801.9a8.03 8.03 0 0 0 0 11.3l42.4 42.4c3.1 3.1 8.2 3.1 11.3 0L855.6 222c3.2-3 3.2-8.1.1-11.2zM304 448c79.4 0 144-64.6 144-144s-64.6-144-144-144-144 64.6-144 144 64.6 144 144 144zm0-216c39.7 0 72 32.3 72 72s-32.3 72-72 72-72-32.3-72-72 32.3-72 72-72zm416 344c-79.4 0-144 64.6-144 144s64.6 144 144 144 144-64.6 144-144-64.6-144-144-144zm0 216c-39.7 0-72-32.3-72-72s32.3-72 72-72 72 32.3 72 72-32.3 72-72 72z"},child:[]}]})(e)}function yue({title:e,value:t,delta:n,deltaLabel:r,positive:i=!0,Icon:o=Hl,iconColor:a="text-emerald-600",iconBg:s="bg-emerald-50"}){return v.jsxs(je,{title:e,icon:v.jsx("div",{className:"h-6 w-6 grid place-items-center",children:v.jsx(o,{className:`h-6 w-6 ${a}`})}),children:[v.jsx("div",{className:"text-4xl font-semibold tracking-tight text-[#121212]",children:t}),v.jsxs("div",{className:"flex items-center gap-[8px] text-[14px]",children:[v.jsx("div",{className:i?"text-emerald-600 font-medium":"text-rose-600 font-medium",children:n}),v.jsx("div",{className:"text-slate-500",children:r})]})]})}function bue(){const e=[{title:"Total Bookings",value:160,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:PS,iconColor:"text-emerald-600"},{title:"Utilisation Rate",value:73,delta:"+2.0%",deltaLabel:"Compared to last month",positive:!0,Icon:vue,iconColor:"text-[#329DFF]"},{title:"Revenue",value:3,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:gue,iconColor:"text-[#FA7E28]"},{title:"Pending Dues",value:5,delta:"-8.0%",deltaLabel:"Compared to last month",positive:!1,Icon:CS,iconColor:"text-[#DBB467]"}];return v.jsx("div",{className:"px-5 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-[24px]",children:e.map((t,n)=>v.jsx(yue,{...t},n))})}/**
|
|
282
|
+
`):e}function Rce(e,t){const{element:n,datasetIndex:r,index:i}=t,o=e.getDatasetMeta(r).controller,{label:a,value:s}=o.getLabelAndValue(i);return{chart:e,label:a,parsed:o.getParsed(i),raw:e.data.datasets[r].data[i],formattedValue:s,dataset:o.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function sI(e,t){const n=e.chart.ctx,{body:r,footer:i,title:o}=e,{boxWidth:a,boxHeight:s}=t,l=Jn(t.bodyFont),c=Jn(t.titleFont),u=Jn(t.footerFont),d=o.length,f=i.length,p=r.length,m=Jr(t.padding);let h=m.height,g=0,b=r.reduce((x,_)=>x+_.before.length+_.lines.length+_.after.length,0);if(b+=e.beforeBody.length+e.afterBody.length,d&&(h+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),b){const x=t.displayColors?Math.max(s,l.lineHeight):l.lineHeight;h+=p*x+(b-p)*l.lineHeight+(b-1)*t.bodySpacing}f&&(h+=t.footerMarginTop+f*u.lineHeight+(f-1)*t.footerSpacing);let S=0;const w=function(x){g=Math.max(g,n.measureText(x).width+S)};return n.save(),n.font=c.string,Ze(e.title,w),n.font=l.string,Ze(e.beforeBody.concat(e.afterBody),w),S=t.displayColors?a+2+t.boxPadding:0,Ze(r,x=>{Ze(x.before,w),Ze(x.lines,w),Ze(x.after,w)}),S=0,n.font=u.string,Ze(e.footer,w),n.restore(),g+=m.width,{width:g,height:h}}function Lce(e,t){const{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}function Fce(e,t,n,r){const{x:i,width:o}=r,a=n.caretSize+n.caretPadding;if(e==="left"&&i+o+a>t.width||e==="right"&&i-o-a<0)return!0}function $ce(e,t,n,r){const{x:i,width:o}=n,{width:a,chartArea:{left:s,right:l}}=e;let c="center";return r==="center"?c=i<=(s+l)/2?"left":"right":i<=o/2?c="left":i>=a-o/2&&(c="right"),Fce(c,e,t,n)&&(c="center"),c}function lI(e,t,n){const r=n.yAlign||t.yAlign||Lce(e,n);return{xAlign:n.xAlign||t.xAlign||$ce(e,t,n,r),yAlign:r}}function Bce(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function Wce(e,t,n){let{y:r,height:i}=e;return t==="top"?r+=n:t==="bottom"?r-=i+n:r-=i/2,r}function cI(e,t,n,r){const{caretSize:i,caretPadding:o,cornerRadius:a}=e,{xAlign:s,yAlign:l}=n,c=i+o,{topLeft:u,topRight:d,bottomLeft:f,bottomRight:p}=bl(a);let m=Bce(t,s);const h=Wce(t,l,c);return l==="center"?s==="left"?m+=c:s==="right"&&(m-=c):s==="left"?m-=Math.max(u,f)+i:s==="right"&&(m+=Math.max(d,p)+i),{x:kn(m,0,r.width-t.width),y:kn(h,0,r.height-t.height)}}function Yh(e,t,n){const r=Jr(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function uI(e){return Ni([],So(e))}function zce(e,t,n){return is(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function dI(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const fI={beforeTitle:xo,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return n[t.dataIndex]}return""},afterTitle:xo,beforeBody:xo,beforeLabel:xo,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return Ve(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:xo,afterBody:xo,beforeFooter:xo,footer:xo,afterFooter:xo};function er(e,t,n,r){const i=e[t].call(n,r);return typeof i>"u"?fI[t].call(n,r):i}class pI extends oa{static positioners=Lu;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 n=this.chart,r=this.options.setContext(this.getContext()),i=r.enabled&&n.options.animation&&r.animations,o=new mj(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=zce(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,i=er(r,"beforeTitle",this,t),o=er(r,"title",this,t),a=er(r,"afterTitle",this,t);let s=[];return s=Ni(s,So(i)),s=Ni(s,So(o)),s=Ni(s,So(a)),s}getBeforeBody(t,n){return uI(er(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,i=[];return Ze(t,o=>{const a={before:[],lines:[],after:[]},s=dI(r,o);Ni(a.before,So(er(s,"beforeLabel",this,o))),Ni(a.lines,er(s,"label",this,o)),Ni(a.after,So(er(s,"afterLabel",this,o))),i.push(a)}),i}getAfterBody(t,n){return uI(er(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,i=er(r,"beforeFooter",this,t),o=er(r,"footer",this,t),a=er(r,"afterFooter",this,t);let s=[];return s=Ni(s,So(i)),s=Ni(s,So(o)),s=Ni(s,So(a)),s}_createItems(t){const n=this._active,r=this.chart.data,i=[],o=[],a=[];let s=[],l,c;for(l=0,c=n.length;l<c;++l)s.push(Rce(this.chart,n[l]));return t.filter&&(s=s.filter((u,d,f)=>t.filter(u,d,f,r))),t.itemSort&&(s=s.sort((u,d)=>t.itemSort(u,d,r))),Ze(s,u=>{const d=dI(t.callbacks,u);i.push(er(d,"labelColor",this,u)),o.push(er(d,"labelPointStyle",this,u)),a.push(er(d,"labelTextColor",this,u))}),this.labelColors=i,this.labelPointStyles=o,this.labelTextColors=a,this.dataPoints=s,s}update(t,n){const r=this.options.setContext(this.getContext()),i=this._active;let o,a=[];if(!i.length)this.opacity!==0&&(o={opacity:0});else{const s=Lu[r.position].call(this,i,this._eventPosition);a=this._createItems(r),this.title=this.getTitle(a,r),this.beforeBody=this.getBeforeBody(a,r),this.body=this.getBody(a,r),this.afterBody=this.getAfterBody(a,r),this.footer=this.getFooter(a,r);const l=this._size=sI(this,r),c=Object.assign({},s,l),u=lI(this.chart,r,c),d=cI(r,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,o={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:s.x,caretY:s.y}}this._tooltipItems=a,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,i){const o=this.getCaretPosition(t,r,i);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)}getCaretPosition(t,n,r){const{xAlign:i,yAlign:o}=this,{caretSize:a,cornerRadius:s}=r,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:d}=bl(s),{x:f,y:p}=t,{width:m,height:h}=n;let g,b,S,w,x,_;return o==="center"?(x=p+h/2,i==="left"?(g=f,b=g-a,w=x+a,_=x-a):(g=f+m,b=g+a,w=x-a,_=x+a),S=g):(i==="left"?b=f+Math.max(l,u)+a:i==="right"?b=f+m-Math.max(c,d)-a:b=this.caretX,o==="top"?(w=p,x=w-a,g=b-a,S=b+a):(w=p+h,x=w+a,g=b+a,S=b-a),_=w),{x1:g,x2:b,x3:S,y1:w,y2:x,y3:_}}drawTitle(t,n,r){const i=this.title,o=i.length;let a,s,l;if(o){const c=_l(r.rtl,this.x,this.width);for(t.x=Yh(this,r.titleAlign,r),n.textAlign=c.textAlign(r.titleAlign),n.textBaseline="middle",a=Jn(r.titleFont),s=r.titleSpacing,n.fillStyle=r.titleColor,n.font=a.string,l=0;l<o;++l)n.fillText(i[l],c.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+s,l+1===o&&(t.y+=r.titleMarginBottom-s)}}_drawColorBox(t,n,r,i,o){const a=this.labelColors[r],s=this.labelPointStyles[r],{boxHeight:l,boxWidth:c}=o,u=Jn(o.bodyFont),d=Yh(this,"left",o),f=i.x(d),p=l<u.lineHeight?(u.lineHeight-l)/2:0,m=n.y+p;if(o.usePointStyle){const h={radius:Math.min(c,l)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},g=i.leftForLtr(f,c)+c/2,b=m+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,jx(t,h,g,b),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,jx(t,h,g,b)}else{t.lineWidth=Me(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,t.strokeStyle=a.borderColor,t.setLineDash(a.borderDash||[]),t.lineDashOffset=a.borderDashOffset||0;const h=i.leftForLtr(f,c),g=i.leftForLtr(i.xPlus(f,1),c-2),b=bl(a.borderRadius);Object.values(b).some(S=>S!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,Ch(t,{x:h,y:m,w:c,h:l,radius:b}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),Ch(t,{x:g,y:m+1,w:c-2,h:l-2,radius:b}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(h,m,c,l),t.strokeRect(h,m,c,l),t.fillStyle=a.backgroundColor,t.fillRect(g,m+1,c-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:i}=this,{bodySpacing:o,bodyAlign:a,displayColors:s,boxHeight:l,boxWidth:c,boxPadding:u}=r,d=Jn(r.bodyFont);let f=d.lineHeight,p=0;const m=_l(r.rtl,this.x,this.width),h=function(D){n.fillText(D,m.x(t.x+p),t.y+f/2),t.y+=f+o},g=m.textAlign(a);let b,S,w,x,_,E,C;for(n.textAlign=a,n.textBaseline="middle",n.font=d.string,t.x=Yh(this,g,r),n.fillStyle=r.bodyColor,Ze(this.beforeBody,h),p=s&&g!=="right"?a==="center"?c/2+u:c+2+u:0,x=0,E=i.length;x<E;++x){for(b=i[x],S=this.labelTextColors[x],n.fillStyle=S,Ze(b.before,h),w=b.lines,s&&w.length&&(this._drawColorBox(n,t,x,m,r),f=Math.max(d.lineHeight,l)),_=0,C=w.length;_<C;++_)h(w[_]),f=d.lineHeight;Ze(b.after,h)}p=0,f=d.lineHeight,Ze(this.afterBody,h),t.y-=o}drawFooter(t,n,r){const i=this.footer,o=i.length;let a,s;if(o){const l=_l(r.rtl,this.x,this.width);for(t.x=Yh(this,r.footerAlign,r),t.y+=r.footerMarginTop,n.textAlign=l.textAlign(r.footerAlign),n.textBaseline="middle",a=Jn(r.footerFont),n.fillStyle=r.footerColor,n.font=a.string,s=0;s<o;++s)n.fillText(i[s],l.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+r.footerSpacing}}drawBackground(t,n,r,i){const{xAlign:o,yAlign:a}=this,{x:s,y:l}=t,{width:c,height:u}=r,{topLeft:d,topRight:f,bottomLeft:p,bottomRight:m}=bl(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(s+d,l),a==="top"&&this.drawCaret(t,n,r,i),n.lineTo(s+c-f,l),n.quadraticCurveTo(s+c,l,s+c,l+f),a==="center"&&o==="right"&&this.drawCaret(t,n,r,i),n.lineTo(s+c,l+u-m),n.quadraticCurveTo(s+c,l+u,s+c-m,l+u),a==="bottom"&&this.drawCaret(t,n,r,i),n.lineTo(s+p,l+u),n.quadraticCurveTo(s,l+u,s,l+u-p),a==="center"&&o==="left"&&this.drawCaret(t,n,r,i),n.lineTo(s,l+d),n.quadraticCurveTo(s,l,s+d,l),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,i=r&&r.x,o=r&&r.y;if(i||o){const a=Lu[t.position].call(this,this._active,this._eventPosition);if(!a)return;const s=this._size=sI(this,t),l=Object.assign({},a,this._size),c=lI(n,t,l),u=cI(t,l,c,n);(i._to!==u.x||o._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=s.width,this.height=s.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},o={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const a=Jr(n.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&s&&(t.save(),t.globalAlpha=r,this.drawBackground(o,t,i,n),lj(t,n.textDirection),o.y+=a.top,this.drawTitle(o,t,n),this.drawBody(o,t,n),this.drawFooter(o,t,n),cj(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,i=t.map(({datasetIndex:s,index:l})=>{const c=this.chart.getDatasetMeta(s);if(!c)throw new Error("Cannot find a dataset at index "+s);return{datasetIndex:s,element:c.data[l],index:l}}),o=!Sh(r,i),a=this._positionChanged(i,n);(o||a)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,o=this._active||[],a=this._getActiveElements(t,o,n,r),s=this._positionChanged(a,t),l=n||!Sh(a,o)||s;return l&&(this._active=a,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,r,i){const o=this.options;if(t.type==="mouseout")return[];if(!i)return n.filter(s=>this.chart.data.datasets[s.datasetIndex]&&this.chart.getDatasetMeta(s.datasetIndex).controller.getParsed(s.index)!==void 0);const a=this.chart.getElementsAtEventForMode(t,o.mode,o,r);return o.reverse&&a.reverse(),a}_positionChanged(t,n){const{caretX:r,caretY:i,options:o}=this,a=Lu[o.position].call(this,t,n);return a!==!1&&(r!==a.x||i!==a.y)}}var Vr={id:"tooltip",_element:pI,positioners:Lu,afterInit(e,t,n){n&&(e.tooltip=new pI({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.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:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.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:fI},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const Vce=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function Hce(e,t,n,r){const i=e.indexOf(t);if(i===-1)return Vce(e,t,n,r);const o=e.lastIndexOf(t);return i!==o?n:i}const Yce=(e,t)=>e===null?null:kn(Math.round(e),0,t);function hI(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class Oo extends Sl{static id="category";static defaults={ticks:{callback:hI}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const r=this.getLabels();for(const{index:i,label:o}of n)r[i]===o&&r.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(Ve(t))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===t?n:Hce(r,t,Oe(n,t),this._addedLabels),Yce(n,r.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:r,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(r=0),n||(i=this.getLabels().length-1)),this.min=r,this.max=i}buildTicks(){const t=this.min,n=this.max,r=this.options.offset,i=[];let o=this.getLabels();o=t===0&&n===o.length-1?o:o.slice(t,n+1),this._valueRange=Math.max(o.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let a=t;a<=n;a++)i.push({value:a});return i}getLabelForValue(t){return hI.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function Uce(e,t){const n=[],{bounds:i,step:o,min:a,max:s,precision:l,count:c,maxTicks:u,maxDigits:d,includeBounds:f}=e,p=o||1,m=u-1,{min:h,max:g}=t,b=!Ve(a),S=!Ve(s),w=!Ve(c),x=(g-h)/(d+1);let _=IN((g-h)/m/p)*p,E,C,D,T;if(_<1e-14&&!b&&!S)return[{value:h},{value:g}];T=Math.ceil(g/_)-Math.floor(h/_),T>m&&(_=IN(T*_/m/p)*p),Ve(l)||(E=Math.pow(10,l),_=Math.ceil(_*E)/E),i==="ticks"?(C=Math.floor(h/_)*_,D=Math.ceil(g/_)*_):(C=h,D=g),b&&S&&o&&pae((s-a)/o,_/1e3)?(T=Math.round(Math.min((s-a)/_,u)),_=(s-a)/T,C=a,D=s):w?(C=b?a:C,D=S?s:D,T=c-1,_=(D-C)/T):(T=(D-C)/_,Ou(T,Math.round(T),_/1e3)?T=Math.round(T):T=Math.ceil(T));const j=Math.max(RN(_),RN(C));E=Math.pow(10,Ve(l)?j:l),C=Math.round(C*E)/E,D=Math.round(D*E)/E;let A=0;for(b&&(f&&C!==a?(n.push({value:a}),C<a&&A++,Ou(Math.round((C+A*_)*E)/E,a,mI(a,x,e))&&A++):C<a&&A++);A<T;++A){const P=Math.round((C+A*_)*E)/E;if(S&&P>s)break;n.push({value:P})}return S&&f&&D!==s?n.length&&Ou(n[n.length-1].value,s,mI(s,x,e))?n[n.length-1].value=s:n.push({value:s}):(!S||D===s)&&n.push({value:D}),n}function mI(e,t,{horizontal:n,minRotation:r}){const i=wo(r),o=(n?Math.sin(i):Math.cos(i))||.001,a=.75*t*(""+e).length;return Math.min(t/o,a)}class Kce extends Sl{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,n){return Ve(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:i,max:o}=this;const a=l=>i=n?i:l,s=l=>o=r?o:l;if(t){const l=Ti(i),c=Ti(o);l<0&&c<0?s(0):l>0&&c>0&&a(0)}if(i===o){let l=o===0?1:Math.abs(o*.05);s(o+l),t||a(i-l)}this.min=i,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=t,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},o=this._range||this,a=Uce(i,o);return t.bounds==="ticks"&&hae(a,this,"value"),t.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){const t=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const i=(r-n)/Math.max(t.length-1,1)/2;n-=i,r+=i}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(t){return Tx(t,this.chart.options.locale,this.options.ticks.format)}}class Eo extends Kce{static id="linear";static defaults={ticks:{callback:qN.formatters.numeric}};determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=zr(t)?t:0,this.max=zr(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=wo(this.options.ticks.minRotation),i=(t?Math.sin(r):Math.cos(r))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,o.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}const Uh={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}},tr=Object.keys(Uh);function gI(e,t){return e-t}function vI(e,t){if(Ve(t))return null;const n=e._adapter,{parser:r,round:i,isoWeekday:o}=e._parseOpts;let a=t;return typeof r=="function"&&(a=r(a)),zr(a)||(a=typeof r=="string"?n.parse(a,r):n.parse(a)),a===null?null:(i&&(a=i==="week"&&(Eu(o)||o===!0)?n.startOf(a,"isoWeek",o):n.startOf(a,i)),+a)}function yI(e,t,n,r){const i=tr.length;for(let o=tr.indexOf(e);o<i-1;++o){const a=Uh[tr[o]],s=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((n-t)/(s*a.size))<=r)return tr[o]}return tr[i-1]}function qce(e,t,n,r,i){for(let o=tr.length-1;o>=tr.indexOf(n);o--){const a=tr[o];if(Uh[a].common&&e._adapter.diff(i,r,a)>=t-1)return a}return tr[n?tr.indexOf(n):0]}function Gce(e){for(let t=tr.indexOf(e)+1,n=tr.length;t<n;++t)if(Uh[tr[t]].common)return tr[t]}function bI(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:r,hi:i}=Cx(n,t),o=n[r]>=t?n[r]:n[i];e[o]=!0}}function Xce(e,t,n,r){const i=e._adapter,o=+i.startOf(t[0].value,r),a=t[t.length-1].value;let s,l;for(s=o;s<=a;s=+i.add(s,1,r))l=n[s],l>=0&&(t[l].major=!0);return t}function xI(e,t,n){const r=[],i={},o=t.length;let a,s;for(a=0;a<o;++a)s=t[a],i[s]=a,r.push({value:s,major:!1});return o===0||!n?r:Xce(e,r,i,n)}class wI extends Sl{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,n={}){const r=t.time||(t.time={}),i=this._adapter=new nle._date(t.adapters.date);i.init(n),_u(r.displayFormats,i.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:vI(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,r=t.time.unit||"day";let{min:i,max:o,minDefined:a,maxDefined:s}=this.getUserBounds();function l(c){!a&&!isNaN(c.min)&&(i=Math.min(i,c.min)),!s&&!isNaN(c.max)&&(o=Math.max(o,c.max))}(!a||!s)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),i=zr(i)&&!isNaN(i)?i:+n.startOf(Date.now(),r),o=zr(o)&&!isNaN(o)?o:+n.endOf(Date.now(),r)+1,this.min=Math.min(i,o-1),this.max=Math.max(i+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],r=t[t.length-1]),{min:n,max:r}}buildTicks(){const t=this.options,n=t.time,r=t.ticks,i=r.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const o=this.min,a=this.max,s=bae(i,o,a);return this._unit=n.unit||(r.autoSkip?yI(n.minUnit,this.min,this.max,this._getLabelCapacity(o)):qce(this,s.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:Gce(this._unit),this.initOffsets(i),t.reverse&&s.reverse(),xI(this,s,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,r=0,i,o;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?r=o:r=(o-this.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;n=kn(n,0,a),r=kn(r,0,a),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,i=this.options,o=i.time,a=o.unit||yI(o.minUnit,n,r,this._getLabelCapacity(n)),s=Oe(i.ticks.stepSize,1),l=a==="week"?o.isoWeekday:!1,c=Eu(l)||l===!0,u={};let d=n,f,p;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":a),t.diff(r,n,a)>1e5*s)throw new Error(n+" and "+r+" are too far apart with stepSize of "+s+" "+a);const m=i.ticks.source==="data"&&this.getDataTimestamps();for(f=d,p=0;f<r;f=+t.add(f,s,a),p++)bI(u,f,m);return(f===r||i.bounds==="ticks"||p===1)&&bI(u,f,m),Object.keys(u).sort(gI).map(h=>+h)}getLabelForValue(t){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}format(t,n){const i=this.options.time.displayFormats,o=this._unit,a=n||i[o];return this._adapter.format(t,a)}_tickFormatFunction(t,n,r,i){const o=this.options,a=o.ticks.callback;if(a)return ht(a,[t,n,r],this);const s=o.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&s[l],d=c&&s[c],f=r[n],p=c&&d&&f&&f.major;return this._adapter.format(t,i||(p?d:u))}generateTickLabels(t){let n,r,i;for(n=0,r=t.length;n<r;++n)i=t[n],i.label=this._tickFormatFunction(i.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,r=this.ctx.measureText(t).width,i=wo(this.isHorizontal()?n.maxRotation:n.minRotation),o=Math.cos(i),a=Math.sin(i),s=this._resolveTickFontOptions(0).size;return{w:r*o+s*a,h:r*a+s*o}}_getLabelCapacity(t){const n=this.options.time,r=n.displayFormats,i=r[n.unit]||r.millisecond,o=this._tickFormatFunction(t,0,xI(this,[t],this._majorUnit),i),a=this._getLabelSize(o),s=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return s>0?s:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,r=i.length;n<r;++n)t=t.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,r;if(t.length)return t;const i=this.getLabels();for(n=0,r=i.length;n<r;++n)t.push(vI(this,i[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return BN(t.sort(gI))}}function Kh(e,t,n){let r=0,i=e.length-1,o,a,s,l;n?(t>=e[r].pos&&t<=e[i].pos&&({lo:r,hi:i}=ts(e,"pos",t)),{pos:o,time:s}=e[r],{pos:a,time:l}=e[i]):(t>=e[r].time&&t<=e[i].time&&({lo:r,hi:i}=ts(e,"time",t)),{time:o,pos:s}=e[r],{time:a,pos:l}=e[i]);const c=a-o;return c?s+(l-s)*(t-o)/c:s}class yfe extends wI{static id="timeseries";static defaults=wI.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=Kh(n,this.min),this._tableRange=Kh(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,i=[],o=[];let a,s,l,c,u;for(a=0,s=t.length;a<s;++a)c=t[a],c>=n&&c<=r&&i.push(c);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(a=0,s=i.length;a<s;++a)u=i[a+1],l=i[a-1],c=i[a],Math.round((u+l)/2)!==c&&o.push({time:c,pos:a/(s-1)});return o}_generate(){const t=this.min,n=this.max;let r=super.getDataTimestamps();return(!r.includes(t)||!r.length)&&r.splice(0,0,t),(!r.includes(n)||r.length===1)&&r.push(n),r.sort((i,o)=>i-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?t=this.normalize(n.concat(r)):t=n.length?n:r,t=this._cache.all=t,t}getDecimalForValue(t){return(Kh(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return Kh(this._table,r*this._tableRange+this._minPos,!0)}}const _I="label";function SI(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function Qce(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function OI(e,t){e.labels=t}function EI(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:_I;const r=[];e.datasets=t.map(i=>{const o=e.datasets.find(a=>a[n]===i[n]);return!o||!i.data||r.includes(o)?{...i}:(r.push(o),Object.assign(o,i),o)})}function Zce(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_I;const n={labels:[],datasets:[]};return OI(n,e.labels),EI(n,e.datasets,t),n}function Jce(e,t){const{height:n=150,width:r=300,redraw:i=!1,datasetIdKey:o,type:a,data:s,options:l,plugins:c=[],fallbackContent:u,updateMode:d,...f}=e,p=k.useRef(null),m=k.useRef(null),h=()=>{p.current&&(m.current=new Fn(p.current,{type:a,data:Zce(s,o),options:l&&{...l},plugins:c}),SI(t,m.current))},g=()=>{SI(t,null),m.current&&(m.current.destroy(),m.current=null)};return k.useEffect(()=>{!i&&m.current&&l&&Qce(m.current,l)},[i,l]),k.useEffect(()=>{!i&&m.current&&OI(m.current.config.data,s.labels)},[i,s.labels]),k.useEffect(()=>{!i&&m.current&&s.datasets&&EI(m.current.config.data,s.datasets,o)},[i,s.datasets]),k.useEffect(()=>{m.current&&(i?(g(),setTimeout(h)):m.current.update(d))},[i,l,s.labels,s.datasets,d]),k.useEffect(()=>{m.current&&(g(),setTimeout(h))},[a]),k.useEffect(()=>(h(),()=>g()),[]),k.createElement("canvas",{ref:p,role:"img",height:n,width:r,...f},u)}const eue=k.forwardRef(Jce);function o1(e,t){return Fn.register(t),k.forwardRef((n,r)=>k.createElement(eue,{...n,ref:r,type:e}))}const a1=o1("line",tle),Pl=o1("bar",Zse),s1=o1("doughnut",ele);Fn.register(Jx,Vr,ei);const tue={id:"centerText",afterDraw(e,t,n){const{ctx:r}=e,i=e.getDatasetMeta(0);if(!i?.data?.[0])return;const{x:o,y:a}=i.data[0],{top:s="",bottom:l="",topSize:c=20,bottomSize:u=10,topColor:d="#0F172A",bottomColor:f="#64748B"}=n||{};r.save(),r.textAlign="center",r.textBaseline="middle",r.fillStyle=d,r.font=`600 ${c}px Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif`,r.fillText(s,o,a-5),r.fillStyle=f,r.font=`500 ${u}px Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif`,r.fillText(l,o,a+12),r.restore()}},PI=({title:e="Tickets",icon:t,firstLabel:n="First",firstValue:r=0,firstColor:i="#12B981",secondLabel:o="Second",secondValue:a=0,secondColor:s="#AB0000",growthPercentage:l="+0%",growthColor:c="#1FA05B",growthText:u="Compared to last month",totalLabel:d="Total",centerTopColor:f="#0F172A",centerBottomColor:p="#64748B",widgetType:m=""})=>{const h=r+a,g={labels:[n,o],datasets:[{data:[r,a],backgroundColor:[i,s],borderWidth:2,hoverOffset:4}]},b={responsive:!0,maintainAspectRatio:!1,cutout:"68%",plugins:{legend:{display:!1},tooltip:{callbacks:{label:E=>`${E.label}: ${E.parsed}`},displayColors:!1},centerText:{top:`${h}`,bottom:d,topSize:20,bottomSize:10,topColor:f,bottomColor:p}}},S=[{label:n,value:r,color:i},{label:o,value:a,color:s}],w=l.toString().includes("+"),x=l.toString().includes("-"),_=w?"#1FA05B":"#AB0000";return v.jsx(je,{title:e,icon:t,className:m==="commercial"?"h-[362px]":"h-[238px]",children:v.jsxs("div",{className:"grid grid-cols-12 gap-[16px] items-center",children:[v.jsxs("div",{className:"col-span-5 space-y-3",children:[S.map((E,C)=>v.jsxs("div",{children:[v.jsx("div",{className:"text-[12px] text-[#64748B]",children:E.label}),v.jsx("div",{className:"text-[28px] leading-[32px]",style:{color:E.color},children:E.value})]},C)),v.jsxs("div",{className:"text-[10px] flex gap-[4px] items-center",style:{color:_},children:[w&&v.jsx(oc,{}),x&&v.jsx(rf,{}),v.jsx("div",{children:l.replace("+","").replace("-","")}),v.jsx("div",{className:"text-[#64748B] text-[10px] ml-[4px]",children:u})]})]}),v.jsx("div",{className:"col-span-7",children:v.jsx("div",{className:`${m==="commercial"?"h-[260px] w-[263px]":"h-[158px] w-[158px]"} ml-auto mr-2`,children:v.jsx(s1,{data:g,options:b,plugins:[tue]})})})]})})},kI=({value:e=0,total:t=1,colorClass:n="",label:r=""})=>{const i=Math.max(0,Math.min(100,e/(t||1)*100)),o=n==="bg-[#8B5CF6]"?"text-[#8B5CF6]":n==="bg-[#12B981]"?"text-[#12B981]":"text-slate-600";return v.jsxs("div",{className:"flex flex-col items-start",children:[v.jsx("div",{className:"w-2/3 min-w-[80px] h-3 rounded-full overflow-hidden",children:v.jsx("div",{className:`h-3 rounded-full ${n}`,style:{width:`${i}%`}})}),v.jsx("div",{className:`${o} !text-[12px] font-bold mt-1`,children:e}),v.jsx("div",{className:"!text-[12px] text-[#64748B] mt-1",children:r})]})},CI=({title:e,value:t,suffix:n,valueClass:r=""})=>v.jsxs("div",{className:"bg-white border border-[#EBEBEB] rounded-xl shadow-[0_0_12px_0_#EAF2FF] h-[98px] p-4 flex flex-col justify-center",children:[v.jsx("div",{className:"!text-[12px] leading-[16px] text-[#121212] mb-1",children:e}),v.jsxs("div",{className:`text-[28px] leading-[32px] flex item gap-[4px] font-medium ${r}`,children:[t," ",n&&v.jsx("div",{className:"text-[28px] leading-[32px] font-medium",children:n})]})]}),nue=({totalUnits:e=847,occupiedUnits:t=756,ownerCount:n=700,tenantCount:r=56,avgResidents:i=4.4,avgLeaseMonths:o=18})=>{const a=n+r;return v.jsxs("div",{children:[v.jsxs("div",{className:"bg-white border border-[#EBEBEB] rounded-xl shadow-[0_0_12px_0_#EAF2FF] p-4 h-[128px]",children:[v.jsxs("div",{className:"flex items-center gap-[12px] mb-4",children:[v.jsx(dg,{className:"h-6 w-6 text-[#329DFF]"}),v.jsx("div",{className:"font-medium text-[#121212]",children:"Occupancy Overview"})]}),v.jsxs("div",{className:"flex items-center justify-between gap-",children:[v.jsxs("div",{children:[v.jsx("div",{className:"text-xs leading-[16px] text-[#64748B]",children:"Occupied Units"}),v.jsxs("div",{className:"flex items-center gap-1",children:[v.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t}),v.jsxs("div",{className:"text-[#64748B] text-[20px] leading-[32px]",children:["/",e]})]})]}),v.jsxs("div",{className:"flex items-end",children:[v.jsx(kI,{value:n,total:a,colorClass:"bg-[#8B5CF6]",label:"Owner"}),v.jsx(kI,{value:r,total:a,colorClass:"bg-[#12B981]",label:"Tenant"})]})]})]}),v.jsxs("div",{className:"mt-2.5 grid grid-cols-2 gap-[12px]",children:[v.jsx(CI,{title:"Avg Residents Per Unit",value:i,valueClass:"text-[#8B5CF6]"}),v.jsx(CI,{title:"Avg Lease Period",value:o,suffix:"months",valueClass:"text-[#E7A015]"})]})]})};Fn.register(Jx,Vr,ei);const rue={id:"centerText",afterDraw(e,t,n){const{ctx:r}=e,i=e.getDatasetMeta(0);if(!i?.data?.[0])return;const{x:o,y:a}=i.data[0],{top:s="",bottom:l="",topSize:c=20,bottomSize:u=10,topColor:d="#0F172A",bottomColor:f="#64748B"}=n||{};r.save(),r.textAlign="center",r.textBaseline="middle",r.fillStyle=d,r.font=`600 ${c}px Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif`,r.fillText(s,o,a-5),r.fillStyle=f,r.font=`500 ${u}px Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif`,r.fillText(l,o,a+12),r.restore()}},iue=({ownerCount:e=1e3,tenantCount:t=200,nonResidingOwners:n=26,growthPct:r="+9.1%"})=>{const i=Math.max(e-n,0),o=e+t,a={labels:["Owners","Tenants","Non-residing Owner"],datasets:[{data:[i,t,n],backgroundColor:["#3C81F6","#08B6D4","#8B5CF6"],borderWidth:2,hoverOffset:4}]},s={responsive:!0,maintainAspectRatio:!1,cutout:"68%",plugins:{legend:{display:!1},tooltip:{callbacks:{label:l=>`${l.label}: ${l.parsed}`},displayColors:!1},centerText:{top:`${o}`,bottom:"Total Members",topSize:20,bottomSize:10}}};return v.jsx(je,{title:"Resident Overview",icon:v.jsx(kS,{className:"h-6 w-6 text-[#8B5CF6]"}),className:"h-[238px]",children:v.jsxs("div",{className:" flex-1 min-h-0 grid grid-cols-12 gap-[16px] items-center",children:[v.jsxs("div",{className:"col-span-5",children:[v.jsxs("div",{children:[v.jsx("div",{className:"!text-[12px] text-[#64748B] leading-[16px]",children:"Total Owners"}),v.jsx("div",{className:"text-[28px] leading-[32px ] text-[#3C81F6]",children:e})]}),v.jsxs("div",{children:[v.jsx("div",{className:"!text-[12px] text-[#64748B] leading-[16px]",children:"Total Tenants"}),v.jsx("div",{className:"text-[28px] leading-[32px ] text-[#08B6D4]",children:t})]}),v.jsxs("div",{className:"text-[10px] text-[#1FA05B] flex gap-2 items-center",children:[r," ",v.jsx("div",{className:"text-[#64748B] ",children:"Compared to last month"})]})]}),v.jsx("div",{className:"col-span-7",children:v.jsx("div",{className:"h-[162px] w-[162px] ml-auto mr-2",children:v.jsx(s1,{data:a,options:s,plugins:[rue]})})})]})})};Fn.register(Oo,Eo,El,Vr,ei);const oue=({blocks:e=[{name:"Block A",owner:110,rented:24,vacant:8},{name:"Block B",owner:95,rented:18,vacant:6},{name:"Block C",owner:65,rented:12,vacant:18},{name:"Block D",owner:78,rented:16,vacant:30}]})=>{const t=e.map(s=>s.name),n=e.map(s=>s.owner),r=e.map(s=>s.rented),i=e.map(s=>s.vacant),o={labels:t,datasets:[{label:"Owner",data:n,backgroundColor:"#3C81F6",barThickness:40},{label:"",data:n.map(()=>2),backgroundColor:"transparent",barThickness:40},{label:"Rented",data:r,backgroundColor:"#8B5CF6",barThickness:40},{label:"",data:r.map(()=>2),backgroundColor:"transparent",barThickness:40},{label:"Vacant",data:i,backgroundColor:"#08B6D4",barThickness:40}]},a={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,boxWidth:10,boxHeight:10,pointStyle:"rectRot",padding:20}},tooltip:{callbacks:{label:s=>`${s.dataset.label}: ${s.parsed.y}`}}},scales:{x:{stacked:!0,grid:{display:!1},ticks:{color:"#64748B"}},y:{stacked:!0,beginAtZero:!0,suggestedMax:180,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",stepSize:20}}}};return v.jsx(je,{title:"Block-wise Occupancy",period:v.jsx(Sr,{className:"text-xl text-[#884EA7]"}),className:"w-full h-[360px]",titleWeight:"semi-bold",children:v.jsx(Pl,{data:o,options:a})})};Fn.register(Oo,Eo,n1,t1,Vr,ei);const aue=e=>{const[t,n]=String(e).split(" ");return`${{Jan:"January",Feb:"February",Mar:"March",Apr:"April",May:"May",Jun:"June",Jul:"July",Aug:"August",Sep:"September",Oct:"October",Nov:"November",Dec:"December"}[t]||t} 20${n}`},sue=({labels:e=["Jan 25","Feb 25","Mar 25","Apr 25","May 25"],moveIn:t=[24,27,20,26,23],moveOut:n=[12,17,8,5,16]})=>{const r={labels:e,datasets:[{label:"Move-in",data:t,borderColor:"#12B981",backgroundColor:"rgba(16,185,129,0.15)",pointBackgroundColor:"#12B981",pointStyle:"rectRot",fill:!1},{label:"Move-out",data:n,borderColor:"#8B5CF6",backgroundColor:"rgba(124,58,237,0.15)",pointBackgroundColor:"#8B5CF6",pointStyle:"rectRot",fill:!1}]},i={responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,boxWidth:10,boxHeight:10,padding:20}},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:12,caretSize:0,callbacks:{title:o=>aue(o[0].label),label:o=>`${o.dataset.label}: ${o.parsed.y}`}}},scales:{x:{grid:{color:"#F1F5F9"},ticks:{color:"#64748B"}},y:{beginAtZero:!0,suggestedMax:28,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",stepSize:4,precision:0}}},elements:{line:{borderWidth:2,tension:0},point:{radius:0,hoverRadius:3,hitRadius:10}}};return v.jsx(je,{title:"Move-in/Out Trends",className:"w-full h-[360px]",period:v.jsx(Sr,{className:"text-[20px] text-[#884EA7]"}),titleWeight:"semi-bold",children:v.jsx(a1,{data:r,options:i})})};Fn.register(Oo,Eo,n1,t1,Vr,ei);const lue=e=>{const[t,n]=String(e).split(" ");return`${{Jan:"January",Feb:"February",Mar:"March",Apr:"April",May:"May",Jun:"June",Jul:"July",Aug:"August",Sep:"September",Oct:"October",Nov:"November",Dec:"December"}[t]||t} 20${n}`},DI=({labels:e=["Jan 25","Feb 25","Mar 25","Apr 25","May 25"],moveIn:t=[24,27,20,26,23],moveOut:n=[4,17,8,5,16,4,7]})=>{const r={labels:e,datasets:[{label:"Income",data:t,borderColor:"#10B981",backgroundColor:"rgba(16,185,129,0.15)",pointBackgroundColor:"#10B981",pointStyle:"rectRot",fill:!1},{label:"Expenditure",data:n,borderColor:"#AB0000",backgroundColor:"rgba(124,58,237,0.15)",pointBackgroundColor:"#AB0000",pointStyle:"rectRot",fill:!1}]},i={responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,boxWidth:10,boxHeight:10,padding:20}},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:12,caretSize:0,callbacks:{title:o=>lue(o[0].label),label:o=>`${o.dataset.label}: ${o.parsed.y}`}}},scales:{x:{grid:{color:"#F1F5F9"},ticks:{color:"#64748B"}},y:{beginAtZero:!0,suggestedMax:28,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",stepSize:4,precision:0}}},elements:{line:{borderWidth:2,tension:0},point:{radius:0,hoverRadius:3,hitRadius:10}}};return v.jsx(a1,{data:r,options:i})};function AI({label:e,value:t,positive:n,bgColor:r,delta:i,deltaLabel:o,textColor:a}){return v.jsxs("div",{className:`rounded-lg p-4 ${r} border border-[#EBEBEB] h-[126px]`,children:[v.jsx("div",{className:`text-[16px] leading-[20px] ${a}`,children:e}),v.jsx("div",{className:"mt-[16px] leading-[28px] !text-[24px] font-medium text-[#121212]",children:t}),v.jsxs("div",{className:"mt-[8px] flex items-center gap-[8px] leading-[14px] text-[10px]",children:[v.jsx("div",{className:n?"text-[#1FA05B] font-medium":"text-[#EF4444] font-medium",children:i}),v.jsx("div",{className:"text-[#64748B] ",children:o})]})]})}function cue(){return v.jsxs(je,{title:"Accounting",className:"w-full h-[523px]",period:v.jsx(Sr,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:[v.jsxs("div",{className:"grid grid-cols-2 gap-[16px]",children:[v.jsx(AI,{label:"Total Income",value:"AED 5.68M",delta:"+4.4%",positive:!0,bgColor:"bg-slate-50",deltaLabel:"Compared to last month",textColor:"text-[#1FA05B]"}),v.jsx(AI,{label:"Total Expenditure",value:"AED 1.83M",delta:"-1.1%",positive:!1,bgColor:"bg-slate-50",deltaLabel:"Compared to last month",textColor:"text-[#AB0000]"})]}),v.jsx("div",{className:"h-[254px] mt-[35.5px]",children:v.jsx(DI,{})})]})}Fn.register(Oo,Eo,El,Vr,ei);const uue=()=>{const e=["Maintenance","Security","Utilities","Housekeeping","Administration","Others"],r={labels:e,datasets:[{label:"Budget",data:[55e3,56e3,64e3,38e3,54e3,65e3],backgroundColor:"#93C5FD",barThickness:60},{label:"Actual",data:[63e3,48e3,51300,28e3,42e3,35e3],backgroundColor:"#3B82F6",barThickness:60}]},i={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,pointStyle:"rectRot",padding:20}},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:12,caretSize:6,callbacks:{title:o=>e[o[0].dataIndex],label:o=>{const a=o.parsed.y;return`${o.dataset.label}: AED ${(a/1e3).toFixed(1)}K`}}}},scales:{x:{grid:{display:!1},ticks:{color:"#64748B"}},y:{beginAtZero:!0,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",callback:o=>`${o/1e3}K`}}}};return v.jsx(je,{title:"Budget vs Actuals",className:"w-full h-[362px]",period:v.jsx(Sr,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:v.jsx(Pl,{data:r,options:i})})},due=()=>{const e=[{title:"Primary Account",amount:285e4,subtitle:"Savings"},{title:"Emergency Fund",amount:12e5,subtitle:"Fixed deposit"},{title:"Maintenance Fund",amount:68e4,subtitle:"Current"}],t=e.reduce((r,i)=>r+i.amount,0),n=r=>r>=1e6?`AED ${(r/1e6).toFixed(2)}M`:r>=1e3?`AED ${(r/1e3).toFixed(1)}K`:`AED ${r}`;return v.jsxs(je,{title:"Cash & Bank Balance",className:"w-full h-[362px]",period:v.jsx(Sr,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),children:[v.jsx("div",{className:"flex flex-col gap-[12px]",children:e.map((r,i)=>v.jsxs("div",{className:"flex items-center justify-between bg-[#F9FAFB] rounded-lg p-3",children:[v.jsxs("div",{className:"flex flex-col",children:[v.jsx("div",{className:"text-[14px] font-medium text-[#121212]",children:r.title}),v.jsx("div",{className:"!text-[12px] text-[#64748B]",children:r?.subtitle})]}),v.jsx("div",{className:"flex flex-col items-end",children:v.jsx("div",{className:"text-[14px] text-[#1FA05B] font-semibold",children:n(r.amount)})})]},i))}),v.jsxs("div",{className:"flex items-center justify-between border-t border-[#EBEBEB] h-[68px] px-3",children:[v.jsx("div",{className:"text-[14px] font-medium text-[#121212]",children:"Total"}),v.jsx("div",{className:"text-[16px] text-[#1FA05B] font-bold",children:n(t)})]})]})};Fn.register(Oo,Eo,El,Vr,ei);const fue=()=>{const e=["Current Month","1-3 Months","3-6 Months","6+ Months"],t=[13e3,9400,8800,7200],n=[18,12,18,6],r={labels:e,datasets:[{label:"Due",data:t,backgroundColor:"#EF4444",barThickness:60}]},i={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:12,caretSize:6,callbacks:{title:o=>e[o[0].dataIndex],label:o=>`Due: AED ${(o.parsed.y/1e3).toFixed(1)}K`,afterLabel:o=>`Units Count: ${n[o.dataIndex]}`}}},scales:{x:{grid:{display:!1},ticks:{color:"#64748B"}},y:{beginAtZero:!0,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",callback:o=>`${o/1e3}K`}}}};return v.jsxs(je,{title:"Dues Ageing",className:"w-full h-[362px]",period:v.jsx(Sr,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:[v.jsx("div",{className:"grid grid-cols-4 md:grid-cols-4 gap-[12px] h-[48px]",children:e.map((o,a)=>v.jsx("div",{className:"p-2 rounded-lg bg-slate-50",children:v.jsxs("div",{className:"flex justify-between items-start",children:[v.jsx("div",{className:"font-medium leading-[16px] !text-[12px] rounded",children:o}),v.jsxs("div",{className:"text-right",children:[v.jsxs("div",{className:"text-red-600 font-medium leading-[16px] !text-[12px]",children:["AED ",(t[a]/1e3).toFixed(1),"K"]}),v.jsxs("div",{className:" text-gray-500 leading-[14px] text-[10px]",children:[n[a]," Units"]})]})]})},o))}),v.jsx("div",{className:"h-[192px]",children:v.jsx(Pl,{data:r,options:i})})]})};Fn.register(Jx,Vr,ei);const pue=()=>{const e=["Maintenance","Utilities","Security","Administration","Others"],t=[45e4,32e4,28e4,18e4,12e4],n={labels:e,datasets:[{label:"Expenses",data:t,backgroundColor:["#08B6D4","#8B5CF6","#EF4444","#F69E0A","#12B981"],borderColor:"#FFFFFF",borderWidth:2,cutout:"70%"}]},r=t.reduce((o,a)=>o+a,0),i={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:10,callbacks:{label:o=>`${o.label}: AED ${o.formattedValue}`}}}};return v.jsxs(je,{title:"Expense Categories",className:"w-full h-[523px]",period:v.jsx(Sr,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:[v.jsxs("div",{className:"relative h-[259px] flex justify-center items-center",children:[v.jsx(s1,{data:n,options:i}),v.jsxs("div",{className:"absolute text-center",children:[v.jsxs("div",{className:"!text-[24px] font-medium leading-[28px] text-[#121212]",children:["AED ",(r/1e6).toFixed(2),"M"]}),v.jsx("div",{className:"text-[#121212] leading-[18px] text-[14px]",children:"Total Expenses"})]})]}),v.jsx("div",{className:"space-y-2",children:e.map((o,a)=>v.jsxs("div",{className:"flex justify-between items-center text-[14px] pb-2",children:[v.jsxs("div",{className:"flex items-center gap-[8px] !text-[12px] leading-[16px] text-[#64748B]",children:[v.jsx("div",{className:"w-[7px] h-[7px] rotate-45",style:{backgroundColor:n.datasets[0].backgroundColor[a]}}),o]}),v.jsxs("div",{className:"leading-[16px] !text-[12px] text-[#64748B]",children:["AED ",(t[a]/1e3).toFixed(0),"K"]})]},o))})]})},Fu=[{name:"Gym Equipment",value:1e6,color:"#08B6D4"},{name:"Security",value:8e5,color:"#EF4444"},{name:"Others",value:6e5,color:"#F59E0B"},{name:"Pool Maintenance",value:7e5,color:"#8B5CF6"},{name:"Administration",value:52e4,color:"#10B981"}];function hue(){const e=Fu.reduce((t,n)=>t+n.value,0);return v.jsx(je,{title:"Asset Value Breakdown",period:v.jsx(Sr,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"h-[362px]",titleWeight:"semi-bold",children:v.jsxs("div",{className:"flex flex-col items-center justify-center",children:[v.jsxs("div",{className:"w-[214px] h-[181px] relative",children:[v.jsx(It,{width:"100%",height:"100%",children:v.jsxs(ho,{children:[v.jsx(Oi,{data:Fu,innerRadius:60,outerRadius:90,paddingAngle:2,dataKey:"value",nameKey:"name",children:Fu.map((t,n)=>v.jsx(Ht,{fill:t.color},`cell-${n}`))}),v.jsx(Vt,{formatter:t=>`AED ${t.toLocaleString()}`})]})}),v.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[v.jsxs("div",{className:"font-medium text-lg leading-[12px] ",children:["AED ",(e/1e6).toFixed(2),"M"]}),v.jsx("div",{className:"text-[10px] leading-[12.59px] text-[#121212] mt-[6px]",children:"Total Assets"})]})]}),v.jsxs("div",{className:"flex justify-between w-full px-4 sm:px-8 mt-4 text-[14px]",children:[v.jsx("div",{className:"flex flex-col gap-[8px]",children:Fu.slice(0,3).map(t=>v.jsxs("div",{className:"flex items-center gap-[8px]",children:[v.jsx("div",{className:"inline-block h-[7px] w-[7px] rotate-45",style:{backgroundColor:t.color}}),v.jsx("div",{className:"text-[#64748B] leading-[16px] !text-[12px]",children:t.name})]},t.name))}),v.jsx("div",{className:"flex flex-col gap-[8px] items-start",children:Fu.slice(3).map(t=>v.jsxs("div",{className:"flex items-center gap-[8px]",children:[v.jsx("div",{className:"inline-block h-[7px] w-[7px] rotate-45",style:{backgroundColor:t.color}}),v.jsx("div",{className:"text-[#64748B] leading-[16px] !text-[12px]",children:t.name})]},t.name))})]})]})})}Fn.register(Oo,Eo,El,Vr,ei);const mue=()=>{const e=["Gym","Parking","Swimming Pool","Community Hall","Tennis Court"],t=[13e3,9400,8800,7200,6e3],n=[18,12,18,6],r={labels:e,datasets:[{label:"Due",data:t,backgroundColor:"#8B5CF6",barThickness:60}]},i={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:12,caretSize:6,callbacks:{title:o=>e[o[0].dataIndex],label:o=>`Due: AED ${(o.parsed.y/1e3).toFixed(1)}K`,afterLabel:o=>`Units Count: ${n[o.dataIndex]}`}}},scales:{x:{grid:{display:!1},ticks:{color:"#64748B"}},y:{beginAtZero:!0,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",callback:o=>`${o/1e3}K`}}}};return v.jsx(je,{title:"Revenue by Category",className:"w-full h-[362px]",period:v.jsx(Sr,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:v.jsx(Pl,{data:r,options:i})})};function gue(e){return Xe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M15 5l0 2"},child:[]},{tag:"path",attr:{d:"M15 11l0 2"},child:[]},{tag:"path",attr:{d:"M15 17l0 2"},child:[]},{tag:"path",attr:{d:"M5 5h14a2 2 0 0 1 2 2v3a2 2 0 0 0 0 4v3a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-3a2 2 0 0 0 0 -4v-3a2 2 0 0 1 2 -2"},child:[]}]})(e)}function vue(e){return Xe({attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M855.7 210.8l-42.4-42.4a8.03 8.03 0 0 0-11.3 0L168.3 801.9a8.03 8.03 0 0 0 0 11.3l42.4 42.4c3.1 3.1 8.2 3.1 11.3 0L855.6 222c3.2-3 3.2-8.1.1-11.2zM304 448c79.4 0 144-64.6 144-144s-64.6-144-144-144-144 64.6-144 144 64.6 144 144 144zm0-216c39.7 0 72 32.3 72 72s-32.3 72-72 72-72-32.3-72-72 32.3-72 72-72zm416 344c-79.4 0-144 64.6-144 144s64.6 144 144 144 144-64.6 144-144-64.6-144-144-144zm0 216c-39.7 0-72-32.3-72-72s32.3-72 72-72 72 32.3 72 72-32.3 72-72 72z"},child:[]}]})(e)}function yue({title:e,value:t,delta:n,deltaLabel:r,positive:i=!0,Icon:o=Hl,iconColor:a="text-emerald-600",iconBg:s="bg-emerald-50"}){return v.jsxs(je,{title:e,icon:v.jsx("div",{className:"h-6 w-6 grid place-items-center",children:v.jsx(o,{className:`h-6 w-6 ${a}`})}),children:[v.jsx("div",{className:"text-4xl font-semibold tracking-tight text-[#121212]",children:t}),v.jsxs("div",{className:"flex items-center gap-[8px] text-[14px]",children:[v.jsx("div",{className:i?"text-emerald-600 font-medium":"text-rose-600 font-medium",children:n}),v.jsx("div",{className:"text-slate-500",children:r})]})]})}function bue(){const e=[{title:"Total Bookings",value:160,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:PS,iconColor:"text-emerald-600"},{title:"Utilisation Rate",value:73,delta:"+2.0%",deltaLabel:"Compared to last month",positive:!0,Icon:vue,iconColor:"text-[#329DFF]"},{title:"Revenue",value:3,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:gue,iconColor:"text-[#FA7E28]"},{title:"Pending Dues",value:5,delta:"-8.0%",deltaLabel:"Compared to last month",positive:!1,Icon:CS,iconColor:"text-[#DBB467]"}];return v.jsx("div",{className:"px-5 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-[24px]",children:e.map((t,n)=>v.jsx(yue,{...t},n))})}/**
|
|
283
283
|
* @license lucide-react v0.564.0 - ISC
|
|
284
284
|
*
|
|
285
285
|
* This source code is licensed under the ISC license.
|
|
@@ -359,4 +359,4 @@ Take a look at the reducer(s) handling this action type: ${p.type}.
|
|
|
359
359
|
*
|
|
360
360
|
* This source code is licensed under the ISC license.
|
|
361
361
|
* See the LICENSE file in the root directory of this source tree.
|
|
362
|
-
*/const Aue=sa("waves-ladder",[["path",{d:"M19 5a2 2 0 0 0-2 2v11",key:"s41o68"}],["path",{d:"M2 18c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"rd2r6e"}],["path",{d:"M7 13h10",key:"1rwob1"}],["path",{d:"M7 9h10",key:"12czzb"}],["path",{d:"M9 5a2 2 0 0 0-2 2v11",key:"x0q4gh"}]]),mn=({title:e,icon:t,period:n,isDateSelector:r=!1,children:i,footer:o,className:a="",titleWeight:s,titleColor:l,iconClassName:c,titleClassName:u,childrenClassName:d,onCalendarClick:f,onPrevClick:p,onNextClick:m})=>{const h=s==="semi-bold"?600:500;return v.jsxs("div",{className:`relative bg-white rounded-[12px] p-[24px] shadow-[0_0_12px_0_#EAF2FF] ${a}`,children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[t&&v.jsx("div",{className:c,children:t}),v.jsx("div",{style:{fontWeight:h,color:l||"#121212"},className:u||"text-[20px] leading-[24px]",children:e})]}),n&&!r&&v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:n}),r&&v.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 rounded-lg bg-white text-sm text-[#64748B]",children:[v.jsx(Pue,{size:16,className:"text-[#64748B] cursor-pointer",onClick:f}),v.jsx(NI,{size:16,className:"cursor-pointer",onClick:p}),v.jsx("span",{className:"text-[12px] leading-[16px] text-[#64748B]",children:n}),v.jsx(jI,{size:16,className:"cursor-pointer",onClick:m})]})]}),v.jsx("div",{className:`flex-1 min-h-0 mt-4 ${d}`,children:i}),o&&v.jsx("div",{className:"mt-4 pt-4 border-t border-gray-100 text-[12px] text-[#64748B]",children:o})]})};function Tue({data:e={}}){const t=[{name:"Completed",value:Number(e?.completed??0),color:"#12B981"},{name:"Delayed",value:Number(e?.not_completed??0),color:"#EF4444"},{name:"Missed",value:Number(e?.missed??0),color:"#F69E0A"}],n=Number(e?.completed??0)+Number(e?.not_completed??0)+Number(e?.missed??0),r=Number(e?.completed??0);return v.jsx(mn,{title:"Guard Patrols",className:"h-[362px]",titleWeight:"semi-bold",children:v.jsxs("div",{className:"flex flex-col items-center justify-center",children:[v.jsxs("div",{className:"w-[215px] h-[182px] relative",children:[v.jsx(It,{width:"100%",height:"100%",children:v.jsxs(ho,{children:[v.jsx(Oi,{data:t??[],innerRadius:60,outerRadius:90,paddingAngle:2,dataKey:"value",nameKey:"name",children:t?.map?.((i,o)=>v.jsx(Vt,{fill:i?.color??"#ccc"},`cell-${o}`))}),v.jsx(nn,{formatter:i=>Number(i??0).toLocaleString()})]})}),v.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[v.jsxs("div",{className:"font-medium text-[19.35px] leading-[23.65px]",children:[r??0,"/",n??0]}),v.jsx("div",{className:"text-[10.75px] leading-[15.05px] text-[#64748B]",children:"Completed"})]})]}),v.jsx("div",{className:"flex flex-col w-full text-[14px]",children:t?.length?t?.map?.((i,o)=>v.jsxs("div",{className:`flex items-center justify-between py-[10px] ${o!==(t?.length??0)-1?"border-b border-[#F1F5F9]":""}`,children:[v.jsxs("div",{className:"flex items-center gap-[10px]",children:[v.jsx("div",{className:"inline-block w-[16px] h-[7px]",style:{backgroundColor:i?.color??"#ccc"}}),v.jsx("div",{className:"leading-[16.09px] text-[12.07px] text-[#64748B]",children:i?.name??"-"})]}),v.jsx("div",{className:"leading-[16.09px] text-[12.07px] text-[#64748B]",children:i?.value??0})]},i?.name??o)):v.jsx("div",{className:"text-center text-gray-400 text-sm py-6",children:"No patrol data"})})]})})}Fn.register(Oo,Eo,n1,t1,Vr,ei);const Mue=()=>{const t={labels:["10 AM","12 PM","2 PM","4 PM","6 PM","8 PM","10 PM"],datasets:[{label:"Guest",data:[9,5,12,7,3,6,4],borderColor:"#EF4444",backgroundColor:"rgba(239,68,68,0.15)",pointBackgroundColor:"#EF4444",pointStyle:"rectRot",fill:!1},{label:"Cab",data:[15,12,10,14,7,12,8],borderColor:"#7C3AED",backgroundColor:"rgba(124,58,237,0.15)",pointBackgroundColor:"#7C3AED",pointStyle:"rectRot",fill:!1},{label:"Delivery",data:[22,18,16,20,22,14,17],borderColor:"#10B981",backgroundColor:"rgba(16,185,129,0.15)",pointBackgroundColor:"#10B981",pointStyle:"rectRot",fill:!1},{label:"Service",data:[13,12,8,9,5,10,7],borderColor:"#F59E0B",backgroundColor:"rgba(245,158,11,0.15)",pointBackgroundColor:"#F59E0B",pointStyle:"rectRot",fill:!1}]},n={responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,boxWidth:10,boxHeight:10,padding:20}},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:12,caretSize:0,callbacks:{title:r=>r[0].label,label:r=>`${r.dataset.label} ${r.parsed.y}`}}},scales:{x:{grid:{color:"#F1F5F9"},ticks:{color:"#64748B"}},y:{beginAtZero:!0,suggestedMax:28,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",stepSize:4,precision:0}}},elements:{line:{borderWidth:2,tension:0},point:{radius:0,hoverRadius:3,hitRadius:10}}};return v.jsx(je,{title:"Hourly Traffic Flow",className:"w-full h-[362px]",period:v.jsx(Sr,{className:"text-[20px] text-[#884EA7]"}),children:v.jsx(a1,{data:t,options:n})})};function Nue({incidentReports:e={},incidentReportsDetails:t=[]}){const n=Number(e?.open??0),r=Number(e?.in_progress??0),i=Number(e?.closed??0);return v.jsx(mn,{title:"Incident Reports",className:"h-[362px]",titleWeight:"semi-bold",children:v.jsxs("div",{children:[v.jsxs("div",{className:"flex w-full text-center gap-[24px]",children:[v.jsxs("div",{className:"flex-1 py-3 bg-[#FBF4F4] h-[76px] rounded",children:[v.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#AB0000]",children:n??0}),v.jsx("div",{className:"!text-[12px] leading-[16px] text-[#AB0000]",children:"Open"})]}),v.jsxs("div",{className:"flex-1 py-3 bg-[#FFFBF2] h-[76px] rounded",children:[v.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#E7A015]",children:r??0}),v.jsx("div",{className:"!text-[12px] leading-[16px] text-[#E7A015]",children:"In-progress"})]}),v.jsxs("div",{className:"flex-1 py-3 bg-[#F7FEFA] h-[76px] rounded",children:[v.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#1FA05B]",children:i??0}),v.jsx("div",{className:"!text-[12px] leading-[16px] text-[#1FA05B]",children:"Closed"})]})]}),v.jsx("div",{className:"mt-4 space-y-2",children:t?.length?t?.map?.((o,a)=>{const s=o?.severity==="Danger"?"text-[#AB0000]":o?.severity==="High"?"text-[#E7A015]":"text-[#1FA05B]";return v.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#FAFBFD] rounded-md",children:[v.jsx("div",{className:"flex items-center gap-[8px]",children:v.jsx("div",{className:"text-gray-700 font-medium",children:o?.incident_code??"-"})}),v.jsx("div",{className:`!text-[12px] font-semibold flex items-center gap-[4px] ${s}`,children:v.jsxs("div",{children:[o?.severity_level??"-"," - ",o?.severity??"-"]})})]},a)}):v.jsx("div",{className:"text-center text-gray-400 text-sm py-6",children:"No incidents found"})})]})})}function jue({staffPresentAbsent:e,staffPresentByRole:t}){const n=e?.[0]?.total_staff??0,r=e?.[0]?.absent_staff??0,i=(n??0)-(r??0);return v.jsx(mn,{title:"Staff Attendance",className:"h-[362px]",titleWeight:"semi-bold",children:v.jsxs("div",{children:[v.jsxs("div",{className:"flex gap-[24px] text-center",children:[v.jsxs("div",{className:"flex-1 py-3 bg-[#F7FEFA] rounded h-[76px]",children:[v.jsx("div",{className:"text-[24px] font-medium text-[#1FA05B]",children:i??0}),v.jsx("div",{className:"text-[12px] text-[#1FA05B]",children:"Present"})]}),v.jsxs("div",{className:"flex-1 py-3 bg-[#FBF4F4] rounded h-[76px]",children:[v.jsx("div",{className:"text-[24px] font-medium text-[#AB0000]",children:r??0}),v.jsx("div",{className:"text-[12px] text-[#AB0000]",children:"Absent"})]})]}),v.jsx("div",{className:"mt-4 space-y-2 overflow-y-auto max-h-[200px]",children:t?.length?t?.map?.((o,a)=>{const s=Number(o?.total_staff??0),l=Number(o?.present_staff??0);return v.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#FAFBFD] rounded-md",children:[v.jsx("div",{className:"text-[#121212] text-[14px] leading-[18px] font-medium",children:o?.staff_role_name??"-"}),v.jsxs("div",{className:"text-[14px] leading-[20px] text-[#64748B]",children:[l??0,"/",s??0]})]},a)}):v.jsx("div",{className:"text-center text-[16px] text-gray-400 text-sm py-6",children:"No staff data"})})]})})}function Iue(e){return Xe({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M116,132V96a12,12,0,0,1,24,0v36a12,12,0,0,1-24,0Zm12,56a16,16,0,1,0-16-16A16,16,0,0,0,128,188ZM228,56v56c0,54.29-26.32,87.22-48.4,105.29-23.71,19.39-47.44,26-48.44,26.29a12.1,12.1,0,0,1-6.32,0c-1-.28-24.73-6.9-48.44-26.29C54.32,199.22,28,166.29,28,112V56A20,20,0,0,1,48,36H208A20,20,0,0,1,228,56Zm-24,4H52v52c0,35.71,13.09,64.69,38.91,86.15A126.14,126.14,0,0,0,128,219.38a126.28,126.28,0,0,0,37.09-21.23C190.91,176.69,204,147.71,204,112Z"},child:[]}]})(e)}function Rue({title:e,value:t,delta:n,deltaLabel:r,positive:i=!0,Icon:o=Hl,iconColor:a="text-emerald-600",iconBg:s="bg-emerald-50"}){return v.jsxs(je,{title:e,icon:v.jsx("div",{className:"h-6 w-6 grid place-items-center",children:v.jsx(o,{className:`h-6 w-6 ${a}`})}),children:[v.jsx("div",{className:"text-4xl font-semibold tracking-tight text-[#121212]",children:t}),v.jsxs("div",{className:"flex items-center gap-[8px] text-[14px]",children:[v.jsx("div",{className:i?"text-emerald-600 font-medium":"text-rose-600 font-medium",children:n}),v.jsx("div",{className:"text-slate-500",children:r})]})]})}function Lue(){const e=[{title:"Total Visitors",value:160,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:dg,iconColor:"text-[#329DFF]"},{title:"Active Incidents",value:73,delta:"+2.0%",deltaLabel:"Compared to last month",positive:!0,Icon:Vie,iconColor:"text-[#F69E0A]"},{title:"Missed Patrols",value:3,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:Iue,iconColor:"text-[#AB0000]"},{title:"Parking Usage",value:5,delta:"-8.0%",deltaLabel:"Compared to last month",positive:!1,Icon:l3,iconColor:"text-[#36AB6C]"}];return v.jsx("div",{className:"px-5 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-[24px]",children:e.map((t,n)=>v.jsx(Rue,{...t},n))})}const Fue=[{title:"Maintenance",total:12,pending:3},{title:"Security",total:8,pending:1},{title:"Housekeeping",total:6,pending:2},{title:"Utilities",total:10,pending:4}],$ue=(e="")=>e.replace(/</g,"<").replace(/>/g,">").replace(/<[^>]*>/g,"").trim();function Bue({data:e}){const t=Array.isArray(e?.complaints_by_category)&&e.complaints_by_category.length>0?e.complaints_by_category.map(n=>({title:$ue(n.category_name)||"—",total:n.total||0,pending:n.pending||0})):Fue;return v.jsx(je,{title:"Complaints",className:"h-[362px]",titleWeight:"semi-bold",titleClassName:"!text-[20px] !leading-[24px]",children:v.jsx("div",{className:"flex flex-col gap-[12px]",children:t.map((n,r)=>v.jsxs("div",{className:"flex items-center justify-between bg-[#F9FAFB] rounded-lg p-3 h-[62px]",children:[v.jsxs("div",{className:"flex flex-col",children:[v.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-[#121212] capitalize",children:n.title}),v.jsxs("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:["Total: ",n.total]})]}),v.jsxs("div",{className:"flex flex-col items-end",children:[v.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-red-700",children:String(n.pending).padStart(2,"0")}),v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Pending"})]})]},r))})})}const Wue=e=>{const t={0:"𝟎",1:"𝟏",2:"𝟐",3:"𝟑",4:"𝟒",5:"𝟓",6:"𝟔",7:"𝟕",8:"𝟖",9:"𝟗"};return String(e).split("").map(n=>t[n]||n).join("")},zue=[{level:"Level 1",open_count:3,in_progress_count:4,closed_count:5,total:12},{level:"Level 2",open_count:1,in_progress_count:1,closed_count:1,total:3},{level:"Level 3",open_count:5,in_progress_count:2,closed_count:3,total:10}],Vue=({active:e,payload:t,label:n})=>{if(!e||!t)return null;const r=[{key:"open_count",label:"Open",color:"#EF4444"},{key:"in_progress_count",label:"In Progress",color:"#F59D0D"},{key:"closed_count",label:"Closed",color:"#12B981"}];return v.jsxs("div",{style:{backgroundColor:"#0B0B0B",padding:"14px 40px 14px 18px",borderRadius:"10px",color:"#ffffff"},children:[v.jsx("div",{style:{color:"#ffffff",fontSize:"12px",fontWeight:"900",marginBottom:"10px"},children:n}),r.map((i,o)=>{const a=t[0]?.payload[i.key]||0,s=Wue(a);return v.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:o<r.length-1?"8px":"0",fontSize:"12px"},children:[v.jsx("div",{style:{width:"8px",height:"8px",backgroundColor:i.color,transform:"rotate(45deg)",marginRight:"8px"}}),v.jsx("span",{style:{color:"D1D3D4",minWidth:"100px"},children:i.label}),v.jsx("span",{style:{marginLeft:"auto",fontWeight:"700"},children:s})]},i.key)})]})},Hue=()=>{const e=[{label:"Open",color:"#EF4444"},{label:"In Progress",color:"#F59D0D"},{label:"Closed",color:"#12B981"}];return v.jsx("div",{style:{display:"flex",justifyContent:"space-between",gap:"15px"},children:e.map(t=>v.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[v.jsx("div",{style:{width:"6px",height:"6px",backgroundColor:t.color,transform:"rotate(45deg)"}}),v.jsx("span",{style:{fontSize:"14px"},children:t.label})]},t.label))})},Yue=({data:e})=>{const t=k.useMemo(()=>(Array.isArray(e?.complaints_by_level)&&e.complaints_by_level.some(l=>Number(l.total)>0)?e.complaints_by_level:zue).map(l=>({level:l.level||"—",open_count:Number(l.open_count)||0,in_progress_count:Number(l.in_progress_count)||0,closed_count:Number(l.closed_count)||0,total:Number(l.total)||0})),[e]),n=k.useMemo(()=>Math.max(...t.map(a=>a.total),5),[t]),r=Math.ceil(n*1.2),i=6,o=Math.max(Math.ceil(n/i),1);return v.jsxs(je,{title:"Complaints by Level",className:"w-full h-[362px]",titleWeight:"semi-bold",titleClassName:"!text-[20px] !leading-[24px]",children:[v.jsx(It,{width:"100%",height:"85%",children:v.jsxs(Zo,{data:t,margin:{top:5,right:-25,left:-30,bottom:5},children:[v.jsx(Rr,{strokeDasharray:"0",vertical:!1}),v.jsx(vr,{dataKey:"level"}),v.jsx(Gn,{domain:[0,r],ticks:Array.from({length:i+1},(a,s)=>s*o)}),v.jsx(nn,{content:v.jsx(Vue,{}),cursor:!1}),v.jsx(Ln,{dataKey:"open_count",stackId:"a",fill:"#EF4444",barSize:44,radius:[0,0,0,0]}),v.jsx(Ln,{dataKey:"in_progress_count",stackId:"a",fill:"#F59D0D",barSize:44,radius:[0,0,0,0]}),v.jsx(Ln,{dataKey:"closed_count",stackId:"a",fill:"#12B981",barSize:44,radius:[0,0,0,0]})]})}),v.jsx(Hue,{})]})},Uue=[{title:"Maintenance",total:18,pending:4},{title:"Security",total:11,pending:2},{title:"Housekeeping",total:9,pending:3},{title:"Utilities",total:14,pending:5}];function Kue({data:e}){const t=Array.isArray(e?.request_box_by_type)&&e.request_box_by_type.length>0?e.request_box_by_type.map(n=>({title:n.category_name||"—",total:Number(n.total)||0,pending:Number(n.pending)||0})):Uue;return v.jsx(je,{title:"Request Box",className:"h-[362px]",titleWeight:"semi-bold",titleClassName:"!text-[20px] !leading-[24px]",children:v.jsx("div",{className:"flex flex-col gap-[12px]",children:t.map((n,r)=>v.jsxs("div",{className:"flex items-center justify-between bg-[#F9FAFB] rounded-lg p-3 h-[62px]",children:[v.jsxs("div",{className:"flex flex-col",children:[v.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-[#121212] capitalize",children:n.title}),v.jsxs("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:["Total: ",n.total]})]}),v.jsxs("div",{className:"flex flex-col items-end",children:[v.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-red-700",children:String(n.pending).padStart(2,"0")}),v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Pending"})]})]},`${n.title}-${r}`))})})}function que(e){return Xe({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinejoin:"round",strokeWidth:"32",d:"M416 221.25V416a48 48 0 0 1-48 48H144a48 48 0 0 1-48-48V96a48 48 0 0 1 48-48h98.75a32 32 0 0 1 22.62 9.37l141.26 141.26a32 32 0 0 1 9.37 22.62z"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M256 56v120a32 32 0 0 0 32 32h120m-232 80h160m-160 80h160"},child:[]}]})(e)}const Gue=["open_complaints","pending_requests","avg_response_time","resolution_rate"],Xue={open_complaints:{title:"Open Complaints",Icon:PS,iconColor:"#AB0000",deltaLabel:"Compared to last month"},pending_requests:{title:"Pending Requests",Icon:que,iconColor:"#E7A015",deltaLabel:"Compared to last month"},avg_response_time:{title:"Avg Response Time",Icon:v3,iconColor:"#1FA05B",deltaLabel:"Compared to last month"},resolution_rate:{title:"Resolution Rate",Icon:p3,iconColor:"#329DFF",deltaLabel:"Compared to last month"}},Que=({children:e,size:t=28,lineHeight:n=32,weight:r=500,color:i="#121212"})=>v.jsx("div",{style:{fontWeight:r,fontSize:`${t}px`,lineHeight:`${n}px`,color:i},children:e}),Zue={primary:{size:28,lineHeight:32,weight:500}},Jue={open_complaints:{current:24,trend_percent:"-8%",direction:"bad"},pending_requests:{current:17,trend_percent:"-5%",direction:"bad"},avg_response_time:{current:"2.4 h",trend_percent:"+6%",direction:"good"},resolution_rate:{current:"89%",trend_percent:"+4%",direction:"good"}};function ede({id:e,data:t}){return e&&t&&!t[e]&&t.current!==void 0?v.jsx(II,{id:e,data:t}):v.jsx("div",{className:"px-5 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:Gue.map(n=>v.jsx(II,{id:n},n))})}function II({id:e,data:t}){const n=Xue[e];if(!n)return null;const r=(d,f)=>f==null?"—":d==="avg_response_time"?typeof f=="number"?`${f} h`:f:d==="resolution_rate"&&typeof f=="number"?`${f}%`:f,{title:i,Icon:o=Hl,iconColor:a,deltaLabel:s}=n,l=t&&Object.keys(t).length>0?t:Jue[e],c=r(e,l?.current),u=l?.trend_percent??"—";return l?.direction==="good"||l?.direction,v.jsx("div",{className:"h-[132px]",children:v.jsxs(je,{title:i,titleColor:a,icon:v.jsx("div",{className:"h-[20px] w-[20px] flex items-center justify-center",children:v.jsx(o,{className:"h-[20px] w-[20px]",style:{color:a}})}),childrenClassName:"!space-y-[12px]",iconClassName:"!gap-[12px]",children:[v.jsx(Que,{...Zue.primary,children:c}),v.jsxs("div",{className:"flex items-center gap-[8px] text-[12px] leading-[16px]",children:[v.jsx(fg,{value:u}),v.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:s})]})]})})}function RI({title:e,date:t,rsvp:n,utilisation:r,status:i}){return v.jsxs("div",{className:" bg-[#F8FAFC] h-[106px] px-3 mt-3",children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsx("div",{className:"text-[16px] leading-[20px] font-semibold text-[#121212]",children:e}),v.jsx("div",{className:`!text-[12px] font-medium leading-[16px] px-2 py-1 ${i==="Completed"?"text-[#36AB6C] bg-[#E6F7EE]":i==="Upcoming"?"text-[#329DFF] bg-[#E6F2FF]":"text-slate-500 bg-slate-100"}`,children:i})]}),v.jsx("div",{className:"text-[14px] leading-[18px] text-[#64748B]",children:t}),v.jsxs("div",{className:"flex justify-between items-center mt-2",children:[v.jsxs("div",{className:"text-[14px] leading-[18px] text-[#64748B]",children:[n," RSVP"]}),v.jsxs("div",{className:"text-[#3C82F6] text-[14px] leading-[18px] font-medium",children:[r,"% utilisation"]})]}),v.jsx("div",{className:"w-full bg-[#F8FAFC] h-[6px] rounded mt-2 mb-3",children:v.jsx("div",{className:"h-[6px] rounded bg-[#3C82F6]",style:{width:`${r}%`}})})]})}function tde(){return v.jsx(je,{title:"Events Utilisation",period:v.jsx(Sr,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"w-full h-[360px]",children:v.jsxs("div",{children:[v.jsx(RI,{title:"Holi Celebration",date:"25 Jun 2025",rsvp:"78/100",utilisation:71,status:"Upcoming"}),v.jsx(RI,{title:"Maintenance Meeting",date:"25 Jun 2025",rsvp:"45/60",utilisation:75,status:"Completed"})]})})}function qh({label:e,value:t,subLabel:n,bgColor:r,textColor:i}){return v.jsxs("div",{className:`rounded-lg p-4 ${r} h-[124px]`,children:[v.jsx("div",{className:`text-[16px] font-medium ${i} leading-[20px]`,children:e}),v.jsx("div",{className:"mt-4 text-[28px] leading-[32px] font-semibold text-[#121212]",children:t}),v.jsx("div",{className:"!text-[12px] leading-[16px] text-[#64748B] mt-2",children:n})]})}function nde(){return v.jsx(je,{title:"Notice Board Status",period:v.jsx(Sr,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"w-full h-[360px]",children:v.jsxs("div",{className:"grid grid-cols-2 gap-[16px]",children:[v.jsx(qh,{label:"Active",value:138,subLabel:"3 expiring soon",bgColor:"bg-[#F0FFF7]",textColor:"text-[#1FA05B]"}),v.jsx(qh,{label:"Scheduled",value:13,subLabel:"4 this week",bgColor:"bg-[#FFFBF2]",textColor:"text-[#E7A015]"}),v.jsx(qh,{label:"Recurring",value:3,subLabel:"All active",bgColor:"bg-[#EDF6FF]",textColor:"text-[#329DFF]"}),v.jsx(qh,{label:"Expired",value:7,subLabel:"4 recent",bgColor:"bg-[#F6F6F6]",textColor:"text-[#64748B]"})]})})}function LI(e){return Xe({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M20 22H4C3.44772 22 3 21.5523 3 21V3C3 2.44772 3.44772 2 4 2H20C20.5523 2 21 2.44772 21 3V21C21 21.5523 20.5523 22 20 22ZM19 20V4H5V20H19ZM8 9H16V11H8V9ZM8 13H16V15H8V13Z"},child:[]}]})(e)}function rde({title:e,value:t,delta:n,deltaLabel:r,positive:i=!0,Icon:o=Hl,iconColor:a="text-emerald-600",iconBg:s="bg-emerald-50"}){return v.jsx(je,{title:e,icon:v.jsx("div",{className:`h-6 w-6 grid place-items-center rounded-md ${s}`,children:v.jsx(o,{className:`h-4 w-4 ${a}`})}),className:"h-[132px]",children:v.jsxs("div",{children:[v.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t}),v.jsxs("div",{className:"flex items-center gap-[8px] pt-[8px] !text-[12px] leading-[16px]",children:[v.jsx("div",{className:i?"text-[#1FA05B] font-medium":"text-rose-600 font-medium",children:n}),v.jsx("div",{className:"text-[#64748B]",children:r})]})]})})}function ide({data:e}){const t=[{title:e?.title||"Total Bookings",value:145,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:LI,iconColor:"text-emerald-600",iconBg:"bg-emerald-50"}];return v.jsx("div",{className:"h-full",children:t.map((n,r)=>v.jsx(rde,{...n},r))})}function ode(e){return Xe({attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01"},child:[]}]})(e)}function ade({title:e,value:t,delta:n,deltaLabel:r,positive:i=!0,Icon:o=Hl,iconColor:a="text-emerald-600",iconBg:s="bg-emerald-50"}){return v.jsx(je,{title:e,icon:v.jsx("div",{className:`h-6 w-6 grid place-items-center rounded-md ${s}`,children:v.jsx(o,{className:`h-4 w-4 ${a}`})}),className:"h-[132px]",children:v.jsxs("div",{children:[v.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t}),v.jsxs("div",{className:"flex items-center gap-[8px] pt-[8px] !text-[12px] leading-[16px]",children:[v.jsx("div",{className:i?"text-[#1FA05B] font-medium":"text-rose-600 font-medium",children:n}),v.jsx("div",{className:"text-[#64748B]",children:r})]})]})})}function sde(){const e=[{title:"Notice",value:160,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:LI,iconColor:"text-emerald-600",iconBg:"bg-emerald-50"},{title:"Post",value:83,delta:"+2.0%",deltaLabel:"Compared to last month",positive:!0,Icon:c3,iconColor:"text-[#329DFF]",iconBg:"bg-emerald-50"},{title:"Poll",value:3,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:Wie,iconColor:"text-[#FA7E28]",iconBg:"bg-orange-100"},{title:"Poll",value:5,delta:"-8.0%",deltaLabel:"Compared to last month",positive:!1,Icon:ode,iconColor:"text-[#DBB467]",iconBg:"bg-yellow-100"}];return v.jsx("div",{className:"px-5 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-[24px]",children:e.map((t,n)=>v.jsx(ade,{...t},n))})}const FI=({value:e=0,total:t=1,colorClass:n="",label:r=""})=>{const i=Number(e)||0,o=Number(t)||1,a=Math.max(0,Math.min(100,i/o*100)),s=n==="bg-[#8B5CF6]"?"text-[#8B5CF6]":n==="bg-[#12B981]"?"text-[#12B981]":"text-slate-600";return v.jsxs("div",{className:"flex flex-col items-start",children:[v.jsx("div",{className:"w-2/3 min-w-[80px] h-5 rounded-full overflow-hidden",children:v.jsx("div",{className:`h-[11px] rounded-full ${n||""}`,style:{width:n==="bg-[#12B981]"?`${a+45}%`:`${a}%`}})}),v.jsx("div",{className:`${s} !text-[12px] font-bold mt-1`,children:i??0}),v.jsx("div",{className:"!text-[12px] leading-[16px] text-[#64748B] mt-1",children:r??""})]})},lde=({data:e,occupiedUnits:t=9e3,EmployeesCount:n=8910,AdminsCount:r=90})=>{const i=e?.total_occupants!==void 0&&e?.total_occupants!==null?Number(e?.total_occupants)||0:Number(t)||0,o=e?.total_members!==void 0&&e?.total_members!==null?Number(e?.total_members)||0:Number(n)||0,a=e?.total_admins!==void 0&&e?.total_admins!==null?Number(e?.total_admins)||0:Number(r)||0,s=(o||0)+(a||0);return v.jsx("div",{children:v.jsxs("div",{className:"bg-white !border-[0.5px] !border-[#EBEBEB] rounded-xl shadow-[0_0_12px_0_#EAF2FF] p-4 h-[128px]",children:[v.jsxs("div",{className:"flex items-center gap-[12px] h-[20px]",style:{marginBottom:"24px"},children:[v.jsx(dg,{className:"!text-[20px] text-[#329DFF]"}),v.jsx("div",{className:"font-medium text-[#121212] text-[16px] leading-[20px]",children:"Occupancy Overview"})]}),v.jsxs("div",{className:"flex items-start justify-between",children:[v.jsxs("div",{children:[v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B] font-normal",children:"Total Occupants"}),v.jsx("div",{className:"flex items-center gap-1",children:v.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:i??0})})]}),v.jsxs("div",{className:"flex items-end gap-1",children:[v.jsx(FI,{value:o??0,total:s||1,colorClass:"bg-[#8B5CF6]",label:"Employees"}),v.jsx(FI,{value:a??0,total:s||1,colorClass:"bg-[#12B981]",label:"Admins"})]})]})]})})};Fn.register(Oo,Eo,El,Vr);const cde=()=>{const t={labels:["HP","Adobe","Anarock","Swiggy","Infosys","Zepto"],datasets:[{data:[2e3,1700,1500,1200,900,800],backgroundColor:["#329DFF","#EF4645","#8A2E64","#F69E0A","#A2BB40","#8B5CF6"],barThickness:34}]},n={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{backgroundColor:"#0F172A",titleColor:"#fff",bodyColor:"#fff",displayColors:!1,callbacks:{label:r=>`Employees: ${r.parsed.y}`}}},scales:{x:{grid:{display:!1},ticks:{color:"#64748B",font:{size:12}}},y:{beginAtZero:!0,min:0,max:2e3,ticks:{stepSize:500,color:"#64748B",callback:r=>r},grid:{display:!1,color:"#E5E7EB",borderDash:[4,4],drawBorder:!1}}}};return v.jsxs(je,{className:"w-full h-[238px]",title:"Employee Footfall (Static Data)",period:"Today",icon:v.jsx(Eue,{className:"!text-[24px] text-[#8B5CF6]"}),children:[v.jsxs("div",{style:{marginBottom:"16px",marginTop:"8px"},children:[v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Employees Inside"}),v.jsx("div",{className:"text-[20px] leading-[24px] font-medium text-[#1FA05B]",children:"7,500"})]}),v.jsx("div",{className:"h-[110px]",children:v.jsx(Pl,{data:t,options:n})})]})};function ude(){return v.jsx(je,{className:"h-[324px]",title:"Food & Beverages (Static Data)",period:"Today",icon:v.jsx(b5,{className:"!text-[24px] text-[#FA7E28]"}),children:v.jsxs("div",{className:"flex flex-col h-full",children:[v.jsxs("div",{className:"grid grid-cols-2 gap-6 mb-6",children:[v.jsxs("div",{children:[v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Total Orders"}),v.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#8B5CF6]",children:247})]}),v.jsxs("div",{children:[v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Revenue Generated"}),v.jsxs("div",{className:"text-[28px] leading-[32px] font-medium text-[#329DFF]",children:["₹ ","82K"]}),v.jsxs("div",{className:"inline-flex items-center gap-1 mt-2 text-[10px] leading-[14px] px-2 py-1 rounded-full text-[#1FA05B] bg-green-50",children:[v.jsx(oc,{}),8,"%",v.jsx("span",{children:"from last month"})]})]})]}),v.jsxs("div",{className:"mt-[16px]",children:[v.jsxs("div",{className:"mb-[16px]",children:[v.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[v.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:"HP"}),v.jsxs("div",{className:"font-medium text-[12px] leading-[16px] flex items-center",children:[v.jsx("div",{className:"text-[#64748B] inline-block",children:"120 orders"}),v.jsx("div",{className:"mx-2 text-[#121212] inline-block",children:"₹ 45K"})]})]}),v.jsx("div",{className:"h-[11px] bg-gray-100 rounded-full",children:v.jsx("div",{className:"h-[11px] bg-blue-500 rounded-full",style:{width:"70%"}})})]}),v.jsxs("div",{className:"mb-[16px]",children:[v.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[v.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:"Adobe"}),v.jsxs("div",{className:"font-medium text-[12px] leading-[16px] flex items-center",children:[v.jsx("div",{className:"text-[#64748B] inline-block",children:"85 orders"}),v.jsx("div",{className:"mx-2 text-[#121212] inline-block",children:"₹ 23K"})]})]}),v.jsx("div",{className:"h-[11px] bg-gray-100 rounded-full",children:v.jsx("div",{className:"h-[11px] bg-red-500 rounded-full",style:{width:"50%"}})})]}),v.jsxs("div",{className:"mb-[16px]",children:[v.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[v.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:"Anarock"}),v.jsxs("div",{className:"font-medium text-[12px] leading-[16px] flex items-center",children:[v.jsx("div",{className:"text-[#64748B] inline-block",children:"42 orders"}),v.jsx("div",{className:"mx-2 text-[#121212] inline-block",children:"₹ 14K"})]})]}),v.jsx("div",{className:"h-[11px] bg-gray-100 rounded-full",children:v.jsx("div",{className:"h-[11px] bg-purple-700 rounded-full",style:{width:"25%"}})})]})]})]})})}function dde({data:e}){const t=e?.amenity_summary?{amenitySummary:{totalBookings:e?.amenity_summary?.total_bookings??0,todayPaidRevenue:e?.amenity_summary?.today_paid_revenue??"0.00",growthPercentage:e?.amenity_summary?.growth_percentage??null,currencyType:e?.amenity_summary?.currency_type??"₹"},chartData:Array.isArray(e?.chart_data)?e.chart_data.map(f=>({facility_name:f?.facility_name,total_bookings:f?.total_bookings??0,paid_revenue:f?.paid_revenue??"0",isPaid:f?.is_paid===!0})):[]}:e||{},n=t?.amenitySummary||{},i=(Array.isArray(t?.chartData)?t.chartData:[]).map(f=>({...f,isPaid:f?.isPaid===!0})),o=i.length>0&&i.every(f=>f?.isPaid===!1),a=n?.totalBookings||0,s=i.reduce((f,p)=>{const m=p?.total_bookings||0;return f+m},0),l=i.map(f=>{const p=f?.total_bookings||0,m=f?.isPaid?`${n?.currencyType||"₹"} ${f?.paid_revenue||"0.00"}`:"",h=s>0?Math.round(p/s*100):0;return{name:f?.facility_name||"Unknown",bookings:p,revenue:m,percentage:h,color:f?.isPaid?"bg-violet-500":"bg-slate-400",isPaid:f?.isPaid}}),c=n?.growthPercentage;let u=null;if(typeof c=="number")u=c;else if(typeof c=="string"){const f=c.replace("%","").trim(),p=Number(f);u=isNaN(p)?null:p}const d=u!==null?u>=0:!0;return v.jsx(je,{className:"h-[324px]",title:"Amenities",period:"Today",icon:v.jsx(Aue,{className:"!text-[24px] text-[#8B5CF6]"}),children:v.jsxs("div",{className:"flex flex-col h-full",children:[v.jsxs("div",{className:"grid grid-cols-2 gap-6 mb-6",children:[v.jsxs("div",{children:[v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Total Bookings"}),v.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#8B5CF6]",children:a})]}),!o&&v.jsxs("div",{children:[v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Revenue Generated"}),v.jsxs("div",{className:"text-[28px] leading-[32px] font-medium text-[#329DFF]",children:[n?.currencyType||"₹"," ",n?.todayPaidRevenue??"0.00"]}),u!==null&&v.jsxs("div",{className:`inline-flex items-center gap-1 mt-2 text-[10px] leading-[14px] px-2 py-1 rounded-full ${d?"text-[#1FA05B] bg-green-50":"text-red-600 bg-red-50"}`,children:[d?v.jsx(oc,{}):v.jsx(rf,{}),u,"%",v.jsx("span",{children:"from last month"})]})]})]}),v.jsx("div",{className:"mt-[16px]",children:l.length>0?l.map((f,p)=>v.jsxs("div",{className:"mb-[16px]",children:[v.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[v.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:f?.name}),v.jsxs("div",{className:"font-medium text-[12px] leading-[16px]",children:[v.jsxs("div",{className:"text-[#64748B] inline",children:[f?.bookings," ",f?.bookings<=1?"booking":"bookings"]}),f?.isPaid&&v.jsx("div",{className:"mx-2 text-[#121212] inline",children:f?.revenue})]})]}),v.jsx("div",{className:"h-[11px] bg-gray-100 rounded-full",children:v.jsx("div",{className:`h-[11px] rounded-full ${f?.color}`,style:{width:`${f?.percentage}%`}})})]},p)):v.jsx("div",{className:"flex items-center justify-center h-[120px]",children:v.jsx("div",{className:"text-[12px] text-[#94A3B8]",children:"No amenity usage data available"})})})]})})}Fn.register(Oo,Eo,El,Vr,ei);function fde({data:e=[]}){const t=[{level:"L1",open:55,in_progress:22,on_hold:15,closed:6},{level:"L2",open:45,in_progress:25,on_hold:18,closed:5},{level:"L3",open:58,in_progress:23,on_hold:14,closed:6}],n=e.length>0?e:t,r=[],i=[],o=[],a=[],s=[];for(let u=0;u<n.length;u++)r.push(n[u].level),i.push(Number(n[u].open)),o.push(Number(n[u].in_progress)),a.push(Number(n[u].on_hold)),s.push(Number(n[u].cancelled));const l={labels:r,datasets:[{label:"Open",data:i,backgroundColor:"#3B82F6",borderColor:"#FFFFFF",borderWidth:2,barThickness:38,stack:"tickets"},{label:"In Progress",data:o,backgroundColor:"#F59E0B",borderColor:"#FFFFFF",borderWidth:2,barThickness:38,stack:"tickets"},{label:"On-Hold",data:a,backgroundColor:"#64748B",borderColor:"#FFFFFF",borderWidth:2,barThickness:38,stack:"tickets"},{label:"Cancelled",data:s,backgroundColor:"#FB2C36",borderColor:"#FFFFFF",borderWidth:2,barThickness:38,stack:"tickets"}]},c={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,pointStyle:"rectRot",padding:20,color:"#64748B"}},tooltip:{backgroundColor:"#0F172A",titleColor:"#fff",bodyColor:"#fff"}},scales:{x:{stacked:!0,grid:{display:!1},ticks:{color:"#64748B"}},y:{stacked:!0,beginAtZero:!0,grid:{display:!1,color:"#E5E7EB",borderDash:[4,4],drawBorder:!1},ticks:{color:"#64748B",stepSize:1,precision:0,callback:u=>Math.round(u)}}}};return v.jsx(je,{className:"h-[267px]",title:"Ticket Escalation Levels",period:"Today",icon:v.jsx(h3,{className:"!text-[24px] text-[#3C81F6]"}),children:v.jsx("div",{className:"h-full",children:v.jsx(Pl,{data:l,options:c})})})}const pde=({active:e,payload:t})=>{if(!e||!t||!t.length)return null;const n=t[0],r=n.payload.color;return v.jsx("div",{style:{backgroundColor:"#000000",color:"#ffffff",padding:"8px 10px",borderRadius:"8px",fontSize:"12px"},children:v.jsxs("div",{className:"flex items-center gap-2 font-medium",children:[v.jsx("div",{style:{width:"8px",height:"8px",borderRadius:"50%",backgroundColor:r}}),v.jsx("div",{children:n.name}),v.jsx("div",{className:"ml-2",children:n.value})]})})};function hde({data:e=null}){const n=e||{open:12,on_hold:5,cancelled:3,completed:156,in_progress:8,total_complaints:184},r=a=>{const s=Number(a);return isNaN(s)?0:s},i=[{name:"Completed",value:r(n.completed),color:"#10B981"},{name:"Open",value:r(n.open),color:"#3B82F6"},{name:"In Progress",value:r(n.in_progress),color:"#F59E0B"},{name:"On Hold",value:r(n.on_hold),color:"#6B7280"},{name:"Cancelled",value:r(n.cancelled),color:"#EF4444"}],o=r(n.total_complaints);return v.jsx(je,{className:"h-[267px]",title:"Ticket Status",period:"Today",icon:v.jsx(cg,{className:"!text-[24px] text-[#EF4444]"}),children:v.jsxs("div",{className:"flex h-full items-center gap-4",children:[v.jsxs("div",{className:"w-[202px] h-[170px] relative",children:[v.jsx(It,{width:"100%",height:"100%",children:v.jsxs(ho,{children:[v.jsx(Oi,{data:i,innerRadius:55,outerRadius:85,dataKey:"value",stroke:"#FFFFFF",strokeWidth:2,children:i.map((a,s)=>v.jsx(Vt,{fill:a.color},s))}),v.jsx(nn,{content:v.jsx(pde,{}),wrapperStyle:{zIndex:1e3}})]})}),v.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[v.jsxs("div",{className:"flex items-baseline text-[18px] leading-[22px] font-medium text-[#121212]",children:[v.jsx("div",{children:r(n.completed)}),v.jsxs("div",{className:"text-[18.18px] leading-[22.22px] text-[#121212]",children:["/",o]})]}),v.jsx("div",{className:"text-[10.1px] leading-[14.14px] text-[#64748B]",children:"Completed"})]})]}),v.jsx("div",{className:"flex-1 space-y-2",children:i.map(a=>v.jsxs("div",{className:"flex items-center justify-between text-[12px] leading-[17px] mt-[12px]",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("div",{className:"h-[7px] w-[16px]",style:{backgroundColor:a.color}}),v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:a.name})]}),v.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px] font-medium",children:a.value})]},a.name))})]})})}const $I={visitorSummary:{totalVisitorsToday:150,peakTime:"2:00 - 4:00PM",peakCount:50,activeWalkins:18,preApprovedCheckins:3},popupData:{walkins:{currently_inside:18,total_visited_today:58},preApproved:{completed_visits:3,total_expected_today:5}},chart_data:[{hour:"10 AM",walkins:22,preApproved:30},{hour:"12 PM",walkins:15,preApproved:28},{hour:"2 PM",walkins:30,preApproved:38},{hour:"4 PM",walkins:45,preApproved:50},{hour:"6 PM",walkins:25,preApproved:40}]};function BI({title:e,color:t,rows:n=[],children:r}){const i=v.jsxs("div",{className:"bg-white rounded-xl min-w-[260px] p-4",children:[v.jsxs("div",{className:"flex items-center gap-2 font-medium text-[#121212]",children:[v.jsx(of,{className:`text-[20px] ${t}`}),v.jsx("div",{children:e??""})]}),v.jsx("div",{className:"mt-3 pt-3 border-t border-dashed border-gray-200 space-y-2",children:n?.map(({label:o,value:a,valueColor:s})=>v.jsxs("div",{className:"flex justify-between text-[14px]",children:[v.jsx("div",{children:o??""}),v.jsx("div",{className:"font-semibold",style:{color:s||"#121212"},children:a??0})]},o))})]});return v.jsx(wN,{content:i,placement:"right-start",interactive:!0,delay:[100,0],offset:[6,0],appendTo:()=>document.body,theme:"light-border",maxWidth:"none",children:r})}function mde({data:e}){const t=e&&Object.keys(e).length?e:$I,n=t?.visitor_summary?{totalVisitorsToday:t?.visitor_summary?.total_visitors_today??0,peakTime:t?.visitor_summary?.peak_time??"-"}:t?.visitorSummary??{},r=t?.walkins_popup_data?{walkins:{currently_inside:Number(t?.walkins_popup_data?.walkins_inside??0),total_visited_today:Number(t?.walkins_popup_data?.total_walkins??0)},preApproved:{completed_visits:Number(t?.pre_approved_popup_data?.pre_approved_check_ins??0),total_expected_today:Number(t?.pre_approved_popup_data?.total_pre_approved_check_ins??0)}}:t?.popupData??{},i=k.useMemo(()=>{const a=t?.chart_data??[];return a.length?a.map(s=>({time:s?.hour??"-",walkins:s?.walkins??0,approved:s?.pre_approved??s?.preApproved??0})):$I.chart_data},[t]),o=new Date().toLocaleTimeString("en-IN",{hour:"2-digit",minute:"2-digit",hour12:!0});return v.jsx(je,{className:"h-[377px]",title:"Visitor Updates",period:`Today at ${o}`,icon:v.jsx(of,{className:"!text-[24px] text-[#8B5CF6]"}),children:v.jsxs("div",{className:"flex flex-col mt-2",children:[v.jsxs("div",{className:"grid grid-cols-2 gap-y-4 gap-x-6 mb-6",children:[v.jsxs("div",{children:[v.jsx("div",{className:"text-[10px] text-[#64748B]",children:"Total Visitors"}),v.jsx("div",{className:"text-[20px] font-medium text-[#08B6D4]",children:n?.totalVisitorsToday??0})]}),v.jsxs("div",{children:[v.jsx("div",{className:"text-[10px] text-[#64748B]",children:"Peak Time"}),v.jsx("div",{className:"text-[20px] font-medium text-[#8B5CF6]",children:n?.peakTime??"-"})]}),v.jsxs("div",{className:"mt-2",children:[v.jsx("div",{className:"text-[10px] text-[#64748B]",children:"Active Walk-ins"}),v.jsxs("div",{className:"flex items-baseline text-xl font-medium leading-[32px]",children:[v.jsx("div",{className:"text-[28px] text-[#1FA05B] leading-[32px]",children:r?.walkins?.currently_inside??0}),v.jsx(BI,{title:"Active Walk-ins",color:"text-[#1FA05B]",rows:[{label:"Currently Inside",value:r?.walkins?.currently_inside??0,valueColor:"#1FA05B"},{label:"Total Visited Today",value:r?.walkins?.total_visited_today??0}],children:v.jsxs("div",{className:"text-[#64748B] cursor-pointer text-[20px] leading-[32px]",children:["/",r?.walkins?.total_visited_today??0]})})]})]}),v.jsxs("div",{className:"mt-2",children:[v.jsx("div",{className:"text-[10px] text-[#64748B]",children:"Pre-approved Check-ins"}),v.jsxs("div",{className:"flex items-baseline text-xl font-medium leading-[32px]",children:[v.jsx("div",{className:"text-[28px] text-[#E7A015] leading-[32px]",children:r?.preApproved?.completed_visits??0}),v.jsx(BI,{title:"Pre-approved Check-ins",color:"text-[#E7A015]",rows:[{label:"Completed Visits",value:r?.preApproved?.completed_visits??0,valueColor:"#E7A015"},{label:"Total Expected Check-ins Today",value:r?.preApproved?.total_expected_today??0}],children:v.jsxs("div",{className:"text-[#64748B] cursor-pointer text-[20px] leading-[32px]",children:["/",r?.preApproved?.total_expected_today??0]})})]})]})]}),v.jsx("div",{className:"w-full h-[179px]",children:v.jsx(It,{width:"100%",height:"100%",children:v.jsxs(R0,{data:i??[],children:[v.jsx(Rr,{stroke:"#E5E7EB",strokeDasharray:"4 4",vertical:!1}),v.jsx(vr,{dataKey:"time",axisLine:!1,tickLine:!1,tick:{fill:"#121212",fontSize:12}}),v.jsx(Gn,{width:30,axisLine:!1,tickLine:!1,tick:{fill:"#64748B",fontSize:12}}),v.jsx(nn,{}),v.jsx(Qo,{type:"monotone",dataKey:"walkins",stroke:"#22C55E",strokeWidth:2,dot:!1}),v.jsx(Qo,{type:"monotone",dataKey:"approved",stroke:"#F59E0B",strokeWidth:2,strokeDasharray:"5 5",dot:!1})]})})})]})})}const gde=({color:e})=>v.jsx("span",{style:{display:"inline-block",width:"8px",height:"8px",borderRadius:"50%",backgroundColor:e,marginRight:"6px"}}),vde=({active:e,payload:t})=>!e||!t||!t.length?null:v.jsx("div",{className:"bg-black text-white !text-[12px] px-3 py-2 rounded-lg shadow-lg",children:t.map((n,r)=>v.jsxs("div",{className:"capitalize flex gap-[4px] items-center leading-relaxed",children:[v.jsx(gde,{color:n.color}),n.name,": ",v.jsx("div",{className:"font-semibold",children:n.value})]},r))});function yde({data:e=null}){const n=e||{card_entry:60,mobile_entry:35,card_exit:15,mobile_exit:10,total:20.3},r=a=>{const s=Number(a);return isNaN(s)?0:s},i=[{name:"Card Entry",value:r(n.card_entry),color:"#329DFF"},{name:"Mobile Entry",value:r(n.mobile_entry),color:"#8B5CF6"},{name:"Card Exit",value:r(n.card_exit),color:"#B1D2F0"},{name:"Mobile Exit",value:r(n.mobile_exit),color:"#DACBFB"}],o=r(n.total);return v.jsx(mn,{className:"h-[362px]",title:"Access Overview",titleWeight:"semi-bold",children:v.jsxs("div",{className:"flex flex-col items-center mt-[16px]",children:[v.jsxs("div",{className:"relative w-[200px] h-[200px]",children:[v.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:v.jsx("div",{className:"w-[130px] h-[130px] rounded-full shadow-[0px_12px_35px_rgba(0,0,0,0.12)]"})}),v.jsx("div",{className:"h-[184px]",children:v.jsx(It,{width:"100%",height:"100%",children:v.jsxs(ho,{children:[v.jsx(Oi,{data:i,dataKey:"value",innerRadius:65,outerRadius:90,startAngle:110,endAngle:-250,paddingAngle:2,stroke:"transparent",children:i.map((a,s)=>v.jsx(Vt,{fill:a.color},s))}),v.jsx(nn,{content:v.jsx(vde,{}),wrapperStyle:{zIndex:9999}})]})})}),v.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[v.jsxs("div",{className:"text-[20px] leading-[24px] font-semibold text-[#121212]",children:[o,"L"]}),v.jsx("div",{className:"text-[10px] leading-[15px] text-[#64748B]",children:"Total Access"})]})]}),v.jsx("div",{className:"mt-[32px] grid grid-cols-2 gap-x-[20px] gap-y-[12px] text-[12px] text-[#94A3B8]",children:i.map(a=>v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("div",{className:"w-[16px] h-[7px] ",style:{backgroundColor:a.color}}),v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:a.name})]},a.name))})]})})}function WI({title:e="Access",data:t=[],height:n="h-[362px]"}){const r=i=>i==null?"0":Number(i).toLocaleString();return v.jsx(mn,{className:n,title:e,titleWeight:"semi-bold",children:v.jsxs("div",{className:"rounded-xl overflow-hidden mt-[16px]",children:[v.jsxs("div",{className:"grid grid-cols-2 bg-[#F8FAFC] py-[8px] px-[12px] text-[12px] leading-[16px] font-medium text-[#64748B]",children:[v.jsx("div",{children:"Point"}),v.jsx("div",{className:"text-right",children:"Access"})]}),t.map((i,o)=>v.jsxs("div",{className:"grid grid-cols-2 p-[12px] text-[14px] border-t border-[#E2E8F0]",children:[v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:i.label}),v.jsx("div",{className:"text-[12px] leading-[16px] text-right font-medium",style:{color:i.color||"#000"},children:r(i.value)})]},o))]})})}function bde({data:e=[]}){const t=[{name:"Google",value:82e3},{name:"Uber",value:67e3},{name:"ANAROCK",value:6e4},{name:"Flipkart",value:48e3},{name:"HP",value:41e3},{name:"Myntra",value:3e4},{name:"Cloudscape",value:2e4},{name:"Infosys",value:9e3}],n=e.length?e:t,r=o=>o>=1e3?`${o/1e3}K`:o,i=Math.max(...n.map(o=>o.value));return v.jsx(mn,{title:"Access Points Usage",titleWeight:"semi-bold",className:"h-[362px]",children:v.jsx("div",{className:"mt-[24px] h-[270px] w-full",children:v.jsx(It,{width:"100%",height:"100%",children:v.jsxs(Zo,{data:n,barSize:60,margin:{top:0,right:0,left:-20,bottom:0},children:[v.jsx(Rr,{strokeDasharray:"8 8",vertical:!1}),v.jsx(x0,{y:0,stroke:"#EBEBEB",strokeDasharray:"0"}),v.jsx(vr,{dataKey:"name",tick:{fontSize:12,fill:"#64748B"},axisLine:!1,tickLine:!1}),v.jsx(Gn,{tickFormatter:r,tick:{fontSize:12,fill:"#64748B"},axisLine:!1,tickLine:!1}),v.jsx(nn,{cursor:!1}),v.jsx(Ln,{dataKey:"value",barSize:60,children:n.map((o,a)=>v.jsx(Vt,{fill:o.value===i?"#3C81F6":"#79ABFF"},`cell-${a}`))})]})})})})}function Po({image:e="https://cdni.iconscout.com/illustration/premium/thumb/businessman-sad-for-no-data-in-folder-illustration-svg-download-png-10155562.png",title:t="No Data Available",description:n="Catch up all the data. Change the date range to see the data."}){return v.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center px-4",children:[v.jsx("img",{src:e,alt:"no data",className:"w-32 h-32 mb-4 opacity-80"}),v.jsx("h3",{className:"text-[16px] font-semibold text-gray-900 mb-1",children:t}),v.jsx("p",{className:"text-sm text-gray-500 max-w-[260px]",children:n})]})}const xde=({active:e,payload:t})=>e&&t&&t.length?v.jsx("div",{className:"bg-black text-white px-4 py-2 rounded-lg text-sm shadow-lg",children:v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("div",{children:t[0].payload.name}),v.jsx("div",{className:"font-semibold",children:t[0].value})]})}):null,wde=({x:e,y:t,payload:n})=>{const r=n.value.split(" ");return v.jsx("g",{transform:`translate(${e},${t})`,children:v.jsx("text",{x:-85,y:0,textAnchor:"start",fill:"#121212",fontSize:14,children:r.map((i,o)=>v.jsx("tspan",{x:-85,dy:o===0?0:16,children:i},o))})})};function _de({data:e=[]}){const t=e&&e.length>0,n=e.map(i=>({name:i.category_name,value:i.total_complaints})),r=Math.max(...n.map(i=>i.value),0);return v.jsx(mn,{title:"Tickets per Category",className:"h-[362px]",titleWeight:"semi-bold",childrenClassName:"h-full",children:t?v.jsx("div",{className:"w-full h-[280px] mt-[28px]",children:v.jsx(It,{width:"100%",height:"100%",children:v.jsxs(Zo,{data:n,layout:"vertical",children:[v.jsx(Rr,{strokeDasharray:"3 3",horizontal:!1}),v.jsx(vr,{type:"number",domain:[0,Math.ceil(r*1.2)||10],tick:{fill:"#94A3B8",fontSize:12},axisLine:!0,tickLine:!1,allowDecimals:!1}),v.jsx(Gn,{type:"category",dataKey:"name",axisLine:!1,tickLine:!1,width:120,tick:v.jsx(wde,{})}),v.jsx(nn,{content:v.jsx(xde,{}),cursor:{fill:"transparent"}}),v.jsx(Ln,{dataKey:"value",barSize:36,children:n.map((i,o)=>v.jsx(Vt,{fill:i.value===r?"#3C81F6":"#79ABFF"},`cell-${o}`))})]})})}):v.jsx(Po,{title:"No Tickets Found",description:"Catch up all the data. Change the date range to see the data."})})}function Sde({icon:e,iconColor:t="#329DFF",title:n,value:r,percentage:i,percentageText:o}){const a=parseFloat(i),s=a>=0,l=s?"#16A34A":"#DC2626";return v.jsxs("div",{className:"relative bg-white rounded-[12px] shadow-[0_0_12px_0_#EAF2FF] p-[16px]",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[e&&v.jsx("div",{className:"h-[20px] w-[20px]",style:{color:t,display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsx(e,{className:"h-[20px] w-[20px]"})}),v.jsx("div",{className:"text-[16px] leading-[20px] font-medium text-[#64748B]",children:n})]}),v.jsx("div",{className:"mt-[16px] text-[28px] leading-[32px] font-medium text-[#121212]",children:r}),(i||o)&&v.jsxs("div",{className:"mt-[12px] flex items-center gap-2",children:[i&&v.jsxs("div",{className:"flex items-center gap-[4px] text-[12px] leading-[16px] font-medium",style:{color:l},children:[s?v.jsx(oc,{}):v.jsx(rf,{}),Math.abs(a),"%"]}),o&&v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:o})]})]})}const Ode=({data:e=[],onDateChange:t})=>{const[n,r]=k.useState(new Date),[i,o]=k.useState(!1),s=(g=>{const b=new Date(g);return b.setDate(b.getDate()-6),b})(n),l=g=>{try{return g.toLocaleDateString("en-GB",{day:"2-digit",month:"short"})}catch{return""}},c=g=>{const b=new Date(g),S=new Date(b);S.setDate(S.getDate()-6),t&&t(S.toISOString(),b.toISOString())},u=()=>{const g=new Date(n);g.setDate(g.getDate()-7),r(g),c(g)},d=()=>{const g=new Date(n);g.setDate(g.getDate()+7),r(g),c(g)},f=()=>{o(g=>!g)},p=g=>{const b=g||new Date;r(b),c(b),o(!1)},m=Array.isArray(e)?e:[],h=!m.length||m.every(g=>g.no_of_visitors===0);return v.jsxs(mn,{title:"Weekly Visitor Pattern",period:`${l(s)} - ${l(n)}`,isDateSelector:!0,titleWeight:"semi-bold",className:"h-[360px]",childrenClassName:"mt-6",onPrevClick:u,onNextClick:d,onCalendarClick:f,children:[i&&v.jsx("div",{className:"absolute top-[70px] right-[24px] z-50 bg-white shadow-lg rounded-lg",children:v.jsx(bS,{selected:n,onChange:p,inline:!0})}),h?v.jsx("div",{className:"w-full h-[260px] flex items-center justify-center",children:v.jsx(Po,{title:"No Visitors Found",description:"Catch up all the data. Change the date range to see the data."})}):v.jsx("div",{className:"w-full h-[260px]",children:v.jsx(It,{width:"100%",height:"100%",children:v.jsxs(Yte,{data:m,margin:{top:10,right:10,left:0,bottom:0},children:[v.jsx("defs",{children:v.jsxs("linearGradient",{id:"colorVisitors",x1:"0",y1:"0",x2:"0",y2:"1",children:[v.jsx("stop",{offset:"0%",stopColor:"#6366F1",stopOpacity:.25}),v.jsx("stop",{offset:"100%",stopColor:"#6366F1",stopOpacity:0})]})}),v.jsx(Rr,{strokeDasharray:"3 3",vertical:!1,stroke:"#F1F5F9"}),v.jsx(vr,{dataKey:"day",type:"category",scale:"point",padding:{left:20,right:20},tick:{fontSize:12,fill:"#64748B"},axisLine:!0,tickLine:!1,tickFormatter:g=>new Date(g).toLocaleDateString("en-GB",{day:"2-digit",month:"short"})}),v.jsx(Gn,{width:35,tick:{fontSize:12,fill:"#64748B"},axisLine:!1,tickLine:!1,allowDecimals:!1,domain:[0,"dataMax + 2"]}),v.jsx(nn,{labelFormatter:g=>new Date(g).toLocaleDateString("en-GB",{day:"2-digit",month:"short"})}),v.jsx(lT,{type:"monotone",dataKey:"no_of_visitors",stroke:"#6366F1",strokeWidth:2,fill:"url(#colorVisitors)",dot:{r:5,stroke:"#6366F1",strokeWidth:2,fill:"#fff"},activeDot:{r:6}})]})})})]})},Ede=[{building_name:"Google",no_of_visitors:1e3},{building_name:"Uber",no_of_visitors:3500},{building_name:"ANAROCK",no_of_visitors:2e3},{building_name:"Flipkart",no_of_visitors:8e3},{building_name:"HP",no_of_visitors:1650}],Pde=({data:e})=>{const t=Array.isArray(e)&&e?.length===0,n=e==null?Ede:Array.isArray(e)?e:[];let r=0;for(let i=0;i<(n?.length||0);i++){const o=Number(n?.[i]?.no_of_visitors)||0;o>r&&(r=o)}return v.jsx(mn,{title:"Organisation Wise Visitors",titleWeight:"semi-bold",className:"h-[360px]",childrenClassName:"mt-6",children:v.jsx("div",{className:"w-full h-[260px] flex items-center justify-center",children:t?v.jsx(Po,{title:"No Visitors Found",description:"Catch up all the data. Change the date range to see the data."}):v.jsx(It,{width:"100%",height:"100%",children:v.jsxs(Zo,{data:n||[],margin:{top:10,right:10,left:0,bottom:0},barCategoryGap:35,children:[v.jsx(Rr,{strokeDasharray:"3 3",vertical:!1,stroke:"#F1F5F9"}),v.jsx(vr,{dataKey:"building_name",tick:{fontSize:12,fill:"#64748B"},axisLine:!0,tickLine:!1}),v.jsx(Gn,{width:40,tick:{fontSize:12,fill:"#64748B"},axisLine:!1,tickLine:!1,allowDecimals:!1}),v.jsx(nn,{cursor:!1}),v.jsx(Ln,{dataKey:"no_of_visitors",maxBarSize:55,children:n?.map?.((i,o)=>v.jsx(Vt,{fill:(i?.no_of_visitors||0)===r?"#3B82F6":"#7FB0FF"},`cell-${o}`))})]})})})})};function kde({data:e}){return v.jsx("div",{className:"h-full",children:e.map((t,n)=>{const r=parseFloat(t.delta),i=r>=0;return v.jsx(je,{iconClassName:"!gap-[8px]",title:v.jsx("div",{className:"text-[#64748B]",children:t.title}),icon:v.jsx(t.Icon,{className:"h-[20px] w-[20px]",style:{color:t.iconColor||"#000000"}}),className:"h-[132px]",children:v.jsxs("div",{children:[v.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t.value}),v.jsxs("div",{className:`flex items-center pt-[8px] text-[12px] leading-[16px] ${t.delta?"gap-[8px]":""}`,children:[t.delta&&v.jsxs("div",{className:"flex items-center gap-[4px]",style:{color:i?"#1FA05B":"#E11D48",fontWeight:500},children:[i?v.jsx(oc,{}):v.jsx(rf,{}),Math.abs(r),"%"]}),v.jsx("div",{style:{color:"#64748B"},children:t.deltaLabel})]})]})},n)})})}const Cde=[{facility_name:"Table Tennis",total_booking:5},{facility_name:"Gym",total_booking:12},{facility_name:"Meeting Room A",total_booking:3},{facility_name:"Conference Hall",total_booking:8}],Dde=({x:e,y:t,payload:n})=>v.jsx("foreignObject",{x:(e||0)-80,y:(t||0)-18,width:80,height:40,children:v.jsx("div",{className:"text-[12px] leading-[16px] text-[#121212]",style:{width:"80px",whiteSpace:"normal",wordBreak:"break-word",textAlign:"left"},children:n?.value||""})});function Ade({data:e}){const t=Array?.isArray(e)&&e?.length===0,n=e==null?Cde:Array?.isArray(e)?e:[],r=n?.length>0?Math.max(...n?.map?.(i=>i?.total_booking||0)||[0],0):0;return v.jsx(je,{title:"Bookings",icon:v.jsx(Due,{size:18,className:"text-[#DBB467]"}),className:"h-[288px]",children:v.jsx("div",{className:"w-full h-full flex items-center justify-center",children:t?v.jsx(Po,{title:"No Booking Found",description:"Catch up all the data. Change the date range to see the data."}):v.jsx(It,{width:"100%",height:"100%",children:v.jsxs(Zo,{data:n||[],layout:"vertical",margin:{top:0,right:10,left:10,bottom:0},children:[v.jsx(vr,{type:"number",allowDecimals:!1,domain:[0,Math.ceil(r||0)],tick:{fill:"#64748B",fontSize:12},axisLine:!0,tickLine:!1}),v.jsx(Gn,{type:"category",dataKey:"facility_name",axisLine:!1,tickLine:!1,width:100,tick:v.jsx(Dde,{})}),v.jsx(Ln,{dataKey:"total_booking",barSize:40,children:n?.map?.((i,o)=>v.jsx(Vt,{fill:(i?.total_booking||0)===r?"#3C81F6":"#79ABFF"},`cell-${o}`))})]})})})})}const Tde=[{building_name:"Google",no_of_booking:1},{building_name:"Uber",no_of_booking:2},{building_name:"ANAROCK",no_of_booking:4},{building_name:"Flipkart",no_of_booking:2},{building_name:"HP",no_of_booking:1}];function Mde({data:e}){const t=Array.isArray(e)&&e?.length===0,n=e==null?Tde:Array.isArray(e)?e:[],r=n?.length>0?Math.max(...n?.map?.(i=>i?.no_of_booking||0)||[0],0):0;return v.jsx(mn,{title:"Booking Trend by Organisation",titleWeight:"semi-bold",className:"h-[362px]",children:v.jsx("div",{className:"w-full h-[280px] flex items-center justify-center",children:t?v.jsx(Po,{title:"No Booking Found",description:"Catch up all the data. Change the date range to see the data."}):v.jsx(It,{width:"100%",height:"100%",children:v.jsxs(Zo,{data:n||[],margin:{top:0,right:0,left:-15,bottom:0},children:[v.jsx(Rr,{strokeDasharray:"3 3",vertical:!1,stroke:"#E5E7EB"}),v.jsx(vr,{dataKey:"building_name",axisLine:!1,tickLine:!1,tick:{fill:"#64748B",fontSize:12}}),v.jsx(Gn,{allowDecimals:!1,domain:[0,Math.ceil(r||0)],axisLine:!1,tickLine:!1,tick:{fill:"#64748B",fontSize:12},tickFormatter:i=>`₹ ${i??0}`}),v.jsx(Ln,{dataKey:"no_of_booking",barSize:54,children:n?.map?.((i,o)=>v.jsx(Vt,{fill:(i?.no_of_booking||0)===r?"#3C81F6":"#79ABFF"},`cell-${o}`))})]})})})})}const Nde=[{facility_name:"Table Tennis",paid_revenue:"24000.00"},{facility_name:"Games Room",paid_revenue:"14000.00"},{facility_name:"Badminton",paid_revenue:"10000.00"},{facility_name:"GYM",paid_revenue:"4000.00"}],Gh=["#3C81F6","#60A5FA","#95BFFA","#BEDAFE","#DAE6FC"];function jde({data:e}){const t=Array?.isArray(e)&&e?.length===0,n=e??Nde,r=Array?.isArray(n)&&n?.length>0?n?.map(s=>({name:s?.facility_name||"Unknown",value:Number(s?.paid_revenue)||0})):[],o=(r?.length>0?r?.every(s=>s?.value===0):!1)?r?.map((s,l)=>({...s,value:l===0?1:0})):r,a=s=>`₹ ${s?.toLocaleString?.("en-IN")||0}`;return v.jsx(mn,{title:"Amenity Wise Revenue",titleWeight:"semi-bold",className:"h-[362px]",children:v.jsx("div",{className:"grid grid-cols-12 gap-6 items-center h-full",children:t?v.jsx("div",{className:"col-span-12 flex items-center justify-center h-[240px]",children:v.jsx(Po,{title:"No Amenity Found",description:"Catch up all the data. Change the date range to see the data."})}):v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"col-span-5 h-[240px]",children:v.jsx(It,{width:"100%",height:"100%",children:v.jsxs(ho,{children:[v.jsx(Oi,{data:o||[],dataKey:"value",nameKey:"name",cx:"50%",cy:"50%",outerRadius:95,stroke:"#fff",strokeWidth:1,children:o?.map?.((s,l)=>v.jsx(Vt,{fill:Gh?.[l%Gh?.length]},`cell-${l}`))}),v.jsx(nn,{formatter:s=>a(s),labelFormatter:s=>`Amenity: ${s||""}`,contentStyle:{borderRadius:"10px",border:"1px solid #EBEBEB",fontSize:"12px"}})]})})}),v.jsx("div",{className:"col-span-7",children:v.jsxs("div",{className:"rounded-[12px] overflow-hidden",children:[v.jsxs("div",{className:"grid grid-cols-2 px-[12px] py-[8px] bg-[#EBEBEB] text-[12px] leading-[16px] font-semibold text-[#64748B]",children:[v.jsx("div",{children:"Amenity"}),v.jsx("div",{className:"text-right",children:"Revenue"})]}),v.jsx("div",{className:"divide-y divide-[#F1F5F9]",children:r?.map?.((s,l)=>v.jsxs("div",{className:"grid grid-cols-2 px-4 py-4 text-[14px] text-[#121212]",children:[v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx("span",{className:"w-[16px] h-[7px]",style:{backgroundColor:Gh?.[l%Gh?.length]}}),v.jsx("span",{className:"text-[#64748B] text-[12px] leading-[16px]",children:s?.name||"Unknown"})]}),v.jsx("div",{className:"text-right text-[12px] leading-[16px] text-[#64748B]",children:a(s?.value||0)})]},s?.name||l))})]})})]})})})}const Xh=["#8CB33E","#F59E0B","#3B82F6","#06B6D4","#CFCFCF"],Ide=[{asset_group_name:"Lifts",asset_count:3},{asset_group_name:"Fire Systems",asset_count:16},{asset_group_name:"Generators",asset_count:16},{asset_group_name:"HVAC",asset_count:24},{asset_group_name:"Others",asset_count:97}],Rde=({rows:e,totalAssets:t})=>{const n=k.useMemo(()=>e?e.length===0?[]:e.map((i,o)=>({name:i.asset_group_name,value:i.asset_count||0,color:Xh[o%Xh.length]})):Ide.map((i,o)=>({name:i.asset_group_name,value:i.asset_count||0,color:Xh[o%Xh.length]})),[e]),r=t??n.reduce((i,o)=>i+o.value,0);return e&&e.length===0?v.jsx(mn,{title:"Assets by Type",titleWeight:"semi-bold",className:"h-full",children:v.jsx("div",{className:"flex items-center justify-center h-full",children:v.jsx(Po,{title:"No Assets Found",description:"Catch up all the data. Change the date range to see the data."})})}):v.jsx(mn,{title:"Assets by Type",titleWeight:"semi-bold",className:"h-full",children:v.jsxs("div",{className:"flex items-center justify-between gap-8",children:[v.jsxs("div",{className:"relative w-[240px] h-[240px]",children:[v.jsx(It,{width:"100%",height:"100%",children:v.jsx(ho,{children:v.jsx(Oi,{data:n,dataKey:"value",cx:"50%",cy:"50%",innerRadius:60,outerRadius:90,paddingAngle:2,stroke:"#FFFFFF",strokeWidth:2,startAngle:90,endAngle:-270,children:n.map((i,o)=>v.jsx(Vt,{fill:i.color},o))})})}),v.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[v.jsx("div",{className:"text-[24px] text-[#121212]",children:r}),v.jsx("div",{className:"text-[12px] text-[#94A3B8] mt-1",children:"Total Assets"})]})]}),v.jsx("div",{className:"flex-1 max-w-[280px]",children:v.jsxs("div",{className:"rounded-[12px] overflow-hidden bg-white",children:[v.jsxs("div",{className:"flex items-center justify-between px-4 py-3 bg-[#F8FAFC]",children:[v.jsx("div",{className:"text-[12px] font-medium text-[#64748B]",children:"Asset"}),v.jsx("div",{className:"text-[12px] font-medium text-[#64748B]",children:"Count"})]}),n.map((i,o)=>v.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-t border-[#F1F5F9]",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("div",{className:"w-[16px] h-[7px]",style:{backgroundColor:i.color}}),v.jsx("div",{className:"text-[13px] text-[#475569]",children:i.name})]}),v.jsx("div",{className:"text-[13px] text-[#64748B]",children:i.value})]},o))]})})]})})},Lde=({data:e})=>{const[t,n]=k.useState({}),r=[{name:"Lifts",Cancelled:55,Closed:45,Open:50,OnHold:20,InProgress:10},{name:"Fire Systems",Cancelled:15,Closed:45,Open:15,OnHold:8,InProgress:5},{name:"Generators",Cancelled:12,Closed:45,Open:75,OnHold:18,InProgress:7},{name:"HVAC",Cancelled:45,Closed:80,Open:30,OnHold:22,InProgress:12},{name:"Others",Cancelled:18,Closed:18,Open:45,OnHold:9,InProgress:4}],i=k.useMemo(()=>e?Array.isArray(e)&&e.length===0?[]:e:r,[e]),o=a=>{const{dataKey:s}=a;n(l=>({...l,[s]:!l[s]}))};return Array.isArray(e)&&e.length===0?v.jsx(mn,{title:"Maintenance Status",titleWeight:"semi-bold",className:"h-full",children:v.jsx("div",{className:"w-full h-[260px] flex items-center justify-center",children:v.jsx(Po,{title:"No Maintenance Assets Status Found",description:"Catch up all the data. Change the date range to see the data."})})}):v.jsx(mn,{title:"Maintenance Status",titleWeight:"semi-bold",className:"h-full",children:v.jsx("div",{className:"w-full h-[260px] flex items-center justify-center",children:Array.isArray(e)&&e.length===0?v.jsx("div",{className:"text-[#94A3B8] text-sm",children:"No Data Found"}):v.jsx(It,{width:"100%",height:"100%",children:v.jsxs(Zo,{data:i,barSize:50,margin:{top:0,right:0,left:-30,bottom:0},children:[v.jsx(Rr,{strokeDasharray:"3 3",vertical:!1}),v.jsx(vr,{dataKey:"name",tick:{fill:"#64748B",fontSize:12},axisLine:!1,tickLine:!1}),v.jsx(Gn,{tick:{fill:"#64748B",fontSize:12},axisLine:!1,tickLine:!1,allowDecimals:!1}),v.jsx(nn,{cursor:{fill:"rgba(148, 163, 184, 0.12)"},contentStyle:{borderRadius:"10px",border:"1px solid #E2E8F0",fontSize:"12px"}}),v.jsx(Hf,{verticalAlign:"bottom",align:"center",iconType:"square",onClick:o,formatter:a=>v.jsx("div",{style:{color:t[a]?"#CBD5E1":"#64748B",cursor:"pointer",fontSize:"12px",display:"flex"},children:a}),wrapperStyle:{paddingTop:"18px"}}),v.jsx(Ln,{dataKey:"Open",stackId:"a",fill:"#3B82F6",hide:t.Open}),v.jsx(Ln,{dataKey:"Closed",stackId:"a",fill:"#10B981",hide:t.Closed}),v.jsx(Ln,{dataKey:"Cancelled",stackId:"a",fill:"#B91C1C",hide:t.Cancelled}),v.jsx(Ln,{dataKey:"OnHold",stackId:"a",fill:"#64748B",hide:t.OnHold}),v.jsx(Ln,{dataKey:"InProgress",stackId:"a",fill:"#F59E0B",hide:t.InProgress})]})})})})};function Fde({data:e}){const t=[{name:"Completed",value:Number(e?.completed||0),color:"#12B981"},{name:"Delayed",value:Number(e?.not_completed||0),color:"#EF4444"},{name:"Missed",value:Number(e?.missed||0),color:"#F69E0A"}],n=Number(e?.completed||0)+Number(e?.not_completed||0)+Number(e?.missed||0),r=Number(e?.completed||0);return v.jsx(mn,{title:"Guard Patrols",className:"h-[362px]",titleWeight:"semi-bold",children:v.jsxs("div",{className:"flex flex-col items-center justify-center",children:[v.jsxs("div",{className:"w-[215px] h-[182px] relative",children:[v.jsx(It,{width:"100%",height:"100%",children:v.jsxs(ho,{children:[v.jsx(Oi,{data:t,innerRadius:60,outerRadius:90,paddingAngle:2,dataKey:"value",nameKey:"name",children:t.map((i,o)=>v.jsx(Vt,{fill:i.color},`cell-${o}`))}),v.jsx(nn,{formatter:i=>i.toLocaleString()})]})}),v.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[v.jsxs("div",{className:"font-medium text-[19.35px] leading-[23.65px]",children:[r,"/",n]}),v.jsx("div",{className:"text-[10.75px] leading-[15.05px] text-[#64748B]",children:"Completed"})]})]}),v.jsx("div",{className:"flex flex-col w-full text-[14px]",children:t.map((i,o)=>v.jsxs("div",{className:`flex items-center justify-between py-[10px] ${o!==t.length-1?"border-b border-[#F1F5F9]":""}`,children:[v.jsxs("div",{className:"flex items-center gap-[10px]",children:[v.jsx("div",{className:"inline-block w-[16px] h-[7px]",style:{backgroundColor:i.color}}),v.jsx("div",{className:"leading-[16.09px] text-[12.07px] text-[#64748B]",children:i.name})]}),v.jsx("div",{className:"leading-[16.09px] text-[12.07px] text-[#64748B]",children:i.value})]},i.name))})]})})}function $de({incidentReports:e,incidentReportsDetails:t}){const n=Number(e?.open||0),r=Number(e?.in_progress||0),i=Number(e?.closed||0);return v.jsx(mn,{title:"Incident Reports",className:"h-[362px]",titleWeight:"semi-bold",children:v.jsxs("div",{children:[v.jsxs("div",{className:"flex w-full text-center gap-[24px]",children:[v.jsxs("div",{className:"flex-1 py-3 bg-[#FBF4F4] h-[76px] rounded",children:[v.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#AB0000]",children:n}),v.jsx("div",{className:"!text-[12px] leading-[16px] text-[#AB0000]",children:"Open"})]}),v.jsxs("div",{className:"flex-1 py-3 bg-[#FFFBF2] h-[76px] rounded",children:[v.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#E7A015]",children:r}),v.jsx("div",{className:"!text-[12px] leading-[16px] text-[#E7A015]",children:"In-progress"})]}),v.jsxs("div",{className:"flex-1 py-3 bg-[#F7FEFA] h-[76px] rounded",children:[v.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#1FA05B]",children:i}),v.jsx("div",{className:"!text-[12px] leading-[16px] text-[#1FA05B]",children:"Closed"})]})]}),v.jsx("div",{className:"mt-4 space-y-2",children:t?.length>0?t.map((o,a)=>{const s=o?.severity==="Danger"?"text-[#AB0000]":o?.severity==="High"?"text-[#E7A015]":"text-[#1FA05B]";return v.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#FAFBFD] rounded-md",children:[v.jsx("div",{className:"flex items-center gap-[8px]",children:v.jsx("div",{className:"text-gray-700 font-medium",children:o?.incident_code})}),v.jsx("div",{className:`!text-[12px] font-semibold flex items-center gap-[4px] ${s}`,children:v.jsxs("div",{children:[o?.severity_level," - ",o?.severity]})})]},a)}):v.jsx("div",{className:"text-[16px] text-center text-gray-400 text-sm py-6",children:"No incidents found"})})]})})}function Bde({columns:e=[{key:"a",label:"Organisation"},{key:"b",label:"Item"},{key:"c",label:"Orders"},{key:"d",label:"Revenue"},{key:"e",label:"AOV"},{key:"f",label:"% Revenue"}],data:t=[{a:"Google",b:"Coffee",c:"34,908",d:"₹ 57,21,288",e:"₹ 450",f:"43.6%"},{a:"Uber",b:"Paneer Combo",c:"12,000",d:"₹ 12,00,000",e:"₹ 500",f:"100%"}],rowsPerPage:n=10,setRowsPerPage:r=()=>{},currentPage:i=1,setCurrentPage:o=()=>{},pageOptions:a=[10,20,30,40,50]}){const s=Array.isArray(t)?t:[],l=Array.isArray(e)?e:[],c=n>0?Math.ceil(s.length/n):1,u=(i-1)*n,d=u+n,f=s.slice(u,d);return v.jsxs("div",{className:"w-full bg-white rounded-xl h-[390px] shadow-md overflow-hidden flex flex-col",children:[v.jsx("div",{className:"grid bg-slate-600 text-white text-sm font-medium",style:{gridTemplateColumns:`repeat(${l.length}, 1fr)`},children:l.map((p,m)=>v.jsx("div",{className:"px-6 py-4",children:p.label},m))}),v.jsx("div",{className:"flex-1 overflow-y-auto",children:f.length>0?f.map((p,m)=>v.jsx("div",{className:"grid text-sm text-gray-700 hover:bg-gray-50 transition",style:{gridTemplateColumns:`repeat(${l.length}, 1fr)`},children:l.map((h,g)=>{const b=p[h.key],S=typeof b=="string"&&b.includes("%"),w=b==="100%"?"bg-green-100 text-green-600":"bg-red-100 text-red-600";return v.jsx("div",{className:"px-6 py-4 bg-gray-50",children:S?v.jsx("div",{className:`inline-block px-3 py-1 rounded-full text-xs font-semibold ${w}`,children:b}):v.jsx("div",{children:b??"-"})},g)})},m)):v.jsx(Po,{title:"No Data Found",description:"Catch up all the data. Change the date range to see the data."})}),v.jsxs("div",{className:"flex justify-end items-center px-6 py-4 text-sm bg-white gap-8",children:[v.jsxs("div",{className:"flex items-center gap-2 text-gray-600",children:[v.jsx("div",{children:"Rows per page:"}),v.jsx("select",{value:n,onChange:p=>{r(Number(p.target.value)),o(1)},className:"border rounded px-2 py-1",children:a.map((p,m)=>v.jsx("option",{value:p,children:p},m))}),v.jsxs("div",{className:"ml-4",children:[s.length===0?"0–0":`${u+1}–${Math.min(d,s.length)}`," ","of ",s.length]})]}),v.jsxs("div",{className:"flex items-center space-x-2 text-gray-600",children:[v.jsx("button",{onClick:()=>o(1),disabled:i===1,className:"p-2 rounded hover:bg-gray-100 disabled:opacity-40",children:v.jsx(kue,{size:18})}),v.jsx("button",{onClick:()=>o(p=>p-1),disabled:i===1,className:"p-2 rounded hover:bg-gray-100 disabled:opacity-40",children:v.jsx(NI,{size:18})}),v.jsx("button",{onClick:()=>o(p=>p+1),disabled:i===c,className:"p-2 rounded hover:bg-gray-100 disabled:opacity-40",children:v.jsx(jI,{size:18})}),v.jsx("button",{onClick:()=>o(c),disabled:i===c,className:"p-2 rounded hover:bg-gray-100 disabled:opacity-40",children:v.jsx(Cue,{size:18})})]})]})]})}ae.AccessPointsUsage=bde,ae.Accounting=cue,ae.Amenities=dde,ae.AmenitiesStatsCard=kde,ae.AmenityWiseRevenue=jde,ae.AssetValueBreakdown=hue,ae.AssetsByType=Rde,ae.BlockWiseOccupancy=oue,ae.BookingTrendChart=Mde,ae.Bookings=Ade,ae.Budgets=uue,ae.Card=je,ae.CardAccess=WI,ae.CashBankBalance=due,ae.CommercialAccessOverview=yde,ae.CommercialGuardPatrols=Fde,ae.CommercialIncidentReports=$de,ae.CommercialOccupancy=lde,ae.CommercialReportTable=Bde,ae.Community=Hie,ae.Complaints=Bue,ae.ComplaintsByLevel=Yue,ae.DuesAgeing=fue,ae.EmployeeFootfall=cde,ae.Engagement=Yie,ae.EngagementStatsGrid=sde,ae.EventsUtilisation=tde,ae.ExpenseCategories=pue,ae.Facilities=Uie,ae.FinanceSummary=Kie,ae.FoodBeverages=ude,ae.GateAndSecurityStatsGrid=Lue,ae.GateUpdates=Moe,ae.GuardPatrols=Tue,ae.Header=J6,ae.Helpdesk=Noe,ae.HelpdeskStatsGrid=ede,ae.HourlyTrafficFlow=Mue,ae.IncidentReports=Nue,ae.IncomeExpenditure=DI,ae.MainHeader=f3,ae.MaintenanceStatus=Lde,ae.MetricCard=Sde,ae.MobileAccess=WI,ae.MoveInOutTrends=sue,ae.NoticeBoardStatus=nde,ae.OccupancyOverview=nue,ae.OrganisationWiseVisitors=Pde,ae.RequestBox=Kue,ae.ResidentOverview=iue,ae.RevenuebyCategory=mue,ae.SingleStats=ide,ae.StaffAttendance=jue,ae.StatsGrid=bue,ae.TicketEscalation=fde,ae.TicketStatus=hde,ae.Tickets=PI,ae.TicketsperCategory=_de,ae.UnitStatus=PI,ae.VisitorUpdates=mde,ae.WeeklyVisitorPattern=Ode,Object.defineProperty(ae,Symbol.toStringTag,{value:"Module"})}));
|
|
362
|
+
*/const Aue=sa("waves-ladder",[["path",{d:"M19 5a2 2 0 0 0-2 2v11",key:"s41o68"}],["path",{d:"M2 18c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"rd2r6e"}],["path",{d:"M7 13h10",key:"1rwob1"}],["path",{d:"M7 9h10",key:"12czzb"}],["path",{d:"M9 5a2 2 0 0 0-2 2v11",key:"x0q4gh"}]]),mn=({title:e,icon:t,period:n,isDateSelector:r=!1,children:i,footer:o,className:a="",titleWeight:s,titleColor:l,iconClassName:c,titleClassName:u,childrenClassName:d,onCalendarClick:f,onPrevClick:p,onNextClick:m})=>{const h=s==="semi-bold"?600:500;return v.jsxs("div",{className:`relative bg-white rounded-[12px] p-[24px] shadow-[0_0_12px_0_#EAF2FF] ${a}`,children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[t&&v.jsx("div",{className:c,children:t}),v.jsx("div",{style:{fontWeight:h,color:l||"#121212"},className:u||"text-[20px] leading-[24px]",children:e})]}),n&&!r&&v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:n}),r&&v.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 rounded-lg bg-white text-sm text-[#64748B]",children:[v.jsx(Pue,{size:16,className:"text-[#64748B] cursor-pointer",onClick:f}),v.jsx(NI,{size:16,className:"cursor-pointer",onClick:p}),v.jsx("span",{className:"text-[12px] leading-[16px] text-[#64748B]",children:n}),v.jsx(jI,{size:16,className:"cursor-pointer",onClick:m})]})]}),v.jsx("div",{className:`flex-1 min-h-0 mt-4 ${d}`,children:i}),o&&v.jsx("div",{className:"mt-4 pt-4 border-t border-gray-100 text-[12px] text-[#64748B]",children:o})]})};function Tue({data:e={}}){const t=[{name:"Completed",value:Number(e?.completed??0),color:"#12B981"},{name:"Delayed",value:Number(e?.not_completed??0),color:"#EF4444"},{name:"Missed",value:Number(e?.missed??0),color:"#F69E0A"}],n=Number(e?.completed??0)+Number(e?.not_completed??0)+Number(e?.missed??0),r=Number(e?.completed??0);return v.jsx(mn,{title:"Guard Patrols",className:"h-[362px]",titleWeight:"semi-bold",children:v.jsxs("div",{className:"flex flex-col items-center justify-center",children:[v.jsxs("div",{className:"w-[215px] h-[182px] relative",children:[v.jsx(It,{width:"100%",height:"100%",children:v.jsxs(ho,{children:[v.jsx(Oi,{data:t??[],innerRadius:60,outerRadius:90,paddingAngle:2,dataKey:"value",nameKey:"name",children:t?.map?.((i,o)=>v.jsx(Ht,{fill:i?.color??"#ccc"},`cell-${o}`))}),v.jsx(Vt,{formatter:i=>Number(i??0).toLocaleString()})]})}),v.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[v.jsxs("div",{className:"font-medium text-[19.35px] leading-[23.65px]",children:[r??0,"/",n??0]}),v.jsx("div",{className:"text-[10.75px] leading-[15.05px] text-[#64748B]",children:"Completed"})]})]}),v.jsx("div",{className:"flex flex-col w-full text-[14px]",children:t?.length?t?.map?.((i,o)=>v.jsxs("div",{className:`flex items-center justify-between py-[10px] ${o!==(t?.length??0)-1?"border-b border-[#F1F5F9]":""}`,children:[v.jsxs("div",{className:"flex items-center gap-[10px]",children:[v.jsx("div",{className:"inline-block w-[16px] h-[7px]",style:{backgroundColor:i?.color??"#ccc"}}),v.jsx("div",{className:"leading-[16.09px] text-[12.07px] text-[#64748B]",children:i?.name??"-"})]}),v.jsx("div",{className:"leading-[16.09px] text-[12.07px] text-[#64748B]",children:i?.value??0})]},i?.name??o)):v.jsx("div",{className:"text-center text-gray-400 text-sm py-6",children:"No patrol data"})})]})})}Fn.register(Oo,Eo,n1,t1,Vr,ei);const Mue=()=>{const t={labels:["10 AM","12 PM","2 PM","4 PM","6 PM","8 PM","10 PM"],datasets:[{label:"Guest",data:[9,5,12,7,3,6,4],borderColor:"#EF4444",backgroundColor:"rgba(239,68,68,0.15)",pointBackgroundColor:"#EF4444",pointStyle:"rectRot",fill:!1},{label:"Cab",data:[15,12,10,14,7,12,8],borderColor:"#7C3AED",backgroundColor:"rgba(124,58,237,0.15)",pointBackgroundColor:"#7C3AED",pointStyle:"rectRot",fill:!1},{label:"Delivery",data:[22,18,16,20,22,14,17],borderColor:"#10B981",backgroundColor:"rgba(16,185,129,0.15)",pointBackgroundColor:"#10B981",pointStyle:"rectRot",fill:!1},{label:"Service",data:[13,12,8,9,5,10,7],borderColor:"#F59E0B",backgroundColor:"rgba(245,158,11,0.15)",pointBackgroundColor:"#F59E0B",pointStyle:"rectRot",fill:!1}]},n={responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,boxWidth:10,boxHeight:10,padding:20}},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:12,caretSize:0,callbacks:{title:r=>r[0].label,label:r=>`${r.dataset.label} ${r.parsed.y}`}}},scales:{x:{grid:{color:"#F1F5F9"},ticks:{color:"#64748B"}},y:{beginAtZero:!0,suggestedMax:28,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",stepSize:4,precision:0}}},elements:{line:{borderWidth:2,tension:0},point:{radius:0,hoverRadius:3,hitRadius:10}}};return v.jsx(je,{title:"Hourly Traffic Flow",className:"w-full h-[362px]",period:v.jsx(Sr,{className:"text-[20px] text-[#884EA7]"}),children:v.jsx(a1,{data:t,options:n})})};function Nue({incidentReports:e={},incidentReportsDetails:t=[]}){const n=Number(e?.open??0),r=Number(e?.in_progress??0),i=Number(e?.closed??0);return v.jsx(mn,{title:"Incident Reports",className:"h-[362px]",titleWeight:"semi-bold",children:v.jsxs("div",{children:[v.jsxs("div",{className:"flex w-full text-center gap-[24px]",children:[v.jsxs("div",{className:"flex-1 py-3 bg-[#FBF4F4] h-[76px] rounded",children:[v.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#AB0000]",children:n??0}),v.jsx("div",{className:"!text-[12px] leading-[16px] text-[#AB0000]",children:"Open"})]}),v.jsxs("div",{className:"flex-1 py-3 bg-[#FFFBF2] h-[76px] rounded",children:[v.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#E7A015]",children:r??0}),v.jsx("div",{className:"!text-[12px] leading-[16px] text-[#E7A015]",children:"In-progress"})]}),v.jsxs("div",{className:"flex-1 py-3 bg-[#F7FEFA] h-[76px] rounded",children:[v.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#1FA05B]",children:i??0}),v.jsx("div",{className:"!text-[12px] leading-[16px] text-[#1FA05B]",children:"Closed"})]})]}),v.jsx("div",{className:"mt-4 space-y-2",children:t?.length?t?.map?.((o,a)=>{const s=o?.severity==="Danger"?"text-[#AB0000]":o?.severity==="High"?"text-[#E7A015]":"text-[#1FA05B]";return v.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#FAFBFD] rounded-md",children:[v.jsx("div",{className:"flex items-center gap-[8px]",children:v.jsx("div",{className:"text-gray-700 font-medium",children:o?.incident_code??"-"})}),v.jsx("div",{className:`!text-[12px] font-semibold flex items-center gap-[4px] ${s}`,children:v.jsxs("div",{children:[o?.severity_level??"-"," - ",o?.severity??"-"]})})]},a)}):v.jsx("div",{className:"text-center text-gray-400 text-sm py-6",children:"No incidents found"})})]})})}function jue({staffPresentAbsent:e,staffPresentByRole:t}){const n=e?.[0]?.total_staff??0,r=e?.[0]?.absent_staff??0,i=(n??0)-(r??0);return v.jsx(mn,{title:"Staff Attendance",className:"h-[362px]",titleWeight:"semi-bold",children:v.jsxs("div",{children:[v.jsxs("div",{className:"flex gap-[24px] text-center",children:[v.jsxs("div",{className:"flex-1 py-3 bg-[#F7FEFA] rounded h-[76px]",children:[v.jsx("div",{className:"text-[24px] font-medium text-[#1FA05B]",children:i??0}),v.jsx("div",{className:"text-[12px] text-[#1FA05B]",children:"Present"})]}),v.jsxs("div",{className:"flex-1 py-3 bg-[#FBF4F4] rounded h-[76px]",children:[v.jsx("div",{className:"text-[24px] font-medium text-[#AB0000]",children:r??0}),v.jsx("div",{className:"text-[12px] text-[#AB0000]",children:"Absent"})]})]}),v.jsx("div",{className:"mt-4 space-y-2 overflow-y-auto max-h-[200px]",children:t?.length?t?.map?.((o,a)=>{const s=Number(o?.total_staff??0),l=Number(o?.present_staff??0);return v.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#FAFBFD] rounded-md",children:[v.jsx("div",{className:"text-[#121212] text-[14px] leading-[18px] font-medium",children:o?.staff_role_name??"-"}),v.jsxs("div",{className:"text-[14px] leading-[20px] text-[#64748B]",children:[l??0,"/",s??0]})]},a)}):v.jsx("div",{className:"text-center text-[16px] text-gray-400 text-sm py-6",children:"No staff data"})})]})})}function Iue(e){return Xe({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M116,132V96a12,12,0,0,1,24,0v36a12,12,0,0,1-24,0Zm12,56a16,16,0,1,0-16-16A16,16,0,0,0,128,188ZM228,56v56c0,54.29-26.32,87.22-48.4,105.29-23.71,19.39-47.44,26-48.44,26.29a12.1,12.1,0,0,1-6.32,0c-1-.28-24.73-6.9-48.44-26.29C54.32,199.22,28,166.29,28,112V56A20,20,0,0,1,48,36H208A20,20,0,0,1,228,56Zm-24,4H52v52c0,35.71,13.09,64.69,38.91,86.15A126.14,126.14,0,0,0,128,219.38a126.28,126.28,0,0,0,37.09-21.23C190.91,176.69,204,147.71,204,112Z"},child:[]}]})(e)}function Rue({title:e,value:t,delta:n,deltaLabel:r,positive:i=!0,Icon:o=Hl,iconColor:a="text-emerald-600",iconBg:s="bg-emerald-50"}){return v.jsxs(je,{title:e,icon:v.jsx("div",{className:"h-6 w-6 grid place-items-center",children:v.jsx(o,{className:`h-6 w-6 ${a}`})}),children:[v.jsx("div",{className:"text-4xl font-semibold tracking-tight text-[#121212]",children:t}),v.jsxs("div",{className:"flex items-center gap-[8px] text-[14px]",children:[v.jsx("div",{className:i?"text-emerald-600 font-medium":"text-rose-600 font-medium",children:n}),v.jsx("div",{className:"text-slate-500",children:r})]})]})}function Lue(){const e=[{title:"Total Visitors",value:160,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:dg,iconColor:"text-[#329DFF]"},{title:"Active Incidents",value:73,delta:"+2.0%",deltaLabel:"Compared to last month",positive:!0,Icon:Vie,iconColor:"text-[#F69E0A]"},{title:"Missed Patrols",value:3,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:Iue,iconColor:"text-[#AB0000]"},{title:"Parking Usage",value:5,delta:"-8.0%",deltaLabel:"Compared to last month",positive:!1,Icon:l3,iconColor:"text-[#36AB6C]"}];return v.jsx("div",{className:"px-5 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-[24px]",children:e.map((t,n)=>v.jsx(Rue,{...t},n))})}const Fue=[{title:"Maintenance",total:12,pending:3},{title:"Security",total:8,pending:1},{title:"Housekeeping",total:6,pending:2},{title:"Utilities",total:10,pending:4}],$ue=(e="")=>e.replace(/</g,"<").replace(/>/g,">").replace(/<[^>]*>/g,"").trim();function Bue({data:e}){const t=Array.isArray(e?.complaints_by_category)&&e.complaints_by_category.length>0?e.complaints_by_category.map(n=>({title:$ue(n.category_name)||"—",total:n.total||0,pending:n.pending||0})):Fue;return v.jsx(je,{title:"Complaints",className:"h-[362px]",titleWeight:"semi-bold",titleClassName:"!text-[20px] !leading-[24px]",children:v.jsx("div",{className:"flex flex-col gap-[12px]",children:t.map((n,r)=>v.jsxs("div",{className:"flex items-center justify-between bg-[#F9FAFB] rounded-lg p-3 h-[62px]",children:[v.jsxs("div",{className:"flex flex-col",children:[v.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-[#121212] capitalize",children:n.title}),v.jsxs("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:["Total: ",n.total]})]}),v.jsxs("div",{className:"flex flex-col items-end",children:[v.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-red-700",children:String(n.pending).padStart(2,"0")}),v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Pending"})]})]},r))})})}const Wue=e=>{const t={0:"𝟎",1:"𝟏",2:"𝟐",3:"𝟑",4:"𝟒",5:"𝟓",6:"𝟔",7:"𝟕",8:"𝟖",9:"𝟗"};return String(e).split("").map(n=>t[n]||n).join("")},zue=[{level:"Level 1",open_count:3,in_progress_count:4,closed_count:5,total:12},{level:"Level 2",open_count:1,in_progress_count:1,closed_count:1,total:3},{level:"Level 3",open_count:5,in_progress_count:2,closed_count:3,total:10}],Vue=({active:e,payload:t,label:n})=>{if(!e||!t)return null;const r=[{key:"open_count",label:"Open",color:"#EF4444"},{key:"in_progress_count",label:"In Progress",color:"#F59D0D"},{key:"closed_count",label:"Closed",color:"#12B981"}];return v.jsxs("div",{style:{backgroundColor:"#0B0B0B",padding:"14px 40px 14px 18px",borderRadius:"10px",color:"#ffffff"},children:[v.jsx("div",{style:{color:"#ffffff",fontSize:"12px",fontWeight:"900",marginBottom:"10px"},children:n}),r.map((i,o)=>{const a=t[0]?.payload[i.key]||0,s=Wue(a);return v.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:o<r.length-1?"8px":"0",fontSize:"12px"},children:[v.jsx("div",{style:{width:"8px",height:"8px",backgroundColor:i.color,transform:"rotate(45deg)",marginRight:"8px"}}),v.jsx("span",{style:{color:"D1D3D4",minWidth:"100px"},children:i.label}),v.jsx("span",{style:{marginLeft:"auto",fontWeight:"700"},children:s})]},i.key)})]})},Hue=()=>{const e=[{label:"Open",color:"#EF4444"},{label:"In Progress",color:"#F59D0D"},{label:"Closed",color:"#12B981"}];return v.jsx("div",{style:{display:"flex",justifyContent:"space-between",gap:"15px"},children:e.map(t=>v.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[v.jsx("div",{style:{width:"6px",height:"6px",backgroundColor:t.color,transform:"rotate(45deg)"}}),v.jsx("span",{style:{fontSize:"14px"},children:t.label})]},t.label))})},Yue=({data:e})=>{const t=k.useMemo(()=>(Array.isArray(e?.complaints_by_level)&&e.complaints_by_level.some(l=>Number(l.total)>0)?e.complaints_by_level:zue).map(l=>({level:l.level||"—",open_count:Number(l.open_count)||0,in_progress_count:Number(l.in_progress_count)||0,closed_count:Number(l.closed_count)||0,total:Number(l.total)||0})),[e]),n=k.useMemo(()=>Math.max(...t.map(a=>a.total),5),[t]),r=Math.ceil(n*1.2),i=6,o=Math.max(Math.ceil(n/i),1);return v.jsxs(je,{title:"Complaints by Level",className:"w-full h-[362px]",titleWeight:"semi-bold",titleClassName:"!text-[20px] !leading-[24px]",children:[v.jsx(It,{width:"100%",height:"85%",children:v.jsxs(Zo,{data:t,margin:{top:5,right:-25,left:-30,bottom:5},children:[v.jsx(Rr,{strokeDasharray:"0",vertical:!1}),v.jsx(vr,{dataKey:"level"}),v.jsx(Gn,{domain:[0,r],ticks:Array.from({length:i+1},(a,s)=>s*o)}),v.jsx(Vt,{content:v.jsx(Vue,{}),cursor:!1}),v.jsx(Ln,{dataKey:"open_count",stackId:"a",fill:"#EF4444",barSize:44,radius:[0,0,0,0]}),v.jsx(Ln,{dataKey:"in_progress_count",stackId:"a",fill:"#F59D0D",barSize:44,radius:[0,0,0,0]}),v.jsx(Ln,{dataKey:"closed_count",stackId:"a",fill:"#12B981",barSize:44,radius:[0,0,0,0]})]})}),v.jsx(Hue,{})]})},Uue=[{title:"Maintenance",total:18,pending:4},{title:"Security",total:11,pending:2},{title:"Housekeeping",total:9,pending:3},{title:"Utilities",total:14,pending:5}];function Kue({data:e}){const t=Array.isArray(e?.request_box_by_type)&&e.request_box_by_type.length>0?e.request_box_by_type.map(n=>({title:n.category_name||"—",total:Number(n.total)||0,pending:Number(n.pending)||0})):Uue;return v.jsx(je,{title:"Request Box",className:"h-[362px]",titleWeight:"semi-bold",titleClassName:"!text-[20px] !leading-[24px]",children:v.jsx("div",{className:"flex flex-col gap-[12px]",children:t.map((n,r)=>v.jsxs("div",{className:"flex items-center justify-between bg-[#F9FAFB] rounded-lg p-3 h-[62px]",children:[v.jsxs("div",{className:"flex flex-col",children:[v.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-[#121212] capitalize",children:n.title}),v.jsxs("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:["Total: ",n.total]})]}),v.jsxs("div",{className:"flex flex-col items-end",children:[v.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-red-700",children:String(n.pending).padStart(2,"0")}),v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Pending"})]})]},`${n.title}-${r}`))})})}function que(e){return Xe({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinejoin:"round",strokeWidth:"32",d:"M416 221.25V416a48 48 0 0 1-48 48H144a48 48 0 0 1-48-48V96a48 48 0 0 1 48-48h98.75a32 32 0 0 1 22.62 9.37l141.26 141.26a32 32 0 0 1 9.37 22.62z"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M256 56v120a32 32 0 0 0 32 32h120m-232 80h160m-160 80h160"},child:[]}]})(e)}const Gue=["open_complaints","pending_requests","avg_response_time","resolution_rate"],Xue={open_complaints:{title:"Open Complaints",Icon:PS,iconColor:"#AB0000",deltaLabel:"Compared to last month"},pending_requests:{title:"Pending Requests",Icon:que,iconColor:"#E7A015",deltaLabel:"Compared to last month"},avg_response_time:{title:"Avg Response Time",Icon:v3,iconColor:"#1FA05B",deltaLabel:"Compared to last month"},resolution_rate:{title:"Resolution Rate",Icon:p3,iconColor:"#329DFF",deltaLabel:"Compared to last month"}},Que=({children:e,size:t=28,lineHeight:n=32,weight:r=500,color:i="#121212"})=>v.jsx("div",{style:{fontWeight:r,fontSize:`${t}px`,lineHeight:`${n}px`,color:i},children:e}),Zue={primary:{size:28,lineHeight:32,weight:500}},Jue={open_complaints:{current:24,trend_percent:"-8%",direction:"bad"},pending_requests:{current:17,trend_percent:"-5%",direction:"bad"},avg_response_time:{current:"2.4 h",trend_percent:"+6%",direction:"good"},resolution_rate:{current:"89%",trend_percent:"+4%",direction:"good"}};function ede({id:e,data:t}){return e&&t&&!t[e]&&t.current!==void 0?v.jsx(II,{id:e,data:t}):v.jsx("div",{className:"px-5 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:Gue.map(n=>v.jsx(II,{id:n},n))})}function II({id:e,data:t}){const n=Xue[e];if(!n)return null;const r=(d,f)=>f==null?"—":d==="avg_response_time"?typeof f=="number"?`${f} h`:f:d==="resolution_rate"&&typeof f=="number"?`${f}%`:f,{title:i,Icon:o=Hl,iconColor:a,deltaLabel:s}=n,l=t&&Object.keys(t).length>0?t:Jue[e],c=r(e,l?.current),u=l?.trend_percent??"—";return l?.direction==="good"||l?.direction,v.jsx("div",{className:"h-[132px]",children:v.jsxs(je,{title:i,titleColor:a,icon:v.jsx("div",{className:"h-[20px] w-[20px] flex items-center justify-center",children:v.jsx(o,{className:"h-[20px] w-[20px]",style:{color:a}})}),childrenClassName:"!space-y-[12px]",iconClassName:"!gap-[12px]",children:[v.jsx(Que,{...Zue.primary,children:c}),v.jsxs("div",{className:"flex items-center gap-[8px] text-[12px] leading-[16px]",children:[v.jsx(fg,{value:u}),v.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:s})]})]})})}function RI({title:e,date:t,rsvp:n,utilisation:r,status:i}){return v.jsxs("div",{className:" bg-[#F8FAFC] h-[106px] px-3 mt-3",children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsx("div",{className:"text-[16px] leading-[20px] font-semibold text-[#121212]",children:e}),v.jsx("div",{className:`!text-[12px] font-medium leading-[16px] px-2 py-1 ${i==="Completed"?"text-[#36AB6C] bg-[#E6F7EE]":i==="Upcoming"?"text-[#329DFF] bg-[#E6F2FF]":"text-slate-500 bg-slate-100"}`,children:i})]}),v.jsx("div",{className:"text-[14px] leading-[18px] text-[#64748B]",children:t}),v.jsxs("div",{className:"flex justify-between items-center mt-2",children:[v.jsxs("div",{className:"text-[14px] leading-[18px] text-[#64748B]",children:[n," RSVP"]}),v.jsxs("div",{className:"text-[#3C82F6] text-[14px] leading-[18px] font-medium",children:[r,"% utilisation"]})]}),v.jsx("div",{className:"w-full bg-[#F8FAFC] h-[6px] rounded mt-2 mb-3",children:v.jsx("div",{className:"h-[6px] rounded bg-[#3C82F6]",style:{width:`${r}%`}})})]})}function tde(){return v.jsx(je,{title:"Events Utilisation",period:v.jsx(Sr,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"w-full h-[360px]",children:v.jsxs("div",{children:[v.jsx(RI,{title:"Holi Celebration",date:"25 Jun 2025",rsvp:"78/100",utilisation:71,status:"Upcoming"}),v.jsx(RI,{title:"Maintenance Meeting",date:"25 Jun 2025",rsvp:"45/60",utilisation:75,status:"Completed"})]})})}function qh({label:e,value:t,subLabel:n,bgColor:r,textColor:i}){return v.jsxs("div",{className:`rounded-lg p-4 ${r} h-[124px]`,children:[v.jsx("div",{className:`text-[16px] font-medium ${i} leading-[20px]`,children:e}),v.jsx("div",{className:"mt-4 text-[28px] leading-[32px] font-semibold text-[#121212]",children:t}),v.jsx("div",{className:"!text-[12px] leading-[16px] text-[#64748B] mt-2",children:n})]})}function nde(){return v.jsx(je,{title:"Notice Board Status",period:v.jsx(Sr,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"w-full h-[360px]",children:v.jsxs("div",{className:"grid grid-cols-2 gap-[16px]",children:[v.jsx(qh,{label:"Active",value:138,subLabel:"3 expiring soon",bgColor:"bg-[#F0FFF7]",textColor:"text-[#1FA05B]"}),v.jsx(qh,{label:"Scheduled",value:13,subLabel:"4 this week",bgColor:"bg-[#FFFBF2]",textColor:"text-[#E7A015]"}),v.jsx(qh,{label:"Recurring",value:3,subLabel:"All active",bgColor:"bg-[#EDF6FF]",textColor:"text-[#329DFF]"}),v.jsx(qh,{label:"Expired",value:7,subLabel:"4 recent",bgColor:"bg-[#F6F6F6]",textColor:"text-[#64748B]"})]})})}function LI(e){return Xe({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M20 22H4C3.44772 22 3 21.5523 3 21V3C3 2.44772 3.44772 2 4 2H20C20.5523 2 21 2.44772 21 3V21C21 21.5523 20.5523 22 20 22ZM19 20V4H5V20H19ZM8 9H16V11H8V9ZM8 13H16V15H8V13Z"},child:[]}]})(e)}function rde({title:e,value:t,delta:n,deltaLabel:r,positive:i=!0,Icon:o=Hl,iconColor:a="text-emerald-600",iconBg:s="bg-emerald-50"}){return v.jsx(je,{title:e,icon:v.jsx("div",{className:`h-6 w-6 grid place-items-center rounded-md ${s}`,children:v.jsx(o,{className:`h-4 w-4 ${a}`})}),className:"h-[132px]",children:v.jsxs("div",{children:[v.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t}),v.jsxs("div",{className:"flex items-center gap-[8px] pt-[8px] !text-[12px] leading-[16px]",children:[v.jsx("div",{className:i?"text-[#1FA05B] font-medium":"text-rose-600 font-medium",children:n}),v.jsx("div",{className:"text-[#64748B]",children:r})]})]})})}function ide({data:e}){const t=[{title:e?.title||"Total Bookings",value:145,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:LI,iconColor:"text-emerald-600",iconBg:"bg-emerald-50"}];return v.jsx("div",{className:"h-full",children:t.map((n,r)=>v.jsx(rde,{...n},r))})}function ode(e){return Xe({attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01"},child:[]}]})(e)}function ade({title:e,value:t,delta:n,deltaLabel:r,positive:i=!0,Icon:o=Hl,iconColor:a="text-emerald-600",iconBg:s="bg-emerald-50"}){return v.jsx(je,{title:e,icon:v.jsx("div",{className:`h-6 w-6 grid place-items-center rounded-md ${s}`,children:v.jsx(o,{className:`h-4 w-4 ${a}`})}),className:"h-[132px]",children:v.jsxs("div",{children:[v.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t}),v.jsxs("div",{className:"flex items-center gap-[8px] pt-[8px] !text-[12px] leading-[16px]",children:[v.jsx("div",{className:i?"text-[#1FA05B] font-medium":"text-rose-600 font-medium",children:n}),v.jsx("div",{className:"text-[#64748B]",children:r})]})]})})}function sde(){const e=[{title:"Notice",value:160,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:LI,iconColor:"text-emerald-600",iconBg:"bg-emerald-50"},{title:"Post",value:83,delta:"+2.0%",deltaLabel:"Compared to last month",positive:!0,Icon:c3,iconColor:"text-[#329DFF]",iconBg:"bg-emerald-50"},{title:"Poll",value:3,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:Wie,iconColor:"text-[#FA7E28]",iconBg:"bg-orange-100"},{title:"Poll",value:5,delta:"-8.0%",deltaLabel:"Compared to last month",positive:!1,Icon:ode,iconColor:"text-[#DBB467]",iconBg:"bg-yellow-100"}];return v.jsx("div",{className:"px-5 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-[24px]",children:e.map((t,n)=>v.jsx(ade,{...t},n))})}const FI=({value:e=0,total:t=1,colorClass:n="",label:r=""})=>{const i=Number(e)||0,o=Number(t)||1,a=Math.max(0,Math.min(100,i/o*100)),s=n==="bg-[#8B5CF6]"?"text-[#8B5CF6]":n==="bg-[#12B981]"?"text-[#12B981]":"text-slate-600";return v.jsxs("div",{className:"flex flex-col items-start",children:[v.jsx("div",{className:"w-2/3 min-w-[80px] h-5 rounded-full overflow-hidden",children:v.jsx("div",{className:`h-[11px] rounded-full ${n||""}`,style:{width:n==="bg-[#12B981]"?`${a+45}%`:`${a}%`}})}),v.jsx("div",{className:`${s} !text-[12px] font-bold mt-1`,children:i??0}),v.jsx("div",{className:"!text-[12px] leading-[16px] text-[#64748B] mt-1",children:r??""})]})},lde=({data:e,occupiedUnits:t=9e3,EmployeesCount:n=8910,AdminsCount:r=90})=>{const i=e?.total_occupants!==void 0&&e?.total_occupants!==null?Number(e?.total_occupants)||0:Number(t)||0,o=e?.total_members!==void 0&&e?.total_members!==null?Number(e?.total_members)||0:Number(n)||0,a=e?.total_admins!==void 0&&e?.total_admins!==null?Number(e?.total_admins)||0:Number(r)||0,s=(o||0)+(a||0);return v.jsx("div",{children:v.jsxs("div",{className:"bg-white !border-[0.5px] !border-[#EBEBEB] rounded-xl shadow-[0_0_12px_0_#EAF2FF] p-4 h-[128px]",children:[v.jsxs("div",{className:"flex items-center gap-[12px] h-[20px]",style:{marginBottom:"24px"},children:[v.jsx(dg,{className:"!text-[20px] text-[#329DFF]"}),v.jsx("div",{className:"font-medium text-[#121212] text-[16px] leading-[20px]",children:"Occupancy Overview"})]}),v.jsxs("div",{className:"flex items-start justify-between",children:[v.jsxs("div",{children:[v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B] font-normal",children:"Total Occupants"}),v.jsx("div",{className:"flex items-center gap-1",children:v.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:i??0})})]}),v.jsxs("div",{className:"flex items-end gap-1",children:[v.jsx(FI,{value:o??0,total:s||1,colorClass:"bg-[#8B5CF6]",label:"Employees"}),v.jsx(FI,{value:a??0,total:s||1,colorClass:"bg-[#12B981]",label:"Admins"})]})]})]})})};Fn.register(Oo,Eo,El,Vr);const cde=()=>{const t={labels:["HP","Adobe","Anarock","Swiggy","Infosys","Zepto"],datasets:[{data:[2e3,1700,1500,1200,900,800],backgroundColor:["#329DFF","#EF4645","#8A2E64","#F69E0A","#A2BB40","#8B5CF6"],barThickness:34}]},n={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{backgroundColor:"#0F172A",titleColor:"#fff",bodyColor:"#fff",displayColors:!1,callbacks:{label:r=>`Employees: ${r.parsed.y}`}}},scales:{x:{grid:{display:!1},ticks:{color:"#64748B",font:{size:12}}},y:{beginAtZero:!0,min:0,max:2e3,ticks:{stepSize:500,color:"#64748B",callback:r=>r},grid:{display:!1,color:"#E5E7EB",borderDash:[4,4],drawBorder:!1}}}};return v.jsxs(je,{className:"w-full h-[238px]",title:"Employee Footfall (Static Data)",period:"Today",icon:v.jsx(Eue,{className:"!text-[24px] text-[#8B5CF6]"}),children:[v.jsxs("div",{style:{marginBottom:"16px",marginTop:"8px"},children:[v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Employees Inside"}),v.jsx("div",{className:"text-[20px] leading-[24px] font-medium text-[#1FA05B]",children:"7,500"})]}),v.jsx("div",{className:"h-[110px]",children:v.jsx(Pl,{data:t,options:n})})]})};function ude(){return v.jsx(je,{className:"h-[324px]",title:"Food & Beverages (Static Data)",period:"Today",icon:v.jsx(b5,{className:"!text-[24px] text-[#FA7E28]"}),children:v.jsxs("div",{className:"flex flex-col h-full",children:[v.jsxs("div",{className:"grid grid-cols-2 gap-6 mb-6",children:[v.jsxs("div",{children:[v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Total Orders"}),v.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#8B5CF6]",children:247})]}),v.jsxs("div",{children:[v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Revenue Generated"}),v.jsxs("div",{className:"text-[28px] leading-[32px] font-medium text-[#329DFF]",children:["₹ ","82K"]}),v.jsxs("div",{className:"inline-flex items-center gap-1 mt-2 text-[10px] leading-[14px] px-2 py-1 rounded-full text-[#1FA05B] bg-green-50",children:[v.jsx(oc,{}),8,"%",v.jsx("span",{children:"from last month"})]})]})]}),v.jsxs("div",{className:"mt-[16px]",children:[v.jsxs("div",{className:"mb-[16px]",children:[v.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[v.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:"HP"}),v.jsxs("div",{className:"font-medium text-[12px] leading-[16px] flex items-center",children:[v.jsx("div",{className:"text-[#64748B] inline-block",children:"120 orders"}),v.jsx("div",{className:"mx-2 text-[#121212] inline-block",children:"₹ 45K"})]})]}),v.jsx("div",{className:"h-[11px] bg-gray-100 rounded-full",children:v.jsx("div",{className:"h-[11px] bg-blue-500 rounded-full",style:{width:"70%"}})})]}),v.jsxs("div",{className:"mb-[16px]",children:[v.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[v.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:"Adobe"}),v.jsxs("div",{className:"font-medium text-[12px] leading-[16px] flex items-center",children:[v.jsx("div",{className:"text-[#64748B] inline-block",children:"85 orders"}),v.jsx("div",{className:"mx-2 text-[#121212] inline-block",children:"₹ 23K"})]})]}),v.jsx("div",{className:"h-[11px] bg-gray-100 rounded-full",children:v.jsx("div",{className:"h-[11px] bg-red-500 rounded-full",style:{width:"50%"}})})]}),v.jsxs("div",{className:"mb-[16px]",children:[v.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[v.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:"Anarock"}),v.jsxs("div",{className:"font-medium text-[12px] leading-[16px] flex items-center",children:[v.jsx("div",{className:"text-[#64748B] inline-block",children:"42 orders"}),v.jsx("div",{className:"mx-2 text-[#121212] inline-block",children:"₹ 14K"})]})]}),v.jsx("div",{className:"h-[11px] bg-gray-100 rounded-full",children:v.jsx("div",{className:"h-[11px] bg-purple-700 rounded-full",style:{width:"25%"}})})]})]})]})})}function dde({data:e}){const t=e?.amenity_summary?{amenitySummary:{totalBookings:e?.amenity_summary?.total_bookings??0,todayPaidRevenue:e?.amenity_summary?.today_paid_revenue??"0.00",growthPercentage:e?.amenity_summary?.growth_percentage??null,currencyType:e?.amenity_summary?.currency_type??"₹"},chartData:Array.isArray(e?.chart_data)?e.chart_data.map(f=>({facility_name:f?.facility_name,total_bookings:f?.total_bookings??0,paid_revenue:f?.paid_revenue??"0",isPaid:f?.is_paid===!0})):[]}:e||{},n=t?.amenitySummary||{},i=(Array.isArray(t?.chartData)?t.chartData:[]).map(f=>({...f,isPaid:f?.isPaid===!0})),o=i.length>0&&i.every(f=>f?.isPaid===!1),a=n?.totalBookings||0,s=i.reduce((f,p)=>{const m=p?.total_bookings||0;return f+m},0),l=i.map(f=>{const p=f?.total_bookings||0,m=f?.isPaid?`${n?.currencyType||"₹"} ${f?.paid_revenue||"0.00"}`:"",h=s>0?Math.round(p/s*100):0;return{name:f?.facility_name||"Unknown",bookings:p,revenue:m,percentage:h,color:f?.isPaid?"bg-violet-500":"bg-slate-400",isPaid:f?.isPaid}}),c=n?.growthPercentage;let u=null;if(typeof c=="number")u=c;else if(typeof c=="string"){const f=c.replace("%","").trim(),p=Number(f);u=isNaN(p)?null:p}const d=u!==null?u>=0:!0;return v.jsx(je,{className:"h-[324px]",title:"Amenities",period:"Today",icon:v.jsx(Aue,{className:"!text-[24px] text-[#8B5CF6]"}),children:v.jsxs("div",{className:"flex flex-col h-full",children:[v.jsxs("div",{className:"grid grid-cols-2 gap-6 mb-6",children:[v.jsxs("div",{children:[v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Total Bookings"}),v.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#8B5CF6]",children:a})]}),!o&&v.jsxs("div",{children:[v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Revenue Generated"}),v.jsxs("div",{className:"text-[28px] leading-[32px] font-medium text-[#329DFF]",children:[n?.currencyType||"₹"," ",n?.todayPaidRevenue??"0.00"]}),u!==null&&v.jsxs("div",{className:`inline-flex items-center gap-1 mt-2 text-[10px] leading-[14px] px-2 py-1 rounded-full ${d?"text-[#1FA05B] bg-green-50":"text-red-600 bg-red-50"}`,children:[d?v.jsx(oc,{}):v.jsx(rf,{}),u,"%",v.jsx("span",{children:"from last month"})]})]})]}),v.jsx("div",{className:"mt-[16px]",children:l.length>0?l.map((f,p)=>v.jsxs("div",{className:"mb-[16px]",children:[v.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[v.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:f?.name}),v.jsxs("div",{className:"font-medium text-[12px] leading-[16px]",children:[v.jsxs("div",{className:"text-[#64748B] inline",children:[f?.bookings," ",f?.bookings<=1?"booking":"bookings"]}),f?.isPaid&&v.jsx("div",{className:"mx-2 text-[#121212] inline",children:f?.revenue})]})]}),v.jsx("div",{className:"h-[11px] bg-gray-100 rounded-full",children:v.jsx("div",{className:`h-[11px] rounded-full ${f?.color}`,style:{width:`${f?.percentage}%`}})})]},p)):v.jsx("div",{className:"flex items-center justify-center h-[120px]",children:v.jsx("div",{className:"text-[12px] text-[#94A3B8]",children:"No amenity usage data available"})})})]})})}Fn.register(Oo,Eo,El,Vr,ei);function fde({data:e=[]}){const t=[{level:"L1",open:55,in_progress:22,on_hold:15,closed:6},{level:"L2",open:45,in_progress:25,on_hold:18,closed:5},{level:"L3",open:58,in_progress:23,on_hold:14,closed:6}],n=e.length>0?e:t,r=[],i=[],o=[],a=[],s=[];for(let u=0;u<n.length;u++)r.push(n[u].level),i.push(Number(n[u].open)),o.push(Number(n[u].in_progress)),a.push(Number(n[u].on_hold)),s.push(Number(n[u].cancelled));const l={labels:r,datasets:[{label:"Open",data:i,backgroundColor:"#3B82F6",borderColor:"#FFFFFF",borderWidth:2,barThickness:38,stack:"tickets"},{label:"In Progress",data:o,backgroundColor:"#F59E0B",borderColor:"#FFFFFF",borderWidth:2,barThickness:38,stack:"tickets"},{label:"On-Hold",data:a,backgroundColor:"#64748B",borderColor:"#FFFFFF",borderWidth:2,barThickness:38,stack:"tickets"},{label:"Cancelled",data:s,backgroundColor:"#FB2C36",borderColor:"#FFFFFF",borderWidth:2,barThickness:38,stack:"tickets"}]},c={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,pointStyle:"rectRot",padding:20,color:"#64748B"}},tooltip:{backgroundColor:"#0F172A",titleColor:"#fff",bodyColor:"#fff"}},scales:{x:{stacked:!0,grid:{display:!1},ticks:{color:"#64748B"}},y:{stacked:!0,beginAtZero:!0,grid:{display:!1,color:"#E5E7EB",borderDash:[4,4],drawBorder:!1},ticks:{color:"#64748B",stepSize:1,precision:0,callback:u=>Math.round(u)}}}};return v.jsx(je,{className:"h-[267px]",title:"Ticket Escalation Levels",period:"Today",icon:v.jsx(h3,{className:"!text-[24px] text-[#3C81F6]"}),children:v.jsx("div",{className:"h-full",children:v.jsx(Pl,{data:l,options:c})})})}const pde=({active:e,payload:t})=>{if(!e||!t||!t.length)return null;const n=t[0],r=n.payload.color;return v.jsx("div",{style:{backgroundColor:"#000000",color:"#ffffff",padding:"8px 10px",borderRadius:"8px",fontSize:"12px"},children:v.jsxs("div",{className:"flex items-center gap-2 font-medium",children:[v.jsx("div",{style:{width:"8px",height:"8px",borderRadius:"50%",backgroundColor:r}}),v.jsx("div",{children:n.name}),v.jsx("div",{className:"ml-2",children:n.value})]})})};function hde({data:e=null}){const n=e||{open:12,on_hold:5,cancelled:3,completed:156,in_progress:8,total_complaints:184},r=a=>{const s=Number(a);return isNaN(s)?0:s},i=[{name:"Completed",value:r(n.completed),color:"#10B981"},{name:"Open",value:r(n.open),color:"#3B82F6"},{name:"In Progress",value:r(n.in_progress),color:"#F59E0B"},{name:"On Hold",value:r(n.on_hold),color:"#6B7280"},{name:"Cancelled",value:r(n.cancelled),color:"#EF4444"}],o=r(n.total_complaints);return v.jsx(je,{className:"h-[267px]",title:"Ticket Status",period:"Today",icon:v.jsx(cg,{className:"!text-[24px] text-[#EF4444]"}),children:v.jsxs("div",{className:"flex h-full items-center gap-4",children:[v.jsxs("div",{className:"w-[202px] h-[170px] relative",children:[v.jsx(It,{width:"100%",height:"100%",children:v.jsxs(ho,{children:[v.jsx(Oi,{data:i,innerRadius:55,outerRadius:85,dataKey:"value",stroke:"#FFFFFF",strokeWidth:2,children:i.map((a,s)=>v.jsx(Ht,{fill:a.color},s))}),v.jsx(Vt,{content:v.jsx(pde,{}),wrapperStyle:{zIndex:1e3}})]})}),v.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[v.jsxs("div",{className:"flex items-baseline text-[18px] leading-[22px] font-medium text-[#121212]",children:[v.jsx("div",{children:r(n.completed)}),v.jsxs("div",{className:"text-[18.18px] leading-[22.22px] text-[#121212]",children:["/",o]})]}),v.jsx("div",{className:"text-[10.1px] leading-[14.14px] text-[#64748B]",children:"Completed"})]})]}),v.jsx("div",{className:"flex-1 space-y-2",children:i.map(a=>v.jsxs("div",{className:"flex items-center justify-between text-[12px] leading-[17px] mt-[12px]",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("div",{className:"h-[7px] w-[16px]",style:{backgroundColor:a.color}}),v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:a.name})]}),v.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px] font-medium",children:a.value})]},a.name))})]})})}const $I={visitorSummary:{totalVisitorsToday:150,peakTime:"2:00 - 4:00PM",peakCount:50,activeWalkins:18,preApprovedCheckins:3},popupData:{walkins:{currently_inside:18,total_visited_today:58},preApproved:{completed_visits:3,total_expected_today:5}},chart_data:[{hour:"10 AM",walkins:22,preApproved:30},{hour:"12 PM",walkins:15,preApproved:28},{hour:"2 PM",walkins:30,preApproved:38},{hour:"4 PM",walkins:45,preApproved:50},{hour:"6 PM",walkins:25,preApproved:40}]};function BI({title:e,color:t,rows:n=[],children:r}){const i=v.jsxs("div",{className:"bg-white rounded-xl min-w-[260px] p-4",children:[v.jsxs("div",{className:"flex items-center gap-2 font-medium text-[#121212]",children:[v.jsx(of,{className:`text-[20px] ${t}`}),v.jsx("div",{children:e??""})]}),v.jsx("div",{className:"mt-3 pt-3 border-t border-dashed border-gray-200 space-y-2",children:n?.map(({label:o,value:a,valueColor:s})=>v.jsxs("div",{className:"flex justify-between text-[14px]",children:[v.jsx("div",{children:o??""}),v.jsx("div",{className:"font-semibold",style:{color:s||"#121212"},children:a??0})]},o))})]});return v.jsx(wN,{content:i,placement:"right-start",interactive:!0,delay:[100,0],offset:[6,0],appendTo:()=>document.body,theme:"light-border",maxWidth:"none",children:r})}function mde({data:e}){const t=e&&Object.keys(e).length?e:$I,n=t?.visitor_summary?{totalVisitorsToday:t?.visitor_summary?.total_visitors_today??0,peakTime:t?.visitor_summary?.peak_time??"-"}:t?.visitorSummary??{},r=t?.walkins_popup_data?{walkins:{currently_inside:Number(t?.walkins_popup_data?.walkins_inside??0),total_visited_today:Number(t?.walkins_popup_data?.total_walkins??0)},preApproved:{completed_visits:Number(t?.pre_approved_popup_data?.pre_approved_check_ins??0),total_expected_today:Number(t?.pre_approved_popup_data?.total_pre_approved_check_ins??0)}}:t?.popupData??{},i=k.useMemo(()=>{const a=t?.chart_data??[];return a.length?a.map(s=>({time:s?.hour??"-",walkins:s?.walkins??0,approved:s?.pre_approved??s?.preApproved??0})):$I.chart_data},[t]),o=new Date().toLocaleTimeString("en-IN",{hour:"2-digit",minute:"2-digit",hour12:!0});return v.jsx(je,{className:"h-[377px]",title:"Visitor Updates",period:`Today at ${o}`,icon:v.jsx(of,{className:"!text-[24px] text-[#8B5CF6]"}),children:v.jsxs("div",{className:"flex flex-col mt-2",children:[v.jsxs("div",{className:"grid grid-cols-2 gap-y-4 gap-x-6 mb-6",children:[v.jsxs("div",{children:[v.jsx("div",{className:"text-[10px] text-[#64748B]",children:"Total Visitors"}),v.jsx("div",{className:"text-[20px] font-medium text-[#08B6D4]",children:n?.totalVisitorsToday??0})]}),v.jsxs("div",{children:[v.jsx("div",{className:"text-[10px] text-[#64748B]",children:"Peak Time"}),v.jsx("div",{className:"text-[20px] font-medium text-[#8B5CF6]",children:n?.peakTime??"-"})]}),v.jsxs("div",{className:"mt-2",children:[v.jsx("div",{className:"text-[10px] text-[#64748B]",children:"Active Walk-ins"}),v.jsxs("div",{className:"flex items-baseline text-xl font-medium leading-[32px]",children:[v.jsx("div",{className:"text-[28px] text-[#1FA05B] leading-[32px]",children:r?.walkins?.currently_inside??0}),v.jsx(BI,{title:"Active Walk-ins",color:"text-[#1FA05B]",rows:[{label:"Currently Inside",value:r?.walkins?.currently_inside??0,valueColor:"#1FA05B"},{label:"Total Visited Today",value:r?.walkins?.total_visited_today??0}],children:v.jsxs("div",{className:"text-[#64748B] cursor-pointer text-[20px] leading-[32px]",children:["/",r?.walkins?.total_visited_today??0]})})]})]}),v.jsxs("div",{className:"mt-2",children:[v.jsx("div",{className:"text-[10px] text-[#64748B]",children:"Pre-approved Check-ins"}),v.jsxs("div",{className:"flex items-baseline text-xl font-medium leading-[32px]",children:[v.jsx("div",{className:"text-[28px] text-[#E7A015] leading-[32px]",children:r?.preApproved?.completed_visits??0}),v.jsx(BI,{title:"Pre-approved Check-ins",color:"text-[#E7A015]",rows:[{label:"Completed Visits",value:r?.preApproved?.completed_visits??0,valueColor:"#E7A015"},{label:"Total Expected Check-ins Today",value:r?.preApproved?.total_expected_today??0}],children:v.jsxs("div",{className:"text-[#64748B] cursor-pointer text-[20px] leading-[32px]",children:["/",r?.preApproved?.total_expected_today??0]})})]})]})]}),v.jsx("div",{className:"w-full h-[179px]",children:v.jsx(It,{width:"100%",height:"100%",children:v.jsxs(R0,{data:i??[],children:[v.jsx(Rr,{stroke:"#E5E7EB",strokeDasharray:"4 4",vertical:!1}),v.jsx(vr,{dataKey:"time",axisLine:!1,tickLine:!1,tick:{fill:"#121212",fontSize:12}}),v.jsx(Gn,{width:30,axisLine:!1,tickLine:!1,tick:{fill:"#64748B",fontSize:12}}),v.jsx(Vt,{}),v.jsx(Qo,{type:"monotone",dataKey:"walkins",stroke:"#22C55E",strokeWidth:2,dot:!1}),v.jsx(Qo,{type:"monotone",dataKey:"approved",stroke:"#F59E0B",strokeWidth:2,strokeDasharray:"5 5",dot:!1})]})})})]})})}const gde=({color:e})=>v.jsx("span",{style:{display:"inline-block",width:"8px",height:"8px",borderRadius:"50%",backgroundColor:e,marginRight:"6px"}}),vde=({active:e,payload:t})=>!e||!t||!t.length?null:v.jsx("div",{className:"bg-black text-white !text-[12px] px-3 py-2 rounded-lg shadow-lg",children:t.map((n,r)=>v.jsxs("div",{className:"capitalize flex gap-[4px] items-center leading-relaxed",children:[v.jsx(gde,{color:n.color}),n.name,": ",v.jsx("div",{className:"font-semibold",children:n.value})]},r))});function yde({data:e=null}){const n=e||{card_entry:60,mobile_entry:35,card_exit:15,mobile_exit:10,total:20.3},r=a=>{const s=Number(a);return isNaN(s)?0:s},i=[{name:"Card Entry",value:r(n.card_entry),color:"#329DFF"},{name:"Mobile Entry",value:r(n.mobile_entry),color:"#8B5CF6"},{name:"Card Exit",value:r(n.card_exit),color:"#B1D2F0"},{name:"Mobile Exit",value:r(n.mobile_exit),color:"#DACBFB"}],o=r(n.total);return v.jsx(mn,{className:"h-[362px]",title:"Access Overview",titleWeight:"semi-bold",children:v.jsxs("div",{className:"flex flex-col items-center mt-[16px]",children:[v.jsxs("div",{className:"relative w-[200px] h-[200px]",children:[v.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:v.jsx("div",{className:"w-[130px] h-[130px] rounded-full shadow-[0px_12px_35px_rgba(0,0,0,0.12)]"})}),v.jsx("div",{className:"h-[184px]",children:v.jsx(It,{width:"100%",height:"100%",children:v.jsxs(ho,{children:[v.jsx(Oi,{data:i,dataKey:"value",innerRadius:65,outerRadius:90,startAngle:110,endAngle:-250,paddingAngle:2,stroke:"transparent",children:i.map((a,s)=>v.jsx(Ht,{fill:a.color},s))}),v.jsx(Vt,{content:v.jsx(vde,{}),wrapperStyle:{zIndex:9999}})]})})}),v.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[v.jsxs("div",{className:"text-[20px] leading-[24px] font-semibold text-[#121212]",children:[o,"L"]}),v.jsx("div",{className:"text-[10px] leading-[15px] text-[#64748B]",children:"Total Access"})]})]}),v.jsx("div",{className:"mt-[32px] grid grid-cols-2 gap-x-[20px] gap-y-[12px] text-[12px] text-[#94A3B8]",children:i.map(a=>v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("div",{className:"w-[16px] h-[7px] ",style:{backgroundColor:a.color}}),v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:a.name})]},a.name))})]})})}function WI({title:e="Access",data:t=[],height:n="h-[362px]"}){const r=i=>i==null?"0":Number(i).toLocaleString();return v.jsx(mn,{className:n,title:e,titleWeight:"semi-bold",children:v.jsxs("div",{className:"rounded-xl overflow-hidden mt-[16px]",children:[v.jsxs("div",{className:"grid grid-cols-2 bg-[#F8FAFC] py-[8px] px-[12px] text-[12px] leading-[16px] font-medium text-[#64748B]",children:[v.jsx("div",{children:"Point"}),v.jsx("div",{className:"text-right",children:"Access"})]}),t.map((i,o)=>v.jsxs("div",{className:"grid grid-cols-2 p-[12px] text-[14px] border-t border-[#E2E8F0]",children:[v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:i.label}),v.jsx("div",{className:"text-[12px] leading-[16px] text-right font-medium",style:{color:i.color||"#000"},children:r(i.value)})]},o))]})})}function bde({data:e=[]}){const t=[{name:"Google",value:82e3},{name:"Uber",value:67e3},{name:"ANAROCK",value:6e4},{name:"Flipkart",value:48e3},{name:"HP",value:41e3},{name:"Myntra",value:3e4},{name:"Cloudscape",value:2e4},{name:"Infosys",value:9e3}],n=e.length?e:t,r=o=>o>=1e3?`${o/1e3}K`:o,i=Math.max(...n.map(o=>o.value));return v.jsx(mn,{title:"Access Points Usage",titleWeight:"semi-bold",className:"h-[362px]",children:v.jsx("div",{className:"mt-[24px] h-[270px] w-full",children:v.jsx(It,{width:"100%",height:"100%",children:v.jsxs(Zo,{data:n,barSize:60,margin:{top:0,right:0,left:-20,bottom:0},children:[v.jsx(Rr,{strokeDasharray:"8 8",vertical:!1}),v.jsx(x0,{y:0,stroke:"#EBEBEB",strokeDasharray:"0"}),v.jsx(vr,{dataKey:"name",tick:{fontSize:12,fill:"#64748B"},axisLine:!1,tickLine:!1}),v.jsx(Gn,{tickFormatter:r,tick:{fontSize:12,fill:"#64748B"},axisLine:!1,tickLine:!1}),v.jsx(Vt,{cursor:!1}),v.jsx(Ln,{dataKey:"value",barSize:60,children:n.map((o,a)=>v.jsx(Ht,{fill:o.value===i?"#3C81F6":"#79ABFF"},`cell-${a}`))})]})})})})}function Po({image:e="https://cdni.iconscout.com/illustration/premium/thumb/businessman-sad-for-no-data-in-folder-illustration-svg-download-png-10155562.png",title:t="No Data Available",description:n="Catch up all the data. Change the date range to see the data."}){return v.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center px-4",children:[v.jsx("img",{src:e,alt:"no data",className:"w-32 h-32 mb-4 opacity-80"}),v.jsx("h3",{className:"text-[16px] font-semibold text-gray-900 mb-1",children:t}),v.jsx("p",{className:"text-sm text-gray-500 max-w-[260px]",children:n})]})}const xde=({active:e,payload:t})=>e&&t&&t.length?v.jsx("div",{className:"bg-black text-white px-4 py-2 rounded-lg text-sm shadow-lg",children:v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("div",{children:t[0].payload.name}),v.jsx("div",{className:"font-semibold",children:t[0].value})]})}):null,wde=({x:e,y:t,payload:n})=>{const r=n.value.split(" ");return v.jsx("g",{transform:`translate(${e},${t})`,children:v.jsx("text",{x:-85,y:0,textAnchor:"start",fill:"#121212",fontSize:14,children:r.map((i,o)=>v.jsx("tspan",{x:-85,dy:o===0?0:16,children:i},o))})})};function _de({data:e=[]}){const t=e&&e.length>0,n=e.map(i=>({name:i.category_name,value:i.total_complaints})),r=Math.max(...n.map(i=>i.value),0);return v.jsx(mn,{title:"Tickets per Category",className:"h-[362px]",titleWeight:"semi-bold",childrenClassName:"h-full",children:t?v.jsx("div",{className:"w-full h-[280px] mt-[28px]",children:v.jsx(It,{width:"100%",height:"100%",children:v.jsxs(Zo,{data:n,layout:"vertical",children:[v.jsx(Rr,{strokeDasharray:"3 3",horizontal:!1}),v.jsx(vr,{type:"number",domain:[0,Math.ceil(r*1.2)||10],tick:{fill:"#94A3B8",fontSize:12},axisLine:!0,tickLine:!1,allowDecimals:!1}),v.jsx(Gn,{type:"category",dataKey:"name",axisLine:!1,tickLine:!1,width:120,tick:v.jsx(wde,{})}),v.jsx(Vt,{content:v.jsx(xde,{}),cursor:{fill:"transparent"}}),v.jsx(Ln,{dataKey:"value",barSize:36,children:n.map((i,o)=>v.jsx(Ht,{fill:i.value===r?"#3C81F6":"#79ABFF"},`cell-${o}`))})]})})}):v.jsx(Po,{title:"No Tickets Found",description:"Catch up all the data. Change the date range to see the data."})})}function Sde({icon:e,iconColor:t="#329DFF",title:n,value:r,percentage:i,percentageText:o}){const a=parseFloat(i),s=a>=0,l=s?"#16A34A":"#DC2626";return v.jsxs("div",{className:"relative bg-white rounded-[12px] shadow-[0_0_12px_0_#EAF2FF] p-[16px]",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[e&&v.jsx("div",{className:"h-[20px] w-[20px]",style:{color:t,display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsx(e,{className:"h-[20px] w-[20px]"})}),v.jsx("div",{className:"text-[16px] leading-[20px] font-medium text-[#64748B]",children:n})]}),v.jsx("div",{className:"mt-[16px] text-[28px] leading-[32px] font-medium text-[#121212]",children:r}),(i||o)&&v.jsxs("div",{className:"mt-[12px] flex items-center gap-2",children:[i&&v.jsxs("div",{className:"flex items-center gap-[4px] text-[12px] leading-[16px] font-medium",style:{color:l},children:[s?v.jsx(oc,{}):v.jsx(rf,{}),Math.abs(a),"%"]}),o&&v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:o})]})]})}const Ode=({data:e=[],onDateChange:t})=>{const[n,r]=k.useState(new Date),[i,o]=k.useState(!1),s=(g=>{const b=new Date(g);return b.setDate(b.getDate()-6),b})(n),l=g=>{try{return g.toLocaleDateString("en-GB",{day:"2-digit",month:"short"})}catch{return""}},c=g=>{const b=new Date(g),S=new Date(b);S.setDate(S.getDate()-6),t&&t(S.toISOString(),b.toISOString())},u=()=>{const g=new Date(n);g.setDate(g.getDate()-7),r(g),c(g)},d=()=>{const g=new Date(n);g.setDate(g.getDate()+7),r(g),c(g)},f=()=>{o(g=>!g)},p=g=>{const b=g||new Date;r(b),c(b),o(!1)},m=Array.isArray(e)?e:[],h=!m.length||m.every(g=>g.no_of_visitors===0);return v.jsxs(mn,{title:"Weekly Visitor Pattern",period:`${l(s)} - ${l(n)}`,isDateSelector:!0,titleWeight:"semi-bold",className:"h-[360px]",childrenClassName:"mt-6",onPrevClick:u,onNextClick:d,onCalendarClick:f,children:[i&&v.jsx("div",{className:"absolute top-[70px] right-[24px] z-50 bg-white shadow-lg rounded-lg",children:v.jsx(bS,{selected:n,onChange:p,inline:!0})}),h?v.jsx("div",{className:"w-full h-[260px] flex items-center justify-center",children:v.jsx(Po,{title:"No Visitors Found",description:"Catch up all the data. Change the date range to see the data."})}):v.jsx("div",{className:"w-full h-[260px]",children:v.jsx(It,{width:"100%",height:"100%",children:v.jsxs(Yte,{data:m,margin:{top:10,right:10,left:0,bottom:0},children:[v.jsx("defs",{children:v.jsxs("linearGradient",{id:"colorVisitors",x1:"0",y1:"0",x2:"0",y2:"1",children:[v.jsx("stop",{offset:"0%",stopColor:"#6366F1",stopOpacity:.25}),v.jsx("stop",{offset:"100%",stopColor:"#6366F1",stopOpacity:0})]})}),v.jsx(Rr,{strokeDasharray:"3 3",vertical:!1,stroke:"#F1F5F9"}),v.jsx(vr,{dataKey:"day",type:"category",scale:"point",padding:{left:20,right:20},tick:{fontSize:12,fill:"#64748B"},axisLine:!0,tickLine:!1,tickFormatter:g=>new Date(g).toLocaleDateString("en-GB",{day:"2-digit",month:"short"})}),v.jsx(Gn,{width:35,tick:{fontSize:12,fill:"#64748B"},axisLine:!1,tickLine:!1,allowDecimals:!1,domain:[0,"dataMax + 2"]}),v.jsx(Vt,{labelFormatter:g=>new Date(g).toLocaleDateString("en-GB",{day:"2-digit",month:"short"}),formatter:g=>[g,"Visitors"]}),v.jsx(lT,{type:"monotone",dataKey:"no_of_visitors",stroke:"#6366F1",strokeWidth:2,fill:"url(#colorVisitors)",dot:{r:5,stroke:"#6366F1",strokeWidth:2,fill:"#fff"},activeDot:{r:6}})]})})})]})},Ede=[{building_name:"Google",no_of_visitors:1e3},{building_name:"Uber",no_of_visitors:3500},{building_name:"ANAROCK",no_of_visitors:2e3},{building_name:"Flipkart",no_of_visitors:8e3},{building_name:"HP",no_of_visitors:1650}],Pde=({data:e})=>{const t=Array.isArray(e)&&e?.length===0,n=e==null?Ede:Array.isArray(e)?e:[];let r=0;for(let i=0;i<(n?.length||0);i++){const o=Number(n?.[i]?.no_of_visitors)||0;o>r&&(r=o)}return v.jsx(mn,{title:"Organisation Wise Visitors",titleWeight:"semi-bold",className:"h-[360px]",childrenClassName:"mt-6",children:v.jsx("div",{className:"w-full h-[260px] flex items-center justify-center",children:t?v.jsx(Po,{title:"No Visitors Found",description:"Catch up all the data. Change the date range to see the data."}):v.jsx(It,{width:"100%",height:"100%",children:v.jsxs(Zo,{data:n||[],margin:{top:10,right:10,left:0,bottom:0},barCategoryGap:35,children:[v.jsx(Rr,{strokeDasharray:"3 3",vertical:!1,stroke:"#F1F5F9"}),v.jsx(vr,{dataKey:"building_name",tick:{fontSize:12,fill:"#64748B"},axisLine:!0,tickLine:!1}),v.jsx(Gn,{width:40,tick:{fontSize:12,fill:"#64748B"},axisLine:!1,tickLine:!1,allowDecimals:!1}),v.jsx(Vt,{cursor:!1}),v.jsx(Ln,{dataKey:"no_of_visitors",name:"Visitors",maxBarSize:55,children:n?.map?.((i,o)=>v.jsx(Ht,{fill:(i?.no_of_visitors||0)===r?"#3B82F6":"#7FB0FF"},`cell-${o}`))})]})})})})};function kde({data:e}){return v.jsx("div",{className:"h-full",children:e.map((t,n)=>{const r=parseFloat(t.delta),i=r>=0;return v.jsx(je,{iconClassName:"!gap-[8px]",title:v.jsx("div",{className:"text-[#64748B]",children:t.title}),icon:v.jsx(t.Icon,{className:"h-[20px] w-[20px]",style:{color:t.iconColor||"#000000"}}),className:"h-[132px]",children:v.jsxs("div",{children:[v.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t.value}),v.jsxs("div",{className:`flex items-center pt-[8px] text-[12px] leading-[16px] ${t.delta?"gap-[8px]":""}`,children:[t.delta&&v.jsxs("div",{className:"flex items-center gap-[4px]",style:{color:i?"#1FA05B":"#E11D48",fontWeight:500},children:[i?v.jsx(oc,{}):v.jsx(rf,{}),Math.abs(r),"%"]}),v.jsx("div",{style:{color:"#64748B"},children:t.deltaLabel})]})]})},n)})})}const Cde=[{facility_name:"Table Tennis",total_booking:5},{facility_name:"Gym",total_booking:12},{facility_name:"Meeting Room A",total_booking:3},{facility_name:"Conference Hall",total_booking:8}],Dde=({x:e,y:t,payload:n})=>v.jsx("foreignObject",{x:(e||0)-80,y:(t||0)-18,width:80,height:40,children:v.jsx("div",{className:"text-[12px] leading-[16px] text-[#121212]",style:{width:"80px",whiteSpace:"normal",wordBreak:"break-word",textAlign:"left"},children:n?.value||""})});function Ade({data:e}){const t=Array?.isArray(e)&&e?.length===0,n=e==null?Cde:Array?.isArray(e)?e:[],r=n?.length>0?Math.max(...n?.map?.(i=>i?.total_booking||0)||[0],0):0;return v.jsx(je,{title:"Bookings",icon:v.jsx(Due,{size:18,className:"text-[#DBB467]"}),className:"h-[288px]",children:v.jsx("div",{className:"w-full h-full flex items-center justify-center",children:t?v.jsx(Po,{title:"No Booking Found",description:"Catch up all the data. Change the date range to see the data."}):v.jsx(It,{width:"100%",height:"100%",children:v.jsxs(Zo,{data:n||[],layout:"vertical",margin:{top:0,right:10,left:10,bottom:0},children:[v.jsx(vr,{type:"number",allowDecimals:!1,domain:[0,Math.ceil(r||0)],tick:{fill:"#64748B",fontSize:12},axisLine:!0,tickLine:!1}),v.jsx(Gn,{type:"category",dataKey:"facility_name",axisLine:!1,tickLine:!1,width:100,tick:v.jsx(Dde,{})}),v.jsx(Vt,{formatter:i=>[i,"Bookings"],cursor:{fill:"rgba(0,0,0,0.05)"}}),v.jsx(Ln,{dataKey:"total_booking",barSize:40,children:n?.map?.((i,o)=>v.jsx(Ht,{fill:(i?.total_booking||0)===r?"#3C81F6":"#79ABFF"},`cell-${o}`))})]})})})})}const Tde=[{building_name:"Google",no_of_booking:1},{building_name:"Uber",no_of_booking:2},{building_name:"ANAROCK",no_of_booking:4},{building_name:"Flipkart",no_of_booking:2},{building_name:"HP",no_of_booking:1}];function Mde({data:e}){const t=Array.isArray(e)&&e?.length===0,n=e==null?Tde:Array.isArray(e)?e:[],r=n?.length>0?Math.max(...n?.map?.(i=>i?.no_of_booking||0)||[0],0):0;return v.jsx(mn,{title:"Booking Trend by Organisation",titleWeight:"semi-bold",className:"h-[362px]",children:v.jsx("div",{className:"w-full h-[280px] flex items-center justify-center",children:t?v.jsx(Po,{title:"No Booking Found",description:"Catch up all the data. Change the date range to see the data."}):v.jsx(It,{width:"100%",height:"100%",children:v.jsxs(Zo,{data:n||[],margin:{top:0,right:0,left:-15,bottom:0},children:[v.jsx(Rr,{strokeDasharray:"3 3",vertical:!1,stroke:"#E5E7EB"}),v.jsx(vr,{dataKey:"building_name",axisLine:!1,tickLine:!1,tick:{fill:"#64748B",fontSize:12}}),v.jsx(Gn,{allowDecimals:!1,domain:[0,Math.ceil(r||0)],axisLine:!1,tickLine:!1,tick:{fill:"#64748B",fontSize:12},tickFormatter:i=>`${i??0}`}),v.jsx(Vt,{formatter:i=>[i,"Bookings"],labelFormatter:i=>`Organisation: ${i}`,cursor:{fill:"rgba(0,0,0,0.05)"}}),v.jsx(Ln,{dataKey:"no_of_booking",barSize:54,children:n?.map?.((i,o)=>v.jsx(Ht,{fill:(i?.no_of_booking||0)===r?"#3C81F6":"#79ABFF"},`cell-${o}`))})]})})})})}const Nde=[{facility_name:"Table Tennis",paid_revenue:"24000.00"},{facility_name:"Games Room",paid_revenue:"14000.00"},{facility_name:"Badminton",paid_revenue:"10000.00"},{facility_name:"GYM",paid_revenue:"4000.00"}],Gh=["#3C81F6","#60A5FA","#95BFFA","#BEDAFE","#DAE6FC"];function jde({data:e}){const t=Array?.isArray(e)&&e?.length===0,n=e??Nde,r=Array?.isArray(n)&&n?.length>0?n?.map(s=>({name:s?.facility_name||"Unknown",value:Number(s?.paid_revenue)||0})):[],o=(r?.length>0?r?.every(s=>s?.value===0):!1)?r?.map((s,l)=>({...s,value:l===0?1:0})):r,a=s=>`₹ ${s?.toLocaleString?.("en-IN")||0}`;return v.jsx(mn,{title:"Amenity Wise Revenue",titleWeight:"semi-bold",className:"h-[362px]",children:v.jsx("div",{className:"grid grid-cols-12 gap-6 items-center h-full",children:t?v.jsx("div",{className:"col-span-12 flex items-center justify-center h-[240px]",children:v.jsx(Po,{title:"No Amenity Found",description:"Catch up all the data. Change the date range to see the data."})}):v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"col-span-5 h-[240px]",children:v.jsx(It,{width:"100%",height:"100%",children:v.jsxs(ho,{children:[v.jsx(Oi,{data:o||[],dataKey:"value",nameKey:"name",cx:"50%",cy:"50%",outerRadius:95,stroke:"#fff",strokeWidth:1,children:o?.map?.((s,l)=>v.jsx(Ht,{fill:Gh?.[l%Gh?.length]},`cell-${l}`))}),v.jsx(Vt,{formatter:s=>a(s),labelFormatter:s=>`Amenity: ${s||""}`,contentStyle:{borderRadius:"10px",border:"1px solid #EBEBEB",fontSize:"12px"}})]})})}),v.jsx("div",{className:"col-span-7",children:v.jsxs("div",{className:"rounded-[12px] overflow-hidden",children:[v.jsxs("div",{className:"grid grid-cols-2 px-[12px] py-[8px] bg-[#EBEBEB] text-[12px] leading-[16px] font-semibold text-[#64748B]",children:[v.jsx("div",{children:"Amenity"}),v.jsx("div",{className:"text-right",children:"Revenue"})]}),v.jsx("div",{className:"divide-y divide-[#F1F5F9]",children:r?.map?.((s,l)=>v.jsxs("div",{className:"grid grid-cols-2 px-4 py-4 text-[14px] text-[#121212]",children:[v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx("span",{className:"w-[16px] h-[7px]",style:{backgroundColor:Gh?.[l%Gh?.length]}}),v.jsx("span",{className:"text-[#64748B] text-[12px] leading-[16px]",children:s?.name||"Unknown"})]}),v.jsx("div",{className:"text-right text-[12px] leading-[16px] text-[#64748B]",children:a(s?.value||0)})]},s?.name||l))})]})})]})})})}const Xh=["#8CB33E","#F59E0B","#3B82F6","#06B6D4","#CFCFCF"],Ide=[{asset_group_name:"Lifts",asset_count:3},{asset_group_name:"Fire Systems",asset_count:16},{asset_group_name:"Generators",asset_count:16},{asset_group_name:"HVAC",asset_count:24},{asset_group_name:"Others",asset_count:97}],Rde=({rows:e,totalAssets:t})=>{const n=k.useMemo(()=>e?e.length===0?[]:e.map((i,o)=>({name:i.asset_group_name,value:i.asset_count||0,color:Xh[o%Xh.length]})):Ide.map((i,o)=>({name:i.asset_group_name,value:i.asset_count||0,color:Xh[o%Xh.length]})),[e]),r=t??n.reduce((i,o)=>i+o.value,0);return e&&e.length===0?v.jsx(mn,{title:"Assets by Type",titleWeight:"semi-bold",className:"h-full",children:v.jsx("div",{className:"flex items-center justify-center h-full",children:v.jsx(Po,{title:"No Assets Found",description:"Catch up all the data. Change the date range to see the data."})})}):v.jsx(mn,{title:"Assets by Type",titleWeight:"semi-bold",className:"h-full",children:v.jsxs("div",{className:"flex items-center justify-between gap-8",children:[v.jsxs("div",{className:"relative w-[240px] h-[240px]",children:[v.jsx(It,{width:"100%",height:"100%",children:v.jsx(ho,{children:v.jsx(Oi,{data:n,dataKey:"value",cx:"50%",cy:"50%",innerRadius:60,outerRadius:90,paddingAngle:2,stroke:"#FFFFFF",strokeWidth:2,startAngle:90,endAngle:-270,children:n.map((i,o)=>v.jsx(Ht,{fill:i.color},o))})})}),v.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[v.jsx("div",{className:"text-[24px] text-[#121212]",children:r}),v.jsx("div",{className:"text-[12px] text-[#94A3B8] mt-1",children:"Total Assets"})]})]}),v.jsx("div",{className:"flex-1 max-w-[280px]",children:v.jsxs("div",{className:"rounded-[12px] overflow-hidden bg-white",children:[v.jsxs("div",{className:"flex items-center justify-between px-4 py-3 bg-[#F8FAFC]",children:[v.jsx("div",{className:"text-[12px] font-medium text-[#64748B]",children:"Asset"}),v.jsx("div",{className:"text-[12px] font-medium text-[#64748B]",children:"Count"})]}),n.map((i,o)=>v.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-t border-[#F1F5F9]",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("div",{className:"w-[16px] h-[7px]",style:{backgroundColor:i.color}}),v.jsx("div",{className:"text-[13px] text-[#475569]",children:i.name})]}),v.jsx("div",{className:"text-[13px] text-[#64748B]",children:i.value})]},o))]})})]})})},Lde=({data:e})=>{const[t,n]=k.useState({}),r=[{name:"Lifts",Cancelled:55,Closed:45,Open:50,OnHold:20,InProgress:10},{name:"Fire Systems",Cancelled:15,Closed:45,Open:15,OnHold:8,InProgress:5},{name:"Generators",Cancelled:12,Closed:45,Open:75,OnHold:18,InProgress:7},{name:"HVAC",Cancelled:45,Closed:80,Open:30,OnHold:22,InProgress:12},{name:"Others",Cancelled:18,Closed:18,Open:45,OnHold:9,InProgress:4}],i=k.useMemo(()=>e?Array.isArray(e)&&e.length===0?[]:e:r,[e]),o=a=>{const{dataKey:s}=a;n(l=>({...l,[s]:!l[s]}))};return Array.isArray(e)&&e.length===0?v.jsx(mn,{title:"Maintenance Status",titleWeight:"semi-bold",className:"h-full",children:v.jsx("div",{className:"w-full h-[260px] flex items-center justify-center",children:v.jsx(Po,{title:"No Maintenance Assets Status Found",description:"Catch up all the data. Change the date range to see the data."})})}):v.jsx(mn,{title:"Maintenance Status",titleWeight:"semi-bold",className:"h-full",children:v.jsx("div",{className:"w-full h-[260px] flex items-center justify-center",children:Array.isArray(e)&&e.length===0?v.jsx("div",{className:"text-[#94A3B8] text-sm",children:"No Data Found"}):v.jsx(It,{width:"100%",height:"100%",children:v.jsxs(Zo,{data:i,barSize:50,margin:{top:0,right:0,left:-30,bottom:0},children:[v.jsx(Rr,{strokeDasharray:"3 3",vertical:!1}),v.jsx(vr,{dataKey:"name",tick:{fill:"#64748B",fontSize:12},axisLine:!1,tickLine:!1}),v.jsx(Gn,{tick:{fill:"#64748B",fontSize:12},axisLine:!1,tickLine:!1,allowDecimals:!1}),v.jsx(Vt,{cursor:{fill:"rgba(148, 163, 184, 0.12)"},contentStyle:{borderRadius:"10px",border:"1px solid #E2E8F0",fontSize:"12px"}}),v.jsx(Hf,{verticalAlign:"bottom",align:"center",iconType:"square",onClick:o,formatter:a=>v.jsx("div",{style:{color:t[a]?"#CBD5E1":"#64748B",cursor:"pointer",fontSize:"12px",display:"inline-flex",alignItems:"center"},children:a}),wrapperStyle:{paddingTop:"18px"}}),v.jsx(Ln,{dataKey:"Open",stackId:"a",fill:"#3B82F6",hide:t.Open}),v.jsx(Ln,{dataKey:"Closed",stackId:"a",fill:"#10B981",hide:t.Closed}),v.jsx(Ln,{dataKey:"Cancelled",stackId:"a",fill:"#B91C1C",hide:t.Cancelled}),v.jsx(Ln,{dataKey:"OnHold",stackId:"a",fill:"#64748B",hide:t.OnHold}),v.jsx(Ln,{dataKey:"InProgress",stackId:"a",fill:"#F59E0B",hide:t.InProgress})]})})})})};function Fde({data:e}){const t=[{name:"Completed",value:Number(e?.completed||0),color:"#12B981"},{name:"Delayed",value:Number(e?.not_completed||0),color:"#EF4444"},{name:"Missed",value:Number(e?.missed||0),color:"#F69E0A"}],n=Number(e?.completed||0)+Number(e?.not_completed||0)+Number(e?.missed||0),r=Number(e?.completed||0);return v.jsx(mn,{title:"Guard Patrols",className:"h-[362px]",titleWeight:"semi-bold",children:v.jsxs("div",{className:"flex flex-col items-center justify-center",children:[v.jsxs("div",{className:"w-[215px] h-[182px] relative",children:[v.jsx(It,{width:"100%",height:"100%",children:v.jsxs(ho,{children:[v.jsx(Oi,{data:t,innerRadius:60,outerRadius:90,paddingAngle:2,dataKey:"value",nameKey:"name",children:t.map((i,o)=>v.jsx(Ht,{fill:i.color},`cell-${o}`))}),v.jsx(Vt,{formatter:i=>i.toLocaleString()})]})}),v.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[v.jsxs("div",{className:"font-medium text-[19.35px] leading-[23.65px]",children:[r,"/",n]}),v.jsx("div",{className:"text-[10.75px] leading-[15.05px] text-[#64748B]",children:"Completed"})]})]}),v.jsx("div",{className:"flex flex-col w-full text-[14px]",children:t.map((i,o)=>v.jsxs("div",{className:`flex items-center justify-between py-[10px] ${o!==t.length-1?"border-b border-[#F1F5F9]":""}`,children:[v.jsxs("div",{className:"flex items-center gap-[10px]",children:[v.jsx("div",{className:"inline-block w-[16px] h-[7px]",style:{backgroundColor:i.color}}),v.jsx("div",{className:"leading-[16.09px] text-[12.07px] text-[#64748B]",children:i.name})]}),v.jsx("div",{className:"leading-[16.09px] text-[12.07px] text-[#64748B]",children:i.value})]},i.name))})]})})}function $de({incidentReports:e,incidentReportsDetails:t}){const n=Number(e?.open||0),r=Number(e?.in_progress||0),i=Number(e?.closed||0);return v.jsx(mn,{title:"Incident Reports",className:"h-[362px]",titleWeight:"semi-bold",children:v.jsxs("div",{children:[v.jsxs("div",{className:"flex w-full text-center gap-[24px]",children:[v.jsxs("div",{className:"flex-1 py-3 bg-[#FBF4F4] h-[76px] rounded",children:[v.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#AB0000]",children:n}),v.jsx("div",{className:"!text-[12px] leading-[16px] text-[#AB0000]",children:"Open"})]}),v.jsxs("div",{className:"flex-1 py-3 bg-[#FFFBF2] h-[76px] rounded",children:[v.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#E7A015]",children:r}),v.jsx("div",{className:"!text-[12px] leading-[16px] text-[#E7A015]",children:"In-progress"})]}),v.jsxs("div",{className:"flex-1 py-3 bg-[#F7FEFA] h-[76px] rounded",children:[v.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#1FA05B]",children:i}),v.jsx("div",{className:"!text-[12px] leading-[16px] text-[#1FA05B]",children:"Closed"})]})]}),v.jsx("div",{className:"mt-4 space-y-2",children:t?.length>0?t.map((o,a)=>{const s=o?.severity==="Danger"?"text-[#AB0000]":o?.severity==="High"?"text-[#E7A015]":"text-[#1FA05B]";return v.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#FAFBFD] rounded-md",children:[v.jsx("div",{className:"flex items-center gap-[8px]",children:v.jsx("div",{className:"text-gray-700 font-medium",children:o?.incident_code})}),v.jsx("div",{className:`!text-[12px] font-semibold flex items-center gap-[4px] ${s}`,children:v.jsxs("div",{children:[o?.severity_level," - ",o?.severity]})})]},a)}):v.jsx("div",{className:"text-[16px] text-center text-gray-400 text-sm py-6",children:"No incidents found"})})]})})}function Bde({columns:e=[{key:"a",label:"Organisation"},{key:"b",label:"Item"},{key:"c",label:"Orders"},{key:"d",label:"Revenue"},{key:"e",label:"AOV"},{key:"f",label:"% Revenue"}],data:t=[{a:"Google",b:"Coffee",c:"34,908",d:"₹ 57,21,288",e:"₹ 450",f:"43.6%"},{a:"Uber",b:"Paneer Combo",c:"12,000",d:"₹ 12,00,000",e:"₹ 500",f:"100%"}],rowsPerPage:n=10,setRowsPerPage:r=()=>{},currentPage:i=1,setCurrentPage:o=()=>{},pageOptions:a=[10,20,30,40,50]}){const s=Array.isArray(t)?t:[],l=Array.isArray(e)?e:[],c=n>0?Math.ceil(s.length/n):1,u=(i-1)*n,d=u+n,f=s.slice(u,d);return v.jsxs("div",{className:"w-full bg-white rounded-xl h-[390px] shadow-md overflow-hidden flex flex-col",children:[v.jsx("div",{className:"grid bg-slate-600 text-white text-sm font-medium",style:{gridTemplateColumns:`repeat(${l.length}, 1fr)`},children:l.map((p,m)=>v.jsx("div",{className:"px-6 py-4",children:p.label},m))}),v.jsx("div",{className:"flex-1 overflow-y-auto",children:f.length>0?f.map((p,m)=>v.jsx("div",{className:"grid text-sm text-gray-700 hover:bg-gray-50 transition",style:{gridTemplateColumns:`repeat(${l.length}, 1fr)`},children:l.map((h,g)=>{const b=p[h.key],S=typeof b=="string"&&b.includes("%"),w=b==="100%"?"bg-green-100 text-green-600":"bg-red-100 text-red-600";return v.jsx("div",{className:"px-6 py-4 bg-gray-50",children:S?v.jsx("div",{className:`inline-block px-3 py-1 rounded-full text-xs font-semibold ${w}`,children:b}):v.jsx("div",{children:b??"-"})},g)})},m)):v.jsx(Po,{title:"No Data Found",description:"Catch up all the data. Change the date range to see the data."})}),v.jsxs("div",{className:"flex justify-end items-center px-6 py-4 text-sm bg-white gap-8",children:[v.jsxs("div",{className:"flex items-center gap-2 text-gray-600",children:[v.jsx("div",{children:"Rows per page:"}),v.jsx("select",{value:n,onChange:p=>{r(Number(p.target.value)),o(1)},className:"border rounded px-2 py-1",children:a.map((p,m)=>v.jsx("option",{value:p,children:p},m))}),v.jsxs("div",{className:"ml-4",children:[s.length===0?"0–0":`${u+1}–${Math.min(d,s.length)}`," ","of ",s.length]})]}),v.jsxs("div",{className:"flex items-center space-x-2 text-gray-600",children:[v.jsx("button",{onClick:()=>o(1),disabled:i===1,className:"p-2 rounded hover:bg-gray-100 disabled:opacity-40",children:v.jsx(kue,{size:18})}),v.jsx("button",{onClick:()=>o(p=>p-1),disabled:i===1,className:"p-2 rounded hover:bg-gray-100 disabled:opacity-40",children:v.jsx(NI,{size:18})}),v.jsx("button",{onClick:()=>o(p=>p+1),disabled:i===c,className:"p-2 rounded hover:bg-gray-100 disabled:opacity-40",children:v.jsx(jI,{size:18})}),v.jsx("button",{onClick:()=>o(c),disabled:i===c,className:"p-2 rounded hover:bg-gray-100 disabled:opacity-40",children:v.jsx(Cue,{size:18})})]})]})]})}ae.AccessPointsUsage=bde,ae.Accounting=cue,ae.Amenities=dde,ae.AmenitiesStatsCard=kde,ae.AmenityWiseRevenue=jde,ae.AssetValueBreakdown=hue,ae.AssetsByType=Rde,ae.BlockWiseOccupancy=oue,ae.BookingTrendChart=Mde,ae.Bookings=Ade,ae.Budgets=uue,ae.Card=je,ae.CardAccess=WI,ae.CashBankBalance=due,ae.CommercialAccessOverview=yde,ae.CommercialGuardPatrols=Fde,ae.CommercialIncidentReports=$de,ae.CommercialOccupancy=lde,ae.CommercialReportTable=Bde,ae.Community=Hie,ae.Complaints=Bue,ae.ComplaintsByLevel=Yue,ae.DuesAgeing=fue,ae.EmployeeFootfall=cde,ae.Engagement=Yie,ae.EngagementStatsGrid=sde,ae.EventsUtilisation=tde,ae.ExpenseCategories=pue,ae.Facilities=Uie,ae.FinanceSummary=Kie,ae.FoodBeverages=ude,ae.GateAndSecurityStatsGrid=Lue,ae.GateUpdates=Moe,ae.GuardPatrols=Tue,ae.Header=J6,ae.Helpdesk=Noe,ae.HelpdeskStatsGrid=ede,ae.HourlyTrafficFlow=Mue,ae.IncidentReports=Nue,ae.IncomeExpenditure=DI,ae.MainHeader=f3,ae.MaintenanceStatus=Lde,ae.MetricCard=Sde,ae.MobileAccess=WI,ae.MoveInOutTrends=sue,ae.NoticeBoardStatus=nde,ae.OccupancyOverview=nue,ae.OrganisationWiseVisitors=Pde,ae.RequestBox=Kue,ae.ResidentOverview=iue,ae.RevenuebyCategory=mue,ae.SingleStats=ide,ae.StaffAttendance=jue,ae.StatsGrid=bue,ae.TicketEscalation=fde,ae.TicketStatus=hde,ae.Tickets=PI,ae.TicketsperCategory=_de,ae.UnitStatus=PI,ae.VisitorUpdates=mde,ae.WeeklyVisitorPattern=Ode,Object.defineProperty(ae,Symbol.toStringTag,{value:"Module"})}));
|