agentic-ui-libs 0.1.2 → 0.1.4

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.
@@ -1,4 +1,4 @@
1
- (function(le,S){typeof exports=="object"&&typeof module<"u"?S(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],S):(le=typeof globalThis<"u"?globalThis:le||self,S(le.AgenticUILibs={},le.React,le.ReactDOM))})(this,function(le,S,Qr){"use strict";var s9=Object.defineProperty;var l9=(le,S,Qr)=>S in le?s9(le,S,{enumerable:!0,configurable:!0,writable:!0,value:Qr}):le[S]=Qr;var Bt=(le,S,Qr)=>l9(le,typeof S!="symbol"?S+"":S,Qr);function qb(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const xt=qb(S);var _i=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ce(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Bs={exports:{}},sa={};/**
1
+ (function(le,T){typeof exports=="object"&&typeof module<"u"?T(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],T):(le=typeof globalThis<"u"?globalThis:le||self,T(le.AgenticUILibs={},le.React,le.ReactDOM))})(this,function(le,T,Jr){"use strict";var d9=Object.defineProperty;var h9=(le,T,Jr)=>T in le?d9(le,T,{enumerable:!0,configurable:!0,writable:!0,value:Jr}):le[T]=Jr;var Bt=(le,T,Jr)=>h9(le,typeof T!="symbol"?T+"":T,Jr);function Vb(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const xt=Vb(T);var Ei=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ce(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Bs={exports:{}},sa={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var hf;function Vb(){if(hf)return sa;hf=1;var e=S,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function o(s,l,u){var c,f={},d=null,h=null;u!==void 0&&(d=""+u),l.key!==void 0&&(d=""+l.key),l.ref!==void 0&&(h=l.ref);for(c in l)n.call(l,c)&&!i.hasOwnProperty(c)&&(f[c]=l[c]);if(s&&s.defaultProps)for(c in l=s.defaultProps,l)f[c]===void 0&&(f[c]=l[c]);return{$$typeof:t,type:s,key:d,ref:h,props:f,_owner:a.current}}return sa.Fragment=r,sa.jsx=o,sa.jsxs=o,sa}var la={};/**
9
+ */var pf;function qb(){if(pf)return sa;pf=1;var e=T,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function o(s,l,u){var c,f={},d=null,h=null;u!==void 0&&(d=""+u),l.key!==void 0&&(d=""+l.key),l.ref!==void 0&&(h=l.ref);for(c in l)n.call(l,c)&&!i.hasOwnProperty(c)&&(f[c]=l[c]);if(s&&s.defaultProps)for(c in l=s.defaultProps,l)f[c]===void 0&&(f[c]=l[c]);return{$$typeof:t,type:s,key:d,ref:h,props:f,_owner:a.current}}return sa.Fragment=r,sa.jsx=o,sa.jsxs=o,sa}var la={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,20 +14,20 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var pf;function Hb(){return pf||(pf=1,process.env.NODE_ENV!=="production"&&function(){var e=S,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),y=Symbol.iterator,v="@@iterator";function p(M){if(M===null||typeof M!="object")return null;var H=y&&M[y]||M[v];return typeof H=="function"?H:null}var g=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function O(M){{for(var H=arguments.length,re=new Array(H>1?H-1:0),ue=1;ue<H;ue++)re[ue-1]=arguments[ue];w("error",M,re)}}function w(M,H,re){{var ue=g.ReactDebugCurrentFrame,Pe=ue.getStackAddendum();Pe!==""&&(H+="%s",re=re.concat([Pe]));var $e=re.map(function(ge){return String(ge)});$e.unshift("Warning: "+H),Function.prototype.apply.call(console[M],console,$e)}}var A=!1,m=!1,x=!1,T=!1,P=!1,$;$=Symbol.for("react.module.reference");function k(M){return!!(typeof M=="string"||typeof M=="function"||M===n||M===i||P||M===a||M===u||M===c||T||M===h||A||m||x||typeof M=="object"&&M!==null&&(M.$$typeof===d||M.$$typeof===f||M.$$typeof===o||M.$$typeof===s||M.$$typeof===l||M.$$typeof===$||M.getModuleId!==void 0))}function E(M,H,re){var ue=M.displayName;if(ue)return ue;var Pe=H.displayName||H.name||"";return Pe!==""?re+"("+Pe+")":re}function j(M){return M.displayName||"Context"}function R(M){if(M==null)return null;if(typeof M.tag=="number"&&O("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof M=="function")return M.displayName||M.name||null;if(typeof M=="string")return M;switch(M){case n:return"Fragment";case r:return"Portal";case i:return"Profiler";case a:return"StrictMode";case u:return"Suspense";case c:return"SuspenseList"}if(typeof M=="object")switch(M.$$typeof){case s:var H=M;return j(H)+".Consumer";case o:var re=M;return j(re._context)+".Provider";case l:return E(M,M.render,"ForwardRef");case f:var ue=M.displayName||null;return ue!==null?ue:R(M.type)||"Memo";case d:{var Pe=M,$e=Pe._payload,ge=Pe._init;try{return R(ge($e))}catch{return null}}}return null}var N=Object.assign,I=0,C,B,U,K,_,L,F;function W(){}W.__reactDisabledLog=!0;function G(){{if(I===0){C=console.log,B=console.info,U=console.warn,K=console.error,_=console.group,L=console.groupCollapsed,F=console.groupEnd;var M={configurable:!0,enumerable:!0,value:W,writable:!0};Object.defineProperties(console,{info:M,log:M,warn:M,error:M,group:M,groupCollapsed:M,groupEnd:M})}I++}}function X(){{if(I--,I===0){var M={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:N({},M,{value:C}),info:N({},M,{value:B}),warn:N({},M,{value:U}),error:N({},M,{value:K}),group:N({},M,{value:_}),groupCollapsed:N({},M,{value:L}),groupEnd:N({},M,{value:F})})}I<0&&O("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Q=g.ReactCurrentDispatcher,ae;function te(M,H,re){{if(ae===void 0)try{throw Error()}catch(Pe){var ue=Pe.stack.trim().match(/\n( *(at )?)/);ae=ue&&ue[1]||""}return`
18
- `+ae+M}}var q=!1,Y;{var Z=typeof WeakMap=="function"?WeakMap:Map;Y=new Z}function D(M,H){if(!M||q)return"";{var re=Y.get(M);if(re!==void 0)return re}var ue;q=!0;var Pe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var $e;$e=Q.current,Q.current=null,G();try{if(H){var ge=function(){throw Error()};if(Object.defineProperty(ge.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ge,[])}catch(pt){ue=pt}Reflect.construct(M,[],ge)}else{try{ge.call()}catch(pt){ue=pt}M.call(ge.prototype)}}else{try{throw Error()}catch(pt){ue=pt}M()}}catch(pt){if(pt&&ue&&typeof pt.stack=="string"){for(var me=pt.stack.split(`
19
- `),ut=ue.stack.split(`
17
+ */var vf;function Hb(){return vf||(vf=1,process.env.NODE_ENV!=="production"&&function(){var e=T,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),v=Symbol.iterator,m="@@iterator";function p(N){if(N===null||typeof N!="object")return null;var H=v&&N[v]||N[m];return typeof H=="function"?H:null}var x=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function O(N){{for(var H=arguments.length,re=new Array(H>1?H-1:0),ce=1;ce<H;ce++)re[ce-1]=arguments[ce];w("error",N,re)}}function w(N,H,re){{var ce=x.ReactDebugCurrentFrame,Pe=ce.getStackAddendum();Pe!==""&&(H+="%s",re=re.concat([Pe]));var $e=re.map(function(ge){return String(ge)});$e.unshift("Warning: "+H),Function.prototype.apply.call(console[N],console,$e)}}var A=!1,y=!1,b=!1,S=!1,P=!1,$;$=Symbol.for("react.module.reference");function M(N){return!!(typeof N=="string"||typeof N=="function"||N===n||N===i||P||N===a||N===u||N===c||S||N===h||A||y||b||typeof N=="object"&&N!==null&&(N.$$typeof===d||N.$$typeof===f||N.$$typeof===o||N.$$typeof===s||N.$$typeof===l||N.$$typeof===$||N.getModuleId!==void 0))}function _(N,H,re){var ce=N.displayName;if(ce)return ce;var Pe=H.displayName||H.name||"";return Pe!==""?re+"("+Pe+")":re}function j(N){return N.displayName||"Context"}function R(N){if(N==null)return null;if(typeof N.tag=="number"&&O("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof N=="function")return N.displayName||N.name||null;if(typeof N=="string")return N;switch(N){case n:return"Fragment";case r:return"Portal";case i:return"Profiler";case a:return"StrictMode";case u:return"Suspense";case c:return"SuspenseList"}if(typeof N=="object")switch(N.$$typeof){case s:var H=N;return j(H)+".Consumer";case o:var re=N;return j(re._context)+".Provider";case l:return _(N,N.render,"ForwardRef");case f:var ce=N.displayName||null;return ce!==null?ce:R(N.type)||"Memo";case d:{var Pe=N,$e=Pe._payload,ge=Pe._init;try{return R(ge($e))}catch{return null}}}return null}var k=Object.assign,D=0,C,B,U,K,E,L,F;function W(){}W.__reactDisabledLog=!0;function G(){{if(D===0){C=console.log,B=console.info,U=console.warn,K=console.error,E=console.group,L=console.groupCollapsed,F=console.groupEnd;var N={configurable:!0,enumerable:!0,value:W,writable:!0};Object.defineProperties(console,{info:N,log:N,warn:N,error:N,group:N,groupCollapsed:N,groupEnd:N})}D++}}function X(){{if(D--,D===0){var N={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:k({},N,{value:C}),info:k({},N,{value:B}),warn:k({},N,{value:U}),error:k({},N,{value:K}),group:k({},N,{value:E}),groupCollapsed:k({},N,{value:L}),groupEnd:k({},N,{value:F})})}D<0&&O("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Q=x.ReactCurrentDispatcher,ae;function te(N,H,re){{if(ae===void 0)try{throw Error()}catch(Pe){var ce=Pe.stack.trim().match(/\n( *(at )?)/);ae=ce&&ce[1]||""}return`
18
+ `+ae+N}}var V=!1,Y;{var J=typeof WeakMap=="function"?WeakMap:Map;Y=new J}function I(N,H){if(!N||V)return"";{var re=Y.get(N);if(re!==void 0)return re}var ce;V=!0;var Pe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var $e;$e=Q.current,Q.current=null,G();try{if(H){var ge=function(){throw Error()};if(Object.defineProperty(ge.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ge,[])}catch(vt){ce=vt}Reflect.construct(N,[],ge)}else{try{ge.call()}catch(vt){ce=vt}N.call(ge.prototype)}}else{try{throw Error()}catch(vt){ce=vt}N()}}catch(vt){if(vt&&ce&&typeof vt.stack=="string"){for(var me=vt.stack.split(`
19
+ `),ut=ce.stack.split(`
20
20
  `),Ge=me.length-1,He=ut.length-1;Ge>=1&&He>=0&&me[Ge]!==ut[He];)He--;for(;Ge>=1&&He>=0;Ge--,He--)if(me[Ge]!==ut[He]){if(Ge!==1||He!==1)do if(Ge--,He--,He<0||me[Ge]!==ut[He]){var $t=`
21
- `+me[Ge].replace(" at new "," at ");return M.displayName&&$t.includes("<anonymous>")&&($t=$t.replace("<anonymous>",M.displayName)),typeof M=="function"&&Y.set(M,$t),$t}while(Ge>=1&&He>=0);break}}}finally{q=!1,Q.current=$e,X(),Error.prepareStackTrace=Pe}var oa=M?M.displayName||M.name:"",Zr=oa?te(oa):"";return typeof M=="function"&&Y.set(M,Zr),Zr}function ie(M,H,re){return D(M,!1)}function V(M){var H=M.prototype;return!!(H&&H.isReactComponent)}function se(M,H,re){if(M==null)return"";if(typeof M=="function")return D(M,V(M));if(typeof M=="string")return te(M);switch(M){case u:return te("Suspense");case c:return te("SuspenseList")}if(typeof M=="object")switch(M.$$typeof){case l:return ie(M.render);case f:return se(M.type,H,re);case d:{var ue=M,Pe=ue._payload,$e=ue._init;try{return se($e(Pe),H,re)}catch{}}}return""}var ee=Object.prototype.hasOwnProperty,ve={},We=g.ReactDebugCurrentFrame;function Re(M){if(M){var H=M._owner,re=se(M.type,M._source,H?H.type:null);We.setExtraStackFrame(re)}else We.setExtraStackFrame(null)}function Be(M,H,re,ue,Pe){{var $e=Function.call.bind(ee);for(var ge in M)if($e(M,ge)){var me=void 0;try{if(typeof M[ge]!="function"){var ut=Error((ue||"React class")+": "+re+" type `"+ge+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof M[ge]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ut.name="Invariant Violation",ut}me=M[ge](H,ge,ue,re,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ge){me=Ge}me&&!(me instanceof Error)&&(Re(Pe),O("%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).",ue||"React class",re,ge,typeof me),Re(null)),me instanceof Error&&!(me.message in ve)&&(ve[me.message]=!0,Re(Pe),O("Failed %s type: %s",re,me.message),Re(null))}}}var Ke=Array.isArray;function lt(M){return Ke(M)}function Si(M){{var H=typeof Symbol=="function"&&Symbol.toStringTag,re=H&&M[Symbol.toStringTag]||M.constructor.name||"Object";return re}}function Ai(M){try{return aa(M),!1}catch{return!0}}function aa(M){return""+M}function Ti(M){if(Ai(M))return O("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Si(M)),aa(M)}var Pi=g.ReactCurrentOwner,zU={key:!0,ref:!0,__self:!0,__source:!0},Lb,Rb;function KU(M){if(ee.call(M,"ref")){var H=Object.getOwnPropertyDescriptor(M,"ref").get;if(H&&H.isReactWarning)return!1}return M.ref!==void 0}function GU(M){if(ee.call(M,"key")){var H=Object.getOwnPropertyDescriptor(M,"key").get;if(H&&H.isReactWarning)return!1}return M.key!==void 0}function qU(M,H){typeof M.ref=="string"&&Pi.current}function VU(M,H){{var re=function(){Lb||(Lb=!0,O("%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)",H))};re.isReactWarning=!0,Object.defineProperty(M,"key",{get:re,configurable:!0})}}function HU(M,H){{var re=function(){Rb||(Rb=!0,O("%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)",H))};re.isReactWarning=!0,Object.defineProperty(M,"ref",{get:re,configurable:!0})}}var YU=function(M,H,re,ue,Pe,$e,ge){var me={$$typeof:t,type:M,key:H,ref:re,props:ge,_owner:$e};return me._store={},Object.defineProperty(me._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(me,"_self",{configurable:!1,enumerable:!1,writable:!1,value:ue}),Object.defineProperty(me,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Pe}),Object.freeze&&(Object.freeze(me.props),Object.freeze(me)),me};function XU(M,H,re,ue,Pe){{var $e,ge={},me=null,ut=null;re!==void 0&&(Ti(re),me=""+re),GU(H)&&(Ti(H.key),me=""+H.key),KU(H)&&(ut=H.ref,qU(H,Pe));for($e in H)ee.call(H,$e)&&!zU.hasOwnProperty($e)&&(ge[$e]=H[$e]);if(M&&M.defaultProps){var Ge=M.defaultProps;for($e in Ge)ge[$e]===void 0&&(ge[$e]=Ge[$e])}if(me||ut){var He=typeof M=="function"?M.displayName||M.name||"Unknown":M;me&&VU(ge,He),ut&&HU(ge,He)}return YU(M,me,ut,Pe,ue,Pi.current,ge)}}var uf=g.ReactCurrentOwner,Bb=g.ReactDebugCurrentFrame;function ia(M){if(M){var H=M._owner,re=se(M.type,M._source,H?H.type:null);Bb.setExtraStackFrame(re)}else Bb.setExtraStackFrame(null)}var cf;cf=!1;function ff(M){return typeof M=="object"&&M!==null&&M.$$typeof===t}function Fb(){{if(uf.current){var M=R(uf.current.type);if(M)return`
21
+ `+me[Ge].replace(" at new "," at ");return N.displayName&&$t.includes("<anonymous>")&&($t=$t.replace("<anonymous>",N.displayName)),typeof N=="function"&&Y.set(N,$t),$t}while(Ge>=1&&He>=0);break}}}finally{V=!1,Q.current=$e,X(),Error.prepareStackTrace=Pe}var oa=N?N.displayName||N.name:"",Zr=oa?te(oa):"";return typeof N=="function"&&Y.set(N,Zr),Zr}function ie(N,H,re){return I(N,!1)}function q(N){var H=N.prototype;return!!(H&&H.isReactComponent)}function se(N,H,re){if(N==null)return"";if(typeof N=="function")return I(N,q(N));if(typeof N=="string")return te(N);switch(N){case u:return te("Suspense");case c:return te("SuspenseList")}if(typeof N=="object")switch(N.$$typeof){case l:return ie(N.render);case f:return se(N.type,H,re);case d:{var ce=N,Pe=ce._payload,$e=ce._init;try{return se($e(Pe),H,re)}catch{}}}return""}var ee=Object.prototype.hasOwnProperty,ve={},We=x.ReactDebugCurrentFrame;function Re(N){if(N){var H=N._owner,re=se(N.type,N._source,H?H.type:null);We.setExtraStackFrame(re)}else We.setExtraStackFrame(null)}function Be(N,H,re,ce,Pe){{var $e=Function.call.bind(ee);for(var ge in N)if($e(N,ge)){var me=void 0;try{if(typeof N[ge]!="function"){var ut=Error((ce||"React class")+": "+re+" type `"+ge+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof N[ge]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ut.name="Invariant Violation",ut}me=N[ge](H,ge,ce,re,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ge){me=Ge}me&&!(me instanceof Error)&&(Re(Pe),O("%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).",ce||"React class",re,ge,typeof me),Re(null)),me instanceof Error&&!(me.message in ve)&&(ve[me.message]=!0,Re(Pe),O("Failed %s type: %s",re,me.message),Re(null))}}}var Ke=Array.isArray;function lt(N){return Ke(N)}function Ti(N){{var H=typeof Symbol=="function"&&Symbol.toStringTag,re=H&&N[Symbol.toStringTag]||N.constructor.name||"Object";return re}}function Ai(N){try{return aa(N),!1}catch{return!0}}function aa(N){return""+N}function Pi(N){if(Ai(N))return O("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ti(N)),aa(N)}var _i=x.ReactCurrentOwner,HU={key:!0,ref:!0,__self:!0,__source:!0},Lb,Rb;function YU(N){if(ee.call(N,"ref")){var H=Object.getOwnPropertyDescriptor(N,"ref").get;if(H&&H.isReactWarning)return!1}return N.ref!==void 0}function XU(N){if(ee.call(N,"key")){var H=Object.getOwnPropertyDescriptor(N,"key").get;if(H&&H.isReactWarning)return!1}return N.key!==void 0}function ZU(N,H){typeof N.ref=="string"&&_i.current}function JU(N,H){{var re=function(){Lb||(Lb=!0,O("%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)",H))};re.isReactWarning=!0,Object.defineProperty(N,"key",{get:re,configurable:!0})}}function QU(N,H){{var re=function(){Rb||(Rb=!0,O("%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)",H))};re.isReactWarning=!0,Object.defineProperty(N,"ref",{get:re,configurable:!0})}}var e9=function(N,H,re,ce,Pe,$e,ge){var me={$$typeof:t,type:N,key:H,ref:re,props:ge,_owner:$e};return me._store={},Object.defineProperty(me._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(me,"_self",{configurable:!1,enumerable:!1,writable:!1,value:ce}),Object.defineProperty(me,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Pe}),Object.freeze&&(Object.freeze(me.props),Object.freeze(me)),me};function t9(N,H,re,ce,Pe){{var $e,ge={},me=null,ut=null;re!==void 0&&(Pi(re),me=""+re),XU(H)&&(Pi(H.key),me=""+H.key),YU(H)&&(ut=H.ref,ZU(H,Pe));for($e in H)ee.call(H,$e)&&!HU.hasOwnProperty($e)&&(ge[$e]=H[$e]);if(N&&N.defaultProps){var Ge=N.defaultProps;for($e in Ge)ge[$e]===void 0&&(ge[$e]=Ge[$e])}if(me||ut){var He=typeof N=="function"?N.displayName||N.name||"Unknown":N;me&&JU(ge,He),ut&&QU(ge,He)}return e9(N,me,ut,Pe,ce,_i.current,ge)}}var cf=x.ReactCurrentOwner,Bb=x.ReactDebugCurrentFrame;function ia(N){if(N){var H=N._owner,re=se(N.type,N._source,H?H.type:null);Bb.setExtraStackFrame(re)}else Bb.setExtraStackFrame(null)}var ff;ff=!1;function df(N){return typeof N=="object"&&N!==null&&N.$$typeof===t}function Fb(){{if(cf.current){var N=R(cf.current.type);if(N)return`
22
22
 
23
- Check the render method of \``+M+"`."}return""}}function JU(M){return""}var Wb={};function ZU(M){{var H=Fb();if(!H){var re=typeof M=="string"?M:M.displayName||M.name;re&&(H=`
23
+ Check the render method of \``+N+"`."}return""}}function r9(N){return""}var Wb={};function n9(N){{var H=Fb();if(!H){var re=typeof N=="string"?N:N.displayName||N.name;re&&(H=`
24
24
 
25
- Check the top-level render call using <`+re+">.")}return H}}function Ub(M,H){{if(!M._store||M._store.validated||M.key!=null)return;M._store.validated=!0;var re=ZU(H);if(Wb[re])return;Wb[re]=!0;var ue="";M&&M._owner&&M._owner!==uf.current&&(ue=" It was passed a child from "+R(M._owner.type)+"."),ia(M),O('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',re,ue),ia(null)}}function zb(M,H){{if(typeof M!="object")return;if(lt(M))for(var re=0;re<M.length;re++){var ue=M[re];ff(ue)&&Ub(ue,H)}else if(ff(M))M._store&&(M._store.validated=!0);else if(M){var Pe=p(M);if(typeof Pe=="function"&&Pe!==M.entries)for(var $e=Pe.call(M),ge;!(ge=$e.next()).done;)ff(ge.value)&&Ub(ge.value,H)}}}function QU(M){{var H=M.type;if(H==null||typeof H=="string")return;var re;if(typeof H=="function")re=H.propTypes;else if(typeof H=="object"&&(H.$$typeof===l||H.$$typeof===f))re=H.propTypes;else return;if(re){var ue=R(H);Be(re,M.props,"prop",ue,M)}else if(H.PropTypes!==void 0&&!cf){cf=!0;var Pe=R(H);O("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Pe||"Unknown")}typeof H.getDefaultProps=="function"&&!H.getDefaultProps.isReactClassApproved&&O("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function e9(M){{for(var H=Object.keys(M.props),re=0;re<H.length;re++){var ue=H[re];if(ue!=="children"&&ue!=="key"){ia(M),O("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",ue),ia(null);break}}M.ref!==null&&(ia(M),O("Invalid attribute `ref` supplied to `React.Fragment`."),ia(null))}}var Kb={};function Gb(M,H,re,ue,Pe,$e){{var ge=k(M);if(!ge){var me="";(M===void 0||typeof M=="object"&&M!==null&&Object.keys(M).length===0)&&(me+=" 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 ut=JU();ut?me+=ut:me+=Fb();var Ge;M===null?Ge="null":lt(M)?Ge="array":M!==void 0&&M.$$typeof===t?(Ge="<"+(R(M.type)||"Unknown")+" />",me=" Did you accidentally export a JSX literal instead of a component?"):Ge=typeof M,O("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Ge,me)}var He=XU(M,H,re,Pe,$e);if(He==null)return He;if(ge){var $t=H.children;if($t!==void 0)if(ue)if(lt($t)){for(var oa=0;oa<$t.length;oa++)zb($t[oa],M);Object.freeze&&Object.freeze($t)}else O("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 zb($t,M)}if(ee.call(H,"key")){var Zr=R(M),pt=Object.keys(H).filter(function(o9){return o9!=="key"}),df=pt.length>0?"{key: someKey, "+pt.join(": ..., ")+": ...}":"{key: someKey}";if(!Kb[Zr+df]){var i9=pt.length>0?"{"+pt.join(": ..., ")+": ...}":"{}";O(`A props object containing a "key" prop is being spread into JSX:
25
+ Check the top-level render call using <`+re+">.")}return H}}function Ub(N,H){{if(!N._store||N._store.validated||N.key!=null)return;N._store.validated=!0;var re=n9(H);if(Wb[re])return;Wb[re]=!0;var ce="";N&&N._owner&&N._owner!==cf.current&&(ce=" It was passed a child from "+R(N._owner.type)+"."),ia(N),O('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',re,ce),ia(null)}}function zb(N,H){{if(typeof N!="object")return;if(lt(N))for(var re=0;re<N.length;re++){var ce=N[re];df(ce)&&Ub(ce,H)}else if(df(N))N._store&&(N._store.validated=!0);else if(N){var Pe=p(N);if(typeof Pe=="function"&&Pe!==N.entries)for(var $e=Pe.call(N),ge;!(ge=$e.next()).done;)df(ge.value)&&Ub(ge.value,H)}}}function a9(N){{var H=N.type;if(H==null||typeof H=="string")return;var re;if(typeof H=="function")re=H.propTypes;else if(typeof H=="object"&&(H.$$typeof===l||H.$$typeof===f))re=H.propTypes;else return;if(re){var ce=R(H);Be(re,N.props,"prop",ce,N)}else if(H.PropTypes!==void 0&&!ff){ff=!0;var Pe=R(H);O("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Pe||"Unknown")}typeof H.getDefaultProps=="function"&&!H.getDefaultProps.isReactClassApproved&&O("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function i9(N){{for(var H=Object.keys(N.props),re=0;re<H.length;re++){var ce=H[re];if(ce!=="children"&&ce!=="key"){ia(N),O("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",ce),ia(null);break}}N.ref!==null&&(ia(N),O("Invalid attribute `ref` supplied to `React.Fragment`."),ia(null))}}var Kb={};function Gb(N,H,re,ce,Pe,$e){{var ge=M(N);if(!ge){var me="";(N===void 0||typeof N=="object"&&N!==null&&Object.keys(N).length===0)&&(me+=" 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 ut=r9();ut?me+=ut:me+=Fb();var Ge;N===null?Ge="null":lt(N)?Ge="array":N!==void 0&&N.$$typeof===t?(Ge="<"+(R(N.type)||"Unknown")+" />",me=" Did you accidentally export a JSX literal instead of a component?"):Ge=typeof N,O("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Ge,me)}var He=t9(N,H,re,Pe,$e);if(He==null)return He;if(ge){var $t=H.children;if($t!==void 0)if(ce)if(lt($t)){for(var oa=0;oa<$t.length;oa++)zb($t[oa],N);Object.freeze&&Object.freeze($t)}else O("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 zb($t,N)}if(ee.call(H,"key")){var Zr=R(N),vt=Object.keys(H).filter(function(f9){return f9!=="key"}),hf=vt.length>0?"{key: someKey, "+vt.join(": ..., ")+": ...}":"{key: someKey}";if(!Kb[Zr+hf]){var c9=vt.length>0?"{"+vt.join(": ..., ")+": ...}":"{}";O(`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} />`,df,Zr,i9,Zr),Kb[Zr+df]=!0}}return M===n?e9(He):QU(He),He}}function t9(M,H,re){return Gb(M,H,re,!0)}function r9(M,H,re){return Gb(M,H,re,!1)}var n9=r9,a9=t9;la.Fragment=n,la.jsx=n9,la.jsxs=a9}()),la}process.env.NODE_ENV==="production"?Bs.exports=Vb():Bs.exports=Hb();var b=Bs.exports;/**
30
+ <%s key={someKey} {...props} />`,hf,Zr,c9,Zr),Kb[Zr+hf]=!0}}return N===n?i9(He):a9(He),He}}function o9(N,H,re){return Gb(N,H,re,!0)}function s9(N,H,re){return Gb(N,H,re,!1)}var l9=s9,u9=o9;la.Fragment=n,la.jsx=l9,la.jsxs=u9}()),la}process.env.NODE_ENV==="production"?Bs.exports=qb():Bs.exports=Hb();var g=Bs.exports;/**
31
31
  * @license lucide-react v0.294.0 - ISC
32
32
  *
33
33
  * This source code is licensed under the ISC license.
@@ -37,72 +37,77 @@ React keys must be passed directly to JSX without using spread:
37
37
  *
38
38
  * This source code is licensed under the ISC license.
39
39
  * See the LICENSE file in the root directory of this source tree.
40
- */const Xb=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),vt=(e,t)=>{const r=S.forwardRef(({color:n="currentColor",size:a=24,strokeWidth:i=2,absoluteStrokeWidth:o,className:s="",children:l,...u},c)=>S.createElement("svg",{ref:c,...Yb,width:a,height:a,stroke:n,strokeWidth:o?Number(i)*24/Number(a):i,className:["lucide",`lucide-${Xb(e)}`,s].join(" "),...u},[...t.map(([f,d])=>S.createElement(f,d)),...Array.isArray(l)?l:[l]]));return r.displayName=`${e}`,r};/**
40
+ */const Xb=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),ct=(e,t)=>{const r=T.forwardRef(({color:n="currentColor",size:a=24,strokeWidth:i=2,absoluteStrokeWidth:o,className:s="",children:l,...u},c)=>T.createElement("svg",{ref:c,...Yb,width:a,height:a,stroke:n,strokeWidth:o?Number(i)*24/Number(a):i,className:["lucide",`lucide-${Xb(e)}`,s].join(" "),...u},[...t.map(([f,d])=>T.createElement(f,d)),...Array.isArray(l)?l:[l]]));return r.displayName=`${e}`,r};/**
41
41
  * @license lucide-react v0.294.0 - ISC
42
42
  *
43
43
  * This source code is licensed under the ISC license.
44
44
  * See the LICENSE file in the root directory of this source tree.
45
- */const Jb=vt("BarChart3",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
45
+ */const Zb=ct("BarChart3",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
46
46
  * @license lucide-react v0.294.0 - ISC
47
47
  *
48
48
  * This source code is licensed under the ISC license.
49
49
  * See the LICENSE file in the root directory of this source tree.
50
- */const vf=vt("Calendar",[["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",ry:"2",key:"eu3xkr"}],["line",{x1:"16",x2:"16",y1:"2",y2:"6",key:"m3sa8f"}],["line",{x1:"8",x2:"8",y1:"2",y2:"6",key:"18kwsl"}],["line",{x1:"3",x2:"21",y1:"10",y2:"10",key:"xt86sb"}]]);/**
50
+ */const yf=ct("Calendar",[["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",ry:"2",key:"eu3xkr"}],["line",{x1:"16",x2:"16",y1:"2",y2:"6",key:"m3sa8f"}],["line",{x1:"8",x2:"8",y1:"2",y2:"6",key:"18kwsl"}],["line",{x1:"3",x2:"21",y1:"10",y2:"10",key:"xt86sb"}]]);/**
51
51
  * @license lucide-react v0.294.0 - ISC
52
52
  *
53
53
  * This source code is licensed under the ISC license.
54
54
  * See the LICENSE file in the root directory of this source tree.
55
- */const Ei=vt("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
55
+ */const ua=ct("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
56
56
  * @license lucide-react v0.294.0 - ISC
57
57
  *
58
58
  * This source code is licensed under the ISC license.
59
59
  * See the LICENSE file in the root directory of this source tree.
60
- */const Zb=vt("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
60
+ */const Jb=ct("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
61
61
  * @license lucide-react v0.294.0 - ISC
62
62
  *
63
63
  * This source code is licensed under the ISC license.
64
64
  * See the LICENSE file in the root directory of this source tree.
65
- */const Qb=vt("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
65
+ */const Qb=ct("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
66
66
  * @license lucide-react v0.294.0 - ISC
67
67
  *
68
68
  * This source code is licensed under the ISC license.
69
69
  * See the LICENSE file in the root directory of this source tree.
70
- */const yf=vt("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
70
+ */const mf=ct("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
71
71
  * @license lucide-react v0.294.0 - ISC
72
72
  *
73
73
  * This source code is licensed under the ISC license.
74
74
  * See the LICENSE file in the root directory of this source tree.
75
- */const e0=vt("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
75
+ */const e0=ct("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
76
76
  * @license lucide-react v0.294.0 - ISC
77
77
  *
78
78
  * This source code is licensed under the ISC license.
79
79
  * See the LICENSE file in the root directory of this source tree.
80
- */const t0=vt("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
80
+ */const t0=ct("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
81
81
  * @license lucide-react v0.294.0 - ISC
82
82
  *
83
83
  * This source code is licensed under the ISC license.
84
84
  * See the LICENSE file in the root directory of this source tree.
85
- */const r0=vt("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
85
+ */const r0=ct("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
86
86
  * @license lucide-react v0.294.0 - ISC
87
87
  *
88
88
  * This source code is licensed under the ISC license.
89
89
  * See the LICENSE file in the root directory of this source tree.
90
- */const mf=vt("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
90
+ */const gf=ct("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
91
91
  * @license lucide-react v0.294.0 - ISC
92
92
  *
93
93
  * This source code is licensed under the ISC license.
94
94
  * See the LICENSE file in the root directory of this source tree.
95
- */const n0=vt("Table",[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]]);/**
95
+ */const n0=ct("Table",[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]]);/**
96
96
  * @license lucide-react v0.294.0 - ISC
97
97
  *
98
98
  * This source code is licensed under the ISC license.
99
99
  * See the LICENSE file in the root directory of this source tree.
100
- */const a0=vt("TrendingDown",[["polyline",{points:"22 17 13.5 8.5 8.5 13.5 2 7",key:"1r2t7k"}],["polyline",{points:"16 17 22 17 22 11",key:"11uiuu"}]]);/**
100
+ */const a0=ct("TrendingDown",[["polyline",{points:"22 17 13.5 8.5 8.5 13.5 2 7",key:"1r2t7k"}],["polyline",{points:"16 17 22 17 22 11",key:"11uiuu"}]]);/**
101
101
  * @license lucide-react v0.294.0 - ISC
102
102
  *
103
103
  * This source code is licensed under the ISC license.
104
104
  * See the LICENSE file in the root directory of this source tree.
105
- */const i0=vt("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);function gf(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=gf(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function ye(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=gf(e))&&(n&&(n+=" "),n+=t);return n}const Fs="-",o0=e=>{const t=l0(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{const s=o.split(Fs);return s[0]===""&&s.length!==1&&s.shift(),bf(s,t)||s0(o)},getConflictingClassGroupIds:(o,s)=>{const l=r[o]||[];return s&&n[o]?[...l,...n[o]]:l}}},bf=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),a=n?bf(e.slice(1),n):void 0;if(a)return a;if(t.validators.length===0)return;const i=e.join(Fs);return(o=t.validators.find(({validator:s})=>s(i)))==null?void 0:o.classGroupId},xf=/^\[(.+)\]$/,s0=e=>{if(xf.test(e)){const t=xf.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},l0=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return c0(Object.entries(e.classGroups),r).forEach(([i,o])=>{Ws(o,n,i,t)}),n},Ws=(e,t,r,n)=>{e.forEach(a=>{if(typeof a=="string"){const i=a===""?t:wf(t,a);i.classGroupId=r;return}if(typeof a=="function"){if(u0(a)){Ws(a(n),t,r,n);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([i,o])=>{Ws(o,wf(t,i),r,n)})})},wf=(e,t)=>{let r=e;return t.split(Fs).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},u0=e=>e.isThemeGetter,c0=(e,t)=>t?e.map(([r,n])=>{const a=n.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,s])=>[t+o,s])):i);return[r,a]}):e,f0=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const a=(i,o)=>{r.set(i,o),t++,t>e&&(t=0,n=r,r=new Map)};return{get(i){let o=r.get(i);if(o!==void 0)return o;if((o=n.get(i))!==void 0)return a(i,o),o},set(i,o){r.has(i)?r.set(i,o):a(i,o)}}},Of="!",d0=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,a=t[0],i=t.length,o=s=>{const l=[];let u=0,c=0,f;for(let p=0;p<s.length;p++){let g=s[p];if(u===0){if(g===a&&(n||s.slice(p,p+i)===t)){l.push(s.slice(c,p)),c=p+i;continue}if(g==="/"){f=p;continue}}g==="["?u++:g==="]"&&u--}const d=l.length===0?s:s.substring(c),h=d.startsWith(Of),y=h?d.substring(1):d,v=f&&f>c?f-c:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:y,maybePostfixModifierPosition:v}};return r?s=>r({className:s,parseClassName:o}):o},h0=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},p0=e=>({cache:f0(e.cacheSize),parseClassName:d0(e),...o0(e)}),v0=/\s+/,y0=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a}=t,i=[],o=e.trim().split(v0);let s="";for(let l=o.length-1;l>=0;l-=1){const u=o[l],{modifiers:c,hasImportantModifier:f,baseClassName:d,maybePostfixModifierPosition:h}=r(u);let y=!!h,v=n(y?d.substring(0,h):d);if(!v){if(!y){s=u+(s.length>0?" "+s:s);continue}if(v=n(d),!v){s=u+(s.length>0?" "+s:s);continue}y=!1}const p=h0(c).join(":"),g=f?p+Of:p,O=g+v;if(i.includes(O))continue;i.push(O);const w=a(v,y);for(let A=0;A<w.length;++A){const m=w[A];i.push(g+m)}s=u+(s.length>0?" "+s:s)}return s};function m0(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Sf(t))&&(n&&(n+=" "),n+=r);return n}const Sf=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Sf(e[n]))&&(r&&(r+=" "),r+=t);return r};function g0(e,...t){let r,n,a,i=o;function o(l){const u=t.reduce((c,f)=>f(c),e());return r=p0(u),n=r.cache.get,a=r.cache.set,i=s,s(l)}function s(l){const u=n(l);if(u)return u;const c=y0(l,r);return a(l,c),c}return function(){return i(m0.apply(null,arguments))}}const Ne=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Af=/^\[(?:([a-z-]+):)?(.+)\]$/i,b0=/^\d+\/\d+$/,x0=new Set(["px","full","screen"]),w0=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,O0=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,S0=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,A0=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,T0=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Yt=e=>en(e)||x0.has(e)||b0.test(e),cr=e=>tn(e,"length",k0),en=e=>!!e&&!Number.isNaN(Number(e)),Us=e=>tn(e,"number",en),ua=e=>!!e&&Number.isInteger(Number(e)),P0=e=>e.endsWith("%")&&en(e.slice(0,-1)),pe=e=>Af.test(e),fr=e=>w0.test(e),_0=new Set(["length","size","percentage"]),E0=e=>tn(e,_0,Tf),j0=e=>tn(e,"position",Tf),$0=new Set(["image","url"]),C0=e=>tn(e,$0,D0),M0=e=>tn(e,"",N0),ca=()=>!0,tn=(e,t,r)=>{const n=Af.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},k0=e=>O0.test(e)&&!S0.test(e),Tf=()=>!1,N0=e=>A0.test(e),D0=e=>T0.test(e),I0=g0(()=>{const e=Ne("colors"),t=Ne("spacing"),r=Ne("blur"),n=Ne("brightness"),a=Ne("borderColor"),i=Ne("borderRadius"),o=Ne("borderSpacing"),s=Ne("borderWidth"),l=Ne("contrast"),u=Ne("grayscale"),c=Ne("hueRotate"),f=Ne("invert"),d=Ne("gap"),h=Ne("gradientColorStops"),y=Ne("gradientColorStopPositions"),v=Ne("inset"),p=Ne("margin"),g=Ne("opacity"),O=Ne("padding"),w=Ne("saturate"),A=Ne("scale"),m=Ne("sepia"),x=Ne("skew"),T=Ne("space"),P=Ne("translate"),$=()=>["auto","contain","none"],k=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto",pe,t],j=()=>[pe,t],R=()=>["",Yt,cr],N=()=>["auto",en,pe],I=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],C=()=>["solid","dashed","dotted","double","none"],B=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],U=()=>["start","end","center","between","around","evenly","stretch"],K=()=>["","0",pe],_=()=>["auto","avoid","all","avoid-page","page","left","right","column"],L=()=>[en,pe];return{cacheSize:500,separator:":",theme:{colors:[ca],spacing:[Yt,cr],blur:["none","",fr,pe],brightness:L(),borderColor:[e],borderRadius:["none","","full",fr,pe],borderSpacing:j(),borderWidth:R(),contrast:L(),grayscale:K(),hueRotate:L(),invert:K(),gap:j(),gradientColorStops:[e],gradientColorStopPositions:[P0,cr],inset:E(),margin:E(),opacity:L(),padding:j(),saturate:L(),scale:L(),sepia:K(),skew:L(),space:j(),translate:j()},classGroups:{aspect:[{aspect:["auto","square","video",pe]}],container:["container"],columns:[{columns:[fr]}],"break-after":[{"break-after":_()}],"break-before":[{"break-before":_()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...I(),pe]}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ua,pe]}],basis:[{basis:E()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",pe]}],grow:[{grow:K()}],shrink:[{shrink:K()}],order:[{order:["first","last","none",ua,pe]}],"grid-cols":[{"grid-cols":[ca]}],"col-start-end":[{col:["auto",{span:["full",ua,pe]},pe]}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":[ca]}],"row-start-end":[{row:["auto",{span:[ua,pe]},pe]}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",pe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",pe]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal",...U()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...U(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...U(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[O]}],px:[{px:[O]}],py:[{py:[O]}],ps:[{ps:[O]}],pe:[{pe:[O]}],pt:[{pt:[O]}],pr:[{pr:[O]}],pb:[{pb:[O]}],pl:[{pl:[O]}],m:[{m:[p]}],mx:[{mx:[p]}],my:[{my:[p]}],ms:[{ms:[p]}],me:[{me:[p]}],mt:[{mt:[p]}],mr:[{mr:[p]}],mb:[{mb:[p]}],ml:[{ml:[p]}],"space-x":[{"space-x":[T]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[T]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",pe,t]}],"min-w":[{"min-w":[pe,t,"min","max","fit"]}],"max-w":[{"max-w":[pe,t,"none","full","min","max","fit","prose",{screen:[fr]},fr]}],h:[{h:[pe,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[pe,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[pe,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[pe,t,"auto","min","max","fit"]}],"font-size":[{text:["base",fr,cr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Us]}],"font-family":[{font:[ca]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",pe]}],"line-clamp":[{"line-clamp":["none",en,Us]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Yt,pe]}],"list-image":[{"list-image":["none",pe]}],"list-style-type":[{list:["none","disc","decimal",pe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...C(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Yt,cr]}],"underline-offset":[{"underline-offset":["auto",Yt,pe]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",pe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",pe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...I(),j0]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",E0]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},C0]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...C(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:C()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...C()]}],"outline-offset":[{"outline-offset":[Yt,pe]}],"outline-w":[{outline:[Yt,cr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:R()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[Yt,cr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",fr,M0]}],"shadow-color":[{shadow:[ca]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...B(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":B()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",fr,pe]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[f]}],saturate:[{saturate:[w]}],sepia:[{sepia:[m]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[m]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",pe]}],duration:[{duration:L()}],ease:[{ease:["linear","in","out","in-out",pe]}],delay:[{delay:L()}],animate:[{animate:["none","spin","ping","pulse","bounce",pe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[A]}],"scale-x":[{"scale-x":[A]}],"scale-y":[{"scale-y":[A]}],rotate:[{rotate:[ua,pe]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[x]}],"skew-y":[{"skew-y":[x]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",pe]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",pe]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",pe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Yt,cr,Us]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function ce(...e){return I0(ye(e))}const Pf=({data:e,className:t,onClick:r})=>{const{title:n,value:a,change:i,info:o,highlighted:s}=e,l=f=>typeof f=="number"?f.toLocaleString():f.toString(),u=f=>`${f}%`,c=()=>{r&&r(e)};return b.jsxs("div",{className:ce("rounded-lg border p-4 transition-all duration-200 bg-white",!s&&"border-gray-200 shadow-sm",s&&["!border-[#84adff]"],r&&"cursor-pointer",t),onClick:c,children:[b.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[b.jsx("span",{className:"text-sm font-medium text-gray-600",children:n}),o&&b.jsxs("div",{className:"relative group",children:[b.jsx(t0,{className:"h-4 w-4 text-gray-400 cursor-help"}),b.jsxs("div",{className:"absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 px-3 py-2 text-xs text-white bg-gray-900 rounded-md opacity-0 group-hover:!opacity-100 transition-opacity duration-200 whitespace-nowrap z-10 shadow-lg",children:[o,b.jsx("div",{className:"absolute top-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-l-4 border-r-4 border-t-4 border-transparent border-t-gray-900"})]})]})]}),b.jsxs("div",{className:"flex items-baseline gap-3",children:[b.jsx("span",{className:"text-2xl font-semibold text-gray-900",children:l(a)}),i&&b.jsxs("div",{className:ce("flex items-center gap-1 px-2 py-1 text-sm font-medium",(i.type==="increase","")),style:i.type==="increase"?{color:"rgb(21 128 61 / var(--tw-text-opacity, 1))",border:"1px solid #ABEFC6",borderRadius:"150px",background:"rgba(16, 185, 129, 0.10)"}:{color:"rgb(185 28 28 / var(--tw-text-opacity, 1))",border:"1px solid #FCA5A5",borderRadius:"150px",background:"rgba(239, 68, 68, 0.10)"},children:[i.type==="increase"?b.jsx(i0,{className:"h-3 w-3"}):b.jsx(a0,{className:"h-3 w-3"}),b.jsx("span",{children:u(i.value)})]})]})]})};var L0=Array.isArray,ct=L0,R0=typeof _i=="object"&&_i&&_i.Object===Object&&_i,_f=R0,B0=_f,F0=typeof self=="object"&&self&&self.Object===Object&&self,W0=B0||F0||Function("return this")(),Ft=W0,U0=Ft,z0=U0.Symbol,fa=z0,Ef=fa,jf=Object.prototype,K0=jf.hasOwnProperty,G0=jf.toString,da=Ef?Ef.toStringTag:void 0;function q0(e){var t=K0.call(e,da),r=e[da];try{e[da]=void 0;var n=!0}catch{}var a=G0.call(e);return n&&(t?e[da]=r:delete e[da]),a}var V0=q0,H0=Object.prototype,Y0=H0.toString;function X0(e){return Y0.call(e)}var J0=X0,$f=fa,Z0=V0,Q0=J0,ex="[object Null]",tx="[object Undefined]",Cf=$f?$f.toStringTag:void 0;function rx(e){return e==null?e===void 0?tx:ex:Cf&&Cf in Object(e)?Z0(e):Q0(e)}var Xt=rx;function nx(e){return e!=null&&typeof e=="object"}var Jt=nx,ax=Xt,ix=Jt,ox="[object Symbol]";function sx(e){return typeof e=="symbol"||ix(e)&&ax(e)==ox}var rn=sx,lx=ct,ux=rn,cx=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,fx=/^\w*$/;function dx(e,t){if(lx(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||ux(e)?!0:fx.test(e)||!cx.test(e)||t!=null&&e in Object(t)}var zs=dx;function hx(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var dr=hx;const nn=Ce(dr);var px=Xt,vx=dr,yx="[object AsyncFunction]",mx="[object Function]",gx="[object GeneratorFunction]",bx="[object Proxy]";function xx(e){if(!vx(e))return!1;var t=px(e);return t==mx||t==gx||t==yx||t==bx}var Ks=xx;const he=Ce(Ks);var wx=Ft,Ox=wx["__core-js_shared__"],Sx=Ox,Gs=Sx,Mf=function(){var e=/[^.]+$/.exec(Gs&&Gs.keys&&Gs.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Ax(e){return!!Mf&&Mf in e}var Tx=Ax,Px=Function.prototype,_x=Px.toString;function Ex(e){if(e!=null){try{return _x.call(e)}catch{}try{return e+""}catch{}}return""}var kf=Ex,jx=Ks,$x=Tx,Cx=dr,Mx=kf,kx=/[\\^$.*+?()[\]{}|]/g,Nx=/^\[object .+?Constructor\]$/,Dx=Function.prototype,Ix=Object.prototype,Lx=Dx.toString,Rx=Ix.hasOwnProperty,Bx=RegExp("^"+Lx.call(Rx).replace(kx,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Fx(e){if(!Cx(e)||$x(e))return!1;var t=jx(e)?Bx:Nx;return t.test(Mx(e))}var Wx=Fx;function Ux(e,t){return e==null?void 0:e[t]}var zx=Ux,Kx=Wx,Gx=zx;function qx(e,t){var r=Gx(e,t);return Kx(r)?r:void 0}var _r=qx,Vx=_r,Hx=Vx(Object,"create"),ji=Hx,Nf=ji;function Yx(){this.__data__=Nf?Nf(null):{},this.size=0}var Xx=Yx;function Jx(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Zx=Jx,Qx=ji,ew="__lodash_hash_undefined__",tw=Object.prototype,rw=tw.hasOwnProperty;function nw(e){var t=this.__data__;if(Qx){var r=t[e];return r===ew?void 0:r}return rw.call(t,e)?t[e]:void 0}var aw=nw,iw=ji,ow=Object.prototype,sw=ow.hasOwnProperty;function lw(e){var t=this.__data__;return iw?t[e]!==void 0:sw.call(t,e)}var uw=lw,cw=ji,fw="__lodash_hash_undefined__";function dw(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=cw&&t===void 0?fw:t,this}var hw=dw,pw=Xx,vw=Zx,yw=aw,mw=uw,gw=hw;function an(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}an.prototype.clear=pw,an.prototype.delete=vw,an.prototype.get=yw,an.prototype.has=mw,an.prototype.set=gw;var bw=an;function xw(){this.__data__=[],this.size=0}var ww=xw;function Ow(e,t){return e===t||e!==e&&t!==t}var qs=Ow,Sw=qs;function Aw(e,t){for(var r=e.length;r--;)if(Sw(e[r][0],t))return r;return-1}var $i=Aw,Tw=$i,Pw=Array.prototype,_w=Pw.splice;function Ew(e){var t=this.__data__,r=Tw(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():_w.call(t,r,1),--this.size,!0}var jw=Ew,$w=$i;function Cw(e){var t=this.__data__,r=$w(t,e);return r<0?void 0:t[r][1]}var Mw=Cw,kw=$i;function Nw(e){return kw(this.__data__,e)>-1}var Dw=Nw,Iw=$i;function Lw(e,t){var r=this.__data__,n=Iw(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var Rw=Lw,Bw=ww,Fw=jw,Ww=Mw,Uw=Dw,zw=Rw;function on(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}on.prototype.clear=Bw,on.prototype.delete=Fw,on.prototype.get=Ww,on.prototype.has=Uw,on.prototype.set=zw;var Ci=on,Kw=_r,Gw=Ft,qw=Kw(Gw,"Map"),Vs=qw,Df=bw,Vw=Ci,Hw=Vs;function Yw(){this.size=0,this.__data__={hash:new Df,map:new(Hw||Vw),string:new Df}}var Xw=Yw;function Jw(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Zw=Jw,Qw=Zw;function e1(e,t){var r=e.__data__;return Qw(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Mi=e1,t1=Mi;function r1(e){var t=t1(this,e).delete(e);return this.size-=t?1:0,t}var n1=r1,a1=Mi;function i1(e){return a1(this,e).get(e)}var o1=i1,s1=Mi;function l1(e){return s1(this,e).has(e)}var u1=l1,c1=Mi;function f1(e,t){var r=c1(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var d1=f1,h1=Xw,p1=n1,v1=o1,y1=u1,m1=d1;function sn(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}sn.prototype.clear=h1,sn.prototype.delete=p1,sn.prototype.get=v1,sn.prototype.has=y1,sn.prototype.set=m1;var Hs=sn,If=Hs,g1="Expected a function";function Ys(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(g1);var r=function(){var n=arguments,a=t?t.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var o=e.apply(this,n);return r.cache=i.set(a,o)||i,o};return r.cache=new(Ys.Cache||If),r}Ys.Cache=If;var Lf=Ys;const b1=Ce(Lf);var x1=Lf,w1=500;function O1(e){var t=x1(e,function(n){return r.size===w1&&r.clear(),n}),r=t.cache;return t}var S1=O1,A1=S1,T1=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,P1=/\\(\\)?/g,_1=A1(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(T1,function(r,n,a,i){t.push(a?i.replace(P1,"$1"):n||r)}),t}),E1=_1;function j1(e,t){for(var r=-1,n=e==null?0:e.length,a=Array(n);++r<n;)a[r]=t(e[r],r,e);return a}var Xs=j1,Rf=fa,$1=Xs,C1=ct,M1=rn,Bf=Rf?Rf.prototype:void 0,Ff=Bf?Bf.toString:void 0;function Wf(e){if(typeof e=="string")return e;if(C1(e))return $1(e,Wf)+"";if(M1(e))return Ff?Ff.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var k1=Wf,N1=k1;function D1(e){return e==null?"":N1(e)}var Uf=D1,I1=ct,L1=zs,R1=E1,B1=Uf;function F1(e,t){return I1(e)?e:L1(e,t)?[e]:R1(B1(e))}var zf=F1,W1=rn;function U1(e){if(typeof e=="string"||W1(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var ki=U1,z1=zf,K1=ki;function G1(e,t){t=z1(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[K1(t[r++])];return r&&r==n?e:void 0}var Js=G1,q1=Js;function V1(e,t,r){var n=e==null?void 0:q1(e,t);return n===void 0?r:n}var Kf=V1;const wt=Ce(Kf);function H1(e){return e==null}var Y1=H1;const fe=Ce(Y1);var X1=Xt,J1=ct,Z1=Jt,Q1="[object String]";function eO(e){return typeof e=="string"||!J1(e)&&Z1(e)&&X1(e)==Q1}var tO=eO;const Er=Ce(tO);var Zs={exports:{}},we={};/**
105
+ */const i0=ct("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
106
+ * @license lucide-react v0.294.0 - ISC
107
+ *
108
+ * This source code is licensed under the ISC license.
109
+ * See the LICENSE file in the root directory of this source tree.
110
+ */const o0=ct("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function bf(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=bf(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function ye(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=bf(e))&&(n&&(n+=" "),n+=t);return n}const Fs="-",s0=e=>{const t=u0(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{const s=o.split(Fs);return s[0]===""&&s.length!==1&&s.shift(),xf(s,t)||l0(o)},getConflictingClassGroupIds:(o,s)=>{const l=r[o]||[];return s&&n[o]?[...l,...n[o]]:l}}},xf=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),a=n?xf(e.slice(1),n):void 0;if(a)return a;if(t.validators.length===0)return;const i=e.join(Fs);return(o=t.validators.find(({validator:s})=>s(i)))==null?void 0:o.classGroupId},wf=/^\[(.+)\]$/,l0=e=>{if(wf.test(e)){const t=wf.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},u0=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return f0(Object.entries(e.classGroups),r).forEach(([i,o])=>{Ws(o,n,i,t)}),n},Ws=(e,t,r,n)=>{e.forEach(a=>{if(typeof a=="string"){const i=a===""?t:Of(t,a);i.classGroupId=r;return}if(typeof a=="function"){if(c0(a)){Ws(a(n),t,r,n);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([i,o])=>{Ws(o,Of(t,i),r,n)})})},Of=(e,t)=>{let r=e;return t.split(Fs).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},c0=e=>e.isThemeGetter,f0=(e,t)=>t?e.map(([r,n])=>{const a=n.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,s])=>[t+o,s])):i);return[r,a]}):e,d0=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const a=(i,o)=>{r.set(i,o),t++,t>e&&(t=0,n=r,r=new Map)};return{get(i){let o=r.get(i);if(o!==void 0)return o;if((o=n.get(i))!==void 0)return a(i,o),o},set(i,o){r.has(i)?r.set(i,o):a(i,o)}}},Sf="!",h0=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,a=t[0],i=t.length,o=s=>{const l=[];let u=0,c=0,f;for(let p=0;p<s.length;p++){let x=s[p];if(u===0){if(x===a&&(n||s.slice(p,p+i)===t)){l.push(s.slice(c,p)),c=p+i;continue}if(x==="/"){f=p;continue}}x==="["?u++:x==="]"&&u--}const d=l.length===0?s:s.substring(c),h=d.startsWith(Sf),v=h?d.substring(1):d,m=f&&f>c?f-c:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:v,maybePostfixModifierPosition:m}};return r?s=>r({className:s,parseClassName:o}):o},p0=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},v0=e=>({cache:d0(e.cacheSize),parseClassName:h0(e),...s0(e)}),y0=/\s+/,m0=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a}=t,i=[],o=e.trim().split(y0);let s="";for(let l=o.length-1;l>=0;l-=1){const u=o[l],{modifiers:c,hasImportantModifier:f,baseClassName:d,maybePostfixModifierPosition:h}=r(u);let v=!!h,m=n(v?d.substring(0,h):d);if(!m){if(!v){s=u+(s.length>0?" "+s:s);continue}if(m=n(d),!m){s=u+(s.length>0?" "+s:s);continue}v=!1}const p=p0(c).join(":"),x=f?p+Sf:p,O=x+m;if(i.includes(O))continue;i.push(O);const w=a(m,v);for(let A=0;A<w.length;++A){const y=w[A];i.push(x+y)}s=u+(s.length>0?" "+s:s)}return s};function g0(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Tf(t))&&(n&&(n+=" "),n+=r);return n}const Tf=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Tf(e[n]))&&(r&&(r+=" "),r+=t);return r};function b0(e,...t){let r,n,a,i=o;function o(l){const u=t.reduce((c,f)=>f(c),e());return r=v0(u),n=r.cache.get,a=r.cache.set,i=s,s(l)}function s(l){const u=n(l);if(u)return u;const c=m0(l,r);return a(l,c),c}return function(){return i(g0.apply(null,arguments))}}const Ne=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Af=/^\[(?:([a-z-]+):)?(.+)\]$/i,x0=/^\d+\/\d+$/,w0=new Set(["px","full","screen"]),O0=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,S0=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,T0=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,A0=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,P0=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Xt=e=>Qr(e)||w0.has(e)||x0.test(e),cr=e=>en(e,"length",N0),Qr=e=>!!e&&!Number.isNaN(Number(e)),Us=e=>en(e,"number",Qr),ca=e=>!!e&&Number.isInteger(Number(e)),_0=e=>e.endsWith("%")&&Qr(e.slice(0,-1)),pe=e=>Af.test(e),fr=e=>O0.test(e),E0=new Set(["length","size","percentage"]),j0=e=>en(e,E0,Pf),$0=e=>en(e,"position",Pf),C0=new Set(["image","url"]),M0=e=>en(e,C0,I0),k0=e=>en(e,"",D0),fa=()=>!0,en=(e,t,r)=>{const n=Af.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},N0=e=>S0.test(e)&&!T0.test(e),Pf=()=>!1,D0=e=>A0.test(e),I0=e=>P0.test(e),L0=b0(()=>{const e=Ne("colors"),t=Ne("spacing"),r=Ne("blur"),n=Ne("brightness"),a=Ne("borderColor"),i=Ne("borderRadius"),o=Ne("borderSpacing"),s=Ne("borderWidth"),l=Ne("contrast"),u=Ne("grayscale"),c=Ne("hueRotate"),f=Ne("invert"),d=Ne("gap"),h=Ne("gradientColorStops"),v=Ne("gradientColorStopPositions"),m=Ne("inset"),p=Ne("margin"),x=Ne("opacity"),O=Ne("padding"),w=Ne("saturate"),A=Ne("scale"),y=Ne("sepia"),b=Ne("skew"),S=Ne("space"),P=Ne("translate"),$=()=>["auto","contain","none"],M=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto",pe,t],j=()=>[pe,t],R=()=>["",Xt,cr],k=()=>["auto",Qr,pe],D=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],C=()=>["solid","dashed","dotted","double","none"],B=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],U=()=>["start","end","center","between","around","evenly","stretch"],K=()=>["","0",pe],E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],L=()=>[Qr,pe];return{cacheSize:500,separator:":",theme:{colors:[fa],spacing:[Xt,cr],blur:["none","",fr,pe],brightness:L(),borderColor:[e],borderRadius:["none","","full",fr,pe],borderSpacing:j(),borderWidth:R(),contrast:L(),grayscale:K(),hueRotate:L(),invert:K(),gap:j(),gradientColorStops:[e],gradientColorStopPositions:[_0,cr],inset:_(),margin:_(),opacity:L(),padding:j(),saturate:L(),scale:L(),sepia:K(),skew:L(),space:j(),translate:j()},classGroups:{aspect:[{aspect:["auto","square","video",pe]}],container:["container"],columns:[{columns:[fr]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...D(),pe]}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ca,pe]}],basis:[{basis:_()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",pe]}],grow:[{grow:K()}],shrink:[{shrink:K()}],order:[{order:["first","last","none",ca,pe]}],"grid-cols":[{"grid-cols":[fa]}],"col-start-end":[{col:["auto",{span:["full",ca,pe]},pe]}],"col-start":[{"col-start":k()}],"col-end":[{"col-end":k()}],"grid-rows":[{"grid-rows":[fa]}],"row-start-end":[{row:["auto",{span:[ca,pe]},pe]}],"row-start":[{"row-start":k()}],"row-end":[{"row-end":k()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",pe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",pe]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal",...U()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...U(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...U(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[O]}],px:[{px:[O]}],py:[{py:[O]}],ps:[{ps:[O]}],pe:[{pe:[O]}],pt:[{pt:[O]}],pr:[{pr:[O]}],pb:[{pb:[O]}],pl:[{pl:[O]}],m:[{m:[p]}],mx:[{mx:[p]}],my:[{my:[p]}],ms:[{ms:[p]}],me:[{me:[p]}],mt:[{mt:[p]}],mr:[{mr:[p]}],mb:[{mb:[p]}],ml:[{ml:[p]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",pe,t]}],"min-w":[{"min-w":[pe,t,"min","max","fit"]}],"max-w":[{"max-w":[pe,t,"none","full","min","max","fit","prose",{screen:[fr]},fr]}],h:[{h:[pe,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[pe,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[pe,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[pe,t,"auto","min","max","fit"]}],"font-size":[{text:["base",fr,cr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Us]}],"font-family":[{font:[fa]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",pe]}],"line-clamp":[{"line-clamp":["none",Qr,Us]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Xt,pe]}],"list-image":[{"list-image":["none",pe]}],"list-style-type":[{list:["none","disc","decimal",pe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[x]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[x]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...C(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Xt,cr]}],"underline-offset":[{"underline-offset":["auto",Xt,pe]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",pe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",pe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[x]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...D(),$0]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",j0]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},M0]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[x]}],"border-style":[{border:[...C(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[x]}],"divide-style":[{divide:C()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...C()]}],"outline-offset":[{"outline-offset":[Xt,pe]}],"outline-w":[{outline:[Xt,cr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:R()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[Xt,cr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",fr,k0]}],"shadow-color":[{shadow:[fa]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...B(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":B()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",fr,pe]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[f]}],saturate:[{saturate:[w]}],sepia:[{sepia:[y]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[y]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",pe]}],duration:[{duration:L()}],ease:[{ease:["linear","in","out","in-out",pe]}],delay:[{delay:L()}],animate:[{animate:["none","spin","ping","pulse","bounce",pe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[A]}],"scale-x":[{"scale-x":[A]}],"scale-y":[{"scale-y":[A]}],rotate:[{rotate:[ca,pe]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[b]}],"skew-y":[{"skew-y":[b]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",pe]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",pe]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",pe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Xt,cr,Us]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function ue(...e){return L0(ye(e))}const _f=({data:e,className:t,onClick:r,isFirst:n=!1})=>{const{title:a,value:i,change:o,info:s,highlighted:l}=e,u=d=>typeof d=="number"?d.toLocaleString():d.toString(),c=d=>`${d}%`,f=()=>{r&&r(e)};return g.jsxs("div",{className:ue("rounded-lg border p-4 transition-all duration-200 bg-white",!l&&"border-gray-200 shadow-sm",l&&["!border-[#84adff]"],r&&"cursor-pointer",t),onClick:f,children:[g.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[g.jsx("span",{className:"text-sm font-medium text-gray-600",children:a}),s&&g.jsxs("div",{className:"relative group",children:[g.jsx(t0,{className:"h-4 w-4 text-gray-400 cursor-help"}),g.jsxs("div",{className:ue("absolute bottom-full mb-2 px-3 py-2 text-xs text-white bg-gray-900 rounded-md opacity-0 group-hover:!opacity-100 transition-opacity duration-200 whitespace-nowrap z-10 shadow-lg",n?"left-0":"left-1/2 transform -translate-x-1/2"),children:[s,g.jsx("div",{className:ue("absolute top-full w-0 h-0 border-l-4 border-r-4 border-t-4 border-transparent border-t-gray-900",n?"left-4":"left-1/2 transform -translate-x-1/2")})]})]})]}),g.jsxs("div",{className:"flex items-baseline gap-3",children:[g.jsx("span",{className:"text-2xl font-semibold text-gray-900",children:u(i)}),o&&g.jsxs("div",{className:ue("flex items-center gap-1 px-2 py-1 text-sm font-medium",(o.type==="increase","")),style:o.type==="increase"?{color:"rgb(21 128 61 / var(--tw-text-opacity, 1))",border:"1px solid #ABEFC6",borderRadius:"150px",background:"rgba(16, 185, 129, 0.10)"}:{color:"rgb(185 28 28 / var(--tw-text-opacity, 1))",border:"1px solid #FCA5A5",borderRadius:"150px",background:"rgba(239, 68, 68, 0.10)"},children:[o.type==="increase"?g.jsx(i0,{className:"h-3 w-3"}):g.jsx(a0,{className:"h-3 w-3"}),g.jsx("span",{children:c(o.value)})]})]})]})};var R0=Array.isArray,ft=R0,B0=typeof Ei=="object"&&Ei&&Ei.Object===Object&&Ei,Ef=B0,F0=Ef,W0=typeof self=="object"&&self&&self.Object===Object&&self,U0=F0||W0||Function("return this")(),Ft=U0,z0=Ft,K0=z0.Symbol,da=K0,jf=da,$f=Object.prototype,G0=$f.hasOwnProperty,V0=$f.toString,ha=jf?jf.toStringTag:void 0;function q0(e){var t=G0.call(e,ha),r=e[ha];try{e[ha]=void 0;var n=!0}catch{}var a=V0.call(e);return n&&(t?e[ha]=r:delete e[ha]),a}var H0=q0,Y0=Object.prototype,X0=Y0.toString;function Z0(e){return X0.call(e)}var J0=Z0,Cf=da,Q0=H0,ex=J0,tx="[object Null]",rx="[object Undefined]",Mf=Cf?Cf.toStringTag:void 0;function nx(e){return e==null?e===void 0?rx:tx:Mf&&Mf in Object(e)?Q0(e):ex(e)}var Zt=nx;function ax(e){return e!=null&&typeof e=="object"}var Jt=ax,ix=Zt,ox=Jt,sx="[object Symbol]";function lx(e){return typeof e=="symbol"||ox(e)&&ix(e)==sx}var tn=lx,ux=ft,cx=tn,fx=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,dx=/^\w*$/;function hx(e,t){if(ux(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||cx(e)?!0:dx.test(e)||!fx.test(e)||t!=null&&e in Object(t)}var zs=hx;function px(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var dr=px;const rn=Ce(dr);var vx=Zt,yx=dr,mx="[object AsyncFunction]",gx="[object Function]",bx="[object GeneratorFunction]",xx="[object Proxy]";function wx(e){if(!yx(e))return!1;var t=vx(e);return t==gx||t==bx||t==mx||t==xx}var Ks=wx;const he=Ce(Ks);var Ox=Ft,Sx=Ox["__core-js_shared__"],Tx=Sx,Gs=Tx,kf=function(){var e=/[^.]+$/.exec(Gs&&Gs.keys&&Gs.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Ax(e){return!!kf&&kf in e}var Px=Ax,_x=Function.prototype,Ex=_x.toString;function jx(e){if(e!=null){try{return Ex.call(e)}catch{}try{return e+""}catch{}}return""}var Nf=jx,$x=Ks,Cx=Px,Mx=dr,kx=Nf,Nx=/[\\^$.*+?()[\]{}|]/g,Dx=/^\[object .+?Constructor\]$/,Ix=Function.prototype,Lx=Object.prototype,Rx=Ix.toString,Bx=Lx.hasOwnProperty,Fx=RegExp("^"+Rx.call(Bx).replace(Nx,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Wx(e){if(!Mx(e)||Cx(e))return!1;var t=$x(e)?Fx:Dx;return t.test(kx(e))}var Ux=Wx;function zx(e,t){return e==null?void 0:e[t]}var Kx=zx,Gx=Ux,Vx=Kx;function qx(e,t){var r=Vx(e,t);return Gx(r)?r:void 0}var _r=qx,Hx=_r,Yx=Hx(Object,"create"),ji=Yx,Df=ji;function Xx(){this.__data__=Df?Df(null):{},this.size=0}var Zx=Xx;function Jx(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Qx=Jx,ew=ji,tw="__lodash_hash_undefined__",rw=Object.prototype,nw=rw.hasOwnProperty;function aw(e){var t=this.__data__;if(ew){var r=t[e];return r===tw?void 0:r}return nw.call(t,e)?t[e]:void 0}var iw=aw,ow=ji,sw=Object.prototype,lw=sw.hasOwnProperty;function uw(e){var t=this.__data__;return ow?t[e]!==void 0:lw.call(t,e)}var cw=uw,fw=ji,dw="__lodash_hash_undefined__";function hw(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=fw&&t===void 0?dw:t,this}var pw=hw,vw=Zx,yw=Qx,mw=iw,gw=cw,bw=pw;function nn(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}nn.prototype.clear=vw,nn.prototype.delete=yw,nn.prototype.get=mw,nn.prototype.has=gw,nn.prototype.set=bw;var xw=nn;function ww(){this.__data__=[],this.size=0}var Ow=ww;function Sw(e,t){return e===t||e!==e&&t!==t}var Vs=Sw,Tw=Vs;function Aw(e,t){for(var r=e.length;r--;)if(Tw(e[r][0],t))return r;return-1}var $i=Aw,Pw=$i,_w=Array.prototype,Ew=_w.splice;function jw(e){var t=this.__data__,r=Pw(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Ew.call(t,r,1),--this.size,!0}var $w=jw,Cw=$i;function Mw(e){var t=this.__data__,r=Cw(t,e);return r<0?void 0:t[r][1]}var kw=Mw,Nw=$i;function Dw(e){return Nw(this.__data__,e)>-1}var Iw=Dw,Lw=$i;function Rw(e,t){var r=this.__data__,n=Lw(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var Bw=Rw,Fw=Ow,Ww=$w,Uw=kw,zw=Iw,Kw=Bw;function an(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}an.prototype.clear=Fw,an.prototype.delete=Ww,an.prototype.get=Uw,an.prototype.has=zw,an.prototype.set=Kw;var Ci=an,Gw=_r,Vw=Ft,qw=Gw(Vw,"Map"),qs=qw,If=xw,Hw=Ci,Yw=qs;function Xw(){this.size=0,this.__data__={hash:new If,map:new(Yw||Hw),string:new If}}var Zw=Xw;function Jw(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Qw=Jw,e1=Qw;function t1(e,t){var r=e.__data__;return e1(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Mi=t1,r1=Mi;function n1(e){var t=r1(this,e).delete(e);return this.size-=t?1:0,t}var a1=n1,i1=Mi;function o1(e){return i1(this,e).get(e)}var s1=o1,l1=Mi;function u1(e){return l1(this,e).has(e)}var c1=u1,f1=Mi;function d1(e,t){var r=f1(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var h1=d1,p1=Zw,v1=a1,y1=s1,m1=c1,g1=h1;function on(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}on.prototype.clear=p1,on.prototype.delete=v1,on.prototype.get=y1,on.prototype.has=m1,on.prototype.set=g1;var Hs=on,Lf=Hs,b1="Expected a function";function Ys(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(b1);var r=function(){var n=arguments,a=t?t.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var o=e.apply(this,n);return r.cache=i.set(a,o)||i,o};return r.cache=new(Ys.Cache||Lf),r}Ys.Cache=Lf;var Rf=Ys;const x1=Ce(Rf);var w1=Rf,O1=500;function S1(e){var t=w1(e,function(n){return r.size===O1&&r.clear(),n}),r=t.cache;return t}var T1=S1,A1=T1,P1=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,_1=/\\(\\)?/g,E1=A1(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(P1,function(r,n,a,i){t.push(a?i.replace(_1,"$1"):n||r)}),t}),j1=E1;function $1(e,t){for(var r=-1,n=e==null?0:e.length,a=Array(n);++r<n;)a[r]=t(e[r],r,e);return a}var Xs=$1,Bf=da,C1=Xs,M1=ft,k1=tn,Ff=Bf?Bf.prototype:void 0,Wf=Ff?Ff.toString:void 0;function Uf(e){if(typeof e=="string")return e;if(M1(e))return C1(e,Uf)+"";if(k1(e))return Wf?Wf.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var N1=Uf,D1=N1;function I1(e){return e==null?"":D1(e)}var zf=I1,L1=ft,R1=zs,B1=j1,F1=zf;function W1(e,t){return L1(e)?e:R1(e,t)?[e]:B1(F1(e))}var Kf=W1,U1=tn;function z1(e){if(typeof e=="string"||U1(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var ki=z1,K1=Kf,G1=ki;function V1(e,t){t=K1(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[G1(t[r++])];return r&&r==n?e:void 0}var Zs=V1,q1=Zs;function H1(e,t,r){var n=e==null?void 0:q1(e,t);return n===void 0?r:n}var Gf=H1;const wt=Ce(Gf);function Y1(e){return e==null}var X1=Y1;const fe=Ce(X1);var Z1=Zt,J1=ft,Q1=Jt,eO="[object String]";function tO(e){return typeof e=="string"||!J1(e)&&Q1(e)&&Z1(e)==eO}var rO=tO;const Er=Ce(rO);var Js={exports:{}},we={};/**
106
111
  * @license React
107
112
  * react-is.production.min.js
108
113
  *
@@ -110,7 +115,7 @@ React keys must be passed directly to JSX without using spread:
110
115
  *
111
116
  * This source code is licensed under the MIT license found in the
112
117
  * LICENSE file in the root directory of this source tree.
113
- */var Gf;function rO(){if(Gf)return we;Gf=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),o=Symbol.for("react.context"),s=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),y;y=Symbol.for("react.module.reference");function v(p){if(typeof p=="object"&&p!==null){var g=p.$$typeof;switch(g){case e:switch(p=p.type,p){case r:case a:case n:case u:case c:return p;default:switch(p=p&&p.$$typeof,p){case s:case o:case l:case d:case f:case i:return p;default:return g}}case t:return g}}}return we.ContextConsumer=o,we.ContextProvider=i,we.Element=e,we.ForwardRef=l,we.Fragment=r,we.Lazy=d,we.Memo=f,we.Portal=t,we.Profiler=a,we.StrictMode=n,we.Suspense=u,we.SuspenseList=c,we.isAsyncMode=function(){return!1},we.isConcurrentMode=function(){return!1},we.isContextConsumer=function(p){return v(p)===o},we.isContextProvider=function(p){return v(p)===i},we.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===e},we.isForwardRef=function(p){return v(p)===l},we.isFragment=function(p){return v(p)===r},we.isLazy=function(p){return v(p)===d},we.isMemo=function(p){return v(p)===f},we.isPortal=function(p){return v(p)===t},we.isProfiler=function(p){return v(p)===a},we.isStrictMode=function(p){return v(p)===n},we.isSuspense=function(p){return v(p)===u},we.isSuspenseList=function(p){return v(p)===c},we.isValidElementType=function(p){return typeof p=="string"||typeof p=="function"||p===r||p===a||p===n||p===u||p===c||p===h||typeof p=="object"&&p!==null&&(p.$$typeof===d||p.$$typeof===f||p.$$typeof===i||p.$$typeof===o||p.$$typeof===l||p.$$typeof===y||p.getModuleId!==void 0)},we.typeOf=v,we}var Oe={};/**
118
+ */var Vf;function nO(){if(Vf)return we;Vf=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),o=Symbol.for("react.context"),s=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),v;v=Symbol.for("react.module.reference");function m(p){if(typeof p=="object"&&p!==null){var x=p.$$typeof;switch(x){case e:switch(p=p.type,p){case r:case a:case n:case u:case c:return p;default:switch(p=p&&p.$$typeof,p){case s:case o:case l:case d:case f:case i:return p;default:return x}}case t:return x}}}return we.ContextConsumer=o,we.ContextProvider=i,we.Element=e,we.ForwardRef=l,we.Fragment=r,we.Lazy=d,we.Memo=f,we.Portal=t,we.Profiler=a,we.StrictMode=n,we.Suspense=u,we.SuspenseList=c,we.isAsyncMode=function(){return!1},we.isConcurrentMode=function(){return!1},we.isContextConsumer=function(p){return m(p)===o},we.isContextProvider=function(p){return m(p)===i},we.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===e},we.isForwardRef=function(p){return m(p)===l},we.isFragment=function(p){return m(p)===r},we.isLazy=function(p){return m(p)===d},we.isMemo=function(p){return m(p)===f},we.isPortal=function(p){return m(p)===t},we.isProfiler=function(p){return m(p)===a},we.isStrictMode=function(p){return m(p)===n},we.isSuspense=function(p){return m(p)===u},we.isSuspenseList=function(p){return m(p)===c},we.isValidElementType=function(p){return typeof p=="string"||typeof p=="function"||p===r||p===a||p===n||p===u||p===c||p===h||typeof p=="object"&&p!==null&&(p.$$typeof===d||p.$$typeof===f||p.$$typeof===i||p.$$typeof===o||p.$$typeof===l||p.$$typeof===v||p.getModuleId!==void 0)},we.typeOf=m,we}var Oe={};/**
114
119
  * @license React
115
120
  * react-is.development.js
116
121
  *
@@ -118,86 +123,86 @@ React keys must be passed directly to JSX without using spread:
118
123
  *
119
124
  * This source code is licensed under the MIT license found in the
120
125
  * LICENSE file in the root directory of this source tree.
121
- */var qf;function nO(){return qf||(qf=1,process.env.NODE_ENV!=="production"&&function(){var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),o=Symbol.for("react.context"),s=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),y=!1,v=!1,p=!1,g=!1,O=!1,w;w=Symbol.for("react.module.reference");function A(V){return!!(typeof V=="string"||typeof V=="function"||V===r||V===a||O||V===n||V===u||V===c||g||V===h||y||v||p||typeof V=="object"&&V!==null&&(V.$$typeof===d||V.$$typeof===f||V.$$typeof===i||V.$$typeof===o||V.$$typeof===l||V.$$typeof===w||V.getModuleId!==void 0))}function m(V){if(typeof V=="object"&&V!==null){var se=V.$$typeof;switch(se){case e:var ee=V.type;switch(ee){case r:case a:case n:case u:case c:return ee;default:var ve=ee&&ee.$$typeof;switch(ve){case s:case o:case l:case d:case f:case i:return ve;default:return se}}case t:return se}}}var x=o,T=i,P=e,$=l,k=r,E=d,j=f,R=t,N=a,I=n,C=u,B=c,U=!1,K=!1;function _(V){return U||(U=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function L(V){return K||(K=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function F(V){return m(V)===o}function W(V){return m(V)===i}function G(V){return typeof V=="object"&&V!==null&&V.$$typeof===e}function X(V){return m(V)===l}function Q(V){return m(V)===r}function ae(V){return m(V)===d}function te(V){return m(V)===f}function q(V){return m(V)===t}function Y(V){return m(V)===a}function Z(V){return m(V)===n}function D(V){return m(V)===u}function ie(V){return m(V)===c}Oe.ContextConsumer=x,Oe.ContextProvider=T,Oe.Element=P,Oe.ForwardRef=$,Oe.Fragment=k,Oe.Lazy=E,Oe.Memo=j,Oe.Portal=R,Oe.Profiler=N,Oe.StrictMode=I,Oe.Suspense=C,Oe.SuspenseList=B,Oe.isAsyncMode=_,Oe.isConcurrentMode=L,Oe.isContextConsumer=F,Oe.isContextProvider=W,Oe.isElement=G,Oe.isForwardRef=X,Oe.isFragment=Q,Oe.isLazy=ae,Oe.isMemo=te,Oe.isPortal=q,Oe.isProfiler=Y,Oe.isStrictMode=Z,Oe.isSuspense=D,Oe.isSuspenseList=ie,Oe.isValidElementType=A,Oe.typeOf=m}()),Oe}process.env.NODE_ENV==="production"?Zs.exports=rO():Zs.exports=nO();var aO=Zs.exports,iO=Xt,oO=Jt,sO="[object Number]";function lO(e){return typeof e=="number"||oO(e)&&iO(e)==sO}var Vf=lO;const uO=Ce(Vf);var cO=Vf;function fO(e){return cO(e)&&e!=+e}var dO=fO;const ln=Ce(dO);var Ct=function(t){return t===0?0:t>0?1:-1},jr=function(t){return Er(t)&&t.indexOf("%")===t.length-1},J=function(t){return uO(t)&&!ln(t)},hO=function(t){return fe(t)},Ye=function(t){return J(t)||Er(t)},pO=0,$r=function(t){var r=++pO;return"".concat(t||"").concat(r)},Cr=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!J(t)&&!Er(t))return n;var i;if(jr(t)){var o=t.indexOf("%");i=r*parseFloat(t.slice(0,o))/100}else i=+t;return ln(i)&&(i=n),a&&i>r&&(i=r),i},hr=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},vO=function(t){if(!Array.isArray(t))return!1;for(var r=t.length,n={},a=0;a<r;a++)if(!n[t[a]])n[t[a]]=!0;else return!0;return!1},Ue=function(t,r){return J(t)&&J(r)?function(n){return t+n*(r-t)}:function(){return r}};function Ni(e,t,r){return!e||!e.length?null:e.find(function(n){return n&&(typeof t=="function"?t(n):wt(n,t))===r})}var yO=function(t){if(!t||!t.length)return null;for(var r=t.length,n=0,a=0,i=0,o=0,s=1/0,l=-1/0,u=0,c=0,f=0;f<r;f++)u=t[f].cx||0,c=t[f].cy||0,n+=u,a+=c,i+=u*c,o+=u*u,s=Math.min(s,u),l=Math.max(l,u);var d=r*o!==n*n?(r*i-n*a)/(r*o-n*n):0;return{xmin:s,xmax:l,a:d,b:(a-d*n)/r}},mO=function(t,r){return J(t)&&J(r)?t-r:Er(t)&&Er(r)?t.localeCompare(r):t instanceof Date&&r instanceof Date?t.getTime()-r.getTime():String(t).localeCompare(String(r))};function un(e,t){for(var r in e)if({}.hasOwnProperty.call(e,r)&&(!{}.hasOwnProperty.call(t,r)||e[r]!==t[r]))return!1;for(var n in t)if({}.hasOwnProperty.call(t,n)&&!{}.hasOwnProperty.call(e,n))return!1;return!0}function Qs(e){"@babel/helpers - typeof";return Qs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qs(e)}var gO=["viewBox","children"],bO=["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"],Hf=["points","pathLength"],el={svg:gO,polygon:Hf,polyline:Hf},tl=["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"],Di=function(t,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var n=t;if(S.isValidElement(t)&&(n=t.props),!nn(n))return null;var a={};return Object.keys(n).forEach(function(i){tl.includes(i)&&(a[i]=r||function(o){return n[i](n,o)})}),a},xO=function(t,r,n){return function(a){return t(r,n,a),null}},ha=function(t,r,n){if(!nn(t)||Qs(t)!=="object")return null;var a=null;return Object.keys(t).forEach(function(i){var o=t[i];tl.includes(i)&&typeof o=="function"&&(a||(a={}),a[i]=xO(o,r,n))}),a},wO=["children"],OO=["children"];function Yf(e,t){if(e==null)return{};var r=SO(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function SO(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function rl(e){"@babel/helpers - typeof";return rl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rl(e)}var Xf={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},Zt=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},Jf=null,nl=null,al=function e(t){if(t===Jf&&Array.isArray(nl))return nl;var r=[];return S.Children.forEach(t,function(n){fe(n)||(aO.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),nl=r,Jf=t,r};function ft(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(a){return Zt(a)}):n=[Zt(t)],al(e).forEach(function(a){var i=wt(a,"type.displayName")||wt(a,"type.name");n.indexOf(i)!==-1&&r.push(a)}),r}function yt(e,t){var r=ft(e,t);return r&&r[0]}var Zf=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,a=r.height;return!(!J(n)||n<=0||!J(a)||a<=0)},AO=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],TO=function(t){return t&&t.type&&Er(t.type)&&AO.indexOf(t.type)>=0},Qf=function(t){return t&&rl(t)==="object"&&"clipDot"in t},PO=function(t,r,n,a){var i,o=(i=el==null?void 0:el[a])!==null&&i!==void 0?i:[];return r.startsWith("data-")||!he(t)&&(a&&o.includes(r)||bO.includes(r))||n&&tl.includes(r)},de=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var a=t;if(S.isValidElement(t)&&(a=t.props),!nn(a))return null;var i={};return Object.keys(a).forEach(function(o){var s;PO((s=a)===null||s===void 0?void 0:s[o],o,r,n)&&(i[o]=a[o])}),i},il=function e(t,r){if(t===r)return!0;var n=S.Children.count(t);if(n!==S.Children.count(r))return!1;if(n===0)return!0;if(n===1)return ed(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var a=0;a<n;a++){var i=t[a],o=r[a];if(Array.isArray(i)||Array.isArray(o)){if(!e(i,o))return!1}else if(!ed(i,o))return!1}return!0},ed=function(t,r){if(fe(t)&&fe(r))return!0;if(!fe(t)&&!fe(r)){var n=t.props||{},a=n.children,i=Yf(n,wO),o=r.props||{},s=o.children,l=Yf(o,OO);return a&&s?un(i,l)&&il(a,s):!a&&!s?un(i,l):!1}return!1},td=function(t,r){var n=[],a={};return al(t).forEach(function(i,o){if(TO(i))n.push(i);else if(i){var s=Zt(i.type),l=r[s]||{},u=l.handler,c=l.once;if(u&&(!c||!a[s])){var f=u(i,s,o);n.push(f),a[s]=!0}}}),n},_O=function(t){var r=t&&t.type;return r&&Xf[r]?Xf[r]:null},EO=function(t,r){return al(r).indexOf(t)},jO=["children","width","height","viewBox","className","style","title","desc"];function ol(){return ol=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ol.apply(this,arguments)}function $O(e,t){if(e==null)return{};var r=CO(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function CO(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function sl(e){var t=e.children,r=e.width,n=e.height,a=e.viewBox,i=e.className,o=e.style,s=e.title,l=e.desc,u=$O(e,jO),c=a||{width:r,height:n,x:0,y:0},f=ye("recharts-surface",i);return S.createElement("svg",ol({},de(u,!0,"svg"),{className:f,width:r,height:n,style:o,viewBox:"".concat(c.x," ").concat(c.y," ").concat(c.width," ").concat(c.height)}),S.createElement("title",null,s),S.createElement("desc",null,l),t)}var MO=["children","className"];function ll(){return ll=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ll.apply(this,arguments)}function kO(e,t){if(e==null)return{};var r=NO(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function NO(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var xe=S.forwardRef(function(e,t){var r=e.children,n=e.className,a=kO(e,MO),i=ye("recharts-layer",n);return S.createElement("g",ll({className:i},de(a,!0),{ref:t}),r)}),DO=process.env.NODE_ENV!=="production",Qt=function(t,r){for(var n=arguments.length,a=new Array(n>2?n-2:0),i=2;i<n;i++)a[i-2]=arguments[i];if(DO&&typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var o=0;console.warn(r.replace(/%s/g,function(){return a[o++]}))}};function IO(e,t,r){var n=-1,a=e.length;t<0&&(t=-t>a?0:a+t),r=r>a?a:r,r<0&&(r+=a),a=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(a);++n<a;)i[n]=e[n+t];return i}var LO=IO,RO=LO;function BO(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:RO(e,t,r)}var FO=BO,WO="\\ud800-\\udfff",UO="\\u0300-\\u036f",zO="\\ufe20-\\ufe2f",KO="\\u20d0-\\u20ff",GO=UO+zO+KO,qO="\\ufe0e\\ufe0f",VO="\\u200d",HO=RegExp("["+VO+WO+GO+qO+"]");function YO(e){return HO.test(e)}var rd=YO;function XO(e){return e.split("")}var JO=XO,nd="\\ud800-\\udfff",ZO="\\u0300-\\u036f",QO="\\ufe20-\\ufe2f",eS="\\u20d0-\\u20ff",tS=ZO+QO+eS,rS="\\ufe0e\\ufe0f",nS="["+nd+"]",ul="["+tS+"]",cl="\\ud83c[\\udffb-\\udfff]",aS="(?:"+ul+"|"+cl+")",ad="[^"+nd+"]",id="(?:\\ud83c[\\udde6-\\uddff]){2}",od="[\\ud800-\\udbff][\\udc00-\\udfff]",iS="\\u200d",sd=aS+"?",ld="["+rS+"]?",oS="(?:"+iS+"(?:"+[ad,id,od].join("|")+")"+ld+sd+")*",sS=ld+sd+oS,lS="(?:"+[ad+ul+"?",ul,id,od,nS].join("|")+")",uS=RegExp(cl+"(?="+cl+")|"+lS+sS,"g");function cS(e){return e.match(uS)||[]}var fS=cS,dS=JO,hS=rd,pS=fS;function vS(e){return hS(e)?pS(e):dS(e)}var yS=vS,mS=FO,gS=rd,bS=yS,xS=Uf;function wS(e){return function(t){t=xS(t);var r=gS(t)?bS(t):void 0,n=r?r[0]:t.charAt(0),a=r?mS(r,1).join(""):t.slice(1);return n[e]()+a}}var OS=wS,SS=OS,AS=SS("toUpperCase"),TS=AS;const Ii=Ce(TS);function Me(e){return function(){return e}}const ud=Math.cos,Li=Math.sin,Mt=Math.sqrt,Ri=Math.PI,Bi=2*Ri,fl=Math.PI,dl=2*fl,Mr=1e-6,PS=dl-Mr;function cd(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function _S(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return cd;const r=10**t;return function(n){this._+=n[0];for(let a=1,i=n.length;a<i;++a)this._+=Math.round(arguments[a]*r)/r+n[a]}}class ES{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?cd:_S(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,a){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+a}`}bezierCurveTo(t,r,n,a,i,o){this._append`C${+t},${+r},${+n},${+a},${this._x1=+i},${this._y1=+o}`}arcTo(t,r,n,a,i){if(t=+t,r=+r,n=+n,a=+a,i=+i,i<0)throw new Error(`negative radius: ${i}`);let o=this._x1,s=this._y1,l=n-t,u=a-r,c=o-t,f=s-r,d=c*c+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(d>Mr)if(!(Math.abs(f*l-u*c)>Mr)||!i)this._append`L${this._x1=t},${this._y1=r}`;else{let h=n-o,y=a-s,v=l*l+u*u,p=h*h+y*y,g=Math.sqrt(v),O=Math.sqrt(d),w=i*Math.tan((fl-Math.acos((v+d-p)/(2*g*O)))/2),A=w/O,m=w/g;Math.abs(A-1)>Mr&&this._append`L${t+A*c},${r+A*f}`,this._append`A${i},${i},0,0,${+(f*h>c*y)},${this._x1=t+m*l},${this._y1=r+m*u}`}}arc(t,r,n,a,i,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(a),l=n*Math.sin(a),u=t+s,c=r+l,f=1^o,d=o?a-i:i-a;this._x1===null?this._append`M${u},${c}`:(Math.abs(this._x1-u)>Mr||Math.abs(this._y1-c)>Mr)&&this._append`L${u},${c}`,n&&(d<0&&(d=d%dl+dl),d>PS?this._append`A${n},${n},0,1,${f},${t-s},${r-l}A${n},${n},0,1,${f},${this._x1=u},${this._y1=c}`:d>Mr&&this._append`A${n},${n},0,${+(d>=fl)},${f},${this._x1=t+n*Math.cos(i)},${this._y1=r+n*Math.sin(i)}`)}rect(t,r,n,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+a}h${-n}Z`}toString(){return this._}}function hl(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new ES(t)}function pl(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function fd(e){this._context=e}fd.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 Fi(e){return new fd(e)}function dd(e){return e[0]}function hd(e){return e[1]}function pd(e,t){var r=Me(!0),n=null,a=Fi,i=null,o=hl(s);e=typeof e=="function"?e:e===void 0?dd:Me(e),t=typeof t=="function"?t:t===void 0?hd:Me(t);function s(l){var u,c=(l=pl(l)).length,f,d=!1,h;for(n==null&&(i=a(h=o())),u=0;u<=c;++u)!(u<c&&r(f=l[u],u,l))===d&&((d=!d)?i.lineStart():i.lineEnd()),d&&i.point(+e(f,u,l),+t(f,u,l));if(h)return i=null,h+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:Me(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:Me(+l),s):t},s.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Me(!!l),s):r},s.curve=function(l){return arguments.length?(a=l,n!=null&&(i=a(n)),s):a},s.context=function(l){return arguments.length?(l==null?n=i=null:i=a(n=l),s):n},s}function Wi(e,t,r){var n=null,a=Me(!0),i=null,o=Fi,s=null,l=hl(u);e=typeof e=="function"?e:e===void 0?dd:Me(+e),t=typeof t=="function"?t:Me(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?hd:Me(+r);function u(f){var d,h,y,v=(f=pl(f)).length,p,g=!1,O,w=new Array(v),A=new Array(v);for(i==null&&(s=o(O=l())),d=0;d<=v;++d){if(!(d<v&&a(p=f[d],d,f))===g)if(g=!g)h=d,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),y=d-1;y>=h;--y)s.point(w[y],A[y]);s.lineEnd(),s.areaEnd()}g&&(w[d]=+e(p,d,f),A[d]=+t(p,d,f),s.point(n?+n(p,d,f):w[d],r?+r(p,d,f):A[d]))}if(O)return s=null,O+""||null}function c(){return pd().defined(a).curve(o).context(i)}return u.x=function(f){return arguments.length?(e=typeof f=="function"?f:Me(+f),n=null,u):e},u.x0=function(f){return arguments.length?(e=typeof f=="function"?f:Me(+f),u):e},u.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Me(+f),u):n},u.y=function(f){return arguments.length?(t=typeof f=="function"?f:Me(+f),r=null,u):t},u.y0=function(f){return arguments.length?(t=typeof f=="function"?f:Me(+f),u):t},u.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Me(+f),u):r},u.lineX0=u.lineY0=function(){return c().x(e).y(t)},u.lineY1=function(){return c().x(e).y(r)},u.lineX1=function(){return c().x(n).y(t)},u.defined=function(f){return arguments.length?(a=typeof f=="function"?f:Me(!!f),u):a},u.curve=function(f){return arguments.length?(o=f,i!=null&&(s=o(i)),u):o},u.context=function(f){return arguments.length?(f==null?i=s=null:s=o(i=f),u):i},u}class vd{constructor(t,r){this._context=t,this._x=r}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,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function jS(e){return new vd(e,!0)}function $S(e){return new vd(e,!1)}const vl={draw(e,t){const r=Mt(t/Ri);e.moveTo(r,0),e.arc(0,0,r,0,Bi)}},CS={draw(e,t){const r=Mt(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},yd=Mt(1/3),MS=yd*2,kS={draw(e,t){const r=Mt(t/MS),n=r*yd;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},NS={draw(e,t){const r=Mt(t),n=-r/2;e.rect(n,n,r,r)}},DS=.8908130915292852,md=Li(Ri/10)/Li(7*Ri/10),IS=Li(Bi/10)*md,LS=-ud(Bi/10)*md,RS={draw(e,t){const r=Mt(t*DS),n=IS*r,a=LS*r;e.moveTo(0,-r),e.lineTo(n,a);for(let i=1;i<5;++i){const o=Bi*i/5,s=ud(o),l=Li(o);e.lineTo(l*r,-s*r),e.lineTo(s*n-l*a,l*n+s*a)}e.closePath()}},yl=Mt(3),BS={draw(e,t){const r=-Mt(t/(yl*3));e.moveTo(0,r*2),e.lineTo(-yl*r,-r),e.lineTo(yl*r,-r),e.closePath()}},Ot=-.5,St=Mt(3)/2,ml=1/Mt(12),FS=(ml/2+1)*3,WS={draw(e,t){const r=Mt(t/FS),n=r/2,a=r*ml,i=n,o=r*ml+r,s=-i,l=o;e.moveTo(n,a),e.lineTo(i,o),e.lineTo(s,l),e.lineTo(Ot*n-St*a,St*n+Ot*a),e.lineTo(Ot*i-St*o,St*i+Ot*o),e.lineTo(Ot*s-St*l,St*s+Ot*l),e.lineTo(Ot*n+St*a,Ot*a-St*n),e.lineTo(Ot*i+St*o,Ot*o-St*i),e.lineTo(Ot*s+St*l,Ot*l-St*s),e.closePath()}};function US(e,t){let r=null,n=hl(a);e=typeof e=="function"?e:Me(e||vl),t=typeof t=="function"?t:Me(t===void 0?64:+t);function a(){let i;if(r||(r=i=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),i)return r=null,i+""||null}return a.type=function(i){return arguments.length?(e=typeof i=="function"?i:Me(i),a):e},a.size=function(i){return arguments.length?(t=typeof i=="function"?i:Me(+i),a):t},a.context=function(i){return arguments.length?(r=i??null,a):r},a}function Ui(){}function zi(e,t,r){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+r)/6)}function gd(e){this._context=e}gd.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:zi(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:zi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function zS(e){return new gd(e)}function bd(e){this._context=e}bd.prototype={areaStart:Ui,areaEnd:Ui,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:zi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function KS(e){return new bd(e)}function xd(e){this._context=e}xd.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 r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:zi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function GS(e){return new xd(e)}function wd(e){this._context=e}wd.prototype={areaStart:Ui,areaEnd:Ui,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 qS(e){return new wd(e)}function Od(e){return e<0?-1:1}function Sd(e,t,r){var n=e._x1-e._x0,a=t-e._x1,i=(e._y1-e._y0)/(n||a<0&&-0),o=(r-e._y1)/(a||n<0&&-0),s=(i*a+o*n)/(n+a);return(Od(i)+Od(o))*Math.min(Math.abs(i),Math.abs(o),.5*Math.abs(s))||0}function Ad(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function gl(e,t,r){var n=e._x0,a=e._y0,i=e._x1,o=e._y1,s=(i-n)/3;e._context.bezierCurveTo(n+s,a+s*t,i-s,o-s*r,i,o)}function Ki(e){this._context=e}Ki.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:gl(this,this._t0,Ad(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 r=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,gl(this,Ad(this,r=Sd(this,e,t)),r);break;default:gl(this,this._t0,r=Sd(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Td(e){this._context=new Pd(e)}(Td.prototype=Object.create(Ki.prototype)).point=function(e,t){Ki.prototype.point.call(this,t,e)};function Pd(e){this._context=e}Pd.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,r,n,a,i){this._context.bezierCurveTo(t,e,n,r,i,a)}};function VS(e){return new Ki(e)}function HS(e){return new Td(e)}function _d(e){this._context=e}_d.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,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=Ed(e),a=Ed(t),i=0,o=1;o<r;++i,++o)this._context.bezierCurveTo(n[0][i],a[0][i],n[1][i],a[1][i],e[o],t[o]);(this._line||this._line!==0&&r===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 Ed(e){var t,r=e.length-1,n,a=new Array(r),i=new Array(r),o=new Array(r);for(a[0]=0,i[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)a[t]=1,i[t]=4,o[t]=4*e[t]+2*e[t+1];for(a[r-1]=2,i[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=a[t]/i[t-1],i[t]-=n,o[t]-=n*o[t-1];for(a[r-1]=o[r-1]/i[r-1],t=r-2;t>=0;--t)a[t]=(o[t]-a[t+1])/i[t];for(i[r-1]=(e[r]+a[r-1])/2,t=0;t<r-1;++t)i[t]=2*e[t+1]-a[t+1];return[a,i]}function YS(e){return new _d(e)}function Gi(e,t){this._context=e,this._t=t}Gi.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 r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function XS(e){return new Gi(e,.5)}function JS(e){return new Gi(e,0)}function ZS(e){return new Gi(e,1)}function cn(e,t){if((o=e.length)>1)for(var r=1,n,a,i=e[t[0]],o,s=i.length;r<o;++r)for(a=i,i=e[t[r]],n=0;n<s;++n)i[n][1]+=i[n][0]=isNaN(a[n][1])?a[n][0]:a[n][1]}function bl(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function QS(e,t){return e[t]}function eA(e){const t=[];return t.key=e,t}function tA(){var e=Me([]),t=bl,r=cn,n=QS;function a(i){var o=Array.from(e.apply(this,arguments),eA),s,l=o.length,u=-1,c;for(const f of i)for(s=0,++u;s<l;++s)(o[s][u]=[0,+n(f,o[s].key,u,i)]).data=f;for(s=0,c=pl(t(o));s<l;++s)o[c[s]].index=s;return r(o,c),o}return a.keys=function(i){return arguments.length?(e=typeof i=="function"?i:Me(Array.from(i)),a):e},a.value=function(i){return arguments.length?(n=typeof i=="function"?i:Me(+i),a):n},a.order=function(i){return arguments.length?(t=i==null?bl:typeof i=="function"?i:Me(Array.from(i)),a):t},a.offset=function(i){return arguments.length?(r=i??cn,a):r},a}function rA(e,t){if((n=e.length)>0){for(var r,n,a=0,i=e[0].length,o;a<i;++a){for(o=r=0;r<n;++r)o+=e[r][a][1]||0;if(o)for(r=0;r<n;++r)e[r][a][1]/=o}cn(e,t)}}function nA(e,t){if((a=e.length)>0){for(var r=0,n=e[t[0]],a,i=n.length;r<i;++r){for(var o=0,s=0;o<a;++o)s+=e[o][r][1]||0;n[r][1]+=n[r][0]=-s/2}cn(e,t)}}function aA(e,t){if(!(!((o=e.length)>0)||!((i=(a=e[t[0]]).length)>0))){for(var r=0,n=1,a,i,o;n<i;++n){for(var s=0,l=0,u=0;s<o;++s){for(var c=e[t[s]],f=c[n][1]||0,d=c[n-1][1]||0,h=(f-d)/2,y=0;y<s;++y){var v=e[t[y]],p=v[n][1]||0,g=v[n-1][1]||0;h+=p-g}l+=f,u+=h*f}a[n-1][1]+=a[n-1][0]=r,l&&(r-=u/l)}a[n-1][1]+=a[n-1][0]=r,cn(e,t)}}function pa(e){"@babel/helpers - typeof";return pa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pa(e)}var iA=["type","size","sizeType"];function xl(){return xl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},xl.apply(this,arguments)}function jd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function $d(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jd(Object(r),!0).forEach(function(n){oA(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function oA(e,t,r){return t=sA(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sA(e){var t=lA(e,"string");return pa(t)=="symbol"?t:t+""}function lA(e,t){if(pa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(pa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function uA(e,t){if(e==null)return{};var r=cA(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function cA(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var Cd={symbolCircle:vl,symbolCross:CS,symbolDiamond:kS,symbolSquare:NS,symbolStar:RS,symbolTriangle:BS,symbolWye:WS},fA=Math.PI/180,dA=function(t){var r="symbol".concat(Ii(t));return Cd[r]||vl},hA=function(t,r,n){if(r==="area")return t;switch(n){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var a=18*fA;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.pow(Math.tan(a),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},pA=function(t,r){Cd["symbol".concat(Ii(t))]=r},qi=function(t){var r=t.type,n=r===void 0?"circle":r,a=t.size,i=a===void 0?64:a,o=t.sizeType,s=o===void 0?"area":o,l=uA(t,iA),u=$d($d({},l),{},{type:n,size:i,sizeType:s}),c=function(){var p=dA(n),g=US().type(p).size(hA(i,s,n));return g()},f=u.className,d=u.cx,h=u.cy,y=de(u,!0);return d===+d&&h===+h&&i===+i?S.createElement("path",xl({},y,{className:ye("recharts-symbols",f),transform:"translate(".concat(d,", ").concat(h,")"),d:c()})):null};qi.registerSymbol=pA;function fn(e){"@babel/helpers - typeof";return fn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fn(e)}function wl(){return wl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},wl.apply(this,arguments)}function Md(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function vA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Md(Object(r),!0).forEach(function(n){va(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Md(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function yA(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mA(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Nd(n.key),n)}}function gA(e,t,r){return t&&mA(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function bA(e,t,r){return t=Vi(t),xA(e,kd()?Reflect.construct(t,r||[],Vi(e).constructor):t.apply(e,r))}function xA(e,t){if(t&&(fn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return wA(e)}function wA(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(kd=function(){return!!e})()}function Vi(e){return Vi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Vi(e)}function OA(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ol(e,t)}function Ol(e,t){return Ol=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Ol(e,t)}function va(e,t,r){return t=Nd(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Nd(e){var t=SA(e,"string");return fn(t)=="symbol"?t:t+""}function SA(e,t){if(fn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(fn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var At=32,Sl=function(e){function t(){return yA(this,t),bA(this,t,arguments)}return OA(t,e),gA(t,[{key:"renderIcon",value:function(n){var a=this.props.inactiveColor,i=At/2,o=At/6,s=At/3,l=n.inactive?a:n.color;if(n.type==="plainline")return S.createElement("line",{strokeWidth:4,fill:"none",stroke:l,strokeDasharray:n.payload.strokeDasharray,x1:0,y1:i,x2:At,y2:i,className:"recharts-legend-icon"});if(n.type==="line")return S.createElement("path",{strokeWidth:4,fill:"none",stroke:l,d:"M0,".concat(i,"h").concat(s,`
126
+ */var qf;function aO(){return qf||(qf=1,process.env.NODE_ENV!=="production"&&function(){var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),o=Symbol.for("react.context"),s=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),v=!1,m=!1,p=!1,x=!1,O=!1,w;w=Symbol.for("react.module.reference");function A(q){return!!(typeof q=="string"||typeof q=="function"||q===r||q===a||O||q===n||q===u||q===c||x||q===h||v||m||p||typeof q=="object"&&q!==null&&(q.$$typeof===d||q.$$typeof===f||q.$$typeof===i||q.$$typeof===o||q.$$typeof===l||q.$$typeof===w||q.getModuleId!==void 0))}function y(q){if(typeof q=="object"&&q!==null){var se=q.$$typeof;switch(se){case e:var ee=q.type;switch(ee){case r:case a:case n:case u:case c:return ee;default:var ve=ee&&ee.$$typeof;switch(ve){case s:case o:case l:case d:case f:case i:return ve;default:return se}}case t:return se}}}var b=o,S=i,P=e,$=l,M=r,_=d,j=f,R=t,k=a,D=n,C=u,B=c,U=!1,K=!1;function E(q){return U||(U=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function L(q){return K||(K=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function F(q){return y(q)===o}function W(q){return y(q)===i}function G(q){return typeof q=="object"&&q!==null&&q.$$typeof===e}function X(q){return y(q)===l}function Q(q){return y(q)===r}function ae(q){return y(q)===d}function te(q){return y(q)===f}function V(q){return y(q)===t}function Y(q){return y(q)===a}function J(q){return y(q)===n}function I(q){return y(q)===u}function ie(q){return y(q)===c}Oe.ContextConsumer=b,Oe.ContextProvider=S,Oe.Element=P,Oe.ForwardRef=$,Oe.Fragment=M,Oe.Lazy=_,Oe.Memo=j,Oe.Portal=R,Oe.Profiler=k,Oe.StrictMode=D,Oe.Suspense=C,Oe.SuspenseList=B,Oe.isAsyncMode=E,Oe.isConcurrentMode=L,Oe.isContextConsumer=F,Oe.isContextProvider=W,Oe.isElement=G,Oe.isForwardRef=X,Oe.isFragment=Q,Oe.isLazy=ae,Oe.isMemo=te,Oe.isPortal=V,Oe.isProfiler=Y,Oe.isStrictMode=J,Oe.isSuspense=I,Oe.isSuspenseList=ie,Oe.isValidElementType=A,Oe.typeOf=y}()),Oe}process.env.NODE_ENV==="production"?Js.exports=nO():Js.exports=aO();var iO=Js.exports,oO=Zt,sO=Jt,lO="[object Number]";function uO(e){return typeof e=="number"||sO(e)&&oO(e)==lO}var Hf=uO;const cO=Ce(Hf);var fO=Hf;function dO(e){return fO(e)&&e!=+e}var hO=dO;const sn=Ce(hO);var Ct=function(t){return t===0?0:t>0?1:-1},jr=function(t){return Er(t)&&t.indexOf("%")===t.length-1},Z=function(t){return cO(t)&&!sn(t)},pO=function(t){return fe(t)},Ye=function(t){return Z(t)||Er(t)},vO=0,$r=function(t){var r=++vO;return"".concat(t||"").concat(r)},Cr=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Z(t)&&!Er(t))return n;var i;if(jr(t)){var o=t.indexOf("%");i=r*parseFloat(t.slice(0,o))/100}else i=+t;return sn(i)&&(i=n),a&&i>r&&(i=r),i},hr=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},yO=function(t){if(!Array.isArray(t))return!1;for(var r=t.length,n={},a=0;a<r;a++)if(!n[t[a]])n[t[a]]=!0;else return!0;return!1},Ue=function(t,r){return Z(t)&&Z(r)?function(n){return t+n*(r-t)}:function(){return r}};function Ni(e,t,r){return!e||!e.length?null:e.find(function(n){return n&&(typeof t=="function"?t(n):wt(n,t))===r})}var mO=function(t){if(!t||!t.length)return null;for(var r=t.length,n=0,a=0,i=0,o=0,s=1/0,l=-1/0,u=0,c=0,f=0;f<r;f++)u=t[f].cx||0,c=t[f].cy||0,n+=u,a+=c,i+=u*c,o+=u*u,s=Math.min(s,u),l=Math.max(l,u);var d=r*o!==n*n?(r*i-n*a)/(r*o-n*n):0;return{xmin:s,xmax:l,a:d,b:(a-d*n)/r}},gO=function(t,r){return Z(t)&&Z(r)?t-r:Er(t)&&Er(r)?t.localeCompare(r):t instanceof Date&&r instanceof Date?t.getTime()-r.getTime():String(t).localeCompare(String(r))};function ln(e,t){for(var r in e)if({}.hasOwnProperty.call(e,r)&&(!{}.hasOwnProperty.call(t,r)||e[r]!==t[r]))return!1;for(var n in t)if({}.hasOwnProperty.call(t,n)&&!{}.hasOwnProperty.call(e,n))return!1;return!0}function Qs(e){"@babel/helpers - typeof";return Qs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qs(e)}var bO=["viewBox","children"],xO=["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"],Yf=["points","pathLength"],el={svg:bO,polygon:Yf,polyline:Yf},tl=["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"],Di=function(t,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var n=t;if(T.isValidElement(t)&&(n=t.props),!rn(n))return null;var a={};return Object.keys(n).forEach(function(i){tl.includes(i)&&(a[i]=r||function(o){return n[i](n,o)})}),a},wO=function(t,r,n){return function(a){return t(r,n,a),null}},pa=function(t,r,n){if(!rn(t)||Qs(t)!=="object")return null;var a=null;return Object.keys(t).forEach(function(i){var o=t[i];tl.includes(i)&&typeof o=="function"&&(a||(a={}),a[i]=wO(o,r,n))}),a},OO=["children"],SO=["children"];function Xf(e,t){if(e==null)return{};var r=TO(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function TO(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function rl(e){"@babel/helpers - typeof";return rl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rl(e)}var Zf={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},Qt=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},Jf=null,nl=null,al=function e(t){if(t===Jf&&Array.isArray(nl))return nl;var r=[];return T.Children.forEach(t,function(n){fe(n)||(iO.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),nl=r,Jf=t,r};function dt(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(a){return Qt(a)}):n=[Qt(t)],al(e).forEach(function(a){var i=wt(a,"type.displayName")||wt(a,"type.name");n.indexOf(i)!==-1&&r.push(a)}),r}function yt(e,t){var r=dt(e,t);return r&&r[0]}var Qf=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,a=r.height;return!(!Z(n)||n<=0||!Z(a)||a<=0)},AO=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],PO=function(t){return t&&t.type&&Er(t.type)&&AO.indexOf(t.type)>=0},ed=function(t){return t&&rl(t)==="object"&&"clipDot"in t},_O=function(t,r,n,a){var i,o=(i=el==null?void 0:el[a])!==null&&i!==void 0?i:[];return r.startsWith("data-")||!he(t)&&(a&&o.includes(r)||xO.includes(r))||n&&tl.includes(r)},de=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var a=t;if(T.isValidElement(t)&&(a=t.props),!rn(a))return null;var i={};return Object.keys(a).forEach(function(o){var s;_O((s=a)===null||s===void 0?void 0:s[o],o,r,n)&&(i[o]=a[o])}),i},il=function e(t,r){if(t===r)return!0;var n=T.Children.count(t);if(n!==T.Children.count(r))return!1;if(n===0)return!0;if(n===1)return td(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var a=0;a<n;a++){var i=t[a],o=r[a];if(Array.isArray(i)||Array.isArray(o)){if(!e(i,o))return!1}else if(!td(i,o))return!1}return!0},td=function(t,r){if(fe(t)&&fe(r))return!0;if(!fe(t)&&!fe(r)){var n=t.props||{},a=n.children,i=Xf(n,OO),o=r.props||{},s=o.children,l=Xf(o,SO);return a&&s?ln(i,l)&&il(a,s):!a&&!s?ln(i,l):!1}return!1},rd=function(t,r){var n=[],a={};return al(t).forEach(function(i,o){if(PO(i))n.push(i);else if(i){var s=Qt(i.type),l=r[s]||{},u=l.handler,c=l.once;if(u&&(!c||!a[s])){var f=u(i,s,o);n.push(f),a[s]=!0}}}),n},EO=function(t){var r=t&&t.type;return r&&Zf[r]?Zf[r]:null},jO=function(t,r){return al(r).indexOf(t)},$O=["children","width","height","viewBox","className","style","title","desc"];function ol(){return ol=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ol.apply(this,arguments)}function CO(e,t){if(e==null)return{};var r=MO(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function MO(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function sl(e){var t=e.children,r=e.width,n=e.height,a=e.viewBox,i=e.className,o=e.style,s=e.title,l=e.desc,u=CO(e,$O),c=a||{width:r,height:n,x:0,y:0},f=ye("recharts-surface",i);return T.createElement("svg",ol({},de(u,!0,"svg"),{className:f,width:r,height:n,style:o,viewBox:"".concat(c.x," ").concat(c.y," ").concat(c.width," ").concat(c.height)}),T.createElement("title",null,s),T.createElement("desc",null,l),t)}var kO=["children","className"];function ll(){return ll=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ll.apply(this,arguments)}function NO(e,t){if(e==null)return{};var r=DO(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function DO(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var xe=T.forwardRef(function(e,t){var r=e.children,n=e.className,a=NO(e,kO),i=ye("recharts-layer",n);return T.createElement("g",ll({className:i},de(a,!0),{ref:t}),r)}),IO=process.env.NODE_ENV!=="production",er=function(t,r){for(var n=arguments.length,a=new Array(n>2?n-2:0),i=2;i<n;i++)a[i-2]=arguments[i];if(IO&&typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var o=0;console.warn(r.replace(/%s/g,function(){return a[o++]}))}};function LO(e,t,r){var n=-1,a=e.length;t<0&&(t=-t>a?0:a+t),r=r>a?a:r,r<0&&(r+=a),a=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(a);++n<a;)i[n]=e[n+t];return i}var RO=LO,BO=RO;function FO(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:BO(e,t,r)}var WO=FO,UO="\\ud800-\\udfff",zO="\\u0300-\\u036f",KO="\\ufe20-\\ufe2f",GO="\\u20d0-\\u20ff",VO=zO+KO+GO,qO="\\ufe0e\\ufe0f",HO="\\u200d",YO=RegExp("["+HO+UO+VO+qO+"]");function XO(e){return YO.test(e)}var nd=XO;function ZO(e){return e.split("")}var JO=ZO,ad="\\ud800-\\udfff",QO="\\u0300-\\u036f",eS="\\ufe20-\\ufe2f",tS="\\u20d0-\\u20ff",rS=QO+eS+tS,nS="\\ufe0e\\ufe0f",aS="["+ad+"]",ul="["+rS+"]",cl="\\ud83c[\\udffb-\\udfff]",iS="(?:"+ul+"|"+cl+")",id="[^"+ad+"]",od="(?:\\ud83c[\\udde6-\\uddff]){2}",sd="[\\ud800-\\udbff][\\udc00-\\udfff]",oS="\\u200d",ld=iS+"?",ud="["+nS+"]?",sS="(?:"+oS+"(?:"+[id,od,sd].join("|")+")"+ud+ld+")*",lS=ud+ld+sS,uS="(?:"+[id+ul+"?",ul,od,sd,aS].join("|")+")",cS=RegExp(cl+"(?="+cl+")|"+uS+lS,"g");function fS(e){return e.match(cS)||[]}var dS=fS,hS=JO,pS=nd,vS=dS;function yS(e){return pS(e)?vS(e):hS(e)}var mS=yS,gS=WO,bS=nd,xS=mS,wS=zf;function OS(e){return function(t){t=wS(t);var r=bS(t)?xS(t):void 0,n=r?r[0]:t.charAt(0),a=r?gS(r,1).join(""):t.slice(1);return n[e]()+a}}var SS=OS,TS=SS,AS=TS("toUpperCase"),PS=AS;const Ii=Ce(PS);function Me(e){return function(){return e}}const cd=Math.cos,Li=Math.sin,Mt=Math.sqrt,Ri=Math.PI,Bi=2*Ri,fl=Math.PI,dl=2*fl,Mr=1e-6,_S=dl-Mr;function fd(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function ES(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return fd;const r=10**t;return function(n){this._+=n[0];for(let a=1,i=n.length;a<i;++a)this._+=Math.round(arguments[a]*r)/r+n[a]}}class jS{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?fd:ES(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,a){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+a}`}bezierCurveTo(t,r,n,a,i,o){this._append`C${+t},${+r},${+n},${+a},${this._x1=+i},${this._y1=+o}`}arcTo(t,r,n,a,i){if(t=+t,r=+r,n=+n,a=+a,i=+i,i<0)throw new Error(`negative radius: ${i}`);let o=this._x1,s=this._y1,l=n-t,u=a-r,c=o-t,f=s-r,d=c*c+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(d>Mr)if(!(Math.abs(f*l-u*c)>Mr)||!i)this._append`L${this._x1=t},${this._y1=r}`;else{let h=n-o,v=a-s,m=l*l+u*u,p=h*h+v*v,x=Math.sqrt(m),O=Math.sqrt(d),w=i*Math.tan((fl-Math.acos((m+d-p)/(2*x*O)))/2),A=w/O,y=w/x;Math.abs(A-1)>Mr&&this._append`L${t+A*c},${r+A*f}`,this._append`A${i},${i},0,0,${+(f*h>c*v)},${this._x1=t+y*l},${this._y1=r+y*u}`}}arc(t,r,n,a,i,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(a),l=n*Math.sin(a),u=t+s,c=r+l,f=1^o,d=o?a-i:i-a;this._x1===null?this._append`M${u},${c}`:(Math.abs(this._x1-u)>Mr||Math.abs(this._y1-c)>Mr)&&this._append`L${u},${c}`,n&&(d<0&&(d=d%dl+dl),d>_S?this._append`A${n},${n},0,1,${f},${t-s},${r-l}A${n},${n},0,1,${f},${this._x1=u},${this._y1=c}`:d>Mr&&this._append`A${n},${n},0,${+(d>=fl)},${f},${this._x1=t+n*Math.cos(i)},${this._y1=r+n*Math.sin(i)}`)}rect(t,r,n,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+a}h${-n}Z`}toString(){return this._}}function hl(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new jS(t)}function pl(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function dd(e){this._context=e}dd.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 Fi(e){return new dd(e)}function hd(e){return e[0]}function pd(e){return e[1]}function vd(e,t){var r=Me(!0),n=null,a=Fi,i=null,o=hl(s);e=typeof e=="function"?e:e===void 0?hd:Me(e),t=typeof t=="function"?t:t===void 0?pd:Me(t);function s(l){var u,c=(l=pl(l)).length,f,d=!1,h;for(n==null&&(i=a(h=o())),u=0;u<=c;++u)!(u<c&&r(f=l[u],u,l))===d&&((d=!d)?i.lineStart():i.lineEnd()),d&&i.point(+e(f,u,l),+t(f,u,l));if(h)return i=null,h+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:Me(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:Me(+l),s):t},s.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Me(!!l),s):r},s.curve=function(l){return arguments.length?(a=l,n!=null&&(i=a(n)),s):a},s.context=function(l){return arguments.length?(l==null?n=i=null:i=a(n=l),s):n},s}function Wi(e,t,r){var n=null,a=Me(!0),i=null,o=Fi,s=null,l=hl(u);e=typeof e=="function"?e:e===void 0?hd:Me(+e),t=typeof t=="function"?t:Me(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?pd:Me(+r);function u(f){var d,h,v,m=(f=pl(f)).length,p,x=!1,O,w=new Array(m),A=new Array(m);for(i==null&&(s=o(O=l())),d=0;d<=m;++d){if(!(d<m&&a(p=f[d],d,f))===x)if(x=!x)h=d,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),v=d-1;v>=h;--v)s.point(w[v],A[v]);s.lineEnd(),s.areaEnd()}x&&(w[d]=+e(p,d,f),A[d]=+t(p,d,f),s.point(n?+n(p,d,f):w[d],r?+r(p,d,f):A[d]))}if(O)return s=null,O+""||null}function c(){return vd().defined(a).curve(o).context(i)}return u.x=function(f){return arguments.length?(e=typeof f=="function"?f:Me(+f),n=null,u):e},u.x0=function(f){return arguments.length?(e=typeof f=="function"?f:Me(+f),u):e},u.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Me(+f),u):n},u.y=function(f){return arguments.length?(t=typeof f=="function"?f:Me(+f),r=null,u):t},u.y0=function(f){return arguments.length?(t=typeof f=="function"?f:Me(+f),u):t},u.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Me(+f),u):r},u.lineX0=u.lineY0=function(){return c().x(e).y(t)},u.lineY1=function(){return c().x(e).y(r)},u.lineX1=function(){return c().x(n).y(t)},u.defined=function(f){return arguments.length?(a=typeof f=="function"?f:Me(!!f),u):a},u.curve=function(f){return arguments.length?(o=f,i!=null&&(s=o(i)),u):o},u.context=function(f){return arguments.length?(f==null?i=s=null:s=o(i=f),u):i},u}class yd{constructor(t,r){this._context=t,this._x=r}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,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function $S(e){return new yd(e,!0)}function CS(e){return new yd(e,!1)}const vl={draw(e,t){const r=Mt(t/Ri);e.moveTo(r,0),e.arc(0,0,r,0,Bi)}},MS={draw(e,t){const r=Mt(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},md=Mt(1/3),kS=md*2,NS={draw(e,t){const r=Mt(t/kS),n=r*md;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},DS={draw(e,t){const r=Mt(t),n=-r/2;e.rect(n,n,r,r)}},IS=.8908130915292852,gd=Li(Ri/10)/Li(7*Ri/10),LS=Li(Bi/10)*gd,RS=-cd(Bi/10)*gd,BS={draw(e,t){const r=Mt(t*IS),n=LS*r,a=RS*r;e.moveTo(0,-r),e.lineTo(n,a);for(let i=1;i<5;++i){const o=Bi*i/5,s=cd(o),l=Li(o);e.lineTo(l*r,-s*r),e.lineTo(s*n-l*a,l*n+s*a)}e.closePath()}},yl=Mt(3),FS={draw(e,t){const r=-Mt(t/(yl*3));e.moveTo(0,r*2),e.lineTo(-yl*r,-r),e.lineTo(yl*r,-r),e.closePath()}},Ot=-.5,St=Mt(3)/2,ml=1/Mt(12),WS=(ml/2+1)*3,US={draw(e,t){const r=Mt(t/WS),n=r/2,a=r*ml,i=n,o=r*ml+r,s=-i,l=o;e.moveTo(n,a),e.lineTo(i,o),e.lineTo(s,l),e.lineTo(Ot*n-St*a,St*n+Ot*a),e.lineTo(Ot*i-St*o,St*i+Ot*o),e.lineTo(Ot*s-St*l,St*s+Ot*l),e.lineTo(Ot*n+St*a,Ot*a-St*n),e.lineTo(Ot*i+St*o,Ot*o-St*i),e.lineTo(Ot*s+St*l,Ot*l-St*s),e.closePath()}};function zS(e,t){let r=null,n=hl(a);e=typeof e=="function"?e:Me(e||vl),t=typeof t=="function"?t:Me(t===void 0?64:+t);function a(){let i;if(r||(r=i=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),i)return r=null,i+""||null}return a.type=function(i){return arguments.length?(e=typeof i=="function"?i:Me(i),a):e},a.size=function(i){return arguments.length?(t=typeof i=="function"?i:Me(+i),a):t},a.context=function(i){return arguments.length?(r=i??null,a):r},a}function Ui(){}function zi(e,t,r){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+r)/6)}function bd(e){this._context=e}bd.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:zi(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:zi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function KS(e){return new bd(e)}function xd(e){this._context=e}xd.prototype={areaStart:Ui,areaEnd:Ui,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:zi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function GS(e){return new xd(e)}function wd(e){this._context=e}wd.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 r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:zi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function VS(e){return new wd(e)}function Od(e){this._context=e}Od.prototype={areaStart:Ui,areaEnd:Ui,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 qS(e){return new Od(e)}function Sd(e){return e<0?-1:1}function Td(e,t,r){var n=e._x1-e._x0,a=t-e._x1,i=(e._y1-e._y0)/(n||a<0&&-0),o=(r-e._y1)/(a||n<0&&-0),s=(i*a+o*n)/(n+a);return(Sd(i)+Sd(o))*Math.min(Math.abs(i),Math.abs(o),.5*Math.abs(s))||0}function Ad(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function gl(e,t,r){var n=e._x0,a=e._y0,i=e._x1,o=e._y1,s=(i-n)/3;e._context.bezierCurveTo(n+s,a+s*t,i-s,o-s*r,i,o)}function Ki(e){this._context=e}Ki.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:gl(this,this._t0,Ad(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 r=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,gl(this,Ad(this,r=Td(this,e,t)),r);break;default:gl(this,this._t0,r=Td(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Pd(e){this._context=new _d(e)}(Pd.prototype=Object.create(Ki.prototype)).point=function(e,t){Ki.prototype.point.call(this,t,e)};function _d(e){this._context=e}_d.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,r,n,a,i){this._context.bezierCurveTo(t,e,n,r,i,a)}};function HS(e){return new Ki(e)}function YS(e){return new Pd(e)}function Ed(e){this._context=e}Ed.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,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=jd(e),a=jd(t),i=0,o=1;o<r;++i,++o)this._context.bezierCurveTo(n[0][i],a[0][i],n[1][i],a[1][i],e[o],t[o]);(this._line||this._line!==0&&r===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 jd(e){var t,r=e.length-1,n,a=new Array(r),i=new Array(r),o=new Array(r);for(a[0]=0,i[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)a[t]=1,i[t]=4,o[t]=4*e[t]+2*e[t+1];for(a[r-1]=2,i[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=a[t]/i[t-1],i[t]-=n,o[t]-=n*o[t-1];for(a[r-1]=o[r-1]/i[r-1],t=r-2;t>=0;--t)a[t]=(o[t]-a[t+1])/i[t];for(i[r-1]=(e[r]+a[r-1])/2,t=0;t<r-1;++t)i[t]=2*e[t+1]-a[t+1];return[a,i]}function XS(e){return new Ed(e)}function Gi(e,t){this._context=e,this._t=t}Gi.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 r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function ZS(e){return new Gi(e,.5)}function JS(e){return new Gi(e,0)}function QS(e){return new Gi(e,1)}function un(e,t){if((o=e.length)>1)for(var r=1,n,a,i=e[t[0]],o,s=i.length;r<o;++r)for(a=i,i=e[t[r]],n=0;n<s;++n)i[n][1]+=i[n][0]=isNaN(a[n][1])?a[n][0]:a[n][1]}function bl(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function eT(e,t){return e[t]}function tT(e){const t=[];return t.key=e,t}function rT(){var e=Me([]),t=bl,r=un,n=eT;function a(i){var o=Array.from(e.apply(this,arguments),tT),s,l=o.length,u=-1,c;for(const f of i)for(s=0,++u;s<l;++s)(o[s][u]=[0,+n(f,o[s].key,u,i)]).data=f;for(s=0,c=pl(t(o));s<l;++s)o[c[s]].index=s;return r(o,c),o}return a.keys=function(i){return arguments.length?(e=typeof i=="function"?i:Me(Array.from(i)),a):e},a.value=function(i){return arguments.length?(n=typeof i=="function"?i:Me(+i),a):n},a.order=function(i){return arguments.length?(t=i==null?bl:typeof i=="function"?i:Me(Array.from(i)),a):t},a.offset=function(i){return arguments.length?(r=i??un,a):r},a}function nT(e,t){if((n=e.length)>0){for(var r,n,a=0,i=e[0].length,o;a<i;++a){for(o=r=0;r<n;++r)o+=e[r][a][1]||0;if(o)for(r=0;r<n;++r)e[r][a][1]/=o}un(e,t)}}function aT(e,t){if((a=e.length)>0){for(var r=0,n=e[t[0]],a,i=n.length;r<i;++r){for(var o=0,s=0;o<a;++o)s+=e[o][r][1]||0;n[r][1]+=n[r][0]=-s/2}un(e,t)}}function iT(e,t){if(!(!((o=e.length)>0)||!((i=(a=e[t[0]]).length)>0))){for(var r=0,n=1,a,i,o;n<i;++n){for(var s=0,l=0,u=0;s<o;++s){for(var c=e[t[s]],f=c[n][1]||0,d=c[n-1][1]||0,h=(f-d)/2,v=0;v<s;++v){var m=e[t[v]],p=m[n][1]||0,x=m[n-1][1]||0;h+=p-x}l+=f,u+=h*f}a[n-1][1]+=a[n-1][0]=r,l&&(r-=u/l)}a[n-1][1]+=a[n-1][0]=r,un(e,t)}}function va(e){"@babel/helpers - typeof";return va=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},va(e)}var oT=["type","size","sizeType"];function xl(){return xl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},xl.apply(this,arguments)}function $d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Cd(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$d(Object(r),!0).forEach(function(n){sT(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$d(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function sT(e,t,r){return t=lT(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lT(e){var t=uT(e,"string");return va(t)=="symbol"?t:t+""}function uT(e,t){if(va(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(va(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function cT(e,t){if(e==null)return{};var r=fT(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function fT(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var Md={symbolCircle:vl,symbolCross:MS,symbolDiamond:NS,symbolSquare:DS,symbolStar:BS,symbolTriangle:FS,symbolWye:US},dT=Math.PI/180,hT=function(t){var r="symbol".concat(Ii(t));return Md[r]||vl},pT=function(t,r,n){if(r==="area")return t;switch(n){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var a=18*dT;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.pow(Math.tan(a),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},vT=function(t,r){Md["symbol".concat(Ii(t))]=r},Vi=function(t){var r=t.type,n=r===void 0?"circle":r,a=t.size,i=a===void 0?64:a,o=t.sizeType,s=o===void 0?"area":o,l=cT(t,oT),u=Cd(Cd({},l),{},{type:n,size:i,sizeType:s}),c=function(){var p=hT(n),x=zS().type(p).size(pT(i,s,n));return x()},f=u.className,d=u.cx,h=u.cy,v=de(u,!0);return d===+d&&h===+h&&i===+i?T.createElement("path",xl({},v,{className:ye("recharts-symbols",f),transform:"translate(".concat(d,", ").concat(h,")"),d:c()})):null};Vi.registerSymbol=vT;function cn(e){"@babel/helpers - typeof";return cn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cn(e)}function wl(){return wl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},wl.apply(this,arguments)}function kd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function yT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kd(Object(r),!0).forEach(function(n){ya(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mT(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gT(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Dd(n.key),n)}}function bT(e,t,r){return t&&gT(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function xT(e,t,r){return t=qi(t),wT(e,Nd()?Reflect.construct(t,r||[],qi(e).constructor):t.apply(e,r))}function wT(e,t){if(t&&(cn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return OT(e)}function OT(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Nd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Nd=function(){return!!e})()}function qi(e){return qi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},qi(e)}function ST(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ol(e,t)}function Ol(e,t){return Ol=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Ol(e,t)}function ya(e,t,r){return t=Dd(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Dd(e){var t=TT(e,"string");return cn(t)=="symbol"?t:t+""}function TT(e,t){if(cn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(cn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Tt=32,Sl=function(e){function t(){return mT(this,t),xT(this,t,arguments)}return ST(t,e),bT(t,[{key:"renderIcon",value:function(n){var a=this.props.inactiveColor,i=Tt/2,o=Tt/6,s=Tt/3,l=n.inactive?a:n.color;if(n.type==="plainline")return T.createElement("line",{strokeWidth:4,fill:"none",stroke:l,strokeDasharray:n.payload.strokeDasharray,x1:0,y1:i,x2:Tt,y2:i,className:"recharts-legend-icon"});if(n.type==="line")return T.createElement("path",{strokeWidth:4,fill:"none",stroke:l,d:"M0,".concat(i,"h").concat(s,`
122
127
  A`).concat(o,",").concat(o,",0,1,1,").concat(2*s,",").concat(i,`
123
- H`).concat(At,"M").concat(2*s,",").concat(i,`
124
- A`).concat(o,",").concat(o,",0,1,1,").concat(s,",").concat(i),className:"recharts-legend-icon"});if(n.type==="rect")return S.createElement("path",{stroke:"none",fill:l,d:"M0,".concat(At/8,"h").concat(At,"v").concat(At*3/4,"h").concat(-At,"z"),className:"recharts-legend-icon"});if(S.isValidElement(n.legendIcon)){var u=vA({},n);return delete u.legendIcon,S.cloneElement(n.legendIcon,u)}return S.createElement(qi,{fill:l,cx:i,cy:i,size:At,sizeType:"diameter",type:n.type})}},{key:"renderItems",value:function(){var n=this,a=this.props,i=a.payload,o=a.iconSize,s=a.layout,l=a.formatter,u=a.inactiveColor,c={x:0,y:0,width:At,height:At},f={display:s==="horizontal"?"inline-block":"block",marginRight:10},d={display:"inline-block",verticalAlign:"middle",marginRight:4};return i.map(function(h,y){var v=h.formatter||l,p=ye(va(va({"recharts-legend-item":!0},"legend-item-".concat(y),!0),"inactive",h.inactive));if(h.type==="none")return null;var g=he(h.value)?null:h.value;Qt(!he(h.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var O=h.inactive?u:h.color;return S.createElement("li",wl({className:p,style:f,key:"legend-item-".concat(y)},ha(n.props,h,y)),S.createElement(sl,{width:o,height:o,viewBox:c,style:d},n.renderIcon(h)),S.createElement("span",{className:"recharts-legend-item-text",style:{color:O}},v?v(g,h,y):g))})}},{key:"render",value:function(){var n=this.props,a=n.payload,i=n.layout,o=n.align;if(!a||!a.length)return null;var s={padding:0,margin:0,textAlign:i==="horizontal"?o:"left"};return S.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(S.PureComponent);va(Sl,"displayName","Legend"),va(Sl,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var AA=Ci;function TA(){this.__data__=new AA,this.size=0}var PA=TA;function _A(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var EA=_A;function jA(e){return this.__data__.get(e)}var $A=jA;function CA(e){return this.__data__.has(e)}var MA=CA,kA=Ci,NA=Vs,DA=Hs,IA=200;function LA(e,t){var r=this.__data__;if(r instanceof kA){var n=r.__data__;if(!NA||n.length<IA-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new DA(n)}return r.set(e,t),this.size=r.size,this}var RA=LA,BA=Ci,FA=PA,WA=EA,UA=$A,zA=MA,KA=RA;function dn(e){var t=this.__data__=new BA(e);this.size=t.size}dn.prototype.clear=FA,dn.prototype.delete=WA,dn.prototype.get=UA,dn.prototype.has=zA,dn.prototype.set=KA;var Dd=dn,GA="__lodash_hash_undefined__";function qA(e){return this.__data__.set(e,GA),this}var VA=qA;function HA(e){return this.__data__.has(e)}var YA=HA,XA=Hs,JA=VA,ZA=YA;function Hi(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new XA;++t<r;)this.add(e[t])}Hi.prototype.add=Hi.prototype.push=JA,Hi.prototype.has=ZA;var Id=Hi;function QA(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var Ld=QA;function eT(e,t){return e.has(t)}var Rd=eT,tT=Id,rT=Ld,nT=Rd,aT=1,iT=2;function oT(e,t,r,n,a,i){var o=r&aT,s=e.length,l=t.length;if(s!=l&&!(o&&l>s))return!1;var u=i.get(e),c=i.get(t);if(u&&c)return u==t&&c==e;var f=-1,d=!0,h=r&iT?new tT:void 0;for(i.set(e,t),i.set(t,e);++f<s;){var y=e[f],v=t[f];if(n)var p=o?n(v,y,f,t,e,i):n(y,v,f,e,t,i);if(p!==void 0){if(p)continue;d=!1;break}if(h){if(!rT(t,function(g,O){if(!nT(h,O)&&(y===g||a(y,g,r,n,i)))return h.push(O)})){d=!1;break}}else if(!(y===v||a(y,v,r,n,i))){d=!1;break}}return i.delete(e),i.delete(t),d}var Bd=oT,sT=Ft,lT=sT.Uint8Array,uT=lT;function cT(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}var fT=cT;function dT(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Al=dT,Fd=fa,Wd=uT,hT=qs,pT=Bd,vT=fT,yT=Al,mT=1,gT=2,bT="[object Boolean]",xT="[object Date]",wT="[object Error]",OT="[object Map]",ST="[object Number]",AT="[object RegExp]",TT="[object Set]",PT="[object String]",_T="[object Symbol]",ET="[object ArrayBuffer]",jT="[object DataView]",Ud=Fd?Fd.prototype:void 0,Tl=Ud?Ud.valueOf:void 0;function $T(e,t,r,n,a,i,o){switch(r){case jT:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case ET:return!(e.byteLength!=t.byteLength||!i(new Wd(e),new Wd(t)));case bT:case xT:case ST:return hT(+e,+t);case wT:return e.name==t.name&&e.message==t.message;case AT:case PT:return e==t+"";case OT:var s=vT;case TT:var l=n&mT;if(s||(s=yT),e.size!=t.size&&!l)return!1;var u=o.get(e);if(u)return u==t;n|=gT,o.set(e,t);var c=pT(s(e),s(t),n,a,i,o);return o.delete(e),c;case _T:if(Tl)return Tl.call(e)==Tl.call(t)}return!1}var CT=$T;function MT(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var zd=MT,kT=zd,NT=ct;function DT(e,t,r){var n=t(e);return NT(e)?n:kT(n,r(e))}var IT=DT;function LT(e,t){for(var r=-1,n=e==null?0:e.length,a=0,i=[];++r<n;){var o=e[r];t(o,r,e)&&(i[a++]=o)}return i}var RT=LT;function BT(){return[]}var FT=BT,WT=RT,UT=FT,zT=Object.prototype,KT=zT.propertyIsEnumerable,Kd=Object.getOwnPropertySymbols,GT=Kd?function(e){return e==null?[]:(e=Object(e),WT(Kd(e),function(t){return KT.call(e,t)}))}:UT,qT=GT;function VT(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var HT=VT,YT=Xt,XT=Jt,JT="[object Arguments]";function ZT(e){return XT(e)&&YT(e)==JT}var QT=ZT,Gd=QT,eP=Jt,qd=Object.prototype,tP=qd.hasOwnProperty,rP=qd.propertyIsEnumerable,nP=Gd(function(){return arguments}())?Gd:function(e){return eP(e)&&tP.call(e,"callee")&&!rP.call(e,"callee")},Pl=nP,Yi={exports:{}};function aP(){return!1}var iP=aP;Yi.exports,function(e,t){var r=Ft,n=iP,a=t&&!t.nodeType&&t,i=a&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===a,s=o?r.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||n;e.exports=u}(Yi,Yi.exports);var Vd=Yi.exports,oP=9007199254740991,sP=/^(?:0|[1-9]\d*)$/;function lP(e,t){var r=typeof e;return t=t??oP,!!t&&(r=="number"||r!="symbol"&&sP.test(e))&&e>-1&&e%1==0&&e<t}var _l=lP,uP=9007199254740991;function cP(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=uP}var El=cP,fP=Xt,dP=El,hP=Jt,pP="[object Arguments]",vP="[object Array]",yP="[object Boolean]",mP="[object Date]",gP="[object Error]",bP="[object Function]",xP="[object Map]",wP="[object Number]",OP="[object Object]",SP="[object RegExp]",AP="[object Set]",TP="[object String]",PP="[object WeakMap]",_P="[object ArrayBuffer]",EP="[object DataView]",jP="[object Float32Array]",$P="[object Float64Array]",CP="[object Int8Array]",MP="[object Int16Array]",kP="[object Int32Array]",NP="[object Uint8Array]",DP="[object Uint8ClampedArray]",IP="[object Uint16Array]",LP="[object Uint32Array]",De={};De[jP]=De[$P]=De[CP]=De[MP]=De[kP]=De[NP]=De[DP]=De[IP]=De[LP]=!0,De[pP]=De[vP]=De[_P]=De[yP]=De[EP]=De[mP]=De[gP]=De[bP]=De[xP]=De[wP]=De[OP]=De[SP]=De[AP]=De[TP]=De[PP]=!1;function RP(e){return hP(e)&&dP(e.length)&&!!De[fP(e)]}var BP=RP;function FP(e){return function(t){return e(t)}}var Hd=FP,Xi={exports:{}};Xi.exports,function(e,t){var r=_f,n=t&&!t.nodeType&&t,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,o=i&&r.process,s=function(){try{var l=a&&a.require&&a.require("util").types;return l||o&&o.binding&&o.binding("util")}catch{}}();e.exports=s}(Xi,Xi.exports);var WP=Xi.exports,UP=BP,zP=Hd,Yd=WP,Xd=Yd&&Yd.isTypedArray,KP=Xd?zP(Xd):UP,Jd=KP,GP=HT,qP=Pl,VP=ct,HP=Vd,YP=_l,XP=Jd,JP=Object.prototype,ZP=JP.hasOwnProperty;function QP(e,t){var r=VP(e),n=!r&&qP(e),a=!r&&!n&&HP(e),i=!r&&!n&&!a&&XP(e),o=r||n||a||i,s=o?GP(e.length,String):[],l=s.length;for(var u in e)(t||ZP.call(e,u))&&!(o&&(u=="length"||a&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||YP(u,l)))&&s.push(u);return s}var e_=QP,t_=Object.prototype;function r_(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||t_;return e===r}var n_=r_;function a_(e,t){return function(r){return e(t(r))}}var Zd=a_,i_=Zd,o_=i_(Object.keys,Object),s_=o_,l_=n_,u_=s_,c_=Object.prototype,f_=c_.hasOwnProperty;function d_(e){if(!l_(e))return u_(e);var t=[];for(var r in Object(e))f_.call(e,r)&&r!="constructor"&&t.push(r);return t}var h_=d_,p_=Ks,v_=El;function y_(e){return e!=null&&v_(e.length)&&!p_(e)}var ya=y_,m_=e_,g_=h_,b_=ya;function x_(e){return b_(e)?m_(e):g_(e)}var Ji=x_,w_=IT,O_=qT,S_=Ji;function A_(e){return w_(e,S_,O_)}var T_=A_,Qd=T_,P_=1,__=Object.prototype,E_=__.hasOwnProperty;function j_(e,t,r,n,a,i){var o=r&P_,s=Qd(e),l=s.length,u=Qd(t),c=u.length;if(l!=c&&!o)return!1;for(var f=l;f--;){var d=s[f];if(!(o?d in t:E_.call(t,d)))return!1}var h=i.get(e),y=i.get(t);if(h&&y)return h==t&&y==e;var v=!0;i.set(e,t),i.set(t,e);for(var p=o;++f<l;){d=s[f];var g=e[d],O=t[d];if(n)var w=o?n(O,g,d,t,e,i):n(g,O,d,e,t,i);if(!(w===void 0?g===O||a(g,O,r,n,i):w)){v=!1;break}p||(p=d=="constructor")}if(v&&!p){var A=e.constructor,m=t.constructor;A!=m&&"constructor"in e&&"constructor"in t&&!(typeof A=="function"&&A instanceof A&&typeof m=="function"&&m instanceof m)&&(v=!1)}return i.delete(e),i.delete(t),v}var $_=j_,C_=_r,M_=Ft,k_=C_(M_,"DataView"),N_=k_,D_=_r,I_=Ft,L_=D_(I_,"Promise"),R_=L_,B_=_r,F_=Ft,W_=B_(F_,"Set"),eh=W_,U_=_r,z_=Ft,K_=U_(z_,"WeakMap"),G_=K_,jl=N_,$l=Vs,Cl=R_,Ml=eh,kl=G_,th=Xt,hn=kf,rh="[object Map]",q_="[object Object]",nh="[object Promise]",ah="[object Set]",ih="[object WeakMap]",oh="[object DataView]",V_=hn(jl),H_=hn($l),Y_=hn(Cl),X_=hn(Ml),J_=hn(kl),kr=th;(jl&&kr(new jl(new ArrayBuffer(1)))!=oh||$l&&kr(new $l)!=rh||Cl&&kr(Cl.resolve())!=nh||Ml&&kr(new Ml)!=ah||kl&&kr(new kl)!=ih)&&(kr=function(e){var t=th(e),r=t==q_?e.constructor:void 0,n=r?hn(r):"";if(n)switch(n){case V_:return oh;case H_:return rh;case Y_:return nh;case X_:return ah;case J_:return ih}return t});var Z_=kr,Nl=Dd,Q_=Bd,eE=CT,tE=$_,sh=Z_,lh=ct,uh=Vd,rE=Jd,nE=1,ch="[object Arguments]",fh="[object Array]",Zi="[object Object]",aE=Object.prototype,dh=aE.hasOwnProperty;function iE(e,t,r,n,a,i){var o=lh(e),s=lh(t),l=o?fh:sh(e),u=s?fh:sh(t);l=l==ch?Zi:l,u=u==ch?Zi:u;var c=l==Zi,f=u==Zi,d=l==u;if(d&&uh(e)){if(!uh(t))return!1;o=!0,c=!1}if(d&&!c)return i||(i=new Nl),o||rE(e)?Q_(e,t,r,n,a,i):eE(e,t,l,r,n,a,i);if(!(r&nE)){var h=c&&dh.call(e,"__wrapped__"),y=f&&dh.call(t,"__wrapped__");if(h||y){var v=h?e.value():e,p=y?t.value():t;return i||(i=new Nl),a(v,p,r,n,i)}}return d?(i||(i=new Nl),tE(e,t,r,n,a,i)):!1}var oE=iE,sE=oE,hh=Jt;function ph(e,t,r,n,a){return e===t?!0:e==null||t==null||!hh(e)&&!hh(t)?e!==e&&t!==t:sE(e,t,r,n,ph,a)}var Dl=ph,lE=Dd,uE=Dl,cE=1,fE=2;function dE(e,t,r,n){var a=r.length,i=a,o=!n;if(e==null)return!i;for(e=Object(e);a--;){var s=r[a];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++a<i;){s=r[a];var l=s[0],u=e[l],c=s[1];if(o&&s[2]){if(u===void 0&&!(l in e))return!1}else{var f=new lE;if(n)var d=n(u,c,l,e,t,f);if(!(d===void 0?uE(c,u,cE|fE,n,f):d))return!1}}return!0}var hE=dE,pE=dr;function vE(e){return e===e&&!pE(e)}var vh=vE,yE=vh,mE=Ji;function gE(e){for(var t=mE(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,yE(a)]}return t}var bE=gE;function xE(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var yh=xE,wE=hE,OE=bE,SE=yh;function AE(e){var t=OE(e);return t.length==1&&t[0][2]?SE(t[0][0],t[0][1]):function(r){return r===e||wE(r,e,t)}}var TE=AE;function PE(e,t){return e!=null&&t in Object(e)}var _E=PE,EE=zf,jE=Pl,$E=ct,CE=_l,ME=El,kE=ki;function NE(e,t,r){t=EE(t,e);for(var n=-1,a=t.length,i=!1;++n<a;){var o=kE(t[n]);if(!(i=e!=null&&r(e,o)))break;e=e[o]}return i||++n!=a?i:(a=e==null?0:e.length,!!a&&ME(a)&&CE(o,a)&&($E(e)||jE(e)))}var DE=NE,IE=_E,LE=DE;function RE(e,t){return e!=null&&LE(e,t,IE)}var BE=RE,FE=Dl,WE=Kf,UE=BE,zE=zs,KE=vh,GE=yh,qE=ki,VE=1,HE=2;function YE(e,t){return zE(e)&&KE(t)?GE(qE(e),t):function(r){var n=WE(r,e);return n===void 0&&n===t?UE(r,e):FE(t,n,VE|HE)}}var XE=YE;function JE(e){return e}var pn=JE;function ZE(e){return function(t){return t==null?void 0:t[e]}}var QE=ZE,ej=Js;function tj(e){return function(t){return ej(t,e)}}var rj=tj,nj=QE,aj=rj,ij=zs,oj=ki;function sj(e){return ij(e)?nj(oj(e)):aj(e)}var lj=sj,uj=TE,cj=XE,fj=pn,dj=ct,hj=lj;function pj(e){return typeof e=="function"?e:e==null?fj:typeof e=="object"?dj(e)?cj(e[0],e[1]):uj(e):hj(e)}var pr=pj;function vj(e,t,r,n){for(var a=e.length,i=r+(n?1:-1);n?i--:++i<a;)if(t(e[i],i,e))return i;return-1}var mh=vj;function yj(e){return e!==e}var mj=yj;function gj(e,t,r){for(var n=r-1,a=e.length;++n<a;)if(e[n]===t)return n;return-1}var bj=gj,xj=mh,wj=mj,Oj=bj;function Sj(e,t,r){return t===t?Oj(e,t,r):xj(e,wj,r)}var Aj=Sj,Tj=Aj;function Pj(e,t){var r=e==null?0:e.length;return!!r&&Tj(e,t,0)>-1}var _j=Pj;function Ej(e,t,r){for(var n=-1,a=e==null?0:e.length;++n<a;)if(r(t,e[n]))return!0;return!1}var jj=Ej;function $j(){}var Cj=$j,Il=eh,Mj=Cj,kj=Al,Nj=1/0,Dj=Il&&1/kj(new Il([,-0]))[1]==Nj?function(e){return new Il(e)}:Mj,Ij=Dj,Lj=Id,Rj=_j,Bj=jj,Fj=Rd,Wj=Ij,Uj=Al,zj=200;function Kj(e,t,r){var n=-1,a=Rj,i=e.length,o=!0,s=[],l=s;if(r)o=!1,a=Bj;else if(i>=zj){var u=t?null:Wj(e);if(u)return Uj(u);o=!1,a=Fj,l=new Lj}else l=t?[]:s;e:for(;++n<i;){var c=e[n],f=t?t(c):c;if(c=r||c!==0?c:0,o&&f===f){for(var d=l.length;d--;)if(l[d]===f)continue e;t&&l.push(f),s.push(c)}else a(l,f,r)||(l!==s&&l.push(f),s.push(c))}return s}var Gj=Kj,qj=pr,Vj=Gj;function Hj(e,t){return e&&e.length?Vj(e,qj(t)):[]}var Yj=Hj;const gh=Ce(Yj);function bh(e,t,r){return t===!0?gh(e,r):he(t)?gh(e,t):e}function vn(e){"@babel/helpers - typeof";return vn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vn(e)}var Xj=["ref"];function xh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function er(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xh(Object(r),!0).forEach(function(n){eo(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Jj(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wh(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Sh(n.key),n)}}function Zj(e,t,r){return t&&wh(e.prototype,t),r&&wh(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Qj(e,t,r){return t=Qi(t),e$(e,Oh()?Reflect.construct(t,r||[],Qi(e).constructor):t.apply(e,r))}function e$(e,t){if(t&&(vn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return t$(e)}function t$(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Oh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Oh=function(){return!!e})()}function Qi(e){return Qi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Qi(e)}function r$(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ll(e,t)}function Ll(e,t){return Ll=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Ll(e,t)}function eo(e,t,r){return t=Sh(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Sh(e){var t=n$(e,"string");return vn(t)=="symbol"?t:t+""}function n$(e,t){if(vn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(vn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function a$(e,t){if(e==null)return{};var r=i$(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function i$(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function o$(e){return e.value}function s$(e,t){if(S.isValidElement(e))return S.cloneElement(e,t);if(typeof e=="function")return S.createElement(e,t);t.ref;var r=a$(t,Xj);return S.createElement(Sl,r)}var Ah=1,yn=function(e){function t(){var r;Jj(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=Qj(this,t,[].concat(a)),eo(r,"lastBoundingBox",{width:-1,height:-1}),r}return r$(t,e),Zj(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();return n.height=this.wrapperNode.offsetHeight,n.width=this.wrapperNode.offsetWidth,n}return null}},{key:"updateBBox",value:function(){var n=this.props.onBBoxUpdate,a=this.getBBox();a?(Math.abs(a.width-this.lastBoundingBox.width)>Ah||Math.abs(a.height-this.lastBoundingBox.height)>Ah)&&(this.lastBoundingBox.width=a.width,this.lastBoundingBox.height=a.height,n&&n(a)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,n&&n(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?er({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var a=this.props,i=a.layout,o=a.align,s=a.verticalAlign,l=a.margin,u=a.chartWidth,c=a.chartHeight,f,d;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(o==="center"&&i==="vertical"){var h=this.getBBoxSnapshot();f={left:((u||0)-h.width)/2}}else f=o==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(s==="middle"){var y=this.getBBoxSnapshot();d={top:((c||0)-y.height)/2}}else d=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return er(er({},f),d)}},{key:"render",value:function(){var n=this,a=this.props,i=a.content,o=a.width,s=a.height,l=a.wrapperStyle,u=a.payloadUniqBy,c=a.payload,f=er(er({position:"absolute",width:o||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return S.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(h){n.wrapperNode=h}},s$(i,er(er({},this.props),{},{payload:bh(c,u,o$)})))}}],[{key:"getWithHeight",value:function(n,a){var i=er(er({},this.defaultProps),n.props),o=i.layout;return o==="vertical"&&J(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||a}:null}}])}(S.PureComponent);eo(yn,"displayName","Legend"),eo(yn,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Th=fa,l$=Pl,u$=ct,Ph=Th?Th.isConcatSpreadable:void 0;function c$(e){return u$(e)||l$(e)||!!(Ph&&e&&e[Ph])}var f$=c$,d$=zd,h$=f$;function _h(e,t,r,n,a){var i=-1,o=e.length;for(r||(r=h$),a||(a=[]);++i<o;){var s=e[i];t>0&&r(s)?t>1?_h(s,t-1,r,n,a):d$(a,s):n||(a[a.length]=s)}return a}var Eh=_h;function p$(e){return function(t,r,n){for(var a=-1,i=Object(t),o=n(t),s=o.length;s--;){var l=o[e?s:++a];if(r(i[l],l,i)===!1)break}return t}}var v$=p$,y$=v$,m$=y$(),g$=m$,b$=g$,x$=Ji;function w$(e,t){return e&&b$(e,t,x$)}var jh=w$,O$=ya;function S$(e,t){return function(r,n){if(r==null)return r;if(!O$(r))return e(r,n);for(var a=r.length,i=t?a:-1,o=Object(r);(t?i--:++i<a)&&n(o[i],i,o)!==!1;);return r}}var A$=S$,T$=jh,P$=A$,_$=P$(T$),Rl=_$,E$=Rl,j$=ya;function $$(e,t){var r=-1,n=j$(e)?Array(e.length):[];return E$(e,function(a,i,o){n[++r]=t(a,i,o)}),n}var $h=$$;function C$(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}var M$=C$,Ch=rn;function k$(e,t){if(e!==t){var r=e!==void 0,n=e===null,a=e===e,i=Ch(e),o=t!==void 0,s=t===null,l=t===t,u=Ch(t);if(!s&&!u&&!i&&e>t||i&&o&&l&&!s&&!u||n&&o&&l||!r&&l||!a)return 1;if(!n&&!i&&!u&&e<t||u&&r&&a&&!n&&!i||s&&r&&a||!o&&a||!l)return-1}return 0}var N$=k$,D$=N$;function I$(e,t,r){for(var n=-1,a=e.criteria,i=t.criteria,o=a.length,s=r.length;++n<o;){var l=D$(a[n],i[n]);if(l){if(n>=s)return l;var u=r[n];return l*(u=="desc"?-1:1)}}return e.index-t.index}var L$=I$,Bl=Xs,R$=Js,B$=pr,F$=$h,W$=M$,U$=Hd,z$=L$,K$=pn,G$=ct;function q$(e,t,r){t.length?t=Bl(t,function(i){return G$(i)?function(o){return R$(o,i.length===1?i[0]:i)}:i}):t=[K$];var n=-1;t=Bl(t,U$(B$));var a=F$(e,function(i,o,s){var l=Bl(t,function(u){return u(i)});return{criteria:l,index:++n,value:i}});return W$(a,function(i,o){return z$(i,o,r)})}var V$=q$;function H$(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var Y$=H$,X$=Y$,Mh=Math.max;function J$(e,t,r){return t=Mh(t===void 0?e.length-1:t,0),function(){for(var n=arguments,a=-1,i=Mh(n.length-t,0),o=Array(i);++a<i;)o[a]=n[t+a];a=-1;for(var s=Array(t+1);++a<t;)s[a]=n[a];return s[t]=r(o),X$(e,this,s)}}var Z$=J$;function Q$(e){return function(){return e}}var eC=Q$,tC=_r,rC=function(){try{var e=tC(Object,"defineProperty");return e({},"",{}),e}catch{}}(),kh=rC,nC=eC,Nh=kh,aC=pn,iC=Nh?function(e,t){return Nh(e,"toString",{configurable:!0,enumerable:!1,value:nC(t),writable:!0})}:aC,oC=iC,sC=800,lC=16,uC=Date.now;function cC(e){var t=0,r=0;return function(){var n=uC(),a=lC-(n-r);if(r=n,a>0){if(++t>=sC)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var fC=cC,dC=oC,hC=fC,pC=hC(dC),vC=pC,yC=pn,mC=Z$,gC=vC;function bC(e,t){return gC(mC(e,t,yC),e+"")}var xC=bC,wC=qs,OC=ya,SC=_l,AC=dr;function TC(e,t,r){if(!AC(r))return!1;var n=typeof t;return(n=="number"?OC(r)&&SC(t,r.length):n=="string"&&t in r)?wC(r[t],e):!1}var to=TC,PC=Eh,_C=V$,EC=xC,Dh=to,jC=EC(function(e,t){if(e==null)return[];var r=t.length;return r>1&&Dh(e,t[0],t[1])?t=[]:r>2&&Dh(t[0],t[1],t[2])&&(t=[t[0]]),_C(e,PC(t,1),[])}),$C=jC;const Fl=Ce($C);function ma(e){"@babel/helpers - typeof";return ma=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ma(e)}function Wl(){return Wl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Wl.apply(this,arguments)}function CC(e,t){return DC(e)||NC(e,t)||kC(e,t)||MC()}function MC(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
125
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kC(e,t){if(e){if(typeof e=="string")return Ih(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ih(e,t)}}function Ih(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function NC(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function DC(e){if(Array.isArray(e))return e}function Lh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ul(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Lh(Object(r),!0).forEach(function(n){IC(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Lh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function IC(e,t,r){return t=LC(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function LC(e){var t=RC(e,"string");return ma(t)=="symbol"?t:t+""}function RC(e,t){if(ma(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ma(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function BC(e){return Array.isArray(e)&&Ye(e[0])&&Ye(e[1])?e.join(" ~ "):e}var FC=function(t){var r=t.separator,n=r===void 0?" : ":r,a=t.contentStyle,i=a===void 0?{}:a,o=t.itemStyle,s=o===void 0?{}:o,l=t.labelStyle,u=l===void 0?{}:l,c=t.payload,f=t.formatter,d=t.itemSorter,h=t.wrapperClassName,y=t.labelClassName,v=t.label,p=t.labelFormatter,g=t.accessibilityLayer,O=g===void 0?!1:g,w=function(){if(c&&c.length){var j={padding:0,margin:0},R=(d?Fl(c,d):c).map(function(N,I){if(N.type==="none")return null;var C=Ul({display:"block",paddingTop:4,paddingBottom:4,color:N.color||"#000"},s),B=N.formatter||f||BC,U=N.value,K=N.name,_=U,L=K;if(B&&_!=null&&L!=null){var F=B(U,K,N,I,c);if(Array.isArray(F)){var W=CC(F,2);_=W[0],L=W[1]}else _=F}return S.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(I),style:C},Ye(L)?S.createElement("span",{className:"recharts-tooltip-item-name"},L):null,Ye(L)?S.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,S.createElement("span",{className:"recharts-tooltip-item-value"},_),S.createElement("span",{className:"recharts-tooltip-item-unit"},N.unit||""))});return S.createElement("ul",{className:"recharts-tooltip-item-list",style:j},R)}return null},A=Ul({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},i),m=Ul({margin:0},u),x=!fe(v),T=x?v:"",P=ye("recharts-default-tooltip",h),$=ye("recharts-tooltip-label",y);x&&p&&c!==void 0&&c!==null&&(T=p(v,c));var k=O?{role:"status","aria-live":"assertive"}:{};return S.createElement("div",Wl({className:P,style:A},k),S.createElement("p",{className:$,style:m},S.isValidElement(T)?T:"".concat(T)),w())};function ga(e){"@babel/helpers - typeof";return ga=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ga(e)}function ro(e,t,r){return t=WC(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function WC(e){var t=UC(e,"string");return ga(t)=="symbol"?t:t+""}function UC(e,t){if(ga(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ga(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ba="recharts-tooltip-wrapper",zC={visibility:"hidden"};function KC(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return ye(ba,ro(ro(ro(ro({},"".concat(ba,"-right"),J(r)&&t&&J(t.x)&&r>=t.x),"".concat(ba,"-left"),J(r)&&t&&J(t.x)&&r<t.x),"".concat(ba,"-bottom"),J(n)&&t&&J(t.y)&&n>=t.y),"".concat(ba,"-top"),J(n)&&t&&J(t.y)&&n<t.y))}function Rh(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.key,a=e.offsetTopLeft,i=e.position,o=e.reverseDirection,s=e.tooltipDimension,l=e.viewBox,u=e.viewBoxDimension;if(i&&J(i[n]))return i[n];var c=r[n]-s-a,f=r[n]+a;if(t[n])return o[n]?c:f;if(o[n]){var d=c,h=l[n];return d<h?Math.max(f,l[n]):Math.max(c,l[n])}var y=f+s,v=l[n]+u;return y>v?Math.max(c,l[n]):Math.max(f,l[n])}function GC(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function qC(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,a=e.position,i=e.reverseDirection,o=e.tooltipBox,s=e.useTranslate3d,l=e.viewBox,u,c,f;return o.height>0&&o.width>0&&r?(c=Rh({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:a,reverseDirection:i,tooltipDimension:o.width,viewBox:l,viewBoxDimension:l.width}),f=Rh({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:a,reverseDirection:i,tooltipDimension:o.height,viewBox:l,viewBoxDimension:l.height}),u=GC({translateX:c,translateY:f,useTranslate3d:s})):u=zC,{cssProperties:u,cssClasses:KC({translateX:c,translateY:f,coordinate:r})}}function mn(e){"@babel/helpers - typeof";return mn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mn(e)}function Bh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Fh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Bh(Object(r),!0).forEach(function(n){Kl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function VC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function HC(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Uh(n.key),n)}}function YC(e,t,r){return t&&HC(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function XC(e,t,r){return t=no(t),JC(e,Wh()?Reflect.construct(t,r||[],no(e).constructor):t.apply(e,r))}function JC(e,t){if(t&&(mn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ZC(e)}function ZC(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Wh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Wh=function(){return!!e})()}function no(e){return no=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},no(e)}function QC(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zl(e,t)}function zl(e,t){return zl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},zl(e,t)}function Kl(e,t,r){return t=Uh(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Uh(e){var t=e2(e,"string");return mn(t)=="symbol"?t:t+""}function e2(e,t){if(mn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(mn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var zh=1,t2=function(e){function t(){var r;VC(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=XC(this,t,[].concat(a)),Kl(r,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),Kl(r,"handleKeyDown",function(o){if(o.key==="Escape"){var s,l,u,c;r.setState({dismissed:!0,dismissedAtCoordinate:{x:(s=(l=r.props.coordinate)===null||l===void 0?void 0:l.x)!==null&&s!==void 0?s:0,y:(u=(c=r.props.coordinate)===null||c===void 0?void 0:c.y)!==null&&u!==void 0?u:0}})}}),r}return QC(t,e),YC(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>zh||Math.abs(n.height-this.state.lastBoundingBox.height)>zh)&&this.setState({lastBoundingBox:{width:n.width,height:n.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var n,a;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,a=this.props,i=a.active,o=a.allowEscapeViewBox,s=a.animationDuration,l=a.animationEasing,u=a.children,c=a.coordinate,f=a.hasPayload,d=a.isAnimationActive,h=a.offset,y=a.position,v=a.reverseDirection,p=a.useTranslate3d,g=a.viewBox,O=a.wrapperStyle,w=qC({allowEscapeViewBox:o,coordinate:c,offsetTopLeft:h,position:y,reverseDirection:v,tooltipBox:this.state.lastBoundingBox,useTranslate3d:p,viewBox:g}),A=w.cssClasses,m=w.cssProperties,x=Fh(Fh({transition:d&&i?"transform ".concat(s,"ms ").concat(l):void 0},m),{},{pointerEvents:"none",visibility:!this.state.dismissed&&i&&f?"visible":"hidden",position:"absolute",top:0,left:0},O);return S.createElement("div",{tabIndex:-1,className:A,style:x,ref:function(P){n.wrapperNode=P}},u)}}])}(S.PureComponent),r2=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},vr={isSsr:r2()};function gn(e){"@babel/helpers - typeof";return gn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gn(e)}function Kh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Gh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Kh(Object(r),!0).forEach(function(n){ql(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function n2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a2(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Vh(n.key),n)}}function i2(e,t,r){return t&&a2(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function o2(e,t,r){return t=ao(t),s2(e,qh()?Reflect.construct(t,r||[],ao(e).constructor):t.apply(e,r))}function s2(e,t){if(t&&(gn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return l2(e)}function l2(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(qh=function(){return!!e})()}function ao(e){return ao=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ao(e)}function u2(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Gl(e,t)}function Gl(e,t){return Gl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Gl(e,t)}function ql(e,t,r){return t=Vh(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Vh(e){var t=c2(e,"string");return gn(t)=="symbol"?t:t+""}function c2(e,t){if(gn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(gn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function f2(e){return e.dataKey}function d2(e,t){return S.isValidElement(e)?S.cloneElement(e,t):typeof e=="function"?S.createElement(e,t):S.createElement(FC,t)}var Wt=function(e){function t(){return n2(this,t),o2(this,t,arguments)}return u2(t,e),i2(t,[{key:"render",value:function(){var n=this,a=this.props,i=a.active,o=a.allowEscapeViewBox,s=a.animationDuration,l=a.animationEasing,u=a.content,c=a.coordinate,f=a.filterNull,d=a.isAnimationActive,h=a.offset,y=a.payload,v=a.payloadUniqBy,p=a.position,g=a.reverseDirection,O=a.useTranslate3d,w=a.viewBox,A=a.wrapperStyle,m=y??[];f&&m.length&&(m=bh(y.filter(function(T){return T.value!=null&&(T.hide!==!0||n.props.includeHidden)}),v,f2));var x=m.length>0;return S.createElement(t2,{allowEscapeViewBox:o,animationDuration:s,animationEasing:l,isAnimationActive:d,active:i,coordinate:c,hasPayload:x,offset:h,position:p,reverseDirection:g,useTranslate3d:O,viewBox:w,wrapperStyle:A},d2(u,Gh(Gh({},this.props),{},{payload:m})))}}])}(S.PureComponent);ql(Wt,"displayName","Tooltip"),ql(Wt,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!vr.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var h2=Ft,p2=function(){return h2.Date.now()},v2=p2,y2=/\s/;function m2(e){for(var t=e.length;t--&&y2.test(e.charAt(t)););return t}var g2=m2,b2=g2,x2=/^\s+/;function w2(e){return e&&e.slice(0,b2(e)+1).replace(x2,"")}var O2=w2,S2=O2,Hh=dr,A2=rn,Yh=NaN,T2=/^[-+]0x[0-9a-f]+$/i,P2=/^0b[01]+$/i,_2=/^0o[0-7]+$/i,E2=parseInt;function j2(e){if(typeof e=="number")return e;if(A2(e))return Yh;if(Hh(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Hh(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=S2(e);var r=P2.test(e);return r||_2.test(e)?E2(e.slice(2),r?2:8):T2.test(e)?Yh:+e}var Xh=j2,$2=dr,Vl=v2,Jh=Xh,C2="Expected a function",M2=Math.max,k2=Math.min;function N2(e,t,r){var n,a,i,o,s,l,u=0,c=!1,f=!1,d=!0;if(typeof e!="function")throw new TypeError(C2);t=Jh(t)||0,$2(r)&&(c=!!r.leading,f="maxWait"in r,i=f?M2(Jh(r.maxWait)||0,t):i,d="trailing"in r?!!r.trailing:d);function h(x){var T=n,P=a;return n=a=void 0,u=x,o=e.apply(P,T),o}function y(x){return u=x,s=setTimeout(g,t),c?h(x):o}function v(x){var T=x-l,P=x-u,$=t-T;return f?k2($,i-P):$}function p(x){var T=x-l,P=x-u;return l===void 0||T>=t||T<0||f&&P>=i}function g(){var x=Vl();if(p(x))return O(x);s=setTimeout(g,v(x))}function O(x){return s=void 0,d&&n?h(x):(n=a=void 0,o)}function w(){s!==void 0&&clearTimeout(s),u=0,n=l=a=s=void 0}function A(){return s===void 0?o:O(Vl())}function m(){var x=Vl(),T=p(x);if(n=arguments,a=this,l=x,T){if(s===void 0)return y(l);if(f)return clearTimeout(s),s=setTimeout(g,t),h(l)}return s===void 0&&(s=setTimeout(g,t)),o}return m.cancel=w,m.flush=A,m}var D2=N2,I2=D2,L2=dr,R2="Expected a function";function B2(e,t,r){var n=!0,a=!0;if(typeof e!="function")throw new TypeError(R2);return L2(r)&&(n="leading"in r?!!r.leading:n,a="trailing"in r?!!r.trailing:a),I2(e,t,{leading:n,maxWait:t,trailing:a})}var F2=B2;const Zh=Ce(F2);function xa(e){"@babel/helpers - typeof";return xa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xa(e)}function Qh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function io(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Qh(Object(r),!0).forEach(function(n){W2(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function W2(e,t,r){return t=U2(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function U2(e){var t=z2(e,"string");return xa(t)=="symbol"?t:t+""}function z2(e,t){if(xa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(xa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function K2(e,t){return H2(e)||V2(e,t)||q2(e,t)||G2()}function G2(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
126
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function q2(e,t){if(e){if(typeof e=="string")return ep(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ep(e,t)}}function ep(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function V2(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function H2(e){if(Array.isArray(e))return e}var Y2=S.forwardRef(function(e,t){var r=e.aspect,n=e.initialDimension,a=n===void 0?{width:-1,height:-1}:n,i=e.width,o=i===void 0?"100%":i,s=e.height,l=s===void 0?"100%":s,u=e.minWidth,c=u===void 0?0:u,f=e.minHeight,d=e.maxHeight,h=e.children,y=e.debounce,v=y===void 0?0:y,p=e.id,g=e.className,O=e.onResize,w=e.style,A=w===void 0?{}:w,m=S.useRef(null),x=S.useRef();x.current=O,S.useImperativeHandle(t,function(){return Object.defineProperty(m.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),m.current},configurable:!0})});var T=S.useState({containerWidth:a.width,containerHeight:a.height}),P=K2(T,2),$=P[0],k=P[1],E=S.useCallback(function(R,N){k(function(I){var C=Math.round(R),B=Math.round(N);return I.containerWidth===C&&I.containerHeight===B?I:{containerWidth:C,containerHeight:B}})},[]);S.useEffect(function(){var R=function(K){var _,L=K[0].contentRect,F=L.width,W=L.height;E(F,W),(_=x.current)===null||_===void 0||_.call(x,F,W)};v>0&&(R=Zh(R,v,{trailing:!0,leading:!1}));var N=new ResizeObserver(R),I=m.current.getBoundingClientRect(),C=I.width,B=I.height;return E(C,B),N.observe(m.current),function(){N.disconnect()}},[E,v]);var j=S.useMemo(function(){var R=$.containerWidth,N=$.containerHeight;if(R<0||N<0)return null;Qt(jr(o)||jr(l),`The width(%s) and height(%s) are both fixed numbers,
127
- maybe you don't need to use a ResponsiveContainer.`,o,l),Qt(!r||r>0,"The aspect(%s) must be greater than zero.",r);var I=jr(o)?R:o,C=jr(l)?N:l;r&&r>0&&(I?C=I/r:C&&(I=C*r),d&&C>d&&(C=d)),Qt(I>0||C>0,`The width(%s) and height(%s) of chart should be greater than 0,
128
+ H`).concat(Tt,"M").concat(2*s,",").concat(i,`
129
+ A`).concat(o,",").concat(o,",0,1,1,").concat(s,",").concat(i),className:"recharts-legend-icon"});if(n.type==="rect")return T.createElement("path",{stroke:"none",fill:l,d:"M0,".concat(Tt/8,"h").concat(Tt,"v").concat(Tt*3/4,"h").concat(-Tt,"z"),className:"recharts-legend-icon"});if(T.isValidElement(n.legendIcon)){var u=yT({},n);return delete u.legendIcon,T.cloneElement(n.legendIcon,u)}return T.createElement(Vi,{fill:l,cx:i,cy:i,size:Tt,sizeType:"diameter",type:n.type})}},{key:"renderItems",value:function(){var n=this,a=this.props,i=a.payload,o=a.iconSize,s=a.layout,l=a.formatter,u=a.inactiveColor,c={x:0,y:0,width:Tt,height:Tt},f={display:s==="horizontal"?"inline-block":"block",marginRight:10},d={display:"inline-block",verticalAlign:"middle",marginRight:4};return i.map(function(h,v){var m=h.formatter||l,p=ye(ya(ya({"recharts-legend-item":!0},"legend-item-".concat(v),!0),"inactive",h.inactive));if(h.type==="none")return null;var x=he(h.value)?null:h.value;er(!he(h.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var O=h.inactive?u:h.color;return T.createElement("li",wl({className:p,style:f,key:"legend-item-".concat(v)},pa(n.props,h,v)),T.createElement(sl,{width:o,height:o,viewBox:c,style:d},n.renderIcon(h)),T.createElement("span",{className:"recharts-legend-item-text",style:{color:O}},m?m(x,h,v):x))})}},{key:"render",value:function(){var n=this.props,a=n.payload,i=n.layout,o=n.align;if(!a||!a.length)return null;var s={padding:0,margin:0,textAlign:i==="horizontal"?o:"left"};return T.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(T.PureComponent);ya(Sl,"displayName","Legend"),ya(Sl,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var AT=Ci;function PT(){this.__data__=new AT,this.size=0}var _T=PT;function ET(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var jT=ET;function $T(e){return this.__data__.get(e)}var CT=$T;function MT(e){return this.__data__.has(e)}var kT=MT,NT=Ci,DT=qs,IT=Hs,LT=200;function RT(e,t){var r=this.__data__;if(r instanceof NT){var n=r.__data__;if(!DT||n.length<LT-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new IT(n)}return r.set(e,t),this.size=r.size,this}var BT=RT,FT=Ci,WT=_T,UT=jT,zT=CT,KT=kT,GT=BT;function fn(e){var t=this.__data__=new FT(e);this.size=t.size}fn.prototype.clear=WT,fn.prototype.delete=UT,fn.prototype.get=zT,fn.prototype.has=KT,fn.prototype.set=GT;var Id=fn,VT="__lodash_hash_undefined__";function qT(e){return this.__data__.set(e,VT),this}var HT=qT;function YT(e){return this.__data__.has(e)}var XT=YT,ZT=Hs,JT=HT,QT=XT;function Hi(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new ZT;++t<r;)this.add(e[t])}Hi.prototype.add=Hi.prototype.push=JT,Hi.prototype.has=QT;var Ld=Hi;function eA(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var Rd=eA;function tA(e,t){return e.has(t)}var Bd=tA,rA=Ld,nA=Rd,aA=Bd,iA=1,oA=2;function sA(e,t,r,n,a,i){var o=r&iA,s=e.length,l=t.length;if(s!=l&&!(o&&l>s))return!1;var u=i.get(e),c=i.get(t);if(u&&c)return u==t&&c==e;var f=-1,d=!0,h=r&oA?new rA:void 0;for(i.set(e,t),i.set(t,e);++f<s;){var v=e[f],m=t[f];if(n)var p=o?n(m,v,f,t,e,i):n(v,m,f,e,t,i);if(p!==void 0){if(p)continue;d=!1;break}if(h){if(!nA(t,function(x,O){if(!aA(h,O)&&(v===x||a(v,x,r,n,i)))return h.push(O)})){d=!1;break}}else if(!(v===m||a(v,m,r,n,i))){d=!1;break}}return i.delete(e),i.delete(t),d}var Fd=sA,lA=Ft,uA=lA.Uint8Array,cA=uA;function fA(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}var dA=fA;function hA(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Tl=hA,Wd=da,Ud=cA,pA=Vs,vA=Fd,yA=dA,mA=Tl,gA=1,bA=2,xA="[object Boolean]",wA="[object Date]",OA="[object Error]",SA="[object Map]",TA="[object Number]",AA="[object RegExp]",PA="[object Set]",_A="[object String]",EA="[object Symbol]",jA="[object ArrayBuffer]",$A="[object DataView]",zd=Wd?Wd.prototype:void 0,Al=zd?zd.valueOf:void 0;function CA(e,t,r,n,a,i,o){switch(r){case $A:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case jA:return!(e.byteLength!=t.byteLength||!i(new Ud(e),new Ud(t)));case xA:case wA:case TA:return pA(+e,+t);case OA:return e.name==t.name&&e.message==t.message;case AA:case _A:return e==t+"";case SA:var s=yA;case PA:var l=n&gA;if(s||(s=mA),e.size!=t.size&&!l)return!1;var u=o.get(e);if(u)return u==t;n|=bA,o.set(e,t);var c=vA(s(e),s(t),n,a,i,o);return o.delete(e),c;case EA:if(Al)return Al.call(e)==Al.call(t)}return!1}var MA=CA;function kA(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var Kd=kA,NA=Kd,DA=ft;function IA(e,t,r){var n=t(e);return DA(e)?n:NA(n,r(e))}var LA=IA;function RA(e,t){for(var r=-1,n=e==null?0:e.length,a=0,i=[];++r<n;){var o=e[r];t(o,r,e)&&(i[a++]=o)}return i}var BA=RA;function FA(){return[]}var WA=FA,UA=BA,zA=WA,KA=Object.prototype,GA=KA.propertyIsEnumerable,Gd=Object.getOwnPropertySymbols,VA=Gd?function(e){return e==null?[]:(e=Object(e),UA(Gd(e),function(t){return GA.call(e,t)}))}:zA,qA=VA;function HA(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var YA=HA,XA=Zt,ZA=Jt,JA="[object Arguments]";function QA(e){return ZA(e)&&XA(e)==JA}var eP=QA,Vd=eP,tP=Jt,qd=Object.prototype,rP=qd.hasOwnProperty,nP=qd.propertyIsEnumerable,aP=Vd(function(){return arguments}())?Vd:function(e){return tP(e)&&rP.call(e,"callee")&&!nP.call(e,"callee")},Pl=aP,Yi={exports:{}};function iP(){return!1}var oP=iP;Yi.exports,function(e,t){var r=Ft,n=oP,a=t&&!t.nodeType&&t,i=a&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===a,s=o?r.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||n;e.exports=u}(Yi,Yi.exports);var Hd=Yi.exports,sP=9007199254740991,lP=/^(?:0|[1-9]\d*)$/;function uP(e,t){var r=typeof e;return t=t??sP,!!t&&(r=="number"||r!="symbol"&&lP.test(e))&&e>-1&&e%1==0&&e<t}var _l=uP,cP=9007199254740991;function fP(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=cP}var El=fP,dP=Zt,hP=El,pP=Jt,vP="[object Arguments]",yP="[object Array]",mP="[object Boolean]",gP="[object Date]",bP="[object Error]",xP="[object Function]",wP="[object Map]",OP="[object Number]",SP="[object Object]",TP="[object RegExp]",AP="[object Set]",PP="[object String]",_P="[object WeakMap]",EP="[object ArrayBuffer]",jP="[object DataView]",$P="[object Float32Array]",CP="[object Float64Array]",MP="[object Int8Array]",kP="[object Int16Array]",NP="[object Int32Array]",DP="[object Uint8Array]",IP="[object Uint8ClampedArray]",LP="[object Uint16Array]",RP="[object Uint32Array]",De={};De[$P]=De[CP]=De[MP]=De[kP]=De[NP]=De[DP]=De[IP]=De[LP]=De[RP]=!0,De[vP]=De[yP]=De[EP]=De[mP]=De[jP]=De[gP]=De[bP]=De[xP]=De[wP]=De[OP]=De[SP]=De[TP]=De[AP]=De[PP]=De[_P]=!1;function BP(e){return pP(e)&&hP(e.length)&&!!De[dP(e)]}var FP=BP;function WP(e){return function(t){return e(t)}}var Yd=WP,Xi={exports:{}};Xi.exports,function(e,t){var r=Ef,n=t&&!t.nodeType&&t,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,o=i&&r.process,s=function(){try{var l=a&&a.require&&a.require("util").types;return l||o&&o.binding&&o.binding("util")}catch{}}();e.exports=s}(Xi,Xi.exports);var UP=Xi.exports,zP=FP,KP=Yd,Xd=UP,Zd=Xd&&Xd.isTypedArray,GP=Zd?KP(Zd):zP,Jd=GP,VP=YA,qP=Pl,HP=ft,YP=Hd,XP=_l,ZP=Jd,JP=Object.prototype,QP=JP.hasOwnProperty;function e_(e,t){var r=HP(e),n=!r&&qP(e),a=!r&&!n&&YP(e),i=!r&&!n&&!a&&ZP(e),o=r||n||a||i,s=o?VP(e.length,String):[],l=s.length;for(var u in e)(t||QP.call(e,u))&&!(o&&(u=="length"||a&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||XP(u,l)))&&s.push(u);return s}var t_=e_,r_=Object.prototype;function n_(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||r_;return e===r}var a_=n_;function i_(e,t){return function(r){return e(t(r))}}var Qd=i_,o_=Qd,s_=o_(Object.keys,Object),l_=s_,u_=a_,c_=l_,f_=Object.prototype,d_=f_.hasOwnProperty;function h_(e){if(!u_(e))return c_(e);var t=[];for(var r in Object(e))d_.call(e,r)&&r!="constructor"&&t.push(r);return t}var p_=h_,v_=Ks,y_=El;function m_(e){return e!=null&&y_(e.length)&&!v_(e)}var ma=m_,g_=t_,b_=p_,x_=ma;function w_(e){return x_(e)?g_(e):b_(e)}var Zi=w_,O_=LA,S_=qA,T_=Zi;function A_(e){return O_(e,T_,S_)}var P_=A_,eh=P_,__=1,E_=Object.prototype,j_=E_.hasOwnProperty;function $_(e,t,r,n,a,i){var o=r&__,s=eh(e),l=s.length,u=eh(t),c=u.length;if(l!=c&&!o)return!1;for(var f=l;f--;){var d=s[f];if(!(o?d in t:j_.call(t,d)))return!1}var h=i.get(e),v=i.get(t);if(h&&v)return h==t&&v==e;var m=!0;i.set(e,t),i.set(t,e);for(var p=o;++f<l;){d=s[f];var x=e[d],O=t[d];if(n)var w=o?n(O,x,d,t,e,i):n(x,O,d,e,t,i);if(!(w===void 0?x===O||a(x,O,r,n,i):w)){m=!1;break}p||(p=d=="constructor")}if(m&&!p){var A=e.constructor,y=t.constructor;A!=y&&"constructor"in e&&"constructor"in t&&!(typeof A=="function"&&A instanceof A&&typeof y=="function"&&y instanceof y)&&(m=!1)}return i.delete(e),i.delete(t),m}var C_=$_,M_=_r,k_=Ft,N_=M_(k_,"DataView"),D_=N_,I_=_r,L_=Ft,R_=I_(L_,"Promise"),B_=R_,F_=_r,W_=Ft,U_=F_(W_,"Set"),th=U_,z_=_r,K_=Ft,G_=z_(K_,"WeakMap"),V_=G_,jl=D_,$l=qs,Cl=B_,Ml=th,kl=V_,rh=Zt,dn=Nf,nh="[object Map]",q_="[object Object]",ah="[object Promise]",ih="[object Set]",oh="[object WeakMap]",sh="[object DataView]",H_=dn(jl),Y_=dn($l),X_=dn(Cl),Z_=dn(Ml),J_=dn(kl),kr=rh;(jl&&kr(new jl(new ArrayBuffer(1)))!=sh||$l&&kr(new $l)!=nh||Cl&&kr(Cl.resolve())!=ah||Ml&&kr(new Ml)!=ih||kl&&kr(new kl)!=oh)&&(kr=function(e){var t=rh(e),r=t==q_?e.constructor:void 0,n=r?dn(r):"";if(n)switch(n){case H_:return sh;case Y_:return nh;case X_:return ah;case Z_:return ih;case J_:return oh}return t});var Q_=kr,Nl=Id,eE=Fd,tE=MA,rE=C_,lh=Q_,uh=ft,ch=Hd,nE=Jd,aE=1,fh="[object Arguments]",dh="[object Array]",Ji="[object Object]",iE=Object.prototype,hh=iE.hasOwnProperty;function oE(e,t,r,n,a,i){var o=uh(e),s=uh(t),l=o?dh:lh(e),u=s?dh:lh(t);l=l==fh?Ji:l,u=u==fh?Ji:u;var c=l==Ji,f=u==Ji,d=l==u;if(d&&ch(e)){if(!ch(t))return!1;o=!0,c=!1}if(d&&!c)return i||(i=new Nl),o||nE(e)?eE(e,t,r,n,a,i):tE(e,t,l,r,n,a,i);if(!(r&aE)){var h=c&&hh.call(e,"__wrapped__"),v=f&&hh.call(t,"__wrapped__");if(h||v){var m=h?e.value():e,p=v?t.value():t;return i||(i=new Nl),a(m,p,r,n,i)}}return d?(i||(i=new Nl),rE(e,t,r,n,a,i)):!1}var sE=oE,lE=sE,ph=Jt;function vh(e,t,r,n,a){return e===t?!0:e==null||t==null||!ph(e)&&!ph(t)?e!==e&&t!==t:lE(e,t,r,n,vh,a)}var Dl=vh,uE=Id,cE=Dl,fE=1,dE=2;function hE(e,t,r,n){var a=r.length,i=a,o=!n;if(e==null)return!i;for(e=Object(e);a--;){var s=r[a];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++a<i;){s=r[a];var l=s[0],u=e[l],c=s[1];if(o&&s[2]){if(u===void 0&&!(l in e))return!1}else{var f=new uE;if(n)var d=n(u,c,l,e,t,f);if(!(d===void 0?cE(c,u,fE|dE,n,f):d))return!1}}return!0}var pE=hE,vE=dr;function yE(e){return e===e&&!vE(e)}var yh=yE,mE=yh,gE=Zi;function bE(e){for(var t=gE(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,mE(a)]}return t}var xE=bE;function wE(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var mh=wE,OE=pE,SE=xE,TE=mh;function AE(e){var t=SE(e);return t.length==1&&t[0][2]?TE(t[0][0],t[0][1]):function(r){return r===e||OE(r,e,t)}}var PE=AE;function _E(e,t){return e!=null&&t in Object(e)}var EE=_E,jE=Kf,$E=Pl,CE=ft,ME=_l,kE=El,NE=ki;function DE(e,t,r){t=jE(t,e);for(var n=-1,a=t.length,i=!1;++n<a;){var o=NE(t[n]);if(!(i=e!=null&&r(e,o)))break;e=e[o]}return i||++n!=a?i:(a=e==null?0:e.length,!!a&&kE(a)&&ME(o,a)&&(CE(e)||$E(e)))}var IE=DE,LE=EE,RE=IE;function BE(e,t){return e!=null&&RE(e,t,LE)}var FE=BE,WE=Dl,UE=Gf,zE=FE,KE=zs,GE=yh,VE=mh,qE=ki,HE=1,YE=2;function XE(e,t){return KE(e)&&GE(t)?VE(qE(e),t):function(r){var n=UE(r,e);return n===void 0&&n===t?zE(r,e):WE(t,n,HE|YE)}}var ZE=XE;function JE(e){return e}var hn=JE;function QE(e){return function(t){return t==null?void 0:t[e]}}var ej=QE,tj=Zs;function rj(e){return function(t){return tj(t,e)}}var nj=rj,aj=ej,ij=nj,oj=zs,sj=ki;function lj(e){return oj(e)?aj(sj(e)):ij(e)}var uj=lj,cj=PE,fj=ZE,dj=hn,hj=ft,pj=uj;function vj(e){return typeof e=="function"?e:e==null?dj:typeof e=="object"?hj(e)?fj(e[0],e[1]):cj(e):pj(e)}var pr=vj;function yj(e,t,r,n){for(var a=e.length,i=r+(n?1:-1);n?i--:++i<a;)if(t(e[i],i,e))return i;return-1}var gh=yj;function mj(e){return e!==e}var gj=mj;function bj(e,t,r){for(var n=r-1,a=e.length;++n<a;)if(e[n]===t)return n;return-1}var xj=bj,wj=gh,Oj=gj,Sj=xj;function Tj(e,t,r){return t===t?Sj(e,t,r):wj(e,Oj,r)}var Aj=Tj,Pj=Aj;function _j(e,t){var r=e==null?0:e.length;return!!r&&Pj(e,t,0)>-1}var Ej=_j;function jj(e,t,r){for(var n=-1,a=e==null?0:e.length;++n<a;)if(r(t,e[n]))return!0;return!1}var $j=jj;function Cj(){}var Mj=Cj,Il=th,kj=Mj,Nj=Tl,Dj=1/0,Ij=Il&&1/Nj(new Il([,-0]))[1]==Dj?function(e){return new Il(e)}:kj,Lj=Ij,Rj=Ld,Bj=Ej,Fj=$j,Wj=Bd,Uj=Lj,zj=Tl,Kj=200;function Gj(e,t,r){var n=-1,a=Bj,i=e.length,o=!0,s=[],l=s;if(r)o=!1,a=Fj;else if(i>=Kj){var u=t?null:Uj(e);if(u)return zj(u);o=!1,a=Wj,l=new Rj}else l=t?[]:s;e:for(;++n<i;){var c=e[n],f=t?t(c):c;if(c=r||c!==0?c:0,o&&f===f){for(var d=l.length;d--;)if(l[d]===f)continue e;t&&l.push(f),s.push(c)}else a(l,f,r)||(l!==s&&l.push(f),s.push(c))}return s}var Vj=Gj,qj=pr,Hj=Vj;function Yj(e,t){return e&&e.length?Hj(e,qj(t)):[]}var Xj=Yj;const bh=Ce(Xj);function xh(e,t,r){return t===!0?bh(e,r):he(t)?bh(e,t):e}function pn(e){"@babel/helpers - typeof";return pn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pn(e)}var Zj=["ref"];function wh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function tr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wh(Object(r),!0).forEach(function(n){eo(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Jj(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Oh(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Th(n.key),n)}}function Qj(e,t,r){return t&&Oh(e.prototype,t),r&&Oh(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function e$(e,t,r){return t=Qi(t),t$(e,Sh()?Reflect.construct(t,r||[],Qi(e).constructor):t.apply(e,r))}function t$(e,t){if(t&&(pn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return r$(e)}function r$(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Sh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Sh=function(){return!!e})()}function Qi(e){return Qi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Qi(e)}function n$(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ll(e,t)}function Ll(e,t){return Ll=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Ll(e,t)}function eo(e,t,r){return t=Th(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Th(e){var t=a$(e,"string");return pn(t)=="symbol"?t:t+""}function a$(e,t){if(pn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(pn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function i$(e,t){if(e==null)return{};var r=o$(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function o$(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function s$(e){return e.value}function l$(e,t){if(T.isValidElement(e))return T.cloneElement(e,t);if(typeof e=="function")return T.createElement(e,t);t.ref;var r=i$(t,Zj);return T.createElement(Sl,r)}var Ah=1,vn=function(e){function t(){var r;Jj(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=e$(this,t,[].concat(a)),eo(r,"lastBoundingBox",{width:-1,height:-1}),r}return n$(t,e),Qj(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();return n.height=this.wrapperNode.offsetHeight,n.width=this.wrapperNode.offsetWidth,n}return null}},{key:"updateBBox",value:function(){var n=this.props.onBBoxUpdate,a=this.getBBox();a?(Math.abs(a.width-this.lastBoundingBox.width)>Ah||Math.abs(a.height-this.lastBoundingBox.height)>Ah)&&(this.lastBoundingBox.width=a.width,this.lastBoundingBox.height=a.height,n&&n(a)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,n&&n(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?tr({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var a=this.props,i=a.layout,o=a.align,s=a.verticalAlign,l=a.margin,u=a.chartWidth,c=a.chartHeight,f,d;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(o==="center"&&i==="vertical"){var h=this.getBBoxSnapshot();f={left:((u||0)-h.width)/2}}else f=o==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(s==="middle"){var v=this.getBBoxSnapshot();d={top:((c||0)-v.height)/2}}else d=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return tr(tr({},f),d)}},{key:"render",value:function(){var n=this,a=this.props,i=a.content,o=a.width,s=a.height,l=a.wrapperStyle,u=a.payloadUniqBy,c=a.payload,f=tr(tr({position:"absolute",width:o||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return T.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(h){n.wrapperNode=h}},l$(i,tr(tr({},this.props),{},{payload:xh(c,u,s$)})))}}],[{key:"getWithHeight",value:function(n,a){var i=tr(tr({},this.defaultProps),n.props),o=i.layout;return o==="vertical"&&Z(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||a}:null}}])}(T.PureComponent);eo(vn,"displayName","Legend"),eo(vn,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Ph=da,u$=Pl,c$=ft,_h=Ph?Ph.isConcatSpreadable:void 0;function f$(e){return c$(e)||u$(e)||!!(_h&&e&&e[_h])}var d$=f$,h$=Kd,p$=d$;function Eh(e,t,r,n,a){var i=-1,o=e.length;for(r||(r=p$),a||(a=[]);++i<o;){var s=e[i];t>0&&r(s)?t>1?Eh(s,t-1,r,n,a):h$(a,s):n||(a[a.length]=s)}return a}var jh=Eh;function v$(e){return function(t,r,n){for(var a=-1,i=Object(t),o=n(t),s=o.length;s--;){var l=o[e?s:++a];if(r(i[l],l,i)===!1)break}return t}}var y$=v$,m$=y$,g$=m$(),b$=g$,x$=b$,w$=Zi;function O$(e,t){return e&&x$(e,t,w$)}var $h=O$,S$=ma;function T$(e,t){return function(r,n){if(r==null)return r;if(!S$(r))return e(r,n);for(var a=r.length,i=t?a:-1,o=Object(r);(t?i--:++i<a)&&n(o[i],i,o)!==!1;);return r}}var A$=T$,P$=$h,_$=A$,E$=_$(P$),Rl=E$,j$=Rl,$$=ma;function C$(e,t){var r=-1,n=$$(e)?Array(e.length):[];return j$(e,function(a,i,o){n[++r]=t(a,i,o)}),n}var Ch=C$;function M$(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}var k$=M$,Mh=tn;function N$(e,t){if(e!==t){var r=e!==void 0,n=e===null,a=e===e,i=Mh(e),o=t!==void 0,s=t===null,l=t===t,u=Mh(t);if(!s&&!u&&!i&&e>t||i&&o&&l&&!s&&!u||n&&o&&l||!r&&l||!a)return 1;if(!n&&!i&&!u&&e<t||u&&r&&a&&!n&&!i||s&&r&&a||!o&&a||!l)return-1}return 0}var D$=N$,I$=D$;function L$(e,t,r){for(var n=-1,a=e.criteria,i=t.criteria,o=a.length,s=r.length;++n<o;){var l=I$(a[n],i[n]);if(l){if(n>=s)return l;var u=r[n];return l*(u=="desc"?-1:1)}}return e.index-t.index}var R$=L$,Bl=Xs,B$=Zs,F$=pr,W$=Ch,U$=k$,z$=Yd,K$=R$,G$=hn,V$=ft;function q$(e,t,r){t.length?t=Bl(t,function(i){return V$(i)?function(o){return B$(o,i.length===1?i[0]:i)}:i}):t=[G$];var n=-1;t=Bl(t,z$(F$));var a=W$(e,function(i,o,s){var l=Bl(t,function(u){return u(i)});return{criteria:l,index:++n,value:i}});return U$(a,function(i,o){return K$(i,o,r)})}var H$=q$;function Y$(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var X$=Y$,Z$=X$,kh=Math.max;function J$(e,t,r){return t=kh(t===void 0?e.length-1:t,0),function(){for(var n=arguments,a=-1,i=kh(n.length-t,0),o=Array(i);++a<i;)o[a]=n[t+a];a=-1;for(var s=Array(t+1);++a<t;)s[a]=n[a];return s[t]=r(o),Z$(e,this,s)}}var Q$=J$;function eC(e){return function(){return e}}var tC=eC,rC=_r,nC=function(){try{var e=rC(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Nh=nC,aC=tC,Dh=Nh,iC=hn,oC=Dh?function(e,t){return Dh(e,"toString",{configurable:!0,enumerable:!1,value:aC(t),writable:!0})}:iC,sC=oC,lC=800,uC=16,cC=Date.now;function fC(e){var t=0,r=0;return function(){var n=cC(),a=uC-(n-r);if(r=n,a>0){if(++t>=lC)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var dC=fC,hC=sC,pC=dC,vC=pC(hC),yC=vC,mC=hn,gC=Q$,bC=yC;function xC(e,t){return bC(gC(e,t,mC),e+"")}var wC=xC,OC=Vs,SC=ma,TC=_l,AC=dr;function PC(e,t,r){if(!AC(r))return!1;var n=typeof t;return(n=="number"?SC(r)&&TC(t,r.length):n=="string"&&t in r)?OC(r[t],e):!1}var to=PC,_C=jh,EC=H$,jC=wC,Ih=to,$C=jC(function(e,t){if(e==null)return[];var r=t.length;return r>1&&Ih(e,t[0],t[1])?t=[]:r>2&&Ih(t[0],t[1],t[2])&&(t=[t[0]]),EC(e,_C(t,1),[])}),CC=$C;const Fl=Ce(CC);function ga(e){"@babel/helpers - typeof";return ga=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ga(e)}function Wl(){return Wl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Wl.apply(this,arguments)}function MC(e,t){return IC(e)||DC(e,t)||NC(e,t)||kC()}function kC(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
130
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NC(e,t){if(e){if(typeof e=="string")return Lh(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Lh(e,t)}}function Lh(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function DC(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function IC(e){if(Array.isArray(e))return e}function Rh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ul(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Rh(Object(r),!0).forEach(function(n){LC(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Rh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function LC(e,t,r){return t=RC(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function RC(e){var t=BC(e,"string");return ga(t)=="symbol"?t:t+""}function BC(e,t){if(ga(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ga(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function FC(e){return Array.isArray(e)&&Ye(e[0])&&Ye(e[1])?e.join(" ~ "):e}var WC=function(t){var r=t.separator,n=r===void 0?" : ":r,a=t.contentStyle,i=a===void 0?{}:a,o=t.itemStyle,s=o===void 0?{}:o,l=t.labelStyle,u=l===void 0?{}:l,c=t.payload,f=t.formatter,d=t.itemSorter,h=t.wrapperClassName,v=t.labelClassName,m=t.label,p=t.labelFormatter,x=t.accessibilityLayer,O=x===void 0?!1:x,w=function(){if(c&&c.length){var j={padding:0,margin:0},R=(d?Fl(c,d):c).map(function(k,D){if(k.type==="none")return null;var C=Ul({display:"block",paddingTop:4,paddingBottom:4,color:k.color||"#000"},s),B=k.formatter||f||FC,U=k.value,K=k.name,E=U,L=K;if(B&&E!=null&&L!=null){var F=B(U,K,k,D,c);if(Array.isArray(F)){var W=MC(F,2);E=W[0],L=W[1]}else E=F}return T.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(D),style:C},Ye(L)?T.createElement("span",{className:"recharts-tooltip-item-name"},L):null,Ye(L)?T.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,T.createElement("span",{className:"recharts-tooltip-item-value"},E),T.createElement("span",{className:"recharts-tooltip-item-unit"},k.unit||""))});return T.createElement("ul",{className:"recharts-tooltip-item-list",style:j},R)}return null},A=Ul({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},i),y=Ul({margin:0},u),b=!fe(m),S=b?m:"",P=ye("recharts-default-tooltip",h),$=ye("recharts-tooltip-label",v);b&&p&&c!==void 0&&c!==null&&(S=p(m,c));var M=O?{role:"status","aria-live":"assertive"}:{};return T.createElement("div",Wl({className:P,style:A},M),T.createElement("p",{className:$,style:y},T.isValidElement(S)?S:"".concat(S)),w())};function ba(e){"@babel/helpers - typeof";return ba=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ba(e)}function ro(e,t,r){return t=UC(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function UC(e){var t=zC(e,"string");return ba(t)=="symbol"?t:t+""}function zC(e,t){if(ba(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ba(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var xa="recharts-tooltip-wrapper",KC={visibility:"hidden"};function GC(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return ye(xa,ro(ro(ro(ro({},"".concat(xa,"-right"),Z(r)&&t&&Z(t.x)&&r>=t.x),"".concat(xa,"-left"),Z(r)&&t&&Z(t.x)&&r<t.x),"".concat(xa,"-bottom"),Z(n)&&t&&Z(t.y)&&n>=t.y),"".concat(xa,"-top"),Z(n)&&t&&Z(t.y)&&n<t.y))}function Bh(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.key,a=e.offsetTopLeft,i=e.position,o=e.reverseDirection,s=e.tooltipDimension,l=e.viewBox,u=e.viewBoxDimension;if(i&&Z(i[n]))return i[n];var c=r[n]-s-a,f=r[n]+a;if(t[n])return o[n]?c:f;if(o[n]){var d=c,h=l[n];return d<h?Math.max(f,l[n]):Math.max(c,l[n])}var v=f+s,m=l[n]+u;return v>m?Math.max(c,l[n]):Math.max(f,l[n])}function VC(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function qC(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,a=e.position,i=e.reverseDirection,o=e.tooltipBox,s=e.useTranslate3d,l=e.viewBox,u,c,f;return o.height>0&&o.width>0&&r?(c=Bh({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:a,reverseDirection:i,tooltipDimension:o.width,viewBox:l,viewBoxDimension:l.width}),f=Bh({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:a,reverseDirection:i,tooltipDimension:o.height,viewBox:l,viewBoxDimension:l.height}),u=VC({translateX:c,translateY:f,useTranslate3d:s})):u=KC,{cssProperties:u,cssClasses:GC({translateX:c,translateY:f,coordinate:r})}}function yn(e){"@babel/helpers - typeof";return yn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yn(e)}function Fh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Wh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Fh(Object(r),!0).forEach(function(n){Kl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function HC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function YC(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,zh(n.key),n)}}function XC(e,t,r){return t&&YC(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ZC(e,t,r){return t=no(t),JC(e,Uh()?Reflect.construct(t,r||[],no(e).constructor):t.apply(e,r))}function JC(e,t){if(t&&(yn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return QC(e)}function QC(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Uh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Uh=function(){return!!e})()}function no(e){return no=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},no(e)}function e2(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zl(e,t)}function zl(e,t){return zl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},zl(e,t)}function Kl(e,t,r){return t=zh(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zh(e){var t=t2(e,"string");return yn(t)=="symbol"?t:t+""}function t2(e,t){if(yn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(yn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Kh=1,r2=function(e){function t(){var r;HC(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=ZC(this,t,[].concat(a)),Kl(r,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),Kl(r,"handleKeyDown",function(o){if(o.key==="Escape"){var s,l,u,c;r.setState({dismissed:!0,dismissedAtCoordinate:{x:(s=(l=r.props.coordinate)===null||l===void 0?void 0:l.x)!==null&&s!==void 0?s:0,y:(u=(c=r.props.coordinate)===null||c===void 0?void 0:c.y)!==null&&u!==void 0?u:0}})}}),r}return e2(t,e),XC(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>Kh||Math.abs(n.height-this.state.lastBoundingBox.height)>Kh)&&this.setState({lastBoundingBox:{width:n.width,height:n.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var n,a;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,a=this.props,i=a.active,o=a.allowEscapeViewBox,s=a.animationDuration,l=a.animationEasing,u=a.children,c=a.coordinate,f=a.hasPayload,d=a.isAnimationActive,h=a.offset,v=a.position,m=a.reverseDirection,p=a.useTranslate3d,x=a.viewBox,O=a.wrapperStyle,w=qC({allowEscapeViewBox:o,coordinate:c,offsetTopLeft:h,position:v,reverseDirection:m,tooltipBox:this.state.lastBoundingBox,useTranslate3d:p,viewBox:x}),A=w.cssClasses,y=w.cssProperties,b=Wh(Wh({transition:d&&i?"transform ".concat(s,"ms ").concat(l):void 0},y),{},{pointerEvents:"none",visibility:!this.state.dismissed&&i&&f?"visible":"hidden",position:"absolute",top:0,left:0},O);return T.createElement("div",{tabIndex:-1,className:A,style:b,ref:function(P){n.wrapperNode=P}},u)}}])}(T.PureComponent),n2=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},vr={isSsr:n2()};function mn(e){"@babel/helpers - typeof";return mn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mn(e)}function Gh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Vh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Gh(Object(r),!0).forEach(function(n){Vl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function a2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i2(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Hh(n.key),n)}}function o2(e,t,r){return t&&i2(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function s2(e,t,r){return t=ao(t),l2(e,qh()?Reflect.construct(t,r||[],ao(e).constructor):t.apply(e,r))}function l2(e,t){if(t&&(mn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return u2(e)}function u2(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(qh=function(){return!!e})()}function ao(e){return ao=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ao(e)}function c2(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Gl(e,t)}function Gl(e,t){return Gl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Gl(e,t)}function Vl(e,t,r){return t=Hh(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Hh(e){var t=f2(e,"string");return mn(t)=="symbol"?t:t+""}function f2(e,t){if(mn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(mn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function d2(e){return e.dataKey}function h2(e,t){return T.isValidElement(e)?T.cloneElement(e,t):typeof e=="function"?T.createElement(e,t):T.createElement(WC,t)}var Wt=function(e){function t(){return a2(this,t),s2(this,t,arguments)}return c2(t,e),o2(t,[{key:"render",value:function(){var n=this,a=this.props,i=a.active,o=a.allowEscapeViewBox,s=a.animationDuration,l=a.animationEasing,u=a.content,c=a.coordinate,f=a.filterNull,d=a.isAnimationActive,h=a.offset,v=a.payload,m=a.payloadUniqBy,p=a.position,x=a.reverseDirection,O=a.useTranslate3d,w=a.viewBox,A=a.wrapperStyle,y=v??[];f&&y.length&&(y=xh(v.filter(function(S){return S.value!=null&&(S.hide!==!0||n.props.includeHidden)}),m,d2));var b=y.length>0;return T.createElement(r2,{allowEscapeViewBox:o,animationDuration:s,animationEasing:l,isAnimationActive:d,active:i,coordinate:c,hasPayload:b,offset:h,position:p,reverseDirection:x,useTranslate3d:O,viewBox:w,wrapperStyle:A},h2(u,Vh(Vh({},this.props),{},{payload:y})))}}])}(T.PureComponent);Vl(Wt,"displayName","Tooltip"),Vl(Wt,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!vr.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var p2=Ft,v2=function(){return p2.Date.now()},y2=v2,m2=/\s/;function g2(e){for(var t=e.length;t--&&m2.test(e.charAt(t)););return t}var b2=g2,x2=b2,w2=/^\s+/;function O2(e){return e&&e.slice(0,x2(e)+1).replace(w2,"")}var S2=O2,T2=S2,Yh=dr,A2=tn,Xh=NaN,P2=/^[-+]0x[0-9a-f]+$/i,_2=/^0b[01]+$/i,E2=/^0o[0-7]+$/i,j2=parseInt;function $2(e){if(typeof e=="number")return e;if(A2(e))return Xh;if(Yh(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Yh(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=T2(e);var r=_2.test(e);return r||E2.test(e)?j2(e.slice(2),r?2:8):P2.test(e)?Xh:+e}var Zh=$2,C2=dr,ql=y2,Jh=Zh,M2="Expected a function",k2=Math.max,N2=Math.min;function D2(e,t,r){var n,a,i,o,s,l,u=0,c=!1,f=!1,d=!0;if(typeof e!="function")throw new TypeError(M2);t=Jh(t)||0,C2(r)&&(c=!!r.leading,f="maxWait"in r,i=f?k2(Jh(r.maxWait)||0,t):i,d="trailing"in r?!!r.trailing:d);function h(b){var S=n,P=a;return n=a=void 0,u=b,o=e.apply(P,S),o}function v(b){return u=b,s=setTimeout(x,t),c?h(b):o}function m(b){var S=b-l,P=b-u,$=t-S;return f?N2($,i-P):$}function p(b){var S=b-l,P=b-u;return l===void 0||S>=t||S<0||f&&P>=i}function x(){var b=ql();if(p(b))return O(b);s=setTimeout(x,m(b))}function O(b){return s=void 0,d&&n?h(b):(n=a=void 0,o)}function w(){s!==void 0&&clearTimeout(s),u=0,n=l=a=s=void 0}function A(){return s===void 0?o:O(ql())}function y(){var b=ql(),S=p(b);if(n=arguments,a=this,l=b,S){if(s===void 0)return v(l);if(f)return clearTimeout(s),s=setTimeout(x,t),h(l)}return s===void 0&&(s=setTimeout(x,t)),o}return y.cancel=w,y.flush=A,y}var I2=D2,L2=I2,R2=dr,B2="Expected a function";function F2(e,t,r){var n=!0,a=!0;if(typeof e!="function")throw new TypeError(B2);return R2(r)&&(n="leading"in r?!!r.leading:n,a="trailing"in r?!!r.trailing:a),L2(e,t,{leading:n,maxWait:t,trailing:a})}var W2=F2;const Qh=Ce(W2);function wa(e){"@babel/helpers - typeof";return wa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wa(e)}function ep(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function io(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ep(Object(r),!0).forEach(function(n){U2(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ep(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function U2(e,t,r){return t=z2(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function z2(e){var t=K2(e,"string");return wa(t)=="symbol"?t:t+""}function K2(e,t){if(wa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(wa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function G2(e,t){return Y2(e)||H2(e,t)||q2(e,t)||V2()}function V2(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
131
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function q2(e,t){if(e){if(typeof e=="string")return tp(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return tp(e,t)}}function tp(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function H2(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function Y2(e){if(Array.isArray(e))return e}var X2=T.forwardRef(function(e,t){var r=e.aspect,n=e.initialDimension,a=n===void 0?{width:-1,height:-1}:n,i=e.width,o=i===void 0?"100%":i,s=e.height,l=s===void 0?"100%":s,u=e.minWidth,c=u===void 0?0:u,f=e.minHeight,d=e.maxHeight,h=e.children,v=e.debounce,m=v===void 0?0:v,p=e.id,x=e.className,O=e.onResize,w=e.style,A=w===void 0?{}:w,y=T.useRef(null),b=T.useRef();b.current=O,T.useImperativeHandle(t,function(){return Object.defineProperty(y.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),y.current},configurable:!0})});var S=T.useState({containerWidth:a.width,containerHeight:a.height}),P=G2(S,2),$=P[0],M=P[1],_=T.useCallback(function(R,k){M(function(D){var C=Math.round(R),B=Math.round(k);return D.containerWidth===C&&D.containerHeight===B?D:{containerWidth:C,containerHeight:B}})},[]);T.useEffect(function(){var R=function(K){var E,L=K[0].contentRect,F=L.width,W=L.height;_(F,W),(E=b.current)===null||E===void 0||E.call(b,F,W)};m>0&&(R=Qh(R,m,{trailing:!0,leading:!1}));var k=new ResizeObserver(R),D=y.current.getBoundingClientRect(),C=D.width,B=D.height;return _(C,B),k.observe(y.current),function(){k.disconnect()}},[_,m]);var j=T.useMemo(function(){var R=$.containerWidth,k=$.containerHeight;if(R<0||k<0)return null;er(jr(o)||jr(l),`The width(%s) and height(%s) are both fixed numbers,
132
+ maybe you don't need to use a ResponsiveContainer.`,o,l),er(!r||r>0,"The aspect(%s) must be greater than zero.",r);var D=jr(o)?R:o,C=jr(l)?k:l;r&&r>0&&(D?C=D/r:C&&(D=C*r),d&&C>d&&(C=d)),er(D>0||C>0,`The width(%s) and height(%s) of chart should be greater than 0,
128
133
  please check the style of container, or the props width(%s) and height(%s),
129
134
  or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
130
- height and width.`,I,C,o,l,c,f,r);var B=!Array.isArray(h)&&Zt(h.type).endsWith("Chart");return S.Children.map(h,function(U){return S.isValidElement(U)?S.cloneElement(U,io({width:I,height:C},B?{style:io({height:"100%",width:"100%",maxHeight:C,maxWidth:I},U.props.style)}:{})):U})},[r,h,l,d,f,c,$,o]);return S.createElement("div",{id:p?"".concat(p):void 0,className:ye("recharts-responsive-container",g),style:io(io({},A),{},{width:o,height:l,minWidth:c,minHeight:f,maxHeight:d}),ref:m},j)}),Hl=function(t){return null};Hl.displayName="Cell";function wa(e){"@babel/helpers - typeof";return wa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wa(e)}function tp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Yl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tp(Object(r),!0).forEach(function(n){X2(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function X2(e,t,r){return t=J2(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function J2(e){var t=Z2(e,"string");return wa(t)=="symbol"?t:t+""}function Z2(e,t){if(wa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(wa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var bn={widthCache:{},cacheCount:0},Q2=2e3,eM={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},rp="recharts_measurement_span";function tM(e){var t=Yl({},e);return Object.keys(t).forEach(function(r){t[r]||delete t[r]}),t}var Oa=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||vr.isSsr)return{width:0,height:0};var n=tM(r),a=JSON.stringify({text:t,copyStyle:n});if(bn.widthCache[a])return bn.widthCache[a];try{var i=document.getElementById(rp);i||(i=document.createElement("span"),i.setAttribute("id",rp),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var o=Yl(Yl({},eM),n);Object.assign(i.style,o),i.textContent="".concat(t);var s=i.getBoundingClientRect(),l={width:s.width,height:s.height};return bn.widthCache[a]=l,++bn.cacheCount>Q2&&(bn.cacheCount=0,bn.widthCache={}),l}catch{return{width:0,height:0}}},rM=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Sa(e){"@babel/helpers - typeof";return Sa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sa(e)}function oo(e,t){return oM(e)||iM(e,t)||aM(e,t)||nM()}function nM(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
131
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aM(e,t){if(e){if(typeof e=="string")return np(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return np(e,t)}}function np(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function iM(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function oM(e){if(Array.isArray(e))return e}function sM(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ap(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,uM(n.key),n)}}function lM(e,t,r){return t&&ap(e.prototype,t),r&&ap(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function uM(e){var t=cM(e,"string");return Sa(t)=="symbol"?t:t+""}function cM(e,t){if(Sa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Sa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var ip=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,op=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,fM=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,dM=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,sp={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},hM=Object.keys(sp),xn="NaN";function pM(e,t){return e*sp[t]}var so=function(){function e(t,r){sM(this,e),this.num=t,this.unit=r,this.num=t,this.unit=r,Number.isNaN(t)&&(this.unit=""),r!==""&&!fM.test(r)&&(this.num=NaN,this.unit=""),hM.includes(r)&&(this.num=pM(t,r),this.unit="px")}return lM(e,[{key:"add",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num+r.num,this.unit)}},{key:"subtract",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num-r.num,this.unit)}},{key:"multiply",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(this.num*r.num,this.unit||r.unit)}},{key:"divide",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(this.num/r.num,this.unit||r.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(r){var n,a=(n=dM.exec(r))!==null&&n!==void 0?n:[],i=oo(a,3),o=i[1],s=i[2];return new e(parseFloat(o),s??"")}}])}();function lp(e){if(e.includes(xn))return xn;for(var t=e;t.includes("*")||t.includes("/");){var r,n=(r=ip.exec(t))!==null&&r!==void 0?r:[],a=oo(n,4),i=a[1],o=a[2],s=a[3],l=so.parse(i??""),u=so.parse(s??""),c=o==="*"?l.multiply(u):l.divide(u);if(c.isNaN())return xn;t=t.replace(ip,c.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var f,d=(f=op.exec(t))!==null&&f!==void 0?f:[],h=oo(d,4),y=h[1],v=h[2],p=h[3],g=so.parse(y??""),O=so.parse(p??""),w=v==="+"?g.add(O):g.subtract(O);if(w.isNaN())return xn;t=t.replace(op,w.toString())}return t}var up=/\(([^()]*)\)/;function vM(e){for(var t=e;t.includes("(");){var r=up.exec(t),n=oo(r,2),a=n[1];t=t.replace(up,lp(a))}return t}function yM(e){var t=e.replace(/\s+/g,"");return t=vM(t),t=lp(t),t}function mM(e){try{return yM(e)}catch{return xn}}function Xl(e){var t=mM(e.slice(5,-1));return t===xn?"":t}var gM=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],bM=["dx","dy","angle","className","breakAll"];function Jl(){return Jl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Jl.apply(this,arguments)}function cp(e,t){if(e==null)return{};var r=xM(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function xM(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function fp(e,t){return AM(e)||SM(e,t)||OM(e,t)||wM()}function wM(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
132
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function OM(e,t){if(e){if(typeof e=="string")return dp(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return dp(e,t)}}function dp(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function SM(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function AM(e){if(Array.isArray(e))return e}var hp=/[ \f\n\r\t\v\u2028\u2029]+/,pp=function(t){var r=t.children,n=t.breakAll,a=t.style;try{var i=[];fe(r)||(n?i=r.toString().split(""):i=r.toString().split(hp));var o=i.map(function(l){return{word:l,width:Oa(l,a).width}}),s=n?0:Oa(" ",a).width;return{wordsWithComputedWidth:o,spaceWidth:s}}catch{return null}},TM=function(t,r,n,a,i){var o=t.maxLines,s=t.children,l=t.style,u=t.breakAll,c=J(o),f=s,d=function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return I.reduce(function(C,B){var U=B.word,K=B.width,_=C[C.length-1];if(_&&(a==null||i||_.width+K+n<Number(a)))_.words.push(U),_.width+=K+n;else{var L={words:[U],width:K};C.push(L)}return C},[])},h=d(r),y=function(I){return I.reduce(function(C,B){return C.width>B.width?C:B})};if(!c)return h;for(var v="…",p=function(I){var C=f.slice(0,I),B=pp({breakAll:u,style:l,children:C+v}).wordsWithComputedWidth,U=d(B),K=U.length>o||y(U).width>Number(a);return[K,U]},g=0,O=f.length-1,w=0,A;g<=O&&w<=f.length-1;){var m=Math.floor((g+O)/2),x=m-1,T=p(x),P=fp(T,2),$=P[0],k=P[1],E=p(m),j=fp(E,1),R=j[0];if(!$&&!R&&(g=m+1),$&&R&&(O=m-1),!$&&R){A=k;break}w++}return A||h},vp=function(t){var r=fe(t)?[]:t.toString().split(hp);return[{words:r}]},PM=function(t){var r=t.width,n=t.scaleToFit,a=t.children,i=t.style,o=t.breakAll,s=t.maxLines;if((r||n)&&!vr.isSsr){var l,u,c=pp({breakAll:o,children:a,style:i});if(c){var f=c.wordsWithComputedWidth,d=c.spaceWidth;l=f,u=d}else return vp(a);return TM({breakAll:o,children:a,maxLines:s,style:i},l,u,r,n)}return vp(a)},yp="#808080",lo=function(t){var r=t.x,n=r===void 0?0:r,a=t.y,i=a===void 0?0:a,o=t.lineHeight,s=o===void 0?"1em":o,l=t.capHeight,u=l===void 0?"0.71em":l,c=t.scaleToFit,f=c===void 0?!1:c,d=t.textAnchor,h=d===void 0?"start":d,y=t.verticalAnchor,v=y===void 0?"end":y,p=t.fill,g=p===void 0?yp:p,O=cp(t,gM),w=S.useMemo(function(){return PM({breakAll:O.breakAll,children:O.children,maxLines:O.maxLines,scaleToFit:f,style:O.style,width:O.width})},[O.breakAll,O.children,O.maxLines,f,O.style,O.width]),A=O.dx,m=O.dy,x=O.angle,T=O.className,P=O.breakAll,$=cp(O,bM);if(!Ye(n)||!Ye(i))return null;var k=n+(J(A)?A:0),E=i+(J(m)?m:0),j;switch(v){case"start":j=Xl("calc(".concat(u,")"));break;case"middle":j=Xl("calc(".concat((w.length-1)/2," * -").concat(s," + (").concat(u," / 2))"));break;default:j=Xl("calc(".concat(w.length-1," * -").concat(s,")"));break}var R=[];if(f){var N=w[0].width,I=O.width;R.push("scale(".concat((J(I)?I/N:1)/N,")"))}return x&&R.push("rotate(".concat(x,", ").concat(k,", ").concat(E,")")),R.length&&($.transform=R.join(" ")),S.createElement("text",Jl({},de($,!0),{x:k,y:E,className:ye("recharts-text",T),textAnchor:h,fill:g.includes("url")?yp:g}),w.map(function(C,B){var U=C.words.join(P?"":" ");return S.createElement("tspan",{x:k,dy:B===0?j:s,key:"".concat(U,"-").concat(B)},U)}))};function yr(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function _M(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Zl(e){let t,r,n;e.length!==2?(t=yr,r=(s,l)=>yr(e(s),l),n=(s,l)=>e(s)-l):(t=e===yr||e===_M?e:EM,r=e,n=e);function a(s,l,u=0,c=s.length){if(u<c){if(t(l,l)!==0)return c;do{const f=u+c>>>1;r(s[f],l)<0?u=f+1:c=f}while(u<c)}return u}function i(s,l,u=0,c=s.length){if(u<c){if(t(l,l)!==0)return c;do{const f=u+c>>>1;r(s[f],l)<=0?u=f+1:c=f}while(u<c)}return u}function o(s,l,u=0,c=s.length){const f=a(s,l,u,c-1);return f>u&&n(s[f-1],l)>-n(s[f],l)?f-1:f}return{left:a,center:o,right:i}}function EM(){return 0}function mp(e){return e===null?NaN:+e}function*jM(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const Aa=Zl(yr).right;Zl(mp).center;class gp extends Map{constructor(t,r=MM){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,a]of t)this.set(n,a)}get(t){return super.get(bp(this,t))}has(t){return super.has(bp(this,t))}set(t,r){return super.set($M(this,t),r)}delete(t){return super.delete(CM(this,t))}}function bp({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function $M({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function CM({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function MM(e){return e!==null&&typeof e=="object"?e.valueOf():e}function kM(e=yr){if(e===yr)return xp;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function xp(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const NM=Math.sqrt(50),DM=Math.sqrt(10),IM=Math.sqrt(2);function uo(e,t,r){const n=(t-e)/Math.max(0,r),a=Math.floor(Math.log10(n)),i=n/Math.pow(10,a),o=i>=NM?10:i>=DM?5:i>=IM?2:1;let s,l,u;return a<0?(u=Math.pow(10,-a)/o,s=Math.round(e*u),l=Math.round(t*u),s/u<e&&++s,l/u>t&&--l,u=-u):(u=Math.pow(10,a)*o,s=Math.round(e/u),l=Math.round(t/u),s*u<e&&++s,l*u>t&&--l),l<s&&.5<=r&&r<2?uo(e,t,r*2):[s,l,u]}function Ql(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[a,i,o]=n?uo(t,e,r):uo(e,t,r);if(!(i>=a))return[];const s=i-a+1,l=new Array(s);if(n)if(o<0)for(let u=0;u<s;++u)l[u]=(i-u)/-o;else for(let u=0;u<s;++u)l[u]=(i-u)*o;else if(o<0)for(let u=0;u<s;++u)l[u]=(a+u)/-o;else for(let u=0;u<s;++u)l[u]=(a+u)*o;return l}function eu(e,t,r){return t=+t,e=+e,r=+r,uo(e,t,r)[2]}function tu(e,t,r){t=+t,e=+e,r=+r;const n=t<e,a=n?eu(t,e,r):eu(e,t,r);return(n?-1:1)*(a<0?1/-a:a)}function wp(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function Op(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function Sp(e,t,r=0,n=1/0,a){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(a=a===void 0?xp:kM(a);n>r;){if(n-r>600){const l=n-r+1,u=t-r+1,c=Math.log(l),f=.5*Math.exp(2*c/3),d=.5*Math.sqrt(c*f*(l-f)/l)*(u-l/2<0?-1:1),h=Math.max(r,Math.floor(t-u*f/l+d)),y=Math.min(n,Math.floor(t+(l-u)*f/l+d));Sp(e,t,h,y,a)}const i=e[t];let o=r,s=n;for(Ta(e,r,t),a(e[n],i)>0&&Ta(e,r,n);o<s;){for(Ta(e,o,s),++o,--s;a(e[o],i)<0;)++o;for(;a(e[s],i)>0;)--s}a(e[r],i)===0?Ta(e,r,s):(++s,Ta(e,s,n)),s<=t&&(r=s+1),t<=s&&(n=s-1)}return e}function Ta(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function LM(e,t,r){if(e=Float64Array.from(jM(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return Op(e);if(t>=1)return wp(e);var n,a=(n-1)*t,i=Math.floor(a),o=wp(Sp(e,i).subarray(0,i+1)),s=Op(e.subarray(i+1));return o+(s-o)*(a-i)}}function RM(e,t,r=mp){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,a=(n-1)*t,i=Math.floor(a),o=+r(e[i],i,e),s=+r(e[i+1],i+1,e);return o+(s-o)*(a-i)}}function BM(e,t,r){e=+e,t=+t,r=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+r;for(var n=-1,a=Math.max(0,Math.ceil((t-e)/r))|0,i=new Array(a);++n<a;)i[n]=e+n*r;return i}function Tt(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function tr(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 ru=Symbol("implicit");function nu(){var e=new gp,t=[],r=[],n=ru;function a(i){let o=e.get(i);if(o===void 0){if(n!==ru)return n;e.set(i,o=t.push(i)-1)}return r[o%r.length]}return a.domain=function(i){if(!arguments.length)return t.slice();t=[],e=new gp;for(const o of i)e.has(o)||e.set(o,t.push(o)-1);return a},a.range=function(i){return arguments.length?(r=Array.from(i),a):r.slice()},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return nu(t,r).unknown(n)},Tt.apply(a,arguments),a}function Pa(){var e=nu().unknown(void 0),t=e.domain,r=e.range,n=0,a=1,i,o,s=!1,l=0,u=0,c=.5;delete e.unknown;function f(){var d=t().length,h=a<n,y=h?a:n,v=h?n:a;i=(v-y)/Math.max(1,d-l+u*2),s&&(i=Math.floor(i)),y+=(v-y-i*(d-l))*c,o=i*(1-l),s&&(y=Math.round(y),o=Math.round(o));var p=BM(d).map(function(g){return y+i*g});return r(h?p.reverse():p)}return e.domain=function(d){return arguments.length?(t(d),f()):t()},e.range=function(d){return arguments.length?([n,a]=d,n=+n,a=+a,f()):[n,a]},e.rangeRound=function(d){return[n,a]=d,n=+n,a=+a,s=!0,f()},e.bandwidth=function(){return o},e.step=function(){return i},e.round=function(d){return arguments.length?(s=!!d,f()):s},e.padding=function(d){return arguments.length?(l=Math.min(1,u=+d),f()):l},e.paddingInner=function(d){return arguments.length?(l=Math.min(1,d),f()):l},e.paddingOuter=function(d){return arguments.length?(u=+d,f()):u},e.align=function(d){return arguments.length?(c=Math.max(0,Math.min(1,d)),f()):c},e.copy=function(){return Pa(t(),[n,a]).round(s).paddingInner(l).paddingOuter(u).align(c)},Tt.apply(f(),arguments)}function Ap(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Ap(t())},e}function _a(){return Ap(Pa.apply(null,arguments).paddingInner(1))}function au(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Tp(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Ea(){}var ja=.7,co=1/ja,wn="\\s*([+-]?\\d+)\\s*",$a="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ut="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",FM=/^#([0-9a-f]{3,8})$/,WM=new RegExp(`^rgb\\(${wn},${wn},${wn}\\)$`),UM=new RegExp(`^rgb\\(${Ut},${Ut},${Ut}\\)$`),zM=new RegExp(`^rgba\\(${wn},${wn},${wn},${$a}\\)$`),KM=new RegExp(`^rgba\\(${Ut},${Ut},${Ut},${$a}\\)$`),GM=new RegExp(`^hsl\\(${$a},${Ut},${Ut}\\)$`),qM=new RegExp(`^hsla\\(${$a},${Ut},${Ut},${$a}\\)$`),Pp={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};au(Ea,Ca,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:_p,formatHex:_p,formatHex8:VM,formatHsl:HM,formatRgb:Ep,toString:Ep});function _p(){return this.rgb().formatHex()}function VM(){return this.rgb().formatHex8()}function HM(){return kp(this).formatHsl()}function Ep(){return this.rgb().formatRgb()}function Ca(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=FM.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?jp(t):r===3?new dt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?fo(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?fo(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=WM.exec(e))?new dt(t[1],t[2],t[3],1):(t=UM.exec(e))?new dt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=zM.exec(e))?fo(t[1],t[2],t[3],t[4]):(t=KM.exec(e))?fo(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=GM.exec(e))?Mp(t[1],t[2]/100,t[3]/100,1):(t=qM.exec(e))?Mp(t[1],t[2]/100,t[3]/100,t[4]):Pp.hasOwnProperty(e)?jp(Pp[e]):e==="transparent"?new dt(NaN,NaN,NaN,0):null}function jp(e){return new dt(e>>16&255,e>>8&255,e&255,1)}function fo(e,t,r,n){return n<=0&&(e=t=r=NaN),new dt(e,t,r,n)}function YM(e){return e instanceof Ea||(e=Ca(e)),e?(e=e.rgb(),new dt(e.r,e.g,e.b,e.opacity)):new dt}function iu(e,t,r,n){return arguments.length===1?YM(e):new dt(e,t,r,n??1)}function dt(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}au(dt,iu,Tp(Ea,{brighter(e){return e=e==null?co:Math.pow(co,e),new dt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ja:Math.pow(ja,e),new dt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new dt(Nr(this.r),Nr(this.g),Nr(this.b),ho(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:XM,formatRgb:Cp,toString:Cp}));function $p(){return`#${Dr(this.r)}${Dr(this.g)}${Dr(this.b)}`}function XM(){return`#${Dr(this.r)}${Dr(this.g)}${Dr(this.b)}${Dr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Cp(){const e=ho(this.opacity);return`${e===1?"rgb(":"rgba("}${Nr(this.r)}, ${Nr(this.g)}, ${Nr(this.b)}${e===1?")":`, ${e})`}`}function ho(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Nr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Dr(e){return e=Nr(e),(e<16?"0":"")+e.toString(16)}function Mp(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new kt(e,t,r,n)}function kp(e){if(e instanceof kt)return new kt(e.h,e.s,e.l,e.opacity);if(e instanceof Ea||(e=Ca(e)),!e)return new kt;if(e instanceof kt)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,a=Math.min(t,r,n),i=Math.max(t,r,n),o=NaN,s=i-a,l=(i+a)/2;return s?(t===i?o=(r-n)/s+(r<n)*6:r===i?o=(n-t)/s+2:o=(t-r)/s+4,s/=l<.5?i+a:2-i-a,o*=60):s=l>0&&l<1?0:o,new kt(o,s,l,e.opacity)}function JM(e,t,r,n){return arguments.length===1?kp(e):new kt(e,t,r,n??1)}function kt(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}au(kt,JM,Tp(Ea,{brighter(e){return e=e==null?co:Math.pow(co,e),new kt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ja:Math.pow(ja,e),new kt(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,r=this.l,n=r+(r<.5?r:1-r)*t,a=2*r-n;return new dt(ou(e>=240?e-240:e+120,a,n),ou(e,a,n),ou(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new kt(Np(this.h),po(this.s),po(this.l),ho(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=ho(this.opacity);return`${e===1?"hsl(":"hsla("}${Np(this.h)}, ${po(this.s)*100}%, ${po(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Np(e){return e=(e||0)%360,e<0?e+360:e}function po(e){return Math.max(0,Math.min(1,e||0))}function ou(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const su=e=>()=>e;function ZM(e,t){return function(r){return e+r*t}}function QM(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function ek(e){return(e=+e)==1?Dp:function(t,r){return r-t?QM(t,r,e):su(isNaN(t)?r:t)}}function Dp(e,t){var r=t-e;return r?ZM(e,r):su(isNaN(e)?t:e)}const Ip=function e(t){var r=ek(t);function n(a,i){var o=r((a=iu(a)).r,(i=iu(i)).r),s=r(a.g,i.g),l=r(a.b,i.b),u=Dp(a.opacity,i.opacity);return function(c){return a.r=o(c),a.g=s(c),a.b=l(c),a.opacity=u(c),a+""}}return n.gamma=e,n}(1);function tk(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),a;return function(i){for(a=0;a<r;++a)n[a]=e[a]*(1-i)+t[a]*i;return n}}function rk(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function nk(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,a=new Array(n),i=new Array(r),o;for(o=0;o<n;++o)a[o]=On(e[o],t[o]);for(;o<r;++o)i[o]=t[o];return function(s){for(o=0;o<n;++o)i[o]=a[o](s);return i}}function ak(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function vo(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function ik(e,t){var r={},n={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?r[a]=On(e[a],t[a]):n[a]=t[a];return function(i){for(a in r)n[a]=r[a](i);return n}}var lu=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,uu=new RegExp(lu.source,"g");function ok(e){return function(){return e}}function sk(e){return function(t){return e(t)+""}}function lk(e,t){var r=lu.lastIndex=uu.lastIndex=0,n,a,i,o=-1,s=[],l=[];for(e=e+"",t=t+"";(n=lu.exec(e))&&(a=uu.exec(t));)(i=a.index)>r&&(i=t.slice(r,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(a=a[0])?s[o]?s[o]+=a:s[++o]=a:(s[++o]=null,l.push({i:o,x:vo(n,a)})),r=uu.lastIndex;return r<t.length&&(i=t.slice(r),s[o]?s[o]+=i:s[++o]=i),s.length<2?l[0]?sk(l[0].x):ok(t):(t=l.length,function(u){for(var c=0,f;c<t;++c)s[(f=l[c]).i]=f.x(u);return s.join("")})}function On(e,t){var r=typeof t,n;return t==null||r==="boolean"?su(t):(r==="number"?vo:r==="string"?(n=Ca(t))?(t=n,Ip):lk:t instanceof Ca?Ip:t instanceof Date?ak:rk(t)?tk:Array.isArray(t)?nk:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?ik:vo)(e,t)}function cu(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function uk(e,t){t===void 0&&(t=e,e=On);for(var r=0,n=t.length-1,a=t[0],i=new Array(n<0?0:n);r<n;)i[r]=e(a,a=t[++r]);return function(o){var s=Math.max(0,Math.min(n-1,Math.floor(o*=n)));return i[s](o-s)}}function ck(e){return function(){return e}}function yo(e){return+e}var Lp=[0,1];function st(e){return e}function fu(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:ck(isNaN(t)?NaN:.5)}function fk(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function dk(e,t,r){var n=e[0],a=e[1],i=t[0],o=t[1];return a<n?(n=fu(a,n),i=r(o,i)):(n=fu(n,a),i=r(i,o)),function(s){return i(n(s))}}function hk(e,t,r){var n=Math.min(e.length,t.length)-1,a=new Array(n),i=new Array(n),o=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<n;)a[o]=fu(e[o],e[o+1]),i[o]=r(t[o],t[o+1]);return function(s){var l=Aa(e,s,1,n)-1;return i[l](a[l](s))}}function Ma(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function mo(){var e=Lp,t=Lp,r=On,n,a,i,o=st,s,l,u;function c(){var d=Math.min(e.length,t.length);return o!==st&&(o=fk(e[0],e[d-1])),s=d>2?hk:dk,l=u=null,f}function f(d){return d==null||isNaN(d=+d)?i:(l||(l=s(e.map(n),t,r)))(n(o(d)))}return f.invert=function(d){return o(a((u||(u=s(t,e.map(n),vo)))(d)))},f.domain=function(d){return arguments.length?(e=Array.from(d,yo),c()):e.slice()},f.range=function(d){return arguments.length?(t=Array.from(d),c()):t.slice()},f.rangeRound=function(d){return t=Array.from(d),r=cu,c()},f.clamp=function(d){return arguments.length?(o=d?!0:st,c()):o!==st},f.interpolate=function(d){return arguments.length?(r=d,c()):r},f.unknown=function(d){return arguments.length?(i=d,f):i},function(d,h){return n=d,a=h,c()}}function du(){return mo()(st,st)}function pk(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function go(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function Sn(e){return e=go(Math.abs(e)),e?e[1]:NaN}function vk(e,t){return function(r,n){for(var a=r.length,i=[],o=0,s=e[0],l=0;a>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),i.push(r.substring(a-=s,a+s)),!((l+=s+1)>n));)s=e[o=(o+1)%e.length];return i.reverse().join(t)}}function yk(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var mk=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ka(e){if(!(t=mk.exec(e)))throw new Error("invalid format: "+e);var t;return new hu({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]})}ka.prototype=hu.prototype;function hu(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+""}hu.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 gk(e){e:for(var t=e.length,r=1,n=-1,a;r<t;++r)switch(e[r]){case".":n=a=r;break;case"0":n===0&&(n=r),a=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(a+1):e}var Rp;function bk(e,t){var r=go(e,t);if(!r)return e+"";var n=r[0],a=r[1],i=a-(Rp=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,o=n.length;return i===o?n:i>o?n+new Array(i-o+1).join("0"):i>0?n.slice(0,i)+"."+n.slice(i):"0."+new Array(1-i).join("0")+go(e,Math.max(0,t+i-1))[0]}function Bp(e,t){var r=go(e,t);if(!r)return e+"";var n=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+n:n.length>a+1?n.slice(0,a+1)+"."+n.slice(a+1):n+new Array(a-n.length+2).join("0")}const Fp={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:pk,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)=>Bp(e*100,t),r:Bp,s:bk,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Wp(e){return e}var Up=Array.prototype.map,zp=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function xk(e){var t=e.grouping===void 0||e.thousands===void 0?Wp:vk(Up.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?Wp:yk(Up.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(f){f=ka(f);var d=f.fill,h=f.align,y=f.sign,v=f.symbol,p=f.zero,g=f.width,O=f.comma,w=f.precision,A=f.trim,m=f.type;m==="n"?(O=!0,m="g"):Fp[m]||(w===void 0&&(w=12),A=!0,m="g"),(p||d==="0"&&h==="=")&&(p=!0,d="0",h="=");var x=v==="$"?r:v==="#"&&/[boxX]/.test(m)?"0"+m.toLowerCase():"",T=v==="$"?n:/[%p]/.test(m)?o:"",P=Fp[m],$=/[defgprs%]/.test(m);w=w===void 0?6:/[gprs]/.test(m)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function k(E){var j=x,R=T,N,I,C;if(m==="c")R=P(E)+R,E="";else{E=+E;var B=E<0||1/E<0;if(E=isNaN(E)?l:P(Math.abs(E),w),A&&(E=gk(E)),B&&+E==0&&y!=="+"&&(B=!1),j=(B?y==="("?y:s:y==="-"||y==="("?"":y)+j,R=(m==="s"?zp[8+Rp/3]:"")+R+(B&&y==="("?")":""),$){for(N=-1,I=E.length;++N<I;)if(C=E.charCodeAt(N),48>C||C>57){R=(C===46?a+E.slice(N+1):E.slice(N))+R,E=E.slice(0,N);break}}}O&&!p&&(E=t(E,1/0));var U=j.length+E.length+R.length,K=U<g?new Array(g-U+1).join(d):"";switch(O&&p&&(E=t(K+E,K.length?g-R.length:1/0),K=""),h){case"<":E=j+E+R+K;break;case"=":E=j+K+E+R;break;case"^":E=K.slice(0,U=K.length>>1)+j+E+R+K.slice(U);break;default:E=K+j+E+R;break}return i(E)}return k.toString=function(){return f+""},k}function c(f,d){var h=u((f=ka(f),f.type="f",f)),y=Math.max(-8,Math.min(8,Math.floor(Sn(d)/3)))*3,v=Math.pow(10,-y),p=zp[8+y/3];return function(g){return h(v*g)+p}}return{format:u,formatPrefix:c}}var bo,pu,Kp;wk({thousands:",",grouping:[3],currency:["$",""]});function wk(e){return bo=xk(e),pu=bo.format,Kp=bo.formatPrefix,bo}function Ok(e){return Math.max(0,-Sn(Math.abs(e)))}function Sk(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Sn(t)/3)))*3-Sn(Math.abs(e)))}function Ak(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Sn(t)-Sn(e))+1}function Gp(e,t,r,n){var a=tu(e,t,r),i;switch(n=ka(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(i=Sk(a,o))&&(n.precision=i),Kp(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(i=Ak(a,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=i-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(i=Ok(a))&&(n.precision=i-(n.type==="%")*2);break}}return pu(n)}function mr(e){var t=e.domain;return e.ticks=function(r){var n=t();return Ql(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var a=t();return Gp(a[0],a[a.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),a=0,i=n.length-1,o=n[a],s=n[i],l,u,c=10;for(s<o&&(u=o,o=s,s=u,u=a,a=i,i=u);c-- >0;){if(u=eu(o,s,r),u===l)return n[a]=o,n[i]=s,t(n);if(u>0)o=Math.floor(o/u)*u,s=Math.ceil(s/u)*u;else if(u<0)o=Math.ceil(o*u)/u,s=Math.floor(s*u)/u;else break;l=u}return e},e}function xo(){var e=du();return e.copy=function(){return Ma(e,xo())},Tt.apply(e,arguments),mr(e)}function qp(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,yo),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return qp(e).unknown(t)},e=arguments.length?Array.from(e,yo):[0,1],mr(r)}function Vp(e,t){e=e.slice();var r=0,n=e.length-1,a=e[r],i=e[n],o;return i<a&&(o=r,r=n,n=o,o=a,a=i,i=o),e[r]=t.floor(a),e[n]=t.ceil(i),e}function Hp(e){return Math.log(e)}function Yp(e){return Math.exp(e)}function Tk(e){return-Math.log(-e)}function Pk(e){return-Math.exp(-e)}function _k(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Ek(e){return e===10?_k:e===Math.E?Math.exp:t=>Math.pow(e,t)}function jk(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 Xp(e){return(t,r)=>-e(-t,r)}function vu(e){const t=e(Hp,Yp),r=t.domain;let n=10,a,i;function o(){return a=jk(n),i=Ek(n),r()[0]<0?(a=Xp(a),i=Xp(i),e(Tk,Pk)):e(Hp,Yp),t}return t.base=function(s){return arguments.length?(n=+s,o()):n},t.domain=function(s){return arguments.length?(r(s),o()):r()},t.ticks=s=>{const l=r();let u=l[0],c=l[l.length-1];const f=c<u;f&&([u,c]=[c,u]);let d=a(u),h=a(c),y,v;const p=s==null?10:+s;let g=[];if(!(n%1)&&h-d<p){if(d=Math.floor(d),h=Math.ceil(h),u>0){for(;d<=h;++d)for(y=1;y<n;++y)if(v=d<0?y/i(-d):y*i(d),!(v<u)){if(v>c)break;g.push(v)}}else for(;d<=h;++d)for(y=n-1;y>=1;--y)if(v=d>0?y/i(-d):y*i(d),!(v<u)){if(v>c)break;g.push(v)}g.length*2<p&&(g=Ql(u,c,p))}else g=Ql(d,h,Math.min(h-d,p)).map(i);return f?g.reverse():g},t.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=n===10?"s":","),typeof l!="function"&&(!(n%1)&&(l=ka(l)).precision==null&&(l.trim=!0),l=pu(l)),s===1/0)return l;const u=Math.max(1,n*s/t.ticks().length);return c=>{let f=c/i(Math.round(a(c)));return f*n<n-.5&&(f*=n),f<=u?l(c):""}},t.nice=()=>r(Vp(r(),{floor:s=>i(Math.floor(a(s))),ceil:s=>i(Math.ceil(a(s)))})),t}function Jp(){const e=vu(mo()).domain([1,10]);return e.copy=()=>Ma(e,Jp()).base(e.base()),Tt.apply(e,arguments),e}function Zp(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Qp(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function yu(e){var t=1,r=e(Zp(t),Qp(t));return r.constant=function(n){return arguments.length?e(Zp(t=+n),Qp(t)):t},mr(r)}function ev(){var e=yu(mo());return e.copy=function(){return Ma(e,ev()).constant(e.constant())},Tt.apply(e,arguments)}function tv(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function $k(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Ck(e){return e<0?-e*e:e*e}function mu(e){var t=e(st,st),r=1;function n(){return r===1?e(st,st):r===.5?e($k,Ck):e(tv(r),tv(1/r))}return t.exponent=function(a){return arguments.length?(r=+a,n()):r},mr(t)}function gu(){var e=mu(mo());return e.copy=function(){return Ma(e,gu()).exponent(e.exponent())},Tt.apply(e,arguments),e}function Mk(){return gu.apply(null,arguments).exponent(.5)}function rv(e){return Math.sign(e)*e*e}function kk(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function nv(){var e=du(),t=[0,1],r=!1,n;function a(i){var o=kk(e(i));return isNaN(o)?n:r?Math.round(o):o}return a.invert=function(i){return e.invert(rv(i))},a.domain=function(i){return arguments.length?(e.domain(i),a):e.domain()},a.range=function(i){return arguments.length?(e.range((t=Array.from(i,yo)).map(rv)),a):t.slice()},a.rangeRound=function(i){return a.range(i).round(!0)},a.round=function(i){return arguments.length?(r=!!i,a):r},a.clamp=function(i){return arguments.length?(e.clamp(i),a):e.clamp()},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return nv(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},Tt.apply(a,arguments),mr(a)}function av(){var e=[],t=[],r=[],n;function a(){var o=0,s=Math.max(1,t.length);for(r=new Array(s-1);++o<s;)r[o-1]=RM(e,o/s);return i}function i(o){return o==null||isNaN(o=+o)?n:t[Aa(r,o)]}return i.invertExtent=function(o){var s=t.indexOf(o);return s<0?[NaN,NaN]:[s>0?r[s-1]:e[0],s<r.length?r[s]:e[e.length-1]]},i.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let s of o)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(yr),a()},i.range=function(o){return arguments.length?(t=Array.from(o),a()):t.slice()},i.unknown=function(o){return arguments.length?(n=o,i):n},i.quantiles=function(){return r.slice()},i.copy=function(){return av().domain(e).range(t).unknown(n)},Tt.apply(i,arguments)}function iv(){var e=0,t=1,r=1,n=[.5],a=[0,1],i;function o(l){return l!=null&&l<=l?a[Aa(n,l,0,r)]:i}function s(){var l=-1;for(n=new Array(r);++l<r;)n[l]=((l+1)*t-(l-r)*e)/(r+1);return o}return o.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,s()):[e,t]},o.range=function(l){return arguments.length?(r=(a=Array.from(l)).length-1,s()):a.slice()},o.invertExtent=function(l){var u=a.indexOf(l);return u<0?[NaN,NaN]:u<1?[e,n[0]]:u>=r?[n[r-1],t]:[n[u-1],n[u]]},o.unknown=function(l){return arguments.length&&(i=l),o},o.thresholds=function(){return n.slice()},o.copy=function(){return iv().domain([e,t]).range(a).unknown(i)},Tt.apply(mr(o),arguments)}function ov(){var e=[.5],t=[0,1],r,n=1;function a(i){return i!=null&&i<=i?t[Aa(e,i,0,n)]:r}return a.domain=function(i){return arguments.length?(e=Array.from(i),n=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(i){return arguments.length?(t=Array.from(i),n=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(i){var o=t.indexOf(i);return[e[o-1],e[o]]},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return ov().domain(e).range(t).unknown(r)},Tt.apply(a,arguments)}const bu=new Date,xu=new Date;function Xe(e,t,r,n){function a(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return a.floor=i=>(e(i=new Date(+i)),i),a.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),a.round=i=>{const o=a(i),s=a.ceil(i);return i-o<s-i?o:s},a.offset=(i,o)=>(t(i=new Date(+i),o==null?1:Math.floor(o)),i),a.range=(i,o,s)=>{const l=[];if(i=a.ceil(i),s=s==null?1:Math.floor(s),!(i<o)||!(s>0))return l;let u;do l.push(u=new Date(+i)),t(i,s),e(i);while(u<i&&i<o);return l},a.filter=i=>Xe(o=>{if(o>=o)for(;e(o),!i(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!i(o););else for(;--s>=0;)for(;t(o,1),!i(o););}),r&&(a.count=(i,o)=>(bu.setTime(+i),xu.setTime(+o),e(bu),e(xu),Math.floor(r(bu,xu))),a.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(n?o=>n(o)%i===0:o=>a.count(0,o)%i===0):a)),a}const wo=Xe(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);wo.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Xe(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):wo),wo.range;const rr=1e3,Pt=rr*60,nr=Pt*60,ar=nr*24,wu=ar*7,sv=ar*30,Ou=ar*365,Ir=Xe(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*rr)},(e,t)=>(t-e)/rr,e=>e.getUTCSeconds());Ir.range;const Su=Xe(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*rr)},(e,t)=>{e.setTime(+e+t*Pt)},(e,t)=>(t-e)/Pt,e=>e.getMinutes());Su.range;const Au=Xe(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Pt)},(e,t)=>(t-e)/Pt,e=>e.getUTCMinutes());Au.range;const Tu=Xe(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*rr-e.getMinutes()*Pt)},(e,t)=>{e.setTime(+e+t*nr)},(e,t)=>(t-e)/nr,e=>e.getHours());Tu.range;const Pu=Xe(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*nr)},(e,t)=>(t-e)/nr,e=>e.getUTCHours());Pu.range;const Na=Xe(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Pt)/ar,e=>e.getDate()-1);Na.range;const Oo=Xe(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ar,e=>e.getUTCDate()-1);Oo.range;const lv=Xe(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ar,e=>Math.floor(e/ar));lv.range;function Lr(e){return Xe(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*Pt)/wu)}const So=Lr(0),Ao=Lr(1),Nk=Lr(2),Dk=Lr(3),An=Lr(4),Ik=Lr(5),Lk=Lr(6);So.range,Ao.range,Nk.range,Dk.range,An.range,Ik.range,Lk.range;function Rr(e){return Xe(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/wu)}const To=Rr(0),Po=Rr(1),Rk=Rr(2),Bk=Rr(3),Tn=Rr(4),Fk=Rr(5),Wk=Rr(6);To.range,Po.range,Rk.range,Bk.range,Tn.range,Fk.range,Wk.range;const _u=Xe(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());_u.range;const Eu=Xe(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());Eu.range;const ir=Xe(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());ir.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Xe(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)}),ir.range;const or=Xe(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());or.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Xe(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)}),or.range;function uv(e,t,r,n,a,i){const o=[[Ir,1,rr],[Ir,5,5*rr],[Ir,15,15*rr],[Ir,30,30*rr],[i,1,Pt],[i,5,5*Pt],[i,15,15*Pt],[i,30,30*Pt],[a,1,nr],[a,3,3*nr],[a,6,6*nr],[a,12,12*nr],[n,1,ar],[n,2,2*ar],[r,1,wu],[t,1,sv],[t,3,3*sv],[e,1,Ou]];function s(u,c,f){const d=c<u;d&&([u,c]=[c,u]);const h=f&&typeof f.range=="function"?f:l(u,c,f),y=h?h.range(u,+c+1):[];return d?y.reverse():y}function l(u,c,f){const d=Math.abs(c-u)/f,h=Zl(([,,p])=>p).right(o,d);if(h===o.length)return e.every(tu(u/Ou,c/Ou,f));if(h===0)return wo.every(Math.max(tu(u,c,f),1));const[y,v]=o[d/o[h-1][2]<o[h][2]/d?h-1:h];return y.every(v)}return[s,l]}const[Uk,zk]=uv(or,Eu,To,lv,Pu,Au),[Kk,Gk]=uv(ir,_u,So,Na,Tu,Su);function ju(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 $u(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 Da(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function qk(e){var t=e.dateTime,r=e.date,n=e.time,a=e.periods,i=e.days,o=e.shortDays,s=e.months,l=e.shortMonths,u=Ia(a),c=La(a),f=Ia(i),d=La(i),h=Ia(o),y=La(o),v=Ia(s),p=La(s),g=Ia(l),O=La(l),w={a:B,A:U,b:K,B:_,c:null,d:vv,e:vv,f:vN,g:TN,G:_N,H:dN,I:hN,j:pN,L:yv,m:yN,M:mN,p:L,q:F,Q:Ov,s:Sv,S:gN,u:bN,U:xN,V:wN,w:ON,W:SN,x:null,X:null,y:AN,Y:PN,Z:EN,"%":wv},A={a:W,A:G,b:X,B:Q,c:null,d:gv,e:gv,f:MN,g:UN,G:KN,H:jN,I:$N,j:CN,L:bv,m:kN,M:NN,p:ae,q:te,Q:Ov,s:Sv,S:DN,u:IN,U:LN,V:RN,w:BN,W:FN,x:null,X:null,y:WN,Y:zN,Z:GN,"%":wv},m={a:k,A:E,b:j,B:R,c:N,d:hv,e:hv,f:lN,g:dv,G:fv,H:pv,I:pv,j:aN,L:sN,m:nN,M:iN,p:$,q:rN,Q:cN,s:fN,S:oN,u:Jk,U:Zk,V:Qk,w:Xk,W:eN,x:I,X:C,y:dv,Y:fv,Z:tN,"%":uN};w.x=x(r,w),w.X=x(n,w),w.c=x(t,w),A.x=x(r,A),A.X=x(n,A),A.c=x(t,A);function x(q,Y){return function(Z){var D=[],ie=-1,V=0,se=q.length,ee,ve,We;for(Z instanceof Date||(Z=new Date(+Z));++ie<se;)q.charCodeAt(ie)===37&&(D.push(q.slice(V,ie)),(ve=cv[ee=q.charAt(++ie)])!=null?ee=q.charAt(++ie):ve=ee==="e"?" ":"0",(We=Y[ee])&&(ee=We(Z,ve)),D.push(ee),V=ie+1);return D.push(q.slice(V,ie)),D.join("")}}function T(q,Y){return function(Z){var D=Da(1900,void 0,1),ie=P(D,q,Z+="",0),V,se;if(ie!=Z.length)return null;if("Q"in D)return new Date(D.Q);if("s"in D)return new Date(D.s*1e3+("L"in D?D.L:0));if(Y&&!("Z"in D)&&(D.Z=0),"p"in D&&(D.H=D.H%12+D.p*12),D.m===void 0&&(D.m="q"in D?D.q:0),"V"in D){if(D.V<1||D.V>53)return null;"w"in D||(D.w=1),"Z"in D?(V=$u(Da(D.y,0,1)),se=V.getUTCDay(),V=se>4||se===0?Po.ceil(V):Po(V),V=Oo.offset(V,(D.V-1)*7),D.y=V.getUTCFullYear(),D.m=V.getUTCMonth(),D.d=V.getUTCDate()+(D.w+6)%7):(V=ju(Da(D.y,0,1)),se=V.getDay(),V=se>4||se===0?Ao.ceil(V):Ao(V),V=Na.offset(V,(D.V-1)*7),D.y=V.getFullYear(),D.m=V.getMonth(),D.d=V.getDate()+(D.w+6)%7)}else("W"in D||"U"in D)&&("w"in D||(D.w="u"in D?D.u%7:"W"in D?1:0),se="Z"in D?$u(Da(D.y,0,1)).getUTCDay():ju(Da(D.y,0,1)).getDay(),D.m=0,D.d="W"in D?(D.w+6)%7+D.W*7-(se+5)%7:D.w+D.U*7-(se+6)%7);return"Z"in D?(D.H+=D.Z/100|0,D.M+=D.Z%100,$u(D)):ju(D)}}function P(q,Y,Z,D){for(var ie=0,V=Y.length,se=Z.length,ee,ve;ie<V;){if(D>=se)return-1;if(ee=Y.charCodeAt(ie++),ee===37){if(ee=Y.charAt(ie++),ve=m[ee in cv?Y.charAt(ie++):ee],!ve||(D=ve(q,Z,D))<0)return-1}else if(ee!=Z.charCodeAt(D++))return-1}return D}function $(q,Y,Z){var D=u.exec(Y.slice(Z));return D?(q.p=c.get(D[0].toLowerCase()),Z+D[0].length):-1}function k(q,Y,Z){var D=h.exec(Y.slice(Z));return D?(q.w=y.get(D[0].toLowerCase()),Z+D[0].length):-1}function E(q,Y,Z){var D=f.exec(Y.slice(Z));return D?(q.w=d.get(D[0].toLowerCase()),Z+D[0].length):-1}function j(q,Y,Z){var D=g.exec(Y.slice(Z));return D?(q.m=O.get(D[0].toLowerCase()),Z+D[0].length):-1}function R(q,Y,Z){var D=v.exec(Y.slice(Z));return D?(q.m=p.get(D[0].toLowerCase()),Z+D[0].length):-1}function N(q,Y,Z){return P(q,t,Y,Z)}function I(q,Y,Z){return P(q,r,Y,Z)}function C(q,Y,Z){return P(q,n,Y,Z)}function B(q){return o[q.getDay()]}function U(q){return i[q.getDay()]}function K(q){return l[q.getMonth()]}function _(q){return s[q.getMonth()]}function L(q){return a[+(q.getHours()>=12)]}function F(q){return 1+~~(q.getMonth()/3)}function W(q){return o[q.getUTCDay()]}function G(q){return i[q.getUTCDay()]}function X(q){return l[q.getUTCMonth()]}function Q(q){return s[q.getUTCMonth()]}function ae(q){return a[+(q.getUTCHours()>=12)]}function te(q){return 1+~~(q.getUTCMonth()/3)}return{format:function(q){var Y=x(q+="",w);return Y.toString=function(){return q},Y},parse:function(q){var Y=T(q+="",!1);return Y.toString=function(){return q},Y},utcFormat:function(q){var Y=x(q+="",A);return Y.toString=function(){return q},Y},utcParse:function(q){var Y=T(q+="",!0);return Y.toString=function(){return q},Y}}}var cv={"-":"",_:" ",0:"0"},et=/^\s*\d+/,Vk=/^%/,Hk=/[\\^$*+?|[\]().{}]/g;function be(e,t,r){var n=e<0?"-":"",a=(n?-e:e)+"",i=a.length;return n+(i<r?new Array(r-i+1).join(t)+a:a)}function Yk(e){return e.replace(Hk,"\\$&")}function Ia(e){return new RegExp("^(?:"+e.map(Yk).join("|")+")","i")}function La(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function Xk(e,t,r){var n=et.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function Jk(e,t,r){var n=et.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function Zk(e,t,r){var n=et.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function Qk(e,t,r){var n=et.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function eN(e,t,r){var n=et.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function fv(e,t,r){var n=et.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function dv(e,t,r){var n=et.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function tN(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function rN(e,t,r){var n=et.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function nN(e,t,r){var n=et.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function hv(e,t,r){var n=et.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function aN(e,t,r){var n=et.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function pv(e,t,r){var n=et.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function iN(e,t,r){var n=et.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function oN(e,t,r){var n=et.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function sN(e,t,r){var n=et.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function lN(e,t,r){var n=et.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function uN(e,t,r){var n=Vk.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function cN(e,t,r){var n=et.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function fN(e,t,r){var n=et.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function vv(e,t){return be(e.getDate(),t,2)}function dN(e,t){return be(e.getHours(),t,2)}function hN(e,t){return be(e.getHours()%12||12,t,2)}function pN(e,t){return be(1+Na.count(ir(e),e),t,3)}function yv(e,t){return be(e.getMilliseconds(),t,3)}function vN(e,t){return yv(e,t)+"000"}function yN(e,t){return be(e.getMonth()+1,t,2)}function mN(e,t){return be(e.getMinutes(),t,2)}function gN(e,t){return be(e.getSeconds(),t,2)}function bN(e){var t=e.getDay();return t===0?7:t}function xN(e,t){return be(So.count(ir(e)-1,e),t,2)}function mv(e){var t=e.getDay();return t>=4||t===0?An(e):An.ceil(e)}function wN(e,t){return e=mv(e),be(An.count(ir(e),e)+(ir(e).getDay()===4),t,2)}function ON(e){return e.getDay()}function SN(e,t){return be(Ao.count(ir(e)-1,e),t,2)}function AN(e,t){return be(e.getFullYear()%100,t,2)}function TN(e,t){return e=mv(e),be(e.getFullYear()%100,t,2)}function PN(e,t){return be(e.getFullYear()%1e4,t,4)}function _N(e,t){var r=e.getDay();return e=r>=4||r===0?An(e):An.ceil(e),be(e.getFullYear()%1e4,t,4)}function EN(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+be(t/60|0,"0",2)+be(t%60,"0",2)}function gv(e,t){return be(e.getUTCDate(),t,2)}function jN(e,t){return be(e.getUTCHours(),t,2)}function $N(e,t){return be(e.getUTCHours()%12||12,t,2)}function CN(e,t){return be(1+Oo.count(or(e),e),t,3)}function bv(e,t){return be(e.getUTCMilliseconds(),t,3)}function MN(e,t){return bv(e,t)+"000"}function kN(e,t){return be(e.getUTCMonth()+1,t,2)}function NN(e,t){return be(e.getUTCMinutes(),t,2)}function DN(e,t){return be(e.getUTCSeconds(),t,2)}function IN(e){var t=e.getUTCDay();return t===0?7:t}function LN(e,t){return be(To.count(or(e)-1,e),t,2)}function xv(e){var t=e.getUTCDay();return t>=4||t===0?Tn(e):Tn.ceil(e)}function RN(e,t){return e=xv(e),be(Tn.count(or(e),e)+(or(e).getUTCDay()===4),t,2)}function BN(e){return e.getUTCDay()}function FN(e,t){return be(Po.count(or(e)-1,e),t,2)}function WN(e,t){return be(e.getUTCFullYear()%100,t,2)}function UN(e,t){return e=xv(e),be(e.getUTCFullYear()%100,t,2)}function zN(e,t){return be(e.getUTCFullYear()%1e4,t,4)}function KN(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Tn(e):Tn.ceil(e),be(e.getUTCFullYear()%1e4,t,4)}function GN(){return"+0000"}function wv(){return"%"}function Ov(e){return+e}function Sv(e){return Math.floor(+e/1e3)}var Pn,Av,Tv;qN({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 qN(e){return Pn=qk(e),Av=Pn.format,Pn.parse,Tv=Pn.utcFormat,Pn.utcParse,Pn}function VN(e){return new Date(e)}function HN(e){return e instanceof Date?+e:+new Date(+e)}function Cu(e,t,r,n,a,i,o,s,l,u){var c=du(),f=c.invert,d=c.domain,h=u(".%L"),y=u(":%S"),v=u("%I:%M"),p=u("%I %p"),g=u("%a %d"),O=u("%b %d"),w=u("%B"),A=u("%Y");function m(x){return(l(x)<x?h:s(x)<x?y:o(x)<x?v:i(x)<x?p:n(x)<x?a(x)<x?g:O:r(x)<x?w:A)(x)}return c.invert=function(x){return new Date(f(x))},c.domain=function(x){return arguments.length?d(Array.from(x,HN)):d().map(VN)},c.ticks=function(x){var T=d();return e(T[0],T[T.length-1],x??10)},c.tickFormat=function(x,T){return T==null?m:u(T)},c.nice=function(x){var T=d();return(!x||typeof x.range!="function")&&(x=t(T[0],T[T.length-1],x??10)),x?d(Vp(T,x)):c},c.copy=function(){return Ma(c,Cu(e,t,r,n,a,i,o,s,l,u))},c}function YN(){return Tt.apply(Cu(Kk,Gk,ir,_u,So,Na,Tu,Su,Ir,Av).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function XN(){return Tt.apply(Cu(Uk,zk,or,Eu,To,Oo,Pu,Au,Ir,Tv).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function _o(){var e=0,t=1,r,n,a,i,o=st,s=!1,l;function u(f){return f==null||isNaN(f=+f)?l:o(a===0?.5:(f=(i(f)-r)*a,s?Math.max(0,Math.min(1,f)):f))}u.domain=function(f){return arguments.length?([e,t]=f,r=i(e=+e),n=i(t=+t),a=r===n?0:1/(n-r),u):[e,t]},u.clamp=function(f){return arguments.length?(s=!!f,u):s},u.interpolator=function(f){return arguments.length?(o=f,u):o};function c(f){return function(d){var h,y;return arguments.length?([h,y]=d,o=f(h,y),u):[o(0),o(1)]}}return u.range=c(On),u.rangeRound=c(cu),u.unknown=function(f){return arguments.length?(l=f,u):l},function(f){return i=f,r=f(e),n=f(t),a=r===n?0:1/(n-r),u}}function gr(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Pv(){var e=mr(_o()(st));return e.copy=function(){return gr(e,Pv())},tr.apply(e,arguments)}function _v(){var e=vu(_o()).domain([1,10]);return e.copy=function(){return gr(e,_v()).base(e.base())},tr.apply(e,arguments)}function Ev(){var e=yu(_o());return e.copy=function(){return gr(e,Ev()).constant(e.constant())},tr.apply(e,arguments)}function Mu(){var e=mu(_o());return e.copy=function(){return gr(e,Mu()).exponent(e.exponent())},tr.apply(e,arguments)}function JN(){return Mu.apply(null,arguments).exponent(.5)}function jv(){var e=[],t=st;function r(n){if(n!=null&&!isNaN(n=+n))return t((Aa(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let a of n)a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(yr),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,a)=>t(a/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(a,i)=>LM(e,i/n))},r.copy=function(){return jv(t).domain(e)},tr.apply(r,arguments)}function Eo(){var e=0,t=.5,r=1,n=1,a,i,o,s,l,u=st,c,f=!1,d;function h(v){return isNaN(v=+v)?d:(v=.5+((v=+c(v))-i)*(n*v<n*i?s:l),u(f?Math.max(0,Math.min(1,v)):v))}h.domain=function(v){return arguments.length?([e,t,r]=v,a=c(e=+e),i=c(t=+t),o=c(r=+r),s=a===i?0:.5/(i-a),l=i===o?0:.5/(o-i),n=i<a?-1:1,h):[e,t,r]},h.clamp=function(v){return arguments.length?(f=!!v,h):f},h.interpolator=function(v){return arguments.length?(u=v,h):u};function y(v){return function(p){var g,O,w;return arguments.length?([g,O,w]=p,u=uk(v,[g,O,w]),h):[u(0),u(.5),u(1)]}}return h.range=y(On),h.rangeRound=y(cu),h.unknown=function(v){return arguments.length?(d=v,h):d},function(v){return c=v,a=v(e),i=v(t),o=v(r),s=a===i?0:.5/(i-a),l=i===o?0:.5/(o-i),n=i<a?-1:1,h}}function $v(){var e=mr(Eo()(st));return e.copy=function(){return gr(e,$v())},tr.apply(e,arguments)}function Cv(){var e=vu(Eo()).domain([.1,1,10]);return e.copy=function(){return gr(e,Cv()).base(e.base())},tr.apply(e,arguments)}function Mv(){var e=yu(Eo());return e.copy=function(){return gr(e,Mv()).constant(e.constant())},tr.apply(e,arguments)}function ku(){var e=mu(Eo());return e.copy=function(){return gr(e,ku()).exponent(e.exponent())},tr.apply(e,arguments)}function ZN(){return ku.apply(null,arguments).exponent(.5)}const kv=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Pa,scaleDiverging:$v,scaleDivergingLog:Cv,scaleDivergingPow:ku,scaleDivergingSqrt:ZN,scaleDivergingSymlog:Mv,scaleIdentity:qp,scaleImplicit:ru,scaleLinear:xo,scaleLog:Jp,scaleOrdinal:nu,scalePoint:_a,scalePow:gu,scaleQuantile:av,scaleQuantize:iv,scaleRadial:nv,scaleSequential:Pv,scaleSequentialLog:_v,scaleSequentialPow:Mu,scaleSequentialQuantile:jv,scaleSequentialSqrt:JN,scaleSequentialSymlog:Ev,scaleSqrt:Mk,scaleSymlog:ev,scaleThreshold:ov,scaleTime:YN,scaleUtc:XN,tickFormat:Gp},Symbol.toStringTag,{value:"Module"}));var QN=rn;function eD(e,t,r){for(var n=-1,a=e.length;++n<a;){var i=e[n],o=t(i);if(o!=null&&(s===void 0?o===o&&!QN(o):r(o,s)))var s=o,l=i}return l}var Nv=eD;function tD(e,t){return e>t}var rD=tD,nD=Nv,aD=rD,iD=pn;function oD(e){return e&&e.length?nD(e,iD,aD):void 0}var sD=oD;const br=Ce(sD);function lD(e,t){return e<t}var uD=lD,cD=Nv,fD=uD,dD=pn;function hD(e){return e&&e.length?cD(e,dD,fD):void 0}var pD=hD;const jo=Ce(pD);var vD=Xs,yD=pr,mD=$h,gD=ct;function bD(e,t){var r=gD(e)?vD:mD;return r(e,yD(t))}var xD=bD,wD=Eh,OD=xD;function SD(e,t){return wD(OD(e,t),1)}var AD=SD;const TD=Ce(AD);var PD=Dl;function _D(e,t){return PD(e,t)}var ED=_D;const Br=Ce(ED);var _n=1e9,jD={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Iu,Le=!0,_t="[DecimalError] ",Fr=_t+"Invalid argument: ",Nu=_t+"Exponent out of range: ",En=Math.floor,Wr=Math.pow,$D=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,mt,tt=1e7,Ie=7,Dv=9007199254740991,$o=En(Dv/Ie),ne={};ne.absoluteValue=ne.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e},ne.comparedTo=ne.cmp=function(e){var t,r,n,a,i=this;if(e=new i.constructor(e),i.s!==e.s)return i.s||-e.s;if(i.e!==e.e)return i.e>e.e^i.s<0?1:-1;for(n=i.d.length,a=e.d.length,t=0,r=n<a?n:a;t<r;++t)if(i.d[t]!==e.d[t])return i.d[t]>e.d[t]^i.s<0?1:-1;return n===a?0:n>a^i.s<0?1:-1},ne.decimalPlaces=ne.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*Ie;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r},ne.dividedBy=ne.div=function(e){return sr(this,new this.constructor(e))},ne.dividedToIntegerBy=ne.idiv=function(e){var t=this,r=t.constructor;return je(sr(t,new r(e),0,1),r.precision)},ne.equals=ne.eq=function(e){return!this.cmp(e)},ne.exponent=function(){return qe(this)},ne.greaterThan=ne.gt=function(e){return this.cmp(e)>0},ne.greaterThanOrEqualTo=ne.gte=function(e){return this.cmp(e)>=0},ne.isInteger=ne.isint=function(){return this.e>this.d.length-2},ne.isNegative=ne.isneg=function(){return this.s<0},ne.isPositive=ne.ispos=function(){return this.s>0},ne.isZero=function(){return this.s===0},ne.lessThan=ne.lt=function(e){return this.cmp(e)<0},ne.lessThanOrEqualTo=ne.lte=function(e){return this.cmp(e)<1},ne.logarithm=ne.log=function(e){var t,r=this,n=r.constructor,a=n.precision,i=a+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(mt))throw Error(_t+"NaN");if(r.s<1)throw Error(_t+(r.s?"NaN":"-Infinity"));return r.eq(mt)?new n(0):(Le=!1,t=sr(Ra(r,i),Ra(e,i),i),Le=!0,je(t,a))},ne.minus=ne.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Bv(t,e):Iv(t,(e.s=-e.s,e))},ne.modulo=ne.mod=function(e){var t,r=this,n=r.constructor,a=n.precision;if(e=new n(e),!e.s)throw Error(_t+"NaN");return r.s?(Le=!1,t=sr(r,e,0,1).times(e),Le=!0,r.minus(t)):je(new n(r),a)},ne.naturalExponential=ne.exp=function(){return Lv(this)},ne.naturalLogarithm=ne.ln=function(){return Ra(this)},ne.negated=ne.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},ne.plus=ne.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Iv(t,e):Bv(t,(e.s=-e.s,e))},ne.precision=ne.sd=function(e){var t,r,n,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Fr+e);if(t=qe(a)+1,n=a.d.length-1,r=n*Ie+1,n=a.d[n],n){for(;n%10==0;n/=10)r--;for(n=a.d[0];n>=10;n/=10)r++}return e&&t>r?t:r},ne.squareRoot=ne.sqrt=function(){var e,t,r,n,a,i,o,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(_t+"NaN")}for(e=qe(s),Le=!1,a=Math.sqrt(+s),a==0||a==1/0?(t=Kt(s.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=En((e+1)/2)-(e<0||e%2),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new l(t)):n=new l(a.toString()),r=l.precision,a=o=r+3;;)if(i=n,n=i.plus(sr(s,i,o+2)).times(.5),Kt(i.d).slice(0,o)===(t=Kt(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),a==o&&t=="4999"){if(je(i,r+1,0),i.times(i).eq(s)){n=i;break}}else if(t!="9999")break;o+=4}return Le=!0,je(n,r)},ne.times=ne.mul=function(e){var t,r,n,a,i,o,s,l,u,c=this,f=c.constructor,d=c.d,h=(e=new f(e)).d;if(!c.s||!e.s)return new f(0);for(e.s*=c.s,r=c.e+e.e,l=d.length,u=h.length,l<u&&(i=d,d=h,h=i,o=l,l=u,u=o),i=[],o=l+u,n=o;n--;)i.push(0);for(n=u;--n>=0;){for(t=0,a=l+n;a>n;)s=i[a]+h[n]*d[a-n-1]+t,i[a--]=s%tt|0,t=s/tt|0;i[a]=(i[a]+t)%tt|0}for(;!i[--o];)i.pop();return t?++r:i.shift(),e.d=i,e.e=r,Le?je(e,f.precision):e},ne.toDecimalPlaces=ne.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(zt(e,0,_n),t===void 0?t=n.rounding:zt(t,0,8),je(r,e+qe(r)+1,t))},ne.toExponential=function(e,t){var r,n=this,a=n.constructor;return e===void 0?r=Ur(n,!0):(zt(e,0,_n),t===void 0?t=a.rounding:zt(t,0,8),n=je(new a(n),e+1,t),r=Ur(n,!0,e+1)),r},ne.toFixed=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?Ur(a):(zt(e,0,_n),t===void 0?t=i.rounding:zt(t,0,8),n=je(new i(a),e+qe(a)+1,t),r=Ur(n.abs(),!1,e+qe(n)+1),a.isneg()&&!a.isZero()?"-"+r:r)},ne.toInteger=ne.toint=function(){var e=this,t=e.constructor;return je(new t(e),qe(e)+1,t.rounding)},ne.toNumber=function(){return+this},ne.toPower=ne.pow=function(e){var t,r,n,a,i,o,s=this,l=s.constructor,u=12,c=+(e=new l(e));if(!e.s)return new l(mt);if(s=new l(s),!s.s){if(e.s<1)throw Error(_t+"Infinity");return s}if(s.eq(mt))return s;if(n=l.precision,e.eq(mt))return je(s,n);if(t=e.e,r=e.d.length-1,o=t>=r,i=s.s,o){if((r=c<0?-c:c)<=Dv){for(a=new l(mt),t=Math.ceil(n/Ie+4),Le=!1;r%2&&(a=a.times(s),Fv(a.d,t)),r=En(r/2),r!==0;)s=s.times(s),Fv(s.d,t);return Le=!0,e.s<0?new l(mt).div(a):je(a,n)}}else if(i<0)throw Error(_t+"NaN");return i=i<0&&e.d[Math.max(t,r)]&1?-1:1,s.s=1,Le=!1,a=e.times(Ra(s,n+u)),Le=!0,a=Lv(a),a.s=i,a},ne.toPrecision=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?(r=qe(a),n=Ur(a,r<=i.toExpNeg||r>=i.toExpPos)):(zt(e,1,_n),t===void 0?t=i.rounding:zt(t,0,8),a=je(new i(a),e,t),r=qe(a),n=Ur(a,e<=r||r<=i.toExpNeg,e)),n},ne.toSignificantDigits=ne.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(zt(e,1,_n),t===void 0?t=n.rounding:zt(t,0,8)),je(new n(r),e,t)},ne.toString=ne.valueOf=ne.val=ne.toJSON=ne[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=qe(e),r=e.constructor;return Ur(e,t<=r.toExpNeg||t>=r.toExpPos)};function Iv(e,t){var r,n,a,i,o,s,l,u,c=e.constructor,f=c.precision;if(!e.s||!t.s)return t.s||(t=new c(e)),Le?je(t,f):t;if(l=e.d,u=t.d,o=e.e,a=t.e,l=l.slice(),i=o-a,i){for(i<0?(n=l,i=-i,s=u.length):(n=u,a=o,s=l.length),o=Math.ceil(f/Ie),s=o>s?o+1:s+1,i>s&&(i=s,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for(s=l.length,i=u.length,s-i<0&&(i=s,n=u,u=l,l=n),r=0;i;)r=(l[--i]=l[i]+u[i]+r)/tt|0,l[i]%=tt;for(r&&(l.unshift(r),++a),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=a,Le?je(t,f):t}function zt(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Fr+e)}function Kt(e){var t,r,n,a=e.length-1,i="",o=e[0];if(a>0){for(i+=o,t=1;t<a;t++)n=e[t]+"",r=Ie-n.length,r&&(i+=xr(r)),i+=n;o=e[t],n=o+"",r=Ie-n.length,r&&(i+=xr(r))}else if(o===0)return"0";for(;o%10===0;)o/=10;return i+o}var sr=function(){function e(n,a){var i,o=0,s=n.length;for(n=n.slice();s--;)i=n[s]*a+o,n[s]=i%tt|0,o=i/tt|0;return o&&n.unshift(o),n}function t(n,a,i,o){var s,l;if(i!=o)l=i>o?1:-1;else for(s=l=0;s<i;s++)if(n[s]!=a[s]){l=n[s]>a[s]?1:-1;break}return l}function r(n,a,i){for(var o=0;i--;)n[i]-=o,o=n[i]<a[i]?1:0,n[i]=o*tt+n[i]-a[i];for(;!n[0]&&n.length>1;)n.shift()}return function(n,a,i,o){var s,l,u,c,f,d,h,y,v,p,g,O,w,A,m,x,T,P,$=n.constructor,k=n.s==a.s?1:-1,E=n.d,j=a.d;if(!n.s)return new $(n);if(!a.s)throw Error(_t+"Division by zero");for(l=n.e-a.e,T=j.length,m=E.length,h=new $(k),y=h.d=[],u=0;j[u]==(E[u]||0);)++u;if(j[u]>(E[u]||0)&&--l,i==null?O=i=$.precision:o?O=i+(qe(n)-qe(a))+1:O=i,O<0)return new $(0);if(O=O/Ie+2|0,u=0,T==1)for(c=0,j=j[0],O++;(u<m||c)&&O--;u++)w=c*tt+(E[u]||0),y[u]=w/j|0,c=w%j|0;else{for(c=tt/(j[0]+1)|0,c>1&&(j=e(j,c),E=e(E,c),T=j.length,m=E.length),A=T,v=E.slice(0,T),p=v.length;p<T;)v[p++]=0;P=j.slice(),P.unshift(0),x=j[0],j[1]>=tt/2&&++x;do c=0,s=t(j,v,T,p),s<0?(g=v[0],T!=p&&(g=g*tt+(v[1]||0)),c=g/x|0,c>1?(c>=tt&&(c=tt-1),f=e(j,c),d=f.length,p=v.length,s=t(f,v,d,p),s==1&&(c--,r(f,T<d?P:j,d))):(c==0&&(s=c=1),f=j.slice()),d=f.length,d<p&&f.unshift(0),r(v,f,p),s==-1&&(p=v.length,s=t(j,v,T,p),s<1&&(c++,r(v,T<p?P:j,p))),p=v.length):s===0&&(c++,v=[0]),y[u++]=c,s&&v[0]?v[p++]=E[A]||0:(v=[E[A]],p=1);while((A++<m||v[0]!==void 0)&&O--)}return y[0]||y.shift(),h.e=l,je(h,o?i+qe(h)+1:i)}}();function Lv(e,t){var r,n,a,i,o,s,l=0,u=0,c=e.constructor,f=c.precision;if(qe(e)>16)throw Error(Nu+qe(e));if(!e.s)return new c(mt);for(Le=!1,s=f,o=new c(.03125);e.abs().gte(.1);)e=e.times(o),u+=5;for(n=Math.log(Wr(2,u))/Math.LN10*2+5|0,s+=n,r=a=i=new c(mt),c.precision=s;;){if(a=je(a.times(e),s),r=r.times(++l),o=i.plus(sr(a,r,s)),Kt(o.d).slice(0,s)===Kt(i.d).slice(0,s)){for(;u--;)i=je(i.times(i),s);return c.precision=f,t==null?(Le=!0,je(i,f)):i}i=o}}function qe(e){for(var t=e.e*Ie,r=e.d[0];r>=10;r/=10)t++;return t}function Du(e,t,r){if(t>e.LN10.sd())throw Le=!0,r&&(e.precision=r),Error(_t+"LN10 precision limit exceeded");return je(new e(e.LN10),t)}function xr(e){for(var t="";e--;)t+="0";return t}function Ra(e,t){var r,n,a,i,o,s,l,u,c,f=1,d=10,h=e,y=h.d,v=h.constructor,p=v.precision;if(h.s<1)throw Error(_t+(h.s?"NaN":"-Infinity"));if(h.eq(mt))return new v(0);if(t==null?(Le=!1,u=p):u=t,h.eq(10))return t==null&&(Le=!0),Du(v,u);if(u+=d,v.precision=u,r=Kt(y),n=r.charAt(0),i=qe(h),Math.abs(i)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)h=h.times(e),r=Kt(h.d),n=r.charAt(0),f++;i=qe(h),n>1?(h=new v("0."+r),i++):h=new v(n+"."+r.slice(1))}else return l=Du(v,u+2,p).times(i+""),h=Ra(new v(n+"."+r.slice(1)),u-d).plus(l),v.precision=p,t==null?(Le=!0,je(h,p)):h;for(s=o=h=sr(h.minus(mt),h.plus(mt),u),c=je(h.times(h),u),a=3;;){if(o=je(o.times(c),u),l=s.plus(sr(o,new v(a),u)),Kt(l.d).slice(0,u)===Kt(s.d).slice(0,u))return s=s.times(2),i!==0&&(s=s.plus(Du(v,u+2,p).times(i+""))),s=sr(s,new v(f),u),v.precision=p,t==null?(Le=!0,je(s,p)):s;s=l,a+=2}}function Rv(e,t){var r,n,a;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(n,a),t){if(a-=n,r=r-n-1,e.e=En(r/Ie),e.d=[],n=(r+1)%Ie,r<0&&(n+=Ie),n<a){for(n&&e.d.push(+t.slice(0,n)),a-=Ie;n<a;)e.d.push(+t.slice(n,n+=Ie));t=t.slice(n),n=Ie-t.length}else n-=a;for(;n--;)t+="0";if(e.d.push(+t),Le&&(e.e>$o||e.e<-$o))throw Error(Nu+r)}else e.s=0,e.e=0,e.d=[0];return e}function je(e,t,r){var n,a,i,o,s,l,u,c,f=e.d;for(o=1,i=f[0];i>=10;i/=10)o++;if(n=t-o,n<0)n+=Ie,a=t,u=f[c=0];else{if(c=Math.ceil((n+1)/Ie),i=f.length,c>=i)return e;for(u=i=f[c],o=1;i>=10;i/=10)o++;n%=Ie,a=n-Ie+o}if(r!==void 0&&(i=Wr(10,o-a-1),s=u/i%10|0,l=t<0||f[c+1]!==void 0||u%i,l=r<4?(s||l)&&(r==0||r==(e.s<0?3:2)):s>5||s==5&&(r==4||l||r==6&&(n>0?a>0?u/Wr(10,o-a):0:f[c-1])%10&1||r==(e.s<0?8:7))),t<1||!f[0])return l?(i=qe(e),f.length=1,t=t-i-1,f[0]=Wr(10,(Ie-t%Ie)%Ie),e.e=En(-t/Ie)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(n==0?(f.length=c,i=1,c--):(f.length=c+1,i=Wr(10,Ie-n),f[c]=a>0?(u/Wr(10,o-a)%Wr(10,a)|0)*i:0),l)for(;;)if(c==0){(f[0]+=i)==tt&&(f[0]=1,++e.e);break}else{if(f[c]+=i,f[c]!=tt)break;f[c--]=0,i=1}for(n=f.length;f[--n]===0;)f.pop();if(Le&&(e.e>$o||e.e<-$o))throw Error(Nu+qe(e));return e}function Bv(e,t){var r,n,a,i,o,s,l,u,c,f,d=e.constructor,h=d.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new d(e),Le?je(t,h):t;if(l=e.d,f=t.d,n=t.e,u=e.e,l=l.slice(),o=u-n,o){for(c=o<0,c?(r=l,o=-o,s=f.length):(r=f,n=u,s=l.length),a=Math.max(Math.ceil(h/Ie),s)+2,o>a&&(o=a,r.length=1),r.reverse(),a=o;a--;)r.push(0);r.reverse()}else{for(a=l.length,s=f.length,c=a<s,c&&(s=a),a=0;a<s;a++)if(l[a]!=f[a]){c=l[a]<f[a];break}o=0}for(c&&(r=l,l=f,f=r,t.s=-t.s),s=l.length,a=f.length-s;a>0;--a)l[s++]=0;for(a=f.length;a>o;){if(l[--a]<f[a]){for(i=a;i&&l[--i]===0;)l[i]=tt-1;--l[i],l[a]+=tt}l[a]-=f[a]}for(;l[--s]===0;)l.pop();for(;l[0]===0;l.shift())--n;return l[0]?(t.d=l,t.e=n,Le?je(t,h):t):new d(0)}function Ur(e,t,r){var n,a=qe(e),i=Kt(e.d),o=i.length;return t?(r&&(n=r-o)>0?i=i.charAt(0)+"."+i.slice(1)+xr(n):o>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(a<0?"e":"e+")+a):a<0?(i="0."+xr(-a-1)+i,r&&(n=r-o)>0&&(i+=xr(n))):a>=o?(i+=xr(a+1-o),r&&(n=r-a-1)>0&&(i=i+"."+xr(n))):((n=a+1)<o&&(i=i.slice(0,n)+"."+i.slice(n)),r&&(n=r-o)>0&&(a+1===o&&(i+="."),i+=xr(n))),e.s<0?"-"+i:i}function Fv(e,t){if(e.length>t)return e.length=t,!0}function Wv(e){var t,r,n;function a(i){var o=this;if(!(o instanceof a))return new a(i);if(o.constructor=a,i instanceof a){o.s=i.s,o.e=i.e,o.d=(i=i.d)?i.slice():i;return}if(typeof i=="number"){if(i*0!==0)throw Error(Fr+i);if(i>0)o.s=1;else if(i<0)i=-i,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(i===~~i&&i<1e7){o.e=0,o.d=[i];return}return Rv(o,i.toString())}else if(typeof i!="string")throw Error(Fr+i);if(i.charCodeAt(0)===45?(i=i.slice(1),o.s=-1):o.s=1,$D.test(i))Rv(o,i);else throw Error(Fr+i)}if(a.prototype=ne,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=Wv,a.config=a.set=CD,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return a.config(e),a}function CD(e){if(!e||typeof e!="object")throw Error(_t+"Object expected");var t,r,n,a=["precision",1,_n,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<a.length;t+=3)if((n=e[r=a[t]])!==void 0)if(En(n)===n&&n>=a[t+1]&&n<=a[t+2])this[r]=n;else throw Error(Fr+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Fr+r+": "+n);return this}var Iu=Wv(jD);mt=new Iu(1);const Ee=Iu;function MD(e){return ID(e)||DD(e)||ND(e)||kD()}function kD(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
133
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ND(e,t){if(e){if(typeof e=="string")return Lu(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Lu(e,t)}}function DD(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function ID(e){if(Array.isArray(e))return Lu(e)}function Lu(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var LD=function(t){return t},Uv={},zv=function(t){return t===Uv},Kv=function(t){return function r(){return arguments.length===0||arguments.length===1&&zv(arguments.length<=0?void 0:arguments[0])?r:t.apply(void 0,arguments)}},RD=function e(t,r){return t===1?r:Kv(function(){for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];var o=a.filter(function(s){return s!==Uv}).length;return o>=t?r.apply(void 0,a):e(t-o,Kv(function(){for(var s=arguments.length,l=new Array(s),u=0;u<s;u++)l[u]=arguments[u];var c=a.map(function(f){return zv(f)?l.shift():f});return r.apply(void 0,MD(c).concat(l))}))})},Co=function(t){return RD(t.length,t)},Ru=function(t,r){for(var n=[],a=t;a<r;++a)n[a-t]=a;return n},BD=Co(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(r){return t[r]}).map(e)}),FD=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return LD;var a=r.reverse(),i=a[0],o=a.slice(1);return function(){return o.reduce(function(s,l){return l(s)},i.apply(void 0,arguments))}},Bu=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},Gv=function(t){var r=null,n=null;return function(){for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return r&&i.every(function(s,l){return s===r[l]})||(r=i,n=t.apply(void 0,i)),n}};function WD(e){var t;return e===0?t=1:t=Math.floor(new Ee(e).abs().log(10).toNumber())+1,t}function UD(e,t,r){for(var n=new Ee(e),a=0,i=[];n.lt(t)&&a<1e5;)i.push(n.toNumber()),n=n.add(r),a++;return i}var zD=Co(function(e,t,r){var n=+e,a=+t;return n+r*(a-n)}),KD=Co(function(e,t,r){var n=t-+e;return n=n||1/0,(r-e)/n}),GD=Co(function(e,t,r){var n=t-+e;return n=n||1/0,Math.max(0,Math.min(1,(r-e)/n))});const Mo={rangeStep:UD,getDigitCount:WD,interpolateNumber:zD,uninterpolateNumber:KD,uninterpolateTruncation:GD};function Fu(e){return HD(e)||VD(e)||qv(e)||qD()}function qD(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
134
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function VD(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function HD(e){if(Array.isArray(e))return Wu(e)}function Ba(e,t){return JD(e)||XD(e,t)||qv(e,t)||YD()}function YD(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
135
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qv(e,t){if(e){if(typeof e=="string")return Wu(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Wu(e,t)}}function Wu(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function XD(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,a=!1,i=void 0;try{for(var o=e[Symbol.iterator](),s;!(n=(s=o.next()).done)&&(r.push(s.value),!(t&&r.length===t));n=!0);}catch(l){a=!0,i=l}finally{try{!n&&o.return!=null&&o.return()}finally{if(a)throw i}}return r}}function JD(e){if(Array.isArray(e))return e}function Vv(e){var t=Ba(e,2),r=t[0],n=t[1],a=r,i=n;return r>n&&(a=n,i=r),[a,i]}function Hv(e,t,r){if(e.lte(0))return new Ee(0);var n=Mo.getDigitCount(e.toNumber()),a=new Ee(10).pow(n),i=e.div(a),o=n!==1?.05:.1,s=new Ee(Math.ceil(i.div(o).toNumber())).add(r).mul(o),l=s.mul(a);return t?l:new Ee(Math.ceil(l))}function ZD(e,t,r){var n=1,a=new Ee(e);if(!a.isint()&&r){var i=Math.abs(e);i<1?(n=new Ee(10).pow(Mo.getDigitCount(e)-1),a=new Ee(Math.floor(a.div(n).toNumber())).mul(n)):i>1&&(a=new Ee(Math.floor(e)))}else e===0?a=new Ee(Math.floor((t-1)/2)):r||(a=new Ee(Math.floor(e)));var o=Math.floor((t-1)/2),s=FD(BD(function(l){return a.add(new Ee(l-o).mul(n)).toNumber()}),Ru);return s(0,t)}function Yv(e,t,r,n){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new Ee(0),tickMin:new Ee(0),tickMax:new Ee(0)};var i=Hv(new Ee(t).sub(e).div(r-1),n,a),o;e<=0&&t>=0?o=new Ee(0):(o=new Ee(e).add(t).div(2),o=o.sub(new Ee(o).mod(i)));var s=Math.ceil(o.sub(e).div(i).toNumber()),l=Math.ceil(new Ee(t).sub(o).div(i).toNumber()),u=s+l+1;return u>r?Yv(e,t,r,n,a+1):(u<r&&(l=t>0?l+(r-u):l,s=t>0?s:s+(r-u)),{step:i,tickMin:o.sub(new Ee(s).mul(i)),tickMax:o.add(new Ee(l).mul(i))})}function QD(e){var t=Ba(e,2),r=t[0],n=t[1],a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(a,2),s=Vv([r,n]),l=Ba(s,2),u=l[0],c=l[1];if(u===-1/0||c===1/0){var f=c===1/0?[u].concat(Fu(Ru(0,a-1).map(function(){return 1/0}))):[].concat(Fu(Ru(0,a-1).map(function(){return-1/0})),[c]);return r>n?Bu(f):f}if(u===c)return ZD(u,a,i);var d=Yv(u,c,o,i),h=d.step,y=d.tickMin,v=d.tickMax,p=Mo.rangeStep(y,v.add(new Ee(.1).mul(h)),h);return r>n?Bu(p):p}function eI(e,t){var r=Ba(e,2),n=r[0],a=r[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Vv([n,a]),s=Ba(o,2),l=s[0],u=s[1];if(l===-1/0||u===1/0)return[n,a];if(l===u)return[l];var c=Math.max(t,2),f=Hv(new Ee(u).sub(l).div(c-1),i,0),d=[].concat(Fu(Mo.rangeStep(new Ee(l),new Ee(u).sub(new Ee(.99).mul(f)),f)),[u]);return n>a?Bu(d):d}var tI=Gv(QD),rI=Gv(eI),nI=process.env.NODE_ENV==="production",Uu="Invariant failed";function ht(e,t){if(nI)throw new Error(Uu);var r=typeof t=="function"?t():t,n=r?"".concat(Uu,": ").concat(r):Uu;throw new Error(n)}var aI=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function jn(e){"@babel/helpers - typeof";return jn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jn(e)}function ko(){return ko=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ko.apply(this,arguments)}function iI(e,t){return uI(e)||lI(e,t)||sI(e,t)||oI()}function oI(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
136
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sI(e,t){if(e){if(typeof e=="string")return Xv(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Xv(e,t)}}function Xv(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function lI(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function uI(e){if(Array.isArray(e))return e}function cI(e,t){if(e==null)return{};var r=fI(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function fI(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function dI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hI(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Qv(n.key),n)}}function pI(e,t,r){return t&&hI(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function vI(e,t,r){return t=No(t),yI(e,Jv()?Reflect.construct(t,r||[],No(e).constructor):t.apply(e,r))}function yI(e,t){if(t&&(jn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return mI(e)}function mI(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Jv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Jv=function(){return!!e})()}function No(e){return No=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},No(e)}function gI(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zu(e,t)}function zu(e,t){return zu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},zu(e,t)}function Zv(e,t,r){return t=Qv(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Qv(e){var t=bI(e,"string");return jn(t)=="symbol"?t:t+""}function bI(e,t){if(jn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(jn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var $n=function(e){function t(){return dI(this,t),vI(this,t,arguments)}return gI(t,e),pI(t,[{key:"render",value:function(){var n=this.props,a=n.offset,i=n.layout,o=n.width,s=n.dataKey,l=n.data,u=n.dataPointFormatter,c=n.xAxis,f=n.yAxis,d=cI(n,aI),h=de(d,!1);this.props.direction==="x"&&c.type!=="number"&&(process.env.NODE_ENV!=="production"?ht(!1,'ErrorBar requires Axis type property to be "number".'):ht());var y=l.map(function(v){var p=u(v,s),g=p.x,O=p.y,w=p.value,A=p.errorVal;if(!A)return null;var m=[],x,T;if(Array.isArray(A)){var P=iI(A,2);x=P[0],T=P[1]}else x=T=A;if(i==="vertical"){var $=c.scale,k=O+a,E=k+o,j=k-o,R=$(w-x),N=$(w+T);m.push({x1:N,y1:E,x2:N,y2:j}),m.push({x1:R,y1:k,x2:N,y2:k}),m.push({x1:R,y1:E,x2:R,y2:j})}else if(i==="horizontal"){var I=f.scale,C=g+a,B=C-o,U=C+o,K=I(w-x),_=I(w+T);m.push({x1:B,y1:_,x2:U,y2:_}),m.push({x1:C,y1:K,x2:C,y2:_}),m.push({x1:B,y1:K,x2:U,y2:K})}return S.createElement(xe,ko({className:"recharts-errorBar",key:"bar-".concat(m.map(function(L){return"".concat(L.x1,"-").concat(L.x2,"-").concat(L.y1,"-").concat(L.y2)}))},h),m.map(function(L){return S.createElement("line",ko({},L,{key:"line-".concat(L.x1,"-").concat(L.x2,"-").concat(L.y1,"-").concat(L.y2)}))}))});return S.createElement(xe,{className:"recharts-errorBars"},y)}}])}(S.Component);Zv($n,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"}),Zv($n,"displayName","ErrorBar");function Fa(e){"@babel/helpers - typeof";return Fa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fa(e)}function ey(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function zr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ey(Object(r),!0).forEach(function(n){xI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ey(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function xI(e,t,r){return t=wI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wI(e){var t=OI(e,"string");return Fa(t)=="symbol"?t:t+""}function OI(e,t){if(Fa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Fa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ty=function(t){var r=t.children,n=t.formattedGraphicalItems,a=t.legendWidth,i=t.legendContent,o=yt(r,yn);if(!o)return null;var s=yn.defaultProps,l=s!==void 0?zr(zr({},s),o.props):{},u;return o.props&&o.props.payload?u=o.props&&o.props.payload:i==="children"?u=(n||[]).reduce(function(c,f){var d=f.item,h=f.props,y=h.sectors||h.data||[];return c.concat(y.map(function(v){return{type:o.props.iconType||d.props.legendType,value:v.name,color:v.fill,payload:v}}))},[]):u=(n||[]).map(function(c){var f=c.item,d=f.type.defaultProps,h=d!==void 0?zr(zr({},d),f.props):{},y=h.dataKey,v=h.name,p=h.legendType,g=h.hide;return{inactive:g,dataKey:y,type:l.iconType||p||"square",color:Gu(f),value:v||y,payload:h}}),zr(zr(zr({},l),yn.getWithHeight(o,a)),{},{payload:u,item:o})};function Wa(e){"@babel/helpers - typeof";return Wa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wa(e)}function ry(e){return PI(e)||TI(e)||AI(e)||SI()}function SI(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
137
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function AI(e,t){if(e){if(typeof e=="string")return Ku(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ku(e,t)}}function TI(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function PI(e){if(Array.isArray(e))return Ku(e)}function Ku(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ny(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Fe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ny(Object(r),!0).forEach(function(n){Cn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ny(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Cn(e,t,r){return t=_I(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _I(e){var t=EI(e,"string");return Wa(t)=="symbol"?t:t+""}function EI(e,t){if(Wa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Wa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Je(e,t,r){return fe(e)||fe(t)?r:Ye(t)?wt(e,t,r):he(t)?t(e):r}function Ua(e,t,r,n){var a=TD(e,function(s){return Je(s,t)});if(r==="number"){var i=a.filter(function(s){return J(s)||parseFloat(s)});return i.length?[jo(i),br(i)]:[1/0,-1/0]}var o=n?a.filter(function(s){return!fe(s)}):a;return o.map(function(s){return Ye(s)||s instanceof Date?s:""})}var jI=function(t){var r,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=-1,s=(r=n==null?void 0:n.length)!==null&&r!==void 0?r:0;if(s<=1)return 0;if(i&&i.axisType==="angleAxis"&&Math.abs(Math.abs(i.range[1]-i.range[0])-360)<=1e-6)for(var l=i.range,u=0;u<s;u++){var c=u>0?a[u-1].coordinate:a[s-1].coordinate,f=a[u].coordinate,d=u>=s-1?a[0].coordinate:a[u+1].coordinate,h=void 0;if(Ct(f-c)!==Ct(d-f)){var y=[];if(Ct(d-f)===Ct(l[1]-l[0])){h=d;var v=f+l[1]-l[0];y[0]=Math.min(v,(v+c)/2),y[1]=Math.max(v,(v+c)/2)}else{h=c;var p=d+l[1]-l[0];y[0]=Math.min(f,(p+f)/2),y[1]=Math.max(f,(p+f)/2)}var g=[Math.min(f,(h+f)/2),Math.max(f,(h+f)/2)];if(t>g[0]&&t<=g[1]||t>=y[0]&&t<=y[1]){o=a[u].index;break}}else{var O=Math.min(c,d),w=Math.max(c,d);if(t>(O+f)/2&&t<=(w+f)/2){o=a[u].index;break}}}else for(var A=0;A<s;A++)if(A===0&&t<=(n[A].coordinate+n[A+1].coordinate)/2||A>0&&A<s-1&&t>(n[A].coordinate+n[A-1].coordinate)/2&&t<=(n[A].coordinate+n[A+1].coordinate)/2||A===s-1&&t>(n[A].coordinate+n[A-1].coordinate)/2){o=n[A].index;break}return o},Gu=function(t){var r,n=t,a=n.type.displayName,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?Fe(Fe({},t.type.defaultProps),t.props):t.props,o=i.stroke,s=i.fill,l;switch(a){case"Line":l=o;break;case"Area":case"Radar":l=o&&o!=="none"?o:s;break;default:l=s;break}return l},$I=function(t){var r=t.barSize,n=t.totalSize,a=t.stackGroups,i=a===void 0?{}:a;if(!i)return{};for(var o={},s=Object.keys(i),l=0,u=s.length;l<u;l++)for(var c=i[s[l]].stackGroups,f=Object.keys(c),d=0,h=f.length;d<h;d++){var y=c[f[d]],v=y.items,p=y.cateAxisId,g=v.filter(function(T){return Zt(T.type).indexOf("Bar")>=0});if(g&&g.length){var O=g[0].type.defaultProps,w=O!==void 0?Fe(Fe({},O),g[0].props):g[0].props,A=w.barSize,m=w[p];o[m]||(o[m]=[]);var x=fe(A)?r:A;o[m].push({item:g[0],stackList:g.slice(1),barSize:fe(x)?void 0:Cr(x,n,0)})}}return o},CI=function(t){var r=t.barGap,n=t.barCategoryGap,a=t.bandSize,i=t.sizeList,o=i===void 0?[]:i,s=t.maxBarSize,l=o.length;if(l<1)return null;var u=Cr(r,a,0,!0),c,f=[];if(o[0].barSize===+o[0].barSize){var d=!1,h=a/l,y=o.reduce(function(A,m){return A+m.barSize||0},0);y+=(l-1)*u,y>=a&&(y-=(l-1)*u,u=0),y>=a&&h>0&&(d=!0,h*=.9,y=l*h);var v=(a-y)/2>>0,p={offset:v-u,size:0};c=o.reduce(function(A,m){var x={item:m.item,position:{offset:p.offset+p.size+u,size:d?h:m.barSize}},T=[].concat(ry(A),[x]);return p=T[T.length-1].position,m.stackList&&m.stackList.length&&m.stackList.forEach(function(P){T.push({item:P,position:p})}),T},f)}else{var g=Cr(n,a,0,!0);a-2*g-(l-1)*u<=0&&(u=0);var O=(a-2*g-(l-1)*u)/l;O>1&&(O>>=0);var w=s===+s?Math.min(O,s):O;c=o.reduce(function(A,m,x){var T=[].concat(ry(A),[{item:m.item,position:{offset:g+(O+u)*x+(O-w)/2,size:w}}]);return m.stackList&&m.stackList.length&&m.stackList.forEach(function(P){T.push({item:P,position:T[T.length-1].position})}),T},f)}return c},MI=function(t,r,n,a){var i=n.children,o=n.width,s=n.margin,l=o-(s.left||0)-(s.right||0),u=ty({children:i,legendWidth:l});if(u){var c=a||{},f=c.width,d=c.height,h=u.align,y=u.verticalAlign,v=u.layout;if((v==="vertical"||v==="horizontal"&&y==="middle")&&h!=="center"&&J(t[h]))return Fe(Fe({},t),{},Cn({},h,t[h]+(f||0)));if((v==="horizontal"||v==="vertical"&&h==="center")&&y!=="middle"&&J(t[y]))return Fe(Fe({},t),{},Cn({},y,t[y]+(d||0)))}return t},kI=function(t,r,n){return fe(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},ay=function(t,r,n,a,i){var o=r.props.children,s=ft(o,$n).filter(function(u){return kI(a,i,u.props.direction)});if(s&&s.length){var l=s.map(function(u){return u.props.dataKey});return t.reduce(function(u,c){var f=Je(c,n);if(fe(f))return u;var d=Array.isArray(f)?[jo(f),br(f)]:[f,f],h=l.reduce(function(y,v){var p=Je(c,v,0),g=d[0]-Math.abs(Array.isArray(p)?p[0]:p),O=d[1]+Math.abs(Array.isArray(p)?p[1]:p);return[Math.min(g,y[0]),Math.max(O,y[1])]},[1/0,-1/0]);return[Math.min(h[0],u[0]),Math.max(h[1],u[1])]},[1/0,-1/0])}return null},NI=function(t,r,n,a,i){var o=r.map(function(s){return ay(t,s,n,i,a)}).filter(function(s){return!fe(s)});return o&&o.length?o.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]):null},iy=function(t,r,n,a,i){var o=r.map(function(l){var u=l.props.dataKey;return n==="number"&&u&&ay(t,l,u,a)||Ua(t,u,n,i)});if(n==="number")return o.reduce(function(l,u){return[Math.min(l[0],u[0]),Math.max(l[1],u[1])]},[1/0,-1/0]);var s={};return o.reduce(function(l,u){for(var c=0,f=u.length;c<f;c++)s[u[c]]||(s[u[c]]=!0,l.push(u[c]));return l},[])},oy=function(t,r){return t==="horizontal"&&r==="xAxis"||t==="vertical"&&r==="yAxis"||t==="centric"&&r==="angleAxis"||t==="radial"&&r==="radiusAxis"},sy=function(t,r,n,a){if(a)return t.map(function(l){return l.coordinate});var i,o,s=t.map(function(l){return l.coordinate===r&&(i=!0),l.coordinate===n&&(o=!0),l.coordinate});return i||s.push(r),o||s.push(n),s},lr=function(t,r,n){if(!t)return null;var a=t.scale,i=t.duplicateDomain,o=t.type,s=t.range,l=t.realScaleType==="scaleBand"?a.bandwidth()/2:2,u=(r||n)&&o==="category"&&a.bandwidth?a.bandwidth()/l:0;if(u=t.axisType==="angleAxis"&&(s==null?void 0:s.length)>=2?Ct(s[0]-s[1])*2*u:u,r&&(t.ticks||t.niceTicks)){var c=(t.ticks||t.niceTicks).map(function(f){var d=i?i.indexOf(f):f;return{coordinate:a(d)+u,value:f,offset:u}});return c.filter(function(f){return!ln(f.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(f,d){return{coordinate:a(f)+u,value:f,index:d,offset:u}}):a.ticks&&!n?a.ticks(t.tickCount).map(function(f){return{coordinate:a(f)+u,value:f,offset:u}}):a.domain().map(function(f,d){return{coordinate:a(f)+u,value:i?i[f]:f,index:d,offset:u}})},qu=new WeakMap,Do=function(t,r){if(typeof r!="function")return t;qu.has(t)||qu.set(t,new WeakMap);var n=qu.get(t);if(n.has(r))return n.get(r);var a=function(){t.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,a),a},DI=function(t,r,n){var a=t.scale,i=t.type,o=t.layout,s=t.axisType;if(a==="auto")return o==="radial"&&s==="radiusAxis"?{scale:Pa(),realScaleType:"band"}:o==="radial"&&s==="angleAxis"?{scale:xo(),realScaleType:"linear"}:i==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:_a(),realScaleType:"point"}:i==="category"?{scale:Pa(),realScaleType:"band"}:{scale:xo(),realScaleType:"linear"};if(Er(a)){var l="scale".concat(Ii(a));return{scale:(kv[l]||_a)(),realScaleType:kv[l]?l:"point"}}return he(a)?{scale:a}:{scale:_a(),realScaleType:"point"}},ly=1e-4,II=function(t){var r=t.domain();if(!(!r||r.length<=2)){var n=r.length,a=t.range(),i=Math.min(a[0],a[1])-ly,o=Math.max(a[0],a[1])+ly,s=t(r[0]),l=t(r[n-1]);(s<i||s>o||l<i||l>o)&&t.domain([r[0],r[n-1]])}},LI=function(t,r){if(!t)return null;for(var n=0,a=t.length;n<a;n++)if(t[n].item===r)return t[n].position;return null},RI=function(t,r){if(!r||r.length!==2||!J(r[0])||!J(r[1]))return t;var n=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]),i=[t[0],t[1]];return(!J(t[0])||t[0]<n)&&(i[0]=n),(!J(t[1])||t[1]>a)&&(i[1]=a),i[0]>a&&(i[0]=a),i[1]<n&&(i[1]=n),i},BI=function(t){var r=t.length;if(!(r<=0))for(var n=0,a=t[0].length;n<a;++n)for(var i=0,o=0,s=0;s<r;++s){var l=ln(t[s][n][1])?t[s][n][0]:t[s][n][1];l>=0?(t[s][n][0]=i,t[s][n][1]=i+l,i=t[s][n][1]):(t[s][n][0]=o,t[s][n][1]=o+l,o=t[s][n][1])}},FI=function(t){var r=t.length;if(!(r<=0))for(var n=0,a=t[0].length;n<a;++n)for(var i=0,o=0;o<r;++o){var s=ln(t[o][n][1])?t[o][n][0]:t[o][n][1];s>=0?(t[o][n][0]=i,t[o][n][1]=i+s,i=t[o][n][1]):(t[o][n][0]=0,t[o][n][1]=0)}},WI={sign:BI,expand:rA,none:cn,silhouette:nA,wiggle:aA,positive:FI},UI=function(t,r,n){var a=r.map(function(s){return s.props.dataKey}),i=WI[n],o=tA().keys(a).value(function(s,l){return+Je(s,l,0)}).order(bl).offset(i);return o(t)},zI=function(t,r,n,a,i,o){if(!t)return null;var s=o?r.reverse():r,l={},u=s.reduce(function(f,d){var h,y=(h=d.type)!==null&&h!==void 0&&h.defaultProps?Fe(Fe({},d.type.defaultProps),d.props):d.props,v=y.stackId,p=y.hide;if(p)return f;var g=y[n],O=f[g]||{hasStack:!1,stackGroups:{}};if(Ye(v)){var w=O.stackGroups[v]||{numericAxisId:n,cateAxisId:a,items:[]};w.items.push(d),O.hasStack=!0,O.stackGroups[v]=w}else O.stackGroups[$r("_stackId_")]={numericAxisId:n,cateAxisId:a,items:[d]};return Fe(Fe({},f),{},Cn({},g,O))},l),c={};return Object.keys(u).reduce(function(f,d){var h=u[d];if(h.hasStack){var y={};h.stackGroups=Object.keys(h.stackGroups).reduce(function(v,p){var g=h.stackGroups[p];return Fe(Fe({},v),{},Cn({},p,{numericAxisId:n,cateAxisId:a,items:g.items,stackedData:UI(t,g.items,i)}))},y)}return Fe(Fe({},f),{},Cn({},d,h))},c)},KI=function(t,r){var n=r.realScaleType,a=r.type,i=r.tickCount,o=r.originalDomain,s=r.allowDecimals,l=n||r.scale;if(l!=="auto"&&l!=="linear")return null;if(i&&a==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var u=t.domain();if(!u.length)return null;var c=tI(u,i,s);return t.domain([jo(c),br(c)]),{niceTicks:c}}if(i&&a==="number"){var f=t.domain(),d=rI(f,i,s);return{niceTicks:d}}return null};function Mn(e){var t=e.axis,r=e.ticks,n=e.bandSize,a=e.entry,i=e.index,o=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!fe(a[t.dataKey])){var s=Ni(r,"value",a[t.dataKey]);if(s)return s.coordinate+n/2}return r[i]?r[i].coordinate+n/2:null}var l=Je(a,fe(o)?t.dataKey:o);return fe(l)?null:t.scale(l)}var uy=function(t){var r=t.axis,n=t.ticks,a=t.offset,i=t.bandSize,o=t.entry,s=t.index;if(r.type==="category")return n[s]?n[s].coordinate+a:null;var l=Je(o,r.dataKey,r.domain[s]);return fe(l)?null:r.scale(l)-i/2+a},GI=function(t){var r=t.numericAxis,n=r.scale.domain();if(r.type==="number"){var a=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]);return a<=0&&i>=0?0:i<0?i:a}return n[0]},qI=function(t,r){var n,a=(n=t.type)!==null&&n!==void 0&&n.defaultProps?Fe(Fe({},t.type.defaultProps),t.props):t.props,i=a.stackId;if(Ye(i)){var o=r[i];if(o){var s=o.items.indexOf(t);return s>=0?o.stackedData[s]:null}}return null},VI=function(t){return t.reduce(function(r,n){return[jo(n.concat([r[0]]).filter(J)),br(n.concat([r[1]]).filter(J))]},[1/0,-1/0])},cy=function(t,r,n){return Object.keys(t).reduce(function(a,i){var o=t[i],s=o.stackedData,l=s.reduce(function(u,c){var f=VI(c.slice(r,n+1));return[Math.min(u[0],f[0]),Math.max(u[1],f[1])]},[1/0,-1/0]);return[Math.min(l[0],a[0]),Math.max(l[1],a[1])]},[1/0,-1/0]).map(function(a){return a===1/0||a===-1/0?0:a})},fy=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,dy=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Vu=function(t,r,n){if(he(t))return t(r,n);if(!Array.isArray(t))return r;var a=[];if(J(t[0]))a[0]=n?t[0]:Math.min(t[0],r[0]);else if(fy.test(t[0])){var i=+fy.exec(t[0])[1];a[0]=r[0]-i}else he(t[0])?a[0]=t[0](r[0]):a[0]=r[0];if(J(t[1]))a[1]=n?t[1]:Math.max(t[1],r[1]);else if(dy.test(t[1])){var o=+dy.exec(t[1])[1];a[1]=r[1]+o}else he(t[1])?a[1]=t[1](r[1]):a[1]=r[1];return a},Io=function(t,r,n){if(t&&t.scale&&t.scale.bandwidth){var a=t.scale.bandwidth();if(!n||a>0)return a}if(t&&r&&r.length>=2){for(var i=Fl(r,function(f){return f.coordinate}),o=1/0,s=1,l=i.length;s<l;s++){var u=i[s],c=i[s-1];o=Math.min((u.coordinate||0)-(c.coordinate||0),o)}return o===1/0?0:o}return n?void 0:0},hy=function(t,r,n){return!t||!t.length||Br(t,wt(n,"type.defaultProps.domain"))?r:t},py=function(t,r){var n=t.type.defaultProps?Fe(Fe({},t.type.defaultProps),t.props):t.props,a=n.dataKey,i=n.name,o=n.unit,s=n.formatter,l=n.tooltipType,u=n.chartType,c=n.hide;return Fe(Fe({},de(t,!1)),{},{dataKey:a,unit:o,formatter:s,name:i||a,color:Gu(t),value:Je(r,a),type:l,payload:r,chartType:u,hide:c})};function za(e){"@babel/helpers - typeof";return za=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},za(e)}function vy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function yy(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vy(Object(r),!0).forEach(function(n){HI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function HI(e,t,r){return t=YI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function YI(e){var t=XI(e,"string");return za(t)=="symbol"?t:t+""}function XI(e,t){if(za(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(za(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Lo=Math.PI/180,JI=function(t){return t*180/Math.PI},rt=function(t,r,n,a){return{x:t+Math.cos(-Lo*a)*n,y:r+Math.sin(-Lo*a)*n}},ZI=function(t,r){var n=t.x,a=t.y,i=r.x,o=r.y;return Math.sqrt(Math.pow(n-i,2)+Math.pow(a-o,2))},QI=function(t,r){var n=t.x,a=t.y,i=r.cx,o=r.cy,s=ZI({x:n,y:a},{x:i,y:o});if(s<=0)return{radius:s};var l=(n-i)/s,u=Math.acos(l);return a>o&&(u=2*Math.PI-u),{radius:s,angle:JI(u),angleInRadian:u}},eL=function(t){var r=t.startAngle,n=t.endAngle,a=Math.floor(r/360),i=Math.floor(n/360),o=Math.min(a,i);return{startAngle:r-o*360,endAngle:n-o*360}},tL=function(t,r){var n=r.startAngle,a=r.endAngle,i=Math.floor(n/360),o=Math.floor(a/360),s=Math.min(i,o);return t+s*360},my=function(t,r){var n=t.x,a=t.y,i=QI({x:n,y:a},r),o=i.radius,s=i.angle,l=r.innerRadius,u=r.outerRadius;if(o<l||o>u)return!1;if(o===0)return!0;var c=eL(r),f=c.startAngle,d=c.endAngle,h=s,y;if(f<=d){for(;h>d;)h-=360;for(;h<f;)h+=360;y=h>=f&&h<=d}else{for(;h>f;)h-=360;for(;h<d;)h+=360;y=h>=d&&h<=f}return y?yy(yy({},r),{},{radius:o,angle:tL(h,r)}):null};function Ka(e){"@babel/helpers - typeof";return Ka=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ka(e)}var rL=["offset"];function nL(e){return sL(e)||oL(e)||iL(e)||aL()}function aL(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
138
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iL(e,t){if(e){if(typeof e=="string")return Hu(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Hu(e,t)}}function oL(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function sL(e){if(Array.isArray(e))return Hu(e)}function Hu(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function lL(e,t){if(e==null)return{};var r=uL(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function uL(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function gy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ze(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gy(Object(r),!0).forEach(function(n){cL(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function cL(e,t,r){return t=fL(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fL(e){var t=dL(e,"string");return Ka(t)=="symbol"?t:t+""}function dL(e,t){if(Ka(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ka(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ga(){return Ga=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ga.apply(this,arguments)}var hL=function(t){var r=t.value,n=t.formatter,a=fe(t.children)?r:t.children;return he(n)?n(a):a},pL=function(t,r){var n=Ct(r-t),a=Math.min(Math.abs(r-t),360);return n*a},vL=function(t,r,n){var a=t.position,i=t.viewBox,o=t.offset,s=t.className,l=i,u=l.cx,c=l.cy,f=l.innerRadius,d=l.outerRadius,h=l.startAngle,y=l.endAngle,v=l.clockWise,p=(f+d)/2,g=pL(h,y),O=g>=0?1:-1,w,A;a==="insideStart"?(w=h+O*o,A=v):a==="insideEnd"?(w=y-O*o,A=!v):a==="end"&&(w=y+O*o,A=v),A=g<=0?A:!A;var m=rt(u,c,p,w),x=rt(u,c,p,w+(A?1:-1)*359),T="M".concat(m.x,",").concat(m.y,`
135
+ height and width.`,D,C,o,l,c,f,r);var B=!Array.isArray(h)&&Qt(h.type).endsWith("Chart");return T.Children.map(h,function(U){return T.isValidElement(U)?T.cloneElement(U,io({width:D,height:C},B?{style:io({height:"100%",width:"100%",maxHeight:C,maxWidth:D},U.props.style)}:{})):U})},[r,h,l,d,f,c,$,o]);return T.createElement("div",{id:p?"".concat(p):void 0,className:ye("recharts-responsive-container",x),style:io(io({},A),{},{width:o,height:l,minWidth:c,minHeight:f,maxHeight:d}),ref:y},j)}),Hl=function(t){return null};Hl.displayName="Cell";function Oa(e){"@babel/helpers - typeof";return Oa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oa(e)}function rp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Yl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rp(Object(r),!0).forEach(function(n){Z2(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Z2(e,t,r){return t=J2(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function J2(e){var t=Q2(e,"string");return Oa(t)=="symbol"?t:t+""}function Q2(e,t){if(Oa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Oa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var gn={widthCache:{},cacheCount:0},eM=2e3,tM={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},np="recharts_measurement_span";function rM(e){var t=Yl({},e);return Object.keys(t).forEach(function(r){t[r]||delete t[r]}),t}var Sa=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||vr.isSsr)return{width:0,height:0};var n=rM(r),a=JSON.stringify({text:t,copyStyle:n});if(gn.widthCache[a])return gn.widthCache[a];try{var i=document.getElementById(np);i||(i=document.createElement("span"),i.setAttribute("id",np),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var o=Yl(Yl({},tM),n);Object.assign(i.style,o),i.textContent="".concat(t);var s=i.getBoundingClientRect(),l={width:s.width,height:s.height};return gn.widthCache[a]=l,++gn.cacheCount>eM&&(gn.cacheCount=0,gn.widthCache={}),l}catch{return{width:0,height:0}}},nM=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Ta(e){"@babel/helpers - typeof";return Ta=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ta(e)}function oo(e,t){return sM(e)||oM(e,t)||iM(e,t)||aM()}function aM(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
136
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iM(e,t){if(e){if(typeof e=="string")return ap(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ap(e,t)}}function ap(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function oM(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function sM(e){if(Array.isArray(e))return e}function lM(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ip(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,cM(n.key),n)}}function uM(e,t,r){return t&&ip(e.prototype,t),r&&ip(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function cM(e){var t=fM(e,"string");return Ta(t)=="symbol"?t:t+""}function fM(e,t){if(Ta(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ta(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var op=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,sp=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,dM=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,hM=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,lp={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},pM=Object.keys(lp),bn="NaN";function vM(e,t){return e*lp[t]}var so=function(){function e(t,r){lM(this,e),this.num=t,this.unit=r,this.num=t,this.unit=r,Number.isNaN(t)&&(this.unit=""),r!==""&&!dM.test(r)&&(this.num=NaN,this.unit=""),pM.includes(r)&&(this.num=vM(t,r),this.unit="px")}return uM(e,[{key:"add",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num+r.num,this.unit)}},{key:"subtract",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num-r.num,this.unit)}},{key:"multiply",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(this.num*r.num,this.unit||r.unit)}},{key:"divide",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(this.num/r.num,this.unit||r.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(r){var n,a=(n=hM.exec(r))!==null&&n!==void 0?n:[],i=oo(a,3),o=i[1],s=i[2];return new e(parseFloat(o),s??"")}}])}();function up(e){if(e.includes(bn))return bn;for(var t=e;t.includes("*")||t.includes("/");){var r,n=(r=op.exec(t))!==null&&r!==void 0?r:[],a=oo(n,4),i=a[1],o=a[2],s=a[3],l=so.parse(i??""),u=so.parse(s??""),c=o==="*"?l.multiply(u):l.divide(u);if(c.isNaN())return bn;t=t.replace(op,c.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var f,d=(f=sp.exec(t))!==null&&f!==void 0?f:[],h=oo(d,4),v=h[1],m=h[2],p=h[3],x=so.parse(v??""),O=so.parse(p??""),w=m==="+"?x.add(O):x.subtract(O);if(w.isNaN())return bn;t=t.replace(sp,w.toString())}return t}var cp=/\(([^()]*)\)/;function yM(e){for(var t=e;t.includes("(");){var r=cp.exec(t),n=oo(r,2),a=n[1];t=t.replace(cp,up(a))}return t}function mM(e){var t=e.replace(/\s+/g,"");return t=yM(t),t=up(t),t}function gM(e){try{return mM(e)}catch{return bn}}function Xl(e){var t=gM(e.slice(5,-1));return t===bn?"":t}var bM=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],xM=["dx","dy","angle","className","breakAll"];function Zl(){return Zl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Zl.apply(this,arguments)}function fp(e,t){if(e==null)return{};var r=wM(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function wM(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function dp(e,t){return AM(e)||TM(e,t)||SM(e,t)||OM()}function OM(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
137
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function SM(e,t){if(e){if(typeof e=="string")return hp(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return hp(e,t)}}function hp(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function TM(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function AM(e){if(Array.isArray(e))return e}var pp=/[ \f\n\r\t\v\u2028\u2029]+/,vp=function(t){var r=t.children,n=t.breakAll,a=t.style;try{var i=[];fe(r)||(n?i=r.toString().split(""):i=r.toString().split(pp));var o=i.map(function(l){return{word:l,width:Sa(l,a).width}}),s=n?0:Sa(" ",a).width;return{wordsWithComputedWidth:o,spaceWidth:s}}catch{return null}},PM=function(t,r,n,a,i){var o=t.maxLines,s=t.children,l=t.style,u=t.breakAll,c=Z(o),f=s,d=function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return D.reduce(function(C,B){var U=B.word,K=B.width,E=C[C.length-1];if(E&&(a==null||i||E.width+K+n<Number(a)))E.words.push(U),E.width+=K+n;else{var L={words:[U],width:K};C.push(L)}return C},[])},h=d(r),v=function(D){return D.reduce(function(C,B){return C.width>B.width?C:B})};if(!c)return h;for(var m="…",p=function(D){var C=f.slice(0,D),B=vp({breakAll:u,style:l,children:C+m}).wordsWithComputedWidth,U=d(B),K=U.length>o||v(U).width>Number(a);return[K,U]},x=0,O=f.length-1,w=0,A;x<=O&&w<=f.length-1;){var y=Math.floor((x+O)/2),b=y-1,S=p(b),P=dp(S,2),$=P[0],M=P[1],_=p(y),j=dp(_,1),R=j[0];if(!$&&!R&&(x=y+1),$&&R&&(O=y-1),!$&&R){A=M;break}w++}return A||h},yp=function(t){var r=fe(t)?[]:t.toString().split(pp);return[{words:r}]},_M=function(t){var r=t.width,n=t.scaleToFit,a=t.children,i=t.style,o=t.breakAll,s=t.maxLines;if((r||n)&&!vr.isSsr){var l,u,c=vp({breakAll:o,children:a,style:i});if(c){var f=c.wordsWithComputedWidth,d=c.spaceWidth;l=f,u=d}else return yp(a);return PM({breakAll:o,children:a,maxLines:s,style:i},l,u,r,n)}return yp(a)},mp="#808080",lo=function(t){var r=t.x,n=r===void 0?0:r,a=t.y,i=a===void 0?0:a,o=t.lineHeight,s=o===void 0?"1em":o,l=t.capHeight,u=l===void 0?"0.71em":l,c=t.scaleToFit,f=c===void 0?!1:c,d=t.textAnchor,h=d===void 0?"start":d,v=t.verticalAnchor,m=v===void 0?"end":v,p=t.fill,x=p===void 0?mp:p,O=fp(t,bM),w=T.useMemo(function(){return _M({breakAll:O.breakAll,children:O.children,maxLines:O.maxLines,scaleToFit:f,style:O.style,width:O.width})},[O.breakAll,O.children,O.maxLines,f,O.style,O.width]),A=O.dx,y=O.dy,b=O.angle,S=O.className,P=O.breakAll,$=fp(O,xM);if(!Ye(n)||!Ye(i))return null;var M=n+(Z(A)?A:0),_=i+(Z(y)?y:0),j;switch(m){case"start":j=Xl("calc(".concat(u,")"));break;case"middle":j=Xl("calc(".concat((w.length-1)/2," * -").concat(s," + (").concat(u," / 2))"));break;default:j=Xl("calc(".concat(w.length-1," * -").concat(s,")"));break}var R=[];if(f){var k=w[0].width,D=O.width;R.push("scale(".concat((Z(D)?D/k:1)/k,")"))}return b&&R.push("rotate(".concat(b,", ").concat(M,", ").concat(_,")")),R.length&&($.transform=R.join(" ")),T.createElement("text",Zl({},de($,!0),{x:M,y:_,className:ye("recharts-text",S),textAnchor:h,fill:x.includes("url")?mp:x}),w.map(function(C,B){var U=C.words.join(P?"":" ");return T.createElement("tspan",{x:M,dy:B===0?j:s,key:"".concat(U,"-").concat(B)},U)}))};function yr(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function EM(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Jl(e){let t,r,n;e.length!==2?(t=yr,r=(s,l)=>yr(e(s),l),n=(s,l)=>e(s)-l):(t=e===yr||e===EM?e:jM,r=e,n=e);function a(s,l,u=0,c=s.length){if(u<c){if(t(l,l)!==0)return c;do{const f=u+c>>>1;r(s[f],l)<0?u=f+1:c=f}while(u<c)}return u}function i(s,l,u=0,c=s.length){if(u<c){if(t(l,l)!==0)return c;do{const f=u+c>>>1;r(s[f],l)<=0?u=f+1:c=f}while(u<c)}return u}function o(s,l,u=0,c=s.length){const f=a(s,l,u,c-1);return f>u&&n(s[f-1],l)>-n(s[f],l)?f-1:f}return{left:a,center:o,right:i}}function jM(){return 0}function gp(e){return e===null?NaN:+e}function*$M(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const Aa=Jl(yr).right;Jl(gp).center;class bp extends Map{constructor(t,r=kM){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,a]of t)this.set(n,a)}get(t){return super.get(xp(this,t))}has(t){return super.has(xp(this,t))}set(t,r){return super.set(CM(this,t),r)}delete(t){return super.delete(MM(this,t))}}function xp({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function CM({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function MM({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function kM(e){return e!==null&&typeof e=="object"?e.valueOf():e}function NM(e=yr){if(e===yr)return wp;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function wp(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const DM=Math.sqrt(50),IM=Math.sqrt(10),LM=Math.sqrt(2);function uo(e,t,r){const n=(t-e)/Math.max(0,r),a=Math.floor(Math.log10(n)),i=n/Math.pow(10,a),o=i>=DM?10:i>=IM?5:i>=LM?2:1;let s,l,u;return a<0?(u=Math.pow(10,-a)/o,s=Math.round(e*u),l=Math.round(t*u),s/u<e&&++s,l/u>t&&--l,u=-u):(u=Math.pow(10,a)*o,s=Math.round(e/u),l=Math.round(t/u),s*u<e&&++s,l*u>t&&--l),l<s&&.5<=r&&r<2?uo(e,t,r*2):[s,l,u]}function Ql(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[a,i,o]=n?uo(t,e,r):uo(e,t,r);if(!(i>=a))return[];const s=i-a+1,l=new Array(s);if(n)if(o<0)for(let u=0;u<s;++u)l[u]=(i-u)/-o;else for(let u=0;u<s;++u)l[u]=(i-u)*o;else if(o<0)for(let u=0;u<s;++u)l[u]=(a+u)/-o;else for(let u=0;u<s;++u)l[u]=(a+u)*o;return l}function eu(e,t,r){return t=+t,e=+e,r=+r,uo(e,t,r)[2]}function tu(e,t,r){t=+t,e=+e,r=+r;const n=t<e,a=n?eu(t,e,r):eu(e,t,r);return(n?-1:1)*(a<0?1/-a:a)}function Op(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function Sp(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function Tp(e,t,r=0,n=1/0,a){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(a=a===void 0?wp:NM(a);n>r;){if(n-r>600){const l=n-r+1,u=t-r+1,c=Math.log(l),f=.5*Math.exp(2*c/3),d=.5*Math.sqrt(c*f*(l-f)/l)*(u-l/2<0?-1:1),h=Math.max(r,Math.floor(t-u*f/l+d)),v=Math.min(n,Math.floor(t+(l-u)*f/l+d));Tp(e,t,h,v,a)}const i=e[t];let o=r,s=n;for(Pa(e,r,t),a(e[n],i)>0&&Pa(e,r,n);o<s;){for(Pa(e,o,s),++o,--s;a(e[o],i)<0;)++o;for(;a(e[s],i)>0;)--s}a(e[r],i)===0?Pa(e,r,s):(++s,Pa(e,s,n)),s<=t&&(r=s+1),t<=s&&(n=s-1)}return e}function Pa(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function RM(e,t,r){if(e=Float64Array.from($M(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return Sp(e);if(t>=1)return Op(e);var n,a=(n-1)*t,i=Math.floor(a),o=Op(Tp(e,i).subarray(0,i+1)),s=Sp(e.subarray(i+1));return o+(s-o)*(a-i)}}function BM(e,t,r=gp){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,a=(n-1)*t,i=Math.floor(a),o=+r(e[i],i,e),s=+r(e[i+1],i+1,e);return o+(s-o)*(a-i)}}function FM(e,t,r){e=+e,t=+t,r=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+r;for(var n=-1,a=Math.max(0,Math.ceil((t-e)/r))|0,i=new Array(a);++n<a;)i[n]=e+n*r;return i}function At(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function rr(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 ru=Symbol("implicit");function nu(){var e=new bp,t=[],r=[],n=ru;function a(i){let o=e.get(i);if(o===void 0){if(n!==ru)return n;e.set(i,o=t.push(i)-1)}return r[o%r.length]}return a.domain=function(i){if(!arguments.length)return t.slice();t=[],e=new bp;for(const o of i)e.has(o)||e.set(o,t.push(o)-1);return a},a.range=function(i){return arguments.length?(r=Array.from(i),a):r.slice()},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return nu(t,r).unknown(n)},At.apply(a,arguments),a}function _a(){var e=nu().unknown(void 0),t=e.domain,r=e.range,n=0,a=1,i,o,s=!1,l=0,u=0,c=.5;delete e.unknown;function f(){var d=t().length,h=a<n,v=h?a:n,m=h?n:a;i=(m-v)/Math.max(1,d-l+u*2),s&&(i=Math.floor(i)),v+=(m-v-i*(d-l))*c,o=i*(1-l),s&&(v=Math.round(v),o=Math.round(o));var p=FM(d).map(function(x){return v+i*x});return r(h?p.reverse():p)}return e.domain=function(d){return arguments.length?(t(d),f()):t()},e.range=function(d){return arguments.length?([n,a]=d,n=+n,a=+a,f()):[n,a]},e.rangeRound=function(d){return[n,a]=d,n=+n,a=+a,s=!0,f()},e.bandwidth=function(){return o},e.step=function(){return i},e.round=function(d){return arguments.length?(s=!!d,f()):s},e.padding=function(d){return arguments.length?(l=Math.min(1,u=+d),f()):l},e.paddingInner=function(d){return arguments.length?(l=Math.min(1,d),f()):l},e.paddingOuter=function(d){return arguments.length?(u=+d,f()):u},e.align=function(d){return arguments.length?(c=Math.max(0,Math.min(1,d)),f()):c},e.copy=function(){return _a(t(),[n,a]).round(s).paddingInner(l).paddingOuter(u).align(c)},At.apply(f(),arguments)}function Ap(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Ap(t())},e}function Ea(){return Ap(_a.apply(null,arguments).paddingInner(1))}function au(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Pp(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function ja(){}var $a=.7,co=1/$a,xn="\\s*([+-]?\\d+)\\s*",Ca="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ut="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",WM=/^#([0-9a-f]{3,8})$/,UM=new RegExp(`^rgb\\(${xn},${xn},${xn}\\)$`),zM=new RegExp(`^rgb\\(${Ut},${Ut},${Ut}\\)$`),KM=new RegExp(`^rgba\\(${xn},${xn},${xn},${Ca}\\)$`),GM=new RegExp(`^rgba\\(${Ut},${Ut},${Ut},${Ca}\\)$`),VM=new RegExp(`^hsl\\(${Ca},${Ut},${Ut}\\)$`),qM=new RegExp(`^hsla\\(${Ca},${Ut},${Ut},${Ca}\\)$`),_p={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};au(ja,Ma,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Ep,formatHex:Ep,formatHex8:HM,formatHsl:YM,formatRgb:jp,toString:jp});function Ep(){return this.rgb().formatHex()}function HM(){return this.rgb().formatHex8()}function YM(){return Np(this).formatHsl()}function jp(){return this.rgb().formatRgb()}function Ma(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=WM.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?$p(t):r===3?new ht(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?fo(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?fo(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=UM.exec(e))?new ht(t[1],t[2],t[3],1):(t=zM.exec(e))?new ht(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=KM.exec(e))?fo(t[1],t[2],t[3],t[4]):(t=GM.exec(e))?fo(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=VM.exec(e))?kp(t[1],t[2]/100,t[3]/100,1):(t=qM.exec(e))?kp(t[1],t[2]/100,t[3]/100,t[4]):_p.hasOwnProperty(e)?$p(_p[e]):e==="transparent"?new ht(NaN,NaN,NaN,0):null}function $p(e){return new ht(e>>16&255,e>>8&255,e&255,1)}function fo(e,t,r,n){return n<=0&&(e=t=r=NaN),new ht(e,t,r,n)}function XM(e){return e instanceof ja||(e=Ma(e)),e?(e=e.rgb(),new ht(e.r,e.g,e.b,e.opacity)):new ht}function iu(e,t,r,n){return arguments.length===1?XM(e):new ht(e,t,r,n??1)}function ht(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}au(ht,iu,Pp(ja,{brighter(e){return e=e==null?co:Math.pow(co,e),new ht(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?$a:Math.pow($a,e),new ht(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ht(Nr(this.r),Nr(this.g),Nr(this.b),ho(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:Cp,formatHex:Cp,formatHex8:ZM,formatRgb:Mp,toString:Mp}));function Cp(){return`#${Dr(this.r)}${Dr(this.g)}${Dr(this.b)}`}function ZM(){return`#${Dr(this.r)}${Dr(this.g)}${Dr(this.b)}${Dr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Mp(){const e=ho(this.opacity);return`${e===1?"rgb(":"rgba("}${Nr(this.r)}, ${Nr(this.g)}, ${Nr(this.b)}${e===1?")":`, ${e})`}`}function ho(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Nr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Dr(e){return e=Nr(e),(e<16?"0":"")+e.toString(16)}function kp(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new kt(e,t,r,n)}function Np(e){if(e instanceof kt)return new kt(e.h,e.s,e.l,e.opacity);if(e instanceof ja||(e=Ma(e)),!e)return new kt;if(e instanceof kt)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,a=Math.min(t,r,n),i=Math.max(t,r,n),o=NaN,s=i-a,l=(i+a)/2;return s?(t===i?o=(r-n)/s+(r<n)*6:r===i?o=(n-t)/s+2:o=(t-r)/s+4,s/=l<.5?i+a:2-i-a,o*=60):s=l>0&&l<1?0:o,new kt(o,s,l,e.opacity)}function JM(e,t,r,n){return arguments.length===1?Np(e):new kt(e,t,r,n??1)}function kt(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}au(kt,JM,Pp(ja,{brighter(e){return e=e==null?co:Math.pow(co,e),new kt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?$a:Math.pow($a,e),new kt(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,r=this.l,n=r+(r<.5?r:1-r)*t,a=2*r-n;return new ht(ou(e>=240?e-240:e+120,a,n),ou(e,a,n),ou(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new kt(Dp(this.h),po(this.s),po(this.l),ho(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=ho(this.opacity);return`${e===1?"hsl(":"hsla("}${Dp(this.h)}, ${po(this.s)*100}%, ${po(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Dp(e){return e=(e||0)%360,e<0?e+360:e}function po(e){return Math.max(0,Math.min(1,e||0))}function ou(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const su=e=>()=>e;function QM(e,t){return function(r){return e+r*t}}function ek(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function tk(e){return(e=+e)==1?Ip:function(t,r){return r-t?ek(t,r,e):su(isNaN(t)?r:t)}}function Ip(e,t){var r=t-e;return r?QM(e,r):su(isNaN(e)?t:e)}const Lp=function e(t){var r=tk(t);function n(a,i){var o=r((a=iu(a)).r,(i=iu(i)).r),s=r(a.g,i.g),l=r(a.b,i.b),u=Ip(a.opacity,i.opacity);return function(c){return a.r=o(c),a.g=s(c),a.b=l(c),a.opacity=u(c),a+""}}return n.gamma=e,n}(1);function rk(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),a;return function(i){for(a=0;a<r;++a)n[a]=e[a]*(1-i)+t[a]*i;return n}}function nk(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function ak(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,a=new Array(n),i=new Array(r),o;for(o=0;o<n;++o)a[o]=wn(e[o],t[o]);for(;o<r;++o)i[o]=t[o];return function(s){for(o=0;o<n;++o)i[o]=a[o](s);return i}}function ik(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function vo(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function ok(e,t){var r={},n={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?r[a]=wn(e[a],t[a]):n[a]=t[a];return function(i){for(a in r)n[a]=r[a](i);return n}}var lu=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,uu=new RegExp(lu.source,"g");function sk(e){return function(){return e}}function lk(e){return function(t){return e(t)+""}}function uk(e,t){var r=lu.lastIndex=uu.lastIndex=0,n,a,i,o=-1,s=[],l=[];for(e=e+"",t=t+"";(n=lu.exec(e))&&(a=uu.exec(t));)(i=a.index)>r&&(i=t.slice(r,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(a=a[0])?s[o]?s[o]+=a:s[++o]=a:(s[++o]=null,l.push({i:o,x:vo(n,a)})),r=uu.lastIndex;return r<t.length&&(i=t.slice(r),s[o]?s[o]+=i:s[++o]=i),s.length<2?l[0]?lk(l[0].x):sk(t):(t=l.length,function(u){for(var c=0,f;c<t;++c)s[(f=l[c]).i]=f.x(u);return s.join("")})}function wn(e,t){var r=typeof t,n;return t==null||r==="boolean"?su(t):(r==="number"?vo:r==="string"?(n=Ma(t))?(t=n,Lp):uk:t instanceof Ma?Lp:t instanceof Date?ik:nk(t)?rk:Array.isArray(t)?ak:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?ok:vo)(e,t)}function cu(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function ck(e,t){t===void 0&&(t=e,e=wn);for(var r=0,n=t.length-1,a=t[0],i=new Array(n<0?0:n);r<n;)i[r]=e(a,a=t[++r]);return function(o){var s=Math.max(0,Math.min(n-1,Math.floor(o*=n)));return i[s](o-s)}}function fk(e){return function(){return e}}function yo(e){return+e}var Rp=[0,1];function st(e){return e}function fu(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:fk(isNaN(t)?NaN:.5)}function dk(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function hk(e,t,r){var n=e[0],a=e[1],i=t[0],o=t[1];return a<n?(n=fu(a,n),i=r(o,i)):(n=fu(n,a),i=r(i,o)),function(s){return i(n(s))}}function pk(e,t,r){var n=Math.min(e.length,t.length)-1,a=new Array(n),i=new Array(n),o=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<n;)a[o]=fu(e[o],e[o+1]),i[o]=r(t[o],t[o+1]);return function(s){var l=Aa(e,s,1,n)-1;return i[l](a[l](s))}}function ka(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function mo(){var e=Rp,t=Rp,r=wn,n,a,i,o=st,s,l,u;function c(){var d=Math.min(e.length,t.length);return o!==st&&(o=dk(e[0],e[d-1])),s=d>2?pk:hk,l=u=null,f}function f(d){return d==null||isNaN(d=+d)?i:(l||(l=s(e.map(n),t,r)))(n(o(d)))}return f.invert=function(d){return o(a((u||(u=s(t,e.map(n),vo)))(d)))},f.domain=function(d){return arguments.length?(e=Array.from(d,yo),c()):e.slice()},f.range=function(d){return arguments.length?(t=Array.from(d),c()):t.slice()},f.rangeRound=function(d){return t=Array.from(d),r=cu,c()},f.clamp=function(d){return arguments.length?(o=d?!0:st,c()):o!==st},f.interpolate=function(d){return arguments.length?(r=d,c()):r},f.unknown=function(d){return arguments.length?(i=d,f):i},function(d,h){return n=d,a=h,c()}}function du(){return mo()(st,st)}function vk(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function go(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function On(e){return e=go(Math.abs(e)),e?e[1]:NaN}function yk(e,t){return function(r,n){for(var a=r.length,i=[],o=0,s=e[0],l=0;a>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),i.push(r.substring(a-=s,a+s)),!((l+=s+1)>n));)s=e[o=(o+1)%e.length];return i.reverse().join(t)}}function mk(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var gk=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Na(e){if(!(t=gk.exec(e)))throw new Error("invalid format: "+e);var t;return new hu({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]})}Na.prototype=hu.prototype;function hu(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+""}hu.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 bk(e){e:for(var t=e.length,r=1,n=-1,a;r<t;++r)switch(e[r]){case".":n=a=r;break;case"0":n===0&&(n=r),a=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(a+1):e}var Bp;function xk(e,t){var r=go(e,t);if(!r)return e+"";var n=r[0],a=r[1],i=a-(Bp=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,o=n.length;return i===o?n:i>o?n+new Array(i-o+1).join("0"):i>0?n.slice(0,i)+"."+n.slice(i):"0."+new Array(1-i).join("0")+go(e,Math.max(0,t+i-1))[0]}function Fp(e,t){var r=go(e,t);if(!r)return e+"";var n=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+n:n.length>a+1?n.slice(0,a+1)+"."+n.slice(a+1):n+new Array(a-n.length+2).join("0")}const Wp={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:vk,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)=>Fp(e*100,t),r:Fp,s:xk,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Up(e){return e}var zp=Array.prototype.map,Kp=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function wk(e){var t=e.grouping===void 0||e.thousands===void 0?Up:yk(zp.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?Up:mk(zp.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(f){f=Na(f);var d=f.fill,h=f.align,v=f.sign,m=f.symbol,p=f.zero,x=f.width,O=f.comma,w=f.precision,A=f.trim,y=f.type;y==="n"?(O=!0,y="g"):Wp[y]||(w===void 0&&(w=12),A=!0,y="g"),(p||d==="0"&&h==="=")&&(p=!0,d="0",h="=");var b=m==="$"?r:m==="#"&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",S=m==="$"?n:/[%p]/.test(y)?o:"",P=Wp[y],$=/[defgprs%]/.test(y);w=w===void 0?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function M(_){var j=b,R=S,k,D,C;if(y==="c")R=P(_)+R,_="";else{_=+_;var B=_<0||1/_<0;if(_=isNaN(_)?l:P(Math.abs(_),w),A&&(_=bk(_)),B&&+_==0&&v!=="+"&&(B=!1),j=(B?v==="("?v:s:v==="-"||v==="("?"":v)+j,R=(y==="s"?Kp[8+Bp/3]:"")+R+(B&&v==="("?")":""),$){for(k=-1,D=_.length;++k<D;)if(C=_.charCodeAt(k),48>C||C>57){R=(C===46?a+_.slice(k+1):_.slice(k))+R,_=_.slice(0,k);break}}}O&&!p&&(_=t(_,1/0));var U=j.length+_.length+R.length,K=U<x?new Array(x-U+1).join(d):"";switch(O&&p&&(_=t(K+_,K.length?x-R.length:1/0),K=""),h){case"<":_=j+_+R+K;break;case"=":_=j+K+_+R;break;case"^":_=K.slice(0,U=K.length>>1)+j+_+R+K.slice(U);break;default:_=K+j+_+R;break}return i(_)}return M.toString=function(){return f+""},M}function c(f,d){var h=u((f=Na(f),f.type="f",f)),v=Math.max(-8,Math.min(8,Math.floor(On(d)/3)))*3,m=Math.pow(10,-v),p=Kp[8+v/3];return function(x){return h(m*x)+p}}return{format:u,formatPrefix:c}}var bo,pu,Gp;Ok({thousands:",",grouping:[3],currency:["$",""]});function Ok(e){return bo=wk(e),pu=bo.format,Gp=bo.formatPrefix,bo}function Sk(e){return Math.max(0,-On(Math.abs(e)))}function Tk(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(On(t)/3)))*3-On(Math.abs(e)))}function Ak(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,On(t)-On(e))+1}function Vp(e,t,r,n){var a=tu(e,t,r),i;switch(n=Na(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(i=Tk(a,o))&&(n.precision=i),Gp(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(i=Ak(a,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=i-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(i=Sk(a))&&(n.precision=i-(n.type==="%")*2);break}}return pu(n)}function mr(e){var t=e.domain;return e.ticks=function(r){var n=t();return Ql(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var a=t();return Vp(a[0],a[a.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),a=0,i=n.length-1,o=n[a],s=n[i],l,u,c=10;for(s<o&&(u=o,o=s,s=u,u=a,a=i,i=u);c-- >0;){if(u=eu(o,s,r),u===l)return n[a]=o,n[i]=s,t(n);if(u>0)o=Math.floor(o/u)*u,s=Math.ceil(s/u)*u;else if(u<0)o=Math.ceil(o*u)/u,s=Math.floor(s*u)/u;else break;l=u}return e},e}function xo(){var e=du();return e.copy=function(){return ka(e,xo())},At.apply(e,arguments),mr(e)}function qp(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,yo),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return qp(e).unknown(t)},e=arguments.length?Array.from(e,yo):[0,1],mr(r)}function Hp(e,t){e=e.slice();var r=0,n=e.length-1,a=e[r],i=e[n],o;return i<a&&(o=r,r=n,n=o,o=a,a=i,i=o),e[r]=t.floor(a),e[n]=t.ceil(i),e}function Yp(e){return Math.log(e)}function Xp(e){return Math.exp(e)}function Pk(e){return-Math.log(-e)}function _k(e){return-Math.exp(-e)}function Ek(e){return isFinite(e)?+("1e"+e):e<0?0:e}function jk(e){return e===10?Ek:e===Math.E?Math.exp:t=>Math.pow(e,t)}function $k(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 Zp(e){return(t,r)=>-e(-t,r)}function vu(e){const t=e(Yp,Xp),r=t.domain;let n=10,a,i;function o(){return a=$k(n),i=jk(n),r()[0]<0?(a=Zp(a),i=Zp(i),e(Pk,_k)):e(Yp,Xp),t}return t.base=function(s){return arguments.length?(n=+s,o()):n},t.domain=function(s){return arguments.length?(r(s),o()):r()},t.ticks=s=>{const l=r();let u=l[0],c=l[l.length-1];const f=c<u;f&&([u,c]=[c,u]);let d=a(u),h=a(c),v,m;const p=s==null?10:+s;let x=[];if(!(n%1)&&h-d<p){if(d=Math.floor(d),h=Math.ceil(h),u>0){for(;d<=h;++d)for(v=1;v<n;++v)if(m=d<0?v/i(-d):v*i(d),!(m<u)){if(m>c)break;x.push(m)}}else for(;d<=h;++d)for(v=n-1;v>=1;--v)if(m=d>0?v/i(-d):v*i(d),!(m<u)){if(m>c)break;x.push(m)}x.length*2<p&&(x=Ql(u,c,p))}else x=Ql(d,h,Math.min(h-d,p)).map(i);return f?x.reverse():x},t.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=n===10?"s":","),typeof l!="function"&&(!(n%1)&&(l=Na(l)).precision==null&&(l.trim=!0),l=pu(l)),s===1/0)return l;const u=Math.max(1,n*s/t.ticks().length);return c=>{let f=c/i(Math.round(a(c)));return f*n<n-.5&&(f*=n),f<=u?l(c):""}},t.nice=()=>r(Hp(r(),{floor:s=>i(Math.floor(a(s))),ceil:s=>i(Math.ceil(a(s)))})),t}function Jp(){const e=vu(mo()).domain([1,10]);return e.copy=()=>ka(e,Jp()).base(e.base()),At.apply(e,arguments),e}function Qp(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function ev(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function yu(e){var t=1,r=e(Qp(t),ev(t));return r.constant=function(n){return arguments.length?e(Qp(t=+n),ev(t)):t},mr(r)}function tv(){var e=yu(mo());return e.copy=function(){return ka(e,tv()).constant(e.constant())},At.apply(e,arguments)}function rv(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Ck(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Mk(e){return e<0?-e*e:e*e}function mu(e){var t=e(st,st),r=1;function n(){return r===1?e(st,st):r===.5?e(Ck,Mk):e(rv(r),rv(1/r))}return t.exponent=function(a){return arguments.length?(r=+a,n()):r},mr(t)}function gu(){var e=mu(mo());return e.copy=function(){return ka(e,gu()).exponent(e.exponent())},At.apply(e,arguments),e}function kk(){return gu.apply(null,arguments).exponent(.5)}function nv(e){return Math.sign(e)*e*e}function Nk(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function av(){var e=du(),t=[0,1],r=!1,n;function a(i){var o=Nk(e(i));return isNaN(o)?n:r?Math.round(o):o}return a.invert=function(i){return e.invert(nv(i))},a.domain=function(i){return arguments.length?(e.domain(i),a):e.domain()},a.range=function(i){return arguments.length?(e.range((t=Array.from(i,yo)).map(nv)),a):t.slice()},a.rangeRound=function(i){return a.range(i).round(!0)},a.round=function(i){return arguments.length?(r=!!i,a):r},a.clamp=function(i){return arguments.length?(e.clamp(i),a):e.clamp()},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return av(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},At.apply(a,arguments),mr(a)}function iv(){var e=[],t=[],r=[],n;function a(){var o=0,s=Math.max(1,t.length);for(r=new Array(s-1);++o<s;)r[o-1]=BM(e,o/s);return i}function i(o){return o==null||isNaN(o=+o)?n:t[Aa(r,o)]}return i.invertExtent=function(o){var s=t.indexOf(o);return s<0?[NaN,NaN]:[s>0?r[s-1]:e[0],s<r.length?r[s]:e[e.length-1]]},i.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let s of o)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(yr),a()},i.range=function(o){return arguments.length?(t=Array.from(o),a()):t.slice()},i.unknown=function(o){return arguments.length?(n=o,i):n},i.quantiles=function(){return r.slice()},i.copy=function(){return iv().domain(e).range(t).unknown(n)},At.apply(i,arguments)}function ov(){var e=0,t=1,r=1,n=[.5],a=[0,1],i;function o(l){return l!=null&&l<=l?a[Aa(n,l,0,r)]:i}function s(){var l=-1;for(n=new Array(r);++l<r;)n[l]=((l+1)*t-(l-r)*e)/(r+1);return o}return o.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,s()):[e,t]},o.range=function(l){return arguments.length?(r=(a=Array.from(l)).length-1,s()):a.slice()},o.invertExtent=function(l){var u=a.indexOf(l);return u<0?[NaN,NaN]:u<1?[e,n[0]]:u>=r?[n[r-1],t]:[n[u-1],n[u]]},o.unknown=function(l){return arguments.length&&(i=l),o},o.thresholds=function(){return n.slice()},o.copy=function(){return ov().domain([e,t]).range(a).unknown(i)},At.apply(mr(o),arguments)}function sv(){var e=[.5],t=[0,1],r,n=1;function a(i){return i!=null&&i<=i?t[Aa(e,i,0,n)]:r}return a.domain=function(i){return arguments.length?(e=Array.from(i),n=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(i){return arguments.length?(t=Array.from(i),n=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(i){var o=t.indexOf(i);return[e[o-1],e[o]]},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return sv().domain(e).range(t).unknown(r)},At.apply(a,arguments)}const bu=new Date,xu=new Date;function Xe(e,t,r,n){function a(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return a.floor=i=>(e(i=new Date(+i)),i),a.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),a.round=i=>{const o=a(i),s=a.ceil(i);return i-o<s-i?o:s},a.offset=(i,o)=>(t(i=new Date(+i),o==null?1:Math.floor(o)),i),a.range=(i,o,s)=>{const l=[];if(i=a.ceil(i),s=s==null?1:Math.floor(s),!(i<o)||!(s>0))return l;let u;do l.push(u=new Date(+i)),t(i,s),e(i);while(u<i&&i<o);return l},a.filter=i=>Xe(o=>{if(o>=o)for(;e(o),!i(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!i(o););else for(;--s>=0;)for(;t(o,1),!i(o););}),r&&(a.count=(i,o)=>(bu.setTime(+i),xu.setTime(+o),e(bu),e(xu),Math.floor(r(bu,xu))),a.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(n?o=>n(o)%i===0:o=>a.count(0,o)%i===0):a)),a}const wo=Xe(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);wo.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Xe(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):wo),wo.range;const nr=1e3,Pt=nr*60,ar=Pt*60,ir=ar*24,wu=ir*7,lv=ir*30,Ou=ir*365,Ir=Xe(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*nr)},(e,t)=>(t-e)/nr,e=>e.getUTCSeconds());Ir.range;const Su=Xe(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*nr)},(e,t)=>{e.setTime(+e+t*Pt)},(e,t)=>(t-e)/Pt,e=>e.getMinutes());Su.range;const Tu=Xe(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Pt)},(e,t)=>(t-e)/Pt,e=>e.getUTCMinutes());Tu.range;const Au=Xe(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*nr-e.getMinutes()*Pt)},(e,t)=>{e.setTime(+e+t*ar)},(e,t)=>(t-e)/ar,e=>e.getHours());Au.range;const Pu=Xe(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ar)},(e,t)=>(t-e)/ar,e=>e.getUTCHours());Pu.range;const Da=Xe(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Pt)/ir,e=>e.getDate()-1);Da.range;const Oo=Xe(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ir,e=>e.getUTCDate()-1);Oo.range;const uv=Xe(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ir,e=>Math.floor(e/ir));uv.range;function Lr(e){return Xe(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*Pt)/wu)}const So=Lr(0),To=Lr(1),Dk=Lr(2),Ik=Lr(3),Sn=Lr(4),Lk=Lr(5),Rk=Lr(6);So.range,To.range,Dk.range,Ik.range,Sn.range,Lk.range,Rk.range;function Rr(e){return Xe(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/wu)}const Ao=Rr(0),Po=Rr(1),Bk=Rr(2),Fk=Rr(3),Tn=Rr(4),Wk=Rr(5),Uk=Rr(6);Ao.range,Po.range,Bk.range,Fk.range,Tn.range,Wk.range,Uk.range;const _u=Xe(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());_u.range;const Eu=Xe(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());Eu.range;const or=Xe(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());or.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Xe(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)}),or.range;const sr=Xe(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());sr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Xe(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)}),sr.range;function cv(e,t,r,n,a,i){const o=[[Ir,1,nr],[Ir,5,5*nr],[Ir,15,15*nr],[Ir,30,30*nr],[i,1,Pt],[i,5,5*Pt],[i,15,15*Pt],[i,30,30*Pt],[a,1,ar],[a,3,3*ar],[a,6,6*ar],[a,12,12*ar],[n,1,ir],[n,2,2*ir],[r,1,wu],[t,1,lv],[t,3,3*lv],[e,1,Ou]];function s(u,c,f){const d=c<u;d&&([u,c]=[c,u]);const h=f&&typeof f.range=="function"?f:l(u,c,f),v=h?h.range(u,+c+1):[];return d?v.reverse():v}function l(u,c,f){const d=Math.abs(c-u)/f,h=Jl(([,,p])=>p).right(o,d);if(h===o.length)return e.every(tu(u/Ou,c/Ou,f));if(h===0)return wo.every(Math.max(tu(u,c,f),1));const[v,m]=o[d/o[h-1][2]<o[h][2]/d?h-1:h];return v.every(m)}return[s,l]}const[zk,Kk]=cv(sr,Eu,Ao,uv,Pu,Tu),[Gk,Vk]=cv(or,_u,So,Da,Au,Su);function ju(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 $u(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 Ia(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function qk(e){var t=e.dateTime,r=e.date,n=e.time,a=e.periods,i=e.days,o=e.shortDays,s=e.months,l=e.shortMonths,u=La(a),c=Ra(a),f=La(i),d=Ra(i),h=La(o),v=Ra(o),m=La(s),p=Ra(s),x=La(l),O=Ra(l),w={a:B,A:U,b:K,B:E,c:null,d:yv,e:yv,f:yN,g:PN,G:EN,H:hN,I:pN,j:vN,L:mv,m:mN,M:gN,p:L,q:F,Q:Sv,s:Tv,S:bN,u:xN,U:wN,V:ON,w:SN,W:TN,x:null,X:null,y:AN,Y:_N,Z:jN,"%":Ov},A={a:W,A:G,b:X,B:Q,c:null,d:bv,e:bv,f:kN,g:zN,G:GN,H:$N,I:CN,j:MN,L:xv,m:NN,M:DN,p:ae,q:te,Q:Sv,s:Tv,S:IN,u:LN,U:RN,V:BN,w:FN,W:WN,x:null,X:null,y:UN,Y:KN,Z:VN,"%":Ov},y={a:M,A:_,b:j,B:R,c:k,d:pv,e:pv,f:uN,g:hv,G:dv,H:vv,I:vv,j:iN,L:lN,m:aN,M:oN,p:$,q:nN,Q:fN,s:dN,S:sN,u:Jk,U:Qk,V:eN,w:Zk,W:tN,x:D,X:C,y:hv,Y:dv,Z:rN,"%":cN};w.x=b(r,w),w.X=b(n,w),w.c=b(t,w),A.x=b(r,A),A.X=b(n,A),A.c=b(t,A);function b(V,Y){return function(J){var I=[],ie=-1,q=0,se=V.length,ee,ve,We;for(J instanceof Date||(J=new Date(+J));++ie<se;)V.charCodeAt(ie)===37&&(I.push(V.slice(q,ie)),(ve=fv[ee=V.charAt(++ie)])!=null?ee=V.charAt(++ie):ve=ee==="e"?" ":"0",(We=Y[ee])&&(ee=We(J,ve)),I.push(ee),q=ie+1);return I.push(V.slice(q,ie)),I.join("")}}function S(V,Y){return function(J){var I=Ia(1900,void 0,1),ie=P(I,V,J+="",0),q,se;if(ie!=J.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(Y&&!("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?(q=$u(Ia(I.y,0,1)),se=q.getUTCDay(),q=se>4||se===0?Po.ceil(q):Po(q),q=Oo.offset(q,(I.V-1)*7),I.y=q.getUTCFullYear(),I.m=q.getUTCMonth(),I.d=q.getUTCDate()+(I.w+6)%7):(q=ju(Ia(I.y,0,1)),se=q.getDay(),q=se>4||se===0?To.ceil(q):To(q),q=Da.offset(q,(I.V-1)*7),I.y=q.getFullYear(),I.m=q.getMonth(),I.d=q.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),se="Z"in I?$u(Ia(I.y,0,1)).getUTCDay():ju(Ia(I.y,0,1)).getDay(),I.m=0,I.d="W"in I?(I.w+6)%7+I.W*7-(se+5)%7:I.w+I.U*7-(se+6)%7);return"Z"in I?(I.H+=I.Z/100|0,I.M+=I.Z%100,$u(I)):ju(I)}}function P(V,Y,J,I){for(var ie=0,q=Y.length,se=J.length,ee,ve;ie<q;){if(I>=se)return-1;if(ee=Y.charCodeAt(ie++),ee===37){if(ee=Y.charAt(ie++),ve=y[ee in fv?Y.charAt(ie++):ee],!ve||(I=ve(V,J,I))<0)return-1}else if(ee!=J.charCodeAt(I++))return-1}return I}function $(V,Y,J){var I=u.exec(Y.slice(J));return I?(V.p=c.get(I[0].toLowerCase()),J+I[0].length):-1}function M(V,Y,J){var I=h.exec(Y.slice(J));return I?(V.w=v.get(I[0].toLowerCase()),J+I[0].length):-1}function _(V,Y,J){var I=f.exec(Y.slice(J));return I?(V.w=d.get(I[0].toLowerCase()),J+I[0].length):-1}function j(V,Y,J){var I=x.exec(Y.slice(J));return I?(V.m=O.get(I[0].toLowerCase()),J+I[0].length):-1}function R(V,Y,J){var I=m.exec(Y.slice(J));return I?(V.m=p.get(I[0].toLowerCase()),J+I[0].length):-1}function k(V,Y,J){return P(V,t,Y,J)}function D(V,Y,J){return P(V,r,Y,J)}function C(V,Y,J){return P(V,n,Y,J)}function B(V){return o[V.getDay()]}function U(V){return i[V.getDay()]}function K(V){return l[V.getMonth()]}function E(V){return s[V.getMonth()]}function L(V){return a[+(V.getHours()>=12)]}function F(V){return 1+~~(V.getMonth()/3)}function W(V){return o[V.getUTCDay()]}function G(V){return i[V.getUTCDay()]}function X(V){return l[V.getUTCMonth()]}function Q(V){return s[V.getUTCMonth()]}function ae(V){return a[+(V.getUTCHours()>=12)]}function te(V){return 1+~~(V.getUTCMonth()/3)}return{format:function(V){var Y=b(V+="",w);return Y.toString=function(){return V},Y},parse:function(V){var Y=S(V+="",!1);return Y.toString=function(){return V},Y},utcFormat:function(V){var Y=b(V+="",A);return Y.toString=function(){return V},Y},utcParse:function(V){var Y=S(V+="",!0);return Y.toString=function(){return V},Y}}}var fv={"-":"",_:" ",0:"0"},et=/^\s*\d+/,Hk=/^%/,Yk=/[\\^$*+?|[\]().{}]/g;function be(e,t,r){var n=e<0?"-":"",a=(n?-e:e)+"",i=a.length;return n+(i<r?new Array(r-i+1).join(t)+a:a)}function Xk(e){return e.replace(Yk,"\\$&")}function La(e){return new RegExp("^(?:"+e.map(Xk).join("|")+")","i")}function Ra(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function Zk(e,t,r){var n=et.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function Jk(e,t,r){var n=et.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function Qk(e,t,r){var n=et.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function eN(e,t,r){var n=et.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function tN(e,t,r){var n=et.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function dv(e,t,r){var n=et.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function hv(e,t,r){var n=et.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function rN(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function nN(e,t,r){var n=et.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function aN(e,t,r){var n=et.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function pv(e,t,r){var n=et.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function iN(e,t,r){var n=et.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function vv(e,t,r){var n=et.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function oN(e,t,r){var n=et.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function sN(e,t,r){var n=et.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function lN(e,t,r){var n=et.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function uN(e,t,r){var n=et.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function cN(e,t,r){var n=Hk.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function fN(e,t,r){var n=et.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function dN(e,t,r){var n=et.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function yv(e,t){return be(e.getDate(),t,2)}function hN(e,t){return be(e.getHours(),t,2)}function pN(e,t){return be(e.getHours()%12||12,t,2)}function vN(e,t){return be(1+Da.count(or(e),e),t,3)}function mv(e,t){return be(e.getMilliseconds(),t,3)}function yN(e,t){return mv(e,t)+"000"}function mN(e,t){return be(e.getMonth()+1,t,2)}function gN(e,t){return be(e.getMinutes(),t,2)}function bN(e,t){return be(e.getSeconds(),t,2)}function xN(e){var t=e.getDay();return t===0?7:t}function wN(e,t){return be(So.count(or(e)-1,e),t,2)}function gv(e){var t=e.getDay();return t>=4||t===0?Sn(e):Sn.ceil(e)}function ON(e,t){return e=gv(e),be(Sn.count(or(e),e)+(or(e).getDay()===4),t,2)}function SN(e){return e.getDay()}function TN(e,t){return be(To.count(or(e)-1,e),t,2)}function AN(e,t){return be(e.getFullYear()%100,t,2)}function PN(e,t){return e=gv(e),be(e.getFullYear()%100,t,2)}function _N(e,t){return be(e.getFullYear()%1e4,t,4)}function EN(e,t){var r=e.getDay();return e=r>=4||r===0?Sn(e):Sn.ceil(e),be(e.getFullYear()%1e4,t,4)}function jN(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+be(t/60|0,"0",2)+be(t%60,"0",2)}function bv(e,t){return be(e.getUTCDate(),t,2)}function $N(e,t){return be(e.getUTCHours(),t,2)}function CN(e,t){return be(e.getUTCHours()%12||12,t,2)}function MN(e,t){return be(1+Oo.count(sr(e),e),t,3)}function xv(e,t){return be(e.getUTCMilliseconds(),t,3)}function kN(e,t){return xv(e,t)+"000"}function NN(e,t){return be(e.getUTCMonth()+1,t,2)}function DN(e,t){return be(e.getUTCMinutes(),t,2)}function IN(e,t){return be(e.getUTCSeconds(),t,2)}function LN(e){var t=e.getUTCDay();return t===0?7:t}function RN(e,t){return be(Ao.count(sr(e)-1,e),t,2)}function wv(e){var t=e.getUTCDay();return t>=4||t===0?Tn(e):Tn.ceil(e)}function BN(e,t){return e=wv(e),be(Tn.count(sr(e),e)+(sr(e).getUTCDay()===4),t,2)}function FN(e){return e.getUTCDay()}function WN(e,t){return be(Po.count(sr(e)-1,e),t,2)}function UN(e,t){return be(e.getUTCFullYear()%100,t,2)}function zN(e,t){return e=wv(e),be(e.getUTCFullYear()%100,t,2)}function KN(e,t){return be(e.getUTCFullYear()%1e4,t,4)}function GN(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Tn(e):Tn.ceil(e),be(e.getUTCFullYear()%1e4,t,4)}function VN(){return"+0000"}function Ov(){return"%"}function Sv(e){return+e}function Tv(e){return Math.floor(+e/1e3)}var An,Av,Pv;qN({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 qN(e){return An=qk(e),Av=An.format,An.parse,Pv=An.utcFormat,An.utcParse,An}function HN(e){return new Date(e)}function YN(e){return e instanceof Date?+e:+new Date(+e)}function Cu(e,t,r,n,a,i,o,s,l,u){var c=du(),f=c.invert,d=c.domain,h=u(".%L"),v=u(":%S"),m=u("%I:%M"),p=u("%I %p"),x=u("%a %d"),O=u("%b %d"),w=u("%B"),A=u("%Y");function y(b){return(l(b)<b?h:s(b)<b?v:o(b)<b?m:i(b)<b?p:n(b)<b?a(b)<b?x:O:r(b)<b?w:A)(b)}return c.invert=function(b){return new Date(f(b))},c.domain=function(b){return arguments.length?d(Array.from(b,YN)):d().map(HN)},c.ticks=function(b){var S=d();return e(S[0],S[S.length-1],b??10)},c.tickFormat=function(b,S){return S==null?y:u(S)},c.nice=function(b){var S=d();return(!b||typeof b.range!="function")&&(b=t(S[0],S[S.length-1],b??10)),b?d(Hp(S,b)):c},c.copy=function(){return ka(c,Cu(e,t,r,n,a,i,o,s,l,u))},c}function XN(){return At.apply(Cu(Gk,Vk,or,_u,So,Da,Au,Su,Ir,Av).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function ZN(){return At.apply(Cu(zk,Kk,sr,Eu,Ao,Oo,Pu,Tu,Ir,Pv).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function _o(){var e=0,t=1,r,n,a,i,o=st,s=!1,l;function u(f){return f==null||isNaN(f=+f)?l:o(a===0?.5:(f=(i(f)-r)*a,s?Math.max(0,Math.min(1,f)):f))}u.domain=function(f){return arguments.length?([e,t]=f,r=i(e=+e),n=i(t=+t),a=r===n?0:1/(n-r),u):[e,t]},u.clamp=function(f){return arguments.length?(s=!!f,u):s},u.interpolator=function(f){return arguments.length?(o=f,u):o};function c(f){return function(d){var h,v;return arguments.length?([h,v]=d,o=f(h,v),u):[o(0),o(1)]}}return u.range=c(wn),u.rangeRound=c(cu),u.unknown=function(f){return arguments.length?(l=f,u):l},function(f){return i=f,r=f(e),n=f(t),a=r===n?0:1/(n-r),u}}function gr(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function _v(){var e=mr(_o()(st));return e.copy=function(){return gr(e,_v())},rr.apply(e,arguments)}function Ev(){var e=vu(_o()).domain([1,10]);return e.copy=function(){return gr(e,Ev()).base(e.base())},rr.apply(e,arguments)}function jv(){var e=yu(_o());return e.copy=function(){return gr(e,jv()).constant(e.constant())},rr.apply(e,arguments)}function Mu(){var e=mu(_o());return e.copy=function(){return gr(e,Mu()).exponent(e.exponent())},rr.apply(e,arguments)}function JN(){return Mu.apply(null,arguments).exponent(.5)}function $v(){var e=[],t=st;function r(n){if(n!=null&&!isNaN(n=+n))return t((Aa(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let a of n)a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(yr),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,a)=>t(a/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(a,i)=>RM(e,i/n))},r.copy=function(){return $v(t).domain(e)},rr.apply(r,arguments)}function Eo(){var e=0,t=.5,r=1,n=1,a,i,o,s,l,u=st,c,f=!1,d;function h(m){return isNaN(m=+m)?d:(m=.5+((m=+c(m))-i)*(n*m<n*i?s:l),u(f?Math.max(0,Math.min(1,m)):m))}h.domain=function(m){return arguments.length?([e,t,r]=m,a=c(e=+e),i=c(t=+t),o=c(r=+r),s=a===i?0:.5/(i-a),l=i===o?0:.5/(o-i),n=i<a?-1:1,h):[e,t,r]},h.clamp=function(m){return arguments.length?(f=!!m,h):f},h.interpolator=function(m){return arguments.length?(u=m,h):u};function v(m){return function(p){var x,O,w;return arguments.length?([x,O,w]=p,u=ck(m,[x,O,w]),h):[u(0),u(.5),u(1)]}}return h.range=v(wn),h.rangeRound=v(cu),h.unknown=function(m){return arguments.length?(d=m,h):d},function(m){return c=m,a=m(e),i=m(t),o=m(r),s=a===i?0:.5/(i-a),l=i===o?0:.5/(o-i),n=i<a?-1:1,h}}function Cv(){var e=mr(Eo()(st));return e.copy=function(){return gr(e,Cv())},rr.apply(e,arguments)}function Mv(){var e=vu(Eo()).domain([.1,1,10]);return e.copy=function(){return gr(e,Mv()).base(e.base())},rr.apply(e,arguments)}function kv(){var e=yu(Eo());return e.copy=function(){return gr(e,kv()).constant(e.constant())},rr.apply(e,arguments)}function ku(){var e=mu(Eo());return e.copy=function(){return gr(e,ku()).exponent(e.exponent())},rr.apply(e,arguments)}function QN(){return ku.apply(null,arguments).exponent(.5)}const Nv=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:_a,scaleDiverging:Cv,scaleDivergingLog:Mv,scaleDivergingPow:ku,scaleDivergingSqrt:QN,scaleDivergingSymlog:kv,scaleIdentity:qp,scaleImplicit:ru,scaleLinear:xo,scaleLog:Jp,scaleOrdinal:nu,scalePoint:Ea,scalePow:gu,scaleQuantile:iv,scaleQuantize:ov,scaleRadial:av,scaleSequential:_v,scaleSequentialLog:Ev,scaleSequentialPow:Mu,scaleSequentialQuantile:$v,scaleSequentialSqrt:JN,scaleSequentialSymlog:jv,scaleSqrt:kk,scaleSymlog:tv,scaleThreshold:sv,scaleTime:XN,scaleUtc:ZN,tickFormat:Vp},Symbol.toStringTag,{value:"Module"}));var eD=tn;function tD(e,t,r){for(var n=-1,a=e.length;++n<a;){var i=e[n],o=t(i);if(o!=null&&(s===void 0?o===o&&!eD(o):r(o,s)))var s=o,l=i}return l}var Dv=tD;function rD(e,t){return e>t}var nD=rD,aD=Dv,iD=nD,oD=hn;function sD(e){return e&&e.length?aD(e,oD,iD):void 0}var lD=sD;const br=Ce(lD);function uD(e,t){return e<t}var cD=uD,fD=Dv,dD=cD,hD=hn;function pD(e){return e&&e.length?fD(e,hD,dD):void 0}var vD=pD;const jo=Ce(vD);var yD=Xs,mD=pr,gD=Ch,bD=ft;function xD(e,t){var r=bD(e)?yD:gD;return r(e,mD(t))}var wD=xD,OD=jh,SD=wD;function TD(e,t){return OD(SD(e,t),1)}var AD=TD;const PD=Ce(AD);var _D=Dl;function ED(e,t){return _D(e,t)}var jD=ED;const Br=Ce(jD);var Pn=1e9,$D={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Iu,Le=!0,_t="[DecimalError] ",Fr=_t+"Invalid argument: ",Nu=_t+"Exponent out of range: ",_n=Math.floor,Wr=Math.pow,CD=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,mt,tt=1e7,Ie=7,Iv=9007199254740991,$o=_n(Iv/Ie),ne={};ne.absoluteValue=ne.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e},ne.comparedTo=ne.cmp=function(e){var t,r,n,a,i=this;if(e=new i.constructor(e),i.s!==e.s)return i.s||-e.s;if(i.e!==e.e)return i.e>e.e^i.s<0?1:-1;for(n=i.d.length,a=e.d.length,t=0,r=n<a?n:a;t<r;++t)if(i.d[t]!==e.d[t])return i.d[t]>e.d[t]^i.s<0?1:-1;return n===a?0:n>a^i.s<0?1:-1},ne.decimalPlaces=ne.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*Ie;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r},ne.dividedBy=ne.div=function(e){return lr(this,new this.constructor(e))},ne.dividedToIntegerBy=ne.idiv=function(e){var t=this,r=t.constructor;return je(lr(t,new r(e),0,1),r.precision)},ne.equals=ne.eq=function(e){return!this.cmp(e)},ne.exponent=function(){return Ve(this)},ne.greaterThan=ne.gt=function(e){return this.cmp(e)>0},ne.greaterThanOrEqualTo=ne.gte=function(e){return this.cmp(e)>=0},ne.isInteger=ne.isint=function(){return this.e>this.d.length-2},ne.isNegative=ne.isneg=function(){return this.s<0},ne.isPositive=ne.ispos=function(){return this.s>0},ne.isZero=function(){return this.s===0},ne.lessThan=ne.lt=function(e){return this.cmp(e)<0},ne.lessThanOrEqualTo=ne.lte=function(e){return this.cmp(e)<1},ne.logarithm=ne.log=function(e){var t,r=this,n=r.constructor,a=n.precision,i=a+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(mt))throw Error(_t+"NaN");if(r.s<1)throw Error(_t+(r.s?"NaN":"-Infinity"));return r.eq(mt)?new n(0):(Le=!1,t=lr(Ba(r,i),Ba(e,i),i),Le=!0,je(t,a))},ne.minus=ne.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Fv(t,e):Lv(t,(e.s=-e.s,e))},ne.modulo=ne.mod=function(e){var t,r=this,n=r.constructor,a=n.precision;if(e=new n(e),!e.s)throw Error(_t+"NaN");return r.s?(Le=!1,t=lr(r,e,0,1).times(e),Le=!0,r.minus(t)):je(new n(r),a)},ne.naturalExponential=ne.exp=function(){return Rv(this)},ne.naturalLogarithm=ne.ln=function(){return Ba(this)},ne.negated=ne.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},ne.plus=ne.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Lv(t,e):Fv(t,(e.s=-e.s,e))},ne.precision=ne.sd=function(e){var t,r,n,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Fr+e);if(t=Ve(a)+1,n=a.d.length-1,r=n*Ie+1,n=a.d[n],n){for(;n%10==0;n/=10)r--;for(n=a.d[0];n>=10;n/=10)r++}return e&&t>r?t:r},ne.squareRoot=ne.sqrt=function(){var e,t,r,n,a,i,o,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(_t+"NaN")}for(e=Ve(s),Le=!1,a=Math.sqrt(+s),a==0||a==1/0?(t=Kt(s.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=_n((e+1)/2)-(e<0||e%2),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new l(t)):n=new l(a.toString()),r=l.precision,a=o=r+3;;)if(i=n,n=i.plus(lr(s,i,o+2)).times(.5),Kt(i.d).slice(0,o)===(t=Kt(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),a==o&&t=="4999"){if(je(i,r+1,0),i.times(i).eq(s)){n=i;break}}else if(t!="9999")break;o+=4}return Le=!0,je(n,r)},ne.times=ne.mul=function(e){var t,r,n,a,i,o,s,l,u,c=this,f=c.constructor,d=c.d,h=(e=new f(e)).d;if(!c.s||!e.s)return new f(0);for(e.s*=c.s,r=c.e+e.e,l=d.length,u=h.length,l<u&&(i=d,d=h,h=i,o=l,l=u,u=o),i=[],o=l+u,n=o;n--;)i.push(0);for(n=u;--n>=0;){for(t=0,a=l+n;a>n;)s=i[a]+h[n]*d[a-n-1]+t,i[a--]=s%tt|0,t=s/tt|0;i[a]=(i[a]+t)%tt|0}for(;!i[--o];)i.pop();return t?++r:i.shift(),e.d=i,e.e=r,Le?je(e,f.precision):e},ne.toDecimalPlaces=ne.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(zt(e,0,Pn),t===void 0?t=n.rounding:zt(t,0,8),je(r,e+Ve(r)+1,t))},ne.toExponential=function(e,t){var r,n=this,a=n.constructor;return e===void 0?r=Ur(n,!0):(zt(e,0,Pn),t===void 0?t=a.rounding:zt(t,0,8),n=je(new a(n),e+1,t),r=Ur(n,!0,e+1)),r},ne.toFixed=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?Ur(a):(zt(e,0,Pn),t===void 0?t=i.rounding:zt(t,0,8),n=je(new i(a),e+Ve(a)+1,t),r=Ur(n.abs(),!1,e+Ve(n)+1),a.isneg()&&!a.isZero()?"-"+r:r)},ne.toInteger=ne.toint=function(){var e=this,t=e.constructor;return je(new t(e),Ve(e)+1,t.rounding)},ne.toNumber=function(){return+this},ne.toPower=ne.pow=function(e){var t,r,n,a,i,o,s=this,l=s.constructor,u=12,c=+(e=new l(e));if(!e.s)return new l(mt);if(s=new l(s),!s.s){if(e.s<1)throw Error(_t+"Infinity");return s}if(s.eq(mt))return s;if(n=l.precision,e.eq(mt))return je(s,n);if(t=e.e,r=e.d.length-1,o=t>=r,i=s.s,o){if((r=c<0?-c:c)<=Iv){for(a=new l(mt),t=Math.ceil(n/Ie+4),Le=!1;r%2&&(a=a.times(s),Wv(a.d,t)),r=_n(r/2),r!==0;)s=s.times(s),Wv(s.d,t);return Le=!0,e.s<0?new l(mt).div(a):je(a,n)}}else if(i<0)throw Error(_t+"NaN");return i=i<0&&e.d[Math.max(t,r)]&1?-1:1,s.s=1,Le=!1,a=e.times(Ba(s,n+u)),Le=!0,a=Rv(a),a.s=i,a},ne.toPrecision=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?(r=Ve(a),n=Ur(a,r<=i.toExpNeg||r>=i.toExpPos)):(zt(e,1,Pn),t===void 0?t=i.rounding:zt(t,0,8),a=je(new i(a),e,t),r=Ve(a),n=Ur(a,e<=r||r<=i.toExpNeg,e)),n},ne.toSignificantDigits=ne.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(zt(e,1,Pn),t===void 0?t=n.rounding:zt(t,0,8)),je(new n(r),e,t)},ne.toString=ne.valueOf=ne.val=ne.toJSON=ne[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Ve(e),r=e.constructor;return Ur(e,t<=r.toExpNeg||t>=r.toExpPos)};function Lv(e,t){var r,n,a,i,o,s,l,u,c=e.constructor,f=c.precision;if(!e.s||!t.s)return t.s||(t=new c(e)),Le?je(t,f):t;if(l=e.d,u=t.d,o=e.e,a=t.e,l=l.slice(),i=o-a,i){for(i<0?(n=l,i=-i,s=u.length):(n=u,a=o,s=l.length),o=Math.ceil(f/Ie),s=o>s?o+1:s+1,i>s&&(i=s,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for(s=l.length,i=u.length,s-i<0&&(i=s,n=u,u=l,l=n),r=0;i;)r=(l[--i]=l[i]+u[i]+r)/tt|0,l[i]%=tt;for(r&&(l.unshift(r),++a),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=a,Le?je(t,f):t}function zt(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Fr+e)}function Kt(e){var t,r,n,a=e.length-1,i="",o=e[0];if(a>0){for(i+=o,t=1;t<a;t++)n=e[t]+"",r=Ie-n.length,r&&(i+=xr(r)),i+=n;o=e[t],n=o+"",r=Ie-n.length,r&&(i+=xr(r))}else if(o===0)return"0";for(;o%10===0;)o/=10;return i+o}var lr=function(){function e(n,a){var i,o=0,s=n.length;for(n=n.slice();s--;)i=n[s]*a+o,n[s]=i%tt|0,o=i/tt|0;return o&&n.unshift(o),n}function t(n,a,i,o){var s,l;if(i!=o)l=i>o?1:-1;else for(s=l=0;s<i;s++)if(n[s]!=a[s]){l=n[s]>a[s]?1:-1;break}return l}function r(n,a,i){for(var o=0;i--;)n[i]-=o,o=n[i]<a[i]?1:0,n[i]=o*tt+n[i]-a[i];for(;!n[0]&&n.length>1;)n.shift()}return function(n,a,i,o){var s,l,u,c,f,d,h,v,m,p,x,O,w,A,y,b,S,P,$=n.constructor,M=n.s==a.s?1:-1,_=n.d,j=a.d;if(!n.s)return new $(n);if(!a.s)throw Error(_t+"Division by zero");for(l=n.e-a.e,S=j.length,y=_.length,h=new $(M),v=h.d=[],u=0;j[u]==(_[u]||0);)++u;if(j[u]>(_[u]||0)&&--l,i==null?O=i=$.precision:o?O=i+(Ve(n)-Ve(a))+1:O=i,O<0)return new $(0);if(O=O/Ie+2|0,u=0,S==1)for(c=0,j=j[0],O++;(u<y||c)&&O--;u++)w=c*tt+(_[u]||0),v[u]=w/j|0,c=w%j|0;else{for(c=tt/(j[0]+1)|0,c>1&&(j=e(j,c),_=e(_,c),S=j.length,y=_.length),A=S,m=_.slice(0,S),p=m.length;p<S;)m[p++]=0;P=j.slice(),P.unshift(0),b=j[0],j[1]>=tt/2&&++b;do c=0,s=t(j,m,S,p),s<0?(x=m[0],S!=p&&(x=x*tt+(m[1]||0)),c=x/b|0,c>1?(c>=tt&&(c=tt-1),f=e(j,c),d=f.length,p=m.length,s=t(f,m,d,p),s==1&&(c--,r(f,S<d?P:j,d))):(c==0&&(s=c=1),f=j.slice()),d=f.length,d<p&&f.unshift(0),r(m,f,p),s==-1&&(p=m.length,s=t(j,m,S,p),s<1&&(c++,r(m,S<p?P:j,p))),p=m.length):s===0&&(c++,m=[0]),v[u++]=c,s&&m[0]?m[p++]=_[A]||0:(m=[_[A]],p=1);while((A++<y||m[0]!==void 0)&&O--)}return v[0]||v.shift(),h.e=l,je(h,o?i+Ve(h)+1:i)}}();function Rv(e,t){var r,n,a,i,o,s,l=0,u=0,c=e.constructor,f=c.precision;if(Ve(e)>16)throw Error(Nu+Ve(e));if(!e.s)return new c(mt);for(Le=!1,s=f,o=new c(.03125);e.abs().gte(.1);)e=e.times(o),u+=5;for(n=Math.log(Wr(2,u))/Math.LN10*2+5|0,s+=n,r=a=i=new c(mt),c.precision=s;;){if(a=je(a.times(e),s),r=r.times(++l),o=i.plus(lr(a,r,s)),Kt(o.d).slice(0,s)===Kt(i.d).slice(0,s)){for(;u--;)i=je(i.times(i),s);return c.precision=f,t==null?(Le=!0,je(i,f)):i}i=o}}function Ve(e){for(var t=e.e*Ie,r=e.d[0];r>=10;r/=10)t++;return t}function Du(e,t,r){if(t>e.LN10.sd())throw Le=!0,r&&(e.precision=r),Error(_t+"LN10 precision limit exceeded");return je(new e(e.LN10),t)}function xr(e){for(var t="";e--;)t+="0";return t}function Ba(e,t){var r,n,a,i,o,s,l,u,c,f=1,d=10,h=e,v=h.d,m=h.constructor,p=m.precision;if(h.s<1)throw Error(_t+(h.s?"NaN":"-Infinity"));if(h.eq(mt))return new m(0);if(t==null?(Le=!1,u=p):u=t,h.eq(10))return t==null&&(Le=!0),Du(m,u);if(u+=d,m.precision=u,r=Kt(v),n=r.charAt(0),i=Ve(h),Math.abs(i)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)h=h.times(e),r=Kt(h.d),n=r.charAt(0),f++;i=Ve(h),n>1?(h=new m("0."+r),i++):h=new m(n+"."+r.slice(1))}else return l=Du(m,u+2,p).times(i+""),h=Ba(new m(n+"."+r.slice(1)),u-d).plus(l),m.precision=p,t==null?(Le=!0,je(h,p)):h;for(s=o=h=lr(h.minus(mt),h.plus(mt),u),c=je(h.times(h),u),a=3;;){if(o=je(o.times(c),u),l=s.plus(lr(o,new m(a),u)),Kt(l.d).slice(0,u)===Kt(s.d).slice(0,u))return s=s.times(2),i!==0&&(s=s.plus(Du(m,u+2,p).times(i+""))),s=lr(s,new m(f),u),m.precision=p,t==null?(Le=!0,je(s,p)):s;s=l,a+=2}}function Bv(e,t){var r,n,a;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(n,a),t){if(a-=n,r=r-n-1,e.e=_n(r/Ie),e.d=[],n=(r+1)%Ie,r<0&&(n+=Ie),n<a){for(n&&e.d.push(+t.slice(0,n)),a-=Ie;n<a;)e.d.push(+t.slice(n,n+=Ie));t=t.slice(n),n=Ie-t.length}else n-=a;for(;n--;)t+="0";if(e.d.push(+t),Le&&(e.e>$o||e.e<-$o))throw Error(Nu+r)}else e.s=0,e.e=0,e.d=[0];return e}function je(e,t,r){var n,a,i,o,s,l,u,c,f=e.d;for(o=1,i=f[0];i>=10;i/=10)o++;if(n=t-o,n<0)n+=Ie,a=t,u=f[c=0];else{if(c=Math.ceil((n+1)/Ie),i=f.length,c>=i)return e;for(u=i=f[c],o=1;i>=10;i/=10)o++;n%=Ie,a=n-Ie+o}if(r!==void 0&&(i=Wr(10,o-a-1),s=u/i%10|0,l=t<0||f[c+1]!==void 0||u%i,l=r<4?(s||l)&&(r==0||r==(e.s<0?3:2)):s>5||s==5&&(r==4||l||r==6&&(n>0?a>0?u/Wr(10,o-a):0:f[c-1])%10&1||r==(e.s<0?8:7))),t<1||!f[0])return l?(i=Ve(e),f.length=1,t=t-i-1,f[0]=Wr(10,(Ie-t%Ie)%Ie),e.e=_n(-t/Ie)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(n==0?(f.length=c,i=1,c--):(f.length=c+1,i=Wr(10,Ie-n),f[c]=a>0?(u/Wr(10,o-a)%Wr(10,a)|0)*i:0),l)for(;;)if(c==0){(f[0]+=i)==tt&&(f[0]=1,++e.e);break}else{if(f[c]+=i,f[c]!=tt)break;f[c--]=0,i=1}for(n=f.length;f[--n]===0;)f.pop();if(Le&&(e.e>$o||e.e<-$o))throw Error(Nu+Ve(e));return e}function Fv(e,t){var r,n,a,i,o,s,l,u,c,f,d=e.constructor,h=d.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new d(e),Le?je(t,h):t;if(l=e.d,f=t.d,n=t.e,u=e.e,l=l.slice(),o=u-n,o){for(c=o<0,c?(r=l,o=-o,s=f.length):(r=f,n=u,s=l.length),a=Math.max(Math.ceil(h/Ie),s)+2,o>a&&(o=a,r.length=1),r.reverse(),a=o;a--;)r.push(0);r.reverse()}else{for(a=l.length,s=f.length,c=a<s,c&&(s=a),a=0;a<s;a++)if(l[a]!=f[a]){c=l[a]<f[a];break}o=0}for(c&&(r=l,l=f,f=r,t.s=-t.s),s=l.length,a=f.length-s;a>0;--a)l[s++]=0;for(a=f.length;a>o;){if(l[--a]<f[a]){for(i=a;i&&l[--i]===0;)l[i]=tt-1;--l[i],l[a]+=tt}l[a]-=f[a]}for(;l[--s]===0;)l.pop();for(;l[0]===0;l.shift())--n;return l[0]?(t.d=l,t.e=n,Le?je(t,h):t):new d(0)}function Ur(e,t,r){var n,a=Ve(e),i=Kt(e.d),o=i.length;return t?(r&&(n=r-o)>0?i=i.charAt(0)+"."+i.slice(1)+xr(n):o>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(a<0?"e":"e+")+a):a<0?(i="0."+xr(-a-1)+i,r&&(n=r-o)>0&&(i+=xr(n))):a>=o?(i+=xr(a+1-o),r&&(n=r-a-1)>0&&(i=i+"."+xr(n))):((n=a+1)<o&&(i=i.slice(0,n)+"."+i.slice(n)),r&&(n=r-o)>0&&(a+1===o&&(i+="."),i+=xr(n))),e.s<0?"-"+i:i}function Wv(e,t){if(e.length>t)return e.length=t,!0}function Uv(e){var t,r,n;function a(i){var o=this;if(!(o instanceof a))return new a(i);if(o.constructor=a,i instanceof a){o.s=i.s,o.e=i.e,o.d=(i=i.d)?i.slice():i;return}if(typeof i=="number"){if(i*0!==0)throw Error(Fr+i);if(i>0)o.s=1;else if(i<0)i=-i,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(i===~~i&&i<1e7){o.e=0,o.d=[i];return}return Bv(o,i.toString())}else if(typeof i!="string")throw Error(Fr+i);if(i.charCodeAt(0)===45?(i=i.slice(1),o.s=-1):o.s=1,CD.test(i))Bv(o,i);else throw Error(Fr+i)}if(a.prototype=ne,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=Uv,a.config=a.set=MD,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return a.config(e),a}function MD(e){if(!e||typeof e!="object")throw Error(_t+"Object expected");var t,r,n,a=["precision",1,Pn,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<a.length;t+=3)if((n=e[r=a[t]])!==void 0)if(_n(n)===n&&n>=a[t+1]&&n<=a[t+2])this[r]=n;else throw Error(Fr+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Fr+r+": "+n);return this}var Iu=Uv($D);mt=new Iu(1);const Ee=Iu;function kD(e){return LD(e)||ID(e)||DD(e)||ND()}function ND(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
138
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function DD(e,t){if(e){if(typeof e=="string")return Lu(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Lu(e,t)}}function ID(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function LD(e){if(Array.isArray(e))return Lu(e)}function Lu(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var RD=function(t){return t},zv={},Kv=function(t){return t===zv},Gv=function(t){return function r(){return arguments.length===0||arguments.length===1&&Kv(arguments.length<=0?void 0:arguments[0])?r:t.apply(void 0,arguments)}},BD=function e(t,r){return t===1?r:Gv(function(){for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];var o=a.filter(function(s){return s!==zv}).length;return o>=t?r.apply(void 0,a):e(t-o,Gv(function(){for(var s=arguments.length,l=new Array(s),u=0;u<s;u++)l[u]=arguments[u];var c=a.map(function(f){return Kv(f)?l.shift():f});return r.apply(void 0,kD(c).concat(l))}))})},Co=function(t){return BD(t.length,t)},Ru=function(t,r){for(var n=[],a=t;a<r;++a)n[a-t]=a;return n},FD=Co(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(r){return t[r]}).map(e)}),WD=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return RD;var a=r.reverse(),i=a[0],o=a.slice(1);return function(){return o.reduce(function(s,l){return l(s)},i.apply(void 0,arguments))}},Bu=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},Vv=function(t){var r=null,n=null;return function(){for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return r&&i.every(function(s,l){return s===r[l]})||(r=i,n=t.apply(void 0,i)),n}};function UD(e){var t;return e===0?t=1:t=Math.floor(new Ee(e).abs().log(10).toNumber())+1,t}function zD(e,t,r){for(var n=new Ee(e),a=0,i=[];n.lt(t)&&a<1e5;)i.push(n.toNumber()),n=n.add(r),a++;return i}var KD=Co(function(e,t,r){var n=+e,a=+t;return n+r*(a-n)}),GD=Co(function(e,t,r){var n=t-+e;return n=n||1/0,(r-e)/n}),VD=Co(function(e,t,r){var n=t-+e;return n=n||1/0,Math.max(0,Math.min(1,(r-e)/n))});const Mo={rangeStep:zD,getDigitCount:UD,interpolateNumber:KD,uninterpolateNumber:GD,uninterpolateTruncation:VD};function Fu(e){return YD(e)||HD(e)||qv(e)||qD()}function qD(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
139
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function HD(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function YD(e){if(Array.isArray(e))return Wu(e)}function Fa(e,t){return JD(e)||ZD(e,t)||qv(e,t)||XD()}function XD(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
140
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qv(e,t){if(e){if(typeof e=="string")return Wu(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Wu(e,t)}}function Wu(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ZD(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,a=!1,i=void 0;try{for(var o=e[Symbol.iterator](),s;!(n=(s=o.next()).done)&&(r.push(s.value),!(t&&r.length===t));n=!0);}catch(l){a=!0,i=l}finally{try{!n&&o.return!=null&&o.return()}finally{if(a)throw i}}return r}}function JD(e){if(Array.isArray(e))return e}function Hv(e){var t=Fa(e,2),r=t[0],n=t[1],a=r,i=n;return r>n&&(a=n,i=r),[a,i]}function Yv(e,t,r){if(e.lte(0))return new Ee(0);var n=Mo.getDigitCount(e.toNumber()),a=new Ee(10).pow(n),i=e.div(a),o=n!==1?.05:.1,s=new Ee(Math.ceil(i.div(o).toNumber())).add(r).mul(o),l=s.mul(a);return t?l:new Ee(Math.ceil(l))}function QD(e,t,r){var n=1,a=new Ee(e);if(!a.isint()&&r){var i=Math.abs(e);i<1?(n=new Ee(10).pow(Mo.getDigitCount(e)-1),a=new Ee(Math.floor(a.div(n).toNumber())).mul(n)):i>1&&(a=new Ee(Math.floor(e)))}else e===0?a=new Ee(Math.floor((t-1)/2)):r||(a=new Ee(Math.floor(e)));var o=Math.floor((t-1)/2),s=WD(FD(function(l){return a.add(new Ee(l-o).mul(n)).toNumber()}),Ru);return s(0,t)}function Xv(e,t,r,n){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new Ee(0),tickMin:new Ee(0),tickMax:new Ee(0)};var i=Yv(new Ee(t).sub(e).div(r-1),n,a),o;e<=0&&t>=0?o=new Ee(0):(o=new Ee(e).add(t).div(2),o=o.sub(new Ee(o).mod(i)));var s=Math.ceil(o.sub(e).div(i).toNumber()),l=Math.ceil(new Ee(t).sub(o).div(i).toNumber()),u=s+l+1;return u>r?Xv(e,t,r,n,a+1):(u<r&&(l=t>0?l+(r-u):l,s=t>0?s:s+(r-u)),{step:i,tickMin:o.sub(new Ee(s).mul(i)),tickMax:o.add(new Ee(l).mul(i))})}function eI(e){var t=Fa(e,2),r=t[0],n=t[1],a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(a,2),s=Hv([r,n]),l=Fa(s,2),u=l[0],c=l[1];if(u===-1/0||c===1/0){var f=c===1/0?[u].concat(Fu(Ru(0,a-1).map(function(){return 1/0}))):[].concat(Fu(Ru(0,a-1).map(function(){return-1/0})),[c]);return r>n?Bu(f):f}if(u===c)return QD(u,a,i);var d=Xv(u,c,o,i),h=d.step,v=d.tickMin,m=d.tickMax,p=Mo.rangeStep(v,m.add(new Ee(.1).mul(h)),h);return r>n?Bu(p):p}function tI(e,t){var r=Fa(e,2),n=r[0],a=r[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Hv([n,a]),s=Fa(o,2),l=s[0],u=s[1];if(l===-1/0||u===1/0)return[n,a];if(l===u)return[l];var c=Math.max(t,2),f=Yv(new Ee(u).sub(l).div(c-1),i,0),d=[].concat(Fu(Mo.rangeStep(new Ee(l),new Ee(u).sub(new Ee(.99).mul(f)),f)),[u]);return n>a?Bu(d):d}var rI=Vv(eI),nI=Vv(tI),aI=process.env.NODE_ENV==="production",Uu="Invariant failed";function pt(e,t){if(aI)throw new Error(Uu);var r=typeof t=="function"?t():t,n=r?"".concat(Uu,": ").concat(r):Uu;throw new Error(n)}var iI=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function En(e){"@babel/helpers - typeof";return En=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},En(e)}function ko(){return ko=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ko.apply(this,arguments)}function oI(e,t){return cI(e)||uI(e,t)||lI(e,t)||sI()}function sI(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
141
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lI(e,t){if(e){if(typeof e=="string")return Zv(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Zv(e,t)}}function Zv(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function uI(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function cI(e){if(Array.isArray(e))return e}function fI(e,t){if(e==null)return{};var r=dI(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function dI(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function hI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pI(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ey(n.key),n)}}function vI(e,t,r){return t&&pI(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function yI(e,t,r){return t=No(t),mI(e,Jv()?Reflect.construct(t,r||[],No(e).constructor):t.apply(e,r))}function mI(e,t){if(t&&(En(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return gI(e)}function gI(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Jv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Jv=function(){return!!e})()}function No(e){return No=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},No(e)}function bI(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zu(e,t)}function zu(e,t){return zu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},zu(e,t)}function Qv(e,t,r){return t=ey(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ey(e){var t=xI(e,"string");return En(t)=="symbol"?t:t+""}function xI(e,t){if(En(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(En(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var jn=function(e){function t(){return hI(this,t),yI(this,t,arguments)}return bI(t,e),vI(t,[{key:"render",value:function(){var n=this.props,a=n.offset,i=n.layout,o=n.width,s=n.dataKey,l=n.data,u=n.dataPointFormatter,c=n.xAxis,f=n.yAxis,d=fI(n,iI),h=de(d,!1);this.props.direction==="x"&&c.type!=="number"&&(process.env.NODE_ENV!=="production"?pt(!1,'ErrorBar requires Axis type property to be "number".'):pt());var v=l.map(function(m){var p=u(m,s),x=p.x,O=p.y,w=p.value,A=p.errorVal;if(!A)return null;var y=[],b,S;if(Array.isArray(A)){var P=oI(A,2);b=P[0],S=P[1]}else b=S=A;if(i==="vertical"){var $=c.scale,M=O+a,_=M+o,j=M-o,R=$(w-b),k=$(w+S);y.push({x1:k,y1:_,x2:k,y2:j}),y.push({x1:R,y1:M,x2:k,y2:M}),y.push({x1:R,y1:_,x2:R,y2:j})}else if(i==="horizontal"){var D=f.scale,C=x+a,B=C-o,U=C+o,K=D(w-b),E=D(w+S);y.push({x1:B,y1:E,x2:U,y2:E}),y.push({x1:C,y1:K,x2:C,y2:E}),y.push({x1:B,y1:K,x2:U,y2:K})}return T.createElement(xe,ko({className:"recharts-errorBar",key:"bar-".concat(y.map(function(L){return"".concat(L.x1,"-").concat(L.x2,"-").concat(L.y1,"-").concat(L.y2)}))},h),y.map(function(L){return T.createElement("line",ko({},L,{key:"line-".concat(L.x1,"-").concat(L.x2,"-").concat(L.y1,"-").concat(L.y2)}))}))});return T.createElement(xe,{className:"recharts-errorBars"},v)}}])}(T.Component);Qv(jn,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"}),Qv(jn,"displayName","ErrorBar");function Wa(e){"@babel/helpers - typeof";return Wa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wa(e)}function ty(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function zr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ty(Object(r),!0).forEach(function(n){wI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ty(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function wI(e,t,r){return t=OI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function OI(e){var t=SI(e,"string");return Wa(t)=="symbol"?t:t+""}function SI(e,t){if(Wa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Wa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ry=function(t){var r=t.children,n=t.formattedGraphicalItems,a=t.legendWidth,i=t.legendContent,o=yt(r,vn);if(!o)return null;var s=vn.defaultProps,l=s!==void 0?zr(zr({},s),o.props):{},u;return o.props&&o.props.payload?u=o.props&&o.props.payload:i==="children"?u=(n||[]).reduce(function(c,f){var d=f.item,h=f.props,v=h.sectors||h.data||[];return c.concat(v.map(function(m){return{type:o.props.iconType||d.props.legendType,value:m.name,color:m.fill,payload:m}}))},[]):u=(n||[]).map(function(c){var f=c.item,d=f.type.defaultProps,h=d!==void 0?zr(zr({},d),f.props):{},v=h.dataKey,m=h.name,p=h.legendType,x=h.hide;return{inactive:x,dataKey:v,type:l.iconType||p||"square",color:Gu(f),value:m||v,payload:h}}),zr(zr(zr({},l),vn.getWithHeight(o,a)),{},{payload:u,item:o})};function Ua(e){"@babel/helpers - typeof";return Ua=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ua(e)}function ny(e){return _I(e)||PI(e)||AI(e)||TI()}function TI(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
142
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function AI(e,t){if(e){if(typeof e=="string")return Ku(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ku(e,t)}}function PI(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _I(e){if(Array.isArray(e))return Ku(e)}function Ku(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ay(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Fe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ay(Object(r),!0).forEach(function(n){$n(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ay(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function $n(e,t,r){return t=EI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function EI(e){var t=jI(e,"string");return Ua(t)=="symbol"?t:t+""}function jI(e,t){if(Ua(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ua(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ze(e,t,r){return fe(e)||fe(t)?r:Ye(t)?wt(e,t,r):he(t)?t(e):r}function za(e,t,r,n){var a=PD(e,function(s){return Ze(s,t)});if(r==="number"){var i=a.filter(function(s){return Z(s)||parseFloat(s)});return i.length?[jo(i),br(i)]:[1/0,-1/0]}var o=n?a.filter(function(s){return!fe(s)}):a;return o.map(function(s){return Ye(s)||s instanceof Date?s:""})}var $I=function(t){var r,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=-1,s=(r=n==null?void 0:n.length)!==null&&r!==void 0?r:0;if(s<=1)return 0;if(i&&i.axisType==="angleAxis"&&Math.abs(Math.abs(i.range[1]-i.range[0])-360)<=1e-6)for(var l=i.range,u=0;u<s;u++){var c=u>0?a[u-1].coordinate:a[s-1].coordinate,f=a[u].coordinate,d=u>=s-1?a[0].coordinate:a[u+1].coordinate,h=void 0;if(Ct(f-c)!==Ct(d-f)){var v=[];if(Ct(d-f)===Ct(l[1]-l[0])){h=d;var m=f+l[1]-l[0];v[0]=Math.min(m,(m+c)/2),v[1]=Math.max(m,(m+c)/2)}else{h=c;var p=d+l[1]-l[0];v[0]=Math.min(f,(p+f)/2),v[1]=Math.max(f,(p+f)/2)}var x=[Math.min(f,(h+f)/2),Math.max(f,(h+f)/2)];if(t>x[0]&&t<=x[1]||t>=v[0]&&t<=v[1]){o=a[u].index;break}}else{var O=Math.min(c,d),w=Math.max(c,d);if(t>(O+f)/2&&t<=(w+f)/2){o=a[u].index;break}}}else for(var A=0;A<s;A++)if(A===0&&t<=(n[A].coordinate+n[A+1].coordinate)/2||A>0&&A<s-1&&t>(n[A].coordinate+n[A-1].coordinate)/2&&t<=(n[A].coordinate+n[A+1].coordinate)/2||A===s-1&&t>(n[A].coordinate+n[A-1].coordinate)/2){o=n[A].index;break}return o},Gu=function(t){var r,n=t,a=n.type.displayName,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?Fe(Fe({},t.type.defaultProps),t.props):t.props,o=i.stroke,s=i.fill,l;switch(a){case"Line":l=o;break;case"Area":case"Radar":l=o&&o!=="none"?o:s;break;default:l=s;break}return l},CI=function(t){var r=t.barSize,n=t.totalSize,a=t.stackGroups,i=a===void 0?{}:a;if(!i)return{};for(var o={},s=Object.keys(i),l=0,u=s.length;l<u;l++)for(var c=i[s[l]].stackGroups,f=Object.keys(c),d=0,h=f.length;d<h;d++){var v=c[f[d]],m=v.items,p=v.cateAxisId,x=m.filter(function(S){return Qt(S.type).indexOf("Bar")>=0});if(x&&x.length){var O=x[0].type.defaultProps,w=O!==void 0?Fe(Fe({},O),x[0].props):x[0].props,A=w.barSize,y=w[p];o[y]||(o[y]=[]);var b=fe(A)?r:A;o[y].push({item:x[0],stackList:x.slice(1),barSize:fe(b)?void 0:Cr(b,n,0)})}}return o},MI=function(t){var r=t.barGap,n=t.barCategoryGap,a=t.bandSize,i=t.sizeList,o=i===void 0?[]:i,s=t.maxBarSize,l=o.length;if(l<1)return null;var u=Cr(r,a,0,!0),c,f=[];if(o[0].barSize===+o[0].barSize){var d=!1,h=a/l,v=o.reduce(function(A,y){return A+y.barSize||0},0);v+=(l-1)*u,v>=a&&(v-=(l-1)*u,u=0),v>=a&&h>0&&(d=!0,h*=.9,v=l*h);var m=(a-v)/2>>0,p={offset:m-u,size:0};c=o.reduce(function(A,y){var b={item:y.item,position:{offset:p.offset+p.size+u,size:d?h:y.barSize}},S=[].concat(ny(A),[b]);return p=S[S.length-1].position,y.stackList&&y.stackList.length&&y.stackList.forEach(function(P){S.push({item:P,position:p})}),S},f)}else{var x=Cr(n,a,0,!0);a-2*x-(l-1)*u<=0&&(u=0);var O=(a-2*x-(l-1)*u)/l;O>1&&(O>>=0);var w=s===+s?Math.min(O,s):O;c=o.reduce(function(A,y,b){var S=[].concat(ny(A),[{item:y.item,position:{offset:x+(O+u)*b+(O-w)/2,size:w}}]);return y.stackList&&y.stackList.length&&y.stackList.forEach(function(P){S.push({item:P,position:S[S.length-1].position})}),S},f)}return c},kI=function(t,r,n,a){var i=n.children,o=n.width,s=n.margin,l=o-(s.left||0)-(s.right||0),u=ry({children:i,legendWidth:l});if(u){var c=a||{},f=c.width,d=c.height,h=u.align,v=u.verticalAlign,m=u.layout;if((m==="vertical"||m==="horizontal"&&v==="middle")&&h!=="center"&&Z(t[h]))return Fe(Fe({},t),{},$n({},h,t[h]+(f||0)));if((m==="horizontal"||m==="vertical"&&h==="center")&&v!=="middle"&&Z(t[v]))return Fe(Fe({},t),{},$n({},v,t[v]+(d||0)))}return t},NI=function(t,r,n){return fe(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},iy=function(t,r,n,a,i){var o=r.props.children,s=dt(o,jn).filter(function(u){return NI(a,i,u.props.direction)});if(s&&s.length){var l=s.map(function(u){return u.props.dataKey});return t.reduce(function(u,c){var f=Ze(c,n);if(fe(f))return u;var d=Array.isArray(f)?[jo(f),br(f)]:[f,f],h=l.reduce(function(v,m){var p=Ze(c,m,0),x=d[0]-Math.abs(Array.isArray(p)?p[0]:p),O=d[1]+Math.abs(Array.isArray(p)?p[1]:p);return[Math.min(x,v[0]),Math.max(O,v[1])]},[1/0,-1/0]);return[Math.min(h[0],u[0]),Math.max(h[1],u[1])]},[1/0,-1/0])}return null},DI=function(t,r,n,a,i){var o=r.map(function(s){return iy(t,s,n,i,a)}).filter(function(s){return!fe(s)});return o&&o.length?o.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]):null},oy=function(t,r,n,a,i){var o=r.map(function(l){var u=l.props.dataKey;return n==="number"&&u&&iy(t,l,u,a)||za(t,u,n,i)});if(n==="number")return o.reduce(function(l,u){return[Math.min(l[0],u[0]),Math.max(l[1],u[1])]},[1/0,-1/0]);var s={};return o.reduce(function(l,u){for(var c=0,f=u.length;c<f;c++)s[u[c]]||(s[u[c]]=!0,l.push(u[c]));return l},[])},sy=function(t,r){return t==="horizontal"&&r==="xAxis"||t==="vertical"&&r==="yAxis"||t==="centric"&&r==="angleAxis"||t==="radial"&&r==="radiusAxis"},ly=function(t,r,n,a){if(a)return t.map(function(l){return l.coordinate});var i,o,s=t.map(function(l){return l.coordinate===r&&(i=!0),l.coordinate===n&&(o=!0),l.coordinate});return i||s.push(r),o||s.push(n),s},ur=function(t,r,n){if(!t)return null;var a=t.scale,i=t.duplicateDomain,o=t.type,s=t.range,l=t.realScaleType==="scaleBand"?a.bandwidth()/2:2,u=(r||n)&&o==="category"&&a.bandwidth?a.bandwidth()/l:0;if(u=t.axisType==="angleAxis"&&(s==null?void 0:s.length)>=2?Ct(s[0]-s[1])*2*u:u,r&&(t.ticks||t.niceTicks)){var c=(t.ticks||t.niceTicks).map(function(f){var d=i?i.indexOf(f):f;return{coordinate:a(d)+u,value:f,offset:u}});return c.filter(function(f){return!sn(f.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(f,d){return{coordinate:a(f)+u,value:f,index:d,offset:u}}):a.ticks&&!n?a.ticks(t.tickCount).map(function(f){return{coordinate:a(f)+u,value:f,offset:u}}):a.domain().map(function(f,d){return{coordinate:a(f)+u,value:i?i[f]:f,index:d,offset:u}})},Vu=new WeakMap,Do=function(t,r){if(typeof r!="function")return t;Vu.has(t)||Vu.set(t,new WeakMap);var n=Vu.get(t);if(n.has(r))return n.get(r);var a=function(){t.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,a),a},II=function(t,r,n){var a=t.scale,i=t.type,o=t.layout,s=t.axisType;if(a==="auto")return o==="radial"&&s==="radiusAxis"?{scale:_a(),realScaleType:"band"}:o==="radial"&&s==="angleAxis"?{scale:xo(),realScaleType:"linear"}:i==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:Ea(),realScaleType:"point"}:i==="category"?{scale:_a(),realScaleType:"band"}:{scale:xo(),realScaleType:"linear"};if(Er(a)){var l="scale".concat(Ii(a));return{scale:(Nv[l]||Ea)(),realScaleType:Nv[l]?l:"point"}}return he(a)?{scale:a}:{scale:Ea(),realScaleType:"point"}},uy=1e-4,LI=function(t){var r=t.domain();if(!(!r||r.length<=2)){var n=r.length,a=t.range(),i=Math.min(a[0],a[1])-uy,o=Math.max(a[0],a[1])+uy,s=t(r[0]),l=t(r[n-1]);(s<i||s>o||l<i||l>o)&&t.domain([r[0],r[n-1]])}},RI=function(t,r){if(!t)return null;for(var n=0,a=t.length;n<a;n++)if(t[n].item===r)return t[n].position;return null},BI=function(t,r){if(!r||r.length!==2||!Z(r[0])||!Z(r[1]))return t;var n=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]),i=[t[0],t[1]];return(!Z(t[0])||t[0]<n)&&(i[0]=n),(!Z(t[1])||t[1]>a)&&(i[1]=a),i[0]>a&&(i[0]=a),i[1]<n&&(i[1]=n),i},FI=function(t){var r=t.length;if(!(r<=0))for(var n=0,a=t[0].length;n<a;++n)for(var i=0,o=0,s=0;s<r;++s){var l=sn(t[s][n][1])?t[s][n][0]:t[s][n][1];l>=0?(t[s][n][0]=i,t[s][n][1]=i+l,i=t[s][n][1]):(t[s][n][0]=o,t[s][n][1]=o+l,o=t[s][n][1])}},WI=function(t){var r=t.length;if(!(r<=0))for(var n=0,a=t[0].length;n<a;++n)for(var i=0,o=0;o<r;++o){var s=sn(t[o][n][1])?t[o][n][0]:t[o][n][1];s>=0?(t[o][n][0]=i,t[o][n][1]=i+s,i=t[o][n][1]):(t[o][n][0]=0,t[o][n][1]=0)}},UI={sign:FI,expand:nT,none:un,silhouette:aT,wiggle:iT,positive:WI},zI=function(t,r,n){var a=r.map(function(s){return s.props.dataKey}),i=UI[n],o=rT().keys(a).value(function(s,l){return+Ze(s,l,0)}).order(bl).offset(i);return o(t)},KI=function(t,r,n,a,i,o){if(!t)return null;var s=o?r.reverse():r,l={},u=s.reduce(function(f,d){var h,v=(h=d.type)!==null&&h!==void 0&&h.defaultProps?Fe(Fe({},d.type.defaultProps),d.props):d.props,m=v.stackId,p=v.hide;if(p)return f;var x=v[n],O=f[x]||{hasStack:!1,stackGroups:{}};if(Ye(m)){var w=O.stackGroups[m]||{numericAxisId:n,cateAxisId:a,items:[]};w.items.push(d),O.hasStack=!0,O.stackGroups[m]=w}else O.stackGroups[$r("_stackId_")]={numericAxisId:n,cateAxisId:a,items:[d]};return Fe(Fe({},f),{},$n({},x,O))},l),c={};return Object.keys(u).reduce(function(f,d){var h=u[d];if(h.hasStack){var v={};h.stackGroups=Object.keys(h.stackGroups).reduce(function(m,p){var x=h.stackGroups[p];return Fe(Fe({},m),{},$n({},p,{numericAxisId:n,cateAxisId:a,items:x.items,stackedData:zI(t,x.items,i)}))},v)}return Fe(Fe({},f),{},$n({},d,h))},c)},GI=function(t,r){var n=r.realScaleType,a=r.type,i=r.tickCount,o=r.originalDomain,s=r.allowDecimals,l=n||r.scale;if(l!=="auto"&&l!=="linear")return null;if(i&&a==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var u=t.domain();if(!u.length)return null;var c=rI(u,i,s);return t.domain([jo(c),br(c)]),{niceTicks:c}}if(i&&a==="number"){var f=t.domain(),d=nI(f,i,s);return{niceTicks:d}}return null};function Cn(e){var t=e.axis,r=e.ticks,n=e.bandSize,a=e.entry,i=e.index,o=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!fe(a[t.dataKey])){var s=Ni(r,"value",a[t.dataKey]);if(s)return s.coordinate+n/2}return r[i]?r[i].coordinate+n/2:null}var l=Ze(a,fe(o)?t.dataKey:o);return fe(l)?null:t.scale(l)}var cy=function(t){var r=t.axis,n=t.ticks,a=t.offset,i=t.bandSize,o=t.entry,s=t.index;if(r.type==="category")return n[s]?n[s].coordinate+a:null;var l=Ze(o,r.dataKey,r.domain[s]);return fe(l)?null:r.scale(l)-i/2+a},VI=function(t){var r=t.numericAxis,n=r.scale.domain();if(r.type==="number"){var a=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]);return a<=0&&i>=0?0:i<0?i:a}return n[0]},qI=function(t,r){var n,a=(n=t.type)!==null&&n!==void 0&&n.defaultProps?Fe(Fe({},t.type.defaultProps),t.props):t.props,i=a.stackId;if(Ye(i)){var o=r[i];if(o){var s=o.items.indexOf(t);return s>=0?o.stackedData[s]:null}}return null},HI=function(t){return t.reduce(function(r,n){return[jo(n.concat([r[0]]).filter(Z)),br(n.concat([r[1]]).filter(Z))]},[1/0,-1/0])},fy=function(t,r,n){return Object.keys(t).reduce(function(a,i){var o=t[i],s=o.stackedData,l=s.reduce(function(u,c){var f=HI(c.slice(r,n+1));return[Math.min(u[0],f[0]),Math.max(u[1],f[1])]},[1/0,-1/0]);return[Math.min(l[0],a[0]),Math.max(l[1],a[1])]},[1/0,-1/0]).map(function(a){return a===1/0||a===-1/0?0:a})},dy=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,hy=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,qu=function(t,r,n){if(he(t))return t(r,n);if(!Array.isArray(t))return r;var a=[];if(Z(t[0]))a[0]=n?t[0]:Math.min(t[0],r[0]);else if(dy.test(t[0])){var i=+dy.exec(t[0])[1];a[0]=r[0]-i}else he(t[0])?a[0]=t[0](r[0]):a[0]=r[0];if(Z(t[1]))a[1]=n?t[1]:Math.max(t[1],r[1]);else if(hy.test(t[1])){var o=+hy.exec(t[1])[1];a[1]=r[1]+o}else he(t[1])?a[1]=t[1](r[1]):a[1]=r[1];return a},Io=function(t,r,n){if(t&&t.scale&&t.scale.bandwidth){var a=t.scale.bandwidth();if(!n||a>0)return a}if(t&&r&&r.length>=2){for(var i=Fl(r,function(f){return f.coordinate}),o=1/0,s=1,l=i.length;s<l;s++){var u=i[s],c=i[s-1];o=Math.min((u.coordinate||0)-(c.coordinate||0),o)}return o===1/0?0:o}return n?void 0:0},py=function(t,r,n){return!t||!t.length||Br(t,wt(n,"type.defaultProps.domain"))?r:t},vy=function(t,r){var n=t.type.defaultProps?Fe(Fe({},t.type.defaultProps),t.props):t.props,a=n.dataKey,i=n.name,o=n.unit,s=n.formatter,l=n.tooltipType,u=n.chartType,c=n.hide;return Fe(Fe({},de(t,!1)),{},{dataKey:a,unit:o,formatter:s,name:i||a,color:Gu(t),value:Ze(r,a),type:l,payload:r,chartType:u,hide:c})};function Ka(e){"@babel/helpers - typeof";return Ka=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ka(e)}function yy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function my(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yy(Object(r),!0).forEach(function(n){YI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function YI(e,t,r){return t=XI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function XI(e){var t=ZI(e,"string");return Ka(t)=="symbol"?t:t+""}function ZI(e,t){if(Ka(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ka(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Lo=Math.PI/180,JI=function(t){return t*180/Math.PI},rt=function(t,r,n,a){return{x:t+Math.cos(-Lo*a)*n,y:r+Math.sin(-Lo*a)*n}},QI=function(t,r){var n=t.x,a=t.y,i=r.x,o=r.y;return Math.sqrt(Math.pow(n-i,2)+Math.pow(a-o,2))},eL=function(t,r){var n=t.x,a=t.y,i=r.cx,o=r.cy,s=QI({x:n,y:a},{x:i,y:o});if(s<=0)return{radius:s};var l=(n-i)/s,u=Math.acos(l);return a>o&&(u=2*Math.PI-u),{radius:s,angle:JI(u),angleInRadian:u}},tL=function(t){var r=t.startAngle,n=t.endAngle,a=Math.floor(r/360),i=Math.floor(n/360),o=Math.min(a,i);return{startAngle:r-o*360,endAngle:n-o*360}},rL=function(t,r){var n=r.startAngle,a=r.endAngle,i=Math.floor(n/360),o=Math.floor(a/360),s=Math.min(i,o);return t+s*360},gy=function(t,r){var n=t.x,a=t.y,i=eL({x:n,y:a},r),o=i.radius,s=i.angle,l=r.innerRadius,u=r.outerRadius;if(o<l||o>u)return!1;if(o===0)return!0;var c=tL(r),f=c.startAngle,d=c.endAngle,h=s,v;if(f<=d){for(;h>d;)h-=360;for(;h<f;)h+=360;v=h>=f&&h<=d}else{for(;h>f;)h-=360;for(;h<d;)h+=360;v=h>=d&&h<=f}return v?my(my({},r),{},{radius:o,angle:rL(h,r)}):null};function Ga(e){"@babel/helpers - typeof";return Ga=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ga(e)}var nL=["offset"];function aL(e){return lL(e)||sL(e)||oL(e)||iL()}function iL(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
143
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oL(e,t){if(e){if(typeof e=="string")return Hu(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Hu(e,t)}}function sL(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function lL(e){if(Array.isArray(e))return Hu(e)}function Hu(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function uL(e,t){if(e==null)return{};var r=cL(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function cL(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function by(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Je(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?by(Object(r),!0).forEach(function(n){fL(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):by(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function fL(e,t,r){return t=dL(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dL(e){var t=hL(e,"string");return Ga(t)=="symbol"?t:t+""}function hL(e,t){if(Ga(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ga(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Va(){return Va=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Va.apply(this,arguments)}var pL=function(t){var r=t.value,n=t.formatter,a=fe(t.children)?r:t.children;return he(n)?n(a):a},vL=function(t,r){var n=Ct(r-t),a=Math.min(Math.abs(r-t),360);return n*a},yL=function(t,r,n){var a=t.position,i=t.viewBox,o=t.offset,s=t.className,l=i,u=l.cx,c=l.cy,f=l.innerRadius,d=l.outerRadius,h=l.startAngle,v=l.endAngle,m=l.clockWise,p=(f+d)/2,x=vL(h,v),O=x>=0?1:-1,w,A;a==="insideStart"?(w=h+O*o,A=m):a==="insideEnd"?(w=v-O*o,A=!m):a==="end"&&(w=v+O*o,A=m),A=x<=0?A:!A;var y=rt(u,c,p,w),b=rt(u,c,p,w+(A?1:-1)*359),S="M".concat(y.x,",").concat(y.y,`
139
144
  A`).concat(p,",").concat(p,",0,1,").concat(A?0:1,`,
140
- `).concat(x.x,",").concat(x.y),P=fe(t.id)?$r("recharts-radial-line-"):t.id;return S.createElement("text",Ga({},n,{dominantBaseline:"central",className:ye("recharts-radial-bar-label",s)}),S.createElement("defs",null,S.createElement("path",{id:P,d:T})),S.createElement("textPath",{xlinkHref:"#".concat(P)},r))},yL=function(t){var r=t.viewBox,n=t.offset,a=t.position,i=r,o=i.cx,s=i.cy,l=i.innerRadius,u=i.outerRadius,c=i.startAngle,f=i.endAngle,d=(c+f)/2;if(a==="outside"){var h=rt(o,s,u+n,d),y=h.x,v=h.y;return{x:y,y:v,textAnchor:y>=o?"start":"end",verticalAnchor:"middle"}}if(a==="center")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(a==="centerTop")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"start"};if(a==="centerBottom")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"end"};var p=(l+u)/2,g=rt(o,s,p,d),O=g.x,w=g.y;return{x:O,y:w,textAnchor:"middle",verticalAnchor:"middle"}},mL=function(t){var r=t.viewBox,n=t.parentViewBox,a=t.offset,i=t.position,o=r,s=o.x,l=o.y,u=o.width,c=o.height,f=c>=0?1:-1,d=f*a,h=f>0?"end":"start",y=f>0?"start":"end",v=u>=0?1:-1,p=v*a,g=v>0?"end":"start",O=v>0?"start":"end";if(i==="top"){var w={x:s+u/2,y:l-f*a,textAnchor:"middle",verticalAnchor:h};return Ze(Ze({},w),n?{height:Math.max(l-n.y,0),width:u}:{})}if(i==="bottom"){var A={x:s+u/2,y:l+c+d,textAnchor:"middle",verticalAnchor:y};return Ze(Ze({},A),n?{height:Math.max(n.y+n.height-(l+c),0),width:u}:{})}if(i==="left"){var m={x:s-p,y:l+c/2,textAnchor:g,verticalAnchor:"middle"};return Ze(Ze({},m),n?{width:Math.max(m.x-n.x,0),height:c}:{})}if(i==="right"){var x={x:s+u+p,y:l+c/2,textAnchor:O,verticalAnchor:"middle"};return Ze(Ze({},x),n?{width:Math.max(n.x+n.width-x.x,0),height:c}:{})}var T=n?{width:u,height:c}:{};return i==="insideLeft"?Ze({x:s+p,y:l+c/2,textAnchor:O,verticalAnchor:"middle"},T):i==="insideRight"?Ze({x:s+u-p,y:l+c/2,textAnchor:g,verticalAnchor:"middle"},T):i==="insideTop"?Ze({x:s+u/2,y:l+d,textAnchor:"middle",verticalAnchor:y},T):i==="insideBottom"?Ze({x:s+u/2,y:l+c-d,textAnchor:"middle",verticalAnchor:h},T):i==="insideTopLeft"?Ze({x:s+p,y:l+d,textAnchor:O,verticalAnchor:y},T):i==="insideTopRight"?Ze({x:s+u-p,y:l+d,textAnchor:g,verticalAnchor:y},T):i==="insideBottomLeft"?Ze({x:s+p,y:l+c-d,textAnchor:O,verticalAnchor:h},T):i==="insideBottomRight"?Ze({x:s+u-p,y:l+c-d,textAnchor:g,verticalAnchor:h},T):nn(i)&&(J(i.x)||jr(i.x))&&(J(i.y)||jr(i.y))?Ze({x:s+Cr(i.x,u),y:l+Cr(i.y,c),textAnchor:"end",verticalAnchor:"end"},T):Ze({x:s+u/2,y:l+c/2,textAnchor:"middle",verticalAnchor:"middle"},T)},gL=function(t){return"cx"in t&&J(t.cx)};function at(e){var t=e.offset,r=t===void 0?5:t,n=lL(e,rL),a=Ze({offset:r},n),i=a.viewBox,o=a.position,s=a.value,l=a.children,u=a.content,c=a.className,f=c===void 0?"":c,d=a.textBreakAll;if(!i||fe(s)&&fe(l)&&!S.isValidElement(u)&&!he(u))return null;if(S.isValidElement(u))return S.cloneElement(u,a);var h;if(he(u)){if(h=S.createElement(u,a),S.isValidElement(h))return h}else h=hL(a);var y=gL(i),v=de(a,!0);if(y&&(o==="insideStart"||o==="insideEnd"||o==="end"))return vL(a,h,v);var p=y?yL(a):mL(a);return S.createElement(lo,Ga({className:ye("recharts-label",f)},v,p,{breakAll:d}),h)}at.displayName="Label";var by=function(t){var r=t.cx,n=t.cy,a=t.angle,i=t.startAngle,o=t.endAngle,s=t.r,l=t.radius,u=t.innerRadius,c=t.outerRadius,f=t.x,d=t.y,h=t.top,y=t.left,v=t.width,p=t.height,g=t.clockWise,O=t.labelViewBox;if(O)return O;if(J(v)&&J(p)){if(J(f)&&J(d))return{x:f,y:d,width:v,height:p};if(J(h)&&J(y))return{x:h,y,width:v,height:p}}return J(f)&&J(d)?{x:f,y:d,width:0,height:0}:J(r)&&J(n)?{cx:r,cy:n,startAngle:i||a||0,endAngle:o||a||0,innerRadius:u||0,outerRadius:c||l||s||0,clockWise:g}:t.viewBox?t.viewBox:{}},bL=function(t,r){return t?t===!0?S.createElement(at,{key:"label-implicit",viewBox:r}):Ye(t)?S.createElement(at,{key:"label-implicit",viewBox:r,value:t}):S.isValidElement(t)?t.type===at?S.cloneElement(t,{key:"label-implicit",viewBox:r}):S.createElement(at,{key:"label-implicit",content:t,viewBox:r}):he(t)?S.createElement(at,{key:"label-implicit",content:t,viewBox:r}):nn(t)?S.createElement(at,Ga({viewBox:r},t,{key:"label-implicit"})):null:null},xL=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&n&&!t.label)return null;var a=t.children,i=by(t),o=ft(a,at).map(function(l,u){return S.cloneElement(l,{viewBox:r||i,key:"label-".concat(u)})});if(!n)return o;var s=bL(t.label,r||i);return[s].concat(nL(o))};at.parseViewBox=by,at.renderCallByParent=xL;function wL(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var OL=wL;const SL=Ce(OL);function qa(e){"@babel/helpers - typeof";return qa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qa(e)}var AL=["valueAccessor"],TL=["data","dataKey","clockWise","id","textBreakAll"];function PL(e){return $L(e)||jL(e)||EL(e)||_L()}function _L(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
141
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function EL(e,t){if(e){if(typeof e=="string")return Yu(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Yu(e,t)}}function jL(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function $L(e){if(Array.isArray(e))return Yu(e)}function Yu(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ro(){return Ro=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ro.apply(this,arguments)}function xy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function wy(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xy(Object(r),!0).forEach(function(n){CL(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function CL(e,t,r){return t=ML(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ML(e){var t=kL(e,"string");return qa(t)=="symbol"?t:t+""}function kL(e,t){if(qa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(qa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Oy(e,t){if(e==null)return{};var r=NL(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function NL(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var DL=function(t){return Array.isArray(t.value)?SL(t.value):t.value};function Gt(e){var t=e.valueAccessor,r=t===void 0?DL:t,n=Oy(e,AL),a=n.data,i=n.dataKey,o=n.clockWise,s=n.id,l=n.textBreakAll,u=Oy(n,TL);return!a||!a.length?null:S.createElement(xe,{className:"recharts-label-list"},a.map(function(c,f){var d=fe(i)?r(c,f):Je(c&&c.payload,i),h=fe(s)?{}:{id:"".concat(s,"-").concat(f)};return S.createElement(at,Ro({},de(c,!0),u,h,{parentViewBox:c.parentViewBox,value:d,textBreakAll:l,viewBox:at.parseViewBox(fe(o)?c:wy(wy({},c),{},{clockWise:o})),key:"label-".concat(f),index:f}))}))}Gt.displayName="LabelList";function IL(e,t){return e?e===!0?S.createElement(Gt,{key:"labelList-implicit",data:t}):S.isValidElement(e)||he(e)?S.createElement(Gt,{key:"labelList-implicit",data:t,content:e}):nn(e)?S.createElement(Gt,Ro({data:t},e,{key:"labelList-implicit"})):null:null}function LL(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var n=e.children,a=ft(n,Gt).map(function(o,s){return S.cloneElement(o,{data:t,key:"labelList-".concat(s)})});if(!r)return a;var i=IL(e.label,t);return[i].concat(PL(a))}Gt.renderCallByParent=LL;function Va(e){"@babel/helpers - typeof";return Va=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Va(e)}function Xu(){return Xu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Xu.apply(this,arguments)}function Sy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ay(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Sy(Object(r),!0).forEach(function(n){RL(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Sy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function RL(e,t,r){return t=BL(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function BL(e){var t=FL(e,"string");return Va(t)=="symbol"?t:t+""}function FL(e,t){if(Va(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Va(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var WL=function(t,r){var n=Ct(r-t),a=Math.min(Math.abs(r-t),359.999);return n*a},Bo=function(t){var r=t.cx,n=t.cy,a=t.radius,i=t.angle,o=t.sign,s=t.isExternal,l=t.cornerRadius,u=t.cornerIsExternal,c=l*(s?1:-1)+a,f=Math.asin(l/c)/Lo,d=u?i:i+o*f,h=rt(r,n,c,d),y=rt(r,n,a,d),v=u?i-o*f:i,p=rt(r,n,c*Math.cos(f*Lo),v);return{center:h,circleTangency:y,lineTangency:p,theta:f}},Ty=function(t){var r=t.cx,n=t.cy,a=t.innerRadius,i=t.outerRadius,o=t.startAngle,s=t.endAngle,l=WL(o,s),u=o+l,c=rt(r,n,i,o),f=rt(r,n,i,u),d="M ".concat(c.x,",").concat(c.y,`
145
+ `).concat(b.x,",").concat(b.y),P=fe(t.id)?$r("recharts-radial-line-"):t.id;return T.createElement("text",Va({},n,{dominantBaseline:"central",className:ye("recharts-radial-bar-label",s)}),T.createElement("defs",null,T.createElement("path",{id:P,d:S})),T.createElement("textPath",{xlinkHref:"#".concat(P)},r))},mL=function(t){var r=t.viewBox,n=t.offset,a=t.position,i=r,o=i.cx,s=i.cy,l=i.innerRadius,u=i.outerRadius,c=i.startAngle,f=i.endAngle,d=(c+f)/2;if(a==="outside"){var h=rt(o,s,u+n,d),v=h.x,m=h.y;return{x:v,y:m,textAnchor:v>=o?"start":"end",verticalAnchor:"middle"}}if(a==="center")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(a==="centerTop")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"start"};if(a==="centerBottom")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"end"};var p=(l+u)/2,x=rt(o,s,p,d),O=x.x,w=x.y;return{x:O,y:w,textAnchor:"middle",verticalAnchor:"middle"}},gL=function(t){var r=t.viewBox,n=t.parentViewBox,a=t.offset,i=t.position,o=r,s=o.x,l=o.y,u=o.width,c=o.height,f=c>=0?1:-1,d=f*a,h=f>0?"end":"start",v=f>0?"start":"end",m=u>=0?1:-1,p=m*a,x=m>0?"end":"start",O=m>0?"start":"end";if(i==="top"){var w={x:s+u/2,y:l-f*a,textAnchor:"middle",verticalAnchor:h};return Je(Je({},w),n?{height:Math.max(l-n.y,0),width:u}:{})}if(i==="bottom"){var A={x:s+u/2,y:l+c+d,textAnchor:"middle",verticalAnchor:v};return Je(Je({},A),n?{height:Math.max(n.y+n.height-(l+c),0),width:u}:{})}if(i==="left"){var y={x:s-p,y:l+c/2,textAnchor:x,verticalAnchor:"middle"};return Je(Je({},y),n?{width:Math.max(y.x-n.x,0),height:c}:{})}if(i==="right"){var b={x:s+u+p,y:l+c/2,textAnchor:O,verticalAnchor:"middle"};return Je(Je({},b),n?{width:Math.max(n.x+n.width-b.x,0),height:c}:{})}var S=n?{width:u,height:c}:{};return i==="insideLeft"?Je({x:s+p,y:l+c/2,textAnchor:O,verticalAnchor:"middle"},S):i==="insideRight"?Je({x:s+u-p,y:l+c/2,textAnchor:x,verticalAnchor:"middle"},S):i==="insideTop"?Je({x:s+u/2,y:l+d,textAnchor:"middle",verticalAnchor:v},S):i==="insideBottom"?Je({x:s+u/2,y:l+c-d,textAnchor:"middle",verticalAnchor:h},S):i==="insideTopLeft"?Je({x:s+p,y:l+d,textAnchor:O,verticalAnchor:v},S):i==="insideTopRight"?Je({x:s+u-p,y:l+d,textAnchor:x,verticalAnchor:v},S):i==="insideBottomLeft"?Je({x:s+p,y:l+c-d,textAnchor:O,verticalAnchor:h},S):i==="insideBottomRight"?Je({x:s+u-p,y:l+c-d,textAnchor:x,verticalAnchor:h},S):rn(i)&&(Z(i.x)||jr(i.x))&&(Z(i.y)||jr(i.y))?Je({x:s+Cr(i.x,u),y:l+Cr(i.y,c),textAnchor:"end",verticalAnchor:"end"},S):Je({x:s+u/2,y:l+c/2,textAnchor:"middle",verticalAnchor:"middle"},S)},bL=function(t){return"cx"in t&&Z(t.cx)};function at(e){var t=e.offset,r=t===void 0?5:t,n=uL(e,nL),a=Je({offset:r},n),i=a.viewBox,o=a.position,s=a.value,l=a.children,u=a.content,c=a.className,f=c===void 0?"":c,d=a.textBreakAll;if(!i||fe(s)&&fe(l)&&!T.isValidElement(u)&&!he(u))return null;if(T.isValidElement(u))return T.cloneElement(u,a);var h;if(he(u)){if(h=T.createElement(u,a),T.isValidElement(h))return h}else h=pL(a);var v=bL(i),m=de(a,!0);if(v&&(o==="insideStart"||o==="insideEnd"||o==="end"))return yL(a,h,m);var p=v?mL(a):gL(a);return T.createElement(lo,Va({className:ye("recharts-label",f)},m,p,{breakAll:d}),h)}at.displayName="Label";var xy=function(t){var r=t.cx,n=t.cy,a=t.angle,i=t.startAngle,o=t.endAngle,s=t.r,l=t.radius,u=t.innerRadius,c=t.outerRadius,f=t.x,d=t.y,h=t.top,v=t.left,m=t.width,p=t.height,x=t.clockWise,O=t.labelViewBox;if(O)return O;if(Z(m)&&Z(p)){if(Z(f)&&Z(d))return{x:f,y:d,width:m,height:p};if(Z(h)&&Z(v))return{x:h,y:v,width:m,height:p}}return Z(f)&&Z(d)?{x:f,y:d,width:0,height:0}:Z(r)&&Z(n)?{cx:r,cy:n,startAngle:i||a||0,endAngle:o||a||0,innerRadius:u||0,outerRadius:c||l||s||0,clockWise:x}:t.viewBox?t.viewBox:{}},xL=function(t,r){return t?t===!0?T.createElement(at,{key:"label-implicit",viewBox:r}):Ye(t)?T.createElement(at,{key:"label-implicit",viewBox:r,value:t}):T.isValidElement(t)?t.type===at?T.cloneElement(t,{key:"label-implicit",viewBox:r}):T.createElement(at,{key:"label-implicit",content:t,viewBox:r}):he(t)?T.createElement(at,{key:"label-implicit",content:t,viewBox:r}):rn(t)?T.createElement(at,Va({viewBox:r},t,{key:"label-implicit"})):null:null},wL=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&n&&!t.label)return null;var a=t.children,i=xy(t),o=dt(a,at).map(function(l,u){return T.cloneElement(l,{viewBox:r||i,key:"label-".concat(u)})});if(!n)return o;var s=xL(t.label,r||i);return[s].concat(aL(o))};at.parseViewBox=xy,at.renderCallByParent=wL;function OL(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var SL=OL;const TL=Ce(SL);function qa(e){"@babel/helpers - typeof";return qa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qa(e)}var AL=["valueAccessor"],PL=["data","dataKey","clockWise","id","textBreakAll"];function _L(e){return CL(e)||$L(e)||jL(e)||EL()}function EL(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
146
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jL(e,t){if(e){if(typeof e=="string")return Yu(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Yu(e,t)}}function $L(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function CL(e){if(Array.isArray(e))return Yu(e)}function Yu(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ro(){return Ro=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ro.apply(this,arguments)}function wy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Oy(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wy(Object(r),!0).forEach(function(n){ML(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ML(e,t,r){return t=kL(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kL(e){var t=NL(e,"string");return qa(t)=="symbol"?t:t+""}function NL(e,t){if(qa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(qa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Sy(e,t){if(e==null)return{};var r=DL(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function DL(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var IL=function(t){return Array.isArray(t.value)?TL(t.value):t.value};function Gt(e){var t=e.valueAccessor,r=t===void 0?IL:t,n=Sy(e,AL),a=n.data,i=n.dataKey,o=n.clockWise,s=n.id,l=n.textBreakAll,u=Sy(n,PL);return!a||!a.length?null:T.createElement(xe,{className:"recharts-label-list"},a.map(function(c,f){var d=fe(i)?r(c,f):Ze(c&&c.payload,i),h=fe(s)?{}:{id:"".concat(s,"-").concat(f)};return T.createElement(at,Ro({},de(c,!0),u,h,{parentViewBox:c.parentViewBox,value:d,textBreakAll:l,viewBox:at.parseViewBox(fe(o)?c:Oy(Oy({},c),{},{clockWise:o})),key:"label-".concat(f),index:f}))}))}Gt.displayName="LabelList";function LL(e,t){return e?e===!0?T.createElement(Gt,{key:"labelList-implicit",data:t}):T.isValidElement(e)||he(e)?T.createElement(Gt,{key:"labelList-implicit",data:t,content:e}):rn(e)?T.createElement(Gt,Ro({data:t},e,{key:"labelList-implicit"})):null:null}function RL(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var n=e.children,a=dt(n,Gt).map(function(o,s){return T.cloneElement(o,{data:t,key:"labelList-".concat(s)})});if(!r)return a;var i=LL(e.label,t);return[i].concat(_L(a))}Gt.renderCallByParent=RL;function Ha(e){"@babel/helpers - typeof";return Ha=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ha(e)}function Xu(){return Xu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Xu.apply(this,arguments)}function Ty(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ay(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ty(Object(r),!0).forEach(function(n){BL(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ty(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function BL(e,t,r){return t=FL(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function FL(e){var t=WL(e,"string");return Ha(t)=="symbol"?t:t+""}function WL(e,t){if(Ha(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ha(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var UL=function(t,r){var n=Ct(r-t),a=Math.min(Math.abs(r-t),359.999);return n*a},Bo=function(t){var r=t.cx,n=t.cy,a=t.radius,i=t.angle,o=t.sign,s=t.isExternal,l=t.cornerRadius,u=t.cornerIsExternal,c=l*(s?1:-1)+a,f=Math.asin(l/c)/Lo,d=u?i:i+o*f,h=rt(r,n,c,d),v=rt(r,n,a,d),m=u?i-o*f:i,p=rt(r,n,c*Math.cos(f*Lo),m);return{center:h,circleTangency:v,lineTangency:p,theta:f}},Py=function(t){var r=t.cx,n=t.cy,a=t.innerRadius,i=t.outerRadius,o=t.startAngle,s=t.endAngle,l=UL(o,s),u=o+l,c=rt(r,n,i,o),f=rt(r,n,i,u),d="M ".concat(c.x,",").concat(c.y,`
142
147
  A `).concat(i,",").concat(i,`,0,
143
148
  `).concat(+(Math.abs(l)>180),",").concat(+(o>u),`,
144
149
  `).concat(f.x,",").concat(f.y,`
145
- `);if(a>0){var h=rt(r,n,a,o),y=rt(r,n,a,u);d+="L ".concat(y.x,",").concat(y.y,`
150
+ `);if(a>0){var h=rt(r,n,a,o),v=rt(r,n,a,u);d+="L ".concat(v.x,",").concat(v.y,`
146
151
  A `).concat(a,",").concat(a,`,0,
147
152
  `).concat(+(Math.abs(l)>180),",").concat(+(o<=u),`,
148
- `).concat(h.x,",").concat(h.y," Z")}else d+="L ".concat(r,",").concat(n," Z");return d},UL=function(t){var r=t.cx,n=t.cy,a=t.innerRadius,i=t.outerRadius,o=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,u=t.startAngle,c=t.endAngle,f=Ct(c-u),d=Bo({cx:r,cy:n,radius:i,angle:u,sign:f,cornerRadius:o,cornerIsExternal:l}),h=d.circleTangency,y=d.lineTangency,v=d.theta,p=Bo({cx:r,cy:n,radius:i,angle:c,sign:-f,cornerRadius:o,cornerIsExternal:l}),g=p.circleTangency,O=p.lineTangency,w=p.theta,A=l?Math.abs(u-c):Math.abs(u-c)-v-w;if(A<0)return s?"M ".concat(y.x,",").concat(y.y,`
153
+ `).concat(h.x,",").concat(h.y," Z")}else d+="L ".concat(r,",").concat(n," Z");return d},zL=function(t){var r=t.cx,n=t.cy,a=t.innerRadius,i=t.outerRadius,o=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,u=t.startAngle,c=t.endAngle,f=Ct(c-u),d=Bo({cx:r,cy:n,radius:i,angle:u,sign:f,cornerRadius:o,cornerIsExternal:l}),h=d.circleTangency,v=d.lineTangency,m=d.theta,p=Bo({cx:r,cy:n,radius:i,angle:c,sign:-f,cornerRadius:o,cornerIsExternal:l}),x=p.circleTangency,O=p.lineTangency,w=p.theta,A=l?Math.abs(u-c):Math.abs(u-c)-m-w;if(A<0)return s?"M ".concat(v.x,",").concat(v.y,`
149
154
  a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0
150
155
  a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0
151
- `):Ty({cx:r,cy:n,innerRadius:a,outerRadius:i,startAngle:u,endAngle:c});var m="M ".concat(y.x,",").concat(y.y,`
156
+ `):Py({cx:r,cy:n,innerRadius:a,outerRadius:i,startAngle:u,endAngle:c});var y="M ".concat(v.x,",").concat(v.y,`
152
157
  A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(h.x,",").concat(h.y,`
153
- A`).concat(i,",").concat(i,",0,").concat(+(A>180),",").concat(+(f<0),",").concat(g.x,",").concat(g.y,`
158
+ A`).concat(i,",").concat(i,",0,").concat(+(A>180),",").concat(+(f<0),",").concat(x.x,",").concat(x.y,`
154
159
  A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(O.x,",").concat(O.y,`
155
- `);if(a>0){var x=Bo({cx:r,cy:n,radius:a,angle:u,sign:f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),T=x.circleTangency,P=x.lineTangency,$=x.theta,k=Bo({cx:r,cy:n,radius:a,angle:c,sign:-f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),E=k.circleTangency,j=k.lineTangency,R=k.theta,N=l?Math.abs(u-c):Math.abs(u-c)-$-R;if(N<0&&o===0)return"".concat(m,"L").concat(r,",").concat(n,"Z");m+="L".concat(j.x,",").concat(j.y,`
156
- A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(E.x,",").concat(E.y,`
157
- A`).concat(a,",").concat(a,",0,").concat(+(N>180),",").concat(+(f>0),",").concat(T.x,",").concat(T.y,`
158
- A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(P.x,",").concat(P.y,"Z")}else m+="L".concat(r,",").concat(n,"Z");return m},zL={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},Py=function(t){var r=Ay(Ay({},zL),t),n=r.cx,a=r.cy,i=r.innerRadius,o=r.outerRadius,s=r.cornerRadius,l=r.forceCornerRadius,u=r.cornerIsExternal,c=r.startAngle,f=r.endAngle,d=r.className;if(o<i||c===f)return null;var h=ye("recharts-sector",d),y=o-i,v=Cr(s,y,0,!0),p;return v>0&&Math.abs(c-f)<360?p=UL({cx:n,cy:a,innerRadius:i,outerRadius:o,cornerRadius:Math.min(v,y/2),forceCornerRadius:l,cornerIsExternal:u,startAngle:c,endAngle:f}):p=Ty({cx:n,cy:a,innerRadius:i,outerRadius:o,startAngle:c,endAngle:f}),S.createElement("path",Xu({},de(r,!0),{className:h,d:p,role:"img"}))};function Ha(e){"@babel/helpers - typeof";return Ha=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ha(e)}function Ju(){return Ju=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ju.apply(this,arguments)}function _y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ey(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_y(Object(r),!0).forEach(function(n){KL(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_y(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function KL(e,t,r){return t=GL(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function GL(e){var t=qL(e,"string");return Ha(t)=="symbol"?t:t+""}function qL(e,t){if(Ha(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ha(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var jy={curveBasisClosed:KS,curveBasisOpen:GS,curveBasis:zS,curveBumpX:jS,curveBumpY:$S,curveLinearClosed:qS,curveLinear:Fi,curveMonotoneX:VS,curveMonotoneY:HS,curveNatural:YS,curveStep:XS,curveStepAfter:ZS,curveStepBefore:JS},Fo=function(t){return t.x===+t.x&&t.y===+t.y},Ya=function(t){return t.x},Xa=function(t){return t.y},VL=function(t,r){if(he(t))return t;var n="curve".concat(Ii(t));return(n==="curveMonotone"||n==="curveBump")&&r?jy["".concat(n).concat(r==="vertical"?"Y":"X")]:jy[n]||Fi},HL=function(t){var r=t.type,n=r===void 0?"linear":r,a=t.points,i=a===void 0?[]:a,o=t.baseLine,s=t.layout,l=t.connectNulls,u=l===void 0?!1:l,c=VL(n,s),f=u?i.filter(function(v){return Fo(v)}):i,d;if(Array.isArray(o)){var h=u?o.filter(function(v){return Fo(v)}):o,y=f.map(function(v,p){return Ey(Ey({},v),{},{base:h[p]})});return s==="vertical"?d=Wi().y(Xa).x1(Ya).x0(function(v){return v.base.x}):d=Wi().x(Ya).y1(Xa).y0(function(v){return v.base.y}),d.defined(Fo).curve(c),d(y)}return s==="vertical"&&J(o)?d=Wi().y(Xa).x1(Ya).x0(o):J(o)?d=Wi().x(Ya).y1(Xa).y0(o):d=pd().x(Ya).y(Xa),d.defined(Fo).curve(c),d(f)},Kr=function(t){var r=t.className,n=t.points,a=t.path,i=t.pathRef;if((!n||!n.length)&&!a)return null;var o=n&&n.length?HL(t):a;return xt.createElement("path",Ju({},de(t,!1),Di(t),{className:ye("recharts-curve",r),d:o,ref:i}))},Zu={exports:{}},Wo={exports:{}},Se={};/** @license React v16.13.1
160
+ `);if(a>0){var b=Bo({cx:r,cy:n,radius:a,angle:u,sign:f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),S=b.circleTangency,P=b.lineTangency,$=b.theta,M=Bo({cx:r,cy:n,radius:a,angle:c,sign:-f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),_=M.circleTangency,j=M.lineTangency,R=M.theta,k=l?Math.abs(u-c):Math.abs(u-c)-$-R;if(k<0&&o===0)return"".concat(y,"L").concat(r,",").concat(n,"Z");y+="L".concat(j.x,",").concat(j.y,`
161
+ A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(_.x,",").concat(_.y,`
162
+ A`).concat(a,",").concat(a,",0,").concat(+(k>180),",").concat(+(f>0),",").concat(S.x,",").concat(S.y,`
163
+ A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(P.x,",").concat(P.y,"Z")}else y+="L".concat(r,",").concat(n,"Z");return y},KL={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},_y=function(t){var r=Ay(Ay({},KL),t),n=r.cx,a=r.cy,i=r.innerRadius,o=r.outerRadius,s=r.cornerRadius,l=r.forceCornerRadius,u=r.cornerIsExternal,c=r.startAngle,f=r.endAngle,d=r.className;if(o<i||c===f)return null;var h=ye("recharts-sector",d),v=o-i,m=Cr(s,v,0,!0),p;return m>0&&Math.abs(c-f)<360?p=zL({cx:n,cy:a,innerRadius:i,outerRadius:o,cornerRadius:Math.min(m,v/2),forceCornerRadius:l,cornerIsExternal:u,startAngle:c,endAngle:f}):p=Py({cx:n,cy:a,innerRadius:i,outerRadius:o,startAngle:c,endAngle:f}),T.createElement("path",Xu({},de(r,!0),{className:h,d:p,role:"img"}))};function Ya(e){"@babel/helpers - typeof";return Ya=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ya(e)}function Zu(){return Zu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Zu.apply(this,arguments)}function Ey(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function jy(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ey(Object(r),!0).forEach(function(n){GL(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ey(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function GL(e,t,r){return t=VL(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function VL(e){var t=qL(e,"string");return Ya(t)=="symbol"?t:t+""}function qL(e,t){if(Ya(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ya(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var $y={curveBasisClosed:GS,curveBasisOpen:VS,curveBasis:KS,curveBumpX:$S,curveBumpY:CS,curveLinearClosed:qS,curveLinear:Fi,curveMonotoneX:HS,curveMonotoneY:YS,curveNatural:XS,curveStep:ZS,curveStepAfter:QS,curveStepBefore:JS},Fo=function(t){return t.x===+t.x&&t.y===+t.y},Xa=function(t){return t.x},Za=function(t){return t.y},HL=function(t,r){if(he(t))return t;var n="curve".concat(Ii(t));return(n==="curveMonotone"||n==="curveBump")&&r?$y["".concat(n).concat(r==="vertical"?"Y":"X")]:$y[n]||Fi},YL=function(t){var r=t.type,n=r===void 0?"linear":r,a=t.points,i=a===void 0?[]:a,o=t.baseLine,s=t.layout,l=t.connectNulls,u=l===void 0?!1:l,c=HL(n,s),f=u?i.filter(function(m){return Fo(m)}):i,d;if(Array.isArray(o)){var h=u?o.filter(function(m){return Fo(m)}):o,v=f.map(function(m,p){return jy(jy({},m),{},{base:h[p]})});return s==="vertical"?d=Wi().y(Za).x1(Xa).x0(function(m){return m.base.x}):d=Wi().x(Xa).y1(Za).y0(function(m){return m.base.y}),d.defined(Fo).curve(c),d(v)}return s==="vertical"&&Z(o)?d=Wi().y(Za).x1(Xa).x0(o):Z(o)?d=Wi().x(Xa).y1(Za).y0(o):d=vd().x(Xa).y(Za),d.defined(Fo).curve(c),d(f)},Kr=function(t){var r=t.className,n=t.points,a=t.path,i=t.pathRef;if((!n||!n.length)&&!a)return null;var o=n&&n.length?YL(t):a;return xt.createElement("path",Zu({},de(t,!1),Di(t),{className:ye("recharts-curve",r),d:o,ref:i}))},Ju={exports:{}},Wo={exports:{}},Se={};/** @license React v16.13.1
159
164
  * react-is.production.min.js
160
165
  *
161
166
  * Copyright (c) Facebook, Inc. and its affiliates.
162
167
  *
163
168
  * This source code is licensed under the MIT license found in the
164
169
  * LICENSE file in the root directory of this source tree.
165
- */var $y;function YL(){if($y)return Se;$y=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,p=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,O=e?Symbol.for("react.scope"):60119;function w(m){if(typeof m=="object"&&m!==null){var x=m.$$typeof;switch(x){case t:switch(m=m.type,m){case l:case u:case n:case i:case a:case f:return m;default:switch(m=m&&m.$$typeof,m){case s:case c:case y:case h:case o:return m;default:return x}}case r:return x}}}function A(m){return w(m)===u}return Se.AsyncMode=l,Se.ConcurrentMode=u,Se.ContextConsumer=s,Se.ContextProvider=o,Se.Element=t,Se.ForwardRef=c,Se.Fragment=n,Se.Lazy=y,Se.Memo=h,Se.Portal=r,Se.Profiler=i,Se.StrictMode=a,Se.Suspense=f,Se.isAsyncMode=function(m){return A(m)||w(m)===l},Se.isConcurrentMode=A,Se.isContextConsumer=function(m){return w(m)===s},Se.isContextProvider=function(m){return w(m)===o},Se.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===t},Se.isForwardRef=function(m){return w(m)===c},Se.isFragment=function(m){return w(m)===n},Se.isLazy=function(m){return w(m)===y},Se.isMemo=function(m){return w(m)===h},Se.isPortal=function(m){return w(m)===r},Se.isProfiler=function(m){return w(m)===i},Se.isStrictMode=function(m){return w(m)===a},Se.isSuspense=function(m){return w(m)===f},Se.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===n||m===u||m===i||m===a||m===f||m===d||typeof m=="object"&&m!==null&&(m.$$typeof===y||m.$$typeof===h||m.$$typeof===o||m.$$typeof===s||m.$$typeof===c||m.$$typeof===p||m.$$typeof===g||m.$$typeof===O||m.$$typeof===v)},Se.typeOf=w,Se}var Ae={};/** @license React v16.13.1
170
+ */var Cy;function XL(){if(Cy)return Se;Cy=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,p=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,O=e?Symbol.for("react.scope"):60119;function w(y){if(typeof y=="object"&&y!==null){var b=y.$$typeof;switch(b){case t:switch(y=y.type,y){case l:case u:case n:case i:case a:case f:return y;default:switch(y=y&&y.$$typeof,y){case s:case c:case v:case h:case o:return y;default:return b}}case r:return b}}}function A(y){return w(y)===u}return Se.AsyncMode=l,Se.ConcurrentMode=u,Se.ContextConsumer=s,Se.ContextProvider=o,Se.Element=t,Se.ForwardRef=c,Se.Fragment=n,Se.Lazy=v,Se.Memo=h,Se.Portal=r,Se.Profiler=i,Se.StrictMode=a,Se.Suspense=f,Se.isAsyncMode=function(y){return A(y)||w(y)===l},Se.isConcurrentMode=A,Se.isContextConsumer=function(y){return w(y)===s},Se.isContextProvider=function(y){return w(y)===o},Se.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===t},Se.isForwardRef=function(y){return w(y)===c},Se.isFragment=function(y){return w(y)===n},Se.isLazy=function(y){return w(y)===v},Se.isMemo=function(y){return w(y)===h},Se.isPortal=function(y){return w(y)===r},Se.isProfiler=function(y){return w(y)===i},Se.isStrictMode=function(y){return w(y)===a},Se.isSuspense=function(y){return w(y)===f},Se.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===n||y===u||y===i||y===a||y===f||y===d||typeof y=="object"&&y!==null&&(y.$$typeof===v||y.$$typeof===h||y.$$typeof===o||y.$$typeof===s||y.$$typeof===c||y.$$typeof===p||y.$$typeof===x||y.$$typeof===O||y.$$typeof===m)},Se.typeOf=w,Se}var Te={};/** @license React v16.13.1
166
171
  * react-is.development.js
167
172
  *
168
173
  * Copyright (c) Facebook, Inc. and its affiliates.
169
174
  *
170
175
  * This source code is licensed under the MIT license found in the
171
176
  * LICENSE file in the root directory of this source tree.
172
- */var Cy;function XL(){return Cy||(Cy=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,p=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,O=e?Symbol.for("react.scope"):60119;function w(D){return typeof D=="string"||typeof D=="function"||D===n||D===u||D===i||D===a||D===f||D===d||typeof D=="object"&&D!==null&&(D.$$typeof===y||D.$$typeof===h||D.$$typeof===o||D.$$typeof===s||D.$$typeof===c||D.$$typeof===p||D.$$typeof===g||D.$$typeof===O||D.$$typeof===v)}function A(D){if(typeof D=="object"&&D!==null){var ie=D.$$typeof;switch(ie){case t:var V=D.type;switch(V){case l:case u:case n:case i:case a:case f:return V;default:var se=V&&V.$$typeof;switch(se){case s:case c:case y:case h:case o:return se;default:return ie}}case r:return ie}}}var m=l,x=u,T=s,P=o,$=t,k=c,E=n,j=y,R=h,N=r,I=i,C=a,B=f,U=!1;function K(D){return U||(U=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),_(D)||A(D)===l}function _(D){return A(D)===u}function L(D){return A(D)===s}function F(D){return A(D)===o}function W(D){return typeof D=="object"&&D!==null&&D.$$typeof===t}function G(D){return A(D)===c}function X(D){return A(D)===n}function Q(D){return A(D)===y}function ae(D){return A(D)===h}function te(D){return A(D)===r}function q(D){return A(D)===i}function Y(D){return A(D)===a}function Z(D){return A(D)===f}Ae.AsyncMode=m,Ae.ConcurrentMode=x,Ae.ContextConsumer=T,Ae.ContextProvider=P,Ae.Element=$,Ae.ForwardRef=k,Ae.Fragment=E,Ae.Lazy=j,Ae.Memo=R,Ae.Portal=N,Ae.Profiler=I,Ae.StrictMode=C,Ae.Suspense=B,Ae.isAsyncMode=K,Ae.isConcurrentMode=_,Ae.isContextConsumer=L,Ae.isContextProvider=F,Ae.isElement=W,Ae.isForwardRef=G,Ae.isFragment=X,Ae.isLazy=Q,Ae.isMemo=ae,Ae.isPortal=te,Ae.isProfiler=q,Ae.isStrictMode=Y,Ae.isSuspense=Z,Ae.isValidElementType=w,Ae.typeOf=A}()),Ae}var My;function ky(){return My||(My=1,process.env.NODE_ENV==="production"?Wo.exports=YL():Wo.exports=XL()),Wo.exports}/*
177
+ */var My;function ZL(){return My||(My=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,p=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,O=e?Symbol.for("react.scope"):60119;function w(I){return typeof I=="string"||typeof I=="function"||I===n||I===u||I===i||I===a||I===f||I===d||typeof I=="object"&&I!==null&&(I.$$typeof===v||I.$$typeof===h||I.$$typeof===o||I.$$typeof===s||I.$$typeof===c||I.$$typeof===p||I.$$typeof===x||I.$$typeof===O||I.$$typeof===m)}function A(I){if(typeof I=="object"&&I!==null){var ie=I.$$typeof;switch(ie){case t:var q=I.type;switch(q){case l:case u:case n:case i:case a:case f:return q;default:var se=q&&q.$$typeof;switch(se){case s:case c:case v:case h:case o:return se;default:return ie}}case r:return ie}}}var y=l,b=u,S=s,P=o,$=t,M=c,_=n,j=v,R=h,k=r,D=i,C=a,B=f,U=!1;function K(I){return U||(U=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),E(I)||A(I)===l}function E(I){return A(I)===u}function L(I){return A(I)===s}function F(I){return A(I)===o}function W(I){return typeof I=="object"&&I!==null&&I.$$typeof===t}function G(I){return A(I)===c}function X(I){return A(I)===n}function Q(I){return A(I)===v}function ae(I){return A(I)===h}function te(I){return A(I)===r}function V(I){return A(I)===i}function Y(I){return A(I)===a}function J(I){return A(I)===f}Te.AsyncMode=y,Te.ConcurrentMode=b,Te.ContextConsumer=S,Te.ContextProvider=P,Te.Element=$,Te.ForwardRef=M,Te.Fragment=_,Te.Lazy=j,Te.Memo=R,Te.Portal=k,Te.Profiler=D,Te.StrictMode=C,Te.Suspense=B,Te.isAsyncMode=K,Te.isConcurrentMode=E,Te.isContextConsumer=L,Te.isContextProvider=F,Te.isElement=W,Te.isForwardRef=G,Te.isFragment=X,Te.isLazy=Q,Te.isMemo=ae,Te.isPortal=te,Te.isProfiler=V,Te.isStrictMode=Y,Te.isSuspense=J,Te.isValidElementType=w,Te.typeOf=A}()),Te}var ky;function Ny(){return ky||(ky=1,process.env.NODE_ENV==="production"?Wo.exports=XL():Wo.exports=ZL()),Wo.exports}/*
173
178
  object-assign
174
179
  (c) Sindre Sorhus
175
180
  @license MIT
176
- */var Qu,Ny;function JL(){if(Ny)return Qu;Ny=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function a(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var o={},s=0;s<10;s++)o["_"+String.fromCharCode(s)]=s;var l=Object.getOwnPropertyNames(o).map(function(c){return o[c]});if(l.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(c){u[c]=c}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Qu=a()?Object.assign:function(i,o){for(var s,l=n(i),u,c=1;c<arguments.length;c++){s=Object(arguments[c]);for(var f in s)t.call(s,f)&&(l[f]=s[f]);if(e){u=e(s);for(var d=0;d<u.length;d++)r.call(s,u[d])&&(l[u[d]]=s[u[d]])}}return l},Qu}var ec,Dy;function tc(){if(Dy)return ec;Dy=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ec=e,ec}var rc,Iy;function Ly(){return Iy||(Iy=1,rc=Function.call.bind(Object.prototype.hasOwnProperty)),rc}var nc,Ry;function ZL(){if(Ry)return nc;Ry=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=tc(),r={},n=Ly();e=function(i){var o="Warning: "+i;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function a(i,o,s,l,u){if(process.env.NODE_ENV!=="production"){for(var c in i)if(n(i,c)){var f;try{if(typeof i[c]!="function"){var d=Error((l||"React class")+": "+s+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}f=i[c](o,c,l,s,null,t)}catch(y){f=y}if(f&&!(f instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in r)){r[f.message]=!0;var h=u?u():"";e("Failed "+s+" type: "+f.message+(h??""))}}}}return a.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},nc=a,nc}var ac,By;function QL(){if(By)return ac;By=1;var e=ky(),t=JL(),r=tc(),n=Ly(),a=ZL(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function o(){return null}return ac=function(s,l){var u=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function f(_){var L=_&&(u&&_[u]||_[c]);if(typeof L=="function")return L}var d="<<anonymous>>",h={array:g("array"),bigint:g("bigint"),bool:g("boolean"),func:g("function"),number:g("number"),object:g("object"),string:g("string"),symbol:g("symbol"),any:O(),arrayOf:w,element:A(),elementType:m(),instanceOf:x,node:k(),objectOf:P,oneOf:T,oneOfType:$,shape:j,exact:R};function y(_,L){return _===L?_!==0||1/_===1/L:_!==_&&L!==L}function v(_,L){this.message=_,this.data=L&&typeof L=="object"?L:{},this.stack=""}v.prototype=Error.prototype;function p(_){if(process.env.NODE_ENV!=="production")var L={},F=0;function W(X,Q,ae,te,q,Y,Z){if(te=te||d,Y=Y||ae,Z!==r){if(l){var D=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw D.name="Invariant Violation",D}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ie=te+":"+ae;!L[ie]&&F<3&&(i("You are manually calling a React.PropTypes validation function for the `"+Y+"` prop on `"+te+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),L[ie]=!0,F++)}}return Q[ae]==null?X?Q[ae]===null?new v("The "+q+" `"+Y+"` is marked as required "+("in `"+te+"`, but its value is `null`.")):new v("The "+q+" `"+Y+"` is marked as required in "+("`"+te+"`, but its value is `undefined`.")):null:_(Q,ae,te,q,Y)}var G=W.bind(null,!1);return G.isRequired=W.bind(null,!0),G}function g(_){function L(F,W,G,X,Q,ae){var te=F[W],q=C(te);if(q!==_){var Y=B(te);return new v("Invalid "+X+" `"+Q+"` of type "+("`"+Y+"` supplied to `"+G+"`, expected ")+("`"+_+"`."),{expectedType:_})}return null}return p(L)}function O(){return p(o)}function w(_){function L(F,W,G,X,Q){if(typeof _!="function")return new v("Property `"+Q+"` of component `"+G+"` has invalid PropType notation inside arrayOf.");var ae=F[W];if(!Array.isArray(ae)){var te=C(ae);return new v("Invalid "+X+" `"+Q+"` of type "+("`"+te+"` supplied to `"+G+"`, expected an array."))}for(var q=0;q<ae.length;q++){var Y=_(ae,q,G,X,Q+"["+q+"]",r);if(Y instanceof Error)return Y}return null}return p(L)}function A(){function _(L,F,W,G,X){var Q=L[F];if(!s(Q)){var ae=C(Q);return new v("Invalid "+G+" `"+X+"` of type "+("`"+ae+"` supplied to `"+W+"`, expected a single ReactElement."))}return null}return p(_)}function m(){function _(L,F,W,G,X){var Q=L[F];if(!e.isValidElementType(Q)){var ae=C(Q);return new v("Invalid "+G+" `"+X+"` of type "+("`"+ae+"` supplied to `"+W+"`, expected a single ReactElement type."))}return null}return p(_)}function x(_){function L(F,W,G,X,Q){if(!(F[W]instanceof _)){var ae=_.name||d,te=K(F[W]);return new v("Invalid "+X+" `"+Q+"` of type "+("`"+te+"` supplied to `"+G+"`, expected ")+("instance of `"+ae+"`."))}return null}return p(L)}function T(_){if(!Array.isArray(_))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),o;function L(F,W,G,X,Q){for(var ae=F[W],te=0;te<_.length;te++)if(y(ae,_[te]))return null;var q=JSON.stringify(_,function(Z,D){var ie=B(D);return ie==="symbol"?String(D):D});return new v("Invalid "+X+" `"+Q+"` of value `"+String(ae)+"` "+("supplied to `"+G+"`, expected one of "+q+"."))}return p(L)}function P(_){function L(F,W,G,X,Q){if(typeof _!="function")return new v("Property `"+Q+"` of component `"+G+"` has invalid PropType notation inside objectOf.");var ae=F[W],te=C(ae);if(te!=="object")return new v("Invalid "+X+" `"+Q+"` of type "+("`"+te+"` supplied to `"+G+"`, expected an object."));for(var q in ae)if(n(ae,q)){var Y=_(ae,q,G,X,Q+"."+q,r);if(Y instanceof Error)return Y}return null}return p(L)}function $(_){if(!Array.isArray(_))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var L=0;L<_.length;L++){var F=_[L];if(typeof F!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+U(F)+" at index "+L+"."),o}function W(G,X,Q,ae,te){for(var q=[],Y=0;Y<_.length;Y++){var Z=_[Y],D=Z(G,X,Q,ae,te,r);if(D==null)return null;D.data&&n(D.data,"expectedType")&&q.push(D.data.expectedType)}var ie=q.length>0?", expected one of type ["+q.join(", ")+"]":"";return new v("Invalid "+ae+" `"+te+"` supplied to "+("`"+Q+"`"+ie+"."))}return p(W)}function k(){function _(L,F,W,G,X){return N(L[F])?null:new v("Invalid "+G+" `"+X+"` supplied to "+("`"+W+"`, expected a ReactNode."))}return p(_)}function E(_,L,F,W,G){return new v((_||"React class")+": "+L+" type `"+F+"."+W+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+G+"`.")}function j(_){function L(F,W,G,X,Q){var ae=F[W],te=C(ae);if(te!=="object")return new v("Invalid "+X+" `"+Q+"` of type `"+te+"` "+("supplied to `"+G+"`, expected `object`."));for(var q in _){var Y=_[q];if(typeof Y!="function")return E(G,X,Q,q,B(Y));var Z=Y(ae,q,G,X,Q+"."+q,r);if(Z)return Z}return null}return p(L)}function R(_){function L(F,W,G,X,Q){var ae=F[W],te=C(ae);if(te!=="object")return new v("Invalid "+X+" `"+Q+"` of type `"+te+"` "+("supplied to `"+G+"`, expected `object`."));var q=t({},F[W],_);for(var Y in q){var Z=_[Y];if(n(_,Y)&&typeof Z!="function")return E(G,X,Q,Y,B(Z));if(!Z)return new v("Invalid "+X+" `"+Q+"` key `"+Y+"` supplied to `"+G+"`.\nBad object: "+JSON.stringify(F[W],null," ")+`
177
- Valid keys: `+JSON.stringify(Object.keys(_),null," "));var D=Z(ae,Y,G,X,Q+"."+Y,r);if(D)return D}return null}return p(L)}function N(_){switch(typeof _){case"number":case"string":case"undefined":return!0;case"boolean":return!_;case"object":if(Array.isArray(_))return _.every(N);if(_===null||s(_))return!0;var L=f(_);if(L){var F=L.call(_),W;if(L!==_.entries){for(;!(W=F.next()).done;)if(!N(W.value))return!1}else for(;!(W=F.next()).done;){var G=W.value;if(G&&!N(G[1]))return!1}}else return!1;return!0;default:return!1}}function I(_,L){return _==="symbol"?!0:L?L["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&L instanceof Symbol:!1}function C(_){var L=typeof _;return Array.isArray(_)?"array":_ instanceof RegExp?"object":I(L,_)?"symbol":L}function B(_){if(typeof _>"u"||_===null)return""+_;var L=C(_);if(L==="object"){if(_ instanceof Date)return"date";if(_ instanceof RegExp)return"regexp"}return L}function U(_){var L=B(_);switch(L){case"array":case"object":return"an "+L;case"boolean":case"date":case"regexp":return"a "+L;default:return L}}function K(_){return!_.constructor||!_.constructor.name?d:_.constructor.name}return h.checkPropTypes=a,h.resetWarningCache=a.resetWarningCache,h.PropTypes=h,h},ac}var ic,Fy;function e3(){if(Fy)return ic;Fy=1;var e=tc();function t(){}function r(){}return r.resetWarningCache=t,ic=function(){function n(o,s,l,u,c,f){if(f!==e){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}n.isRequired=n;function a(){return n}var i={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:a,element:n,elementType:n,instanceOf:a,node:n,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:r,resetWarningCache:t};return i.PropTypes=i,i},ic}if(process.env.NODE_ENV!=="production"){var t3=ky(),r3=!0;Zu.exports=QL()(t3.isElement,r3)}else Zu.exports=e3()();var n3=Zu.exports;const Te=Ce(n3);var a3=Object.getOwnPropertyNames,i3=Object.getOwnPropertySymbols,o3=Object.prototype.hasOwnProperty;function Wy(e,t){return function(n,a,i){return e(n,a,i)&&t(n,a,i)}}function Uo(e){return function(r,n,a){if(!r||!n||typeof r!="object"||typeof n!="object")return e(r,n,a);var i=a.cache,o=i.get(r),s=i.get(n);if(o&&s)return o===n&&s===r;i.set(r,n),i.set(n,r);var l=e(r,n,a);return i.delete(r),i.delete(n),l}}function Uy(e){return a3(e).concat(i3(e))}var s3=Object.hasOwn||function(e,t){return o3.call(e,t)};function Gr(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var l3="__v",u3="__o",c3="_owner",zy=Object.getOwnPropertyDescriptor,Ky=Object.keys;function f3(e,t,r){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function d3(e,t){return Gr(e.getTime(),t.getTime())}function h3(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function p3(e,t){return e===t}function Gy(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var a=new Array(n),i=e.entries(),o,s,l=0;(o=i.next())&&!o.done;){for(var u=t.entries(),c=!1,f=0;(s=u.next())&&!s.done;){if(a[f]){f++;continue}var d=o.value,h=s.value;if(r.equals(d[0],h[0],l,f,e,t,r)&&r.equals(d[1],h[1],d[0],h[0],e,t,r)){c=a[f]=!0;break}f++}if(!c)return!1;l++}return!0}var v3=Gr;function y3(e,t,r){var n=Ky(e),a=n.length;if(Ky(t).length!==a)return!1;for(;a-- >0;)if(!Vy(e,t,r,n[a]))return!1;return!0}function Ja(e,t,r){var n=Uy(e),a=n.length;if(Uy(t).length!==a)return!1;for(var i,o,s;a-- >0;)if(i=n[a],!Vy(e,t,r,i)||(o=zy(e,i),s=zy(t,i),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function m3(e,t){return Gr(e.valueOf(),t.valueOf())}function g3(e,t){return e.source===t.source&&e.flags===t.flags}function qy(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var a=new Array(n),i=e.values(),o,s;(o=i.next())&&!o.done;){for(var l=t.values(),u=!1,c=0;(s=l.next())&&!s.done;){if(!a[c]&&r.equals(o.value,s.value,o.value,s.value,e,t,r)){u=a[c]=!0;break}c++}if(!u)return!1}return!0}function b3(e,t){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function x3(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function Vy(e,t,r,n){return(n===c3||n===u3||n===l3)&&(e.$$typeof||t.$$typeof)?!0:s3(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}var w3="[object Arguments]",O3="[object Boolean]",S3="[object Date]",A3="[object Error]",T3="[object Map]",P3="[object Number]",_3="[object Object]",E3="[object RegExp]",j3="[object Set]",$3="[object String]",C3="[object URL]",M3=Array.isArray,Hy=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,Yy=Object.assign,k3=Object.prototype.toString.call.bind(Object.prototype.toString);function N3(e){var t=e.areArraysEqual,r=e.areDatesEqual,n=e.areErrorsEqual,a=e.areFunctionsEqual,i=e.areMapsEqual,o=e.areNumbersEqual,s=e.areObjectsEqual,l=e.arePrimitiveWrappersEqual,u=e.areRegExpsEqual,c=e.areSetsEqual,f=e.areTypedArraysEqual,d=e.areUrlsEqual;return function(y,v,p){if(y===v)return!0;if(y==null||v==null)return!1;var g=typeof y;if(g!==typeof v)return!1;if(g!=="object")return g==="number"?o(y,v,p):g==="function"?a(y,v,p):!1;var O=y.constructor;if(O!==v.constructor)return!1;if(O===Object)return s(y,v,p);if(M3(y))return t(y,v,p);if(Hy!=null&&Hy(y))return f(y,v,p);if(O===Date)return r(y,v,p);if(O===RegExp)return u(y,v,p);if(O===Map)return i(y,v,p);if(O===Set)return c(y,v,p);var w=k3(y);return w===S3?r(y,v,p):w===E3?u(y,v,p):w===T3?i(y,v,p):w===j3?c(y,v,p):w===_3?typeof y.then!="function"&&typeof v.then!="function"&&s(y,v,p):w===C3?d(y,v,p):w===A3?n(y,v,p):w===w3?s(y,v,p):w===O3||w===P3||w===$3?l(y,v,p):!1}}function D3(e){var t=e.circular,r=e.createCustomConfig,n=e.strict,a={areArraysEqual:n?Ja:f3,areDatesEqual:d3,areErrorsEqual:h3,areFunctionsEqual:p3,areMapsEqual:n?Wy(Gy,Ja):Gy,areNumbersEqual:v3,areObjectsEqual:n?Ja:y3,arePrimitiveWrappersEqual:m3,areRegExpsEqual:g3,areSetsEqual:n?Wy(qy,Ja):qy,areTypedArraysEqual:n?Ja:b3,areUrlsEqual:x3};if(r&&(a=Yy({},a,r(a))),t){var i=Uo(a.areArraysEqual),o=Uo(a.areMapsEqual),s=Uo(a.areObjectsEqual),l=Uo(a.areSetsEqual);a=Yy({},a,{areArraysEqual:i,areMapsEqual:o,areObjectsEqual:s,areSetsEqual:l})}return a}function I3(e){return function(t,r,n,a,i,o,s){return e(t,r,s)}}function L3(e){var t=e.circular,r=e.comparator,n=e.createState,a=e.equals,i=e.strict;if(n)return function(l,u){var c=n(),f=c.cache,d=f===void 0?t?new WeakMap:void 0:f,h=c.meta;return r(l,u,{cache:d,equals:a,meta:h,strict:i})};if(t)return function(l,u){return r(l,u,{cache:new WeakMap,equals:a,meta:void 0,strict:i})};var o={cache:void 0,equals:a,meta:void 0,strict:i};return function(l,u){return r(l,u,o)}}var R3=wr();wr({strict:!0}),wr({circular:!0}),wr({circular:!0,strict:!0}),wr({createInternalComparator:function(){return Gr}}),wr({strict:!0,createInternalComparator:function(){return Gr}}),wr({circular:!0,createInternalComparator:function(){return Gr}}),wr({circular:!0,createInternalComparator:function(){return Gr},strict:!0});function wr(e){e===void 0&&(e={});var t=e.circular,r=t===void 0?!1:t,n=e.createInternalComparator,a=e.createState,i=e.strict,o=i===void 0?!1:i,s=D3(e),l=N3(s),u=n?n(l):I3(l);return L3({circular:r,comparator:l,createState:a,equals:u,strict:o})}function B3(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function Xy(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function a(i){r<0&&(r=i),i-r>t?(e(i),r=-1):B3(a)};requestAnimationFrame(n)}function oc(e){"@babel/helpers - typeof";return oc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oc(e)}function F3(e){return K3(e)||z3(e)||U3(e)||W3()}function W3(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
178
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function U3(e,t){if(e){if(typeof e=="string")return Jy(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Jy(e,t)}}function Jy(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function z3(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function K3(e){if(Array.isArray(e))return e}function G3(){var e={},t=function(){return null},r=!1,n=function a(i){if(!r){if(Array.isArray(i)){if(!i.length)return;var o=i,s=F3(o),l=s[0],u=s.slice(1);if(typeof l=="number"){Xy(a.bind(null,u),l);return}a(l),Xy(a.bind(null,u));return}oc(i)==="object"&&(e=i,t(e)),typeof i=="function"&&i()}};return{stop:function(){r=!0},start:function(i){r=!1,n(i)},subscribe:function(i){return t=i,function(){t=function(){return null}}}}}function Za(e){"@babel/helpers - typeof";return Za=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Za(e)}function Zy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Qy(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Zy(Object(r),!0).forEach(function(n){em(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function em(e,t,r){return t=q3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function q3(e){var t=V3(e,"string");return Za(t)==="symbol"?t:String(t)}function V3(e,t){if(Za(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Za(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var H3=function(t,r){return[Object.keys(t),Object.keys(r)].reduce(function(n,a){return n.filter(function(i){return a.includes(i)})})},Y3=function(t){return t},X3=function(t){return t.replace(/([A-Z])/g,function(r){return"-".concat(r.toLowerCase())})},Qa=function(t,r){return Object.keys(r).reduce(function(n,a){return Qy(Qy({},n),{},em({},a,t(a,r[a])))},{})},tm=function(t,r,n){return t.map(function(a){return"".concat(X3(a)," ").concat(r,"ms ").concat(n)}).join(",")},J3=process.env.NODE_ENV!=="production",zo=function(t,r,n,a,i,o,s,l){if(J3&&typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,a,i,o,s,l],c=0;console.warn(r.replace(/%s/g,function(){return u[c++]}))}};function Z3(e,t){return tR(e)||eR(e,t)||rm(e,t)||Q3()}function Q3(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
179
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eR(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function tR(e){if(Array.isArray(e))return e}function rR(e){return iR(e)||aR(e)||rm(e)||nR()}function nR(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
180
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rm(e,t){if(e){if(typeof e=="string")return sc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return sc(e,t)}}function aR(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function iR(e){if(Array.isArray(e))return sc(e)}function sc(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Ko=1e-4,nm=function(t,r){return[0,3*t,3*r-6*t,3*t-3*r+1]},am=function(t,r){return t.map(function(n,a){return n*Math.pow(r,a)}).reduce(function(n,a){return n+a})},im=function(t,r){return function(n){var a=nm(t,r);return am(a,n)}},oR=function(t,r){return function(n){var a=nm(t,r),i=[].concat(rR(a.map(function(o,s){return o*s}).slice(1)),[0]);return am(i,n)}},om=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var a=r[0],i=r[1],o=r[2],s=r[3];if(r.length===1)switch(r[0]){case"linear":a=0,i=0,o=1,s=1;break;case"ease":a=.25,i=.1,o=.25,s=1;break;case"ease-in":a=.42,i=0,o=1,s=1;break;case"ease-out":a=.42,i=0,o=.58,s=1;break;case"ease-in-out":a=0,i=0,o=.58,s=1;break;default:{var l=r[0].split("(");if(l[0]==="cubic-bezier"&&l[1].split(")")[0].split(",").length===4){var u=l[1].split(")")[0].split(",").map(function(p){return parseFloat(p)}),c=Z3(u,4);a=c[0],i=c[1],o=c[2],s=c[3]}else zo(!1,"[configBezier]: arguments should be one of oneOf 'linear', 'ease', 'ease-in', 'ease-out', 'ease-in-out','cubic-bezier(x1,y1,x2,y2)', instead received %s",r)}}zo([a,o,i,s].every(function(p){return typeof p=="number"&&p>=0&&p<=1}),"[configBezier]: arguments should be x1, y1, x2, y2 of [0, 1] instead received %s",r);var f=im(a,o),d=im(i,s),h=oR(a,o),y=function(g){return g>1?1:g<0?0:g},v=function(g){for(var O=g>1?1:g,w=O,A=0;A<8;++A){var m=f(w)-O,x=h(w);if(Math.abs(m-O)<Ko||x<Ko)return d(w);w=y(w-m/x)}return d(w)};return v.isStepper=!1,v},sR=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,a=t.damping,i=a===void 0?8:a,o=t.dt,s=o===void 0?17:o,l=function(c,f,d){var h=-(c-f)*n,y=d*i,v=d+(h-y)*s/1e3,p=d*s/1e3+c;return Math.abs(p-f)<Ko&&Math.abs(v)<Ko?[f,0]:[p,v]};return l.isStepper=!0,l.dt=s,l},lR=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var a=r[0];if(typeof a=="string")switch(a){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return om(a);case"spring":return sR();default:if(a.split("(")[0]==="cubic-bezier")return om(a);zo(!1,"[configEasing]: first argument should be one of 'ease', 'ease-in', 'ease-out', 'ease-in-out','cubic-bezier(x1,y1,x2,y2)', 'linear' and 'spring', instead received %s",r)}return typeof a=="function"?a:(zo(!1,"[configEasing]: first argument type should be function or string, instead received %s",r),null)};function ei(e){"@babel/helpers - typeof";return ei=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ei(e)}function sm(e){return fR(e)||cR(e)||um(e)||uR()}function uR(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
181
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cR(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function fR(e){if(Array.isArray(e))return uc(e)}function lm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function nt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lm(Object(r),!0).forEach(function(n){lc(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function lc(e,t,r){return t=dR(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dR(e){var t=hR(e,"string");return ei(t)==="symbol"?t:String(t)}function hR(e,t){if(ei(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ei(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pR(e,t){return mR(e)||yR(e,t)||um(e,t)||vR()}function vR(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
182
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function um(e,t){if(e){if(typeof e=="string")return uc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return uc(e,t)}}function uc(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function yR(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function mR(e){if(Array.isArray(e))return e}var Go=function(t,r,n){return t+(r-t)*n},cc=function(t){var r=t.from,n=t.to;return r!==n},gR=function e(t,r,n){var a=Qa(function(i,o){if(cc(o)){var s=t(o.from,o.to,o.velocity),l=pR(s,2),u=l[0],c=l[1];return nt(nt({},o),{},{from:u,velocity:c})}return o},r);return n<1?Qa(function(i,o){return cc(o)?nt(nt({},o),{},{velocity:Go(o.velocity,a[i].velocity,n),from:Go(o.from,a[i].from,n)}):o},r):e(t,a,n-1)};const bR=function(e,t,r,n,a){var i=H3(e,t),o=i.reduce(function(p,g){return nt(nt({},p),{},lc({},g,[e[g],t[g]]))},{}),s=i.reduce(function(p,g){return nt(nt({},p),{},lc({},g,{from:e[g],velocity:0,to:t[g]}))},{}),l=-1,u,c,f=function(){return null},d=function(){return Qa(function(g,O){return O.from},s)},h=function(){return!Object.values(s).filter(cc).length},y=function(g){u||(u=g);var O=g-u,w=O/r.dt;s=gR(r,s,w),a(nt(nt(nt({},e),t),d())),u=g,h()||(l=requestAnimationFrame(f))},v=function(g){c||(c=g);var O=(g-c)/n,w=Qa(function(m,x){return Go.apply(void 0,sm(x).concat([r(O)]))},o);if(a(nt(nt(nt({},e),t),w)),O<1)l=requestAnimationFrame(f);else{var A=Qa(function(m,x){return Go.apply(void 0,sm(x).concat([r(1)]))},o);a(nt(nt(nt({},e),t),A))}};return f=r.isStepper?y:v,function(){return requestAnimationFrame(f),function(){cancelAnimationFrame(l)}}};function kn(e){"@babel/helpers - typeof";return kn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kn(e)}var xR=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function wR(e,t){if(e==null)return{};var r=OR(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function OR(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function fc(e){return PR(e)||TR(e)||AR(e)||SR()}function SR(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
183
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function AR(e,t){if(e){if(typeof e=="string")return dc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return dc(e,t)}}function TR(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function PR(e){if(Array.isArray(e))return dc(e)}function dc(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function cm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Nt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cm(Object(r),!0).forEach(function(n){ti(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ti(e,t,r){return t=fm(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _R(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ER(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,fm(n.key),n)}}function jR(e,t,r){return t&&ER(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function fm(e){var t=$R(e,"string");return kn(t)==="symbol"?t:String(t)}function $R(e,t){if(kn(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(kn(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function CR(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hc(e,t)}function hc(e,t){return hc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},hc(e,t)}function MR(e){var t=kR();return function(){var n=qo(e),a;if(t){var i=qo(this).constructor;a=Reflect.construct(n,arguments,i)}else a=n.apply(this,arguments);return pc(this,a)}}function pc(e,t){if(t&&(kn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vc(e)}function vc(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kR(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function qo(e){return qo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},qo(e)}var Dt=function(e){CR(r,e);var t=MR(r);function r(n,a){var i;_R(this,r),i=t.call(this,n,a);var o=i.props,s=o.isActive,l=o.attributeName,u=o.from,c=o.to,f=o.steps,d=o.children,h=o.duration;if(i.handleStyleChange=i.handleStyleChange.bind(vc(i)),i.changeStyle=i.changeStyle.bind(vc(i)),!s||h<=0)return i.state={style:{}},typeof d=="function"&&(i.state={style:c}),pc(i);if(f&&f.length)i.state={style:f[0].style};else if(u){if(typeof d=="function")return i.state={style:u},pc(i);i.state={style:l?ti({},l,u):u}}else i.state={style:{}};return i}return jR(r,[{key:"componentDidMount",value:function(){var a=this.props,i=a.isActive,o=a.canBegin;this.mounted=!0,!(!i||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(a){var i=this.props,o=i.isActive,s=i.canBegin,l=i.attributeName,u=i.shouldReAnimate,c=i.to,f=i.from,d=this.state.style;if(s){if(!o){var h={style:l?ti({},l,c):c};this.state&&d&&(l&&d[l]!==c||!l&&d!==c)&&this.setState(h);return}if(!(R3(a.to,c)&&a.canBegin&&a.isActive)){var y=!a.canBegin||!a.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var v=y||u?f:a.to;if(this.state&&d){var p={style:l?ti({},l,v):v};(l&&d[l]!==v||!l&&d!==v)&&this.setState(p)}this.runAnimation(Nt(Nt({},this.props),{},{from:v,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var a=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),a&&a()}},{key:"handleStyleChange",value:function(a){this.changeStyle(a)}},{key:"changeStyle",value:function(a){this.mounted&&this.setState({style:a})}},{key:"runJSAnimation",value:function(a){var i=this,o=a.from,s=a.to,l=a.duration,u=a.easing,c=a.begin,f=a.onAnimationEnd,d=a.onAnimationStart,h=bR(o,s,lR(u),l,this.changeStyle),y=function(){i.stopJSAnimation=h()};this.manager.start([d,c,y,l,f])}},{key:"runStepAnimation",value:function(a){var i=this,o=a.steps,s=a.begin,l=a.onAnimationStart,u=o[0],c=u.style,f=u.duration,d=f===void 0?0:f,h=function(v,p,g){if(g===0)return v;var O=p.duration,w=p.easing,A=w===void 0?"ease":w,m=p.style,x=p.properties,T=p.onAnimationEnd,P=g>0?o[g-1]:p,$=x||Object.keys(m);if(typeof A=="function"||A==="spring")return[].concat(fc(v),[i.runJSAnimation.bind(i,{from:P.style,to:m,duration:O,easing:A}),O]);var k=tm($,O,A),E=Nt(Nt(Nt({},P.style),m),{},{transition:k});return[].concat(fc(v),[E,O,T]).filter(Y3)};return this.manager.start([l].concat(fc(o.reduce(h,[c,Math.max(d,s)])),[a.onAnimationEnd]))}},{key:"runAnimation",value:function(a){this.manager||(this.manager=G3());var i=a.begin,o=a.duration,s=a.attributeName,l=a.to,u=a.easing,c=a.onAnimationStart,f=a.onAnimationEnd,d=a.steps,h=a.children,y=this.manager;if(this.unSubscribe=y.subscribe(this.handleStyleChange),typeof u=="function"||typeof h=="function"||u==="spring"){this.runJSAnimation(a);return}if(d.length>1){this.runStepAnimation(a);return}var v=s?ti({},s,l):l,p=tm(Object.keys(v),o,u);y.start([c,i,Nt(Nt({},v),{},{transition:p}),o,f])}},{key:"render",value:function(){var a=this.props,i=a.children;a.begin;var o=a.duration;a.attributeName,a.easing;var s=a.isActive;a.steps,a.from,a.to,a.canBegin,a.onAnimationEnd,a.shouldReAnimate,a.onAnimationReStart;var l=wR(a,xR),u=S.Children.count(i),c=this.state.style;if(typeof i=="function")return i(c);if(!s||u===0||o<=0)return i;var f=function(h){var y=h.props,v=y.style,p=v===void 0?{}:v,g=y.className,O=S.cloneElement(h,Nt(Nt({},l),{},{style:Nt(Nt({},p),c),className:g}));return O};return u===1?f(S.Children.only(i)):S.createElement("div",null,S.Children.map(i,function(d){return f(d)}))}}]),r}(S.PureComponent);Dt.displayName="Animate",Dt.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}},Dt.propTypes={from:Te.oneOfType([Te.object,Te.string]),to:Te.oneOfType([Te.object,Te.string]),attributeName:Te.string,duration:Te.number,begin:Te.number,easing:Te.oneOfType([Te.string,Te.func]),steps:Te.arrayOf(Te.shape({duration:Te.number.isRequired,style:Te.object.isRequired,easing:Te.oneOfType([Te.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Te.func]),properties:Te.arrayOf("string"),onAnimationEnd:Te.func})),children:Te.oneOfType([Te.node,Te.func]),isActive:Te.bool,canBegin:Te.bool,onAnimationEnd:Te.func,shouldReAnimate:Te.bool,onAnimationStart:Te.func,onAnimationReStart:Te.func};function ri(e){"@babel/helpers - typeof";return ri=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ri(e)}function Vo(){return Vo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Vo.apply(this,arguments)}function NR(e,t){return RR(e)||LR(e,t)||IR(e,t)||DR()}function DR(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
184
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function IR(e,t){if(e){if(typeof e=="string")return dm(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return dm(e,t)}}function dm(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function LR(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function RR(e){if(Array.isArray(e))return e}function hm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function pm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hm(Object(r),!0).forEach(function(n){BR(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function BR(e,t,r){return t=FR(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function FR(e){var t=WR(e,"string");return ri(t)=="symbol"?t:t+""}function WR(e,t){if(ri(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ri(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var vm=function(t,r,n,a,i){var o=Math.min(Math.abs(n)/2,Math.abs(a)/2),s=a>=0?1:-1,l=n>=0?1:-1,u=a>=0&&n>=0||a<0&&n<0?1:0,c;if(o>0&&i instanceof Array){for(var f=[0,0,0,0],d=0,h=4;d<h;d++)f[d]=i[d]>o?o:i[d];c="M".concat(t,",").concat(r+s*f[0]),f[0]>0&&(c+="A ".concat(f[0],",").concat(f[0],",0,0,").concat(u,",").concat(t+l*f[0],",").concat(r)),c+="L ".concat(t+n-l*f[1],",").concat(r),f[1]>0&&(c+="A ".concat(f[1],",").concat(f[1],",0,0,").concat(u,`,
181
+ */var Qu,Dy;function JL(){if(Dy)return Qu;Dy=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function a(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var o={},s=0;s<10;s++)o["_"+String.fromCharCode(s)]=s;var l=Object.getOwnPropertyNames(o).map(function(c){return o[c]});if(l.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(c){u[c]=c}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Qu=a()?Object.assign:function(i,o){for(var s,l=n(i),u,c=1;c<arguments.length;c++){s=Object(arguments[c]);for(var f in s)t.call(s,f)&&(l[f]=s[f]);if(e){u=e(s);for(var d=0;d<u.length;d++)r.call(s,u[d])&&(l[u[d]]=s[u[d]])}}return l},Qu}var ec,Iy;function tc(){if(Iy)return ec;Iy=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ec=e,ec}var rc,Ly;function Ry(){return Ly||(Ly=1,rc=Function.call.bind(Object.prototype.hasOwnProperty)),rc}var nc,By;function QL(){if(By)return nc;By=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=tc(),r={},n=Ry();e=function(i){var o="Warning: "+i;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function a(i,o,s,l,u){if(process.env.NODE_ENV!=="production"){for(var c in i)if(n(i,c)){var f;try{if(typeof i[c]!="function"){var d=Error((l||"React class")+": "+s+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}f=i[c](o,c,l,s,null,t)}catch(v){f=v}if(f&&!(f instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in r)){r[f.message]=!0;var h=u?u():"";e("Failed "+s+" type: "+f.message+(h??""))}}}}return a.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},nc=a,nc}var ac,Fy;function e3(){if(Fy)return ac;Fy=1;var e=Ny(),t=JL(),r=tc(),n=Ry(),a=QL(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function o(){return null}return ac=function(s,l){var u=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function f(E){var L=E&&(u&&E[u]||E[c]);if(typeof L=="function")return L}var d="<<anonymous>>",h={array:x("array"),bigint:x("bigint"),bool:x("boolean"),func:x("function"),number:x("number"),object:x("object"),string:x("string"),symbol:x("symbol"),any:O(),arrayOf:w,element:A(),elementType:y(),instanceOf:b,node:M(),objectOf:P,oneOf:S,oneOfType:$,shape:j,exact:R};function v(E,L){return E===L?E!==0||1/E===1/L:E!==E&&L!==L}function m(E,L){this.message=E,this.data=L&&typeof L=="object"?L:{},this.stack=""}m.prototype=Error.prototype;function p(E){if(process.env.NODE_ENV!=="production")var L={},F=0;function W(X,Q,ae,te,V,Y,J){if(te=te||d,Y=Y||ae,J!==r){if(l){var I=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw I.name="Invariant Violation",I}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ie=te+":"+ae;!L[ie]&&F<3&&(i("You are manually calling a React.PropTypes validation function for the `"+Y+"` prop on `"+te+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),L[ie]=!0,F++)}}return Q[ae]==null?X?Q[ae]===null?new m("The "+V+" `"+Y+"` is marked as required "+("in `"+te+"`, but its value is `null`.")):new m("The "+V+" `"+Y+"` is marked as required in "+("`"+te+"`, but its value is `undefined`.")):null:E(Q,ae,te,V,Y)}var G=W.bind(null,!1);return G.isRequired=W.bind(null,!0),G}function x(E){function L(F,W,G,X,Q,ae){var te=F[W],V=C(te);if(V!==E){var Y=B(te);return new m("Invalid "+X+" `"+Q+"` of type "+("`"+Y+"` supplied to `"+G+"`, expected ")+("`"+E+"`."),{expectedType:E})}return null}return p(L)}function O(){return p(o)}function w(E){function L(F,W,G,X,Q){if(typeof E!="function")return new m("Property `"+Q+"` of component `"+G+"` has invalid PropType notation inside arrayOf.");var ae=F[W];if(!Array.isArray(ae)){var te=C(ae);return new m("Invalid "+X+" `"+Q+"` of type "+("`"+te+"` supplied to `"+G+"`, expected an array."))}for(var V=0;V<ae.length;V++){var Y=E(ae,V,G,X,Q+"["+V+"]",r);if(Y instanceof Error)return Y}return null}return p(L)}function A(){function E(L,F,W,G,X){var Q=L[F];if(!s(Q)){var ae=C(Q);return new m("Invalid "+G+" `"+X+"` of type "+("`"+ae+"` supplied to `"+W+"`, expected a single ReactElement."))}return null}return p(E)}function y(){function E(L,F,W,G,X){var Q=L[F];if(!e.isValidElementType(Q)){var ae=C(Q);return new m("Invalid "+G+" `"+X+"` of type "+("`"+ae+"` supplied to `"+W+"`, expected a single ReactElement type."))}return null}return p(E)}function b(E){function L(F,W,G,X,Q){if(!(F[W]instanceof E)){var ae=E.name||d,te=K(F[W]);return new m("Invalid "+X+" `"+Q+"` of type "+("`"+te+"` supplied to `"+G+"`, expected ")+("instance of `"+ae+"`."))}return null}return p(L)}function S(E){if(!Array.isArray(E))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),o;function L(F,W,G,X,Q){for(var ae=F[W],te=0;te<E.length;te++)if(v(ae,E[te]))return null;var V=JSON.stringify(E,function(J,I){var ie=B(I);return ie==="symbol"?String(I):I});return new m("Invalid "+X+" `"+Q+"` of value `"+String(ae)+"` "+("supplied to `"+G+"`, expected one of "+V+"."))}return p(L)}function P(E){function L(F,W,G,X,Q){if(typeof E!="function")return new m("Property `"+Q+"` of component `"+G+"` has invalid PropType notation inside objectOf.");var ae=F[W],te=C(ae);if(te!=="object")return new m("Invalid "+X+" `"+Q+"` of type "+("`"+te+"` supplied to `"+G+"`, expected an object."));for(var V in ae)if(n(ae,V)){var Y=E(ae,V,G,X,Q+"."+V,r);if(Y instanceof Error)return Y}return null}return p(L)}function $(E){if(!Array.isArray(E))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var L=0;L<E.length;L++){var F=E[L];if(typeof F!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+U(F)+" at index "+L+"."),o}function W(G,X,Q,ae,te){for(var V=[],Y=0;Y<E.length;Y++){var J=E[Y],I=J(G,X,Q,ae,te,r);if(I==null)return null;I.data&&n(I.data,"expectedType")&&V.push(I.data.expectedType)}var ie=V.length>0?", expected one of type ["+V.join(", ")+"]":"";return new m("Invalid "+ae+" `"+te+"` supplied to "+("`"+Q+"`"+ie+"."))}return p(W)}function M(){function E(L,F,W,G,X){return k(L[F])?null:new m("Invalid "+G+" `"+X+"` supplied to "+("`"+W+"`, expected a ReactNode."))}return p(E)}function _(E,L,F,W,G){return new m((E||"React class")+": "+L+" type `"+F+"."+W+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+G+"`.")}function j(E){function L(F,W,G,X,Q){var ae=F[W],te=C(ae);if(te!=="object")return new m("Invalid "+X+" `"+Q+"` of type `"+te+"` "+("supplied to `"+G+"`, expected `object`."));for(var V in E){var Y=E[V];if(typeof Y!="function")return _(G,X,Q,V,B(Y));var J=Y(ae,V,G,X,Q+"."+V,r);if(J)return J}return null}return p(L)}function R(E){function L(F,W,G,X,Q){var ae=F[W],te=C(ae);if(te!=="object")return new m("Invalid "+X+" `"+Q+"` of type `"+te+"` "+("supplied to `"+G+"`, expected `object`."));var V=t({},F[W],E);for(var Y in V){var J=E[Y];if(n(E,Y)&&typeof J!="function")return _(G,X,Q,Y,B(J));if(!J)return new m("Invalid "+X+" `"+Q+"` key `"+Y+"` supplied to `"+G+"`.\nBad object: "+JSON.stringify(F[W],null," ")+`
182
+ Valid keys: `+JSON.stringify(Object.keys(E),null," "));var I=J(ae,Y,G,X,Q+"."+Y,r);if(I)return I}return null}return p(L)}function k(E){switch(typeof E){case"number":case"string":case"undefined":return!0;case"boolean":return!E;case"object":if(Array.isArray(E))return E.every(k);if(E===null||s(E))return!0;var L=f(E);if(L){var F=L.call(E),W;if(L!==E.entries){for(;!(W=F.next()).done;)if(!k(W.value))return!1}else for(;!(W=F.next()).done;){var G=W.value;if(G&&!k(G[1]))return!1}}else return!1;return!0;default:return!1}}function D(E,L){return E==="symbol"?!0:L?L["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&L instanceof Symbol:!1}function C(E){var L=typeof E;return Array.isArray(E)?"array":E instanceof RegExp?"object":D(L,E)?"symbol":L}function B(E){if(typeof E>"u"||E===null)return""+E;var L=C(E);if(L==="object"){if(E instanceof Date)return"date";if(E instanceof RegExp)return"regexp"}return L}function U(E){var L=B(E);switch(L){case"array":case"object":return"an "+L;case"boolean":case"date":case"regexp":return"a "+L;default:return L}}function K(E){return!E.constructor||!E.constructor.name?d:E.constructor.name}return h.checkPropTypes=a,h.resetWarningCache=a.resetWarningCache,h.PropTypes=h,h},ac}var ic,Wy;function t3(){if(Wy)return ic;Wy=1;var e=tc();function t(){}function r(){}return r.resetWarningCache=t,ic=function(){function n(o,s,l,u,c,f){if(f!==e){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}n.isRequired=n;function a(){return n}var i={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:a,element:n,elementType:n,instanceOf:a,node:n,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:r,resetWarningCache:t};return i.PropTypes=i,i},ic}if(process.env.NODE_ENV!=="production"){var r3=Ny(),n3=!0;Ju.exports=e3()(r3.isElement,n3)}else Ju.exports=t3()();var a3=Ju.exports;const Ae=Ce(a3);var i3=Object.getOwnPropertyNames,o3=Object.getOwnPropertySymbols,s3=Object.prototype.hasOwnProperty;function Uy(e,t){return function(n,a,i){return e(n,a,i)&&t(n,a,i)}}function Uo(e){return function(r,n,a){if(!r||!n||typeof r!="object"||typeof n!="object")return e(r,n,a);var i=a.cache,o=i.get(r),s=i.get(n);if(o&&s)return o===n&&s===r;i.set(r,n),i.set(n,r);var l=e(r,n,a);return i.delete(r),i.delete(n),l}}function zy(e){return i3(e).concat(o3(e))}var l3=Object.hasOwn||function(e,t){return s3.call(e,t)};function Gr(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var u3="__v",c3="__o",f3="_owner",Ky=Object.getOwnPropertyDescriptor,Gy=Object.keys;function d3(e,t,r){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function h3(e,t){return Gr(e.getTime(),t.getTime())}function p3(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function v3(e,t){return e===t}function Vy(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var a=new Array(n),i=e.entries(),o,s,l=0;(o=i.next())&&!o.done;){for(var u=t.entries(),c=!1,f=0;(s=u.next())&&!s.done;){if(a[f]){f++;continue}var d=o.value,h=s.value;if(r.equals(d[0],h[0],l,f,e,t,r)&&r.equals(d[1],h[1],d[0],h[0],e,t,r)){c=a[f]=!0;break}f++}if(!c)return!1;l++}return!0}var y3=Gr;function m3(e,t,r){var n=Gy(e),a=n.length;if(Gy(t).length!==a)return!1;for(;a-- >0;)if(!Hy(e,t,r,n[a]))return!1;return!0}function Ja(e,t,r){var n=zy(e),a=n.length;if(zy(t).length!==a)return!1;for(var i,o,s;a-- >0;)if(i=n[a],!Hy(e,t,r,i)||(o=Ky(e,i),s=Ky(t,i),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function g3(e,t){return Gr(e.valueOf(),t.valueOf())}function b3(e,t){return e.source===t.source&&e.flags===t.flags}function qy(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var a=new Array(n),i=e.values(),o,s;(o=i.next())&&!o.done;){for(var l=t.values(),u=!1,c=0;(s=l.next())&&!s.done;){if(!a[c]&&r.equals(o.value,s.value,o.value,s.value,e,t,r)){u=a[c]=!0;break}c++}if(!u)return!1}return!0}function x3(e,t){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function w3(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function Hy(e,t,r,n){return(n===f3||n===c3||n===u3)&&(e.$$typeof||t.$$typeof)?!0:l3(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}var O3="[object Arguments]",S3="[object Boolean]",T3="[object Date]",A3="[object Error]",P3="[object Map]",_3="[object Number]",E3="[object Object]",j3="[object RegExp]",$3="[object Set]",C3="[object String]",M3="[object URL]",k3=Array.isArray,Yy=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,Xy=Object.assign,N3=Object.prototype.toString.call.bind(Object.prototype.toString);function D3(e){var t=e.areArraysEqual,r=e.areDatesEqual,n=e.areErrorsEqual,a=e.areFunctionsEqual,i=e.areMapsEqual,o=e.areNumbersEqual,s=e.areObjectsEqual,l=e.arePrimitiveWrappersEqual,u=e.areRegExpsEqual,c=e.areSetsEqual,f=e.areTypedArraysEqual,d=e.areUrlsEqual;return function(v,m,p){if(v===m)return!0;if(v==null||m==null)return!1;var x=typeof v;if(x!==typeof m)return!1;if(x!=="object")return x==="number"?o(v,m,p):x==="function"?a(v,m,p):!1;var O=v.constructor;if(O!==m.constructor)return!1;if(O===Object)return s(v,m,p);if(k3(v))return t(v,m,p);if(Yy!=null&&Yy(v))return f(v,m,p);if(O===Date)return r(v,m,p);if(O===RegExp)return u(v,m,p);if(O===Map)return i(v,m,p);if(O===Set)return c(v,m,p);var w=N3(v);return w===T3?r(v,m,p):w===j3?u(v,m,p):w===P3?i(v,m,p):w===$3?c(v,m,p):w===E3?typeof v.then!="function"&&typeof m.then!="function"&&s(v,m,p):w===M3?d(v,m,p):w===A3?n(v,m,p):w===O3?s(v,m,p):w===S3||w===_3||w===C3?l(v,m,p):!1}}function I3(e){var t=e.circular,r=e.createCustomConfig,n=e.strict,a={areArraysEqual:n?Ja:d3,areDatesEqual:h3,areErrorsEqual:p3,areFunctionsEqual:v3,areMapsEqual:n?Uy(Vy,Ja):Vy,areNumbersEqual:y3,areObjectsEqual:n?Ja:m3,arePrimitiveWrappersEqual:g3,areRegExpsEqual:b3,areSetsEqual:n?Uy(qy,Ja):qy,areTypedArraysEqual:n?Ja:x3,areUrlsEqual:w3};if(r&&(a=Xy({},a,r(a))),t){var i=Uo(a.areArraysEqual),o=Uo(a.areMapsEqual),s=Uo(a.areObjectsEqual),l=Uo(a.areSetsEqual);a=Xy({},a,{areArraysEqual:i,areMapsEqual:o,areObjectsEqual:s,areSetsEqual:l})}return a}function L3(e){return function(t,r,n,a,i,o,s){return e(t,r,s)}}function R3(e){var t=e.circular,r=e.comparator,n=e.createState,a=e.equals,i=e.strict;if(n)return function(l,u){var c=n(),f=c.cache,d=f===void 0?t?new WeakMap:void 0:f,h=c.meta;return r(l,u,{cache:d,equals:a,meta:h,strict:i})};if(t)return function(l,u){return r(l,u,{cache:new WeakMap,equals:a,meta:void 0,strict:i})};var o={cache:void 0,equals:a,meta:void 0,strict:i};return function(l,u){return r(l,u,o)}}var B3=wr();wr({strict:!0}),wr({circular:!0}),wr({circular:!0,strict:!0}),wr({createInternalComparator:function(){return Gr}}),wr({strict:!0,createInternalComparator:function(){return Gr}}),wr({circular:!0,createInternalComparator:function(){return Gr}}),wr({circular:!0,createInternalComparator:function(){return Gr},strict:!0});function wr(e){e===void 0&&(e={});var t=e.circular,r=t===void 0?!1:t,n=e.createInternalComparator,a=e.createState,i=e.strict,o=i===void 0?!1:i,s=I3(e),l=D3(s),u=n?n(l):L3(l);return R3({circular:r,comparator:l,createState:a,equals:u,strict:o})}function F3(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function Zy(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function a(i){r<0&&(r=i),i-r>t?(e(i),r=-1):F3(a)};requestAnimationFrame(n)}function oc(e){"@babel/helpers - typeof";return oc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oc(e)}function W3(e){return G3(e)||K3(e)||z3(e)||U3()}function U3(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
183
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function z3(e,t){if(e){if(typeof e=="string")return Jy(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Jy(e,t)}}function Jy(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function K3(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function G3(e){if(Array.isArray(e))return e}function V3(){var e={},t=function(){return null},r=!1,n=function a(i){if(!r){if(Array.isArray(i)){if(!i.length)return;var o=i,s=W3(o),l=s[0],u=s.slice(1);if(typeof l=="number"){Zy(a.bind(null,u),l);return}a(l),Zy(a.bind(null,u));return}oc(i)==="object"&&(e=i,t(e)),typeof i=="function"&&i()}};return{stop:function(){r=!0},start:function(i){r=!1,n(i)},subscribe:function(i){return t=i,function(){t=function(){return null}}}}}function Qa(e){"@babel/helpers - typeof";return Qa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qa(e)}function Qy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function em(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Qy(Object(r),!0).forEach(function(n){tm(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qy(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function tm(e,t,r){return t=q3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function q3(e){var t=H3(e,"string");return Qa(t)==="symbol"?t:String(t)}function H3(e,t){if(Qa(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Qa(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Y3=function(t,r){return[Object.keys(t),Object.keys(r)].reduce(function(n,a){return n.filter(function(i){return a.includes(i)})})},X3=function(t){return t},Z3=function(t){return t.replace(/([A-Z])/g,function(r){return"-".concat(r.toLowerCase())})},ei=function(t,r){return Object.keys(r).reduce(function(n,a){return em(em({},n),{},tm({},a,t(a,r[a])))},{})},rm=function(t,r,n){return t.map(function(a){return"".concat(Z3(a)," ").concat(r,"ms ").concat(n)}).join(",")},J3=process.env.NODE_ENV!=="production",zo=function(t,r,n,a,i,o,s,l){if(J3&&typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,a,i,o,s,l],c=0;console.warn(r.replace(/%s/g,function(){return u[c++]}))}};function Q3(e,t){return rR(e)||tR(e,t)||nm(e,t)||eR()}function eR(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
184
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tR(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function rR(e){if(Array.isArray(e))return e}function nR(e){return oR(e)||iR(e)||nm(e)||aR()}function aR(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
185
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nm(e,t){if(e){if(typeof e=="string")return sc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return sc(e,t)}}function iR(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function oR(e){if(Array.isArray(e))return sc(e)}function sc(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Ko=1e-4,am=function(t,r){return[0,3*t,3*r-6*t,3*t-3*r+1]},im=function(t,r){return t.map(function(n,a){return n*Math.pow(r,a)}).reduce(function(n,a){return n+a})},om=function(t,r){return function(n){var a=am(t,r);return im(a,n)}},sR=function(t,r){return function(n){var a=am(t,r),i=[].concat(nR(a.map(function(o,s){return o*s}).slice(1)),[0]);return im(i,n)}},sm=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var a=r[0],i=r[1],o=r[2],s=r[3];if(r.length===1)switch(r[0]){case"linear":a=0,i=0,o=1,s=1;break;case"ease":a=.25,i=.1,o=.25,s=1;break;case"ease-in":a=.42,i=0,o=1,s=1;break;case"ease-out":a=.42,i=0,o=.58,s=1;break;case"ease-in-out":a=0,i=0,o=.58,s=1;break;default:{var l=r[0].split("(");if(l[0]==="cubic-bezier"&&l[1].split(")")[0].split(",").length===4){var u=l[1].split(")")[0].split(",").map(function(p){return parseFloat(p)}),c=Q3(u,4);a=c[0],i=c[1],o=c[2],s=c[3]}else zo(!1,"[configBezier]: arguments should be one of oneOf 'linear', 'ease', 'ease-in', 'ease-out', 'ease-in-out','cubic-bezier(x1,y1,x2,y2)', instead received %s",r)}}zo([a,o,i,s].every(function(p){return typeof p=="number"&&p>=0&&p<=1}),"[configBezier]: arguments should be x1, y1, x2, y2 of [0, 1] instead received %s",r);var f=om(a,o),d=om(i,s),h=sR(a,o),v=function(x){return x>1?1:x<0?0:x},m=function(x){for(var O=x>1?1:x,w=O,A=0;A<8;++A){var y=f(w)-O,b=h(w);if(Math.abs(y-O)<Ko||b<Ko)return d(w);w=v(w-y/b)}return d(w)};return m.isStepper=!1,m},lR=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,a=t.damping,i=a===void 0?8:a,o=t.dt,s=o===void 0?17:o,l=function(c,f,d){var h=-(c-f)*n,v=d*i,m=d+(h-v)*s/1e3,p=d*s/1e3+c;return Math.abs(p-f)<Ko&&Math.abs(m)<Ko?[f,0]:[p,m]};return l.isStepper=!0,l.dt=s,l},uR=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var a=r[0];if(typeof a=="string")switch(a){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return sm(a);case"spring":return lR();default:if(a.split("(")[0]==="cubic-bezier")return sm(a);zo(!1,"[configEasing]: first argument should be one of 'ease', 'ease-in', 'ease-out', 'ease-in-out','cubic-bezier(x1,y1,x2,y2)', 'linear' and 'spring', instead received %s",r)}return typeof a=="function"?a:(zo(!1,"[configEasing]: first argument type should be function or string, instead received %s",r),null)};function ti(e){"@babel/helpers - typeof";return ti=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ti(e)}function lm(e){return dR(e)||fR(e)||cm(e)||cR()}function cR(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
186
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fR(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function dR(e){if(Array.isArray(e))return uc(e)}function um(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function nt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?um(Object(r),!0).forEach(function(n){lc(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):um(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function lc(e,t,r){return t=hR(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hR(e){var t=pR(e,"string");return ti(t)==="symbol"?t:String(t)}function pR(e,t){if(ti(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ti(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vR(e,t){return gR(e)||mR(e,t)||cm(e,t)||yR()}function yR(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
187
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cm(e,t){if(e){if(typeof e=="string")return uc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return uc(e,t)}}function uc(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function mR(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function gR(e){if(Array.isArray(e))return e}var Go=function(t,r,n){return t+(r-t)*n},cc=function(t){var r=t.from,n=t.to;return r!==n},bR=function e(t,r,n){var a=ei(function(i,o){if(cc(o)){var s=t(o.from,o.to,o.velocity),l=vR(s,2),u=l[0],c=l[1];return nt(nt({},o),{},{from:u,velocity:c})}return o},r);return n<1?ei(function(i,o){return cc(o)?nt(nt({},o),{},{velocity:Go(o.velocity,a[i].velocity,n),from:Go(o.from,a[i].from,n)}):o},r):e(t,a,n-1)};const xR=function(e,t,r,n,a){var i=Y3(e,t),o=i.reduce(function(p,x){return nt(nt({},p),{},lc({},x,[e[x],t[x]]))},{}),s=i.reduce(function(p,x){return nt(nt({},p),{},lc({},x,{from:e[x],velocity:0,to:t[x]}))},{}),l=-1,u,c,f=function(){return null},d=function(){return ei(function(x,O){return O.from},s)},h=function(){return!Object.values(s).filter(cc).length},v=function(x){u||(u=x);var O=x-u,w=O/r.dt;s=bR(r,s,w),a(nt(nt(nt({},e),t),d())),u=x,h()||(l=requestAnimationFrame(f))},m=function(x){c||(c=x);var O=(x-c)/n,w=ei(function(y,b){return Go.apply(void 0,lm(b).concat([r(O)]))},o);if(a(nt(nt(nt({},e),t),w)),O<1)l=requestAnimationFrame(f);else{var A=ei(function(y,b){return Go.apply(void 0,lm(b).concat([r(1)]))},o);a(nt(nt(nt({},e),t),A))}};return f=r.isStepper?v:m,function(){return requestAnimationFrame(f),function(){cancelAnimationFrame(l)}}};function Mn(e){"@babel/helpers - typeof";return Mn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mn(e)}var wR=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function OR(e,t){if(e==null)return{};var r=SR(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function SR(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function fc(e){return _R(e)||PR(e)||AR(e)||TR()}function TR(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
188
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function AR(e,t){if(e){if(typeof e=="string")return dc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return dc(e,t)}}function PR(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _R(e){if(Array.isArray(e))return dc(e)}function dc(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function fm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Nt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fm(Object(r),!0).forEach(function(n){ri(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ri(e,t,r){return t=dm(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ER(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jR(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,dm(n.key),n)}}function $R(e,t,r){return t&&jR(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function dm(e){var t=CR(e,"string");return Mn(t)==="symbol"?t:String(t)}function CR(e,t){if(Mn(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Mn(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function MR(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hc(e,t)}function hc(e,t){return hc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},hc(e,t)}function kR(e){var t=NR();return function(){var n=Vo(e),a;if(t){var i=Vo(this).constructor;a=Reflect.construct(n,arguments,i)}else a=n.apply(this,arguments);return pc(this,a)}}function pc(e,t){if(t&&(Mn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vc(e)}function vc(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function NR(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Vo(e){return Vo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Vo(e)}var Dt=function(e){MR(r,e);var t=kR(r);function r(n,a){var i;ER(this,r),i=t.call(this,n,a);var o=i.props,s=o.isActive,l=o.attributeName,u=o.from,c=o.to,f=o.steps,d=o.children,h=o.duration;if(i.handleStyleChange=i.handleStyleChange.bind(vc(i)),i.changeStyle=i.changeStyle.bind(vc(i)),!s||h<=0)return i.state={style:{}},typeof d=="function"&&(i.state={style:c}),pc(i);if(f&&f.length)i.state={style:f[0].style};else if(u){if(typeof d=="function")return i.state={style:u},pc(i);i.state={style:l?ri({},l,u):u}}else i.state={style:{}};return i}return $R(r,[{key:"componentDidMount",value:function(){var a=this.props,i=a.isActive,o=a.canBegin;this.mounted=!0,!(!i||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(a){var i=this.props,o=i.isActive,s=i.canBegin,l=i.attributeName,u=i.shouldReAnimate,c=i.to,f=i.from,d=this.state.style;if(s){if(!o){var h={style:l?ri({},l,c):c};this.state&&d&&(l&&d[l]!==c||!l&&d!==c)&&this.setState(h);return}if(!(B3(a.to,c)&&a.canBegin&&a.isActive)){var v=!a.canBegin||!a.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var m=v||u?f:a.to;if(this.state&&d){var p={style:l?ri({},l,m):m};(l&&d[l]!==m||!l&&d!==m)&&this.setState(p)}this.runAnimation(Nt(Nt({},this.props),{},{from:m,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var a=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),a&&a()}},{key:"handleStyleChange",value:function(a){this.changeStyle(a)}},{key:"changeStyle",value:function(a){this.mounted&&this.setState({style:a})}},{key:"runJSAnimation",value:function(a){var i=this,o=a.from,s=a.to,l=a.duration,u=a.easing,c=a.begin,f=a.onAnimationEnd,d=a.onAnimationStart,h=xR(o,s,uR(u),l,this.changeStyle),v=function(){i.stopJSAnimation=h()};this.manager.start([d,c,v,l,f])}},{key:"runStepAnimation",value:function(a){var i=this,o=a.steps,s=a.begin,l=a.onAnimationStart,u=o[0],c=u.style,f=u.duration,d=f===void 0?0:f,h=function(m,p,x){if(x===0)return m;var O=p.duration,w=p.easing,A=w===void 0?"ease":w,y=p.style,b=p.properties,S=p.onAnimationEnd,P=x>0?o[x-1]:p,$=b||Object.keys(y);if(typeof A=="function"||A==="spring")return[].concat(fc(m),[i.runJSAnimation.bind(i,{from:P.style,to:y,duration:O,easing:A}),O]);var M=rm($,O,A),_=Nt(Nt(Nt({},P.style),y),{},{transition:M});return[].concat(fc(m),[_,O,S]).filter(X3)};return this.manager.start([l].concat(fc(o.reduce(h,[c,Math.max(d,s)])),[a.onAnimationEnd]))}},{key:"runAnimation",value:function(a){this.manager||(this.manager=V3());var i=a.begin,o=a.duration,s=a.attributeName,l=a.to,u=a.easing,c=a.onAnimationStart,f=a.onAnimationEnd,d=a.steps,h=a.children,v=this.manager;if(this.unSubscribe=v.subscribe(this.handleStyleChange),typeof u=="function"||typeof h=="function"||u==="spring"){this.runJSAnimation(a);return}if(d.length>1){this.runStepAnimation(a);return}var m=s?ri({},s,l):l,p=rm(Object.keys(m),o,u);v.start([c,i,Nt(Nt({},m),{},{transition:p}),o,f])}},{key:"render",value:function(){var a=this.props,i=a.children;a.begin;var o=a.duration;a.attributeName,a.easing;var s=a.isActive;a.steps,a.from,a.to,a.canBegin,a.onAnimationEnd,a.shouldReAnimate,a.onAnimationReStart;var l=OR(a,wR),u=T.Children.count(i),c=this.state.style;if(typeof i=="function")return i(c);if(!s||u===0||o<=0)return i;var f=function(h){var v=h.props,m=v.style,p=m===void 0?{}:m,x=v.className,O=T.cloneElement(h,Nt(Nt({},l),{},{style:Nt(Nt({},p),c),className:x}));return O};return u===1?f(T.Children.only(i)):T.createElement("div",null,T.Children.map(i,function(d){return f(d)}))}}]),r}(T.PureComponent);Dt.displayName="Animate",Dt.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}},Dt.propTypes={from:Ae.oneOfType([Ae.object,Ae.string]),to:Ae.oneOfType([Ae.object,Ae.string]),attributeName:Ae.string,duration:Ae.number,begin:Ae.number,easing:Ae.oneOfType([Ae.string,Ae.func]),steps:Ae.arrayOf(Ae.shape({duration:Ae.number.isRequired,style:Ae.object.isRequired,easing:Ae.oneOfType([Ae.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Ae.func]),properties:Ae.arrayOf("string"),onAnimationEnd:Ae.func})),children:Ae.oneOfType([Ae.node,Ae.func]),isActive:Ae.bool,canBegin:Ae.bool,onAnimationEnd:Ae.func,shouldReAnimate:Ae.bool,onAnimationStart:Ae.func,onAnimationReStart:Ae.func};function ni(e){"@babel/helpers - typeof";return ni=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ni(e)}function qo(){return qo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},qo.apply(this,arguments)}function DR(e,t){return BR(e)||RR(e,t)||LR(e,t)||IR()}function IR(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
189
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function LR(e,t){if(e){if(typeof e=="string")return hm(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return hm(e,t)}}function hm(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function RR(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function BR(e){if(Array.isArray(e))return e}function pm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function vm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pm(Object(r),!0).forEach(function(n){FR(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function FR(e,t,r){return t=WR(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function WR(e){var t=UR(e,"string");return ni(t)=="symbol"?t:t+""}function UR(e,t){if(ni(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ni(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ym=function(t,r,n,a,i){var o=Math.min(Math.abs(n)/2,Math.abs(a)/2),s=a>=0?1:-1,l=n>=0?1:-1,u=a>=0&&n>=0||a<0&&n<0?1:0,c;if(o>0&&i instanceof Array){for(var f=[0,0,0,0],d=0,h=4;d<h;d++)f[d]=i[d]>o?o:i[d];c="M".concat(t,",").concat(r+s*f[0]),f[0]>0&&(c+="A ".concat(f[0],",").concat(f[0],",0,0,").concat(u,",").concat(t+l*f[0],",").concat(r)),c+="L ".concat(t+n-l*f[1],",").concat(r),f[1]>0&&(c+="A ".concat(f[1],",").concat(f[1],",0,0,").concat(u,`,
185
190
  `).concat(t+n,",").concat(r+s*f[1])),c+="L ".concat(t+n,",").concat(r+a-s*f[2]),f[2]>0&&(c+="A ".concat(f[2],",").concat(f[2],",0,0,").concat(u,`,
186
191
  `).concat(t+n-l*f[2],",").concat(r+a)),c+="L ".concat(t+l*f[3],",").concat(r+a),f[3]>0&&(c+="A ".concat(f[3],",").concat(f[3],",0,0,").concat(u,`,
187
- `).concat(t,",").concat(r+a-s*f[3])),c+="Z"}else if(o>0&&i===+i&&i>0){var y=Math.min(o,i);c="M ".concat(t,",").concat(r+s*y,`
188
- A `).concat(y,",").concat(y,",0,0,").concat(u,",").concat(t+l*y,",").concat(r,`
189
- L `).concat(t+n-l*y,",").concat(r,`
190
- A `).concat(y,",").concat(y,",0,0,").concat(u,",").concat(t+n,",").concat(r+s*y,`
191
- L `).concat(t+n,",").concat(r+a-s*y,`
192
- A `).concat(y,",").concat(y,",0,0,").concat(u,",").concat(t+n-l*y,",").concat(r+a,`
193
- L `).concat(t+l*y,",").concat(r+a,`
194
- A `).concat(y,",").concat(y,",0,0,").concat(u,",").concat(t,",").concat(r+a-s*y," Z")}else c="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(a," h ").concat(-n," Z");return c},UR=function(t,r){if(!t||!r)return!1;var n=t.x,a=t.y,i=r.x,o=r.y,s=r.width,l=r.height;if(Math.abs(s)>0&&Math.abs(l)>0){var u=Math.min(i,i+s),c=Math.max(i,i+s),f=Math.min(o,o+l),d=Math.max(o,o+l);return n>=u&&n<=c&&a>=f&&a<=d}return!1},zR={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},yc=function(t){var r=pm(pm({},zR),t),n=S.useRef(),a=S.useState(-1),i=NR(a,2),o=i[0],s=i[1];S.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var A=n.current.getTotalLength();A&&s(A)}catch{}},[]);var l=r.x,u=r.y,c=r.width,f=r.height,d=r.radius,h=r.className,y=r.animationEasing,v=r.animationDuration,p=r.animationBegin,g=r.isAnimationActive,O=r.isUpdateAnimationActive;if(l!==+l||u!==+u||c!==+c||f!==+f||c===0||f===0)return null;var w=ye("recharts-rectangle",h);return O?S.createElement(Dt,{canBegin:o>0,from:{width:c,height:f,x:l,y:u},to:{width:c,height:f,x:l,y:u},duration:v,animationEasing:y,isActive:O},function(A){var m=A.width,x=A.height,T=A.x,P=A.y;return S.createElement(Dt,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:p,duration:v,isActive:g,easing:y},S.createElement("path",Vo({},de(r,!0),{className:w,d:vm(T,P,m,x,d),ref:n})))}):S.createElement("path",Vo({},de(r,!0),{className:w,d:vm(l,u,c,f,d)}))};function mc(){return mc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},mc.apply(this,arguments)}var Ho=function(t){var r=t.cx,n=t.cy,a=t.r,i=t.className,o=ye("recharts-dot",i);return r===+r&&n===+n&&a===+a?xt.createElement("circle",mc({},de(t,!1),Di(t),{className:o,cx:r,cy:n,r:a})):null};function ni(e){"@babel/helpers - typeof";return ni=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ni(e)}var KR=["x","y","top","left","width","height","className"];function gc(){return gc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},gc.apply(this,arguments)}function ym(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function GR(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ym(Object(r),!0).forEach(function(n){qR(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ym(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function qR(e,t,r){return t=VR(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function VR(e){var t=HR(e,"string");return ni(t)=="symbol"?t:t+""}function HR(e,t){if(ni(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ni(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function YR(e,t){if(e==null)return{};var r=XR(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function XR(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var JR=function(t,r,n,a,i,o){return"M".concat(t,",").concat(i,"v").concat(a,"M").concat(o,",").concat(r,"h").concat(n)},ZR=function(t){var r=t.x,n=r===void 0?0:r,a=t.y,i=a===void 0?0:a,o=t.top,s=o===void 0?0:o,l=t.left,u=l===void 0?0:l,c=t.width,f=c===void 0?0:c,d=t.height,h=d===void 0?0:d,y=t.className,v=YR(t,KR),p=GR({x:n,y:i,top:s,left:u,width:f,height:h},v);return!J(n)||!J(i)||!J(f)||!J(h)||!J(s)||!J(u)?null:S.createElement("path",gc({},de(p,!0),{className:ye("recharts-cross",y),d:JR(n,i,f,h,s,u)}))},QR=Zd,e5=QR(Object.getPrototypeOf,Object),t5=e5,r5=Xt,n5=t5,a5=Jt,i5="[object Object]",o5=Function.prototype,s5=Object.prototype,mm=o5.toString,l5=s5.hasOwnProperty,u5=mm.call(Object);function c5(e){if(!a5(e)||r5(e)!=i5)return!1;var t=n5(e);if(t===null)return!0;var r=l5.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&mm.call(r)==u5}var f5=c5;const d5=Ce(f5);var h5=Xt,p5=Jt,v5="[object Boolean]";function y5(e){return e===!0||e===!1||p5(e)&&h5(e)==v5}var m5=y5;const g5=Ce(m5);function ai(e){"@babel/helpers - typeof";return ai=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ai(e)}function Yo(){return Yo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Yo.apply(this,arguments)}function b5(e,t){return S5(e)||O5(e,t)||w5(e,t)||x5()}function x5(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
195
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function w5(e,t){if(e){if(typeof e=="string")return gm(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return gm(e,t)}}function gm(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function O5(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function S5(e){if(Array.isArray(e))return e}function bm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function xm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bm(Object(r),!0).forEach(function(n){A5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function A5(e,t,r){return t=T5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function T5(e){var t=P5(e,"string");return ai(t)=="symbol"?t:t+""}function P5(e,t){if(ai(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ai(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var wm=function(t,r,n,a,i){var o=n-a,s;return s="M ".concat(t,",").concat(r),s+="L ".concat(t+n,",").concat(r),s+="L ".concat(t+n-o/2,",").concat(r+i),s+="L ".concat(t+n-o/2-a,",").concat(r+i),s+="L ".concat(t,",").concat(r," Z"),s},_5={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},E5=function(t){var r=xm(xm({},_5),t),n=S.useRef(),a=S.useState(-1),i=b5(a,2),o=i[0],s=i[1];S.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var w=n.current.getTotalLength();w&&s(w)}catch{}},[]);var l=r.x,u=r.y,c=r.upperWidth,f=r.lowerWidth,d=r.height,h=r.className,y=r.animationEasing,v=r.animationDuration,p=r.animationBegin,g=r.isUpdateAnimationActive;if(l!==+l||u!==+u||c!==+c||f!==+f||d!==+d||c===0&&f===0||d===0)return null;var O=ye("recharts-trapezoid",h);return g?S.createElement(Dt,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:d,x:l,y:u},to:{upperWidth:c,lowerWidth:f,height:d,x:l,y:u},duration:v,animationEasing:y,isActive:g},function(w){var A=w.upperWidth,m=w.lowerWidth,x=w.height,T=w.x,P=w.y;return S.createElement(Dt,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:p,duration:v,easing:y},S.createElement("path",Yo({},de(r,!0),{className:O,d:wm(T,P,A,m,x),ref:n})))}):S.createElement("g",null,S.createElement("path",Yo({},de(r,!0),{className:O,d:wm(l,u,c,f,d)})))},j5=["option","shapeType","propTransformer","activeClassName","isActive"];function ii(e){"@babel/helpers - typeof";return ii=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ii(e)}function $5(e,t){if(e==null)return{};var r=C5(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function C5(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Om(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Xo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Om(Object(r),!0).forEach(function(n){M5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Om(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function M5(e,t,r){return t=k5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function k5(e){var t=N5(e,"string");return ii(t)=="symbol"?t:t+""}function N5(e,t){if(ii(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ii(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function D5(e,t){return Xo(Xo({},t),e)}function I5(e,t){return e==="symbols"}function Sm(e){var t=e.shapeType,r=e.elementProps;switch(t){case"rectangle":return S.createElement(yc,r);case"trapezoid":return S.createElement(E5,r);case"sector":return S.createElement(Py,r);case"symbols":if(I5(t))return S.createElement(qi,r);break;default:return null}}function L5(e){return S.isValidElement(e)?e.props:e}function bc(e){var t=e.option,r=e.shapeType,n=e.propTransformer,a=n===void 0?D5:n,i=e.activeClassName,o=i===void 0?"recharts-active-shape":i,s=e.isActive,l=$5(e,j5),u;if(S.isValidElement(t))u=S.cloneElement(t,Xo(Xo({},l),L5(t)));else if(he(t))u=t(l);else if(d5(t)&&!g5(t)){var c=a(t,l);u=S.createElement(Sm,{shapeType:r,elementProps:c})}else{var f=l;u=S.createElement(Sm,{shapeType:r,elementProps:f})}return s?S.createElement(xe,{className:o},u):u}function Jo(e,t){return t!=null&&"trapezoids"in e.props}function Zo(e,t){return t!=null&&"sectors"in e.props}function oi(e,t){return t!=null&&"points"in e.props}function R5(e,t){var r,n,a=e.x===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.x)||e.x===t.x,i=e.y===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.y)||e.y===t.y;return a&&i}function B5(e,t){var r=e.endAngle===t.endAngle,n=e.startAngle===t.startAngle;return r&&n}function F5(e,t){var r=e.x===t.x,n=e.y===t.y,a=e.z===t.z;return r&&n&&a}function W5(e,t){var r;return Jo(e,t)?r=R5:Zo(e,t)?r=B5:oi(e,t)&&(r=F5),r}function U5(e,t){var r;return Jo(e,t)?r="trapezoids":Zo(e,t)?r="sectors":oi(e,t)&&(r="points"),r}function z5(e,t){if(Jo(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}if(Zo(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}return oi(e,t)?t.payload:{}}function K5(e){var t=e.activeTooltipItem,r=e.graphicalItem,n=e.itemData,a=U5(r,t),i=z5(r,t),o=n.filter(function(l,u){var c=Br(i,l),f=r.props[a].filter(function(y){var v=W5(r,t);return v(y,t)}),d=r.props[a].indexOf(f[f.length-1]),h=u===d;return c&&h}),s=n.indexOf(o[o.length-1]);return s}var G5=Math.ceil,q5=Math.max;function V5(e,t,r,n){for(var a=-1,i=q5(G5((t-e)/(r||1)),0),o=Array(i);i--;)o[n?i:++a]=e,e+=r;return o}var H5=V5,Y5=Xh,Am=1/0,X5=17976931348623157e292;function J5(e){if(!e)return e===0?e:0;if(e=Y5(e),e===Am||e===-Am){var t=e<0?-1:1;return t*X5}return e===e?e:0}var Tm=J5,Z5=H5,Q5=to,xc=Tm;function e6(e){return function(t,r,n){return n&&typeof n!="number"&&Q5(t,r,n)&&(r=n=void 0),t=xc(t),r===void 0?(r=t,t=0):r=xc(r),n=n===void 0?t<r?1:-1:xc(n),Z5(t,r,n,e)}}var t6=e6,r6=t6,n6=r6(),a6=n6;const Qo=Ce(a6);function si(e){"@babel/helpers - typeof";return si=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},si(e)}function Pm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function _m(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Pm(Object(r),!0).forEach(function(n){Em(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Em(e,t,r){return t=i6(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i6(e){var t=o6(e,"string");return si(t)=="symbol"?t:t+""}function o6(e,t){if(si(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(si(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var s6=["Webkit","Moz","O","ms"],l6=function(t,r){var n=t.replace(/(\w)/,function(i){return i.toUpperCase()}),a=s6.reduce(function(i,o){return _m(_m({},i),{},Em({},o+n,r))},{});return a[t]=r,a};function Nn(e){"@babel/helpers - typeof";return Nn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nn(e)}function es(){return es=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},es.apply(this,arguments)}function jm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function wc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jm(Object(r),!0).forEach(function(n){gt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function u6(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $m(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Mm(n.key),n)}}function c6(e,t,r){return t&&$m(e.prototype,t),r&&$m(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function f6(e,t,r){return t=ts(t),d6(e,Cm()?Reflect.construct(t,r||[],ts(e).constructor):t.apply(e,r))}function d6(e,t){if(t&&(Nn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return h6(e)}function h6(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Cm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Cm=function(){return!!e})()}function ts(e){return ts=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ts(e)}function p6(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Oc(e,t)}function Oc(e,t){return Oc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Oc(e,t)}function gt(e,t,r){return t=Mm(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Mm(e){var t=v6(e,"string");return Nn(t)=="symbol"?t:t+""}function v6(e,t){if(Nn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Nn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var y6=function(t){var r=t.data,n=t.startIndex,a=t.endIndex,i=t.x,o=t.width,s=t.travellerWidth;if(!r||!r.length)return{};var l=r.length,u=_a().domain(Qo(0,l)).range([i,i+o-s]),c=u.domain().map(function(f){return u(f)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:u(n),endX:u(a),scale:u,scaleValues:c}},km=function(t){return t.changedTouches&&!!t.changedTouches.length},Dn=function(e){function t(r){var n;return u6(this,t),n=f6(this,t,[r]),gt(n,"handleDrag",function(a){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(a):n.state.isSlideMoving&&n.handleSlideDrag(a)}),gt(n,"handleTouchMove",function(a){a.changedTouches!=null&&a.changedTouches.length>0&&n.handleDrag(a.changedTouches[0])}),gt(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var a=n.props,i=a.endIndex,o=a.onDragEnd,s=a.startIndex;o==null||o({endIndex:i,startIndex:s})}),n.detachDragEndListener()}),gt(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),gt(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),gt(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),gt(n,"handleSlideDragStart",function(a){var i=km(a)?a.changedTouches[0]:a;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:i.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return p6(t,e),c6(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var a=n.startX,i=n.endX,o=this.state.scaleValues,s=this.props,l=s.gap,u=s.data,c=u.length-1,f=Math.min(a,i),d=Math.max(a,i),h=t.getIndexInRange(o,f),y=t.getIndexInRange(o,d);return{startIndex:h-h%l,endIndex:y===c?c:y-y%l}}},{key:"getTextOfTick",value:function(n){var a=this.props,i=a.data,o=a.tickFormatter,s=a.dataKey,l=Je(i[n],s,n);return he(o)?o(l,n):l}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(n){var a=this.state,i=a.slideMoveStartX,o=a.startX,s=a.endX,l=this.props,u=l.x,c=l.width,f=l.travellerWidth,d=l.startIndex,h=l.endIndex,y=l.onChange,v=n.pageX-i;v>0?v=Math.min(v,u+c-f-s,u+c-f-o):v<0&&(v=Math.max(v,u-o,u-s));var p=this.getIndex({startX:o+v,endX:s+v});(p.startIndex!==d||p.endIndex!==h)&&y&&y(p),this.setState({startX:o+v,endX:s+v,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,a){var i=km(a)?a.changedTouches[0]:a;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:i.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var a=this.state,i=a.brushMoveStartX,o=a.movingTravellerId,s=a.endX,l=a.startX,u=this.state[o],c=this.props,f=c.x,d=c.width,h=c.travellerWidth,y=c.onChange,v=c.gap,p=c.data,g={startX:this.state.startX,endX:this.state.endX},O=n.pageX-i;O>0?O=Math.min(O,f+d-h-u):O<0&&(O=Math.max(O,f-u)),g[o]=u+O;var w=this.getIndex(g),A=w.startIndex,m=w.endIndex,x=function(){var P=p.length-1;return o==="startX"&&(s>l?A%v===0:m%v===0)||s<l&&m===P||o==="endX"&&(s>l?m%v===0:A%v===0)||s>l&&m===P};this.setState(gt(gt({},o,u+O),"brushMoveStartX",n.pageX),function(){y&&x()&&y(w)})}},{key:"handleTravellerMoveKeyboard",value:function(n,a){var i=this,o=this.state,s=o.scaleValues,l=o.startX,u=o.endX,c=this.state[a],f=s.indexOf(c);if(f!==-1){var d=f+n;if(!(d===-1||d>=s.length)){var h=s[d];a==="startX"&&h>=u||a==="endX"&&h<=l||this.setState(gt({},a,h),function(){i.props.onChange(i.getIndex({startX:i.state.startX,endX:i.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,a=n.x,i=n.y,o=n.width,s=n.height,l=n.fill,u=n.stroke;return S.createElement("rect",{stroke:u,fill:l,x:a,y:i,width:o,height:s})}},{key:"renderPanorama",value:function(){var n=this.props,a=n.x,i=n.y,o=n.width,s=n.height,l=n.data,u=n.children,c=n.padding,f=S.Children.only(u);return f?S.cloneElement(f,{x:a,y:i,width:o,height:s,margin:c,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(n,a){var i,o,s=this,l=this.props,u=l.y,c=l.travellerWidth,f=l.height,d=l.traveller,h=l.ariaLabel,y=l.data,v=l.startIndex,p=l.endIndex,g=Math.max(n,this.props.x),O=wc(wc({},de(this.props,!1)),{},{x:g,y:u,width:c,height:f}),w=h||"Min value: ".concat((i=y[v])===null||i===void 0?void 0:i.name,", Max value: ").concat((o=y[p])===null||o===void 0?void 0:o.name);return S.createElement(xe,{tabIndex:0,role:"slider","aria-label":w,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[a],onTouchStart:this.travellerDragStartHandlers[a],onKeyDown:function(m){["ArrowLeft","ArrowRight"].includes(m.key)&&(m.preventDefault(),m.stopPropagation(),s.handleTravellerMoveKeyboard(m.key==="ArrowRight"?1:-1,a))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(d,O))}},{key:"renderSlide",value:function(n,a){var i=this.props,o=i.y,s=i.height,l=i.stroke,u=i.travellerWidth,c=Math.min(n,a)+u,f=Math.max(Math.abs(a-n)-u,0);return S.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:c,y:o,width:f,height:s})}},{key:"renderText",value:function(){var n=this.props,a=n.startIndex,i=n.endIndex,o=n.y,s=n.height,l=n.travellerWidth,u=n.stroke,c=this.state,f=c.startX,d=c.endX,h=5,y={pointerEvents:"none",fill:u};return S.createElement(xe,{className:"recharts-brush-texts"},S.createElement(lo,es({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,d)-h,y:o+s/2},y),this.getTextOfTick(a)),S.createElement(lo,es({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,d)+l+h,y:o+s/2},y),this.getTextOfTick(i)))}},{key:"render",value:function(){var n=this.props,a=n.data,i=n.className,o=n.children,s=n.x,l=n.y,u=n.width,c=n.height,f=n.alwaysShowText,d=this.state,h=d.startX,y=d.endX,v=d.isTextActive,p=d.isSlideMoving,g=d.isTravellerMoving,O=d.isTravellerFocused;if(!a||!a.length||!J(s)||!J(l)||!J(u)||!J(c)||u<=0||c<=0)return null;var w=ye("recharts-brush",i),A=S.Children.count(o)===1,m=l6("userSelect","none");return S.createElement(xe,{className:w,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:m},this.renderBackground(),A&&this.renderPanorama(),this.renderSlide(h,y),this.renderTravellerLayer(h,"startX"),this.renderTravellerLayer(y,"endX"),(v||p||g||O||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var a=n.x,i=n.y,o=n.width,s=n.height,l=n.stroke,u=Math.floor(i+s/2)-1;return S.createElement(S.Fragment,null,S.createElement("rect",{x:a,y:i,width:o,height:s,fill:l,stroke:"none"}),S.createElement("line",{x1:a+1,y1:u,x2:a+o-1,y2:u,fill:"none",stroke:"#fff"}),S.createElement("line",{x1:a+1,y1:u+2,x2:a+o-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,a){var i;return S.isValidElement(n)?i=S.cloneElement(n,a):he(n)?i=n(a):i=t.renderDefaultTraveller(a),i}},{key:"getDerivedStateFromProps",value:function(n,a){var i=n.data,o=n.width,s=n.x,l=n.travellerWidth,u=n.updateId,c=n.startIndex,f=n.endIndex;if(i!==a.prevData||u!==a.prevUpdateId)return wc({prevData:i,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:o},i&&i.length?y6({data:i,width:o,x:s,travellerWidth:l,startIndex:c,endIndex:f}):{scale:null,scaleValues:null});if(a.scale&&(o!==a.prevWidth||s!==a.prevX||l!==a.prevTravellerWidth)){a.scale.range([s,s+o-l]);var d=a.scale.domain().map(function(h){return a.scale(h)});return{prevData:i,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:o,startX:a.scale(n.startIndex),endX:a.scale(n.endIndex),scaleValues:d}}return null}},{key:"getIndexInRange",value:function(n,a){for(var i=n.length,o=0,s=i-1;s-o>1;){var l=Math.floor((o+s)/2);n[l]>a?s=l:o=l}return a>=n[s]?s:o}}])}(S.PureComponent);gt(Dn,"displayName","Brush"),gt(Dn,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var m6=Rl;function g6(e,t){var r;return m6(e,function(n,a,i){return r=t(n,a,i),!r}),!!r}var b6=g6,x6=Ld,w6=pr,O6=b6,S6=ct,A6=to;function T6(e,t,r){var n=S6(e)?x6:O6;return r&&A6(e,t,r)&&(t=void 0),n(e,w6(t))}var P6=T6;const _6=Ce(P6);var qt=function(t,r){var n=t.alwaysShow,a=t.ifOverflow;return n&&(a="extendDomain"),a===r},Nm=kh;function E6(e,t,r){t=="__proto__"&&Nm?Nm(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var j6=E6,$6=j6,C6=jh,M6=pr;function k6(e,t){var r={};return t=M6(t),C6(e,function(n,a,i){$6(r,a,t(n,a,i))}),r}var N6=k6;const D6=Ce(N6);function I6(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}var L6=I6,R6=Rl;function B6(e,t){var r=!0;return R6(e,function(n,a,i){return r=!!t(n,a,i),r}),r}var F6=B6,W6=L6,U6=F6,z6=pr,K6=ct,G6=to;function q6(e,t,r){var n=K6(e)?W6:U6;return r&&G6(e,t,r)&&(t=void 0),n(e,z6(t))}var V6=q6;const Dm=Ce(V6);var H6=["x","y"];function In(e){"@babel/helpers - typeof";return In=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},In(e)}function Sc(){return Sc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Sc.apply(this,arguments)}function Im(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function li(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Im(Object(r),!0).forEach(function(n){Y6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Im(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Y6(e,t,r){return t=X6(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function X6(e){var t=J6(e,"string");return In(t)=="symbol"?t:t+""}function J6(e,t){if(In(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(In(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Z6(e,t){if(e==null)return{};var r=Q6(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Q6(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function e4(e,t){var r=e.x,n=e.y,a=Z6(e,H6),i="".concat(r),o=parseInt(i,10),s="".concat(n),l=parseInt(s,10),u="".concat(t.height||a.height),c=parseInt(u,10),f="".concat(t.width||a.width),d=parseInt(f,10);return li(li(li(li(li({},t),a),o?{x:o}:{}),l?{y:l}:{}),{},{height:c,width:d,name:t.name,radius:t.radius})}function Lm(e){return S.createElement(bc,Sc({shapeType:"rectangle",propTransformer:e4,activeClassName:"recharts-active-bar"},e))}var t4=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,a){if(typeof t=="number")return t;var i=J(n)||hO(n);return i?t(n,a):(i||(process.env.NODE_ENV!=="production"?ht(!1,"minPointSize callback function received a value with type of ".concat(In(n),". Currently only numbers or null/undefined are supported.")):ht()),r)}},r4=["value","background"],Rm;function Ln(e){"@babel/helpers - typeof";return Ln=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ln(e)}function n4(e,t){if(e==null)return{};var r=a4(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function a4(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function rs(){return rs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},rs.apply(this,arguments)}function Bm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ve(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Bm(Object(r),!0).forEach(function(n){Or(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function i4(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fm(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Um(n.key),n)}}function o4(e,t,r){return t&&Fm(e.prototype,t),r&&Fm(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function s4(e,t,r){return t=ns(t),l4(e,Wm()?Reflect.construct(t,r||[],ns(e).constructor):t.apply(e,r))}function l4(e,t){if(t&&(Ln(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return u4(e)}function u4(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Wm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Wm=function(){return!!e})()}function ns(e){return ns=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ns(e)}function c4(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ac(e,t)}function Ac(e,t){return Ac=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Ac(e,t)}function Or(e,t,r){return t=Um(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Um(e){var t=f4(e,"string");return Ln(t)=="symbol"?t:t+""}function f4(e,t){if(Ln(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ln(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Rn=function(e){function t(){var r;i4(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=s4(this,t,[].concat(a)),Or(r,"state",{isAnimationFinished:!1}),Or(r,"id",$r("recharts-bar-")),Or(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),o&&o()}),Or(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),o&&o()}),r}return c4(t,e),o4(t,[{key:"renderRectanglesStatically",value:function(n){var a=this,i=this.props,o=i.shape,s=i.dataKey,l=i.activeIndex,u=i.activeBar,c=de(this.props,!1);return n&&n.map(function(f,d){var h=d===l,y=h?u:o,v=Ve(Ve(Ve({},c),f),{},{isActive:h,option:y,index:d,dataKey:s,onAnimationStart:a.handleAnimationStart,onAnimationEnd:a.handleAnimationEnd});return S.createElement(xe,rs({className:"recharts-bar-rectangle"},ha(a.props,f,d),{key:"rectangle-".concat(f==null?void 0:f.x,"-").concat(f==null?void 0:f.y,"-").concat(f==null?void 0:f.value,"-").concat(d)}),S.createElement(Lm,v))})}},{key:"renderRectanglesWithAnimation",value:function(){var n=this,a=this.props,i=a.data,o=a.layout,s=a.isAnimationActive,l=a.animationBegin,u=a.animationDuration,c=a.animationEasing,f=a.animationId,d=this.state.prevData;return S.createElement(Dt,{begin:l,duration:u,isActive:s,easing:c,from:{t:0},to:{t:1},key:"bar-".concat(f),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(h){var y=h.t,v=i.map(function(p,g){var O=d&&d[g];if(O){var w=Ue(O.x,p.x),A=Ue(O.y,p.y),m=Ue(O.width,p.width),x=Ue(O.height,p.height);return Ve(Ve({},p),{},{x:w(y),y:A(y),width:m(y),height:x(y)})}if(o==="horizontal"){var T=Ue(0,p.height),P=T(y);return Ve(Ve({},p),{},{y:p.y+p.height-P,height:P})}var $=Ue(0,p.width),k=$(y);return Ve(Ve({},p),{},{width:k})});return S.createElement(xe,null,n.renderRectanglesStatically(v))})}},{key:"renderRectangles",value:function(){var n=this.props,a=n.data,i=n.isAnimationActive,o=this.state.prevData;return i&&a&&a.length&&(!o||!Br(o,a))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(a)}},{key:"renderBackground",value:function(){var n=this,a=this.props,i=a.data,o=a.dataKey,s=a.activeIndex,l=de(this.props.background,!1);return i.map(function(u,c){u.value;var f=u.background,d=n4(u,r4);if(!f)return null;var h=Ve(Ve(Ve(Ve(Ve({},d),{},{fill:"#eee"},f),l),ha(n.props,u,c)),{},{onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd,dataKey:o,index:c,className:"recharts-bar-background-rectangle"});return S.createElement(Lm,rs({key:"background-bar-".concat(c),option:n.props.background,isActive:c===s},h))})}},{key:"renderErrorBar",value:function(n,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,o=i.data,s=i.xAxis,l=i.yAxis,u=i.layout,c=i.children,f=ft(c,$n);if(!f)return null;var d=u==="vertical"?o[0].height/2:o[0].width/2,h=function(p,g){var O=Array.isArray(p.value)?p.value[1]:p.value;return{x:p.x,y:p.y,value:O,errorVal:Je(p,g)}},y={clipPath:n?"url(#clipPath-".concat(a,")"):null};return S.createElement(xe,y,f.map(function(v){return S.cloneElement(v,{key:"error-bar-".concat(a,"-").concat(v.props.dataKey),data:o,xAxis:s,yAxis:l,layout:u,offset:d,dataPointFormatter:h})}))}},{key:"render",value:function(){var n=this.props,a=n.hide,i=n.data,o=n.className,s=n.xAxis,l=n.yAxis,u=n.left,c=n.top,f=n.width,d=n.height,h=n.isAnimationActive,y=n.background,v=n.id;if(a||!i||!i.length)return null;var p=this.state.isAnimationFinished,g=ye("recharts-bar",o),O=s&&s.allowDataOverflow,w=l&&l.allowDataOverflow,A=O||w,m=fe(v)?this.id:v;return S.createElement(xe,{className:g},O||w?S.createElement("defs",null,S.createElement("clipPath",{id:"clipPath-".concat(m)},S.createElement("rect",{x:O?u:u-f/2,y:w?c:c-d/2,width:O?f:f*2,height:w?d:d*2}))):null,S.createElement(xe,{className:"recharts-bar-rectangles",clipPath:A?"url(#clipPath-".concat(m,")"):null},y?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(A,m),(!h||p)&&Gt.renderCallByParent(this.props,i))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curData:n.data,prevData:a.curData}:n.data!==a.curData?{curData:n.data}:null}}])}(S.PureComponent);Rm=Rn,Or(Rn,"displayName","Bar"),Or(Rn,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!vr.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"}),Or(Rn,"getComposedData",function(e){var t=e.props,r=e.item,n=e.barPosition,a=e.bandSize,i=e.xAxis,o=e.yAxis,s=e.xAxisTicks,l=e.yAxisTicks,u=e.stackedData,c=e.dataStartIndex,f=e.displayedData,d=e.offset,h=LI(n,r);if(!h)return null;var y=t.layout,v=r.type.defaultProps,p=v!==void 0?Ve(Ve({},v),r.props):r.props,g=p.dataKey,O=p.children,w=p.minPointSize,A=y==="horizontal"?o:i,m=u?A.scale.domain():null,x=GI({numericAxis:A}),T=ft(O,Hl),P=f.map(function($,k){var E,j,R,N,I,C;u?E=RI(u[c+k],m):(E=Je($,g),Array.isArray(E)||(E=[x,E]));var B=t4(w,Rm.defaultProps.minPointSize)(E[1],k);if(y==="horizontal"){var U,K=[o.scale(E[0]),o.scale(E[1])],_=K[0],L=K[1];j=uy({axis:i,ticks:s,bandSize:a,offset:h.offset,entry:$,index:k}),R=(U=L??_)!==null&&U!==void 0?U:void 0,N=h.size;var F=_-L;if(I=Number.isNaN(F)?0:F,C={x:j,y:o.y,width:N,height:o.height},Math.abs(B)>0&&Math.abs(I)<Math.abs(B)){var W=Ct(I||B)*(Math.abs(B)-Math.abs(I));R-=W,I+=W}}else{var G=[i.scale(E[0]),i.scale(E[1])],X=G[0],Q=G[1];if(j=X,R=uy({axis:o,ticks:l,bandSize:a,offset:h.offset,entry:$,index:k}),N=Q-X,I=h.size,C={x:i.x,y:R,width:i.width,height:I},Math.abs(B)>0&&Math.abs(N)<Math.abs(B)){var ae=Ct(N||B)*(Math.abs(B)-Math.abs(N));N+=ae}}return Ve(Ve(Ve({},$),{},{x:j,y:R,width:N,height:I,value:u?E:E[1],payload:$,background:C},T&&T[k]&&T[k].props),{},{tooltipPayload:[py(r,$)],tooltipPosition:{x:j+N/2,y:R+I/2}})});return Ve({data:P,layout:y},d)});function ui(e){"@babel/helpers - typeof";return ui=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ui(e)}function d4(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zm(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Gm(n.key),n)}}function h4(e,t,r){return t&&zm(e.prototype,t),r&&zm(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Km(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function It(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Km(Object(r),!0).forEach(function(n){as(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Km(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function as(e,t,r){return t=Gm(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Gm(e){var t=p4(e,"string");return ui(t)=="symbol"?t:t+""}function p4(e,t){if(ui(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ui(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var v4=function(t,r,n,a,i){var o=t.width,s=t.height,l=t.layout,u=t.children,c=Object.keys(r),f={left:n.left,leftMirror:n.left,right:o-n.right,rightMirror:o-n.right,top:n.top,topMirror:n.top,bottom:s-n.bottom,bottomMirror:s-n.bottom},d=!!yt(u,Rn);return c.reduce(function(h,y){var v=r[y],p=v.orientation,g=v.domain,O=v.padding,w=O===void 0?{}:O,A=v.mirror,m=v.reversed,x="".concat(p).concat(A?"Mirror":""),T,P,$,k,E;if(v.type==="number"&&(v.padding==="gap"||v.padding==="no-gap")){var j=g[1]-g[0],R=1/0,N=v.categoricalDomain.sort(mO);if(N.forEach(function(G,X){X>0&&(R=Math.min((G||0)-(N[X-1]||0),R))}),Number.isFinite(R)){var I=R/j,C=v.layout==="vertical"?n.height:n.width;if(v.padding==="gap"&&(T=I*C/2),v.padding==="no-gap"){var B=Cr(t.barCategoryGap,I*C),U=I*C/2;T=U-B-(U-B)/C*B}}}a==="xAxis"?P=[n.left+(w.left||0)+(T||0),n.left+n.width-(w.right||0)-(T||0)]:a==="yAxis"?P=l==="horizontal"?[n.top+n.height-(w.bottom||0),n.top+(w.top||0)]:[n.top+(w.top||0)+(T||0),n.top+n.height-(w.bottom||0)-(T||0)]:P=v.range,m&&(P=[P[1],P[0]]);var K=DI(v,i,d),_=K.scale,L=K.realScaleType;_.domain(g).range(P),II(_);var F=KI(_,It(It({},v),{},{realScaleType:L}));a==="xAxis"?(E=p==="top"&&!A||p==="bottom"&&A,$=n.left,k=f[x]-E*v.height):a==="yAxis"&&(E=p==="left"&&!A||p==="right"&&A,$=f[x]-E*v.width,k=n.top);var W=It(It(It({},v),F),{},{realScaleType:L,x:$,y:k,scale:_,width:a==="xAxis"?n.width:v.width,height:a==="yAxis"?n.height:v.height});return W.bandSize=Io(W,F),!v.hide&&a==="xAxis"?f[x]+=(E?-1:1)*W.height:v.hide||(f[x]+=(E?-1:1)*W.width),It(It({},h),{},as({},y,W))},{})},qm=function(t,r){var n=t.x,a=t.y,i=r.x,o=r.y;return{x:Math.min(n,i),y:Math.min(a,o),width:Math.abs(i-n),height:Math.abs(o-a)}},y4=function(t){var r=t.x1,n=t.y1,a=t.x2,i=t.y2;return qm({x:r,y:n},{x:a,y:i})},Vm=function(){function e(t){d4(this,e),this.scale=t}return h4(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=n.bandAware,i=n.position;if(r!==void 0){if(i)switch(i){case"start":return this.scale(r);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+o}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(r)+s}default:return this.scale(r)}if(a){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+l}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),a=n[0],i=n[n.length-1];return a<=i?r>=a&&r<=i:r>=i&&r<=a}}],[{key:"create",value:function(r){return new e(r)}}])}();as(Vm,"EPS",1e-4);var Tc=function(t){var r=Object.keys(t).reduce(function(n,a){return It(It({},n),{},as({},a,Vm.create(t[a])))},{});return It(It({},r),{},{apply:function(a){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=i.bandAware,s=i.position;return D6(a,function(l,u){return r[u].apply(l,{bandAware:o,position:s})})},isInRange:function(a){return Dm(a,function(i,o){return r[o].isInRange(i)})}})};function m4(e){return(e%180+180)%180}var g4=function(t){var r=t.width,n=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=m4(a),o=i*Math.PI/180,s=Math.atan(n/r),l=o>s&&o<Math.PI-s?n/Math.sin(o):r/Math.cos(o);return Math.abs(l)},b4=pr,x4=ya,w4=Ji;function O4(e){return function(t,r,n){var a=Object(t);if(!x4(t)){var i=b4(r);t=w4(t),r=function(s){return i(a[s],s,a)}}var o=e(t,r,n);return o>-1?a[i?t[o]:o]:void 0}}var S4=O4,A4=Tm;function T4(e){var t=A4(e),r=t%1;return t===t?r?t-r:t:0}var P4=T4,_4=mh,E4=pr,j4=P4,$4=Math.max;function C4(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var a=r==null?0:j4(r);return a<0&&(a=$4(n+a,0)),_4(e,E4(t),a)}var M4=C4,k4=S4,N4=M4,D4=k4(N4),I4=D4;const L4=Ce(I4);var R4=b1(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")});function is(e){"@babel/helpers - typeof";return is=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},is(e)}var Pc=S.createContext(void 0),_c=S.createContext(void 0),Hm=S.createContext(void 0),Ym=S.createContext({}),Xm=S.createContext(void 0),Jm=S.createContext(0),Zm=S.createContext(0),Qm=function(t){var r=t.state,n=r.xAxisMap,a=r.yAxisMap,i=r.offset,o=t.clipPathId,s=t.children,l=t.width,u=t.height,c=R4(i);return S.createElement(Pc.Provider,{value:n},S.createElement(_c.Provider,{value:a},S.createElement(Ym.Provider,{value:i},S.createElement(Hm.Provider,{value:c},S.createElement(Xm.Provider,{value:o},S.createElement(Jm.Provider,{value:u},S.createElement(Zm.Provider,{value:l},s)))))))},B4=function(){return S.useContext(Xm)};function eg(e){var t=Object.keys(e);return t.length===0?"There are no available ids.":"Available ids are: ".concat(t,".")}var tg=function(t){var r=S.useContext(Pc);r==null&&(process.env.NODE_ENV!=="production"?ht(!1,"Could not find Recharts context; are you sure this is rendered inside a Recharts wrapper component?"):ht());var n=r[t];return n==null&&(process.env.NODE_ENV!=="production"?ht(!1,'Could not find xAxis by id "'.concat(t,'" [').concat(is(t),"]. ").concat(eg(r))):ht()),n},F4=function(){var t=S.useContext(Pc);return hr(t)},W4=function(){var t=S.useContext(_c),r=L4(t,function(n){return Dm(n.domain,Number.isFinite)});return r||hr(t)},rg=function(t){var r=S.useContext(_c);r==null&&(process.env.NODE_ENV!=="production"?ht(!1,"Could not find Recharts context; are you sure this is rendered inside a Recharts wrapper component?"):ht());var n=r[t];return n==null&&(process.env.NODE_ENV!=="production"?ht(!1,'Could not find yAxis by id "'.concat(t,'" [').concat(is(t),"]. ").concat(eg(r))):ht()),n},U4=function(){var t=S.useContext(Hm);return t},z4=function(){return S.useContext(Ym)},Ec=function(){return S.useContext(Zm)},jc=function(){return S.useContext(Jm)};function Bn(e){"@babel/helpers - typeof";return Bn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bn(e)}function K4(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function G4(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,og(n.key),n)}}function q4(e,t,r){return t&&G4(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function V4(e,t,r){return t=os(t),H4(e,ng()?Reflect.construct(t,r||[],os(e).constructor):t.apply(e,r))}function H4(e,t){if(t&&(Bn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Y4(e)}function Y4(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ng(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ng=function(){return!!e})()}function os(e){return os=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},os(e)}function X4(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$c(e,t)}function $c(e,t){return $c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},$c(e,t)}function ag(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ig(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ag(Object(r),!0).forEach(function(n){Cc(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ag(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Cc(e,t,r){return t=og(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function og(e){var t=J4(e,"string");return Bn(t)=="symbol"?t:t+""}function J4(e,t){if(Bn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Bn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Z4(e,t){return rB(e)||tB(e,t)||eB(e,t)||Q4()}function Q4(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
196
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eB(e,t){if(e){if(typeof e=="string")return sg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return sg(e,t)}}function sg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function tB(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function rB(e){if(Array.isArray(e))return e}function Mc(){return Mc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Mc.apply(this,arguments)}var nB=function(t,r){var n;return S.isValidElement(t)?n=S.cloneElement(t,r):he(t)?n=t(r):n=S.createElement("line",Mc({},r,{className:"recharts-reference-line-line"})),n},aB=function(t,r,n,a,i,o,s,l,u){var c=i.x,f=i.y,d=i.width,h=i.height;if(n){var y=u.y,v=t.y.apply(y,{position:o});if(qt(u,"discard")&&!t.y.isInRange(v))return null;var p=[{x:c+d,y:v},{x:c,y:v}];return l==="left"?p.reverse():p}if(r){var g=u.x,O=t.x.apply(g,{position:o});if(qt(u,"discard")&&!t.x.isInRange(O))return null;var w=[{x:O,y:f+h},{x:O,y:f}];return s==="top"?w.reverse():w}if(a){var A=u.segment,m=A.map(function(x){return t.apply(x,{position:o})});return qt(u,"discard")&&_6(m,function(x){return!t.isInRange(x)})?null:m}return null};function iB(e){var t=e.x,r=e.y,n=e.segment,a=e.xAxisId,i=e.yAxisId,o=e.shape,s=e.className,l=e.alwaysShow,u=B4(),c=tg(a),f=rg(i),d=U4();if(!u||!d)return null;Qt(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var h=Tc({x:c.scale,y:f.scale}),y=Ye(t),v=Ye(r),p=n&&n.length===2,g=aB(h,y,v,p,d,e.position,c.orientation,f.orientation,e);if(!g)return null;var O=Z4(g,2),w=O[0],A=w.x,m=w.y,x=O[1],T=x.x,P=x.y,$=qt(e,"hidden")?"url(#".concat(u,")"):void 0,k=ig(ig({clipPath:$},de(e,!0)),{},{x1:A,y1:m,x2:T,y2:P});return S.createElement(xe,{className:ye("recharts-reference-line",s)},nB(o,k),at.renderCallByParent(e,y4({x1:A,y1:m,x2:T,y2:P})))}var kc=function(e){function t(){return K4(this,t),V4(this,t,arguments)}return X4(t,e),q4(t,[{key:"render",value:function(){return S.createElement(iB,this.props)}}])}(S.Component);Cc(kc,"displayName","ReferenceLine"),Cc(kc,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function Nc(){return Nc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Nc.apply(this,arguments)}function Fn(e){"@babel/helpers - typeof";return Fn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fn(e)}function lg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ug(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lg(Object(r),!0).forEach(function(n){ls(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function oB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sB(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,fg(n.key),n)}}function lB(e,t,r){return t&&sB(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function uB(e,t,r){return t=ss(t),cB(e,cg()?Reflect.construct(t,r||[],ss(e).constructor):t.apply(e,r))}function cB(e,t){if(t&&(Fn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return fB(e)}function fB(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(cg=function(){return!!e})()}function ss(e){return ss=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ss(e)}function dB(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Dc(e,t)}function Dc(e,t){return Dc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Dc(e,t)}function ls(e,t,r){return t=fg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fg(e){var t=hB(e,"string");return Fn(t)=="symbol"?t:t+""}function hB(e,t){if(Fn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Fn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var pB=function(t){var r=t.x,n=t.y,a=t.xAxis,i=t.yAxis,o=Tc({x:a.scale,y:i.scale}),s=o.apply({x:r,y:n},{bandAware:!0});return qt(t,"discard")&&!o.isInRange(s)?null:s},us=function(e){function t(){return oB(this,t),uB(this,t,arguments)}return dB(t,e),lB(t,[{key:"render",value:function(){var n=this.props,a=n.x,i=n.y,o=n.r,s=n.alwaysShow,l=n.clipPathId,u=Ye(a),c=Ye(i);if(Qt(s===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!u||!c)return null;var f=pB(this.props);if(!f)return null;var d=f.x,h=f.y,y=this.props,v=y.shape,p=y.className,g=qt(this.props,"hidden")?"url(#".concat(l,")"):void 0,O=ug(ug({clipPath:g},de(this.props,!0)),{},{cx:d,cy:h});return S.createElement(xe,{className:ye("recharts-reference-dot",p)},t.renderDot(v,O),at.renderCallByParent(this.props,{x:d-o,y:h-o,width:2*o,height:2*o}))}}])}(S.Component);ls(us,"displayName","ReferenceDot"),ls(us,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1}),ls(us,"renderDot",function(e,t){var r;return S.isValidElement(e)?r=S.cloneElement(e,t):he(e)?r=e(t):r=S.createElement(Ho,Nc({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),r});function Ic(){return Ic=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ic.apply(this,arguments)}function Wn(e){"@babel/helpers - typeof";return Wn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wn(e)}function dg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function hg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dg(Object(r),!0).forEach(function(n){fs(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yB(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,vg(n.key),n)}}function mB(e,t,r){return t&&yB(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function gB(e,t,r){return t=cs(t),bB(e,pg()?Reflect.construct(t,r||[],cs(e).constructor):t.apply(e,r))}function bB(e,t){if(t&&(Wn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return xB(e)}function xB(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(pg=function(){return!!e})()}function cs(e){return cs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},cs(e)}function wB(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Lc(e,t)}function Lc(e,t){return Lc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Lc(e,t)}function fs(e,t,r){return t=vg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vg(e){var t=OB(e,"string");return Wn(t)=="symbol"?t:t+""}function OB(e,t){if(Wn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Wn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var SB=function(t,r,n,a,i){var o=i.x1,s=i.x2,l=i.y1,u=i.y2,c=i.xAxis,f=i.yAxis;if(!c||!f)return null;var d=Tc({x:c.scale,y:f.scale}),h={x:t?d.x.apply(o,{position:"start"}):d.x.rangeMin,y:n?d.y.apply(l,{position:"start"}):d.y.rangeMin},y={x:r?d.x.apply(s,{position:"end"}):d.x.rangeMax,y:a?d.y.apply(u,{position:"end"}):d.y.rangeMax};return qt(i,"discard")&&(!d.isInRange(h)||!d.isInRange(y))?null:qm(h,y)},ds=function(e){function t(){return vB(this,t),gB(this,t,arguments)}return wB(t,e),mB(t,[{key:"render",value:function(){var n=this.props,a=n.x1,i=n.x2,o=n.y1,s=n.y2,l=n.className,u=n.alwaysShow,c=n.clipPathId;Qt(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var f=Ye(a),d=Ye(i),h=Ye(o),y=Ye(s),v=this.props.shape;if(!f&&!d&&!h&&!y&&!v)return null;var p=SB(f,d,h,y,this.props);if(!p&&!v)return null;var g=qt(this.props,"hidden")?"url(#".concat(c,")"):void 0;return S.createElement(xe,{className:ye("recharts-reference-area",l)},t.renderRect(v,hg(hg({clipPath:g},de(this.props,!0)),p)),at.renderCallByParent(this.props,p))}}])}(S.Component);fs(ds,"displayName","ReferenceArea"),fs(ds,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1}),fs(ds,"renderRect",function(e,t){var r;return S.isValidElement(e)?r=S.cloneElement(e,t):he(e)?r=e(t):r=S.createElement(yc,Ic({},t,{className:"recharts-reference-area-rect"})),r});function yg(e,t,r){if(t<1)return[];if(t===1&&r===void 0)return e;for(var n=[],a=0;a<e.length;a+=t)n.push(e[a]);return n}function AB(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return g4(n,r)}function TB(e,t,r){var n=r==="width",a=e.x,i=e.y,o=e.width,s=e.height;return t===1?{start:n?a:i,end:n?a+o:i+s}:{start:n?a+o:i+s,end:n?a:i}}function hs(e,t,r,n,a){if(e*t<e*n||e*t>e*a)return!1;var i=r();return e*(t-e*i/2-n)>=0&&e*(t+e*i/2-a)<=0}function PB(e,t){return yg(e,t+1)}function _B(e,t,r,n,a){for(var i=(n||[]).slice(),o=t.start,s=t.end,l=0,u=1,c=o,f=function(){var y=n==null?void 0:n[l];if(y===void 0)return{v:yg(n,u)};var v=l,p,g=function(){return p===void 0&&(p=r(y,v)),p},O=y.coordinate,w=l===0||hs(e,O,g,c,s);w||(l=0,c=o,u+=1),w&&(c=O+e*(g()/2+a),l+=u)},d;u<=i.length;)if(d=f(),d)return d.v;return[]}function ci(e){"@babel/helpers - typeof";return ci=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ci(e)}function mg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function it(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mg(Object(r),!0).forEach(function(n){EB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function EB(e,t,r){return t=jB(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jB(e){var t=$B(e,"string");return ci(t)=="symbol"?t:t+""}function $B(e,t){if(ci(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ci(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function CB(e,t,r,n,a){for(var i=(n||[]).slice(),o=i.length,s=t.start,l=t.end,u=function(d){var h=i[d],y,v=function(){return y===void 0&&(y=r(h,d)),y};if(d===o-1){var p=e*(h.coordinate+e*v()/2-l);i[d]=h=it(it({},h),{},{tickCoord:p>0?h.coordinate-p*e:h.coordinate})}else i[d]=h=it(it({},h),{},{tickCoord:h.coordinate});var g=hs(e,h.tickCoord,v,s,l);g&&(l=h.tickCoord-e*(v()/2+a),i[d]=it(it({},h),{},{isShow:!0}))},c=o-1;c>=0;c--)u(c);return i}function MB(e,t,r,n,a,i){var o=(n||[]).slice(),s=o.length,l=t.start,u=t.end;if(i){var c=n[s-1],f=r(c,s-1),d=e*(c.coordinate+e*f/2-u);o[s-1]=c=it(it({},c),{},{tickCoord:d>0?c.coordinate-d*e:c.coordinate});var h=hs(e,c.tickCoord,function(){return f},l,u);h&&(u=c.tickCoord-e*(f/2+a),o[s-1]=it(it({},c),{},{isShow:!0}))}for(var y=i?s-1:s,v=function(O){var w=o[O],A,m=function(){return A===void 0&&(A=r(w,O)),A};if(O===0){var x=e*(w.coordinate-e*m()/2-l);o[O]=w=it(it({},w),{},{tickCoord:x<0?w.coordinate-x*e:w.coordinate})}else o[O]=w=it(it({},w),{},{tickCoord:w.coordinate});var T=hs(e,w.tickCoord,m,l,u);T&&(l=w.tickCoord+e*(m()/2+a),o[O]=it(it({},w),{},{isShow:!0}))},p=0;p<y;p++)v(p);return o}function Rc(e,t,r){var n=e.tick,a=e.ticks,i=e.viewBox,o=e.minTickGap,s=e.orientation,l=e.interval,u=e.tickFormatter,c=e.unit,f=e.angle;if(!a||!a.length||!n)return[];if(J(l)||vr.isSsr)return PB(a,typeof l=="number"&&J(l)?l:0);var d=[],h=s==="top"||s==="bottom"?"width":"height",y=c&&h==="width"?Oa(c,{fontSize:t,letterSpacing:r}):{width:0,height:0},v=function(w,A){var m=he(u)?u(w.value,A):w.value;return h==="width"?AB(Oa(m,{fontSize:t,letterSpacing:r}),y,f):Oa(m,{fontSize:t,letterSpacing:r})[h]},p=a.length>=2?Ct(a[1].coordinate-a[0].coordinate):1,g=TB(i,p,h);return l==="equidistantPreserveStart"?_B(p,g,v,a,o):(l==="preserveStart"||l==="preserveStartEnd"?d=MB(p,g,v,a,o,l==="preserveStartEnd"):d=CB(p,g,v,a,o),d.filter(function(O){return O.isShow}))}var kB=["viewBox"],NB=["viewBox"],DB=["ticks"];function Un(e){"@babel/helpers - typeof";return Un=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Un(e)}function zn(){return zn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},zn.apply(this,arguments)}function gg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Qe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gg(Object(r),!0).forEach(function(n){Wc(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Bc(e,t){if(e==null)return{};var r=IB(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function IB(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function LB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bg(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,wg(n.key),n)}}function RB(e,t,r){return t&&bg(e.prototype,t),r&&bg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function BB(e,t,r){return t=ps(t),FB(e,xg()?Reflect.construct(t,r||[],ps(e).constructor):t.apply(e,r))}function FB(e,t){if(t&&(Un(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return WB(e)}function WB(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(xg=function(){return!!e})()}function ps(e){return ps=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ps(e)}function UB(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fc(e,t)}function Fc(e,t){return Fc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Fc(e,t)}function Wc(e,t,r){return t=wg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wg(e){var t=zB(e,"string");return Un(t)=="symbol"?t:t+""}function zB(e,t){if(Un(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Un(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Kn=function(e){function t(r){var n;return LB(this,t),n=BB(this,t,[r]),n.state={fontSize:"",letterSpacing:""},n}return UB(t,e),RB(t,[{key:"shouldComponentUpdate",value:function(n,a){var i=n.viewBox,o=Bc(n,kB),s=this.props,l=s.viewBox,u=Bc(s,NB);return!un(i,l)||!un(o,u)||!un(a,this.state)}},{key:"componentDidMount",value:function(){var n=this.layerReference;if(n){var a=n.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];a&&this.setState({fontSize:window.getComputedStyle(a).fontSize,letterSpacing:window.getComputedStyle(a).letterSpacing})}}},{key:"getTickLineCoord",value:function(n){var a=this.props,i=a.x,o=a.y,s=a.width,l=a.height,u=a.orientation,c=a.tickSize,f=a.mirror,d=a.tickMargin,h,y,v,p,g,O,w=f?-1:1,A=n.tickSize||c,m=J(n.tickCoord)?n.tickCoord:n.coordinate;switch(u){case"top":h=y=n.coordinate,p=o+ +!f*l,v=p-w*A,O=v-w*d,g=m;break;case"left":v=p=n.coordinate,y=i+ +!f*s,h=y-w*A,g=h-w*d,O=m;break;case"right":v=p=n.coordinate,y=i+ +f*s,h=y+w*A,g=h+w*d,O=m;break;default:h=y=n.coordinate,p=o+ +f*l,v=p+w*A,O=v+w*d,g=m;break}return{line:{x1:h,y1:v,x2:y,y2:p},tick:{x:g,y:O}}}},{key:"getTickTextAnchor",value:function(){var n=this.props,a=n.orientation,i=n.mirror,o;switch(a){case"left":o=i?"start":"end";break;case"right":o=i?"end":"start";break;default:o="middle";break}return o}},{key:"getTickVerticalAnchor",value:function(){var n=this.props,a=n.orientation,i=n.mirror,o="end";switch(a){case"left":case"right":o="middle";break;case"top":o=i?"start":"end";break;default:o=i?"end":"start";break}return o}},{key:"renderAxisLine",value:function(){var n=this.props,a=n.x,i=n.y,o=n.width,s=n.height,l=n.orientation,u=n.mirror,c=n.axisLine,f=Qe(Qe(Qe({},de(this.props,!1)),de(c,!1)),{},{fill:"none"});if(l==="top"||l==="bottom"){var d=+(l==="top"&&!u||l==="bottom"&&u);f=Qe(Qe({},f),{},{x1:a,y1:i+d*s,x2:a+o,y2:i+d*s})}else{var h=+(l==="left"&&!u||l==="right"&&u);f=Qe(Qe({},f),{},{x1:a+h*o,y1:i,x2:a+h*o,y2:i+s})}return S.createElement("line",zn({},f,{className:ye("recharts-cartesian-axis-line",wt(c,"className"))}))}},{key:"renderTicks",value:function(n,a,i){var o=this,s=this.props,l=s.tickLine,u=s.stroke,c=s.tick,f=s.tickFormatter,d=s.unit,h=Rc(Qe(Qe({},this.props),{},{ticks:n}),a,i),y=this.getTickTextAnchor(),v=this.getTickVerticalAnchor(),p=de(this.props,!1),g=de(c,!1),O=Qe(Qe({},p),{},{fill:"none"},de(l,!1)),w=h.map(function(A,m){var x=o.getTickLineCoord(A),T=x.line,P=x.tick,$=Qe(Qe(Qe(Qe({textAnchor:y,verticalAnchor:v},p),{},{stroke:"none",fill:u},g),P),{},{index:m,payload:A,visibleTicksCount:h.length,tickFormatter:f});return S.createElement(xe,zn({className:"recharts-cartesian-axis-tick",key:"tick-".concat(A.value,"-").concat(A.coordinate,"-").concat(A.tickCoord)},ha(o.props,A,m)),l&&S.createElement("line",zn({},O,T,{className:ye("recharts-cartesian-axis-tick-line",wt(l,"className"))})),c&&t.renderTickItem(c,$,"".concat(he(f)?f(A.value,m):A.value).concat(d||"")))});return S.createElement("g",{className:"recharts-cartesian-axis-ticks"},w)}},{key:"render",value:function(){var n=this,a=this.props,i=a.axisLine,o=a.width,s=a.height,l=a.ticksGenerator,u=a.className,c=a.hide;if(c)return null;var f=this.props,d=f.ticks,h=Bc(f,DB),y=d;return he(l)&&(y=d&&d.length>0?l(this.props):l(h)),o<=0||s<=0||!y||!y.length?null:S.createElement(xe,{className:ye("recharts-cartesian-axis",u),ref:function(p){n.layerReference=p}},i&&this.renderAxisLine(),this.renderTicks(y,this.state.fontSize,this.state.letterSpacing),at.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,a,i){var o,s=ye(a.className,"recharts-cartesian-axis-tick-value");return S.isValidElement(n)?o=S.cloneElement(n,Qe(Qe({},a),{},{className:s})):he(n)?o=n(Qe(Qe({},a),{},{className:s})):o=S.createElement(lo,zn({},a,{className:"recharts-cartesian-axis-tick-value"}),i),o}}])}(S.Component);Wc(Kn,"displayName","CartesianAxis"),Wc(Kn,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var KB=["x1","y1","x2","y2","key"],GB=["offset"];function qr(e){"@babel/helpers - typeof";return qr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qr(e)}function Og(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ot(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Og(Object(r),!0).forEach(function(n){qB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Og(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function qB(e,t,r){return t=VB(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function VB(e){var t=HB(e,"string");return qr(t)=="symbol"?t:t+""}function HB(e,t){if(qr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(qr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Vr(){return Vr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Vr.apply(this,arguments)}function Sg(e,t){if(e==null)return{};var r=YB(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function YB(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var XB=function(t){var r=t.fill;if(!r||r==="none")return null;var n=t.fillOpacity,a=t.x,i=t.y,o=t.width,s=t.height,l=t.ry;return S.createElement("rect",{x:a,y:i,ry:l,width:o,height:s,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function Ag(e,t){var r;if(S.isValidElement(e))r=S.cloneElement(e,t);else if(he(e))r=e(t);else{var n=t.x1,a=t.y1,i=t.x2,o=t.y2,s=t.key,l=Sg(t,KB),u=de(l,!1);u.offset;var c=Sg(u,GB);r=S.createElement("line",Vr({},c,{x1:n,y1:a,x2:i,y2:o,fill:"none",key:s}))}return r}function JB(e){var t=e.x,r=e.width,n=e.horizontal,a=n===void 0?!0:n,i=e.horizontalPoints;if(!a||!i||!i.length)return null;var o=i.map(function(s,l){var u=ot(ot({},e),{},{x1:t,y1:s,x2:t+r,y2:s,key:"line-".concat(l),index:l});return Ag(a,u)});return S.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function ZB(e){var t=e.y,r=e.height,n=e.vertical,a=n===void 0?!0:n,i=e.verticalPoints;if(!a||!i||!i.length)return null;var o=i.map(function(s,l){var u=ot(ot({},e),{},{x1:s,y1:t,x2:s,y2:t+r,key:"line-".concat(l),index:l});return Ag(a,u)});return S.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function QB(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,a=e.y,i=e.width,o=e.height,s=e.horizontalPoints,l=e.horizontal,u=l===void 0?!0:l;if(!u||!t||!t.length)return null;var c=s.map(function(d){return Math.round(d+a-a)}).sort(function(d,h){return d-h});a!==c[0]&&c.unshift(0);var f=c.map(function(d,h){var y=!c[h+1],v=y?a+o-d:c[h+1]-d;if(v<=0)return null;var p=h%t.length;return S.createElement("rect",{key:"react-".concat(h),y:d,x:n,height:v,width:i,stroke:"none",fill:t[p],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return S.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},f)}function e8(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,a=e.fillOpacity,i=e.x,o=e.y,s=e.width,l=e.height,u=e.verticalPoints;if(!r||!n||!n.length)return null;var c=u.map(function(d){return Math.round(d+i-i)}).sort(function(d,h){return d-h});i!==c[0]&&c.unshift(0);var f=c.map(function(d,h){var y=!c[h+1],v=y?i+s-d:c[h+1]-d;if(v<=0)return null;var p=h%n.length;return S.createElement("rect",{key:"react-".concat(h),x:d,y:o,width:v,height:l,stroke:"none",fill:n[p],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return S.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var t8=function(t,r){var n=t.xAxis,a=t.width,i=t.height,o=t.offset;return sy(Rc(ot(ot(ot({},Kn.defaultProps),n),{},{ticks:lr(n,!0),viewBox:{x:0,y:0,width:a,height:i}})),o.left,o.left+o.width,r)},r8=function(t,r){var n=t.yAxis,a=t.width,i=t.height,o=t.offset;return sy(Rc(ot(ot(ot({},Kn.defaultProps),n),{},{ticks:lr(n,!0),viewBox:{x:0,y:0,width:a,height:i}})),o.top,o.top+o.height,r)},Gn={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Tg(e){var t,r,n,a,i,o,s=Ec(),l=jc(),u=z4(),c=ot(ot({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Gn.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:Gn.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:Gn.horizontal,horizontalFill:(a=e.horizontalFill)!==null&&a!==void 0?a:Gn.horizontalFill,vertical:(i=e.vertical)!==null&&i!==void 0?i:Gn.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:Gn.verticalFill,x:J(e.x)?e.x:u.left,y:J(e.y)?e.y:u.top,width:J(e.width)?e.width:u.width,height:J(e.height)?e.height:u.height}),f=c.x,d=c.y,h=c.width,y=c.height,v=c.syncWithTicks,p=c.horizontalValues,g=c.verticalValues,O=F4(),w=W4();if(!J(h)||h<=0||!J(y)||y<=0||!J(f)||f!==+f||!J(d)||d!==+d)return null;var A=c.verticalCoordinatesGenerator||t8,m=c.horizontalCoordinatesGenerator||r8,x=c.horizontalPoints,T=c.verticalPoints;if((!x||!x.length)&&he(m)){var P=p&&p.length,$=m({yAxis:w?ot(ot({},w),{},{ticks:P?p:w.ticks}):void 0,width:s,height:l,offset:u},P?!0:v);Qt(Array.isArray($),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(qr($),"]")),Array.isArray($)&&(x=$)}if((!T||!T.length)&&he(A)){var k=g&&g.length,E=A({xAxis:O?ot(ot({},O),{},{ticks:k?g:O.ticks}):void 0,width:s,height:l,offset:u},k?!0:v);Qt(Array.isArray(E),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(qr(E),"]")),Array.isArray(E)&&(T=E)}return S.createElement("g",{className:"recharts-cartesian-grid"},S.createElement(XB,{fill:c.fill,fillOpacity:c.fillOpacity,x:c.x,y:c.y,width:c.width,height:c.height,ry:c.ry}),S.createElement(JB,Vr({},c,{offset:u,horizontalPoints:x,xAxis:O,yAxis:w})),S.createElement(ZB,Vr({},c,{offset:u,verticalPoints:T,xAxis:O,yAxis:w})),S.createElement(QB,Vr({},c,{horizontalPoints:x})),S.createElement(e8,Vr({},c,{verticalPoints:T})))}Tg.displayName="CartesianGrid";var n8=["type","layout","connectNulls","ref"],a8=["key"];function qn(e){"@babel/helpers - typeof";return qn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qn(e)}function Pg(e,t){if(e==null)return{};var r=i8(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function i8(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function fi(){return fi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},fi.apply(this,arguments)}function _g(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function bt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_g(Object(r),!0).forEach(function(n){Lt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_g(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Vn(e){return u8(e)||l8(e)||s8(e)||o8()}function o8(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
197
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function s8(e,t){if(e){if(typeof e=="string")return Uc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Uc(e,t)}}function l8(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function u8(e){if(Array.isArray(e))return Uc(e)}function Uc(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function c8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Eg(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,$g(n.key),n)}}function f8(e,t,r){return t&&Eg(e.prototype,t),r&&Eg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function d8(e,t,r){return t=vs(t),h8(e,jg()?Reflect.construct(t,r||[],vs(e).constructor):t.apply(e,r))}function h8(e,t){if(t&&(qn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return p8(e)}function p8(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(jg=function(){return!!e})()}function vs(e){return vs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},vs(e)}function v8(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zc(e,t)}function zc(e,t){return zc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},zc(e,t)}function Lt(e,t,r){return t=$g(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $g(e){var t=y8(e,"string");return qn(t)=="symbol"?t:t+""}function y8(e,t){if(qn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(qn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var di=function(e){function t(){var r;c8(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=d8(this,t,[].concat(a)),Lt(r,"state",{isAnimationFinished:!0,totalLength:0}),Lt(r,"generateSimpleStrokeDasharray",function(o,s){return"".concat(s,"px ").concat(o-s,"px")}),Lt(r,"getStrokeDasharray",function(o,s,l){var u=l.reduce(function(g,O){return g+O});if(!u)return r.generateSimpleStrokeDasharray(s,o);for(var c=Math.floor(o/u),f=o%u,d=s-o,h=[],y=0,v=0;y<l.length;v+=l[y],++y)if(v+l[y]>f){h=[].concat(Vn(l.slice(0,y)),[f-v]);break}var p=h.length%2===0?[0,d]:[d];return[].concat(Vn(t.repeat(l,c)),Vn(h),p).map(function(g){return"".concat(g,"px")}).join(", ")}),Lt(r,"id",$r("recharts-line-")),Lt(r,"pathRef",function(o){r.mainCurve=o}),Lt(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),Lt(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return v8(t,e),f8(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();this.setState({totalLength:n})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();n!==this.state.totalLength&&this.setState({totalLength:n})}}},{key:"getTotalLength",value:function(){var n=this.mainCurve;try{return n&&n.getTotalLength&&n.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(n,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,o=i.points,s=i.xAxis,l=i.yAxis,u=i.layout,c=i.children,f=ft(c,$n);if(!f)return null;var d=function(v,p){return{x:v.x,y:v.y,value:v.value,errorVal:Je(v.payload,p)}},h={clipPath:n?"url(#clipPath-".concat(a,")"):null};return S.createElement(xe,h,f.map(function(y){return S.cloneElement(y,{key:"bar-".concat(y.props.dataKey),data:o,xAxis:s,yAxis:l,layout:u,dataPointFormatter:d})}))}},{key:"renderDots",value:function(n,a,i){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var s=this.props,l=s.dot,u=s.points,c=s.dataKey,f=de(this.props,!1),d=de(l,!0),h=u.map(function(v,p){var g=bt(bt(bt({key:"dot-".concat(p),r:3},f),d),{},{index:p,cx:v.x,cy:v.y,value:v.value,dataKey:c,payload:v.payload,points:u});return t.renderDotItem(l,g)}),y={clipPath:n?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return S.createElement(xe,fi({className:"recharts-line-dots",key:"dots"},y),h)}},{key:"renderCurveStatically",value:function(n,a,i,o){var s=this.props,l=s.type,u=s.layout,c=s.connectNulls;s.ref;var f=Pg(s,n8),d=bt(bt(bt({},de(f,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:a?"url(#clipPath-".concat(i,")"):null,points:n},o),{},{type:l,layout:u,connectNulls:c});return S.createElement(Kr,fi({},d,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,a){var i=this,o=this.props,s=o.points,l=o.strokeDasharray,u=o.isAnimationActive,c=o.animationBegin,f=o.animationDuration,d=o.animationEasing,h=o.animationId,y=o.animateNewValues,v=o.width,p=o.height,g=this.state,O=g.prevPoints,w=g.totalLength;return S.createElement(Dt,{begin:c,duration:f,isActive:u,easing:d,from:{t:0},to:{t:1},key:"line-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(A){var m=A.t;if(O){var x=O.length/s.length,T=s.map(function(j,R){var N=Math.floor(R*x);if(O[N]){var I=O[N],C=Ue(I.x,j.x),B=Ue(I.y,j.y);return bt(bt({},j),{},{x:C(m),y:B(m)})}if(y){var U=Ue(v*2,j.x),K=Ue(p/2,j.y);return bt(bt({},j),{},{x:U(m),y:K(m)})}return bt(bt({},j),{},{x:j.x,y:j.y})});return i.renderCurveStatically(T,n,a)}var P=Ue(0,w),$=P(m),k;if(l){var E="".concat(l).split(/[,\s]+/gim).map(function(j){return parseFloat(j)});k=i.getStrokeDasharray($,w,E)}else k=i.generateSimpleStrokeDasharray(w,$);return i.renderCurveStatically(s,n,a,{strokeDasharray:k})})}},{key:"renderCurve",value:function(n,a){var i=this.props,o=i.points,s=i.isAnimationActive,l=this.state,u=l.prevPoints,c=l.totalLength;return s&&o&&o.length&&(!u&&c>0||!Br(u,o))?this.renderCurveWithAnimation(n,a):this.renderCurveStatically(o,n,a)}},{key:"render",value:function(){var n,a=this.props,i=a.hide,o=a.dot,s=a.points,l=a.className,u=a.xAxis,c=a.yAxis,f=a.top,d=a.left,h=a.width,y=a.height,v=a.isAnimationActive,p=a.id;if(i||!s||!s.length)return null;var g=this.state.isAnimationFinished,O=s.length===1,w=ye("recharts-line",l),A=u&&u.allowDataOverflow,m=c&&c.allowDataOverflow,x=A||m,T=fe(p)?this.id:p,P=(n=de(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},$=P.r,k=$===void 0?3:$,E=P.strokeWidth,j=E===void 0?2:E,R=Qf(o)?o:{},N=R.clipDot,I=N===void 0?!0:N,C=k*2+j;return S.createElement(xe,{className:w},A||m?S.createElement("defs",null,S.createElement("clipPath",{id:"clipPath-".concat(T)},S.createElement("rect",{x:A?d:d-h/2,y:m?f:f-y/2,width:A?h:h*2,height:m?y:y*2})),!I&&S.createElement("clipPath",{id:"clipPath-dots-".concat(T)},S.createElement("rect",{x:d-C/2,y:f-C/2,width:h+C,height:y+C}))):null,!O&&this.renderCurve(x,T),this.renderErrorBar(x,T),(O||o)&&this.renderDots(x,I,T),(!v||g)&&Gt.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:a.curPoints}:n.points!==a.curPoints?{curPoints:n.points}:null}},{key:"repeat",value:function(n,a){for(var i=n.length%2!==0?[].concat(Vn(n),[0]):n,o=[],s=0;s<a;++s)o=[].concat(Vn(o),Vn(i));return o}},{key:"renderDotItem",value:function(n,a){var i;if(S.isValidElement(n))i=S.cloneElement(n,a);else if(he(n))i=n(a);else{var o=a.key,s=Pg(a,a8),l=ye("recharts-line-dot",typeof n!="boolean"?n.className:"");i=S.createElement(Ho,fi({key:o},s,{className:l}))}return i}}])}(S.PureComponent);Lt(di,"displayName","Line"),Lt(di,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!vr.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1}),Lt(di,"getComposedData",function(e){var t=e.props,r=e.xAxis,n=e.yAxis,a=e.xAxisTicks,i=e.yAxisTicks,o=e.dataKey,s=e.bandSize,l=e.displayedData,u=e.offset,c=t.layout,f=l.map(function(d,h){var y=Je(d,o);return c==="horizontal"?{x:Mn({axis:r,ticks:a,bandSize:s,entry:d,index:h}),y:fe(y)?null:n.scale(y),value:y,payload:d}:{x:fe(y)?null:r.scale(y),y:Mn({axis:n,ticks:i,bandSize:s,entry:d,index:h}),value:y,payload:d}});return bt({points:f,layout:c},u)});var m8=["layout","type","stroke","connectNulls","isRange","ref"],g8=["key"],Cg;function Hn(e){"@babel/helpers - typeof";return Hn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hn(e)}function Mg(e,t){if(e==null)return{};var r=b8(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function b8(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Hr(){return Hr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Hr.apply(this,arguments)}function kg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Sr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kg(Object(r),!0).forEach(function(n){Vt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function x8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ng(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ig(n.key),n)}}function w8(e,t,r){return t&&Ng(e.prototype,t),r&&Ng(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function O8(e,t,r){return t=ys(t),S8(e,Dg()?Reflect.construct(t,r||[],ys(e).constructor):t.apply(e,r))}function S8(e,t){if(t&&(Hn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return A8(e)}function A8(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Dg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Dg=function(){return!!e})()}function ys(e){return ys=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ys(e)}function T8(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Kc(e,t)}function Kc(e,t){return Kc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Kc(e,t)}function Vt(e,t,r){return t=Ig(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ig(e){var t=P8(e,"string");return Hn(t)=="symbol"?t:t+""}function P8(e,t){if(Hn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Hn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ar=function(e){function t(){var r;x8(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=O8(this,t,[].concat(a)),Vt(r,"state",{isAnimationFinished:!0}),Vt(r,"id",$r("recharts-area-")),Vt(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),he(o)&&o()}),Vt(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),he(o)&&o()}),r}return T8(t,e),w8(t,[{key:"renderDots",value:function(n,a,i){var o=this.props.isAnimationActive,s=this.state.isAnimationFinished;if(o&&!s)return null;var l=this.props,u=l.dot,c=l.points,f=l.dataKey,d=de(this.props,!1),h=de(u,!0),y=c.map(function(p,g){var O=Sr(Sr(Sr({key:"dot-".concat(g),r:3},d),h),{},{index:g,cx:p.x,cy:p.y,dataKey:f,value:p.value,payload:p.payload,points:c});return t.renderDotItem(u,O)}),v={clipPath:n?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return S.createElement(xe,Hr({className:"recharts-area-dots"},v),y)}},{key:"renderHorizontalRect",value:function(n){var a=this.props,i=a.baseLine,o=a.points,s=a.strokeWidth,l=o[0].x,u=o[o.length-1].x,c=n*Math.abs(l-u),f=br(o.map(function(d){return d.y||0}));return J(i)&&typeof i=="number"?f=Math.max(i,f):i&&Array.isArray(i)&&i.length&&(f=Math.max(br(i.map(function(d){return d.y||0})),f)),J(f)?S.createElement("rect",{x:l<u?l:l-c,y:0,width:c,height:Math.floor(f+(s?parseInt("".concat(s),10):1))}):null}},{key:"renderVerticalRect",value:function(n){var a=this.props,i=a.baseLine,o=a.points,s=a.strokeWidth,l=o[0].y,u=o[o.length-1].y,c=n*Math.abs(l-u),f=br(o.map(function(d){return d.x||0}));return J(i)&&typeof i=="number"?f=Math.max(i,f):i&&Array.isArray(i)&&i.length&&(f=Math.max(br(i.map(function(d){return d.x||0})),f)),J(f)?S.createElement("rect",{x:0,y:l<u?l:l-c,width:f+(s?parseInt("".concat(s),10):1),height:Math.floor(c)}):null}},{key:"renderClipRect",value:function(n){var a=this.props.layout;return a==="vertical"?this.renderVerticalRect(n):this.renderHorizontalRect(n)}},{key:"renderAreaStatically",value:function(n,a,i,o){var s=this.props,l=s.layout,u=s.type,c=s.stroke,f=s.connectNulls,d=s.isRange;s.ref;var h=Mg(s,m8);return S.createElement(xe,{clipPath:i?"url(#clipPath-".concat(o,")"):null},S.createElement(Kr,Hr({},de(h,!0),{points:n,connectNulls:f,type:u,baseLine:a,layout:l,stroke:"none",className:"recharts-area-area"})),c!=="none"&&S.createElement(Kr,Hr({},de(this.props,!1),{className:"recharts-area-curve",layout:l,type:u,connectNulls:f,fill:"none",points:n})),c!=="none"&&d&&S.createElement(Kr,Hr({},de(this.props,!1),{className:"recharts-area-curve",layout:l,type:u,connectNulls:f,fill:"none",points:a})))}},{key:"renderAreaWithAnimation",value:function(n,a){var i=this,o=this.props,s=o.points,l=o.baseLine,u=o.isAnimationActive,c=o.animationBegin,f=o.animationDuration,d=o.animationEasing,h=o.animationId,y=this.state,v=y.prevPoints,p=y.prevBaseLine;return S.createElement(Dt,{begin:c,duration:f,isActive:u,easing:d,from:{t:0},to:{t:1},key:"area-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(g){var O=g.t;if(v){var w=v.length/s.length,A=s.map(function(P,$){var k=Math.floor($*w);if(v[k]){var E=v[k],j=Ue(E.x,P.x),R=Ue(E.y,P.y);return Sr(Sr({},P),{},{x:j(O),y:R(O)})}return P}),m;if(J(l)&&typeof l=="number"){var x=Ue(p,l);m=x(O)}else if(fe(l)||ln(l)){var T=Ue(p,0);m=T(O)}else m=l.map(function(P,$){var k=Math.floor($*w);if(p[k]){var E=p[k],j=Ue(E.x,P.x),R=Ue(E.y,P.y);return Sr(Sr({},P),{},{x:j(O),y:R(O)})}return P});return i.renderAreaStatically(A,m,n,a)}return S.createElement(xe,null,S.createElement("defs",null,S.createElement("clipPath",{id:"animationClipPath-".concat(a)},i.renderClipRect(O))),S.createElement(xe,{clipPath:"url(#animationClipPath-".concat(a,")")},i.renderAreaStatically(s,l,n,a)))})}},{key:"renderArea",value:function(n,a){var i=this.props,o=i.points,s=i.baseLine,l=i.isAnimationActive,u=this.state,c=u.prevPoints,f=u.prevBaseLine,d=u.totalLength;return l&&o&&o.length&&(!c&&d>0||!Br(c,o)||!Br(f,s))?this.renderAreaWithAnimation(n,a):this.renderAreaStatically(o,s,n,a)}},{key:"render",value:function(){var n,a=this.props,i=a.hide,o=a.dot,s=a.points,l=a.className,u=a.top,c=a.left,f=a.xAxis,d=a.yAxis,h=a.width,y=a.height,v=a.isAnimationActive,p=a.id;if(i||!s||!s.length)return null;var g=this.state.isAnimationFinished,O=s.length===1,w=ye("recharts-area",l),A=f&&f.allowDataOverflow,m=d&&d.allowDataOverflow,x=A||m,T=fe(p)?this.id:p,P=(n=de(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},$=P.r,k=$===void 0?3:$,E=P.strokeWidth,j=E===void 0?2:E,R=Qf(o)?o:{},N=R.clipDot,I=N===void 0?!0:N,C=k*2+j;return S.createElement(xe,{className:w},A||m?S.createElement("defs",null,S.createElement("clipPath",{id:"clipPath-".concat(T)},S.createElement("rect",{x:A?c:c-h/2,y:m?u:u-y/2,width:A?h:h*2,height:m?y:y*2})),!I&&S.createElement("clipPath",{id:"clipPath-dots-".concat(T)},S.createElement("rect",{x:c-C/2,y:u-C/2,width:h+C,height:y+C}))):null,O?null:this.renderArea(x,T),(o||O)&&this.renderDots(x,I,T),(!v||g)&&Gt.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,curBaseLine:n.baseLine,prevPoints:a.curPoints,prevBaseLine:a.curBaseLine}:n.points!==a.curPoints||n.baseLine!==a.curBaseLine?{curPoints:n.points,curBaseLine:n.baseLine}:null}}])}(S.PureComponent);Cg=Ar,Vt(Ar,"displayName","Area"),Vt(Ar,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!vr.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"}),Vt(Ar,"getBaseValue",function(e,t,r,n){var a=e.layout,i=e.baseValue,o=t.props.baseValue,s=o??i;if(J(s)&&typeof s=="number")return s;var l=a==="horizontal"?n:r,u=l.scale.domain();if(l.type==="number"){var c=Math.max(u[0],u[1]),f=Math.min(u[0],u[1]);return s==="dataMin"?f:s==="dataMax"||c<0?c:Math.max(Math.min(u[0],u[1]),0)}return s==="dataMin"?u[0]:s==="dataMax"?u[1]:u[0]}),Vt(Ar,"getComposedData",function(e){var t=e.props,r=e.item,n=e.xAxis,a=e.yAxis,i=e.xAxisTicks,o=e.yAxisTicks,s=e.bandSize,l=e.dataKey,u=e.stackedData,c=e.dataStartIndex,f=e.displayedData,d=e.offset,h=t.layout,y=u&&u.length,v=Cg.getBaseValue(t,r,n,a),p=h==="horizontal",g=!1,O=f.map(function(A,m){var x;y?x=u[c+m]:(x=Je(A,l),Array.isArray(x)?g=!0:x=[v,x]);var T=x[1]==null||y&&Je(A,l)==null;return p?{x:Mn({axis:n,ticks:i,bandSize:s,entry:A,index:m}),y:T?null:a.scale(x[1]),value:x,payload:A}:{x:T?null:n.scale(x[1]),y:Mn({axis:a,ticks:o,bandSize:s,entry:A,index:m}),value:x,payload:A}}),w;return y||g?w=O.map(function(A){var m=Array.isArray(A.value)?A.value[0]:null;return p?{x:A.x,y:m!=null&&A.y!=null?a.scale(m):null}:{x:m!=null?n.scale(m):null,y:A.y}}):w=p?a.scale(v):n.scale(v),Sr({points:O,baseLine:w,layout:h,isRange:g},d)}),Vt(Ar,"renderDotItem",function(e,t){var r;if(S.isValidElement(e))r=S.cloneElement(e,t);else if(he(e))r=e(t);else{var n=ye("recharts-area-dot",typeof e!="boolean"?e.className:""),a=t.key,i=Mg(t,g8);r=S.createElement(Ho,Hr({},i,{key:a,className:n}))}return r});function Yn(e){"@babel/helpers - typeof";return Yn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yn(e)}function _8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E8(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Bg(n.key),n)}}function j8(e,t,r){return t&&E8(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function $8(e,t,r){return t=ms(t),C8(e,Lg()?Reflect.construct(t,r||[],ms(e).constructor):t.apply(e,r))}function C8(e,t){if(t&&(Yn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return M8(e)}function M8(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Lg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Lg=function(){return!!e})()}function ms(e){return ms=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ms(e)}function k8(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Gc(e,t)}function Gc(e,t){return Gc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Gc(e,t)}function Rg(e,t,r){return t=Bg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Bg(e){var t=N8(e,"string");return Yn(t)=="symbol"?t:t+""}function N8(e,t){if(Yn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Yn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var gs=function(e){function t(){return _8(this,t),$8(this,t,arguments)}return k8(t,e),j8(t,[{key:"render",value:function(){return null}}])}(xt.Component);Rg(gs,"displayName","ZAxis"),Rg(gs,"defaultProps",{zAxisId:0,range:[64,64],scale:"auto",type:"number"});var D8=["option","isActive"];function hi(){return hi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},hi.apply(this,arguments)}function I8(e,t){if(e==null)return{};var r=L8(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function L8(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function R8(e){var t=e.option,r=e.isActive,n=I8(e,D8);return typeof t=="string"?xt.createElement(bc,hi({option:xt.createElement(qi,hi({type:t},n)),isActive:r,shapeType:"symbols"},n)):xt.createElement(bc,hi({option:t,isActive:r,shapeType:"symbols"},n))}function Xn(e){"@babel/helpers - typeof";return Xn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xn(e)}function pi(){return pi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},pi.apply(this,arguments)}function Fg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Et(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Fg(Object(r),!0).forEach(function(n){Tr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function B8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wg(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,zg(n.key),n)}}function F8(e,t,r){return t&&Wg(e.prototype,t),r&&Wg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function W8(e,t,r){return t=bs(t),U8(e,Ug()?Reflect.construct(t,r||[],bs(e).constructor):t.apply(e,r))}function U8(e,t){if(t&&(Xn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return z8(e)}function z8(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ug(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ug=function(){return!!e})()}function bs(e){return bs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},bs(e)}function K8(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qc(e,t)}function qc(e,t){return qc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},qc(e,t)}function Tr(e,t,r){return t=zg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zg(e){var t=G8(e,"string");return Xn(t)=="symbol"?t:t+""}function G8(e,t){if(Xn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Xn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var xs=function(e){function t(){var r;B8(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=W8(this,t,[].concat(a)),Tr(r,"state",{isAnimationFinished:!1}),Tr(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0})}),Tr(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1})}),Tr(r,"id",$r("recharts-scatter-")),r}return K8(t,e),F8(t,[{key:"renderSymbolsStatically",value:function(n){var a=this,i=this.props,o=i.shape,s=i.activeShape,l=i.activeIndex,u=de(this.props,!1);return n.map(function(c,f){var d=l===f,h=d?s:o,y=Et(Et({},u),c);return S.createElement(xe,pi({className:"recharts-scatter-symbol",key:"symbol-".concat(c==null?void 0:c.cx,"-").concat(c==null?void 0:c.cy,"-").concat(c==null?void 0:c.size,"-").concat(f)},ha(a.props,c,f),{role:"img"}),S.createElement(R8,pi({option:h,isActive:d,key:"symbol-".concat(f)},y)))})}},{key:"renderSymbolsWithAnimation",value:function(){var n=this,a=this.props,i=a.points,o=a.isAnimationActive,s=a.animationBegin,l=a.animationDuration,u=a.animationEasing,c=a.animationId,f=this.state.prevPoints;return S.createElement(Dt,{begin:s,duration:l,isActive:o,easing:u,from:{t:0},to:{t:1},key:"pie-".concat(c),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(d){var h=d.t,y=i.map(function(v,p){var g=f&&f[p];if(g){var O=Ue(g.cx,v.cx),w=Ue(g.cy,v.cy),A=Ue(g.size,v.size);return Et(Et({},v),{},{cx:O(h),cy:w(h),size:A(h)})}var m=Ue(0,v.size);return Et(Et({},v),{},{size:m(h)})});return S.createElement(xe,null,n.renderSymbolsStatically(y))})}},{key:"renderSymbols",value:function(){var n=this.props,a=n.points,i=n.isAnimationActive,o=this.state.prevPoints;return i&&a&&a.length&&(!o||!Br(o,a))?this.renderSymbolsWithAnimation():this.renderSymbolsStatically(a)}},{key:"renderErrorBar",value:function(){var n=this.props.isAnimationActive;if(n&&!this.state.isAnimationFinished)return null;var a=this.props,i=a.points,o=a.xAxis,s=a.yAxis,l=a.children,u=ft(l,$n);return u?u.map(function(c,f){var d=c.props,h=d.direction,y=d.dataKey;return S.cloneElement(c,{key:"".concat(h,"-").concat(y,"-").concat(i[f]),data:i,xAxis:o,yAxis:s,layout:h==="x"?"vertical":"horizontal",dataPointFormatter:function(p,g){return{x:p.cx,y:p.cy,value:h==="x"?+p.node.x:+p.node.y,errorVal:Je(p,g)}}})}):null}},{key:"renderLine",value:function(){var n=this.props,a=n.points,i=n.line,o=n.lineType,s=n.lineJointType,l=de(this.props,!1),u=de(i,!1),c,f;if(o==="joint")c=a.map(function(w){return{x:w.cx,y:w.cy}});else if(o==="fitting"){var d=yO(a),h=d.xmin,y=d.xmax,v=d.a,p=d.b,g=function(A){return v*A+p};c=[{x:h,y:g(h)},{x:y,y:g(y)}]}var O=Et(Et(Et({},l),{},{fill:"none",stroke:l&&l.fill},u),{},{points:c});return S.isValidElement(i)?f=S.cloneElement(i,O):he(i)?f=i(O):f=S.createElement(Kr,pi({},O,{type:s})),S.createElement(xe,{className:"recharts-scatter-line",key:"recharts-scatter-line"},f)}},{key:"render",value:function(){var n=this.props,a=n.hide,i=n.points,o=n.line,s=n.className,l=n.xAxis,u=n.yAxis,c=n.left,f=n.top,d=n.width,h=n.height,y=n.id,v=n.isAnimationActive;if(a||!i||!i.length)return null;var p=this.state.isAnimationFinished,g=ye("recharts-scatter",s),O=l&&l.allowDataOverflow,w=u&&u.allowDataOverflow,A=O||w,m=fe(y)?this.id:y;return S.createElement(xe,{className:g,clipPath:A?"url(#clipPath-".concat(m,")"):null},O||w?S.createElement("defs",null,S.createElement("clipPath",{id:"clipPath-".concat(m)},S.createElement("rect",{x:O?c:c-d/2,y:w?f:f-h/2,width:O?d:d*2,height:w?h:h*2}))):null,o&&this.renderLine(),this.renderErrorBar(),S.createElement(xe,{key:"recharts-scatter-symbols"},this.renderSymbols()),(!v||p)&&Gt.renderCallByParent(this.props,i))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:a.curPoints}:n.points!==a.curPoints?{curPoints:n.points}:null}}])}(S.PureComponent);Tr(xs,"displayName","Scatter"),Tr(xs,"defaultProps",{xAxisId:0,yAxisId:0,zAxisId:0,legendType:"circle",lineType:"joint",lineJointType:"linear",data:[],shape:"circle",hide:!1,isAnimationActive:!vr.isSsr,animationBegin:0,animationDuration:400,animationEasing:"linear"}),Tr(xs,"getComposedData",function(e){var t=e.xAxis,r=e.yAxis,n=e.zAxis,a=e.item,i=e.displayedData,o=e.xAxisTicks,s=e.yAxisTicks,l=e.offset,u=a.props.tooltipType,c=ft(a.props.children,Hl),f=fe(t.dataKey)?a.props.dataKey:t.dataKey,d=fe(r.dataKey)?a.props.dataKey:r.dataKey,h=n&&n.dataKey,y=n?n.range:gs.defaultProps.range,v=y&&y[0],p=t.scale.bandwidth?t.scale.bandwidth():0,g=r.scale.bandwidth?r.scale.bandwidth():0,O=i.map(function(w,A){var m=Je(w,f),x=Je(w,d),T=!fe(h)&&Je(w,h)||"-",P=[{name:fe(t.dataKey)?a.props.name:t.name||t.dataKey,unit:t.unit||"",value:m,payload:w,dataKey:f,type:u},{name:fe(r.dataKey)?a.props.name:r.name||r.dataKey,unit:r.unit||"",value:x,payload:w,dataKey:d,type:u}];T!=="-"&&P.push({name:n.name||n.dataKey,unit:n.unit||"",value:T,payload:w,dataKey:h,type:u});var $=Mn({axis:t,ticks:o,bandSize:p,entry:w,index:A,dataKey:f}),k=Mn({axis:r,ticks:s,bandSize:g,entry:w,index:A,dataKey:d}),E=T!=="-"?n.scale(T):v,j=Math.sqrt(Math.max(E,0)/Math.PI);return Et(Et({},w),{},{cx:$,cy:k,x:$-j,y:k-j,xAxis:t,yAxis:r,zAxis:n,width:2*j,height:2*j,size:E,node:{x:m,y:x,z:T},tooltipPayload:P,tooltipPosition:{x:$,y:k},payload:w},c&&c[A]&&c[A].props)});return Et({points:O},l)});function Jn(e){"@babel/helpers - typeof";return Jn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jn(e)}function q8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function V8(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,qg(n.key),n)}}function H8(e,t,r){return t&&V8(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Y8(e,t,r){return t=ws(t),X8(e,Kg()?Reflect.construct(t,r||[],ws(e).constructor):t.apply(e,r))}function X8(e,t){if(t&&(Jn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return J8(e)}function J8(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Kg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Kg=function(){return!!e})()}function ws(e){return ws=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ws(e)}function Z8(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vc(e,t)}function Vc(e,t){return Vc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Vc(e,t)}function Gg(e,t,r){return t=qg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qg(e){var t=Q8(e,"string");return Jn(t)=="symbol"?t:t+""}function Q8(e,t){if(Jn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Jn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Hc(){return Hc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Hc.apply(this,arguments)}function eF(e){var t=e.xAxisId,r=Ec(),n=jc(),a=tg(t);return a==null?null:xt.createElement(Kn,Hc({},a,{className:ye("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(o){return lr(o,!0)}}))}var Os=function(e){function t(){return q8(this,t),Y8(this,t,arguments)}return Z8(t,e),H8(t,[{key:"render",value:function(){return xt.createElement(eF,this.props)}}])}(xt.Component);Gg(Os,"displayName","XAxis"),Gg(Os,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function Zn(e){"@babel/helpers - typeof";return Zn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zn(e)}function tF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rF(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Yg(n.key),n)}}function nF(e,t,r){return t&&rF(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function aF(e,t,r){return t=Ss(t),iF(e,Vg()?Reflect.construct(t,r||[],Ss(e).constructor):t.apply(e,r))}function iF(e,t){if(t&&(Zn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return oF(e)}function oF(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Vg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Vg=function(){return!!e})()}function Ss(e){return Ss=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ss(e)}function sF(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Yc(e,t)}function Yc(e,t){return Yc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Yc(e,t)}function Hg(e,t,r){return t=Yg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Yg(e){var t=lF(e,"string");return Zn(t)=="symbol"?t:t+""}function lF(e,t){if(Zn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Zn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Xc(){return Xc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Xc.apply(this,arguments)}var uF=function(t){var r=t.yAxisId,n=Ec(),a=jc(),i=rg(r);return i==null?null:xt.createElement(Kn,Xc({},i,{className:ye("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:a},ticksGenerator:function(s){return lr(s,!0)}}))},As=function(e){function t(){return tF(this,t),aF(this,t,arguments)}return sF(t,e),nF(t,[{key:"render",value:function(){return xt.createElement(uF,this.props)}}])}(xt.Component);Hg(As,"displayName","YAxis"),Hg(As,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function Xg(e){return hF(e)||dF(e)||fF(e)||cF()}function cF(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
198
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fF(e,t){if(e){if(typeof e=="string")return Jc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Jc(e,t)}}function dF(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function hF(e){if(Array.isArray(e))return Jc(e)}function Jc(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Zc=function(t,r,n,a,i){var o=ft(t,kc),s=ft(t,us),l=[].concat(Xg(o),Xg(s)),u=ft(t,ds),c="".concat(a,"Id"),f=a[0],d=r;if(l.length&&(d=l.reduce(function(v,p){if(p.props[c]===n&&qt(p.props,"extendDomain")&&J(p.props[f])){var g=p.props[f];return[Math.min(v[0],g),Math.max(v[1],g)]}return v},d)),u.length){var h="".concat(f,"1"),y="".concat(f,"2");d=u.reduce(function(v,p){if(p.props[c]===n&&qt(p.props,"extendDomain")&&J(p.props[h])&&J(p.props[y])){var g=p.props[h],O=p.props[y];return[Math.min(v[0],g,O),Math.max(v[1],g,O)]}return v},d)}return i&&i.length&&(d=i.reduce(function(v,p){return J(p)?[Math.min(v[0],p),Math.max(v[1],p)]:v},d)),d},Jg={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function a(l,u,c){this.fn=l,this.context=u,this.once=c||!1}function i(l,u,c,f,d){if(typeof c!="function")throw new TypeError("The listener must be a function");var h=new a(c,f||l,d),y=r?r+u:u;return l._events[y]?l._events[y].fn?l._events[y]=[l._events[y],h]:l._events[y].push(h):(l._events[y]=h,l._eventsCount++),l}function o(l,u){--l._eventsCount===0?l._events=new n:delete l._events[u]}function s(){this._events=new n,this._eventsCount=0}s.prototype.eventNames=function(){var u=[],c,f;if(this._eventsCount===0)return u;for(f in c=this._events)t.call(c,f)&&u.push(r?f.slice(1):f);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(c)):u},s.prototype.listeners=function(u){var c=r?r+u:u,f=this._events[c];if(!f)return[];if(f.fn)return[f.fn];for(var d=0,h=f.length,y=new Array(h);d<h;d++)y[d]=f[d].fn;return y},s.prototype.listenerCount=function(u){var c=r?r+u:u,f=this._events[c];return f?f.fn?1:f.length:0},s.prototype.emit=function(u,c,f,d,h,y){var v=r?r+u:u;if(!this._events[v])return!1;var p=this._events[v],g=arguments.length,O,w;if(p.fn){switch(p.once&&this.removeListener(u,p.fn,void 0,!0),g){case 1:return p.fn.call(p.context),!0;case 2:return p.fn.call(p.context,c),!0;case 3:return p.fn.call(p.context,c,f),!0;case 4:return p.fn.call(p.context,c,f,d),!0;case 5:return p.fn.call(p.context,c,f,d,h),!0;case 6:return p.fn.call(p.context,c,f,d,h,y),!0}for(w=1,O=new Array(g-1);w<g;w++)O[w-1]=arguments[w];p.fn.apply(p.context,O)}else{var A=p.length,m;for(w=0;w<A;w++)switch(p[w].once&&this.removeListener(u,p[w].fn,void 0,!0),g){case 1:p[w].fn.call(p[w].context);break;case 2:p[w].fn.call(p[w].context,c);break;case 3:p[w].fn.call(p[w].context,c,f);break;case 4:p[w].fn.call(p[w].context,c,f,d);break;default:if(!O)for(m=1,O=new Array(g-1);m<g;m++)O[m-1]=arguments[m];p[w].fn.apply(p[w].context,O)}}return!0},s.prototype.on=function(u,c,f){return i(this,u,c,f,!1)},s.prototype.once=function(u,c,f){return i(this,u,c,f,!0)},s.prototype.removeListener=function(u,c,f,d){var h=r?r+u:u;if(!this._events[h])return this;if(!c)return o(this,h),this;var y=this._events[h];if(y.fn)y.fn===c&&(!d||y.once)&&(!f||y.context===f)&&o(this,h);else{for(var v=0,p=[],g=y.length;v<g;v++)(y[v].fn!==c||d&&!y[v].once||f&&y[v].context!==f)&&p.push(y[v]);p.length?this._events[h]=p.length===1?p[0]:p:o(this,h)}return this},s.prototype.removeAllListeners=function(u){var c;return u?(c=r?r+u:u,this._events[c]&&o(this,c)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s})(Jg);var pF=Jg.exports;const vF=Ce(pF);var Qc=new vF,ef="recharts.syncMouseEvents";function vi(e){"@babel/helpers - typeof";return vi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vi(e)}function yF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mF(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Zg(n.key),n)}}function gF(e,t,r){return t&&mF(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function tf(e,t,r){return t=Zg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Zg(e){var t=bF(e,"string");return vi(t)=="symbol"?t:t+""}function bF(e,t){if(vi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(vi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var xF=function(){function e(){yF(this,e),tf(this,"activeIndex",0),tf(this,"coordinateList",[]),tf(this,"layout","horizontal")}return gF(e,[{key:"setDetails",value:function(r){var n,a=r.coordinateList,i=a===void 0?null:a,o=r.container,s=o===void 0?null:o,l=r.layout,u=l===void 0?null:l,c=r.offset,f=c===void 0?null:c,d=r.mouseHandlerCallback,h=d===void 0?null:d;this.coordinateList=(n=i??this.coordinateList)!==null&&n!==void 0?n:[],this.container=s??this.container,this.layout=u??this.layout,this.offset=f??this.offset,this.mouseHandlerCallback=h??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(r){if(this.coordinateList.length!==0)switch(r.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(r){this.activeIndex=r}},{key:"spoofMouse",value:function(){var r,n;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var a=this.container.getBoundingClientRect(),i=a.x,o=a.y,s=a.height,l=this.coordinateList[this.activeIndex].coordinate,u=((r=window)===null||r===void 0?void 0:r.scrollX)||0,c=((n=window)===null||n===void 0?void 0:n.scrollY)||0,f=i+l+u,d=o+this.offset.top+s/2+c;this.mouseHandlerCallback({pageX:f,pageY:d})}}}])}();function wF(e,t,r){if(r==="number"&&t===!0&&Array.isArray(e)){var n=e==null?void 0:e[0],a=e==null?void 0:e[1];if(n&&a&&J(n)&&J(a))return!0}return!1}function OF(e,t,r,n){var a=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-a:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-a,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function Qg(e){var t=e.cx,r=e.cy,n=e.radius,a=e.startAngle,i=e.endAngle,o=rt(t,r,n,a),s=rt(t,r,n,i);return{points:[o,s],cx:t,cy:r,radius:n,startAngle:a,endAngle:i}}function SF(e,t,r){var n,a,i,o;if(e==="horizontal")n=t.x,i=n,a=r.top,o=r.top+r.height;else if(e==="vertical")a=t.y,o=a,n=r.left,i=r.left+r.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var s=t.cx,l=t.cy,u=t.innerRadius,c=t.outerRadius,f=t.angle,d=rt(s,l,u,f),h=rt(s,l,c,f);n=d.x,a=d.y,i=h.x,o=h.y}else return Qg(t);return[{x:n,y:a},{x:i,y:o}]}function yi(e){"@babel/helpers - typeof";return yi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yi(e)}function eb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ts(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?eb(Object(r),!0).forEach(function(n){AF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function AF(e,t,r){return t=TF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function TF(e){var t=PF(e,"string");return yi(t)=="symbol"?t:t+""}function PF(e,t){if(yi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(yi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _F(e){var t,r,n=e.element,a=e.tooltipEventType,i=e.isActive,o=e.activeCoordinate,s=e.activePayload,l=e.offset,u=e.activeTooltipIndex,c=e.tooltipAxisBandSize,f=e.layout,d=e.chartName,h=(t=n.props.cursor)!==null&&t!==void 0?t:(r=n.type.defaultProps)===null||r===void 0?void 0:r.cursor;if(!n||!h||!i||!o||d!=="ScatterChart"&&a!=="axis")return null;var y,v=Kr;if(d==="ScatterChart")y=o,v=ZR;else if(d==="BarChart")y=OF(f,o,l,c),v=yc;else if(f==="radial"){var p=Qg(o),g=p.cx,O=p.cy,w=p.radius,A=p.startAngle,m=p.endAngle;y={cx:g,cy:O,startAngle:A,endAngle:m,innerRadius:w,outerRadius:w},v=Py}else y={points:SF(f,o,l)},v=Kr;var x=Ts(Ts(Ts(Ts({stroke:"#ccc",pointerEvents:"none"},l),y),de(h,!1)),{},{payload:s,payloadIndex:u,className:ye("recharts-tooltip-cursor",h.className)});return S.isValidElement(h)?S.cloneElement(h,x):S.createElement(v,x)}var EF=["item"],jF=["children","className","width","height","style","compact","title","desc"];function Qn(e){"@babel/helpers - typeof";return Qn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qn(e)}function ea(){return ea=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ea.apply(this,arguments)}function tb(e,t){return MF(e)||CF(e,t)||ab(e,t)||$F()}function $F(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
199
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function CF(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function MF(e){if(Array.isArray(e))return e}function rb(e,t){if(e==null)return{};var r=kF(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function kF(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function NF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function DF(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ob(n.key),n)}}function IF(e,t,r){return t&&DF(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function LF(e,t,r){return t=Ps(t),RF(e,nb()?Reflect.construct(t,r||[],Ps(e).constructor):t.apply(e,r))}function RF(e,t){if(t&&(Qn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return BF(e)}function BF(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(nb=function(){return!!e})()}function Ps(e){return Ps=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ps(e)}function FF(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rf(e,t)}function rf(e,t){return rf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},rf(e,t)}function ta(e){return zF(e)||UF(e)||ab(e)||WF()}function WF(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
200
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ab(e,t){if(e){if(typeof e=="string")return nf(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return nf(e,t)}}function UF(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function zF(e){if(Array.isArray(e))return nf(e)}function nf(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ib(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function z(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ib(Object(r),!0).forEach(function(n){oe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ib(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function oe(e,t,r){return t=ob(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ob(e){var t=KF(e,"string");return Qn(t)=="symbol"?t:t+""}function KF(e,t){if(Qn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Qn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var GF={xAxis:["bottom","top"],yAxis:["left","right"]},qF={width:"100%",height:"100%"},sb={x:0,y:0};function _s(e){return e}var VF=function(t,r){return r==="horizontal"?t.x:r==="vertical"?t.y:r==="centric"?t.angle:t.radius},HF=function(t,r,n,a){var i=r.find(function(c){return c&&c.index===n});if(i){if(t==="horizontal")return{x:i.coordinate,y:a.y};if(t==="vertical")return{x:a.x,y:i.coordinate};if(t==="centric"){var o=i.coordinate,s=a.radius;return z(z(z({},a),rt(a.cx,a.cy,s,o)),{},{angle:o,radius:s})}var l=i.coordinate,u=a.angle;return z(z(z({},a),rt(a.cx,a.cy,l,u)),{},{angle:u,radius:l})}return sb},Es=function(t,r){var n=r.graphicalItems,a=r.dataStartIndex,i=r.dataEndIndex,o=(n??[]).reduce(function(s,l){var u=l.props.data;return u&&u.length?[].concat(ta(s),ta(u)):s},[]);return o.length>0?o:t&&t.length&&J(a)&&J(i)?t.slice(a,i+1):[]};function lb(e){return e==="number"?[0,"auto"]:void 0}var af=function(t,r,n,a){var i=t.graphicalItems,o=t.tooltipAxis,s=Es(r,t);return n<0||!i||!i.length||n>=s.length?null:i.reduce(function(l,u){var c,f=(c=u.props.data)!==null&&c!==void 0?c:r;f&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(f=f.slice(t.dataStartIndex,t.dataEndIndex+1));var d;if(o.dataKey&&!o.allowDuplicatedCategory){var h=f===void 0?s:f;d=Ni(h,o.dataKey,a)}else d=f&&f[n]||s[n];return d?[].concat(ta(l),[py(u,d)]):l},[])},ub=function(t,r,n,a){var i=a||{x:t.chartX,y:t.chartY},o=VF(i,n),s=t.orderedTooltipTicks,l=t.tooltipAxis,u=t.tooltipTicks,c=jI(o,s,u,l);if(c>=0&&u){var f=u[c]&&u[c].value,d=af(t,r,c,f),h=HF(n,s,c,i);return{activeTooltipIndex:c,activeLabel:f,activePayload:d,activeCoordinate:h}}return null},YF=function(t,r){var n=r.axes,a=r.graphicalItems,i=r.axisType,o=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,c=t.layout,f=t.children,d=t.stackOffset,h=oy(c,i);return n.reduce(function(y,v){var p,g=v.type.defaultProps!==void 0?z(z({},v.type.defaultProps),v.props):v.props,O=g.type,w=g.dataKey,A=g.allowDataOverflow,m=g.allowDuplicatedCategory,x=g.scale,T=g.ticks,P=g.includeHidden,$=g[o];if(y[$])return y;var k=Es(t.data,{graphicalItems:a.filter(function(F){var W,G=o in F.props?F.props[o]:(W=F.type.defaultProps)===null||W===void 0?void 0:W[o];return G===$}),dataStartIndex:l,dataEndIndex:u}),E=k.length,j,R,N;wF(g.domain,A,O)&&(j=Vu(g.domain,null,A),h&&(O==="number"||x!=="auto")&&(N=Ua(k,w,"category")));var I=lb(O);if(!j||j.length===0){var C,B=(C=g.domain)!==null&&C!==void 0?C:I;if(w){if(j=Ua(k,w,O),O==="category"&&h){var U=vO(j);m&&U?(R=j,j=Qo(0,E)):m||(j=hy(B,j,v).reduce(function(F,W){return F.indexOf(W)>=0?F:[].concat(ta(F),[W])},[]))}else if(O==="category")m?j=j.filter(function(F){return F!==""&&!fe(F)}):j=hy(B,j,v).reduce(function(F,W){return F.indexOf(W)>=0||W===""||fe(W)?F:[].concat(ta(F),[W])},[]);else if(O==="number"){var K=NI(k,a.filter(function(F){var W,G,X=o in F.props?F.props[o]:(W=F.type.defaultProps)===null||W===void 0?void 0:W[o],Q="hide"in F.props?F.props.hide:(G=F.type.defaultProps)===null||G===void 0?void 0:G.hide;return X===$&&(P||!Q)}),w,i,c);K&&(j=K)}h&&(O==="number"||x!=="auto")&&(N=Ua(k,w,"category"))}else h?j=Qo(0,E):s&&s[$]&&s[$].hasStack&&O==="number"?j=d==="expand"?[0,1]:cy(s[$].stackGroups,l,u):j=iy(k,a.filter(function(F){var W=o in F.props?F.props[o]:F.type.defaultProps[o],G="hide"in F.props?F.props.hide:F.type.defaultProps.hide;return W===$&&(P||!G)}),O,c,!0);if(O==="number")j=Zc(f,j,$,i,T),B&&(j=Vu(B,j,A));else if(O==="category"&&B){var _=B,L=j.every(function(F){return _.indexOf(F)>=0});L&&(j=_)}}return z(z({},y),{},oe({},$,z(z({},g),{},{axisType:i,domain:j,categoricalDomain:N,duplicateDomain:R,originalDomain:(p=g.domain)!==null&&p!==void 0?p:I,isCategorical:h,layout:c})))},{})},XF=function(t,r){var n=r.graphicalItems,a=r.Axis,i=r.axisType,o=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,c=t.layout,f=t.children,d=Es(t.data,{graphicalItems:n,dataStartIndex:l,dataEndIndex:u}),h=d.length,y=oy(c,i),v=-1;return n.reduce(function(p,g){var O=g.type.defaultProps!==void 0?z(z({},g.type.defaultProps),g.props):g.props,w=O[o],A=lb("number");if(!p[w]){v++;var m;return y?m=Qo(0,h):s&&s[w]&&s[w].hasStack?(m=cy(s[w].stackGroups,l,u),m=Zc(f,m,w,i)):(m=Vu(A,iy(d,n.filter(function(x){var T,P,$=o in x.props?x.props[o]:(T=x.type.defaultProps)===null||T===void 0?void 0:T[o],k="hide"in x.props?x.props.hide:(P=x.type.defaultProps)===null||P===void 0?void 0:P.hide;return $===w&&!k}),"number",c),a.defaultProps.allowDataOverflow),m=Zc(f,m,w,i)),z(z({},p),{},oe({},w,z(z({axisType:i},a.defaultProps),{},{hide:!0,orientation:wt(GF,"".concat(i,".").concat(v%2),null),domain:m,originalDomain:A,isCategorical:y,layout:c})))}return p},{})},JF=function(t,r){var n=r.axisType,a=n===void 0?"xAxis":n,i=r.AxisComp,o=r.graphicalItems,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,c=t.children,f="".concat(a,"Id"),d=ft(c,i),h={};return d&&d.length?h=YF(t,{axes:d,graphicalItems:o,axisType:a,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:u}):o&&o.length&&(h=XF(t,{Axis:i,graphicalItems:o,axisType:a,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:u})),h},ZF=function(t){var r=hr(t),n=lr(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:Fl(n,function(a){return a.coordinate}),tooltipAxis:r,tooltipAxisBandSize:Io(r,n)}},cb=function(t){var r=t.children,n=t.defaultShowTooltip,a=yt(r,Dn),i=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),a&&a.props&&(a.props.startIndex>=0&&(i=a.props.startIndex),a.props.endIndex>=0&&(o=a.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!n}},QF=function(t){return!t||!t.length?!1:t.some(function(r){var n=Zt(r&&r.type);return n&&n.indexOf("Bar")>=0})},fb=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},eW=function(t,r){var n=t.props,a=t.graphicalItems,i=t.xAxisMap,o=i===void 0?{}:i,s=t.yAxisMap,l=s===void 0?{}:s,u=n.width,c=n.height,f=n.children,d=n.margin||{},h=yt(f,Dn),y=yt(f,yn),v=Object.keys(l).reduce(function(m,x){var T=l[x],P=T.orientation;return!T.mirror&&!T.hide?z(z({},m),{},oe({},P,m[P]+T.width)):m},{left:d.left||0,right:d.right||0}),p=Object.keys(o).reduce(function(m,x){var T=o[x],P=T.orientation;return!T.mirror&&!T.hide?z(z({},m),{},oe({},P,wt(m,"".concat(P))+T.height)):m},{top:d.top||0,bottom:d.bottom||0}),g=z(z({},p),v),O=g.bottom;h&&(g.bottom+=h.props.height||Dn.defaultProps.height),y&&r&&(g=MI(g,a,n,r));var w=u-g.left-g.right,A=c-g.top-g.bottom;return z(z({brushBottom:O},g),{},{width:Math.max(w,0),height:Math.max(A,0)})},tW=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},rW=function(t){var r=t.chartName,n=t.GraphicalChild,a=t.defaultTooltipEventType,i=a===void 0?"axis":a,o=t.validateTooltipEventTypes,s=o===void 0?["axis"]:o,l=t.axisComponents,u=t.legendContent,c=t.formatAxisMap,f=t.defaultProps,d=function(g,O){var w=O.graphicalItems,A=O.stackGroups,m=O.offset,x=O.updateId,T=O.dataStartIndex,P=O.dataEndIndex,$=g.barSize,k=g.layout,E=g.barGap,j=g.barCategoryGap,R=g.maxBarSize,N=fb(k),I=N.numericAxisName,C=N.cateAxisName,B=QF(w),U=[];return w.forEach(function(K,_){var L=Es(g.data,{graphicalItems:[K],dataStartIndex:T,dataEndIndex:P}),F=K.type.defaultProps!==void 0?z(z({},K.type.defaultProps),K.props):K.props,W=F.dataKey,G=F.maxBarSize,X=F["".concat(I,"Id")],Q=F["".concat(C,"Id")],ae={},te=l.reduce(function(Ke,lt){var Si,Ai,aa=O["".concat(lt.axisType,"Map")],Ti=F["".concat(lt.axisType,"Id")];aa&&aa[Ti]||lt.axisType==="zAxis"||(process.env.NODE_ENV!=="production"?ht(!1,"Specifying a(n) ".concat(lt.axisType,"Id requires a corresponding ").concat(lt.axisType,"Id on the targeted graphical component ").concat((Si=K==null||(Ai=K.type)===null||Ai===void 0?void 0:Ai.displayName)!==null&&Si!==void 0?Si:"")):ht());var Pi=aa[Ti];return z(z({},Ke),{},oe(oe({},lt.axisType,Pi),"".concat(lt.axisType,"Ticks"),lr(Pi)))},ae),q=te[C],Y=te["".concat(C,"Ticks")],Z=A&&A[X]&&A[X].hasStack&&qI(K,A[X].stackGroups),D=Zt(K.type).indexOf("Bar")>=0,ie=Io(q,Y),V=[],se=B&&$I({barSize:$,stackGroups:A,totalSize:tW(te,C)});if(D){var ee,ve,We=fe(G)?R:G,Re=(ee=(ve=Io(q,Y,!0))!==null&&ve!==void 0?ve:We)!==null&&ee!==void 0?ee:0;V=CI({barGap:E,barCategoryGap:j,bandSize:Re!==ie?Re:ie,sizeList:se[Q],maxBarSize:We}),Re!==ie&&(V=V.map(function(Ke){return z(z({},Ke),{},{position:z(z({},Ke.position),{},{offset:Ke.position.offset-Re/2})})}))}var Be=K&&K.type&&K.type.getComposedData;Be&&U.push({props:z(z({},Be(z(z({},te),{},{displayedData:L,props:g,dataKey:W,item:K,bandSize:ie,barPosition:V,offset:m,stackedData:Z,layout:k,dataStartIndex:T,dataEndIndex:P}))),{},oe(oe(oe({key:K.key||"item-".concat(_)},I,te[I]),C,te[C]),"animationId",x)),childIndex:EO(K,g.children),item:K})}),U},h=function(g,O){var w=g.props,A=g.dataStartIndex,m=g.dataEndIndex,x=g.updateId;if(!Zf({props:w}))return null;var T=w.children,P=w.layout,$=w.stackOffset,k=w.data,E=w.reverseStackOrder,j=fb(P),R=j.numericAxisName,N=j.cateAxisName,I=ft(T,n),C=zI(k,I,"".concat(R,"Id"),"".concat(N,"Id"),$,E),B=l.reduce(function(F,W){var G="".concat(W.axisType,"Map");return z(z({},F),{},oe({},G,JF(w,z(z({},W),{},{graphicalItems:I,stackGroups:W.axisType===R&&C,dataStartIndex:A,dataEndIndex:m}))))},{}),U=eW(z(z({},B),{},{props:w,graphicalItems:I}),O==null?void 0:O.legendBBox);Object.keys(B).forEach(function(F){B[F]=c(w,B[F],U,F.replace("Map",""),r)});var K=B["".concat(N,"Map")],_=ZF(K),L=d(w,z(z({},B),{},{dataStartIndex:A,dataEndIndex:m,updateId:x,graphicalItems:I,stackGroups:C,offset:U}));return z(z({formattedGraphicalItems:L,graphicalItems:I,offset:U,stackGroups:C},_),B)},y=function(p){function g(O){var w,A,m;return NF(this,g),m=LF(this,g,[O]),oe(m,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),oe(m,"accessibilityManager",new xF),oe(m,"handleLegendBBoxUpdate",function(x){if(x){var T=m.state,P=T.dataStartIndex,$=T.dataEndIndex,k=T.updateId;m.setState(z({legendBBox:x},h({props:m.props,dataStartIndex:P,dataEndIndex:$,updateId:k},z(z({},m.state),{},{legendBBox:x}))))}}),oe(m,"handleReceiveSyncEvent",function(x,T,P){if(m.props.syncId===x){if(P===m.eventEmitterSymbol&&typeof m.props.syncMethod!="function")return;m.applySyncEvent(T)}}),oe(m,"handleBrushChange",function(x){var T=x.startIndex,P=x.endIndex;if(T!==m.state.dataStartIndex||P!==m.state.dataEndIndex){var $=m.state.updateId;m.setState(function(){return z({dataStartIndex:T,dataEndIndex:P},h({props:m.props,dataStartIndex:T,dataEndIndex:P,updateId:$},m.state))}),m.triggerSyncEvent({dataStartIndex:T,dataEndIndex:P})}}),oe(m,"handleMouseEnter",function(x){var T=m.getMouseInfo(x);if(T){var P=z(z({},T),{},{isTooltipActive:!0});m.setState(P),m.triggerSyncEvent(P);var $=m.props.onMouseEnter;he($)&&$(P,x)}}),oe(m,"triggeredAfterMouseMove",function(x){var T=m.getMouseInfo(x),P=T?z(z({},T),{},{isTooltipActive:!0}):{isTooltipActive:!1};m.setState(P),m.triggerSyncEvent(P);var $=m.props.onMouseMove;he($)&&$(P,x)}),oe(m,"handleItemMouseEnter",function(x){m.setState(function(){return{isTooltipActive:!0,activeItem:x,activePayload:x.tooltipPayload,activeCoordinate:x.tooltipPosition||{x:x.cx,y:x.cy}}})}),oe(m,"handleItemMouseLeave",function(){m.setState(function(){return{isTooltipActive:!1}})}),oe(m,"handleMouseMove",function(x){x.persist(),m.throttleTriggeredAfterMouseMove(x)}),oe(m,"handleMouseLeave",function(x){m.throttleTriggeredAfterMouseMove.cancel();var T={isTooltipActive:!1};m.setState(T),m.triggerSyncEvent(T);var P=m.props.onMouseLeave;he(P)&&P(T,x)}),oe(m,"handleOuterEvent",function(x){var T=_O(x),P=wt(m.props,"".concat(T));if(T&&he(P)){var $,k;/.*touch.*/i.test(T)?k=m.getMouseInfo(x.changedTouches[0]):k=m.getMouseInfo(x),P(($=k)!==null&&$!==void 0?$:{},x)}}),oe(m,"handleClick",function(x){var T=m.getMouseInfo(x);if(T){var P=z(z({},T),{},{isTooltipActive:!0});m.setState(P),m.triggerSyncEvent(P);var $=m.props.onClick;he($)&&$(P,x)}}),oe(m,"handleMouseDown",function(x){var T=m.props.onMouseDown;if(he(T)){var P=m.getMouseInfo(x);T(P,x)}}),oe(m,"handleMouseUp",function(x){var T=m.props.onMouseUp;if(he(T)){var P=m.getMouseInfo(x);T(P,x)}}),oe(m,"handleTouchMove",function(x){x.changedTouches!=null&&x.changedTouches.length>0&&m.throttleTriggeredAfterMouseMove(x.changedTouches[0])}),oe(m,"handleTouchStart",function(x){x.changedTouches!=null&&x.changedTouches.length>0&&m.handleMouseDown(x.changedTouches[0])}),oe(m,"handleTouchEnd",function(x){x.changedTouches!=null&&x.changedTouches.length>0&&m.handleMouseUp(x.changedTouches[0])}),oe(m,"handleDoubleClick",function(x){var T=m.props.onDoubleClick;if(he(T)){var P=m.getMouseInfo(x);T(P,x)}}),oe(m,"handleContextMenu",function(x){var T=m.props.onContextMenu;if(he(T)){var P=m.getMouseInfo(x);T(P,x)}}),oe(m,"triggerSyncEvent",function(x){m.props.syncId!==void 0&&Qc.emit(ef,m.props.syncId,x,m.eventEmitterSymbol)}),oe(m,"applySyncEvent",function(x){var T=m.props,P=T.layout,$=T.syncMethod,k=m.state.updateId,E=x.dataStartIndex,j=x.dataEndIndex;if(x.dataStartIndex!==void 0||x.dataEndIndex!==void 0)m.setState(z({dataStartIndex:E,dataEndIndex:j},h({props:m.props,dataStartIndex:E,dataEndIndex:j,updateId:k},m.state)));else if(x.activeTooltipIndex!==void 0){var R=x.chartX,N=x.chartY,I=x.activeTooltipIndex,C=m.state,B=C.offset,U=C.tooltipTicks;if(!B)return;if(typeof $=="function")I=$(U,x);else if($==="value"){I=-1;for(var K=0;K<U.length;K++)if(U[K].value===x.activeLabel){I=K;break}}var _=z(z({},B),{},{x:B.left,y:B.top}),L=Math.min(R,_.x+_.width),F=Math.min(N,_.y+_.height),W=U[I]&&U[I].value,G=af(m.state,m.props.data,I),X=U[I]?{x:P==="horizontal"?U[I].coordinate:L,y:P==="horizontal"?F:U[I].coordinate}:sb;m.setState(z(z({},x),{},{activeLabel:W,activeCoordinate:X,activePayload:G,activeTooltipIndex:I}))}else m.setState(x)}),oe(m,"renderCursor",function(x){var T,P=m.state,$=P.isTooltipActive,k=P.activeCoordinate,E=P.activePayload,j=P.offset,R=P.activeTooltipIndex,N=P.tooltipAxisBandSize,I=m.getTooltipEventType(),C=(T=x.props.active)!==null&&T!==void 0?T:$,B=m.props.layout,U=x.key||"_recharts-cursor";return S.createElement(_F,{key:U,activeCoordinate:k,activePayload:E,activeTooltipIndex:R,chartName:r,element:x,isActive:C,layout:B,offset:j,tooltipAxisBandSize:N,tooltipEventType:I})}),oe(m,"renderPolarAxis",function(x,T,P){var $=wt(x,"type.axisType"),k=wt(m.state,"".concat($,"Map")),E=x.type.defaultProps,j=E!==void 0?z(z({},E),x.props):x.props,R=k&&k[j["".concat($,"Id")]];return S.cloneElement(x,z(z({},R),{},{className:ye($,R.className),key:x.key||"".concat(T,"-").concat(P),ticks:lr(R,!0)}))}),oe(m,"renderPolarGrid",function(x){var T=x.props,P=T.radialLines,$=T.polarAngles,k=T.polarRadius,E=m.state,j=E.radiusAxisMap,R=E.angleAxisMap,N=hr(j),I=hr(R),C=I.cx,B=I.cy,U=I.innerRadius,K=I.outerRadius;return S.cloneElement(x,{polarAngles:Array.isArray($)?$:lr(I,!0).map(function(_){return _.coordinate}),polarRadius:Array.isArray(k)?k:lr(N,!0).map(function(_){return _.coordinate}),cx:C,cy:B,innerRadius:U,outerRadius:K,key:x.key||"polar-grid",radialLines:P})}),oe(m,"renderLegend",function(){var x=m.state.formattedGraphicalItems,T=m.props,P=T.children,$=T.width,k=T.height,E=m.props.margin||{},j=$-(E.left||0)-(E.right||0),R=ty({children:P,formattedGraphicalItems:x,legendWidth:j,legendContent:u});if(!R)return null;var N=R.item,I=rb(R,EF);return S.cloneElement(N,z(z({},I),{},{chartWidth:$,chartHeight:k,margin:E,onBBoxUpdate:m.handleLegendBBoxUpdate}))}),oe(m,"renderTooltip",function(){var x,T=m.props,P=T.children,$=T.accessibilityLayer,k=yt(P,Wt);if(!k)return null;var E=m.state,j=E.isTooltipActive,R=E.activeCoordinate,N=E.activePayload,I=E.activeLabel,C=E.offset,B=(x=k.props.active)!==null&&x!==void 0?x:j;return S.cloneElement(k,{viewBox:z(z({},C),{},{x:C.left,y:C.top}),active:B,label:I,payload:B?N:[],coordinate:R,accessibilityLayer:$})}),oe(m,"renderBrush",function(x){var T=m.props,P=T.margin,$=T.data,k=m.state,E=k.offset,j=k.dataStartIndex,R=k.dataEndIndex,N=k.updateId;return S.cloneElement(x,{key:x.key||"_recharts-brush",onChange:Do(m.handleBrushChange,x.props.onChange),data:$,x:J(x.props.x)?x.props.x:E.left,y:J(x.props.y)?x.props.y:E.top+E.height+E.brushBottom-(P.bottom||0),width:J(x.props.width)?x.props.width:E.width,startIndex:j,endIndex:R,updateId:"brush-".concat(N)})}),oe(m,"renderReferenceElement",function(x,T,P){if(!x)return null;var $=m,k=$.clipPathId,E=m.state,j=E.xAxisMap,R=E.yAxisMap,N=E.offset,I=x.type.defaultProps||{},C=x.props,B=C.xAxisId,U=B===void 0?I.xAxisId:B,K=C.yAxisId,_=K===void 0?I.yAxisId:K;return S.cloneElement(x,{key:x.key||"".concat(T,"-").concat(P),xAxis:j[U],yAxis:R[_],viewBox:{x:N.left,y:N.top,width:N.width,height:N.height},clipPathId:k})}),oe(m,"renderActivePoints",function(x){var T=x.item,P=x.activePoint,$=x.basePoint,k=x.childIndex,E=x.isRange,j=[],R=T.props.key,N=T.item.type.defaultProps!==void 0?z(z({},T.item.type.defaultProps),T.item.props):T.item.props,I=N.activeDot,C=N.dataKey,B=z(z({index:k,dataKey:C,cx:P.x,cy:P.y,r:4,fill:Gu(T.item),strokeWidth:2,stroke:"#fff",payload:P.payload,value:P.value},de(I,!1)),Di(I));return j.push(g.renderActiveDot(I,B,"".concat(R,"-activePoint-").concat(k))),$?j.push(g.renderActiveDot(I,z(z({},B),{},{cx:$.x,cy:$.y}),"".concat(R,"-basePoint-").concat(k))):E&&j.push(null),j}),oe(m,"renderGraphicChild",function(x,T,P){var $=m.filterFormatItem(x,T,P);if(!$)return null;var k=m.getTooltipEventType(),E=m.state,j=E.isTooltipActive,R=E.tooltipAxis,N=E.activeTooltipIndex,I=E.activeLabel,C=m.props.children,B=yt(C,Wt),U=$.props,K=U.points,_=U.isRange,L=U.baseLine,F=$.item.type.defaultProps!==void 0?z(z({},$.item.type.defaultProps),$.item.props):$.item.props,W=F.activeDot,G=F.hide,X=F.activeBar,Q=F.activeShape,ae=!!(!G&&j&&B&&(W||X||Q)),te={};k!=="axis"&&B&&B.props.trigger==="click"?te={onClick:Do(m.handleItemMouseEnter,x.props.onClick)}:k!=="axis"&&(te={onMouseLeave:Do(m.handleItemMouseLeave,x.props.onMouseLeave),onMouseEnter:Do(m.handleItemMouseEnter,x.props.onMouseEnter)});var q=S.cloneElement(x,z(z({},$.props),te));function Y(lt){return typeof R.dataKey=="function"?R.dataKey(lt.payload):null}if(ae)if(N>=0){var Z,D;if(R.dataKey&&!R.allowDuplicatedCategory){var ie=typeof R.dataKey=="function"?Y:"payload.".concat(R.dataKey.toString());Z=Ni(K,ie,I),D=_&&L&&Ni(L,ie,I)}else Z=K==null?void 0:K[N],D=_&&L&&L[N];if(Q||X){var V=x.props.activeIndex!==void 0?x.props.activeIndex:N;return[S.cloneElement(x,z(z(z({},$.props),te),{},{activeIndex:V})),null,null]}if(!fe(Z))return[q].concat(ta(m.renderActivePoints({item:$,activePoint:Z,basePoint:D,childIndex:N,isRange:_})))}else{var se,ee=(se=m.getItemByXY(m.state.activeCoordinate))!==null&&se!==void 0?se:{graphicalItem:q},ve=ee.graphicalItem,We=ve.item,Re=We===void 0?x:We,Be=ve.childIndex,Ke=z(z(z({},$.props),te),{},{activeIndex:Be});return[S.cloneElement(Re,Ke),null,null]}return _?[q,null,null]:[q,null]}),oe(m,"renderCustomized",function(x,T,P){return S.cloneElement(x,z(z({key:"recharts-customized-".concat(P)},m.props),m.state))}),oe(m,"renderMap",{CartesianGrid:{handler:_s,once:!0},ReferenceArea:{handler:m.renderReferenceElement},ReferenceLine:{handler:_s},ReferenceDot:{handler:m.renderReferenceElement},XAxis:{handler:_s},YAxis:{handler:_s},Brush:{handler:m.renderBrush,once:!0},Bar:{handler:m.renderGraphicChild},Line:{handler:m.renderGraphicChild},Area:{handler:m.renderGraphicChild},Radar:{handler:m.renderGraphicChild},RadialBar:{handler:m.renderGraphicChild},Scatter:{handler:m.renderGraphicChild},Pie:{handler:m.renderGraphicChild},Funnel:{handler:m.renderGraphicChild},Tooltip:{handler:m.renderCursor,once:!0},PolarGrid:{handler:m.renderPolarGrid,once:!0},PolarAngleAxis:{handler:m.renderPolarAxis},PolarRadiusAxis:{handler:m.renderPolarAxis},Customized:{handler:m.renderCustomized}}),m.clipPathId="".concat((w=O.id)!==null&&w!==void 0?w:$r("recharts"),"-clip"),m.throttleTriggeredAfterMouseMove=Zh(m.triggeredAfterMouseMove,(A=O.throttleDelay)!==null&&A!==void 0?A:1e3/60),m.state={},m}return FF(g,p),IF(g,[{key:"componentDidMount",value:function(){var w,A;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(w=this.props.margin.left)!==null&&w!==void 0?w:0,top:(A=this.props.margin.top)!==null&&A!==void 0?A:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var w=this.props,A=w.children,m=w.data,x=w.height,T=w.layout,P=yt(A,Wt);if(P){var $=P.props.defaultIndex;if(!(typeof $!="number"||$<0||$>this.state.tooltipTicks.length-1)){var k=this.state.tooltipTicks[$]&&this.state.tooltipTicks[$].value,E=af(this.state,m,$,k),j=this.state.tooltipTicks[$].coordinate,R=(this.state.offset.top+x)/2,N=T==="horizontal",I=N?{x:j,y:R}:{y:j,x:R},C=this.state.formattedGraphicalItems.find(function(U){var K=U.item;return K.type.name==="Scatter"});C&&(I=z(z({},I),C.props.points[$].tooltipPosition),E=C.props.points[$].tooltipPayload);var B={activeTooltipIndex:$,isTooltipActive:!0,activeLabel:k,activePayload:E,activeCoordinate:I};this.setState(B),this.renderCursor(P),this.accessibilityManager.setIndex($)}}}},{key:"getSnapshotBeforeUpdate",value:function(w,A){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==A.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==w.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==w.margin){var m,x;this.accessibilityManager.setDetails({offset:{left:(m=this.props.margin.left)!==null&&m!==void 0?m:0,top:(x=this.props.margin.top)!==null&&x!==void 0?x:0}})}return null}},{key:"componentDidUpdate",value:function(w){il([yt(w.children,Wt)],[yt(this.props.children,Wt)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var w=yt(this.props.children,Wt);if(w&&typeof w.props.shared=="boolean"){var A=w.props.shared?"axis":"item";return s.indexOf(A)>=0?A:i}return i}},{key:"getMouseInfo",value:function(w){if(!this.container)return null;var A=this.container,m=A.getBoundingClientRect(),x=rM(m),T={chartX:Math.round(w.pageX-x.left),chartY:Math.round(w.pageY-x.top)},P=m.width/A.offsetWidth||1,$=this.inRange(T.chartX,T.chartY,P);if(!$)return null;var k=this.state,E=k.xAxisMap,j=k.yAxisMap,R=this.getTooltipEventType(),N=ub(this.state,this.props.data,this.props.layout,$);if(R!=="axis"&&E&&j){var I=hr(E).scale,C=hr(j).scale,B=I&&I.invert?I.invert(T.chartX):null,U=C&&C.invert?C.invert(T.chartY):null;return z(z({},T),{},{xValue:B,yValue:U},N)}return N?z(z({},T),N):null}},{key:"inRange",value:function(w,A){var m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,x=this.props.layout,T=w/m,P=A/m;if(x==="horizontal"||x==="vertical"){var $=this.state.offset,k=T>=$.left&&T<=$.left+$.width&&P>=$.top&&P<=$.top+$.height;return k?{x:T,y:P}:null}var E=this.state,j=E.angleAxisMap,R=E.radiusAxisMap;if(j&&R){var N=hr(j);return my({x:T,y:P},N)}return null}},{key:"parseEventsOfWrapper",value:function(){var w=this.props.children,A=this.getTooltipEventType(),m=yt(w,Wt),x={};m&&A==="axis"&&(m.props.trigger==="click"?x={onClick:this.handleClick}:x={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var T=Di(this.props,this.handleOuterEvent);return z(z({},T),x)}},{key:"addListener",value:function(){Qc.on(ef,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){Qc.removeListener(ef,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(w,A,m){for(var x=this.state.formattedGraphicalItems,T=0,P=x.length;T<P;T++){var $=x[T];if($.item===w||$.props.key===w.key||A===Zt($.item.type)&&m===$.childIndex)return $}return null}},{key:"renderClipPath",value:function(){var w=this.clipPathId,A=this.state.offset,m=A.left,x=A.top,T=A.height,P=A.width;return S.createElement("defs",null,S.createElement("clipPath",{id:w},S.createElement("rect",{x:m,y:x,height:T,width:P})))}},{key:"getXScales",value:function(){var w=this.state.xAxisMap;return w?Object.entries(w).reduce(function(A,m){var x=tb(m,2),T=x[0],P=x[1];return z(z({},A),{},oe({},T,P.scale))},{}):null}},{key:"getYScales",value:function(){var w=this.state.yAxisMap;return w?Object.entries(w).reduce(function(A,m){var x=tb(m,2),T=x[0],P=x[1];return z(z({},A),{},oe({},T,P.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(w){var A;return(A=this.state.xAxisMap)===null||A===void 0||(A=A[w])===null||A===void 0?void 0:A.scale}},{key:"getYScaleByAxisId",value:function(w){var A;return(A=this.state.yAxisMap)===null||A===void 0||(A=A[w])===null||A===void 0?void 0:A.scale}},{key:"getItemByXY",value:function(w){var A=this.state,m=A.formattedGraphicalItems,x=A.activeItem;if(m&&m.length)for(var T=0,P=m.length;T<P;T++){var $=m[T],k=$.props,E=$.item,j=E.type.defaultProps!==void 0?z(z({},E.type.defaultProps),E.props):E.props,R=Zt(E.type);if(R==="Bar"){var N=(k.data||[]).find(function(U){return UR(w,U)});if(N)return{graphicalItem:$,payload:N}}else if(R==="RadialBar"){var I=(k.data||[]).find(function(U){return my(w,U)});if(I)return{graphicalItem:$,payload:I}}else if(Jo($,x)||Zo($,x)||oi($,x)){var C=K5({graphicalItem:$,activeTooltipItem:x,itemData:j.data}),B=j.activeIndex===void 0?C:j.activeIndex;return{graphicalItem:z(z({},$),{},{childIndex:B}),payload:oi($,x)?j.data[C]:$.props.data[C]}}}return null}},{key:"render",value:function(){var w=this;if(!Zf(this))return null;var A=this.props,m=A.children,x=A.className,T=A.width,P=A.height,$=A.style,k=A.compact,E=A.title,j=A.desc,R=rb(A,jF),N=de(R,!1);if(k)return S.createElement(Qm,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},S.createElement(sl,ea({},N,{width:T,height:P,title:E,desc:j}),this.renderClipPath(),td(m,this.renderMap)));if(this.props.accessibilityLayer){var I,C;N.tabIndex=(I=this.props.tabIndex)!==null&&I!==void 0?I:0,N.role=(C=this.props.role)!==null&&C!==void 0?C:"application",N.onKeyDown=function(U){w.accessibilityManager.keyboardEvent(U)},N.onFocus=function(){w.accessibilityManager.focus()}}var B=this.parseEventsOfWrapper();return S.createElement(Qm,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},S.createElement("div",ea({className:ye("recharts-wrapper",x),style:z({position:"relative",cursor:"default",width:T,height:P},$)},B,{ref:function(K){w.container=K}}),S.createElement(sl,ea({},N,{width:T,height:P,title:E,desc:j,style:qF}),this.renderClipPath(),td(m,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(S.Component);oe(y,"displayName",r),oe(y,"defaultProps",z({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},f)),oe(y,"getDerivedStateFromProps",function(p,g){var O=p.dataKey,w=p.data,A=p.children,m=p.width,x=p.height,T=p.layout,P=p.stackOffset,$=p.margin,k=g.dataStartIndex,E=g.dataEndIndex;if(g.updateId===void 0){var j=cb(p);return z(z(z({},j),{},{updateId:0},h(z(z({props:p},j),{},{updateId:0}),g)),{},{prevDataKey:O,prevData:w,prevWidth:m,prevHeight:x,prevLayout:T,prevStackOffset:P,prevMargin:$,prevChildren:A})}if(O!==g.prevDataKey||w!==g.prevData||m!==g.prevWidth||x!==g.prevHeight||T!==g.prevLayout||P!==g.prevStackOffset||!un($,g.prevMargin)){var R=cb(p),N={chartX:g.chartX,chartY:g.chartY,isTooltipActive:g.isTooltipActive},I=z(z({},ub(g,w,T)),{},{updateId:g.updateId+1}),C=z(z(z({},R),N),I);return z(z(z({},C),h(z({props:p},C),g)),{},{prevDataKey:O,prevData:w,prevWidth:m,prevHeight:x,prevLayout:T,prevStackOffset:P,prevMargin:$,prevChildren:A})}if(!il(A,g.prevChildren)){var B,U,K,_,L=yt(A,Dn),F=L&&(B=(U=L.props)===null||U===void 0?void 0:U.startIndex)!==null&&B!==void 0?B:k,W=L&&(K=(_=L.props)===null||_===void 0?void 0:_.endIndex)!==null&&K!==void 0?K:E,G=F!==k||W!==E,X=!fe(w),Q=X&&!G?g.updateId:g.updateId+1;return z(z({updateId:Q},h(z(z({props:p},g),{},{updateId:Q,dataStartIndex:F,dataEndIndex:W}),g)),{},{prevChildren:A,dataStartIndex:F,dataEndIndex:W})}return null}),oe(y,"renderActiveDot",function(p,g,O){var w;return S.isValidElement(p)?w=S.cloneElement(p,g):he(p)?w=p(g):w=S.createElement(Ho,g),S.createElement(xe,{className:"recharts-active-dot",key:O},w)});var v=S.forwardRef(function(g,O){return S.createElement(y,ea({},g,{ref:O}))});return v.displayName=y.displayName,v},nW=rW({chartName:"ComposedChart",GraphicalChild:[di,Ar,Rn,xs],axisComponents:[{axisType:"xAxis",AxisComp:Os},{axisType:"yAxis",AxisComp:As},{axisType:"zAxis",AxisComp:gs}],formatAxisMap:v4});const ra=({className:e,width:t,height:r,rounded:n=!1})=>b.jsx("div",{className:ce("animate-pulse bg-gray-200",n?"rounded-full":"rounded",e),style:{width:typeof t=="number"?`${t}px`:t,height:typeof r=="number"?`${r}px`:r}}),mi=({className:e})=>b.jsxs("div",{className:ce("rounded-lg border border-gray-200 bg-white p-4",e),children:[b.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[b.jsx(ra,{className:"h-4 w-16"}),b.jsx(ra,{className:"h-4 w-4",rounded:!0})]}),b.jsxs("div",{className:"flex items-baseline gap-3",children:[b.jsx(ra,{className:"h-8 w-20"}),b.jsx(ra,{className:"h-6 w-12 rounded-md"})]})]}),db=({className:e,chartType:t="line",height:r=300})=>{const n=o=>{if(o.length===0)return"";let s=`M ${o[0].x} ${o[0].y}`;for(let l=1;l<o.length;l++){const u=o[l-1],c=o[l],f=u.x+(c.x-u.x)*.4,d=u.y,h=u.x+(c.x-u.x)*.6,y=c.y;s+=` C ${f} ${d} ${h} ${y} ${c.x} ${c.y}`}return s},a=(o=7)=>Array.from({length:o},(c,f)=>({x:f/(o-1)*100,y:80-Math.random()*60})),i=()=>{switch(t){case"bar":return b.jsx("div",{className:"absolute inset-0 flex items-end justify-between px-4 pb-4",children:[...Array(7)].map((p,g)=>b.jsx(ra,{className:"w-8 bg-blue-100",height:`${Math.random()*60+20}%`},g))});case"line":const o=a(12),s=n(o),l=o[o.length-1],u=o[0],c=`${s} L ${l.x} 100 L ${u.x} 100 Z`;return b.jsx("div",{className:"absolute inset-0 p-4",children:b.jsxs("svg",{className:"w-full h-full",viewBox:"0 0 100 100",preserveAspectRatio:"none",children:[b.jsxs("defs",{children:[b.jsxs("linearGradient",{id:"skeleton-area-fill",x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[b.jsx("stop",{offset:"0%",stopColor:"#8b5cf6",stopOpacity:"0.1",children:b.jsx("animate",{attributeName:"stop-opacity",values:"0.1;0.15;0.1",dur:"3s",repeatCount:"indefinite"})}),b.jsx("stop",{offset:"100%",stopColor:"#8b5cf6",stopOpacity:"0.02",children:b.jsx("animate",{attributeName:"stop-opacity",values:"0.02;0.05;0.02",dur:"3s",repeatCount:"indefinite"})})]}),b.jsxs("linearGradient",{id:"skeleton-line-shimmer",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[b.jsx("stop",{offset:"0%",stopColor:"#e2e8f0",stopOpacity:"0.3",children:b.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2.5s",repeatCount:"indefinite"})}),b.jsx("stop",{offset:"50%",stopColor:"#cbd5e1",stopOpacity:"0.6",children:b.jsx("animate",{attributeName:"stop-opacity",values:"0.6;0.3;0.6",dur:"2.5s",repeatCount:"indefinite"})}),b.jsx("stop",{offset:"100%",stopColor:"#e2e8f0",stopOpacity:"0.3",children:b.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2.5s",repeatCount:"indefinite"})})]})]}),b.jsx("path",{d:c,fill:"url(#skeleton-area-fill)"}),b.jsx("path",{d:s,stroke:"url(#skeleton-line-shimmer)",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})]})});case"area":const f=a(),d=n(f),h=f[f.length-1],y=f[0],v=`${d} L ${h.x} 90 L ${y.x} 90 Z`;return b.jsx("div",{className:"absolute inset-0 p-4",children:b.jsxs("svg",{className:"w-full h-full",viewBox:"0 0 100 100",preserveAspectRatio:"none",children:[b.jsxs("defs",{children:[b.jsxs("linearGradient",{id:"skeleton-area-gradient",x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[b.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.2",children:b.jsx("animate",{attributeName:"stop-opacity",values:"0.2;0.4;0.2",dur:"2s",repeatCount:"indefinite"})}),b.jsx("stop",{offset:"100%",stopColor:"#3b82f6",stopOpacity:"0.05",children:b.jsx("animate",{attributeName:"stop-opacity",values:"0.05;0.1;0.05",dur:"2s",repeatCount:"indefinite"})})]}),b.jsxs("linearGradient",{id:"skeleton-area-line",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[b.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.4",children:b.jsx("animate",{attributeName:"stop-opacity",values:"0.4;0.8;0.4",dur:"2s",repeatCount:"indefinite"})}),b.jsx("stop",{offset:"50%",stopColor:"#3b82f6",stopOpacity:"0.8",children:b.jsx("animate",{attributeName:"stop-opacity",values:"0.8;0.4;0.8",dur:"2s",repeatCount:"indefinite"})}),b.jsx("stop",{offset:"100%",stopColor:"#3b82f6",stopOpacity:"0.4",children:b.jsx("animate",{attributeName:"stop-opacity",values:"0.4;0.8;0.4",dur:"2s",repeatCount:"indefinite"})})]})]}),b.jsx("path",{d:v,fill:"url(#skeleton-area-gradient)"}),b.jsx("path",{d:n(f),stroke:"url(#skeleton-area-line)",strokeWidth:"2.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})]})});case"pie":return b.jsx("div",{className:"absolute inset-0 flex items-center justify-center p-4",children:b.jsxs("svg",{className:"w-32 h-32",viewBox:"0 0 42 42",children:[b.jsxs("defs",{children:[b.jsx("linearGradient",{id:"skeleton-pie-gradient-1",children:b.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.3",children:b.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2s",repeatCount:"indefinite"})})}),b.jsx("linearGradient",{id:"skeleton-pie-gradient-2",children:b.jsx("stop",{offset:"0%",stopColor:"#10b981",stopOpacity:"0.3",children:b.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2s",repeatCount:"indefinite",begin:"0.5s"})})}),b.jsx("linearGradient",{id:"skeleton-pie-gradient-3",children:b.jsx("stop",{offset:"0%",stopColor:"#f59e0b",stopOpacity:"0.3",children:b.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2s",repeatCount:"indefinite",begin:"1s"})})}),b.jsx("linearGradient",{id:"skeleton-pie-gradient-4",children:b.jsx("stop",{offset:"0%",stopColor:"#ef4444",stopOpacity:"0.3",children:b.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2s",repeatCount:"indefinite",begin:"1.5s"})})})]}),b.jsx("circle",{cx:"21",cy:"21",r:"15.915",fill:"transparent",stroke:"#e5e7eb",strokeWidth:"3"}),b.jsx("circle",{cx:"21",cy:"21",r:"15.915",fill:"transparent",stroke:"url(#skeleton-pie-gradient-1)",strokeWidth:"3",strokeDasharray:"40 60",strokeDashoffset:"25"}),b.jsx("circle",{cx:"21",cy:"21",r:"15.915",fill:"transparent",stroke:"url(#skeleton-pie-gradient-2)",strokeWidth:"3",strokeDasharray:"25 75",strokeDashoffset:"65"}),b.jsx("circle",{cx:"21",cy:"21",r:"15.915",fill:"transparent",stroke:"url(#skeleton-pie-gradient-3)",strokeWidth:"3",strokeDasharray:"20 80",strokeDashoffset:"90"}),b.jsx("circle",{cx:"21",cy:"21",r:"15.915",fill:"transparent",stroke:"url(#skeleton-pie-gradient-4)",strokeWidth:"3",strokeDasharray:"15 85",strokeDashoffset:"110"})]})});default:return b.jsx("div",{className:"absolute inset-0 p-4",children:b.jsxs("div",{className:"w-full h-full relative",children:[b.jsx("div",{className:"absolute inset-0 flex items-center",children:b.jsx("div",{className:"w-full h-0.5 bg-gradient-to-r from-transparent via-gray-300 to-transparent opacity-60",children:b.jsx("div",{className:"w-full h-full bg-gradient-to-r from-transparent via-blue-400 to-transparent animate-pulse"})})}),b.jsx("div",{className:"absolute inset-0 flex items-center justify-between px-2",children:[...Array(7)].map((p,g)=>b.jsx("div",{className:"w-2 h-2 bg-blue-300 rounded-full animate-pulse",style:{animationDelay:`${g*.2}s`}},g))})]})})}};return b.jsx("div",{className:ce("w-full",e),children:b.jsxs("div",{className:"relative bg-gray-50/30 py-3",children:[b.jsxs("div",{className:"relative mb-6",style:{height:`${r}px`},children:[b.jsxs("div",{className:"absolute left-0 top-0 h-full flex flex-col justify-between items-end pr-3",children:[b.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),b.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),b.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),b.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),b.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),b.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"})]}),b.jsxs("div",{className:"ml-14 h-full relative overflow-hidden px-0 py-2 flex flex-col justify-between",children:[t!=="pie"&&b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),b.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),b.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),b.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),b.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),b.jsx("div",{className:"h-0 w-full border-t border-gray-100"})]}),i()]}),t!=="pie"&&b.jsxs("div",{className:"ml-14 flex justify-between items-center mt-3",children:[b.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),b.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),b.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),b.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),b.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),b.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),b.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"})]})]}),b.jsxs("div",{className:"flex items-center justify-between px-0 py-3 mt-2",children:[b.jsx("div",{className:"flex-1",children:b.jsx("div",{className:"bg-gray-100 h-3 rounded w-64"})}),b.jsxs("div",{className:"flex items-center gap-2 w-24 justify-center",children:[b.jsx("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),b.jsx("div",{className:"bg-gray-100 h-3 rounded flex-1"})]})]})]})})},aW=({active:e,payload:t,label:r,config:n})=>{var o;if(!e||!t||!t.length)return null;const a=t.filter(s=>s.name&&s.name!==""&&s.name!==s.dataKey);if(a.length===0)return null;const i=((o=n.tooltip)==null?void 0:o.style)==="dark";return b.jsxs("div",{className:ce("rounded-lg border px-3 py-2 text-sm shadow-lg",i?"bg-gray-900 border-gray-700 text-white":"bg-white border-gray-200 text-gray-900"),children:[b.jsx("div",{className:ce("font-medium mb-1",i?"text-gray-300":"text-gray-600"),children:new Date(r||"").toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}),b.jsx("div",{className:"space-y-1",children:a.map((s,l)=>b.jsxs("div",{className:"flex items-center justify-between gap-4",children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:s.color}}),b.jsx("span",{className:ce("text-sm",i?"text-gray-300":"text-gray-600"),children:s.name})]}),b.jsx("span",{className:ce("font-medium",i?"text-white":"text-gray-900"),children:typeof s.value=="number"?s.value.toLocaleString():s.value})]},l))})]})},hb=({config:e,className:t,isLoading:r})=>{const{data:n,dataKey:a,color:i="#3b82f6",lines:o,dateRange:s,yAxisLabel:l,height:u=300,tooltip:c={show:!0,style:"dark"}}=e,f=v=>{const p=new Date(v);return isNaN(p.getTime())?v:p.getDate().toString()},d=v=>v>=1e3?`${(v/1e3).toFixed(0)}k`:v.toString(),y=o&&o.length>0?o:[{dataKey:a||"value",color:i,label:e.title,strokeWidth:2}];return r?(console.log("AnalyticsChart: Loading state active"),b.jsx(db,{className:t,chartType:e.type,height:u})):!n||n.length===0?(console.log("AnalyticsChart: No data provided",{data:n,config:e}),b.jsx("div",{className:ce("w-full",t),children:b.jsxs("div",{className:"relative bg-gray-50/30 py-6",children:[b.jsxs("div",{className:"relative h-[300px] mb-6",children:[b.jsxs("div",{className:"absolute left-0 top-0 h-full flex flex-col justify-between items-end pr-3",children:[b.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),b.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),b.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),b.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),b.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),b.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"})]}),b.jsxs("div",{className:"ml-14 h-full relative overflow-hidden px-0 py-2 flex flex-col justify-between",children:[b.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),b.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),b.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),b.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),b.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),b.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),b.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-4",children:[b.jsx("div",{className:"bg-white border border-gray-300 rounded-[10px] w-12 h-12 flex items-center justify-center",children:b.jsx("svg",{className:"w-6 h-6 text-gray-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:b.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})})}),b.jsxs("div",{className:"text-center max-w-[352px]",children:[b.jsx("h3",{className:"font-semibold text-gray-900 text-base mb-1",children:"There is no data to display for this period"}),b.jsx("p",{className:"font-normal text-gray-600 text-sm leading-5",children:"Try selecting a different date range or ensure your app is deployed and receiving traffic."})]})]})]}),b.jsxs("div",{className:"ml-14 flex justify-between items-center mt-3",children:[b.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),b.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),b.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),b.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),b.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),b.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),b.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"})]})]}),b.jsxs("div",{className:"flex items-center justify-between px-0 py-3 mt-2",children:[b.jsx("div",{className:"flex-1",children:b.jsx("div",{className:"bg-gray-100 h-3 rounded w-64"})}),b.jsxs("div",{className:"flex items-center gap-2 w-24 justify-center",children:[b.jsx("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),b.jsx("div",{className:"bg-gray-100 h-3 rounded flex-1"})]})]})]})})):(console.log("=== ANALYTICS CHART DEBUG ==="),console.log("AnalyticsChart config:",e),console.log("AnalyticsChart data:",JSON.stringify(n,null,2)),console.log("AnalyticsChart dataKey:",a),console.log("Chart lines configuration:",y),console.log("Sample data point:",n[0]),console.log("Data point keys:",Object.keys(n[0]||{})),console.log("=== END ANALYTICS CHART DEBUG ==="),b.jsxs("div",{className:ce("w-full",t),children:[b.jsx("div",{className:"relative bg-gray-50/30 py-6",children:b.jsx(Y2,{width:"100%",height:u,children:b.jsxs(nW,{data:n,margin:{top:20,right:30,left:20,bottom:20},children:[b.jsx("defs",{children:y.map((v,p)=>b.jsxs("linearGradient",{id:`gradient-${v.dataKey}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[b.jsx("stop",{offset:"5%",stopColor:v.color,stopOpacity:.08}),b.jsx("stop",{offset:"95%",stopColor:v.color,stopOpacity:.01})]},`gradient-${p}`))}),b.jsx(Tg,{strokeDasharray:"2 2",className:"opacity-30",stroke:"#d1d5db",horizontal:!0,vertical:!1}),b.jsx(Os,{dataKey:"date",tickFormatter:f,axisLine:!1,tickLine:!1,tick:{fontSize:12,fill:"#6b7280"},tickMargin:10}),b.jsx(As,{axisLine:!1,tickLine:!1,tick:{fontSize:12,fill:"#6b7280"},tickFormatter:d,tickMargin:10,label:l?{value:l,angle:-90,position:"insideLeft",style:{textAnchor:"middle",fontSize:12,fill:"#6b7280"}}:void 0}),c.show&&b.jsx(Wt,{content:v=>b.jsx(aW,{...v,config:e}),cursor:{stroke:"#d1d5db",strokeWidth:1,strokeDasharray:"4 4"},allowEscapeViewBox:{x:!1,y:!1}}),y.map(v=>b.jsx(Ar,{type:"monotone",dataKey:v.dataKey,stroke:"none",fill:`url(#gradient-${v.dataKey})`,fillOpacity:1,isAnimationActive:!1,name:""},`area-${v.dataKey}`)),y.map(v=>b.jsx(di,{type:"monotone",dataKey:v.dataKey,stroke:v.color,strokeWidth:2.5,strokeDasharray:v.strokeDasharray,dot:!1,activeDot:{r:5,fill:v.color,stroke:v.color,strokeWidth:2},name:v.label},v.dataKey))]})})}),b.jsxs("div",{className:"mt-4 flex items-center justify-between",children:[b.jsx("div",{children:s&&b.jsxs("p",{className:"text-sm text-muted-foreground",children:["Showing data from ",new Date(s.start).toLocaleDateString("en-US",{day:"numeric",month:"short",year:"numeric"})," - ",new Date(s.end).toLocaleDateString("en-US",{day:"numeric",month:"short",year:"numeric"})]})}),b.jsx("div",{className:"flex items-center gap-4",children:b.jsx("div",{className:"flex items-center gap-4 text-sm text-muted-foreground",children:y.map(v=>b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:v.color}}),b.jsx("span",{children:v.label})]},v.dataKey))})})]})]}))},pb=({config:e,className:t})=>{const{title:r,data:n,columns:a,pagination:i={enabled:!0,pageSize:10},sorting:o={enabled:!0},filtering:s={enabled:!0,searchable:!0}}=e,[l,u]=S.useState(o.defaultSort||null),[c,f]=S.useState(""),[d,h]=S.useState(1),y=S.useMemo(()=>{let m=[...n];return s.searchable&&c&&(m=m.filter(x=>a.some(T=>{const P=x[T.key];return P==null?void 0:P.toString().toLowerCase().includes(c.toLowerCase())}))),l&&m.sort((x,T)=>{const P=x[l.key],$=T[l.key];if(typeof P=="number"&&typeof $=="number")return l.order==="asc"?P-$:$-P;const k=(P==null?void 0:P.toString())||"",E=($==null?void 0:$.toString())||"",j=k.localeCompare(E);return l.order==="asc"?j:-j}),m},[n,a,c,l,s.searchable]),v=i.enabled?Math.ceil(y.length/i.pageSize):1,p=i.enabled?y.slice((d-1)*i.pageSize,d*i.pageSize):y,g=m=>{!o.enabled||!m.sortable||u(x=>(x==null?void 0:x.key)===m.key?x.order==="asc"?{key:m.key,order:"desc"}:null:{key:m.key,order:"asc"})},O=m=>{f(m),h(1)},w=(m,x,T)=>x.render?x.render(m,T):x.formatter?x.formatter(m,T):typeof m=="number"?m.toLocaleString():(m==null?void 0:m.toString())||"-",A=m=>!o.enabled||!m.sortable?null:(l==null?void 0:l.key)===m.key?l.order==="asc"?b.jsx(yf,{className:"w-4 h-4"}):b.jsx(Ei,{className:"w-4 h-4"}):b.jsxs("div",{className:"flex flex-col",children:[b.jsx(yf,{className:"w-3 h-3 opacity-30"}),b.jsx(Ei,{className:"w-3 h-3 opacity-30 -mt-1"})]});return b.jsxs("div",{className:ce("w-full",t),children:[b.jsxs("div",{className:"flex items-center justify-between mb-4",children:[b.jsx("h3",{className:"text-lg font-semibold",children:r}),s.enabled&&s.searchable&&b.jsxs("div",{className:"relative",children:[b.jsx(mf,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-gray-400"}),b.jsx("input",{type:"text",placeholder:"Search...",value:c,onChange:m=>O(m.target.value),className:"pl-10 pr-4 py-2 border border-gray-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"})]})]}),b.jsx("div",{className:"overflow-x-auto border border-gray-200 rounded-lg",children:b.jsxs("table",{className:"w-full",children:[b.jsx("thead",{className:"bg-gray-50",children:b.jsx("tr",{children:a.map(m=>b.jsx("th",{className:ce("px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",m.sortable&&o.enabled&&"cursor-pointer hover:bg-gray-100",m.align==="center"&&"text-center",m.align==="right"&&"text-right"),style:{width:m.width},onClick:()=>g(m),children:b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("span",{children:m.title}),A(m)]})},m.key))})}),b.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:p.map((m,x)=>b.jsx("tr",{className:"hover:bg-gray-50 transition-colors",children:a.map(T=>b.jsx("td",{className:ce("px-4 py-3 text-sm text-gray-900",T.align==="center"&&"text-center",T.align==="right"&&"text-right"),children:w(m[T.key],T,m)},T.key))},x))})]})}),i.enabled&&v>1&&b.jsxs("div",{className:"flex items-center justify-between mt-4",children:[b.jsxs("div",{className:"text-sm text-gray-500",children:["Showing ",(d-1)*i.pageSize+1," to"," ",Math.min(d*i.pageSize,y.length)," of"," ",y.length," results"]}),b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("button",{onClick:()=>h(m=>Math.max(1,m-1)),disabled:d===1,className:"px-3 py-1 text-sm border border-gray-200 rounded hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),Array.from({length:Math.min(5,v)},(m,x)=>{const T=Math.max(1,Math.min(v-4,d-2))+x;return T>v?null:b.jsx("button",{onClick:()=>h(T),className:ce("px-3 py-1 text-sm border rounded",d===T?"bg-blue-500 text-white border-blue-500":"border-gray-200 hover:bg-gray-50"),children:T},T)}),b.jsx("button",{onClick:()=>h(m=>Math.min(v,m+1)),disabled:d===v,className:"px-3 py-1 text-sm border border-gray-200 rounded hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]}),p.length===0&&b.jsx("div",{className:"text-center py-8 text-gray-500",children:c?"No results found for your search.":"No data available."})]})},iW=(e,t)=>{switch(e){case"human":return t==="agent"?"agent-avatars":"avatars";case"logo":return"profileLogos";case"icon":case"inlineTool":case"toolLibrary":case"KNOWLEDGE":case"MCP":return"profileIcons";default:return t==="agent"?"agent-avatars":"avatars"}},oW=e=>{if(!e)return null;if(typeof e=="string")try{return JSON.parse(e)}catch{return{name:e,type:"human"}}return e},sW=(e,t)=>{const r=["#3B82F6","#EF4444","#10B981","#F59E0B","#8B5CF6","#EC4899","#06B6D4","#84CC16"],n=e.split("").reduce((a,i)=>a+i.charCodeAt(0),0)%r.length;if(t==="workflowtool"){const a=e.toLowerCase();let i="toolLibrary";return a.includes("code")||a.includes("inline")||a.includes("calculate")?i="inlineTool":a.includes("knowledge")||a.includes("document")||a.includes("fetch")?i="KNOWLEDGE":(a.includes("mcp")||a.includes("protocol"))&&(i="MCP"),{name:"fallback",type:i,color:r[n]}}return{name:"fallback",type:t==="agent"?"human":"icon",color:r[n]}},lW=(e,t)=>{if(!(e!=null&&e.name))return"";if(t==="url")return e.name;const r=window.location.origin,n=iW(e.type||"human",t);return`${r}/agenticai/assets/${n}/${e.name}.svg`},uW={xs:"w-6 h-6 text-xs",small:"w-8 h-8 text-sm",medium:"w-10 h-10 text-base",large:"w-12 h-12 text-lg"},Rt={inlineTool:`<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_3533_7514)">
192
+ `).concat(t,",").concat(r+a-s*f[3])),c+="Z"}else if(o>0&&i===+i&&i>0){var v=Math.min(o,i);c="M ".concat(t,",").concat(r+s*v,`
193
+ A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t+l*v,",").concat(r,`
194
+ L `).concat(t+n-l*v,",").concat(r,`
195
+ A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t+n,",").concat(r+s*v,`
196
+ L `).concat(t+n,",").concat(r+a-s*v,`
197
+ A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t+n-l*v,",").concat(r+a,`
198
+ L `).concat(t+l*v,",").concat(r+a,`
199
+ A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t,",").concat(r+a-s*v," Z")}else c="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(a," h ").concat(-n," Z");return c},zR=function(t,r){if(!t||!r)return!1;var n=t.x,a=t.y,i=r.x,o=r.y,s=r.width,l=r.height;if(Math.abs(s)>0&&Math.abs(l)>0){var u=Math.min(i,i+s),c=Math.max(i,i+s),f=Math.min(o,o+l),d=Math.max(o,o+l);return n>=u&&n<=c&&a>=f&&a<=d}return!1},KR={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},yc=function(t){var r=vm(vm({},KR),t),n=T.useRef(),a=T.useState(-1),i=DR(a,2),o=i[0],s=i[1];T.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var A=n.current.getTotalLength();A&&s(A)}catch{}},[]);var l=r.x,u=r.y,c=r.width,f=r.height,d=r.radius,h=r.className,v=r.animationEasing,m=r.animationDuration,p=r.animationBegin,x=r.isAnimationActive,O=r.isUpdateAnimationActive;if(l!==+l||u!==+u||c!==+c||f!==+f||c===0||f===0)return null;var w=ye("recharts-rectangle",h);return O?T.createElement(Dt,{canBegin:o>0,from:{width:c,height:f,x:l,y:u},to:{width:c,height:f,x:l,y:u},duration:m,animationEasing:v,isActive:O},function(A){var y=A.width,b=A.height,S=A.x,P=A.y;return T.createElement(Dt,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:p,duration:m,isActive:x,easing:v},T.createElement("path",qo({},de(r,!0),{className:w,d:ym(S,P,y,b,d),ref:n})))}):T.createElement("path",qo({},de(r,!0),{className:w,d:ym(l,u,c,f,d)}))};function mc(){return mc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},mc.apply(this,arguments)}var Ho=function(t){var r=t.cx,n=t.cy,a=t.r,i=t.className,o=ye("recharts-dot",i);return r===+r&&n===+n&&a===+a?xt.createElement("circle",mc({},de(t,!1),Di(t),{className:o,cx:r,cy:n,r:a})):null};function ai(e){"@babel/helpers - typeof";return ai=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ai(e)}var GR=["x","y","top","left","width","height","className"];function gc(){return gc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},gc.apply(this,arguments)}function mm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function VR(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mm(Object(r),!0).forEach(function(n){qR(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function qR(e,t,r){return t=HR(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function HR(e){var t=YR(e,"string");return ai(t)=="symbol"?t:t+""}function YR(e,t){if(ai(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ai(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function XR(e,t){if(e==null)return{};var r=ZR(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ZR(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var JR=function(t,r,n,a,i,o){return"M".concat(t,",").concat(i,"v").concat(a,"M").concat(o,",").concat(r,"h").concat(n)},QR=function(t){var r=t.x,n=r===void 0?0:r,a=t.y,i=a===void 0?0:a,o=t.top,s=o===void 0?0:o,l=t.left,u=l===void 0?0:l,c=t.width,f=c===void 0?0:c,d=t.height,h=d===void 0?0:d,v=t.className,m=XR(t,GR),p=VR({x:n,y:i,top:s,left:u,width:f,height:h},m);return!Z(n)||!Z(i)||!Z(f)||!Z(h)||!Z(s)||!Z(u)?null:T.createElement("path",gc({},de(p,!0),{className:ye("recharts-cross",v),d:JR(n,i,f,h,s,u)}))},e5=Qd,t5=e5(Object.getPrototypeOf,Object),r5=t5,n5=Zt,a5=r5,i5=Jt,o5="[object Object]",s5=Function.prototype,l5=Object.prototype,gm=s5.toString,u5=l5.hasOwnProperty,c5=gm.call(Object);function f5(e){if(!i5(e)||n5(e)!=o5)return!1;var t=a5(e);if(t===null)return!0;var r=u5.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&gm.call(r)==c5}var d5=f5;const h5=Ce(d5);var p5=Zt,v5=Jt,y5="[object Boolean]";function m5(e){return e===!0||e===!1||v5(e)&&p5(e)==y5}var g5=m5;const b5=Ce(g5);function ii(e){"@babel/helpers - typeof";return ii=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ii(e)}function Yo(){return Yo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Yo.apply(this,arguments)}function x5(e,t){return T5(e)||S5(e,t)||O5(e,t)||w5()}function w5(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
200
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function O5(e,t){if(e){if(typeof e=="string")return bm(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return bm(e,t)}}function bm(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function S5(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function T5(e){if(Array.isArray(e))return e}function xm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function wm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xm(Object(r),!0).forEach(function(n){A5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function A5(e,t,r){return t=P5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function P5(e){var t=_5(e,"string");return ii(t)=="symbol"?t:t+""}function _5(e,t){if(ii(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ii(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Om=function(t,r,n,a,i){var o=n-a,s;return s="M ".concat(t,",").concat(r),s+="L ".concat(t+n,",").concat(r),s+="L ".concat(t+n-o/2,",").concat(r+i),s+="L ".concat(t+n-o/2-a,",").concat(r+i),s+="L ".concat(t,",").concat(r," Z"),s},E5={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},j5=function(t){var r=wm(wm({},E5),t),n=T.useRef(),a=T.useState(-1),i=x5(a,2),o=i[0],s=i[1];T.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var w=n.current.getTotalLength();w&&s(w)}catch{}},[]);var l=r.x,u=r.y,c=r.upperWidth,f=r.lowerWidth,d=r.height,h=r.className,v=r.animationEasing,m=r.animationDuration,p=r.animationBegin,x=r.isUpdateAnimationActive;if(l!==+l||u!==+u||c!==+c||f!==+f||d!==+d||c===0&&f===0||d===0)return null;var O=ye("recharts-trapezoid",h);return x?T.createElement(Dt,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:d,x:l,y:u},to:{upperWidth:c,lowerWidth:f,height:d,x:l,y:u},duration:m,animationEasing:v,isActive:x},function(w){var A=w.upperWidth,y=w.lowerWidth,b=w.height,S=w.x,P=w.y;return T.createElement(Dt,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:p,duration:m,easing:v},T.createElement("path",Yo({},de(r,!0),{className:O,d:Om(S,P,A,y,b),ref:n})))}):T.createElement("g",null,T.createElement("path",Yo({},de(r,!0),{className:O,d:Om(l,u,c,f,d)})))},$5=["option","shapeType","propTransformer","activeClassName","isActive"];function oi(e){"@babel/helpers - typeof";return oi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oi(e)}function C5(e,t){if(e==null)return{};var r=M5(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function M5(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Sm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Xo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Sm(Object(r),!0).forEach(function(n){k5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Sm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function k5(e,t,r){return t=N5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function N5(e){var t=D5(e,"string");return oi(t)=="symbol"?t:t+""}function D5(e,t){if(oi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(oi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function I5(e,t){return Xo(Xo({},t),e)}function L5(e,t){return e==="symbols"}function Tm(e){var t=e.shapeType,r=e.elementProps;switch(t){case"rectangle":return T.createElement(yc,r);case"trapezoid":return T.createElement(j5,r);case"sector":return T.createElement(_y,r);case"symbols":if(L5(t))return T.createElement(Vi,r);break;default:return null}}function R5(e){return T.isValidElement(e)?e.props:e}function bc(e){var t=e.option,r=e.shapeType,n=e.propTransformer,a=n===void 0?I5:n,i=e.activeClassName,o=i===void 0?"recharts-active-shape":i,s=e.isActive,l=C5(e,$5),u;if(T.isValidElement(t))u=T.cloneElement(t,Xo(Xo({},l),R5(t)));else if(he(t))u=t(l);else if(h5(t)&&!b5(t)){var c=a(t,l);u=T.createElement(Tm,{shapeType:r,elementProps:c})}else{var f=l;u=T.createElement(Tm,{shapeType:r,elementProps:f})}return s?T.createElement(xe,{className:o},u):u}function Zo(e,t){return t!=null&&"trapezoids"in e.props}function Jo(e,t){return t!=null&&"sectors"in e.props}function si(e,t){return t!=null&&"points"in e.props}function B5(e,t){var r,n,a=e.x===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.x)||e.x===t.x,i=e.y===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.y)||e.y===t.y;return a&&i}function F5(e,t){var r=e.endAngle===t.endAngle,n=e.startAngle===t.startAngle;return r&&n}function W5(e,t){var r=e.x===t.x,n=e.y===t.y,a=e.z===t.z;return r&&n&&a}function U5(e,t){var r;return Zo(e,t)?r=B5:Jo(e,t)?r=F5:si(e,t)&&(r=W5),r}function z5(e,t){var r;return Zo(e,t)?r="trapezoids":Jo(e,t)?r="sectors":si(e,t)&&(r="points"),r}function K5(e,t){if(Zo(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}if(Jo(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}return si(e,t)?t.payload:{}}function G5(e){var t=e.activeTooltipItem,r=e.graphicalItem,n=e.itemData,a=z5(r,t),i=K5(r,t),o=n.filter(function(l,u){var c=Br(i,l),f=r.props[a].filter(function(v){var m=U5(r,t);return m(v,t)}),d=r.props[a].indexOf(f[f.length-1]),h=u===d;return c&&h}),s=n.indexOf(o[o.length-1]);return s}var V5=Math.ceil,q5=Math.max;function H5(e,t,r,n){for(var a=-1,i=q5(V5((t-e)/(r||1)),0),o=Array(i);i--;)o[n?i:++a]=e,e+=r;return o}var Y5=H5,X5=Zh,Am=1/0,Z5=17976931348623157e292;function J5(e){if(!e)return e===0?e:0;if(e=X5(e),e===Am||e===-Am){var t=e<0?-1:1;return t*Z5}return e===e?e:0}var Pm=J5,Q5=Y5,e6=to,xc=Pm;function t6(e){return function(t,r,n){return n&&typeof n!="number"&&e6(t,r,n)&&(r=n=void 0),t=xc(t),r===void 0?(r=t,t=0):r=xc(r),n=n===void 0?t<r?1:-1:xc(n),Q5(t,r,n,e)}}var r6=t6,n6=r6,a6=n6(),i6=a6;const Qo=Ce(i6);function li(e){"@babel/helpers - typeof";return li=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},li(e)}function _m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Em(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_m(Object(r),!0).forEach(function(n){jm(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_m(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jm(e,t,r){return t=o6(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o6(e){var t=s6(e,"string");return li(t)=="symbol"?t:t+""}function s6(e,t){if(li(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(li(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var l6=["Webkit","Moz","O","ms"],u6=function(t,r){var n=t.replace(/(\w)/,function(i){return i.toUpperCase()}),a=l6.reduce(function(i,o){return Em(Em({},i),{},jm({},o+n,r))},{});return a[t]=r,a};function kn(e){"@babel/helpers - typeof";return kn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kn(e)}function es(){return es=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},es.apply(this,arguments)}function $m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function wc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$m(Object(r),!0).forEach(function(n){gt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$m(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function c6(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Cm(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,km(n.key),n)}}function f6(e,t,r){return t&&Cm(e.prototype,t),r&&Cm(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function d6(e,t,r){return t=ts(t),h6(e,Mm()?Reflect.construct(t,r||[],ts(e).constructor):t.apply(e,r))}function h6(e,t){if(t&&(kn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return p6(e)}function p6(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Mm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Mm=function(){return!!e})()}function ts(e){return ts=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ts(e)}function v6(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Oc(e,t)}function Oc(e,t){return Oc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Oc(e,t)}function gt(e,t,r){return t=km(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function km(e){var t=y6(e,"string");return kn(t)=="symbol"?t:t+""}function y6(e,t){if(kn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(kn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var m6=function(t){var r=t.data,n=t.startIndex,a=t.endIndex,i=t.x,o=t.width,s=t.travellerWidth;if(!r||!r.length)return{};var l=r.length,u=Ea().domain(Qo(0,l)).range([i,i+o-s]),c=u.domain().map(function(f){return u(f)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:u(n),endX:u(a),scale:u,scaleValues:c}},Nm=function(t){return t.changedTouches&&!!t.changedTouches.length},Nn=function(e){function t(r){var n;return c6(this,t),n=d6(this,t,[r]),gt(n,"handleDrag",function(a){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(a):n.state.isSlideMoving&&n.handleSlideDrag(a)}),gt(n,"handleTouchMove",function(a){a.changedTouches!=null&&a.changedTouches.length>0&&n.handleDrag(a.changedTouches[0])}),gt(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var a=n.props,i=a.endIndex,o=a.onDragEnd,s=a.startIndex;o==null||o({endIndex:i,startIndex:s})}),n.detachDragEndListener()}),gt(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),gt(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),gt(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),gt(n,"handleSlideDragStart",function(a){var i=Nm(a)?a.changedTouches[0]:a;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:i.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return v6(t,e),f6(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var a=n.startX,i=n.endX,o=this.state.scaleValues,s=this.props,l=s.gap,u=s.data,c=u.length-1,f=Math.min(a,i),d=Math.max(a,i),h=t.getIndexInRange(o,f),v=t.getIndexInRange(o,d);return{startIndex:h-h%l,endIndex:v===c?c:v-v%l}}},{key:"getTextOfTick",value:function(n){var a=this.props,i=a.data,o=a.tickFormatter,s=a.dataKey,l=Ze(i[n],s,n);return he(o)?o(l,n):l}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(n){var a=this.state,i=a.slideMoveStartX,o=a.startX,s=a.endX,l=this.props,u=l.x,c=l.width,f=l.travellerWidth,d=l.startIndex,h=l.endIndex,v=l.onChange,m=n.pageX-i;m>0?m=Math.min(m,u+c-f-s,u+c-f-o):m<0&&(m=Math.max(m,u-o,u-s));var p=this.getIndex({startX:o+m,endX:s+m});(p.startIndex!==d||p.endIndex!==h)&&v&&v(p),this.setState({startX:o+m,endX:s+m,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,a){var i=Nm(a)?a.changedTouches[0]:a;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:i.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var a=this.state,i=a.brushMoveStartX,o=a.movingTravellerId,s=a.endX,l=a.startX,u=this.state[o],c=this.props,f=c.x,d=c.width,h=c.travellerWidth,v=c.onChange,m=c.gap,p=c.data,x={startX:this.state.startX,endX:this.state.endX},O=n.pageX-i;O>0?O=Math.min(O,f+d-h-u):O<0&&(O=Math.max(O,f-u)),x[o]=u+O;var w=this.getIndex(x),A=w.startIndex,y=w.endIndex,b=function(){var P=p.length-1;return o==="startX"&&(s>l?A%m===0:y%m===0)||s<l&&y===P||o==="endX"&&(s>l?y%m===0:A%m===0)||s>l&&y===P};this.setState(gt(gt({},o,u+O),"brushMoveStartX",n.pageX),function(){v&&b()&&v(w)})}},{key:"handleTravellerMoveKeyboard",value:function(n,a){var i=this,o=this.state,s=o.scaleValues,l=o.startX,u=o.endX,c=this.state[a],f=s.indexOf(c);if(f!==-1){var d=f+n;if(!(d===-1||d>=s.length)){var h=s[d];a==="startX"&&h>=u||a==="endX"&&h<=l||this.setState(gt({},a,h),function(){i.props.onChange(i.getIndex({startX:i.state.startX,endX:i.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,a=n.x,i=n.y,o=n.width,s=n.height,l=n.fill,u=n.stroke;return T.createElement("rect",{stroke:u,fill:l,x:a,y:i,width:o,height:s})}},{key:"renderPanorama",value:function(){var n=this.props,a=n.x,i=n.y,o=n.width,s=n.height,l=n.data,u=n.children,c=n.padding,f=T.Children.only(u);return f?T.cloneElement(f,{x:a,y:i,width:o,height:s,margin:c,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(n,a){var i,o,s=this,l=this.props,u=l.y,c=l.travellerWidth,f=l.height,d=l.traveller,h=l.ariaLabel,v=l.data,m=l.startIndex,p=l.endIndex,x=Math.max(n,this.props.x),O=wc(wc({},de(this.props,!1)),{},{x,y:u,width:c,height:f}),w=h||"Min value: ".concat((i=v[m])===null||i===void 0?void 0:i.name,", Max value: ").concat((o=v[p])===null||o===void 0?void 0:o.name);return T.createElement(xe,{tabIndex:0,role:"slider","aria-label":w,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[a],onTouchStart:this.travellerDragStartHandlers[a],onKeyDown:function(y){["ArrowLeft","ArrowRight"].includes(y.key)&&(y.preventDefault(),y.stopPropagation(),s.handleTravellerMoveKeyboard(y.key==="ArrowRight"?1:-1,a))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(d,O))}},{key:"renderSlide",value:function(n,a){var i=this.props,o=i.y,s=i.height,l=i.stroke,u=i.travellerWidth,c=Math.min(n,a)+u,f=Math.max(Math.abs(a-n)-u,0);return T.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:c,y:o,width:f,height:s})}},{key:"renderText",value:function(){var n=this.props,a=n.startIndex,i=n.endIndex,o=n.y,s=n.height,l=n.travellerWidth,u=n.stroke,c=this.state,f=c.startX,d=c.endX,h=5,v={pointerEvents:"none",fill:u};return T.createElement(xe,{className:"recharts-brush-texts"},T.createElement(lo,es({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,d)-h,y:o+s/2},v),this.getTextOfTick(a)),T.createElement(lo,es({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,d)+l+h,y:o+s/2},v),this.getTextOfTick(i)))}},{key:"render",value:function(){var n=this.props,a=n.data,i=n.className,o=n.children,s=n.x,l=n.y,u=n.width,c=n.height,f=n.alwaysShowText,d=this.state,h=d.startX,v=d.endX,m=d.isTextActive,p=d.isSlideMoving,x=d.isTravellerMoving,O=d.isTravellerFocused;if(!a||!a.length||!Z(s)||!Z(l)||!Z(u)||!Z(c)||u<=0||c<=0)return null;var w=ye("recharts-brush",i),A=T.Children.count(o)===1,y=u6("userSelect","none");return T.createElement(xe,{className:w,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:y},this.renderBackground(),A&&this.renderPanorama(),this.renderSlide(h,v),this.renderTravellerLayer(h,"startX"),this.renderTravellerLayer(v,"endX"),(m||p||x||O||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var a=n.x,i=n.y,o=n.width,s=n.height,l=n.stroke,u=Math.floor(i+s/2)-1;return T.createElement(T.Fragment,null,T.createElement("rect",{x:a,y:i,width:o,height:s,fill:l,stroke:"none"}),T.createElement("line",{x1:a+1,y1:u,x2:a+o-1,y2:u,fill:"none",stroke:"#fff"}),T.createElement("line",{x1:a+1,y1:u+2,x2:a+o-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,a){var i;return T.isValidElement(n)?i=T.cloneElement(n,a):he(n)?i=n(a):i=t.renderDefaultTraveller(a),i}},{key:"getDerivedStateFromProps",value:function(n,a){var i=n.data,o=n.width,s=n.x,l=n.travellerWidth,u=n.updateId,c=n.startIndex,f=n.endIndex;if(i!==a.prevData||u!==a.prevUpdateId)return wc({prevData:i,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:o},i&&i.length?m6({data:i,width:o,x:s,travellerWidth:l,startIndex:c,endIndex:f}):{scale:null,scaleValues:null});if(a.scale&&(o!==a.prevWidth||s!==a.prevX||l!==a.prevTravellerWidth)){a.scale.range([s,s+o-l]);var d=a.scale.domain().map(function(h){return a.scale(h)});return{prevData:i,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:o,startX:a.scale(n.startIndex),endX:a.scale(n.endIndex),scaleValues:d}}return null}},{key:"getIndexInRange",value:function(n,a){for(var i=n.length,o=0,s=i-1;s-o>1;){var l=Math.floor((o+s)/2);n[l]>a?s=l:o=l}return a>=n[s]?s:o}}])}(T.PureComponent);gt(Nn,"displayName","Brush"),gt(Nn,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var g6=Rl;function b6(e,t){var r;return g6(e,function(n,a,i){return r=t(n,a,i),!r}),!!r}var x6=b6,w6=Rd,O6=pr,S6=x6,T6=ft,A6=to;function P6(e,t,r){var n=T6(e)?w6:S6;return r&&A6(e,t,r)&&(t=void 0),n(e,O6(t))}var _6=P6;const E6=Ce(_6);var Vt=function(t,r){var n=t.alwaysShow,a=t.ifOverflow;return n&&(a="extendDomain"),a===r},Dm=Nh;function j6(e,t,r){t=="__proto__"&&Dm?Dm(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var $6=j6,C6=$6,M6=$h,k6=pr;function N6(e,t){var r={};return t=k6(t),M6(e,function(n,a,i){C6(r,a,t(n,a,i))}),r}var D6=N6;const I6=Ce(D6);function L6(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}var R6=L6,B6=Rl;function F6(e,t){var r=!0;return B6(e,function(n,a,i){return r=!!t(n,a,i),r}),r}var W6=F6,U6=R6,z6=W6,K6=pr,G6=ft,V6=to;function q6(e,t,r){var n=G6(e)?U6:z6;return r&&V6(e,t,r)&&(t=void 0),n(e,K6(t))}var H6=q6;const Im=Ce(H6);var Y6=["x","y"];function Dn(e){"@babel/helpers - typeof";return Dn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dn(e)}function Sc(){return Sc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Sc.apply(this,arguments)}function Lm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ui(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Lm(Object(r),!0).forEach(function(n){X6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Lm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function X6(e,t,r){return t=Z6(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Z6(e){var t=J6(e,"string");return Dn(t)=="symbol"?t:t+""}function J6(e,t){if(Dn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Dn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Q6(e,t){if(e==null)return{};var r=e4(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function e4(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function t4(e,t){var r=e.x,n=e.y,a=Q6(e,Y6),i="".concat(r),o=parseInt(i,10),s="".concat(n),l=parseInt(s,10),u="".concat(t.height||a.height),c=parseInt(u,10),f="".concat(t.width||a.width),d=parseInt(f,10);return ui(ui(ui(ui(ui({},t),a),o?{x:o}:{}),l?{y:l}:{}),{},{height:c,width:d,name:t.name,radius:t.radius})}function Rm(e){return T.createElement(bc,Sc({shapeType:"rectangle",propTransformer:t4,activeClassName:"recharts-active-bar"},e))}var r4=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,a){if(typeof t=="number")return t;var i=Z(n)||pO(n);return i?t(n,a):(i||(process.env.NODE_ENV!=="production"?pt(!1,"minPointSize callback function received a value with type of ".concat(Dn(n),". Currently only numbers or null/undefined are supported.")):pt()),r)}},n4=["value","background"],Bm;function In(e){"@babel/helpers - typeof";return In=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},In(e)}function a4(e,t){if(e==null)return{};var r=i4(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function i4(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function rs(){return rs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},rs.apply(this,arguments)}function Fm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function qe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Fm(Object(r),!0).forEach(function(n){Or(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function o4(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wm(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,zm(n.key),n)}}function s4(e,t,r){return t&&Wm(e.prototype,t),r&&Wm(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l4(e,t,r){return t=ns(t),u4(e,Um()?Reflect.construct(t,r||[],ns(e).constructor):t.apply(e,r))}function u4(e,t){if(t&&(In(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return c4(e)}function c4(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Um(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Um=function(){return!!e})()}function ns(e){return ns=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ns(e)}function f4(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Tc(e,t)}function Tc(e,t){return Tc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Tc(e,t)}function Or(e,t,r){return t=zm(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zm(e){var t=d4(e,"string");return In(t)=="symbol"?t:t+""}function d4(e,t){if(In(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(In(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ln=function(e){function t(){var r;o4(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=l4(this,t,[].concat(a)),Or(r,"state",{isAnimationFinished:!1}),Or(r,"id",$r("recharts-bar-")),Or(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),o&&o()}),Or(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),o&&o()}),r}return f4(t,e),s4(t,[{key:"renderRectanglesStatically",value:function(n){var a=this,i=this.props,o=i.shape,s=i.dataKey,l=i.activeIndex,u=i.activeBar,c=de(this.props,!1);return n&&n.map(function(f,d){var h=d===l,v=h?u:o,m=qe(qe(qe({},c),f),{},{isActive:h,option:v,index:d,dataKey:s,onAnimationStart:a.handleAnimationStart,onAnimationEnd:a.handleAnimationEnd});return T.createElement(xe,rs({className:"recharts-bar-rectangle"},pa(a.props,f,d),{key:"rectangle-".concat(f==null?void 0:f.x,"-").concat(f==null?void 0:f.y,"-").concat(f==null?void 0:f.value,"-").concat(d)}),T.createElement(Rm,m))})}},{key:"renderRectanglesWithAnimation",value:function(){var n=this,a=this.props,i=a.data,o=a.layout,s=a.isAnimationActive,l=a.animationBegin,u=a.animationDuration,c=a.animationEasing,f=a.animationId,d=this.state.prevData;return T.createElement(Dt,{begin:l,duration:u,isActive:s,easing:c,from:{t:0},to:{t:1},key:"bar-".concat(f),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(h){var v=h.t,m=i.map(function(p,x){var O=d&&d[x];if(O){var w=Ue(O.x,p.x),A=Ue(O.y,p.y),y=Ue(O.width,p.width),b=Ue(O.height,p.height);return qe(qe({},p),{},{x:w(v),y:A(v),width:y(v),height:b(v)})}if(o==="horizontal"){var S=Ue(0,p.height),P=S(v);return qe(qe({},p),{},{y:p.y+p.height-P,height:P})}var $=Ue(0,p.width),M=$(v);return qe(qe({},p),{},{width:M})});return T.createElement(xe,null,n.renderRectanglesStatically(m))})}},{key:"renderRectangles",value:function(){var n=this.props,a=n.data,i=n.isAnimationActive,o=this.state.prevData;return i&&a&&a.length&&(!o||!Br(o,a))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(a)}},{key:"renderBackground",value:function(){var n=this,a=this.props,i=a.data,o=a.dataKey,s=a.activeIndex,l=de(this.props.background,!1);return i.map(function(u,c){u.value;var f=u.background,d=a4(u,n4);if(!f)return null;var h=qe(qe(qe(qe(qe({},d),{},{fill:"#eee"},f),l),pa(n.props,u,c)),{},{onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd,dataKey:o,index:c,className:"recharts-bar-background-rectangle"});return T.createElement(Rm,rs({key:"background-bar-".concat(c),option:n.props.background,isActive:c===s},h))})}},{key:"renderErrorBar",value:function(n,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,o=i.data,s=i.xAxis,l=i.yAxis,u=i.layout,c=i.children,f=dt(c,jn);if(!f)return null;var d=u==="vertical"?o[0].height/2:o[0].width/2,h=function(p,x){var O=Array.isArray(p.value)?p.value[1]:p.value;return{x:p.x,y:p.y,value:O,errorVal:Ze(p,x)}},v={clipPath:n?"url(#clipPath-".concat(a,")"):null};return T.createElement(xe,v,f.map(function(m){return T.cloneElement(m,{key:"error-bar-".concat(a,"-").concat(m.props.dataKey),data:o,xAxis:s,yAxis:l,layout:u,offset:d,dataPointFormatter:h})}))}},{key:"render",value:function(){var n=this.props,a=n.hide,i=n.data,o=n.className,s=n.xAxis,l=n.yAxis,u=n.left,c=n.top,f=n.width,d=n.height,h=n.isAnimationActive,v=n.background,m=n.id;if(a||!i||!i.length)return null;var p=this.state.isAnimationFinished,x=ye("recharts-bar",o),O=s&&s.allowDataOverflow,w=l&&l.allowDataOverflow,A=O||w,y=fe(m)?this.id:m;return T.createElement(xe,{className:x},O||w?T.createElement("defs",null,T.createElement("clipPath",{id:"clipPath-".concat(y)},T.createElement("rect",{x:O?u:u-f/2,y:w?c:c-d/2,width:O?f:f*2,height:w?d:d*2}))):null,T.createElement(xe,{className:"recharts-bar-rectangles",clipPath:A?"url(#clipPath-".concat(y,")"):null},v?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(A,y),(!h||p)&&Gt.renderCallByParent(this.props,i))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curData:n.data,prevData:a.curData}:n.data!==a.curData?{curData:n.data}:null}}])}(T.PureComponent);Bm=Ln,Or(Ln,"displayName","Bar"),Or(Ln,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!vr.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"}),Or(Ln,"getComposedData",function(e){var t=e.props,r=e.item,n=e.barPosition,a=e.bandSize,i=e.xAxis,o=e.yAxis,s=e.xAxisTicks,l=e.yAxisTicks,u=e.stackedData,c=e.dataStartIndex,f=e.displayedData,d=e.offset,h=RI(n,r);if(!h)return null;var v=t.layout,m=r.type.defaultProps,p=m!==void 0?qe(qe({},m),r.props):r.props,x=p.dataKey,O=p.children,w=p.minPointSize,A=v==="horizontal"?o:i,y=u?A.scale.domain():null,b=VI({numericAxis:A}),S=dt(O,Hl),P=f.map(function($,M){var _,j,R,k,D,C;u?_=BI(u[c+M],y):(_=Ze($,x),Array.isArray(_)||(_=[b,_]));var B=r4(w,Bm.defaultProps.minPointSize)(_[1],M);if(v==="horizontal"){var U,K=[o.scale(_[0]),o.scale(_[1])],E=K[0],L=K[1];j=cy({axis:i,ticks:s,bandSize:a,offset:h.offset,entry:$,index:M}),R=(U=L??E)!==null&&U!==void 0?U:void 0,k=h.size;var F=E-L;if(D=Number.isNaN(F)?0:F,C={x:j,y:o.y,width:k,height:o.height},Math.abs(B)>0&&Math.abs(D)<Math.abs(B)){var W=Ct(D||B)*(Math.abs(B)-Math.abs(D));R-=W,D+=W}}else{var G=[i.scale(_[0]),i.scale(_[1])],X=G[0],Q=G[1];if(j=X,R=cy({axis:o,ticks:l,bandSize:a,offset:h.offset,entry:$,index:M}),k=Q-X,D=h.size,C={x:i.x,y:R,width:i.width,height:D},Math.abs(B)>0&&Math.abs(k)<Math.abs(B)){var ae=Ct(k||B)*(Math.abs(B)-Math.abs(k));k+=ae}}return qe(qe(qe({},$),{},{x:j,y:R,width:k,height:D,value:u?_:_[1],payload:$,background:C},S&&S[M]&&S[M].props),{},{tooltipPayload:[vy(r,$)],tooltipPosition:{x:j+k/2,y:R+D/2}})});return qe({data:P,layout:v},d)});function ci(e){"@babel/helpers - typeof";return ci=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ci(e)}function h4(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Km(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Vm(n.key),n)}}function p4(e,t,r){return t&&Km(e.prototype,t),r&&Km(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Gm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function It(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Gm(Object(r),!0).forEach(function(n){as(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function as(e,t,r){return t=Vm(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Vm(e){var t=v4(e,"string");return ci(t)=="symbol"?t:t+""}function v4(e,t){if(ci(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ci(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var y4=function(t,r,n,a,i){var o=t.width,s=t.height,l=t.layout,u=t.children,c=Object.keys(r),f={left:n.left,leftMirror:n.left,right:o-n.right,rightMirror:o-n.right,top:n.top,topMirror:n.top,bottom:s-n.bottom,bottomMirror:s-n.bottom},d=!!yt(u,Ln);return c.reduce(function(h,v){var m=r[v],p=m.orientation,x=m.domain,O=m.padding,w=O===void 0?{}:O,A=m.mirror,y=m.reversed,b="".concat(p).concat(A?"Mirror":""),S,P,$,M,_;if(m.type==="number"&&(m.padding==="gap"||m.padding==="no-gap")){var j=x[1]-x[0],R=1/0,k=m.categoricalDomain.sort(gO);if(k.forEach(function(G,X){X>0&&(R=Math.min((G||0)-(k[X-1]||0),R))}),Number.isFinite(R)){var D=R/j,C=m.layout==="vertical"?n.height:n.width;if(m.padding==="gap"&&(S=D*C/2),m.padding==="no-gap"){var B=Cr(t.barCategoryGap,D*C),U=D*C/2;S=U-B-(U-B)/C*B}}}a==="xAxis"?P=[n.left+(w.left||0)+(S||0),n.left+n.width-(w.right||0)-(S||0)]:a==="yAxis"?P=l==="horizontal"?[n.top+n.height-(w.bottom||0),n.top+(w.top||0)]:[n.top+(w.top||0)+(S||0),n.top+n.height-(w.bottom||0)-(S||0)]:P=m.range,y&&(P=[P[1],P[0]]);var K=II(m,i,d),E=K.scale,L=K.realScaleType;E.domain(x).range(P),LI(E);var F=GI(E,It(It({},m),{},{realScaleType:L}));a==="xAxis"?(_=p==="top"&&!A||p==="bottom"&&A,$=n.left,M=f[b]-_*m.height):a==="yAxis"&&(_=p==="left"&&!A||p==="right"&&A,$=f[b]-_*m.width,M=n.top);var W=It(It(It({},m),F),{},{realScaleType:L,x:$,y:M,scale:E,width:a==="xAxis"?n.width:m.width,height:a==="yAxis"?n.height:m.height});return W.bandSize=Io(W,F),!m.hide&&a==="xAxis"?f[b]+=(_?-1:1)*W.height:m.hide||(f[b]+=(_?-1:1)*W.width),It(It({},h),{},as({},v,W))},{})},qm=function(t,r){var n=t.x,a=t.y,i=r.x,o=r.y;return{x:Math.min(n,i),y:Math.min(a,o),width:Math.abs(i-n),height:Math.abs(o-a)}},m4=function(t){var r=t.x1,n=t.y1,a=t.x2,i=t.y2;return qm({x:r,y:n},{x:a,y:i})},Hm=function(){function e(t){h4(this,e),this.scale=t}return p4(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=n.bandAware,i=n.position;if(r!==void 0){if(i)switch(i){case"start":return this.scale(r);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+o}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(r)+s}default:return this.scale(r)}if(a){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+l}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),a=n[0],i=n[n.length-1];return a<=i?r>=a&&r<=i:r>=i&&r<=a}}],[{key:"create",value:function(r){return new e(r)}}])}();as(Hm,"EPS",1e-4);var Ac=function(t){var r=Object.keys(t).reduce(function(n,a){return It(It({},n),{},as({},a,Hm.create(t[a])))},{});return It(It({},r),{},{apply:function(a){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=i.bandAware,s=i.position;return I6(a,function(l,u){return r[u].apply(l,{bandAware:o,position:s})})},isInRange:function(a){return Im(a,function(i,o){return r[o].isInRange(i)})}})};function g4(e){return(e%180+180)%180}var b4=function(t){var r=t.width,n=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=g4(a),o=i*Math.PI/180,s=Math.atan(n/r),l=o>s&&o<Math.PI-s?n/Math.sin(o):r/Math.cos(o);return Math.abs(l)},x4=pr,w4=ma,O4=Zi;function S4(e){return function(t,r,n){var a=Object(t);if(!w4(t)){var i=x4(r);t=O4(t),r=function(s){return i(a[s],s,a)}}var o=e(t,r,n);return o>-1?a[i?t[o]:o]:void 0}}var T4=S4,A4=Pm;function P4(e){var t=A4(e),r=t%1;return t===t?r?t-r:t:0}var _4=P4,E4=gh,j4=pr,$4=_4,C4=Math.max;function M4(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var a=r==null?0:$4(r);return a<0&&(a=C4(n+a,0)),E4(e,j4(t),a)}var k4=M4,N4=T4,D4=k4,I4=N4(D4),L4=I4;const R4=Ce(L4);var B4=x1(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")});function is(e){"@babel/helpers - typeof";return is=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},is(e)}var Pc=T.createContext(void 0),_c=T.createContext(void 0),Ym=T.createContext(void 0),Xm=T.createContext({}),Zm=T.createContext(void 0),Jm=T.createContext(0),Qm=T.createContext(0),eg=function(t){var r=t.state,n=r.xAxisMap,a=r.yAxisMap,i=r.offset,o=t.clipPathId,s=t.children,l=t.width,u=t.height,c=B4(i);return T.createElement(Pc.Provider,{value:n},T.createElement(_c.Provider,{value:a},T.createElement(Xm.Provider,{value:i},T.createElement(Ym.Provider,{value:c},T.createElement(Zm.Provider,{value:o},T.createElement(Jm.Provider,{value:u},T.createElement(Qm.Provider,{value:l},s)))))))},F4=function(){return T.useContext(Zm)};function tg(e){var t=Object.keys(e);return t.length===0?"There are no available ids.":"Available ids are: ".concat(t,".")}var rg=function(t){var r=T.useContext(Pc);r==null&&(process.env.NODE_ENV!=="production"?pt(!1,"Could not find Recharts context; are you sure this is rendered inside a Recharts wrapper component?"):pt());var n=r[t];return n==null&&(process.env.NODE_ENV!=="production"?pt(!1,'Could not find xAxis by id "'.concat(t,'" [').concat(is(t),"]. ").concat(tg(r))):pt()),n},W4=function(){var t=T.useContext(Pc);return hr(t)},U4=function(){var t=T.useContext(_c),r=R4(t,function(n){return Im(n.domain,Number.isFinite)});return r||hr(t)},ng=function(t){var r=T.useContext(_c);r==null&&(process.env.NODE_ENV!=="production"?pt(!1,"Could not find Recharts context; are you sure this is rendered inside a Recharts wrapper component?"):pt());var n=r[t];return n==null&&(process.env.NODE_ENV!=="production"?pt(!1,'Could not find yAxis by id "'.concat(t,'" [').concat(is(t),"]. ").concat(tg(r))):pt()),n},z4=function(){var t=T.useContext(Ym);return t},K4=function(){return T.useContext(Xm)},Ec=function(){return T.useContext(Qm)},jc=function(){return T.useContext(Jm)};function Rn(e){"@babel/helpers - typeof";return Rn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rn(e)}function G4(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function V4(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,sg(n.key),n)}}function q4(e,t,r){return t&&V4(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function H4(e,t,r){return t=os(t),Y4(e,ag()?Reflect.construct(t,r||[],os(e).constructor):t.apply(e,r))}function Y4(e,t){if(t&&(Rn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return X4(e)}function X4(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ag(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ag=function(){return!!e})()}function os(e){return os=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},os(e)}function Z4(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$c(e,t)}function $c(e,t){return $c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},$c(e,t)}function ig(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function og(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ig(Object(r),!0).forEach(function(n){Cc(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ig(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Cc(e,t,r){return t=sg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sg(e){var t=J4(e,"string");return Rn(t)=="symbol"?t:t+""}function J4(e,t){if(Rn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Rn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Q4(e,t){return nB(e)||rB(e,t)||tB(e,t)||eB()}function eB(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
201
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tB(e,t){if(e){if(typeof e=="string")return lg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return lg(e,t)}}function lg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function rB(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function nB(e){if(Array.isArray(e))return e}function Mc(){return Mc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Mc.apply(this,arguments)}var aB=function(t,r){var n;return T.isValidElement(t)?n=T.cloneElement(t,r):he(t)?n=t(r):n=T.createElement("line",Mc({},r,{className:"recharts-reference-line-line"})),n},iB=function(t,r,n,a,i,o,s,l,u){var c=i.x,f=i.y,d=i.width,h=i.height;if(n){var v=u.y,m=t.y.apply(v,{position:o});if(Vt(u,"discard")&&!t.y.isInRange(m))return null;var p=[{x:c+d,y:m},{x:c,y:m}];return l==="left"?p.reverse():p}if(r){var x=u.x,O=t.x.apply(x,{position:o});if(Vt(u,"discard")&&!t.x.isInRange(O))return null;var w=[{x:O,y:f+h},{x:O,y:f}];return s==="top"?w.reverse():w}if(a){var A=u.segment,y=A.map(function(b){return t.apply(b,{position:o})});return Vt(u,"discard")&&E6(y,function(b){return!t.isInRange(b)})?null:y}return null};function oB(e){var t=e.x,r=e.y,n=e.segment,a=e.xAxisId,i=e.yAxisId,o=e.shape,s=e.className,l=e.alwaysShow,u=F4(),c=rg(a),f=ng(i),d=z4();if(!u||!d)return null;er(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var h=Ac({x:c.scale,y:f.scale}),v=Ye(t),m=Ye(r),p=n&&n.length===2,x=iB(h,v,m,p,d,e.position,c.orientation,f.orientation,e);if(!x)return null;var O=Q4(x,2),w=O[0],A=w.x,y=w.y,b=O[1],S=b.x,P=b.y,$=Vt(e,"hidden")?"url(#".concat(u,")"):void 0,M=og(og({clipPath:$},de(e,!0)),{},{x1:A,y1:y,x2:S,y2:P});return T.createElement(xe,{className:ye("recharts-reference-line",s)},aB(o,M),at.renderCallByParent(e,m4({x1:A,y1:y,x2:S,y2:P})))}var kc=function(e){function t(){return G4(this,t),H4(this,t,arguments)}return Z4(t,e),q4(t,[{key:"render",value:function(){return T.createElement(oB,this.props)}}])}(T.Component);Cc(kc,"displayName","ReferenceLine"),Cc(kc,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function Nc(){return Nc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Nc.apply(this,arguments)}function Bn(e){"@babel/helpers - typeof";return Bn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bn(e)}function ug(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function cg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ug(Object(r),!0).forEach(function(n){ls(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ug(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function sB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lB(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,dg(n.key),n)}}function uB(e,t,r){return t&&lB(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function cB(e,t,r){return t=ss(t),fB(e,fg()?Reflect.construct(t,r||[],ss(e).constructor):t.apply(e,r))}function fB(e,t){if(t&&(Bn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return dB(e)}function dB(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(fg=function(){return!!e})()}function ss(e){return ss=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ss(e)}function hB(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Dc(e,t)}function Dc(e,t){return Dc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Dc(e,t)}function ls(e,t,r){return t=dg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dg(e){var t=pB(e,"string");return Bn(t)=="symbol"?t:t+""}function pB(e,t){if(Bn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Bn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var vB=function(t){var r=t.x,n=t.y,a=t.xAxis,i=t.yAxis,o=Ac({x:a.scale,y:i.scale}),s=o.apply({x:r,y:n},{bandAware:!0});return Vt(t,"discard")&&!o.isInRange(s)?null:s},us=function(e){function t(){return sB(this,t),cB(this,t,arguments)}return hB(t,e),uB(t,[{key:"render",value:function(){var n=this.props,a=n.x,i=n.y,o=n.r,s=n.alwaysShow,l=n.clipPathId,u=Ye(a),c=Ye(i);if(er(s===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!u||!c)return null;var f=vB(this.props);if(!f)return null;var d=f.x,h=f.y,v=this.props,m=v.shape,p=v.className,x=Vt(this.props,"hidden")?"url(#".concat(l,")"):void 0,O=cg(cg({clipPath:x},de(this.props,!0)),{},{cx:d,cy:h});return T.createElement(xe,{className:ye("recharts-reference-dot",p)},t.renderDot(m,O),at.renderCallByParent(this.props,{x:d-o,y:h-o,width:2*o,height:2*o}))}}])}(T.Component);ls(us,"displayName","ReferenceDot"),ls(us,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1}),ls(us,"renderDot",function(e,t){var r;return T.isValidElement(e)?r=T.cloneElement(e,t):he(e)?r=e(t):r=T.createElement(Ho,Nc({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),r});function Ic(){return Ic=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ic.apply(this,arguments)}function Fn(e){"@babel/helpers - typeof";return Fn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fn(e)}function hg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function pg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hg(Object(r),!0).forEach(function(n){fs(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function yB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mB(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,yg(n.key),n)}}function gB(e,t,r){return t&&mB(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function bB(e,t,r){return t=cs(t),xB(e,vg()?Reflect.construct(t,r||[],cs(e).constructor):t.apply(e,r))}function xB(e,t){if(t&&(Fn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return wB(e)}function wB(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(vg=function(){return!!e})()}function cs(e){return cs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},cs(e)}function OB(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Lc(e,t)}function Lc(e,t){return Lc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Lc(e,t)}function fs(e,t,r){return t=yg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yg(e){var t=SB(e,"string");return Fn(t)=="symbol"?t:t+""}function SB(e,t){if(Fn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Fn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var TB=function(t,r,n,a,i){var o=i.x1,s=i.x2,l=i.y1,u=i.y2,c=i.xAxis,f=i.yAxis;if(!c||!f)return null;var d=Ac({x:c.scale,y:f.scale}),h={x:t?d.x.apply(o,{position:"start"}):d.x.rangeMin,y:n?d.y.apply(l,{position:"start"}):d.y.rangeMin},v={x:r?d.x.apply(s,{position:"end"}):d.x.rangeMax,y:a?d.y.apply(u,{position:"end"}):d.y.rangeMax};return Vt(i,"discard")&&(!d.isInRange(h)||!d.isInRange(v))?null:qm(h,v)},ds=function(e){function t(){return yB(this,t),bB(this,t,arguments)}return OB(t,e),gB(t,[{key:"render",value:function(){var n=this.props,a=n.x1,i=n.x2,o=n.y1,s=n.y2,l=n.className,u=n.alwaysShow,c=n.clipPathId;er(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var f=Ye(a),d=Ye(i),h=Ye(o),v=Ye(s),m=this.props.shape;if(!f&&!d&&!h&&!v&&!m)return null;var p=TB(f,d,h,v,this.props);if(!p&&!m)return null;var x=Vt(this.props,"hidden")?"url(#".concat(c,")"):void 0;return T.createElement(xe,{className:ye("recharts-reference-area",l)},t.renderRect(m,pg(pg({clipPath:x},de(this.props,!0)),p)),at.renderCallByParent(this.props,p))}}])}(T.Component);fs(ds,"displayName","ReferenceArea"),fs(ds,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1}),fs(ds,"renderRect",function(e,t){var r;return T.isValidElement(e)?r=T.cloneElement(e,t):he(e)?r=e(t):r=T.createElement(yc,Ic({},t,{className:"recharts-reference-area-rect"})),r});function mg(e,t,r){if(t<1)return[];if(t===1&&r===void 0)return e;for(var n=[],a=0;a<e.length;a+=t)n.push(e[a]);return n}function AB(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return b4(n,r)}function PB(e,t,r){var n=r==="width",a=e.x,i=e.y,o=e.width,s=e.height;return t===1?{start:n?a:i,end:n?a+o:i+s}:{start:n?a+o:i+s,end:n?a:i}}function hs(e,t,r,n,a){if(e*t<e*n||e*t>e*a)return!1;var i=r();return e*(t-e*i/2-n)>=0&&e*(t+e*i/2-a)<=0}function _B(e,t){return mg(e,t+1)}function EB(e,t,r,n,a){for(var i=(n||[]).slice(),o=t.start,s=t.end,l=0,u=1,c=o,f=function(){var v=n==null?void 0:n[l];if(v===void 0)return{v:mg(n,u)};var m=l,p,x=function(){return p===void 0&&(p=r(v,m)),p},O=v.coordinate,w=l===0||hs(e,O,x,c,s);w||(l=0,c=o,u+=1),w&&(c=O+e*(x()/2+a),l+=u)},d;u<=i.length;)if(d=f(),d)return d.v;return[]}function fi(e){"@babel/helpers - typeof";return fi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fi(e)}function gg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function it(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gg(Object(r),!0).forEach(function(n){jB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jB(e,t,r){return t=$B(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $B(e){var t=CB(e,"string");return fi(t)=="symbol"?t:t+""}function CB(e,t){if(fi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(fi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function MB(e,t,r,n,a){for(var i=(n||[]).slice(),o=i.length,s=t.start,l=t.end,u=function(d){var h=i[d],v,m=function(){return v===void 0&&(v=r(h,d)),v};if(d===o-1){var p=e*(h.coordinate+e*m()/2-l);i[d]=h=it(it({},h),{},{tickCoord:p>0?h.coordinate-p*e:h.coordinate})}else i[d]=h=it(it({},h),{},{tickCoord:h.coordinate});var x=hs(e,h.tickCoord,m,s,l);x&&(l=h.tickCoord-e*(m()/2+a),i[d]=it(it({},h),{},{isShow:!0}))},c=o-1;c>=0;c--)u(c);return i}function kB(e,t,r,n,a,i){var o=(n||[]).slice(),s=o.length,l=t.start,u=t.end;if(i){var c=n[s-1],f=r(c,s-1),d=e*(c.coordinate+e*f/2-u);o[s-1]=c=it(it({},c),{},{tickCoord:d>0?c.coordinate-d*e:c.coordinate});var h=hs(e,c.tickCoord,function(){return f},l,u);h&&(u=c.tickCoord-e*(f/2+a),o[s-1]=it(it({},c),{},{isShow:!0}))}for(var v=i?s-1:s,m=function(O){var w=o[O],A,y=function(){return A===void 0&&(A=r(w,O)),A};if(O===0){var b=e*(w.coordinate-e*y()/2-l);o[O]=w=it(it({},w),{},{tickCoord:b<0?w.coordinate-b*e:w.coordinate})}else o[O]=w=it(it({},w),{},{tickCoord:w.coordinate});var S=hs(e,w.tickCoord,y,l,u);S&&(l=w.tickCoord+e*(y()/2+a),o[O]=it(it({},w),{},{isShow:!0}))},p=0;p<v;p++)m(p);return o}function Rc(e,t,r){var n=e.tick,a=e.ticks,i=e.viewBox,o=e.minTickGap,s=e.orientation,l=e.interval,u=e.tickFormatter,c=e.unit,f=e.angle;if(!a||!a.length||!n)return[];if(Z(l)||vr.isSsr)return _B(a,typeof l=="number"&&Z(l)?l:0);var d=[],h=s==="top"||s==="bottom"?"width":"height",v=c&&h==="width"?Sa(c,{fontSize:t,letterSpacing:r}):{width:0,height:0},m=function(w,A){var y=he(u)?u(w.value,A):w.value;return h==="width"?AB(Sa(y,{fontSize:t,letterSpacing:r}),v,f):Sa(y,{fontSize:t,letterSpacing:r})[h]},p=a.length>=2?Ct(a[1].coordinate-a[0].coordinate):1,x=PB(i,p,h);return l==="equidistantPreserveStart"?EB(p,x,m,a,o):(l==="preserveStart"||l==="preserveStartEnd"?d=kB(p,x,m,a,o,l==="preserveStartEnd"):d=MB(p,x,m,a,o),d.filter(function(O){return O.isShow}))}var NB=["viewBox"],DB=["viewBox"],IB=["ticks"];function Wn(e){"@babel/helpers - typeof";return Wn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wn(e)}function Un(){return Un=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Un.apply(this,arguments)}function bg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Qe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bg(Object(r),!0).forEach(function(n){Wc(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Bc(e,t){if(e==null)return{};var r=LB(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function LB(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function RB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xg(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Og(n.key),n)}}function BB(e,t,r){return t&&xg(e.prototype,t),r&&xg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function FB(e,t,r){return t=ps(t),WB(e,wg()?Reflect.construct(t,r||[],ps(e).constructor):t.apply(e,r))}function WB(e,t){if(t&&(Wn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return UB(e)}function UB(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(wg=function(){return!!e})()}function ps(e){return ps=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ps(e)}function zB(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fc(e,t)}function Fc(e,t){return Fc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Fc(e,t)}function Wc(e,t,r){return t=Og(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Og(e){var t=KB(e,"string");return Wn(t)=="symbol"?t:t+""}function KB(e,t){if(Wn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Wn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var zn=function(e){function t(r){var n;return RB(this,t),n=FB(this,t,[r]),n.state={fontSize:"",letterSpacing:""},n}return zB(t,e),BB(t,[{key:"shouldComponentUpdate",value:function(n,a){var i=n.viewBox,o=Bc(n,NB),s=this.props,l=s.viewBox,u=Bc(s,DB);return!ln(i,l)||!ln(o,u)||!ln(a,this.state)}},{key:"componentDidMount",value:function(){var n=this.layerReference;if(n){var a=n.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];a&&this.setState({fontSize:window.getComputedStyle(a).fontSize,letterSpacing:window.getComputedStyle(a).letterSpacing})}}},{key:"getTickLineCoord",value:function(n){var a=this.props,i=a.x,o=a.y,s=a.width,l=a.height,u=a.orientation,c=a.tickSize,f=a.mirror,d=a.tickMargin,h,v,m,p,x,O,w=f?-1:1,A=n.tickSize||c,y=Z(n.tickCoord)?n.tickCoord:n.coordinate;switch(u){case"top":h=v=n.coordinate,p=o+ +!f*l,m=p-w*A,O=m-w*d,x=y;break;case"left":m=p=n.coordinate,v=i+ +!f*s,h=v-w*A,x=h-w*d,O=y;break;case"right":m=p=n.coordinate,v=i+ +f*s,h=v+w*A,x=h+w*d,O=y;break;default:h=v=n.coordinate,p=o+ +f*l,m=p+w*A,O=m+w*d,x=y;break}return{line:{x1:h,y1:m,x2:v,y2:p},tick:{x,y:O}}}},{key:"getTickTextAnchor",value:function(){var n=this.props,a=n.orientation,i=n.mirror,o;switch(a){case"left":o=i?"start":"end";break;case"right":o=i?"end":"start";break;default:o="middle";break}return o}},{key:"getTickVerticalAnchor",value:function(){var n=this.props,a=n.orientation,i=n.mirror,o="end";switch(a){case"left":case"right":o="middle";break;case"top":o=i?"start":"end";break;default:o=i?"end":"start";break}return o}},{key:"renderAxisLine",value:function(){var n=this.props,a=n.x,i=n.y,o=n.width,s=n.height,l=n.orientation,u=n.mirror,c=n.axisLine,f=Qe(Qe(Qe({},de(this.props,!1)),de(c,!1)),{},{fill:"none"});if(l==="top"||l==="bottom"){var d=+(l==="top"&&!u||l==="bottom"&&u);f=Qe(Qe({},f),{},{x1:a,y1:i+d*s,x2:a+o,y2:i+d*s})}else{var h=+(l==="left"&&!u||l==="right"&&u);f=Qe(Qe({},f),{},{x1:a+h*o,y1:i,x2:a+h*o,y2:i+s})}return T.createElement("line",Un({},f,{className:ye("recharts-cartesian-axis-line",wt(c,"className"))}))}},{key:"renderTicks",value:function(n,a,i){var o=this,s=this.props,l=s.tickLine,u=s.stroke,c=s.tick,f=s.tickFormatter,d=s.unit,h=Rc(Qe(Qe({},this.props),{},{ticks:n}),a,i),v=this.getTickTextAnchor(),m=this.getTickVerticalAnchor(),p=de(this.props,!1),x=de(c,!1),O=Qe(Qe({},p),{},{fill:"none"},de(l,!1)),w=h.map(function(A,y){var b=o.getTickLineCoord(A),S=b.line,P=b.tick,$=Qe(Qe(Qe(Qe({textAnchor:v,verticalAnchor:m},p),{},{stroke:"none",fill:u},x),P),{},{index:y,payload:A,visibleTicksCount:h.length,tickFormatter:f});return T.createElement(xe,Un({className:"recharts-cartesian-axis-tick",key:"tick-".concat(A.value,"-").concat(A.coordinate,"-").concat(A.tickCoord)},pa(o.props,A,y)),l&&T.createElement("line",Un({},O,S,{className:ye("recharts-cartesian-axis-tick-line",wt(l,"className"))})),c&&t.renderTickItem(c,$,"".concat(he(f)?f(A.value,y):A.value).concat(d||"")))});return T.createElement("g",{className:"recharts-cartesian-axis-ticks"},w)}},{key:"render",value:function(){var n=this,a=this.props,i=a.axisLine,o=a.width,s=a.height,l=a.ticksGenerator,u=a.className,c=a.hide;if(c)return null;var f=this.props,d=f.ticks,h=Bc(f,IB),v=d;return he(l)&&(v=d&&d.length>0?l(this.props):l(h)),o<=0||s<=0||!v||!v.length?null:T.createElement(xe,{className:ye("recharts-cartesian-axis",u),ref:function(p){n.layerReference=p}},i&&this.renderAxisLine(),this.renderTicks(v,this.state.fontSize,this.state.letterSpacing),at.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,a,i){var o,s=ye(a.className,"recharts-cartesian-axis-tick-value");return T.isValidElement(n)?o=T.cloneElement(n,Qe(Qe({},a),{},{className:s})):he(n)?o=n(Qe(Qe({},a),{},{className:s})):o=T.createElement(lo,Un({},a,{className:"recharts-cartesian-axis-tick-value"}),i),o}}])}(T.Component);Wc(zn,"displayName","CartesianAxis"),Wc(zn,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var GB=["x1","y1","x2","y2","key"],VB=["offset"];function Vr(e){"@babel/helpers - typeof";return Vr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vr(e)}function Sg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ot(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Sg(Object(r),!0).forEach(function(n){qB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Sg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function qB(e,t,r){return t=HB(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function HB(e){var t=YB(e,"string");return Vr(t)=="symbol"?t:t+""}function YB(e,t){if(Vr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Vr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qr(){return qr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},qr.apply(this,arguments)}function Tg(e,t){if(e==null)return{};var r=XB(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function XB(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var ZB=function(t){var r=t.fill;if(!r||r==="none")return null;var n=t.fillOpacity,a=t.x,i=t.y,o=t.width,s=t.height,l=t.ry;return T.createElement("rect",{x:a,y:i,ry:l,width:o,height:s,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function Ag(e,t){var r;if(T.isValidElement(e))r=T.cloneElement(e,t);else if(he(e))r=e(t);else{var n=t.x1,a=t.y1,i=t.x2,o=t.y2,s=t.key,l=Tg(t,GB),u=de(l,!1);u.offset;var c=Tg(u,VB);r=T.createElement("line",qr({},c,{x1:n,y1:a,x2:i,y2:o,fill:"none",key:s}))}return r}function JB(e){var t=e.x,r=e.width,n=e.horizontal,a=n===void 0?!0:n,i=e.horizontalPoints;if(!a||!i||!i.length)return null;var o=i.map(function(s,l){var u=ot(ot({},e),{},{x1:t,y1:s,x2:t+r,y2:s,key:"line-".concat(l),index:l});return Ag(a,u)});return T.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function QB(e){var t=e.y,r=e.height,n=e.vertical,a=n===void 0?!0:n,i=e.verticalPoints;if(!a||!i||!i.length)return null;var o=i.map(function(s,l){var u=ot(ot({},e),{},{x1:s,y1:t,x2:s,y2:t+r,key:"line-".concat(l),index:l});return Ag(a,u)});return T.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function e8(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,a=e.y,i=e.width,o=e.height,s=e.horizontalPoints,l=e.horizontal,u=l===void 0?!0:l;if(!u||!t||!t.length)return null;var c=s.map(function(d){return Math.round(d+a-a)}).sort(function(d,h){return d-h});a!==c[0]&&c.unshift(0);var f=c.map(function(d,h){var v=!c[h+1],m=v?a+o-d:c[h+1]-d;if(m<=0)return null;var p=h%t.length;return T.createElement("rect",{key:"react-".concat(h),y:d,x:n,height:m,width:i,stroke:"none",fill:t[p],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return T.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},f)}function t8(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,a=e.fillOpacity,i=e.x,o=e.y,s=e.width,l=e.height,u=e.verticalPoints;if(!r||!n||!n.length)return null;var c=u.map(function(d){return Math.round(d+i-i)}).sort(function(d,h){return d-h});i!==c[0]&&c.unshift(0);var f=c.map(function(d,h){var v=!c[h+1],m=v?i+s-d:c[h+1]-d;if(m<=0)return null;var p=h%n.length;return T.createElement("rect",{key:"react-".concat(h),x:d,y:o,width:m,height:l,stroke:"none",fill:n[p],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return T.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var r8=function(t,r){var n=t.xAxis,a=t.width,i=t.height,o=t.offset;return ly(Rc(ot(ot(ot({},zn.defaultProps),n),{},{ticks:ur(n,!0),viewBox:{x:0,y:0,width:a,height:i}})),o.left,o.left+o.width,r)},n8=function(t,r){var n=t.yAxis,a=t.width,i=t.height,o=t.offset;return ly(Rc(ot(ot(ot({},zn.defaultProps),n),{},{ticks:ur(n,!0),viewBox:{x:0,y:0,width:a,height:i}})),o.top,o.top+o.height,r)},Kn={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Pg(e){var t,r,n,a,i,o,s=Ec(),l=jc(),u=K4(),c=ot(ot({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Kn.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:Kn.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:Kn.horizontal,horizontalFill:(a=e.horizontalFill)!==null&&a!==void 0?a:Kn.horizontalFill,vertical:(i=e.vertical)!==null&&i!==void 0?i:Kn.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:Kn.verticalFill,x:Z(e.x)?e.x:u.left,y:Z(e.y)?e.y:u.top,width:Z(e.width)?e.width:u.width,height:Z(e.height)?e.height:u.height}),f=c.x,d=c.y,h=c.width,v=c.height,m=c.syncWithTicks,p=c.horizontalValues,x=c.verticalValues,O=W4(),w=U4();if(!Z(h)||h<=0||!Z(v)||v<=0||!Z(f)||f!==+f||!Z(d)||d!==+d)return null;var A=c.verticalCoordinatesGenerator||r8,y=c.horizontalCoordinatesGenerator||n8,b=c.horizontalPoints,S=c.verticalPoints;if((!b||!b.length)&&he(y)){var P=p&&p.length,$=y({yAxis:w?ot(ot({},w),{},{ticks:P?p:w.ticks}):void 0,width:s,height:l,offset:u},P?!0:m);er(Array.isArray($),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Vr($),"]")),Array.isArray($)&&(b=$)}if((!S||!S.length)&&he(A)){var M=x&&x.length,_=A({xAxis:O?ot(ot({},O),{},{ticks:M?x:O.ticks}):void 0,width:s,height:l,offset:u},M?!0:m);er(Array.isArray(_),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Vr(_),"]")),Array.isArray(_)&&(S=_)}return T.createElement("g",{className:"recharts-cartesian-grid"},T.createElement(ZB,{fill:c.fill,fillOpacity:c.fillOpacity,x:c.x,y:c.y,width:c.width,height:c.height,ry:c.ry}),T.createElement(JB,qr({},c,{offset:u,horizontalPoints:b,xAxis:O,yAxis:w})),T.createElement(QB,qr({},c,{offset:u,verticalPoints:S,xAxis:O,yAxis:w})),T.createElement(e8,qr({},c,{horizontalPoints:b})),T.createElement(t8,qr({},c,{verticalPoints:S})))}Pg.displayName="CartesianGrid";var a8=["type","layout","connectNulls","ref"],i8=["key"];function Gn(e){"@babel/helpers - typeof";return Gn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gn(e)}function _g(e,t){if(e==null)return{};var r=o8(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function o8(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function di(){return di=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},di.apply(this,arguments)}function Eg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function bt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Eg(Object(r),!0).forEach(function(n){Lt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Eg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Vn(e){return c8(e)||u8(e)||l8(e)||s8()}function s8(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
202
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function l8(e,t){if(e){if(typeof e=="string")return Uc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Uc(e,t)}}function u8(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function c8(e){if(Array.isArray(e))return Uc(e)}function Uc(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function f8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jg(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Cg(n.key),n)}}function d8(e,t,r){return t&&jg(e.prototype,t),r&&jg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function h8(e,t,r){return t=vs(t),p8(e,$g()?Reflect.construct(t,r||[],vs(e).constructor):t.apply(e,r))}function p8(e,t){if(t&&(Gn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return v8(e)}function v8(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $g(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return($g=function(){return!!e})()}function vs(e){return vs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},vs(e)}function y8(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zc(e,t)}function zc(e,t){return zc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},zc(e,t)}function Lt(e,t,r){return t=Cg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Cg(e){var t=m8(e,"string");return Gn(t)=="symbol"?t:t+""}function m8(e,t){if(Gn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Gn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var hi=function(e){function t(){var r;f8(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=h8(this,t,[].concat(a)),Lt(r,"state",{isAnimationFinished:!0,totalLength:0}),Lt(r,"generateSimpleStrokeDasharray",function(o,s){return"".concat(s,"px ").concat(o-s,"px")}),Lt(r,"getStrokeDasharray",function(o,s,l){var u=l.reduce(function(x,O){return x+O});if(!u)return r.generateSimpleStrokeDasharray(s,o);for(var c=Math.floor(o/u),f=o%u,d=s-o,h=[],v=0,m=0;v<l.length;m+=l[v],++v)if(m+l[v]>f){h=[].concat(Vn(l.slice(0,v)),[f-m]);break}var p=h.length%2===0?[0,d]:[d];return[].concat(Vn(t.repeat(l,c)),Vn(h),p).map(function(x){return"".concat(x,"px")}).join(", ")}),Lt(r,"id",$r("recharts-line-")),Lt(r,"pathRef",function(o){r.mainCurve=o}),Lt(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),Lt(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return y8(t,e),d8(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();this.setState({totalLength:n})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();n!==this.state.totalLength&&this.setState({totalLength:n})}}},{key:"getTotalLength",value:function(){var n=this.mainCurve;try{return n&&n.getTotalLength&&n.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(n,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,o=i.points,s=i.xAxis,l=i.yAxis,u=i.layout,c=i.children,f=dt(c,jn);if(!f)return null;var d=function(m,p){return{x:m.x,y:m.y,value:m.value,errorVal:Ze(m.payload,p)}},h={clipPath:n?"url(#clipPath-".concat(a,")"):null};return T.createElement(xe,h,f.map(function(v){return T.cloneElement(v,{key:"bar-".concat(v.props.dataKey),data:o,xAxis:s,yAxis:l,layout:u,dataPointFormatter:d})}))}},{key:"renderDots",value:function(n,a,i){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var s=this.props,l=s.dot,u=s.points,c=s.dataKey,f=de(this.props,!1),d=de(l,!0),h=u.map(function(m,p){var x=bt(bt(bt({key:"dot-".concat(p),r:3},f),d),{},{index:p,cx:m.x,cy:m.y,value:m.value,dataKey:c,payload:m.payload,points:u});return t.renderDotItem(l,x)}),v={clipPath:n?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return T.createElement(xe,di({className:"recharts-line-dots",key:"dots"},v),h)}},{key:"renderCurveStatically",value:function(n,a,i,o){var s=this.props,l=s.type,u=s.layout,c=s.connectNulls;s.ref;var f=_g(s,a8),d=bt(bt(bt({},de(f,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:a?"url(#clipPath-".concat(i,")"):null,points:n},o),{},{type:l,layout:u,connectNulls:c});return T.createElement(Kr,di({},d,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,a){var i=this,o=this.props,s=o.points,l=o.strokeDasharray,u=o.isAnimationActive,c=o.animationBegin,f=o.animationDuration,d=o.animationEasing,h=o.animationId,v=o.animateNewValues,m=o.width,p=o.height,x=this.state,O=x.prevPoints,w=x.totalLength;return T.createElement(Dt,{begin:c,duration:f,isActive:u,easing:d,from:{t:0},to:{t:1},key:"line-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(A){var y=A.t;if(O){var b=O.length/s.length,S=s.map(function(j,R){var k=Math.floor(R*b);if(O[k]){var D=O[k],C=Ue(D.x,j.x),B=Ue(D.y,j.y);return bt(bt({},j),{},{x:C(y),y:B(y)})}if(v){var U=Ue(m*2,j.x),K=Ue(p/2,j.y);return bt(bt({},j),{},{x:U(y),y:K(y)})}return bt(bt({},j),{},{x:j.x,y:j.y})});return i.renderCurveStatically(S,n,a)}var P=Ue(0,w),$=P(y),M;if(l){var _="".concat(l).split(/[,\s]+/gim).map(function(j){return parseFloat(j)});M=i.getStrokeDasharray($,w,_)}else M=i.generateSimpleStrokeDasharray(w,$);return i.renderCurveStatically(s,n,a,{strokeDasharray:M})})}},{key:"renderCurve",value:function(n,a){var i=this.props,o=i.points,s=i.isAnimationActive,l=this.state,u=l.prevPoints,c=l.totalLength;return s&&o&&o.length&&(!u&&c>0||!Br(u,o))?this.renderCurveWithAnimation(n,a):this.renderCurveStatically(o,n,a)}},{key:"render",value:function(){var n,a=this.props,i=a.hide,o=a.dot,s=a.points,l=a.className,u=a.xAxis,c=a.yAxis,f=a.top,d=a.left,h=a.width,v=a.height,m=a.isAnimationActive,p=a.id;if(i||!s||!s.length)return null;var x=this.state.isAnimationFinished,O=s.length===1,w=ye("recharts-line",l),A=u&&u.allowDataOverflow,y=c&&c.allowDataOverflow,b=A||y,S=fe(p)?this.id:p,P=(n=de(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},$=P.r,M=$===void 0?3:$,_=P.strokeWidth,j=_===void 0?2:_,R=ed(o)?o:{},k=R.clipDot,D=k===void 0?!0:k,C=M*2+j;return T.createElement(xe,{className:w},A||y?T.createElement("defs",null,T.createElement("clipPath",{id:"clipPath-".concat(S)},T.createElement("rect",{x:A?d:d-h/2,y:y?f:f-v/2,width:A?h:h*2,height:y?v:v*2})),!D&&T.createElement("clipPath",{id:"clipPath-dots-".concat(S)},T.createElement("rect",{x:d-C/2,y:f-C/2,width:h+C,height:v+C}))):null,!O&&this.renderCurve(b,S),this.renderErrorBar(b,S),(O||o)&&this.renderDots(b,D,S),(!m||x)&&Gt.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:a.curPoints}:n.points!==a.curPoints?{curPoints:n.points}:null}},{key:"repeat",value:function(n,a){for(var i=n.length%2!==0?[].concat(Vn(n),[0]):n,o=[],s=0;s<a;++s)o=[].concat(Vn(o),Vn(i));return o}},{key:"renderDotItem",value:function(n,a){var i;if(T.isValidElement(n))i=T.cloneElement(n,a);else if(he(n))i=n(a);else{var o=a.key,s=_g(a,i8),l=ye("recharts-line-dot",typeof n!="boolean"?n.className:"");i=T.createElement(Ho,di({key:o},s,{className:l}))}return i}}])}(T.PureComponent);Lt(hi,"displayName","Line"),Lt(hi,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!vr.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1}),Lt(hi,"getComposedData",function(e){var t=e.props,r=e.xAxis,n=e.yAxis,a=e.xAxisTicks,i=e.yAxisTicks,o=e.dataKey,s=e.bandSize,l=e.displayedData,u=e.offset,c=t.layout,f=l.map(function(d,h){var v=Ze(d,o);return c==="horizontal"?{x:Cn({axis:r,ticks:a,bandSize:s,entry:d,index:h}),y:fe(v)?null:n.scale(v),value:v,payload:d}:{x:fe(v)?null:r.scale(v),y:Cn({axis:n,ticks:i,bandSize:s,entry:d,index:h}),value:v,payload:d}});return bt({points:f,layout:c},u)});var g8=["layout","type","stroke","connectNulls","isRange","ref"],b8=["key"],Mg;function qn(e){"@babel/helpers - typeof";return qn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qn(e)}function kg(e,t){if(e==null)return{};var r=x8(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function x8(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Hr(){return Hr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Hr.apply(this,arguments)}function Ng(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Sr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ng(Object(r),!0).forEach(function(n){qt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ng(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function w8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dg(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Lg(n.key),n)}}function O8(e,t,r){return t&&Dg(e.prototype,t),r&&Dg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function S8(e,t,r){return t=ys(t),T8(e,Ig()?Reflect.construct(t,r||[],ys(e).constructor):t.apply(e,r))}function T8(e,t){if(t&&(qn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return A8(e)}function A8(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ig(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ig=function(){return!!e})()}function ys(e){return ys=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ys(e)}function P8(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Kc(e,t)}function Kc(e,t){return Kc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Kc(e,t)}function qt(e,t,r){return t=Lg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Lg(e){var t=_8(e,"string");return qn(t)=="symbol"?t:t+""}function _8(e,t){if(qn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(qn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Tr=function(e){function t(){var r;w8(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=S8(this,t,[].concat(a)),qt(r,"state",{isAnimationFinished:!0}),qt(r,"id",$r("recharts-area-")),qt(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),he(o)&&o()}),qt(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),he(o)&&o()}),r}return P8(t,e),O8(t,[{key:"renderDots",value:function(n,a,i){var o=this.props.isAnimationActive,s=this.state.isAnimationFinished;if(o&&!s)return null;var l=this.props,u=l.dot,c=l.points,f=l.dataKey,d=de(this.props,!1),h=de(u,!0),v=c.map(function(p,x){var O=Sr(Sr(Sr({key:"dot-".concat(x),r:3},d),h),{},{index:x,cx:p.x,cy:p.y,dataKey:f,value:p.value,payload:p.payload,points:c});return t.renderDotItem(u,O)}),m={clipPath:n?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return T.createElement(xe,Hr({className:"recharts-area-dots"},m),v)}},{key:"renderHorizontalRect",value:function(n){var a=this.props,i=a.baseLine,o=a.points,s=a.strokeWidth,l=o[0].x,u=o[o.length-1].x,c=n*Math.abs(l-u),f=br(o.map(function(d){return d.y||0}));return Z(i)&&typeof i=="number"?f=Math.max(i,f):i&&Array.isArray(i)&&i.length&&(f=Math.max(br(i.map(function(d){return d.y||0})),f)),Z(f)?T.createElement("rect",{x:l<u?l:l-c,y:0,width:c,height:Math.floor(f+(s?parseInt("".concat(s),10):1))}):null}},{key:"renderVerticalRect",value:function(n){var a=this.props,i=a.baseLine,o=a.points,s=a.strokeWidth,l=o[0].y,u=o[o.length-1].y,c=n*Math.abs(l-u),f=br(o.map(function(d){return d.x||0}));return Z(i)&&typeof i=="number"?f=Math.max(i,f):i&&Array.isArray(i)&&i.length&&(f=Math.max(br(i.map(function(d){return d.x||0})),f)),Z(f)?T.createElement("rect",{x:0,y:l<u?l:l-c,width:f+(s?parseInt("".concat(s),10):1),height:Math.floor(c)}):null}},{key:"renderClipRect",value:function(n){var a=this.props.layout;return a==="vertical"?this.renderVerticalRect(n):this.renderHorizontalRect(n)}},{key:"renderAreaStatically",value:function(n,a,i,o){var s=this.props,l=s.layout,u=s.type,c=s.stroke,f=s.connectNulls,d=s.isRange;s.ref;var h=kg(s,g8);return T.createElement(xe,{clipPath:i?"url(#clipPath-".concat(o,")"):null},T.createElement(Kr,Hr({},de(h,!0),{points:n,connectNulls:f,type:u,baseLine:a,layout:l,stroke:"none",className:"recharts-area-area"})),c!=="none"&&T.createElement(Kr,Hr({},de(this.props,!1),{className:"recharts-area-curve",layout:l,type:u,connectNulls:f,fill:"none",points:n})),c!=="none"&&d&&T.createElement(Kr,Hr({},de(this.props,!1),{className:"recharts-area-curve",layout:l,type:u,connectNulls:f,fill:"none",points:a})))}},{key:"renderAreaWithAnimation",value:function(n,a){var i=this,o=this.props,s=o.points,l=o.baseLine,u=o.isAnimationActive,c=o.animationBegin,f=o.animationDuration,d=o.animationEasing,h=o.animationId,v=this.state,m=v.prevPoints,p=v.prevBaseLine;return T.createElement(Dt,{begin:c,duration:f,isActive:u,easing:d,from:{t:0},to:{t:1},key:"area-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(x){var O=x.t;if(m){var w=m.length/s.length,A=s.map(function(P,$){var M=Math.floor($*w);if(m[M]){var _=m[M],j=Ue(_.x,P.x),R=Ue(_.y,P.y);return Sr(Sr({},P),{},{x:j(O),y:R(O)})}return P}),y;if(Z(l)&&typeof l=="number"){var b=Ue(p,l);y=b(O)}else if(fe(l)||sn(l)){var S=Ue(p,0);y=S(O)}else y=l.map(function(P,$){var M=Math.floor($*w);if(p[M]){var _=p[M],j=Ue(_.x,P.x),R=Ue(_.y,P.y);return Sr(Sr({},P),{},{x:j(O),y:R(O)})}return P});return i.renderAreaStatically(A,y,n,a)}return T.createElement(xe,null,T.createElement("defs",null,T.createElement("clipPath",{id:"animationClipPath-".concat(a)},i.renderClipRect(O))),T.createElement(xe,{clipPath:"url(#animationClipPath-".concat(a,")")},i.renderAreaStatically(s,l,n,a)))})}},{key:"renderArea",value:function(n,a){var i=this.props,o=i.points,s=i.baseLine,l=i.isAnimationActive,u=this.state,c=u.prevPoints,f=u.prevBaseLine,d=u.totalLength;return l&&o&&o.length&&(!c&&d>0||!Br(c,o)||!Br(f,s))?this.renderAreaWithAnimation(n,a):this.renderAreaStatically(o,s,n,a)}},{key:"render",value:function(){var n,a=this.props,i=a.hide,o=a.dot,s=a.points,l=a.className,u=a.top,c=a.left,f=a.xAxis,d=a.yAxis,h=a.width,v=a.height,m=a.isAnimationActive,p=a.id;if(i||!s||!s.length)return null;var x=this.state.isAnimationFinished,O=s.length===1,w=ye("recharts-area",l),A=f&&f.allowDataOverflow,y=d&&d.allowDataOverflow,b=A||y,S=fe(p)?this.id:p,P=(n=de(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},$=P.r,M=$===void 0?3:$,_=P.strokeWidth,j=_===void 0?2:_,R=ed(o)?o:{},k=R.clipDot,D=k===void 0?!0:k,C=M*2+j;return T.createElement(xe,{className:w},A||y?T.createElement("defs",null,T.createElement("clipPath",{id:"clipPath-".concat(S)},T.createElement("rect",{x:A?c:c-h/2,y:y?u:u-v/2,width:A?h:h*2,height:y?v:v*2})),!D&&T.createElement("clipPath",{id:"clipPath-dots-".concat(S)},T.createElement("rect",{x:c-C/2,y:u-C/2,width:h+C,height:v+C}))):null,O?null:this.renderArea(b,S),(o||O)&&this.renderDots(b,D,S),(!m||x)&&Gt.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,curBaseLine:n.baseLine,prevPoints:a.curPoints,prevBaseLine:a.curBaseLine}:n.points!==a.curPoints||n.baseLine!==a.curBaseLine?{curPoints:n.points,curBaseLine:n.baseLine}:null}}])}(T.PureComponent);Mg=Tr,qt(Tr,"displayName","Area"),qt(Tr,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!vr.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"}),qt(Tr,"getBaseValue",function(e,t,r,n){var a=e.layout,i=e.baseValue,o=t.props.baseValue,s=o??i;if(Z(s)&&typeof s=="number")return s;var l=a==="horizontal"?n:r,u=l.scale.domain();if(l.type==="number"){var c=Math.max(u[0],u[1]),f=Math.min(u[0],u[1]);return s==="dataMin"?f:s==="dataMax"||c<0?c:Math.max(Math.min(u[0],u[1]),0)}return s==="dataMin"?u[0]:s==="dataMax"?u[1]:u[0]}),qt(Tr,"getComposedData",function(e){var t=e.props,r=e.item,n=e.xAxis,a=e.yAxis,i=e.xAxisTicks,o=e.yAxisTicks,s=e.bandSize,l=e.dataKey,u=e.stackedData,c=e.dataStartIndex,f=e.displayedData,d=e.offset,h=t.layout,v=u&&u.length,m=Mg.getBaseValue(t,r,n,a),p=h==="horizontal",x=!1,O=f.map(function(A,y){var b;v?b=u[c+y]:(b=Ze(A,l),Array.isArray(b)?x=!0:b=[m,b]);var S=b[1]==null||v&&Ze(A,l)==null;return p?{x:Cn({axis:n,ticks:i,bandSize:s,entry:A,index:y}),y:S?null:a.scale(b[1]),value:b,payload:A}:{x:S?null:n.scale(b[1]),y:Cn({axis:a,ticks:o,bandSize:s,entry:A,index:y}),value:b,payload:A}}),w;return v||x?w=O.map(function(A){var y=Array.isArray(A.value)?A.value[0]:null;return p?{x:A.x,y:y!=null&&A.y!=null?a.scale(y):null}:{x:y!=null?n.scale(y):null,y:A.y}}):w=p?a.scale(m):n.scale(m),Sr({points:O,baseLine:w,layout:h,isRange:x},d)}),qt(Tr,"renderDotItem",function(e,t){var r;if(T.isValidElement(e))r=T.cloneElement(e,t);else if(he(e))r=e(t);else{var n=ye("recharts-area-dot",typeof e!="boolean"?e.className:""),a=t.key,i=kg(t,b8);r=T.createElement(Ho,Hr({},i,{key:a,className:n}))}return r});function Hn(e){"@babel/helpers - typeof";return Hn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hn(e)}function E8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function j8(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Fg(n.key),n)}}function $8(e,t,r){return t&&j8(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function C8(e,t,r){return t=ms(t),M8(e,Rg()?Reflect.construct(t,r||[],ms(e).constructor):t.apply(e,r))}function M8(e,t){if(t&&(Hn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return k8(e)}function k8(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Rg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Rg=function(){return!!e})()}function ms(e){return ms=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ms(e)}function N8(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Gc(e,t)}function Gc(e,t){return Gc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Gc(e,t)}function Bg(e,t,r){return t=Fg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fg(e){var t=D8(e,"string");return Hn(t)=="symbol"?t:t+""}function D8(e,t){if(Hn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Hn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var gs=function(e){function t(){return E8(this,t),C8(this,t,arguments)}return N8(t,e),$8(t,[{key:"render",value:function(){return null}}])}(xt.Component);Bg(gs,"displayName","ZAxis"),Bg(gs,"defaultProps",{zAxisId:0,range:[64,64],scale:"auto",type:"number"});var I8=["option","isActive"];function pi(){return pi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},pi.apply(this,arguments)}function L8(e,t){if(e==null)return{};var r=R8(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function R8(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function B8(e){var t=e.option,r=e.isActive,n=L8(e,I8);return typeof t=="string"?xt.createElement(bc,pi({option:xt.createElement(Vi,pi({type:t},n)),isActive:r,shapeType:"symbols"},n)):xt.createElement(bc,pi({option:t,isActive:r,shapeType:"symbols"},n))}function Yn(e){"@babel/helpers - typeof";return Yn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yn(e)}function vi(){return vi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},vi.apply(this,arguments)}function Wg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Et(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Wg(Object(r),!0).forEach(function(n){Ar(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function F8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ug(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Kg(n.key),n)}}function W8(e,t,r){return t&&Ug(e.prototype,t),r&&Ug(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function U8(e,t,r){return t=bs(t),z8(e,zg()?Reflect.construct(t,r||[],bs(e).constructor):t.apply(e,r))}function z8(e,t){if(t&&(Yn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return K8(e)}function K8(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(zg=function(){return!!e})()}function bs(e){return bs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},bs(e)}function G8(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vc(e,t)}function Vc(e,t){return Vc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Vc(e,t)}function Ar(e,t,r){return t=Kg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Kg(e){var t=V8(e,"string");return Yn(t)=="symbol"?t:t+""}function V8(e,t){if(Yn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Yn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var xs=function(e){function t(){var r;F8(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=U8(this,t,[].concat(a)),Ar(r,"state",{isAnimationFinished:!1}),Ar(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0})}),Ar(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1})}),Ar(r,"id",$r("recharts-scatter-")),r}return G8(t,e),W8(t,[{key:"renderSymbolsStatically",value:function(n){var a=this,i=this.props,o=i.shape,s=i.activeShape,l=i.activeIndex,u=de(this.props,!1);return n.map(function(c,f){var d=l===f,h=d?s:o,v=Et(Et({},u),c);return T.createElement(xe,vi({className:"recharts-scatter-symbol",key:"symbol-".concat(c==null?void 0:c.cx,"-").concat(c==null?void 0:c.cy,"-").concat(c==null?void 0:c.size,"-").concat(f)},pa(a.props,c,f),{role:"img"}),T.createElement(B8,vi({option:h,isActive:d,key:"symbol-".concat(f)},v)))})}},{key:"renderSymbolsWithAnimation",value:function(){var n=this,a=this.props,i=a.points,o=a.isAnimationActive,s=a.animationBegin,l=a.animationDuration,u=a.animationEasing,c=a.animationId,f=this.state.prevPoints;return T.createElement(Dt,{begin:s,duration:l,isActive:o,easing:u,from:{t:0},to:{t:1},key:"pie-".concat(c),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(d){var h=d.t,v=i.map(function(m,p){var x=f&&f[p];if(x){var O=Ue(x.cx,m.cx),w=Ue(x.cy,m.cy),A=Ue(x.size,m.size);return Et(Et({},m),{},{cx:O(h),cy:w(h),size:A(h)})}var y=Ue(0,m.size);return Et(Et({},m),{},{size:y(h)})});return T.createElement(xe,null,n.renderSymbolsStatically(v))})}},{key:"renderSymbols",value:function(){var n=this.props,a=n.points,i=n.isAnimationActive,o=this.state.prevPoints;return i&&a&&a.length&&(!o||!Br(o,a))?this.renderSymbolsWithAnimation():this.renderSymbolsStatically(a)}},{key:"renderErrorBar",value:function(){var n=this.props.isAnimationActive;if(n&&!this.state.isAnimationFinished)return null;var a=this.props,i=a.points,o=a.xAxis,s=a.yAxis,l=a.children,u=dt(l,jn);return u?u.map(function(c,f){var d=c.props,h=d.direction,v=d.dataKey;return T.cloneElement(c,{key:"".concat(h,"-").concat(v,"-").concat(i[f]),data:i,xAxis:o,yAxis:s,layout:h==="x"?"vertical":"horizontal",dataPointFormatter:function(p,x){return{x:p.cx,y:p.cy,value:h==="x"?+p.node.x:+p.node.y,errorVal:Ze(p,x)}}})}):null}},{key:"renderLine",value:function(){var n=this.props,a=n.points,i=n.line,o=n.lineType,s=n.lineJointType,l=de(this.props,!1),u=de(i,!1),c,f;if(o==="joint")c=a.map(function(w){return{x:w.cx,y:w.cy}});else if(o==="fitting"){var d=mO(a),h=d.xmin,v=d.xmax,m=d.a,p=d.b,x=function(A){return m*A+p};c=[{x:h,y:x(h)},{x:v,y:x(v)}]}var O=Et(Et(Et({},l),{},{fill:"none",stroke:l&&l.fill},u),{},{points:c});return T.isValidElement(i)?f=T.cloneElement(i,O):he(i)?f=i(O):f=T.createElement(Kr,vi({},O,{type:s})),T.createElement(xe,{className:"recharts-scatter-line",key:"recharts-scatter-line"},f)}},{key:"render",value:function(){var n=this.props,a=n.hide,i=n.points,o=n.line,s=n.className,l=n.xAxis,u=n.yAxis,c=n.left,f=n.top,d=n.width,h=n.height,v=n.id,m=n.isAnimationActive;if(a||!i||!i.length)return null;var p=this.state.isAnimationFinished,x=ye("recharts-scatter",s),O=l&&l.allowDataOverflow,w=u&&u.allowDataOverflow,A=O||w,y=fe(v)?this.id:v;return T.createElement(xe,{className:x,clipPath:A?"url(#clipPath-".concat(y,")"):null},O||w?T.createElement("defs",null,T.createElement("clipPath",{id:"clipPath-".concat(y)},T.createElement("rect",{x:O?c:c-d/2,y:w?f:f-h/2,width:O?d:d*2,height:w?h:h*2}))):null,o&&this.renderLine(),this.renderErrorBar(),T.createElement(xe,{key:"recharts-scatter-symbols"},this.renderSymbols()),(!m||p)&&Gt.renderCallByParent(this.props,i))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:a.curPoints}:n.points!==a.curPoints?{curPoints:n.points}:null}}])}(T.PureComponent);Ar(xs,"displayName","Scatter"),Ar(xs,"defaultProps",{xAxisId:0,yAxisId:0,zAxisId:0,legendType:"circle",lineType:"joint",lineJointType:"linear",data:[],shape:"circle",hide:!1,isAnimationActive:!vr.isSsr,animationBegin:0,animationDuration:400,animationEasing:"linear"}),Ar(xs,"getComposedData",function(e){var t=e.xAxis,r=e.yAxis,n=e.zAxis,a=e.item,i=e.displayedData,o=e.xAxisTicks,s=e.yAxisTicks,l=e.offset,u=a.props.tooltipType,c=dt(a.props.children,Hl),f=fe(t.dataKey)?a.props.dataKey:t.dataKey,d=fe(r.dataKey)?a.props.dataKey:r.dataKey,h=n&&n.dataKey,v=n?n.range:gs.defaultProps.range,m=v&&v[0],p=t.scale.bandwidth?t.scale.bandwidth():0,x=r.scale.bandwidth?r.scale.bandwidth():0,O=i.map(function(w,A){var y=Ze(w,f),b=Ze(w,d),S=!fe(h)&&Ze(w,h)||"-",P=[{name:fe(t.dataKey)?a.props.name:t.name||t.dataKey,unit:t.unit||"",value:y,payload:w,dataKey:f,type:u},{name:fe(r.dataKey)?a.props.name:r.name||r.dataKey,unit:r.unit||"",value:b,payload:w,dataKey:d,type:u}];S!=="-"&&P.push({name:n.name||n.dataKey,unit:n.unit||"",value:S,payload:w,dataKey:h,type:u});var $=Cn({axis:t,ticks:o,bandSize:p,entry:w,index:A,dataKey:f}),M=Cn({axis:r,ticks:s,bandSize:x,entry:w,index:A,dataKey:d}),_=S!=="-"?n.scale(S):m,j=Math.sqrt(Math.max(_,0)/Math.PI);return Et(Et({},w),{},{cx:$,cy:M,x:$-j,y:M-j,xAxis:t,yAxis:r,zAxis:n,width:2*j,height:2*j,size:_,node:{x:y,y:b,z:S},tooltipPayload:P,tooltipPosition:{x:$,y:M},payload:w},c&&c[A]&&c[A].props)});return Et({points:O},l)});function Xn(e){"@babel/helpers - typeof";return Xn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xn(e)}function q8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function H8(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,qg(n.key),n)}}function Y8(e,t,r){return t&&H8(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function X8(e,t,r){return t=ws(t),Z8(e,Gg()?Reflect.construct(t,r||[],ws(e).constructor):t.apply(e,r))}function Z8(e,t){if(t&&(Xn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return J8(e)}function J8(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Gg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Gg=function(){return!!e})()}function ws(e){return ws=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ws(e)}function Q8(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qc(e,t)}function qc(e,t){return qc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},qc(e,t)}function Vg(e,t,r){return t=qg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qg(e){var t=eF(e,"string");return Xn(t)=="symbol"?t:t+""}function eF(e,t){if(Xn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Xn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Hc(){return Hc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Hc.apply(this,arguments)}function tF(e){var t=e.xAxisId,r=Ec(),n=jc(),a=rg(t);return a==null?null:xt.createElement(zn,Hc({},a,{className:ye("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(o){return ur(o,!0)}}))}var Os=function(e){function t(){return q8(this,t),X8(this,t,arguments)}return Q8(t,e),Y8(t,[{key:"render",value:function(){return xt.createElement(tF,this.props)}}])}(xt.Component);Vg(Os,"displayName","XAxis"),Vg(Os,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function Zn(e){"@babel/helpers - typeof";return Zn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zn(e)}function rF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nF(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Xg(n.key),n)}}function aF(e,t,r){return t&&nF(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function iF(e,t,r){return t=Ss(t),oF(e,Hg()?Reflect.construct(t,r||[],Ss(e).constructor):t.apply(e,r))}function oF(e,t){if(t&&(Zn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return sF(e)}function sF(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Hg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Hg=function(){return!!e})()}function Ss(e){return Ss=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ss(e)}function lF(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Yc(e,t)}function Yc(e,t){return Yc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Yc(e,t)}function Yg(e,t,r){return t=Xg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Xg(e){var t=uF(e,"string");return Zn(t)=="symbol"?t:t+""}function uF(e,t){if(Zn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Zn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Xc(){return Xc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Xc.apply(this,arguments)}var cF=function(t){var r=t.yAxisId,n=Ec(),a=jc(),i=ng(r);return i==null?null:xt.createElement(zn,Xc({},i,{className:ye("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:a},ticksGenerator:function(s){return ur(s,!0)}}))},Ts=function(e){function t(){return rF(this,t),iF(this,t,arguments)}return lF(t,e),aF(t,[{key:"render",value:function(){return xt.createElement(cF,this.props)}}])}(xt.Component);Yg(Ts,"displayName","YAxis"),Yg(Ts,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function Zg(e){return pF(e)||hF(e)||dF(e)||fF()}function fF(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
203
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dF(e,t){if(e){if(typeof e=="string")return Zc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Zc(e,t)}}function hF(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function pF(e){if(Array.isArray(e))return Zc(e)}function Zc(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Jc=function(t,r,n,a,i){var o=dt(t,kc),s=dt(t,us),l=[].concat(Zg(o),Zg(s)),u=dt(t,ds),c="".concat(a,"Id"),f=a[0],d=r;if(l.length&&(d=l.reduce(function(m,p){if(p.props[c]===n&&Vt(p.props,"extendDomain")&&Z(p.props[f])){var x=p.props[f];return[Math.min(m[0],x),Math.max(m[1],x)]}return m},d)),u.length){var h="".concat(f,"1"),v="".concat(f,"2");d=u.reduce(function(m,p){if(p.props[c]===n&&Vt(p.props,"extendDomain")&&Z(p.props[h])&&Z(p.props[v])){var x=p.props[h],O=p.props[v];return[Math.min(m[0],x,O),Math.max(m[1],x,O)]}return m},d)}return i&&i.length&&(d=i.reduce(function(m,p){return Z(p)?[Math.min(m[0],p),Math.max(m[1],p)]:m},d)),d},Jg={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function a(l,u,c){this.fn=l,this.context=u,this.once=c||!1}function i(l,u,c,f,d){if(typeof c!="function")throw new TypeError("The listener must be a function");var h=new a(c,f||l,d),v=r?r+u:u;return l._events[v]?l._events[v].fn?l._events[v]=[l._events[v],h]:l._events[v].push(h):(l._events[v]=h,l._eventsCount++),l}function o(l,u){--l._eventsCount===0?l._events=new n:delete l._events[u]}function s(){this._events=new n,this._eventsCount=0}s.prototype.eventNames=function(){var u=[],c,f;if(this._eventsCount===0)return u;for(f in c=this._events)t.call(c,f)&&u.push(r?f.slice(1):f);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(c)):u},s.prototype.listeners=function(u){var c=r?r+u:u,f=this._events[c];if(!f)return[];if(f.fn)return[f.fn];for(var d=0,h=f.length,v=new Array(h);d<h;d++)v[d]=f[d].fn;return v},s.prototype.listenerCount=function(u){var c=r?r+u:u,f=this._events[c];return f?f.fn?1:f.length:0},s.prototype.emit=function(u,c,f,d,h,v){var m=r?r+u:u;if(!this._events[m])return!1;var p=this._events[m],x=arguments.length,O,w;if(p.fn){switch(p.once&&this.removeListener(u,p.fn,void 0,!0),x){case 1:return p.fn.call(p.context),!0;case 2:return p.fn.call(p.context,c),!0;case 3:return p.fn.call(p.context,c,f),!0;case 4:return p.fn.call(p.context,c,f,d),!0;case 5:return p.fn.call(p.context,c,f,d,h),!0;case 6:return p.fn.call(p.context,c,f,d,h,v),!0}for(w=1,O=new Array(x-1);w<x;w++)O[w-1]=arguments[w];p.fn.apply(p.context,O)}else{var A=p.length,y;for(w=0;w<A;w++)switch(p[w].once&&this.removeListener(u,p[w].fn,void 0,!0),x){case 1:p[w].fn.call(p[w].context);break;case 2:p[w].fn.call(p[w].context,c);break;case 3:p[w].fn.call(p[w].context,c,f);break;case 4:p[w].fn.call(p[w].context,c,f,d);break;default:if(!O)for(y=1,O=new Array(x-1);y<x;y++)O[y-1]=arguments[y];p[w].fn.apply(p[w].context,O)}}return!0},s.prototype.on=function(u,c,f){return i(this,u,c,f,!1)},s.prototype.once=function(u,c,f){return i(this,u,c,f,!0)},s.prototype.removeListener=function(u,c,f,d){var h=r?r+u:u;if(!this._events[h])return this;if(!c)return o(this,h),this;var v=this._events[h];if(v.fn)v.fn===c&&(!d||v.once)&&(!f||v.context===f)&&o(this,h);else{for(var m=0,p=[],x=v.length;m<x;m++)(v[m].fn!==c||d&&!v[m].once||f&&v[m].context!==f)&&p.push(v[m]);p.length?this._events[h]=p.length===1?p[0]:p:o(this,h)}return this},s.prototype.removeAllListeners=function(u){var c;return u?(c=r?r+u:u,this._events[c]&&o(this,c)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s})(Jg);var vF=Jg.exports;const yF=Ce(vF);var Qc=new yF,ef="recharts.syncMouseEvents";function yi(e){"@babel/helpers - typeof";return yi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yi(e)}function mF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gF(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Qg(n.key),n)}}function bF(e,t,r){return t&&gF(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function tf(e,t,r){return t=Qg(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Qg(e){var t=xF(e,"string");return yi(t)=="symbol"?t:t+""}function xF(e,t){if(yi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(yi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var wF=function(){function e(){mF(this,e),tf(this,"activeIndex",0),tf(this,"coordinateList",[]),tf(this,"layout","horizontal")}return bF(e,[{key:"setDetails",value:function(r){var n,a=r.coordinateList,i=a===void 0?null:a,o=r.container,s=o===void 0?null:o,l=r.layout,u=l===void 0?null:l,c=r.offset,f=c===void 0?null:c,d=r.mouseHandlerCallback,h=d===void 0?null:d;this.coordinateList=(n=i??this.coordinateList)!==null&&n!==void 0?n:[],this.container=s??this.container,this.layout=u??this.layout,this.offset=f??this.offset,this.mouseHandlerCallback=h??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(r){if(this.coordinateList.length!==0)switch(r.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(r){this.activeIndex=r}},{key:"spoofMouse",value:function(){var r,n;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var a=this.container.getBoundingClientRect(),i=a.x,o=a.y,s=a.height,l=this.coordinateList[this.activeIndex].coordinate,u=((r=window)===null||r===void 0?void 0:r.scrollX)||0,c=((n=window)===null||n===void 0?void 0:n.scrollY)||0,f=i+l+u,d=o+this.offset.top+s/2+c;this.mouseHandlerCallback({pageX:f,pageY:d})}}}])}();function OF(e,t,r){if(r==="number"&&t===!0&&Array.isArray(e)){var n=e==null?void 0:e[0],a=e==null?void 0:e[1];if(n&&a&&Z(n)&&Z(a))return!0}return!1}function SF(e,t,r,n){var a=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-a:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-a,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function eb(e){var t=e.cx,r=e.cy,n=e.radius,a=e.startAngle,i=e.endAngle,o=rt(t,r,n,a),s=rt(t,r,n,i);return{points:[o,s],cx:t,cy:r,radius:n,startAngle:a,endAngle:i}}function TF(e,t,r){var n,a,i,o;if(e==="horizontal")n=t.x,i=n,a=r.top,o=r.top+r.height;else if(e==="vertical")a=t.y,o=a,n=r.left,i=r.left+r.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var s=t.cx,l=t.cy,u=t.innerRadius,c=t.outerRadius,f=t.angle,d=rt(s,l,u,f),h=rt(s,l,c,f);n=d.x,a=d.y,i=h.x,o=h.y}else return eb(t);return[{x:n,y:a},{x:i,y:o}]}function mi(e){"@babel/helpers - typeof";return mi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mi(e)}function tb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function As(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tb(Object(r),!0).forEach(function(n){AF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function AF(e,t,r){return t=PF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function PF(e){var t=_F(e,"string");return mi(t)=="symbol"?t:t+""}function _F(e,t){if(mi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(mi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function EF(e){var t,r,n=e.element,a=e.tooltipEventType,i=e.isActive,o=e.activeCoordinate,s=e.activePayload,l=e.offset,u=e.activeTooltipIndex,c=e.tooltipAxisBandSize,f=e.layout,d=e.chartName,h=(t=n.props.cursor)!==null&&t!==void 0?t:(r=n.type.defaultProps)===null||r===void 0?void 0:r.cursor;if(!n||!h||!i||!o||d!=="ScatterChart"&&a!=="axis")return null;var v,m=Kr;if(d==="ScatterChart")v=o,m=QR;else if(d==="BarChart")v=SF(f,o,l,c),m=yc;else if(f==="radial"){var p=eb(o),x=p.cx,O=p.cy,w=p.radius,A=p.startAngle,y=p.endAngle;v={cx:x,cy:O,startAngle:A,endAngle:y,innerRadius:w,outerRadius:w},m=_y}else v={points:TF(f,o,l)},m=Kr;var b=As(As(As(As({stroke:"#ccc",pointerEvents:"none"},l),v),de(h,!1)),{},{payload:s,payloadIndex:u,className:ye("recharts-tooltip-cursor",h.className)});return T.isValidElement(h)?T.cloneElement(h,b):T.createElement(m,b)}var jF=["item"],$F=["children","className","width","height","style","compact","title","desc"];function Jn(e){"@babel/helpers - typeof";return Jn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jn(e)}function Qn(){return Qn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Qn.apply(this,arguments)}function rb(e,t){return kF(e)||MF(e,t)||ib(e,t)||CF()}function CF(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
204
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function MF(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function kF(e){if(Array.isArray(e))return e}function nb(e,t){if(e==null)return{};var r=NF(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function NF(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function DF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function IF(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,sb(n.key),n)}}function LF(e,t,r){return t&&IF(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function RF(e,t,r){return t=Ps(t),BF(e,ab()?Reflect.construct(t,r||[],Ps(e).constructor):t.apply(e,r))}function BF(e,t){if(t&&(Jn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return FF(e)}function FF(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ab(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ab=function(){return!!e})()}function Ps(e){return Ps=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ps(e)}function WF(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rf(e,t)}function rf(e,t){return rf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},rf(e,t)}function ea(e){return KF(e)||zF(e)||ib(e)||UF()}function UF(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
205
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ib(e,t){if(e){if(typeof e=="string")return nf(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return nf(e,t)}}function zF(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function KF(e){if(Array.isArray(e))return nf(e)}function nf(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ob(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function z(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ob(Object(r),!0).forEach(function(n){oe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ob(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function oe(e,t,r){return t=sb(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sb(e){var t=GF(e,"string");return Jn(t)=="symbol"?t:t+""}function GF(e,t){if(Jn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Jn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var VF={xAxis:["bottom","top"],yAxis:["left","right"]},qF={width:"100%",height:"100%"},lb={x:0,y:0};function _s(e){return e}var HF=function(t,r){return r==="horizontal"?t.x:r==="vertical"?t.y:r==="centric"?t.angle:t.radius},YF=function(t,r,n,a){var i=r.find(function(c){return c&&c.index===n});if(i){if(t==="horizontal")return{x:i.coordinate,y:a.y};if(t==="vertical")return{x:a.x,y:i.coordinate};if(t==="centric"){var o=i.coordinate,s=a.radius;return z(z(z({},a),rt(a.cx,a.cy,s,o)),{},{angle:o,radius:s})}var l=i.coordinate,u=a.angle;return z(z(z({},a),rt(a.cx,a.cy,l,u)),{},{angle:u,radius:l})}return lb},Es=function(t,r){var n=r.graphicalItems,a=r.dataStartIndex,i=r.dataEndIndex,o=(n??[]).reduce(function(s,l){var u=l.props.data;return u&&u.length?[].concat(ea(s),ea(u)):s},[]);return o.length>0?o:t&&t.length&&Z(a)&&Z(i)?t.slice(a,i+1):[]};function ub(e){return e==="number"?[0,"auto"]:void 0}var af=function(t,r,n,a){var i=t.graphicalItems,o=t.tooltipAxis,s=Es(r,t);return n<0||!i||!i.length||n>=s.length?null:i.reduce(function(l,u){var c,f=(c=u.props.data)!==null&&c!==void 0?c:r;f&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(f=f.slice(t.dataStartIndex,t.dataEndIndex+1));var d;if(o.dataKey&&!o.allowDuplicatedCategory){var h=f===void 0?s:f;d=Ni(h,o.dataKey,a)}else d=f&&f[n]||s[n];return d?[].concat(ea(l),[vy(u,d)]):l},[])},cb=function(t,r,n,a){var i=a||{x:t.chartX,y:t.chartY},o=HF(i,n),s=t.orderedTooltipTicks,l=t.tooltipAxis,u=t.tooltipTicks,c=$I(o,s,u,l);if(c>=0&&u){var f=u[c]&&u[c].value,d=af(t,r,c,f),h=YF(n,s,c,i);return{activeTooltipIndex:c,activeLabel:f,activePayload:d,activeCoordinate:h}}return null},XF=function(t,r){var n=r.axes,a=r.graphicalItems,i=r.axisType,o=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,c=t.layout,f=t.children,d=t.stackOffset,h=sy(c,i);return n.reduce(function(v,m){var p,x=m.type.defaultProps!==void 0?z(z({},m.type.defaultProps),m.props):m.props,O=x.type,w=x.dataKey,A=x.allowDataOverflow,y=x.allowDuplicatedCategory,b=x.scale,S=x.ticks,P=x.includeHidden,$=x[o];if(v[$])return v;var M=Es(t.data,{graphicalItems:a.filter(function(F){var W,G=o in F.props?F.props[o]:(W=F.type.defaultProps)===null||W===void 0?void 0:W[o];return G===$}),dataStartIndex:l,dataEndIndex:u}),_=M.length,j,R,k;OF(x.domain,A,O)&&(j=qu(x.domain,null,A),h&&(O==="number"||b!=="auto")&&(k=za(M,w,"category")));var D=ub(O);if(!j||j.length===0){var C,B=(C=x.domain)!==null&&C!==void 0?C:D;if(w){if(j=za(M,w,O),O==="category"&&h){var U=yO(j);y&&U?(R=j,j=Qo(0,_)):y||(j=py(B,j,m).reduce(function(F,W){return F.indexOf(W)>=0?F:[].concat(ea(F),[W])},[]))}else if(O==="category")y?j=j.filter(function(F){return F!==""&&!fe(F)}):j=py(B,j,m).reduce(function(F,W){return F.indexOf(W)>=0||W===""||fe(W)?F:[].concat(ea(F),[W])},[]);else if(O==="number"){var K=DI(M,a.filter(function(F){var W,G,X=o in F.props?F.props[o]:(W=F.type.defaultProps)===null||W===void 0?void 0:W[o],Q="hide"in F.props?F.props.hide:(G=F.type.defaultProps)===null||G===void 0?void 0:G.hide;return X===$&&(P||!Q)}),w,i,c);K&&(j=K)}h&&(O==="number"||b!=="auto")&&(k=za(M,w,"category"))}else h?j=Qo(0,_):s&&s[$]&&s[$].hasStack&&O==="number"?j=d==="expand"?[0,1]:fy(s[$].stackGroups,l,u):j=oy(M,a.filter(function(F){var W=o in F.props?F.props[o]:F.type.defaultProps[o],G="hide"in F.props?F.props.hide:F.type.defaultProps.hide;return W===$&&(P||!G)}),O,c,!0);if(O==="number")j=Jc(f,j,$,i,S),B&&(j=qu(B,j,A));else if(O==="category"&&B){var E=B,L=j.every(function(F){return E.indexOf(F)>=0});L&&(j=E)}}return z(z({},v),{},oe({},$,z(z({},x),{},{axisType:i,domain:j,categoricalDomain:k,duplicateDomain:R,originalDomain:(p=x.domain)!==null&&p!==void 0?p:D,isCategorical:h,layout:c})))},{})},ZF=function(t,r){var n=r.graphicalItems,a=r.Axis,i=r.axisType,o=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,c=t.layout,f=t.children,d=Es(t.data,{graphicalItems:n,dataStartIndex:l,dataEndIndex:u}),h=d.length,v=sy(c,i),m=-1;return n.reduce(function(p,x){var O=x.type.defaultProps!==void 0?z(z({},x.type.defaultProps),x.props):x.props,w=O[o],A=ub("number");if(!p[w]){m++;var y;return v?y=Qo(0,h):s&&s[w]&&s[w].hasStack?(y=fy(s[w].stackGroups,l,u),y=Jc(f,y,w,i)):(y=qu(A,oy(d,n.filter(function(b){var S,P,$=o in b.props?b.props[o]:(S=b.type.defaultProps)===null||S===void 0?void 0:S[o],M="hide"in b.props?b.props.hide:(P=b.type.defaultProps)===null||P===void 0?void 0:P.hide;return $===w&&!M}),"number",c),a.defaultProps.allowDataOverflow),y=Jc(f,y,w,i)),z(z({},p),{},oe({},w,z(z({axisType:i},a.defaultProps),{},{hide:!0,orientation:wt(VF,"".concat(i,".").concat(m%2),null),domain:y,originalDomain:A,isCategorical:v,layout:c})))}return p},{})},JF=function(t,r){var n=r.axisType,a=n===void 0?"xAxis":n,i=r.AxisComp,o=r.graphicalItems,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,c=t.children,f="".concat(a,"Id"),d=dt(c,i),h={};return d&&d.length?h=XF(t,{axes:d,graphicalItems:o,axisType:a,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:u}):o&&o.length&&(h=ZF(t,{Axis:i,graphicalItems:o,axisType:a,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:u})),h},QF=function(t){var r=hr(t),n=ur(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:Fl(n,function(a){return a.coordinate}),tooltipAxis:r,tooltipAxisBandSize:Io(r,n)}},fb=function(t){var r=t.children,n=t.defaultShowTooltip,a=yt(r,Nn),i=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),a&&a.props&&(a.props.startIndex>=0&&(i=a.props.startIndex),a.props.endIndex>=0&&(o=a.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!n}},eW=function(t){return!t||!t.length?!1:t.some(function(r){var n=Qt(r&&r.type);return n&&n.indexOf("Bar")>=0})},db=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},tW=function(t,r){var n=t.props,a=t.graphicalItems,i=t.xAxisMap,o=i===void 0?{}:i,s=t.yAxisMap,l=s===void 0?{}:s,u=n.width,c=n.height,f=n.children,d=n.margin||{},h=yt(f,Nn),v=yt(f,vn),m=Object.keys(l).reduce(function(y,b){var S=l[b],P=S.orientation;return!S.mirror&&!S.hide?z(z({},y),{},oe({},P,y[P]+S.width)):y},{left:d.left||0,right:d.right||0}),p=Object.keys(o).reduce(function(y,b){var S=o[b],P=S.orientation;return!S.mirror&&!S.hide?z(z({},y),{},oe({},P,wt(y,"".concat(P))+S.height)):y},{top:d.top||0,bottom:d.bottom||0}),x=z(z({},p),m),O=x.bottom;h&&(x.bottom+=h.props.height||Nn.defaultProps.height),v&&r&&(x=kI(x,a,n,r));var w=u-x.left-x.right,A=c-x.top-x.bottom;return z(z({brushBottom:O},x),{},{width:Math.max(w,0),height:Math.max(A,0)})},rW=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},nW=function(t){var r=t.chartName,n=t.GraphicalChild,a=t.defaultTooltipEventType,i=a===void 0?"axis":a,o=t.validateTooltipEventTypes,s=o===void 0?["axis"]:o,l=t.axisComponents,u=t.legendContent,c=t.formatAxisMap,f=t.defaultProps,d=function(x,O){var w=O.graphicalItems,A=O.stackGroups,y=O.offset,b=O.updateId,S=O.dataStartIndex,P=O.dataEndIndex,$=x.barSize,M=x.layout,_=x.barGap,j=x.barCategoryGap,R=x.maxBarSize,k=db(M),D=k.numericAxisName,C=k.cateAxisName,B=eW(w),U=[];return w.forEach(function(K,E){var L=Es(x.data,{graphicalItems:[K],dataStartIndex:S,dataEndIndex:P}),F=K.type.defaultProps!==void 0?z(z({},K.type.defaultProps),K.props):K.props,W=F.dataKey,G=F.maxBarSize,X=F["".concat(D,"Id")],Q=F["".concat(C,"Id")],ae={},te=l.reduce(function(Ke,lt){var Ti,Ai,aa=O["".concat(lt.axisType,"Map")],Pi=F["".concat(lt.axisType,"Id")];aa&&aa[Pi]||lt.axisType==="zAxis"||(process.env.NODE_ENV!=="production"?pt(!1,"Specifying a(n) ".concat(lt.axisType,"Id requires a corresponding ").concat(lt.axisType,"Id on the targeted graphical component ").concat((Ti=K==null||(Ai=K.type)===null||Ai===void 0?void 0:Ai.displayName)!==null&&Ti!==void 0?Ti:"")):pt());var _i=aa[Pi];return z(z({},Ke),{},oe(oe({},lt.axisType,_i),"".concat(lt.axisType,"Ticks"),ur(_i)))},ae),V=te[C],Y=te["".concat(C,"Ticks")],J=A&&A[X]&&A[X].hasStack&&qI(K,A[X].stackGroups),I=Qt(K.type).indexOf("Bar")>=0,ie=Io(V,Y),q=[],se=B&&CI({barSize:$,stackGroups:A,totalSize:rW(te,C)});if(I){var ee,ve,We=fe(G)?R:G,Re=(ee=(ve=Io(V,Y,!0))!==null&&ve!==void 0?ve:We)!==null&&ee!==void 0?ee:0;q=MI({barGap:_,barCategoryGap:j,bandSize:Re!==ie?Re:ie,sizeList:se[Q],maxBarSize:We}),Re!==ie&&(q=q.map(function(Ke){return z(z({},Ke),{},{position:z(z({},Ke.position),{},{offset:Ke.position.offset-Re/2})})}))}var Be=K&&K.type&&K.type.getComposedData;Be&&U.push({props:z(z({},Be(z(z({},te),{},{displayedData:L,props:x,dataKey:W,item:K,bandSize:ie,barPosition:q,offset:y,stackedData:J,layout:M,dataStartIndex:S,dataEndIndex:P}))),{},oe(oe(oe({key:K.key||"item-".concat(E)},D,te[D]),C,te[C]),"animationId",b)),childIndex:jO(K,x.children),item:K})}),U},h=function(x,O){var w=x.props,A=x.dataStartIndex,y=x.dataEndIndex,b=x.updateId;if(!Qf({props:w}))return null;var S=w.children,P=w.layout,$=w.stackOffset,M=w.data,_=w.reverseStackOrder,j=db(P),R=j.numericAxisName,k=j.cateAxisName,D=dt(S,n),C=KI(M,D,"".concat(R,"Id"),"".concat(k,"Id"),$,_),B=l.reduce(function(F,W){var G="".concat(W.axisType,"Map");return z(z({},F),{},oe({},G,JF(w,z(z({},W),{},{graphicalItems:D,stackGroups:W.axisType===R&&C,dataStartIndex:A,dataEndIndex:y}))))},{}),U=tW(z(z({},B),{},{props:w,graphicalItems:D}),O==null?void 0:O.legendBBox);Object.keys(B).forEach(function(F){B[F]=c(w,B[F],U,F.replace("Map",""),r)});var K=B["".concat(k,"Map")],E=QF(K),L=d(w,z(z({},B),{},{dataStartIndex:A,dataEndIndex:y,updateId:b,graphicalItems:D,stackGroups:C,offset:U}));return z(z({formattedGraphicalItems:L,graphicalItems:D,offset:U,stackGroups:C},E),B)},v=function(p){function x(O){var w,A,y;return DF(this,x),y=RF(this,x,[O]),oe(y,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),oe(y,"accessibilityManager",new wF),oe(y,"handleLegendBBoxUpdate",function(b){if(b){var S=y.state,P=S.dataStartIndex,$=S.dataEndIndex,M=S.updateId;y.setState(z({legendBBox:b},h({props:y.props,dataStartIndex:P,dataEndIndex:$,updateId:M},z(z({},y.state),{},{legendBBox:b}))))}}),oe(y,"handleReceiveSyncEvent",function(b,S,P){if(y.props.syncId===b){if(P===y.eventEmitterSymbol&&typeof y.props.syncMethod!="function")return;y.applySyncEvent(S)}}),oe(y,"handleBrushChange",function(b){var S=b.startIndex,P=b.endIndex;if(S!==y.state.dataStartIndex||P!==y.state.dataEndIndex){var $=y.state.updateId;y.setState(function(){return z({dataStartIndex:S,dataEndIndex:P},h({props:y.props,dataStartIndex:S,dataEndIndex:P,updateId:$},y.state))}),y.triggerSyncEvent({dataStartIndex:S,dataEndIndex:P})}}),oe(y,"handleMouseEnter",function(b){var S=y.getMouseInfo(b);if(S){var P=z(z({},S),{},{isTooltipActive:!0});y.setState(P),y.triggerSyncEvent(P);var $=y.props.onMouseEnter;he($)&&$(P,b)}}),oe(y,"triggeredAfterMouseMove",function(b){var S=y.getMouseInfo(b),P=S?z(z({},S),{},{isTooltipActive:!0}):{isTooltipActive:!1};y.setState(P),y.triggerSyncEvent(P);var $=y.props.onMouseMove;he($)&&$(P,b)}),oe(y,"handleItemMouseEnter",function(b){y.setState(function(){return{isTooltipActive:!0,activeItem:b,activePayload:b.tooltipPayload,activeCoordinate:b.tooltipPosition||{x:b.cx,y:b.cy}}})}),oe(y,"handleItemMouseLeave",function(){y.setState(function(){return{isTooltipActive:!1}})}),oe(y,"handleMouseMove",function(b){b.persist(),y.throttleTriggeredAfterMouseMove(b)}),oe(y,"handleMouseLeave",function(b){y.throttleTriggeredAfterMouseMove.cancel();var S={isTooltipActive:!1};y.setState(S),y.triggerSyncEvent(S);var P=y.props.onMouseLeave;he(P)&&P(S,b)}),oe(y,"handleOuterEvent",function(b){var S=EO(b),P=wt(y.props,"".concat(S));if(S&&he(P)){var $,M;/.*touch.*/i.test(S)?M=y.getMouseInfo(b.changedTouches[0]):M=y.getMouseInfo(b),P(($=M)!==null&&$!==void 0?$:{},b)}}),oe(y,"handleClick",function(b){var S=y.getMouseInfo(b);if(S){var P=z(z({},S),{},{isTooltipActive:!0});y.setState(P),y.triggerSyncEvent(P);var $=y.props.onClick;he($)&&$(P,b)}}),oe(y,"handleMouseDown",function(b){var S=y.props.onMouseDown;if(he(S)){var P=y.getMouseInfo(b);S(P,b)}}),oe(y,"handleMouseUp",function(b){var S=y.props.onMouseUp;if(he(S)){var P=y.getMouseInfo(b);S(P,b)}}),oe(y,"handleTouchMove",function(b){b.changedTouches!=null&&b.changedTouches.length>0&&y.throttleTriggeredAfterMouseMove(b.changedTouches[0])}),oe(y,"handleTouchStart",function(b){b.changedTouches!=null&&b.changedTouches.length>0&&y.handleMouseDown(b.changedTouches[0])}),oe(y,"handleTouchEnd",function(b){b.changedTouches!=null&&b.changedTouches.length>0&&y.handleMouseUp(b.changedTouches[0])}),oe(y,"handleDoubleClick",function(b){var S=y.props.onDoubleClick;if(he(S)){var P=y.getMouseInfo(b);S(P,b)}}),oe(y,"handleContextMenu",function(b){var S=y.props.onContextMenu;if(he(S)){var P=y.getMouseInfo(b);S(P,b)}}),oe(y,"triggerSyncEvent",function(b){y.props.syncId!==void 0&&Qc.emit(ef,y.props.syncId,b,y.eventEmitterSymbol)}),oe(y,"applySyncEvent",function(b){var S=y.props,P=S.layout,$=S.syncMethod,M=y.state.updateId,_=b.dataStartIndex,j=b.dataEndIndex;if(b.dataStartIndex!==void 0||b.dataEndIndex!==void 0)y.setState(z({dataStartIndex:_,dataEndIndex:j},h({props:y.props,dataStartIndex:_,dataEndIndex:j,updateId:M},y.state)));else if(b.activeTooltipIndex!==void 0){var R=b.chartX,k=b.chartY,D=b.activeTooltipIndex,C=y.state,B=C.offset,U=C.tooltipTicks;if(!B)return;if(typeof $=="function")D=$(U,b);else if($==="value"){D=-1;for(var K=0;K<U.length;K++)if(U[K].value===b.activeLabel){D=K;break}}var E=z(z({},B),{},{x:B.left,y:B.top}),L=Math.min(R,E.x+E.width),F=Math.min(k,E.y+E.height),W=U[D]&&U[D].value,G=af(y.state,y.props.data,D),X=U[D]?{x:P==="horizontal"?U[D].coordinate:L,y:P==="horizontal"?F:U[D].coordinate}:lb;y.setState(z(z({},b),{},{activeLabel:W,activeCoordinate:X,activePayload:G,activeTooltipIndex:D}))}else y.setState(b)}),oe(y,"renderCursor",function(b){var S,P=y.state,$=P.isTooltipActive,M=P.activeCoordinate,_=P.activePayload,j=P.offset,R=P.activeTooltipIndex,k=P.tooltipAxisBandSize,D=y.getTooltipEventType(),C=(S=b.props.active)!==null&&S!==void 0?S:$,B=y.props.layout,U=b.key||"_recharts-cursor";return T.createElement(EF,{key:U,activeCoordinate:M,activePayload:_,activeTooltipIndex:R,chartName:r,element:b,isActive:C,layout:B,offset:j,tooltipAxisBandSize:k,tooltipEventType:D})}),oe(y,"renderPolarAxis",function(b,S,P){var $=wt(b,"type.axisType"),M=wt(y.state,"".concat($,"Map")),_=b.type.defaultProps,j=_!==void 0?z(z({},_),b.props):b.props,R=M&&M[j["".concat($,"Id")]];return T.cloneElement(b,z(z({},R),{},{className:ye($,R.className),key:b.key||"".concat(S,"-").concat(P),ticks:ur(R,!0)}))}),oe(y,"renderPolarGrid",function(b){var S=b.props,P=S.radialLines,$=S.polarAngles,M=S.polarRadius,_=y.state,j=_.radiusAxisMap,R=_.angleAxisMap,k=hr(j),D=hr(R),C=D.cx,B=D.cy,U=D.innerRadius,K=D.outerRadius;return T.cloneElement(b,{polarAngles:Array.isArray($)?$:ur(D,!0).map(function(E){return E.coordinate}),polarRadius:Array.isArray(M)?M:ur(k,!0).map(function(E){return E.coordinate}),cx:C,cy:B,innerRadius:U,outerRadius:K,key:b.key||"polar-grid",radialLines:P})}),oe(y,"renderLegend",function(){var b=y.state.formattedGraphicalItems,S=y.props,P=S.children,$=S.width,M=S.height,_=y.props.margin||{},j=$-(_.left||0)-(_.right||0),R=ry({children:P,formattedGraphicalItems:b,legendWidth:j,legendContent:u});if(!R)return null;var k=R.item,D=nb(R,jF);return T.cloneElement(k,z(z({},D),{},{chartWidth:$,chartHeight:M,margin:_,onBBoxUpdate:y.handleLegendBBoxUpdate}))}),oe(y,"renderTooltip",function(){var b,S=y.props,P=S.children,$=S.accessibilityLayer,M=yt(P,Wt);if(!M)return null;var _=y.state,j=_.isTooltipActive,R=_.activeCoordinate,k=_.activePayload,D=_.activeLabel,C=_.offset,B=(b=M.props.active)!==null&&b!==void 0?b:j;return T.cloneElement(M,{viewBox:z(z({},C),{},{x:C.left,y:C.top}),active:B,label:D,payload:B?k:[],coordinate:R,accessibilityLayer:$})}),oe(y,"renderBrush",function(b){var S=y.props,P=S.margin,$=S.data,M=y.state,_=M.offset,j=M.dataStartIndex,R=M.dataEndIndex,k=M.updateId;return T.cloneElement(b,{key:b.key||"_recharts-brush",onChange:Do(y.handleBrushChange,b.props.onChange),data:$,x:Z(b.props.x)?b.props.x:_.left,y:Z(b.props.y)?b.props.y:_.top+_.height+_.brushBottom-(P.bottom||0),width:Z(b.props.width)?b.props.width:_.width,startIndex:j,endIndex:R,updateId:"brush-".concat(k)})}),oe(y,"renderReferenceElement",function(b,S,P){if(!b)return null;var $=y,M=$.clipPathId,_=y.state,j=_.xAxisMap,R=_.yAxisMap,k=_.offset,D=b.type.defaultProps||{},C=b.props,B=C.xAxisId,U=B===void 0?D.xAxisId:B,K=C.yAxisId,E=K===void 0?D.yAxisId:K;return T.cloneElement(b,{key:b.key||"".concat(S,"-").concat(P),xAxis:j[U],yAxis:R[E],viewBox:{x:k.left,y:k.top,width:k.width,height:k.height},clipPathId:M})}),oe(y,"renderActivePoints",function(b){var S=b.item,P=b.activePoint,$=b.basePoint,M=b.childIndex,_=b.isRange,j=[],R=S.props.key,k=S.item.type.defaultProps!==void 0?z(z({},S.item.type.defaultProps),S.item.props):S.item.props,D=k.activeDot,C=k.dataKey,B=z(z({index:M,dataKey:C,cx:P.x,cy:P.y,r:4,fill:Gu(S.item),strokeWidth:2,stroke:"#fff",payload:P.payload,value:P.value},de(D,!1)),Di(D));return j.push(x.renderActiveDot(D,B,"".concat(R,"-activePoint-").concat(M))),$?j.push(x.renderActiveDot(D,z(z({},B),{},{cx:$.x,cy:$.y}),"".concat(R,"-basePoint-").concat(M))):_&&j.push(null),j}),oe(y,"renderGraphicChild",function(b,S,P){var $=y.filterFormatItem(b,S,P);if(!$)return null;var M=y.getTooltipEventType(),_=y.state,j=_.isTooltipActive,R=_.tooltipAxis,k=_.activeTooltipIndex,D=_.activeLabel,C=y.props.children,B=yt(C,Wt),U=$.props,K=U.points,E=U.isRange,L=U.baseLine,F=$.item.type.defaultProps!==void 0?z(z({},$.item.type.defaultProps),$.item.props):$.item.props,W=F.activeDot,G=F.hide,X=F.activeBar,Q=F.activeShape,ae=!!(!G&&j&&B&&(W||X||Q)),te={};M!=="axis"&&B&&B.props.trigger==="click"?te={onClick:Do(y.handleItemMouseEnter,b.props.onClick)}:M!=="axis"&&(te={onMouseLeave:Do(y.handleItemMouseLeave,b.props.onMouseLeave),onMouseEnter:Do(y.handleItemMouseEnter,b.props.onMouseEnter)});var V=T.cloneElement(b,z(z({},$.props),te));function Y(lt){return typeof R.dataKey=="function"?R.dataKey(lt.payload):null}if(ae)if(k>=0){var J,I;if(R.dataKey&&!R.allowDuplicatedCategory){var ie=typeof R.dataKey=="function"?Y:"payload.".concat(R.dataKey.toString());J=Ni(K,ie,D),I=E&&L&&Ni(L,ie,D)}else J=K==null?void 0:K[k],I=E&&L&&L[k];if(Q||X){var q=b.props.activeIndex!==void 0?b.props.activeIndex:k;return[T.cloneElement(b,z(z(z({},$.props),te),{},{activeIndex:q})),null,null]}if(!fe(J))return[V].concat(ea(y.renderActivePoints({item:$,activePoint:J,basePoint:I,childIndex:k,isRange:E})))}else{var se,ee=(se=y.getItemByXY(y.state.activeCoordinate))!==null&&se!==void 0?se:{graphicalItem:V},ve=ee.graphicalItem,We=ve.item,Re=We===void 0?b:We,Be=ve.childIndex,Ke=z(z(z({},$.props),te),{},{activeIndex:Be});return[T.cloneElement(Re,Ke),null,null]}return E?[V,null,null]:[V,null]}),oe(y,"renderCustomized",function(b,S,P){return T.cloneElement(b,z(z({key:"recharts-customized-".concat(P)},y.props),y.state))}),oe(y,"renderMap",{CartesianGrid:{handler:_s,once:!0},ReferenceArea:{handler:y.renderReferenceElement},ReferenceLine:{handler:_s},ReferenceDot:{handler:y.renderReferenceElement},XAxis:{handler:_s},YAxis:{handler:_s},Brush:{handler:y.renderBrush,once:!0},Bar:{handler:y.renderGraphicChild},Line:{handler:y.renderGraphicChild},Area:{handler:y.renderGraphicChild},Radar:{handler:y.renderGraphicChild},RadialBar:{handler:y.renderGraphicChild},Scatter:{handler:y.renderGraphicChild},Pie:{handler:y.renderGraphicChild},Funnel:{handler:y.renderGraphicChild},Tooltip:{handler:y.renderCursor,once:!0},PolarGrid:{handler:y.renderPolarGrid,once:!0},PolarAngleAxis:{handler:y.renderPolarAxis},PolarRadiusAxis:{handler:y.renderPolarAxis},Customized:{handler:y.renderCustomized}}),y.clipPathId="".concat((w=O.id)!==null&&w!==void 0?w:$r("recharts"),"-clip"),y.throttleTriggeredAfterMouseMove=Qh(y.triggeredAfterMouseMove,(A=O.throttleDelay)!==null&&A!==void 0?A:1e3/60),y.state={},y}return WF(x,p),LF(x,[{key:"componentDidMount",value:function(){var w,A;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(w=this.props.margin.left)!==null&&w!==void 0?w:0,top:(A=this.props.margin.top)!==null&&A!==void 0?A:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var w=this.props,A=w.children,y=w.data,b=w.height,S=w.layout,P=yt(A,Wt);if(P){var $=P.props.defaultIndex;if(!(typeof $!="number"||$<0||$>this.state.tooltipTicks.length-1)){var M=this.state.tooltipTicks[$]&&this.state.tooltipTicks[$].value,_=af(this.state,y,$,M),j=this.state.tooltipTicks[$].coordinate,R=(this.state.offset.top+b)/2,k=S==="horizontal",D=k?{x:j,y:R}:{y:j,x:R},C=this.state.formattedGraphicalItems.find(function(U){var K=U.item;return K.type.name==="Scatter"});C&&(D=z(z({},D),C.props.points[$].tooltipPosition),_=C.props.points[$].tooltipPayload);var B={activeTooltipIndex:$,isTooltipActive:!0,activeLabel:M,activePayload:_,activeCoordinate:D};this.setState(B),this.renderCursor(P),this.accessibilityManager.setIndex($)}}}},{key:"getSnapshotBeforeUpdate",value:function(w,A){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==A.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==w.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==w.margin){var y,b;this.accessibilityManager.setDetails({offset:{left:(y=this.props.margin.left)!==null&&y!==void 0?y:0,top:(b=this.props.margin.top)!==null&&b!==void 0?b:0}})}return null}},{key:"componentDidUpdate",value:function(w){il([yt(w.children,Wt)],[yt(this.props.children,Wt)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var w=yt(this.props.children,Wt);if(w&&typeof w.props.shared=="boolean"){var A=w.props.shared?"axis":"item";return s.indexOf(A)>=0?A:i}return i}},{key:"getMouseInfo",value:function(w){if(!this.container)return null;var A=this.container,y=A.getBoundingClientRect(),b=nM(y),S={chartX:Math.round(w.pageX-b.left),chartY:Math.round(w.pageY-b.top)},P=y.width/A.offsetWidth||1,$=this.inRange(S.chartX,S.chartY,P);if(!$)return null;var M=this.state,_=M.xAxisMap,j=M.yAxisMap,R=this.getTooltipEventType(),k=cb(this.state,this.props.data,this.props.layout,$);if(R!=="axis"&&_&&j){var D=hr(_).scale,C=hr(j).scale,B=D&&D.invert?D.invert(S.chartX):null,U=C&&C.invert?C.invert(S.chartY):null;return z(z({},S),{},{xValue:B,yValue:U},k)}return k?z(z({},S),k):null}},{key:"inRange",value:function(w,A){var y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,b=this.props.layout,S=w/y,P=A/y;if(b==="horizontal"||b==="vertical"){var $=this.state.offset,M=S>=$.left&&S<=$.left+$.width&&P>=$.top&&P<=$.top+$.height;return M?{x:S,y:P}:null}var _=this.state,j=_.angleAxisMap,R=_.radiusAxisMap;if(j&&R){var k=hr(j);return gy({x:S,y:P},k)}return null}},{key:"parseEventsOfWrapper",value:function(){var w=this.props.children,A=this.getTooltipEventType(),y=yt(w,Wt),b={};y&&A==="axis"&&(y.props.trigger==="click"?b={onClick:this.handleClick}:b={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var S=Di(this.props,this.handleOuterEvent);return z(z({},S),b)}},{key:"addListener",value:function(){Qc.on(ef,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){Qc.removeListener(ef,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(w,A,y){for(var b=this.state.formattedGraphicalItems,S=0,P=b.length;S<P;S++){var $=b[S];if($.item===w||$.props.key===w.key||A===Qt($.item.type)&&y===$.childIndex)return $}return null}},{key:"renderClipPath",value:function(){var w=this.clipPathId,A=this.state.offset,y=A.left,b=A.top,S=A.height,P=A.width;return T.createElement("defs",null,T.createElement("clipPath",{id:w},T.createElement("rect",{x:y,y:b,height:S,width:P})))}},{key:"getXScales",value:function(){var w=this.state.xAxisMap;return w?Object.entries(w).reduce(function(A,y){var b=rb(y,2),S=b[0],P=b[1];return z(z({},A),{},oe({},S,P.scale))},{}):null}},{key:"getYScales",value:function(){var w=this.state.yAxisMap;return w?Object.entries(w).reduce(function(A,y){var b=rb(y,2),S=b[0],P=b[1];return z(z({},A),{},oe({},S,P.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(w){var A;return(A=this.state.xAxisMap)===null||A===void 0||(A=A[w])===null||A===void 0?void 0:A.scale}},{key:"getYScaleByAxisId",value:function(w){var A;return(A=this.state.yAxisMap)===null||A===void 0||(A=A[w])===null||A===void 0?void 0:A.scale}},{key:"getItemByXY",value:function(w){var A=this.state,y=A.formattedGraphicalItems,b=A.activeItem;if(y&&y.length)for(var S=0,P=y.length;S<P;S++){var $=y[S],M=$.props,_=$.item,j=_.type.defaultProps!==void 0?z(z({},_.type.defaultProps),_.props):_.props,R=Qt(_.type);if(R==="Bar"){var k=(M.data||[]).find(function(U){return zR(w,U)});if(k)return{graphicalItem:$,payload:k}}else if(R==="RadialBar"){var D=(M.data||[]).find(function(U){return gy(w,U)});if(D)return{graphicalItem:$,payload:D}}else if(Zo($,b)||Jo($,b)||si($,b)){var C=G5({graphicalItem:$,activeTooltipItem:b,itemData:j.data}),B=j.activeIndex===void 0?C:j.activeIndex;return{graphicalItem:z(z({},$),{},{childIndex:B}),payload:si($,b)?j.data[C]:$.props.data[C]}}}return null}},{key:"render",value:function(){var w=this;if(!Qf(this))return null;var A=this.props,y=A.children,b=A.className,S=A.width,P=A.height,$=A.style,M=A.compact,_=A.title,j=A.desc,R=nb(A,$F),k=de(R,!1);if(M)return T.createElement(eg,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},T.createElement(sl,Qn({},k,{width:S,height:P,title:_,desc:j}),this.renderClipPath(),rd(y,this.renderMap)));if(this.props.accessibilityLayer){var D,C;k.tabIndex=(D=this.props.tabIndex)!==null&&D!==void 0?D:0,k.role=(C=this.props.role)!==null&&C!==void 0?C:"application",k.onKeyDown=function(U){w.accessibilityManager.keyboardEvent(U)},k.onFocus=function(){w.accessibilityManager.focus()}}var B=this.parseEventsOfWrapper();return T.createElement(eg,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},T.createElement("div",Qn({className:ye("recharts-wrapper",b),style:z({position:"relative",cursor:"default",width:S,height:P},$)},B,{ref:function(K){w.container=K}}),T.createElement(sl,Qn({},k,{width:S,height:P,title:_,desc:j,style:qF}),this.renderClipPath(),rd(y,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(T.Component);oe(v,"displayName",r),oe(v,"defaultProps",z({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},f)),oe(v,"getDerivedStateFromProps",function(p,x){var O=p.dataKey,w=p.data,A=p.children,y=p.width,b=p.height,S=p.layout,P=p.stackOffset,$=p.margin,M=x.dataStartIndex,_=x.dataEndIndex;if(x.updateId===void 0){var j=fb(p);return z(z(z({},j),{},{updateId:0},h(z(z({props:p},j),{},{updateId:0}),x)),{},{prevDataKey:O,prevData:w,prevWidth:y,prevHeight:b,prevLayout:S,prevStackOffset:P,prevMargin:$,prevChildren:A})}if(O!==x.prevDataKey||w!==x.prevData||y!==x.prevWidth||b!==x.prevHeight||S!==x.prevLayout||P!==x.prevStackOffset||!ln($,x.prevMargin)){var R=fb(p),k={chartX:x.chartX,chartY:x.chartY,isTooltipActive:x.isTooltipActive},D=z(z({},cb(x,w,S)),{},{updateId:x.updateId+1}),C=z(z(z({},R),k),D);return z(z(z({},C),h(z({props:p},C),x)),{},{prevDataKey:O,prevData:w,prevWidth:y,prevHeight:b,prevLayout:S,prevStackOffset:P,prevMargin:$,prevChildren:A})}if(!il(A,x.prevChildren)){var B,U,K,E,L=yt(A,Nn),F=L&&(B=(U=L.props)===null||U===void 0?void 0:U.startIndex)!==null&&B!==void 0?B:M,W=L&&(K=(E=L.props)===null||E===void 0?void 0:E.endIndex)!==null&&K!==void 0?K:_,G=F!==M||W!==_,X=!fe(w),Q=X&&!G?x.updateId:x.updateId+1;return z(z({updateId:Q},h(z(z({props:p},x),{},{updateId:Q,dataStartIndex:F,dataEndIndex:W}),x)),{},{prevChildren:A,dataStartIndex:F,dataEndIndex:W})}return null}),oe(v,"renderActiveDot",function(p,x,O){var w;return T.isValidElement(p)?w=T.cloneElement(p,x):he(p)?w=p(x):w=T.createElement(Ho,x),T.createElement(xe,{className:"recharts-active-dot",key:O},w)});var m=T.forwardRef(function(x,O){return T.createElement(v,Qn({},x,{ref:O}))});return m.displayName=v.displayName,m},aW=nW({chartName:"ComposedChart",GraphicalChild:[hi,Tr,Ln,xs],axisComponents:[{axisType:"xAxis",AxisComp:Os},{axisType:"yAxis",AxisComp:Ts},{axisType:"zAxis",AxisComp:gs}],formatAxisMap:y4});const ta=({className:e,width:t,height:r,rounded:n=!1})=>g.jsx("div",{className:ue("animate-pulse bg-gray-200",n?"rounded-full":"rounded",e),style:{width:typeof t=="number"?`${t}px`:t,height:typeof r=="number"?`${r}px`:r}}),gi=({className:e})=>g.jsxs("div",{className:ue("rounded-lg border border-gray-200 bg-white p-4",e),children:[g.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[g.jsx(ta,{className:"h-4 w-16"}),g.jsx(ta,{className:"h-4 w-4",rounded:!0})]}),g.jsxs("div",{className:"flex items-baseline gap-3",children:[g.jsx(ta,{className:"h-8 w-20"}),g.jsx(ta,{className:"h-6 w-12 rounded-md"})]})]}),hb=({className:e,chartType:t="line",height:r=300})=>{const n=o=>{if(o.length===0)return"";let s=`M ${o[0].x} ${o[0].y}`;for(let l=1;l<o.length;l++){const u=o[l-1],c=o[l],f=u.x+(c.x-u.x)*.4,d=u.y,h=u.x+(c.x-u.x)*.6,v=c.y;s+=` C ${f} ${d} ${h} ${v} ${c.x} ${c.y}`}return s},a=(o=7)=>Array.from({length:o},(c,f)=>({x:f/(o-1)*100,y:80-Math.random()*60})),i=()=>{switch(t){case"bar":return g.jsx("div",{className:"absolute inset-0 flex items-end justify-between px-4 pb-4",children:[...Array(7)].map((p,x)=>g.jsx(ta,{className:"w-8 bg-blue-100",height:`${Math.random()*60+20}%`},x))});case"line":const o=a(12),s=n(o),l=o[o.length-1],u=o[0],c=`${s} L ${l.x} 100 L ${u.x} 100 Z`;return g.jsx("div",{className:"absolute inset-0 p-4",children:g.jsxs("svg",{className:"w-full h-full",viewBox:"0 0 100 100",preserveAspectRatio:"none",children:[g.jsxs("defs",{children:[g.jsxs("linearGradient",{id:"skeleton-area-fill",x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[g.jsx("stop",{offset:"0%",stopColor:"#8b5cf6",stopOpacity:"0.1",children:g.jsx("animate",{attributeName:"stop-opacity",values:"0.1;0.15;0.1",dur:"3s",repeatCount:"indefinite"})}),g.jsx("stop",{offset:"100%",stopColor:"#8b5cf6",stopOpacity:"0.02",children:g.jsx("animate",{attributeName:"stop-opacity",values:"0.02;0.05;0.02",dur:"3s",repeatCount:"indefinite"})})]}),g.jsxs("linearGradient",{id:"skeleton-line-shimmer",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[g.jsx("stop",{offset:"0%",stopColor:"#e2e8f0",stopOpacity:"0.3",children:g.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2.5s",repeatCount:"indefinite"})}),g.jsx("stop",{offset:"50%",stopColor:"#cbd5e1",stopOpacity:"0.6",children:g.jsx("animate",{attributeName:"stop-opacity",values:"0.6;0.3;0.6",dur:"2.5s",repeatCount:"indefinite"})}),g.jsx("stop",{offset:"100%",stopColor:"#e2e8f0",stopOpacity:"0.3",children:g.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2.5s",repeatCount:"indefinite"})})]})]}),g.jsx("path",{d:c,fill:"url(#skeleton-area-fill)"}),g.jsx("path",{d:s,stroke:"url(#skeleton-line-shimmer)",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})]})});case"area":const f=a(),d=n(f),h=f[f.length-1],v=f[0],m=`${d} L ${h.x} 90 L ${v.x} 90 Z`;return g.jsx("div",{className:"absolute inset-0 p-4",children:g.jsxs("svg",{className:"w-full h-full",viewBox:"0 0 100 100",preserveAspectRatio:"none",children:[g.jsxs("defs",{children:[g.jsxs("linearGradient",{id:"skeleton-area-gradient",x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[g.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.2",children:g.jsx("animate",{attributeName:"stop-opacity",values:"0.2;0.4;0.2",dur:"2s",repeatCount:"indefinite"})}),g.jsx("stop",{offset:"100%",stopColor:"#3b82f6",stopOpacity:"0.05",children:g.jsx("animate",{attributeName:"stop-opacity",values:"0.05;0.1;0.05",dur:"2s",repeatCount:"indefinite"})})]}),g.jsxs("linearGradient",{id:"skeleton-area-line",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[g.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.4",children:g.jsx("animate",{attributeName:"stop-opacity",values:"0.4;0.8;0.4",dur:"2s",repeatCount:"indefinite"})}),g.jsx("stop",{offset:"50%",stopColor:"#3b82f6",stopOpacity:"0.8",children:g.jsx("animate",{attributeName:"stop-opacity",values:"0.8;0.4;0.8",dur:"2s",repeatCount:"indefinite"})}),g.jsx("stop",{offset:"100%",stopColor:"#3b82f6",stopOpacity:"0.4",children:g.jsx("animate",{attributeName:"stop-opacity",values:"0.4;0.8;0.4",dur:"2s",repeatCount:"indefinite"})})]})]}),g.jsx("path",{d:m,fill:"url(#skeleton-area-gradient)"}),g.jsx("path",{d:n(f),stroke:"url(#skeleton-area-line)",strokeWidth:"2.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})]})});case"pie":return g.jsx("div",{className:"absolute inset-0 flex items-center justify-center p-4",children:g.jsxs("svg",{className:"w-32 h-32",viewBox:"0 0 42 42",children:[g.jsxs("defs",{children:[g.jsx("linearGradient",{id:"skeleton-pie-gradient-1",children:g.jsx("stop",{offset:"0%",stopColor:"#3b82f6",stopOpacity:"0.3",children:g.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2s",repeatCount:"indefinite"})})}),g.jsx("linearGradient",{id:"skeleton-pie-gradient-2",children:g.jsx("stop",{offset:"0%",stopColor:"#10b981",stopOpacity:"0.3",children:g.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2s",repeatCount:"indefinite",begin:"0.5s"})})}),g.jsx("linearGradient",{id:"skeleton-pie-gradient-3",children:g.jsx("stop",{offset:"0%",stopColor:"#f59e0b",stopOpacity:"0.3",children:g.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2s",repeatCount:"indefinite",begin:"1s"})})}),g.jsx("linearGradient",{id:"skeleton-pie-gradient-4",children:g.jsx("stop",{offset:"0%",stopColor:"#ef4444",stopOpacity:"0.3",children:g.jsx("animate",{attributeName:"stop-opacity",values:"0.3;0.6;0.3",dur:"2s",repeatCount:"indefinite",begin:"1.5s"})})})]}),g.jsx("circle",{cx:"21",cy:"21",r:"15.915",fill:"transparent",stroke:"#e5e7eb",strokeWidth:"3"}),g.jsx("circle",{cx:"21",cy:"21",r:"15.915",fill:"transparent",stroke:"url(#skeleton-pie-gradient-1)",strokeWidth:"3",strokeDasharray:"40 60",strokeDashoffset:"25"}),g.jsx("circle",{cx:"21",cy:"21",r:"15.915",fill:"transparent",stroke:"url(#skeleton-pie-gradient-2)",strokeWidth:"3",strokeDasharray:"25 75",strokeDashoffset:"65"}),g.jsx("circle",{cx:"21",cy:"21",r:"15.915",fill:"transparent",stroke:"url(#skeleton-pie-gradient-3)",strokeWidth:"3",strokeDasharray:"20 80",strokeDashoffset:"90"}),g.jsx("circle",{cx:"21",cy:"21",r:"15.915",fill:"transparent",stroke:"url(#skeleton-pie-gradient-4)",strokeWidth:"3",strokeDasharray:"15 85",strokeDashoffset:"110"})]})});default:return g.jsx("div",{className:"absolute inset-0 p-4",children:g.jsxs("div",{className:"w-full h-full relative",children:[g.jsx("div",{className:"absolute inset-0 flex items-center",children:g.jsx("div",{className:"w-full h-0.5 bg-gradient-to-r from-transparent via-gray-300 to-transparent opacity-60",children:g.jsx("div",{className:"w-full h-full bg-gradient-to-r from-transparent via-blue-400 to-transparent animate-pulse"})})}),g.jsx("div",{className:"absolute inset-0 flex items-center justify-between px-2",children:[...Array(7)].map((p,x)=>g.jsx("div",{className:"w-2 h-2 bg-blue-300 rounded-full animate-pulse",style:{animationDelay:`${x*.2}s`}},x))})]})})}};return g.jsx("div",{className:ue("w-full",e),children:g.jsxs("div",{className:"relative bg-gray-50/30 py-3",children:[g.jsxs("div",{className:"relative mb-6",style:{height:`${r}px`},children:[g.jsxs("div",{className:"absolute left-0 top-0 h-full flex flex-col justify-between items-end pr-3",children:[g.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),g.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),g.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),g.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),g.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),g.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"})]}),g.jsxs("div",{className:"ml-14 h-full relative overflow-hidden px-0 py-2 flex flex-col justify-between",children:[t!=="pie"&&g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),g.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),g.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),g.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),g.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),g.jsx("div",{className:"h-0 w-full border-t border-gray-100"})]}),i()]}),t!=="pie"&&g.jsxs("div",{className:"ml-14 flex justify-between items-center mt-3",children:[g.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),g.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),g.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),g.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),g.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),g.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),g.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"})]})]}),g.jsxs("div",{className:"flex items-center justify-between px-0 py-3 mt-2",children:[g.jsx("div",{className:"flex-1",children:g.jsx("div",{className:"bg-gray-100 h-3 rounded w-64"})}),g.jsxs("div",{className:"flex items-center gap-2 w-24 justify-center",children:[g.jsx("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),g.jsx("div",{className:"bg-gray-100 h-3 rounded flex-1"})]})]})]})})},iW=({active:e,payload:t,label:r,config:n})=>{var o;if(!e||!t||!t.length)return null;const a=t.filter(s=>s.name&&s.name!==""&&s.name!==s.dataKey);if(a.length===0)return null;const i=((o=n.tooltip)==null?void 0:o.style)==="dark";return g.jsxs("div",{className:ue("rounded-lg border px-3 py-2 text-sm shadow-lg",i?"bg-gray-900 border-gray-700 text-white":"bg-white border-gray-200 text-gray-900"),children:[g.jsx("div",{className:ue("font-medium mb-1",i?"text-gray-300":"text-gray-600"),children:new Date(r||"").toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}),g.jsx("div",{className:"space-y-1",children:a.map((s,l)=>g.jsxs("div",{className:"flex items-center justify-between gap-4",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:s.color}}),g.jsx("span",{className:ue("text-sm",i?"text-gray-300":"text-gray-600"),children:s.name})]}),g.jsx("span",{className:ue("font-medium",i?"text-white":"text-gray-900"),children:typeof s.value=="number"?s.value.toLocaleString():s.value})]},l))})]})},pb=({config:e,className:t,isLoading:r,onDataPointClick:n})=>{var A,y;const{data:a,dataKey:i,color:o="#3b82f6",lines:s,dateRange:l,yAxisLabel:u,height:c=300,tooltip:f={show:!0,style:"dark"}}=e,h=(b=>{if(!b||b.length===0)return[];const S=[...b].sort((R,k)=>{const D=new Date(R.date),C=new Date(k.date);return D.getTime()-C.getTime()});let P,$;l!=null&&l.start&&(l!=null&&l.end)?(P=new Date(l.start),$=new Date(l.end)):(P=new Date(S[0].date),$=new Date(S[S.length-1].date));const M=new Map;S.forEach(R=>{M.set(R.date,R)});const _=[],j=new Date(P);for(;j<=$;){const R=j.toISOString().split("T")[0];if(M.has(R))_.push(M.get(R));else{const k={date:R,users:0,sessions:0,messages:0,totalTokens:0,inputTokens:0,outputTokens:0,agentRuns:0,toolRuns:0,modelRuns:0,codeTools:0,workflowTools:0,knowledgeTools:0,mcpTools:0,value:0,count:0};if(S.length>0){const D=S[0];Object.keys(D).forEach(C=>{typeof D[C]=="number"&&!(C in k)&&(k[C]=0)})}_.push(k)}j.setDate(j.getDate()+1)}return _})(a),v=b=>{const S=new Date(b);return isNaN(S.getTime())?b:S.toLocaleDateString("en-US",{month:"short",day:"numeric"})},m=()=>{if(!h||h.length===0)return 0;const b=h.length;return b<=20?0:b<=31?1:b<=61?2:Math.floor(b/7)-1},p=b=>b>=1e3?`${(b/1e3).toFixed(0)}k`:b.toString(),O=s&&s.length>0?s:[{dataKey:i||"value",color:o,label:e.title,strokeWidth:2}];if(r)return console.log("AnalyticsChart: Loading state active"),g.jsx(hb,{className:t,chartType:e.type,height:c});if(!a||a.length===0)return console.log("AnalyticsChart: No data provided",{data:a,config:e}),g.jsx("div",{className:ue("w-full",t),children:g.jsxs("div",{className:"relative bg-gray-50/30 py-6",children:[g.jsxs("div",{className:"relative h-[300px] mb-6",children:[g.jsxs("div",{className:"absolute left-0 top-0 h-full flex flex-col justify-between items-end pr-3",children:[g.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),g.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),g.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),g.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),g.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"}),g.jsx("div",{className:"bg-gray-100 h-3 rounded w-10"})]}),g.jsxs("div",{className:"ml-14 h-full relative overflow-hidden px-0 py-2 flex flex-col justify-between",children:[g.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),g.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),g.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),g.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),g.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),g.jsx("div",{className:"h-0 w-full border-t border-gray-100"}),g.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-4",children:[g.jsx("div",{className:"bg-white border border-gray-300 rounded-[10px] w-12 h-12 flex items-center justify-center",children:g.jsx("svg",{className:"w-6 h-6 text-gray-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})})}),g.jsxs("div",{className:"text-center max-w-[352px]",children:[g.jsx("h3",{className:"font-semibold text-gray-900 text-base mb-1",children:"There is no data to display for this period"}),g.jsx("p",{className:"font-normal text-gray-600 text-sm leading-5",children:"Try selecting a different date range or ensure your app is deployed and receiving traffic."})]})]})]}),g.jsxs("div",{className:"ml-14 flex justify-between items-center mt-3",children:[g.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),g.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),g.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),g.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),g.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),g.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"}),g.jsx("div",{className:"bg-gray-100 h-3 rounded w-4"})]})]}),g.jsxs("div",{className:"flex items-center justify-between px-0 py-3 mt-2",children:[g.jsx("div",{className:"flex-1",children:g.jsx("div",{className:"bg-gray-100 h-3 rounded w-64"})}),g.jsxs("div",{className:"flex items-center gap-2 w-24 justify-center",children:[g.jsx("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),g.jsx("div",{className:"bg-gray-100 h-3 rounded flex-1"})]})]})]})});const w=b=>{var P;if(!n||!b||!b.activePayload)return;const S=(P=b.activePayload[0])==null?void 0:P.payload;S&&S.date&&(console.log("Chart data point clicked:",{date:S.date,data:S}),n(S,S.date))};return console.log("=== ANALYTICS CHART DEBUG ==="),console.log("AnalyticsChart config:",e),console.log("AnalyticsChart original data length:",a==null?void 0:a.length),console.log("AnalyticsChart filled data length:",h.length),console.log("AnalyticsChart date range (config):",l),console.log("AnalyticsChart actual date range:",h.length>0?{first:(A=h[0])==null?void 0:A.date,last:(y=h[h.length-1])==null?void 0:y.date,totalDays:h.length}:"No data"),console.log("AnalyticsChart dataKey:",i),console.log("Chart lines configuration:",O),console.log("Sample filled data points:",h.slice(0,3)),console.log("=== END ANALYTICS CHART DEBUG ==="),g.jsxs("div",{className:ue("w-full",t),children:[g.jsx("div",{className:"relative bg-gray-50/30 py-6",children:g.jsx(X2,{width:"100%",height:c,children:g.jsxs(aW,{data:h,onClick:w,margin:{top:20,right:30,left:20,bottom:20},children:[g.jsx("defs",{children:O.map((b,S)=>g.jsxs("linearGradient",{id:`gradient-${b.dataKey}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[g.jsx("stop",{offset:"5%",stopColor:b.color,stopOpacity:.08}),g.jsx("stop",{offset:"95%",stopColor:b.color,stopOpacity:.01})]},`gradient-${S}`))}),g.jsx(Pg,{strokeDasharray:"2 2",className:"opacity-30",stroke:"#d1d5db",horizontal:!0,vertical:!1}),g.jsx(Os,{dataKey:"date",tickFormatter:v,axisLine:!1,tickLine:!1,tick:{fontSize:12,fill:"#6b7280"},tickMargin:10,interval:m()}),g.jsx(Ts,{axisLine:!1,tickLine:!1,tick:{fontSize:12,fill:"#6b7280"},tickFormatter:p,tickMargin:10,label:u?{value:u,angle:-90,position:"insideLeft",style:{textAnchor:"middle",fontSize:12,fill:"#6b7280"}}:void 0}),f.show&&g.jsx(Wt,{content:b=>g.jsx(iW,{...b,config:e}),cursor:{stroke:"#d1d5db",strokeWidth:1,strokeDasharray:"4 4"},allowEscapeViewBox:{x:!1,y:!1}}),O.map(b=>g.jsx(Tr,{type:"monotone",dataKey:b.dataKey,stroke:"none",fill:`url(#gradient-${b.dataKey})`,fillOpacity:1,isAnimationActive:!1,name:""},`area-${b.dataKey}`)),O.map(b=>g.jsx(hi,{type:"monotone",dataKey:b.dataKey,stroke:b.color,strokeWidth:2.5,strokeDasharray:b.strokeDasharray,dot:!1,activeDot:{r:5,fill:b.color,stroke:b.color,strokeWidth:2},name:b.label},b.dataKey))]})})}),g.jsxs("div",{className:"mt-4 flex items-center justify-between",children:[g.jsx("div",{children:l&&g.jsxs("p",{className:"text-sm text-muted-foreground",children:["Showing data from ",new Date(l.start).toLocaleDateString("en-US",{day:"numeric",month:"short",year:"numeric"})," - ",new Date(l.end).toLocaleDateString("en-US",{day:"numeric",month:"short",year:"numeric"})]})}),g.jsx("div",{className:"flex items-center gap-4",children:g.jsx("div",{className:"flex items-center gap-4 text-sm text-muted-foreground",children:O.map(b=>g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:b.color}}),g.jsx("span",{children:b.label})]},b.dataKey))})})]})]})},vb=({config:e,className:t})=>{const{title:r,data:n,columns:a,pagination:i={enabled:!0,pageSize:10},sorting:o={enabled:!0},filtering:s={enabled:!0,searchable:!0}}=e,[l,u]=T.useState(o.defaultSort||null),[c,f]=T.useState(""),[d,h]=T.useState(1),v=T.useMemo(()=>{let y=[...n];return s.searchable&&c&&(y=y.filter(b=>a.some(S=>{const P=b[S.key];return P==null?void 0:P.toString().toLowerCase().includes(c.toLowerCase())}))),l&&y.sort((b,S)=>{const P=b[l.key],$=S[l.key];if(typeof P=="number"&&typeof $=="number")return l.order==="asc"?P-$:$-P;const M=(P==null?void 0:P.toString())||"",_=($==null?void 0:$.toString())||"",j=M.localeCompare(_);return l.order==="asc"?j:-j}),y},[n,a,c,l,s.searchable]),m=i.enabled?Math.ceil(v.length/i.pageSize):1,p=i.enabled?v.slice((d-1)*i.pageSize,d*i.pageSize):v,x=y=>{!o.enabled||!y.sortable||u(b=>(b==null?void 0:b.key)===y.key?b.order==="asc"?{key:y.key,order:"desc"}:null:{key:y.key,order:"asc"})},O=y=>{f(y),h(1)},w=(y,b,S)=>b.render?b.render(y,S):b.formatter?b.formatter(y,S):typeof y=="number"?y.toLocaleString():(y==null?void 0:y.toString())||"-",A=y=>!o.enabled||!y.sortable?null:(l==null?void 0:l.key)===y.key?l.order==="asc"?g.jsx(mf,{className:"w-4 h-4"}):g.jsx(ua,{className:"w-4 h-4"}):g.jsxs("div",{className:"flex flex-col",children:[g.jsx(mf,{className:"w-3 h-3 opacity-30"}),g.jsx(ua,{className:"w-3 h-3 opacity-30 -mt-1"})]});return g.jsxs("div",{className:ue("w-full",t),children:[g.jsxs("div",{className:"flex items-center justify-between mb-4",children:[g.jsx("h3",{className:"text-lg font-semibold",children:r}),s.enabled&&s.searchable&&g.jsxs("div",{className:"relative",children:[g.jsx(gf,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-gray-400"}),g.jsx("input",{type:"text",placeholder:"Search...",value:c,onChange:y=>O(y.target.value),className:"pl-10 pr-4 py-2 border border-gray-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"})]})]}),g.jsx("div",{className:"overflow-x-auto border border-gray-200 rounded-lg",children:g.jsxs("table",{className:"w-full",children:[g.jsx("thead",{className:"bg-gray-50",children:g.jsx("tr",{children:a.map(y=>g.jsx("th",{className:ue("px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",y.sortable&&o.enabled&&"cursor-pointer hover:bg-gray-100",y.align==="center"&&"text-center",y.align==="right"&&"text-right"),style:{width:y.width},onClick:()=>x(y),children:g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{children:y.title}),A(y)]})},y.key))})}),g.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:p.map((y,b)=>g.jsx("tr",{className:"hover:bg-gray-50 transition-colors",children:a.map(S=>g.jsx("td",{className:ue("px-4 py-3 text-sm text-gray-900",S.align==="center"&&"text-center",S.align==="right"&&"text-right"),children:w(y[S.key],S,y)},S.key))},b))})]})}),i.enabled&&m>1&&g.jsxs("div",{className:"flex items-center justify-between mt-4",children:[g.jsxs("div",{className:"text-sm text-gray-500",children:["Showing ",(d-1)*i.pageSize+1," to"," ",Math.min(d*i.pageSize,v.length)," of"," ",v.length," results"]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("button",{onClick:()=>h(y=>Math.max(1,y-1)),disabled:d===1,className:"px-3 py-1 text-sm border border-gray-200 rounded hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),Array.from({length:Math.min(5,m)},(y,b)=>{const S=Math.max(1,Math.min(m-4,d-2))+b;return S>m?null:g.jsx("button",{onClick:()=>h(S),className:ue("px-3 py-1 text-sm border rounded",d===S?"bg-blue-500 text-white border-blue-500":"border-gray-200 hover:bg-gray-50"),children:S},S)}),g.jsx("button",{onClick:()=>h(y=>Math.min(m,y+1)),disabled:d===m,className:"px-3 py-1 text-sm border border-gray-200 rounded hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]}),p.length===0&&g.jsx("div",{className:"text-center py-8 text-gray-500",children:c?"No results found for your search.":"No data available."})]})},oW=(e,t)=>{switch(e){case"human":return t==="agent"?"agent-avatars":"avatars";case"logo":return"profileLogos";case"icon":case"inlineTool":case"toolLibrary":case"KNOWLEDGE":case"MCP":return"profileIcons";default:return t==="agent"?"agent-avatars":"avatars"}},sW=e=>{if(!e)return null;if(typeof e=="string")try{return JSON.parse(e)}catch{return{name:e,type:"human"}}return e},lW=(e,t)=>{const r=["#3B82F6","#EF4444","#10B981","#F59E0B","#8B5CF6","#EC4899","#06B6D4","#84CC16"],n=e.split("").reduce((a,i)=>a+i.charCodeAt(0),0)%r.length;if(t==="workflowtool"){const a=e.toLowerCase();let i="toolLibrary";return a.includes("code")||a.includes("inline")||a.includes("calculate")?i="inlineTool":a.includes("knowledge")||a.includes("document")||a.includes("fetch")?i="KNOWLEDGE":(a.includes("mcp")||a.includes("protocol"))&&(i="MCP"),{name:"fallback",type:i,color:r[n]}}return{name:"fallback",type:t==="agent"?"human":"icon",color:r[n]}},uW=(e,t)=>{if(!(e!=null&&e.name))return"";if(t==="url")return e.name;const r=window.location.origin,n=oW(e.type||"human",t);return`${r}/agenticai/assets/${n}/${e.name}.svg`},cW={xs:"w-6 h-6 text-xs",small:"w-8 h-8 text-sm",medium:"w-10 h-10 text-base",large:"w-12 h-12 text-lg"},Rt={inlineTool:`<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_3533_7514)">
201
206
  <path d="M8.5 8.5L11 6L8.5 3.5M3.5 3.5L1 6L3.5 8.5M7 1.5L5 10.5" stroke="#EF6820" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/></g>
202
207
  <defs><clipPath id="clip0_3533_7514"><rect width="12" height="12" fill="white"/></clipPath></defs>
203
208
  </svg>`,toolLibrary:`<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -206,7 +211,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
206
211
  <path d="M6 5.5H3M4 7.5H3M7 3.5H3M9 3.4V8.6C9 9.44008 9 9.86012 8.83651 10.181C8.6927 10.4632 8.46323 10.6927 8.18099 10.8365C7.86012 11 7.44008 11 6.6 11H3.4C2.55992 11 2.13988 11 1.81901 10.8365C1.53677 10.6927 1.3073 10.4632 1.16349 10.181C1 9.86012 1 9.44008 1 8.6V3.4C1 2.55992 1 2.13988 1.16349 1.81901C1.3073 1.53677 1.53677 1.3073 1.81901 1.16349C2.13988 1 2.55992 1 3.4 1H6.6C7.44008 1 7.86012 1 8.18099 1.16349C8.46323 1.3073 8.6927 1.53677 8.83651 1.81901C9 2.13988 9 2.55992 9 3.4Z" stroke="#7A5AF8" stroke-width="1.33" stroke-linecap="round" stroke-linejoin="round"/>
207
212
  </svg>`,MCP:`<svg width="14" height="14" viewBox="0 0 22 23" fill="none" xmlns="http://www.w3.org/2000/svg">
208
213
  <path d="M1.8125 10.7455L10.647 1.91124C11.8411 0.717087 13.7773 0.717087 14.9714 1.91124C16.1655 3.10539 16.1655 5.0415 14.9714 6.23565M14.9714 6.23565L8.29911 12.9077M14.9714 6.23565C16.1655 5.0415 18.1018 5.0415 19.2958 6.23565C20.4899 7.4298 20.4899 9.36593 19.2958 10.56L11.7665 18.0893C11.3443 18.5115 11.3443 19.1961 11.7665 19.6182L13.164 21.0158M16.9479 8.58236L10.2756 15.2547C9.08153 16.4488 7.1453 16.4488 5.95123 15.2547C4.75716 14.0605 4.75716 12.1244 5.95123 10.9303L12.6234 4.25814" stroke="#101828" stroke-width="2.00016" stroke-linecap="round" stroke-linejoin="round"/>
209
- </svg>`},cW=(e,t)=>{const r=e.toLowerCase();if(r.includes("code"))return Rt.inlineTool;if(r.includes("workflow")||r.includes("library"))return Rt.toolLibrary;if(r.includes("knowledge"))return Rt.KNOWLEDGE;if(r.includes("mcp"))return Rt.MCP;if(Rt[e])return Rt[e];const n=t.toLowerCase();return n.includes("code")||n.includes("inline")||n.includes("calculate")?Rt.inlineTool:n.includes("library")||n.includes("workflow")?Rt.toolLibrary:n.includes("knowledge")||n.includes("document")||n.includes("fetch")?Rt.KNOWLEDGE:n.includes("mcp")||n.includes("protocol")?Rt.MCP:Rt.toolLibrary},vb=({icon:e,iconSource:t="agent",size:r="small",className:n="",name:a="Unknown",toolType:i})=>{const[o,s]=S.useState(!1),[l,u]=S.useState(!1),c=oW(e),f=uW[r];if(c!=null&&c.name&&c.name!=="fallback"&&!o){const y=lW(c,t),v=()=>{s(!0)};return b.jsx("img",{src:y,alt:a,className:`${f} rounded-full object-cover ${n}`,onError:v})}if(o&&!l&&t==="agent"){const y=`${window.location.origin}/agenticai/assets/agent-avatars/agent1.svg`,v=()=>{u(!0)};return b.jsx("img",{src:y,alt:a,className:`${f} rounded-full object-cover ${n}`,onError:v})}const d=c||sW(a,t);if(t==="workflowtool"){const y=i||d.type||"toolLibrary",v=cW(y,a);return b.jsx("div",{className:`${f} rounded-full flex items-center justify-center bg-gray-100 ${n}`,children:b.jsx("div",{dangerouslySetInnerHTML:{__html:v}})})}const h=`${window.location.origin}/agenticai/assets/agent-avatars/agent1.svg`;return b.jsx("img",{src:h,alt:a,className:`${f} rounded-full object-cover ${n}`})},yb=({data:e,className:t})=>{const[r,n]=S.useState(5),a=()=>{n(o=>Math.min(o+10,e.length))},i=o=>o>=1e3?`${Math.floor(o/1e3)}k`:o.toString();return b.jsxs("div",{className:ce("w-full",t),children:[b.jsxs("div",{className:"grid grid-cols-4 gap-4 px-4 py-3 bg-gray-50 border-b border-gray-200 text-sm font-medium text-gray-700",children:[b.jsx("div",{className:"text-left",children:"Name"}),b.jsx("div",{className:"text-right",children:"Runs"}),b.jsx("div",{className:"text-right",children:"Response Time"}),b.jsx("div",{className:"text-right",children:"Tokens"})]}),b.jsx("div",{className:"divide-y divide-gray-100",children:e.slice(0,r).map((o,s)=>b.jsxs("div",{className:"grid grid-cols-4 gap-4 px-4 py-4 hover:bg-gray-50 transition-colors duration-150",children:[b.jsxs("div",{className:"flex items-center space-x-3",children:[b.jsx("div",{className:"flex-shrink-0",children:b.jsx(vb,{icon:o.icon,iconSource:"agent",size:"small",name:o.name||"Unknown Agent"})}),b.jsx("div",{className:"min-w-0 flex-1",children:b.jsx("div",{className:"text-sm font-medium text-gray-900 truncate",children:o.name||"Unknown Agent"})})]}),b.jsx("div",{className:"text-right text-sm text-gray-900",children:o.runs?i(o.runs):"-"}),b.jsx("div",{className:"text-right text-sm text-gray-900",children:o.responseTime||"-"}),b.jsx("div",{className:"text-right text-sm text-gray-900",children:o.tokens?i(o.tokens):"-"})]},o.id||s))}),r<e.length&&b.jsx("div",{className:"flex justify-center py-6",children:b.jsx("button",{onClick:a,className:"px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 transition-colors duration-150",children:"Load 10 more"})})]})},fW=e=>{switch(e.toLowerCase()){case"code tool":case"inlinetool":return"bg-orange-100 text-orange-800 border-orange-200";case"workflow tool":case"toollibrary":return"bg-blue-100 text-blue-800 border-blue-200";case"mcp tool":case"mcp":return"bg-green-100 text-green-800 border-green-200";case"knowledge":case"knowledge tool":return"bg-purple-100 text-purple-800 border-purple-200";default:return"bg-gray-100 text-gray-800 border-gray-200"}},mb=({data:e,className:t})=>{const[r,n]=S.useState(5),a=()=>{n(o=>Math.min(o+10,e.length))},i=o=>o>=1e3?`${Math.floor(o/1e3)}k`:o.toString();return b.jsxs("div",{className:ce("w-full",t),children:[b.jsxs("div",{className:"grid grid-cols-4 gap-4 px-4 py-3 bg-gray-50 border-b border-gray-200 text-sm font-medium text-gray-700",children:[b.jsx("div",{className:"text-left",children:"Name"}),b.jsx("div",{className:"text-left",children:"Type"}),b.jsx("div",{className:"text-right",children:"Runs"}),b.jsx("div",{className:"text-right",children:"Response Time"})]}),b.jsx("div",{className:"divide-y divide-gray-100",children:e.slice(0,r).map((o,s)=>b.jsxs("div",{className:"grid grid-cols-4 gap-4 px-4 py-4 hover:bg-gray-50 transition-colors duration-150",children:[b.jsxs("div",{className:"flex items-center space-x-3",children:[b.jsx("div",{className:"flex-shrink-0",children:b.jsx(vb,{icon:o.icon,iconSource:"workflowtool",size:"small",name:o.name||"Unknown Tool",toolType:o.type})}),b.jsx("div",{className:"min-w-0 flex-1",children:b.jsx("div",{className:"text-sm font-medium text-gray-900 truncate",children:o.name||"Unknown Tool"})})]}),b.jsx("div",{className:"flex items-center",children:b.jsx("span",{className:ce("inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium border",fW(o.type||"Default")),children:o.type||"Tool"})}),b.jsx("div",{className:"text-right text-sm text-gray-900",children:o.runs?i(o.runs):"-"}),b.jsx("div",{className:"text-right text-sm text-gray-900",children:o.responseTime||"-"})]},o.id||s))}),r<e.length&&b.jsx("div",{className:"flex justify-center py-6",children:b.jsx("button",{onClick:a,className:"px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 transition-colors duration-150",children:"Load 10 more"})})]})},dW=e=>{const t=e.toLowerCase();return t.includes("gpt")||t.includes("openai")?b.jsx("div",{className:"w-6 h-6 rounded-full bg-gray-900 flex items-center justify-center",children:b.jsx("span",{className:"text-white text-xs font-bold",children:"⚡"})}):t.includes("claude")||t.includes("anthropic")?b.jsx("div",{className:"w-6 h-6 rounded-full bg-orange-500 flex items-center justify-center",children:b.jsx("span",{className:"text-white text-xs font-bold",children:"A"})}):t.includes("gemini")||t.includes("google")?b.jsx("div",{className:"w-6 h-6 rounded-full bg-blue-500 flex items-center justify-center",children:b.jsx("span",{className:"text-white text-xs font-bold",children:"G"})}):t.includes("llama")||t.includes("meta")?b.jsx("div",{className:"w-6 h-6 rounded-full bg-blue-600 flex items-center justify-center",children:b.jsx("span",{className:"text-white text-xs font-bold",children:"M"})}):b.jsx("div",{className:"w-6 h-6 rounded-full bg-gray-500 flex items-center justify-center",children:b.jsx("span",{className:"text-white text-xs font-bold",children:"🤖"})})},gb=({data:e,className:t})=>{const[r,n]=S.useState(5),a=()=>{n(o=>Math.min(o+10,e.length))},i=o=>o>=1e3?`${Math.floor(o/1e3)}k`:o.toString();return b.jsxs("div",{className:ce("w-full",t),children:[b.jsxs("div",{className:"grid grid-cols-4 gap-4 px-4 py-3 bg-gray-50 border-b border-gray-200 text-sm font-medium text-gray-700",children:[b.jsx("div",{className:"text-left",children:"Model Name"}),b.jsx("div",{className:"text-right",children:"Runs"}),b.jsx("div",{className:"text-right",children:"Tokens"}),b.jsx("div",{className:"text-right",children:"Response Time"})]}),b.jsx("div",{className:"divide-y divide-gray-100",children:e.slice(0,r).map((o,s)=>b.jsxs("div",{className:"grid grid-cols-4 gap-4 px-4 py-4 hover:bg-gray-50 transition-colors duration-150",children:[b.jsxs("div",{className:"flex items-center space-x-3",children:[b.jsx("div",{className:"flex-shrink-0",children:dW(o.name||"Unknown")}),b.jsx("div",{className:"min-w-0 flex-1",children:b.jsx("div",{className:"text-sm font-medium text-gray-900 truncate",children:o.name||"Unknown Model"})})]}),b.jsx("div",{className:"text-right text-sm text-gray-900",children:i(o.runs||0)}),b.jsx("div",{className:"text-right text-sm text-gray-900",children:i(o.tokens||0)}),b.jsx("div",{className:"text-right text-sm text-gray-900",children:o.responseTime})]},o.id||s))}),r<e.length&&b.jsx("div",{className:"flex justify-center py-6",children:b.jsx("button",{onClick:a,className:"px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 transition-colors duration-150",children:"Load 10 more"})})]})},bb=({config:e,className:t,isLoading:r,context:n})=>{const{type:a,chart:i,table:o,layout:s="vertical"}=e,l=()=>i?(console.log("ViewRenderer - Chart config:",i),console.log("ViewRenderer - Chart data:",i.data),console.log("ViewRenderer - Context:",n),b.jsx("div",{className:"flex-1",children:b.jsx(hb,{config:i,isLoading:r})})):null,u=()=>o?(n==null?void 0:n.metricType)==="agentRuns"?b.jsx("div",{className:"flex-1 min-h-[380px]",children:b.jsx(yb,{data:o.data})}):(n==null?void 0:n.metricType)==="toolRuns"?b.jsx("div",{className:"flex-1 min-h-[380px]",children:b.jsx(mb,{data:o.data})}):(n==null?void 0:n.metricType)==="modelRuns"?b.jsx("div",{className:"flex-1 min-h-[380px]",children:b.jsx(gb,{data:o.data})}):b.jsx("div",{className:"flex-1 min-h-[380px]",children:b.jsx(pb,{config:o})}):null,c=()=>{switch(a){case"chart":return l();case"table":return u();case"mixed":return b.jsxs("div",{className:ce("flex gap-6",s==="horizontal"?"flex-row":"flex-col"),children:[l(),u()]});default:return b.jsxs("div",{className:"p-4 text-center text-gray-500",children:["Unsupported view type: ",a]})}};return b.jsx("div",{className:ce("w-full",t),children:c()})},js=({options:e,value:t,placeholder:r="Select an option",onChange:n,className:a,disabled:i=!1})=>{const[o,s]=S.useState(!1),[l,u]=S.useState(t||""),c=S.useRef(null),f=e.find(y=>y.value===l);S.useEffect(()=>{const y=v=>{c.current&&!c.current.contains(v.target)&&s(!1)};return o&&document.addEventListener("mousedown",y),()=>{document.removeEventListener("mousedown",y)}},[o]);const d=y=>{i||(u(y),s(!1),n==null||n(y))},h=()=>{i||s(!o)};return b.jsxs("div",{ref:c,className:ce("relative min-w-[200px]",a),children:[b.jsxs("button",{type:"button",className:ce("flex h-10 w-full min-w-[200px] items-center justify-between rounded-md border border-gray-300 bg-white px-3 py-2 text-sm shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 disabled:cursor-not-allowed disabled:opacity-50 transition-colors",a),onClick:h,disabled:i,children:[b.jsx("span",{className:ce("truncate",!f&&"text-gray-500"),children:f?f.label:r}),b.jsx(Ei,{className:ce("h-4 w-4 text-gray-400 transition-transform duration-200",o&&"rotate-180")})]}),o&&!i&&b.jsx("div",{className:"absolute top-full left-0 z-50 mt-1 min-w-[300px] w-max max-w-lg rounded-md border border-gray-200 bg-white shadow-lg max-h-60 overflow-y-auto",children:e.map(y=>{const v=l===y.value;return b.jsxs("div",{className:"relative group",children:[b.jsx("button",{className:ce("relative flex w-full cursor-pointer select-none items-center px-3 py-2 text-sm text-left outline-none transition-colors",y.disabled?"opacity-50 cursor-not-allowed text-gray-400":v?"bg-blue-50 text-blue-900 font-medium":"text-gray-900 hover:bg-gray-100"),onClick:()=>!y.disabled&&d(y.value),disabled:y.disabled,children:b.jsx("span",{className:"block whitespace-nowrap",children:y.label})}),y.label.length>25&&b.jsx("div",{className:"absolute left-full top-0 ml-2 z-[60] opacity-0 group-hover:opacity-100 transition-opacity duration-200 pointer-events-none",children:b.jsxs("div",{className:"bg-gray-900 text-white text-xs rounded-md px-3 py-2 whitespace-nowrap shadow-lg",children:[y.label,b.jsx("div",{className:"absolute left-0 top-1/2 transform -translate-x-full -translate-y-1/2 w-0 h-0 border-t-4 border-b-4 border-r-4 border-transparent border-r-gray-900"})]})})]},y.value)})})]})},hW=({options:e,value:t,defaultValue:r,placeholder:n="Select...",multiSelect:a=!1,searchable:i=!1,onChange:o,className:s,maxItems:l=100,maxLabelLength:u=30})=>{const[c,f]=S.useState(!1),[d,h]=S.useState(""),[y,v]=S.useState(()=>{const k=t||r;return a?Array.isArray(k)?k:k?[k]:[]:k?[Array.isArray(k)?k[0]:k]:[]}),p=S.useRef(null);S.useEffect(()=>{const k=E=>{p.current&&!p.current.contains(E.target)&&f(!1)};return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[]);const g=(k,E=u)=>k.length<=E?k:k.substring(0,E)+"...",O=i?e.filter(k=>k.label.toLowerCase().includes(d.toLowerCase())):e,w=O.slice(0,l),A=O.length>l,m=k=>{let E;if(a){if(k==="all"){T();return}if(y.includes(k))E=y.filter(R=>R!==k),E=E.filter(R=>R!=="all");else{E=y.filter(I=>I!=="all"),E=[...E,k];const R=O.filter(I=>I.value!=="all").map(I=>I.value),N=E.filter(I=>I!=="all");N.length===R.length&&(E=["all",...N])}}else E=[k],f(!1);v(E);const j=a?E:E[0]||"";o==null||o(j)},x=()=>{if(!a)return{checked:!1,indeterminate:!1};const k=O.filter(j=>j.value!=="all").map(j=>j.value),E=y.filter(j=>j!=="all"&&k.includes(j));return y.includes("all")&&E.length===0?{checked:!1,indeterminate:!1}:E.length===0?{checked:!1,indeterminate:!1}:E.length===k.length?{checked:!0,indeterminate:!1}:{checked:!1,indeterminate:!0}},T=()=>{if(!a)return;const k=x(),E=O.filter(j=>j.value!=="all").map(j=>j.value);if(k.checked)v(["all"]),o==null||o(["all"]);else{const j=["all",...E];v(j),o==null||o(j)}},P=()=>{v(["all"]),o==null||o(a?["all"]:"all")},$=()=>{if(!a){if(y.length===0)return n;const R=e.find(N=>N.value===y[0]);return(R==null?void 0:R.label)||n}const k=y.filter(R=>R!=="all"),E=y.includes("all");if(k.length===0)return n;if(k.length===1){const R=e.find(N=>N.value===k[0]);return(R==null?void 0:R.label)||n}const j=e.filter(R=>R.value!=="all").length;return k.length===j?"All selected":`${k.length} selected`};return b.jsxs("div",{className:ce("relative",s),ref:p,children:[b.jsxs("button",{type:"button",onClick:()=>f(!c),className:ce("w-full flex items-center justify-between px-3 py-2 text-left text-sm","border border-gray-300 rounded-md bg-white hover:bg-gray-50","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500","transition-colors duration-150"),children:[b.jsx("span",{className:ce("truncate",y.length===0&&"text-gray-500"),children:$()}),b.jsx(Ei,{className:ce("w-4 h-4 text-gray-400 transition-transform duration-150",c&&"transform rotate-180")})]}),c&&b.jsxs("div",{className:"absolute z-50 min-w-[300px] w-max max-w-lg mt-1 bg-white border border-gray-200 rounded-md shadow-lg max-h-80 overflow-hidden",children:[i&&b.jsx("div",{className:"p-3 border-b border-gray-100",children:b.jsxs("div",{className:"relative",children:[b.jsx(mf,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-gray-400"}),b.jsx("input",{type:"text",placeholder:`Search ${n.toLowerCase()}...`,value:d,onChange:k=>h(k.target.value),className:"w-full pl-10 pr-4 py-2 text-sm border border-gray-200 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})]})}),a&&b.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b border-gray-100 bg-gray-50",children:[b.jsxs("button",{type:"button",onClick:T,className:"flex items-center text-sm font-medium text-gray-700 hover:text-gray-900",children:[b.jsx("div",{className:ce("flex items-center justify-center w-4 h-4 mr-2 border rounded transition-colors duration-150",(()=>{const k=x();return k.indeterminate||k.checked?"bg-blue-600 border-blue-600 text-white":"border-gray-300 bg-white"})()),children:(()=>{const k=x();return k.indeterminate?b.jsx("div",{className:"w-2 h-0.5 bg-white rounded"}):k.checked?b.jsx("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 20 20",children:b.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})}):null})()}),"Select all"]}),b.jsx("button",{type:"button",onClick:P,className:"text-sm font-medium text-blue-600 hover:text-blue-800",children:"Clear"})]}),b.jsxs("div",{className:"max-h-60 overflow-y-auto",children:[w.length===0?b.jsx("div",{className:"px-3 py-4 text-sm text-gray-500 text-center",children:"No options found"}):w.map(k=>{let E;return k.value==="all"?null:(E=y.includes(k.value),b.jsxs("div",{className:"relative group",children:[b.jsxs("div",{onClick:()=>m(k.value),className:ce("flex items-center px-3 py-2 cursor-pointer hover:bg-gray-50","transition-colors duration-150",E&&"bg-blue-50"),children:[a?b.jsx("div",{className:ce("flex items-center justify-center w-4 h-4 mr-3 border rounded","transition-colors duration-150",E?"bg-blue-600 border-blue-600 text-white":"border-gray-300 bg-white"),children:E&&b.jsx("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 20 20",children:b.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})}):b.jsx("div",{className:ce("w-4 h-4 mr-3 rounded-full border-2 transition-colors duration-150",E?"border-blue-600 bg-blue-600":"border-gray-300"),children:E&&b.jsx("div",{className:"w-full h-full rounded-full bg-white scale-50"})}),b.jsx("span",{className:ce("flex-1 text-sm whitespace-nowrap",E?"font-medium text-gray-900":"text-gray-700"),children:g(k.label)})]}),k.label.length>u&&b.jsx("div",{className:"absolute left-full top-1/2 transform -translate-y-1/2 ml-2 z-[80] opacity-0 group-hover:opacity-100 transition-opacity duration-200 pointer-events-none",children:b.jsxs("div",{className:"bg-gray-900 text-white text-xs rounded-md px-3 py-2 shadow-lg max-w-xs break-words whitespace-normal",children:[k.label,b.jsx("div",{className:"absolute left-0 top-1/2 transform -translate-x-full -translate-y-1/2 w-0 h-0 border-t-4 border-b-4 border-r-4 border-transparent border-r-gray-900"})]})})]},k.value))}),A&&b.jsxs("div",{className:"px-3 py-2 text-xs text-gray-500 bg-gray-50 border-t border-gray-100",children:[b.jsxs("div",{className:"text-center font-medium",children:["+",O.length-l," more items"]}),i&&b.jsx("div",{className:"text-center mt-1 text-gray-400",children:"Use search above to find specific items"})]})]})]})]})},xb=({config:e,className:t})=>{var s;const{dropdown:r,buttons:n,toggle:a}=e,i=l=>{const u=l.toLowerCase();return u.includes("agent")?"agent":u.includes("tool")?"workflowtool":"app"},o=l=>{const u=l.toLowerCase();return u.includes("agent")?{maxItems:50,maxLabelLength:25}:u.includes("tool")?{maxItems:30,maxLabelLength:20}:{maxItems:40,maxLabelLength:25}};return b.jsxs("div",{className:ce("flex items-center gap-3",t),children:[r&&b.jsx(b.Fragment,{children:r.multiSelect?b.jsx(hW,{options:r.options,value:r.defaultValue,placeholder:r.label,multiSelect:r.multiSelect,searchable:r.searchable,onChange:r.onChange,className:"w-48",iconSource:i(r.label),maxItems:o(r.label).maxItems,maxLabelLength:o(r.label).maxLabelLength}):b.jsx(js,{options:r.options,value:Array.isArray(r.defaultValue)?r.defaultValue[0]:r.defaultValue||((s=r.options[0])==null?void 0:s.value),placeholder:r.label,onChange:l=>{var u;return(u=r.onChange)==null?void 0:u.call(r,l)},className:"w-48"})}),n&&n.length>0&&b.jsx("div",{className:"flex items-center border border-gray-200 rounded-lg overflow-hidden",children:n.map((l,u)=>b.jsxs("button",{onClick:()=>{var c;return(c=l.onClick)==null?void 0:c.call(l,l.value)},className:ce("px-3 py-2 text-sm font-medium transition-colors","hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-inset",l.active?"bg-blue-50 text-blue-700 border-blue-200":"text-gray-700 bg-white",u>0&&"border-l border-gray-200"),children:[l.icon&&b.jsx("span",{className:"mr-2",children:l.icon}),l.label]},l.value))}),a&&b.jsxs("div",{className:"flex items-center border border-gray-200 rounded-lg overflow-hidden",children:[b.jsxs("button",{onClick:()=>{var l;return(l=a.onToggle)==null?void 0:l.call(a,"chart")},className:ce("px-3 py-2 text-sm font-medium transition-colors flex items-center gap-2","hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-inset",a.chartView?"bg-blue-50 text-blue-700 border-blue-200":"text-gray-700 bg-white"),children:[b.jsx(Jb,{className:"w-4 h-4"}),"Chart"]}),b.jsxs("button",{onClick:()=>{var l;return(l=a.onToggle)==null?void 0:l.call(a,"table")},className:ce("px-3 py-2 text-sm font-medium transition-colors flex items-center gap-2","hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-inset","border-l border-gray-200",a.tableView?"bg-blue-50 text-blue-700 border-blue-200":"text-gray-700 bg-white"),children:[b.jsx(n0,{className:"w-4 h-4"}),"Table"]})]})]})},wb=({section:e,className:t,isLoading:r,isChartLoading:n,onMetricClick:a})=>{var K;const{id:i,title:o,description:s,metrics:l,view:u,controls:c,layout:f}=e,[d,h]=S.useState(u.type),[y,v]=S.useState("chart"),p=()=>i==="usage-analytics"?"users":i==="runs"?"agentRuns":"users",[g,O]=S.useState(p()),[w,A]=S.useState("all"),m=_=>{var F,W,G,X,Q;const L=P();(F=L==null?void 0:L.controls)!=null&&F.toggle?(v(_),(G=(W=L.controls.toggle).onToggle)==null||G.call(W,_)):(h(_),(Q=(X=c==null?void 0:c.toggle)==null?void 0:X.onToggle)==null||Q.call(X,_))},x=_=>{var W,G;const L=_.metricType||_.title.toLowerCase();O(L);const F=l.find(X=>(X.metricType||X.title.toLowerCase())===L);(G=(W=F==null?void 0:F.controls)==null?void 0:W.dropdown)!=null&&G.multiSelect?A(["all"]):A("all"),a==null||a(_)},T=_=>{var F,W,G;A(_);const L=l.find(X=>(X.metricType||X.title.toLowerCase())===g);(G=(W=(F=L==null?void 0:L.controls)==null?void 0:F.dropdown)==null?void 0:W.onChange)==null||G.call(W,_)},P=()=>l.find(_=>(_.metricType||_.title.toLowerCase())===g)||null,$=_=>Array.isArray(_)?_.filter(F=>F!=="all").length>0:_!=="all",k=_=>Array.isArray(_)?_.filter(L=>L!=="all"):_!=="all"?[_]:[],E=_=>{var G,X,Q,ae,te,q,Y,Z,D;const L=((X=(G=_.view)==null?void 0:G.chart)==null?void 0:X.data)||((Q=u.chart)==null?void 0:Q.data)||[];if(!$(w))return L;const F=_.metricType,W=k(w);if(W.length===1){const ie=W[0],V=P(),se=(q=(te=(ae=V==null?void 0:V.controls)==null?void 0:ae.dropdown)==null?void 0:te.options)==null?void 0:q.find(ve=>ve.value===ie),ee=se==null?void 0:se.label;return console.log("🔍 Filtering chart data:",{metricType:F,singleFilter:ie,selectedLabel:ee,baseDataSample:L[0]}),L.map(ve=>{let We=0;return ve.listView&&Array.isArray(ve.listView)&&(We=ve.listView.filter(Ke=>F==="agentRuns"&&Ke.agentName?Ke.agentName===ee||Ke.agentName.toLowerCase()===(ee==null?void 0:ee.toLowerCase()):F==="toolRuns"&&Ke.toolName?Ke.toolName===ee||Ke.toolName.toLowerCase()===(ee==null?void 0:ee.toLowerCase()):F==="modelRuns"&&Ke.modelName?Ke.modelName===ee||Ke.modelName.toLowerCase()===(ee==null?void 0:ee.toLowerCase()):!1).reduce((Ke,lt)=>Ke+(lt.count||0),0)),console.log("📊 Filtered value for",ee,":",We),{...ve,[F]:We}})}if(W.length>1){const ie=P(),se=(((D=(Z=(Y=ie==null?void 0:ie.controls)==null?void 0:Y.dropdown)==null?void 0:Z.options)==null?void 0:D.filter(ee=>W.includes(ee.value)))||[]).map(ee=>ee.label);return L.map(ee=>{let ve=0;return ee.listView&&Array.isArray(ee.listView)&&(ve=ee.listView.filter(Re=>F==="agentRuns"&&Re.agentName?se.some(Be=>Re.agentName===Be||Re.agentName.toLowerCase()===(Be==null?void 0:Be.toLowerCase())):F==="toolRuns"&&Re.toolName?se.some(Be=>Re.toolName===Be||Re.toolName.toLowerCase()===(Be==null?void 0:Be.toLowerCase())):F==="modelRuns"&&Re.modelName?se.some(Be=>Re.modelName===Be||Re.modelName.toLowerCase()===(Be==null?void 0:Be.toLowerCase())):!1).reduce((Re,Be)=>Re+(Be.count||0),0)),{...ee,[F]:ve}})}return L},j=_=>{var G;if(!((G=_.view)!=null&&G.chart))return null;const L=E(_),F=()=>{var Q,ae,te,q,Y,Z;if(!$(w)||!((Q=_.controls)!=null&&Q.dropdown))return((te=(ae=_.view)==null?void 0:ae.chart)==null?void 0:te.title)||_.title;const X=k(w);if(X.length===1){const D=(q=_.controls.dropdown.options)==null?void 0:q.find(ie=>ie.value===X[0]);return D?`${D.label}`:((Z=(Y=_.view)==null?void 0:Y.chart)==null?void 0:Z.title)||_.title}return`${X.length} selected`},W=k(w);return _.metricType==="toolRuns"&&W.length===1?{..._.view.chart,data:L,title:F(),lines:void 0,dataKey:"toolRuns",color:"#f97316",showLegend:!1}:_.metricType==="modelRuns"&&W.length===1?{..._.view.chart,data:L,title:F(),dataKey:"modelRuns",color:"#10b981",showLegend:!1}:{..._.view.chart,data:L,title:F()}},R=(_,L)=>{if(!$(w))return _;const F=k(w);if(F.length===1){const W=F[0];if(i==="runs"&&L==="agentRuns")return _.map(G=>({...G,agentRuns:G[W]||0}));if(i==="runs"&&L==="toolRuns")return _.map(G=>({...G,toolRuns:G[W.replace(/[-]/g,"")]||0}));if(i==="runs"&&L==="modelRuns")return _.map(G=>({...G,modelRuns:G[W.replace(/[-\.]/g,"")]||0}))}return _},N=_=>{var G;const L=((G=u.chart)==null?void 0:G.data)||[],F=R(L,_),W=X=>{var ae,te;if(!$(w))return X;const Q=k(w);if(Q.length===1){const q=(te=(ae=c==null?void 0:c.dropdown)==null?void 0:ae.options)==null?void 0:te.find(Y=>Y.value===Q[0]);return q?`${q.label}`:X}return`${Q.length} selected`};switch(_){case"users":return{type:"line",title:"Total Users",data:L,dataKey:"users",color:"#8b5cf6",yAxisLabel:"Number of Users",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}};case"sessions":return{type:"line",title:"Total Sessions",data:L,dataKey:"sessions",color:"#06b6d4",yAxisLabel:"Number of Sessions",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}};case"messages":return{type:"line",title:"Total Messages",data:L,dataKey:"messages",color:"#ec4899",yAxisLabel:"Number of Messages",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}};case"tokens":return{type:"line",title:"Token Usage Breakdown",data:L,yAxisLabel:"Number of Tokens",lines:[{dataKey:"totalTokens",color:"#f59e0b",label:"Total Tokens"},{dataKey:"inputTokens",color:"#3b82f6",label:"Input Tokens"},{dataKey:"outputTokens",color:"#ec4899",label:"Output Tokens"}],height:300,showGrid:!0,showLegend:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}};case"agentRuns":return{type:"line",title:W("Agent Runs"),data:F,dataKey:"agentRuns",color:"#06b6d4",yAxisLabel:"Number of Agent Runs",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}};case"toolRuns":return k(w).length===1?{type:"line",title:W("Tool Runs"),data:R(L,"toolRuns"),dataKey:"toolRuns",color:"#f97316",yAxisLabel:"Number of Tool Runs",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}}:{type:"line",title:"Tool Runs",data:F,yAxisLabel:"Number of Tool Runs",lines:[{dataKey:"toolRuns",color:"#06b6d4",label:"Tool Runs"},{dataKey:"codeTools",color:"#f97316",label:"Code Tools"},{dataKey:"workflowTools",color:"#10b981",label:"Workflow Tools"},{dataKey:"knowledgeTools",color:"#8b5cf6",label:"Knowledge"},{dataKey:"mcpTools",color:"#ef4444",label:"MCP Tools"}],height:300,showGrid:!0,showLegend:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}};case"modelRuns":return k(w).length===1?{type:"line",title:W("Model Runs"),data:R(L,"modelRuns"),dataKey:"modelRuns",color:"#10b981",yAxisLabel:"Number of Model Runs",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}}:{type:"line",title:W("Model Runs"),data:F,dataKey:"modelRuns",color:"#10b981",yAxisLabel:"Number of Model Runs",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}};default:return null}},I=(()=>{const _=P();return _!=null&&_.controls?{..._.controls,dropdown:_.controls.dropdown?{..._.controls.dropdown,onChange:T}:void 0,toggle:_.controls.toggle?{..._.controls.toggle,chartView:y==="chart",tableView:y==="table",onToggle:m}:void 0}:c?{...c,dropdown:c.dropdown?{...c.dropdown,onChange:T}:void 0,toggle:c.toggle?{...c.toggle,chartView:d==="chart",tableView:d==="table",onToggle:m}:void 0}:void 0})(),B=(()=>{var F,W,G,X,Q,ae,te,q,Y,Z;const _=P();if(_!=null&&_.view){if((F=_.controls)!=null&&F.toggle){if(y==="table"&&_.view.table){let ie=_.view.table.data;if(_.metricType==="agentRuns"&&$(w)){const V=k(w);if(V.length>0){const se=((X=(G=(W=_.controls)==null?void 0:W.dropdown)==null?void 0:G.options)==null?void 0:X.filter(ee=>V.includes(ee.value)))||[];se.length>0&&(ie=ie.filter(ee=>se.some(ve=>ee.name===ve.label||ee.name&&ee.name.toLowerCase().includes(ve.label.toLowerCase()))))}}if(_.metricType==="toolRuns"&&$(w)){const V=k(w);if(V.length>0){const se=((te=(ae=(Q=_.controls)==null?void 0:Q.dropdown)==null?void 0:ae.options)==null?void 0:te.filter(ee=>V.includes(ee.value)))||[];se.length>0&&(ie=ie.filter(ee=>se.some(ve=>ee.name===ve.label||ee.name&&ee.name.toLowerCase().includes(ve.label.toLowerCase()))))}}if(_.metricType==="modelRuns"&&$(w)){const V=k(w);if(V.length>0){const se=((Z=(Y=(q=_.controls)==null?void 0:q.dropdown)==null?void 0:Y.options)==null?void 0:Z.filter(ee=>V.includes(ee.value)))||[];se.length>0&&(ie=ie.filter(ee=>se.some(ve=>ee.name===ve.label||ee.name&&ee.name.toLowerCase().includes(ve.label.toLowerCase()))))}}return{type:"table",table:{..._.view.table,data:ie}}}else if(y==="chart"&&_.view.chart)return{type:"chart",chart:j(_)||_.view.chart}}const D=j(_);return D?{..._.view,chart:D}:_.view}const L=N(g);return L?{type:"chart",chart:L}:{...u,type:d}})(),U=()=>l.map(_=>{const L=_.metricType||_.title.toLowerCase();return{..._,highlighted:_.highlighted||L===g}});return b.jsxs("div",{className:ce("bg-white rounded-lg border border-gray-200 p-6",t),style:{gridColumn:f!=null&&f.span?`span ${f.span}`:void 0,order:f==null?void 0:f.order},children:[o&&b.jsxs("div",{className:"mb-6",children:[b.jsx("h1",{className:"text-2xl font-semibold text-gray-900",children:o}),s&&b.jsx("p",{className:"text-sm text-gray-600 mt-1",children:s})]}),b.jsx("div",{className:"flex flex-col sm:flex-row gap-4 mb-6",children:r?b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"flex-1",children:b.jsx(mi,{})}),b.jsx("div",{className:"flex-1",children:b.jsx(mi,{})}),b.jsx("div",{className:"flex-1",children:b.jsx(mi,{})}),b.jsx("div",{className:"flex-1",children:b.jsx(mi,{})})]}):U().map((_,L)=>b.jsx("div",{className:"flex-1",children:b.jsx(Pf,{data:_,onClick:x})},`${i}-metric-${L}`))}),b.jsxs("div",{className:"flex items-center justify-between mb-6",children:[b.jsx("div",{children:P()&&b.jsx("h3",{className:"text-lg font-medium text-gray-900",children:(K=P())==null?void 0:K.title})}),I&&b.jsx(xb,{config:I})]}),b.jsx(bb,{config:B,isLoading:r||n,context:{sectionId:i,metricType:g}})]})},of=S.forwardRef(({className:e,variant:t="default",size:r="md",children:n,...a},i)=>{const o="inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",s={default:"bg-primary text-primary-foreground hover:bg-primary/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground"},l={sm:"h-9 px-3",md:"h-10 px-4 py-2",lg:"h-11 px-8"};return b.jsx("button",{className:ce(o,s[t],l[r],e),ref:i,...a,children:n})});of.displayName="Button";function $s(e){"@babel/helpers - typeof";return $s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$s(e)}function jt(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function ke(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function ze(e){ke(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||$s(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function pW(e,t){ke(2,arguments);var r=ze(e),n=jt(t);return isNaN(n)?new Date(NaN):(n&&r.setDate(r.getDate()+n),r)}function sf(e,t){ke(2,arguments);var r=ze(e),n=jt(t);if(isNaN(n))return new Date(NaN);if(!n)return r;var a=r.getDate(),i=new Date(r.getTime());i.setMonth(r.getMonth()+n+1,0);var o=i.getDate();return a>=o?i:(r.setFullYear(i.getFullYear(),i.getMonth(),a),r)}function vW(e,t){ke(2,arguments);var r=ze(e).getTime(),n=jt(t);return new Date(r+n)}var yW={};function gi(){return yW}function mW(e,t){var r,n,a,i,o,s;ke(1,arguments);var l=gi(),u=jt((r=(n=(a=(i=void 0)!==null&&i!==void 0?i:void 0)!==null&&a!==void 0?a:l.weekStartsOn)!==null&&n!==void 0?n:(o=l.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&r!==void 0?r:0);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var c=ze(e),f=c.getDay(),d=(f<u?7:0)+f-u;return c.setDate(c.getDate()-d),c.setHours(0,0,0,0),c}function gW(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function Yr(e){ke(1,arguments);var t=ze(e);return t.setHours(0,0,0,0),t}function bi(e,t){ke(2,arguments);var r=Yr(e),n=Yr(t);return r.getTime()===n.getTime()}function bW(e){return ke(1,arguments),e instanceof Date||$s(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function xW(e){if(ke(1,arguments),!bW(e)&&typeof e!="number")return!1;var t=ze(e);return!isNaN(Number(t))}function wW(e){ke(1,arguments);var t=ze(e);return t.setHours(23,59,59,999),t}function OW(e){ke(1,arguments);var t=ze(e);return t.setDate(1),t.setHours(0,0,0,0),t}function SW(e,t){ke(2,arguments);var r=jt(t);return vW(e,-r)}var AW=864e5;function TW(e){ke(1,arguments);var t=ze(e),r=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var n=t.getTime(),a=r-n;return Math.floor(a/AW)+1}function Cs(e){ke(1,arguments);var t=1,r=ze(e),n=r.getUTCDay(),a=(n<t?7:0)+n-t;return r.setUTCDate(r.getUTCDate()-a),r.setUTCHours(0,0,0,0),r}function Ob(e){ke(1,arguments);var t=ze(e),r=t.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(r+1,0,4),n.setUTCHours(0,0,0,0);var a=Cs(n),i=new Date(0);i.setUTCFullYear(r,0,4),i.setUTCHours(0,0,0,0);var o=Cs(i);return t.getTime()>=a.getTime()?r+1:t.getTime()>=o.getTime()?r:r-1}function PW(e){ke(1,arguments);var t=Ob(e),r=new Date(0);r.setUTCFullYear(t,0,4),r.setUTCHours(0,0,0,0);var n=Cs(r);return n}var _W=6048e5;function EW(e){ke(1,arguments);var t=ze(e),r=Cs(t).getTime()-PW(t).getTime();return Math.round(r/_W)+1}function Ms(e,t){var r,n,a,i,o,s,l,u;ke(1,arguments);var c=gi(),f=jt((r=(n=(a=(i=t==null?void 0:t.weekStartsOn)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&a!==void 0?a:c.weekStartsOn)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=ze(e),h=d.getUTCDay(),y=(h<f?7:0)+h-f;return d.setUTCDate(d.getUTCDate()-y),d.setUTCHours(0,0,0,0),d}function Sb(e,t){var r,n,a,i,o,s,l,u;ke(1,arguments);var c=ze(e),f=c.getUTCFullYear(),d=gi(),h=jt((r=(n=(a=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&a!==void 0?a:d.firstWeekContainsDate)!==null&&n!==void 0?n:(l=d.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:1);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=new Date(0);y.setUTCFullYear(f+1,0,h),y.setUTCHours(0,0,0,0);var v=Ms(y,t),p=new Date(0);p.setUTCFullYear(f,0,h),p.setUTCHours(0,0,0,0);var g=Ms(p,t);return c.getTime()>=v.getTime()?f+1:c.getTime()>=g.getTime()?f:f-1}function jW(e,t){var r,n,a,i,o,s,l,u;ke(1,arguments);var c=gi(),f=jt((r=(n=(a=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&a!==void 0?a:c.firstWeekContainsDate)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:1),d=Sb(e,t),h=new Date(0);h.setUTCFullYear(d,0,f),h.setUTCHours(0,0,0,0);var y=Ms(h,t);return y}var $W=6048e5;function CW(e,t){ke(1,arguments);var r=ze(e),n=Ms(r,t).getTime()-jW(r,t).getTime();return Math.round(n/$W)+1}function _e(e,t){for(var r=e<0?"-":"",n=Math.abs(e).toString();n.length<t;)n="0"+n;return r+n}var Pr={y:function(t,r){var n=t.getUTCFullYear(),a=n>0?n:1-n;return _e(r==="yy"?a%100:a,r.length)},M:function(t,r){var n=t.getUTCMonth();return r==="M"?String(n+1):_e(n+1,2)},d:function(t,r){return _e(t.getUTCDate(),r.length)},a:function(t,r){var n=t.getUTCHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(t,r){return _e(t.getUTCHours()%12||12,r.length)},H:function(t,r){return _e(t.getUTCHours(),r.length)},m:function(t,r){return _e(t.getUTCMinutes(),r.length)},s:function(t,r){return _e(t.getUTCSeconds(),r.length)},S:function(t,r){var n=r.length,a=t.getUTCMilliseconds(),i=Math.floor(a*Math.pow(10,n-3));return _e(i,r.length)}},na={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},MW={G:function(t,r,n){var a=t.getUTCFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return n.era(a,{width:"abbreviated"});case"GGGGG":return n.era(a,{width:"narrow"});case"GGGG":default:return n.era(a,{width:"wide"})}},y:function(t,r,n){if(r==="yo"){var a=t.getUTCFullYear(),i=a>0?a:1-a;return n.ordinalNumber(i,{unit:"year"})}return Pr.y(t,r)},Y:function(t,r,n,a){var i=Sb(t,a),o=i>0?i:1-i;if(r==="YY"){var s=o%100;return _e(s,2)}return r==="Yo"?n.ordinalNumber(o,{unit:"year"}):_e(o,r.length)},R:function(t,r){var n=Ob(t);return _e(n,r.length)},u:function(t,r){var n=t.getUTCFullYear();return _e(n,r.length)},Q:function(t,r,n){var a=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"Q":return String(a);case"QQ":return _e(a,2);case"Qo":return n.ordinalNumber(a,{unit:"quarter"});case"QQQ":return n.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(a,{width:"wide",context:"formatting"})}},q:function(t,r,n){var a=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"q":return String(a);case"qq":return _e(a,2);case"qo":return n.ordinalNumber(a,{unit:"quarter"});case"qqq":return n.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(a,{width:"wide",context:"standalone"})}},M:function(t,r,n){var a=t.getUTCMonth();switch(r){case"M":case"MM":return Pr.M(t,r);case"Mo":return n.ordinalNumber(a+1,{unit:"month"});case"MMM":return n.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(a,{width:"wide",context:"formatting"})}},L:function(t,r,n){var a=t.getUTCMonth();switch(r){case"L":return String(a+1);case"LL":return _e(a+1,2);case"Lo":return n.ordinalNumber(a+1,{unit:"month"});case"LLL":return n.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(a,{width:"wide",context:"standalone"})}},w:function(t,r,n,a){var i=CW(t,a);return r==="wo"?n.ordinalNumber(i,{unit:"week"}):_e(i,r.length)},I:function(t,r,n){var a=EW(t);return r==="Io"?n.ordinalNumber(a,{unit:"week"}):_e(a,r.length)},d:function(t,r,n){return r==="do"?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):Pr.d(t,r)},D:function(t,r,n){var a=TW(t);return r==="Do"?n.ordinalNumber(a,{unit:"dayOfYear"}):_e(a,r.length)},E:function(t,r,n){var a=t.getUTCDay();switch(r){case"E":case"EE":case"EEE":return n.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(a,{width:"short",context:"formatting"});case"EEEE":default:return n.day(a,{width:"wide",context:"formatting"})}},e:function(t,r,n,a){var i=t.getUTCDay(),o=(i-a.weekStartsOn+8)%7||7;switch(r){case"e":return String(o);case"ee":return _e(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(t,r,n,a){var i=t.getUTCDay(),o=(i-a.weekStartsOn+8)%7||7;switch(r){case"c":return String(o);case"cc":return _e(o,r.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(t,r,n){var a=t.getUTCDay(),i=a===0?7:a;switch(r){case"i":return String(i);case"ii":return _e(i,r.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(a,{width:"short",context:"formatting"});case"iiii":default:return n.day(a,{width:"wide",context:"formatting"})}},a:function(t,r,n){var a=t.getUTCHours(),i=a/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(t,r,n){var a=t.getUTCHours(),i;switch(a===12?i=na.noon:a===0?i=na.midnight:i=a/12>=1?"pm":"am",r){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(t,r,n){var a=t.getUTCHours(),i;switch(a>=17?i=na.evening:a>=12?i=na.afternoon:a>=4?i=na.morning:i=na.night,r){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(t,r,n){if(r==="ho"){var a=t.getUTCHours()%12;return a===0&&(a=12),n.ordinalNumber(a,{unit:"hour"})}return Pr.h(t,r)},H:function(t,r,n){return r==="Ho"?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):Pr.H(t,r)},K:function(t,r,n){var a=t.getUTCHours()%12;return r==="Ko"?n.ordinalNumber(a,{unit:"hour"}):_e(a,r.length)},k:function(t,r,n){var a=t.getUTCHours();return a===0&&(a=24),r==="ko"?n.ordinalNumber(a,{unit:"hour"}):_e(a,r.length)},m:function(t,r,n){return r==="mo"?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):Pr.m(t,r)},s:function(t,r,n){return r==="so"?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):Pr.s(t,r)},S:function(t,r){return Pr.S(t,r)},X:function(t,r,n,a){var i=a._originalDate||t,o=i.getTimezoneOffset();if(o===0)return"Z";switch(r){case"X":return Tb(o);case"XXXX":case"XX":return Xr(o);case"XXXXX":case"XXX":default:return Xr(o,":")}},x:function(t,r,n,a){var i=a._originalDate||t,o=i.getTimezoneOffset();switch(r){case"x":return Tb(o);case"xxxx":case"xx":return Xr(o);case"xxxxx":case"xxx":default:return Xr(o,":")}},O:function(t,r,n,a){var i=a._originalDate||t,o=i.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+Ab(o,":");case"OOOO":default:return"GMT"+Xr(o,":")}},z:function(t,r,n,a){var i=a._originalDate||t,o=i.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+Ab(o,":");case"zzzz":default:return"GMT"+Xr(o,":")}},t:function(t,r,n,a){var i=a._originalDate||t,o=Math.floor(i.getTime()/1e3);return _e(o,r.length)},T:function(t,r,n,a){var i=a._originalDate||t,o=i.getTime();return _e(o,r.length)}};function Ab(e,t){var r=e>0?"-":"+",n=Math.abs(e),a=Math.floor(n/60),i=n%60;if(i===0)return r+String(a);var o=t;return r+String(a)+o+_e(i,2)}function Tb(e,t){if(e%60===0){var r=e>0?"-":"+";return r+_e(Math.abs(e)/60,2)}return Xr(e,t)}function Xr(e,t){var r=t||"",n=e>0?"-":"+",a=Math.abs(e),i=_e(Math.floor(a/60),2),o=_e(a%60,2);return n+i+r+o}var Pb=function(t,r){switch(t){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},_b=function(t,r){switch(t){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},kW=function(t,r){var n=t.match(/(P+)(p+)?/)||[],a=n[1],i=n[2];if(!i)return Pb(t,r);var o;switch(a){case"P":o=r.dateTime({width:"short"});break;case"PP":o=r.dateTime({width:"medium"});break;case"PPP":o=r.dateTime({width:"long"});break;case"PPPP":default:o=r.dateTime({width:"full"});break}return o.replace("{{date}}",Pb(a,r)).replace("{{time}}",_b(i,r))},NW={p:_b,P:kW},DW=["D","DD"],IW=["YY","YYYY"];function LW(e){return DW.indexOf(e)!==-1}function RW(e){return IW.indexOf(e)!==-1}function Eb(e,t,r){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var BW={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},FW=function(t,r,n){var a,i=BW[t];return typeof i=="string"?a=i:r===1?a=i.one:a=i.other.replace("{{count}}",r.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+a:a+" ago":a};function lf(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.width?String(t.width):e.defaultWidth,n=e.formats[r]||e.formats[e.defaultWidth];return n}}var WW={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},UW={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},zW={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},KW={date:lf({formats:WW,defaultWidth:"full"}),time:lf({formats:UW,defaultWidth:"full"}),dateTime:lf({formats:zW,defaultWidth:"full"})},GW={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},qW=function(t,r,n,a){return GW[t]};function xi(e){return function(t,r){var n=r!=null&&r.context?String(r.context):"standalone",a;if(n==="formatting"&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,o=r!=null&&r.width?String(r.width):i;a=e.formattingValues[o]||e.formattingValues[i]}else{var s=e.defaultWidth,l=r!=null&&r.width?String(r.width):e.defaultWidth;a=e.values[l]||e.values[s]}var u=e.argumentCallback?e.argumentCallback(t):t;return a[u]}}var VW={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},HW={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},YW={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},XW={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},JW={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},ZW={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},QW=function(t,r){var n=Number(t),a=n%100;if(a>20||a<10)switch(a%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},eU={ordinalNumber:QW,era:xi({values:VW,defaultWidth:"wide"}),quarter:xi({values:HW,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:xi({values:YW,defaultWidth:"wide"}),day:xi({values:XW,defaultWidth:"wide"}),dayPeriod:xi({values:JW,defaultWidth:"wide",formattingValues:ZW,defaultFormattingWidth:"wide"})};function wi(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],i=t.match(a);if(!i)return null;var o=i[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?rU(s,function(f){return f.test(o)}):tU(s,function(f){return f.test(o)}),u;u=e.valueCallback?e.valueCallback(l):l,u=r.valueCallback?r.valueCallback(u):u;var c=t.slice(o.length);return{value:u,rest:c}}}function tU(e,t){for(var r in e)if(e.hasOwnProperty(r)&&t(e[r]))return r}function rU(e,t){for(var r=0;r<e.length;r++)if(t(e[r]))return r}function nU(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.match(e.matchPattern);if(!n)return null;var a=n[0],i=t.match(e.parsePattern);if(!i)return null;var o=e.valueCallback?e.valueCallback(i[0]):i[0];o=r.valueCallback?r.valueCallback(o):o;var s=t.slice(a.length);return{value:o,rest:s}}}var aU=/^(\d+)(th|st|nd|rd)?/i,iU=/\d+/i,oU={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},sU={any:[/^b/i,/^(a|c)/i]},lU={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},uU={any:[/1/i,/2/i,/3/i,/4/i]},cU={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},fU={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},dU={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},hU={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},pU={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},vU={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},yU={ordinalNumber:nU({matchPattern:aU,parsePattern:iU,valueCallback:function(t){return parseInt(t,10)}}),era:wi({matchPatterns:oU,defaultMatchWidth:"wide",parsePatterns:sU,defaultParseWidth:"any"}),quarter:wi({matchPatterns:lU,defaultMatchWidth:"wide",parsePatterns:uU,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:wi({matchPatterns:cU,defaultMatchWidth:"wide",parsePatterns:fU,defaultParseWidth:"any"}),day:wi({matchPatterns:dU,defaultMatchWidth:"wide",parsePatterns:hU,defaultParseWidth:"any"}),dayPeriod:wi({matchPatterns:pU,defaultMatchWidth:"any",parsePatterns:vU,defaultParseWidth:"any"})},mU={code:"en-US",formatDistance:FW,formatLong:KW,formatRelative:qW,localize:eU,match:yU,options:{weekStartsOn:0,firstWeekContainsDate:1}},gU=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,bU=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,xU=/^'([^]*?)'?$/,wU=/''/g,OU=/[a-zA-Z]/;function ks(e,t,r){var n,a,i,o,s,l,u,c,f,d,h,y,v,p;ke(2,arguments);var g=String(t),O=gi(),w=(n=(a=void 0)!==null&&a!==void 0?a:O.locale)!==null&&n!==void 0?n:mU,A=jt((i=(o=(s=(l=void 0)!==null&&l!==void 0?l:void 0)!==null&&s!==void 0?s:O.firstWeekContainsDate)!==null&&o!==void 0?o:(u=O.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(A>=1&&A<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var m=jt((f=(d=(h=(y=void 0)!==null&&y!==void 0?y:void 0)!==null&&h!==void 0?h:O.weekStartsOn)!==null&&d!==void 0?d:(v=O.locale)===null||v===void 0||(p=v.options)===null||p===void 0?void 0:p.weekStartsOn)!==null&&f!==void 0?f:0);if(!(m>=0&&m<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!w.localize)throw new RangeError("locale must contain localize property");if(!w.formatLong)throw new RangeError("locale must contain formatLong property");var x=ze(e);if(!xW(x))throw new RangeError("Invalid time value");var T=gW(x),P=SW(x,T),$={firstWeekContainsDate:A,weekStartsOn:m,locale:w,_originalDate:x},k=g.match(bU).map(function(E){var j=E[0];if(j==="p"||j==="P"){var R=NW[j];return R(E,w.formatLong)}return E}).join("").match(gU).map(function(E){if(E==="''")return"'";var j=E[0];if(j==="'")return SU(E);var R=MW[j];if(R)return RW(E)&&Eb(E,t,String(e)),LW(E)&&Eb(E,t,String(e)),R(P,E,w.localize,$);if(j.match(OU))throw new RangeError("Format string contains an unescaped latin alphabet character `"+j+"`");return E}).join("");return k}function SU(e){var t=e.match(xU);return t?t[1].replace(wU,"'"):e}function jb(e,t){ke(2,arguments);var r=ze(e),n=ze(t);return r.getTime()<n.getTime()}function AU(e,t){ke(2,arguments);var r=ze(e).getTime(),n=ze(t.start).getTime(),a=ze(t.end).getTime();if(!(n<=a))throw new RangeError("Invalid interval");return r>=n&&r<=a}function Ns(e,t){ke(2,arguments);var r=jt(t);return pW(e,-r)}function $b(e,t){ke(2,arguments);var r=jt(t);return sf(e,-r)}const Cb=({children:e})=>{const[t,r]=S.useState(!1);return S.useEffect(()=>(r(!0),()=>r(!1)),[]),t?Qr.createPortal(e,document.body):null};function Mb({className:e,defaultValue:t,onDateRangeChange:r}){console.log("🗓️ DateRangePicker component rendered with props:",{className:e,defaultValue:t,hasCallback:!!r});const n=[{label:"Today",value:"today",dateRange:{from:Yr(new Date),to:new Date}},{label:"Yesterday",value:"yesterday",dateRange:{from:Yr(Ns(new Date,1)),to:wW(Ns(new Date,1))}},{label:"This week",value:"thisWeek",dateRange:{from:mW(new Date),to:new Date}},{label:"Last 7 days",value:"7d",dateRange:{from:Yr(Ns(new Date,6)),to:new Date}},{label:"This month",value:"thisMonth",dateRange:{from:OW(new Date),to:new Date}},{label:"Last 30 days",value:"30d",dateRange:{from:Yr(Ns(new Date,29)),to:new Date}},{label:"Last 3 months",value:"90d",dateRange:{from:Yr($b(new Date,3)),to:new Date}}],a=t?n.find(C=>C.value===t):null;console.log("📅 DateRangePicker initialization:",{defaultValue:t,defaultPreset:a==null?void 0:a.label,hasDateRange:!!(a!=null&&a.dateRange),allPresetValues:n.map(C=>C.value),foundPreset:!!a});const[i,o]=S.useState(a==null?void 0:a.dateRange),[s,l]=S.useState(a==null?void 0:a.dateRange),[u,c]=S.useState(!1),[f,d]=S.useState((a==null?void 0:a.label)||null),[h,y]=S.useState((a==null?void 0:a.label)||null),[v,p]=S.useState(new Date),[g,O]=S.useState(null),[w,A]=S.useState({top:0,left:0}),m=S.useRef(null),x=S.useRef(null);S.useEffect(()=>{var C,B;console.log("📅 DateRangePicker useEffect running:",{hasDefaultPreset:!!a,hasOnDateRangeChange:!!r,currentDate:i,currentLabel:f,defaultValue:t,defaultPresetLabel:a==null?void 0:a.label,defaultPresetValue:a==null?void 0:a.value}),a!=null&&a.dateRange&&r?(console.log("📅 DateRangePicker: Setting initial default value:",{label:a.label,dateRange:a.dateRange,from:(C=a.dateRange.from)==null?void 0:C.toLocaleDateString(),to:(B=a.dateRange.to)==null?void 0:B.toLocaleDateString()}),r(a.dateRange)):console.log("📅 DateRangePicker: NOT setting initial value because:",{hasDefaultPreset:!!a,hasDateRange:!!(a!=null&&a.dateRange),hasCallback:!!r,presetLabelsAvailable:n.map(U=>`${U.value}:${U.label}`)})},[]),S.useEffect(()=>{t&&(a!=null&&a.dateRange)&&(console.log("📅 DateRangePicker: DefaultValue changed, updating state:",{defaultValue:t,label:a.label}),o(a.dateRange),d(a.label),l(a.dateRange),y(a.label))},[t]);const T=()=>{if(!x.current)return;const C=x.current.getBoundingClientRect(),B=window.scrollY,U=window.scrollX,K=window.innerWidth,_=window.innerHeight,L=720,F=450;let W=C.bottom+B+8,G=C.left+U;G+L>K&&(G=C.right+U-L),G+L>K&&(G=K-L-20),W+F>_&&(W=C.top+B-F-8),G<20&&(G=20),W<20&&(W=20),A({top:W,left:G})};S.useEffect(()=>{const C=()=>{u&&T()};return u&&(window.addEventListener("resize",C),window.addEventListener("scroll",C)),()=>{window.removeEventListener("resize",C),window.removeEventListener("scroll",C)}},[u]);const P=(C,B)=>{if(l(C),y(B),O(null),C.from){const U=new Date(C.from.getFullYear(),C.from.getMonth(),1);p(U)}},$=C=>{if(!g)O(C),l({from:C,to:C}),y(null);else{const B=jb(C,g)?C:g,U=jb(C,g)?g:C;l({from:B,to:U}),O(null),y(null)}},k=()=>{o(s),d(h),r==null||r(s),c(!1),O(null)},E=()=>{l(void 0),y(null),o(void 0),d(null),r==null||r(void 0),c(!1),O(null)},j=C=>{C?(l(i),y(f),O(null),setTimeout(T,0)):(l(i),y(f),O(null)),c(C)},R=(C,B)=>(console.log("📅 formatDateRange called with:",{presetLabel:B,hasDateRange:!!(C!=null&&C.from)}),B||(C!=null&&C.from?!C.to||bi(C.from,C.to)?ks(C.from,"MMM dd, yyyy"):`${ks(C.from,"MMM dd, yyyy")} - ${ks(C.to,"MMM dd, yyyy")}`:"Pick a date range")),N=(C=0)=>{const B=sf(v,C),U=B.getFullYear(),K=B.getMonth(),_=new Date(U,K,1),F=new Date(U,K+1,0).getDate(),W=_.getDay(),G=["January","February","March","April","May","June","July","August","September","October","November","December"],X=["Su","Mo","Tu","We","Th","Fr","Sa"],Q=[],te=new Date(U,K-1,0).getDate();for(let Z=W-1;Z>=0;Z--){const D=te-Z,ie=new Date(U,K-1,D);Q.push(b.jsx("button",{onClick:()=>$(ie),className:"h-8 w-8 text-xs text-gray-400 hover:bg-gray-100 rounded flex items-center justify-center",children:D},`prev-${D}`))}for(let Z=1;Z<=F;Z++){const D=new Date(U,K,Z),ie=bi(D,new Date),V=(s==null?void 0:s.from)&&(s==null?void 0:s.to)&&AU(D,{start:s.from,end:s.to}),se=(s==null?void 0:s.from)&&bi(D,s.from),ee=(s==null?void 0:s.to)&&bi(D,s.to),ve=g&&bi(D,g);let We="h-8 w-8 text-xs hover:bg-gray-100 rounded flex items-center justify-center transition-colors ";ie&&(We+="font-semibold "),ve||se||ee?We+="bg-blue-500 text-white hover:bg-blue-600 ":V&&(We+="bg-blue-100 text-blue-900 "),Q.push(b.jsx("button",{onClick:()=>$(D),className:We,children:Z},`current-${Z}`))}const Y=Math.ceil((W+F)/7)*7-W-F;for(let Z=1;Z<=Y;Z++){const D=new Date(U,K+1,Z);Q.push(b.jsx("button",{onClick:()=>$(D),className:"h-8 w-8 text-xs text-gray-400 hover:bg-gray-100 rounded flex items-center justify-center",children:Z},`next-${Z}`))}return b.jsxs("div",{className:"p-3",children:[b.jsxs("div",{className:"flex items-center justify-between mb-3",children:[C===0&&b.jsx("button",{onClick:()=>p($b(v,1)),className:"p-1 hover:bg-gray-100 rounded",children:b.jsx(Zb,{className:"h-4 w-4"})}),b.jsxs("div",{className:"font-medium text-sm",children:[G[K]," ",U]}),C===1&&b.jsx("button",{onClick:()=>p(sf(v,1)),className:"p-1 hover:bg-gray-100 rounded",children:b.jsx(Qb,{className:"h-4 w-4"})})]}),b.jsx("div",{className:"grid grid-cols-7 gap-1 mb-2",children:X.map(Z=>b.jsx("div",{className:"h-8 flex items-center justify-center text-xs font-medium text-gray-500",children:Z},Z))}),b.jsx("div",{className:"grid grid-cols-7 gap-1",children:Q})]})},I=()=>"fixed bg-white border border-gray-200 rounded-lg shadow-xl z-[99999]";return b.jsxs("div",{className:`relative ${e}`,children:[b.jsxs("button",{ref:x,onClick:()=>j(!u),className:`min-w-[200px] px-3 py-2 text-left border border-gray-300 rounded-md shadow-sm bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 flex items-center ${i?"text-gray-900":"text-gray-500"}`,children:[b.jsx(vf,{className:"mr-2 h-4 w-4"}),(()=>{const C=R(i,f);return console.log("📅 Button display text:",{displayText:C,date:i,selectedPresetLabel:f}),C})()]}),u&&b.jsxs(Cb,{children:[b.jsx("div",{className:"fixed inset-0 z-[99998] bg-black bg-opacity-10",onClick:()=>j(!1)}),b.jsxs("div",{ref:m,className:I(),style:{top:w.top,left:w.left,width:"720px",minWidth:"720px",maxHeight:"90vh"},onClick:C=>C.stopPropagation(),children:[b.jsxs("div",{className:"flex",children:[b.jsxs("div",{className:"flex flex-col gap-1 p-3 border-r border-gray-200 w-[160px] flex-shrink-0",children:[b.jsx("div",{className:"text-sm font-medium text-gray-500 mb-2",children:"Presets"}),n.map(C=>b.jsx("button",{onClick:()=>P(C.dateRange,C.label),className:`text-left px-2 py-1.5 text-sm rounded hover:bg-gray-100 transition-colors ${h===C.label?"bg-gray-100":""}`,children:C.label},C.label))]}),b.jsxs("div",{className:"flex flex-1",children:[N(0),N(1)]})]}),b.jsxs("div",{className:"border-t border-gray-200 p-3 flex justify-end gap-2",children:[b.jsx("button",{onClick:E,className:"px-3 py-1.5 text-sm border border-gray-300 rounded hover:bg-gray-50 transition-colors",children:"Clear"}),b.jsx("button",{onClick:k,disabled:!(s!=null&&s.from),className:"px-3 py-1.5 text-sm bg-blue-600 text-white rounded hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:"Apply"})]})]})]})]})}class kb{constructor(t=""){Bt(this,"API_PATH","/tracing/api/trpc/metrics.getMetrics");Bt(this,"baseUrl","");Bt(this,"endpoints",{});this.baseUrl=t,this.initializeEndpoints()}setBaseUrl(t){this.baseUrl=t,this.initializeEndpoints()}getEndpoint(t){return this.endpoints[t]||{endpoint:"",method:"GET"}}getBaseUrl(){return this.baseUrl}initializeEndpoints(){const t=`${this.baseUrl}${this.API_PATH}`;this.endpoints["usage-analytics.cards"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH},this.endpoints["usage-analytics.sessions.timeseries"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH},this.endpoints["usage-analytics.messages.timeseries"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH},this.endpoints["usage-analytics.users.timeseries"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH},this.endpoints["usage-analytics.tokens.timeseries"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH},this.endpoints["runs.cards"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH},this.endpoints["runs.agent-runs.timeseries"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH},this.endpoints["runs.model-runs.timeseries"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH},this.endpoints["runs.tool-runs.timeseries"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH}}getAvailableEndpoints(){return Object.keys(this.endpoints)}hasEndpoint(t){return t in this.endpoints}}class Nb{constructor(t){Bt(this,"endpointsService");Bt(this,"defaultHeaders");Bt(this,"timeout");this.endpointsService=new kb(t.baseUrl),this.defaultHeaders={"Content-Type":"application/json",...t.defaultHeaders},this.timeout=t.timeout||3e4}updateConfig(t){t.baseUrl&&this.endpointsService.setBaseUrl(t.baseUrl),t.defaultHeaders&&(this.defaultHeaders={...this.defaultHeaders,...t.defaultHeaders}),t.timeout&&(this.timeout=t.timeout)}async invoke(t,r,n,a){const i=this.endpointsService.getEndpoint(t);if(!i.endpoint)throw new Error(`Endpoint not found for service: ${t}`);const o=this.prepareRequest(i,r,n);try{const s=new AbortController,l=setTimeout(()=>s.abort(),(a==null?void 0:a.timeout)||this.timeout),u=await fetch(o.url,{method:o.method,headers:o.headers,body:o.body,signal:(a==null?void 0:a.signal)||s.signal});if(clearTimeout(l),!u.ok)throw new Error(`HTTP Error: ${u.status} ${u.statusText}`);return await u.json()}catch(s){throw s instanceof Error?s.name==="AbortError"?new Error("Request timeout"):s:new Error("Unknown error occurred during API call")}}prepareRequest(t,r,n){const a={...this.defaultHeaders,...n},i={};Object.entries(a).forEach(([l,u])=>{u!==void 0&&(i[l]=u)});let o=t.endpoint,s;if(t.method==="GET"&&r){const l=this.buildQueryParams(r);o+=`?${l}`}else r&&(s=JSON.stringify(r));return{url:o,method:t.method,headers:i,body:s}}buildQueryParams(t){const r={json:t},n=new URLSearchParams;return n.append("input",JSON.stringify(r)),n.append("rnd",Math.random().toString(36).substring(7)),n.toString()}getBaseUrl(){return this.endpointsService.getBaseUrl()}hasEndpoint(t){return this.endpointsService.hasEndpoint(t)}getAvailableEndpoints(){return this.endpointsService.getAvailableEndpoints()}}class ur{constructor(t){Bt(this,"apiInvoker");Bt(this,"projectId");Bt(this,"environment");Bt(this,"defaultTimeRange");const r={baseUrl:t.baseUrl,defaultHeaders:t.headers,timeout:3e4};this.apiInvoker=new Nb(r),this.projectId=t.projectId,this.environment=t.environment,this.defaultTimeRange=t.defaultTimeRange}updateConfig(t){(t.baseUrl||t.headers)&&this.apiInvoker.updateConfig({baseUrl:t.baseUrl,defaultHeaders:t.headers}),t.projectId&&(this.projectId=t.projectId),t.environment&&(this.environment=t.environment),t.defaultTimeRange&&(this.defaultTimeRange=t.defaultTimeRange,console.log("🔄 API Service: Updated defaultTimeRange:",this.defaultTimeRange))}getDefaultTimeRange(){return this.defaultTimeRange||ur.getDateRange(30)}async fetchEnvironments(){try{const r=`${this.apiInvoker.getBaseUrl()}/aaa/api/v1/apps/${this.projectId}/environments?rnd=${Math.random().toString(36).substring(2,8)}`;console.log("🌍 Fetching environments for project:",this.projectId),console.log("🔗 Environment API URL:",r);const n=await fetch(r,{method:"GET",headers:{"Content-Type":"application/json",...this.apiInvoker.defaultHeaders}});if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);const a=await n.json();return console.log("✅ Environments fetched successfully:",a.map(i=>({name:i.envName,enabled:i.isEnabled,status:i.status}))),a}catch(t){throw console.error("❌ Error fetching environments:",t),t}}async fetchUsageAnalyticsCards(t,r,n,a=[]){const i=n||ur.getTimeDimension(t,r);console.log("📊 Fetching usage analytics cards:",{dateRange:{fromTimestamp:t,toTimestamp:r},providedTimeDimension:n,resolvedTimeDimension:i});const o={projectId:this.projectId,type:"cards",category:"usage-analytics",envId:this.environment,fromTimestamp:t,toTimestamp:r,filter:a,includeTrends:!0,timeDimension:i};return(await this.apiInvoker.invoke("usage-analytics.cards",o)).result.data.json}async fetchRunsCards(t,r,n,a=[]){const i=n||ur.getTimeDimension(t,r);console.log("📊 Fetching runs cards:",{dateRange:{fromTimestamp:t,toTimestamp:r},providedTimeDimension:n,resolvedTimeDimension:i});const o={projectId:this.projectId,type:"cards",category:"runs",envId:this.environment,fromTimestamp:t,toTimestamp:r,filter:a,includeTrends:!0,timeDimension:i};return(await this.apiInvoker.invoke("runs.cards",o)).result.data.json}async fetchTimeSeriesData(t,r,n,a,i,o=[]){const s=i||ur.getTimeDimension(n,a);console.log("📊 Fetching time series data:",{metric:t,category:r,dateRange:{fromTimestamp:n,toTimestamp:a},providedTimeDimension:i,resolvedTimeDimension:s});const l=`${r}.${t}.timeseries`,u={projectId:this.projectId,type:"time-series",category:r,envId:this.environment,fromTimestamp:n,toTimestamp:a,filter:o,metric:t,timeDimension:s};return(await this.apiInvoker.invoke(l,u)).result.data.json}transformUsageAnalyticsCards(t){const r=t.data.trends;console.log("Transforming usage analytics cards with trends:",r);const n=a=>a>0?"increase":"decrease";return[{title:"Users",value:t.data.users,metricType:"users",icon:"users",highlighted:!0,change:r!=null&&r.users?{value:Math.abs(r.users.changePercent),type:n(r.users.changePercent)}:void 0},{title:"Sessions",value:t.data.sessions,metricType:"sessions",icon:"activity",highlighted:!1,change:r!=null&&r.sessions?{value:Math.abs(r.sessions.changePercent),type:n(r.sessions.changePercent)}:void 0},{title:"Messages",value:t.data.messages.total,metricType:"messages",icon:"message-circle",info:"Number of messages sent and received",highlighted:!1,change:r!=null&&r.messages?{value:Math.abs(r.messages.changePercent.total),type:n(r.messages.changePercent.total)}:void 0},{title:"Tokens",value:t.data.tokens.total,metricType:"tokens",icon:"coins",info:"Number of tokens used in input and output",highlighted:!1,change:r!=null&&r.tokens?{value:Math.abs(r.tokens.changePercent.total),type:n(r.tokens.changePercent.total)}:void 0}]}transformRunsCards(t){const r=t.data.trends;console.log("Transforming runs cards with trends:",r);const n=a=>a>0?"increase":"decrease";return[{title:"Agent Runs",value:t.data.agentRuns,metricType:"agentRuns",icon:"bot",highlighted:!0,change:r!=null&&r.agentRuns?{value:Math.abs(r.agentRuns.changePercent),type:n(r.agentRuns.changePercent)}:void 0},{title:"Tool Runs",value:t.data.toolRuns.total,metricType:"toolRuns",icon:"wrench",info:"Number of tool runs",highlighted:!1,change:r!=null&&r.toolRuns?{value:Math.abs(r.toolRuns.changePercent.total),type:n(r.toolRuns.changePercent.total)}:void 0},{title:"Model Runs",value:t.data.modelRuns,metricType:"modelRuns",icon:"cpu",highlighted:!1,change:r!=null&&r.modelRuns?{value:Math.abs(r.modelRuns.changePercent),type:n(r.modelRuns.changePercent)}:void 0}]}transformTimeSeriesDataForMetric(t,r){var a;if(console.log("=== METRIC-SPECIFIC TRANSFORM DEBUG ==="),console.log("Raw TimeSeriesResponse:",JSON.stringify(t,null,2)),console.log("Metric type:",r),!t||!t.data||!Array.isArray(t.data))return console.error("Invalid time series data structure:",t),[];const n=t.data.map((i,o)=>{console.log(`Processing point ${o}:`,i);const s=new Date(i.timestamp),l=s.toISOString().split("T")[0],u=s.toLocaleDateString("en-US",{month:"short",day:"numeric"}),c={date:l,timestamp:u,formattedDate:u,count:i.count||0,value:i.count||0,input_tokens:i.input_tokens||0,output_tokens:i.output_tokens||0,total_tokens:(i.input_tokens||0)+(i.output_tokens||0),inputTokens:i.input_tokens||0,outputTokens:i.output_tokens||0,totalTokens:(i.input_tokens||0)+(i.output_tokens||0),listView:i.listView||[],index:o};switch(r){case"users":c.users=i.count||0;break;case"sessions":c.sessions=i.count||0;break;case"messages":c.messages=i.count||0;break;case"tokens":c.tokens=i.count||0,i.input_tokens||i.output_tokens?c.totalTokens=(i.input_tokens||0)+(i.output_tokens||0):c.totalTokens=i.count||0;break;case"agentRuns":c.agentRuns=i.count||0;break;case"toolRuns":c.toolRuns=i.count||0;break;case"modelRuns":c.modelRuns=i.count||0;break;default:c.users=i.count||0,c.sessions=i.count||0,c.messages=i.count||0,c.tokens=i.count||0,c.agentRuns=i.count||0,c.toolRuns=i.count||0,c.modelRuns=i.count||0}return console.log(`Transformed point ${o} for metric ${r}:`,c),c});return console.log("Final transformed data array:",JSON.stringify(n,null,2)),console.log("Sample transformed point for chart:",n[0]),console.log("Populated metric property:",r,"=",(a=n[0])==null?void 0:a[r||"count"]),console.log("=== END METRIC-SPECIFIC TRANSFORM DEBUG ==="),n}transformTimeSeriesData(t){return this.transformTimeSeriesDataForMetric(t)}transformAgentsListViewToTable(t){return Array.isArray(t)?t.map((r,n)=>{var o,s;let a="",i=null;if(r.icon)try{if(i=typeof r.icon=="string"?JSON.parse(r.icon):r.icon,i.name){const l=((o=r.agentName)==null?void 0:o.replace(/\s+/g,""))||`agent${n}`,u=((s=i.color)==null?void 0:s.replace("#",""))||"b6e3f4";a=`https://api.dicebear.com/7.x/avataaars/svg?seed=${l}&backgroundColor=${u}&backgroundType=solid`}}catch{console.warn("Failed to parse icon data:",r.icon)}return{id:`agent-${n+1}`,name:r.agentName||`Agent ${n+1}`,runs:r.count||0,responseTime:r.avgResponseTime?`${Math.round(r.avgResponseTime)}s`:"0s",tokens:r.tokens||Math.floor((r.count||0)*150),successRate:r.successRate?`${Math.round(r.successRate)}%`:"95%",lastRun:r.lastRun||new Date(Date.now()-Math.random()*7*24*60*60*1e3).toLocaleDateString(),avatar:a||`https://api.dicebear.com/7.x/avataaars/svg?seed=agent${n}&backgroundColor=b6e3f4,c0aede,d1d4f9&backgroundType=solid`,icon:r.icon||void 0}}):(console.warn("Invalid listView data for agents:",t),[])}transformToolsListViewToTable(t){if(!Array.isArray(t))return console.warn("Invalid listView data for tools:",t),[];const r=n=>{const a=n.toLowerCase();return a.includes("calculate")||a.includes("compute")?"Code Tool":a.includes("workflow")||a.includes("process")?"Workflow Tool":a.includes("mcp")||a.includes("protocol")?"MCP Tool":a.includes("knowledge")||a.includes("search")||a.includes("fetch")?"Knowledge":"Code Tool"};return t.map((n,a)=>({id:`tool-${a+1}`,name:n.toolName||`Tool ${a+1}`,type:n.type||r(n.toolName||""),runs:n.count||0,responseTime:n.avgResponseTime?`${Math.round(n.avgResponseTime)}s`:"0s",tokens:n.tokens||Math.floor((n.count||0)*50),successRate:n.successRate?`${Math.round(n.successRate)}%`:"92%",lastRun:n.lastRun||new Date(Date.now()-Math.random()*7*24*60*60*1e3).toLocaleDateString(),icon:n.icon||void 0}))}transformModelsListViewToTable(t){if(!Array.isArray(t))return console.warn("Invalid listView data for models:",t),[];const r=n=>{const a=n.toLowerCase();return a.includes("gpt")||a.includes("openai")?"⚡":a.includes("claude")||a.includes("anthropic")?"A":a.includes("gemini")||a.includes("google")?"G":a.includes("llama")||a.includes("meta")?"M":"🤖"};return t.map((n,a)=>({id:`model-${a+1}`,name:n.modelName||`Model ${a+1}`,runs:n.count||0,responseTime:n.avgResponseTime?`${Math.round(n.avgResponseTime)}s`:"0s",tokens:n.tokens||Math.floor((n.count||0)*300),successRate:n.successRate?`${Math.round(n.successRate)}%`:"98%",lastRun:n.lastRun||new Date(Date.now()-Math.random()*7*24*60*60*1e3).toLocaleDateString(),icon:r(n.modelName||"")}))}extractAgentControlOptions(t){if(!Array.isArray(t))return[{label:"All Agents",value:"all"}];const r=[{label:"All Agents",value:"all"}];return t.forEach(n=>{var a;if(n.agentName){let i="";try{if(n.icon){const o=typeof n.icon=="string"?JSON.parse(n.icon):n.icon;if(o.name){const s=n.agentName.replace(/\s+/g,""),l=((a=o.color)==null?void 0:a.replace("#",""))||"b6e3f4";i=`https://api.dicebear.com/7.x/avataaars/svg?seed=${s}&backgroundColor=${l}&backgroundType=solid`}}}catch{console.warn("Failed to parse icon data for control:",n.icon)}r.push({label:n.agentName,value:n.agentName.replace(/\s+/g,"").toLowerCase(),avatar:i||`https://api.dicebear.com/7.x/avataaars/svg?seed=${n.agentName.replace(/\s+/g,"")}&backgroundColor=b6e3f4,c0aede,d1d4f9&backgroundType=solid`})}}),r}extractToolControlOptions(t){if(!Array.isArray(t))return[{label:"All Tools",value:"all"}];const r=[{label:"All Tools",value:"all"}];return t.forEach(n=>{if(n.toolName){const a=i=>{const o=i.toLowerCase();return o.includes("calculate")||o.includes("compute")?"Code Tool":o.includes("workflow")||o.includes("process")?"Workflow Tool":o.includes("mcp")||o.includes("protocol")?"MCP Tool":o.includes("knowledge")||o.includes("search")||o.includes("fetch")?"Knowledge":"Code Tool"};r.push({label:n.toolName,value:n.toolName.replace(/[-]/g,""),icon:n.icon||void 0,type:n.type||a(n.toolName)})}}),r}extractModelControlOptions(t){if(!Array.isArray(t))return[{label:"All Models",value:"all"}];const r=[{label:"All Models",value:"all"}],n=a=>{const i=a.toLowerCase();return i.includes("gpt")||i.includes("openai")?"⚡":i.includes("claude")||i.includes("anthropic")?"A":i.includes("gemini")||i.includes("google")?"G":i.includes("llama")||i.includes("meta")?"M":"🤖"};return t.forEach(a=>{a.modelName&&r.push({label:a.modelName,value:a.modelName.replace(/[-\.]/g,""),icon:n(a.modelName)})}),r}async fetchTimeSeriesDataWithTableData(t,r,n,a,i,o=[]){const s=await this.fetchTimeSeriesData(t,r,n,a,i,o);let l=[];s.data.forEach(d=>{d.listView&&Array.isArray(d.listView)&&(l=[...l,...d.listView])});const u=this.aggregateListViewItems(l);let c=[],f=[];return t==="agent-runs"?(c=this.transformAgentsListViewToTable(u),f=this.extractAgentControlOptions(u)):t==="tool-runs"?(c=this.transformToolsListViewToTable(u),f=this.extractToolControlOptions(u)):t==="model-runs"&&(c=this.transformModelsListViewToTable(u),f=this.extractModelControlOptions(u)),{chartData:this.transformTimeSeriesDataForMetric(s,t.replace("-","")),tableData:c,controlOptions:f}}aggregateListViewItems(t){const r=new Map;return t.forEach(n=>{const a=n.agentName||n.toolName||n.modelName||"unknown";if(r.has(a)){const i=r.get(a);i.count=(i.count||0)+(n.count||0),i.avgResponseTime=i.avgResponseTime&&n.avgResponseTime?(i.avgResponseTime+n.avgResponseTime)/2:i.avgResponseTime||n.avgResponseTime,i.tokens=(i.tokens||0)+(n.tokens||0)}else r.set(a,{...n})}),Array.from(r.values())}async fetchEnhancedMetricsData(t,r,n,a=[]){try{const[i,o,s]=await Promise.all([this.fetchTimeSeriesDataWithTableData("agent-runs","runs",t,r,n,a),this.fetchTimeSeriesDataWithTableData("tool-runs","runs",t,r,n,a),this.fetchTimeSeriesDataWithTableData("model-runs","runs",t,r,n,a)]);return{agents:i,tools:o,models:s}}catch(i){throw console.error("Error fetching enhanced metrics data:",i),i}}async transformRunsCardsWithEnhancedData(t,r,n,a,i=[]){const o=t.data.trends,s=h=>h>0?"increase":"decrease",[l,u,c,f]=await Promise.all([this.fetchTimeSeriesDataWithTableData("agent-runs","runs",r,n,a,i),this.fetchTimeSeriesDataWithTableData("tool-runs","runs",r,n,a,i),this.fetchTimeSeriesDataWithTableData("model-runs","runs",r,n,a,i),this.fetchTimeSeriesData("tool-runs","runs",r,n,a,i)]),d=this.transformTimeSeriesDataForToolRuns(f);return[{title:"Agent Runs",value:t.data.agentRuns,metricType:"agentRuns",icon:"bot",highlighted:!0,info:"Number of agent runs",change:o!=null&&o.agentRuns?{value:Math.abs(o.agentRuns.changePercent),type:s(o.agentRuns.changePercent)}:void 0,view:{type:"chart",chart:{type:"line",title:"Agent Runs",data:l.chartData,dataKey:"agentRuns",color:"#0BA5EC",yAxisLabel:"Number of Agent Runs",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:r.split("T")[0],end:n.split("T")[0]}},table:{title:"Agent Runs",data:l.tableData,columns:[{key:"name",title:"Name",width:200,align:"left"},{key:"runs",title:"Runs",width:100,align:"right",formatter:h=>`${Math.floor(h/1e3)}k`},{key:"responseTime",title:"Response Time",width:120,align:"right"},{key:"tokens",title:"Tokens",width:100,align:"right",formatter:h=>`${Math.floor(h/1e3)}k`}]}},controls:{dropdown:{label:"All Agents",options:l.controlOptions,defaultValue:["all"],multiSelect:!0,searchable:!0},toggle:{chartView:!0,tableView:!0}}},{title:"Tool Runs",value:t.data.toolRuns.total,metricType:"toolRuns",icon:"wrench",info:"Number of tool runs",highlighted:!1,change:o!=null&&o.toolRuns?{value:Math.abs(o.toolRuns.changePercent.total),type:s(o.toolRuns.changePercent.total)}:void 0,view:{type:"chart",chart:{type:"line",title:"Tool Runs",data:d,yAxisLabel:"Number of Tool Runs",lines:[{dataKey:"toolRuns",color:"#667085",label:"Tool Runs"},{dataKey:"codeTools",color:"#F38744",label:"Code Tools"},{dataKey:"workflowTools",color:"#2970FF",label:"Workflow Tools"},{dataKey:"knowledgeTools",color:"#7A5AF8",label:"Knowledge"},{dataKey:"mcpTools",color:"#47CD89",label:"MCP Tools"}],height:300,showGrid:!0,showLegend:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:r.split("T")[0],end:n.split("T")[0]}},table:{title:"Tool Runs",data:u.tableData,columns:[{key:"name",title:"Name",width:200,align:"left"},{key:"type",title:"Type",width:150,align:"left"},{key:"runs",title:"Runs",width:100,align:"right",formatter:h=>`${Math.floor(h/1e3)}k`},{key:"responseTime",title:"Response Time",width:120,align:"right"}]}},controls:{dropdown:{label:"All Tools",options:u.controlOptions,defaultValue:["all"],multiSelect:!0,searchable:!0},toggle:{chartView:!0,tableView:!0}}},{title:"Model Runs",value:t.data.modelRuns,metricType:"modelRuns",icon:"cpu",highlighted:!1,info:"Number of model runs",change:o!=null&&o.modelRuns?{value:Math.abs(o.modelRuns.changePercent),type:s(o.modelRuns.changePercent)}:void 0,view:{type:"chart",chart:{type:"line",title:"Model Runs",data:c.chartData,dataKey:"modelRuns",color:"#47CD89",yAxisLabel:"Number of Model Runs",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:r.split("T")[0],end:n.split("T")[0]}},table:{title:"Model Runs",data:c.tableData,columns:[{key:"name",title:"Model Name",width:200,align:"left"},{key:"runs",title:"Runs",width:100,align:"right",formatter:h=>`${Math.floor(h/1e3)}k`},{key:"tokens",title:"Tokens",width:120,align:"right",formatter:h=>`${Math.floor(h/1e3)}k`},{key:"responseTime",title:"Response Time",width:120,align:"right"}]}},controls:{dropdown:{label:"All Models",options:c.controlOptions,defaultValue:["all"],multiSelect:!0,searchable:!0},toggle:{chartView:!0,tableView:!0}}}]}async transformUsageAnalyticsCardsWithEnhancedData(t,r,n,a,i=[]){const o=t.data.trends,s=d=>d>0?"increase":"decrease",[l,u,c,f]=await Promise.all([this.fetchTimeSeriesData("users","usage-analytics",r,n,a,i),this.fetchTimeSeriesData("sessions","usage-analytics",r,n,a,i),this.fetchTimeSeriesData("messages","usage-analytics",r,n,a,i),this.fetchTimeSeriesData("tokens","usage-analytics",r,n,a,i)]);return[{title:"Users",value:t.data.users,metricType:"users",icon:"users",highlighted:!0,info:"Number of users",change:o!=null&&o.users?{value:Math.abs(o.users.changePercent),type:s(o.users.changePercent)}:void 0,view:{type:"chart",chart:{type:"line",title:"Total Users",data:this.transformTimeSeriesDataForMetric(l,"users"),dataKey:"users",color:"#4E5BA6",yAxisLabel:"Number of Users",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:r.split("T")[0],end:n.split("T")[0]}}}},{title:"Sessions",value:t.data.sessions,metricType:"sessions",icon:"activity",highlighted:!1,info:"Number of user sessions",change:o!=null&&o.sessions?{value:Math.abs(o.sessions.changePercent),type:s(o.sessions.changePercent)}:void 0,view:{type:"chart",chart:{type:"line",title:"Total Sessions",data:this.transformTimeSeriesDataForMetric(u,"sessions"),dataKey:"sessions",color:"#0BA5EC",yAxisLabel:"Number of Sessions",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:r.split("T")[0],end:n.split("T")[0]}}}},{title:"Messages",value:t.data.messages.total,metricType:"messages",icon:"message-circle",info:"Number of messages sent and received",highlighted:!1,change:o!=null&&o.messages?{value:Math.abs(o.messages.changePercent.total),type:s(o.messages.changePercent.total)}:void 0,view:{type:"chart",chart:{type:"line",title:"Total Messages",data:this.transformTimeSeriesDataForMetric(c,"messages"),dataKey:"messages",color:"#E478FA",yAxisLabel:"Number of Messages",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:r.split("T")[0],end:n.split("T")[0]}}}},{title:"Tokens",value:t.data.tokens.total,metricType:"tokens",icon:"coins",info:"Number of tokens used in input and output",highlighted:!1,change:o!=null&&o.tokens?{value:Math.abs(o.tokens.changePercent.total),type:s(o.tokens.changePercent.total)}:void 0,view:{type:"chart",chart:{type:"line",title:"Token Usage Breakdown",data:this.transformTimeSeriesDataForMetric(f,"tokens"),yAxisLabel:"Number of Tokens",lines:[{dataKey:"totalTokens",color:"#FF692E",label:"Total Tokens"},{dataKey:"inputTokens",color:"#5925DC",label:"Input Tokens"},{dataKey:"outputTokens",color:"#E478FA",label:"Output Tokens"}],height:300,showGrid:!0,showLegend:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:r.split("T")[0],end:n.split("T")[0]}}}}]}transformTimeSeriesDataForToolRuns(t){if(console.log("=== TOOL RUNS SPECIFIC TRANSFORM DEBUG ==="),console.log("Raw TimeSeriesResponse for tool runs:",JSON.stringify(t,null,2)),!t||!t.data||!Array.isArray(t.data))return console.error("Invalid time series data structure:",t),[];const r=t.data.map((n,a)=>{console.log(`Processing point ${a}:`,n);const i=new Date(n.timestamp),o=i.toISOString().split("T")[0],s=i.toLocaleDateString("en-US",{month:"short",day:"numeric"}),l=n.count||0;let u=0,c=0,f=0,d=0;if(n.listView&&Array.isArray(n.listView)){n.listView.forEach(v=>{const p=v.count||0,g=(v.toolType||"").toLowerCase(),O=(v.toolName||"").toLowerCase();console.log("Processing listView item:",{toolType:g,toolName:O,count:p}),g==="tool"||g==="code"||g==="codetool"?u+=p:g==="workflow"||g==="workflowtool"||O.includes("workflow")?c+=p:g==="knowledge"||g==="knowledgetool"||O.includes("knowledge")||O.includes("search")||O.includes("fetch")?f+=p:g==="mcp"||g==="mcptool"||O.includes("mcp")?d+=p:(console.log(`Unknown tool type '${g}' for tool '${O}', defaulting to code tools`),u+=p)}),console.log(`Calculated breakdown for point ${a}:`,{codeTools:u,workflowTools:c,knowledgeTools:f,mcpTools:d,total:u+c+f+d,expectedTotal:l});const y=u+c+f+d;if(Math.abs(y-l)>1){console.warn(`Breakdown total (${y}) doesn't match expected total (${l}) for point ${a}`);const v=l-y;u+=v,console.log(`Adjusted codeTools by ${v} to balance total`)}}else console.log(`No listView data for point ${a}, assigning all ${l} to codeTools`),u=l;const h={date:o,timestamp:s,formattedDate:s,toolRuns:l,value:l,count:l,codeTools:u,workflowTools:c,knowledgeTools:f,mcpTools:d,input_tokens:n.input_tokens||0,output_tokens:n.output_tokens||0,total_tokens:(n.input_tokens||0)+(n.output_tokens||0),inputTokens:n.input_tokens||0,outputTokens:n.output_tokens||0,totalTokens:(n.input_tokens||0)+(n.output_tokens||0),listView:n.listView||[],index:a};return console.log(`Transformed tool runs point ${a}:`,h),h});return console.log("Final tool runs transformed data:",JSON.stringify(r,null,2)),console.log("=== END TOOL RUNS SPECIFIC TRANSFORM DEBUG ==="),r}async fetchAllCardsData(t,r,n=[]){try{const[a,i]=await Promise.all([this.fetchUsageAnalyticsCards(t,r,void 0,n),this.fetchRunsCards(t,r,void 0,n)]);return{usageAnalytics:this.transformUsageAnalyticsCards(a),runs:this.transformRunsCards(i)}}catch(a){throw console.error("Error fetching cards data:",a),a}}async fetchAllCardsDataWithEnhancedViews(t,r,n,a=[]){try{const[i,o]=await Promise.all([this.fetchUsageAnalyticsCards(t,r,n,a),this.fetchRunsCards(t,r,n,a)]),[s,l]=await Promise.all([this.transformUsageAnalyticsCardsWithEnhancedData(i,t,r,n,a),this.transformRunsCardsWithEnhancedData(o,t,r,n,a)]);return{usageAnalytics:s,runs:l}}catch(i){throw console.error("Error fetching enhanced cards data:",i),i}}async fetchDefaultTimeSeriesData(t,r,n,a=[]){try{const[i,o]=await Promise.all([this.fetchTimeSeriesData("sessions","usage-analytics",t,r,n,a),this.fetchTimeSeriesData("agent-runs","runs",t,r,n,a)]);return{sessions:this.transformTimeSeriesData(i),agentRuns:this.transformTimeSeriesData(o)}}catch(i){throw console.error("Error fetching default time series data:",i),i}}static getDateRange(t=30){const r=new Date,n=new Date;return n.setDate(r.getDate()-t),{fromTimestamp:n.toISOString(),toTimestamp:r.toISOString()}}static getTimeDimension(t,r){const n=new Date(t),a=new Date(r),i=new Date(n.getFullYear(),n.getMonth(),n.getDate()),o=new Date(a.getFullYear(),a.getMonth(),a.getDate()),s=o.getTime()-i.getTime(),l=s/(1e3*60*60*24),u=i.toISOString().split("T")[0],c=o.toISOString().split("T")[0],f=u===c,d=new Date(n.getFullYear(),n.getMonth(),n.getDate()),h=f&&Math.abs(n.getTime()-d.getTime())<1e3,y=Math.abs(a.getTime()-n.getTime()),v=y<60*1e3;return console.log("🕐 TimeDimension calculation:",{fromTimestamp:t,toTimestamp:r,fromDateStr:u,toDateStr:c,diffInMs:s,diffInDays:l,isSameCalendarDay:f,isTodayPattern:h,timeDiffInMs:y,isVeryClose:v,fromStartOfDay:d.toISOString(),recommended:f||h||v||l<=1?"hour":l<=31?"day":l<=90?"week":"month"}),f||h||v||l<=1?"hour":"day"}getAvailableMetrics(){return{"usage-analytics":["sessions","messages","users","tokens"],runs:["agent-runs","model-runs","tool-runs"]}}}const TU=({config:e,appConfig:t,className:r,onExport:n,onDraftChange:a,onTimeRangeChange:i})=>{var R;const{title:o,subtitle:s,sections:l,globalControls:u,layout:c={columns:12,gap:24,responsive:!0}}=e,[f,d]=S.useState(!1),[h,y]=S.useState({}),[v,p]=S.useState(l),[g,O]=S.useState([]),[w,A]=S.useState(!1),m=S.useRef(null);S.useEffect(()=>{if(t)try{m.current=new ur(t),x(),T()}catch(N){console.error("Failed to initialize API service:",N)}},[t]);const x=async()=>{if(!(!m.current||!t)){A(!0);try{const N=await m.current.fetchEnvironments();O(N),console.log("🌍 Environments loaded:",N.map(I=>I.envName))}catch(N){console.error("Error loading environments:",N)}finally{A(!1)}}},T=async()=>{if(!(!m.current||!t)){d(!0);try{const N=m.current.getDefaultTimeRange();console.log("📊 Loading dashboard data with date range:",{fromTimestamp:N.fromTimestamp,toTimestamp:N.toTimestamp,fromDate:new Date(N.fromTimestamp).toLocaleDateString(),toDate:new Date(N.toTimestamp).toLocaleDateString()});const I=await m.current.fetchAllCardsDataWithEnhancedViews(N.fromTimestamp,N.toTimestamp);console.log("✅ Enhanced cards data loaded successfully:",I),console.log("📈 Data covers period:",{from:new Date(N.fromTimestamp).toLocaleDateString(),to:new Date(N.toTimestamp).toLocaleDateString()});const C=l.map(B=>B.id==="usage-analytics"?(console.log("Updating usage-analytics section with enhanced data"),{...B,metrics:I.usageAnalytics}):B.id==="runs"?(console.log("Updating runs section with enhanced data including table and controls"),{...B,metrics:I.runs}):B);p(C)}catch(N){console.error("Error loading initial data:",N),p(l)}finally{d(!1)}}},P=async(N,I)=>{if(!(!m.current||!t||!I.metricType)){p(C=>C.map(B=>B.id===N?{...B,metrics:B.metrics.map(U=>({...U,highlighted:U.metricType===I.metricType}))}:B)),y(C=>({...C,[N]:!0}));try{const C=t.defaultTimeRange||ur.getDateRange(30);let B,U;if(["users","sessions","messages","tokens"].includes(I.metricType))B="usage-analytics",U=I.metricType;else if(["agentRuns","toolRuns","modelRuns"].includes(I.metricType))B="runs",U=I.metricType==="agentRuns"?"agent-runs":I.metricType==="toolRuns"?"tool-runs":"model-runs";else return;const K=await m.current.fetchTimeSeriesData(U,B,C.fromTimestamp,C.toTimestamp),_=m.current.transformTimeSeriesDataForMetric(K,I.metricType);console.log("Time series response for",I.title,":",K),console.log("Transformed data for",I.title,":",_),console.log("Metric type used for transformation:",I.metricType);const F=(W=>({users:"users",sessions:"sessions",messages:"messages",tokens:"totalTokens",agentRuns:"agentRuns",toolRuns:"toolRuns",modelRuns:"modelRuns"})[W]||"count")(I.metricType||"count");console.log("Using dataKey for metric",I.metricType,":",F),p(W=>W.map(G=>{if(G.id===N){const X={...G,view:{...G.view,chart:G.view.chart?{...G.view.chart,data:_,dataKey:F,lines:[{dataKey:F,color:G.view.chart.color||"#3b82f6",label:I.title,strokeWidth:2}]}:{type:"line",data:_,dataKey:F,lines:[{dataKey:F,color:"#3b82f6",label:I.title,strokeWidth:2}],yAxisLabel:I.title}}};return console.log("Updated section for",N,":",X),console.log("Chart config set:",X.view.chart),X}return G}))}catch(C){console.error("Error loading metric data:",C)}finally{y(C=>({...C,[N]:!1}))}}},$=N=>{var I,C;if((C=(I=u==null?void 0:u.draft)==null?void 0:I.onChange)==null||C.call(I,N),a==null||a(N),t&&m.current){const B={...t,environment:N};m.current.updateConfig(B),T()}},k=N=>{var I,C;if(console.log("🗓️ Time range change requested:",N),typeof N=="string"&&((C=(I=u==null?void 0:u.timeRange)==null?void 0:I.onChange)==null||C.call(I,N)),i==null||i(N),t&&m.current){let B=null;if(typeof N=="object"&&N.from&&N.to)B={fromTimestamp:N.from.toISOString(),toTimestamp:N.to.toISOString()},console.log("📅 Converting DateRange to API format:",B);else if(typeof N=="string"){const K={"24h":1,"7d":7,"30d":30,"90d":90}[N];K&&(B=ur.getDateRange(K),console.log(`📅 Converting preset "${N}" (${K} days) to API format:`,B))}if(B){const U={...t,defaultTimeRange:B};console.log("🔄 Updating API configuration with new date range:",U.defaultTimeRange),m.current.updateConfig(U),console.log("🚀 Reloading dashboard data with new date range..."),T()}else console.warn("⚠️ Unable to convert time range value to API format:",N)}},E=(N="csv")=>{var I,C;(C=(I=u==null?void 0:u.export)==null?void 0:I.onExport)==null||C.call(I,N),n==null||n()},j=Object.values(h).some(N=>N);return b.jsxs("div",{className:ce("mx-auto p-6",r),children:[b.jsx("div",{className:"mb-8",children:b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("div",{children:[b.jsx("h1",{className:"text-3xl font-bold text-gray-900",children:o}),s&&b.jsx("p",{className:"text-gray-600 mt-2",children:s})]}),b.jsxs("div",{className:"flex items-center gap-3",children:[(f||j)&&b.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-500",children:[b.jsx(r0,{className:"h-4 w-4 animate-spin"}),"Loading..."]}),u&&b.jsxs(b.Fragment,{children:[u.draft&&b.jsx(js,{options:g.length>0?g.map(N=>({label:N.envName.charAt(0).toUpperCase()+N.envName.slice(1),value:N.envName})):u.draft.options,value:u.draft.defaultValue,placeholder:w?"Loading environments...":u.draft.label,onChange:$,className:"min-w-[200px]",disabled:f||j||w}),u.timeRange&&(u.timeRange.useDatePicker?(console.log("🗓️ Dashboard: Rendering DateRangePicker with defaultValue:",u.timeRange.defaultValue),b.jsx(Mb,{defaultValue:u.timeRange.defaultValue,onDateRangeChange:N=>{console.log("🗓️ Dashboard: DateRangePicker callback received:",N),N&&k(N)}})):b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(vf,{className:"h-4 w-4 text-gray-500"}),b.jsx(js,{options:u.timeRange.options||[],value:u.timeRange.defaultValue,placeholder:u.timeRange.label,onChange:k,className:"min-w-[200px]",disabled:f||j})]})),((R=u.export)==null?void 0:R.enabled)&&b.jsxs(of,{variant:"outline",onClick:()=>E(),className:"gap-2",disabled:f||j,children:[b.jsx(e0,{className:"h-4 w-4"}),"Export"]})]})]})]})}),b.jsx("div",{className:ce("grid gap-6",c.responsive&&"grid-cols-1 lg:grid-cols-12"),style:{gridTemplateColumns:c.responsive?void 0:`repeat(${c.columns}, minmax(0, 1fr))`,gap:c.gap?`${c.gap}px`:void 0},children:v.map(N=>{var I,C,B,U;return b.jsx(wb,{section:N,isLoading:f,isChartLoading:h[N.id]||!1,onMetricClick:K=>P(N.id,K),className:ce(c.responsive&&((I=N.layout)==null?void 0:I.span)===12&&"lg:col-span-12",c.responsive&&((C=N.layout)==null?void 0:C.span)===6&&"lg:col-span-6",c.responsive&&((B=N.layout)==null?void 0:B.span)===4&&"lg:col-span-4",c.responsive&&((U=N.layout)==null?void 0:U.span)===3&&"lg:col-span-3")},N.id)})})]})},Ds=["Portfolio Analysis Expert","Mortgage Evaluator","Credit Risk Specialist","Asset Valuation Analyst","Liability Assessment Advisor"],Is=["calculate-creditScore","calculate-risk","calculate-mortgage","analyse-expenses","fetch-statement"],Ls=["gpt-4o","gpt-4o-mini","gpt-3.5-turbo","claude-3-5-sonnet","claude-3-5-haiku","claude-3-opus","gemini-1.5-pro","gemini-1.5-flash","llama-3.1-405b","llama-3.1-70b"],PU=(e=30)=>{const t=[],r=new Date;for(let n=e-1;n>=0;n--){const a=new Date(r);a.setDate(r.getDate()-n);const i=600+Math.sin(n*.1)*100,o=Math.floor(i+Math.random()*100),s=Math.floor(o*3.5+Math.random()*200),l=Math.floor(s*2.9+Math.random()*500),u=Math.floor(l*.9+Math.random()*300),c=Math.floor(u*.6),f=u-c,d=Math.floor(s*.8+Math.random()*100),h=Math.floor(d*12+Math.random()*500),y=Math.floor(d*8+Math.random()*300),v=Math.floor(h*.3+Math.random()*100),p=Math.floor(h*.25+Math.random()*80),g=Math.floor(h*.2+Math.random()*60),O=Math.floor(h*.15+Math.random()*50),w={};Ds.forEach(x=>{const T=x.replace(/\s+/g,"").toLowerCase(),P=Math.floor(d/Ds.length);w[T]=Math.floor(P+Math.random()*(P*.5))});const A={};Is.forEach(x=>{const T=x.replace(/[-]/g,""),P=Math.floor(h/Is.length);A[T]=Math.floor(P+Math.random()*(P*.8))});const m={};Ls.forEach(x=>{const T=x.replace(/[-\.]/g,""),P=Math.floor(y/Ls.length);m[T]=Math.floor(P+Math.random()*(P*.6))}),t.push({date:a.toISOString().split("T")[0],users:o,sessions:s,messages:l,totalTokens:u,inputTokens:c,outputTokens:f,agentRuns:d,toolRuns:h,modelRuns:y,codeTools:v,workflowTools:p,knowledgeTools:g,mcpTools:O,...w,...A,...m,value:o})}return t},_U=()=>{const e=[],t=['{"name":"avatar14","color":"#F6D0FE","type":"human"}','{"name":"avatar2","color":"#3B82F6","type":"human"}','{"name":"avatar7","color":"#EF4444","type":"human"}','{"name":"avatar12","color":"#10B981","type":"human"}','{"name":"avatar8","color":"#F59E0B","type":"human"}'];return Ds.forEach((r,n)=>{e.push({id:`agent-${n+1}`,name:r,runs:Math.floor(Math.random()*8e3)+4e3,responseTime:`${Math.floor(Math.random()*120)+15}s`,tokens:Math.floor(Math.random()*4e5)+1e5,successRate:`${Math.floor(Math.random()*20)+80}%`,lastRun:new Date(Date.now()-Math.random()*7*24*60*60*1e3).toLocaleDateString(),avatar:`https://api.dicebear.com/7.x/avataaars/svg?seed=${r.replace(/\s+/g,"")}&backgroundColor=b6e3f4,c0aede,d1d4f9&backgroundType=solid`,icon:t[n]||t[0]})}),e},EU=()=>{const e=r=>r.includes("calculate-creditscore")?"Code Tool":r.includes("calculate-risk")?"Workflow Tool":r.includes("calculate-mortgage")?"MCP Tool":r.includes("analyse-expenses")?"Workflow Tool":r.includes("fetch-statement")?"Knowledge":"Code Tool",t=['{"name":"calculator","color":"#EF6820","type":"inlineTool"}','{"name":"workflow","color":"#155EEF","type":"toolLibrary"}','{"name":"mcptool","color":"#101828","type":"MCP"}','{"name":"expenses","color":"#155EEF","type":"toolLibrary"}','{"name":"knowledge","color":"#7A5AF8","type":"KNOWLEDGE"}'];return Is.map((r,n)=>({id:`tool-${n+1}`,name:r,type:e(r),runs:Math.floor(Math.random()*8e3)+4e3,responseTime:`${Math.floor(Math.random()*90)+15}s`,tokens:Math.floor(Math.random()*2e4)+5e3,successRate:`${Math.floor(Math.random()*15)+85}%`,lastRun:new Date(Date.now()-Math.random()*7*24*60*60*1e3).toLocaleDateString(),icon:t[n]||t[0]}))},jU=()=>Ls.map((e,t)=>({id:`model-${t+1}`,name:e,runs:Math.floor(Math.random()*8e3)+4e3,responseTime:`${Math.floor(Math.random()*120)+15}s`,tokens:Math.floor(Math.random()*5e5)+1e5,successRate:`${Math.floor(Math.random()*15)+85}%`,lastRun:new Date(Date.now()-Math.random()*7*24*60*60*1e3).toLocaleDateString()})),Jr=PU(),$U=_U(),CU=EU(),MU=jU(),kU={id:"main-dashboard",title:"Dashboard",subtitle:"Monitor and review the usage of your agentic app.",version:"1.0.0",globalControls:{draft:{label:"Draft",options:[{label:"Current Draft",value:"current"},{label:"Previous Draft",value:"previous"},{label:"All Drafts",value:"all"}],defaultValue:"current"},timeRange:{label:"Time Range",options:[{label:"This month",value:"month"},{label:"Last 7 days",value:"week"},{label:"Last 30 days",value:"30days"},{label:"Last 90 days",value:"90days"}],defaultValue:"month"},export:{enabled:!0,formats:["csv","json","pdf"]}},layout:{columns:12,gap:24,responsive:!0},sections:[{id:"sessions",title:"Sessions",description:"User engagement and session analytics",metrics:[{title:"Users",value:3384,change:{value:6,type:"increase"},info:"Total number of unique users",metricType:"users",view:{type:"chart",chart:{type:"line",title:"Total Users",data:Jr,dataKey:"users",color:"#8b5cf6",yAxisLabel:"Number of Users",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}}}},{title:"Sessions",value:11847,change:{value:18,type:"increase"},info:"Total number of user sessions",metricType:"sessions",view:{type:"chart",chart:{type:"line",title:"Total Sessions",data:Jr,dataKey:"sessions",color:"#06b6d4",yAxisLabel:"Number of Sessions",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}}}},{title:"Messages",value:34563,change:{value:5,type:"increase"},info:"Total messages exchanged",metricType:"messages",view:{type:"chart",chart:{type:"line",title:"Total Messages",data:Jr,dataKey:"messages",color:"#e879f9",yAxisLabel:"Number of Messages",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}}}},{title:"Tokens",value:32044,change:{value:44,type:"increase"},info:"Total tokens processed",metricType:"tokens",view:{type:"chart",chart:{type:"line",title:"Token Usage Breakdown",data:Jr,yAxisLabel:"Number of Tokens",lines:[{dataKey:"totalTokens",color:"#f97316",label:"Total Tokens"},{dataKey:"inputTokens",color:"#3b82f6",label:"Input Tokens"},{dataKey:"outputTokens",color:"#e879f9",label:"Output Tokens"}],height:300,showGrid:!0,showLegend:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}}}}],view:{type:"chart"},layout:{span:12,order:1}},{id:"runs",title:"Runs",description:"Agent, tool, and model execution analytics",metrics:[{title:"Agent Runs",value:3384,change:{value:6,type:"increase"},info:"Number of agent executions",metricType:"agentRuns",view:{type:"chart",chart:{type:"line",title:"Agent Runs",data:Jr,dataKey:"agentRuns",color:"#06b6d4",yAxisLabel:"Number of Agent Runs",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}},table:{title:"Agent Runs",data:$U,columns:[{key:"name",title:"Name",width:200,align:"left"},{key:"runs",title:"Runs",width:100,align:"right",formatter:e=>`${Math.floor(e/1e3)}k`},{key:"responseTime",title:"Response Time",width:120,align:"right"},{key:"tokens",title:"Tokens",width:100,align:"right",formatter:e=>`${Math.floor(e/1e3)}k`}]}},controls:{dropdown:{label:"All Agents",options:[{label:"All Agents",value:"all"},...Ds.map(e=>({label:e,value:e.replace(/\s+/g,"").toLowerCase(),avatar:`https://api.dicebear.com/7.x/avataaars/svg?seed=${e.replace(/\s+/g,"")}&backgroundColor=b6e3f4,c0aede,d1d4f9&backgroundType=solid`}))],defaultValue:["all"],multiSelect:!0,searchable:!0},toggle:{chartView:!0,tableView:!0}}},{title:"Tool Runs",value:34563,change:{value:5,type:"increase"},info:"Number of tool executions",metricType:"toolRuns",view:{type:"chart",chart:{type:"line",title:"Tool Runs",data:Jr,yAxisLabel:"Number of Tool Runs",lines:[{dataKey:"toolRuns",color:"#06b6d4",label:"Tool Runs"},{dataKey:"codeTools",color:"#f97316",label:"Code Tools"},{dataKey:"workflowTools",color:"#10b981",label:"Workflow Tools"},{dataKey:"knowledgeTools",color:"#8b5cf6",label:"Knowledge"},{dataKey:"mcpTools",color:"#ef4444",label:"MCP Tools"}],height:300,showGrid:!0,showLegend:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}},table:{title:"Tool Runs",data:CU,columns:[{key:"name",title:"Name",width:200,align:"left"},{key:"type",title:"Type",width:150,align:"left"},{key:"runs",title:"Runs",width:100,align:"right",formatter:e=>`${Math.floor(e/1e3)}k`},{key:"responseTime",title:"Response Time",width:120,align:"right"}]}},controls:{dropdown:{label:"All Tools",options:[{label:"All Tools",value:"all"},...Is.map((e,t)=>{const r=['{"name":"calculator","color":"#EF6820","type":"inlineTool"}','{"name":"workflow","color":"#155EEF","type":"toolLibrary"}','{"name":"mcptool","color":"#101828","type":"MCP"}','{"name":"expenses","color":"#155EEF","type":"toolLibrary"}','{"name":"knowledge","color":"#7A5AF8","type":"KNOWLEDGE"}'],n=a=>a.includes("calculate-creditscore")?"Code Tool":a.includes("calculate-risk")?"Workflow Tool":a.includes("calculate-mortgage")?"MCP Tool":a.includes("analyse-expenses")?"Workflow Tool":a.includes("fetch-statement")?"Knowledge":"Code Tool";return{label:e,value:e.replace(/[-]/g,""),icon:r[t]||r[0],type:n(e)}})],defaultValue:["all"],multiSelect:!0,searchable:!0},toggle:{chartView:!0,tableView:!0}}},{title:"Model Runs",value:32044,change:{value:44,type:"increase"},info:"Number of model inferences",metricType:"modelRuns",view:{type:"chart",chart:{type:"line",title:"Model Runs",data:Jr,dataKey:"modelRuns",color:"#10b981",yAxisLabel:"Number of Model Runs",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}},table:{title:"Model Runs",data:MU,columns:[{key:"name",title:"Model Name",width:200,align:"left"},{key:"runs",title:"Runs",width:100,align:"right",formatter:e=>`${Math.floor(e/1e3)}k`},{key:"tokens",title:"Tokens",width:120,align:"right",formatter:e=>`${Math.floor(e/1e3)}k`},{key:"responseTime",title:"Response Time",width:120,align:"right"}]}},controls:{dropdown:{label:"All Models",options:[{label:"All Models",value:"all"},...Ls.map(e=>{const t=r=>{const n=r.toLowerCase();return n.includes("gpt")||n.includes("openai")?"⚡":n.includes("claude")||n.includes("anthropic")?"A":n.includes("gemini")||n.includes("google")?"G":n.includes("llama")||n.includes("meta")?"M":"🤖"};return{label:e,value:e.replace(/[-\.]/g,""),icon:t(e)}})],defaultValue:["all"],multiSelect:!0,searchable:!0},toggle:{chartView:!0,tableView:!0}}}],view:{type:"chart"},layout:{span:12,order:2}}]},Ht={primary:["#8b5cf6","#06b6d4","#f97316","#10b981","#ec4899","#f59e0b","#3b82f6","#ef4444"],secondary:["#a78bfa","#22d3ee","#fb923c","#34d399","#f472b6","#fbbf24","#60a5fa","#f87171"],accent:["#6366f1","#8b5cf6","#d946ef","#06b6d4","#84cc16","#eab308"],semantic:{success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#3b82f6"},gradients:{purple:["#8b5cf6","#a78bfa"],cyan:["#06b6d4","#22d3ee"],orange:["#f97316","#fb923c"],green:["#10b981","#34d399"],sunset:["#f97316","#ec4899"],ocean:["#06b6d4","#3b82f6"],forest:["#10b981","#84cc16"]}},NU={primary:["#7c3aed","#0891b2","#ea580c","#059669","#db2777","#d97706","#2563eb","#dc2626"],secondary:["#8b5cf6","#06b6d4","#f97316","#10b981","#ec4899","#f59e0b","#3b82f6","#ef4444"],accent:["#4f46e5","#7c3aed","#c026d3","#0891b2","#65a30d","#ca8a04"],semantic:{success:"#059669",warning:"#d97706",error:"#dc2626",info:"#2563eb"}},DU={primary:["#a78bfa","#22d3ee","#fb923c","#34d399","#f472b6","#fbbf24","#60a5fa","#f87171"],secondary:["#c4b5fd","#67e8f9","#fdba74","#6ee7b7","#f9a8d4","#fcd34d","#93c5fd","#fca5a5"],accent:["#818cf8","#a78bfa","#e879f9","#22d3ee","#a3e635","#facc15"],semantic:{success:"#34d399",warning:"#fbbf24",error:"#f87171",info:"#60a5fa"}},IU={primary:["#1f2937","#374151","#6b7280","#9ca3af","#3b82f6","#1d4ed8","#10b981","#f59e0b"],secondary:["#4b5563","#6b7280","#9ca3af","#d1d5db","#60a5fa","#3b82f6","#34d399","#fbbf24"],accent:["#2563eb","#1d4ed8","#059669","#0891b2","#d97706","#b45309"],semantic:{success:"#059669",warning:"#d97706",error:"#dc2626",info:"#1d4ed8"}},Db=(e,t)=>e.primary[t%e.primary.length],Oi=(e,t)=>e.semantic[t],LU=(e,t)=>{var r;return((r=e.gradients)==null?void 0:r[t])||[e.primary[0],e.primary[1]]},Ib=(e,t=Ht)=>e.map((r,n)=>({...r,color:Db(t,n)})),Rs=((e=30)=>{const t=[],r=new Date;for(let n=e-1;n>=0;n--){const a=new Date(r);a.setDate(r.getDate()-n);const i=600+Math.sin(n*.1)*100,o=Math.floor(i+Math.random()*100),s=Math.floor(o*3.5+Math.random()*200),l=Math.floor(s*2.9+Math.random()*500),u=Math.floor(l*.9+Math.random()*300),c=Math.floor(u*.6),f=u-c,d=Math.floor(s*.8+Math.random()*100),h=Math.floor(d*12+Math.random()*500),y=Math.floor(d*8+Math.random()*300);t.push({date:a.toISOString().split("T")[0],users:o,sessions:s,messages:l,totalTokens:u,inputTokens:c,outputTokens:f,agentRuns:d,toolRuns:h,modelRuns:y,value:o})}return t})(),RU={id:"enhanced-dashboard",title:"Enhanced Color Configuration Dashboard",subtitle:"Demonstrating all color configuration options",version:"1.0.0",globalControls:{draft:{label:"Draft",options:[{label:"Current Draft",value:"current"},{label:"Previous Draft",value:"previous"}],defaultValue:"current"},timeRange:{label:"Time Range",options:[{label:"Last 7 days",value:"week"},{label:"Last 30 days",value:"30days"}],defaultValue:"30days"},export:{enabled:!0,formats:["csv","json"]}},layout:{columns:12,gap:24,responsive:!0},sections:[{id:"manual-colors",title:"Manual Color Assignment",description:"Each line has manually assigned colors",metrics:[{title:"Total Users",value:3384,change:{value:6,type:"increase"},info:"Manually colored chart"}],view:{type:"chart",chart:{type:"line",title:"Manual Color Configuration",data:Rs,lines:[{dataKey:"users",color:"#8b5cf6",label:"Users",strokeWidth:3},{dataKey:"sessions",color:"#06b6d4",label:"Sessions",strokeWidth:2},{dataKey:"messages",color:"#f97316",label:"Messages",strokeWidth:2,strokeDasharray:"5 5"}],dateRange:{start:"2025-05-06",end:"2025-06-05"},tooltip:{show:!0,style:"dark"},height:300,showLegend:!1}},layout:{span:6,order:1}},{id:"auto-colors",title:"Auto-Assigned Colors",description:"Colors automatically assigned from palette",metrics:[{title:"Agent Runs",value:3384,change:{value:6,type:"increase"},info:"Auto-colored from palette"}],view:{type:"chart",chart:{type:"line",title:"Auto Color Assignment",data:Rs,lines:Ib([{dataKey:"agentRuns",label:"Agent Runs"},{dataKey:"toolRuns",label:"Tool Runs"},{dataKey:"modelRuns",label:"Model Runs"},{dataKey:"totalTokens",label:"Total Tokens"}],Ht),dateRange:{start:"2025-05-06",end:"2025-06-05"},tooltip:{show:!0,style:"dark"},height:300,showLegend:!1}},layout:{span:6,order:2}},{id:"semantic-colors",title:"Semantic Colors",description:"Using semantic colors for different data types",metrics:[{title:"Success Rate",value:"94.2%",change:{value:2,type:"increase"},info:"Using semantic success color"},{title:"Error Rate",value:"5.8%",change:{value:1,type:"decrease"},info:"Using semantic error color"}],view:{type:"chart",chart:{type:"line",title:"Semantic Color Usage",data:Rs,lines:[{dataKey:"users",color:Oi(Ht,"success"),label:"Successful Operations",strokeWidth:3},{dataKey:"sessions",color:Oi(Ht,"warning"),label:"Warning Events",strokeWidth:2},{dataKey:"messages",color:Oi(Ht,"error"),label:"Error Events",strokeWidth:2},{dataKey:"totalTokens",color:Oi(Ht,"info"),label:"Info Events",strokeWidth:2}],dateRange:{start:"2025-05-06",end:"2025-06-05"},tooltip:{show:!0,style:"dark"},height:300,showLegend:!1}},layout:{span:12,order:3}},{id:"single-custom",title:"Single Line Custom Color",description:"Single line chart with custom color and styling",metrics:[{title:"Total Messages",value:34563,change:{value:5,type:"increase"},info:"Custom styled single line"}],view:{type:"chart",chart:{type:"line",title:"Custom Single Line",data:Rs,dataKey:"messages",color:"#ec4899",dateRange:{start:"2025-05-06",end:"2025-06-05"},tooltip:{show:!0,style:"dark"},height:250,showGrid:!0,curve:"monotone"}},layout:{span:12,order:4}}]},BU={manualColors:{line1:"#8b5cf6",line2:"#06b6d4",line3:"#f97316",line4:"#10b981"},paletteColors:Ht.primary,semanticColors:Ht.semantic,gradientColors:Ht.gradients},FU={baseUrl:window.location.protocol+"//"+window.location.hostname,dashboardType:"agenticDashboard",projectId:"aa-bdbfa4eb-c7c4-4350-be96-d778188c2c4b",environment:"draft",headers:{authorization:"Bearer 2amvsUbh87obVLVYjbNnXCbXnOr-plekM7-qjKt2EJIZnZuAV2KT9WSTG0L4U33X",accountId:"6290f982fb880154e99bbede","Content-Type":"application/json"},defaultTimeRange:{fromTimestamp:new Date(Date.now()-30*24*60*60*1e3).toISOString(),toTimestamp:new Date().toISOString()},refreshInterval:3e4},WU={id:"agentic-analytics-dashboard",title:"Dashboard",subtitle:"Monitor and review the usage of your agentic app",sections:[{id:"usage-analytics",title:"Sessions",metrics:[{title:"Users",value:0,metricType:"users",highlighted:!0},{title:"Sessions",value:0,metricType:"sessions",highlighted:!1},{title:"Messages",value:0,metricType:"messages",highlighted:!1},{title:"Tokens",value:0,metricType:"tokens",highlighted:!1}],view:{type:"chart",chart:{type:"line",title:"Usage Over Time",data:[],lines:[{dataKey:"count",color:"#3B82F6",label:"Count",strokeWidth:2}],xAxisLabel:"Date",yAxisLabel:"Count",tooltip:{show:!0,formatter:(e,t)=>[`${e}`,t]}}},layout:{span:12}},{id:"runs",title:"Runs",metrics:[{title:"Agent Runs",value:0,metricType:"agentRuns",highlighted:!0},{title:"Tool Runs",value:0,metricType:"toolRuns",highlighted:!1},{title:"Model Runs",value:0,metricType:"modelRuns",highlighted:!1}],view:{type:"chart",chart:{type:"line",title:"Execution Runs Over Time",data:[],lines:[{dataKey:"count",color:"#10B981",label:"Runs",strokeWidth:2}],xAxisLabel:"Date",yAxisLabel:"Count",tooltip:{show:!0,formatter:(e,t)=>[`${e}`,t]}}},layout:{span:12}}],globalControls:{draft:{label:"Environment",options:[{label:"Draft",value:"draft"},{label:"Production",value:"production"},{label:"Staging",value:"staging"}],defaultValue:"draft"},timeRange:{label:"Time Range",useDatePicker:!0,options:[{label:"Last 7 days",value:"7d"},{label:"Last 30 days",value:"30d"},{label:"Last 90 days",value:"90d"}],defaultValue:"30d"},export:{enabled:!1,formats:["csv","json"],onExport:e=>{console.log(`Exporting in ${e} format`)}}},layout:{columns:12,gap:24,responsive:!0}},UU=`
214
+ </svg>`},fW=(e,t)=>{const r=e.toLowerCase();if(r.includes("code"))return Rt.inlineTool;if(r.includes("workflow")||r.includes("library"))return Rt.toolLibrary;if(r.includes("knowledge"))return Rt.KNOWLEDGE;if(r.includes("mcp"))return Rt.MCP;if(Rt[e])return Rt[e];const n=t.toLowerCase();return n.includes("code")||n.includes("inline")||n.includes("calculate")?Rt.inlineTool:n.includes("library")||n.includes("workflow")?Rt.toolLibrary:n.includes("knowledge")||n.includes("document")||n.includes("fetch")?Rt.KNOWLEDGE:n.includes("mcp")||n.includes("protocol")?Rt.MCP:Rt.toolLibrary},of=({icon:e,iconSource:t="agent",size:r="small",className:n="",name:a="Unknown",toolType:i})=>{const[o,s]=T.useState(!1),[l,u]=T.useState(!1),c=sW(e),f=cW[r];if(c!=null&&c.name&&c.name!=="fallback"&&!o){const v=uW(c,t),m=()=>{s(!0)};return g.jsx("img",{src:v,alt:a,className:`${f} rounded-full object-cover ${n}`,onError:m})}if(o&&!l&&t==="agent"){const v=`${window.location.origin}/agenticai/assets/agent-avatars/agent1.svg`,m=()=>{u(!0)};return g.jsx("img",{src:v,alt:a,className:`${f} rounded-full object-cover ${n}`,onError:m})}const d=c||lW(a,t);if(t==="workflowtool"){const v=i||d.type||"toolLibrary",m=fW(v,a);return g.jsx("div",{className:`${f} rounded-full flex items-center justify-center bg-gray-100 ${n}`,children:g.jsx("div",{dangerouslySetInnerHTML:{__html:m}})})}const h=`${window.location.origin}/agenticai/assets/agent-avatars/agent1.svg`;return g.jsx("img",{src:h,alt:a,className:`${f} rounded-full object-cover ${n}`})},yb=({data:e,className:t})=>{const[r,n]=T.useState(5),a=()=>{n(o=>Math.min(o+10,e.length))},i=o=>o>=1e3?`${Math.floor(o/1e3)}k`:o.toString();return g.jsxs("div",{className:ue("w-full",t),children:[g.jsxs("div",{className:"grid grid-cols-4 gap-4 px-4 py-3 bg-gray-50 border-b border-gray-200 text-sm font-medium text-gray-700",children:[g.jsx("div",{className:"text-left",children:"Name"}),g.jsx("div",{className:"text-right",children:"Runs"}),g.jsx("div",{className:"text-right",children:"Response Time"}),g.jsx("div",{className:"text-right",children:"Tokens"})]}),g.jsx("div",{className:"divide-y divide-gray-100",children:e.slice(0,r).map((o,s)=>g.jsxs("div",{className:"grid grid-cols-4 gap-4 px-4 py-4 hover:bg-gray-50 transition-colors duration-150",children:[g.jsxs("div",{className:"flex items-center space-x-3",children:[g.jsx("div",{className:"flex-shrink-0",children:g.jsx(of,{icon:o.icon,iconSource:"agent",size:"small",name:o.name||"Unknown Agent"})}),g.jsx("div",{className:"min-w-0 flex-1",children:g.jsx("div",{className:"text-sm font-medium text-gray-900 truncate",children:o.name||"Unknown Agent"})})]}),g.jsx("div",{className:"text-right text-sm text-gray-900",children:o.runs?i(o.runs):"-"}),g.jsx("div",{className:"text-right text-sm text-gray-900",children:o.responseTime||"-"}),g.jsx("div",{className:"text-right text-sm text-gray-900",children:o.tokens?i(o.tokens):"-"})]},o.id||s))}),r<e.length&&g.jsx("div",{className:"flex justify-center py-6",children:g.jsx("button",{onClick:a,className:"px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 transition-colors duration-150",children:"Load 10 more"})})]})};function dW(e){const t=(e==null?void 0:e.toLowerCase())||"";return["inlinetool","inlineTool","code tool","code","tool","event","EVENT"].includes(e)||["inlinetool","inlineTool","code tool","code","tool","event"].includes(t)?"bg-orange-100 text-orange-800 border-orange-200":["toollibrary","toolLibrary","workflow tool"].includes(e)||["toollibrary","toollibrary","workflow tool"].includes(t)?"bg-blue-100 text-blue-800 border-blue-200":["mcp","MCP","mcpTool","mcpTool"].includes(e)||["mcp","mcptool"].includes(t)?"bg-green-100 text-green-800 border-green-200":["knowledge","KNOWLEDGE","knowledge tool"].includes(e)||["knowledge","knowledge tool"].includes(t)?"bg-purple-100 text-purple-800 border-purple-200":"bg-gray-100 text-gray-800 border-gray-200"}function hW(e){const t=(e==null?void 0:e.toLowerCase())||"";return["inlinetool","code tool","code","tool","event","inlineTool"].includes(t)?"Code Tool":["toollibrary","workflow tool"].includes(t)?"Workflow Tool":["mcp","mcptool"].includes(t)?"MCP Tool":["knowledge","knowledge tool","knowledge"].includes(t)||e==="KNOWLEDGE"?"Knowledge":e==="inlineTool"?"Code Tool":e==="toolLibrary"?"Workflow Tool":e==="KNOWLEDGE"?"Knowledge":e==="MCP"||e==="mcpTool"?"MCP Tool":"Code Tool"}const mb=({data:e,className:t})=>{const[r,n]=T.useState(5),a=()=>{n(o=>Math.min(o+10,e.length))},i=o=>o>=1e3?`${Math.floor(o/1e3)}k`:o.toString();return g.jsxs("div",{className:ue("w-full",t),children:[g.jsxs("div",{className:"grid grid-cols-4 gap-4 px-4 py-3 bg-gray-50 border-b border-gray-200 text-sm font-medium text-gray-700",children:[g.jsx("div",{className:"text-left",children:"Name"}),g.jsx("div",{className:"text-left",children:"Type"}),g.jsx("div",{className:"text-right",children:"Runs"}),g.jsx("div",{className:"text-right",children:"Response Time"})]}),g.jsx("div",{className:"divide-y divide-gray-100",children:e.slice(0,r).map((o,s)=>g.jsxs("div",{className:"grid grid-cols-4 gap-4 px-4 py-4 hover:bg-gray-50 transition-colors duration-150",children:[g.jsxs("div",{className:"flex items-center space-x-3",children:[g.jsx("div",{className:"flex-shrink-0",children:g.jsx(of,{icon:o.icon,iconSource:"workflowtool",size:"small",name:o.name||"Unknown Tool",toolType:o.toolType||o.type})}),g.jsx("div",{className:"min-w-0 flex-1",children:g.jsx("div",{className:"text-sm font-medium text-gray-900 truncate",children:o.name||"Unknown Tool"})})]}),g.jsx("div",{className:"flex items-center",children:g.jsx("span",{className:ue("inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium border",dW(o.toolType||o.type||"Default")),children:hW(o.toolType||o.type||"Default")})}),g.jsx("div",{className:"text-right text-sm text-gray-900",children:o.runs?i(o.runs):"-"}),g.jsx("div",{className:"text-right text-sm text-gray-900",children:o.responseTime||"-"})]},o.id||s))}),r<e.length&&g.jsx("div",{className:"flex justify-center py-6",children:g.jsx("button",{onClick:a,className:"px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 transition-colors duration-150",children:"Load 10 more"})})]})},pW=e=>{const t=e.toLowerCase();return t.includes("gpt")||t.includes("openai")?g.jsx("div",{className:"w-6 h-6 rounded-full bg-gray-900 flex items-center justify-center",children:g.jsx("span",{className:"text-white text-xs font-bold",children:"⚡"})}):t.includes("claude")||t.includes("anthropic")?g.jsx("div",{className:"w-6 h-6 rounded-full bg-orange-500 flex items-center justify-center",children:g.jsx("span",{className:"text-white text-xs font-bold",children:"A"})}):t.includes("gemini")||t.includes("google")?g.jsx("div",{className:"w-6 h-6 rounded-full bg-blue-500 flex items-center justify-center",children:g.jsx("span",{className:"text-white text-xs font-bold",children:"G"})}):t.includes("llama")||t.includes("meta")?g.jsx("div",{className:"w-6 h-6 rounded-full bg-blue-600 flex items-center justify-center",children:g.jsx("span",{className:"text-white text-xs font-bold",children:"M"})}):g.jsx("div",{className:"w-6 h-6 rounded-full bg-gray-500 flex items-center justify-center",children:g.jsx("span",{className:"text-white text-xs font-bold",children:"🤖"})})},gb=({data:e,className:t})=>{const[r,n]=T.useState(5),a=()=>{n(o=>Math.min(o+10,e.length))},i=o=>o>=1e3?`${Math.floor(o/1e3)}k`:o.toString();return g.jsxs("div",{className:ue("w-full",t),children:[g.jsxs("div",{className:"grid grid-cols-4 gap-4 px-4 py-3 bg-gray-50 border-b border-gray-200 text-sm font-medium text-gray-700",children:[g.jsx("div",{className:"text-left",children:"Model Name"}),g.jsx("div",{className:"text-right",children:"Runs"}),g.jsx("div",{className:"text-right",children:"Tokens"}),g.jsx("div",{className:"text-right",children:"Response Time"})]}),g.jsx("div",{className:"divide-y divide-gray-100",children:e.slice(0,r).map((o,s)=>g.jsxs("div",{className:"grid grid-cols-4 gap-4 px-4 py-4 hover:bg-gray-50 transition-colors duration-150",children:[g.jsxs("div",{className:"flex items-center space-x-3",children:[g.jsx("div",{className:"flex-shrink-0",children:pW(o.name||"Unknown")}),g.jsx("div",{className:"min-w-0 flex-1",children:g.jsx("div",{className:"text-sm font-medium text-gray-900 truncate",children:o.name||"Unknown Model"})})]}),g.jsx("div",{className:"text-right text-sm text-gray-900",children:i(o.runs||0)}),g.jsx("div",{className:"text-right text-sm text-gray-900",children:i(o.tokens||0)}),g.jsx("div",{className:"text-right text-sm text-gray-900",children:o.responseTime})]},o.id||s))}),r<e.length&&g.jsx("div",{className:"flex justify-center py-6",children:g.jsx("button",{onClick:a,className:"px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 transition-colors duration-150",children:"Load 10 more"})})]})},vW=e=>{switch(e){case"agentRuns":return{title:"Agent Runs",entityName:"Agents"};case"toolRuns":return{title:"Tool Runs",entityName:"Tools"};case"modelRuns":return{title:"Model Runs",entityName:"Models"};default:return{title:"Runs",entityName:"Items"}}},yW=e=>e>=1e3?`${Math.floor(e/1e3)}k`:e.toString(),bb=({isOpen:e,onClose:t,date:r,metricType:n,data:a,totalRuns:i,className:o})=>{var b;const s=vW(n),[l,u]=T.useState(10),[c,f]=T.useState("all"),[d,h]=T.useState(!1),v=[{label:`All ${s.entityName}`,value:"all"},...a.map(S=>({label:S.name,value:S.id}))],m=c==="all"?a:a.filter(S=>S.id===c),p=()=>{f("all"),h(!1),u(10),t()};T.useEffect(()=>{const S=$=>{$.key==="Escape"&&p()},P=$=>{d&&($.target.closest(".filter-dropdown")||h(!1))};return e&&(document.addEventListener("keydown",S),document.addEventListener("mousedown",P),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",S),document.removeEventListener("mousedown",P),document.body.style.overflow="unset"}},[e,d,p]),T.useEffect(()=>{e&&(f("all"),h(!1),u(10))},[e]);const x=S=>new Date(S).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"}),O=()=>{u(S=>Math.min(S+10,m.length))},w=S=>{f(S),h(!1),u(10)};if(!e)return null;const A=m.slice(0,l),y=((b=v.find(S=>S.value===c))==null?void 0:b.label)||`All ${s.entityName}`;return g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 z-40 transition-opacity duration-300",onClick:p}),g.jsxs("div",{className:ue("fixed right-0 top-0 h-full w-[600px] bg-white shadow-[0px_20px_24px_-4px_rgba(16,24,40,0.08),0px_8px_8px_-4px_rgba(16,24,40,0.03)] z-50 transform transition-transform duration-300 ease-in-out",e?"translate-x-0":"translate-x-full",o),children:[g.jsxs("div",{className:"flex items-center justify-between px-6 py-3 border-b border-[#d0d5dd]",children:[g.jsx("h2",{className:"text-lg font-semibold text-[#101828]",children:s.title}),g.jsx("button",{onClick:p,className:"p-2 hover:bg-gray-100 rounded-lg transition-colors",children:g.jsx(o0,{className:"h-5 w-5 text-[#101828]"})})]}),g.jsxs("div",{className:"flex flex-col h-[calc(100%-64px)] p-6 gap-6",children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsxs("div",{className:"text-sm font-medium text-[#344054]",children:[s.title," (",x(r),")"]}),g.jsxs("div",{className:"w-[210px] relative filter-dropdown",children:[g.jsxs("button",{onClick:()=>h(!d),className:"w-full bg-white border border-[#d0d5dd] rounded-lg px-3.5 py-2.5 flex items-center justify-between text-sm text-[#101828] hover:bg-gray-50 transition-colors",children:[g.jsx("span",{children:y}),g.jsx(ua,{className:"h-4 w-4 text-[#101828]"})]}),d&&g.jsx("div",{className:"absolute top-full left-0 right-0 mt-1 bg-white border border-[#d0d5dd] rounded-lg shadow-lg z-10 max-h-60 overflow-y-auto",children:v.map(S=>g.jsx("button",{onClick:()=>w(S.value),className:ue("w-full px-3.5 py-2.5 text-left text-sm hover:bg-gray-50 transition-colors",c===S.value?"bg-blue-50 text-blue-700":"text-[#101828]"),children:S.label},S.value))})]})]}),g.jsxs("div",{className:"flex-1 overflow-hidden",children:[g.jsx("div",{className:"bg-[#f9fafb] border-b border-[#eaecf0] px-2 py-2",children:g.jsxs("div",{className:"grid grid-cols-4 gap-3 items-center",children:[g.jsx("div",{className:"col-span-2 px-0 py-2",children:g.jsx("div",{className:"text-xs font-medium text-[#475467]",children:"Name"})}),g.jsx("div",{className:"flex justify-center px-0 py-2",children:g.jsx("div",{className:"text-xs font-medium text-[#475467]",children:"Runs"})}),g.jsx("div",{className:"flex justify-center px-0 py-2",children:g.jsx("div",{className:"text-xs font-medium text-[#475467]",children:"Response Time"})})]})}),g.jsx("div",{className:"overflow-y-auto max-h-[calc(100%-40px)]",children:A.length===0?g.jsxs("div",{className:"flex flex-col items-center justify-center h-64 text-center",children:[g.jsxs("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:["No ",s.title.toLowerCase()," for this date"]}),g.jsxs("p",{className:"text-gray-600",children:["There were no ",s.title.toLowerCase()," recorded on ",x(r),"."]})]}):g.jsxs(g.Fragment,{children:[A.map((S,P)=>g.jsxs("div",{className:"grid grid-cols-4 gap-3 items-center px-2 py-3 border-b border-[#eaecf0] hover:bg-gray-50 transition-colors",children:[g.jsxs("div",{className:"col-span-2 flex items-center gap-2",children:[g.jsx("div",{className:"flex-shrink-0",children:g.jsx(of,{icon:S.icon,iconSource:n==="agentRuns"?"agent":n==="toolRuns"?"workflowtool":"app",size:"small",name:S.name,toolType:S.toolType||S.type})}),g.jsx("div",{className:"min-w-0 flex-1",children:g.jsx("div",{className:"text-sm font-medium text-[#101828] truncate",children:S.name})})]}),g.jsx("div",{className:"flex justify-center",children:g.jsx("div",{className:"text-xs font-medium text-[#475467]",children:yW(S.runs)})}),g.jsx("div",{className:"flex justify-center",children:g.jsx("div",{className:"text-xs font-medium text-[#475467]",children:S.responseTime})})]},S.id||P)),l<m.length&&g.jsx("div",{className:"flex justify-center py-6",children:g.jsx("button",{onClick:O,className:"bg-white border border-[#d0d5dd] rounded px-3 py-1 text-xs font-medium text-[#344054] hover:bg-gray-50 transition-colors",children:"Load 10 more"})})]})})]})]})]})]})};class xb{constructor(t=""){Bt(this,"API_PATH","/tracing/api/trpc/metrics.getMetrics");Bt(this,"baseUrl","");Bt(this,"endpoints",{});this.baseUrl=t,this.initializeEndpoints()}setBaseUrl(t){this.baseUrl=t,this.initializeEndpoints()}getEndpoint(t){return this.endpoints[t]||{endpoint:"",method:"GET"}}getBaseUrl(){return this.baseUrl}initializeEndpoints(){const t=`${this.baseUrl}${this.API_PATH}`;this.endpoints["usage-analytics.cards"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH},this.endpoints["usage-analytics.sessions.timeseries"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH},this.endpoints["usage-analytics.messages.timeseries"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH},this.endpoints["usage-analytics.users.timeseries"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH},this.endpoints["usage-analytics.tokens.timeseries"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH},this.endpoints["runs.cards"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH},this.endpoints["runs.agent-runs.timeseries"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH},this.endpoints["runs.model-runs.timeseries"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH},this.endpoints["runs.tool-runs.timeseries"]={endpoint:t,method:"GET",baseEndpoint:this.API_PATH}}getAvailableEndpoints(){return Object.keys(this.endpoints)}hasEndpoint(t){return t in this.endpoints}}class wb{constructor(t){Bt(this,"endpointsService");Bt(this,"defaultHeaders");Bt(this,"timeout");this.endpointsService=new xb(t.baseUrl),this.defaultHeaders={"Content-Type":"application/json",...t.defaultHeaders},this.timeout=t.timeout||3e4}updateConfig(t){t.baseUrl&&this.endpointsService.setBaseUrl(t.baseUrl),t.defaultHeaders&&(this.defaultHeaders={...this.defaultHeaders,...t.defaultHeaders}),t.timeout&&(this.timeout=t.timeout)}async invoke(t,r,n,a){const i=this.endpointsService.getEndpoint(t);if(!i.endpoint)throw new Error(`Endpoint not found for service: ${t}`);const o=this.prepareRequest(i,r,n);try{const s=new AbortController,l=setTimeout(()=>s.abort(),(a==null?void 0:a.timeout)||this.timeout),u=await fetch(o.url,{method:o.method,headers:o.headers,body:o.body,signal:(a==null?void 0:a.signal)||s.signal});if(clearTimeout(l),!u.ok)throw new Error(`HTTP Error: ${u.status} ${u.statusText}`);return await u.json()}catch(s){throw s instanceof Error?s.name==="AbortError"?new Error("Request timeout"):s:new Error("Unknown error occurred during API call")}}prepareRequest(t,r,n){const a={...this.defaultHeaders,...n},i={};Object.entries(a).forEach(([l,u])=>{u!==void 0&&(i[l]=u)});let o=t.endpoint,s;if(t.method==="GET"&&r){const l=this.buildQueryParams(r);o+=`?${l}`}else r&&(s=JSON.stringify(r));return{url:o,method:t.method,headers:i,body:s}}buildQueryParams(t){const r={json:t},n=new URLSearchParams;return n.append("input",JSON.stringify(r)),n.append("rnd",Math.random().toString(36).substring(7)),n.toString()}getBaseUrl(){return this.endpointsService.getBaseUrl()}hasEndpoint(t){return this.endpointsService.hasEndpoint(t)}getAvailableEndpoints(){return this.endpointsService.getAvailableEndpoints()}}class Ht{constructor(t){Bt(this,"apiInvoker");Bt(this,"projectId");Bt(this,"environment");Bt(this,"defaultTimeRange");const r={baseUrl:t.baseUrl,defaultHeaders:t.headers,timeout:3e4};this.apiInvoker=new wb(r),this.projectId=t.projectId,this.environment=t.environment,this.defaultTimeRange=t.defaultTimeRange}updateConfig(t){(t.baseUrl||t.headers)&&this.apiInvoker.updateConfig({baseUrl:t.baseUrl,defaultHeaders:t.headers}),t.projectId&&(this.projectId=t.projectId),t.environment&&(this.environment=t.environment),t.defaultTimeRange&&(this.defaultTimeRange=t.defaultTimeRange,console.log("🔄 API Service: Updated defaultTimeRange:",this.defaultTimeRange))}getDefaultTimeRange(){return this.defaultTimeRange||Ht.getDateRange(7)}async fetchEnvironments(){try{const r=`${this.apiInvoker.getBaseUrl()}/aaa/api/v1/apps/${this.projectId}/environments?rnd=${Math.random().toString(36).substring(2,8)}`;console.log("🌍 Fetching environments for project:",this.projectId),console.log("🔗 Environment API URL:",r);const n=await fetch(r,{method:"GET",headers:{"Content-Type":"application/json",...this.apiInvoker.defaultHeaders}});if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);const a=await n.json();return console.log("✅ Environments fetched successfully:",a.map(i=>({name:i.envName,enabled:i.isEnabled,status:i.status}))),a}catch(t){throw console.error("❌ Error fetching environments:",t),t}}async fetchUsageAnalyticsCards(t,r,n,a=[]){const i=n||Ht.getTimeDimension(t,r);console.log("📊 Fetching usage analytics cards:",{dateRange:{fromTimestamp:t,toTimestamp:r},providedTimeDimension:n,resolvedTimeDimension:i});const o={projectId:this.projectId,type:"cards",category:"usage-analytics",envId:this.environment,fromTimestamp:t,toTimestamp:r,filter:a,includeTrends:!0,timeDimension:i};return(await this.apiInvoker.invoke("usage-analytics.cards",o)).result.data.json}async fetchRunsCards(t,r,n,a=[]){const i=n||Ht.getTimeDimension(t,r);console.log("📊 Fetching runs cards:",{dateRange:{fromTimestamp:t,toTimestamp:r},providedTimeDimension:n,resolvedTimeDimension:i});const o={projectId:this.projectId,type:"cards",category:"runs",envId:this.environment,fromTimestamp:t,toTimestamp:r,filter:a,includeTrends:!0,timeDimension:i};return(await this.apiInvoker.invoke("runs.cards",o)).result.data.json}async fetchTimeSeriesData(t,r,n,a,i,o=[]){const s=i||Ht.getTimeDimension(n,a);console.log("📊 Fetching time series data:",{metric:t,category:r,dateRange:{fromTimestamp:n,toTimestamp:a},providedTimeDimension:i,resolvedTimeDimension:s});const l=`${r}.${t}.timeseries`,u={projectId:this.projectId,type:"time-series",category:r,envId:this.environment,fromTimestamp:n,toTimestamp:a,filter:o,metric:t,timeDimension:s};return(await this.apiInvoker.invoke(l,u)).result.data.json}transformUsageAnalyticsCards(t){const r=t.data.trends;console.log("Transforming usage analytics cards with trends:",r);const n=a=>a>0?"increase":"decrease";return[{title:"Users",value:t.data.users,metricType:"users",icon:"users",info:"Number of unique users who interacted with the app",highlighted:!0,change:r!=null&&r.users?{value:Math.abs(r.users.changePercent),type:n(r.users.changePercent)}:void 0},{title:"Sessions",value:t.data.sessions,metricType:"sessions",icon:"activity",info:"Number of conversations initiated with the app",highlighted:!1,change:r!=null&&r.sessions?{value:Math.abs(r.sessions.changePercent),type:n(r.sessions.changePercent)}:void 0},{title:"Messages",value:t.data.messages.total,metricType:"messages",icon:"message-circle",info:"Total messages exchanged between users and the app",highlighted:!1,change:r!=null&&r.messages?{value:Math.abs(r.messages.changePercent.total),type:n(r.messages.changePercent.total)}:void 0},{title:"Tokens",value:t.data.tokens.total,metricType:"tokens",icon:"coins",info:"Total input and output tokens processed by the app for all interactions",highlighted:!1,change:r!=null&&r.tokens?{value:Math.abs(r.tokens.changePercent.total),type:n(r.tokens.changePercent.total)}:void 0}]}transformRunsCards(t){const r=t.data.trends;console.log("Transforming runs cards with trends:",r);const n=a=>a>0?"increase":"decrease";return[{title:"Agent Runs",value:t.data.agentRuns,metricType:"agentRuns",icon:"bot",info:"Number of times the AI agents were executed to handle user requests",highlighted:!0,change:r!=null&&r.agentRuns?{value:Math.abs(r.agentRuns.changePercent),type:n(r.agentRuns.changePercent)}:void 0},{title:"Tool Runs",value:t.data.toolRuns.total,metricType:"toolRuns",icon:"wrench",info:"Number of times various tools were triggered by the AI agents to complete tasks",highlighted:!1,change:r!=null&&r.toolRuns?{value:Math.abs(r.toolRuns.changePercent.total),type:n(r.toolRuns.changePercent.total)}:void 0},{title:"Model Runs",value:t.data.modelRuns,metricType:"modelRuns",icon:"cpu",info:"Number of times the AI agents called various language models to generate responses",highlighted:!1,change:r!=null&&r.modelRuns?{value:Math.abs(r.modelRuns.changePercent),type:n(r.modelRuns.changePercent)}:void 0}]}transformTimeSeriesDataForMetric(t,r){var a;if(console.log("=== METRIC-SPECIFIC TRANSFORM DEBUG ==="),console.log("Raw TimeSeriesResponse:",JSON.stringify(t,null,2)),console.log("Metric type:",r),!t||!t.data||!Array.isArray(t.data))return console.error("Invalid time series data structure:",t),[];const n=t.data.map((i,o)=>{console.log(`Processing point ${o}:`,i);const s=new Date(i.timestamp),l=s.toISOString().split("T")[0],u=s.toLocaleDateString("en-US",{month:"short",day:"numeric"}),c={date:l,timestamp:u,formattedDate:u,count:i.count||0,value:i.count||0,input_tokens:i.input_tokens||0,output_tokens:i.output_tokens||0,total_tokens:(i.input_tokens||0)+(i.output_tokens||0),inputTokens:i.input_tokens||0,outputTokens:i.output_tokens||0,totalTokens:(i.input_tokens||0)+(i.output_tokens||0),listView:i.listView||[],index:o};switch(r){case"users":c.users=i.count||0;break;case"sessions":c.sessions=i.count||0;break;case"messages":c.messages=i.count||0;break;case"tokens":c.tokens=i.count||0,i.input_tokens||i.output_tokens?c.totalTokens=(i.input_tokens||0)+(i.output_tokens||0):c.totalTokens=i.count||0;break;case"agentRuns":c.agentRuns=i.count||0;break;case"toolRuns":c.toolRuns=i.count||0;break;case"modelRuns":c.modelRuns=i.count||0;break;default:c.users=i.count||0,c.sessions=i.count||0,c.messages=i.count||0,c.tokens=i.count||0,c.agentRuns=i.count||0,c.toolRuns=i.count||0,c.modelRuns=i.count||0}return console.log(`Transformed point ${o} for metric ${r}:`,c),c});return console.log("Final transformed data array:",JSON.stringify(n,null,2)),console.log("Sample transformed point for chart:",n[0]),console.log("Populated metric property:",r,"=",(a=n[0])==null?void 0:a[r||"count"]),console.log("=== END METRIC-SPECIFIC TRANSFORM DEBUG ==="),n}transformTimeSeriesData(t){return this.transformTimeSeriesDataForMetric(t)}transformAgentsListViewToTable(t){return Array.isArray(t)?t.map((r,n)=>{var o,s;let a="",i=null;if(r.icon)try{if(i=typeof r.icon=="string"?JSON.parse(r.icon):r.icon,i.name){const l=((o=r.agentName)==null?void 0:o.replace(/\s+/g,""))||`agent${n}`,u=((s=i.color)==null?void 0:s.replace("#",""))||"b6e3f4";a=`https://api.dicebear.com/7.x/avataaars/svg?seed=${l}&backgroundColor=${u}&backgroundType=solid`}}catch{console.warn("Failed to parse icon data:",r.icon)}return{id:`agent-${n+1}`,name:r.agentName||`Agent ${n+1}`,runs:r.count||0,responseTime:r.avgResponseTime?r.avgResponseTime<1e3?`${Math.round(r.avgResponseTime)}ms`:`${(r.avgResponseTime/1e3).toFixed(2)}s`:"0ms",tokens:r.tokens||Math.floor((r.count||0)*150),successRate:r.successRate?`${Math.round(r.successRate)}%`:"95%",lastRun:r.lastRun||new Date(Date.now()-Math.random()*7*24*60*60*1e3).toLocaleDateString(),avatar:a||`https://api.dicebear.com/7.x/avataaars/svg?seed=agent${n}&backgroundColor=b6e3f4,c0aede,d1d4f9&backgroundType=solid`,icon:r.icon||void 0}}):(console.warn("Invalid listView data for agents:",t),[])}transformToolsListViewToTable(t){return Array.isArray(t)?t.map((r,n)=>({id:`tool-${n+1}`,name:r.toolName||r.tool_name||`Tool ${n+1}`,type:r.type||r.toolType||r.tool_type||"Code Tool",runs:r.count||0,responseTime:r.avgResponseTime?r.avgResponseTime<1e3?`${Math.round(r.avgResponseTime)}ms`:`${(r.avgResponseTime/1e3).toFixed(2)}s`:"0ms",tokens:r.tokens||Math.floor((r.count||0)*50),successRate:r.successRate?`${Math.round(r.successRate)}%`:"92%",lastRun:r.lastRun||new Date(Date.now()-Math.random()*7*24*60*60*1e3).toLocaleDateString(),icon:r.icon||r.tool_icon||void 0})):(console.warn("Invalid listView data for tools:",t),[])}transformModelsListViewToTable(t){if(!Array.isArray(t))return console.warn("Invalid listView data for models:",t),[];const r=n=>{const a=n.toLowerCase();return a.includes("gpt")||a.includes("openai")?"⚡":a.includes("claude")||a.includes("anthropic")?"A":a.includes("gemini")||a.includes("google")?"G":a.includes("llama")||a.includes("meta")?"M":"🤖"};return t.map((n,a)=>({id:`model-${a+1}`,name:n.modelName||`Model ${a+1}`,runs:n.count||0,responseTime:n.avgResponseTime?n.avgResponseTime<1e3?`${Math.round(n.avgResponseTime)}ms`:`${(n.avgResponseTime/1e3).toFixed(2)}s`:"0ms",tokens:n.tokens||Math.floor((n.count||0)*300),successRate:n.successRate?`${Math.round(n.successRate)}%`:"98%",lastRun:n.lastRun||new Date(Date.now()-Math.random()*7*24*60*60*1e3).toLocaleDateString(),icon:r(n.modelName||"")}))}extractAgentControlOptions(t){if(!Array.isArray(t))return[{label:"All Agents",value:"all"}];const r=[{label:"All Agents",value:"all"}];return t.forEach(n=>{var a;if(n.agentName){let i="";try{if(n.icon){const o=typeof n.icon=="string"?JSON.parse(n.icon):n.icon;if(o.name){const s=n.agentName.replace(/\s+/g,""),l=((a=o.color)==null?void 0:a.replace("#",""))||"b6e3f4";i=`https://api.dicebear.com/7.x/avataaars/svg?seed=${s}&backgroundColor=${l}&backgroundType=solid`}}}catch{console.warn("Failed to parse icon data for control:",n.icon)}r.push({label:n.agentName,value:n.agentName.replace(/\s+/g,"").toLowerCase(),avatar:i||`https://api.dicebear.com/7.x/avataaars/svg?seed=${n.agentName.replace(/\s+/g,"")}&backgroundColor=b6e3f4,c0aede,d1d4f9&backgroundType=solid`})}}),r}extractToolControlOptions(t){if(!Array.isArray(t))return[{label:"All Tools",value:"all"}];const r=[{label:"All Tools",value:"all"}];return t.forEach(n=>{const a=n.toolName||n.tool_name;if(a){let i=function(o){if(!o)return"Code Tool";const s=o.toLowerCase();return["inlinetool","code tool","code","event"].includes(s)?"Code Tool":["toollibrary","workflow tool"].includes(s)?"Workflow Tool":["mcp","mcptool"].includes(s)?"MCP Tool":["knowledge","knowledge tool"].includes(s)||o==="KNOWLEDGE"?"Knowledge":o==="inlineTool"?"Code Tool":o==="toolLibrary"?"Workflow Tool":o==="MCP"||o==="mcpTool"?"MCP Tool":"Code Tool"};r.push({label:a,value:a.replace(/[-]/g,""),icon:n.icon||n.tool_icon||void 0,type:n.type||i(n.toolType||n.tool_type)})}}),r}extractModelControlOptions(t){if(!Array.isArray(t))return[{label:"All Models",value:"all"}];const r=[{label:"All Models",value:"all"}],n=a=>{const i=a.toLowerCase();return i.includes("gpt")||i.includes("openai")?"⚡":i.includes("claude")||i.includes("anthropic")?"A":i.includes("gemini")||i.includes("google")?"G":i.includes("llama")||i.includes("meta")?"M":"🤖"};return t.forEach(a=>{a.modelName&&r.push({label:a.modelName,value:a.modelName.replace(/[-\.]/g,""),icon:n(a.modelName)})}),r}async fetchTimeSeriesDataWithTableData(t,r,n,a,i,o=[]){const s=await this.fetchTimeSeriesData(t,r,n,a,i,o);let l=[];s.data.forEach(d=>{d.listView&&Array.isArray(d.listView)&&(l=[...l,...d.listView])});const u=this.aggregateListViewItems(l);let c=[],f=[];return t==="agent-runs"?(c=this.transformAgentsListViewToTable(u),f=this.extractAgentControlOptions(u)):t==="tool-runs"?(c=this.transformToolsListViewToTable(u),f=this.extractToolControlOptions(u)):t==="model-runs"&&(c=this.transformModelsListViewToTable(u),f=this.extractModelControlOptions(u)),{chartData:this.transformTimeSeriesDataForMetric(s,t.replace("-","")),tableData:c,controlOptions:f}}aggregateListViewItems(t){const r=new Map;return t.forEach(n=>{const a=n.agentName||n.toolName||n.modelName||"unknown";if(r.has(a)){const i=r.get(a);i.count=(i.count||0)+(n.count||0),i.avgResponseTime=i.avgResponseTime&&n.avgResponseTime?(i.avgResponseTime+n.avgResponseTime)/2:i.avgResponseTime||n.avgResponseTime,i.tokens=(i.tokens||0)+(n.tokens||0)}else r.set(a,{...n})}),Array.from(r.values())}async fetchEnhancedMetricsData(t,r,n,a=[]){try{const[i,o,s]=await Promise.all([this.fetchTimeSeriesDataWithTableData("agent-runs","runs",t,r,n,a),this.fetchTimeSeriesDataWithTableData("tool-runs","runs",t,r,n,a),this.fetchTimeSeriesDataWithTableData("model-runs","runs",t,r,n,a)]);return{agents:i,tools:o,models:s}}catch(i){throw console.error("Error fetching enhanced metrics data:",i),i}}async transformRunsCardsWithEnhancedData(t,r,n,a,i=[]){const o=t.data.trends,s=h=>h>0?"increase":"decrease",[l,u,c,f]=await Promise.all([this.fetchTimeSeriesDataWithTableData("agent-runs","runs",r,n,a,i),this.fetchTimeSeriesDataWithTableData("tool-runs","runs",r,n,a,i),this.fetchTimeSeriesDataWithTableData("model-runs","runs",r,n,a,i),this.fetchTimeSeriesData("tool-runs","runs",r,n,a,i)]),d=this.transformTimeSeriesDataForToolRuns(f);return[{title:"Agent Runs",value:t.data.agentRuns,metricType:"agentRuns",icon:"bot",highlighted:!0,info:"Number of times the AI agents were executed to handle user requests",change:o!=null&&o.agentRuns?{value:Math.abs(o.agentRuns.changePercent),type:s(o.agentRuns.changePercent)}:void 0,view:{type:"chart",chart:{type:"line",title:"Agent Runs",data:l.chartData,dataKey:"agentRuns",color:"#0BA5EC",yAxisLabel:"Number of Agent Runs",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:r.split("T")[0],end:n.split("T")[0]}},table:{title:"Agent Runs",data:l.tableData,columns:[{key:"name",title:"Name",width:200,align:"left"},{key:"runs",title:"Runs",width:100,align:"right",formatter:h=>`${Math.floor(h/1e3)}k`},{key:"responseTime",title:"Response Time",width:120,align:"right"},{key:"tokens",title:"Tokens",width:100,align:"right",formatter:h=>`${Math.floor(h/1e3)}k`}]}},controls:{dropdown:{label:"All Agents",options:l.controlOptions,defaultValue:["all"],multiSelect:!0,searchable:!0},toggle:{chartView:!0,tableView:!0}}},{title:"Tool Runs",value:t.data.toolRuns.total,metricType:"toolRuns",icon:"wrench",info:"Number of times various tools were triggered by the AI agents to complete tasks",highlighted:!1,change:o!=null&&o.toolRuns?{value:Math.abs(o.toolRuns.changePercent.total),type:s(o.toolRuns.changePercent.total)}:void 0,view:{type:"chart",chart:{type:"line",title:"Tool Runs",data:d,yAxisLabel:"Number of Tool Runs",lines:[{dataKey:"toolRuns",color:"#667085",label:"Tool Runs"},{dataKey:"codeTools",color:"#F38744",label:"Code Tools"},{dataKey:"workflowTools",color:"#2970FF",label:"Workflow Tools"},{dataKey:"knowledgeTools",color:"#7A5AF8",label:"Knowledge"},{dataKey:"mcpTools",color:"#47CD89",label:"MCP Tools"}],height:300,showGrid:!0,showLegend:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:r.split("T")[0],end:n.split("T")[0]}},table:{title:"Tool Runs",data:u.tableData,columns:[{key:"name",title:"Name",width:200,align:"left"},{key:"type",title:"Type",width:150,align:"left"},{key:"runs",title:"Runs",width:100,align:"right",formatter:h=>`${Math.floor(h/1e3)}k`},{key:"responseTime",title:"Response Time",width:120,align:"right"}]}},controls:{dropdown:{label:"All Tools",options:u.controlOptions,defaultValue:["all"],multiSelect:!0,searchable:!0},toggle:{chartView:!0,tableView:!0}}},{title:"Model Runs",value:t.data.modelRuns,metricType:"modelRuns",icon:"cpu",highlighted:!1,info:"Number of times the AI agents called various language models to generate responses",change:o!=null&&o.modelRuns?{value:Math.abs(o.modelRuns.changePercent),type:s(o.modelRuns.changePercent)}:void 0,view:{type:"chart",chart:{type:"line",title:"Model Runs",data:c.chartData,dataKey:"modelRuns",color:"#47CD89",yAxisLabel:"Number of Model Runs",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:r.split("T")[0],end:n.split("T")[0]}},table:{title:"Model Runs",data:c.tableData,columns:[{key:"name",title:"Model Name",width:200,align:"left"},{key:"runs",title:"Runs",width:100,align:"right",formatter:h=>`${Math.floor(h/1e3)}k`},{key:"tokens",title:"Tokens",width:120,align:"right",formatter:h=>`${Math.floor(h/1e3)}k`},{key:"responseTime",title:"Response Time",width:120,align:"right"}]}},controls:{dropdown:{label:"All Models",options:c.controlOptions,defaultValue:["all"],multiSelect:!0,searchable:!0},toggle:{chartView:!0,tableView:!0}}}]}async transformUsageAnalyticsCardsWithEnhancedData(t,r,n,a,i=[]){const o=t.data.trends,s=d=>d>0?"increase":"decrease",[l,u,c,f]=await Promise.all([this.fetchTimeSeriesData("users","usage-analytics",r,n,a,i),this.fetchTimeSeriesData("sessions","usage-analytics",r,n,a,i),this.fetchTimeSeriesData("messages","usage-analytics",r,n,a,i),this.fetchTimeSeriesData("tokens","usage-analytics",r,n,a,i)]);return[{title:"Users",value:t.data.users,metricType:"users",icon:"users",highlighted:!0,info:"Number of unique users who interacted with the app",change:o!=null&&o.users?{value:Math.abs(o.users.changePercent),type:s(o.users.changePercent)}:void 0,view:{type:"chart",chart:{type:"line",title:"Total Users",data:this.transformTimeSeriesDataForMetric(l,"users"),dataKey:"users",color:"#4E5BA6",yAxisLabel:"Number of Users",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:r.split("T")[0],end:n.split("T")[0]}}}},{title:"Sessions",value:t.data.sessions,metricType:"sessions",icon:"activity",highlighted:!1,info:"Number of conversations initiated with the app",change:o!=null&&o.sessions?{value:Math.abs(o.sessions.changePercent),type:s(o.sessions.changePercent)}:void 0,view:{type:"chart",chart:{type:"line",title:"Total Sessions",data:this.transformTimeSeriesDataForMetric(u,"sessions"),dataKey:"sessions",color:"#0BA5EC",yAxisLabel:"Number of Sessions",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:r.split("T")[0],end:n.split("T")[0]}}}},{title:"Messages",value:t.data.messages.total,metricType:"messages",icon:"message-circle",info:"Total messages exchanged between users and the app",highlighted:!1,change:o!=null&&o.messages?{value:Math.abs(o.messages.changePercent.total),type:s(o.messages.changePercent.total)}:void 0,view:{type:"chart",chart:{type:"line",title:"Total Messages",data:this.transformTimeSeriesDataForMetric(c,"messages"),dataKey:"messages",color:"#E478FA",yAxisLabel:"Number of Messages",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:r.split("T")[0],end:n.split("T")[0]}}}},{title:"Tokens",value:t.data.tokens.total,metricType:"tokens",icon:"coins",info:"Total input and output tokens processed by the app for all interactions",highlighted:!1,change:o!=null&&o.tokens?{value:Math.abs(o.tokens.changePercent.total),type:s(o.tokens.changePercent.total)}:void 0,view:{type:"chart",chart:{type:"line",title:"Token Usage Breakdown",data:this.transformTimeSeriesDataForMetric(f,"tokens"),yAxisLabel:"Number of Tokens",lines:[{dataKey:"totalTokens",color:"#FF692E",label:"Total Tokens"},{dataKey:"inputTokens",color:"#5925DC",label:"Input Tokens"},{dataKey:"outputTokens",color:"#E478FA",label:"Output Tokens"}],height:300,showGrid:!0,showLegend:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:r.split("T")[0],end:n.split("T")[0]}}}}]}transformTimeSeriesDataForToolRuns(t){if(console.log("=== TOOL RUNS SPECIFIC TRANSFORM DEBUG ==="),console.log("Raw TimeSeriesResponse for tool runs:",JSON.stringify(t,null,2)),!t||!t.data||!Array.isArray(t.data))return console.error("Invalid time series data structure:",t),[];const r=t.data.map((n,a)=>{console.log(`Processing point ${a}:`,n);const i=new Date(n.timestamp),o=i.toISOString().split("T")[0],s=i.toLocaleDateString("en-US",{month:"short",day:"numeric"}),l=n.count||0;let u=0,c=0,f=0,d=0;if(n.listView&&Array.isArray(n.listView)){n.listView.forEach(m=>{const p=m.count||0,x=(m.toolType||m.tool_type||"").toLowerCase(),O=(m.toolName||m.tool_name||"").toLowerCase();console.log("Processing listView item:",{toolType:x,toolName:O,count:p});const w=x.toLowerCase();["inlinetool","inlineTool","tool","code","codetool","event","EVENT"].includes(x)||["inlinetool","tool","code","codetool","event"].includes(w)?u+=p:["toollibrary","toolLibrary","workflow","workflowtool"].includes(x)||["toollibrary","workflow","workflowtool"].includes(w)?c+=p:["knowledge","KNOWLEDGE","knowledgetool"].includes(x)||["knowledge","knowledgetool"].includes(w)?f+=p:["mcp","MCP","mcptool","mcpTool"].includes(x)||["mcp","mcptool"].includes(w)?d+=p:(console.log(`Unknown tool type '${x}' for tool '${O}', defaulting to code tools`),u+=p)}),console.log(`Calculated breakdown for point ${a}:`,{codeTools:u,workflowTools:c,knowledgeTools:f,mcpTools:d,total:u+c+f+d,expectedTotal:l});const v=u+c+f+d;if(Math.abs(v-l)>1){console.warn(`Breakdown total (${v}) doesn't match expected total (${l}) for point ${a}`);const m=l-v;u+=m,console.log(`Adjusted codeTools by ${m} to balance total`)}}else console.log(`No listView data for point ${a}, assigning all ${l} to codeTools`),u=l;const h={date:o,timestamp:s,formattedDate:s,toolRuns:l,value:l,count:l,codeTools:u,workflowTools:c,knowledgeTools:f,mcpTools:d,input_tokens:n.input_tokens||0,output_tokens:n.output_tokens||0,total_tokens:(n.input_tokens||0)+(n.output_tokens||0),inputTokens:n.input_tokens||0,outputTokens:n.output_tokens||0,totalTokens:(n.input_tokens||0)+(n.output_tokens||0),listView:n.listView||[],index:a};return console.log(`Transformed tool runs point ${a}:`,h),h});return console.log("Final tool runs transformed data:",JSON.stringify(r,null,2)),console.log("=== END TOOL RUNS SPECIFIC TRANSFORM DEBUG ==="),r}async fetchAllCardsData(t,r,n=[]){try{const[a,i]=await Promise.all([this.fetchUsageAnalyticsCards(t,r,void 0,n),this.fetchRunsCards(t,r,void 0,n)]);return{usageAnalytics:this.transformUsageAnalyticsCards(a),runs:this.transformRunsCards(i)}}catch(a){throw console.error("Error fetching cards data:",a),a}}async fetchAllCardsDataWithEnhancedViews(t,r,n,a=[]){try{const[i,o]=await Promise.all([this.fetchUsageAnalyticsCards(t,r,n,a),this.fetchRunsCards(t,r,n,a)]),[s,l]=await Promise.all([this.transformUsageAnalyticsCardsWithEnhancedData(i,t,r,n,a),this.transformRunsCardsWithEnhancedData(o,t,r,n,a)]);return{usageAnalytics:s,runs:l}}catch(i){throw console.error("Error fetching enhanced cards data:",i),i}}async fetchDefaultTimeSeriesData(t,r,n,a=[]){try{const[i,o]=await Promise.all([this.fetchTimeSeriesData("sessions","usage-analytics",t,r,n,a),this.fetchTimeSeriesData("agent-runs","runs",t,r,n,a)]);return{sessions:this.transformTimeSeriesData(i),agentRuns:this.transformTimeSeriesData(o)}}catch(i){throw console.error("Error fetching default time series data:",i),i}}transformListViewForSlider(t,r){return Array.isArray(t)?t.map((n,a)=>{const i={id:`${r}-${a+1}`,runs:n.count||0,responseTime:n.avgResponseTime?n.avgResponseTime<1e3?`${Math.round(n.avgResponseTime)}ms`:`${(n.avgResponseTime/1e3).toFixed(2)}s`:"0ms",successRate:n.successRate?`${Math.round(n.successRate)}%`:void 0,tokens:n.totalTokens||n.tokens||0,icon:n.icon||n.tool_icon||void 0,aiModel:"gpt-4o"};switch(r){case"agentRuns":return{...i,name:n.agentName||`Agent ${a+1}`,type:"Agent",aiModel:this.extractAIModel(n)||"gpt-4o"};case"toolRuns":return{...i,name:n.toolName||n.tool_name||`Tool ${a+1}`,type:n.type||n.toolType||n.tool_type||"Code Tool",toolType:n.toolType||n.tool_type,aiModel:this.extractAIModel(n)||"gpt-4o"};case"modelRuns":return{...i,name:n.modelName||`Model ${a+1}`,type:n.provider||"Model",aiModel:n.modelName||n.model||"gpt-4o"};default:return{...i,name:`Item ${a+1}`,type:"Unknown",aiModel:"gpt-4o"}}}):(console.warn("Invalid listView data for slider:",t),[])}extractAIModel(t){if(t.modelName)return t.modelName;if(t.model)return t.model;if(t.llmModel)return t.llmModel;if(t.aiModel)return t.aiModel;const r=["gpt-4o","gpt-4o-mini","claude-3-5-haiku"];return r[Math.floor(Math.random()*r.length)]}static getDateRange(t=7){const r=new Date,n=new Date;return n.setDate(r.getDate()-t),{fromTimestamp:n.toISOString(),toTimestamp:r.toISOString()}}static getTimeDimension(t,r){const n=new Date(t),a=new Date(r),i=new Date(n.getFullYear(),n.getMonth(),n.getDate()),o=new Date(a.getFullYear(),a.getMonth(),a.getDate()),s=o.getTime()-i.getTime(),l=s/(1e3*60*60*24),u=i.toISOString().split("T")[0],c=o.toISOString().split("T")[0],f=u===c,d=new Date(n.getFullYear(),n.getMonth(),n.getDate()),h=f&&Math.abs(n.getTime()-d.getTime())<1e3,v=Math.abs(a.getTime()-n.getTime()),m=v<60*1e3;return console.log("🕐 TimeDimension calculation:",{fromTimestamp:t,toTimestamp:r,fromDateStr:u,toDateStr:c,diffInMs:s,diffInDays:l,isSameCalendarDay:f,isTodayPattern:h,timeDiffInMs:v,isVeryClose:m,fromStartOfDay:d.toISOString(),recommended:f||h||m||l<=1?"hour":l<=31?"day":l<=90?"week":"month"}),f||h||m||l<=1?"hour":"day"}getAvailableMetrics(){return{"usage-analytics":["sessions","messages","users","tokens"],runs:["agent-runs","model-runs","tool-runs"]}}}const Ob=({config:e,className:t,isLoading:r,context:n})=>{const{type:a,chart:i,table:o,layout:s="vertical"}=e,[l,u]=T.useState({isOpen:!1,date:"",metricType:"agentRuns",data:[],totalRuns:0}),c=(m,p)=>{console.log("Chart data point clicked in ViewRenderer:",{chartData:m,date:p,context:n});const x=n==null?void 0:n.metricType;if(!x||!["agentRuns","toolRuns","modelRuns"].includes(x)){console.log("Slider not applicable for metric type:",x);return}const O=m.listView||[];console.log("ListView data for clicked date:",O);const A=new Ht({baseUrl:"",projectId:"",environment:""}).transformListViewForSlider(O,x),y=m[x]||m.count||0;console.log("Opening slider with data:",{date:p,metricType:x,sliderData:A,totalRuns:y}),u({isOpen:!0,date:p,metricType:x,data:A,totalRuns:y})},f=()=>{u(m=>({...m,isOpen:!1}))},d=()=>i?(console.log("ViewRenderer - Chart config:",i),console.log("ViewRenderer - Chart data:",i.data),console.log("ViewRenderer - Context:",n),g.jsx("div",{className:"flex-1",children:g.jsx(pb,{config:i,isLoading:r,onDataPointClick:c})})):null,h=()=>o?(n==null?void 0:n.metricType)==="agentRuns"?g.jsx("div",{className:"flex-1 min-h-[380px]",children:g.jsx(yb,{data:o.data})}):(n==null?void 0:n.metricType)==="toolRuns"?g.jsx("div",{className:"flex-1 min-h-[380px]",children:g.jsx(mb,{data:o.data})}):(n==null?void 0:n.metricType)==="modelRuns"?g.jsx("div",{className:"flex-1 min-h-[380px]",children:g.jsx(gb,{data:o.data})}):g.jsx("div",{className:"flex-1 min-h-[380px]",children:g.jsx(vb,{config:o})}):null,v=()=>{switch(a){case"chart":return d();case"table":return h();case"mixed":return g.jsxs("div",{className:ue("flex gap-6",s==="horizontal"?"flex-row":"flex-col"),children:[d(),h()]});default:return g.jsxs("div",{className:"p-4 text-center text-gray-500",children:["Unsupported view type: ",a]})}};return g.jsxs(g.Fragment,{children:[g.jsx("div",{className:ue("w-full",t),children:v()}),g.jsx(bb,{isOpen:l.isOpen,onClose:f,date:l.date,metricType:l.metricType,data:l.data,totalRuns:l.totalRuns})]})},js=({options:e,value:t,placeholder:r="Select an option",onChange:n,className:a,disabled:i=!1})=>{const[o,s]=T.useState(!1),[l,u]=T.useState(t||""),c=T.useRef(null),f=e.find(v=>v.value===l);T.useEffect(()=>{const v=m=>{c.current&&!c.current.contains(m.target)&&s(!1)};return o&&document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[o]);const d=v=>{i||(u(v),s(!1),n==null||n(v))},h=()=>{i||s(!o)};return g.jsxs("div",{ref:c,className:ue("relative min-w-[200px]",a),children:[g.jsxs("button",{type:"button",className:ue("flex h-10 w-full min-w-[200px] items-center justify-between rounded-md border border-gray-300 bg-white px-3 py-2 text-sm shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 disabled:cursor-not-allowed disabled:opacity-50 transition-colors",a),onClick:h,disabled:i,children:[g.jsx("span",{className:ue("truncate",!f&&"text-gray-500"),children:f?f.label:r}),g.jsx(ua,{className:ue("h-4 w-4 text-gray-400 transition-transform duration-200",o&&"rotate-180")})]}),o&&!i&&g.jsx("div",{className:"absolute top-full left-0 z-50 mt-1 min-w-[300px] w-max max-w-lg rounded-md border border-gray-200 bg-white shadow-lg max-h-60 overflow-y-auto",children:e.map(v=>{const m=l===v.value;return g.jsxs("div",{className:"relative group",children:[g.jsx("button",{className:ue("relative flex w-full cursor-pointer select-none items-center px-3 py-2 text-sm text-left outline-none transition-colors",v.disabled?"opacity-50 cursor-not-allowed text-gray-400":m?"bg-blue-50 text-blue-900 font-medium":"text-gray-900 hover:bg-gray-100"),onClick:()=>!v.disabled&&d(v.value),disabled:v.disabled,children:g.jsx("span",{className:"block whitespace-nowrap",children:v.label})}),v.label.length>25&&g.jsx("div",{className:"absolute left-full top-0 ml-2 z-[60] opacity-0 group-hover:opacity-100 transition-opacity duration-200 pointer-events-none",children:g.jsxs("div",{className:"bg-gray-900 text-white text-xs rounded-md px-3 py-2 whitespace-nowrap shadow-lg",children:[v.label,g.jsx("div",{className:"absolute left-0 top-1/2 transform -translate-x-full -translate-y-1/2 w-0 h-0 border-t-4 border-b-4 border-r-4 border-transparent border-r-gray-900"})]})})]},v.value)})})]})},mW=({options:e,value:t,defaultValue:r,placeholder:n="Select...",multiSelect:a=!1,searchable:i=!1,onChange:o,className:s,maxItems:l=100,maxLabelLength:u=30})=>{const[c,f]=T.useState(!1),[d,h]=T.useState(""),[v,m]=T.useState(()=>{const M=t||r;return a?Array.isArray(M)?M:M?[M]:[]:M?[Array.isArray(M)?M[0]:M]:[]}),p=T.useRef(null);T.useEffect(()=>{const M=_=>{p.current&&!p.current.contains(_.target)&&f(!1)};return document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[]);const x=(M,_=u)=>M.length<=_?M:M.substring(0,_)+"...",O=i?e.filter(M=>M.label.toLowerCase().includes(d.toLowerCase())):e,w=O.slice(0,l),A=O.length>l,y=M=>{let _;if(a){if(M==="all"){S();return}if(v.includes(M))_=v.filter(R=>R!==M),_=_.filter(R=>R!=="all");else{_=v.filter(D=>D!=="all"),_=[..._,M];const R=O.filter(D=>D.value!=="all").map(D=>D.value),k=_.filter(D=>D!=="all");k.length===R.length&&(_=["all",...k])}}else _=[M],f(!1);m(_);const j=a?_:_[0]||"";o==null||o(j)},b=()=>{if(!a)return{checked:!1,indeterminate:!1};const M=O.filter(j=>j.value!=="all").map(j=>j.value),_=v.filter(j=>j!=="all"&&M.includes(j));return v.includes("all")&&_.length===0?{checked:!1,indeterminate:!1}:_.length===0?{checked:!1,indeterminate:!1}:_.length===M.length?{checked:!0,indeterminate:!1}:{checked:!1,indeterminate:!0}},S=()=>{if(!a)return;const M=b(),_=O.filter(j=>j.value!=="all").map(j=>j.value);if(M.checked)m(["all"]),o==null||o(["all"]);else{const j=["all",..._];m(j),o==null||o(j)}},P=()=>{m(["all"]),o==null||o(a?["all"]:"all")},$=()=>{if(!a){if(v.length===0)return n;const R=e.find(k=>k.value===v[0]);return(R==null?void 0:R.label)||n}const M=v.filter(R=>R!=="all"),_=v.includes("all");if(M.length===0)return n;if(M.length===1){const R=e.find(k=>k.value===M[0]);return(R==null?void 0:R.label)||n}const j=e.filter(R=>R.value!=="all").length;return M.length===j?"All selected":`${M.length} selected`};return g.jsxs("div",{className:ue("relative",s),ref:p,children:[g.jsxs("button",{type:"button",onClick:()=>f(!c),className:ue("w-full flex items-center justify-between px-3 py-2 text-left text-sm","border border-gray-300 rounded-md bg-white hover:bg-gray-50","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500","transition-colors duration-150"),children:[g.jsx("span",{className:ue("truncate",v.length===0&&"text-gray-500"),children:$()}),g.jsx(ua,{className:ue("w-4 h-4 text-gray-400 transition-transform duration-150",c&&"transform rotate-180")})]}),c&&g.jsxs("div",{className:"absolute z-50 min-w-[300px] w-max max-w-lg mt-1 bg-white border border-gray-200 rounded-md shadow-lg max-h-80 overflow-hidden",children:[i&&g.jsx("div",{className:"p-3 border-b border-gray-100",children:g.jsxs("div",{className:"relative",children:[g.jsx(gf,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-gray-400"}),g.jsx("input",{type:"text",placeholder:`Search ${n.toLowerCase()}...`,value:d,onChange:M=>h(M.target.value),className:"w-full pl-10 pr-4 py-2 text-sm border border-gray-200 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})]})}),a&&g.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b border-gray-100 bg-gray-50",children:[g.jsxs("button",{type:"button",onClick:S,className:"flex items-center text-sm font-medium text-gray-700 hover:text-gray-900",children:[g.jsx("div",{className:ue("flex items-center justify-center w-4 h-4 mr-2 border rounded transition-colors duration-150",(()=>{const M=b();return M.indeterminate||M.checked?"bg-blue-600 border-blue-600 text-white":"border-gray-300 bg-white"})()),children:(()=>{const M=b();return M.indeterminate?g.jsx("div",{className:"w-2 h-0.5 bg-white rounded"}):M.checked?g.jsx("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 20 20",children:g.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})}):null})()}),"Select all"]}),g.jsx("button",{type:"button",onClick:P,className:"text-sm font-medium text-blue-600 hover:text-blue-800",children:"Clear"})]}),g.jsxs("div",{className:"max-h-60 overflow-y-auto",children:[w.length===0?g.jsx("div",{className:"px-3 py-4 text-sm text-gray-500 text-center",children:"No options found"}):w.map(M=>{let _;return M.value==="all"?null:(_=v.includes(M.value),g.jsxs("div",{className:"relative group",children:[g.jsxs("div",{onClick:()=>y(M.value),className:ue("flex items-center px-3 py-2 cursor-pointer hover:bg-gray-50","transition-colors duration-150",_&&"bg-blue-50"),children:[a?g.jsx("div",{className:ue("flex items-center justify-center w-4 h-4 mr-3 border rounded","transition-colors duration-150",_?"bg-blue-600 border-blue-600 text-white":"border-gray-300 bg-white"),children:_&&g.jsx("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 20 20",children:g.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})}):g.jsx("div",{className:ue("w-4 h-4 mr-3 rounded-full border-2 transition-colors duration-150",_?"border-blue-600 bg-blue-600":"border-gray-300"),children:_&&g.jsx("div",{className:"w-full h-full rounded-full bg-white scale-50"})}),g.jsx("span",{className:ue("flex-1 text-sm whitespace-nowrap",_?"font-medium text-gray-900":"text-gray-700"),children:x(M.label)})]}),M.label.length>u&&g.jsx("div",{className:"absolute left-full top-1/2 transform -translate-y-1/2 ml-2 z-[80] opacity-0 group-hover:opacity-100 transition-opacity duration-200 pointer-events-none",children:g.jsxs("div",{className:"bg-gray-900 text-white text-xs rounded-md px-3 py-2 shadow-lg max-w-xs break-words whitespace-normal",children:[M.label,g.jsx("div",{className:"absolute left-0 top-1/2 transform -translate-x-full -translate-y-1/2 w-0 h-0 border-t-4 border-b-4 border-r-4 border-transparent border-r-gray-900"})]})})]},M.value))}),A&&g.jsxs("div",{className:"px-3 py-2 text-xs text-gray-500 bg-gray-50 border-t border-gray-100",children:[g.jsxs("div",{className:"text-center font-medium",children:["+",O.length-l," more items"]}),i&&g.jsx("div",{className:"text-center mt-1 text-gray-400",children:"Use search above to find specific items"})]})]})]})]})},Sb=({config:e,className:t})=>{var s;const{dropdown:r,buttons:n,toggle:a}=e,i=l=>{const u=l.toLowerCase();return u.includes("agent")?"agent":u.includes("tool")?"workflowtool":"app"},o=l=>{const u=l.toLowerCase();return u.includes("agent")?{maxItems:50,maxLabelLength:25}:u.includes("tool")?{maxItems:30,maxLabelLength:20}:{maxItems:40,maxLabelLength:25}};return g.jsxs("div",{className:ue("flex items-center gap-3",t),children:[r&&g.jsx(g.Fragment,{children:r.multiSelect?g.jsx(mW,{options:r.options,value:r.defaultValue,placeholder:r.label,multiSelect:r.multiSelect,searchable:r.searchable,onChange:r.onChange,className:"w-48",iconSource:i(r.label),maxItems:o(r.label).maxItems,maxLabelLength:o(r.label).maxLabelLength}):g.jsx(js,{options:r.options,value:Array.isArray(r.defaultValue)?r.defaultValue[0]:r.defaultValue||((s=r.options[0])==null?void 0:s.value),placeholder:r.label,onChange:l=>{var u;return(u=r.onChange)==null?void 0:u.call(r,l)},className:"w-48"})}),n&&n.length>0&&g.jsx("div",{className:"flex items-center border border-gray-200 rounded-lg overflow-hidden",children:n.map((l,u)=>g.jsxs("button",{onClick:()=>{var c;return(c=l.onClick)==null?void 0:c.call(l,l.value)},className:ue("px-3 py-2 text-sm font-medium transition-colors","hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-inset",l.active?"bg-blue-50 text-blue-700 border-blue-200":"text-gray-700 bg-white",u>0&&"border-l border-gray-200"),children:[l.icon&&g.jsx("span",{className:"mr-2",children:l.icon}),l.label]},l.value))}),a&&g.jsxs("div",{className:"flex items-center border border-gray-200 rounded-lg overflow-hidden",children:[g.jsxs("button",{onClick:()=>{var l;return(l=a.onToggle)==null?void 0:l.call(a,"chart")},className:ue("px-3 py-2 text-sm font-medium transition-colors flex items-center gap-2","hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-inset",a.chartView?"bg-blue-50 text-blue-700 border-blue-200":"text-gray-700 bg-white"),children:[g.jsx(Zb,{className:"w-4 h-4"}),"Chart"]}),g.jsxs("button",{onClick:()=>{var l;return(l=a.onToggle)==null?void 0:l.call(a,"table")},className:ue("px-3 py-2 text-sm font-medium transition-colors flex items-center gap-2","hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-inset","border-l border-gray-200",a.tableView?"bg-blue-50 text-blue-700 border-blue-200":"text-gray-700 bg-white"),children:[g.jsx(n0,{className:"w-4 h-4"}),"Table"]})]})]})},Tb=({section:e,className:t,isLoading:r,isChartLoading:n,onMetricClick:a})=>{var K;const{id:i,title:o,description:s,metrics:l,view:u,controls:c,layout:f}=e,[d,h]=T.useState(u.type),[v,m]=T.useState("chart"),p=()=>i==="usage-analytics"?"users":i==="runs"?"agentRuns":"users",[x,O]=T.useState(p()),[w,A]=T.useState("all"),y=E=>{var F,W,G,X,Q;const L=P();(F=L==null?void 0:L.controls)!=null&&F.toggle?(m(E),(G=(W=L.controls.toggle).onToggle)==null||G.call(W,E)):(h(E),(Q=(X=c==null?void 0:c.toggle)==null?void 0:X.onToggle)==null||Q.call(X,E))},b=E=>{var W,G;const L=E.metricType||E.title.toLowerCase();O(L);const F=l.find(X=>(X.metricType||X.title.toLowerCase())===L);(G=(W=F==null?void 0:F.controls)==null?void 0:W.dropdown)!=null&&G.multiSelect?A(["all"]):A("all"),a==null||a(E)},S=E=>{var F,W,G;A(E);const L=l.find(X=>(X.metricType||X.title.toLowerCase())===x);(G=(W=(F=L==null?void 0:L.controls)==null?void 0:F.dropdown)==null?void 0:W.onChange)==null||G.call(W,E)},P=()=>l.find(E=>(E.metricType||E.title.toLowerCase())===x)||null,$=E=>Array.isArray(E)?E.filter(F=>F!=="all").length>0:E!=="all",M=E=>Array.isArray(E)?E.filter(L=>L!=="all"):E!=="all"?[E]:[],_=E=>{var G,X,Q,ae,te,V,Y,J,I;const L=((X=(G=E.view)==null?void 0:G.chart)==null?void 0:X.data)||((Q=u.chart)==null?void 0:Q.data)||[];if(!$(w))return L;const F=E.metricType,W=M(w);if(W.length===1){const ie=W[0],q=P(),se=(V=(te=(ae=q==null?void 0:q.controls)==null?void 0:ae.dropdown)==null?void 0:te.options)==null?void 0:V.find(ve=>ve.value===ie),ee=se==null?void 0:se.label;return console.log("🔍 Filtering chart data:",{metricType:F,singleFilter:ie,selectedLabel:ee,baseDataSample:L[0]}),L.map(ve=>{let We=0;return ve.listView&&Array.isArray(ve.listView)&&(We=ve.listView.filter(Ke=>F==="agentRuns"&&Ke.agentName?Ke.agentName===ee||Ke.agentName.toLowerCase()===(ee==null?void 0:ee.toLowerCase()):F==="toolRuns"&&Ke.toolName?Ke.toolName===ee||Ke.toolName.toLowerCase()===(ee==null?void 0:ee.toLowerCase()):F==="modelRuns"&&Ke.modelName?Ke.modelName===ee||Ke.modelName.toLowerCase()===(ee==null?void 0:ee.toLowerCase()):!1).reduce((Ke,lt)=>Ke+(lt.count||0),0)),console.log("📊 Filtered value for",ee,":",We),{...ve,[F]:We}})}if(W.length>1){const ie=P(),se=(((I=(J=(Y=ie==null?void 0:ie.controls)==null?void 0:Y.dropdown)==null?void 0:J.options)==null?void 0:I.filter(ee=>W.includes(ee.value)))||[]).map(ee=>ee.label);return L.map(ee=>{let ve=0;return ee.listView&&Array.isArray(ee.listView)&&(ve=ee.listView.filter(Re=>F==="agentRuns"&&Re.agentName?se.some(Be=>Re.agentName===Be||Re.agentName.toLowerCase()===(Be==null?void 0:Be.toLowerCase())):F==="toolRuns"&&Re.toolName?se.some(Be=>Re.toolName===Be||Re.toolName.toLowerCase()===(Be==null?void 0:Be.toLowerCase())):F==="modelRuns"&&Re.modelName?se.some(Be=>Re.modelName===Be||Re.modelName.toLowerCase()===(Be==null?void 0:Be.toLowerCase())):!1).reduce((Re,Be)=>Re+(Be.count||0),0)),{...ee,[F]:ve}})}return L},j=E=>{var G;if(!((G=E.view)!=null&&G.chart))return null;const L=_(E),F=()=>{var Q,ae,te,V,Y,J;if(!$(w)||!((Q=E.controls)!=null&&Q.dropdown))return((te=(ae=E.view)==null?void 0:ae.chart)==null?void 0:te.title)||E.title;const X=M(w);if(X.length===1){const I=(V=E.controls.dropdown.options)==null?void 0:V.find(ie=>ie.value===X[0]);return I?`${I.label}`:((J=(Y=E.view)==null?void 0:Y.chart)==null?void 0:J.title)||E.title}return`${X.length} selected`},W=M(w);return E.metricType==="toolRuns"&&W.length===1?{...E.view.chart,data:L,title:F(),lines:void 0,dataKey:"toolRuns",color:"#f97316",showLegend:!1}:E.metricType==="modelRuns"&&W.length===1?{...E.view.chart,data:L,title:F(),dataKey:"modelRuns",color:"#10b981",showLegend:!1}:{...E.view.chart,data:L,title:F()}},R=(E,L)=>{if(!$(w))return E;const F=M(w);if(F.length===1){const W=F[0];if(i==="runs"&&L==="agentRuns")return E.map(G=>({...G,agentRuns:G[W]||0}));if(i==="runs"&&L==="toolRuns")return E.map(G=>({...G,toolRuns:G[W.replace(/[-]/g,"")]||0}));if(i==="runs"&&L==="modelRuns")return E.map(G=>({...G,modelRuns:G[W.replace(/[-\.]/g,"")]||0}))}return E},k=E=>{var G;const L=((G=u.chart)==null?void 0:G.data)||[],F=R(L,E),W=X=>{var ae,te;if(!$(w))return X;const Q=M(w);if(Q.length===1){const V=(te=(ae=c==null?void 0:c.dropdown)==null?void 0:ae.options)==null?void 0:te.find(Y=>Y.value===Q[0]);return V?`${V.label}`:X}return`${Q.length} selected`};switch(E){case"users":return{type:"line",title:"Total Users",data:L,dataKey:"users",color:"#8b5cf6",yAxisLabel:"Number of Users",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}};case"sessions":return{type:"line",title:"Total Sessions",data:L,dataKey:"sessions",color:"#06b6d4",yAxisLabel:"Number of Sessions",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}};case"messages":return{type:"line",title:"Total Messages",data:L,dataKey:"messages",color:"#ec4899",yAxisLabel:"Number of Messages",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}};case"tokens":return{type:"line",title:"Token Usage Breakdown",data:L,yAxisLabel:"Number of Tokens",lines:[{dataKey:"totalTokens",color:"#f59e0b",label:"Total Tokens"},{dataKey:"inputTokens",color:"#3b82f6",label:"Input Tokens"},{dataKey:"outputTokens",color:"#ec4899",label:"Output Tokens"}],height:300,showGrid:!0,showLegend:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}};case"agentRuns":return{type:"line",title:W("Agent Runs"),data:F,dataKey:"agentRuns",color:"#06b6d4",yAxisLabel:"Number of Agent Runs",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}};case"toolRuns":return M(w).length===1?{type:"line",title:W("Tool Runs"),data:R(L,"toolRuns"),dataKey:"toolRuns",color:"#f97316",yAxisLabel:"Number of Tool Runs",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}}:{type:"line",title:"Tool Runs",data:F,yAxisLabel:"Number of Tool Runs",lines:[{dataKey:"toolRuns",color:"#06b6d4",label:"Tool Runs"},{dataKey:"codeTools",color:"#f97316",label:"Code Tools"},{dataKey:"workflowTools",color:"#10b981",label:"Workflow Tools"},{dataKey:"knowledgeTools",color:"#8b5cf6",label:"Knowledge"},{dataKey:"mcpTools",color:"#ef4444",label:"MCP Tools"}],height:300,showGrid:!0,showLegend:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}};case"modelRuns":return M(w).length===1?{type:"line",title:W("Model Runs"),data:R(L,"modelRuns"),dataKey:"modelRuns",color:"#10b981",yAxisLabel:"Number of Model Runs",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}}:{type:"line",title:W("Model Runs"),data:F,dataKey:"modelRuns",color:"#10b981",yAxisLabel:"Number of Model Runs",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}};default:return null}},D=(()=>{const E=P();return E!=null&&E.controls?{...E.controls,dropdown:E.controls.dropdown?{...E.controls.dropdown,onChange:S}:void 0,toggle:E.controls.toggle?{...E.controls.toggle,chartView:v==="chart",tableView:v==="table",onToggle:y}:void 0}:c?{...c,dropdown:c.dropdown?{...c.dropdown,onChange:S}:void 0,toggle:c.toggle?{...c.toggle,chartView:d==="chart",tableView:d==="table",onToggle:y}:void 0}:void 0})(),B=(()=>{var F,W,G,X,Q,ae,te,V,Y,J;const E=P();if(E!=null&&E.view){if((F=E.controls)!=null&&F.toggle){if(v==="table"&&E.view.table){let ie=E.view.table.data;if(E.metricType==="agentRuns"&&$(w)){const q=M(w);if(q.length>0){const se=((X=(G=(W=E.controls)==null?void 0:W.dropdown)==null?void 0:G.options)==null?void 0:X.filter(ee=>q.includes(ee.value)))||[];se.length>0&&(ie=ie.filter(ee=>se.some(ve=>ee.name===ve.label||ee.name&&ee.name.toLowerCase().includes(ve.label.toLowerCase()))))}}if(E.metricType==="toolRuns"&&$(w)){const q=M(w);if(q.length>0){const se=((te=(ae=(Q=E.controls)==null?void 0:Q.dropdown)==null?void 0:ae.options)==null?void 0:te.filter(ee=>q.includes(ee.value)))||[];se.length>0&&(ie=ie.filter(ee=>se.some(ve=>ee.name===ve.label||ee.name&&ee.name.toLowerCase().includes(ve.label.toLowerCase()))))}}if(E.metricType==="modelRuns"&&$(w)){const q=M(w);if(q.length>0){const se=((J=(Y=(V=E.controls)==null?void 0:V.dropdown)==null?void 0:Y.options)==null?void 0:J.filter(ee=>q.includes(ee.value)))||[];se.length>0&&(ie=ie.filter(ee=>se.some(ve=>ee.name===ve.label||ee.name&&ee.name.toLowerCase().includes(ve.label.toLowerCase()))))}}return{type:"table",table:{...E.view.table,data:ie}}}else if(v==="chart"&&E.view.chart)return{type:"chart",chart:j(E)||E.view.chart}}const I=j(E);return I?{...E.view,chart:I}:E.view}const L=k(x);return L?{type:"chart",chart:L}:{...u,type:d}})(),U=()=>l.map(E=>{const L=E.metricType||E.title.toLowerCase();return{...E,highlighted:E.highlighted||L===x}});return g.jsxs("div",{className:ue("bg-white rounded-lg border border-gray-200 p-6",t),style:{gridColumn:f!=null&&f.span?`span ${f.span}`:void 0,order:f==null?void 0:f.order},children:[o&&g.jsxs("div",{className:"mb-6",children:[g.jsx("h1",{className:"text-2xl font-semibold text-gray-900",children:o}),s&&g.jsx("p",{className:"text-sm text-gray-600 mt-1",children:s})]}),g.jsx("div",{className:"flex flex-col sm:flex-row gap-4 mb-6",children:r?g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"flex-1",children:g.jsx(gi,{})}),g.jsx("div",{className:"flex-1",children:g.jsx(gi,{})}),g.jsx("div",{className:"flex-1",children:g.jsx(gi,{})}),g.jsx("div",{className:"flex-1",children:g.jsx(gi,{})})]}):U().map((E,L)=>g.jsx("div",{className:"flex-1",children:g.jsx(_f,{data:E,onClick:b,isFirst:L===0})},`${i}-metric-${L}`))}),g.jsxs("div",{className:"flex items-center justify-between mb-6",children:[g.jsx("div",{children:P()&&g.jsx("h3",{className:"text-lg font-medium text-gray-900",children:(K=P())==null?void 0:K.title})}),D&&g.jsx(Sb,{config:D})]}),g.jsx(Ob,{config:B,isLoading:r||n,context:{sectionId:i,metricType:x}})]})},sf=T.forwardRef(({className:e,variant:t="default",size:r="md",children:n,...a},i)=>{const o="inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",s={default:"bg-primary text-primary-foreground hover:bg-primary/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground"},l={sm:"h-9 px-3",md:"h-10 px-4 py-2",lg:"h-11 px-8"};return g.jsx("button",{className:ue(o,s[t],l[r],e),ref:i,...a,children:n})});sf.displayName="Button";function $s(e){"@babel/helpers - typeof";return $s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$s(e)}function jt(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function ke(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function ze(e){ke(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||$s(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function gW(e,t){ke(2,arguments);var r=ze(e),n=jt(t);return isNaN(n)?new Date(NaN):(n&&r.setDate(r.getDate()+n),r)}function lf(e,t){ke(2,arguments);var r=ze(e),n=jt(t);if(isNaN(n))return new Date(NaN);if(!n)return r;var a=r.getDate(),i=new Date(r.getTime());i.setMonth(r.getMonth()+n+1,0);var o=i.getDate();return a>=o?i:(r.setFullYear(i.getFullYear(),i.getMonth(),a),r)}function bW(e,t){ke(2,arguments);var r=ze(e).getTime(),n=jt(t);return new Date(r+n)}var xW={};function bi(){return xW}function wW(e,t){var r,n,a,i,o,s;ke(1,arguments);var l=bi(),u=jt((r=(n=(a=(i=void 0)!==null&&i!==void 0?i:void 0)!==null&&a!==void 0?a:l.weekStartsOn)!==null&&n!==void 0?n:(o=l.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&r!==void 0?r:0);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var c=ze(e),f=c.getDay(),d=(f<u?7:0)+f-u;return c.setDate(c.getDate()-d),c.setHours(0,0,0,0),c}function OW(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function ra(e){ke(1,arguments);var t=ze(e);return t.setHours(0,0,0,0),t}function xi(e,t){ke(2,arguments);var r=ra(e),n=ra(t);return r.getTime()===n.getTime()}function SW(e){return ke(1,arguments),e instanceof Date||$s(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function TW(e){if(ke(1,arguments),!SW(e)&&typeof e!="number")return!1;var t=ze(e);return!isNaN(Number(t))}function AW(e){ke(1,arguments);var t=ze(e);return t.setHours(23,59,59,999),t}function PW(e){ke(1,arguments);var t=ze(e);return t.setDate(1),t.setHours(0,0,0,0),t}function _W(e,t){ke(2,arguments);var r=jt(t);return bW(e,-r)}var EW=864e5;function jW(e){ke(1,arguments);var t=ze(e),r=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var n=t.getTime(),a=r-n;return Math.floor(a/EW)+1}function Cs(e){ke(1,arguments);var t=1,r=ze(e),n=r.getUTCDay(),a=(n<t?7:0)+n-t;return r.setUTCDate(r.getUTCDate()-a),r.setUTCHours(0,0,0,0),r}function Ab(e){ke(1,arguments);var t=ze(e),r=t.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(r+1,0,4),n.setUTCHours(0,0,0,0);var a=Cs(n),i=new Date(0);i.setUTCFullYear(r,0,4),i.setUTCHours(0,0,0,0);var o=Cs(i);return t.getTime()>=a.getTime()?r+1:t.getTime()>=o.getTime()?r:r-1}function $W(e){ke(1,arguments);var t=Ab(e),r=new Date(0);r.setUTCFullYear(t,0,4),r.setUTCHours(0,0,0,0);var n=Cs(r);return n}var CW=6048e5;function MW(e){ke(1,arguments);var t=ze(e),r=Cs(t).getTime()-$W(t).getTime();return Math.round(r/CW)+1}function Ms(e,t){var r,n,a,i,o,s,l,u;ke(1,arguments);var c=bi(),f=jt((r=(n=(a=(i=t==null?void 0:t.weekStartsOn)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&a!==void 0?a:c.weekStartsOn)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=ze(e),h=d.getUTCDay(),v=(h<f?7:0)+h-f;return d.setUTCDate(d.getUTCDate()-v),d.setUTCHours(0,0,0,0),d}function Pb(e,t){var r,n,a,i,o,s,l,u;ke(1,arguments);var c=ze(e),f=c.getUTCFullYear(),d=bi(),h=jt((r=(n=(a=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&a!==void 0?a:d.firstWeekContainsDate)!==null&&n!==void 0?n:(l=d.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:1);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var v=new Date(0);v.setUTCFullYear(f+1,0,h),v.setUTCHours(0,0,0,0);var m=Ms(v,t),p=new Date(0);p.setUTCFullYear(f,0,h),p.setUTCHours(0,0,0,0);var x=Ms(p,t);return c.getTime()>=m.getTime()?f+1:c.getTime()>=x.getTime()?f:f-1}function kW(e,t){var r,n,a,i,o,s,l,u;ke(1,arguments);var c=bi(),f=jt((r=(n=(a=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&a!==void 0?a:c.firstWeekContainsDate)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:1),d=Pb(e,t),h=new Date(0);h.setUTCFullYear(d,0,f),h.setUTCHours(0,0,0,0);var v=Ms(h,t);return v}var NW=6048e5;function DW(e,t){ke(1,arguments);var r=ze(e),n=Ms(r,t).getTime()-kW(r,t).getTime();return Math.round(n/NW)+1}function _e(e,t){for(var r=e<0?"-":"",n=Math.abs(e).toString();n.length<t;)n="0"+n;return r+n}var Pr={y:function(t,r){var n=t.getUTCFullYear(),a=n>0?n:1-n;return _e(r==="yy"?a%100:a,r.length)},M:function(t,r){var n=t.getUTCMonth();return r==="M"?String(n+1):_e(n+1,2)},d:function(t,r){return _e(t.getUTCDate(),r.length)},a:function(t,r){var n=t.getUTCHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(t,r){return _e(t.getUTCHours()%12||12,r.length)},H:function(t,r){return _e(t.getUTCHours(),r.length)},m:function(t,r){return _e(t.getUTCMinutes(),r.length)},s:function(t,r){return _e(t.getUTCSeconds(),r.length)},S:function(t,r){var n=r.length,a=t.getUTCMilliseconds(),i=Math.floor(a*Math.pow(10,n-3));return _e(i,r.length)}},na={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},IW={G:function(t,r,n){var a=t.getUTCFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return n.era(a,{width:"abbreviated"});case"GGGGG":return n.era(a,{width:"narrow"});case"GGGG":default:return n.era(a,{width:"wide"})}},y:function(t,r,n){if(r==="yo"){var a=t.getUTCFullYear(),i=a>0?a:1-a;return n.ordinalNumber(i,{unit:"year"})}return Pr.y(t,r)},Y:function(t,r,n,a){var i=Pb(t,a),o=i>0?i:1-i;if(r==="YY"){var s=o%100;return _e(s,2)}return r==="Yo"?n.ordinalNumber(o,{unit:"year"}):_e(o,r.length)},R:function(t,r){var n=Ab(t);return _e(n,r.length)},u:function(t,r){var n=t.getUTCFullYear();return _e(n,r.length)},Q:function(t,r,n){var a=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"Q":return String(a);case"QQ":return _e(a,2);case"Qo":return n.ordinalNumber(a,{unit:"quarter"});case"QQQ":return n.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(a,{width:"wide",context:"formatting"})}},q:function(t,r,n){var a=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"q":return String(a);case"qq":return _e(a,2);case"qo":return n.ordinalNumber(a,{unit:"quarter"});case"qqq":return n.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(a,{width:"wide",context:"standalone"})}},M:function(t,r,n){var a=t.getUTCMonth();switch(r){case"M":case"MM":return Pr.M(t,r);case"Mo":return n.ordinalNumber(a+1,{unit:"month"});case"MMM":return n.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(a,{width:"wide",context:"formatting"})}},L:function(t,r,n){var a=t.getUTCMonth();switch(r){case"L":return String(a+1);case"LL":return _e(a+1,2);case"Lo":return n.ordinalNumber(a+1,{unit:"month"});case"LLL":return n.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(a,{width:"wide",context:"standalone"})}},w:function(t,r,n,a){var i=DW(t,a);return r==="wo"?n.ordinalNumber(i,{unit:"week"}):_e(i,r.length)},I:function(t,r,n){var a=MW(t);return r==="Io"?n.ordinalNumber(a,{unit:"week"}):_e(a,r.length)},d:function(t,r,n){return r==="do"?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):Pr.d(t,r)},D:function(t,r,n){var a=jW(t);return r==="Do"?n.ordinalNumber(a,{unit:"dayOfYear"}):_e(a,r.length)},E:function(t,r,n){var a=t.getUTCDay();switch(r){case"E":case"EE":case"EEE":return n.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(a,{width:"short",context:"formatting"});case"EEEE":default:return n.day(a,{width:"wide",context:"formatting"})}},e:function(t,r,n,a){var i=t.getUTCDay(),o=(i-a.weekStartsOn+8)%7||7;switch(r){case"e":return String(o);case"ee":return _e(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(t,r,n,a){var i=t.getUTCDay(),o=(i-a.weekStartsOn+8)%7||7;switch(r){case"c":return String(o);case"cc":return _e(o,r.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(t,r,n){var a=t.getUTCDay(),i=a===0?7:a;switch(r){case"i":return String(i);case"ii":return _e(i,r.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(a,{width:"short",context:"formatting"});case"iiii":default:return n.day(a,{width:"wide",context:"formatting"})}},a:function(t,r,n){var a=t.getUTCHours(),i=a/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(t,r,n){var a=t.getUTCHours(),i;switch(a===12?i=na.noon:a===0?i=na.midnight:i=a/12>=1?"pm":"am",r){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(t,r,n){var a=t.getUTCHours(),i;switch(a>=17?i=na.evening:a>=12?i=na.afternoon:a>=4?i=na.morning:i=na.night,r){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(t,r,n){if(r==="ho"){var a=t.getUTCHours()%12;return a===0&&(a=12),n.ordinalNumber(a,{unit:"hour"})}return Pr.h(t,r)},H:function(t,r,n){return r==="Ho"?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):Pr.H(t,r)},K:function(t,r,n){var a=t.getUTCHours()%12;return r==="Ko"?n.ordinalNumber(a,{unit:"hour"}):_e(a,r.length)},k:function(t,r,n){var a=t.getUTCHours();return a===0&&(a=24),r==="ko"?n.ordinalNumber(a,{unit:"hour"}):_e(a,r.length)},m:function(t,r,n){return r==="mo"?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):Pr.m(t,r)},s:function(t,r,n){return r==="so"?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):Pr.s(t,r)},S:function(t,r){return Pr.S(t,r)},X:function(t,r,n,a){var i=a._originalDate||t,o=i.getTimezoneOffset();if(o===0)return"Z";switch(r){case"X":return Eb(o);case"XXXX":case"XX":return Yr(o);case"XXXXX":case"XXX":default:return Yr(o,":")}},x:function(t,r,n,a){var i=a._originalDate||t,o=i.getTimezoneOffset();switch(r){case"x":return Eb(o);case"xxxx":case"xx":return Yr(o);case"xxxxx":case"xxx":default:return Yr(o,":")}},O:function(t,r,n,a){var i=a._originalDate||t,o=i.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+_b(o,":");case"OOOO":default:return"GMT"+Yr(o,":")}},z:function(t,r,n,a){var i=a._originalDate||t,o=i.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+_b(o,":");case"zzzz":default:return"GMT"+Yr(o,":")}},t:function(t,r,n,a){var i=a._originalDate||t,o=Math.floor(i.getTime()/1e3);return _e(o,r.length)},T:function(t,r,n,a){var i=a._originalDate||t,o=i.getTime();return _e(o,r.length)}};function _b(e,t){var r=e>0?"-":"+",n=Math.abs(e),a=Math.floor(n/60),i=n%60;if(i===0)return r+String(a);var o=t;return r+String(a)+o+_e(i,2)}function Eb(e,t){if(e%60===0){var r=e>0?"-":"+";return r+_e(Math.abs(e)/60,2)}return Yr(e,t)}function Yr(e,t){var r=t||"",n=e>0?"-":"+",a=Math.abs(e),i=_e(Math.floor(a/60),2),o=_e(a%60,2);return n+i+r+o}var jb=function(t,r){switch(t){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},$b=function(t,r){switch(t){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},LW=function(t,r){var n=t.match(/(P+)(p+)?/)||[],a=n[1],i=n[2];if(!i)return jb(t,r);var o;switch(a){case"P":o=r.dateTime({width:"short"});break;case"PP":o=r.dateTime({width:"medium"});break;case"PPP":o=r.dateTime({width:"long"});break;case"PPPP":default:o=r.dateTime({width:"full"});break}return o.replace("{{date}}",jb(a,r)).replace("{{time}}",$b(i,r))},RW={p:$b,P:LW},BW=["D","DD"],FW=["YY","YYYY"];function WW(e){return BW.indexOf(e)!==-1}function UW(e){return FW.indexOf(e)!==-1}function Cb(e,t,r){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var zW={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},KW=function(t,r,n){var a,i=zW[t];return typeof i=="string"?a=i:r===1?a=i.one:a=i.other.replace("{{count}}",r.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+a:a+" ago":a};function uf(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.width?String(t.width):e.defaultWidth,n=e.formats[r]||e.formats[e.defaultWidth];return n}}var GW={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},VW={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},qW={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},HW={date:uf({formats:GW,defaultWidth:"full"}),time:uf({formats:VW,defaultWidth:"full"}),dateTime:uf({formats:qW,defaultWidth:"full"})},YW={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},XW=function(t,r,n,a){return YW[t]};function wi(e){return function(t,r){var n=r!=null&&r.context?String(r.context):"standalone",a;if(n==="formatting"&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,o=r!=null&&r.width?String(r.width):i;a=e.formattingValues[o]||e.formattingValues[i]}else{var s=e.defaultWidth,l=r!=null&&r.width?String(r.width):e.defaultWidth;a=e.values[l]||e.values[s]}var u=e.argumentCallback?e.argumentCallback(t):t;return a[u]}}var ZW={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},JW={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},QW={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},eU={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},tU={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},rU={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},nU=function(t,r){var n=Number(t),a=n%100;if(a>20||a<10)switch(a%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},aU={ordinalNumber:nU,era:wi({values:ZW,defaultWidth:"wide"}),quarter:wi({values:JW,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:wi({values:QW,defaultWidth:"wide"}),day:wi({values:eU,defaultWidth:"wide"}),dayPeriod:wi({values:tU,defaultWidth:"wide",formattingValues:rU,defaultFormattingWidth:"wide"})};function Oi(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],i=t.match(a);if(!i)return null;var o=i[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?oU(s,function(f){return f.test(o)}):iU(s,function(f){return f.test(o)}),u;u=e.valueCallback?e.valueCallback(l):l,u=r.valueCallback?r.valueCallback(u):u;var c=t.slice(o.length);return{value:u,rest:c}}}function iU(e,t){for(var r in e)if(e.hasOwnProperty(r)&&t(e[r]))return r}function oU(e,t){for(var r=0;r<e.length;r++)if(t(e[r]))return r}function sU(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.match(e.matchPattern);if(!n)return null;var a=n[0],i=t.match(e.parsePattern);if(!i)return null;var o=e.valueCallback?e.valueCallback(i[0]):i[0];o=r.valueCallback?r.valueCallback(o):o;var s=t.slice(a.length);return{value:o,rest:s}}}var lU=/^(\d+)(th|st|nd|rd)?/i,uU=/\d+/i,cU={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},fU={any:[/^b/i,/^(a|c)/i]},dU={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},hU={any:[/1/i,/2/i,/3/i,/4/i]},pU={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},vU={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},yU={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},mU={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},gU={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},bU={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},xU={ordinalNumber:sU({matchPattern:lU,parsePattern:uU,valueCallback:function(t){return parseInt(t,10)}}),era:Oi({matchPatterns:cU,defaultMatchWidth:"wide",parsePatterns:fU,defaultParseWidth:"any"}),quarter:Oi({matchPatterns:dU,defaultMatchWidth:"wide",parsePatterns:hU,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Oi({matchPatterns:pU,defaultMatchWidth:"wide",parsePatterns:vU,defaultParseWidth:"any"}),day:Oi({matchPatterns:yU,defaultMatchWidth:"wide",parsePatterns:mU,defaultParseWidth:"any"}),dayPeriod:Oi({matchPatterns:gU,defaultMatchWidth:"any",parsePatterns:bU,defaultParseWidth:"any"})},wU={code:"en-US",formatDistance:KW,formatLong:HW,formatRelative:XW,localize:aU,match:xU,options:{weekStartsOn:0,firstWeekContainsDate:1}},OU=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,SU=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,TU=/^'([^]*?)'?$/,AU=/''/g,PU=/[a-zA-Z]/;function ks(e,t,r){var n,a,i,o,s,l,u,c,f,d,h,v,m,p;ke(2,arguments);var x=String(t),O=bi(),w=(n=(a=void 0)!==null&&a!==void 0?a:O.locale)!==null&&n!==void 0?n:wU,A=jt((i=(o=(s=(l=void 0)!==null&&l!==void 0?l:void 0)!==null&&s!==void 0?s:O.firstWeekContainsDate)!==null&&o!==void 0?o:(u=O.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(A>=1&&A<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=jt((f=(d=(h=(v=void 0)!==null&&v!==void 0?v:void 0)!==null&&h!==void 0?h:O.weekStartsOn)!==null&&d!==void 0?d:(m=O.locale)===null||m===void 0||(p=m.options)===null||p===void 0?void 0:p.weekStartsOn)!==null&&f!==void 0?f:0);if(!(y>=0&&y<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!w.localize)throw new RangeError("locale must contain localize property");if(!w.formatLong)throw new RangeError("locale must contain formatLong property");var b=ze(e);if(!TW(b))throw new RangeError("Invalid time value");var S=OW(b),P=_W(b,S),$={firstWeekContainsDate:A,weekStartsOn:y,locale:w,_originalDate:b},M=x.match(SU).map(function(_){var j=_[0];if(j==="p"||j==="P"){var R=RW[j];return R(_,w.formatLong)}return _}).join("").match(OU).map(function(_){if(_==="''")return"'";var j=_[0];if(j==="'")return _U(_);var R=IW[j];if(R)return UW(_)&&Cb(_,t,String(e)),WW(_)&&Cb(_,t,String(e)),R(P,_,w.localize,$);if(j.match(PU))throw new RangeError("Format string contains an unescaped latin alphabet character `"+j+"`");return _}).join("");return M}function _U(e){var t=e.match(TU);return t?t[1].replace(AU,"'"):e}function Mb(e,t){ke(2,arguments);var r=ze(e),n=ze(t);return r.getTime()<n.getTime()}function EU(e,t){ke(2,arguments);var r=ze(e).getTime(),n=ze(t.start).getTime(),a=ze(t.end).getTime();if(!(n<=a))throw new RangeError("Invalid interval");return r>=n&&r<=a}function Ns(e,t){ke(2,arguments);var r=jt(t);return gW(e,-r)}function jU(e,t){ke(2,arguments);var r=jt(t);return lf(e,-r)}const kb=({children:e})=>{const[t,r]=T.useState(!1);return T.useEffect(()=>(r(!0),()=>r(!1)),[]),t?Jr.createPortal(e,document.body):null};function Nb({className:e,defaultValue:t,onDateRangeChange:r}){console.log("🗓️ DateRangePicker component rendered with props:",{className:e,defaultValue:t,hasCallback:!!r});const n=[{label:"Today",value:"today",dateRange:{from:ra(new Date),to:new Date}},{label:"Yesterday",value:"yesterday",dateRange:{from:ra(Ns(new Date,1)),to:AW(Ns(new Date,1))}},{label:"This week",value:"thisWeek",dateRange:{from:wW(new Date),to:new Date}},{label:"Last 7 days",value:"7d",dateRange:{from:ra(Ns(new Date,6)),to:new Date}},{label:"This month",value:"thisMonth",dateRange:{from:PW(new Date),to:new Date}},{label:"Last 30 days",value:"30d",dateRange:{from:ra(Ns(new Date,29)),to:new Date}}],a=t?n.find(C=>C.value===t):null;console.log("📅 DateRangePicker initialization:",{defaultValue:t,defaultPreset:a==null?void 0:a.label,hasDateRange:!!(a!=null&&a.dateRange),allPresetValues:n.map(C=>C.value),foundPreset:!!a});const[i,o]=T.useState(a==null?void 0:a.dateRange),[s,l]=T.useState(a==null?void 0:a.dateRange),[u,c]=T.useState(!1),[f,d]=T.useState((a==null?void 0:a.label)||null),[h,v]=T.useState((a==null?void 0:a.label)||null),[m,p]=T.useState(new Date),[x,O]=T.useState(null),[w,A]=T.useState({top:0,left:0}),y=T.useRef(null),b=T.useRef(null);T.useEffect(()=>{var C,B;console.log("📅 DateRangePicker useEffect running:",{hasDefaultPreset:!!a,hasOnDateRangeChange:!!r,currentDate:i,currentLabel:f,defaultValue:t,defaultPresetLabel:a==null?void 0:a.label,defaultPresetValue:a==null?void 0:a.value}),a!=null&&a.dateRange&&r?(console.log("📅 DateRangePicker: Setting initial default value:",{label:a.label,dateRange:a.dateRange,from:(C=a.dateRange.from)==null?void 0:C.toLocaleDateString(),to:(B=a.dateRange.to)==null?void 0:B.toLocaleDateString()}),r(a.dateRange)):console.log("📅 DateRangePicker: NOT setting initial value because:",{hasDefaultPreset:!!a,hasDateRange:!!(a!=null&&a.dateRange),hasCallback:!!r,presetLabelsAvailable:n.map(U=>`${U.value}:${U.label}`)})},[]),T.useEffect(()=>{t&&(a!=null&&a.dateRange)&&(console.log("📅 DateRangePicker: DefaultValue changed, updating state:",{defaultValue:t,label:a.label}),o(a.dateRange),d(a.label),l(a.dateRange),v(a.label))},[t]);const S=()=>{if(!b.current)return;const C=b.current.getBoundingClientRect(),B=window.scrollY,U=window.scrollX,K=window.innerWidth,E=window.innerHeight,L=720,F=450;let W=C.bottom+B+8,G=C.left+U;G+L>K&&(G=C.right+U-L),G+L>K&&(G=K-L-20),W+F>E&&(W=C.top+B-F-8),G<20&&(G=20),W<20&&(W=20),A({top:W,left:G})};T.useEffect(()=>{const C=()=>{u&&S()};return u&&(window.addEventListener("resize",C),window.addEventListener("scroll",C)),()=>{window.removeEventListener("resize",C),window.removeEventListener("scroll",C)}},[u]);const P=(C,B)=>{if(l(C),v(B),O(null),C.from){const U=new Date(C.from.getFullYear(),C.from.getMonth(),1);p(U)}},$=C=>{if(!x)O(C),l({from:C,to:C}),v(null);else{const B=Mb(C,x)?C:x,U=Mb(C,x)?x:C;l({from:B,to:U}),O(null),v(null)}},M=()=>{o(s),d(h),r==null||r(s),c(!1),O(null)},_=()=>{l(void 0),v(null),o(void 0),d(null),r==null||r(void 0),c(!1),O(null)},j=C=>{C?(l(i),v(f),O(null),setTimeout(S,0)):(l(i),v(f),O(null)),c(C)},R=(C,B)=>(console.log("📅 formatDateRange called with:",{presetLabel:B,hasDateRange:!!(C!=null&&C.from)}),B||(C!=null&&C.from?!C.to||xi(C.from,C.to)?ks(C.from,"MMM dd, yyyy"):`${ks(C.from,"MMM dd, yyyy")} - ${ks(C.to,"MMM dd, yyyy")}`:"Pick a date range")),k=(C=0)=>{const B=lf(m,C),U=B.getFullYear(),K=B.getMonth(),E=new Date(U,K,1),F=new Date(U,K+1,0).getDate(),W=E.getDay(),G=["January","February","March","April","May","June","July","August","September","October","November","December"],X=["Su","Mo","Tu","We","Th","Fr","Sa"],Q=[],te=new Date(U,K-1,0).getDate();for(let J=W-1;J>=0;J--){const I=te-J,ie=new Date(U,K-1,I);Q.push(g.jsx("button",{onClick:()=>$(ie),className:"h-8 w-8 text-xs text-gray-400 hover:bg-gray-100 rounded flex items-center justify-center",children:I},`prev-${I}`))}for(let J=1;J<=F;J++){const I=new Date(U,K,J),ie=xi(I,new Date),q=(s==null?void 0:s.from)&&(s==null?void 0:s.to)&&EU(I,{start:s.from,end:s.to}),se=(s==null?void 0:s.from)&&xi(I,s.from),ee=(s==null?void 0:s.to)&&xi(I,s.to),ve=x&&xi(I,x);let We="h-8 w-8 text-xs hover:bg-gray-100 rounded flex items-center justify-center transition-colors ";ie&&(We+="font-semibold "),ve||se||ee?We+="bg-blue-500 text-white hover:bg-blue-600 ":q&&(We+="bg-blue-100 text-blue-900 "),Q.push(g.jsx("button",{onClick:()=>$(I),className:We,children:J},`current-${J}`))}const Y=Math.ceil((W+F)/7)*7-W-F;for(let J=1;J<=Y;J++){const I=new Date(U,K+1,J);Q.push(g.jsx("button",{onClick:()=>$(I),className:"h-8 w-8 text-xs text-gray-400 hover:bg-gray-100 rounded flex items-center justify-center",children:J},`next-${J}`))}return g.jsxs("div",{className:"p-3",children:[g.jsxs("div",{className:"flex items-center justify-between mb-3",children:[C===0&&g.jsx("button",{onClick:()=>p(jU(m,1)),className:"p-1 hover:bg-gray-100 rounded",children:g.jsx(Jb,{className:"h-4 w-4"})}),g.jsxs("div",{className:"font-medium text-sm",children:[G[K]," ",U]}),C===1&&g.jsx("button",{onClick:()=>p(lf(m,1)),className:"p-1 hover:bg-gray-100 rounded",children:g.jsx(Qb,{className:"h-4 w-4"})})]}),g.jsx("div",{className:"grid grid-cols-7 gap-1 mb-2",children:X.map(J=>g.jsx("div",{className:"h-8 flex items-center justify-center text-xs font-medium text-gray-500",children:J},J))}),g.jsx("div",{className:"grid grid-cols-7 gap-1",children:Q})]})},D=()=>"fixed bg-white border border-gray-200 rounded-lg shadow-xl z-[99999]";return g.jsxs("div",{className:`relative ${e}`,children:[g.jsxs("button",{ref:b,onClick:()=>j(!u),className:`min-w-[200px] px-3 py-2 text-left border border-gray-300 rounded-md shadow-sm bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 flex items-center ${i?"text-gray-900":"text-gray-500"}`,children:[g.jsx(yf,{className:"mr-2 h-4 w-4"}),(()=>{const C=R(i,f);return console.log("📅 Button display text:",{displayText:C,date:i,selectedPresetLabel:f}),C})()]}),u&&g.jsxs(kb,{children:[g.jsx("div",{className:"fixed inset-0 z-[99998] bg-black bg-opacity-10",onClick:()=>j(!1)}),g.jsxs("div",{ref:y,className:D(),style:{top:w.top,left:w.left,width:"720px",minWidth:"720px",maxHeight:"90vh"},onClick:C=>C.stopPropagation(),children:[g.jsxs("div",{className:"flex",children:[g.jsxs("div",{className:"flex flex-col gap-1 p-3 border-r border-gray-200 w-[160px] flex-shrink-0",children:[g.jsx("div",{className:"text-sm font-medium text-gray-500 mb-2",children:"Quick Filters"}),n.map(C=>g.jsx("button",{onClick:()=>P(C.dateRange,C.label),className:`text-left px-2 py-1.5 text-sm rounded hover:bg-gray-100 transition-colors ${h===C.label?"bg-gray-100":""}`,children:C.label},C.label))]}),g.jsxs("div",{className:"flex flex-1",children:[k(0),k(1)]})]}),g.jsxs("div",{className:"border-t border-gray-200 p-3 flex justify-end gap-2",children:[g.jsx("button",{onClick:_,className:"px-3 py-1.5 text-sm border border-gray-300 rounded hover:bg-gray-50 transition-colors",children:"Clear"}),g.jsx("button",{onClick:M,disabled:!(s!=null&&s.from),className:"px-3 py-1.5 text-sm bg-blue-600 text-white rounded hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:"Apply"})]})]})]})]})}const $U=({config:e,appConfig:t,className:r,onExport:n,onDraftChange:a,onTimeRangeChange:i})=>{var R;const{title:o,subtitle:s,sections:l,globalControls:u,layout:c={columns:12,gap:24,responsive:!0}}=e,[f,d]=T.useState(!1),[h,v]=T.useState({}),[m,p]=T.useState(l),[x,O]=T.useState([]),[w,A]=T.useState(!1),y=T.useRef(null);T.useEffect(()=>{if(t)try{y.current=new Ht(t),b(),S()}catch(k){console.error("Failed to initialize API service:",k)}},[t]);const b=async()=>{if(!(!y.current||!t)){A(!0);try{const k=await y.current.fetchEnvironments();O(k),console.log("🌍 Environments loaded:",k.map(D=>D.envName))}catch(k){console.error("Error loading environments:",k)}finally{A(!1)}}},S=async()=>{if(!(!y.current||!t)){d(!0);try{const k=y.current.getDefaultTimeRange();console.log("📊 Loading dashboard data with date range:",{fromTimestamp:k.fromTimestamp,toTimestamp:k.toTimestamp,fromDate:new Date(k.fromTimestamp).toLocaleDateString(),toDate:new Date(k.toTimestamp).toLocaleDateString()});const D=await y.current.fetchAllCardsDataWithEnhancedViews(k.fromTimestamp,k.toTimestamp);console.log("✅ Enhanced cards data loaded successfully:",D),console.log("📈 Data covers period:",{from:new Date(k.fromTimestamp).toLocaleDateString(),to:new Date(k.toTimestamp).toLocaleDateString()});const C=l.map(B=>B.id==="usage-analytics"?(console.log("Updating usage-analytics section with enhanced data"),{...B,metrics:D.usageAnalytics}):B.id==="runs"?(console.log("Updating runs section with enhanced data including table and controls"),{...B,metrics:D.runs}):B);p(C)}catch(k){console.error("Error loading initial data:",k),p(l)}finally{d(!1)}}},P=async(k,D)=>{if(!(!y.current||!t||!D.metricType)){p(C=>C.map(B=>B.id===k?{...B,metrics:B.metrics.map(U=>({...U,highlighted:U.metricType===D.metricType}))}:B)),v(C=>({...C,[k]:!0}));try{const C=t.defaultTimeRange||Ht.getDateRange(7);let B,U;if(["users","sessions","messages","tokens"].includes(D.metricType))B="usage-analytics",U=D.metricType;else if(["agentRuns","toolRuns","modelRuns"].includes(D.metricType))B="runs",U=D.metricType==="agentRuns"?"agent-runs":D.metricType==="toolRuns"?"tool-runs":"model-runs";else return;const K=await y.current.fetchTimeSeriesData(U,B,C.fromTimestamp,C.toTimestamp),E=y.current.transformTimeSeriesDataForMetric(K,D.metricType);console.log("Time series response for",D.title,":",K),console.log("Transformed data for",D.title,":",E),console.log("Metric type used for transformation:",D.metricType);const F=(W=>({users:"users",sessions:"sessions",messages:"messages",tokens:"totalTokens",agentRuns:"agentRuns",toolRuns:"toolRuns",modelRuns:"modelRuns"})[W]||"count")(D.metricType||"count");console.log("Using dataKey for metric",D.metricType,":",F),p(W=>W.map(G=>{if(G.id===k){const X={...G,view:{...G.view,chart:G.view.chart?{...G.view.chart,data:E,dataKey:F,lines:[{dataKey:F,color:G.view.chart.color||"#3b82f6",label:D.title,strokeWidth:2}]}:{type:"line",data:E,dataKey:F,lines:[{dataKey:F,color:"#3b82f6",label:D.title,strokeWidth:2}],yAxisLabel:D.title}}};return console.log("Updated section for",k,":",X),console.log("Chart config set:",X.view.chart),X}return G}))}catch(C){console.error("Error loading metric data:",C)}finally{v(C=>({...C,[k]:!1}))}}},$=k=>{var D,C;if((C=(D=u==null?void 0:u.draft)==null?void 0:D.onChange)==null||C.call(D,k),a==null||a(k),t&&y.current){const B={...t,environment:k};y.current.updateConfig(B),S()}},M=k=>{var D,C;if(console.log("🗓️ Time range change requested:",k),typeof k=="string"&&((C=(D=u==null?void 0:u.timeRange)==null?void 0:D.onChange)==null||C.call(D,k)),i==null||i(k),t&&y.current){let B=null;if(typeof k=="object"&&k.from&&k.to)B={fromTimestamp:k.from.toISOString(),toTimestamp:k.to.toISOString()},console.log("📅 Converting DateRange to API format:",B);else if(typeof k=="string"){const K={"24h":1,"7d":7,"30d":30,"90d":90}[k];K&&(B=Ht.getDateRange(K),console.log(`📅 Converting preset "${k}" (${K} days) to API format:`,B))}if(B){const U={...t,defaultTimeRange:B};console.log("🔄 Updating API configuration with new date range:",U.defaultTimeRange),y.current.updateConfig(U),console.log("🚀 Reloading dashboard data with new date range..."),S()}else console.warn("⚠️ Unable to convert time range value to API format:",k)}},_=(k="csv")=>{var D,C;(C=(D=u==null?void 0:u.export)==null?void 0:D.onExport)==null||C.call(D,k),n==null||n()},j=Object.values(h).some(k=>k);return g.jsxs("div",{className:ue("mx-auto p-6",r),children:[g.jsx("div",{className:"mb-8",children:g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsxs("div",{children:[g.jsx("h1",{className:"text-3xl font-bold text-gray-900",children:o}),s&&g.jsx("p",{className:"text-gray-600 mt-2",children:s})]}),g.jsxs("div",{className:"flex items-center gap-3",children:[(f||j)&&g.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-500",children:[g.jsx(r0,{className:"h-4 w-4 animate-spin"}),"Loading..."]}),u&&g.jsxs(g.Fragment,{children:[u.draft&&g.jsx(js,{options:x.length>0?x.map(k=>({label:k.envName.charAt(0).toUpperCase()+k.envName.slice(1),value:k.envName})):u.draft.options,value:u.draft.defaultValue,placeholder:w?"Loading environments...":u.draft.label,onChange:$,className:"min-w-[200px]",disabled:f||j||w}),u.timeRange&&(u.timeRange.useDatePicker?(console.log("🗓️ Dashboard: Rendering DateRangePicker with defaultValue:",u.timeRange.defaultValue),g.jsx(Nb,{defaultValue:u.timeRange.defaultValue,onDateRangeChange:k=>{console.log("🗓️ Dashboard: DateRangePicker callback received:",k),k&&M(k)}})):g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(yf,{className:"h-4 w-4 text-gray-500"}),g.jsx(js,{options:u.timeRange.options||[],value:u.timeRange.defaultValue,placeholder:u.timeRange.label,onChange:M,className:"min-w-[200px]",disabled:f||j})]})),((R=u.export)==null?void 0:R.enabled)&&g.jsxs(sf,{variant:"outline",onClick:()=>_(),className:"gap-2",disabled:f||j,children:[g.jsx(e0,{className:"h-4 w-4"}),"Export"]})]})]})]})}),g.jsx("div",{className:ue("grid gap-6",c.responsive&&"grid-cols-1 lg:grid-cols-12"),style:{gridTemplateColumns:c.responsive?void 0:`repeat(${c.columns}, minmax(0, 1fr))`,gap:c.gap?`${c.gap}px`:void 0},children:m.map(k=>{var D,C,B,U;return g.jsx(Tb,{section:k,isLoading:f,isChartLoading:h[k.id]||!1,onMetricClick:K=>P(k.id,K),className:ue(c.responsive&&((D=k.layout)==null?void 0:D.span)===12&&"lg:col-span-12",c.responsive&&((C=k.layout)==null?void 0:C.span)===6&&"lg:col-span-6",c.responsive&&((B=k.layout)==null?void 0:B.span)===4&&"lg:col-span-4",c.responsive&&((U=k.layout)==null?void 0:U.span)===3&&"lg:col-span-3")},k.id)})})]})},Ds=["Portfolio Analysis Expert","Mortgage Evaluator","Credit Risk Specialist","Asset Valuation Analyst","Liability Assessment Advisor"],Is=["calculate-creditScore","calculate-risk","calculate-mortgage","analyse-expenses","fetch-statement"],Ls=["gpt-4o","gpt-4o-mini","gpt-3.5-turbo","claude-3-5-sonnet","claude-3-5-haiku","claude-3-opus","gemini-1.5-pro","gemini-1.5-flash","llama-3.1-405b","llama-3.1-70b"],CU=(e=30)=>{const t=[],r=new Date;for(let n=e-1;n>=0;n--){const a=new Date(r);a.setDate(r.getDate()-n);const i=600+Math.sin(n*.1)*100,o=Math.floor(i+Math.random()*100),s=Math.floor(o*3.5+Math.random()*200),l=Math.floor(s*2.9+Math.random()*500),u=Math.floor(l*.9+Math.random()*300),c=Math.floor(u*.6),f=u-c,d=Math.floor(s*.8+Math.random()*100),h=Math.floor(d*12+Math.random()*500),v=Math.floor(d*8+Math.random()*300),m=Math.floor(h*.3+Math.random()*100),p=Math.floor(h*.25+Math.random()*80),x=Math.floor(h*.2+Math.random()*60),O=Math.floor(h*.15+Math.random()*50),w={};Ds.forEach(b=>{const S=b.replace(/\s+/g,"").toLowerCase(),P=Math.floor(d/Ds.length);w[S]=Math.floor(P+Math.random()*(P*.5))});const A={};Is.forEach(b=>{const S=b.replace(/[-]/g,""),P=Math.floor(h/Is.length);A[S]=Math.floor(P+Math.random()*(P*.8))});const y={};Ls.forEach(b=>{const S=b.replace(/[-\.]/g,""),P=Math.floor(v/Ls.length);y[S]=Math.floor(P+Math.random()*(P*.6))}),t.push({date:a.toISOString().split("T")[0],users:o,sessions:s,messages:l,totalTokens:u,inputTokens:c,outputTokens:f,agentRuns:d,toolRuns:h,modelRuns:v,codeTools:m,workflowTools:p,knowledgeTools:x,mcpTools:O,...w,...A,...y,value:o})}return t},MU=()=>{const e=[],t=['{"name":"avatar14","color":"#F6D0FE","type":"human"}','{"name":"avatar2","color":"#3B82F6","type":"human"}','{"name":"avatar7","color":"#EF4444","type":"human"}','{"name":"avatar12","color":"#10B981","type":"human"}','{"name":"avatar8","color":"#F59E0B","type":"human"}'];return Ds.forEach((r,n)=>{e.push({id:`agent-${n+1}`,name:r,runs:Math.floor(Math.random()*8e3)+4e3,responseTime:`${Math.floor(Math.random()*120)+15}s`,tokens:Math.floor(Math.random()*4e5)+1e5,successRate:`${Math.floor(Math.random()*20)+80}%`,lastRun:new Date(Date.now()-Math.random()*7*24*60*60*1e3).toLocaleDateString(),avatar:`https://api.dicebear.com/7.x/avataaars/svg?seed=${r.replace(/\s+/g,"")}&backgroundColor=b6e3f4,c0aede,d1d4f9&backgroundType=solid`,icon:t[n]||t[0]})}),e},kU=()=>{const e=r=>r.includes("calculate-creditscore")?"Code Tool":r.includes("calculate-risk")?"Workflow Tool":r.includes("calculate-mortgage")?"MCP Tool":r.includes("analyse-expenses")?"Workflow Tool":r.includes("fetch-statement")?"Knowledge":"Code Tool",t=['{"name":"calculator","color":"#EF6820","type":"inlineTool"}','{"name":"workflow","color":"#155EEF","type":"toolLibrary"}','{"name":"mcptool","color":"#101828","type":"MCP"}','{"name":"expenses","color":"#155EEF","type":"toolLibrary"}','{"name":"knowledge","color":"#7A5AF8","type":"KNOWLEDGE"}'];return Is.map((r,n)=>({id:`tool-${n+1}`,name:r,type:e(r),runs:Math.floor(Math.random()*8e3)+4e3,responseTime:`${Math.floor(Math.random()*90)+15}s`,tokens:Math.floor(Math.random()*2e4)+5e3,successRate:`${Math.floor(Math.random()*15)+85}%`,lastRun:new Date(Date.now()-Math.random()*7*24*60*60*1e3).toLocaleDateString(),icon:t[n]||t[0]}))},NU=()=>Ls.map((e,t)=>({id:`model-${t+1}`,name:e,runs:Math.floor(Math.random()*8e3)+4e3,responseTime:`${Math.floor(Math.random()*120)+15}s`,tokens:Math.floor(Math.random()*5e5)+1e5,successRate:`${Math.floor(Math.random()*15)+85}%`,lastRun:new Date(Date.now()-Math.random()*7*24*60*60*1e3).toLocaleDateString()})),Xr=CU(),DU=MU(),IU=kU(),LU=NU(),RU={id:"main-dashboard",title:"Dashboard",subtitle:"Monitor and review the usage of your agentic app.",version:"1.0.0",globalControls:{draft:{label:"Draft",options:[{label:"Current Draft",value:"current"},{label:"Previous Draft",value:"previous"},{label:"All Drafts",value:"all"}],defaultValue:"current"},timeRange:{label:"Time Range",options:[{label:"This month",value:"month"},{label:"Last 7 days",value:"week"},{label:"Last 30 days",value:"30days"},{label:"Last 90 days",value:"90days"}],defaultValue:"month"},export:{enabled:!0,formats:["csv","json","pdf"]}},layout:{columns:12,gap:24,responsive:!0},sections:[{id:"sessions",title:"Sessions",description:"User engagement and session analytics",metrics:[{title:"Users",value:3384,change:{value:6,type:"increase"},info:"Total number of unique users",metricType:"users",view:{type:"chart",chart:{type:"line",title:"Total Users",data:Xr,dataKey:"users",color:"#8b5cf6",yAxisLabel:"Number of Users",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}}}},{title:"Sessions",value:11847,change:{value:18,type:"increase"},info:"Total number of user sessions",metricType:"sessions",view:{type:"chart",chart:{type:"line",title:"Total Sessions",data:Xr,dataKey:"sessions",color:"#06b6d4",yAxisLabel:"Number of Sessions",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}}}},{title:"Messages",value:34563,change:{value:5,type:"increase"},info:"Total messages exchanged",metricType:"messages",view:{type:"chart",chart:{type:"line",title:"Total Messages",data:Xr,dataKey:"messages",color:"#e879f9",yAxisLabel:"Number of Messages",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}}}},{title:"Tokens",value:32044,change:{value:44,type:"increase"},info:"Total tokens processed",metricType:"tokens",view:{type:"chart",chart:{type:"line",title:"Token Usage Breakdown",data:Xr,yAxisLabel:"Number of Tokens",lines:[{dataKey:"totalTokens",color:"#f97316",label:"Total Tokens"},{dataKey:"inputTokens",color:"#3b82f6",label:"Input Tokens"},{dataKey:"outputTokens",color:"#e879f9",label:"Output Tokens"}],height:300,showGrid:!0,showLegend:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}}}}],view:{type:"chart"},layout:{span:12,order:1}},{id:"runs",title:"Runs",description:"Agent, tool, and model execution analytics",metrics:[{title:"Agent Runs",value:3384,change:{value:6,type:"increase"},info:"Number of agent executions",metricType:"agentRuns",view:{type:"chart",chart:{type:"line",title:"Agent Runs",data:Xr,dataKey:"agentRuns",color:"#06b6d4",yAxisLabel:"Number of Agent Runs",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}},table:{title:"Agent Runs",data:DU,columns:[{key:"name",title:"Name",width:200,align:"left"},{key:"runs",title:"Runs",width:100,align:"right",formatter:e=>`${Math.floor(e/1e3)}k`},{key:"responseTime",title:"Response Time",width:120,align:"right"},{key:"tokens",title:"Tokens",width:100,align:"right",formatter:e=>`${Math.floor(e/1e3)}k`}]}},controls:{dropdown:{label:"All Agents",options:[{label:"All Agents",value:"all"},...Ds.map(e=>({label:e,value:e.replace(/\s+/g,"").toLowerCase(),avatar:`https://api.dicebear.com/7.x/avataaars/svg?seed=${e.replace(/\s+/g,"")}&backgroundColor=b6e3f4,c0aede,d1d4f9&backgroundType=solid`}))],defaultValue:["all"],multiSelect:!0,searchable:!0},toggle:{chartView:!0,tableView:!0}}},{title:"Tool Runs",value:34563,change:{value:5,type:"increase"},info:"Number of tool executions",metricType:"toolRuns",view:{type:"chart",chart:{type:"line",title:"Tool Runs",data:Xr,yAxisLabel:"Number of Tool Runs",lines:[{dataKey:"toolRuns",color:"#06b6d4",label:"Tool Runs"},{dataKey:"codeTools",color:"#f97316",label:"Code Tools"},{dataKey:"workflowTools",color:"#10b981",label:"Workflow Tools"},{dataKey:"knowledgeTools",color:"#8b5cf6",label:"Knowledge"},{dataKey:"mcpTools",color:"#ef4444",label:"MCP Tools"}],height:300,showGrid:!0,showLegend:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}},table:{title:"Tool Runs",data:IU,columns:[{key:"name",title:"Name",width:200,align:"left"},{key:"type",title:"Type",width:150,align:"left"},{key:"runs",title:"Runs",width:100,align:"right",formatter:e=>`${Math.floor(e/1e3)}k`},{key:"responseTime",title:"Response Time",width:120,align:"right"}]}},controls:{dropdown:{label:"All Tools",options:[{label:"All Tools",value:"all"},...Is.map((e,t)=>{const r=['{"name":"calculator","color":"#EF6820","type":"inlineTool"}','{"name":"workflow","color":"#155EEF","type":"toolLibrary"}','{"name":"mcptool","color":"#101828","type":"MCP"}','{"name":"expenses","color":"#155EEF","type":"toolLibrary"}','{"name":"knowledge","color":"#7A5AF8","type":"KNOWLEDGE"}'],n=a=>a.includes("calculate-creditscore")?"Code Tool":a.includes("calculate-risk")?"Workflow Tool":a.includes("calculate-mortgage")?"MCP Tool":a.includes("analyse-expenses")?"Workflow Tool":a.includes("fetch-statement")?"Knowledge":"Code Tool";return{label:e,value:e.replace(/[-]/g,""),icon:r[t]||r[0],type:n(e)}})],defaultValue:["all"],multiSelect:!0,searchable:!0},toggle:{chartView:!0,tableView:!0}}},{title:"Model Runs",value:32044,change:{value:44,type:"increase"},info:"Number of model inferences",metricType:"modelRuns",view:{type:"chart",chart:{type:"line",title:"Model Runs",data:Xr,dataKey:"modelRuns",color:"#10b981",yAxisLabel:"Number of Model Runs",height:300,showGrid:!0,curve:"monotone",tooltip:{show:!0,style:"dark"},dateRange:{start:"2025-05-06",end:"2025-06-05"}},table:{title:"Model Runs",data:LU,columns:[{key:"name",title:"Model Name",width:200,align:"left"},{key:"runs",title:"Runs",width:100,align:"right",formatter:e=>`${Math.floor(e/1e3)}k`},{key:"tokens",title:"Tokens",width:120,align:"right",formatter:e=>`${Math.floor(e/1e3)}k`},{key:"responseTime",title:"Response Time",width:120,align:"right"}]}},controls:{dropdown:{label:"All Models",options:[{label:"All Models",value:"all"},...Ls.map(e=>{const t=r=>{const n=r.toLowerCase();return n.includes("gpt")||n.includes("openai")?"⚡":n.includes("claude")||n.includes("anthropic")?"A":n.includes("gemini")||n.includes("google")?"G":n.includes("llama")||n.includes("meta")?"M":"🤖"};return{label:e,value:e.replace(/[-\.]/g,""),icon:t(e)}})],defaultValue:["all"],multiSelect:!0,searchable:!0},toggle:{chartView:!0,tableView:!0}}}],view:{type:"chart"},layout:{span:12,order:2}}]},Yt={primary:["#8b5cf6","#06b6d4","#f97316","#10b981","#ec4899","#f59e0b","#3b82f6","#ef4444"],secondary:["#a78bfa","#22d3ee","#fb923c","#34d399","#f472b6","#fbbf24","#60a5fa","#f87171"],accent:["#6366f1","#8b5cf6","#d946ef","#06b6d4","#84cc16","#eab308"],semantic:{success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#3b82f6"},gradients:{purple:["#8b5cf6","#a78bfa"],cyan:["#06b6d4","#22d3ee"],orange:["#f97316","#fb923c"],green:["#10b981","#34d399"],sunset:["#f97316","#ec4899"],ocean:["#06b6d4","#3b82f6"],forest:["#10b981","#84cc16"]}},BU={primary:["#7c3aed","#0891b2","#ea580c","#059669","#db2777","#d97706","#2563eb","#dc2626"],secondary:["#8b5cf6","#06b6d4","#f97316","#10b981","#ec4899","#f59e0b","#3b82f6","#ef4444"],accent:["#4f46e5","#7c3aed","#c026d3","#0891b2","#65a30d","#ca8a04"],semantic:{success:"#059669",warning:"#d97706",error:"#dc2626",info:"#2563eb"}},FU={primary:["#a78bfa","#22d3ee","#fb923c","#34d399","#f472b6","#fbbf24","#60a5fa","#f87171"],secondary:["#c4b5fd","#67e8f9","#fdba74","#6ee7b7","#f9a8d4","#fcd34d","#93c5fd","#fca5a5"],accent:["#818cf8","#a78bfa","#e879f9","#22d3ee","#a3e635","#facc15"],semantic:{success:"#34d399",warning:"#fbbf24",error:"#f87171",info:"#60a5fa"}},WU={primary:["#1f2937","#374151","#6b7280","#9ca3af","#3b82f6","#1d4ed8","#10b981","#f59e0b"],secondary:["#4b5563","#6b7280","#9ca3af","#d1d5db","#60a5fa","#3b82f6","#34d399","#fbbf24"],accent:["#2563eb","#1d4ed8","#059669","#0891b2","#d97706","#b45309"],semantic:{success:"#059669",warning:"#d97706",error:"#dc2626",info:"#1d4ed8"}},Db=(e,t)=>e.primary[t%e.primary.length],Si=(e,t)=>e.semantic[t],UU=(e,t)=>{var r;return((r=e.gradients)==null?void 0:r[t])||[e.primary[0],e.primary[1]]},Ib=(e,t=Yt)=>e.map((r,n)=>({...r,color:Db(t,n)})),Rs=((e=30)=>{const t=[],r=new Date;for(let n=e-1;n>=0;n--){const a=new Date(r);a.setDate(r.getDate()-n);const i=600+Math.sin(n*.1)*100,o=Math.floor(i+Math.random()*100),s=Math.floor(o*3.5+Math.random()*200),l=Math.floor(s*2.9+Math.random()*500),u=Math.floor(l*.9+Math.random()*300),c=Math.floor(u*.6),f=u-c,d=Math.floor(s*.8+Math.random()*100),h=Math.floor(d*12+Math.random()*500),v=Math.floor(d*8+Math.random()*300);t.push({date:a.toISOString().split("T")[0],users:o,sessions:s,messages:l,totalTokens:u,inputTokens:c,outputTokens:f,agentRuns:d,toolRuns:h,modelRuns:v,value:o})}return t})(),zU={id:"enhanced-dashboard",title:"Enhanced Color Configuration Dashboard",subtitle:"Demonstrating all color configuration options",version:"1.0.0",globalControls:{draft:{label:"Draft",options:[{label:"Current Draft",value:"current"},{label:"Previous Draft",value:"previous"}],defaultValue:"current"},timeRange:{label:"Time Range",options:[{label:"Last 7 days",value:"week"},{label:"Last 30 days",value:"30days"}],defaultValue:"30days"},export:{enabled:!0,formats:["csv","json"]}},layout:{columns:12,gap:24,responsive:!0},sections:[{id:"manual-colors",title:"Manual Color Assignment",description:"Each line has manually assigned colors",metrics:[{title:"Total Users",value:3384,change:{value:6,type:"increase"},info:"Manually colored chart"}],view:{type:"chart",chart:{type:"line",title:"Manual Color Configuration",data:Rs,lines:[{dataKey:"users",color:"#8b5cf6",label:"Users",strokeWidth:3},{dataKey:"sessions",color:"#06b6d4",label:"Sessions",strokeWidth:2},{dataKey:"messages",color:"#f97316",label:"Messages",strokeWidth:2,strokeDasharray:"5 5"}],dateRange:{start:"2025-05-06",end:"2025-06-05"},tooltip:{show:!0,style:"dark"},height:300,showLegend:!1}},layout:{span:6,order:1}},{id:"auto-colors",title:"Auto-Assigned Colors",description:"Colors automatically assigned from palette",metrics:[{title:"Agent Runs",value:3384,change:{value:6,type:"increase"},info:"Auto-colored from palette"}],view:{type:"chart",chart:{type:"line",title:"Auto Color Assignment",data:Rs,lines:Ib([{dataKey:"agentRuns",label:"Agent Runs"},{dataKey:"toolRuns",label:"Tool Runs"},{dataKey:"modelRuns",label:"Model Runs"},{dataKey:"totalTokens",label:"Total Tokens"}],Yt),dateRange:{start:"2025-05-06",end:"2025-06-05"},tooltip:{show:!0,style:"dark"},height:300,showLegend:!1}},layout:{span:6,order:2}},{id:"semantic-colors",title:"Semantic Colors",description:"Using semantic colors for different data types",metrics:[{title:"Success Rate",value:"94.2%",change:{value:2,type:"increase"},info:"Using semantic success color"},{title:"Error Rate",value:"5.8%",change:{value:1,type:"decrease"},info:"Using semantic error color"}],view:{type:"chart",chart:{type:"line",title:"Semantic Color Usage",data:Rs,lines:[{dataKey:"users",color:Si(Yt,"success"),label:"Successful Operations",strokeWidth:3},{dataKey:"sessions",color:Si(Yt,"warning"),label:"Warning Events",strokeWidth:2},{dataKey:"messages",color:Si(Yt,"error"),label:"Error Events",strokeWidth:2},{dataKey:"totalTokens",color:Si(Yt,"info"),label:"Info Events",strokeWidth:2}],dateRange:{start:"2025-05-06",end:"2025-06-05"},tooltip:{show:!0,style:"dark"},height:300,showLegend:!1}},layout:{span:12,order:3}},{id:"single-custom",title:"Single Line Custom Color",description:"Single line chart with custom color and styling",metrics:[{title:"Total Messages",value:34563,change:{value:5,type:"increase"},info:"Custom styled single line"}],view:{type:"chart",chart:{type:"line",title:"Custom Single Line",data:Rs,dataKey:"messages",color:"#ec4899",dateRange:{start:"2025-05-06",end:"2025-06-05"},tooltip:{show:!0,style:"dark"},height:250,showGrid:!0,curve:"monotone"}},layout:{span:12,order:4}}]},KU={manualColors:{line1:"#8b5cf6",line2:"#06b6d4",line3:"#f97316",line4:"#10b981"},paletteColors:Yt.primary,semanticColors:Yt.semantic,gradientColors:Yt.gradients},GU={baseUrl:window.location.protocol+"//"+window.location.hostname,dashboardType:"agenticDashboard",projectId:"aa-bdbfa4eb-c7c4-4350-be96-d778188c2c4b",environment:"draft",headers:{authorization:"Bearer 2amvsUbh87obVLVYjbNnXCbXnOr-plekM7-qjKt2EJIZnZuAV2KT9WSTG0L4U33X",accountId:"6290f982fb880154e99bbede","Content-Type":"application/json"},defaultTimeRange:{fromTimestamp:new Date(Date.now()-7*24*60*60*1e3).toISOString(),toTimestamp:new Date().toISOString()},refreshInterval:3e4},VU={id:"agentic-analytics-dashboard",title:"Dashboard",subtitle:"Monitor and review the usage of your agentic app",sections:[{id:"usage-analytics",title:"Sessions",metrics:[{title:"Users",value:0,metricType:"users",highlighted:!0},{title:"Sessions",value:0,metricType:"sessions",highlighted:!1},{title:"Messages",value:0,metricType:"messages",highlighted:!1},{title:"Tokens",value:0,metricType:"tokens",highlighted:!1}],view:{type:"chart",chart:{type:"line",title:"Usage Over Time",data:[],lines:[{dataKey:"count",color:"#3B82F6",label:"Count",strokeWidth:2}],xAxisLabel:"Date",yAxisLabel:"Count",tooltip:{show:!0,formatter:(e,t)=>[`${e}`,t]}}},layout:{span:12}},{id:"runs",title:"Runs",metrics:[{title:"Agent Runs",value:0,metricType:"agentRuns",highlighted:!0},{title:"Tool Runs",value:0,metricType:"toolRuns",highlighted:!1},{title:"Model Runs",value:0,metricType:"modelRuns",highlighted:!1}],view:{type:"chart",chart:{type:"line",title:"Execution Runs Over Time",data:[],lines:[{dataKey:"count",color:"#10B981",label:"Runs",strokeWidth:2}],xAxisLabel:"Date",yAxisLabel:"Count",tooltip:{show:!0,formatter:(e,t)=>[`${e}`,t]}}},layout:{span:12}}],globalControls:{draft:{label:"Environment",options:[{label:"Draft",value:"draft"},{label:"Production",value:"production"},{label:"Staging",value:"staging"}],defaultValue:"draft"},timeRange:{label:"Time Range",useDatePicker:!0,options:[{label:"Last 7 days",value:"7d"},{label:"Last 30 days",value:"30d"}],defaultValue:"7d"},export:{enabled:!1,formats:["csv","json"],onExport:e=>{console.log(`Exporting in ${e} format`)}}},layout:{columns:12,gap:24,responsive:!0}},qU=`
210
215
  // In your Angular component (usage-analytics.component.ts)
211
216
  import { Dashboard, apiEnabledDashboardConfig, agenticAppConfig } from '@agentic/ui-libs';
212
217
 
@@ -265,4 +270,4 @@ export class AnalyticsDashboardComponent implements OnInit, AfterViewInit, OnDes
265
270
  }
266
271
  }
267
272
  }
268
- `;le.AgentListView=yb,le.AnalyticsChart=hb,le.AnalyticsTable=pb,le.ApiInvokerService=Nb,le.Button=of,le.ChartSkeleton=db,le.Dashboard=TU,le.DashboardApiService=ur,le.DashboardSection=wb,le.DateRangePicker=Mb,le.EndpointsConfigService=kb,le.MetricCard=Pf,le.MetricCardSkeleton=mi,le.ModelListView=gb,le.Portal=Cb,le.SectionControls=xb,le.Select=js,le.Skeleton=ra,le.ToolListView=mb,le.ViewRenderer=bb,le.agenticAppConfig=FU,le.angularIntegrationExample=UU,le.apiEnabledDashboardConfig=WU,le.autoAssignColors=Ib,le.businessPalette=IU,le.cn=ce,le.colorExamples=BU,le.darkPalette=NU,le.defaultPalette=Ht,le.enhancedDashboardConfig=RU,le.getColorFromPalette=Db,le.getGradientColors=LU,le.getSemanticColor=Oi,le.lightPalette=DU,le.sampleDashboardConfig=kU,Object.defineProperty(le,Symbol.toStringTag,{value:"Module"})});
273
+ `;le.AgentListView=yb,le.AnalyticsChart=pb,le.AnalyticsTable=vb,le.ApiInvokerService=wb,le.Button=sf,le.ChartSkeleton=hb,le.Dashboard=$U,le.DashboardApiService=Ht,le.DashboardSection=Tb,le.DateRangePicker=Nb,le.EndpointsConfigService=xb,le.MetricCard=_f,le.MetricCardSkeleton=gi,le.ModelListView=gb,le.Portal=kb,le.RunsSlider=bb,le.SectionControls=Sb,le.Select=js,le.Skeleton=ta,le.ToolListView=mb,le.ViewRenderer=Ob,le.agenticAppConfig=GU,le.angularIntegrationExample=qU,le.apiEnabledDashboardConfig=VU,le.autoAssignColors=Ib,le.businessPalette=WU,le.cn=ue,le.colorExamples=KU,le.darkPalette=BU,le.defaultPalette=Yt,le.enhancedDashboardConfig=zU,le.getColorFromPalette=Db,le.getGradientColors=UU,le.getSemanticColor=Si,le.lightPalette=FU,le.sampleDashboardConfig=RU,Object.defineProperty(le,Symbol.toStringTag,{value:"Module"})});