visual-forge-hub-test-env 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +5069 -5067
- package/dist/index.umd.js +61 -61
- package/dist/pages/PublicPage.d.ts +7 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(Vr,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],x):(Vr=typeof globalThis<"u"?globalThis:Vr||self,x(Vr.VisualForgeHub={},Vr.React))})(this,function(Vr,x){"use strict";function xx(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}function Ox(t,e){for(var r=0;r<e.length;r++){const n=e[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in t)){const a=Object.getOwnPropertyDescriptor(n,i);a&&Object.defineProperty(t,i,a.get?a:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}const ve=xx(x);var Eo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function je(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function nh(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var Vu={exports:{}},Qi={};/**
|
|
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
|
|
9
|
+
*/var ih;function Sx(){if(ih)return Qi;ih=1;var t=x,e=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function o(s,u,l){var c,f={},d=null,h=null;l!==void 0&&(d=""+l),u.key!==void 0&&(d=""+u.key),u.ref!==void 0&&(h=u.ref);for(c in u)n.call(u,c)&&!a.hasOwnProperty(c)&&(f[c]=u[c]);if(s&&s.defaultProps)for(c in u=s.defaultProps,u)f[c]===void 0&&(f[c]=u[c]);return{$$typeof:e,type:s,key:d,ref:h,props:f,_owner:i.current}}return Qi.Fragment=r,Qi.jsx=o,Qi.jsxs=o,Qi}var ea={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,29 +14,29 @@
|
|
|
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
|
|
18
|
-
`+ue+
|
|
17
|
+
*/var ah;function Ax(){return ah||(ah=1,process.env.NODE_ENV!=="production"&&function(){var t=x,e=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),l=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(T){if(T===null||typeof T!="object")return null;var K=y&&T[y]||T[v];return typeof K=="function"?K:null}var m=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function b(T){{for(var K=arguments.length,X=new Array(K>1?K-1:0),de=1;de<K;de++)X[de-1]=arguments[de];w("error",T,X)}}function w(T,K,X){{var de=m.ReactDebugCurrentFrame,Te=de.getStackAddendum();Te!==""&&(K+="%s",X=X.concat([Te]));var Ce=X.map(function(me){return String(me)});Ce.unshift("Warning: "+K),Function.prototype.apply.call(console[T],console,Ce)}}var O=!1,g=!1,_=!1,S=!1,A=!1,E;E=Symbol.for("react.module.reference");function N(T){return!!(typeof T=="string"||typeof T=="function"||T===n||T===a||A||T===i||T===l||T===c||S||T===h||O||g||_||typeof T=="object"&&T!==null&&(T.$$typeof===d||T.$$typeof===f||T.$$typeof===o||T.$$typeof===s||T.$$typeof===u||T.$$typeof===E||T.getModuleId!==void 0))}function j(T,K,X){var de=T.displayName;if(de)return de;var Te=K.displayName||K.name||"";return Te!==""?X+"("+Te+")":X}function $(T){return T.displayName||"Context"}function k(T){if(T==null)return null;if(typeof T.tag=="number"&&b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof T=="function")return T.displayName||T.name||null;if(typeof T=="string")return T;switch(T){case n:return"Fragment";case r:return"Portal";case a:return"Profiler";case i:return"StrictMode";case l:return"Suspense";case c:return"SuspenseList"}if(typeof T=="object")switch(T.$$typeof){case s:var K=T;return $(K)+".Consumer";case o:var X=T;return $(X._context)+".Provider";case u:return j(T,T.render,"ForwardRef");case f:var de=T.displayName||null;return de!==null?de:k(T.type)||"Memo";case d:{var Te=T,Ce=Te._payload,me=Te._init;try{return k(me(Ce))}catch{return null}}}return null}var I=Object.assign,R=0,M,L,q,z,D,B,F;function G(){}G.__reactDisabledLog=!0;function J(){{if(R===0){M=console.log,L=console.info,q=console.warn,z=console.error,D=console.group,B=console.groupCollapsed,F=console.groupEnd;var T={configurable:!0,enumerable:!0,value:G,writable:!0};Object.defineProperties(console,{info:T,log:T,warn:T,error:T,group:T,groupCollapsed:T,groupEnd:T})}R++}}function re(){{if(R--,R===0){var T={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:I({},T,{value:M}),info:I({},T,{value:L}),warn:I({},T,{value:q}),error:I({},T,{value:z}),group:I({},T,{value:D}),groupCollapsed:I({},T,{value:B}),groupEnd:I({},T,{value:F})})}R<0&&b("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ne=m.ReactCurrentDispatcher,ue;function oe(T,K,X){{if(ue===void 0)try{throw Error()}catch(Te){var de=Te.stack.trim().match(/\n( *(at )?)/);ue=de&&de[1]||""}return`
|
|
18
|
+
`+ue+T}}var W=!1,Y;{var te=typeof WeakMap=="function"?WeakMap:Map;Y=new te}function C(T,K){if(!T||W)return"";{var X=Y.get(T);if(X!==void 0)return X}var de;W=!0;var Te=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Ce;Ce=ne.current,ne.current=null,J();try{if(K){var me=function(){throw Error()};if(Object.defineProperty(me.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(me,[])}catch(bt){de=bt}Reflect.construct(T,[],me)}else{try{me.call()}catch(bt){de=bt}T.call(me.prototype)}}else{try{throw Error()}catch(bt){de=bt}T()}}catch(bt){if(bt&&de&&typeof bt.stack=="string"){for(var ge=bt.stack.split(`
|
|
19
19
|
`),vt=de.stack.split(`
|
|
20
20
|
`),ze=ge.length-1,Ye=vt.length-1;ze>=1&&Ye>=0&&ge[ze]!==vt[Ye];)Ye--;for(;ze>=1&&Ye>=0;ze--,Ye--)if(ge[ze]!==vt[Ye]){if(ze!==1||Ye!==1)do if(ze--,Ye--,Ye<0||ge[ze]!==vt[Ye]){var Bt=`
|
|
21
|
-
`+ge[ze].replace(" at new "," at ");return
|
|
21
|
+
`+ge[ze].replace(" at new "," at ");return T.displayName&&Bt.includes("<anonymous>")&&(Bt=Bt.replace("<anonymous>",T.displayName)),typeof T=="function"&&Y.set(T,Bt),Bt}while(ze>=1&&Ye>=0);break}}}finally{W=!1,ne.current=Ce,re(),Error.prepareStackTrace=Te}var Zi=T?T.displayName||T.name:"",jn=Zi?oe(Zi):"";return typeof T=="function"&&Y.set(T,jn),jn}function ye(T,K,X){return C(T,!1)}function H(T){var K=T.prototype;return!!(K&&K.isReactComponent)}function _e(T,K,X){if(T==null)return"";if(typeof T=="function")return C(T,H(T));if(typeof T=="string")return oe(T);switch(T){case l:return oe("Suspense");case c:return oe("SuspenseList")}if(typeof T=="object")switch(T.$$typeof){case u:return ye(T.render);case f:return _e(T.type,K,X);case d:{var de=T,Te=de._payload,Ce=de._init;try{return _e(Ce(Te),K,X)}catch{}}}return""}var Ee=Object.prototype.hasOwnProperty,Ge={},Jt=m.ReactDebugCurrentFrame;function Zt(T){if(T){var K=T._owner,X=_e(T.type,T._source,K?K.type:null);Jt.setExtraStackFrame(X)}else Jt.setExtraStackFrame(null)}function Yi(T,K,X,de,Te){{var Ce=Function.call.bind(Ee);for(var me in T)if(Ce(T,me)){var ge=void 0;try{if(typeof T[me]!="function"){var vt=Error((de||"React class")+": "+X+" type `"+me+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof T[me]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw vt.name="Invariant Violation",vt}ge=T[me](K,me,de,X,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ze){ge=ze}ge&&!(ge instanceof Error)&&(Zt(Te),b("%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).",de||"React class",X,me,typeof ge),Zt(null)),ge instanceof Error&&!(ge.message in Ge)&&(Ge[ge.message]=!0,Zt(Te),b("Failed %s type: %s",X,ge.message),Zt(null))}}}var Ar=Array.isArray;function jt(T){return Ar(T)}function So(T){{var K=typeof Symbol=="function"&&Symbol.toStringTag,X=K&&T[Symbol.toStringTag]||T.constructor.name||"Object";return X}}function Ao(T){try{return Xi(T),!1}catch{return!0}}function Xi(T){return""+T}function Po(T){if(Ao(T))return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",So(T)),Xi(T)}var Kr=m.ReactCurrentOwner,v4={key:!0,ref:!0,__self:!0,__source:!0},hx,px,Zd;Zd={};function y4(T){if(Ee.call(T,"ref")){var K=Object.getOwnPropertyDescriptor(T,"ref").get;if(K&&K.isReactWarning)return!1}return T.ref!==void 0}function g4(T){if(Ee.call(T,"key")){var K=Object.getOwnPropertyDescriptor(T,"key").get;if(K&&K.isReactWarning)return!1}return T.key!==void 0}function m4(T,K){if(typeof T.ref=="string"&&Kr.current&&K&&Kr.current.stateNode!==K){var X=k(Kr.current.type);Zd[X]||(b('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',k(Kr.current.type),T.ref),Zd[X]=!0)}}function b4(T,K){{var X=function(){hx||(hx=!0,b("%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)",K))};X.isReactWarning=!0,Object.defineProperty(T,"key",{get:X,configurable:!0})}}function w4(T,K){{var X=function(){px||(px=!0,b("%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)",K))};X.isReactWarning=!0,Object.defineProperty(T,"ref",{get:X,configurable:!0})}}var _4=function(T,K,X,de,Te,Ce,me){var ge={$$typeof:e,type:T,key:K,ref:X,props:me,_owner:Ce};return ge._store={},Object.defineProperty(ge._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ge,"_self",{configurable:!1,enumerable:!1,writable:!1,value:de}),Object.defineProperty(ge,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Te}),Object.freeze&&(Object.freeze(ge.props),Object.freeze(ge)),ge};function x4(T,K,X,de,Te){{var Ce,me={},ge=null,vt=null;X!==void 0&&(Po(X),ge=""+X),g4(K)&&(Po(K.key),ge=""+K.key),y4(K)&&(vt=K.ref,m4(K,Te));for(Ce in K)Ee.call(K,Ce)&&!v4.hasOwnProperty(Ce)&&(me[Ce]=K[Ce]);if(T&&T.defaultProps){var ze=T.defaultProps;for(Ce in ze)me[Ce]===void 0&&(me[Ce]=ze[Ce])}if(ge||vt){var Ye=typeof T=="function"?T.displayName||T.name||"Unknown":T;ge&&b4(me,Ye),vt&&w4(me,Ye)}return _4(T,ge,vt,Te,de,Kr.current,me)}}var Qd=m.ReactCurrentOwner,vx=m.ReactDebugCurrentFrame;function Ji(T){if(T){var K=T._owner,X=_e(T.type,T._source,K?K.type:null);vx.setExtraStackFrame(X)}else vx.setExtraStackFrame(null)}var eh;eh=!1;function th(T){return typeof T=="object"&&T!==null&&T.$$typeof===e}function yx(){{if(Qd.current){var T=k(Qd.current.type);if(T)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+
|
|
23
|
+
Check the render method of \``+T+"`."}return""}}function O4(T){return""}var gx={};function S4(T){{var K=yx();if(!K){var X=typeof T=="string"?T:T.displayName||T.name;X&&(K=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+X+">.")}return K}}function
|
|
25
|
+
Check the top-level render call using <`+X+">.")}return K}}function mx(T,K){{if(!T._store||T._store.validated||T.key!=null)return;T._store.validated=!0;var X=S4(K);if(gx[X])return;gx[X]=!0;var de="";T&&T._owner&&T._owner!==Qd.current&&(de=" It was passed a child from "+k(T._owner.type)+"."),Ji(T),b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',X,de),Ji(null)}}function bx(T,K){{if(typeof T!="object")return;if(jt(T))for(var X=0;X<T.length;X++){var de=T[X];th(de)&&mx(de,K)}else if(th(T))T._store&&(T._store.validated=!0);else if(T){var Te=p(T);if(typeof Te=="function"&&Te!==T.entries)for(var Ce=Te.call(T),me;!(me=Ce.next()).done;)th(me.value)&&mx(me.value,K)}}}function A4(T){{var K=T.type;if(K==null||typeof K=="string")return;var X;if(typeof K=="function")X=K.propTypes;else if(typeof K=="object"&&(K.$$typeof===u||K.$$typeof===f))X=K.propTypes;else return;if(X){var de=k(K);Yi(X,T.props,"prop",de,T)}else if(K.PropTypes!==void 0&&!eh){eh=!0;var Te=k(K);b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Te||"Unknown")}typeof K.getDefaultProps=="function"&&!K.getDefaultProps.isReactClassApproved&&b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function P4(T){{for(var K=Object.keys(T.props),X=0;X<K.length;X++){var de=K[X];if(de!=="children"&&de!=="key"){Ji(T),b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",de),Ji(null);break}}T.ref!==null&&(Ji(T),b("Invalid attribute `ref` supplied to `React.Fragment`."),Ji(null))}}var wx={};function _x(T,K,X,de,Te,Ce){{var me=N(T);if(!me){var ge="";(T===void 0||typeof T=="object"&&T!==null&&Object.keys(T).length===0)&&(ge+=" 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 vt=O4();vt?ge+=vt:ge+=yx();var ze;T===null?ze="null":jt(T)?ze="array":T!==void 0&&T.$$typeof===e?(ze="<"+(k(T.type)||"Unknown")+" />",ge=" Did you accidentally export a JSX literal instead of a component?"):ze=typeof T,b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ze,ge)}var Ye=x4(T,K,X,Te,Ce);if(Ye==null)return Ye;if(me){var Bt=K.children;if(Bt!==void 0)if(de)if(jt(Bt)){for(var Zi=0;Zi<Bt.length;Zi++)bx(Bt[Zi],T);Object.freeze&&Object.freeze(Bt)}else b("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 bx(Bt,T)}if(Ee.call(K,"key")){var jn=k(T),bt=Object.keys(K).filter(function(C4){return C4!=="key"}),rh=bt.length>0?"{key: someKey, "+bt.join(": ..., ")+": ...}":"{key: someKey}";if(!wx[jn+rh]){var k4=bt.length>0?"{"+bt.join(": ..., ")+": ...}":"{}";b(`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} />`,nh,jn,k4,jn),_x[jn+nh]=!0}}return P===n?P4(Ye):A4(Ye),Ye}}function E4(P,K,X){return xx(P,K,X,!0)}function T4(P,K,X){return xx(P,K,X,!1)}var j4=T4,$4=E4;ea.Fragment=n,ea.jsx=j4,ea.jsxs=$4}()),ea}process.env.NODE_ENV==="production"?Hu.exports=Ax():Hu.exports=Px();var E=Hu.exports,Gu=function(t,e){return Gu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Gu(t,e)};function sh(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Gu(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var jo=function(){return jo=Object.assign||function(e){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},jo.apply(this,arguments)};function $n(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}function uh(t,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a}function lh(t,e){return function(r,n){e(r,n,t)}}function ch(t,e,r,n,i,a){function o(m){if(m!==void 0&&typeof m!="function")throw new TypeError("Function expected");return m}for(var s=n.kind,u=s==="getter"?"get":s==="setter"?"set":"value",l=!e&&t?n.static?t:t.prototype:null,c=e||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),f,d=!1,h=r.length-1;h>=0;h--){var y={};for(var v in n)y[v]=v==="access"?{}:n[v];for(var v in n.access)y.access[v]=n.access[v];y.addInitializer=function(m){if(d)throw new TypeError("Cannot add initializers after decoration has completed");a.push(o(m||null))};var p=(0,r[h])(s==="accessor"?{get:c.get,set:c.set}:c[u],y);if(s==="accessor"){if(p===void 0)continue;if(p===null||typeof p!="object")throw new TypeError("Object expected");(f=o(p.get))&&(c.get=f),(f=o(p.set))&&(c.set=f),(f=o(p.init))&&i.unshift(f)}else(f=o(p))&&(s==="field"?i.unshift(f):c[u]=f)}l&&Object.defineProperty(l,n.name,c),d=!0}function fh(t,e,r){for(var n=arguments.length>2,i=0;i<e.length;i++)r=n?e[i].call(t,r):e[i].call(t);return n?r:void 0}function dh(t){return typeof t=="symbol"?t:"".concat(t)}function hh(t,e,r){return typeof e=="symbol"&&(e=e.description?"[".concat(e.description,"]"):""),Object.defineProperty(t,"name",{configurable:!0,value:r?"".concat(r," ",e):e})}function ph(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function ee(t,e,r,n){function i(a){return a instanceof r?a:new r(function(o){o(a)})}return new(r||(r=Promise))(function(a,o){function s(c){try{l(n.next(c))}catch(f){o(f)}}function u(c){try{l(n.throw(c))}catch(f){o(f)}}function l(c){c.done?a(c.value):i(c.value).then(s,u)}l((n=n.apply(t,e||[])).next())})}function vh(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(l){return function(c){return u([l,c])}}function u(l){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(r=0)),r;)try{if(n=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,i=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){r.label=l[1];break}if(l[0]===6&&r.label<a[1]){r.label=a[1],a=l;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(l);break}a[2]&&r.ops.pop(),r.trys.pop();continue}l=e.call(t,r)}catch(c){l=[6,c],i=0}finally{n=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}var $o=Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]};function yh(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&$o(e,t,r)}function ko(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Yu(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,a=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return a}function gh(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(Yu(arguments[e]));return t}function mh(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;for(var n=Array(t),i=0,e=0;e<r;e++)for(var a=arguments[e],o=0,s=a.length;o<s;o++,i++)n[i]=a[o];return n}function bh(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,a;n<i;n++)(a||!(n in e))&&(a||(a=Array.prototype.slice.call(e,0,n)),a[n]=e[n]);return t.concat(a||Array.prototype.slice.call(e))}function kn(t){return this instanceof kn?(this.v=t,this):new kn(t)}function wh(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(t,e||[]),i,a=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",o),i[Symbol.asyncIterator]=function(){return this},i;function o(h){return function(y){return Promise.resolve(y).then(h,f)}}function s(h,y){n[h]&&(i[h]=function(v){return new Promise(function(p,m){a.push([h,v,p,m])>1||u(h,v)})},y&&(i[h]=y(i[h])))}function u(h,y){try{l(n[h](y))}catch(v){d(a[0][3],v)}}function l(h){h.value instanceof kn?Promise.resolve(h.value.v).then(c,f):d(a[0][2],h)}function c(h){u("next",h)}function f(h){u("throw",h)}function d(h,y){h(y),a.shift(),a.length&&u(a[0][0],a[0][1])}}function _h(t){var e,r;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,a){e[i]=t[i]?function(o){return(r=!r)?{value:kn(t[i](o)),done:!1}:a?a(o):o}:a}}function xh(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof ko=="function"?ko(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(a){r[a]=t[a]&&function(o){return new Promise(function(s,u){o=t[a](o),i(s,u,o.done,o.value)})}}function i(a,o,s,u){Promise.resolve(u).then(function(l){a({value:l,done:s})},o)}}function Oh(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}var Ex=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e},Xu=function(t){return Xu=Object.getOwnPropertyNames||function(e){var r=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[r.length]=n);return r},Xu(t)};function Sh(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r=Xu(t),n=0;n<r.length;n++)r[n]!=="default"&&$o(e,t,r[n]);return Ex(e,t),e}function Ah(t){return t&&t.__esModule?t:{default:t}}function Ph(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)}function Eh(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r}function Th(t,e){if(e===null||typeof e!="object"&&typeof e!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof t=="function"?e===t:t.has(e)}function jh(t,e,r){if(e!=null){if(typeof e!="object"&&typeof e!="function")throw new TypeError("Object expected.");var n,i;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=e[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=e[Symbol.dispose],r&&(i=n)}if(typeof n!="function")throw new TypeError("Object not disposable.");i&&(n=function(){try{i.call(this)}catch(a){return Promise.reject(a)}}),t.stack.push({value:e,dispose:n,async:r})}else r&&t.stack.push({async:!0});return e}var Tx=typeof SuppressedError=="function"?SuppressedError:function(t,e,r){var n=new Error(r);return n.name="SuppressedError",n.error=t,n.suppressed=e,n};function $h(t){function e(a){t.error=t.hasError?new Tx(a,t.error,"An error was suppressed during disposal."):a,t.hasError=!0}var r,n=0;function i(){for(;r=t.stack.pop();)try{if(!r.async&&n===1)return n=0,t.stack.push(r),Promise.resolve().then(i);if(r.dispose){var a=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(a).then(i,function(o){return e(o),i()})}else n|=1}catch(o){e(o)}if(n===1)return t.hasError?Promise.reject(t.error):Promise.resolve();if(t.hasError)throw t.error}return i()}function kh(t,e){return typeof t=="string"&&/^\.\.?\//.test(t)?t.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(r,n,i,a,o){return n?e?".jsx":".js":i&&(!a||!o)?r:i+a+"."+o.toLowerCase()+"js"}):t}const jx=Object.freeze(Object.defineProperty({__proto__:null,__addDisposableResource:jh,get __assign(){return jo},__asyncDelegator:_h,__asyncGenerator:wh,__asyncValues:xh,__await:kn,__awaiter:ee,__classPrivateFieldGet:Ph,__classPrivateFieldIn:Th,__classPrivateFieldSet:Eh,__createBinding:$o,__decorate:uh,__disposeResources:$h,__esDecorate:ch,__exportStar:yh,__extends:sh,__generator:vh,__importDefault:Ah,__importStar:Sh,__makeTemplateObject:Oh,__metadata:ph,__param:lh,__propKey:dh,__read:Yu,__rest:$n,__rewriteRelativeImportExtension:kh,__runInitializers:fh,__setFunctionName:hh,__spread:gh,__spreadArray:bh,__spreadArrays:mh,__values:ko,default:{__extends:sh,__assign:jo,__rest:$n,__decorate:uh,__param:lh,__esDecorate:ch,__runInitializers:fh,__propKey:dh,__setFunctionName:hh,__metadata:ph,__awaiter:ee,__generator:vh,__createBinding:$o,__exportStar:yh,__values:ko,__read:Yu,__spread:gh,__spreadArrays:mh,__spreadArray:bh,__await:kn,__asyncGenerator:wh,__asyncDelegator:_h,__asyncValues:xh,__makeTemplateObject:Oh,__importStar:Sh,__importDefault:Ah,__classPrivateFieldGet:Ph,__classPrivateFieldSet:Eh,__classPrivateFieldIn:Th,__addDisposableResource:jh,__disposeResources:$h,__rewriteRelativeImportExtension:kh}},Symbol.toStringTag,{value:"Module"})),$x=t=>{let e;return t?e=t:typeof fetch>"u"?e=(...r)=>Promise.resolve().then(()=>Hr).then(({default:n})=>n(...r)):e=fetch,(...r)=>e(...r)};class Ju extends Error{constructor(e,r="FunctionsError",n){super(e),this.name=r,this.context=n}}class Ch extends Ju{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class Ih extends Ju{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class Nh extends Ju{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var Zu;(function(t){t.Any="any",t.ApNortheast1="ap-northeast-1",t.ApNortheast2="ap-northeast-2",t.ApSouth1="ap-south-1",t.ApSoutheast1="ap-southeast-1",t.ApSoutheast2="ap-southeast-2",t.CaCentral1="ca-central-1",t.EuCentral1="eu-central-1",t.EuWest1="eu-west-1",t.EuWest2="eu-west-2",t.EuWest3="eu-west-3",t.SaEast1="sa-east-1",t.UsEast1="us-east-1",t.UsWest1="us-west-1",t.UsWest2="us-west-2"})(Zu||(Zu={}));class kx{constructor(e,{headers:r={},customFetch:n,region:i=Zu.Any}={}){this.url=e,this.headers=r,this.region=i,this.fetch=$x(n)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return ee(this,arguments,void 0,function*(r,n={}){var i;try{const{headers:a,method:o,body:s,signal:u}=n;let l={},{region:c}=n;c||(c=this.region);const f=new URL(`${this.url}/${r}`);c&&c!=="any"&&(l["x-region"]=c,f.searchParams.set("forceFunctionRegion",c));let d;s&&(a&&!Object.prototype.hasOwnProperty.call(a,"Content-Type")||!a)?typeof Blob<"u"&&s instanceof Blob||s instanceof ArrayBuffer?(l["Content-Type"]="application/octet-stream",d=s):typeof s=="string"?(l["Content-Type"]="text/plain",d=s):typeof FormData<"u"&&s instanceof FormData?d=s:(l["Content-Type"]="application/json",d=JSON.stringify(s)):d=s;const h=yield this.fetch(f.toString(),{method:o||"POST",headers:Object.assign(Object.assign(Object.assign({},l),this.headers),a),body:d,signal:u}).catch(m=>{throw m.name==="AbortError"?m:new Ch(m)}),y=h.headers.get("x-relay-error");if(y&&y==="true")throw new Ih(h);if(!h.ok)throw new Nh(h);let v=((i=h.headers.get("Content-Type"))!==null&&i!==void 0?i:"text/plain").split(";")[0].trim(),p;return v==="application/json"?p=yield h.json():v==="application/octet-stream"||v==="application/pdf"?p=yield h.blob():v==="text/event-stream"?p=h:v==="multipart/form-data"?p=yield h.formData():p=yield h.text(),{data:p,error:null,response:h}}catch(a){return a instanceof Error&&a.name==="AbortError"?{data:null,error:new Ch(a)}:{data:null,error:a,response:a instanceof Nh||a instanceof Ih?a.context:void 0}}})}}var ut={};const Cn=ih(jx);var Co={},Io={},No={},Mo={},Do={},Cx=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")},In=Cx();const Ix=In.fetch,Mh=In.fetch.bind(In),Dh=In.Headers,Nx=In.Request,Mx=In.Response,Hr=Object.freeze(Object.defineProperty({__proto__:null,Headers:Dh,Request:Nx,Response:Mx,default:Mh,fetch:Ix},Symbol.toStringTag,{value:"Module"})),Dx=ih(Hr);var Ro={},Rh;function Lh(){if(Rh)return Ro;Rh=1,Object.defineProperty(Ro,"__esModule",{value:!0});class t extends Error{constructor(r){super(r.message),this.name="PostgrestError",this.details=r.details,this.hint=r.hint,this.code=r.code}}return Ro.default=t,Ro}var Bh;function Uh(){if(Bh)return Do;Bh=1,Object.defineProperty(Do,"__esModule",{value:!0});const t=Cn,e=t.__importDefault(Dx),r=t.__importDefault(Lh());class n{constructor(a){var o,s;this.shouldThrowOnError=!1,this.method=a.method,this.url=a.url,this.headers=new Headers(a.headers),this.schema=a.schema,this.body=a.body,this.shouldThrowOnError=(o=a.shouldThrowOnError)!==null&&o!==void 0?o:!1,this.signal=a.signal,this.isMaybeSingle=(s=a.isMaybeSingle)!==null&&s!==void 0?s:!1,a.fetch?this.fetch=a.fetch:typeof fetch>"u"?this.fetch=e.default:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(a,o){return this.headers=new Headers(this.headers),this.headers.set(a,o),this}then(a,o){this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json");const s=this.fetch;let u=s(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async l=>{var c,f,d,h;let y=null,v=null,p=null,m=l.status,b=l.statusText;if(l.ok){if(this.method!=="HEAD"){const _=await l.text();_===""||(this.headers.get("Accept")==="text/csv"||this.headers.get("Accept")&&(!((c=this.headers.get("Accept"))===null||c===void 0)&&c.includes("application/vnd.pgrst.plan+text"))?v=_:v=JSON.parse(_))}const O=(f=this.headers.get("Prefer"))===null||f===void 0?void 0:f.match(/count=(exact|planned|estimated)/),g=(d=l.headers.get("content-range"))===null||d===void 0?void 0:d.split("/");O&&g&&g.length>1&&(p=parseInt(g[1])),this.isMaybeSingle&&this.method==="GET"&&Array.isArray(v)&&(v.length>1?(y={code:"PGRST116",details:`Results contain ${v.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},v=null,p=null,m=406,b="Not Acceptable"):v.length===1?v=v[0]:v=null)}else{const O=await l.text();try{y=JSON.parse(O),Array.isArray(y)&&l.status===404&&(v=[],y=null,m=200,b="OK")}catch{l.status===404&&O===""?(m=204,b="No Content"):y={message:O}}if(y&&this.isMaybeSingle&&(!((h=y==null?void 0:y.details)===null||h===void 0)&&h.includes("0 rows"))&&(y=null,m=200,b="OK"),y&&this.shouldThrowOnError)throw new r.default(y)}return{error:y,data:v,count:p,status:m,statusText:b}});return this.shouldThrowOnError||(u=u.catch(l=>{var c,f,d;return{error:{message:`${(c=l==null?void 0:l.name)!==null&&c!==void 0?c:"FetchError"}: ${l==null?void 0:l.message}`,details:`${(f=l==null?void 0:l.stack)!==null&&f!==void 0?f:""}`,hint:"",code:`${(d=l==null?void 0:l.code)!==null&&d!==void 0?d:""}`},data:null,count:null,status:0,statusText:""}})),u.then(a,o)}returns(){return this}overrideTypes(){return this}}return Do.default=n,Do}var Fh;function Wh(){if(Fh)return Mo;Fh=1,Object.defineProperty(Mo,"__esModule",{value:!0});const e=Cn.__importDefault(Uh());class r extends e.default{select(i){let a=!1;const o=(i??"*").split("").map(s=>/\s/.test(s)&&!a?"":(s==='"'&&(a=!a),s)).join("");return this.url.searchParams.set("select",o),this.headers.append("Prefer","return=representation"),this}order(i,{ascending:a=!0,nullsFirst:o,foreignTable:s,referencedTable:u=s}={}){const l=u?`${u}.order`:"order",c=this.url.searchParams.get(l);return this.url.searchParams.set(l,`${c?`${c},`:""}${i}.${a?"asc":"desc"}${o===void 0?"":o?".nullsfirst":".nullslast"}`),this}limit(i,{foreignTable:a,referencedTable:o=a}={}){const s=typeof o>"u"?"limit":`${o}.limit`;return this.url.searchParams.set(s,`${i}`),this}range(i,a,{foreignTable:o,referencedTable:s=o}={}){const u=typeof s>"u"?"offset":`${s}.offset`,l=typeof s>"u"?"limit":`${s}.limit`;return this.url.searchParams.set(u,`${i}`),this.url.searchParams.set(l,`${a-i+1}`),this}abortSignal(i){return this.signal=i,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.method==="GET"?this.headers.set("Accept","application/json"):this.headers.set("Accept","application/vnd.pgrst.object+json"),this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:i=!1,verbose:a=!1,settings:o=!1,buffers:s=!1,wal:u=!1,format:l="text"}={}){var c;const f=[i?"analyze":null,a?"verbose":null,o?"settings":null,s?"buffers":null,u?"wal":null].filter(Boolean).join("|"),d=(c=this.headers.get("Accept"))!==null&&c!==void 0?c:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${l}; for="${d}"; options=${f};`),l==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(i){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${i}`),this}}return Mo.default=r,Mo}var qh;function Qu(){if(qh)return No;qh=1,Object.defineProperty(No,"__esModule",{value:!0});const e=Cn.__importDefault(Wh()),r=new RegExp("[,()]");class n extends e.default{eq(a,o){return this.url.searchParams.append(a,`eq.${o}`),this}neq(a,o){return this.url.searchParams.append(a,`neq.${o}`),this}gt(a,o){return this.url.searchParams.append(a,`gt.${o}`),this}gte(a,o){return this.url.searchParams.append(a,`gte.${o}`),this}lt(a,o){return this.url.searchParams.append(a,`lt.${o}`),this}lte(a,o){return this.url.searchParams.append(a,`lte.${o}`),this}like(a,o){return this.url.searchParams.append(a,`like.${o}`),this}likeAllOf(a,o){return this.url.searchParams.append(a,`like(all).{${o.join(",")}}`),this}likeAnyOf(a,o){return this.url.searchParams.append(a,`like(any).{${o.join(",")}}`),this}ilike(a,o){return this.url.searchParams.append(a,`ilike.${o}`),this}ilikeAllOf(a,o){return this.url.searchParams.append(a,`ilike(all).{${o.join(",")}}`),this}ilikeAnyOf(a,o){return this.url.searchParams.append(a,`ilike(any).{${o.join(",")}}`),this}is(a,o){return this.url.searchParams.append(a,`is.${o}`),this}in(a,o){const s=Array.from(new Set(o)).map(u=>typeof u=="string"&&r.test(u)?`"${u}"`:`${u}`).join(",");return this.url.searchParams.append(a,`in.(${s})`),this}contains(a,o){return typeof o=="string"?this.url.searchParams.append(a,`cs.${o}`):Array.isArray(o)?this.url.searchParams.append(a,`cs.{${o.join(",")}}`):this.url.searchParams.append(a,`cs.${JSON.stringify(o)}`),this}containedBy(a,o){return typeof o=="string"?this.url.searchParams.append(a,`cd.${o}`):Array.isArray(o)?this.url.searchParams.append(a,`cd.{${o.join(",")}}`):this.url.searchParams.append(a,`cd.${JSON.stringify(o)}`),this}rangeGt(a,o){return this.url.searchParams.append(a,`sr.${o}`),this}rangeGte(a,o){return this.url.searchParams.append(a,`nxl.${o}`),this}rangeLt(a,o){return this.url.searchParams.append(a,`sl.${o}`),this}rangeLte(a,o){return this.url.searchParams.append(a,`nxr.${o}`),this}rangeAdjacent(a,o){return this.url.searchParams.append(a,`adj.${o}`),this}overlaps(a,o){return typeof o=="string"?this.url.searchParams.append(a,`ov.${o}`):this.url.searchParams.append(a,`ov.{${o.join(",")}}`),this}textSearch(a,o,{config:s,type:u}={}){let l="";u==="plain"?l="pl":u==="phrase"?l="ph":u==="websearch"&&(l="w");const c=s===void 0?"":`(${s})`;return this.url.searchParams.append(a,`${l}fts${c}.${o}`),this}match(a){return Object.entries(a).forEach(([o,s])=>{this.url.searchParams.append(o,`eq.${s}`)}),this}not(a,o,s){return this.url.searchParams.append(a,`not.${o}.${s}`),this}or(a,{foreignTable:o,referencedTable:s=o}={}){const u=s?`${s}.or`:"or";return this.url.searchParams.append(u,`(${a})`),this}filter(a,o,s){return this.url.searchParams.append(a,`${o}.${s}`),this}}return No.default=n,No}var zh;function Kh(){if(zh)return Io;zh=1,Object.defineProperty(Io,"__esModule",{value:!0});const e=Cn.__importDefault(Qu());class r{constructor(i,{headers:a={},schema:o,fetch:s}){this.url=i,this.headers=new Headers(a),this.schema=o,this.fetch=s}select(i,a){const{head:o=!1,count:s}=a??{},u=o?"HEAD":"GET";let l=!1;const c=(i??"*").split("").map(f=>/\s/.test(f)&&!l?"":(f==='"'&&(l=!l),f)).join("");return this.url.searchParams.set("select",c),s&&this.headers.append("Prefer",`count=${s}`),new e.default({method:u,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch})}insert(i,{count:a,defaultToNull:o=!0}={}){var s;const u="POST";if(a&&this.headers.append("Prefer",`count=${a}`),o||this.headers.append("Prefer","missing=default"),Array.isArray(i)){const l=i.reduce((c,f)=>c.concat(Object.keys(f)),[]);if(l.length>0){const c=[...new Set(l)].map(f=>`"${f}"`);this.url.searchParams.set("columns",c.join(","))}}return new e.default({method:u,url:this.url,headers:this.headers,schema:this.schema,body:i,fetch:(s=this.fetch)!==null&&s!==void 0?s:fetch})}upsert(i,{onConflict:a,ignoreDuplicates:o=!1,count:s,defaultToNull:u=!0}={}){var l;const c="POST";if(this.headers.append("Prefer",`resolution=${o?"ignore":"merge"}-duplicates`),a!==void 0&&this.url.searchParams.set("on_conflict",a),s&&this.headers.append("Prefer",`count=${s}`),u||this.headers.append("Prefer","missing=default"),Array.isArray(i)){const f=i.reduce((d,h)=>d.concat(Object.keys(h)),[]);if(f.length>0){const d=[...new Set(f)].map(h=>`"${h}"`);this.url.searchParams.set("columns",d.join(","))}}return new e.default({method:c,url:this.url,headers:this.headers,schema:this.schema,body:i,fetch:(l=this.fetch)!==null&&l!==void 0?l:fetch})}update(i,{count:a}={}){var o;const s="PATCH";return a&&this.headers.append("Prefer",`count=${a}`),new e.default({method:s,url:this.url,headers:this.headers,schema:this.schema,body:i,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch})}delete({count:i}={}){var a;const o="DELETE";return i&&this.headers.append("Prefer",`count=${i}`),new e.default({method:o,url:this.url,headers:this.headers,schema:this.schema,fetch:(a=this.fetch)!==null&&a!==void 0?a:fetch})}}return Io.default=r,Io}var Vh;function Rx(){if(Vh)return Co;Vh=1,Object.defineProperty(Co,"__esModule",{value:!0});const t=Cn,e=t.__importDefault(Kh()),r=t.__importDefault(Qu());class n{constructor(a,{headers:o={},schema:s,fetch:u}={}){this.url=a,this.headers=new Headers(o),this.schemaName=s,this.fetch=u}from(a){const o=new URL(`${this.url}/${a}`);return new e.default(o,{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch})}schema(a){return new n(this.url,{headers:this.headers,schema:a,fetch:this.fetch})}rpc(a,o={},{head:s=!1,get:u=!1,count:l}={}){var c;let f;const d=new URL(`${this.url}/rpc/${a}`);let h;s||u?(f=s?"HEAD":"GET",Object.entries(o).filter(([v,p])=>p!==void 0).map(([v,p])=>[v,Array.isArray(p)?`{${p.join(",")}}`:`${p}`]).forEach(([v,p])=>{d.searchParams.append(v,p)})):(f="POST",h=o);const y=new Headers(this.headers);return l&&y.set("Prefer",`count=${l}`),new r.default({method:f,url:d,headers:y,schema:this.schemaName,body:h,fetch:(c=this.fetch)!==null&&c!==void 0?c:fetch})}}return Co.default=n,Co}Object.defineProperty(ut,"__esModule",{value:!0});var Hh=ut.PostgrestError=np=ut.PostgrestBuilder=tp=ut.PostgrestTransformBuilder=Qh=ut.PostgrestFilterBuilder=Jh=ut.PostgrestQueryBuilder=Yh=ut.PostgrestClient=void 0;const Nn=Cn,Gh=Nn.__importDefault(Rx());var Yh=ut.PostgrestClient=Gh.default;const Xh=Nn.__importDefault(Kh());var Jh=ut.PostgrestQueryBuilder=Xh.default;const Zh=Nn.__importDefault(Qu());var Qh=ut.PostgrestFilterBuilder=Zh.default;const ep=Nn.__importDefault(Wh());var tp=ut.PostgrestTransformBuilder=ep.default;const rp=Nn.__importDefault(Uh());var np=ut.PostgrestBuilder=rp.default;const ip=Nn.__importDefault(Lh());Hh=ut.PostgrestError=ip.default;var ap=ut.default={PostgrestClient:Gh.default,PostgrestQueryBuilder:Xh.default,PostgrestFilterBuilder:Zh.default,PostgrestTransformBuilder:ep.default,PostgrestBuilder:rp.default,PostgrestError:ip.default};const Lx=Sx({__proto__:null,get PostgrestBuilder(){return np},get PostgrestClient(){return Yh},get PostgrestError(){return Hh},get PostgrestFilterBuilder(){return Qh},get PostgrestQueryBuilder(){return Jh},get PostgrestTransformBuilder(){return tp},default:ap},[ut]),{PostgrestClient:Bx,PostgrestQueryBuilder:N4,PostgrestFilterBuilder:M4,PostgrestTransformBuilder:D4,PostgrestBuilder:R4,PostgrestError:L4}=ap||Lx;class Ux{static detectEnvironment(){var e;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&globalThis.EdgeRuntime||typeof navigator<"u"&&(!((e=navigator.userAgent)===null||e===void 0)&&e.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};if(typeof process<"u"){const r=process.versions;if(r&&r.node){const n=r.node,i=parseInt(n.replace(/^v/,"").split(".")[0]);return i>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${i} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${i} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
|
|
30
|
+
<%s key={someKey} {...props} />`,rh,jn,k4,jn),wx[jn+rh]=!0}}return T===n?P4(Ye):A4(Ye),Ye}}function E4(T,K,X){return _x(T,K,X,!0)}function T4(T,K,X){return _x(T,K,X,!1)}var j4=T4,$4=E4;ea.Fragment=n,ea.jsx=j4,ea.jsxs=$4}()),ea}process.env.NODE_ENV==="production"?Vu.exports=Sx():Vu.exports=Ax();var P=Vu.exports,Hu=function(t,e){return Hu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Hu(t,e)};function oh(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Hu(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var To=function(){return To=Object.assign||function(e){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},To.apply(this,arguments)};function $n(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}function sh(t,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a}function uh(t,e){return function(r,n){e(r,n,t)}}function lh(t,e,r,n,i,a){function o(m){if(m!==void 0&&typeof m!="function")throw new TypeError("Function expected");return m}for(var s=n.kind,u=s==="getter"?"get":s==="setter"?"set":"value",l=!e&&t?n.static?t:t.prototype:null,c=e||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),f,d=!1,h=r.length-1;h>=0;h--){var y={};for(var v in n)y[v]=v==="access"?{}:n[v];for(var v in n.access)y.access[v]=n.access[v];y.addInitializer=function(m){if(d)throw new TypeError("Cannot add initializers after decoration has completed");a.push(o(m||null))};var p=(0,r[h])(s==="accessor"?{get:c.get,set:c.set}:c[u],y);if(s==="accessor"){if(p===void 0)continue;if(p===null||typeof p!="object")throw new TypeError("Object expected");(f=o(p.get))&&(c.get=f),(f=o(p.set))&&(c.set=f),(f=o(p.init))&&i.unshift(f)}else(f=o(p))&&(s==="field"?i.unshift(f):c[u]=f)}l&&Object.defineProperty(l,n.name,c),d=!0}function ch(t,e,r){for(var n=arguments.length>2,i=0;i<e.length;i++)r=n?e[i].call(t,r):e[i].call(t);return n?r:void 0}function fh(t){return typeof t=="symbol"?t:"".concat(t)}function dh(t,e,r){return typeof e=="symbol"&&(e=e.description?"[".concat(e.description,"]"):""),Object.defineProperty(t,"name",{configurable:!0,value:r?"".concat(r," ",e):e})}function hh(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function ee(t,e,r,n){function i(a){return a instanceof r?a:new r(function(o){o(a)})}return new(r||(r=Promise))(function(a,o){function s(c){try{l(n.next(c))}catch(f){o(f)}}function u(c){try{l(n.throw(c))}catch(f){o(f)}}function l(c){c.done?a(c.value):i(c.value).then(s,u)}l((n=n.apply(t,e||[])).next())})}function ph(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(l){return function(c){return u([l,c])}}function u(l){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(r=0)),r;)try{if(n=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,i=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){r.label=l[1];break}if(l[0]===6&&r.label<a[1]){r.label=a[1],a=l;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(l);break}a[2]&&r.ops.pop(),r.trys.pop();continue}l=e.call(t,r)}catch(c){l=[6,c],i=0}finally{n=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}var jo=Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]};function vh(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&jo(e,t,r)}function $o(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Gu(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,a=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return a}function yh(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(Gu(arguments[e]));return t}function gh(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;for(var n=Array(t),i=0,e=0;e<r;e++)for(var a=arguments[e],o=0,s=a.length;o<s;o++,i++)n[i]=a[o];return n}function mh(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,a;n<i;n++)(a||!(n in e))&&(a||(a=Array.prototype.slice.call(e,0,n)),a[n]=e[n]);return t.concat(a||Array.prototype.slice.call(e))}function kn(t){return this instanceof kn?(this.v=t,this):new kn(t)}function bh(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(t,e||[]),i,a=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",o),i[Symbol.asyncIterator]=function(){return this},i;function o(h){return function(y){return Promise.resolve(y).then(h,f)}}function s(h,y){n[h]&&(i[h]=function(v){return new Promise(function(p,m){a.push([h,v,p,m])>1||u(h,v)})},y&&(i[h]=y(i[h])))}function u(h,y){try{l(n[h](y))}catch(v){d(a[0][3],v)}}function l(h){h.value instanceof kn?Promise.resolve(h.value.v).then(c,f):d(a[0][2],h)}function c(h){u("next",h)}function f(h){u("throw",h)}function d(h,y){h(y),a.shift(),a.length&&u(a[0][0],a[0][1])}}function wh(t){var e,r;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,a){e[i]=t[i]?function(o){return(r=!r)?{value:kn(t[i](o)),done:!1}:a?a(o):o}:a}}function _h(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof $o=="function"?$o(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(a){r[a]=t[a]&&function(o){return new Promise(function(s,u){o=t[a](o),i(s,u,o.done,o.value)})}}function i(a,o,s,u){Promise.resolve(u).then(function(l){a({value:l,done:s})},o)}}function xh(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}var Px=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e},Yu=function(t){return Yu=Object.getOwnPropertyNames||function(e){var r=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[r.length]=n);return r},Yu(t)};function Oh(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r=Yu(t),n=0;n<r.length;n++)r[n]!=="default"&&jo(e,t,r[n]);return Px(e,t),e}function Sh(t){return t&&t.__esModule?t:{default:t}}function Ah(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)}function Ph(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r}function Eh(t,e){if(e===null||typeof e!="object"&&typeof e!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof t=="function"?e===t:t.has(e)}function Th(t,e,r){if(e!=null){if(typeof e!="object"&&typeof e!="function")throw new TypeError("Object expected.");var n,i;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=e[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=e[Symbol.dispose],r&&(i=n)}if(typeof n!="function")throw new TypeError("Object not disposable.");i&&(n=function(){try{i.call(this)}catch(a){return Promise.reject(a)}}),t.stack.push({value:e,dispose:n,async:r})}else r&&t.stack.push({async:!0});return e}var Ex=typeof SuppressedError=="function"?SuppressedError:function(t,e,r){var n=new Error(r);return n.name="SuppressedError",n.error=t,n.suppressed=e,n};function jh(t){function e(a){t.error=t.hasError?new Ex(a,t.error,"An error was suppressed during disposal."):a,t.hasError=!0}var r,n=0;function i(){for(;r=t.stack.pop();)try{if(!r.async&&n===1)return n=0,t.stack.push(r),Promise.resolve().then(i);if(r.dispose){var a=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(a).then(i,function(o){return e(o),i()})}else n|=1}catch(o){e(o)}if(n===1)return t.hasError?Promise.reject(t.error):Promise.resolve();if(t.hasError)throw t.error}return i()}function $h(t,e){return typeof t=="string"&&/^\.\.?\//.test(t)?t.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(r,n,i,a,o){return n?e?".jsx":".js":i&&(!a||!o)?r:i+a+"."+o.toLowerCase()+"js"}):t}const Tx=Object.freeze(Object.defineProperty({__proto__:null,__addDisposableResource:Th,get __assign(){return To},__asyncDelegator:wh,__asyncGenerator:bh,__asyncValues:_h,__await:kn,__awaiter:ee,__classPrivateFieldGet:Ah,__classPrivateFieldIn:Eh,__classPrivateFieldSet:Ph,__createBinding:jo,__decorate:sh,__disposeResources:jh,__esDecorate:lh,__exportStar:vh,__extends:oh,__generator:ph,__importDefault:Sh,__importStar:Oh,__makeTemplateObject:xh,__metadata:hh,__param:uh,__propKey:fh,__read:Gu,__rest:$n,__rewriteRelativeImportExtension:$h,__runInitializers:ch,__setFunctionName:dh,__spread:yh,__spreadArray:mh,__spreadArrays:gh,__values:$o,default:{__extends:oh,__assign:To,__rest:$n,__decorate:sh,__param:uh,__esDecorate:lh,__runInitializers:ch,__propKey:fh,__setFunctionName:dh,__metadata:hh,__awaiter:ee,__generator:ph,__createBinding:jo,__exportStar:vh,__values:$o,__read:Gu,__spread:yh,__spreadArrays:gh,__spreadArray:mh,__await:kn,__asyncGenerator:bh,__asyncDelegator:wh,__asyncValues:_h,__makeTemplateObject:xh,__importStar:Oh,__importDefault:Sh,__classPrivateFieldGet:Ah,__classPrivateFieldSet:Ph,__classPrivateFieldIn:Eh,__addDisposableResource:Th,__disposeResources:jh,__rewriteRelativeImportExtension:$h}},Symbol.toStringTag,{value:"Module"})),jx=t=>{let e;return t?e=t:typeof fetch>"u"?e=(...r)=>Promise.resolve().then(()=>Hr).then(({default:n})=>n(...r)):e=fetch,(...r)=>e(...r)};class Xu extends Error{constructor(e,r="FunctionsError",n){super(e),this.name=r,this.context=n}}class kh extends Xu{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class Ch extends Xu{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class Ih extends Xu{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var Ju;(function(t){t.Any="any",t.ApNortheast1="ap-northeast-1",t.ApNortheast2="ap-northeast-2",t.ApSouth1="ap-south-1",t.ApSoutheast1="ap-southeast-1",t.ApSoutheast2="ap-southeast-2",t.CaCentral1="ca-central-1",t.EuCentral1="eu-central-1",t.EuWest1="eu-west-1",t.EuWest2="eu-west-2",t.EuWest3="eu-west-3",t.SaEast1="sa-east-1",t.UsEast1="us-east-1",t.UsWest1="us-west-1",t.UsWest2="us-west-2"})(Ju||(Ju={}));class $x{constructor(e,{headers:r={},customFetch:n,region:i=Ju.Any}={}){this.url=e,this.headers=r,this.region=i,this.fetch=jx(n)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return ee(this,arguments,void 0,function*(r,n={}){var i;try{const{headers:a,method:o,body:s,signal:u}=n;let l={},{region:c}=n;c||(c=this.region);const f=new URL(`${this.url}/${r}`);c&&c!=="any"&&(l["x-region"]=c,f.searchParams.set("forceFunctionRegion",c));let d;s&&(a&&!Object.prototype.hasOwnProperty.call(a,"Content-Type")||!a)?typeof Blob<"u"&&s instanceof Blob||s instanceof ArrayBuffer?(l["Content-Type"]="application/octet-stream",d=s):typeof s=="string"?(l["Content-Type"]="text/plain",d=s):typeof FormData<"u"&&s instanceof FormData?d=s:(l["Content-Type"]="application/json",d=JSON.stringify(s)):d=s;const h=yield this.fetch(f.toString(),{method:o||"POST",headers:Object.assign(Object.assign(Object.assign({},l),this.headers),a),body:d,signal:u}).catch(m=>{throw m.name==="AbortError"?m:new kh(m)}),y=h.headers.get("x-relay-error");if(y&&y==="true")throw new Ch(h);if(!h.ok)throw new Ih(h);let v=((i=h.headers.get("Content-Type"))!==null&&i!==void 0?i:"text/plain").split(";")[0].trim(),p;return v==="application/json"?p=yield h.json():v==="application/octet-stream"||v==="application/pdf"?p=yield h.blob():v==="text/event-stream"?p=h:v==="multipart/form-data"?p=yield h.formData():p=yield h.text(),{data:p,error:null,response:h}}catch(a){return a instanceof Error&&a.name==="AbortError"?{data:null,error:new kh(a)}:{data:null,error:a,response:a instanceof Ih||a instanceof Ch?a.context:void 0}}})}}var ut={};const Cn=nh(Tx);var ko={},Co={},Io={},No={},Mo={},kx=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")},In=kx();const Cx=In.fetch,Nh=In.fetch.bind(In),Mh=In.Headers,Ix=In.Request,Nx=In.Response,Hr=Object.freeze(Object.defineProperty({__proto__:null,Headers:Mh,Request:Ix,Response:Nx,default:Nh,fetch:Cx},Symbol.toStringTag,{value:"Module"})),Mx=nh(Hr);var Do={},Dh;function Rh(){if(Dh)return Do;Dh=1,Object.defineProperty(Do,"__esModule",{value:!0});class t extends Error{constructor(r){super(r.message),this.name="PostgrestError",this.details=r.details,this.hint=r.hint,this.code=r.code}}return Do.default=t,Do}var Lh;function Bh(){if(Lh)return Mo;Lh=1,Object.defineProperty(Mo,"__esModule",{value:!0});const t=Cn,e=t.__importDefault(Mx),r=t.__importDefault(Rh());class n{constructor(a){var o,s;this.shouldThrowOnError=!1,this.method=a.method,this.url=a.url,this.headers=new Headers(a.headers),this.schema=a.schema,this.body=a.body,this.shouldThrowOnError=(o=a.shouldThrowOnError)!==null&&o!==void 0?o:!1,this.signal=a.signal,this.isMaybeSingle=(s=a.isMaybeSingle)!==null&&s!==void 0?s:!1,a.fetch?this.fetch=a.fetch:typeof fetch>"u"?this.fetch=e.default:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(a,o){return this.headers=new Headers(this.headers),this.headers.set(a,o),this}then(a,o){this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json");const s=this.fetch;let u=s(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async l=>{var c,f,d,h;let y=null,v=null,p=null,m=l.status,b=l.statusText;if(l.ok){if(this.method!=="HEAD"){const _=await l.text();_===""||(this.headers.get("Accept")==="text/csv"||this.headers.get("Accept")&&(!((c=this.headers.get("Accept"))===null||c===void 0)&&c.includes("application/vnd.pgrst.plan+text"))?v=_:v=JSON.parse(_))}const O=(f=this.headers.get("Prefer"))===null||f===void 0?void 0:f.match(/count=(exact|planned|estimated)/),g=(d=l.headers.get("content-range"))===null||d===void 0?void 0:d.split("/");O&&g&&g.length>1&&(p=parseInt(g[1])),this.isMaybeSingle&&this.method==="GET"&&Array.isArray(v)&&(v.length>1?(y={code:"PGRST116",details:`Results contain ${v.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},v=null,p=null,m=406,b="Not Acceptable"):v.length===1?v=v[0]:v=null)}else{const O=await l.text();try{y=JSON.parse(O),Array.isArray(y)&&l.status===404&&(v=[],y=null,m=200,b="OK")}catch{l.status===404&&O===""?(m=204,b="No Content"):y={message:O}}if(y&&this.isMaybeSingle&&(!((h=y==null?void 0:y.details)===null||h===void 0)&&h.includes("0 rows"))&&(y=null,m=200,b="OK"),y&&this.shouldThrowOnError)throw new r.default(y)}return{error:y,data:v,count:p,status:m,statusText:b}});return this.shouldThrowOnError||(u=u.catch(l=>{var c,f,d;return{error:{message:`${(c=l==null?void 0:l.name)!==null&&c!==void 0?c:"FetchError"}: ${l==null?void 0:l.message}`,details:`${(f=l==null?void 0:l.stack)!==null&&f!==void 0?f:""}`,hint:"",code:`${(d=l==null?void 0:l.code)!==null&&d!==void 0?d:""}`},data:null,count:null,status:0,statusText:""}})),u.then(a,o)}returns(){return this}overrideTypes(){return this}}return Mo.default=n,Mo}var Uh;function Fh(){if(Uh)return No;Uh=1,Object.defineProperty(No,"__esModule",{value:!0});const e=Cn.__importDefault(Bh());class r extends e.default{select(i){let a=!1;const o=(i??"*").split("").map(s=>/\s/.test(s)&&!a?"":(s==='"'&&(a=!a),s)).join("");return this.url.searchParams.set("select",o),this.headers.append("Prefer","return=representation"),this}order(i,{ascending:a=!0,nullsFirst:o,foreignTable:s,referencedTable:u=s}={}){const l=u?`${u}.order`:"order",c=this.url.searchParams.get(l);return this.url.searchParams.set(l,`${c?`${c},`:""}${i}.${a?"asc":"desc"}${o===void 0?"":o?".nullsfirst":".nullslast"}`),this}limit(i,{foreignTable:a,referencedTable:o=a}={}){const s=typeof o>"u"?"limit":`${o}.limit`;return this.url.searchParams.set(s,`${i}`),this}range(i,a,{foreignTable:o,referencedTable:s=o}={}){const u=typeof s>"u"?"offset":`${s}.offset`,l=typeof s>"u"?"limit":`${s}.limit`;return this.url.searchParams.set(u,`${i}`),this.url.searchParams.set(l,`${a-i+1}`),this}abortSignal(i){return this.signal=i,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.method==="GET"?this.headers.set("Accept","application/json"):this.headers.set("Accept","application/vnd.pgrst.object+json"),this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:i=!1,verbose:a=!1,settings:o=!1,buffers:s=!1,wal:u=!1,format:l="text"}={}){var c;const f=[i?"analyze":null,a?"verbose":null,o?"settings":null,s?"buffers":null,u?"wal":null].filter(Boolean).join("|"),d=(c=this.headers.get("Accept"))!==null&&c!==void 0?c:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${l}; for="${d}"; options=${f};`),l==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(i){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${i}`),this}}return No.default=r,No}var Wh;function Zu(){if(Wh)return Io;Wh=1,Object.defineProperty(Io,"__esModule",{value:!0});const e=Cn.__importDefault(Fh()),r=new RegExp("[,()]");class n extends e.default{eq(a,o){return this.url.searchParams.append(a,`eq.${o}`),this}neq(a,o){return this.url.searchParams.append(a,`neq.${o}`),this}gt(a,o){return this.url.searchParams.append(a,`gt.${o}`),this}gte(a,o){return this.url.searchParams.append(a,`gte.${o}`),this}lt(a,o){return this.url.searchParams.append(a,`lt.${o}`),this}lte(a,o){return this.url.searchParams.append(a,`lte.${o}`),this}like(a,o){return this.url.searchParams.append(a,`like.${o}`),this}likeAllOf(a,o){return this.url.searchParams.append(a,`like(all).{${o.join(",")}}`),this}likeAnyOf(a,o){return this.url.searchParams.append(a,`like(any).{${o.join(",")}}`),this}ilike(a,o){return this.url.searchParams.append(a,`ilike.${o}`),this}ilikeAllOf(a,o){return this.url.searchParams.append(a,`ilike(all).{${o.join(",")}}`),this}ilikeAnyOf(a,o){return this.url.searchParams.append(a,`ilike(any).{${o.join(",")}}`),this}is(a,o){return this.url.searchParams.append(a,`is.${o}`),this}in(a,o){const s=Array.from(new Set(o)).map(u=>typeof u=="string"&&r.test(u)?`"${u}"`:`${u}`).join(",");return this.url.searchParams.append(a,`in.(${s})`),this}contains(a,o){return typeof o=="string"?this.url.searchParams.append(a,`cs.${o}`):Array.isArray(o)?this.url.searchParams.append(a,`cs.{${o.join(",")}}`):this.url.searchParams.append(a,`cs.${JSON.stringify(o)}`),this}containedBy(a,o){return typeof o=="string"?this.url.searchParams.append(a,`cd.${o}`):Array.isArray(o)?this.url.searchParams.append(a,`cd.{${o.join(",")}}`):this.url.searchParams.append(a,`cd.${JSON.stringify(o)}`),this}rangeGt(a,o){return this.url.searchParams.append(a,`sr.${o}`),this}rangeGte(a,o){return this.url.searchParams.append(a,`nxl.${o}`),this}rangeLt(a,o){return this.url.searchParams.append(a,`sl.${o}`),this}rangeLte(a,o){return this.url.searchParams.append(a,`nxr.${o}`),this}rangeAdjacent(a,o){return this.url.searchParams.append(a,`adj.${o}`),this}overlaps(a,o){return typeof o=="string"?this.url.searchParams.append(a,`ov.${o}`):this.url.searchParams.append(a,`ov.{${o.join(",")}}`),this}textSearch(a,o,{config:s,type:u}={}){let l="";u==="plain"?l="pl":u==="phrase"?l="ph":u==="websearch"&&(l="w");const c=s===void 0?"":`(${s})`;return this.url.searchParams.append(a,`${l}fts${c}.${o}`),this}match(a){return Object.entries(a).forEach(([o,s])=>{this.url.searchParams.append(o,`eq.${s}`)}),this}not(a,o,s){return this.url.searchParams.append(a,`not.${o}.${s}`),this}or(a,{foreignTable:o,referencedTable:s=o}={}){const u=s?`${s}.or`:"or";return this.url.searchParams.append(u,`(${a})`),this}filter(a,o,s){return this.url.searchParams.append(a,`${o}.${s}`),this}}return Io.default=n,Io}var qh;function zh(){if(qh)return Co;qh=1,Object.defineProperty(Co,"__esModule",{value:!0});const e=Cn.__importDefault(Zu());class r{constructor(i,{headers:a={},schema:o,fetch:s}){this.url=i,this.headers=new Headers(a),this.schema=o,this.fetch=s}select(i,a){const{head:o=!1,count:s}=a??{},u=o?"HEAD":"GET";let l=!1;const c=(i??"*").split("").map(f=>/\s/.test(f)&&!l?"":(f==='"'&&(l=!l),f)).join("");return this.url.searchParams.set("select",c),s&&this.headers.append("Prefer",`count=${s}`),new e.default({method:u,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch})}insert(i,{count:a,defaultToNull:o=!0}={}){var s;const u="POST";if(a&&this.headers.append("Prefer",`count=${a}`),o||this.headers.append("Prefer","missing=default"),Array.isArray(i)){const l=i.reduce((c,f)=>c.concat(Object.keys(f)),[]);if(l.length>0){const c=[...new Set(l)].map(f=>`"${f}"`);this.url.searchParams.set("columns",c.join(","))}}return new e.default({method:u,url:this.url,headers:this.headers,schema:this.schema,body:i,fetch:(s=this.fetch)!==null&&s!==void 0?s:fetch})}upsert(i,{onConflict:a,ignoreDuplicates:o=!1,count:s,defaultToNull:u=!0}={}){var l;const c="POST";if(this.headers.append("Prefer",`resolution=${o?"ignore":"merge"}-duplicates`),a!==void 0&&this.url.searchParams.set("on_conflict",a),s&&this.headers.append("Prefer",`count=${s}`),u||this.headers.append("Prefer","missing=default"),Array.isArray(i)){const f=i.reduce((d,h)=>d.concat(Object.keys(h)),[]);if(f.length>0){const d=[...new Set(f)].map(h=>`"${h}"`);this.url.searchParams.set("columns",d.join(","))}}return new e.default({method:c,url:this.url,headers:this.headers,schema:this.schema,body:i,fetch:(l=this.fetch)!==null&&l!==void 0?l:fetch})}update(i,{count:a}={}){var o;const s="PATCH";return a&&this.headers.append("Prefer",`count=${a}`),new e.default({method:s,url:this.url,headers:this.headers,schema:this.schema,body:i,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch})}delete({count:i}={}){var a;const o="DELETE";return i&&this.headers.append("Prefer",`count=${i}`),new e.default({method:o,url:this.url,headers:this.headers,schema:this.schema,fetch:(a=this.fetch)!==null&&a!==void 0?a:fetch})}}return Co.default=r,Co}var Kh;function Dx(){if(Kh)return ko;Kh=1,Object.defineProperty(ko,"__esModule",{value:!0});const t=Cn,e=t.__importDefault(zh()),r=t.__importDefault(Zu());class n{constructor(a,{headers:o={},schema:s,fetch:u}={}){this.url=a,this.headers=new Headers(o),this.schemaName=s,this.fetch=u}from(a){const o=new URL(`${this.url}/${a}`);return new e.default(o,{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch})}schema(a){return new n(this.url,{headers:this.headers,schema:a,fetch:this.fetch})}rpc(a,o={},{head:s=!1,get:u=!1,count:l}={}){var c;let f;const d=new URL(`${this.url}/rpc/${a}`);let h;s||u?(f=s?"HEAD":"GET",Object.entries(o).filter(([v,p])=>p!==void 0).map(([v,p])=>[v,Array.isArray(p)?`{${p.join(",")}}`:`${p}`]).forEach(([v,p])=>{d.searchParams.append(v,p)})):(f="POST",h=o);const y=new Headers(this.headers);return l&&y.set("Prefer",`count=${l}`),new r.default({method:f,url:d,headers:y,schema:this.schemaName,body:h,fetch:(c=this.fetch)!==null&&c!==void 0?c:fetch})}}return ko.default=n,ko}Object.defineProperty(ut,"__esModule",{value:!0});var Vh=ut.PostgrestError=rp=ut.PostgrestBuilder=ep=ut.PostgrestTransformBuilder=Zh=ut.PostgrestFilterBuilder=Xh=ut.PostgrestQueryBuilder=Gh=ut.PostgrestClient=void 0;const Nn=Cn,Hh=Nn.__importDefault(Dx());var Gh=ut.PostgrestClient=Hh.default;const Yh=Nn.__importDefault(zh());var Xh=ut.PostgrestQueryBuilder=Yh.default;const Jh=Nn.__importDefault(Zu());var Zh=ut.PostgrestFilterBuilder=Jh.default;const Qh=Nn.__importDefault(Fh());var ep=ut.PostgrestTransformBuilder=Qh.default;const tp=Nn.__importDefault(Bh());var rp=ut.PostgrestBuilder=tp.default;const np=Nn.__importDefault(Rh());Vh=ut.PostgrestError=np.default;var ip=ut.default={PostgrestClient:Hh.default,PostgrestQueryBuilder:Yh.default,PostgrestFilterBuilder:Jh.default,PostgrestTransformBuilder:Qh.default,PostgrestBuilder:tp.default,PostgrestError:np.default};const Rx=Ox({__proto__:null,get PostgrestBuilder(){return rp},get PostgrestClient(){return Gh},get PostgrestError(){return Vh},get PostgrestFilterBuilder(){return Zh},get PostgrestQueryBuilder(){return Xh},get PostgrestTransformBuilder(){return ep},default:ip},[ut]),{PostgrestClient:Lx,PostgrestQueryBuilder:N4,PostgrestFilterBuilder:M4,PostgrestTransformBuilder:D4,PostgrestBuilder:R4,PostgrestError:L4}=ip||Rx;class Bx{static detectEnvironment(){var e;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&globalThis.EdgeRuntime||typeof navigator<"u"&&(!((e=navigator.userAgent)===null||e===void 0)&&e.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};if(typeof process<"u"){const r=process.versions;if(r&&r.node){const n=r.node,i=parseInt(n.replace(/^v/,"").split(".")[0]);return i>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${i} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${i} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
|
|
31
31
|
import ws from "ws"
|
|
32
32
|
new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const e=this.detectEnvironment();if(e.constructor)return e.constructor;let r=e.error||"WebSocket not supported in this environment.";throw e.workaround&&(r+=`
|
|
33
33
|
|
|
34
|
-
Suggested solution: ${e.workaround}`),new Error(r)}static createWebSocket(e,r){const n=this.getWebSocketConstructor();return new n(e,r)}static isWebSocketSupported(){try{const e=this.detectEnvironment();return e.type==="native"||e.type==="ws"}catch{return!1}}}const Fx="realtime-js/2.78.0",Wx="1.0.0",el=1e4,qx=1e3,zx=100;var ta;(function(t){t[t.connecting=0]="connecting",t[t.open=1]="open",t[t.closing=2]="closing",t[t.closed=3]="closed"})(ta||(ta={}));var Xe;(function(t){t.closed="closed",t.errored="errored",t.joined="joined",t.joining="joining",t.leaving="leaving"})(Xe||(Xe={}));var Ut;(function(t){t.close="phx_close",t.error="phx_error",t.join="phx_join",t.reply="phx_reply",t.leave="phx_leave",t.access_token="access_token"})(Ut||(Ut={}));var tl;(function(t){t.websocket="websocket"})(tl||(tl={}));var Gr;(function(t){t.Connecting="connecting",t.Open="open",t.Closing="closing",t.Closed="closed"})(Gr||(Gr={}));class Kx{constructor(){this.HEADER_LENGTH=1}decode(e,r){return e.constructor===ArrayBuffer?r(this._binaryDecode(e)):r(typeof e=="string"?JSON.parse(e):{})}_binaryDecode(e){const r=new DataView(e),n=new TextDecoder;return this._decodeBroadcast(e,r,n)}_decodeBroadcast(e,r,n){const i=r.getUint8(1),a=r.getUint8(2);let o=this.HEADER_LENGTH+2;const s=n.decode(e.slice(o,o+i));o=o+i;const u=n.decode(e.slice(o,o+a));o=o+a;const l=JSON.parse(n.decode(e.slice(o,e.byteLength)));return{ref:null,topic:s,event:u,payload:l}}}class op{constructor(e,r){this.callback=e,this.timerCalc=r,this.timer=void 0,this.tries=0,this.callback=e,this.timerCalc=r}reset(){this.tries=0,clearTimeout(this.timer),this.timer=void 0}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}var Ie;(function(t){t.abstime="abstime",t.bool="bool",t.date="date",t.daterange="daterange",t.float4="float4",t.float8="float8",t.int2="int2",t.int4="int4",t.int4range="int4range",t.int8="int8",t.int8range="int8range",t.json="json",t.jsonb="jsonb",t.money="money",t.numeric="numeric",t.oid="oid",t.reltime="reltime",t.text="text",t.time="time",t.timestamp="timestamp",t.timestamptz="timestamptz",t.timetz="timetz",t.tsrange="tsrange",t.tstzrange="tstzrange"})(Ie||(Ie={}));const sp=(t,e,r={})=>{var n;const i=(n=r.skipTypes)!==null&&n!==void 0?n:[];return e?Object.keys(e).reduce((a,o)=>(a[o]=Vx(o,t,e,i),a),{}):{}},Vx=(t,e,r,n)=>{const i=e.find(s=>s.name===t),a=i==null?void 0:i.type,o=r[t];return a&&!n.includes(a)?up(a,o):rl(o)},up=(t,e)=>{if(t.charAt(0)==="_"){const r=t.slice(1,t.length);return Xx(e,r)}switch(t){case Ie.bool:return Hx(e);case Ie.float4:case Ie.float8:case Ie.int2:case Ie.int4:case Ie.int8:case Ie.numeric:case Ie.oid:return Gx(e);case Ie.json:case Ie.jsonb:return Yx(e);case Ie.timestamp:return Jx(e);case Ie.abstime:case Ie.date:case Ie.daterange:case Ie.int4range:case Ie.int8range:case Ie.money:case Ie.reltime:case Ie.text:case Ie.time:case Ie.timestamptz:case Ie.timetz:case Ie.tsrange:case Ie.tstzrange:return rl(e);default:return rl(e)}},rl=t=>t,Hx=t=>{switch(t){case"t":return!0;case"f":return!1;default:return t}},Gx=t=>{if(typeof t=="string"){const e=parseFloat(t);if(!Number.isNaN(e))return e}return t},Yx=t=>{if(typeof t=="string")try{return JSON.parse(t)}catch(e){return console.log(`JSON parse error: ${e}`),t}return t},Xx=(t,e)=>{if(typeof t!="string")return t;const r=t.length-1,n=t[r];if(t[0]==="{"&&n==="}"){let a;const o=t.slice(1,r);try{a=JSON.parse("["+o+"]")}catch{a=o?o.split(","):[]}return a.map(s=>up(e,s))}return t},Jx=t=>typeof t=="string"?t.replace(" ","T"):t,lp=t=>{const e=new URL(t);return e.protocol=e.protocol.replace(/^ws/i,"http"),e.pathname=e.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),e.pathname===""||e.pathname==="/"?e.pathname="/api/broadcast":e.pathname=e.pathname+"/api/broadcast",e.href};class nl{constructor(e,r,n={},i=el){this.channel=e,this.event=r,this.payload=n,this.timeout=i,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(e){this.timeout=e,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(e){this.payload=Object.assign(Object.assign({},this.payload),e)}receive(e,r){var n;return this._hasReceived(e)&&r((n=this.receivedResp)===null||n===void 0?void 0:n.response),this.recHooks.push({status:e,callback:r}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const e=r=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=r,this._matchReceive(r)};this.channel._on(this.refEvent,{},e),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(e,r){this.refEvent&&this.channel._trigger(this.refEvent,{status:e,response:r})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:e,response:r}){this.recHooks.filter(n=>n.status===e).forEach(n=>n.callback(r))}_hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}}var cp;(function(t){t.SYNC="sync",t.JOIN="join",t.LEAVE="leave"})(cp||(cp={}));class ra{constructor(e,r){this.channel=e,this.state={},this.pendingDiffs=[],this.joinRef=null,this.enabled=!1,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const n=(r==null?void 0:r.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(n.state,{},i=>{const{onJoin:a,onLeave:o,onSync:s}=this.caller;this.joinRef=this.channel._joinRef(),this.state=ra.syncState(this.state,i,a,o),this.pendingDiffs.forEach(u=>{this.state=ra.syncDiff(this.state,u,a,o)}),this.pendingDiffs=[],s()}),this.channel._on(n.diff,{},i=>{const{onJoin:a,onLeave:o,onSync:s}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(i):(this.state=ra.syncDiff(this.state,i,a,o),s())}),this.onJoin((i,a,o)=>{this.channel._trigger("presence",{event:"join",key:i,currentPresences:a,newPresences:o})}),this.onLeave((i,a,o)=>{this.channel._trigger("presence",{event:"leave",key:i,currentPresences:a,leftPresences:o})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(e,r,n,i){const a=this.cloneDeep(e),o=this.transformState(r),s={},u={};return this.map(a,(l,c)=>{o[l]||(u[l]=c)}),this.map(o,(l,c)=>{const f=a[l];if(f){const d=c.map(p=>p.presence_ref),h=f.map(p=>p.presence_ref),y=c.filter(p=>h.indexOf(p.presence_ref)<0),v=f.filter(p=>d.indexOf(p.presence_ref)<0);y.length>0&&(s[l]=y),v.length>0&&(u[l]=v)}else s[l]=c}),this.syncDiff(a,{joins:s,leaves:u},n,i)}static syncDiff(e,r,n,i){const{joins:a,leaves:o}={joins:this.transformState(r.joins),leaves:this.transformState(r.leaves)};return n||(n=()=>{}),i||(i=()=>{}),this.map(a,(s,u)=>{var l;const c=(l=e[s])!==null&&l!==void 0?l:[];if(e[s]=this.cloneDeep(u),c.length>0){const f=e[s].map(h=>h.presence_ref),d=c.filter(h=>f.indexOf(h.presence_ref)<0);e[s].unshift(...d)}n(s,c,u)}),this.map(o,(s,u)=>{let l=e[s];if(!l)return;const c=u.map(f=>f.presence_ref);l=l.filter(f=>c.indexOf(f.presence_ref)<0),e[s]=l,i(s,l,u),l.length===0&&delete e[s]}),e}static map(e,r){return Object.getOwnPropertyNames(e).map(n=>r(n,e[n]))}static transformState(e){return e=this.cloneDeep(e),Object.getOwnPropertyNames(e).reduce((r,n)=>{const i=e[n];return"metas"in i?r[n]=i.metas.map(a=>(a.presence_ref=a.phx_ref,delete a.phx_ref,delete a.phx_ref_prev,a)):r[n]=i,r},{})}static cloneDeep(e){return JSON.parse(JSON.stringify(e))}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var fp;(function(t){t.ALL="*",t.INSERT="INSERT",t.UPDATE="UPDATE",t.DELETE="DELETE"})(fp||(fp={}));var na;(function(t){t.BROADCAST="broadcast",t.PRESENCE="presence",t.POSTGRES_CHANGES="postgres_changes",t.SYSTEM="system"})(na||(na={}));var sr;(function(t){t.SUBSCRIBED="SUBSCRIBED",t.TIMED_OUT="TIMED_OUT",t.CLOSED="CLOSED",t.CHANNEL_ERROR="CHANNEL_ERROR"})(sr||(sr={}));class il{constructor(e,r={config:{}},n){var i,a;if(this.topic=e,this.params=r,this.socket=n,this.bindings={},this.state=Xe.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},r.config),this.timeout=this.socket.timeout,this.joinPush=new nl(this,Ut.join,this.params,this.timeout),this.rejoinTimer=new op(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=Xe.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(o=>o.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=Xe.closed,this.socket._remove(this)}),this._onError(o=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,o),this.state=Xe.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=Xe.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",o=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,o),this.state=Xe.errored,this.rejoinTimer.scheduleTimeout())}),this._on(Ut.reply,{},(o,s)=>{this._trigger(this._replyEventName(s),o)}),this.presence=new ra(this),this.broadcastEndpointURL=lp(this.socket.endPoint),this.private=this.params.config.private||!1,!this.private&&(!((a=(i=this.params.config)===null||i===void 0?void 0:i.broadcast)===null||a===void 0)&&a.replay))throw`tried to use replay on public channel '${this.topic}'. It must be a private channel.`}subscribe(e,r=this.timeout){var n,i,a;if(this.socket.isConnected()||this.socket.connect(),this.state==Xe.closed){const{config:{broadcast:o,presence:s,private:u}}=this.params,l=(i=(n=this.bindings.postgres_changes)===null||n===void 0?void 0:n.map(h=>h.filter))!==null&&i!==void 0?i:[],c=!!this.bindings[na.PRESENCE]&&this.bindings[na.PRESENCE].length>0||((a=this.params.config.presence)===null||a===void 0?void 0:a.enabled)===!0,f={},d={broadcast:o,presence:Object.assign(Object.assign({},s),{enabled:c}),postgres_changes:l,private:u};this.socket.accessTokenValue&&(f.access_token=this.socket.accessTokenValue),this._onError(h=>e==null?void 0:e(sr.CHANNEL_ERROR,h)),this._onClose(()=>e==null?void 0:e(sr.CLOSED)),this.updateJoinPayload(Object.assign({config:d},f)),this.joinedOnce=!0,this._rejoin(r),this.joinPush.receive("ok",async({postgres_changes:h})=>{var y;if(this.socket.setAuth(),h===void 0){e==null||e(sr.SUBSCRIBED);return}else{const v=this.bindings.postgres_changes,p=(y=v==null?void 0:v.length)!==null&&y!==void 0?y:0,m=[];for(let b=0;b<p;b++){const w=v[b],{filter:{event:O,schema:g,table:_,filter:S}}=w,A=h&&h[b];if(A&&A.event===O&&A.schema===g&&A.table===_&&A.filter===S)m.push(Object.assign(Object.assign({},w),{id:A.id}));else{this.unsubscribe(),this.state=Xe.errored,e==null||e(sr.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=m,e&&e(sr.SUBSCRIBED);return}}).receive("error",h=>{this.state=Xe.errored,e==null||e(sr.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(h).join(", ")||"error")))}).receive("timeout",()=>{e==null||e(sr.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(e,r={}){return await this.send({type:"presence",event:"track",payload:e},r.timeout||this.timeout)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,r,n){return this.state===Xe.joined&&e===na.PRESENCE&&(this.socket.log("channel",`resubscribe to ${this.topic} due to change in presence callbacks on joined channel`),this.unsubscribe().then(()=>this.subscribe())),this._on(e,r,n)}async httpSend(e,r,n={}){var i;const a=this.socket.accessTokenValue?`Bearer ${this.socket.accessTokenValue}`:"";if(r==null)return Promise.reject("Payload is required for httpSend()");const o={method:"POST",headers:{Authorization:a,apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:e,payload:r,private:this.private}]})},s=await this._fetchWithTimeout(this.broadcastEndpointURL,o,(i=n.timeout)!==null&&i!==void 0?i:this.timeout);if(s.status===202)return{success:!0};let u=s.statusText;try{const l=await s.json();u=l.error||l.message||u}catch{}return Promise.reject(new Error(u))}async send(e,r={}){var n,i;if(!this._canPush()&&e.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event:a,payload:o}=e,u={method:"POST",headers:{Authorization:this.socket.accessTokenValue?`Bearer ${this.socket.accessTokenValue}`:"",apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:a,payload:o,private:this.private}]})};try{const l=await this._fetchWithTimeout(this.broadcastEndpointURL,u,(n=r.timeout)!==null&&n!==void 0?n:this.timeout);return await((i=l.body)===null||i===void 0?void 0:i.cancel()),l.ok?"ok":"error"}catch(l){return l.name==="AbortError"?"timed out":"error"}}else return new Promise(a=>{var o,s,u;const l=this._push(e.type,e,r.timeout||this.timeout);e.type==="broadcast"&&!(!((u=(s=(o=this.params)===null||o===void 0?void 0:o.config)===null||s===void 0?void 0:s.broadcast)===null||u===void 0)&&u.ack)&&a("ok"),l.receive("ok",()=>a("ok")),l.receive("error",()=>a("error")),l.receive("timeout",()=>a("timed out"))})}updateJoinPayload(e){this.joinPush.updatePayload(e)}unsubscribe(e=this.timeout){this.state=Xe.leaving;const r=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(Ut.close,"leave",this._joinRef())};this.joinPush.destroy();let n=null;return new Promise(i=>{n=new nl(this,Ut.leave,{},e),n.receive("ok",()=>{r(),i("ok")}).receive("timeout",()=>{r(),i("timed out")}).receive("error",()=>{i("error")}),n.send(),this._canPush()||n.trigger("ok",{})}).finally(()=>{n==null||n.destroy()})}teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Xe.closed,this.bindings={}}async _fetchWithTimeout(e,r,n){const i=new AbortController,a=setTimeout(()=>i.abort(),n),o=await this.socket.fetch(e,Object.assign(Object.assign({},r),{signal:i.signal}));return clearTimeout(a),o}_push(e,r,n=this.timeout){if(!this.joinedOnce)throw`tried to push '${e}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let i=new nl(this,e,r,n);return this._canPush()?i.send():this._addToPushBuffer(i),i}_addToPushBuffer(e){if(e.startTimeout(),this.pushBuffer.push(e),this.pushBuffer.length>zx){const r=this.pushBuffer.shift();r&&(r.destroy(),this.socket.log("channel",`discarded push due to buffer overflow: ${r.event}`,r.payload))}}_onMessage(e,r,n){return r}_isMember(e){return this.topic===e}_joinRef(){return this.joinPush.ref}_trigger(e,r,n){var i,a;const o=e.toLocaleLowerCase(),{close:s,error:u,leave:l,join:c}=Ut;if(n&&[s,u,l,c].indexOf(o)>=0&&n!==this._joinRef())return;let d=this._onMessage(o,r,n);if(r&&!d)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(o)?(i=this.bindings.postgres_changes)===null||i===void 0||i.filter(h=>{var y,v,p;return((y=h.filter)===null||y===void 0?void 0:y.event)==="*"||((p=(v=h.filter)===null||v===void 0?void 0:v.event)===null||p===void 0?void 0:p.toLocaleLowerCase())===o}).map(h=>h.callback(d,n)):(a=this.bindings[o])===null||a===void 0||a.filter(h=>{var y,v,p,m,b,w;if(["broadcast","presence","postgres_changes"].includes(o))if("id"in h){const O=h.id,g=(y=h.filter)===null||y===void 0?void 0:y.event;return O&&((v=r.ids)===null||v===void 0?void 0:v.includes(O))&&(g==="*"||(g==null?void 0:g.toLocaleLowerCase())===((p=r.data)===null||p===void 0?void 0:p.type.toLocaleLowerCase()))}else{const O=(b=(m=h==null?void 0:h.filter)===null||m===void 0?void 0:m.event)===null||b===void 0?void 0:b.toLocaleLowerCase();return O==="*"||O===((w=r==null?void 0:r.event)===null||w===void 0?void 0:w.toLocaleLowerCase())}else return h.type.toLocaleLowerCase()===o}).map(h=>{if(typeof d=="object"&&"ids"in d){const y=d.data,{schema:v,table:p,commit_timestamp:m,type:b,errors:w}=y;d=Object.assign(Object.assign({},{schema:v,table:p,commit_timestamp:m,eventType:b,new:{},old:{},errors:w}),this._getPayloadRecords(y))}h.callback(d,n)})}_isClosed(){return this.state===Xe.closed}_isJoined(){return this.state===Xe.joined}_isJoining(){return this.state===Xe.joining}_isLeaving(){return this.state===Xe.leaving}_replyEventName(e){return`chan_reply_${e}`}_on(e,r,n){const i=e.toLocaleLowerCase(),a={type:i,filter:r,callback:n};return this.bindings[i]?this.bindings[i].push(a):this.bindings[i]=[a],this}_off(e,r){const n=e.toLocaleLowerCase();return this.bindings[n]&&(this.bindings[n]=this.bindings[n].filter(i=>{var a;return!(((a=i.type)===null||a===void 0?void 0:a.toLocaleLowerCase())===n&&il.isEqual(i.filter,r))})),this}static isEqual(e,r){if(Object.keys(e).length!==Object.keys(r).length)return!1;for(const n in e)if(e[n]!==r[n])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(e){this._on(Ut.close,{},e)}_onError(e){this._on(Ut.error,{},r=>e(r))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(e=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=Xe.joining,this.joinPush.resend(e))}_getPayloadRecords(e){const r={new:{},old:{}};return(e.type==="INSERT"||e.type==="UPDATE")&&(r.new=sp(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(r.old=sp(e.columns,e.old_record)),r}}const al=()=>{},Lo={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},Zx=[1e3,2e3,5e3,1e4],Qx=1e4,eO=`
|
|
34
|
+
Suggested solution: ${e.workaround}`),new Error(r)}static createWebSocket(e,r){const n=this.getWebSocketConstructor();return new n(e,r)}static isWebSocketSupported(){try{const e=this.detectEnvironment();return e.type==="native"||e.type==="ws"}catch{return!1}}}const Ux="realtime-js/2.78.0",Fx="1.0.0",Qu=1e4,Wx=1e3,qx=100;var ta;(function(t){t[t.connecting=0]="connecting",t[t.open=1]="open",t[t.closing=2]="closing",t[t.closed=3]="closed"})(ta||(ta={}));var Xe;(function(t){t.closed="closed",t.errored="errored",t.joined="joined",t.joining="joining",t.leaving="leaving"})(Xe||(Xe={}));var Ut;(function(t){t.close="phx_close",t.error="phx_error",t.join="phx_join",t.reply="phx_reply",t.leave="phx_leave",t.access_token="access_token"})(Ut||(Ut={}));var el;(function(t){t.websocket="websocket"})(el||(el={}));var Gr;(function(t){t.Connecting="connecting",t.Open="open",t.Closing="closing",t.Closed="closed"})(Gr||(Gr={}));class zx{constructor(){this.HEADER_LENGTH=1}decode(e,r){return e.constructor===ArrayBuffer?r(this._binaryDecode(e)):r(typeof e=="string"?JSON.parse(e):{})}_binaryDecode(e){const r=new DataView(e),n=new TextDecoder;return this._decodeBroadcast(e,r,n)}_decodeBroadcast(e,r,n){const i=r.getUint8(1),a=r.getUint8(2);let o=this.HEADER_LENGTH+2;const s=n.decode(e.slice(o,o+i));o=o+i;const u=n.decode(e.slice(o,o+a));o=o+a;const l=JSON.parse(n.decode(e.slice(o,e.byteLength)));return{ref:null,topic:s,event:u,payload:l}}}class ap{constructor(e,r){this.callback=e,this.timerCalc=r,this.timer=void 0,this.tries=0,this.callback=e,this.timerCalc=r}reset(){this.tries=0,clearTimeout(this.timer),this.timer=void 0}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}var Ie;(function(t){t.abstime="abstime",t.bool="bool",t.date="date",t.daterange="daterange",t.float4="float4",t.float8="float8",t.int2="int2",t.int4="int4",t.int4range="int4range",t.int8="int8",t.int8range="int8range",t.json="json",t.jsonb="jsonb",t.money="money",t.numeric="numeric",t.oid="oid",t.reltime="reltime",t.text="text",t.time="time",t.timestamp="timestamp",t.timestamptz="timestamptz",t.timetz="timetz",t.tsrange="tsrange",t.tstzrange="tstzrange"})(Ie||(Ie={}));const op=(t,e,r={})=>{var n;const i=(n=r.skipTypes)!==null&&n!==void 0?n:[];return e?Object.keys(e).reduce((a,o)=>(a[o]=Kx(o,t,e,i),a),{}):{}},Kx=(t,e,r,n)=>{const i=e.find(s=>s.name===t),a=i==null?void 0:i.type,o=r[t];return a&&!n.includes(a)?sp(a,o):tl(o)},sp=(t,e)=>{if(t.charAt(0)==="_"){const r=t.slice(1,t.length);return Yx(e,r)}switch(t){case Ie.bool:return Vx(e);case Ie.float4:case Ie.float8:case Ie.int2:case Ie.int4:case Ie.int8:case Ie.numeric:case Ie.oid:return Hx(e);case Ie.json:case Ie.jsonb:return Gx(e);case Ie.timestamp:return Xx(e);case Ie.abstime:case Ie.date:case Ie.daterange:case Ie.int4range:case Ie.int8range:case Ie.money:case Ie.reltime:case Ie.text:case Ie.time:case Ie.timestamptz:case Ie.timetz:case Ie.tsrange:case Ie.tstzrange:return tl(e);default:return tl(e)}},tl=t=>t,Vx=t=>{switch(t){case"t":return!0;case"f":return!1;default:return t}},Hx=t=>{if(typeof t=="string"){const e=parseFloat(t);if(!Number.isNaN(e))return e}return t},Gx=t=>{if(typeof t=="string")try{return JSON.parse(t)}catch(e){return console.log(`JSON parse error: ${e}`),t}return t},Yx=(t,e)=>{if(typeof t!="string")return t;const r=t.length-1,n=t[r];if(t[0]==="{"&&n==="}"){let a;const o=t.slice(1,r);try{a=JSON.parse("["+o+"]")}catch{a=o?o.split(","):[]}return a.map(s=>sp(e,s))}return t},Xx=t=>typeof t=="string"?t.replace(" ","T"):t,up=t=>{const e=new URL(t);return e.protocol=e.protocol.replace(/^ws/i,"http"),e.pathname=e.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),e.pathname===""||e.pathname==="/"?e.pathname="/api/broadcast":e.pathname=e.pathname+"/api/broadcast",e.href};class rl{constructor(e,r,n={},i=Qu){this.channel=e,this.event=r,this.payload=n,this.timeout=i,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(e){this.timeout=e,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(e){this.payload=Object.assign(Object.assign({},this.payload),e)}receive(e,r){var n;return this._hasReceived(e)&&r((n=this.receivedResp)===null||n===void 0?void 0:n.response),this.recHooks.push({status:e,callback:r}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const e=r=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=r,this._matchReceive(r)};this.channel._on(this.refEvent,{},e),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(e,r){this.refEvent&&this.channel._trigger(this.refEvent,{status:e,response:r})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:e,response:r}){this.recHooks.filter(n=>n.status===e).forEach(n=>n.callback(r))}_hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}}var lp;(function(t){t.SYNC="sync",t.JOIN="join",t.LEAVE="leave"})(lp||(lp={}));class ra{constructor(e,r){this.channel=e,this.state={},this.pendingDiffs=[],this.joinRef=null,this.enabled=!1,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const n=(r==null?void 0:r.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(n.state,{},i=>{const{onJoin:a,onLeave:o,onSync:s}=this.caller;this.joinRef=this.channel._joinRef(),this.state=ra.syncState(this.state,i,a,o),this.pendingDiffs.forEach(u=>{this.state=ra.syncDiff(this.state,u,a,o)}),this.pendingDiffs=[],s()}),this.channel._on(n.diff,{},i=>{const{onJoin:a,onLeave:o,onSync:s}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(i):(this.state=ra.syncDiff(this.state,i,a,o),s())}),this.onJoin((i,a,o)=>{this.channel._trigger("presence",{event:"join",key:i,currentPresences:a,newPresences:o})}),this.onLeave((i,a,o)=>{this.channel._trigger("presence",{event:"leave",key:i,currentPresences:a,leftPresences:o})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(e,r,n,i){const a=this.cloneDeep(e),o=this.transformState(r),s={},u={};return this.map(a,(l,c)=>{o[l]||(u[l]=c)}),this.map(o,(l,c)=>{const f=a[l];if(f){const d=c.map(p=>p.presence_ref),h=f.map(p=>p.presence_ref),y=c.filter(p=>h.indexOf(p.presence_ref)<0),v=f.filter(p=>d.indexOf(p.presence_ref)<0);y.length>0&&(s[l]=y),v.length>0&&(u[l]=v)}else s[l]=c}),this.syncDiff(a,{joins:s,leaves:u},n,i)}static syncDiff(e,r,n,i){const{joins:a,leaves:o}={joins:this.transformState(r.joins),leaves:this.transformState(r.leaves)};return n||(n=()=>{}),i||(i=()=>{}),this.map(a,(s,u)=>{var l;const c=(l=e[s])!==null&&l!==void 0?l:[];if(e[s]=this.cloneDeep(u),c.length>0){const f=e[s].map(h=>h.presence_ref),d=c.filter(h=>f.indexOf(h.presence_ref)<0);e[s].unshift(...d)}n(s,c,u)}),this.map(o,(s,u)=>{let l=e[s];if(!l)return;const c=u.map(f=>f.presence_ref);l=l.filter(f=>c.indexOf(f.presence_ref)<0),e[s]=l,i(s,l,u),l.length===0&&delete e[s]}),e}static map(e,r){return Object.getOwnPropertyNames(e).map(n=>r(n,e[n]))}static transformState(e){return e=this.cloneDeep(e),Object.getOwnPropertyNames(e).reduce((r,n)=>{const i=e[n];return"metas"in i?r[n]=i.metas.map(a=>(a.presence_ref=a.phx_ref,delete a.phx_ref,delete a.phx_ref_prev,a)):r[n]=i,r},{})}static cloneDeep(e){return JSON.parse(JSON.stringify(e))}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var cp;(function(t){t.ALL="*",t.INSERT="INSERT",t.UPDATE="UPDATE",t.DELETE="DELETE"})(cp||(cp={}));var na;(function(t){t.BROADCAST="broadcast",t.PRESENCE="presence",t.POSTGRES_CHANGES="postgres_changes",t.SYSTEM="system"})(na||(na={}));var sr;(function(t){t.SUBSCRIBED="SUBSCRIBED",t.TIMED_OUT="TIMED_OUT",t.CLOSED="CLOSED",t.CHANNEL_ERROR="CHANNEL_ERROR"})(sr||(sr={}));class nl{constructor(e,r={config:{}},n){var i,a;if(this.topic=e,this.params=r,this.socket=n,this.bindings={},this.state=Xe.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},r.config),this.timeout=this.socket.timeout,this.joinPush=new rl(this,Ut.join,this.params,this.timeout),this.rejoinTimer=new ap(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=Xe.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(o=>o.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=Xe.closed,this.socket._remove(this)}),this._onError(o=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,o),this.state=Xe.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=Xe.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",o=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,o),this.state=Xe.errored,this.rejoinTimer.scheduleTimeout())}),this._on(Ut.reply,{},(o,s)=>{this._trigger(this._replyEventName(s),o)}),this.presence=new ra(this),this.broadcastEndpointURL=up(this.socket.endPoint),this.private=this.params.config.private||!1,!this.private&&(!((a=(i=this.params.config)===null||i===void 0?void 0:i.broadcast)===null||a===void 0)&&a.replay))throw`tried to use replay on public channel '${this.topic}'. It must be a private channel.`}subscribe(e,r=this.timeout){var n,i,a;if(this.socket.isConnected()||this.socket.connect(),this.state==Xe.closed){const{config:{broadcast:o,presence:s,private:u}}=this.params,l=(i=(n=this.bindings.postgres_changes)===null||n===void 0?void 0:n.map(h=>h.filter))!==null&&i!==void 0?i:[],c=!!this.bindings[na.PRESENCE]&&this.bindings[na.PRESENCE].length>0||((a=this.params.config.presence)===null||a===void 0?void 0:a.enabled)===!0,f={},d={broadcast:o,presence:Object.assign(Object.assign({},s),{enabled:c}),postgres_changes:l,private:u};this.socket.accessTokenValue&&(f.access_token=this.socket.accessTokenValue),this._onError(h=>e==null?void 0:e(sr.CHANNEL_ERROR,h)),this._onClose(()=>e==null?void 0:e(sr.CLOSED)),this.updateJoinPayload(Object.assign({config:d},f)),this.joinedOnce=!0,this._rejoin(r),this.joinPush.receive("ok",async({postgres_changes:h})=>{var y;if(this.socket.setAuth(),h===void 0){e==null||e(sr.SUBSCRIBED);return}else{const v=this.bindings.postgres_changes,p=(y=v==null?void 0:v.length)!==null&&y!==void 0?y:0,m=[];for(let b=0;b<p;b++){const w=v[b],{filter:{event:O,schema:g,table:_,filter:S}}=w,A=h&&h[b];if(A&&A.event===O&&A.schema===g&&A.table===_&&A.filter===S)m.push(Object.assign(Object.assign({},w),{id:A.id}));else{this.unsubscribe(),this.state=Xe.errored,e==null||e(sr.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=m,e&&e(sr.SUBSCRIBED);return}}).receive("error",h=>{this.state=Xe.errored,e==null||e(sr.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(h).join(", ")||"error")))}).receive("timeout",()=>{e==null||e(sr.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(e,r={}){return await this.send({type:"presence",event:"track",payload:e},r.timeout||this.timeout)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,r,n){return this.state===Xe.joined&&e===na.PRESENCE&&(this.socket.log("channel",`resubscribe to ${this.topic} due to change in presence callbacks on joined channel`),this.unsubscribe().then(()=>this.subscribe())),this._on(e,r,n)}async httpSend(e,r,n={}){var i;const a=this.socket.accessTokenValue?`Bearer ${this.socket.accessTokenValue}`:"";if(r==null)return Promise.reject("Payload is required for httpSend()");const o={method:"POST",headers:{Authorization:a,apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:e,payload:r,private:this.private}]})},s=await this._fetchWithTimeout(this.broadcastEndpointURL,o,(i=n.timeout)!==null&&i!==void 0?i:this.timeout);if(s.status===202)return{success:!0};let u=s.statusText;try{const l=await s.json();u=l.error||l.message||u}catch{}return Promise.reject(new Error(u))}async send(e,r={}){var n,i;if(!this._canPush()&&e.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event:a,payload:o}=e,u={method:"POST",headers:{Authorization:this.socket.accessTokenValue?`Bearer ${this.socket.accessTokenValue}`:"",apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:a,payload:o,private:this.private}]})};try{const l=await this._fetchWithTimeout(this.broadcastEndpointURL,u,(n=r.timeout)!==null&&n!==void 0?n:this.timeout);return await((i=l.body)===null||i===void 0?void 0:i.cancel()),l.ok?"ok":"error"}catch(l){return l.name==="AbortError"?"timed out":"error"}}else return new Promise(a=>{var o,s,u;const l=this._push(e.type,e,r.timeout||this.timeout);e.type==="broadcast"&&!(!((u=(s=(o=this.params)===null||o===void 0?void 0:o.config)===null||s===void 0?void 0:s.broadcast)===null||u===void 0)&&u.ack)&&a("ok"),l.receive("ok",()=>a("ok")),l.receive("error",()=>a("error")),l.receive("timeout",()=>a("timed out"))})}updateJoinPayload(e){this.joinPush.updatePayload(e)}unsubscribe(e=this.timeout){this.state=Xe.leaving;const r=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(Ut.close,"leave",this._joinRef())};this.joinPush.destroy();let n=null;return new Promise(i=>{n=new rl(this,Ut.leave,{},e),n.receive("ok",()=>{r(),i("ok")}).receive("timeout",()=>{r(),i("timed out")}).receive("error",()=>{i("error")}),n.send(),this._canPush()||n.trigger("ok",{})}).finally(()=>{n==null||n.destroy()})}teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Xe.closed,this.bindings={}}async _fetchWithTimeout(e,r,n){const i=new AbortController,a=setTimeout(()=>i.abort(),n),o=await this.socket.fetch(e,Object.assign(Object.assign({},r),{signal:i.signal}));return clearTimeout(a),o}_push(e,r,n=this.timeout){if(!this.joinedOnce)throw`tried to push '${e}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let i=new rl(this,e,r,n);return this._canPush()?i.send():this._addToPushBuffer(i),i}_addToPushBuffer(e){if(e.startTimeout(),this.pushBuffer.push(e),this.pushBuffer.length>qx){const r=this.pushBuffer.shift();r&&(r.destroy(),this.socket.log("channel",`discarded push due to buffer overflow: ${r.event}`,r.payload))}}_onMessage(e,r,n){return r}_isMember(e){return this.topic===e}_joinRef(){return this.joinPush.ref}_trigger(e,r,n){var i,a;const o=e.toLocaleLowerCase(),{close:s,error:u,leave:l,join:c}=Ut;if(n&&[s,u,l,c].indexOf(o)>=0&&n!==this._joinRef())return;let d=this._onMessage(o,r,n);if(r&&!d)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(o)?(i=this.bindings.postgres_changes)===null||i===void 0||i.filter(h=>{var y,v,p;return((y=h.filter)===null||y===void 0?void 0:y.event)==="*"||((p=(v=h.filter)===null||v===void 0?void 0:v.event)===null||p===void 0?void 0:p.toLocaleLowerCase())===o}).map(h=>h.callback(d,n)):(a=this.bindings[o])===null||a===void 0||a.filter(h=>{var y,v,p,m,b,w;if(["broadcast","presence","postgres_changes"].includes(o))if("id"in h){const O=h.id,g=(y=h.filter)===null||y===void 0?void 0:y.event;return O&&((v=r.ids)===null||v===void 0?void 0:v.includes(O))&&(g==="*"||(g==null?void 0:g.toLocaleLowerCase())===((p=r.data)===null||p===void 0?void 0:p.type.toLocaleLowerCase()))}else{const O=(b=(m=h==null?void 0:h.filter)===null||m===void 0?void 0:m.event)===null||b===void 0?void 0:b.toLocaleLowerCase();return O==="*"||O===((w=r==null?void 0:r.event)===null||w===void 0?void 0:w.toLocaleLowerCase())}else return h.type.toLocaleLowerCase()===o}).map(h=>{if(typeof d=="object"&&"ids"in d){const y=d.data,{schema:v,table:p,commit_timestamp:m,type:b,errors:w}=y;d=Object.assign(Object.assign({},{schema:v,table:p,commit_timestamp:m,eventType:b,new:{},old:{},errors:w}),this._getPayloadRecords(y))}h.callback(d,n)})}_isClosed(){return this.state===Xe.closed}_isJoined(){return this.state===Xe.joined}_isJoining(){return this.state===Xe.joining}_isLeaving(){return this.state===Xe.leaving}_replyEventName(e){return`chan_reply_${e}`}_on(e,r,n){const i=e.toLocaleLowerCase(),a={type:i,filter:r,callback:n};return this.bindings[i]?this.bindings[i].push(a):this.bindings[i]=[a],this}_off(e,r){const n=e.toLocaleLowerCase();return this.bindings[n]&&(this.bindings[n]=this.bindings[n].filter(i=>{var a;return!(((a=i.type)===null||a===void 0?void 0:a.toLocaleLowerCase())===n&&nl.isEqual(i.filter,r))})),this}static isEqual(e,r){if(Object.keys(e).length!==Object.keys(r).length)return!1;for(const n in e)if(e[n]!==r[n])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(e){this._on(Ut.close,{},e)}_onError(e){this._on(Ut.error,{},r=>e(r))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(e=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=Xe.joining,this.joinPush.resend(e))}_getPayloadRecords(e){const r={new:{},old:{}};return(e.type==="INSERT"||e.type==="UPDATE")&&(r.new=op(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(r.old=op(e.columns,e.old_record)),r}}const il=()=>{},Ro={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},Jx=[1e3,2e3,5e3,1e4],Zx=1e4,Qx=`
|
|
35
35
|
addEventListener("message", (e) => {
|
|
36
36
|
if (e.data.event === "start") {
|
|
37
37
|
setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
|
|
38
38
|
}
|
|
39
|
-
});`;class
|
|
39
|
+
});`;class eO{constructor(e,r){var n;if(this.accessTokenValue=null,this.apiKey=null,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=Qu,this.transport=null,this.heartbeatIntervalMs=Ro.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=il,this.ref=0,this.reconnectTimer=null,this.logger=il,this.conn=null,this.sendBuffer=[],this.serializer=new zx,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._resolveFetch=i=>{let a;return i?a=i:typeof fetch>"u"?a=(...o)=>Promise.resolve().then(()=>Hr).then(({default:s})=>s(...o)).catch(s=>{throw new Error(`Failed to load @supabase/node-fetch: ${s.message}. This is required for HTTP requests in Node.js environments without native fetch.`)}):a=fetch,(...o)=>a(...o)},!(!((n=r==null?void 0:r.params)===null||n===void 0)&&n.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=r.params.apikey,this.endPoint=`${e}/${el.websocket}`,this.httpEndpoint=up(e),this._initializeOptions(r),this._setupReconnectionTimer(),this.fetch=this._resolveFetch(r==null?void 0:r.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.conn!==null&&this.isConnected())){if(this._setConnectionState("connecting"),this._setAuthSafely("connect"),this.transport)this.conn=new this.transport(this.endpointURL());else try{this.conn=Bx.createWebSocket(this.endpointURL())}catch(e){this._setConnectionState("disconnected");const r=e.message;throw r.includes("Node.js")?new Error(`${r}
|
|
40
40
|
|
|
41
41
|
To use Realtime in Node.js, you need to provide a WebSocket implementation:
|
|
42
42
|
|
|
@@ -49,9 +49,9 @@ Option 2: Install and provide the "ws" package:
|
|
|
49
49
|
const client = new RealtimeClient(url, {
|
|
50
50
|
...options,
|
|
51
51
|
transport: ws
|
|
52
|
-
})`):new Error(`WebSocket not available: ${r}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:Wx}))}disconnect(e,r){if(!this.isDisconnecting())if(this._setConnectionState("disconnecting",!0),this.conn){const n=setTimeout(()=>{this._setConnectionState("disconnected")},100);this.conn.onclose=()=>{clearTimeout(n),this._setConnectionState("disconnected")},e?this.conn.close(e,r??""):this.conn.close(),this._teardownConnection()}else this._setConnectionState("disconnected")}getChannels(){return this.channels}async removeChannel(e){const r=await e.unsubscribe();return this.channels.length===0&&this.disconnect(),r}async removeAllChannels(){const e=await Promise.all(this.channels.map(r=>r.unsubscribe()));return this.channels=[],this.disconnect(),e}log(e,r,n){this.logger(e,r,n)}connectionState(){switch(this.conn&&this.conn.readyState){case ta.connecting:return Gr.Connecting;case ta.open:return Gr.Open;case ta.closing:return Gr.Closing;default:return Gr.Closed}}isConnected(){return this.connectionState()===Gr.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}channel(e,r={config:{}}){const n=`realtime:${e}`,i=this.getChannels().find(a=>a.topic===n);if(i)return i;{const a=new il(`realtime:${e}`,r,this);return this.channels.push(a),a}}push(e){const{topic:r,event:n,payload:i,ref:a}=e,o=()=>{this.encode(e,s=>{var u;(u=this.conn)===null||u===void 0||u.send(s)})};this.log("push",`${r} ${n} (${a})`,i),this.isConnected()?o():this.sendBuffer.push(o)}async setAuth(e=null){this._authPromise=this._performAuth(e);try{await this._authPromise}finally{this._authPromise=null}}async sendHeartbeat(){var e;if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(r){this.log("error","error in heartbeat callback",r)}return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(r){this.log("error","error in heartbeat callback",r)}this._wasManualDisconnect=!1,(e=this.conn)===null||e===void 0||e.close(qx,"heartbeat timeout"),setTimeout(()=>{var r;this.isConnected()||(r=this.reconnectTimer)===null||r===void 0||r.scheduleTimeout()},Lo.HEARTBEAT_TIMEOUT_FALLBACK);return}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(r){this.log("error","error in heartbeat callback",r)}this._setAuthSafely("heartbeat")}onHeartbeat(e){this.heartbeatCallback=e}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}_makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}_leaveOpenTopic(e){let r=this.channels.find(n=>n.topic===e&&(n._isJoined()||n._isJoining()));r&&(this.log("transport",`leaving duplicate topic "${e}"`),r.unsubscribe())}_remove(e){this.channels=this.channels.filter(r=>r.topic!==e.topic)}_onConnMessage(e){this.decode(e.data,r=>{if(r.topic==="phoenix"&&r.event==="phx_reply")try{this.heartbeatCallback(r.payload.status==="ok"?"ok":"error")}catch(l){this.log("error","error in heartbeat callback",l)}r.ref&&r.ref===this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null);const{topic:n,event:i,payload:a,ref:o}=r,s=o?`(${o})`:"",u=a.status||"";this.log("receive",`${u} ${n} ${i} ${s}`.trim(),a),this.channels.filter(l=>l._isMember(n)).forEach(l=>l._trigger(i,a,o)),this._triggerStateCallbacks("message",r)})}_clearTimer(e){var r;e==="heartbeat"&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):e==="reconnect"&&((r=this.reconnectTimer)===null||r===void 0||r.reset())}_clearAllTimers(){this._clearTimer("heartbeat"),this._clearTimer("reconnect")}_setupConnectionHandlers(){this.conn&&("binaryType"in this.conn&&(this.conn.binaryType="arraybuffer"),this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=e=>this._onConnError(e),this.conn.onmessage=e=>this._onConnMessage(e),this.conn.onclose=e=>this._onConnClose(e))}_teardownConnection(){this.conn&&(this.conn.onopen=null,this.conn.onerror=null,this.conn.onmessage=null,this.conn.onclose=null,this.conn=null),this._clearAllTimers(),this.channels.forEach(e=>e.teardown())}_onConnOpen(){this._setConnectionState("connected"),this.log("transport",`connected to ${this.endpointURL()}`),this.flushSendBuffer(),this._clearTimer("reconnect"),this.worker?this.workerRef||this._startWorkerHeartbeat():this._startHeartbeat(),this._triggerStateCallbacks("open")}_startHeartbeat(){this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),this.workerRef.onerror=r=>{this.log("worker","worker error",r.message),this.workerRef.terminate()},this.workerRef.onmessage=r=>{r.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_onConnClose(e){var r;this._setConnectionState("disconnected"),this.log("transport","close",e),this._triggerChanError(),this._clearTimer("heartbeat"),this._wasManualDisconnect||(r=this.reconnectTimer)===null||r===void 0||r.scheduleTimeout(),this._triggerStateCallbacks("close",e)}_onConnError(e){this._setConnectionState("disconnected"),this.log("transport",`${e}`),this._triggerChanError(),this._triggerStateCallbacks("error",e)}_triggerChanError(){this.channels.forEach(e=>e._trigger(Ut.error))}_appendParams(e,r){if(Object.keys(r).length===0)return e;const n=e.match(/\?/)?"&":"?",i=new URLSearchParams(r);return`${e}${n}${i}`}_workerObjectUrl(e){let r;if(e)r=e;else{const n=new Blob([eO],{type:"application/javascript"});r=URL.createObjectURL(n)}return r}_setConnectionState(e,r=!1){this._connectionState=e,e==="connecting"?this._wasManualDisconnect=!1:e==="disconnecting"&&(this._wasManualDisconnect=r)}async _performAuth(e=null){let r;e?r=e:this.accessToken?r=await this.accessToken():r=this.accessTokenValue,this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEach(n=>{const i={access_token:r,version:Fx};r&&n.updateJoinPayload(i),n.joinedOnce&&n._isJoined()&&n._push(Ut.access_token,{access_token:r})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(e="general"){this.setAuth().catch(r=>{this.log("error",`error setting auth in ${e}`,r)})}_triggerStateCallbacks(e,r){try{this.stateChangeCallbacks[e].forEach(n=>{try{n(r)}catch(i){this.log("error",`error in ${e} callback`,i)}})}catch(n){this.log("error",`error triggering ${e} callbacks`,n)}}_setupReconnectionTimer(){this.reconnectTimer=new op(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},Lo.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(e){var r,n,i,a,o,s,u,l,c;if(this.transport=(r=e==null?void 0:e.transport)!==null&&r!==void 0?r:null,this.timeout=(n=e==null?void 0:e.timeout)!==null&&n!==void 0?n:el,this.heartbeatIntervalMs=(i=e==null?void 0:e.heartbeatIntervalMs)!==null&&i!==void 0?i:Lo.HEARTBEAT_INTERVAL,this.worker=(a=e==null?void 0:e.worker)!==null&&a!==void 0?a:!1,this.accessToken=(o=e==null?void 0:e.accessToken)!==null&&o!==void 0?o:null,this.heartbeatCallback=(s=e==null?void 0:e.heartbeatCallback)!==null&&s!==void 0?s:al,e!=null&&e.params&&(this.params=e.params),e!=null&&e.logger&&(this.logger=e.logger),(e!=null&&e.logLevel||e!=null&&e.log_level)&&(this.logLevel=e.logLevel||e.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),this.reconnectAfterMs=(u=e==null?void 0:e.reconnectAfterMs)!==null&&u!==void 0?u:f=>Zx[f-1]||Qx,this.encode=(l=e==null?void 0:e.encode)!==null&&l!==void 0?l:(f,d)=>d(JSON.stringify(f)),this.decode=(c=e==null?void 0:e.decode)!==null&&c!==void 0?c:this.serializer.decode.bind(this.serializer),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=e==null?void 0:e.workerUrl}}}class ol extends Error{constructor(e){super(e),this.__isStorageError=!0,this.name="StorageError"}}function Ue(t){return typeof t=="object"&&t!==null&&"__isStorageError"in t}class rO extends ol{constructor(e,r,n){super(e),this.name="StorageApiError",this.status=r,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}}class sl extends ol{constructor(e,r){super(e),this.name="StorageUnknownError",this.originalError=r}}const ul=t=>{let e;return t?e=t:typeof fetch>"u"?e=(...r)=>Promise.resolve().then(()=>Hr).then(({default:n})=>n(...r)):e=fetch,(...r)=>e(...r)},nO=()=>ee(void 0,void 0,void 0,function*(){return typeof Response>"u"?(yield Promise.resolve().then(()=>Hr)).Response:Response}),ll=t=>{if(Array.isArray(t))return t.map(r=>ll(r));if(typeof t=="function"||t!==Object(t))return t;const e={};return Object.entries(t).forEach(([r,n])=>{const i=r.replace(/([-_][a-z])/gi,a=>a.toUpperCase().replace(/[-_]/g,""));e[i]=ll(n)}),e},iO=t=>{if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},cl=t=>{var e;return t.msg||t.message||t.error_description||(typeof t.error=="string"?t.error:(e=t.error)===null||e===void 0?void 0:e.message)||JSON.stringify(t)},aO=(t,e,r)=>ee(void 0,void 0,void 0,function*(){const n=yield nO();t instanceof n&&!(r!=null&&r.noResolveJson)?t.json().then(i=>{const a=t.status||500,o=(i==null?void 0:i.statusCode)||a+"";e(new rO(cl(i),a,o))}).catch(i=>{e(new sl(cl(i),i))}):e(new sl(cl(t),t))}),oO=(t,e,r,n)=>{const i={method:t,headers:(e==null?void 0:e.headers)||{}};return t==="GET"||!n?i:(iO(n)?(i.headers=Object.assign({"Content-Type":"application/json"},e==null?void 0:e.headers),i.body=JSON.stringify(n)):i.body=n,e!=null&&e.duplex&&(i.duplex=e.duplex),Object.assign(Object.assign({},i),r))};function ia(t,e,r,n,i,a){return ee(this,void 0,void 0,function*(){return new Promise((o,s)=>{t(r,oO(e,n,i,a)).then(u=>{if(!u.ok)throw u;return n!=null&&n.noResolveJson?u:u.json()}).then(u=>o(u)).catch(u=>aO(u,s,n))})})}function aa(t,e,r,n){return ee(this,void 0,void 0,function*(){return ia(t,"GET",e,r,n)})}function Ft(t,e,r,n,i){return ee(this,void 0,void 0,function*(){return ia(t,"POST",e,n,i,r)})}function fl(t,e,r,n,i){return ee(this,void 0,void 0,function*(){return ia(t,"PUT",e,n,i,r)})}function sO(t,e,r,n){return ee(this,void 0,void 0,function*(){return ia(t,"HEAD",e,Object.assign(Object.assign({},r),{noResolveJson:!0}),n)})}function dl(t,e,r,n,i){return ee(this,void 0,void 0,function*(){return ia(t,"DELETE",e,n,i,r)})}class uO{constructor(e,r){this.downloadFn=e,this.shouldThrowOnError=r}then(e,r){return this.execute().then(e,r)}execute(){return ee(this,void 0,void 0,function*(){try{return{data:(yield this.downloadFn()).body,error:null}}catch(e){if(this.shouldThrowOnError)throw e;if(Ue(e))return{data:null,error:e};throw e}})}}var dp;class lO{constructor(e,r){this.downloadFn=e,this.shouldThrowOnError=r,this[dp]="BlobDownloadBuilder",this.promise=null}asStream(){return new uO(this.downloadFn,this.shouldThrowOnError)}then(e,r){return this.getPromise().then(e,r)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}execute(){return ee(this,void 0,void 0,function*(){try{return{data:yield(yield this.downloadFn()).blob(),error:null}}catch(e){if(this.shouldThrowOnError)throw e;if(Ue(e))return{data:null,error:e};throw e}})}}dp=Symbol.toStringTag;const cO={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},hp={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class fO{constructor(e,r={},n,i){this.shouldThrowOnError=!1,this.url=e,this.headers=r,this.bucketId=n,this.fetch=ul(i)}throwOnError(){return this.shouldThrowOnError=!0,this}uploadOrUpdate(e,r,n,i){return ee(this,void 0,void 0,function*(){try{let a;const o=Object.assign(Object.assign({},hp),i);let s=Object.assign(Object.assign({},this.headers),e==="POST"&&{"x-upsert":String(o.upsert)});const u=o.metadata;typeof Blob<"u"&&n instanceof Blob?(a=new FormData,a.append("cacheControl",o.cacheControl),u&&a.append("metadata",this.encodeMetadata(u)),a.append("",n)):typeof FormData<"u"&&n instanceof FormData?(a=n,a.append("cacheControl",o.cacheControl),u&&a.append("metadata",this.encodeMetadata(u))):(a=n,s["cache-control"]=`max-age=${o.cacheControl}`,s["content-type"]=o.contentType,u&&(s["x-metadata"]=this.toBase64(this.encodeMetadata(u)))),i!=null&&i.headers&&(s=Object.assign(Object.assign({},s),i.headers));const l=this._removeEmptyFolders(r),c=this._getFinalPath(l),f=yield(e=="PUT"?fl:Ft)(this.fetch,`${this.url}/object/${c}`,a,Object.assign({headers:s},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{data:{path:l,id:f.Id,fullPath:f.Key},error:null}}catch(a){if(this.shouldThrowOnError)throw a;if(Ue(a))return{data:null,error:a};throw a}})}upload(e,r,n){return ee(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",e,r,n)})}uploadToSignedUrl(e,r,n,i){return ee(this,void 0,void 0,function*(){const a=this._removeEmptyFolders(e),o=this._getFinalPath(a),s=new URL(this.url+`/object/upload/sign/${o}`);s.searchParams.set("token",r);try{let u;const l=Object.assign({upsert:hp.upsert},i),c=Object.assign(Object.assign({},this.headers),{"x-upsert":String(l.upsert)});typeof Blob<"u"&&n instanceof Blob?(u=new FormData,u.append("cacheControl",l.cacheControl),u.append("",n)):typeof FormData<"u"&&n instanceof FormData?(u=n,u.append("cacheControl",l.cacheControl)):(u=n,c["cache-control"]=`max-age=${l.cacheControl}`,c["content-type"]=l.contentType);const f=yield fl(this.fetch,s.toString(),u,{headers:c});return{data:{path:a,fullPath:f.Key},error:null}}catch(u){if(this.shouldThrowOnError)throw u;if(Ue(u))return{data:null,error:u};throw u}})}createSignedUploadUrl(e,r){return ee(this,void 0,void 0,function*(){try{let n=this._getFinalPath(e);const i=Object.assign({},this.headers);r!=null&&r.upsert&&(i["x-upsert"]="true");const a=yield Ft(this.fetch,`${this.url}/object/upload/sign/${n}`,{},{headers:i}),o=new URL(this.url+a.url),s=o.searchParams.get("token");if(!s)throw new ol("No token returned by API");return{data:{signedUrl:o.toString(),path:e,token:s},error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(Ue(n))return{data:null,error:n};throw n}})}update(e,r,n){return ee(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",e,r,n)})}move(e,r,n){return ee(this,void 0,void 0,function*(){try{return{data:yield Ft(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:e,destinationKey:r,destinationBucket:n==null?void 0:n.destinationBucket},{headers:this.headers}),error:null}}catch(i){if(this.shouldThrowOnError)throw i;if(Ue(i))return{data:null,error:i};throw i}})}copy(e,r,n){return ee(this,void 0,void 0,function*(){try{return{data:{path:(yield Ft(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:e,destinationKey:r,destinationBucket:n==null?void 0:n.destinationBucket},{headers:this.headers})).Key},error:null}}catch(i){if(this.shouldThrowOnError)throw i;if(Ue(i))return{data:null,error:i};throw i}})}createSignedUrl(e,r,n){return ee(this,void 0,void 0,function*(){try{let i=this._getFinalPath(e),a=yield Ft(this.fetch,`${this.url}/object/sign/${i}`,Object.assign({expiresIn:r},n!=null&&n.transform?{transform:n.transform}:{}),{headers:this.headers});const o=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"";return a={signedUrl:encodeURI(`${this.url}${a.signedURL}${o}`)},{data:a,error:null}}catch(i){if(this.shouldThrowOnError)throw i;if(Ue(i))return{data:null,error:i};throw i}})}createSignedUrls(e,r,n){return ee(this,void 0,void 0,function*(){try{const i=yield Ft(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:r,paths:e},{headers:this.headers}),a=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"";return{data:i.map(o=>Object.assign(Object.assign({},o),{signedUrl:o.signedURL?encodeURI(`${this.url}${o.signedURL}${a}`):null})),error:null}}catch(i){if(this.shouldThrowOnError)throw i;if(Ue(i))return{data:null,error:i};throw i}})}download(e,r){const i=typeof(r==null?void 0:r.transform)<"u"?"render/image/authenticated":"object",a=this.transformOptsToQueryString((r==null?void 0:r.transform)||{}),o=a?`?${a}`:"",s=this._getFinalPath(e),u=()=>aa(this.fetch,`${this.url}/${i}/${s}${o}`,{headers:this.headers,noResolveJson:!0});return new lO(u,this.shouldThrowOnError)}info(e){return ee(this,void 0,void 0,function*(){const r=this._getFinalPath(e);try{const n=yield aa(this.fetch,`${this.url}/object/info/${r}`,{headers:this.headers});return{data:ll(n),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(Ue(n))return{data:null,error:n};throw n}})}exists(e){return ee(this,void 0,void 0,function*(){const r=this._getFinalPath(e);try{return yield sO(this.fetch,`${this.url}/object/${r}`,{headers:this.headers}),{data:!0,error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(Ue(n)&&n instanceof sl){const i=n.originalError;if([400,404].includes(i==null?void 0:i.status))return{data:!1,error:n}}throw n}})}getPublicUrl(e,r){const n=this._getFinalPath(e),i=[],a=r!=null&&r.download?`download=${r.download===!0?"":r.download}`:"";a!==""&&i.push(a);const s=typeof(r==null?void 0:r.transform)<"u"?"render/image":"object",u=this.transformOptsToQueryString((r==null?void 0:r.transform)||{});u!==""&&i.push(u);let l=i.join("&");return l!==""&&(l=`?${l}`),{data:{publicUrl:encodeURI(`${this.url}/${s}/public/${n}${l}`)}}}remove(e){return ee(this,void 0,void 0,function*(){try{return{data:yield dl(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:e},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Ue(r))return{data:null,error:r};throw r}})}list(e,r,n){return ee(this,void 0,void 0,function*(){try{const i=Object.assign(Object.assign(Object.assign({},cO),r),{prefix:e||""});return{data:yield Ft(this.fetch,`${this.url}/object/list/${this.bucketId}`,i,{headers:this.headers},n),error:null}}catch(i){if(this.shouldThrowOnError)throw i;if(Ue(i))return{data:null,error:i};throw i}})}listV2(e,r){return ee(this,void 0,void 0,function*(){try{const n=Object.assign({},e);return{data:yield Ft(this.fetch,`${this.url}/object/list-v2/${this.bucketId}`,n,{headers:this.headers},r),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(Ue(n))return{data:null,error:n};throw n}})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){const r=[];return e.width&&r.push(`width=${e.width}`),e.height&&r.push(`height=${e.height}`),e.resize&&r.push(`resize=${e.resize}`),e.format&&r.push(`format=${e.format}`),e.quality&&r.push(`quality=${e.quality}`),r.join("&")}}const pp="2.78.0",vp={"X-Client-Info":`storage-js/${pp}`};class dO{constructor(e,r={},n,i){this.shouldThrowOnError=!1;const a=new URL(e);i!=null&&i.useNewHostname&&/supabase\.(co|in|red)$/.test(a.hostname)&&!a.hostname.includes("storage.supabase.")&&(a.hostname=a.hostname.replace("supabase.","storage.supabase.")),this.url=a.href.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},vp),r),this.fetch=ul(n)}throwOnError(){return this.shouldThrowOnError=!0,this}listBuckets(e){return ee(this,void 0,void 0,function*(){try{const r=this.listBucketOptionsToQueryString(e);return{data:yield aa(this.fetch,`${this.url}/bucket${r}`,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Ue(r))return{data:null,error:r};throw r}})}getBucket(e){return ee(this,void 0,void 0,function*(){try{return{data:yield aa(this.fetch,`${this.url}/bucket/${e}`,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Ue(r))return{data:null,error:r};throw r}})}createBucket(e){return ee(this,arguments,void 0,function*(r,n={public:!1}){try{return{data:yield Ft(this.fetch,`${this.url}/bucket`,{id:r,name:r,type:n.type,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:this.headers}),error:null}}catch(i){if(this.shouldThrowOnError)throw i;if(Ue(i))return{data:null,error:i};throw i}})}updateBucket(e,r){return ee(this,void 0,void 0,function*(){try{return{data:yield fl(this.fetch,`${this.url}/bucket/${e}`,{id:e,name:e,public:r.public,file_size_limit:r.fileSizeLimit,allowed_mime_types:r.allowedMimeTypes},{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(Ue(n))return{data:null,error:n};throw n}})}emptyBucket(e){return ee(this,void 0,void 0,function*(){try{return{data:yield Ft(this.fetch,`${this.url}/bucket/${e}/empty`,{},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Ue(r))return{data:null,error:r};throw r}})}deleteBucket(e){return ee(this,void 0,void 0,function*(){try{return{data:yield dl(this.fetch,`${this.url}/bucket/${e}`,{},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Ue(r))return{data:null,error:r};throw r}})}listBucketOptionsToQueryString(e){const r={};return e&&("limit"in e&&(r.limit=String(e.limit)),"offset"in e&&(r.offset=String(e.offset)),e.search&&(r.search=e.search),e.sortColumn&&(r.sortColumn=e.sortColumn),e.sortOrder&&(r.sortOrder=e.sortOrder)),Object.keys(r).length>0?"?"+new URLSearchParams(r).toString():""}}class hO{constructor(e,r={},n){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},vp),r),this.fetch=ul(n)}throwOnError(){return this.shouldThrowOnError=!0,this}createBucket(e){return ee(this,void 0,void 0,function*(){try{return{data:yield Ft(this.fetch,`${this.url}/bucket`,{name:e},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Ue(r))return{data:null,error:r};throw r}})}listBuckets(e){return ee(this,void 0,void 0,function*(){try{const r=new URLSearchParams;(e==null?void 0:e.limit)!==void 0&&r.set("limit",e.limit.toString()),(e==null?void 0:e.offset)!==void 0&&r.set("offset",e.offset.toString()),e!=null&&e.sortColumn&&r.set("sortColumn",e.sortColumn),e!=null&&e.sortOrder&&r.set("sortOrder",e.sortOrder),e!=null&&e.search&&r.set("search",e.search);const n=r.toString(),i=n?`${this.url}/bucket?${n}`:`${this.url}/bucket`;return{data:yield aa(this.fetch,i,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Ue(r))return{data:null,error:r};throw r}})}deleteBucket(e){return ee(this,void 0,void 0,function*(){try{return{data:yield dl(this.fetch,`${this.url}/bucket/${e}`,{},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Ue(r))return{data:null,error:r};throw r}})}}const hl={"X-Client-Info":`storage-js/${pp}`,"Content-Type":"application/json"};class yp extends Error{constructor(e){super(e),this.__isStorageVectorsError=!0,this.name="StorageVectorsError"}}function wt(t){return typeof t=="object"&&t!==null&&"__isStorageVectorsError"in t}class pl extends yp{constructor(e,r,n){super(e),this.name="StorageVectorsApiError",this.status=r,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}}class pO extends yp{constructor(e,r){super(e),this.name="StorageVectorsUnknownError",this.originalError=r}}var gp;(function(t){t.InternalError="InternalError",t.S3VectorConflictException="S3VectorConflictException",t.S3VectorNotFoundException="S3VectorNotFoundException",t.S3VectorBucketNotEmpty="S3VectorBucketNotEmpty",t.S3VectorMaxBucketsExceeded="S3VectorMaxBucketsExceeded",t.S3VectorMaxIndexesExceeded="S3VectorMaxIndexesExceeded"})(gp||(gp={}));const vl=t=>{let e;return t?e=t:typeof fetch>"u"?e=(...r)=>Promise.resolve().then(()=>Hr).then(({default:n})=>n(...r)):e=fetch,(...r)=>e(...r)},vO=t=>{if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},mp=t=>t.msg||t.message||t.error_description||t.error||JSON.stringify(t),yO=(t,e,r)=>ee(void 0,void 0,void 0,function*(){if(t&&typeof t=="object"&&"status"in t&&"ok"in t&&typeof t.status=="number"&&!(r!=null&&r.noResolveJson)){const i=t.status||500,a=t;if(typeof a.json=="function")a.json().then(o=>{const s=(o==null?void 0:o.statusCode)||(o==null?void 0:o.code)||i+"";e(new pl(mp(o),i,s))}).catch(()=>{const o=i+"",s=a.statusText||`HTTP ${i} error`;e(new pl(s,i,o))});else{const o=i+"",s=a.statusText||`HTTP ${i} error`;e(new pl(s,i,o))}}else e(new pO(mp(t),t))}),gO=(t,e,r,n)=>{const i={method:t,headers:(e==null?void 0:e.headers)||{}};return n?(vO(n)?(i.headers=Object.assign({"Content-Type":"application/json"},e==null?void 0:e.headers),i.body=JSON.stringify(n)):i.body=n,Object.assign(Object.assign({},i),r)):i};function mO(t,e,r,n,i,a){return ee(this,void 0,void 0,function*(){return new Promise((o,s)=>{t(r,gO(e,n,i,a)).then(u=>{if(!u.ok)throw u;if(n!=null&&n.noResolveJson)return u;const l=u.headers.get("content-type");return!l||!l.includes("application/json")?{}:u.json()}).then(u=>o(u)).catch(u=>yO(u,s,n))})})}function _t(t,e,r,n,i){return ee(this,void 0,void 0,function*(){return mO(t,"POST",e,n,i,r)})}class bO{constructor(e,r={},n){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},hl),r),this.fetch=vl(n)}throwOnError(){return this.shouldThrowOnError=!0,this}createIndex(e){return ee(this,void 0,void 0,function*(){try{return{data:(yield _t(this.fetch,`${this.url}/CreateIndex`,e,{headers:this.headers}))||{},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(wt(r))return{data:null,error:r};throw r}})}getIndex(e,r){return ee(this,void 0,void 0,function*(){try{return{data:yield _t(this.fetch,`${this.url}/GetIndex`,{vectorBucketName:e,indexName:r},{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(wt(n))return{data:null,error:n};throw n}})}listIndexes(e){return ee(this,void 0,void 0,function*(){try{return{data:yield _t(this.fetch,`${this.url}/ListIndexes`,e,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(wt(r))return{data:null,error:r};throw r}})}deleteIndex(e,r){return ee(this,void 0,void 0,function*(){try{return{data:(yield _t(this.fetch,`${this.url}/DeleteIndex`,{vectorBucketName:e,indexName:r},{headers:this.headers}))||{},error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(wt(n))return{data:null,error:n};throw n}})}}class wO{constructor(e,r={},n){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},hl),r),this.fetch=vl(n)}throwOnError(){return this.shouldThrowOnError=!0,this}putVectors(e){return ee(this,void 0,void 0,function*(){try{if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return{data:(yield _t(this.fetch,`${this.url}/PutVectors`,e,{headers:this.headers}))||{},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(wt(r))return{data:null,error:r};throw r}})}getVectors(e){return ee(this,void 0,void 0,function*(){try{return{data:yield _t(this.fetch,`${this.url}/GetVectors`,e,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(wt(r))return{data:null,error:r};throw r}})}listVectors(e){return ee(this,void 0,void 0,function*(){try{if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return{data:yield _t(this.fetch,`${this.url}/ListVectors`,e,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(wt(r))return{data:null,error:r};throw r}})}queryVectors(e){return ee(this,void 0,void 0,function*(){try{return{data:yield _t(this.fetch,`${this.url}/QueryVectors`,e,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(wt(r))return{data:null,error:r};throw r}})}deleteVectors(e){return ee(this,void 0,void 0,function*(){try{if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return{data:(yield _t(this.fetch,`${this.url}/DeleteVectors`,e,{headers:this.headers}))||{},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(wt(r))return{data:null,error:r};throw r}})}}class _O{constructor(e,r={},n){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},hl),r),this.fetch=vl(n)}throwOnError(){return this.shouldThrowOnError=!0,this}createBucket(e){return ee(this,void 0,void 0,function*(){try{return{data:(yield _t(this.fetch,`${this.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:this.headers}))||{},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(wt(r))return{data:null,error:r};throw r}})}getBucket(e){return ee(this,void 0,void 0,function*(){try{return{data:yield _t(this.fetch,`${this.url}/GetVectorBucket`,{vectorBucketName:e},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(wt(r))return{data:null,error:r};throw r}})}listBuckets(){return ee(this,arguments,void 0,function*(e={}){try{return{data:yield _t(this.fetch,`${this.url}/ListVectorBuckets`,e,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(wt(r))return{data:null,error:r};throw r}})}deleteBucket(e){return ee(this,void 0,void 0,function*(){try{return{data:(yield _t(this.fetch,`${this.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:this.headers}))||{},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(wt(r))return{data:null,error:r};throw r}})}}class xO extends _O{constructor(e,r={}){super(e,r.headers||{},r.fetch)}from(e){return new OO(this.url,this.headers,e,this.fetch)}}class OO extends bO{constructor(e,r,n,i){super(e,r,i),this.vectorBucketName=n}createIndex(e){const r=Object.create(null,{createIndex:{get:()=>super.createIndex}});return ee(this,void 0,void 0,function*(){return r.createIndex.call(this,Object.assign(Object.assign({},e),{vectorBucketName:this.vectorBucketName}))})}listIndexes(){const e=Object.create(null,{listIndexes:{get:()=>super.listIndexes}});return ee(this,arguments,void 0,function*(r={}){return e.listIndexes.call(this,Object.assign(Object.assign({},r),{vectorBucketName:this.vectorBucketName}))})}getIndex(e){const r=Object.create(null,{getIndex:{get:()=>super.getIndex}});return ee(this,void 0,void 0,function*(){return r.getIndex.call(this,this.vectorBucketName,e)})}deleteIndex(e){const r=Object.create(null,{deleteIndex:{get:()=>super.deleteIndex}});return ee(this,void 0,void 0,function*(){return r.deleteIndex.call(this,this.vectorBucketName,e)})}index(e){return new SO(this.url,this.headers,this.vectorBucketName,e,this.fetch)}}class SO extends wO{constructor(e,r,n,i,a){super(e,r,a),this.vectorBucketName=n,this.indexName=i}putVectors(e){const r=Object.create(null,{putVectors:{get:()=>super.putVectors}});return ee(this,void 0,void 0,function*(){return r.putVectors.call(this,Object.assign(Object.assign({},e),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}getVectors(e){const r=Object.create(null,{getVectors:{get:()=>super.getVectors}});return ee(this,void 0,void 0,function*(){return r.getVectors.call(this,Object.assign(Object.assign({},e),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}listVectors(){const e=Object.create(null,{listVectors:{get:()=>super.listVectors}});return ee(this,arguments,void 0,function*(r={}){return e.listVectors.call(this,Object.assign(Object.assign({},r),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}queryVectors(e){const r=Object.create(null,{queryVectors:{get:()=>super.queryVectors}});return ee(this,void 0,void 0,function*(){return r.queryVectors.call(this,Object.assign(Object.assign({},e),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}deleteVectors(e){const r=Object.create(null,{deleteVectors:{get:()=>super.deleteVectors}});return ee(this,void 0,void 0,function*(){return r.deleteVectors.call(this,Object.assign(Object.assign({},e),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}}class AO extends dO{constructor(e,r={},n,i){super(e,r,n,i)}from(e){return new fO(this.url,this.headers,e,this.fetch)}get vectors(){return new xO(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new hO(this.url+"/iceberg",this.headers,this.fetch)}}const PO="2.78.0";let oa="";typeof Deno<"u"?oa="deno":typeof document<"u"?oa="web":typeof navigator<"u"&&navigator.product==="ReactNative"?oa="react-native":oa="node";const EO={headers:{"X-Client-Info":`supabase-js-${oa}/${PO}`}},TO={schema:"public"},jO={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},$O={},kO=t=>{let e;return t?e=t:typeof fetch>"u"?e=Mh:e=fetch,(...r)=>e(...r)},CO=()=>typeof Headers>"u"?Dh:Headers,IO=(t,e,r)=>{const n=kO(r),i=CO();return async(a,o)=>{var s;const u=(s=await e())!==null&&s!==void 0?s:t;let l=new i(o==null?void 0:o.headers);return l.has("apikey")||l.set("apikey",t),l.has("Authorization")||l.set("Authorization",`Bearer ${u}`),n(a,Object.assign(Object.assign({},o),{headers:l}))}};function NO(t){return t.endsWith("/")?t:t+"/"}function MO(t,e){var r,n;const{db:i,auth:a,realtime:o,global:s}=t,{db:u,auth:l,realtime:c,global:f}=e,d={db:Object.assign(Object.assign({},u),i),auth:Object.assign(Object.assign({},l),a),realtime:Object.assign(Object.assign({},c),o),storage:{},global:Object.assign(Object.assign(Object.assign({},f),s),{headers:Object.assign(Object.assign({},(r=f==null?void 0:f.headers)!==null&&r!==void 0?r:{}),(n=s==null?void 0:s.headers)!==null&&n!==void 0?n:{})}),accessToken:async()=>""};return t.accessToken?d.accessToken=t.accessToken:delete d.accessToken,d}function DO(t){const e=t==null?void 0:t.trim();if(!e)throw new Error("supabaseUrl is required.");if(!e.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(NO(e))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}const bp="2.78.0",Mn=30*1e3,yl=3,gl=yl*Mn,RO="http://localhost:9999",LO="supabase.auth.token",BO={"X-Client-Info":`gotrue-js/${bp}`},ml="X-Supabase-Api-Version",wp={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},UO=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,FO=10*60*1e3;class sa extends Error{constructor(e,r,n){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=n}}function ie(t){return typeof t=="object"&&t!==null&&"__isAuthError"in t}class WO extends sa{constructor(e,r,n){super(e,r,n),this.name="AuthApiError",this.status=r,this.code=n}}function qO(t){return ie(t)&&t.name==="AuthApiError"}class Yr extends sa{constructor(e,r){super(e),this.name="AuthUnknownError",this.originalError=r}}class Er extends sa{constructor(e,r,n,i){super(e,n,i),this.name=r,this.status=n}}class Wt extends Er{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function zO(t){return ie(t)&&t.name==="AuthSessionMissingError"}class Dn extends Er{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class Bo extends Er{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class Uo extends Er{constructor(e,r=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function KO(t){return ie(t)&&t.name==="AuthImplicitGrantRedirectError"}class _p extends Er{constructor(e,r=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class bl extends Er{constructor(e,r){super(e,"AuthRetryableFetchError",r,void 0)}}function wl(t){return ie(t)&&t.name==="AuthRetryableFetchError"}class xp extends Er{constructor(e,r,n){super(e,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}}class _l extends Er{constructor(e){super(e,"AuthInvalidJwtError",400,"invalid_jwt")}}const Fo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Op=`
|
|
53
|
-
\r=`.split(""),VO=(()=>{const t=new Array(128);for(let e=0;e<t.length;e+=1)t[e]=-1;for(let e=0;e<Op.length;e+=1)t[Op[e].charCodeAt(0)]=-2;for(let e=0;e<Fo.length;e+=1)t[Fo[e].charCodeAt(0)]=e;return t})();function Sp(t,e,r){if(t!==null)for(e.queue=e.queue<<8|t,e.queuedBits+=8;e.queuedBits>=6;){const n=e.queue>>e.queuedBits-6&63;r(Fo[n]),e.queuedBits-=6}else if(e.queuedBits>0)for(e.queue=e.queue<<6-e.queuedBits,e.queuedBits=6;e.queuedBits>=6;){const n=e.queue>>e.queuedBits-6&63;r(Fo[n]),e.queuedBits-=6}}function Ap(t,e,r){const n=VO[t];if(n>-1)for(e.queue=e.queue<<6|n,e.queuedBits+=6;e.queuedBits>=8;)r(e.queue>>e.queuedBits-8&255),e.queuedBits-=8;else{if(n===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(t)}"`)}}function Pp(t){const e=[],r=o=>{e.push(String.fromCodePoint(o))},n={utf8seq:0,codepoint:0},i={queue:0,queuedBits:0},a=o=>{YO(o,n,r)};for(let o=0;o<t.length;o+=1)Ap(t.charCodeAt(o),i,a);return e.join("")}function HO(t,e){if(t<=127){e(t);return}else if(t<=2047){e(192|t>>6),e(128|t&63);return}else if(t<=65535){e(224|t>>12),e(128|t>>6&63),e(128|t&63);return}else if(t<=1114111){e(240|t>>18),e(128|t>>12&63),e(128|t>>6&63),e(128|t&63);return}throw new Error(`Unrecognized Unicode codepoint: ${t.toString(16)}`)}function GO(t,e){for(let r=0;r<t.length;r+=1){let n=t.charCodeAt(r);if(n>55295&&n<=56319){const i=(n-55296)*1024&65535;n=(t.charCodeAt(r+1)-56320&65535|i)+65536,r+=1}HO(n,e)}}function YO(t,e,r){if(e.utf8seq===0){if(t<=127){r(t);return}for(let n=1;n<6;n+=1)if(!(t>>7-n&1)){e.utf8seq=n;break}if(e.utf8seq===2)e.codepoint=t&31;else if(e.utf8seq===3)e.codepoint=t&15;else if(e.utf8seq===4)e.codepoint=t&7;else throw new Error("Invalid UTF-8 sequence");e.utf8seq-=1}else if(e.utf8seq>0){if(t<=127)throw new Error("Invalid UTF-8 sequence");e.codepoint=e.codepoint<<6|t&63,e.utf8seq-=1,e.utf8seq===0&&r(e.codepoint)}}function Rn(t){const e=[],r={queue:0,queuedBits:0},n=i=>{e.push(i)};for(let i=0;i<t.length;i+=1)Ap(t.charCodeAt(i),r,n);return new Uint8Array(e)}function XO(t){const e=[];return GO(t,r=>e.push(r)),new Uint8Array(e)}function Xr(t){const e=[],r={queue:0,queuedBits:0},n=i=>{e.push(i)};return t.forEach(i=>Sp(i,r,n)),Sp(null,r,n),e.join("")}function JO(t){return Math.round(Date.now()/1e3)+t}function ZO(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const e=Math.random()*16|0;return(t=="x"?e:e&3|8).toString(16)})}const lt=()=>typeof window<"u"&&typeof document<"u",Jr={tested:!1,writable:!1},Ep=()=>{if(!lt())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Jr.tested)return Jr.writable;const t=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(t,t),globalThis.localStorage.removeItem(t),Jr.tested=!0,Jr.writable=!0}catch{Jr.tested=!0,Jr.writable=!1}return Jr.writable};function QO(t){const e={},r=new URL(t);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEach((i,a)=>{e[a]=i})}catch{}return r.searchParams.forEach((n,i)=>{e[i]=n}),e}const Tp=t=>{let e;return t?e=t:typeof fetch>"u"?e=(...r)=>Promise.resolve().then(()=>Hr).then(({default:n})=>n(...r)):e=fetch,(...r)=>e(...r)},eS=t=>typeof t=="object"&&t!==null&&"status"in t&&"ok"in t&&"json"in t&&typeof t.json=="function",Ln=async(t,e,r)=>{await t.setItem(e,JSON.stringify(r))},Zr=async(t,e)=>{const r=await t.getItem(e);if(!r)return null;try{return JSON.parse(r)}catch{return r}},Tr=async(t,e)=>{await t.removeItem(e)};class Wo{constructor(){this.promise=new Wo.promiseConstructor((e,r)=>{this.resolve=e,this.reject=r})}}Wo.promiseConstructor=Promise;function xl(t){const e=t.split(".");if(e.length!==3)throw new _l("Invalid JWT structure");for(let n=0;n<e.length;n++)if(!UO.test(e[n]))throw new _l("JWT not in base64url format");return{header:JSON.parse(Pp(e[0])),payload:JSON.parse(Pp(e[1])),signature:Rn(e[2]),raw:{header:e[0],payload:e[1]}}}async function tS(t){return await new Promise(e=>{setTimeout(()=>e(null),t)})}function rS(t,e){return new Promise((n,i)=>{(async()=>{for(let a=0;a<1/0;a++)try{const o=await t(a);if(!e(a,null,o)){n(o);return}}catch(o){if(!e(a,o)){i(o);return}}})()})}function nS(t){return("0"+t.toString(16)).substr(-2)}function iS(){const e=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",n=r.length;let i="";for(let a=0;a<56;a++)i+=r.charAt(Math.floor(Math.random()*n));return i}return crypto.getRandomValues(e),Array.from(e,nS).join("")}async function aS(t){const r=new TextEncoder().encode(t),n=await crypto.subtle.digest("SHA-256",r),i=new Uint8Array(n);return Array.from(i).map(a=>String.fromCharCode(a)).join("")}async function oS(t){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),t;const r=await aS(t);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Bn(t,e,r=!1){const n=iS();let i=n;r&&(i+="/PASSWORD_RECOVERY"),await Ln(t,`${e}-code-verifier`,i);const a=await oS(n);return[a,n===a?"plain":"s256"]}const sS=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function uS(t){const e=t.headers.get(ml);if(!e||!e.match(sS))return null;try{return new Date(`${e}T00:00:00.0Z`)}catch{return null}}function lS(t){if(!t)throw new Error("Missing exp claim");const e=Math.floor(Date.now()/1e3);if(t<=e)throw new Error("JWT has expired")}function cS(t){switch(t){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const fS=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Un(t){if(!fS.test(t))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function Ol(){const t={};return new Proxy(t,{get:(e,r)=>{if(r==="__isUserNotAvailableProxy")return!0;if(typeof r=="symbol"){const n=r.toString();if(n==="Symbol(Symbol.toPrimitive)"||n==="Symbol(Symbol.toStringTag)"||n==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${r}" property of the session object is not supported. Please use getUser() instead.`)},set:(e,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(e,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function dS(t,e){return new Proxy(t,{get:(r,n,i)=>{if(n==="__isInsecureUserWarningProxy")return!0;if(typeof n=="symbol"){const a=n.toString();if(a==="Symbol(Symbol.toPrimitive)"||a==="Symbol(Symbol.toStringTag)"||a==="Symbol(util.inspect.custom)"||a==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(r,n,i)}return!e.value&&typeof n=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),e.value=!0),Reflect.get(r,n,i)}})}function jp(t){return JSON.parse(JSON.stringify(t))}const Qr=t=>t.msg||t.message||t.error_description||t.error||JSON.stringify(t),hS=[502,503,504];async function $p(t){var e;if(!eS(t))throw new bl(Qr(t),0);if(hS.includes(t.status))throw new bl(Qr(t),t.status);let r;try{r=await t.json()}catch(a){throw new Yr(Qr(a),a)}let n;const i=uS(t);if(i&&i.getTime()>=wp["2024-01-01"].timestamp&&typeof r=="object"&&r&&typeof r.code=="string"?n=r.code:typeof r=="object"&&r&&typeof r.error_code=="string"&&(n=r.error_code),n){if(n==="weak_password")throw new xp(Qr(r),t.status,((e=r.weak_password)===null||e===void 0?void 0:e.reasons)||[]);if(n==="session_not_found")throw new Wt}else if(typeof r=="object"&&r&&typeof r.weak_password=="object"&&r.weak_password&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.reasons.reduce((a,o)=>a&&typeof o=="string",!0))throw new xp(Qr(r),t.status,r.weak_password.reasons);throw new WO(Qr(r),t.status||500,n)}const pS=(t,e,r,n)=>{const i={method:t,headers:(e==null?void 0:e.headers)||{}};return t==="GET"?i:(i.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},e==null?void 0:e.headers),i.body=JSON.stringify(n),Object.assign(Object.assign({},i),r))};async function ce(t,e,r,n){var i;const a=Object.assign({},n==null?void 0:n.headers);a[ml]||(a[ml]=wp["2024-01-01"].name),n!=null&&n.jwt&&(a.Authorization=`Bearer ${n.jwt}`);const o=(i=n==null?void 0:n.query)!==null&&i!==void 0?i:{};n!=null&&n.redirectTo&&(o.redirect_to=n.redirectTo);const s=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",u=await vS(t,e,r+s,{headers:a,noResolveJson:n==null?void 0:n.noResolveJson},{},n==null?void 0:n.body);return n!=null&&n.xform?n==null?void 0:n.xform(u):{data:Object.assign({},u),error:null}}async function vS(t,e,r,n,i,a){const o=pS(e,n,i,a);let s;try{s=await t(r,Object.assign({},o))}catch(u){throw console.error(u),new bl(Qr(u),0)}if(s.ok||await $p(s),n!=null&&n.noResolveJson)return s;try{return await s.json()}catch(u){await $p(u)}}function qt(t){var e;let r=null;mS(t)&&(r=Object.assign({},t),t.expires_at||(r.expires_at=JO(t.expires_in)));const n=(e=t.user)!==null&&e!==void 0?e:t;return{data:{session:r,user:n},error:null}}function kp(t){const e=qt(t);return!e.error&&t.weak_password&&typeof t.weak_password=="object"&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.message&&typeof t.weak_password.message=="string"&&t.weak_password.reasons.reduce((r,n)=>r&&typeof n=="string",!0)&&(e.data.weak_password=t.weak_password),e}function jr(t){var e;return{data:{user:(e=t.user)!==null&&e!==void 0?e:t},error:null}}function yS(t){return{data:t,error:null}}function gS(t){const{action_link:e,email_otp:r,hashed_token:n,redirect_to:i,verification_type:a}=t,o=$n(t,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),s={action_link:e,email_otp:r,hashed_token:n,redirect_to:i,verification_type:a},u=Object.assign({},o);return{data:{properties:s,user:u},error:null}}function Cp(t){return t}function mS(t){return t.access_token&&t.refresh_token&&t.expires_in}const Sl=["global","local","others"];class bS{constructor({url:e="",headers:r={},fetch:n}){this.url=e,this.headers=r,this.fetch=Tp(n),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)}}async signOut(e,r=Sl[0]){if(Sl.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Sl.join(", ")}`);try{return await ce(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(n){if(ie(n))return{data:null,error:n};throw n}}async inviteUserByEmail(e,r={}){try{return await ce(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:jr})}catch(n){if(ie(n))return{data:{user:null},error:n};throw n}}async generateLink(e){try{const{options:r}=e,n=$n(e,["options"]),i=Object.assign(Object.assign({},n),r);return"newEmail"in n&&(i.new_email=n==null?void 0:n.newEmail,delete i.newEmail),await ce(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:i,headers:this.headers,xform:gS,redirectTo:r==null?void 0:r.redirectTo})}catch(r){if(ie(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(e){try{return await ce(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:jr})}catch(r){if(ie(r))return{data:{user:null},error:r};throw r}}async listUsers(e){var r,n,i,a,o,s,u;try{const l={nextPage:null,lastPage:0,total:0},c=await ce(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=e==null?void 0:e.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(a=(i=e==null?void 0:e.perPage)===null||i===void 0?void 0:i.toString())!==null&&a!==void 0?a:""},xform:Cp});if(c.error)throw c.error;const f=await c.json(),d=(o=c.headers.get("x-total-count"))!==null&&o!==void 0?o:0,h=(u=(s=c.headers.get("link"))===null||s===void 0?void 0:s.split(","))!==null&&u!==void 0?u:[];return h.length>0&&(h.forEach(y=>{const v=parseInt(y.split(";")[0].split("=")[1].substring(0,1)),p=JSON.parse(y.split(";")[1].split("=")[1]);l[`${p}Page`]=v}),l.total=parseInt(d)),{data:Object.assign(Object.assign({},f),l),error:null}}catch(l){if(ie(l))return{data:{users:[]},error:l};throw l}}async getUserById(e){Un(e);try{return await ce(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:jr})}catch(r){if(ie(r))return{data:{user:null},error:r};throw r}}async updateUserById(e,r){Un(e);try{return await ce(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:r,headers:this.headers,xform:jr})}catch(n){if(ie(n))return{data:{user:null},error:n};throw n}}async deleteUser(e,r=!1){Un(e);try{return await ce(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:r},xform:jr})}catch(n){if(ie(n))return{data:{user:null},error:n};throw n}}async _listFactors(e){Un(e.userId);try{const{data:r,error:n}=await ce(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:i=>({data:{factors:i},error:null})});return{data:r,error:n}}catch(r){if(ie(r))return{data:null,error:r};throw r}}async _deleteFactor(e){Un(e.userId),Un(e.id);try{return{data:await ce(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(r){if(ie(r))return{data:null,error:r};throw r}}async _listOAuthClients(e){var r,n,i,a,o,s,u;try{const l={nextPage:null,lastPage:0,total:0},c=await ce(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=e==null?void 0:e.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(a=(i=e==null?void 0:e.perPage)===null||i===void 0?void 0:i.toString())!==null&&a!==void 0?a:""},xform:Cp});if(c.error)throw c.error;const f=await c.json(),d=(o=c.headers.get("x-total-count"))!==null&&o!==void 0?o:0,h=(u=(s=c.headers.get("link"))===null||s===void 0?void 0:s.split(","))!==null&&u!==void 0?u:[];return h.length>0&&(h.forEach(y=>{const v=parseInt(y.split(";")[0].split("=")[1].substring(0,1)),p=JSON.parse(y.split(";")[1].split("=")[1]);l[`${p}Page`]=v}),l.total=parseInt(d)),{data:Object.assign(Object.assign({},f),l),error:null}}catch(l){if(ie(l))return{data:{clients:[]},error:l};throw l}}async _createOAuthClient(e){try{return await ce(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:e,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(ie(r))return{data:null,error:r};throw r}}async _getOAuthClient(e){try{return await ce(this.fetch,"GET",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(ie(r))return{data:null,error:r};throw r}}async _updateOAuthClient(e,r){try{return await ce(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${e}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(ie(n))return{data:null,error:n};throw n}}async _deleteOAuthClient(e){try{return await ce(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(ie(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(e){try{return await ce(this.fetch,"POST",`${this.url}/admin/oauth/clients/${e}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(ie(r))return{data:null,error:r};throw r}}}function Ip(t={}){return{getItem:e=>t[e]||null,setItem:(e,r)=>{t[e]=r},removeItem:e=>{delete t[e]}}}const Fn={debug:!!(globalThis&&Ep()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class Np extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}class wS extends Np{}async function _S(t,e,r){Fn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",t,e);const n=new globalThis.AbortController;return e>0&&setTimeout(()=>{n.abort(),Fn.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",t)},e),await Promise.resolve().then(()=>globalThis.navigator.locks.request(t,e===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:n.signal},async i=>{if(i){Fn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",t,i.name);try{return await r()}finally{Fn.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",t,i.name)}}else{if(e===0)throw Fn.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",t),new wS(`Acquiring an exclusive Navigator LockManager lock "${t}" immediately failed`);if(Fn.debug)try{const a=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(a,null," "))}catch(a){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",a)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await r()}}))}function xS(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function Mp(t){if(!/^0x[a-fA-F0-9]{40}$/.test(t))throw new Error(`@supabase/auth-js: Address "${t}" is invalid.`);return t.toLowerCase()}function OS(t){return parseInt(t,16)}function SS(t){const e=new TextEncoder().encode(t);return"0x"+Array.from(e,n=>n.toString(16).padStart(2,"0")).join("")}function AS(t){var e;const{chainId:r,domain:n,expirationTime:i,issuedAt:a=new Date,nonce:o,notBefore:s,requestId:u,resources:l,scheme:c,uri:f,version:d}=t;{if(!Number.isInteger(r))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${r}`);if(!n)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(o&&o.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${o}`);if(!f)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(d!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${d}`);if(!((e=t.statement)===null||e===void 0)&&e.includes(`
|
|
54
|
-
`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${t.statement}`)}const h=
|
|
52
|
+
})`):new Error(`WebSocket not available: ${r}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:Fx}))}disconnect(e,r){if(!this.isDisconnecting())if(this._setConnectionState("disconnecting",!0),this.conn){const n=setTimeout(()=>{this._setConnectionState("disconnected")},100);this.conn.onclose=()=>{clearTimeout(n),this._setConnectionState("disconnected")},e?this.conn.close(e,r??""):this.conn.close(),this._teardownConnection()}else this._setConnectionState("disconnected")}getChannels(){return this.channels}async removeChannel(e){const r=await e.unsubscribe();return this.channels.length===0&&this.disconnect(),r}async removeAllChannels(){const e=await Promise.all(this.channels.map(r=>r.unsubscribe()));return this.channels=[],this.disconnect(),e}log(e,r,n){this.logger(e,r,n)}connectionState(){switch(this.conn&&this.conn.readyState){case ta.connecting:return Gr.Connecting;case ta.open:return Gr.Open;case ta.closing:return Gr.Closing;default:return Gr.Closed}}isConnected(){return this.connectionState()===Gr.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}channel(e,r={config:{}}){const n=`realtime:${e}`,i=this.getChannels().find(a=>a.topic===n);if(i)return i;{const a=new nl(`realtime:${e}`,r,this);return this.channels.push(a),a}}push(e){const{topic:r,event:n,payload:i,ref:a}=e,o=()=>{this.encode(e,s=>{var u;(u=this.conn)===null||u===void 0||u.send(s)})};this.log("push",`${r} ${n} (${a})`,i),this.isConnected()?o():this.sendBuffer.push(o)}async setAuth(e=null){this._authPromise=this._performAuth(e);try{await this._authPromise}finally{this._authPromise=null}}async sendHeartbeat(){var e;if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(r){this.log("error","error in heartbeat callback",r)}return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(r){this.log("error","error in heartbeat callback",r)}this._wasManualDisconnect=!1,(e=this.conn)===null||e===void 0||e.close(Wx,"heartbeat timeout"),setTimeout(()=>{var r;this.isConnected()||(r=this.reconnectTimer)===null||r===void 0||r.scheduleTimeout()},Ro.HEARTBEAT_TIMEOUT_FALLBACK);return}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(r){this.log("error","error in heartbeat callback",r)}this._setAuthSafely("heartbeat")}onHeartbeat(e){this.heartbeatCallback=e}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}_makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}_leaveOpenTopic(e){let r=this.channels.find(n=>n.topic===e&&(n._isJoined()||n._isJoining()));r&&(this.log("transport",`leaving duplicate topic "${e}"`),r.unsubscribe())}_remove(e){this.channels=this.channels.filter(r=>r.topic!==e.topic)}_onConnMessage(e){this.decode(e.data,r=>{if(r.topic==="phoenix"&&r.event==="phx_reply")try{this.heartbeatCallback(r.payload.status==="ok"?"ok":"error")}catch(l){this.log("error","error in heartbeat callback",l)}r.ref&&r.ref===this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null);const{topic:n,event:i,payload:a,ref:o}=r,s=o?`(${o})`:"",u=a.status||"";this.log("receive",`${u} ${n} ${i} ${s}`.trim(),a),this.channels.filter(l=>l._isMember(n)).forEach(l=>l._trigger(i,a,o)),this._triggerStateCallbacks("message",r)})}_clearTimer(e){var r;e==="heartbeat"&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):e==="reconnect"&&((r=this.reconnectTimer)===null||r===void 0||r.reset())}_clearAllTimers(){this._clearTimer("heartbeat"),this._clearTimer("reconnect")}_setupConnectionHandlers(){this.conn&&("binaryType"in this.conn&&(this.conn.binaryType="arraybuffer"),this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=e=>this._onConnError(e),this.conn.onmessage=e=>this._onConnMessage(e),this.conn.onclose=e=>this._onConnClose(e))}_teardownConnection(){this.conn&&(this.conn.onopen=null,this.conn.onerror=null,this.conn.onmessage=null,this.conn.onclose=null,this.conn=null),this._clearAllTimers(),this.channels.forEach(e=>e.teardown())}_onConnOpen(){this._setConnectionState("connected"),this.log("transport",`connected to ${this.endpointURL()}`),this.flushSendBuffer(),this._clearTimer("reconnect"),this.worker?this.workerRef||this._startWorkerHeartbeat():this._startHeartbeat(),this._triggerStateCallbacks("open")}_startHeartbeat(){this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),this.workerRef.onerror=r=>{this.log("worker","worker error",r.message),this.workerRef.terminate()},this.workerRef.onmessage=r=>{r.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_onConnClose(e){var r;this._setConnectionState("disconnected"),this.log("transport","close",e),this._triggerChanError(),this._clearTimer("heartbeat"),this._wasManualDisconnect||(r=this.reconnectTimer)===null||r===void 0||r.scheduleTimeout(),this._triggerStateCallbacks("close",e)}_onConnError(e){this._setConnectionState("disconnected"),this.log("transport",`${e}`),this._triggerChanError(),this._triggerStateCallbacks("error",e)}_triggerChanError(){this.channels.forEach(e=>e._trigger(Ut.error))}_appendParams(e,r){if(Object.keys(r).length===0)return e;const n=e.match(/\?/)?"&":"?",i=new URLSearchParams(r);return`${e}${n}${i}`}_workerObjectUrl(e){let r;if(e)r=e;else{const n=new Blob([Qx],{type:"application/javascript"});r=URL.createObjectURL(n)}return r}_setConnectionState(e,r=!1){this._connectionState=e,e==="connecting"?this._wasManualDisconnect=!1:e==="disconnecting"&&(this._wasManualDisconnect=r)}async _performAuth(e=null){let r;e?r=e:this.accessToken?r=await this.accessToken():r=this.accessTokenValue,this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEach(n=>{const i={access_token:r,version:Ux};r&&n.updateJoinPayload(i),n.joinedOnce&&n._isJoined()&&n._push(Ut.access_token,{access_token:r})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(e="general"){this.setAuth().catch(r=>{this.log("error",`error setting auth in ${e}`,r)})}_triggerStateCallbacks(e,r){try{this.stateChangeCallbacks[e].forEach(n=>{try{n(r)}catch(i){this.log("error",`error in ${e} callback`,i)}})}catch(n){this.log("error",`error triggering ${e} callbacks`,n)}}_setupReconnectionTimer(){this.reconnectTimer=new ap(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},Ro.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(e){var r,n,i,a,o,s,u,l,c;if(this.transport=(r=e==null?void 0:e.transport)!==null&&r!==void 0?r:null,this.timeout=(n=e==null?void 0:e.timeout)!==null&&n!==void 0?n:Qu,this.heartbeatIntervalMs=(i=e==null?void 0:e.heartbeatIntervalMs)!==null&&i!==void 0?i:Ro.HEARTBEAT_INTERVAL,this.worker=(a=e==null?void 0:e.worker)!==null&&a!==void 0?a:!1,this.accessToken=(o=e==null?void 0:e.accessToken)!==null&&o!==void 0?o:null,this.heartbeatCallback=(s=e==null?void 0:e.heartbeatCallback)!==null&&s!==void 0?s:il,e!=null&&e.params&&(this.params=e.params),e!=null&&e.logger&&(this.logger=e.logger),(e!=null&&e.logLevel||e!=null&&e.log_level)&&(this.logLevel=e.logLevel||e.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),this.reconnectAfterMs=(u=e==null?void 0:e.reconnectAfterMs)!==null&&u!==void 0?u:f=>Jx[f-1]||Zx,this.encode=(l=e==null?void 0:e.encode)!==null&&l!==void 0?l:(f,d)=>d(JSON.stringify(f)),this.decode=(c=e==null?void 0:e.decode)!==null&&c!==void 0?c:this.serializer.decode.bind(this.serializer),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=e==null?void 0:e.workerUrl}}}class al extends Error{constructor(e){super(e),this.__isStorageError=!0,this.name="StorageError"}}function Ue(t){return typeof t=="object"&&t!==null&&"__isStorageError"in t}class tO extends al{constructor(e,r,n){super(e),this.name="StorageApiError",this.status=r,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}}class ol extends al{constructor(e,r){super(e),this.name="StorageUnknownError",this.originalError=r}}const sl=t=>{let e;return t?e=t:typeof fetch>"u"?e=(...r)=>Promise.resolve().then(()=>Hr).then(({default:n})=>n(...r)):e=fetch,(...r)=>e(...r)},rO=()=>ee(void 0,void 0,void 0,function*(){return typeof Response>"u"?(yield Promise.resolve().then(()=>Hr)).Response:Response}),ul=t=>{if(Array.isArray(t))return t.map(r=>ul(r));if(typeof t=="function"||t!==Object(t))return t;const e={};return Object.entries(t).forEach(([r,n])=>{const i=r.replace(/([-_][a-z])/gi,a=>a.toUpperCase().replace(/[-_]/g,""));e[i]=ul(n)}),e},nO=t=>{if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},ll=t=>{var e;return t.msg||t.message||t.error_description||(typeof t.error=="string"?t.error:(e=t.error)===null||e===void 0?void 0:e.message)||JSON.stringify(t)},iO=(t,e,r)=>ee(void 0,void 0,void 0,function*(){const n=yield rO();t instanceof n&&!(r!=null&&r.noResolveJson)?t.json().then(i=>{const a=t.status||500,o=(i==null?void 0:i.statusCode)||a+"";e(new tO(ll(i),a,o))}).catch(i=>{e(new ol(ll(i),i))}):e(new ol(ll(t),t))}),aO=(t,e,r,n)=>{const i={method:t,headers:(e==null?void 0:e.headers)||{}};return t==="GET"||!n?i:(nO(n)?(i.headers=Object.assign({"Content-Type":"application/json"},e==null?void 0:e.headers),i.body=JSON.stringify(n)):i.body=n,e!=null&&e.duplex&&(i.duplex=e.duplex),Object.assign(Object.assign({},i),r))};function ia(t,e,r,n,i,a){return ee(this,void 0,void 0,function*(){return new Promise((o,s)=>{t(r,aO(e,n,i,a)).then(u=>{if(!u.ok)throw u;return n!=null&&n.noResolveJson?u:u.json()}).then(u=>o(u)).catch(u=>iO(u,s,n))})})}function aa(t,e,r,n){return ee(this,void 0,void 0,function*(){return ia(t,"GET",e,r,n)})}function Ft(t,e,r,n,i){return ee(this,void 0,void 0,function*(){return ia(t,"POST",e,n,i,r)})}function cl(t,e,r,n,i){return ee(this,void 0,void 0,function*(){return ia(t,"PUT",e,n,i,r)})}function oO(t,e,r,n){return ee(this,void 0,void 0,function*(){return ia(t,"HEAD",e,Object.assign(Object.assign({},r),{noResolveJson:!0}),n)})}function fl(t,e,r,n,i){return ee(this,void 0,void 0,function*(){return ia(t,"DELETE",e,n,i,r)})}class sO{constructor(e,r){this.downloadFn=e,this.shouldThrowOnError=r}then(e,r){return this.execute().then(e,r)}execute(){return ee(this,void 0,void 0,function*(){try{return{data:(yield this.downloadFn()).body,error:null}}catch(e){if(this.shouldThrowOnError)throw e;if(Ue(e))return{data:null,error:e};throw e}})}}var fp;class uO{constructor(e,r){this.downloadFn=e,this.shouldThrowOnError=r,this[fp]="BlobDownloadBuilder",this.promise=null}asStream(){return new sO(this.downloadFn,this.shouldThrowOnError)}then(e,r){return this.getPromise().then(e,r)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}execute(){return ee(this,void 0,void 0,function*(){try{return{data:yield(yield this.downloadFn()).blob(),error:null}}catch(e){if(this.shouldThrowOnError)throw e;if(Ue(e))return{data:null,error:e};throw e}})}}fp=Symbol.toStringTag;const lO={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},dp={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class cO{constructor(e,r={},n,i){this.shouldThrowOnError=!1,this.url=e,this.headers=r,this.bucketId=n,this.fetch=sl(i)}throwOnError(){return this.shouldThrowOnError=!0,this}uploadOrUpdate(e,r,n,i){return ee(this,void 0,void 0,function*(){try{let a;const o=Object.assign(Object.assign({},dp),i);let s=Object.assign(Object.assign({},this.headers),e==="POST"&&{"x-upsert":String(o.upsert)});const u=o.metadata;typeof Blob<"u"&&n instanceof Blob?(a=new FormData,a.append("cacheControl",o.cacheControl),u&&a.append("metadata",this.encodeMetadata(u)),a.append("",n)):typeof FormData<"u"&&n instanceof FormData?(a=n,a.append("cacheControl",o.cacheControl),u&&a.append("metadata",this.encodeMetadata(u))):(a=n,s["cache-control"]=`max-age=${o.cacheControl}`,s["content-type"]=o.contentType,u&&(s["x-metadata"]=this.toBase64(this.encodeMetadata(u)))),i!=null&&i.headers&&(s=Object.assign(Object.assign({},s),i.headers));const l=this._removeEmptyFolders(r),c=this._getFinalPath(l),f=yield(e=="PUT"?cl:Ft)(this.fetch,`${this.url}/object/${c}`,a,Object.assign({headers:s},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{data:{path:l,id:f.Id,fullPath:f.Key},error:null}}catch(a){if(this.shouldThrowOnError)throw a;if(Ue(a))return{data:null,error:a};throw a}})}upload(e,r,n){return ee(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",e,r,n)})}uploadToSignedUrl(e,r,n,i){return ee(this,void 0,void 0,function*(){const a=this._removeEmptyFolders(e),o=this._getFinalPath(a),s=new URL(this.url+`/object/upload/sign/${o}`);s.searchParams.set("token",r);try{let u;const l=Object.assign({upsert:dp.upsert},i),c=Object.assign(Object.assign({},this.headers),{"x-upsert":String(l.upsert)});typeof Blob<"u"&&n instanceof Blob?(u=new FormData,u.append("cacheControl",l.cacheControl),u.append("",n)):typeof FormData<"u"&&n instanceof FormData?(u=n,u.append("cacheControl",l.cacheControl)):(u=n,c["cache-control"]=`max-age=${l.cacheControl}`,c["content-type"]=l.contentType);const f=yield cl(this.fetch,s.toString(),u,{headers:c});return{data:{path:a,fullPath:f.Key},error:null}}catch(u){if(this.shouldThrowOnError)throw u;if(Ue(u))return{data:null,error:u};throw u}})}createSignedUploadUrl(e,r){return ee(this,void 0,void 0,function*(){try{let n=this._getFinalPath(e);const i=Object.assign({},this.headers);r!=null&&r.upsert&&(i["x-upsert"]="true");const a=yield Ft(this.fetch,`${this.url}/object/upload/sign/${n}`,{},{headers:i}),o=new URL(this.url+a.url),s=o.searchParams.get("token");if(!s)throw new al("No token returned by API");return{data:{signedUrl:o.toString(),path:e,token:s},error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(Ue(n))return{data:null,error:n};throw n}})}update(e,r,n){return ee(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",e,r,n)})}move(e,r,n){return ee(this,void 0,void 0,function*(){try{return{data:yield Ft(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:e,destinationKey:r,destinationBucket:n==null?void 0:n.destinationBucket},{headers:this.headers}),error:null}}catch(i){if(this.shouldThrowOnError)throw i;if(Ue(i))return{data:null,error:i};throw i}})}copy(e,r,n){return ee(this,void 0,void 0,function*(){try{return{data:{path:(yield Ft(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:e,destinationKey:r,destinationBucket:n==null?void 0:n.destinationBucket},{headers:this.headers})).Key},error:null}}catch(i){if(this.shouldThrowOnError)throw i;if(Ue(i))return{data:null,error:i};throw i}})}createSignedUrl(e,r,n){return ee(this,void 0,void 0,function*(){try{let i=this._getFinalPath(e),a=yield Ft(this.fetch,`${this.url}/object/sign/${i}`,Object.assign({expiresIn:r},n!=null&&n.transform?{transform:n.transform}:{}),{headers:this.headers});const o=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"";return a={signedUrl:encodeURI(`${this.url}${a.signedURL}${o}`)},{data:a,error:null}}catch(i){if(this.shouldThrowOnError)throw i;if(Ue(i))return{data:null,error:i};throw i}})}createSignedUrls(e,r,n){return ee(this,void 0,void 0,function*(){try{const i=yield Ft(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:r,paths:e},{headers:this.headers}),a=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"";return{data:i.map(o=>Object.assign(Object.assign({},o),{signedUrl:o.signedURL?encodeURI(`${this.url}${o.signedURL}${a}`):null})),error:null}}catch(i){if(this.shouldThrowOnError)throw i;if(Ue(i))return{data:null,error:i};throw i}})}download(e,r){const i=typeof(r==null?void 0:r.transform)<"u"?"render/image/authenticated":"object",a=this.transformOptsToQueryString((r==null?void 0:r.transform)||{}),o=a?`?${a}`:"",s=this._getFinalPath(e),u=()=>aa(this.fetch,`${this.url}/${i}/${s}${o}`,{headers:this.headers,noResolveJson:!0});return new uO(u,this.shouldThrowOnError)}info(e){return ee(this,void 0,void 0,function*(){const r=this._getFinalPath(e);try{const n=yield aa(this.fetch,`${this.url}/object/info/${r}`,{headers:this.headers});return{data:ul(n),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(Ue(n))return{data:null,error:n};throw n}})}exists(e){return ee(this,void 0,void 0,function*(){const r=this._getFinalPath(e);try{return yield oO(this.fetch,`${this.url}/object/${r}`,{headers:this.headers}),{data:!0,error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(Ue(n)&&n instanceof ol){const i=n.originalError;if([400,404].includes(i==null?void 0:i.status))return{data:!1,error:n}}throw n}})}getPublicUrl(e,r){const n=this._getFinalPath(e),i=[],a=r!=null&&r.download?`download=${r.download===!0?"":r.download}`:"";a!==""&&i.push(a);const s=typeof(r==null?void 0:r.transform)<"u"?"render/image":"object",u=this.transformOptsToQueryString((r==null?void 0:r.transform)||{});u!==""&&i.push(u);let l=i.join("&");return l!==""&&(l=`?${l}`),{data:{publicUrl:encodeURI(`${this.url}/${s}/public/${n}${l}`)}}}remove(e){return ee(this,void 0,void 0,function*(){try{return{data:yield fl(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:e},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Ue(r))return{data:null,error:r};throw r}})}list(e,r,n){return ee(this,void 0,void 0,function*(){try{const i=Object.assign(Object.assign(Object.assign({},lO),r),{prefix:e||""});return{data:yield Ft(this.fetch,`${this.url}/object/list/${this.bucketId}`,i,{headers:this.headers},n),error:null}}catch(i){if(this.shouldThrowOnError)throw i;if(Ue(i))return{data:null,error:i};throw i}})}listV2(e,r){return ee(this,void 0,void 0,function*(){try{const n=Object.assign({},e);return{data:yield Ft(this.fetch,`${this.url}/object/list-v2/${this.bucketId}`,n,{headers:this.headers},r),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(Ue(n))return{data:null,error:n};throw n}})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){const r=[];return e.width&&r.push(`width=${e.width}`),e.height&&r.push(`height=${e.height}`),e.resize&&r.push(`resize=${e.resize}`),e.format&&r.push(`format=${e.format}`),e.quality&&r.push(`quality=${e.quality}`),r.join("&")}}const hp="2.78.0",pp={"X-Client-Info":`storage-js/${hp}`};class fO{constructor(e,r={},n,i){this.shouldThrowOnError=!1;const a=new URL(e);i!=null&&i.useNewHostname&&/supabase\.(co|in|red)$/.test(a.hostname)&&!a.hostname.includes("storage.supabase.")&&(a.hostname=a.hostname.replace("supabase.","storage.supabase.")),this.url=a.href.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},pp),r),this.fetch=sl(n)}throwOnError(){return this.shouldThrowOnError=!0,this}listBuckets(e){return ee(this,void 0,void 0,function*(){try{const r=this.listBucketOptionsToQueryString(e);return{data:yield aa(this.fetch,`${this.url}/bucket${r}`,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Ue(r))return{data:null,error:r};throw r}})}getBucket(e){return ee(this,void 0,void 0,function*(){try{return{data:yield aa(this.fetch,`${this.url}/bucket/${e}`,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Ue(r))return{data:null,error:r};throw r}})}createBucket(e){return ee(this,arguments,void 0,function*(r,n={public:!1}){try{return{data:yield Ft(this.fetch,`${this.url}/bucket`,{id:r,name:r,type:n.type,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:this.headers}),error:null}}catch(i){if(this.shouldThrowOnError)throw i;if(Ue(i))return{data:null,error:i};throw i}})}updateBucket(e,r){return ee(this,void 0,void 0,function*(){try{return{data:yield cl(this.fetch,`${this.url}/bucket/${e}`,{id:e,name:e,public:r.public,file_size_limit:r.fileSizeLimit,allowed_mime_types:r.allowedMimeTypes},{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(Ue(n))return{data:null,error:n};throw n}})}emptyBucket(e){return ee(this,void 0,void 0,function*(){try{return{data:yield Ft(this.fetch,`${this.url}/bucket/${e}/empty`,{},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Ue(r))return{data:null,error:r};throw r}})}deleteBucket(e){return ee(this,void 0,void 0,function*(){try{return{data:yield fl(this.fetch,`${this.url}/bucket/${e}`,{},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Ue(r))return{data:null,error:r};throw r}})}listBucketOptionsToQueryString(e){const r={};return e&&("limit"in e&&(r.limit=String(e.limit)),"offset"in e&&(r.offset=String(e.offset)),e.search&&(r.search=e.search),e.sortColumn&&(r.sortColumn=e.sortColumn),e.sortOrder&&(r.sortOrder=e.sortOrder)),Object.keys(r).length>0?"?"+new URLSearchParams(r).toString():""}}class dO{constructor(e,r={},n){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},pp),r),this.fetch=sl(n)}throwOnError(){return this.shouldThrowOnError=!0,this}createBucket(e){return ee(this,void 0,void 0,function*(){try{return{data:yield Ft(this.fetch,`${this.url}/bucket`,{name:e},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Ue(r))return{data:null,error:r};throw r}})}listBuckets(e){return ee(this,void 0,void 0,function*(){try{const r=new URLSearchParams;(e==null?void 0:e.limit)!==void 0&&r.set("limit",e.limit.toString()),(e==null?void 0:e.offset)!==void 0&&r.set("offset",e.offset.toString()),e!=null&&e.sortColumn&&r.set("sortColumn",e.sortColumn),e!=null&&e.sortOrder&&r.set("sortOrder",e.sortOrder),e!=null&&e.search&&r.set("search",e.search);const n=r.toString(),i=n?`${this.url}/bucket?${n}`:`${this.url}/bucket`;return{data:yield aa(this.fetch,i,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Ue(r))return{data:null,error:r};throw r}})}deleteBucket(e){return ee(this,void 0,void 0,function*(){try{return{data:yield fl(this.fetch,`${this.url}/bucket/${e}`,{},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Ue(r))return{data:null,error:r};throw r}})}}const dl={"X-Client-Info":`storage-js/${hp}`,"Content-Type":"application/json"};class vp extends Error{constructor(e){super(e),this.__isStorageVectorsError=!0,this.name="StorageVectorsError"}}function wt(t){return typeof t=="object"&&t!==null&&"__isStorageVectorsError"in t}class hl extends vp{constructor(e,r,n){super(e),this.name="StorageVectorsApiError",this.status=r,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}}class hO extends vp{constructor(e,r){super(e),this.name="StorageVectorsUnknownError",this.originalError=r}}var yp;(function(t){t.InternalError="InternalError",t.S3VectorConflictException="S3VectorConflictException",t.S3VectorNotFoundException="S3VectorNotFoundException",t.S3VectorBucketNotEmpty="S3VectorBucketNotEmpty",t.S3VectorMaxBucketsExceeded="S3VectorMaxBucketsExceeded",t.S3VectorMaxIndexesExceeded="S3VectorMaxIndexesExceeded"})(yp||(yp={}));const pl=t=>{let e;return t?e=t:typeof fetch>"u"?e=(...r)=>Promise.resolve().then(()=>Hr).then(({default:n})=>n(...r)):e=fetch,(...r)=>e(...r)},pO=t=>{if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},gp=t=>t.msg||t.message||t.error_description||t.error||JSON.stringify(t),vO=(t,e,r)=>ee(void 0,void 0,void 0,function*(){if(t&&typeof t=="object"&&"status"in t&&"ok"in t&&typeof t.status=="number"&&!(r!=null&&r.noResolveJson)){const i=t.status||500,a=t;if(typeof a.json=="function")a.json().then(o=>{const s=(o==null?void 0:o.statusCode)||(o==null?void 0:o.code)||i+"";e(new hl(gp(o),i,s))}).catch(()=>{const o=i+"",s=a.statusText||`HTTP ${i} error`;e(new hl(s,i,o))});else{const o=i+"",s=a.statusText||`HTTP ${i} error`;e(new hl(s,i,o))}}else e(new hO(gp(t),t))}),yO=(t,e,r,n)=>{const i={method:t,headers:(e==null?void 0:e.headers)||{}};return n?(pO(n)?(i.headers=Object.assign({"Content-Type":"application/json"},e==null?void 0:e.headers),i.body=JSON.stringify(n)):i.body=n,Object.assign(Object.assign({},i),r)):i};function gO(t,e,r,n,i,a){return ee(this,void 0,void 0,function*(){return new Promise((o,s)=>{t(r,yO(e,n,i,a)).then(u=>{if(!u.ok)throw u;if(n!=null&&n.noResolveJson)return u;const l=u.headers.get("content-type");return!l||!l.includes("application/json")?{}:u.json()}).then(u=>o(u)).catch(u=>vO(u,s,n))})})}function _t(t,e,r,n,i){return ee(this,void 0,void 0,function*(){return gO(t,"POST",e,n,i,r)})}class mO{constructor(e,r={},n){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},dl),r),this.fetch=pl(n)}throwOnError(){return this.shouldThrowOnError=!0,this}createIndex(e){return ee(this,void 0,void 0,function*(){try{return{data:(yield _t(this.fetch,`${this.url}/CreateIndex`,e,{headers:this.headers}))||{},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(wt(r))return{data:null,error:r};throw r}})}getIndex(e,r){return ee(this,void 0,void 0,function*(){try{return{data:yield _t(this.fetch,`${this.url}/GetIndex`,{vectorBucketName:e,indexName:r},{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(wt(n))return{data:null,error:n};throw n}})}listIndexes(e){return ee(this,void 0,void 0,function*(){try{return{data:yield _t(this.fetch,`${this.url}/ListIndexes`,e,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(wt(r))return{data:null,error:r};throw r}})}deleteIndex(e,r){return ee(this,void 0,void 0,function*(){try{return{data:(yield _t(this.fetch,`${this.url}/DeleteIndex`,{vectorBucketName:e,indexName:r},{headers:this.headers}))||{},error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(wt(n))return{data:null,error:n};throw n}})}}class bO{constructor(e,r={},n){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},dl),r),this.fetch=pl(n)}throwOnError(){return this.shouldThrowOnError=!0,this}putVectors(e){return ee(this,void 0,void 0,function*(){try{if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return{data:(yield _t(this.fetch,`${this.url}/PutVectors`,e,{headers:this.headers}))||{},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(wt(r))return{data:null,error:r};throw r}})}getVectors(e){return ee(this,void 0,void 0,function*(){try{return{data:yield _t(this.fetch,`${this.url}/GetVectors`,e,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(wt(r))return{data:null,error:r};throw r}})}listVectors(e){return ee(this,void 0,void 0,function*(){try{if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return{data:yield _t(this.fetch,`${this.url}/ListVectors`,e,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(wt(r))return{data:null,error:r};throw r}})}queryVectors(e){return ee(this,void 0,void 0,function*(){try{return{data:yield _t(this.fetch,`${this.url}/QueryVectors`,e,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(wt(r))return{data:null,error:r};throw r}})}deleteVectors(e){return ee(this,void 0,void 0,function*(){try{if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return{data:(yield _t(this.fetch,`${this.url}/DeleteVectors`,e,{headers:this.headers}))||{},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(wt(r))return{data:null,error:r};throw r}})}}class wO{constructor(e,r={},n){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},dl),r),this.fetch=pl(n)}throwOnError(){return this.shouldThrowOnError=!0,this}createBucket(e){return ee(this,void 0,void 0,function*(){try{return{data:(yield _t(this.fetch,`${this.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:this.headers}))||{},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(wt(r))return{data:null,error:r};throw r}})}getBucket(e){return ee(this,void 0,void 0,function*(){try{return{data:yield _t(this.fetch,`${this.url}/GetVectorBucket`,{vectorBucketName:e},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(wt(r))return{data:null,error:r};throw r}})}listBuckets(){return ee(this,arguments,void 0,function*(e={}){try{return{data:yield _t(this.fetch,`${this.url}/ListVectorBuckets`,e,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(wt(r))return{data:null,error:r};throw r}})}deleteBucket(e){return ee(this,void 0,void 0,function*(){try{return{data:(yield _t(this.fetch,`${this.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:this.headers}))||{},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(wt(r))return{data:null,error:r};throw r}})}}class _O extends wO{constructor(e,r={}){super(e,r.headers||{},r.fetch)}from(e){return new xO(this.url,this.headers,e,this.fetch)}}class xO extends mO{constructor(e,r,n,i){super(e,r,i),this.vectorBucketName=n}createIndex(e){const r=Object.create(null,{createIndex:{get:()=>super.createIndex}});return ee(this,void 0,void 0,function*(){return r.createIndex.call(this,Object.assign(Object.assign({},e),{vectorBucketName:this.vectorBucketName}))})}listIndexes(){const e=Object.create(null,{listIndexes:{get:()=>super.listIndexes}});return ee(this,arguments,void 0,function*(r={}){return e.listIndexes.call(this,Object.assign(Object.assign({},r),{vectorBucketName:this.vectorBucketName}))})}getIndex(e){const r=Object.create(null,{getIndex:{get:()=>super.getIndex}});return ee(this,void 0,void 0,function*(){return r.getIndex.call(this,this.vectorBucketName,e)})}deleteIndex(e){const r=Object.create(null,{deleteIndex:{get:()=>super.deleteIndex}});return ee(this,void 0,void 0,function*(){return r.deleteIndex.call(this,this.vectorBucketName,e)})}index(e){return new OO(this.url,this.headers,this.vectorBucketName,e,this.fetch)}}class OO extends bO{constructor(e,r,n,i,a){super(e,r,a),this.vectorBucketName=n,this.indexName=i}putVectors(e){const r=Object.create(null,{putVectors:{get:()=>super.putVectors}});return ee(this,void 0,void 0,function*(){return r.putVectors.call(this,Object.assign(Object.assign({},e),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}getVectors(e){const r=Object.create(null,{getVectors:{get:()=>super.getVectors}});return ee(this,void 0,void 0,function*(){return r.getVectors.call(this,Object.assign(Object.assign({},e),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}listVectors(){const e=Object.create(null,{listVectors:{get:()=>super.listVectors}});return ee(this,arguments,void 0,function*(r={}){return e.listVectors.call(this,Object.assign(Object.assign({},r),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}queryVectors(e){const r=Object.create(null,{queryVectors:{get:()=>super.queryVectors}});return ee(this,void 0,void 0,function*(){return r.queryVectors.call(this,Object.assign(Object.assign({},e),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}deleteVectors(e){const r=Object.create(null,{deleteVectors:{get:()=>super.deleteVectors}});return ee(this,void 0,void 0,function*(){return r.deleteVectors.call(this,Object.assign(Object.assign({},e),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}}class SO extends fO{constructor(e,r={},n,i){super(e,r,n,i)}from(e){return new cO(this.url,this.headers,e,this.fetch)}get vectors(){return new _O(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new dO(this.url+"/iceberg",this.headers,this.fetch)}}const AO="2.78.0";let oa="";typeof Deno<"u"?oa="deno":typeof document<"u"?oa="web":typeof navigator<"u"&&navigator.product==="ReactNative"?oa="react-native":oa="node";const PO={headers:{"X-Client-Info":`supabase-js-${oa}/${AO}`}},EO={schema:"public"},TO={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},jO={},$O=t=>{let e;return t?e=t:typeof fetch>"u"?e=Nh:e=fetch,(...r)=>e(...r)},kO=()=>typeof Headers>"u"?Mh:Headers,CO=(t,e,r)=>{const n=$O(r),i=kO();return async(a,o)=>{var s;const u=(s=await e())!==null&&s!==void 0?s:t;let l=new i(o==null?void 0:o.headers);return l.has("apikey")||l.set("apikey",t),l.has("Authorization")||l.set("Authorization",`Bearer ${u}`),n(a,Object.assign(Object.assign({},o),{headers:l}))}};function IO(t){return t.endsWith("/")?t:t+"/"}function NO(t,e){var r,n;const{db:i,auth:a,realtime:o,global:s}=t,{db:u,auth:l,realtime:c,global:f}=e,d={db:Object.assign(Object.assign({},u),i),auth:Object.assign(Object.assign({},l),a),realtime:Object.assign(Object.assign({},c),o),storage:{},global:Object.assign(Object.assign(Object.assign({},f),s),{headers:Object.assign(Object.assign({},(r=f==null?void 0:f.headers)!==null&&r!==void 0?r:{}),(n=s==null?void 0:s.headers)!==null&&n!==void 0?n:{})}),accessToken:async()=>""};return t.accessToken?d.accessToken=t.accessToken:delete d.accessToken,d}function MO(t){const e=t==null?void 0:t.trim();if(!e)throw new Error("supabaseUrl is required.");if(!e.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(IO(e))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}const mp="2.78.0",Mn=30*1e3,vl=3,yl=vl*Mn,DO="http://localhost:9999",RO="supabase.auth.token",LO={"X-Client-Info":`gotrue-js/${mp}`},gl="X-Supabase-Api-Version",bp={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},BO=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,UO=10*60*1e3;class sa extends Error{constructor(e,r,n){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=n}}function ie(t){return typeof t=="object"&&t!==null&&"__isAuthError"in t}class FO extends sa{constructor(e,r,n){super(e,r,n),this.name="AuthApiError",this.status=r,this.code=n}}function WO(t){return ie(t)&&t.name==="AuthApiError"}class Yr extends sa{constructor(e,r){super(e),this.name="AuthUnknownError",this.originalError=r}}class Pr extends sa{constructor(e,r,n,i){super(e,n,i),this.name=r,this.status=n}}class Wt extends Pr{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function qO(t){return ie(t)&&t.name==="AuthSessionMissingError"}class Dn extends Pr{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class Lo extends Pr{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class Bo extends Pr{constructor(e,r=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function zO(t){return ie(t)&&t.name==="AuthImplicitGrantRedirectError"}class wp extends Pr{constructor(e,r=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class ml extends Pr{constructor(e,r){super(e,"AuthRetryableFetchError",r,void 0)}}function bl(t){return ie(t)&&t.name==="AuthRetryableFetchError"}class _p extends Pr{constructor(e,r,n){super(e,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}}class wl extends Pr{constructor(e){super(e,"AuthInvalidJwtError",400,"invalid_jwt")}}const Uo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),xp=`
|
|
53
|
+
\r=`.split(""),KO=(()=>{const t=new Array(128);for(let e=0;e<t.length;e+=1)t[e]=-1;for(let e=0;e<xp.length;e+=1)t[xp[e].charCodeAt(0)]=-2;for(let e=0;e<Uo.length;e+=1)t[Uo[e].charCodeAt(0)]=e;return t})();function Op(t,e,r){if(t!==null)for(e.queue=e.queue<<8|t,e.queuedBits+=8;e.queuedBits>=6;){const n=e.queue>>e.queuedBits-6&63;r(Uo[n]),e.queuedBits-=6}else if(e.queuedBits>0)for(e.queue=e.queue<<6-e.queuedBits,e.queuedBits=6;e.queuedBits>=6;){const n=e.queue>>e.queuedBits-6&63;r(Uo[n]),e.queuedBits-=6}}function Sp(t,e,r){const n=KO[t];if(n>-1)for(e.queue=e.queue<<6|n,e.queuedBits+=6;e.queuedBits>=8;)r(e.queue>>e.queuedBits-8&255),e.queuedBits-=8;else{if(n===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(t)}"`)}}function Ap(t){const e=[],r=o=>{e.push(String.fromCodePoint(o))},n={utf8seq:0,codepoint:0},i={queue:0,queuedBits:0},a=o=>{GO(o,n,r)};for(let o=0;o<t.length;o+=1)Sp(t.charCodeAt(o),i,a);return e.join("")}function VO(t,e){if(t<=127){e(t);return}else if(t<=2047){e(192|t>>6),e(128|t&63);return}else if(t<=65535){e(224|t>>12),e(128|t>>6&63),e(128|t&63);return}else if(t<=1114111){e(240|t>>18),e(128|t>>12&63),e(128|t>>6&63),e(128|t&63);return}throw new Error(`Unrecognized Unicode codepoint: ${t.toString(16)}`)}function HO(t,e){for(let r=0;r<t.length;r+=1){let n=t.charCodeAt(r);if(n>55295&&n<=56319){const i=(n-55296)*1024&65535;n=(t.charCodeAt(r+1)-56320&65535|i)+65536,r+=1}VO(n,e)}}function GO(t,e,r){if(e.utf8seq===0){if(t<=127){r(t);return}for(let n=1;n<6;n+=1)if(!(t>>7-n&1)){e.utf8seq=n;break}if(e.utf8seq===2)e.codepoint=t&31;else if(e.utf8seq===3)e.codepoint=t&15;else if(e.utf8seq===4)e.codepoint=t&7;else throw new Error("Invalid UTF-8 sequence");e.utf8seq-=1}else if(e.utf8seq>0){if(t<=127)throw new Error("Invalid UTF-8 sequence");e.codepoint=e.codepoint<<6|t&63,e.utf8seq-=1,e.utf8seq===0&&r(e.codepoint)}}function Rn(t){const e=[],r={queue:0,queuedBits:0},n=i=>{e.push(i)};for(let i=0;i<t.length;i+=1)Sp(t.charCodeAt(i),r,n);return new Uint8Array(e)}function YO(t){const e=[];return HO(t,r=>e.push(r)),new Uint8Array(e)}function Xr(t){const e=[],r={queue:0,queuedBits:0},n=i=>{e.push(i)};return t.forEach(i=>Op(i,r,n)),Op(null,r,n),e.join("")}function XO(t){return Math.round(Date.now()/1e3)+t}function JO(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const e=Math.random()*16|0;return(t=="x"?e:e&3|8).toString(16)})}const lt=()=>typeof window<"u"&&typeof document<"u",Jr={tested:!1,writable:!1},Pp=()=>{if(!lt())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Jr.tested)return Jr.writable;const t=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(t,t),globalThis.localStorage.removeItem(t),Jr.tested=!0,Jr.writable=!0}catch{Jr.tested=!0,Jr.writable=!1}return Jr.writable};function ZO(t){const e={},r=new URL(t);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEach((i,a)=>{e[a]=i})}catch{}return r.searchParams.forEach((n,i)=>{e[i]=n}),e}const Ep=t=>{let e;return t?e=t:typeof fetch>"u"?e=(...r)=>Promise.resolve().then(()=>Hr).then(({default:n})=>n(...r)):e=fetch,(...r)=>e(...r)},QO=t=>typeof t=="object"&&t!==null&&"status"in t&&"ok"in t&&"json"in t&&typeof t.json=="function",Ln=async(t,e,r)=>{await t.setItem(e,JSON.stringify(r))},Zr=async(t,e)=>{const r=await t.getItem(e);if(!r)return null;try{return JSON.parse(r)}catch{return r}},Er=async(t,e)=>{await t.removeItem(e)};class Fo{constructor(){this.promise=new Fo.promiseConstructor((e,r)=>{this.resolve=e,this.reject=r})}}Fo.promiseConstructor=Promise;function _l(t){const e=t.split(".");if(e.length!==3)throw new wl("Invalid JWT structure");for(let n=0;n<e.length;n++)if(!BO.test(e[n]))throw new wl("JWT not in base64url format");return{header:JSON.parse(Ap(e[0])),payload:JSON.parse(Ap(e[1])),signature:Rn(e[2]),raw:{header:e[0],payload:e[1]}}}async function eS(t){return await new Promise(e=>{setTimeout(()=>e(null),t)})}function tS(t,e){return new Promise((n,i)=>{(async()=>{for(let a=0;a<1/0;a++)try{const o=await t(a);if(!e(a,null,o)){n(o);return}}catch(o){if(!e(a,o)){i(o);return}}})()})}function rS(t){return("0"+t.toString(16)).substr(-2)}function nS(){const e=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",n=r.length;let i="";for(let a=0;a<56;a++)i+=r.charAt(Math.floor(Math.random()*n));return i}return crypto.getRandomValues(e),Array.from(e,rS).join("")}async function iS(t){const r=new TextEncoder().encode(t),n=await crypto.subtle.digest("SHA-256",r),i=new Uint8Array(n);return Array.from(i).map(a=>String.fromCharCode(a)).join("")}async function aS(t){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),t;const r=await iS(t);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Bn(t,e,r=!1){const n=nS();let i=n;r&&(i+="/PASSWORD_RECOVERY"),await Ln(t,`${e}-code-verifier`,i);const a=await aS(n);return[a,n===a?"plain":"s256"]}const oS=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function sS(t){const e=t.headers.get(gl);if(!e||!e.match(oS))return null;try{return new Date(`${e}T00:00:00.0Z`)}catch{return null}}function uS(t){if(!t)throw new Error("Missing exp claim");const e=Math.floor(Date.now()/1e3);if(t<=e)throw new Error("JWT has expired")}function lS(t){switch(t){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const cS=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Un(t){if(!cS.test(t))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function xl(){const t={};return new Proxy(t,{get:(e,r)=>{if(r==="__isUserNotAvailableProxy")return!0;if(typeof r=="symbol"){const n=r.toString();if(n==="Symbol(Symbol.toPrimitive)"||n==="Symbol(Symbol.toStringTag)"||n==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${r}" property of the session object is not supported. Please use getUser() instead.`)},set:(e,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(e,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function fS(t,e){return new Proxy(t,{get:(r,n,i)=>{if(n==="__isInsecureUserWarningProxy")return!0;if(typeof n=="symbol"){const a=n.toString();if(a==="Symbol(Symbol.toPrimitive)"||a==="Symbol(Symbol.toStringTag)"||a==="Symbol(util.inspect.custom)"||a==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(r,n,i)}return!e.value&&typeof n=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),e.value=!0),Reflect.get(r,n,i)}})}function Tp(t){return JSON.parse(JSON.stringify(t))}const Qr=t=>t.msg||t.message||t.error_description||t.error||JSON.stringify(t),dS=[502,503,504];async function jp(t){var e;if(!QO(t))throw new ml(Qr(t),0);if(dS.includes(t.status))throw new ml(Qr(t),t.status);let r;try{r=await t.json()}catch(a){throw new Yr(Qr(a),a)}let n;const i=sS(t);if(i&&i.getTime()>=bp["2024-01-01"].timestamp&&typeof r=="object"&&r&&typeof r.code=="string"?n=r.code:typeof r=="object"&&r&&typeof r.error_code=="string"&&(n=r.error_code),n){if(n==="weak_password")throw new _p(Qr(r),t.status,((e=r.weak_password)===null||e===void 0?void 0:e.reasons)||[]);if(n==="session_not_found")throw new Wt}else if(typeof r=="object"&&r&&typeof r.weak_password=="object"&&r.weak_password&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.reasons.reduce((a,o)=>a&&typeof o=="string",!0))throw new _p(Qr(r),t.status,r.weak_password.reasons);throw new FO(Qr(r),t.status||500,n)}const hS=(t,e,r,n)=>{const i={method:t,headers:(e==null?void 0:e.headers)||{}};return t==="GET"?i:(i.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},e==null?void 0:e.headers),i.body=JSON.stringify(n),Object.assign(Object.assign({},i),r))};async function ce(t,e,r,n){var i;const a=Object.assign({},n==null?void 0:n.headers);a[gl]||(a[gl]=bp["2024-01-01"].name),n!=null&&n.jwt&&(a.Authorization=`Bearer ${n.jwt}`);const o=(i=n==null?void 0:n.query)!==null&&i!==void 0?i:{};n!=null&&n.redirectTo&&(o.redirect_to=n.redirectTo);const s=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",u=await pS(t,e,r+s,{headers:a,noResolveJson:n==null?void 0:n.noResolveJson},{},n==null?void 0:n.body);return n!=null&&n.xform?n==null?void 0:n.xform(u):{data:Object.assign({},u),error:null}}async function pS(t,e,r,n,i,a){const o=hS(e,n,i,a);let s;try{s=await t(r,Object.assign({},o))}catch(u){throw console.error(u),new ml(Qr(u),0)}if(s.ok||await jp(s),n!=null&&n.noResolveJson)return s;try{return await s.json()}catch(u){await jp(u)}}function qt(t){var e;let r=null;gS(t)&&(r=Object.assign({},t),t.expires_at||(r.expires_at=XO(t.expires_in)));const n=(e=t.user)!==null&&e!==void 0?e:t;return{data:{session:r,user:n},error:null}}function $p(t){const e=qt(t);return!e.error&&t.weak_password&&typeof t.weak_password=="object"&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.message&&typeof t.weak_password.message=="string"&&t.weak_password.reasons.reduce((r,n)=>r&&typeof n=="string",!0)&&(e.data.weak_password=t.weak_password),e}function Tr(t){var e;return{data:{user:(e=t.user)!==null&&e!==void 0?e:t},error:null}}function vS(t){return{data:t,error:null}}function yS(t){const{action_link:e,email_otp:r,hashed_token:n,redirect_to:i,verification_type:a}=t,o=$n(t,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),s={action_link:e,email_otp:r,hashed_token:n,redirect_to:i,verification_type:a},u=Object.assign({},o);return{data:{properties:s,user:u},error:null}}function kp(t){return t}function gS(t){return t.access_token&&t.refresh_token&&t.expires_in}const Ol=["global","local","others"];class mS{constructor({url:e="",headers:r={},fetch:n}){this.url=e,this.headers=r,this.fetch=Ep(n),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)}}async signOut(e,r=Ol[0]){if(Ol.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Ol.join(", ")}`);try{return await ce(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(n){if(ie(n))return{data:null,error:n};throw n}}async inviteUserByEmail(e,r={}){try{return await ce(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:Tr})}catch(n){if(ie(n))return{data:{user:null},error:n};throw n}}async generateLink(e){try{const{options:r}=e,n=$n(e,["options"]),i=Object.assign(Object.assign({},n),r);return"newEmail"in n&&(i.new_email=n==null?void 0:n.newEmail,delete i.newEmail),await ce(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:i,headers:this.headers,xform:yS,redirectTo:r==null?void 0:r.redirectTo})}catch(r){if(ie(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(e){try{return await ce(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:Tr})}catch(r){if(ie(r))return{data:{user:null},error:r};throw r}}async listUsers(e){var r,n,i,a,o,s,u;try{const l={nextPage:null,lastPage:0,total:0},c=await ce(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=e==null?void 0:e.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(a=(i=e==null?void 0:e.perPage)===null||i===void 0?void 0:i.toString())!==null&&a!==void 0?a:""},xform:kp});if(c.error)throw c.error;const f=await c.json(),d=(o=c.headers.get("x-total-count"))!==null&&o!==void 0?o:0,h=(u=(s=c.headers.get("link"))===null||s===void 0?void 0:s.split(","))!==null&&u!==void 0?u:[];return h.length>0&&(h.forEach(y=>{const v=parseInt(y.split(";")[0].split("=")[1].substring(0,1)),p=JSON.parse(y.split(";")[1].split("=")[1]);l[`${p}Page`]=v}),l.total=parseInt(d)),{data:Object.assign(Object.assign({},f),l),error:null}}catch(l){if(ie(l))return{data:{users:[]},error:l};throw l}}async getUserById(e){Un(e);try{return await ce(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:Tr})}catch(r){if(ie(r))return{data:{user:null},error:r};throw r}}async updateUserById(e,r){Un(e);try{return await ce(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:r,headers:this.headers,xform:Tr})}catch(n){if(ie(n))return{data:{user:null},error:n};throw n}}async deleteUser(e,r=!1){Un(e);try{return await ce(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:r},xform:Tr})}catch(n){if(ie(n))return{data:{user:null},error:n};throw n}}async _listFactors(e){Un(e.userId);try{const{data:r,error:n}=await ce(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:i=>({data:{factors:i},error:null})});return{data:r,error:n}}catch(r){if(ie(r))return{data:null,error:r};throw r}}async _deleteFactor(e){Un(e.userId),Un(e.id);try{return{data:await ce(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(r){if(ie(r))return{data:null,error:r};throw r}}async _listOAuthClients(e){var r,n,i,a,o,s,u;try{const l={nextPage:null,lastPage:0,total:0},c=await ce(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=e==null?void 0:e.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(a=(i=e==null?void 0:e.perPage)===null||i===void 0?void 0:i.toString())!==null&&a!==void 0?a:""},xform:kp});if(c.error)throw c.error;const f=await c.json(),d=(o=c.headers.get("x-total-count"))!==null&&o!==void 0?o:0,h=(u=(s=c.headers.get("link"))===null||s===void 0?void 0:s.split(","))!==null&&u!==void 0?u:[];return h.length>0&&(h.forEach(y=>{const v=parseInt(y.split(";")[0].split("=")[1].substring(0,1)),p=JSON.parse(y.split(";")[1].split("=")[1]);l[`${p}Page`]=v}),l.total=parseInt(d)),{data:Object.assign(Object.assign({},f),l),error:null}}catch(l){if(ie(l))return{data:{clients:[]},error:l};throw l}}async _createOAuthClient(e){try{return await ce(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:e,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(ie(r))return{data:null,error:r};throw r}}async _getOAuthClient(e){try{return await ce(this.fetch,"GET",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(ie(r))return{data:null,error:r};throw r}}async _updateOAuthClient(e,r){try{return await ce(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${e}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(ie(n))return{data:null,error:n};throw n}}async _deleteOAuthClient(e){try{return await ce(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(ie(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(e){try{return await ce(this.fetch,"POST",`${this.url}/admin/oauth/clients/${e}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(ie(r))return{data:null,error:r};throw r}}}function Cp(t={}){return{getItem:e=>t[e]||null,setItem:(e,r)=>{t[e]=r},removeItem:e=>{delete t[e]}}}const Fn={debug:!!(globalThis&&Pp()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class Ip extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}class bS extends Ip{}async function wS(t,e,r){Fn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",t,e);const n=new globalThis.AbortController;return e>0&&setTimeout(()=>{n.abort(),Fn.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",t)},e),await Promise.resolve().then(()=>globalThis.navigator.locks.request(t,e===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:n.signal},async i=>{if(i){Fn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",t,i.name);try{return await r()}finally{Fn.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",t,i.name)}}else{if(e===0)throw Fn.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",t),new bS(`Acquiring an exclusive Navigator LockManager lock "${t}" immediately failed`);if(Fn.debug)try{const a=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(a,null," "))}catch(a){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",a)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await r()}}))}function _S(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function Np(t){if(!/^0x[a-fA-F0-9]{40}$/.test(t))throw new Error(`@supabase/auth-js: Address "${t}" is invalid.`);return t.toLowerCase()}function xS(t){return parseInt(t,16)}function OS(t){const e=new TextEncoder().encode(t);return"0x"+Array.from(e,n=>n.toString(16).padStart(2,"0")).join("")}function SS(t){var e;const{chainId:r,domain:n,expirationTime:i,issuedAt:a=new Date,nonce:o,notBefore:s,requestId:u,resources:l,scheme:c,uri:f,version:d}=t;{if(!Number.isInteger(r))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${r}`);if(!n)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(o&&o.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${o}`);if(!f)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(d!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${d}`);if(!((e=t.statement)===null||e===void 0)&&e.includes(`
|
|
54
|
+
`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${t.statement}`)}const h=Np(t.address),y=c?`${c}://${n}`:n,v=t.statement?`${t.statement}
|
|
55
55
|
`:"",p=`${y} wants you to sign in with your Ethereum account:
|
|
56
56
|
${h}
|
|
57
57
|
|
|
@@ -65,8 +65,8 @@ Not Before: ${s.toISOString()}`),u&&(m+=`
|
|
|
65
65
|
Request ID: ${u}`),l){let b=`
|
|
66
66
|
Resources:`;for(const w of l){if(!w||typeof w!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${w}`);b+=`
|
|
67
67
|
- ${w}`}m+=b}return`${p}
|
|
68
|
-
${m}`}class Ke extends Error{constructor({message:e,code:r,cause:n,name:i}){var a;super(e,{cause:n}),this.__isWebAuthnError=!0,this.name=(a=i??(n instanceof Error?n.name:void 0))!==null&&a!==void 0?a:"Unknown Error",this.code=r}}class qo extends Ke{constructor(e,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:e}),this.name="WebAuthnUnknownError",this.originalError=r}}function PS({error:t,options:e}){var r,n,i;const{publicKey:a}=e;if(!a)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new Ke({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else if(t.name==="ConstraintError"){if(((r=a.authenticatorSelection)===null||r===void 0?void 0:r.requireResidentKey)===!0)return new Ke({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:t});if(e.mediation==="conditional"&&((n=a.authenticatorSelection)===null||n===void 0?void 0:n.userVerification)==="required")return new Ke({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:t});if(((i=a.authenticatorSelection)===null||i===void 0?void 0:i.userVerification)==="required")return new Ke({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:t})}else{if(t.name==="InvalidStateError")return new Ke({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:t});if(t.name==="NotAllowedError")return new Ke({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="NotSupportedError")return a.pubKeyCredParams.filter(s=>s.type==="public-key").length===0?new Ke({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:t}):new Ke({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:t});if(t.name==="SecurityError"){const o=window.location.hostname;if(Dp(o)){if(a.rp.id!==o)return new Ke({message:`The RP ID "${a.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new Ke({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="TypeError"){if(a.user.id.byteLength<1||a.user.id.byteLength>64)return new Ke({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:t})}else if(t.name==="UnknownError")return new Ke({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new Ke({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}function ES({error:t,options:e}){const{publicKey:r}=e;if(!r)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new Ke({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else{if(t.name==="NotAllowedError")return new Ke({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="SecurityError"){const n=window.location.hostname;if(Dp(n)){if(r.rpId!==n)return new Ke({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new Ke({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="UnknownError")return new Ke({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new Ke({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}class TS{createNewAbortSignal(){if(this.controller){const r=new Error("Cancelling existing WebAuthn API call for new one");r.name="AbortError",this.controller.abort(r)}const e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){const e=new Error("Manually cancelling existing WebAuthn API call");e.name="AbortError",this.controller.abort(e),this.controller=void 0}}}const jS=new TS;function $S(t){if(!t)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(t);const{challenge:e,user:r,excludeCredentials:n}=t,i=$n(t,["challenge","user","excludeCredentials"]),a=Rn(e).buffer,o=Object.assign(Object.assign({},r),{id:Rn(r.id).buffer}),s=Object.assign(Object.assign({},i),{challenge:a,user:o});if(n&&n.length>0){s.excludeCredentials=new Array(n.length);for(let u=0;u<n.length;u++){const l=n[u];s.excludeCredentials[u]=Object.assign(Object.assign({},l),{id:Rn(l.id).buffer,type:l.type||"public-key",transports:l.transports})}}return s}function kS(t){if(!t)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(t);const{challenge:e,allowCredentials:r}=t,n=$n(t,["challenge","allowCredentials"]),i=Rn(e).buffer,a=Object.assign(Object.assign({},n),{challenge:i});if(r&&r.length>0){a.allowCredentials=new Array(r.length);for(let o=0;o<r.length;o++){const s=r[o];a.allowCredentials[o]=Object.assign(Object.assign({},s),{id:Rn(s.id).buffer,type:s.type||"public-key",transports:s.transports})}}return a}function CS(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const r=t;return{id:t.id,rawId:t.id,response:{attestationObject:Xr(new Uint8Array(t.response.attestationObject)),clientDataJSON:Xr(new Uint8Array(t.response.clientDataJSON))},type:"public-key",clientExtensionResults:t.getClientExtensionResults(),authenticatorAttachment:(e=r.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function IS(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const r=t,n=t.getClientExtensionResults(),i=t.response;return{id:t.id,rawId:t.id,response:{authenticatorData:Xr(new Uint8Array(i.authenticatorData)),clientDataJSON:Xr(new Uint8Array(i.clientDataJSON)),signature:Xr(new Uint8Array(i.signature)),userHandle:i.userHandle?Xr(new Uint8Array(i.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:(e=r.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function Dp(t){return t==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(t)}function Rp(){var t,e;return!!(lt()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.create)=="function"&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.get)=="function")}async function NS(t){try{const e=await navigator.credentials.create(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new qo("Browser returned unexpected credential type",e)}:{data:null,error:new qo("Empty credential response",e)}}catch(e){return{data:null,error:PS({error:e,options:t})}}}async function MS(t){try{const e=await navigator.credentials.get(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new qo("Browser returned unexpected credential type",e)}:{data:null,error:new qo("Empty credential response",e)}}catch(e){return{data:null,error:ES({error:e,options:t})}}}const DS={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"none"},RS={userVerification:"preferred",hints:["security-key"]};function zo(...t){const e=i=>i!==null&&typeof i=="object"&&!Array.isArray(i),r=i=>i instanceof ArrayBuffer||ArrayBuffer.isView(i),n={};for(const i of t)if(i)for(const a in i){const o=i[a];if(o!==void 0)if(Array.isArray(o))n[a]=o;else if(r(o))n[a]=o;else if(e(o)){const s=n[a];e(s)?n[a]=zo(s,o):n[a]=zo(o)}else n[a]=o}return n}function LS(t,e){return zo(DS,t,e||{})}function BS(t,e){return zo(RS,t,e||{})}class US{constructor(e){this.client=e,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(e){return this.client.mfa.enroll(Object.assign(Object.assign({},e),{factorType:"webauthn"}))}async _challenge({factorId:e,webauthn:r,friendlyName:n,signal:i},a){try{const{data:o,error:s}=await this.client.mfa.challenge({factorId:e,webauthn:r});if(!o)return{data:null,error:s};const u=i??jS.createNewAbortSignal();if(o.webauthn.type==="create"){const{user:l}=o.webauthn.credential_options.publicKey;l.name||(l.name=`${l.id}:${n}`),l.displayName||(l.displayName=l.name)}switch(o.webauthn.type){case"create":{const l=LS(o.webauthn.credential_options.publicKey,a==null?void 0:a.create),{data:c,error:f}=await NS({publicKey:l,signal:u});return c?{data:{factorId:e,challengeId:o.id,webauthn:{type:o.webauthn.type,credential_response:c}},error:null}:{data:null,error:f}}case"request":{const l=BS(o.webauthn.credential_options.publicKey,a==null?void 0:a.request),{data:c,error:f}=await MS(Object.assign(Object.assign({},o.webauthn.credential_options),{publicKey:l,signal:u}));return c?{data:{factorId:e,challengeId:o.id,webauthn:{type:o.webauthn.type,credential_response:c}},error:null}:{data:null,error:f}}}}catch(o){return ie(o)?{data:null,error:o}:{data:null,error:new Yr("Unexpected error in challenge",o)}}}async _verify({challengeId:e,factorId:r,webauthn:n}){return this.client.mfa.verify({factorId:r,challengeId:e,webauthn:n})}async _authenticate({factorId:e,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:i}},a){if(!r)return{data:null,error:new sa("rpId is required for WebAuthn authentication")};try{if(!Rp())return{data:null,error:new Yr("Browser does not support WebAuthn",null)};const{data:o,error:s}=await this.challenge({factorId:e,webauthn:{rpId:r,rpOrigins:n},signal:i},{request:a});if(!o)return{data:null,error:s};const{webauthn:u}=o;return this._verify({factorId:e,challengeId:o.challengeId,webauthn:{type:u.type,rpId:r,rpOrigins:n,credential_response:u.credential_response}})}catch(o){return ie(o)?{data:null,error:o}:{data:null,error:new Yr("Unexpected error in authenticate",o)}}}async _register({friendlyName:e,rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:i},a){if(!r)return{data:null,error:new sa("rpId is required for WebAuthn registration")};try{if(!Rp())return{data:null,error:new Yr("Browser does not support WebAuthn",null)};const{data:o,error:s}=await this._enroll({friendlyName:e});if(!o)return await this.client.mfa.listFactors().then(c=>{var f;return(f=c.data)===null||f===void 0?void 0:f.all.find(d=>d.factor_type==="webauthn"&&d.friendly_name===e&&d.status!=="unverified")}).then(c=>c?this.client.mfa.unenroll({factorId:c==null?void 0:c.id}):void 0),{data:null,error:s};const{data:u,error:l}=await this._challenge({factorId:o.id,friendlyName:o.friendly_name,webauthn:{rpId:r,rpOrigins:n},signal:i},{create:a});return u?this._verify({factorId:o.id,challengeId:u.challengeId,webauthn:{rpId:r,rpOrigins:n,type:u.webauthn.type,credential_response:u.webauthn.credential_response}}):{data:null,error:l}}catch(o){return ie(o)?{data:null,error:o}:{data:null,error:new Yr("Unexpected error in register",o)}}}}xS();const FS={url:RO,storageKey:LO,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:BO,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1};async function Lp(t,e,r){return await r()}const Wn={};class ua{get jwks(){var e,r;return(r=(e=Wn[this.storageKey])===null||e===void 0?void 0:e.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(e){Wn[this.storageKey]=Object.assign(Object.assign({},Wn[this.storageKey]),{jwks:e})}get jwks_cached_at(){var e,r;return(r=(e=Wn[this.storageKey])===null||e===void 0?void 0:e.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(e){Wn[this.storageKey]=Object.assign(Object.assign({},Wn[this.storageKey]),{cachedAt:e})}constructor(e){var r,n;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log,this.instanceID=ua.nextInstanceID,ua.nextInstanceID+=1,this.instanceID>0&<()&&console.warn("Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.");const i=Object.assign(Object.assign({},FS),e);if(this.logDebugMessages=!!i.debug,typeof i.debug=="function"&&(this.logger=i.debug),this.persistSession=i.persistSession,this.storageKey=i.storageKey,this.autoRefreshToken=i.autoRefreshToken,this.admin=new bS({url:i.url,headers:i.headers,fetch:i.fetch}),this.url=i.url,this.headers=i.headers,this.fetch=Tp(i.fetch),this.lock=i.lock||Lp,this.detectSessionInUrl=i.detectSessionInUrl,this.flowType=i.flowType,this.hasCustomAuthorizationHeader=i.hasCustomAuthorizationHeader,i.lock?this.lock=i.lock:lt()&&(!((r=globalThis==null?void 0:globalThis.navigator)===null||r===void 0)&&r.locks)?this.lock=_S:this.lock=Lp,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new US(this)},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this)},this.persistSession?(i.storage?this.storage=i.storage:Ep()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Ip(this.memoryStorage)),i.userStorage&&(this.userStorage=i.userStorage)):(this.memoryStorage={},this.storage=Ip(this.memoryStorage)),lt()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(a){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",a)}(n=this.broadcastChannel)===null||n===void 0||n.addEventListener("message",async a=>{this._debug("received broadcast notification from other tab or client",a),await this._notifyAllSubscribers(a.data.event,a.data.session,!1)})}this.initialize()}_debug(...e){return this.logDebugMessages&&this.logger(`GoTrueClient@${this.instanceID} (${bp}) ${new Date().toISOString()}`,...e),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(-1,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var e;try{const r=QO(window.location.href);let n="none";if(this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce"),lt()&&this.detectSessionInUrl&&n!=="none"){const{data:i,error:a}=await this._getSessionFromURL(r,n);if(a){if(this._debug("#_initialize()","error detecting session from URL",a),KO(a)){const u=(e=a.details)===null||e===void 0?void 0:e.code;if(u==="identity_already_exists"||u==="identity_not_found"||u==="single_identity_not_deletable")return{error:a}}return await this._removeSession(),{error:a}}const{session:o,redirectType:s}=i;return this._debug("#_initialize()","detected session in URL",o,"redirect type",s),await this._saveSession(o),setTimeout(async()=>{s==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",o):await this._notifyAllSubscribers("SIGNED_IN",o)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return ie(r)?{error:r}:{error:new Yr("Unexpected error during initialization",r)}}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var r,n,i;try{const a=await ce(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(n=(r=e==null?void 0:e.options)===null||r===void 0?void 0:r.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:(i=e==null?void 0:e.options)===null||i===void 0?void 0:i.captchaToken}},xform:qt}),{data:o,error:s}=a;if(s||!o)return{data:{user:null,session:null},error:s};const u=o.session,l=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",u)),{data:{user:l,session:u},error:null}}catch(a){if(ie(a))return{data:{user:null,session:null},error:a};throw a}}async signUp(e){var r,n,i;try{let a;if("email"in e){const{email:c,password:f,options:d}=e;let h=null,y=null;this.flowType==="pkce"&&([h,y]=await Bn(this.storage,this.storageKey)),a=await ce(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:d==null?void 0:d.emailRedirectTo,body:{email:c,password:f,data:(r=d==null?void 0:d.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:d==null?void 0:d.captchaToken},code_challenge:h,code_challenge_method:y},xform:qt})}else if("phone"in e){const{phone:c,password:f,options:d}=e;a=await ce(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:c,password:f,data:(n=d==null?void 0:d.data)!==null&&n!==void 0?n:{},channel:(i=d==null?void 0:d.channel)!==null&&i!==void 0?i:"sms",gotrue_meta_security:{captcha_token:d==null?void 0:d.captchaToken}},xform:qt})}else throw new Bo("You must provide either an email or phone number and a password");const{data:o,error:s}=a;if(s||!o)return{data:{user:null,session:null},error:s};const u=o.session,l=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",u)),{data:{user:l,session:u},error:null}}catch(a){if(ie(a))return{data:{user:null,session:null},error:a};throw a}}async signInWithPassword(e){try{let r;if("email"in e){const{email:a,password:o,options:s}=e;r=await ce(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:a,password:o,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}},xform:kp})}else if("phone"in e){const{phone:a,password:o,options:s}=e;r=await ce(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:a,password:o,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}},xform:kp})}else throw new Bo("You must provide either an email or phone number and a password");const{data:n,error:i}=r;return i?{data:{user:null,session:null},error:i}:!n||!n.session||!n.user?{data:{user:null,session:null},error:new Dn}:(n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),{data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:i})}catch(r){if(ie(r))return{data:{user:null,session:null},error:r};throw r}}async signInWithOAuth(e){var r,n,i,a;return await this._handleProviderSignIn(e.provider,{redirectTo:(r=e.options)===null||r===void 0?void 0:r.redirectTo,scopes:(n=e.options)===null||n===void 0?void 0:n.scopes,queryParams:(i=e.options)===null||i===void 0?void 0:i.queryParams,skipBrowserRedirect:(a=e.options)===null||a===void 0?void 0:a.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this._acquireLock(-1,async()=>this._exchangeCodeForSession(e))}async signInWithWeb3(e){const{chain:r}=e;switch(r){case"ethereum":return await this.signInWithEthereum(e);case"solana":return await this.signInWithSolana(e);default:throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}}async signInWithEthereum(e){var r,n,i,a,o,s,u,l,c,f,d;let h,y;if("message"in e)h=e.message,y=e.signature;else{const{chain:v,wallet:p,statement:m,options:b}=e;let w;if(lt())if(typeof p=="object")w=p;else{const T=window;if("ethereum"in T&&typeof T.ethereum=="object"&&"request"in T.ethereum&&typeof T.ethereum.request=="function")w=T.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof p!="object"||!(b!=null&&b.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");w=p}const O=new URL((r=b==null?void 0:b.url)!==null&&r!==void 0?r:window.location.href),g=await w.request({method:"eth_requestAccounts"}).then(T=>T).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!g||g.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const _=Mp(g[0]);let S=(n=b==null?void 0:b.signInWithEthereum)===null||n===void 0?void 0:n.chainId;if(!S){const T=await w.request({method:"eth_chainId"});S=OS(T)}const A={domain:O.host,address:_,statement:m,uri:O.href,version:"1",chainId:S,nonce:(i=b==null?void 0:b.signInWithEthereum)===null||i===void 0?void 0:i.nonce,issuedAt:(o=(a=b==null?void 0:b.signInWithEthereum)===null||a===void 0?void 0:a.issuedAt)!==null&&o!==void 0?o:new Date,expirationTime:(s=b==null?void 0:b.signInWithEthereum)===null||s===void 0?void 0:s.expirationTime,notBefore:(u=b==null?void 0:b.signInWithEthereum)===null||u===void 0?void 0:u.notBefore,requestId:(l=b==null?void 0:b.signInWithEthereum)===null||l===void 0?void 0:l.requestId,resources:(c=b==null?void 0:b.signInWithEthereum)===null||c===void 0?void 0:c.resources};h=AS(A),y=await w.request({method:"personal_sign",params:[SS(h),_]})}try{const{data:v,error:p}=await ce(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:h,signature:y},!((f=e.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:(d=e.options)===null||d===void 0?void 0:d.captchaToken}}:null),xform:qt});if(p)throw p;return!v||!v.session||!v.user?{data:{user:null,session:null},error:new Dn}:(v.session&&(await this._saveSession(v.session),await this._notifyAllSubscribers("SIGNED_IN",v.session)),{data:Object.assign({},v),error:p})}catch(v){if(ie(v))return{data:{user:null,session:null},error:v};throw v}}async signInWithSolana(e){var r,n,i,a,o,s,u,l,c,f,d,h;let y,v;if("message"in e)y=e.message,v=e.signature;else{const{chain:p,wallet:m,statement:b,options:w}=e;let O;if(lt())if(typeof m=="object")O=m;else{const _=window;if("solana"in _&&typeof _.solana=="object"&&("signIn"in _.solana&&typeof _.solana.signIn=="function"||"signMessage"in _.solana&&typeof _.solana.signMessage=="function"))O=_.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof m!="object"||!(w!=null&&w.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");O=m}const g=new URL((r=w==null?void 0:w.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in O&&O.signIn){const _=await O.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},w==null?void 0:w.signInWithSolana),{version:"1",domain:g.host,uri:g.href}),b?{statement:b}:null));let S;if(Array.isArray(_)&&_[0]&&typeof _[0]=="object")S=_[0];else if(_&&typeof _=="object"&&"signedMessage"in _&&"signature"in _)S=_;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in S&&"signature"in S&&(typeof S.signedMessage=="string"||S.signedMessage instanceof Uint8Array)&&S.signature instanceof Uint8Array)y=typeof S.signedMessage=="string"?S.signedMessage:new TextDecoder().decode(S.signedMessage),v=S.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in O)||typeof O.signMessage!="function"||!("publicKey"in O)||typeof O!="object"||!O.publicKey||!("toBase58"in O.publicKey)||typeof O.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");y=[`${g.host} wants you to sign in with your Solana account:`,O.publicKey.toBase58(),...b?["",b,""]:[""],"Version: 1",`URI: ${g.href}`,`Issued At: ${(i=(n=w==null?void 0:w.signInWithSolana)===null||n===void 0?void 0:n.issuedAt)!==null&&i!==void 0?i:new Date().toISOString()}`,...!((a=w==null?void 0:w.signInWithSolana)===null||a===void 0)&&a.notBefore?[`Not Before: ${w.signInWithSolana.notBefore}`]:[],...!((o=w==null?void 0:w.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${w.signInWithSolana.expirationTime}`]:[],...!((s=w==null?void 0:w.signInWithSolana)===null||s===void 0)&&s.chainId?[`Chain ID: ${w.signInWithSolana.chainId}`]:[],...!((u=w==null?void 0:w.signInWithSolana)===null||u===void 0)&&u.nonce?[`Nonce: ${w.signInWithSolana.nonce}`]:[],...!((l=w==null?void 0:w.signInWithSolana)===null||l===void 0)&&l.requestId?[`Request ID: ${w.signInWithSolana.requestId}`]:[],...!((f=(c=w==null?void 0:w.signInWithSolana)===null||c===void 0?void 0:c.resources)===null||f===void 0)&&f.length?["Resources",...w.signInWithSolana.resources.map(S=>`- ${S}`)]:[]].join(`
|
|
69
|
-
`);const _=await O.signMessage(new TextEncoder().encode(y),"utf8");if(!_||!(_ instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");v=_}}try{const{data:p,error:m}=await ce(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:y,signature:Xr(v)},!((d=e.options)===null||d===void 0)&&d.captchaToken?{gotrue_meta_security:{captcha_token:(h=e.options)===null||h===void 0?void 0:h.captchaToken}}:null),xform:qt});if(m)throw m;return!p||!p.session||!p.user?{data:{user:null,session:null},error:new Dn}:(p.session&&(await this._saveSession(p.session),await this._notifyAllSubscribers("SIGNED_IN",p.session)),{data:Object.assign({},p),error:m})}catch(p){if(ie(p))return{data:{user:null,session:null},error:p};throw p}}async _exchangeCodeForSession(e){const r=await Zr(this.storage,`${this.storageKey}-code-verifier`),[n,i]=(r??"").split("/");try{const{data:a,error:o}=await ce(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:n},xform:qt});if(await Tr(this.storage,`${this.storageKey}-code-verifier`),o)throw o;return!a||!a.session||!a.user?{data:{user:null,session:null,redirectType:null},error:new Dn}:(a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",a.session)),{data:Object.assign(Object.assign({},a),{redirectType:i??null}),error:o})}catch(a){if(ie(a))return{data:{user:null,session:null,redirectType:null},error:a};throw a}}async signInWithIdToken(e){try{const{options:r,provider:n,token:i,access_token:a,nonce:o}=e,s=await ce(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:i,access_token:a,nonce:o,gotrue_meta_security:{captcha_token:r==null?void 0:r.captchaToken}},xform:qt}),{data:u,error:l}=s;return l?{data:{user:null,session:null},error:l}:!u||!u.session||!u.user?{data:{user:null,session:null},error:new Dn}:(u.session&&(await this._saveSession(u.session),await this._notifyAllSubscribers("SIGNED_IN",u.session)),{data:u,error:l})}catch(r){if(ie(r))return{data:{user:null,session:null},error:r};throw r}}async signInWithOtp(e){var r,n,i,a,o;try{if("email"in e){const{email:s,options:u}=e;let l=null,c=null;this.flowType==="pkce"&&([l,c]=await Bn(this.storage,this.storageKey));const{error:f}=await ce(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:s,data:(r=u==null?void 0:u.data)!==null&&r!==void 0?r:{},create_user:(n=u==null?void 0:u.shouldCreateUser)!==null&&n!==void 0?n:!0,gotrue_meta_security:{captcha_token:u==null?void 0:u.captchaToken},code_challenge:l,code_challenge_method:c},redirectTo:u==null?void 0:u.emailRedirectTo});return{data:{user:null,session:null},error:f}}if("phone"in e){const{phone:s,options:u}=e,{data:l,error:c}=await ce(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:s,data:(i=u==null?void 0:u.data)!==null&&i!==void 0?i:{},create_user:(a=u==null?void 0:u.shouldCreateUser)!==null&&a!==void 0?a:!0,gotrue_meta_security:{captcha_token:u==null?void 0:u.captchaToken},channel:(o=u==null?void 0:u.channel)!==null&&o!==void 0?o:"sms"}});return{data:{user:null,session:null,messageId:l==null?void 0:l.message_id},error:c}}throw new Bo("You must provide either an email or phone number.")}catch(s){if(ie(s))return{data:{user:null,session:null},error:s};throw s}}async verifyOtp(e){var r,n;try{let i,a;"options"in e&&(i=(r=e.options)===null||r===void 0?void 0:r.redirectTo,a=(n=e.options)===null||n===void 0?void 0:n.captchaToken);const{data:o,error:s}=await ce(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:a}}),redirectTo:i,xform:qt});if(s)throw s;if(!o)throw new Error("An error occurred on token verification.");const u=o.session,l=o.user;return u!=null&&u.access_token&&(await this._saveSession(u),await this._notifyAllSubscribers(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",u)),{data:{user:l,session:u},error:null}}catch(i){if(ie(i))return{data:{user:null,session:null},error:i};throw i}}async signInWithSSO(e){var r,n,i;try{let a=null,o=null;return this.flowType==="pkce"&&([a,o]=await Bn(this.storage,this.storageKey)),await ce(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:(n=(r=e.options)===null||r===void 0?void 0:r.redirectTo)!==null&&n!==void 0?n:void 0}),!((i=e==null?void 0:e.options)===null||i===void 0)&&i.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:a,code_challenge_method:o}),headers:this.headers,xform:yS})}catch(a){if(ie(a))return{data:null,error:a};throw a}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async e=>{const{data:{session:r},error:n}=e;if(n)throw n;if(!r)throw new Wt;const{error:i}=await ce(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return{data:{user:null,session:null},error:i}})}catch(e){if(ie(e))return{data:{user:null,session:null},error:e};throw e}}async resend(e){try{const r=`${this.url}/resend`;if("email"in e){const{email:n,type:i,options:a}=e,{error:o}=await ce(this.fetch,"POST",r,{headers:this.headers,body:{email:n,type:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},redirectTo:a==null?void 0:a.emailRedirectTo});return{data:{user:null,session:null},error:o}}else if("phone"in e){const{phone:n,type:i,options:a}=e,{data:o,error:s}=await ce(this.fetch,"POST",r,{headers:this.headers,body:{phone:n,type:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}}});return{data:{user:null,session:null,messageId:o==null?void 0:o.message_id},error:s}}throw new Bo("You must provide either an email or phone number and a type")}catch(r){if(ie(r))return{data:{user:null,session:null},error:r};throw r}}async getSession(){return await this.initializePromise,await this._acquireLock(-1,async()=>this._useSession(async r=>r))}async _acquireLock(e,r){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){const n=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),i=(async()=>(await n,await r()))();return this.pendingInLock.push((async()=>{try{await i}catch{}})()),i}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const n=r();for(this.pendingInLock.push((async()=>{try{await n}catch{}})()),await n;this.pendingInLock.length;){const i=[...this.pendingInLock];await Promise.all(i),this.pendingInLock.splice(0,i.length)}return await n}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(e){this._debug("#_useSession","begin");try{const r=await this.__loadSession();return await e(r)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let e=null;const r=await Zr(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?e=r:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!e)return{data:{session:null},error:null};const n=e.expires_at?e.expires_at*1e3-Date.now()<gl:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",e.expires_at),!n){if(this.userStorage){const o=await Zr(this.userStorage,this.storageKey+"-user");o!=null&&o.user?e.user=o.user:e.user=Ol()}if(this.storage.isServer&&e.user&&!e.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};e.user=dS(e.user,o),o.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:e},error:null}}const{data:i,error:a}=await this._callRefreshToken(e.refresh_token);return a?{data:{session:null},error:a}:{data:{session:i},error:null}}finally{this._debug("#__loadSession()","end")}}async getUser(e){return e?await this._getUser(e):(await this.initializePromise,await this._acquireLock(-1,async()=>await this._getUser()))}async _getUser(e){try{return e?await ce(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:jr}):await this._useSession(async r=>{var n,i,a;const{data:o,error:s}=r;if(s)throw s;return!(!((n=o.session)===null||n===void 0)&&n.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Wt}:await ce(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(a=(i=o.session)===null||i===void 0?void 0:i.access_token)!==null&&a!==void 0?a:void 0,xform:jr})})}catch(r){if(ie(r))return zO(r)&&(await this._removeSession(),await Tr(this.storage,`${this.storageKey}-code-verifier`)),{data:{user:null},error:r};throw r}}async updateUser(e,r={}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._updateUser(e,r))}async _updateUser(e,r={}){try{return await this._useSession(async n=>{const{data:i,error:a}=n;if(a)throw a;if(!i.session)throw new Wt;const o=i.session;let s=null,u=null;this.flowType==="pkce"&&e.email!=null&&([s,u]=await Bn(this.storage,this.storageKey));const{data:l,error:c}=await ce(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r==null?void 0:r.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:s,code_challenge_method:u}),jwt:o.access_token,xform:jr});if(c)throw c;return o.user=l.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),{data:{user:o.user},error:null}})}catch(n){if(ie(n))return{data:{user:null},error:n};throw n}}async setSession(e){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._setSession(e))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new Wt;const r=Date.now()/1e3;let n=r,i=!0,a=null;const{payload:o}=xl(e.access_token);if(o.exp&&(n=o.exp,i=n<=r),i){const{data:s,error:u}=await this._callRefreshToken(e.refresh_token);if(u)return{data:{user:null,session:null},error:u};if(!s)return{data:{user:null,session:null},error:null};a=s}else{const{data:s,error:u}=await this._getUser(e.access_token);if(u)throw u;a={access_token:e.access_token,refresh_token:e.refresh_token,user:s.user,token_type:"bearer",expires_in:n-r,expires_at:n},await this._saveSession(a),await this._notifyAllSubscribers("SIGNED_IN",a)}return{data:{user:a.user,session:a},error:null}}catch(r){if(ie(r))return{data:{session:null,user:null},error:r};throw r}}async refreshSession(e){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._refreshSession(e))}async _refreshSession(e){try{return await this._useSession(async r=>{var n;if(!e){const{data:o,error:s}=r;if(s)throw s;e=(n=o.session)!==null&&n!==void 0?n:void 0}if(!(e!=null&&e.refresh_token))throw new Wt;const{data:i,error:a}=await this._callRefreshToken(e.refresh_token);return a?{data:{user:null,session:null},error:a}:i?{data:{user:i.user,session:i},error:null}:{data:{user:null,session:null},error:null}})}catch(r){if(ie(r))return{data:{user:null,session:null},error:r};throw r}}async _getSessionFromURL(e,r){try{if(!lt())throw new Uo("No browser detected.");if(e.error||e.error_description||e.error_code)throw new Uo(e.error_description||"Error in URL with unspecified error_description",{error:e.error||"unspecified_error",code:e.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new _p("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Uo("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!e.code)throw new _p("No code detected.");const{data:b,error:w}=await this._exchangeCodeForSession(e.code);if(w)throw w;const O=new URL(window.location.href);return O.searchParams.delete("code"),window.history.replaceState(window.history.state,"",O.toString()),{data:{session:b.session,redirectType:null},error:null}}const{provider_token:n,provider_refresh_token:i,access_token:a,refresh_token:o,expires_in:s,expires_at:u,token_type:l}=e;if(!a||!s||!o||!l)throw new Uo("No session defined in URL");const c=Math.round(Date.now()/1e3),f=parseInt(s);let d=c+f;u&&(d=parseInt(u));const h=d-c;h*1e3<=Mn&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${h}s, should have been closer to ${f}s`);const y=d-f;c-y>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",y,d,c):c-y<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",y,d,c);const{data:v,error:p}=await this._getUser(a);if(p)throw p;const m={provider_token:n,provider_refresh_token:i,access_token:a,expires_in:f,expires_at:d,refresh_token:o,token_type:l,user:v.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),{data:{session:m,redirectType:e.type},error:null}}catch(n){if(ie(n))return{data:{session:null,redirectType:null},error:n};throw n}}_isImplicitGrantCallback(e){return!!(e.access_token||e.error_description)}async _isPKCECallback(e){const r=await Zr(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&r)}async signOut(e={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._signOut(e))}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async r=>{var n;const{data:i,error:a}=r;if(a)return{error:a};const o=(n=i.session)===null||n===void 0?void 0:n.access_token;if(o){const{error:s}=await this.admin.signOut(o,e);if(s&&!(qO(s)&&(s.status===404||s.status===401||s.status===403)))return{error:s}}return e!=="others"&&(await this._removeSession(),await Tr(this.storage,`${this.storageKey}-code-verifier`)),{error:null}})}onAuthStateChange(e){const r=ZO(),n={id:r,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",r),this.stateChangeEmitters.delete(r)}};return this._debug("#onAuthStateChange()","registered callback with id",r),this.stateChangeEmitters.set(r,n),(async()=>(await this.initializePromise,await this._acquireLock(-1,async()=>{this._emitInitialSession(r)})))(),{data:{subscription:n}}}async _emitInitialSession(e){return await this._useSession(async r=>{var n,i;try{const{data:{session:a},error:o}=r;if(o)throw o;await((n=this.stateChangeEmitters.get(e))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",a)),this._debug("INITIAL_SESSION","callback id",e,"session",a)}catch(a){await((i=this.stateChangeEmitters.get(e))===null||i===void 0?void 0:i.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",a),console.error(a)}})}async resetPasswordForEmail(e,r={}){let n=null,i=null;this.flowType==="pkce"&&([n,i]=await Bn(this.storage,this.storageKey,!0));try{return await ce(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:n,code_challenge_method:i,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(a){if(ie(a))return{data:null,error:a};throw a}}async getUserIdentities(){var e;try{const{data:r,error:n}=await this.getUser();if(n)throw n;return{data:{identities:(e=r.user.identities)!==null&&e!==void 0?e:[]},error:null}}catch(r){if(ie(r))return{data:null,error:r};throw r}}async linkIdentity(e){return"token"in e?this.linkIdentityIdToken(e):this.linkIdentityOAuth(e)}async linkIdentityOAuth(e){var r;try{const{data:n,error:i}=await this._useSession(async a=>{var o,s,u,l,c;const{data:f,error:d}=a;if(d)throw d;const h=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(o=e.options)===null||o===void 0?void 0:o.redirectTo,scopes:(s=e.options)===null||s===void 0?void 0:s.scopes,queryParams:(u=e.options)===null||u===void 0?void 0:u.queryParams,skipBrowserRedirect:!0});return await ce(this.fetch,"GET",h,{headers:this.headers,jwt:(c=(l=f.session)===null||l===void 0?void 0:l.access_token)!==null&&c!==void 0?c:void 0})});if(i)throw i;return lt()&&!(!((r=e.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(n==null?void 0:n.url),{data:{provider:e.provider,url:n==null?void 0:n.url},error:null}}catch(n){if(ie(n))return{data:{provider:e.provider,url:null},error:n};throw n}}async linkIdentityIdToken(e){return await this._useSession(async r=>{var n;try{const{error:i,data:{session:a}}=r;if(i)throw i;const{options:o,provider:s,token:u,access_token:l,nonce:c}=e,f=await ce(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(n=a==null?void 0:a.access_token)!==null&&n!==void 0?n:void 0,body:{provider:s,id_token:u,access_token:l,nonce:c,link_identity:!0,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:qt}),{data:d,error:h}=f;return h?{data:{user:null,session:null},error:h}:!d||!d.session||!d.user?{data:{user:null,session:null},error:new Dn}:(d.session&&(await this._saveSession(d.session),await this._notifyAllSubscribers("USER_UPDATED",d.session)),{data:d,error:h})}catch(i){if(ie(i))return{data:{user:null,session:null},error:i};throw i}})}async unlinkIdentity(e){try{return await this._useSession(async r=>{var n,i;const{data:a,error:o}=r;if(o)throw o;return await ce(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:(i=(n=a.session)===null||n===void 0?void 0:n.access_token)!==null&&i!==void 0?i:void 0})})}catch(r){if(ie(r))return{data:null,error:r};throw r}}async _refreshAccessToken(e){const r=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(r,"begin");try{const n=Date.now();return await rS(async i=>(i>0&&await tS(200*Math.pow(2,i-1)),this._debug(r,"refreshing attempt",i),await ce(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:qt})),(i,a)=>{const o=200*Math.pow(2,i);return a&&wl(a)&&Date.now()+o-n<Mn})}catch(n){if(this._debug(r,"error",n),ie(n))return{data:{session:null,user:null},error:n};throw n}finally{this._debug(r,"end")}}_isValidSession(e){return typeof e=="object"&&e!==null&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,r){const n=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",r,"url",n),lt()&&!r.skipBrowserRedirect&&window.location.assign(n),{data:{provider:e,url:n},error:null}}async _recoverAndRefresh(){var e,r;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const i=await Zr(this.storage,this.storageKey);if(i&&this.userStorage){let o=await Zr(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:i.user},await Ln(this.userStorage,this.storageKey+"-user",o)),i.user=(e=o==null?void 0:o.user)!==null&&e!==void 0?e:Ol()}else if(i&&!i.user&&!i.user){const o=await Zr(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(i.user=o.user,await Tr(this.storage,this.storageKey+"-user"),await Ln(this.storage,this.storageKey,i)):i.user=Ol()}if(this._debug(n,"session from storage",i),!this._isValidSession(i)){this._debug(n,"session is not valid"),i!==null&&await this._removeSession();return}const a=((r=i.expires_at)!==null&&r!==void 0?r:1/0)*1e3-Date.now()<gl;if(this._debug(n,`session has${a?"":" not"} expired with margin of ${gl}s`),a){if(this.autoRefreshToken&&i.refresh_token){const{error:o}=await this._callRefreshToken(i.refresh_token);o&&(console.error(o),wl(o)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",o),await this._removeSession()))}}else if(i.user&&i.user.__isUserNotAvailableProxy===!0)try{const{data:o,error:s}=await this._getUser(i.access_token);!s&&(o!=null&&o.user)?(i.user=o.user,await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)):this._debug(n,"could not get user data, skipping SIGNED_IN notification")}catch(o){console.error("Error getting user data:",o),this._debug(n,"error getting user data, skipping SIGNED_IN notification",o)}else await this._notifyAllSubscribers("SIGNED_IN",i)}catch(i){this._debug(n,"error",i),console.error(i);return}finally{this._debug(n,"end")}}async _callRefreshToken(e){var r,n;if(!e)throw new Wt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const i=`#_callRefreshToken(${e.substring(0,5)}...)`;this._debug(i,"begin");try{this.refreshingDeferred=new Wo;const{data:a,error:o}=await this._refreshAccessToken(e);if(o)throw o;if(!a.session)throw new Wt;await this._saveSession(a.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",a.session);const s={data:a.session,error:null};return this.refreshingDeferred.resolve(s),s}catch(a){if(this._debug(i,"error",a),ie(a)){const o={data:null,error:a};return wl(a)||await this._removeSession(),(r=this.refreshingDeferred)===null||r===void 0||r.resolve(o),o}throw(n=this.refreshingDeferred)===null||n===void 0||n.reject(a),a}finally{this.refreshingDeferred=null,this._debug(i,"end")}}async _notifyAllSubscribers(e,r,n=!0){const i=`#_notifyAllSubscribers(${e})`;this._debug(i,"begin",r,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:e,session:r});const a=[],o=Array.from(this.stateChangeEmitters.values()).map(async s=>{try{await s.callback(e,r)}catch(u){a.push(u)}});if(await Promise.all(o),a.length>0){for(let s=0;s<a.length;s+=1)console.error(a[s]);throw a[0]}}finally{this._debug(i,"end")}}async _saveSession(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0;const r=Object.assign({},e),n=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&r.user&&await Ln(this.userStorage,this.storageKey+"-user",{user:r.user});const i=Object.assign({},r);delete i.user;const a=jp(i);await Ln(this.storage,this.storageKey,a)}else{const i=jp(r);await Ln(this.storage,this.storageKey,i)}}async _removeSession(){this._debug("#_removeSession()"),await Tr(this.storage,this.storageKey),await Tr(this.storage,this.storageKey+"-code-verifier"),await Tr(this.storage,this.storageKey+"-user"),this.userStorage&&await Tr(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&<()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",e)}catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const e=setInterval(()=>this._autoRefreshTokenTick(),Mn);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e),setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const e=Date.now();try{return await this._useSession(async r=>{const{data:{session:n}}=r;if(!n||!n.refresh_token||!n.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const i=Math.floor((n.expires_at*1e3-e)/Mn);this._debug("#_autoRefreshTokenTick()",`access token expires in ${i} ticks, a tick lasts ${Mn}ms, refresh threshold is ${yl} ticks`),i<=yl&&await this._callRefreshToken(n.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(e){if(e.isAcquireTimeout||e instanceof Np)this._debug("auto refresh token tick lock not available");else throw e}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!lt()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){const r=`#_onVisibilityChanged(${e})`;this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),e||(await this.initializePromise,await this._acquireLock(-1,async()=>{if(document.visibilityState!=="visible"){this._debug(r,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e,r,n){const i=[`provider=${encodeURIComponent(r)}`];if(n!=null&&n.redirectTo&&i.push(`redirect_to=${encodeURIComponent(n.redirectTo)}`),n!=null&&n.scopes&&i.push(`scopes=${encodeURIComponent(n.scopes)}`),this.flowType==="pkce"){const[a,o]=await Bn(this.storage,this.storageKey),s=new URLSearchParams({code_challenge:`${encodeURIComponent(a)}`,code_challenge_method:`${encodeURIComponent(o)}`});i.push(s.toString())}if(n!=null&&n.queryParams){const a=new URLSearchParams(n.queryParams);i.push(a.toString())}return n!=null&&n.skipBrowserRedirect&&i.push(`skip_http_redirect=${n.skipBrowserRedirect}`),`${e}?${i.join("&")}`}async _unenroll(e){try{return await this._useSession(async r=>{var n;const{data:i,error:a}=r;return a?{data:null,error:a}:await ce(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if(ie(r))return{data:null,error:r};throw r}}async _enroll(e){try{return await this._useSession(async r=>{var n,i;const{data:a,error:o}=r;if(o)return{data:null,error:o};const s=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType==="phone"?{phone:e.phone}:e.factorType==="totp"?{issuer:e.issuer}:{}),{data:u,error:l}=await ce(this.fetch,"POST",`${this.url}/factors`,{body:s,headers:this.headers,jwt:(n=a==null?void 0:a.session)===null||n===void 0?void 0:n.access_token});return l?{data:null,error:l}:(e.factorType==="totp"&&u.type==="totp"&&(!((i=u==null?void 0:u.totp)===null||i===void 0)&&i.qr_code)&&(u.totp.qr_code=`data:image/svg+xml;utf-8,${u.totp.qr_code}`),{data:u,error:null})})}catch(r){if(ie(r))return{data:null,error:r};throw r}}async _verify(e){return this._acquireLock(-1,async()=>{try{return await this._useSession(async r=>{var n;const{data:i,error:a}=r;if(a)return{data:null,error:a};const o=Object.assign({challenge_id:e.challengeId},"webauthn"in e?{webauthn:Object.assign(Object.assign({},e.webauthn),{credential_response:e.webauthn.type==="create"?CS(e.webauthn.credential_response):IS(e.webauthn.credential_response)})}:{code:e.code}),{data:s,error:u}=await ce(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:o,headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token});return u?{data:null,error:u}:(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+s.expires_in},s)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",s),{data:s,error:u})})}catch(r){if(ie(r))return{data:null,error:r};throw r}})}async _challenge(e){return this._acquireLock(-1,async()=>{try{return await this._useSession(async r=>{var n;const{data:i,error:a}=r;if(a)return{data:null,error:a};const o=await ce(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:e,headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token});if(o.error)return o;const{data:s}=o;if(s.type!=="webauthn")return{data:s,error:null};switch(s.webauthn.type){case"create":return{data:Object.assign(Object.assign({},s),{webauthn:Object.assign(Object.assign({},s.webauthn),{credential_options:Object.assign(Object.assign({},s.webauthn.credential_options),{publicKey:$S(s.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},s),{webauthn:Object.assign(Object.assign({},s.webauthn),{credential_options:Object.assign(Object.assign({},s.webauthn.credential_options),{publicKey:kS(s.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if(ie(r))return{data:null,error:r};throw r}})}async _challengeAndVerify(e){const{data:r,error:n}=await this._challenge({factorId:e.factorId});return n?{data:null,error:n}:await this._verify({factorId:e.factorId,challengeId:r.id,code:e.code})}async _listFactors(){var e;const{data:{user:r},error:n}=await this.getUser();if(n)return{data:null,error:n};const i={all:[],phone:[],totp:[],webauthn:[]};for(const a of(e=r==null?void 0:r.factors)!==null&&e!==void 0?e:[])i.all.push(a),a.status==="verified"&&i[a.factor_type].push(a);return{data:i,error:null}}async _getAuthenticatorAssuranceLevel(){var e,r;const{data:{session:n},error:i}=await this.getSession();if(i)return{data:null,error:i};if(!n)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:a}=xl(n.access_token);let o=null;a.aal&&(o=a.aal);let s=o;((r=(e=n.user.factors)===null||e===void 0?void 0:e.filter(c=>c.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(s="aal2");const l=a.amr||[];return{data:{currentLevel:o,nextLevel:s,currentAuthenticationMethods:l},error:null}}async _getAuthorizationDetails(e){try{return await this._useSession(async r=>{const{data:{session:n},error:i}=r;return i?{data:null,error:i}:n?await ce(this.fetch,"GET",`${this.url}/oauth/authorizations/${e}`,{headers:this.headers,jwt:n.access_token,xform:a=>({data:a,error:null})}):{data:null,error:new Wt}})}catch(r){if(ie(r))return{data:null,error:r};throw r}}async _approveAuthorization(e,r){try{return await this._useSession(async n=>{const{data:{session:i},error:a}=n;if(a)return{data:null,error:a};if(!i)return{data:null,error:new Wt};const o=await ce(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:i.access_token,body:{action:"approve"},xform:s=>({data:s,error:null})});return o.data&&o.data.redirect_url&<()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if(ie(n))return{data:null,error:n};throw n}}async _denyAuthorization(e,r){try{return await this._useSession(async n=>{const{data:{session:i},error:a}=n;if(a)return{data:null,error:a};if(!i)return{data:null,error:new Wt};const o=await ce(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:i.access_token,body:{action:"deny"},xform:s=>({data:s,error:null})});return o.data&&o.data.redirect_url&<()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if(ie(n))return{data:null,error:n};throw n}}async fetchJwk(e,r={keys:[]}){let n=r.keys.find(s=>s.kid===e);if(n)return n;const i=Date.now();if(n=this.jwks.keys.find(s=>s.kid===e),n&&this.jwks_cached_at+FO>i)return n;const{data:a,error:o}=await ce(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(o)throw o;return!a.keys||a.keys.length===0||(this.jwks=a,this.jwks_cached_at=i,n=a.keys.find(s=>s.kid===e),!n)?null:n}async getClaims(e,r={}){try{let n=e;if(!n){const{data:h,error:y}=await this.getSession();if(y||!h.session)return{data:null,error:y};n=h.session.access_token}const{header:i,payload:a,signature:o,raw:{header:s,payload:u}}=xl(n);r!=null&&r.allowExpired||lS(a.exp);const l=!i.alg||i.alg.startsWith("HS")||!i.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(i.kid,r!=null&&r.keys?{keys:r.keys}:r==null?void 0:r.jwks);if(!l){const{error:h}=await this.getUser(n);if(h)throw h;return{data:{claims:a,header:i,signature:o},error:null}}const c=cS(i.alg),f=await crypto.subtle.importKey("jwk",l,c,!0,["verify"]);if(!await crypto.subtle.verify(c,f,o,XO(`${s}.${u}`)))throw new _l("Invalid JWT signature");return{data:{claims:a,header:i,signature:o},error:null}}catch(n){if(ie(n))return{data:null,error:n};throw n}}}ua.nextInstanceID=0;const WS=ua;class qS extends WS{constructor(e){super(e)}}class zS{constructor(e,r,n){var i,a,o;this.supabaseUrl=e,this.supabaseKey=r;const s=DO(e);if(!r)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",s),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",s),this.storageUrl=new URL("storage/v1",s),this.functionsUrl=new URL("functions/v1",s);const u=`sb-${s.hostname.split(".")[0]}-auth-token`,l={db:TO,realtime:$O,auth:Object.assign(Object.assign({},jO),{storageKey:u}),global:EO},c=MO(n??{},l);this.storageKey=(i=c.auth.storageKey)!==null&&i!==void 0?i:"",this.headers=(a=c.global.headers)!==null&&a!==void 0?a:{},c.accessToken?(this.accessToken=c.accessToken,this.auth=new Proxy({},{get:(f,d)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(d)} is not possible`)}})):this.auth=this._initSupabaseAuthClient((o=c.auth)!==null&&o!==void 0?o:{},this.headers,c.global.fetch),this.fetch=IO(r,this._getAccessToken.bind(this),c.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers,accessToken:this._getAccessToken.bind(this)},c.realtime)),this.rest=new Bx(new URL("rest/v1",s).href,{headers:this.headers,schema:c.db.schema,fetch:this.fetch}),this.storage=new AO(this.storageUrl.href,this.headers,this.fetch,n==null?void 0:n.storage),c.accessToken||this._listenForAuthEvents()}get functions(){return new kx(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,r={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,r,n)}channel(e,r={config:{}}){return this.realtime.channel(e,r)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e,r;if(this.accessToken)return await this.accessToken();const{data:n}=await this.auth.getSession();return(r=(e=n.session)===null||e===void 0?void 0:e.access_token)!==null&&r!==void 0?r:this.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:r,detectSessionInUrl:n,storage:i,userStorage:a,storageKey:o,flowType:s,lock:u,debug:l},c,f){const d={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new qS({url:this.authUrl.href,headers:Object.assign(Object.assign({},d),c),storageKey:o,autoRefreshToken:e,persistSession:r,detectSessionInUrl:n,storage:i,userStorage:a,flowType:s,lock:u,debug:l,fetch:f,hasCustomAuthorizationHeader:Object.keys(this.headers).some(h=>h.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new tO(this.realtimeUrl.href,Object.assign(Object.assign({},e),{params:Object.assign({apikey:this.supabaseKey},e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((r,n)=>{this._handleTokenChanged(r,"CLIENT",n==null?void 0:n.access_token)})}_handleTokenChanged(e,r,n){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==n?(this.changedAccessToken=n,this.realtime.setAuth(n)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),r=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}}const KS=(t,e,r)=>new zS(t,e,r);function VS(){if(typeof window<"u"||typeof process>"u")return!1;const t=process.version;if(t==null)return!1;const e=t.match(/^v(\d+)\./);return e?parseInt(e[1],10)<=18:!1}VS()&&console.warn("⚠️ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const ct=KS("https://qvfepptmcxwvalmbkgur.supabase.co","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InF2ZmVwcHRtY3h3dmFsbWJrZ3VyIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjE5MjE4NTEsImV4cCI6MjA3NzQ5Nzg1MX0.kuPTAjW1i54uJHZAAAZqAe-sZCKPHTdUPoRbAky-cQk",{auth:{storage:localStorage,persistSession:!0,autoRefreshToken:!0}});function Bp(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function HS(...t){return e=>{let r=!1;const n=t.map(i=>{const a=Bp(i,e);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let i=0;i<n.length;i++){const a=n[i];typeof a=="function"?a():Bp(t[i],null)}}}}function Up(t){const e=YS(t),r=ve.forwardRef((n,i)=>{const{children:a,...o}=n,s=ve.Children.toArray(a),u=s.find(JS);if(u){const l=u.props.children,c=s.map(f=>f===u?ve.Children.count(l)>1?ve.Children.only(null):ve.isValidElement(l)?l.props.children:null:f);return E.jsx(e,{...o,ref:i,children:ve.isValidElement(l)?ve.cloneElement(l,void 0,c):null})}return E.jsx(e,{...o,ref:i,children:a})});return r.displayName=`${t}.Slot`,r}var GS=Up("Slot");function YS(t){const e=ve.forwardRef((r,n)=>{const{children:i,...a}=r;if(ve.isValidElement(i)){const o=QS(i),s=ZS(a,i.props);return i.type!==ve.Fragment&&(s.ref=n?HS(n,o):o),ve.cloneElement(i,s)}return ve.Children.count(i)>1?ve.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var XS=Symbol("radix.slottable");function JS(t){return ve.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===XS}function ZS(t,e){const r={...e};for(const n in e){const i=t[n],a=e[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...s)=>{const u=a(...s);return i(...s),u}:i&&(r[n]=i):n==="style"?r[n]={...i,...a}:n==="className"&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...t,...r}}function QS(t){var n,i;let e=(n=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:n.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}function Fp(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(r=Fp(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function le(){for(var t,e,r=0,n="",i=arguments.length;r<i;r++)(t=arguments[r])&&(e=Fp(t))&&(n&&(n+=" "),n+=e);return n}const Wp=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,qp=le,eA=(t,e)=>r=>{var n;if((e==null?void 0:e.variants)==null)return qp(t,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:i,defaultVariants:a}=e,o=Object.keys(i).map(l=>{const c=r==null?void 0:r[l],f=a==null?void 0:a[l];if(c===null)return null;const d=Wp(c)||Wp(f);return i[l][d]}),s=r&&Object.entries(r).reduce((l,c)=>{let[f,d]=c;return d===void 0||(l[f]=d),l},{}),u=e==null||(n=e.compoundVariants)===null||n===void 0?void 0:n.reduce((l,c)=>{let{class:f,className:d,...h}=c;return Object.entries(h).every(y=>{let[v,p]=y;return Array.isArray(p)?p.includes({...a,...s}[v]):{...a,...s}[v]===p})?[...l,f,d]:l},[]);return qp(t,o,u,r==null?void 0:r.class,r==null?void 0:r.className)},Al="-",tA=t=>{const e=nA(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=t;return{getClassGroupId:o=>{const s=o.split(Al);return s[0]===""&&s.length!==1&&s.shift(),zp(s,e)||rA(o)},getConflictingClassGroupIds:(o,s)=>{const u=r[o]||[];return s&&n[o]?[...u,...n[o]]:u}}},zp=(t,e)=>{var o;if(t.length===0)return e.classGroupId;const r=t[0],n=e.nextPart.get(r),i=n?zp(t.slice(1),n):void 0;if(i)return i;if(e.validators.length===0)return;const a=t.join(Al);return(o=e.validators.find(({validator:s})=>s(a)))==null?void 0:o.classGroupId},Kp=/^\[(.+)\]$/,rA=t=>{if(Kp.test(t)){const e=Kp.exec(t)[1],r=e==null?void 0:e.substring(0,e.indexOf(":"));if(r)return"arbitrary.."+r}},nA=t=>{const{theme:e,prefix:r}=t,n={nextPart:new Map,validators:[]};return aA(Object.entries(t.classGroups),r).forEach(([a,o])=>{Pl(o,n,a,e)}),n},Pl=(t,e,r,n)=>{t.forEach(i=>{if(typeof i=="string"){const a=i===""?e:Vp(e,i);a.classGroupId=r;return}if(typeof i=="function"){if(iA(i)){Pl(i(n),e,r,n);return}e.validators.push({validator:i,classGroupId:r});return}Object.entries(i).forEach(([a,o])=>{Pl(o,Vp(e,a),r,n)})})},Vp=(t,e)=>{let r=t;return e.split(Al).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},iA=t=>t.isThemeGetter,aA=(t,e)=>e?t.map(([r,n])=>{const i=n.map(a=>typeof a=="string"?e+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([o,s])=>[e+o,s])):a);return[r,i]}):t,oA=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,r=new Map,n=new Map;const i=(a,o)=>{r.set(a,o),e++,e>t&&(e=0,n=r,r=new Map)};return{get(a){let o=r.get(a);if(o!==void 0)return o;if((o=n.get(a))!==void 0)return i(a,o),o},set(a,o){r.has(a)?r.set(a,o):i(a,o)}}},Hp="!",sA=t=>{const{separator:e,experimentalParseClassName:r}=t,n=e.length===1,i=e[0],a=e.length,o=s=>{const u=[];let l=0,c=0,f;for(let p=0;p<s.length;p++){let m=s[p];if(l===0){if(m===i&&(n||s.slice(p,p+a)===e)){u.push(s.slice(c,p)),c=p+a;continue}if(m==="/"){f=p;continue}}m==="["?l++:m==="]"&&l--}const d=u.length===0?s:s.substring(c),h=d.startsWith(Hp),y=h?d.substring(1):d,v=f&&f>c?f-c:void 0;return{modifiers:u,hasImportantModifier:h,baseClassName:y,maybePostfixModifierPosition:v}};return r?s=>r({className:s,parseClassName:o}):o},uA=t=>{if(t.length<=1)return t;const e=[];let r=[];return t.forEach(n=>{n[0]==="["?(e.push(...r.sort(),n),r=[]):r.push(n)}),e.push(...r.sort()),e},lA=t=>({cache:oA(t.cacheSize),parseClassName:sA(t),...tA(t)}),cA=/\s+/,fA=(t,e)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i}=e,a=[],o=t.trim().split(cA);let s="";for(let u=o.length-1;u>=0;u-=1){const l=o[u],{modifiers:c,hasImportantModifier:f,baseClassName:d,maybePostfixModifierPosition:h}=r(l);let y=!!h,v=n(y?d.substring(0,h):d);if(!v){if(!y){s=l+(s.length>0?" "+s:s);continue}if(v=n(d),!v){s=l+(s.length>0?" "+s:s);continue}y=!1}const p=uA(c).join(":"),m=f?p+Hp:p,b=m+v;if(a.includes(b))continue;a.push(b);const w=i(v,y);for(let O=0;O<w.length;++O){const g=w[O];a.push(m+g)}s=l+(s.length>0?" "+s:s)}return s};function dA(){let t=0,e,r,n="";for(;t<arguments.length;)(e=arguments[t++])&&(r=Gp(e))&&(n&&(n+=" "),n+=r);return n}const Gp=t=>{if(typeof t=="string")return t;let e,r="";for(let n=0;n<t.length;n++)t[n]&&(e=Gp(t[n]))&&(r&&(r+=" "),r+=e);return r};function hA(t,...e){let r,n,i,a=o;function o(u){const l=e.reduce((c,f)=>f(c),t());return r=lA(l),n=r.cache.get,i=r.cache.set,a=s,s(u)}function s(u){const l=n(u);if(l)return l;const c=fA(u,r);return i(u,c),c}return function(){return a(dA.apply(null,arguments))}}const De=t=>{const e=r=>r[t]||[];return e.isThemeGetter=!0,e},Yp=/^\[(?:([a-z-]+):)?(.+)\]$/i,pA=/^\d+\/\d+$/,vA=new Set(["px","full","screen"]),yA=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,gA=/\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$/,mA=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,bA=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,wA=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ur=t=>qn(t)||vA.has(t)||pA.test(t),$r=t=>zn(t,"length",TA),qn=t=>!!t&&!Number.isNaN(Number(t)),El=t=>zn(t,"number",qn),la=t=>!!t&&Number.isInteger(Number(t)),_A=t=>t.endsWith("%")&&qn(t.slice(0,-1)),he=t=>Yp.test(t),kr=t=>yA.test(t),xA=new Set(["length","size","percentage"]),OA=t=>zn(t,xA,Xp),SA=t=>zn(t,"position",Xp),AA=new Set(["image","url"]),PA=t=>zn(t,AA,$A),EA=t=>zn(t,"",jA),ca=()=>!0,zn=(t,e,r)=>{const n=Yp.exec(t);return n?n[1]?typeof e=="string"?n[1]===e:e.has(n[1]):r(n[2]):!1},TA=t=>gA.test(t)&&!mA.test(t),Xp=()=>!1,jA=t=>bA.test(t),$A=t=>wA.test(t),kA=hA(()=>{const t=De("colors"),e=De("spacing"),r=De("blur"),n=De("brightness"),i=De("borderColor"),a=De("borderRadius"),o=De("borderSpacing"),s=De("borderWidth"),u=De("contrast"),l=De("grayscale"),c=De("hueRotate"),f=De("invert"),d=De("gap"),h=De("gradientColorStops"),y=De("gradientColorStopPositions"),v=De("inset"),p=De("margin"),m=De("opacity"),b=De("padding"),w=De("saturate"),O=De("scale"),g=De("sepia"),_=De("skew"),S=De("space"),A=De("translate"),T=()=>["auto","contain","none"],M=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto",he,e],j=()=>[he,e],N=()=>["",ur,$r],C=()=>["auto",qn,he],I=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],R=()=>["solid","dashed","dotted","double","none"],L=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],F=()=>["start","end","center","between","around","evenly","stretch"],z=()=>["","0",he],D=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>[qn,he];return{cacheSize:500,separator:":",theme:{colors:[ca],spacing:[ur,$r],blur:["none","",kr,he],brightness:B(),borderColor:[t],borderRadius:["none","","full",kr,he],borderSpacing:j(),borderWidth:N(),contrast:B(),grayscale:z(),hueRotate:B(),invert:z(),gap:j(),gradientColorStops:[t],gradientColorStopPositions:[_A,$r],inset:$(),margin:$(),opacity:B(),padding:j(),saturate:B(),scale:B(),sepia:z(),skew:B(),space:j(),translate:j()},classGroups:{aspect:[{aspect:["auto","square","video",he]}],container:["container"],columns:[{columns:[kr]}],"break-after":[{"break-after":D()}],"break-before":[{"break-before":D()}],"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(),he]}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],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",la,he]}],basis:[{basis:$()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",he]}],grow:[{grow:z()}],shrink:[{shrink:z()}],order:[{order:["first","last","none",la,he]}],"grid-cols":[{"grid-cols":[ca]}],"col-start-end":[{col:["auto",{span:["full",la,he]},he]}],"col-start":[{"col-start":C()}],"col-end":[{"col-end":C()}],"grid-rows":[{"grid-rows":[ca]}],"row-start-end":[{row:["auto",{span:[la,he]},he]}],"row-start":[{"row-start":C()}],"row-end":[{"row-end":C()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",he]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",he]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal",...F()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...F(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...F(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],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",he,e]}],"min-w":[{"min-w":[he,e,"min","max","fit"]}],"max-w":[{"max-w":[he,e,"none","full","min","max","fit","prose",{screen:[kr]},kr]}],h:[{h:[he,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[he,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[he,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[he,e,"auto","min","max","fit"]}],"font-size":[{text:["base",kr,$r]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",El]}],"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",he]}],"line-clamp":[{"line-clamp":["none",qn,El]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ur,he]}],"list-image":[{"list-image":["none",he]}],"list-style-type":[{list:["none","disc","decimal",he]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[m]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...R(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ur,$r]}],"underline-offset":[{"underline-offset":["auto",ur,he]}],"text-decoration-color":[{decoration:[t]}],"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",he]}],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",he]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[m]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...I(),SA]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",OA]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},PA]}],"bg-color":[{bg:[t]}],"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:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"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":[m]}],"border-style":[{border:[...R(),"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":[m]}],"divide-style":[{divide:R()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...R()]}],"outline-offset":[{"outline-offset":[ur,he]}],"outline-w":[{outline:[ur,$r]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:N()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[m]}],"ring-offset-w":[{"ring-offset":[ur,$r]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",kr,EA]}],"shadow-color":[{shadow:[ca]}],opacity:[{opacity:[m]}],"mix-blend":[{"mix-blend":[...L(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":L()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",kr,he]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[f]}],saturate:[{saturate:[w]}],sepia:[{sepia:[g]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[m]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[g]}],"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",he]}],duration:[{duration:B()}],ease:[{ease:["linear","in","out","in-out",he]}],delay:[{delay:B()}],animate:[{animate:["none","spin","ping","pulse","bounce",he]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[O]}],"scale-x":[{"scale-x":[O]}],"scale-y":[{"scale-y":[O]}],rotate:[{rotate:[la,he]}],"translate-x":[{"translate-x":[A]}],"translate-y":[{"translate-y":[A]}],"skew-x":[{"skew-x":[_]}],"skew-y":[{"skew-y":[_]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",he]}],accent:[{accent:["auto",t]}],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",he]}],"caret-color":[{caret:[t]}],"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",he]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[ur,$r,El]}],stroke:[{stroke:[t,"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 it(...t){return kA(le(t))}const CA=eA("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Tl=ve.forwardRef(({className:t,variant:e,size:r,asChild:n=!1,...i},a)=>{const o=n?GS:"button";return E.jsx(o,{className:it(CA({variant:e,size:r,className:t})),ref:a,...i})});Tl.displayName="Button";var IA=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],NA=IA.reduce((t,e)=>{const r=Up(`Primitive.${e}`),n=ve.forwardRef((i,a)=>{const{asChild:o,...s}=i,u=o?r:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(u,{...s,ref:a})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{}),MA="Separator",Jp="horizontal",DA=["horizontal","vertical"],Zp=ve.forwardRef((t,e)=>{const{decorative:r,orientation:n=Jp,...i}=t,a=RA(n)?n:Jp,s=r?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return E.jsx(NA.div,{"data-orientation":a,...s,...i,ref:e})});Zp.displayName=MA;function RA(t){return DA.includes(t)}var Qp=Zp;const ev=ve.forwardRef(({className:t,orientation:e="horizontal",decorative:r=!0,...n},i)=>E.jsx(Qp,{ref:i,decorative:r,orientation:e,className:it("shrink-0 bg-border",e==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",t),...n}));ev.displayName=Qp.displayName;const en=ve.forwardRef(({className:t,...e},r)=>E.jsx("div",{ref:r,className:it("rounded-lg border bg-card text-card-foreground shadow-sm",t),...e}));en.displayName="Card";const jl=ve.forwardRef(({className:t,...e},r)=>E.jsx("div",{ref:r,className:it("flex flex-col space-y-1.5 p-6",t),...e}));jl.displayName="CardHeader";const LA=ve.forwardRef(({className:t,...e},r)=>E.jsx("h3",{ref:r,className:it("text-2xl font-semibold leading-none tracking-tight",t),...e}));LA.displayName="CardTitle";const BA=ve.forwardRef(({className:t,...e},r)=>E.jsx("p",{ref:r,className:it("text-sm text-muted-foreground",t),...e}));BA.displayName="CardDescription";const $l=ve.forwardRef(({className:t,...e},r)=>E.jsx("div",{ref:r,className:it("p-6 pt-0",t),...e}));$l.displayName="CardContent";const UA=ve.forwardRef(({className:t,...e},r)=>E.jsx("div",{ref:r,className:it("flex items-center p-6 pt-0",t),...e}));UA.displayName="CardFooter";var FA=Array.isArray,yt=FA,WA=typeof To=="object"&&To&&To.Object===Object&&To,tv=WA,qA=tv,zA=typeof self=="object"&&self&&self.Object===Object&&self,KA=qA||zA||Function("return this")(),Qt=KA,VA=Qt,HA=VA.Symbol,fa=HA,rv=fa,nv=Object.prototype,GA=nv.hasOwnProperty,YA=nv.toString,da=rv?rv.toStringTag:void 0;function XA(t){var e=GA.call(t,da),r=t[da];try{t[da]=void 0;var n=!0}catch{}var i=YA.call(t);return n&&(e?t[da]=r:delete t[da]),i}var JA=XA,ZA=Object.prototype,QA=ZA.toString;function eP(t){return QA.call(t)}var tP=eP,iv=fa,rP=JA,nP=tP,iP="[object Null]",aP="[object Undefined]",av=iv?iv.toStringTag:void 0;function oP(t){return t==null?t===void 0?aP:iP:av&&av in Object(t)?rP(t):nP(t)}var lr=oP;function sP(t){return t!=null&&typeof t=="object"}var cr=sP,uP=lr,lP=cr,cP="[object Symbol]";function fP(t){return typeof t=="symbol"||lP(t)&&uP(t)==cP}var Kn=fP,dP=yt,hP=Kn,pP=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,vP=/^\w*$/;function yP(t,e){if(dP(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||hP(t)?!0:vP.test(t)||!pP.test(t)||e!=null&&t in Object(e)}var kl=yP;function gP(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Cr=gP;const Vn=je(Cr);var mP=lr,bP=Cr,wP="[object AsyncFunction]",_P="[object Function]",xP="[object GeneratorFunction]",OP="[object Proxy]";function SP(t){if(!bP(t))return!1;var e=mP(t);return e==_P||e==xP||e==wP||e==OP}var Cl=SP;const ae=je(Cl);var AP=Qt,PP=AP["__core-js_shared__"],EP=PP,Il=EP,ov=function(){var t=/[^.]+$/.exec(Il&&Il.keys&&Il.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function TP(t){return!!ov&&ov in t}var jP=TP,$P=Function.prototype,kP=$P.toString;function CP(t){if(t!=null){try{return kP.call(t)}catch{}try{return t+""}catch{}}return""}var sv=CP,IP=Cl,NP=jP,MP=Cr,DP=sv,RP=/[\\^$.*+?()[\]{}|]/g,LP=/^\[object .+?Constructor\]$/,BP=Function.prototype,UP=Object.prototype,FP=BP.toString,WP=UP.hasOwnProperty,qP=RegExp("^"+FP.call(WP).replace(RP,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function zP(t){if(!MP(t)||NP(t))return!1;var e=IP(t)?qP:LP;return e.test(DP(t))}var KP=zP;function VP(t,e){return t==null?void 0:t[e]}var HP=VP,GP=KP,YP=HP;function XP(t,e){var r=YP(t,e);return GP(r)?r:void 0}var tn=XP,JP=tn,ZP=JP(Object,"create"),Ko=ZP,uv=Ko;function QP(){this.__data__=uv?uv(null):{},this.size=0}var eE=QP;function tE(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var rE=tE,nE=Ko,iE="__lodash_hash_undefined__",aE=Object.prototype,oE=aE.hasOwnProperty;function sE(t){var e=this.__data__;if(nE){var r=e[t];return r===iE?void 0:r}return oE.call(e,t)?e[t]:void 0}var uE=sE,lE=Ko,cE=Object.prototype,fE=cE.hasOwnProperty;function dE(t){var e=this.__data__;return lE?e[t]!==void 0:fE.call(e,t)}var hE=dE,pE=Ko,vE="__lodash_hash_undefined__";function yE(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=pE&&e===void 0?vE:e,this}var gE=yE,mE=eE,bE=rE,wE=uE,_E=hE,xE=gE;function Hn(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Hn.prototype.clear=mE,Hn.prototype.delete=bE,Hn.prototype.get=wE,Hn.prototype.has=_E,Hn.prototype.set=xE;var OE=Hn;function SE(){this.__data__=[],this.size=0}var AE=SE;function PE(t,e){return t===e||t!==t&&e!==e}var Nl=PE,EE=Nl;function TE(t,e){for(var r=t.length;r--;)if(EE(t[r][0],e))return r;return-1}var Vo=TE,jE=Vo,$E=Array.prototype,kE=$E.splice;function CE(t){var e=this.__data__,r=jE(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():kE.call(e,r,1),--this.size,!0}var IE=CE,NE=Vo;function ME(t){var e=this.__data__,r=NE(e,t);return r<0?void 0:e[r][1]}var DE=ME,RE=Vo;function LE(t){return RE(this.__data__,t)>-1}var BE=LE,UE=Vo;function FE(t,e){var r=this.__data__,n=UE(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var WE=FE,qE=AE,zE=IE,KE=DE,VE=BE,HE=WE;function Gn(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Gn.prototype.clear=qE,Gn.prototype.delete=zE,Gn.prototype.get=KE,Gn.prototype.has=VE,Gn.prototype.set=HE;var Ho=Gn,GE=tn,YE=Qt,XE=GE(YE,"Map"),Ml=XE,lv=OE,JE=Ho,ZE=Ml;function QE(){this.size=0,this.__data__={hash:new lv,map:new(ZE||JE),string:new lv}}var e1=QE;function t1(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var r1=t1,n1=r1;function i1(t,e){var r=t.__data__;return n1(e)?r[typeof e=="string"?"string":"hash"]:r.map}var Go=i1,a1=Go;function o1(t){var e=a1(this,t).delete(t);return this.size-=e?1:0,e}var s1=o1,u1=Go;function l1(t){return u1(this,t).get(t)}var c1=l1,f1=Go;function d1(t){return f1(this,t).has(t)}var h1=d1,p1=Go;function v1(t,e){var r=p1(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var y1=v1,g1=e1,m1=s1,b1=c1,w1=h1,_1=y1;function Yn(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Yn.prototype.clear=g1,Yn.prototype.delete=m1,Yn.prototype.get=b1,Yn.prototype.has=w1,Yn.prototype.set=_1;var Dl=Yn,cv=Dl,x1="Expected a function";function Rl(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(x1);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=t.apply(this,n);return r.cache=a.set(i,o)||a,o};return r.cache=new(Rl.Cache||cv),r}Rl.Cache=cv;var fv=Rl;const O1=je(fv);var S1=fv,A1=500;function P1(t){var e=S1(t,function(n){return r.size===A1&&r.clear(),n}),r=e.cache;return e}var E1=P1,T1=E1,j1=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,$1=/\\(\\)?/g,k1=T1(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(j1,function(r,n,i,a){e.push(i?a.replace($1,"$1"):n||r)}),e}),C1=k1;function I1(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}var Ll=I1,dv=fa,N1=Ll,M1=yt,D1=Kn,R1=1/0,hv=dv?dv.prototype:void 0,pv=hv?hv.toString:void 0;function vv(t){if(typeof t=="string")return t;if(M1(t))return N1(t,vv)+"";if(D1(t))return pv?pv.call(t):"";var e=t+"";return e=="0"&&1/t==-R1?"-0":e}var L1=vv,B1=L1;function U1(t){return t==null?"":B1(t)}var yv=U1,F1=yt,W1=kl,q1=C1,z1=yv;function K1(t,e){return F1(t)?t:W1(t,e)?[t]:q1(z1(t))}var gv=K1,V1=Kn,H1=1/0;function G1(t){if(typeof t=="string"||V1(t))return t;var e=t+"";return e=="0"&&1/t==-H1?"-0":e}var Yo=G1,Y1=gv,X1=Yo;function J1(t,e){e=Y1(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[X1(e[r++])];return r&&r==n?t:void 0}var Bl=J1,Z1=Bl;function Q1(t,e,r){var n=t==null?void 0:Z1(t,e);return n===void 0?r:n}var mv=Q1;const xt=je(mv);function eT(t){return t==null}var tT=eT;const fe=je(tT);var rT=lr,nT=yt,iT=cr,aT="[object String]";function oT(t){return typeof t=="string"||!nT(t)&&iT(t)&&rT(t)==aT}var sT=oT;const rn=je(sT);var Ul={exports:{}},xe={};/**
|
|
68
|
+
${m}`}class Ke extends Error{constructor({message:e,code:r,cause:n,name:i}){var a;super(e,{cause:n}),this.__isWebAuthnError=!0,this.name=(a=i??(n instanceof Error?n.name:void 0))!==null&&a!==void 0?a:"Unknown Error",this.code=r}}class Wo extends Ke{constructor(e,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:e}),this.name="WebAuthnUnknownError",this.originalError=r}}function AS({error:t,options:e}){var r,n,i;const{publicKey:a}=e;if(!a)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new Ke({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else if(t.name==="ConstraintError"){if(((r=a.authenticatorSelection)===null||r===void 0?void 0:r.requireResidentKey)===!0)return new Ke({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:t});if(e.mediation==="conditional"&&((n=a.authenticatorSelection)===null||n===void 0?void 0:n.userVerification)==="required")return new Ke({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:t});if(((i=a.authenticatorSelection)===null||i===void 0?void 0:i.userVerification)==="required")return new Ke({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:t})}else{if(t.name==="InvalidStateError")return new Ke({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:t});if(t.name==="NotAllowedError")return new Ke({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="NotSupportedError")return a.pubKeyCredParams.filter(s=>s.type==="public-key").length===0?new Ke({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:t}):new Ke({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:t});if(t.name==="SecurityError"){const o=window.location.hostname;if(Mp(o)){if(a.rp.id!==o)return new Ke({message:`The RP ID "${a.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new Ke({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="TypeError"){if(a.user.id.byteLength<1||a.user.id.byteLength>64)return new Ke({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:t})}else if(t.name==="UnknownError")return new Ke({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new Ke({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}function PS({error:t,options:e}){const{publicKey:r}=e;if(!r)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new Ke({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else{if(t.name==="NotAllowedError")return new Ke({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="SecurityError"){const n=window.location.hostname;if(Mp(n)){if(r.rpId!==n)return new Ke({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new Ke({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="UnknownError")return new Ke({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new Ke({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}class ES{createNewAbortSignal(){if(this.controller){const r=new Error("Cancelling existing WebAuthn API call for new one");r.name="AbortError",this.controller.abort(r)}const e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){const e=new Error("Manually cancelling existing WebAuthn API call");e.name="AbortError",this.controller.abort(e),this.controller=void 0}}}const TS=new ES;function jS(t){if(!t)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(t);const{challenge:e,user:r,excludeCredentials:n}=t,i=$n(t,["challenge","user","excludeCredentials"]),a=Rn(e).buffer,o=Object.assign(Object.assign({},r),{id:Rn(r.id).buffer}),s=Object.assign(Object.assign({},i),{challenge:a,user:o});if(n&&n.length>0){s.excludeCredentials=new Array(n.length);for(let u=0;u<n.length;u++){const l=n[u];s.excludeCredentials[u]=Object.assign(Object.assign({},l),{id:Rn(l.id).buffer,type:l.type||"public-key",transports:l.transports})}}return s}function $S(t){if(!t)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(t);const{challenge:e,allowCredentials:r}=t,n=$n(t,["challenge","allowCredentials"]),i=Rn(e).buffer,a=Object.assign(Object.assign({},n),{challenge:i});if(r&&r.length>0){a.allowCredentials=new Array(r.length);for(let o=0;o<r.length;o++){const s=r[o];a.allowCredentials[o]=Object.assign(Object.assign({},s),{id:Rn(s.id).buffer,type:s.type||"public-key",transports:s.transports})}}return a}function kS(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const r=t;return{id:t.id,rawId:t.id,response:{attestationObject:Xr(new Uint8Array(t.response.attestationObject)),clientDataJSON:Xr(new Uint8Array(t.response.clientDataJSON))},type:"public-key",clientExtensionResults:t.getClientExtensionResults(),authenticatorAttachment:(e=r.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function CS(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const r=t,n=t.getClientExtensionResults(),i=t.response;return{id:t.id,rawId:t.id,response:{authenticatorData:Xr(new Uint8Array(i.authenticatorData)),clientDataJSON:Xr(new Uint8Array(i.clientDataJSON)),signature:Xr(new Uint8Array(i.signature)),userHandle:i.userHandle?Xr(new Uint8Array(i.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:(e=r.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function Mp(t){return t==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(t)}function Dp(){var t,e;return!!(lt()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.create)=="function"&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.get)=="function")}async function IS(t){try{const e=await navigator.credentials.create(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new Wo("Browser returned unexpected credential type",e)}:{data:null,error:new Wo("Empty credential response",e)}}catch(e){return{data:null,error:AS({error:e,options:t})}}}async function NS(t){try{const e=await navigator.credentials.get(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new Wo("Browser returned unexpected credential type",e)}:{data:null,error:new Wo("Empty credential response",e)}}catch(e){return{data:null,error:PS({error:e,options:t})}}}const MS={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"none"},DS={userVerification:"preferred",hints:["security-key"]};function qo(...t){const e=i=>i!==null&&typeof i=="object"&&!Array.isArray(i),r=i=>i instanceof ArrayBuffer||ArrayBuffer.isView(i),n={};for(const i of t)if(i)for(const a in i){const o=i[a];if(o!==void 0)if(Array.isArray(o))n[a]=o;else if(r(o))n[a]=o;else if(e(o)){const s=n[a];e(s)?n[a]=qo(s,o):n[a]=qo(o)}else n[a]=o}return n}function RS(t,e){return qo(MS,t,e||{})}function LS(t,e){return qo(DS,t,e||{})}class BS{constructor(e){this.client=e,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(e){return this.client.mfa.enroll(Object.assign(Object.assign({},e),{factorType:"webauthn"}))}async _challenge({factorId:e,webauthn:r,friendlyName:n,signal:i},a){try{const{data:o,error:s}=await this.client.mfa.challenge({factorId:e,webauthn:r});if(!o)return{data:null,error:s};const u=i??TS.createNewAbortSignal();if(o.webauthn.type==="create"){const{user:l}=o.webauthn.credential_options.publicKey;l.name||(l.name=`${l.id}:${n}`),l.displayName||(l.displayName=l.name)}switch(o.webauthn.type){case"create":{const l=RS(o.webauthn.credential_options.publicKey,a==null?void 0:a.create),{data:c,error:f}=await IS({publicKey:l,signal:u});return c?{data:{factorId:e,challengeId:o.id,webauthn:{type:o.webauthn.type,credential_response:c}},error:null}:{data:null,error:f}}case"request":{const l=LS(o.webauthn.credential_options.publicKey,a==null?void 0:a.request),{data:c,error:f}=await NS(Object.assign(Object.assign({},o.webauthn.credential_options),{publicKey:l,signal:u}));return c?{data:{factorId:e,challengeId:o.id,webauthn:{type:o.webauthn.type,credential_response:c}},error:null}:{data:null,error:f}}}}catch(o){return ie(o)?{data:null,error:o}:{data:null,error:new Yr("Unexpected error in challenge",o)}}}async _verify({challengeId:e,factorId:r,webauthn:n}){return this.client.mfa.verify({factorId:r,challengeId:e,webauthn:n})}async _authenticate({factorId:e,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:i}},a){if(!r)return{data:null,error:new sa("rpId is required for WebAuthn authentication")};try{if(!Dp())return{data:null,error:new Yr("Browser does not support WebAuthn",null)};const{data:o,error:s}=await this.challenge({factorId:e,webauthn:{rpId:r,rpOrigins:n},signal:i},{request:a});if(!o)return{data:null,error:s};const{webauthn:u}=o;return this._verify({factorId:e,challengeId:o.challengeId,webauthn:{type:u.type,rpId:r,rpOrigins:n,credential_response:u.credential_response}})}catch(o){return ie(o)?{data:null,error:o}:{data:null,error:new Yr("Unexpected error in authenticate",o)}}}async _register({friendlyName:e,rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:i},a){if(!r)return{data:null,error:new sa("rpId is required for WebAuthn registration")};try{if(!Dp())return{data:null,error:new Yr("Browser does not support WebAuthn",null)};const{data:o,error:s}=await this._enroll({friendlyName:e});if(!o)return await this.client.mfa.listFactors().then(c=>{var f;return(f=c.data)===null||f===void 0?void 0:f.all.find(d=>d.factor_type==="webauthn"&&d.friendly_name===e&&d.status!=="unverified")}).then(c=>c?this.client.mfa.unenroll({factorId:c==null?void 0:c.id}):void 0),{data:null,error:s};const{data:u,error:l}=await this._challenge({factorId:o.id,friendlyName:o.friendly_name,webauthn:{rpId:r,rpOrigins:n},signal:i},{create:a});return u?this._verify({factorId:o.id,challengeId:u.challengeId,webauthn:{rpId:r,rpOrigins:n,type:u.webauthn.type,credential_response:u.webauthn.credential_response}}):{data:null,error:l}}catch(o){return ie(o)?{data:null,error:o}:{data:null,error:new Yr("Unexpected error in register",o)}}}}_S();const US={url:DO,storageKey:RO,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:LO,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1};async function Rp(t,e,r){return await r()}const Wn={};class ua{get jwks(){var e,r;return(r=(e=Wn[this.storageKey])===null||e===void 0?void 0:e.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(e){Wn[this.storageKey]=Object.assign(Object.assign({},Wn[this.storageKey]),{jwks:e})}get jwks_cached_at(){var e,r;return(r=(e=Wn[this.storageKey])===null||e===void 0?void 0:e.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(e){Wn[this.storageKey]=Object.assign(Object.assign({},Wn[this.storageKey]),{cachedAt:e})}constructor(e){var r,n;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log,this.instanceID=ua.nextInstanceID,ua.nextInstanceID+=1,this.instanceID>0&<()&&console.warn("Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.");const i=Object.assign(Object.assign({},US),e);if(this.logDebugMessages=!!i.debug,typeof i.debug=="function"&&(this.logger=i.debug),this.persistSession=i.persistSession,this.storageKey=i.storageKey,this.autoRefreshToken=i.autoRefreshToken,this.admin=new mS({url:i.url,headers:i.headers,fetch:i.fetch}),this.url=i.url,this.headers=i.headers,this.fetch=Ep(i.fetch),this.lock=i.lock||Rp,this.detectSessionInUrl=i.detectSessionInUrl,this.flowType=i.flowType,this.hasCustomAuthorizationHeader=i.hasCustomAuthorizationHeader,i.lock?this.lock=i.lock:lt()&&(!((r=globalThis==null?void 0:globalThis.navigator)===null||r===void 0)&&r.locks)?this.lock=wS:this.lock=Rp,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new BS(this)},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this)},this.persistSession?(i.storage?this.storage=i.storage:Pp()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Cp(this.memoryStorage)),i.userStorage&&(this.userStorage=i.userStorage)):(this.memoryStorage={},this.storage=Cp(this.memoryStorage)),lt()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(a){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",a)}(n=this.broadcastChannel)===null||n===void 0||n.addEventListener("message",async a=>{this._debug("received broadcast notification from other tab or client",a),await this._notifyAllSubscribers(a.data.event,a.data.session,!1)})}this.initialize()}_debug(...e){return this.logDebugMessages&&this.logger(`GoTrueClient@${this.instanceID} (${mp}) ${new Date().toISOString()}`,...e),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(-1,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var e;try{const r=ZO(window.location.href);let n="none";if(this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce"),lt()&&this.detectSessionInUrl&&n!=="none"){const{data:i,error:a}=await this._getSessionFromURL(r,n);if(a){if(this._debug("#_initialize()","error detecting session from URL",a),zO(a)){const u=(e=a.details)===null||e===void 0?void 0:e.code;if(u==="identity_already_exists"||u==="identity_not_found"||u==="single_identity_not_deletable")return{error:a}}return await this._removeSession(),{error:a}}const{session:o,redirectType:s}=i;return this._debug("#_initialize()","detected session in URL",o,"redirect type",s),await this._saveSession(o),setTimeout(async()=>{s==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",o):await this._notifyAllSubscribers("SIGNED_IN",o)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return ie(r)?{error:r}:{error:new Yr("Unexpected error during initialization",r)}}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var r,n,i;try{const a=await ce(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(n=(r=e==null?void 0:e.options)===null||r===void 0?void 0:r.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:(i=e==null?void 0:e.options)===null||i===void 0?void 0:i.captchaToken}},xform:qt}),{data:o,error:s}=a;if(s||!o)return{data:{user:null,session:null},error:s};const u=o.session,l=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",u)),{data:{user:l,session:u},error:null}}catch(a){if(ie(a))return{data:{user:null,session:null},error:a};throw a}}async signUp(e){var r,n,i;try{let a;if("email"in e){const{email:c,password:f,options:d}=e;let h=null,y=null;this.flowType==="pkce"&&([h,y]=await Bn(this.storage,this.storageKey)),a=await ce(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:d==null?void 0:d.emailRedirectTo,body:{email:c,password:f,data:(r=d==null?void 0:d.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:d==null?void 0:d.captchaToken},code_challenge:h,code_challenge_method:y},xform:qt})}else if("phone"in e){const{phone:c,password:f,options:d}=e;a=await ce(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:c,password:f,data:(n=d==null?void 0:d.data)!==null&&n!==void 0?n:{},channel:(i=d==null?void 0:d.channel)!==null&&i!==void 0?i:"sms",gotrue_meta_security:{captcha_token:d==null?void 0:d.captchaToken}},xform:qt})}else throw new Lo("You must provide either an email or phone number and a password");const{data:o,error:s}=a;if(s||!o)return{data:{user:null,session:null},error:s};const u=o.session,l=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",u)),{data:{user:l,session:u},error:null}}catch(a){if(ie(a))return{data:{user:null,session:null},error:a};throw a}}async signInWithPassword(e){try{let r;if("email"in e){const{email:a,password:o,options:s}=e;r=await ce(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:a,password:o,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}},xform:$p})}else if("phone"in e){const{phone:a,password:o,options:s}=e;r=await ce(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:a,password:o,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}},xform:$p})}else throw new Lo("You must provide either an email or phone number and a password");const{data:n,error:i}=r;return i?{data:{user:null,session:null},error:i}:!n||!n.session||!n.user?{data:{user:null,session:null},error:new Dn}:(n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),{data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:i})}catch(r){if(ie(r))return{data:{user:null,session:null},error:r};throw r}}async signInWithOAuth(e){var r,n,i,a;return await this._handleProviderSignIn(e.provider,{redirectTo:(r=e.options)===null||r===void 0?void 0:r.redirectTo,scopes:(n=e.options)===null||n===void 0?void 0:n.scopes,queryParams:(i=e.options)===null||i===void 0?void 0:i.queryParams,skipBrowserRedirect:(a=e.options)===null||a===void 0?void 0:a.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this._acquireLock(-1,async()=>this._exchangeCodeForSession(e))}async signInWithWeb3(e){const{chain:r}=e;switch(r){case"ethereum":return await this.signInWithEthereum(e);case"solana":return await this.signInWithSolana(e);default:throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}}async signInWithEthereum(e){var r,n,i,a,o,s,u,l,c,f,d;let h,y;if("message"in e)h=e.message,y=e.signature;else{const{chain:v,wallet:p,statement:m,options:b}=e;let w;if(lt())if(typeof p=="object")w=p;else{const E=window;if("ethereum"in E&&typeof E.ethereum=="object"&&"request"in E.ethereum&&typeof E.ethereum.request=="function")w=E.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof p!="object"||!(b!=null&&b.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");w=p}const O=new URL((r=b==null?void 0:b.url)!==null&&r!==void 0?r:window.location.href),g=await w.request({method:"eth_requestAccounts"}).then(E=>E).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!g||g.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const _=Np(g[0]);let S=(n=b==null?void 0:b.signInWithEthereum)===null||n===void 0?void 0:n.chainId;if(!S){const E=await w.request({method:"eth_chainId"});S=xS(E)}const A={domain:O.host,address:_,statement:m,uri:O.href,version:"1",chainId:S,nonce:(i=b==null?void 0:b.signInWithEthereum)===null||i===void 0?void 0:i.nonce,issuedAt:(o=(a=b==null?void 0:b.signInWithEthereum)===null||a===void 0?void 0:a.issuedAt)!==null&&o!==void 0?o:new Date,expirationTime:(s=b==null?void 0:b.signInWithEthereum)===null||s===void 0?void 0:s.expirationTime,notBefore:(u=b==null?void 0:b.signInWithEthereum)===null||u===void 0?void 0:u.notBefore,requestId:(l=b==null?void 0:b.signInWithEthereum)===null||l===void 0?void 0:l.requestId,resources:(c=b==null?void 0:b.signInWithEthereum)===null||c===void 0?void 0:c.resources};h=SS(A),y=await w.request({method:"personal_sign",params:[OS(h),_]})}try{const{data:v,error:p}=await ce(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:h,signature:y},!((f=e.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:(d=e.options)===null||d===void 0?void 0:d.captchaToken}}:null),xform:qt});if(p)throw p;return!v||!v.session||!v.user?{data:{user:null,session:null},error:new Dn}:(v.session&&(await this._saveSession(v.session),await this._notifyAllSubscribers("SIGNED_IN",v.session)),{data:Object.assign({},v),error:p})}catch(v){if(ie(v))return{data:{user:null,session:null},error:v};throw v}}async signInWithSolana(e){var r,n,i,a,o,s,u,l,c,f,d,h;let y,v;if("message"in e)y=e.message,v=e.signature;else{const{chain:p,wallet:m,statement:b,options:w}=e;let O;if(lt())if(typeof m=="object")O=m;else{const _=window;if("solana"in _&&typeof _.solana=="object"&&("signIn"in _.solana&&typeof _.solana.signIn=="function"||"signMessage"in _.solana&&typeof _.solana.signMessage=="function"))O=_.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof m!="object"||!(w!=null&&w.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");O=m}const g=new URL((r=w==null?void 0:w.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in O&&O.signIn){const _=await O.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},w==null?void 0:w.signInWithSolana),{version:"1",domain:g.host,uri:g.href}),b?{statement:b}:null));let S;if(Array.isArray(_)&&_[0]&&typeof _[0]=="object")S=_[0];else if(_&&typeof _=="object"&&"signedMessage"in _&&"signature"in _)S=_;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in S&&"signature"in S&&(typeof S.signedMessage=="string"||S.signedMessage instanceof Uint8Array)&&S.signature instanceof Uint8Array)y=typeof S.signedMessage=="string"?S.signedMessage:new TextDecoder().decode(S.signedMessage),v=S.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in O)||typeof O.signMessage!="function"||!("publicKey"in O)||typeof O!="object"||!O.publicKey||!("toBase58"in O.publicKey)||typeof O.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");y=[`${g.host} wants you to sign in with your Solana account:`,O.publicKey.toBase58(),...b?["",b,""]:[""],"Version: 1",`URI: ${g.href}`,`Issued At: ${(i=(n=w==null?void 0:w.signInWithSolana)===null||n===void 0?void 0:n.issuedAt)!==null&&i!==void 0?i:new Date().toISOString()}`,...!((a=w==null?void 0:w.signInWithSolana)===null||a===void 0)&&a.notBefore?[`Not Before: ${w.signInWithSolana.notBefore}`]:[],...!((o=w==null?void 0:w.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${w.signInWithSolana.expirationTime}`]:[],...!((s=w==null?void 0:w.signInWithSolana)===null||s===void 0)&&s.chainId?[`Chain ID: ${w.signInWithSolana.chainId}`]:[],...!((u=w==null?void 0:w.signInWithSolana)===null||u===void 0)&&u.nonce?[`Nonce: ${w.signInWithSolana.nonce}`]:[],...!((l=w==null?void 0:w.signInWithSolana)===null||l===void 0)&&l.requestId?[`Request ID: ${w.signInWithSolana.requestId}`]:[],...!((f=(c=w==null?void 0:w.signInWithSolana)===null||c===void 0?void 0:c.resources)===null||f===void 0)&&f.length?["Resources",...w.signInWithSolana.resources.map(S=>`- ${S}`)]:[]].join(`
|
|
69
|
+
`);const _=await O.signMessage(new TextEncoder().encode(y),"utf8");if(!_||!(_ instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");v=_}}try{const{data:p,error:m}=await ce(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:y,signature:Xr(v)},!((d=e.options)===null||d===void 0)&&d.captchaToken?{gotrue_meta_security:{captcha_token:(h=e.options)===null||h===void 0?void 0:h.captchaToken}}:null),xform:qt});if(m)throw m;return!p||!p.session||!p.user?{data:{user:null,session:null},error:new Dn}:(p.session&&(await this._saveSession(p.session),await this._notifyAllSubscribers("SIGNED_IN",p.session)),{data:Object.assign({},p),error:m})}catch(p){if(ie(p))return{data:{user:null,session:null},error:p};throw p}}async _exchangeCodeForSession(e){const r=await Zr(this.storage,`${this.storageKey}-code-verifier`),[n,i]=(r??"").split("/");try{const{data:a,error:o}=await ce(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:n},xform:qt});if(await Er(this.storage,`${this.storageKey}-code-verifier`),o)throw o;return!a||!a.session||!a.user?{data:{user:null,session:null,redirectType:null},error:new Dn}:(a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",a.session)),{data:Object.assign(Object.assign({},a),{redirectType:i??null}),error:o})}catch(a){if(ie(a))return{data:{user:null,session:null,redirectType:null},error:a};throw a}}async signInWithIdToken(e){try{const{options:r,provider:n,token:i,access_token:a,nonce:o}=e,s=await ce(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:i,access_token:a,nonce:o,gotrue_meta_security:{captcha_token:r==null?void 0:r.captchaToken}},xform:qt}),{data:u,error:l}=s;return l?{data:{user:null,session:null},error:l}:!u||!u.session||!u.user?{data:{user:null,session:null},error:new Dn}:(u.session&&(await this._saveSession(u.session),await this._notifyAllSubscribers("SIGNED_IN",u.session)),{data:u,error:l})}catch(r){if(ie(r))return{data:{user:null,session:null},error:r};throw r}}async signInWithOtp(e){var r,n,i,a,o;try{if("email"in e){const{email:s,options:u}=e;let l=null,c=null;this.flowType==="pkce"&&([l,c]=await Bn(this.storage,this.storageKey));const{error:f}=await ce(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:s,data:(r=u==null?void 0:u.data)!==null&&r!==void 0?r:{},create_user:(n=u==null?void 0:u.shouldCreateUser)!==null&&n!==void 0?n:!0,gotrue_meta_security:{captcha_token:u==null?void 0:u.captchaToken},code_challenge:l,code_challenge_method:c},redirectTo:u==null?void 0:u.emailRedirectTo});return{data:{user:null,session:null},error:f}}if("phone"in e){const{phone:s,options:u}=e,{data:l,error:c}=await ce(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:s,data:(i=u==null?void 0:u.data)!==null&&i!==void 0?i:{},create_user:(a=u==null?void 0:u.shouldCreateUser)!==null&&a!==void 0?a:!0,gotrue_meta_security:{captcha_token:u==null?void 0:u.captchaToken},channel:(o=u==null?void 0:u.channel)!==null&&o!==void 0?o:"sms"}});return{data:{user:null,session:null,messageId:l==null?void 0:l.message_id},error:c}}throw new Lo("You must provide either an email or phone number.")}catch(s){if(ie(s))return{data:{user:null,session:null},error:s};throw s}}async verifyOtp(e){var r,n;try{let i,a;"options"in e&&(i=(r=e.options)===null||r===void 0?void 0:r.redirectTo,a=(n=e.options)===null||n===void 0?void 0:n.captchaToken);const{data:o,error:s}=await ce(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:a}}),redirectTo:i,xform:qt});if(s)throw s;if(!o)throw new Error("An error occurred on token verification.");const u=o.session,l=o.user;return u!=null&&u.access_token&&(await this._saveSession(u),await this._notifyAllSubscribers(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",u)),{data:{user:l,session:u},error:null}}catch(i){if(ie(i))return{data:{user:null,session:null},error:i};throw i}}async signInWithSSO(e){var r,n,i;try{let a=null,o=null;return this.flowType==="pkce"&&([a,o]=await Bn(this.storage,this.storageKey)),await ce(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:(n=(r=e.options)===null||r===void 0?void 0:r.redirectTo)!==null&&n!==void 0?n:void 0}),!((i=e==null?void 0:e.options)===null||i===void 0)&&i.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:a,code_challenge_method:o}),headers:this.headers,xform:vS})}catch(a){if(ie(a))return{data:null,error:a};throw a}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async e=>{const{data:{session:r},error:n}=e;if(n)throw n;if(!r)throw new Wt;const{error:i}=await ce(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return{data:{user:null,session:null},error:i}})}catch(e){if(ie(e))return{data:{user:null,session:null},error:e};throw e}}async resend(e){try{const r=`${this.url}/resend`;if("email"in e){const{email:n,type:i,options:a}=e,{error:o}=await ce(this.fetch,"POST",r,{headers:this.headers,body:{email:n,type:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},redirectTo:a==null?void 0:a.emailRedirectTo});return{data:{user:null,session:null},error:o}}else if("phone"in e){const{phone:n,type:i,options:a}=e,{data:o,error:s}=await ce(this.fetch,"POST",r,{headers:this.headers,body:{phone:n,type:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}}});return{data:{user:null,session:null,messageId:o==null?void 0:o.message_id},error:s}}throw new Lo("You must provide either an email or phone number and a type")}catch(r){if(ie(r))return{data:{user:null,session:null},error:r};throw r}}async getSession(){return await this.initializePromise,await this._acquireLock(-1,async()=>this._useSession(async r=>r))}async _acquireLock(e,r){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){const n=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),i=(async()=>(await n,await r()))();return this.pendingInLock.push((async()=>{try{await i}catch{}})()),i}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const n=r();for(this.pendingInLock.push((async()=>{try{await n}catch{}})()),await n;this.pendingInLock.length;){const i=[...this.pendingInLock];await Promise.all(i),this.pendingInLock.splice(0,i.length)}return await n}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(e){this._debug("#_useSession","begin");try{const r=await this.__loadSession();return await e(r)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let e=null;const r=await Zr(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?e=r:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!e)return{data:{session:null},error:null};const n=e.expires_at?e.expires_at*1e3-Date.now()<yl:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",e.expires_at),!n){if(this.userStorage){const o=await Zr(this.userStorage,this.storageKey+"-user");o!=null&&o.user?e.user=o.user:e.user=xl()}if(this.storage.isServer&&e.user&&!e.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};e.user=fS(e.user,o),o.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:e},error:null}}const{data:i,error:a}=await this._callRefreshToken(e.refresh_token);return a?{data:{session:null},error:a}:{data:{session:i},error:null}}finally{this._debug("#__loadSession()","end")}}async getUser(e){return e?await this._getUser(e):(await this.initializePromise,await this._acquireLock(-1,async()=>await this._getUser()))}async _getUser(e){try{return e?await ce(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:Tr}):await this._useSession(async r=>{var n,i,a;const{data:o,error:s}=r;if(s)throw s;return!(!((n=o.session)===null||n===void 0)&&n.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Wt}:await ce(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(a=(i=o.session)===null||i===void 0?void 0:i.access_token)!==null&&a!==void 0?a:void 0,xform:Tr})})}catch(r){if(ie(r))return qO(r)&&(await this._removeSession(),await Er(this.storage,`${this.storageKey}-code-verifier`)),{data:{user:null},error:r};throw r}}async updateUser(e,r={}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._updateUser(e,r))}async _updateUser(e,r={}){try{return await this._useSession(async n=>{const{data:i,error:a}=n;if(a)throw a;if(!i.session)throw new Wt;const o=i.session;let s=null,u=null;this.flowType==="pkce"&&e.email!=null&&([s,u]=await Bn(this.storage,this.storageKey));const{data:l,error:c}=await ce(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r==null?void 0:r.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:s,code_challenge_method:u}),jwt:o.access_token,xform:Tr});if(c)throw c;return o.user=l.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),{data:{user:o.user},error:null}})}catch(n){if(ie(n))return{data:{user:null},error:n};throw n}}async setSession(e){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._setSession(e))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new Wt;const r=Date.now()/1e3;let n=r,i=!0,a=null;const{payload:o}=_l(e.access_token);if(o.exp&&(n=o.exp,i=n<=r),i){const{data:s,error:u}=await this._callRefreshToken(e.refresh_token);if(u)return{data:{user:null,session:null},error:u};if(!s)return{data:{user:null,session:null},error:null};a=s}else{const{data:s,error:u}=await this._getUser(e.access_token);if(u)throw u;a={access_token:e.access_token,refresh_token:e.refresh_token,user:s.user,token_type:"bearer",expires_in:n-r,expires_at:n},await this._saveSession(a),await this._notifyAllSubscribers("SIGNED_IN",a)}return{data:{user:a.user,session:a},error:null}}catch(r){if(ie(r))return{data:{session:null,user:null},error:r};throw r}}async refreshSession(e){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._refreshSession(e))}async _refreshSession(e){try{return await this._useSession(async r=>{var n;if(!e){const{data:o,error:s}=r;if(s)throw s;e=(n=o.session)!==null&&n!==void 0?n:void 0}if(!(e!=null&&e.refresh_token))throw new Wt;const{data:i,error:a}=await this._callRefreshToken(e.refresh_token);return a?{data:{user:null,session:null},error:a}:i?{data:{user:i.user,session:i},error:null}:{data:{user:null,session:null},error:null}})}catch(r){if(ie(r))return{data:{user:null,session:null},error:r};throw r}}async _getSessionFromURL(e,r){try{if(!lt())throw new Bo("No browser detected.");if(e.error||e.error_description||e.error_code)throw new Bo(e.error_description||"Error in URL with unspecified error_description",{error:e.error||"unspecified_error",code:e.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new wp("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Bo("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!e.code)throw new wp("No code detected.");const{data:b,error:w}=await this._exchangeCodeForSession(e.code);if(w)throw w;const O=new URL(window.location.href);return O.searchParams.delete("code"),window.history.replaceState(window.history.state,"",O.toString()),{data:{session:b.session,redirectType:null},error:null}}const{provider_token:n,provider_refresh_token:i,access_token:a,refresh_token:o,expires_in:s,expires_at:u,token_type:l}=e;if(!a||!s||!o||!l)throw new Bo("No session defined in URL");const c=Math.round(Date.now()/1e3),f=parseInt(s);let d=c+f;u&&(d=parseInt(u));const h=d-c;h*1e3<=Mn&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${h}s, should have been closer to ${f}s`);const y=d-f;c-y>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",y,d,c):c-y<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",y,d,c);const{data:v,error:p}=await this._getUser(a);if(p)throw p;const m={provider_token:n,provider_refresh_token:i,access_token:a,expires_in:f,expires_at:d,refresh_token:o,token_type:l,user:v.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),{data:{session:m,redirectType:e.type},error:null}}catch(n){if(ie(n))return{data:{session:null,redirectType:null},error:n};throw n}}_isImplicitGrantCallback(e){return!!(e.access_token||e.error_description)}async _isPKCECallback(e){const r=await Zr(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&r)}async signOut(e={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._signOut(e))}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async r=>{var n;const{data:i,error:a}=r;if(a)return{error:a};const o=(n=i.session)===null||n===void 0?void 0:n.access_token;if(o){const{error:s}=await this.admin.signOut(o,e);if(s&&!(WO(s)&&(s.status===404||s.status===401||s.status===403)))return{error:s}}return e!=="others"&&(await this._removeSession(),await Er(this.storage,`${this.storageKey}-code-verifier`)),{error:null}})}onAuthStateChange(e){const r=JO(),n={id:r,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",r),this.stateChangeEmitters.delete(r)}};return this._debug("#onAuthStateChange()","registered callback with id",r),this.stateChangeEmitters.set(r,n),(async()=>(await this.initializePromise,await this._acquireLock(-1,async()=>{this._emitInitialSession(r)})))(),{data:{subscription:n}}}async _emitInitialSession(e){return await this._useSession(async r=>{var n,i;try{const{data:{session:a},error:o}=r;if(o)throw o;await((n=this.stateChangeEmitters.get(e))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",a)),this._debug("INITIAL_SESSION","callback id",e,"session",a)}catch(a){await((i=this.stateChangeEmitters.get(e))===null||i===void 0?void 0:i.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",a),console.error(a)}})}async resetPasswordForEmail(e,r={}){let n=null,i=null;this.flowType==="pkce"&&([n,i]=await Bn(this.storage,this.storageKey,!0));try{return await ce(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:n,code_challenge_method:i,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(a){if(ie(a))return{data:null,error:a};throw a}}async getUserIdentities(){var e;try{const{data:r,error:n}=await this.getUser();if(n)throw n;return{data:{identities:(e=r.user.identities)!==null&&e!==void 0?e:[]},error:null}}catch(r){if(ie(r))return{data:null,error:r};throw r}}async linkIdentity(e){return"token"in e?this.linkIdentityIdToken(e):this.linkIdentityOAuth(e)}async linkIdentityOAuth(e){var r;try{const{data:n,error:i}=await this._useSession(async a=>{var o,s,u,l,c;const{data:f,error:d}=a;if(d)throw d;const h=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(o=e.options)===null||o===void 0?void 0:o.redirectTo,scopes:(s=e.options)===null||s===void 0?void 0:s.scopes,queryParams:(u=e.options)===null||u===void 0?void 0:u.queryParams,skipBrowserRedirect:!0});return await ce(this.fetch,"GET",h,{headers:this.headers,jwt:(c=(l=f.session)===null||l===void 0?void 0:l.access_token)!==null&&c!==void 0?c:void 0})});if(i)throw i;return lt()&&!(!((r=e.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(n==null?void 0:n.url),{data:{provider:e.provider,url:n==null?void 0:n.url},error:null}}catch(n){if(ie(n))return{data:{provider:e.provider,url:null},error:n};throw n}}async linkIdentityIdToken(e){return await this._useSession(async r=>{var n;try{const{error:i,data:{session:a}}=r;if(i)throw i;const{options:o,provider:s,token:u,access_token:l,nonce:c}=e,f=await ce(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(n=a==null?void 0:a.access_token)!==null&&n!==void 0?n:void 0,body:{provider:s,id_token:u,access_token:l,nonce:c,link_identity:!0,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:qt}),{data:d,error:h}=f;return h?{data:{user:null,session:null},error:h}:!d||!d.session||!d.user?{data:{user:null,session:null},error:new Dn}:(d.session&&(await this._saveSession(d.session),await this._notifyAllSubscribers("USER_UPDATED",d.session)),{data:d,error:h})}catch(i){if(ie(i))return{data:{user:null,session:null},error:i};throw i}})}async unlinkIdentity(e){try{return await this._useSession(async r=>{var n,i;const{data:a,error:o}=r;if(o)throw o;return await ce(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:(i=(n=a.session)===null||n===void 0?void 0:n.access_token)!==null&&i!==void 0?i:void 0})})}catch(r){if(ie(r))return{data:null,error:r};throw r}}async _refreshAccessToken(e){const r=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(r,"begin");try{const n=Date.now();return await tS(async i=>(i>0&&await eS(200*Math.pow(2,i-1)),this._debug(r,"refreshing attempt",i),await ce(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:qt})),(i,a)=>{const o=200*Math.pow(2,i);return a&&bl(a)&&Date.now()+o-n<Mn})}catch(n){if(this._debug(r,"error",n),ie(n))return{data:{session:null,user:null},error:n};throw n}finally{this._debug(r,"end")}}_isValidSession(e){return typeof e=="object"&&e!==null&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,r){const n=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",r,"url",n),lt()&&!r.skipBrowserRedirect&&window.location.assign(n),{data:{provider:e,url:n},error:null}}async _recoverAndRefresh(){var e,r;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const i=await Zr(this.storage,this.storageKey);if(i&&this.userStorage){let o=await Zr(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:i.user},await Ln(this.userStorage,this.storageKey+"-user",o)),i.user=(e=o==null?void 0:o.user)!==null&&e!==void 0?e:xl()}else if(i&&!i.user&&!i.user){const o=await Zr(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(i.user=o.user,await Er(this.storage,this.storageKey+"-user"),await Ln(this.storage,this.storageKey,i)):i.user=xl()}if(this._debug(n,"session from storage",i),!this._isValidSession(i)){this._debug(n,"session is not valid"),i!==null&&await this._removeSession();return}const a=((r=i.expires_at)!==null&&r!==void 0?r:1/0)*1e3-Date.now()<yl;if(this._debug(n,`session has${a?"":" not"} expired with margin of ${yl}s`),a){if(this.autoRefreshToken&&i.refresh_token){const{error:o}=await this._callRefreshToken(i.refresh_token);o&&(console.error(o),bl(o)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",o),await this._removeSession()))}}else if(i.user&&i.user.__isUserNotAvailableProxy===!0)try{const{data:o,error:s}=await this._getUser(i.access_token);!s&&(o!=null&&o.user)?(i.user=o.user,await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)):this._debug(n,"could not get user data, skipping SIGNED_IN notification")}catch(o){console.error("Error getting user data:",o),this._debug(n,"error getting user data, skipping SIGNED_IN notification",o)}else await this._notifyAllSubscribers("SIGNED_IN",i)}catch(i){this._debug(n,"error",i),console.error(i);return}finally{this._debug(n,"end")}}async _callRefreshToken(e){var r,n;if(!e)throw new Wt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const i=`#_callRefreshToken(${e.substring(0,5)}...)`;this._debug(i,"begin");try{this.refreshingDeferred=new Fo;const{data:a,error:o}=await this._refreshAccessToken(e);if(o)throw o;if(!a.session)throw new Wt;await this._saveSession(a.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",a.session);const s={data:a.session,error:null};return this.refreshingDeferred.resolve(s),s}catch(a){if(this._debug(i,"error",a),ie(a)){const o={data:null,error:a};return bl(a)||await this._removeSession(),(r=this.refreshingDeferred)===null||r===void 0||r.resolve(o),o}throw(n=this.refreshingDeferred)===null||n===void 0||n.reject(a),a}finally{this.refreshingDeferred=null,this._debug(i,"end")}}async _notifyAllSubscribers(e,r,n=!0){const i=`#_notifyAllSubscribers(${e})`;this._debug(i,"begin",r,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:e,session:r});const a=[],o=Array.from(this.stateChangeEmitters.values()).map(async s=>{try{await s.callback(e,r)}catch(u){a.push(u)}});if(await Promise.all(o),a.length>0){for(let s=0;s<a.length;s+=1)console.error(a[s]);throw a[0]}}finally{this._debug(i,"end")}}async _saveSession(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0;const r=Object.assign({},e),n=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&r.user&&await Ln(this.userStorage,this.storageKey+"-user",{user:r.user});const i=Object.assign({},r);delete i.user;const a=Tp(i);await Ln(this.storage,this.storageKey,a)}else{const i=Tp(r);await Ln(this.storage,this.storageKey,i)}}async _removeSession(){this._debug("#_removeSession()"),await Er(this.storage,this.storageKey),await Er(this.storage,this.storageKey+"-code-verifier"),await Er(this.storage,this.storageKey+"-user"),this.userStorage&&await Er(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&<()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",e)}catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const e=setInterval(()=>this._autoRefreshTokenTick(),Mn);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e),setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const e=Date.now();try{return await this._useSession(async r=>{const{data:{session:n}}=r;if(!n||!n.refresh_token||!n.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const i=Math.floor((n.expires_at*1e3-e)/Mn);this._debug("#_autoRefreshTokenTick()",`access token expires in ${i} ticks, a tick lasts ${Mn}ms, refresh threshold is ${vl} ticks`),i<=vl&&await this._callRefreshToken(n.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(e){if(e.isAcquireTimeout||e instanceof Ip)this._debug("auto refresh token tick lock not available");else throw e}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!lt()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){const r=`#_onVisibilityChanged(${e})`;this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),e||(await this.initializePromise,await this._acquireLock(-1,async()=>{if(document.visibilityState!=="visible"){this._debug(r,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e,r,n){const i=[`provider=${encodeURIComponent(r)}`];if(n!=null&&n.redirectTo&&i.push(`redirect_to=${encodeURIComponent(n.redirectTo)}`),n!=null&&n.scopes&&i.push(`scopes=${encodeURIComponent(n.scopes)}`),this.flowType==="pkce"){const[a,o]=await Bn(this.storage,this.storageKey),s=new URLSearchParams({code_challenge:`${encodeURIComponent(a)}`,code_challenge_method:`${encodeURIComponent(o)}`});i.push(s.toString())}if(n!=null&&n.queryParams){const a=new URLSearchParams(n.queryParams);i.push(a.toString())}return n!=null&&n.skipBrowserRedirect&&i.push(`skip_http_redirect=${n.skipBrowserRedirect}`),`${e}?${i.join("&")}`}async _unenroll(e){try{return await this._useSession(async r=>{var n;const{data:i,error:a}=r;return a?{data:null,error:a}:await ce(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if(ie(r))return{data:null,error:r};throw r}}async _enroll(e){try{return await this._useSession(async r=>{var n,i;const{data:a,error:o}=r;if(o)return{data:null,error:o};const s=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType==="phone"?{phone:e.phone}:e.factorType==="totp"?{issuer:e.issuer}:{}),{data:u,error:l}=await ce(this.fetch,"POST",`${this.url}/factors`,{body:s,headers:this.headers,jwt:(n=a==null?void 0:a.session)===null||n===void 0?void 0:n.access_token});return l?{data:null,error:l}:(e.factorType==="totp"&&u.type==="totp"&&(!((i=u==null?void 0:u.totp)===null||i===void 0)&&i.qr_code)&&(u.totp.qr_code=`data:image/svg+xml;utf-8,${u.totp.qr_code}`),{data:u,error:null})})}catch(r){if(ie(r))return{data:null,error:r};throw r}}async _verify(e){return this._acquireLock(-1,async()=>{try{return await this._useSession(async r=>{var n;const{data:i,error:a}=r;if(a)return{data:null,error:a};const o=Object.assign({challenge_id:e.challengeId},"webauthn"in e?{webauthn:Object.assign(Object.assign({},e.webauthn),{credential_response:e.webauthn.type==="create"?kS(e.webauthn.credential_response):CS(e.webauthn.credential_response)})}:{code:e.code}),{data:s,error:u}=await ce(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:o,headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token});return u?{data:null,error:u}:(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+s.expires_in},s)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",s),{data:s,error:u})})}catch(r){if(ie(r))return{data:null,error:r};throw r}})}async _challenge(e){return this._acquireLock(-1,async()=>{try{return await this._useSession(async r=>{var n;const{data:i,error:a}=r;if(a)return{data:null,error:a};const o=await ce(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:e,headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token});if(o.error)return o;const{data:s}=o;if(s.type!=="webauthn")return{data:s,error:null};switch(s.webauthn.type){case"create":return{data:Object.assign(Object.assign({},s),{webauthn:Object.assign(Object.assign({},s.webauthn),{credential_options:Object.assign(Object.assign({},s.webauthn.credential_options),{publicKey:jS(s.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},s),{webauthn:Object.assign(Object.assign({},s.webauthn),{credential_options:Object.assign(Object.assign({},s.webauthn.credential_options),{publicKey:$S(s.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if(ie(r))return{data:null,error:r};throw r}})}async _challengeAndVerify(e){const{data:r,error:n}=await this._challenge({factorId:e.factorId});return n?{data:null,error:n}:await this._verify({factorId:e.factorId,challengeId:r.id,code:e.code})}async _listFactors(){var e;const{data:{user:r},error:n}=await this.getUser();if(n)return{data:null,error:n};const i={all:[],phone:[],totp:[],webauthn:[]};for(const a of(e=r==null?void 0:r.factors)!==null&&e!==void 0?e:[])i.all.push(a),a.status==="verified"&&i[a.factor_type].push(a);return{data:i,error:null}}async _getAuthenticatorAssuranceLevel(){var e,r;const{data:{session:n},error:i}=await this.getSession();if(i)return{data:null,error:i};if(!n)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:a}=_l(n.access_token);let o=null;a.aal&&(o=a.aal);let s=o;((r=(e=n.user.factors)===null||e===void 0?void 0:e.filter(c=>c.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(s="aal2");const l=a.amr||[];return{data:{currentLevel:o,nextLevel:s,currentAuthenticationMethods:l},error:null}}async _getAuthorizationDetails(e){try{return await this._useSession(async r=>{const{data:{session:n},error:i}=r;return i?{data:null,error:i}:n?await ce(this.fetch,"GET",`${this.url}/oauth/authorizations/${e}`,{headers:this.headers,jwt:n.access_token,xform:a=>({data:a,error:null})}):{data:null,error:new Wt}})}catch(r){if(ie(r))return{data:null,error:r};throw r}}async _approveAuthorization(e,r){try{return await this._useSession(async n=>{const{data:{session:i},error:a}=n;if(a)return{data:null,error:a};if(!i)return{data:null,error:new Wt};const o=await ce(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:i.access_token,body:{action:"approve"},xform:s=>({data:s,error:null})});return o.data&&o.data.redirect_url&<()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if(ie(n))return{data:null,error:n};throw n}}async _denyAuthorization(e,r){try{return await this._useSession(async n=>{const{data:{session:i},error:a}=n;if(a)return{data:null,error:a};if(!i)return{data:null,error:new Wt};const o=await ce(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:i.access_token,body:{action:"deny"},xform:s=>({data:s,error:null})});return o.data&&o.data.redirect_url&<()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if(ie(n))return{data:null,error:n};throw n}}async fetchJwk(e,r={keys:[]}){let n=r.keys.find(s=>s.kid===e);if(n)return n;const i=Date.now();if(n=this.jwks.keys.find(s=>s.kid===e),n&&this.jwks_cached_at+UO>i)return n;const{data:a,error:o}=await ce(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(o)throw o;return!a.keys||a.keys.length===0||(this.jwks=a,this.jwks_cached_at=i,n=a.keys.find(s=>s.kid===e),!n)?null:n}async getClaims(e,r={}){try{let n=e;if(!n){const{data:h,error:y}=await this.getSession();if(y||!h.session)return{data:null,error:y};n=h.session.access_token}const{header:i,payload:a,signature:o,raw:{header:s,payload:u}}=_l(n);r!=null&&r.allowExpired||uS(a.exp);const l=!i.alg||i.alg.startsWith("HS")||!i.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(i.kid,r!=null&&r.keys?{keys:r.keys}:r==null?void 0:r.jwks);if(!l){const{error:h}=await this.getUser(n);if(h)throw h;return{data:{claims:a,header:i,signature:o},error:null}}const c=lS(i.alg),f=await crypto.subtle.importKey("jwk",l,c,!0,["verify"]);if(!await crypto.subtle.verify(c,f,o,YO(`${s}.${u}`)))throw new wl("Invalid JWT signature");return{data:{claims:a,header:i,signature:o},error:null}}catch(n){if(ie(n))return{data:null,error:n};throw n}}}ua.nextInstanceID=0;const FS=ua;class WS extends FS{constructor(e){super(e)}}class qS{constructor(e,r,n){var i,a,o;this.supabaseUrl=e,this.supabaseKey=r;const s=MO(e);if(!r)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",s),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",s),this.storageUrl=new URL("storage/v1",s),this.functionsUrl=new URL("functions/v1",s);const u=`sb-${s.hostname.split(".")[0]}-auth-token`,l={db:EO,realtime:jO,auth:Object.assign(Object.assign({},TO),{storageKey:u}),global:PO},c=NO(n??{},l);this.storageKey=(i=c.auth.storageKey)!==null&&i!==void 0?i:"",this.headers=(a=c.global.headers)!==null&&a!==void 0?a:{},c.accessToken?(this.accessToken=c.accessToken,this.auth=new Proxy({},{get:(f,d)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(d)} is not possible`)}})):this.auth=this._initSupabaseAuthClient((o=c.auth)!==null&&o!==void 0?o:{},this.headers,c.global.fetch),this.fetch=CO(r,this._getAccessToken.bind(this),c.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers,accessToken:this._getAccessToken.bind(this)},c.realtime)),this.rest=new Lx(new URL("rest/v1",s).href,{headers:this.headers,schema:c.db.schema,fetch:this.fetch}),this.storage=new SO(this.storageUrl.href,this.headers,this.fetch,n==null?void 0:n.storage),c.accessToken||this._listenForAuthEvents()}get functions(){return new $x(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,r={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,r,n)}channel(e,r={config:{}}){return this.realtime.channel(e,r)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e,r;if(this.accessToken)return await this.accessToken();const{data:n}=await this.auth.getSession();return(r=(e=n.session)===null||e===void 0?void 0:e.access_token)!==null&&r!==void 0?r:this.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:r,detectSessionInUrl:n,storage:i,userStorage:a,storageKey:o,flowType:s,lock:u,debug:l},c,f){const d={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new WS({url:this.authUrl.href,headers:Object.assign(Object.assign({},d),c),storageKey:o,autoRefreshToken:e,persistSession:r,detectSessionInUrl:n,storage:i,userStorage:a,flowType:s,lock:u,debug:l,fetch:f,hasCustomAuthorizationHeader:Object.keys(this.headers).some(h=>h.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new eO(this.realtimeUrl.href,Object.assign(Object.assign({},e),{params:Object.assign({apikey:this.supabaseKey},e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((r,n)=>{this._handleTokenChanged(r,"CLIENT",n==null?void 0:n.access_token)})}_handleTokenChanged(e,r,n){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==n?(this.changedAccessToken=n,this.realtime.setAuth(n)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),r=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}}const zS=(t,e,r)=>new qS(t,e,r);function KS(){if(typeof window<"u"||typeof process>"u")return!1;const t=process.version;if(t==null)return!1;const e=t.match(/^v(\d+)\./);return e?parseInt(e[1],10)<=18:!1}KS()&&console.warn("⚠️ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const ct=zS("https://qvfepptmcxwvalmbkgur.supabase.co","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InF2ZmVwcHRtY3h3dmFsbWJrZ3VyIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjE5MjE4NTEsImV4cCI6MjA3NzQ5Nzg1MX0.kuPTAjW1i54uJHZAAAZqAe-sZCKPHTdUPoRbAky-cQk",{auth:{storage:localStorage,persistSession:!0,autoRefreshToken:!0}});function Lp(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function VS(...t){return e=>{let r=!1;const n=t.map(i=>{const a=Lp(i,e);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let i=0;i<n.length;i++){const a=n[i];typeof a=="function"?a():Lp(t[i],null)}}}}function Bp(t){const e=GS(t),r=ve.forwardRef((n,i)=>{const{children:a,...o}=n,s=ve.Children.toArray(a),u=s.find(XS);if(u){const l=u.props.children,c=s.map(f=>f===u?ve.Children.count(l)>1?ve.Children.only(null):ve.isValidElement(l)?l.props.children:null:f);return P.jsx(e,{...o,ref:i,children:ve.isValidElement(l)?ve.cloneElement(l,void 0,c):null})}return P.jsx(e,{...o,ref:i,children:a})});return r.displayName=`${t}.Slot`,r}var HS=Bp("Slot");function GS(t){const e=ve.forwardRef((r,n)=>{const{children:i,...a}=r;if(ve.isValidElement(i)){const o=ZS(i),s=JS(a,i.props);return i.type!==ve.Fragment&&(s.ref=n?VS(n,o):o),ve.cloneElement(i,s)}return ve.Children.count(i)>1?ve.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var YS=Symbol("radix.slottable");function XS(t){return ve.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===YS}function JS(t,e){const r={...e};for(const n in e){const i=t[n],a=e[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...s)=>{const u=a(...s);return i(...s),u}:i&&(r[n]=i):n==="style"?r[n]={...i,...a}:n==="className"&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...t,...r}}function ZS(t){var n,i;let e=(n=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:n.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}function Up(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(r=Up(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function le(){for(var t,e,r=0,n="",i=arguments.length;r<i;r++)(t=arguments[r])&&(e=Up(t))&&(n&&(n+=" "),n+=e);return n}const Fp=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Wp=le,QS=(t,e)=>r=>{var n;if((e==null?void 0:e.variants)==null)return Wp(t,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:i,defaultVariants:a}=e,o=Object.keys(i).map(l=>{const c=r==null?void 0:r[l],f=a==null?void 0:a[l];if(c===null)return null;const d=Fp(c)||Fp(f);return i[l][d]}),s=r&&Object.entries(r).reduce((l,c)=>{let[f,d]=c;return d===void 0||(l[f]=d),l},{}),u=e==null||(n=e.compoundVariants)===null||n===void 0?void 0:n.reduce((l,c)=>{let{class:f,className:d,...h}=c;return Object.entries(h).every(y=>{let[v,p]=y;return Array.isArray(p)?p.includes({...a,...s}[v]):{...a,...s}[v]===p})?[...l,f,d]:l},[]);return Wp(t,o,u,r==null?void 0:r.class,r==null?void 0:r.className)},Sl="-",eA=t=>{const e=rA(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=t;return{getClassGroupId:o=>{const s=o.split(Sl);return s[0]===""&&s.length!==1&&s.shift(),qp(s,e)||tA(o)},getConflictingClassGroupIds:(o,s)=>{const u=r[o]||[];return s&&n[o]?[...u,...n[o]]:u}}},qp=(t,e)=>{var o;if(t.length===0)return e.classGroupId;const r=t[0],n=e.nextPart.get(r),i=n?qp(t.slice(1),n):void 0;if(i)return i;if(e.validators.length===0)return;const a=t.join(Sl);return(o=e.validators.find(({validator:s})=>s(a)))==null?void 0:o.classGroupId},zp=/^\[(.+)\]$/,tA=t=>{if(zp.test(t)){const e=zp.exec(t)[1],r=e==null?void 0:e.substring(0,e.indexOf(":"));if(r)return"arbitrary.."+r}},rA=t=>{const{theme:e,prefix:r}=t,n={nextPart:new Map,validators:[]};return iA(Object.entries(t.classGroups),r).forEach(([a,o])=>{Al(o,n,a,e)}),n},Al=(t,e,r,n)=>{t.forEach(i=>{if(typeof i=="string"){const a=i===""?e:Kp(e,i);a.classGroupId=r;return}if(typeof i=="function"){if(nA(i)){Al(i(n),e,r,n);return}e.validators.push({validator:i,classGroupId:r});return}Object.entries(i).forEach(([a,o])=>{Al(o,Kp(e,a),r,n)})})},Kp=(t,e)=>{let r=t;return e.split(Sl).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},nA=t=>t.isThemeGetter,iA=(t,e)=>e?t.map(([r,n])=>{const i=n.map(a=>typeof a=="string"?e+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([o,s])=>[e+o,s])):a);return[r,i]}):t,aA=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,r=new Map,n=new Map;const i=(a,o)=>{r.set(a,o),e++,e>t&&(e=0,n=r,r=new Map)};return{get(a){let o=r.get(a);if(o!==void 0)return o;if((o=n.get(a))!==void 0)return i(a,o),o},set(a,o){r.has(a)?r.set(a,o):i(a,o)}}},Vp="!",oA=t=>{const{separator:e,experimentalParseClassName:r}=t,n=e.length===1,i=e[0],a=e.length,o=s=>{const u=[];let l=0,c=0,f;for(let p=0;p<s.length;p++){let m=s[p];if(l===0){if(m===i&&(n||s.slice(p,p+a)===e)){u.push(s.slice(c,p)),c=p+a;continue}if(m==="/"){f=p;continue}}m==="["?l++:m==="]"&&l--}const d=u.length===0?s:s.substring(c),h=d.startsWith(Vp),y=h?d.substring(1):d,v=f&&f>c?f-c:void 0;return{modifiers:u,hasImportantModifier:h,baseClassName:y,maybePostfixModifierPosition:v}};return r?s=>r({className:s,parseClassName:o}):o},sA=t=>{if(t.length<=1)return t;const e=[];let r=[];return t.forEach(n=>{n[0]==="["?(e.push(...r.sort(),n),r=[]):r.push(n)}),e.push(...r.sort()),e},uA=t=>({cache:aA(t.cacheSize),parseClassName:oA(t),...eA(t)}),lA=/\s+/,cA=(t,e)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i}=e,a=[],o=t.trim().split(lA);let s="";for(let u=o.length-1;u>=0;u-=1){const l=o[u],{modifiers:c,hasImportantModifier:f,baseClassName:d,maybePostfixModifierPosition:h}=r(l);let y=!!h,v=n(y?d.substring(0,h):d);if(!v){if(!y){s=l+(s.length>0?" "+s:s);continue}if(v=n(d),!v){s=l+(s.length>0?" "+s:s);continue}y=!1}const p=sA(c).join(":"),m=f?p+Vp:p,b=m+v;if(a.includes(b))continue;a.push(b);const w=i(v,y);for(let O=0;O<w.length;++O){const g=w[O];a.push(m+g)}s=l+(s.length>0?" "+s:s)}return s};function fA(){let t=0,e,r,n="";for(;t<arguments.length;)(e=arguments[t++])&&(r=Hp(e))&&(n&&(n+=" "),n+=r);return n}const Hp=t=>{if(typeof t=="string")return t;let e,r="";for(let n=0;n<t.length;n++)t[n]&&(e=Hp(t[n]))&&(r&&(r+=" "),r+=e);return r};function dA(t,...e){let r,n,i,a=o;function o(u){const l=e.reduce((c,f)=>f(c),t());return r=uA(l),n=r.cache.get,i=r.cache.set,a=s,s(u)}function s(u){const l=n(u);if(l)return l;const c=cA(u,r);return i(u,c),c}return function(){return a(fA.apply(null,arguments))}}const De=t=>{const e=r=>r[t]||[];return e.isThemeGetter=!0,e},Gp=/^\[(?:([a-z-]+):)?(.+)\]$/i,hA=/^\d+\/\d+$/,pA=new Set(["px","full","screen"]),vA=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,yA=/\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$/,gA=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,mA=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,bA=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ur=t=>qn(t)||pA.has(t)||hA.test(t),jr=t=>zn(t,"length",EA),qn=t=>!!t&&!Number.isNaN(Number(t)),Pl=t=>zn(t,"number",qn),la=t=>!!t&&Number.isInteger(Number(t)),wA=t=>t.endsWith("%")&&qn(t.slice(0,-1)),he=t=>Gp.test(t),$r=t=>vA.test(t),_A=new Set(["length","size","percentage"]),xA=t=>zn(t,_A,Yp),OA=t=>zn(t,"position",Yp),SA=new Set(["image","url"]),AA=t=>zn(t,SA,jA),PA=t=>zn(t,"",TA),ca=()=>!0,zn=(t,e,r)=>{const n=Gp.exec(t);return n?n[1]?typeof e=="string"?n[1]===e:e.has(n[1]):r(n[2]):!1},EA=t=>yA.test(t)&&!gA.test(t),Yp=()=>!1,TA=t=>mA.test(t),jA=t=>bA.test(t),$A=dA(()=>{const t=De("colors"),e=De("spacing"),r=De("blur"),n=De("brightness"),i=De("borderColor"),a=De("borderRadius"),o=De("borderSpacing"),s=De("borderWidth"),u=De("contrast"),l=De("grayscale"),c=De("hueRotate"),f=De("invert"),d=De("gap"),h=De("gradientColorStops"),y=De("gradientColorStopPositions"),v=De("inset"),p=De("margin"),m=De("opacity"),b=De("padding"),w=De("saturate"),O=De("scale"),g=De("sepia"),_=De("skew"),S=De("space"),A=De("translate"),E=()=>["auto","contain","none"],N=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto",he,e],$=()=>[he,e],k=()=>["",ur,jr],I=()=>["auto",qn,he],R=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],M=()=>["solid","dashed","dotted","double","none"],L=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],q=()=>["start","end","center","between","around","evenly","stretch"],z=()=>["","0",he],D=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>[qn,he];return{cacheSize:500,separator:":",theme:{colors:[ca],spacing:[ur,jr],blur:["none","",$r,he],brightness:B(),borderColor:[t],borderRadius:["none","","full",$r,he],borderSpacing:$(),borderWidth:k(),contrast:B(),grayscale:z(),hueRotate:B(),invert:z(),gap:$(),gradientColorStops:[t],gradientColorStopPositions:[wA,jr],inset:j(),margin:j(),opacity:B(),padding:$(),saturate:B(),scale:B(),sepia:z(),skew:B(),space:$(),translate:$()},classGroups:{aspect:[{aspect:["auto","square","video",he]}],container:["container"],columns:[{columns:[$r]}],"break-after":[{"break-after":D()}],"break-before":[{"break-before":D()}],"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:[...R(),he]}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],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",la,he]}],basis:[{basis:j()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",he]}],grow:[{grow:z()}],shrink:[{shrink:z()}],order:[{order:["first","last","none",la,he]}],"grid-cols":[{"grid-cols":[ca]}],"col-start-end":[{col:["auto",{span:["full",la,he]},he]}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":[ca]}],"row-start-end":[{row:["auto",{span:[la,he]},he]}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",he]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",he]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal",...q()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...q(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...q(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],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",he,e]}],"min-w":[{"min-w":[he,e,"min","max","fit"]}],"max-w":[{"max-w":[he,e,"none","full","min","max","fit","prose",{screen:[$r]},$r]}],h:[{h:[he,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[he,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[he,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[he,e,"auto","min","max","fit"]}],"font-size":[{text:["base",$r,jr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Pl]}],"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",he]}],"line-clamp":[{"line-clamp":["none",qn,Pl]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ur,he]}],"list-image":[{"list-image":["none",he]}],"list-style-type":[{list:["none","disc","decimal",he]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[m]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...M(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ur,jr]}],"underline-offset":[{"underline-offset":["auto",ur,he]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",he]}],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",he]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[m]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...R(),OA]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",xA]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},AA]}],"bg-color":[{bg:[t]}],"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:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"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":[m]}],"border-style":[{border:[...M(),"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":[m]}],"divide-style":[{divide:M()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...M()]}],"outline-offset":[{"outline-offset":[ur,he]}],"outline-w":[{outline:[ur,jr]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:k()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[m]}],"ring-offset-w":[{"ring-offset":[ur,jr]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",$r,PA]}],"shadow-color":[{shadow:[ca]}],opacity:[{opacity:[m]}],"mix-blend":[{"mix-blend":[...L(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":L()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",$r,he]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[f]}],saturate:[{saturate:[w]}],sepia:[{sepia:[g]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[m]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[g]}],"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",he]}],duration:[{duration:B()}],ease:[{ease:["linear","in","out","in-out",he]}],delay:[{delay:B()}],animate:[{animate:["none","spin","ping","pulse","bounce",he]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[O]}],"scale-x":[{"scale-x":[O]}],"scale-y":[{"scale-y":[O]}],rotate:[{rotate:[la,he]}],"translate-x":[{"translate-x":[A]}],"translate-y":[{"translate-y":[A]}],"skew-x":[{"skew-x":[_]}],"skew-y":[{"skew-y":[_]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",he]}],accent:[{accent:["auto",t]}],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",he]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"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",he]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[ur,jr,Pl]}],stroke:[{stroke:[t,"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 it(...t){return $A(le(t))}const kA=QS("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),El=ve.forwardRef(({className:t,variant:e,size:r,asChild:n=!1,...i},a)=>{const o=n?HS:"button";return P.jsx(o,{className:it(kA({variant:e,size:r,className:t})),ref:a,...i})});El.displayName="Button";var CA=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],IA=CA.reduce((t,e)=>{const r=Bp(`Primitive.${e}`),n=ve.forwardRef((i,a)=>{const{asChild:o,...s}=i,u=o?r:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),P.jsx(u,{...s,ref:a})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{}),NA="Separator",Xp="horizontal",MA=["horizontal","vertical"],Jp=ve.forwardRef((t,e)=>{const{decorative:r,orientation:n=Xp,...i}=t,a=DA(n)?n:Xp,s=r?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return P.jsx(IA.div,{"data-orientation":a,...s,...i,ref:e})});Jp.displayName=NA;function DA(t){return MA.includes(t)}var Zp=Jp;const Qp=ve.forwardRef(({className:t,orientation:e="horizontal",decorative:r=!0,...n},i)=>P.jsx(Zp,{ref:i,decorative:r,orientation:e,className:it("shrink-0 bg-border",e==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",t),...n}));Qp.displayName=Zp.displayName;const en=ve.forwardRef(({className:t,...e},r)=>P.jsx("div",{ref:r,className:it("rounded-lg border bg-card text-card-foreground shadow-sm",t),...e}));en.displayName="Card";const Tl=ve.forwardRef(({className:t,...e},r)=>P.jsx("div",{ref:r,className:it("flex flex-col space-y-1.5 p-6",t),...e}));Tl.displayName="CardHeader";const RA=ve.forwardRef(({className:t,...e},r)=>P.jsx("h3",{ref:r,className:it("text-2xl font-semibold leading-none tracking-tight",t),...e}));RA.displayName="CardTitle";const LA=ve.forwardRef(({className:t,...e},r)=>P.jsx("p",{ref:r,className:it("text-sm text-muted-foreground",t),...e}));LA.displayName="CardDescription";const jl=ve.forwardRef(({className:t,...e},r)=>P.jsx("div",{ref:r,className:it("p-6 pt-0",t),...e}));jl.displayName="CardContent";const BA=ve.forwardRef(({className:t,...e},r)=>P.jsx("div",{ref:r,className:it("flex items-center p-6 pt-0",t),...e}));BA.displayName="CardFooter";var UA=Array.isArray,yt=UA,FA=typeof Eo=="object"&&Eo&&Eo.Object===Object&&Eo,ev=FA,WA=ev,qA=typeof self=="object"&&self&&self.Object===Object&&self,zA=WA||qA||Function("return this")(),Qt=zA,KA=Qt,VA=KA.Symbol,fa=VA,tv=fa,rv=Object.prototype,HA=rv.hasOwnProperty,GA=rv.toString,da=tv?tv.toStringTag:void 0;function YA(t){var e=HA.call(t,da),r=t[da];try{t[da]=void 0;var n=!0}catch{}var i=GA.call(t);return n&&(e?t[da]=r:delete t[da]),i}var XA=YA,JA=Object.prototype,ZA=JA.toString;function QA(t){return ZA.call(t)}var eP=QA,nv=fa,tP=XA,rP=eP,nP="[object Null]",iP="[object Undefined]",iv=nv?nv.toStringTag:void 0;function aP(t){return t==null?t===void 0?iP:nP:iv&&iv in Object(t)?tP(t):rP(t)}var lr=aP;function oP(t){return t!=null&&typeof t=="object"}var cr=oP,sP=lr,uP=cr,lP="[object Symbol]";function cP(t){return typeof t=="symbol"||uP(t)&&sP(t)==lP}var Kn=cP,fP=yt,dP=Kn,hP=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,pP=/^\w*$/;function vP(t,e){if(fP(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||dP(t)?!0:pP.test(t)||!hP.test(t)||e!=null&&t in Object(e)}var $l=vP;function yP(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var kr=yP;const Vn=je(kr);var gP=lr,mP=kr,bP="[object AsyncFunction]",wP="[object Function]",_P="[object GeneratorFunction]",xP="[object Proxy]";function OP(t){if(!mP(t))return!1;var e=gP(t);return e==wP||e==_P||e==bP||e==xP}var kl=OP;const ae=je(kl);var SP=Qt,AP=SP["__core-js_shared__"],PP=AP,Cl=PP,av=function(){var t=/[^.]+$/.exec(Cl&&Cl.keys&&Cl.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function EP(t){return!!av&&av in t}var TP=EP,jP=Function.prototype,$P=jP.toString;function kP(t){if(t!=null){try{return $P.call(t)}catch{}try{return t+""}catch{}}return""}var ov=kP,CP=kl,IP=TP,NP=kr,MP=ov,DP=/[\\^$.*+?()[\]{}|]/g,RP=/^\[object .+?Constructor\]$/,LP=Function.prototype,BP=Object.prototype,UP=LP.toString,FP=BP.hasOwnProperty,WP=RegExp("^"+UP.call(FP).replace(DP,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function qP(t){if(!NP(t)||IP(t))return!1;var e=CP(t)?WP:RP;return e.test(MP(t))}var zP=qP;function KP(t,e){return t==null?void 0:t[e]}var VP=KP,HP=zP,GP=VP;function YP(t,e){var r=GP(t,e);return HP(r)?r:void 0}var tn=YP,XP=tn,JP=XP(Object,"create"),zo=JP,sv=zo;function ZP(){this.__data__=sv?sv(null):{},this.size=0}var QP=ZP;function eE(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var tE=eE,rE=zo,nE="__lodash_hash_undefined__",iE=Object.prototype,aE=iE.hasOwnProperty;function oE(t){var e=this.__data__;if(rE){var r=e[t];return r===nE?void 0:r}return aE.call(e,t)?e[t]:void 0}var sE=oE,uE=zo,lE=Object.prototype,cE=lE.hasOwnProperty;function fE(t){var e=this.__data__;return uE?e[t]!==void 0:cE.call(e,t)}var dE=fE,hE=zo,pE="__lodash_hash_undefined__";function vE(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=hE&&e===void 0?pE:e,this}var yE=vE,gE=QP,mE=tE,bE=sE,wE=dE,_E=yE;function Hn(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Hn.prototype.clear=gE,Hn.prototype.delete=mE,Hn.prototype.get=bE,Hn.prototype.has=wE,Hn.prototype.set=_E;var xE=Hn;function OE(){this.__data__=[],this.size=0}var SE=OE;function AE(t,e){return t===e||t!==t&&e!==e}var Il=AE,PE=Il;function EE(t,e){for(var r=t.length;r--;)if(PE(t[r][0],e))return r;return-1}var Ko=EE,TE=Ko,jE=Array.prototype,$E=jE.splice;function kE(t){var e=this.__data__,r=TE(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():$E.call(e,r,1),--this.size,!0}var CE=kE,IE=Ko;function NE(t){var e=this.__data__,r=IE(e,t);return r<0?void 0:e[r][1]}var ME=NE,DE=Ko;function RE(t){return DE(this.__data__,t)>-1}var LE=RE,BE=Ko;function UE(t,e){var r=this.__data__,n=BE(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var FE=UE,WE=SE,qE=CE,zE=ME,KE=LE,VE=FE;function Gn(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Gn.prototype.clear=WE,Gn.prototype.delete=qE,Gn.prototype.get=zE,Gn.prototype.has=KE,Gn.prototype.set=VE;var Vo=Gn,HE=tn,GE=Qt,YE=HE(GE,"Map"),Nl=YE,uv=xE,XE=Vo,JE=Nl;function ZE(){this.size=0,this.__data__={hash:new uv,map:new(JE||XE),string:new uv}}var QE=ZE;function e1(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var t1=e1,r1=t1;function n1(t,e){var r=t.__data__;return r1(e)?r[typeof e=="string"?"string":"hash"]:r.map}var Ho=n1,i1=Ho;function a1(t){var e=i1(this,t).delete(t);return this.size-=e?1:0,e}var o1=a1,s1=Ho;function u1(t){return s1(this,t).get(t)}var l1=u1,c1=Ho;function f1(t){return c1(this,t).has(t)}var d1=f1,h1=Ho;function p1(t,e){var r=h1(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var v1=p1,y1=QE,g1=o1,m1=l1,b1=d1,w1=v1;function Yn(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Yn.prototype.clear=y1,Yn.prototype.delete=g1,Yn.prototype.get=m1,Yn.prototype.has=b1,Yn.prototype.set=w1;var Ml=Yn,lv=Ml,_1="Expected a function";function Dl(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(_1);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=t.apply(this,n);return r.cache=a.set(i,o)||a,o};return r.cache=new(Dl.Cache||lv),r}Dl.Cache=lv;var cv=Dl;const x1=je(cv);var O1=cv,S1=500;function A1(t){var e=O1(t,function(n){return r.size===S1&&r.clear(),n}),r=e.cache;return e}var P1=A1,E1=P1,T1=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,j1=/\\(\\)?/g,$1=E1(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(T1,function(r,n,i,a){e.push(i?a.replace(j1,"$1"):n||r)}),e}),k1=$1;function C1(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}var Rl=C1,fv=fa,I1=Rl,N1=yt,M1=Kn,D1=1/0,dv=fv?fv.prototype:void 0,hv=dv?dv.toString:void 0;function pv(t){if(typeof t=="string")return t;if(N1(t))return I1(t,pv)+"";if(M1(t))return hv?hv.call(t):"";var e=t+"";return e=="0"&&1/t==-D1?"-0":e}var R1=pv,L1=R1;function B1(t){return t==null?"":L1(t)}var vv=B1,U1=yt,F1=$l,W1=k1,q1=vv;function z1(t,e){return U1(t)?t:F1(t,e)?[t]:W1(q1(t))}var yv=z1,K1=Kn,V1=1/0;function H1(t){if(typeof t=="string"||K1(t))return t;var e=t+"";return e=="0"&&1/t==-V1?"-0":e}var Go=H1,G1=yv,Y1=Go;function X1(t,e){e=G1(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[Y1(e[r++])];return r&&r==n?t:void 0}var Ll=X1,J1=Ll;function Z1(t,e,r){var n=t==null?void 0:J1(t,e);return n===void 0?r:n}var gv=Z1;const xt=je(gv);function Q1(t){return t==null}var eT=Q1;const fe=je(eT);var tT=lr,rT=yt,nT=cr,iT="[object String]";function aT(t){return typeof t=="string"||!rT(t)&&nT(t)&&tT(t)==iT}var oT=aT;const rn=je(oT);var Bl={exports:{}},xe={};/**
|
|
70
70
|
* @license React
|
|
71
71
|
* react-is.production.min.js
|
|
72
72
|
*
|
|
@@ -74,7 +74,7 @@ ${m}`}class Ke extends Error{constructor({message:e,code:r,cause:n,name:i}){var
|
|
|
74
74
|
*
|
|
75
75
|
* This source code is licensed under the MIT license found in the
|
|
76
76
|
* LICENSE file in the root directory of this source tree.
|
|
77
|
-
*/var
|
|
77
|
+
*/var mv;function sT(){if(mv)return xe;mv=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),o=Symbol.for("react.context"),s=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),l=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 m=p.$$typeof;switch(m){case t:switch(p=p.type,p){case r:case i:case n:case l:case c:return p;default:switch(p=p&&p.$$typeof,p){case s:case o:case u:case d:case f:case a:return p;default:return m}}case e:return m}}}return xe.ContextConsumer=o,xe.ContextProvider=a,xe.Element=t,xe.ForwardRef=u,xe.Fragment=r,xe.Lazy=d,xe.Memo=f,xe.Portal=e,xe.Profiler=i,xe.StrictMode=n,xe.Suspense=l,xe.SuspenseList=c,xe.isAsyncMode=function(){return!1},xe.isConcurrentMode=function(){return!1},xe.isContextConsumer=function(p){return v(p)===o},xe.isContextProvider=function(p){return v(p)===a},xe.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===t},xe.isForwardRef=function(p){return v(p)===u},xe.isFragment=function(p){return v(p)===r},xe.isLazy=function(p){return v(p)===d},xe.isMemo=function(p){return v(p)===f},xe.isPortal=function(p){return v(p)===e},xe.isProfiler=function(p){return v(p)===i},xe.isStrictMode=function(p){return v(p)===n},xe.isSuspense=function(p){return v(p)===l},xe.isSuspenseList=function(p){return v(p)===c},xe.isValidElementType=function(p){return typeof p=="string"||typeof p=="function"||p===r||p===i||p===n||p===l||p===c||p===h||typeof p=="object"&&p!==null&&(p.$$typeof===d||p.$$typeof===f||p.$$typeof===a||p.$$typeof===o||p.$$typeof===u||p.$$typeof===y||p.getModuleId!==void 0)},xe.typeOf=v,xe}var Oe={};/**
|
|
78
78
|
* @license React
|
|
79
79
|
* react-is.development.js
|
|
80
80
|
*
|
|
@@ -82,71 +82,71 @@ ${m}`}class Ke extends Error{constructor({message:e,code:r,cause:n,name:i}){var
|
|
|
82
82
|
*
|
|
83
83
|
* This source code is licensed under the MIT license found in the
|
|
84
84
|
* LICENSE file in the root directory of this source tree.
|
|
85
|
-
*/var wv;function lT(){return wv||(wv=1,process.env.NODE_ENV!=="production"&&function(){var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),o=Symbol.for("react.context"),s=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),l=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,m=!1,b=!1,w;w=Symbol.for("react.module.reference");function O(H){return!!(typeof H=="string"||typeof H=="function"||H===r||H===i||b||H===n||H===l||H===c||m||H===h||y||v||p||typeof H=="object"&&H!==null&&(H.$$typeof===d||H.$$typeof===f||H.$$typeof===a||H.$$typeof===o||H.$$typeof===u||H.$$typeof===w||H.getModuleId!==void 0))}function g(H){if(typeof H=="object"&&H!==null){var _e=H.$$typeof;switch(_e){case t:var Ee=H.type;switch(Ee){case r:case i:case n:case l:case c:return Ee;default:var Ge=Ee&&Ee.$$typeof;switch(Ge){case s:case o:case u:case d:case f:case a:return Ge;default:return _e}}case e:return _e}}}var _=o,S=a,A=t,T=u,M=r,$=d,j=f,N=e,C=i,I=n,R=l,L=c,F=!1,z=!1;function D(H){return F||(F=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function B(H){return z||(z=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function W(H){return g(H)===o}function G(H){return g(H)===a}function J(H){return typeof H=="object"&&H!==null&&H.$$typeof===t}function re(H){return g(H)===u}function ne(H){return g(H)===r}function ue(H){return g(H)===d}function oe(H){return g(H)===f}function q(H){return g(H)===e}function Y(H){return g(H)===i}function te(H){return g(H)===n}function k(H){return g(H)===l}function ye(H){return g(H)===c}Oe.ContextConsumer=_,Oe.ContextProvider=S,Oe.Element=A,Oe.ForwardRef=T,Oe.Fragment=M,Oe.Lazy=$,Oe.Memo=j,Oe.Portal=N,Oe.Profiler=C,Oe.StrictMode=I,Oe.Suspense=R,Oe.SuspenseList=L,Oe.isAsyncMode=D,Oe.isConcurrentMode=B,Oe.isContextConsumer=W,Oe.isContextProvider=G,Oe.isElement=J,Oe.isForwardRef=re,Oe.isFragment=ne,Oe.isLazy=ue,Oe.isMemo=oe,Oe.isPortal=q,Oe.isProfiler=Y,Oe.isStrictMode=te,Oe.isSuspense=k,Oe.isSuspenseList=ye,Oe.isValidElementType=O,Oe.typeOf=g}()),Oe}process.env.NODE_ENV==="production"?Ul.exports=uT():Ul.exports=lT();var cT=Ul.exports,fT=lr,dT=cr,hT="[object Number]";function pT(t){return typeof t=="number"||dT(t)&&fT(t)==hT}var _v=pT;const vT=je(_v);var yT=_v;function gT(t){return yT(t)&&t!=+t}var mT=gT;const Xn=je(mT);var ft=function(e){return e===0?0:e>0?1:-1},nn=function(e){return rn(e)&&e.indexOf("%")===e.length-1},V=function(e){return vT(e)&&!Xn(e)},bT=function(e){return fe(e)},Je=function(e){return V(e)||rn(e)},wT=0,an=function(e){var r=++wT;return"".concat(e||"").concat(r)},dt=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!V(e)&&!rn(e))return n;var a;if(nn(e)){var o=e.indexOf("%");a=r*parseFloat(e.slice(0,o))/100}else a=+e;return Xn(a)&&(a=n),i&&a>r&&(a=r),a},Ir=function(e){if(!e)return null;var r=Object.keys(e);return r&&r.length?e[r[0]]:null},_T=function(e){if(!Array.isArray(e))return!1;for(var r=e.length,n={},i=0;i<r;i++)if(!n[e[i]])n[e[i]]=!0;else return!0;return!1},Fe=function(e,r){return V(e)&&V(r)?function(n){return e+n*(r-e)}:function(){return r}};function Xo(t,e,r){return!t||!t.length?null:t.find(function(n){return n&&(typeof e=="function"?e(n):xt(n,e))===r})}var xT=function(e,r){return V(e)&&V(r)?e-r:rn(e)&&rn(r)?e.localeCompare(r):e instanceof Date&&r instanceof Date?e.getTime()-r.getTime():String(e).localeCompare(String(r))};function Jn(t,e){for(var r in t)if({}.hasOwnProperty.call(t,r)&&(!{}.hasOwnProperty.call(e,r)||t[r]!==e[r]))return!1;for(var n in e)if({}.hasOwnProperty.call(e,n)&&!{}.hasOwnProperty.call(t,n))return!1;return!0}function Fl(t){"@babel/helpers - typeof";return Fl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fl(t)}var OT=["viewBox","children"],ST=["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"],xv=["points","pathLength"],Wl={svg:OT,polygon:xv,polyline:xv},ql=["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"],Jo=function(e,r){if(!e||typeof e=="function"||typeof e=="boolean")return null;var n=e;if(x.isValidElement(e)&&(n=e.props),!Vn(n))return null;var i={};return Object.keys(n).forEach(function(a){ql.includes(a)&&(i[a]=r||function(o){return n[a](n,o)})}),i},AT=function(e,r,n){return function(i){return e(r,n,i),null}},on=function(e,r,n){if(!Vn(e)||Fl(e)!=="object")return null;var i=null;return Object.keys(e).forEach(function(a){var o=e[a];ql.includes(a)&&typeof o=="function"&&(i||(i={}),i[a]=AT(o,r,n))}),i},PT=["children"],ET=["children"];function Ov(t,e){if(t==null)return{};var r=TT(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function TT(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function zl(t){"@babel/helpers - typeof";return zl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zl(t)}var Sv={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"},fr=function(e){return typeof e=="string"?e:e?e.displayName||e.name||"Component":""},Av=null,Kl=null,Vl=function t(e){if(e===Av&&Array.isArray(Kl))return Kl;var r=[];return x.Children.forEach(e,function(n){fe(n)||(cT.isFragment(n)?r=r.concat(t(n.props.children)):r.push(n))}),Kl=r,Av=e,r};function Ot(t,e){var r=[],n=[];return Array.isArray(e)?n=e.map(function(i){return fr(i)}):n=[fr(e)],Vl(t).forEach(function(i){var a=xt(i,"type.displayName")||xt(i,"type.name");n.indexOf(a)!==-1&&r.push(i)}),r}function St(t,e){var r=Ot(t,e);return r&&r[0]}var Pv=function(e){if(!e||!e.props)return!1;var r=e.props,n=r.width,i=r.height;return!(!V(n)||n<=0||!V(i)||i<=0)},jT=["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"],$T=function(e){return e&&e.type&&rn(e.type)&&jT.indexOf(e.type)>=0},Ev=function(e){return e&&zl(e)==="object"&&"clipDot"in e},kT=function(e,r,n,i){var a,o=(a=Wl==null?void 0:Wl[i])!==null&&a!==void 0?a:[];return r.startsWith("data-")||!ae(e)&&(i&&o.includes(r)||ST.includes(r))||n&&ql.includes(r)},Q=function(e,r,n){if(!e||typeof e=="function"||typeof e=="boolean")return null;var i=e;if(x.isValidElement(e)&&(i=e.props),!Vn(i))return null;var a={};return Object.keys(i).forEach(function(o){var s;kT((s=i)===null||s===void 0?void 0:s[o],o,r,n)&&(a[o]=i[o])}),a},Hl=function t(e,r){if(e===r)return!0;var n=x.Children.count(e);if(n!==x.Children.count(r))return!1;if(n===0)return!0;if(n===1)return Tv(Array.isArray(e)?e[0]:e,Array.isArray(r)?r[0]:r);for(var i=0;i<n;i++){var a=e[i],o=r[i];if(Array.isArray(a)||Array.isArray(o)){if(!t(a,o))return!1}else if(!Tv(a,o))return!1}return!0},Tv=function(e,r){if(fe(e)&&fe(r))return!0;if(!fe(e)&&!fe(r)){var n=e.props||{},i=n.children,a=Ov(n,PT),o=r.props||{},s=o.children,u=Ov(o,ET);return i&&s?Jn(a,u)&&Hl(i,s):!i&&!s?Jn(a,u):!1}return!1},jv=function(e,r){var n=[],i={};return Vl(e).forEach(function(a,o){if($T(a))n.push(a);else if(a){var s=fr(a.type),u=r[s]||{},l=u.handler,c=u.once;if(l&&(!c||!i[s])){var f=l(a,s,o);n.push(f),i[s]=!0}}}),n},CT=function(e){var r=e&&e.type;return r&&Sv[r]?Sv[r]:null},IT=function(e,r){return Vl(r).indexOf(e)},NT=["children","width","height","viewBox","className","style","title","desc"];function Gl(){return Gl=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Gl.apply(this,arguments)}function MT(t,e){if(t==null)return{};var r=DT(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function DT(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function Yl(t){var e=t.children,r=t.width,n=t.height,i=t.viewBox,a=t.className,o=t.style,s=t.title,u=t.desc,l=MT(t,NT),c=i||{width:r,height:n,x:0,y:0},f=le("recharts-surface",a);return x.createElement("svg",Gl({},Q(l,!0,"svg"),{className:f,width:r,height:n,style:o,viewBox:"".concat(c.x," ").concat(c.y," ").concat(c.width," ").concat(c.height)}),x.createElement("title",null,s),x.createElement("desc",null,u),e)}var RT=["children","className"];function Xl(){return Xl=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Xl.apply(this,arguments)}function LT(t,e){if(t==null)return{};var r=BT(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function BT(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}var pe=x.forwardRef(function(t,e){var r=t.children,n=t.className,i=LT(t,RT),a=le("recharts-layer",n);return x.createElement("g",Xl({className:a},Q(i,!0),{ref:e}),r)}),UT=process.env.NODE_ENV!=="production",zt=function(e,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;a<n;a++)i[a-2]=arguments[a];if(UT&&typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!e))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 i[o++]}))}};function FT(t,e,r){var n=-1,i=t.length;e<0&&(e=-e>i?0:i+e),r=r>i?i:r,r<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var a=Array(i);++n<i;)a[n]=t[n+e];return a}var WT=FT,qT=WT;function zT(t,e,r){var n=t.length;return r=r===void 0?n:r,!e&&r>=n?t:qT(t,e,r)}var KT=zT,VT="\\ud800-\\udfff",HT="\\u0300-\\u036f",GT="\\ufe20-\\ufe2f",YT="\\u20d0-\\u20ff",XT=HT+GT+YT,JT="\\ufe0e\\ufe0f",ZT="\\u200d",QT=RegExp("["+ZT+VT+XT+JT+"]");function ej(t){return QT.test(t)}var $v=ej;function tj(t){return t.split("")}var rj=tj,kv="\\ud800-\\udfff",nj="\\u0300-\\u036f",ij="\\ufe20-\\ufe2f",aj="\\u20d0-\\u20ff",oj=nj+ij+aj,sj="\\ufe0e\\ufe0f",uj="["+kv+"]",Jl="["+oj+"]",Zl="\\ud83c[\\udffb-\\udfff]",lj="(?:"+Jl+"|"+Zl+")",Cv="[^"+kv+"]",Iv="(?:\\ud83c[\\udde6-\\uddff]){2}",Nv="[\\ud800-\\udbff][\\udc00-\\udfff]",cj="\\u200d",Mv=lj+"?",Dv="["+sj+"]?",fj="(?:"+cj+"(?:"+[Cv,Iv,Nv].join("|")+")"+Dv+Mv+")*",dj=Dv+Mv+fj,hj="(?:"+[Cv+Jl+"?",Jl,Iv,Nv,uj].join("|")+")",pj=RegExp(Zl+"(?="+Zl+")|"+hj+dj,"g");function vj(t){return t.match(pj)||[]}var yj=vj,gj=rj,mj=$v,bj=yj;function wj(t){return mj(t)?bj(t):gj(t)}var _j=wj,xj=KT,Oj=$v,Sj=_j,Aj=yv;function Pj(t){return function(e){e=Aj(e);var r=Oj(e)?Sj(e):void 0,n=r?r[0]:e.charAt(0),i=r?xj(r,1).join(""):e.slice(1);return n[t]()+i}}var Ej=Pj,Tj=Ej,jj=Tj("toUpperCase"),$j=jj;const Zo=je($j);function Ne(t){return function(){return t}}const Rv=Math.cos,Qo=Math.sin,Kt=Math.sqrt,es=Math.PI,ts=2*es,Ql=Math.PI,ec=2*Ql,sn=1e-6,kj=ec-sn;function Lv(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=arguments[e]+t[e]}function Cj(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Lv;const r=10**e;return function(n){this._+=n[0];for(let i=1,a=n.length;i<a;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}class Ij{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?Lv:Cj(e)}moveTo(e,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,r){this._append`L${this._x1=+e},${this._y1=+r}`}quadraticCurveTo(e,r,n,i){this._append`Q${+e},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(e,r,n,i,a,o){this._append`C${+e},${+r},${+n},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(e,r,n,i,a){if(e=+e,r=+r,n=+n,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,s=this._y1,u=n-e,l=i-r,c=o-e,f=s-r,d=c*c+f*f;if(this._x1===null)this._append`M${this._x1=e},${this._y1=r}`;else if(d>sn)if(!(Math.abs(f*u-l*c)>sn)||!a)this._append`L${this._x1=e},${this._y1=r}`;else{let h=n-o,y=i-s,v=u*u+l*l,p=h*h+y*y,m=Math.sqrt(v),b=Math.sqrt(d),w=a*Math.tan((Ql-Math.acos((v+d-p)/(2*m*b)))/2),O=w/b,g=w/m;Math.abs(O-1)>sn&&this._append`L${e+O*c},${r+O*f}`,this._append`A${a},${a},0,0,${+(f*h>c*y)},${this._x1=e+g*u},${this._y1=r+g*l}`}}arc(e,r,n,i,a,o){if(e=+e,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(i),u=n*Math.sin(i),l=e+s,c=r+u,f=1^o,d=o?i-a:a-i;this._x1===null?this._append`M${l},${c}`:(Math.abs(this._x1-l)>sn||Math.abs(this._y1-c)>sn)&&this._append`L${l},${c}`,n&&(d<0&&(d=d%ec+ec),d>kj?this._append`A${n},${n},0,1,${f},${e-s},${r-u}A${n},${n},0,1,${f},${this._x1=l},${this._y1=c}`:d>sn&&this._append`A${n},${n},0,${+(d>=Ql)},${f},${this._x1=e+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(e,r,n,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function tc(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(r==null)e=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);e=n}return t},()=>new Ij(e)}function rc(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Bv(t){this._context=t}Bv.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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function rs(t){return new Bv(t)}function Uv(t){return t[0]}function Fv(t){return t[1]}function Wv(t,e){var r=Ne(!0),n=null,i=rs,a=null,o=tc(s);t=typeof t=="function"?t:t===void 0?Uv:Ne(t),e=typeof e=="function"?e:e===void 0?Fv:Ne(e);function s(u){var l,c=(u=rc(u)).length,f,d=!1,h;for(n==null&&(a=i(h=o())),l=0;l<=c;++l)!(l<c&&r(f=u[l],l,u))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+t(f,l,u),+e(f,l,u));if(h)return a=null,h+""||null}return s.x=function(u){return arguments.length?(t=typeof u=="function"?u:Ne(+u),s):t},s.y=function(u){return arguments.length?(e=typeof u=="function"?u:Ne(+u),s):e},s.defined=function(u){return arguments.length?(r=typeof u=="function"?u:Ne(!!u),s):r},s.curve=function(u){return arguments.length?(i=u,n!=null&&(a=i(n)),s):i},s.context=function(u){return arguments.length?(u==null?n=a=null:a=i(n=u),s):n},s}function ns(t,e,r){var n=null,i=Ne(!0),a=null,o=rs,s=null,u=tc(l);t=typeof t=="function"?t:t===void 0?Uv:Ne(+t),e=typeof e=="function"?e:Ne(e===void 0?0:+e),r=typeof r=="function"?r:r===void 0?Fv:Ne(+r);function l(f){var d,h,y,v=(f=rc(f)).length,p,m=!1,b,w=new Array(v),O=new Array(v);for(a==null&&(s=o(b=u())),d=0;d<=v;++d){if(!(d<v&&i(p=f[d],d,f))===m)if(m=!m)h=d,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),y=d-1;y>=h;--y)s.point(w[y],O[y]);s.lineEnd(),s.areaEnd()}m&&(w[d]=+t(p,d,f),O[d]=+e(p,d,f),s.point(n?+n(p,d,f):w[d],r?+r(p,d,f):O[d]))}if(b)return s=null,b+""||null}function c(){return Wv().defined(i).curve(o).context(a)}return l.x=function(f){return arguments.length?(t=typeof f=="function"?f:Ne(+f),n=null,l):t},l.x0=function(f){return arguments.length?(t=typeof f=="function"?f:Ne(+f),l):t},l.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Ne(+f),l):n},l.y=function(f){return arguments.length?(e=typeof f=="function"?f:Ne(+f),r=null,l):e},l.y0=function(f){return arguments.length?(e=typeof f=="function"?f:Ne(+f),l):e},l.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Ne(+f),l):r},l.lineX0=l.lineY0=function(){return c().x(t).y(e)},l.lineY1=function(){return c().x(t).y(r)},l.lineX1=function(){return c().x(n).y(e)},l.defined=function(f){return arguments.length?(i=typeof f=="function"?f:Ne(!!f),l):i},l.curve=function(f){return arguments.length?(o=f,a!=null&&(s=o(a)),l):o},l.context=function(f){return arguments.length?(f==null?a=s=null:s=o(a=f),l):a},l}class qv{constructor(e,r){this._context=e,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(e,r){switch(e=+e,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,r,e,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,e,this._y0,e,r);break}}this._x0=e,this._y0=r}}function Nj(t){return new qv(t,!0)}function Mj(t){return new qv(t,!1)}const nc={draw(t,e){const r=Kt(e/es);t.moveTo(r,0),t.arc(0,0,r,0,ts)}},Dj={draw(t,e){const r=Kt(e/5)/2;t.moveTo(-3*r,-r),t.lineTo(-r,-r),t.lineTo(-r,-3*r),t.lineTo(r,-3*r),t.lineTo(r,-r),t.lineTo(3*r,-r),t.lineTo(3*r,r),t.lineTo(r,r),t.lineTo(r,3*r),t.lineTo(-r,3*r),t.lineTo(-r,r),t.lineTo(-3*r,r),t.closePath()}},zv=Kt(1/3),Rj=zv*2,Lj={draw(t,e){const r=Kt(e/Rj),n=r*zv;t.moveTo(0,-r),t.lineTo(n,0),t.lineTo(0,r),t.lineTo(-n,0),t.closePath()}},Bj={draw(t,e){const r=Kt(e),n=-r/2;t.rect(n,n,r,r)}},Uj=.8908130915292852,Kv=Qo(es/10)/Qo(7*es/10),Fj=Qo(ts/10)*Kv,Wj=-Rv(ts/10)*Kv,qj={draw(t,e){const r=Kt(e*Uj),n=Fj*r,i=Wj*r;t.moveTo(0,-r),t.lineTo(n,i);for(let a=1;a<5;++a){const o=ts*a/5,s=Rv(o),u=Qo(o);t.lineTo(u*r,-s*r),t.lineTo(s*n-u*i,u*n+s*i)}t.closePath()}},ic=Kt(3),zj={draw(t,e){const r=-Kt(e/(ic*3));t.moveTo(0,r*2),t.lineTo(-ic*r,-r),t.lineTo(ic*r,-r),t.closePath()}},$t=-.5,kt=Kt(3)/2,ac=1/Kt(12),Kj=(ac/2+1)*3,Vj={draw(t,e){const r=Kt(e/Kj),n=r/2,i=r*ac,a=n,o=r*ac+r,s=-a,u=o;t.moveTo(n,i),t.lineTo(a,o),t.lineTo(s,u),t.lineTo($t*n-kt*i,kt*n+$t*i),t.lineTo($t*a-kt*o,kt*a+$t*o),t.lineTo($t*s-kt*u,kt*s+$t*u),t.lineTo($t*n+kt*i,$t*i-kt*n),t.lineTo($t*a+kt*o,$t*o-kt*a),t.lineTo($t*s+kt*u,$t*u-kt*s),t.closePath()}};function Hj(t,e){let r=null,n=tc(i);t=typeof t=="function"?t:Ne(t||nc),e=typeof e=="function"?e:Ne(e===void 0?64:+e);function i(){let a;if(r||(r=a=n()),t.apply(this,arguments).draw(r,+e.apply(this,arguments)),a)return r=null,a+""||null}return i.type=function(a){return arguments.length?(t=typeof a=="function"?a:Ne(a),i):t},i.size=function(a){return arguments.length?(e=typeof a=="function"?a:Ne(+a),i):e},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function is(){}function as(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function Vv(t){this._context=t}Vv.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:as(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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);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:as(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Gj(t){return new Vv(t)}function Hv(t){this._context=t}Hv.prototype={areaStart:is,areaEnd:is,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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:as(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Yj(t){return new Hv(t)}function Gv(t){this._context=t}Gv.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(t,e){switch(t=+t,e=+e,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+t)/6,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:as(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Xj(t){return new Gv(t)}function Yv(t){this._context=t}Yv.prototype={areaStart:is,areaEnd:is,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function Jj(t){return new Yv(t)}function Xv(t){return t<0?-1:1}function Jv(t,e,r){var n=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(n||i<0&&-0),o=(r-t._y1)/(i||n<0&&-0),s=(a*i+o*n)/(n+i);return(Xv(a)+Xv(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Zv(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function oc(t,e,r){var n=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-n)/3;t._context.bezierCurveTo(n+s,i+s*e,a-s,o-s*r,a,o)}function os(t){this._context=t}os.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:oc(this,this._t0,Zv(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var r=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,oc(this,Zv(this,r=Jv(this,t,e)),r);break;default:oc(this,this._t0,r=Jv(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}};function Qv(t){this._context=new ey(t)}(Qv.prototype=Object.create(os.prototype)).point=function(t,e){os.prototype.point.call(this,e,t)};function ey(t){this._context=t}ey.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,r,n,i,a){this._context.bezierCurveTo(e,t,n,r,a,i)}};function Zj(t){return new os(t)}function Qj(t){return new Qv(t)}function ty(t){this._context=t}ty.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,r=t.length;if(r)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),r===2)this._context.lineTo(t[1],e[1]);else for(var n=ry(t),i=ry(e),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],t[o],e[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function ry(t){var e,r=t.length-1,n,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,a[e]=4,o[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/a[e-1],a[e]-=n,o[e]-=n*o[e-1];for(i[r-1]=o[r-1]/a[r-1],e=r-2;e>=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)a[e]=2*t[e+1]-i[e+1];return[i,a]}function e$(t){return new ty(t)}function ss(t,e){this._context=t,this._t=e}ss.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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}break}}this._x=t,this._y=e}};function t$(t){return new ss(t,.5)}function r$(t){return new ss(t,0)}function n$(t){return new ss(t,1)}function Zn(t,e){if((o=t.length)>1)for(var r=1,n,i,a=t[e[0]],o,s=a.length;r<o;++r)for(i=a,a=t[e[r]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function sc(t){for(var e=t.length,r=new Array(e);--e>=0;)r[e]=e;return r}function i$(t,e){return t[e]}function a$(t){const e=[];return e.key=t,e}function o$(){var t=Ne([]),e=sc,r=Zn,n=i$;function i(a){var o=Array.from(t.apply(this,arguments),a$),s,u=o.length,l=-1,c;for(const f of a)for(s=0,++l;s<u;++s)(o[s][l]=[0,+n(f,o[s].key,l,a)]).data=f;for(s=0,c=rc(e(o));s<u;++s)o[c[s]].index=s;return r(o,c),o}return i.keys=function(a){return arguments.length?(t=typeof a=="function"?a:Ne(Array.from(a)),i):t},i.value=function(a){return arguments.length?(n=typeof a=="function"?a:Ne(+a),i):n},i.order=function(a){return arguments.length?(e=a==null?sc:typeof a=="function"?a:Ne(Array.from(a)),i):e},i.offset=function(a){return arguments.length?(r=a??Zn,i):r},i}function s$(t,e){if((n=t.length)>0){for(var r,n,i=0,a=t[0].length,o;i<a;++i){for(o=r=0;r<n;++r)o+=t[r][i][1]||0;if(o)for(r=0;r<n;++r)t[r][i][1]/=o}Zn(t,e)}}function u$(t,e){if((i=t.length)>0){for(var r=0,n=t[e[0]],i,a=n.length;r<a;++r){for(var o=0,s=0;o<i;++o)s+=t[o][r][1]||0;n[r][1]+=n[r][0]=-s/2}Zn(t,e)}}function l$(t,e){if(!(!((o=t.length)>0)||!((a=(i=t[e[0]]).length)>0))){for(var r=0,n=1,i,a,o;n<a;++n){for(var s=0,u=0,l=0;s<o;++s){for(var c=t[e[s]],f=c[n][1]||0,d=c[n-1][1]||0,h=(f-d)/2,y=0;y<s;++y){var v=t[e[y]],p=v[n][1]||0,m=v[n-1][1]||0;h+=p-m}u+=f,l+=h*f}i[n-1][1]+=i[n-1][0]=r,u&&(r-=l/u)}i[n-1][1]+=i[n-1][0]=r,Zn(t,e)}}function ha(t){"@babel/helpers - typeof";return ha=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ha(t)}var c$=["type","size","sizeType"];function uc(){return uc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},uc.apply(this,arguments)}function ny(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function iy(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ny(Object(r),!0).forEach(function(n){f$(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ny(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function f$(t,e,r){return e=d$(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function d$(t){var e=h$(t,"string");return ha(e)=="symbol"?e:e+""}function h$(t,e){if(ha(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(ha(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function p$(t,e){if(t==null)return{};var r=v$(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function v$(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}var ay={symbolCircle:nc,symbolCross:Dj,symbolDiamond:Lj,symbolSquare:Bj,symbolStar:qj,symbolTriangle:zj,symbolWye:Vj},y$=Math.PI/180,g$=function(e){var r="symbol".concat(Zo(e));return ay[r]||nc},m$=function(e,r,n){if(r==="area")return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var i=18*y$;return 1.25*e*e*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},b$=function(e,r){ay["symbol".concat(Zo(e))]=r},lc=function(e){var r=e.type,n=r===void 0?"circle":r,i=e.size,a=i===void 0?64:i,o=e.sizeType,s=o===void 0?"area":o,u=p$(e,c$),l=iy(iy({},u),{},{type:n,size:a,sizeType:s}),c=function(){var p=g$(n),m=Hj().type(p).size(m$(a,s,n));return m()},f=l.className,d=l.cx,h=l.cy,y=Q(l,!0);return d===+d&&h===+h&&a===+a?x.createElement("path",uc({},y,{className:le("recharts-symbols",f),transform:"translate(".concat(d,", ").concat(h,")"),d:c()})):null};lc.registerSymbol=b$;function Qn(t){"@babel/helpers - typeof";return Qn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qn(t)}function cc(){return cc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},cc.apply(this,arguments)}function oy(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function w$(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?oy(Object(r),!0).forEach(function(n){pa(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):oy(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function _$(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function x$(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,uy(n.key),n)}}function O$(t,e,r){return e&&x$(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function S$(t,e,r){return e=us(e),A$(t,sy()?Reflect.construct(e,r||[],us(t).constructor):e.apply(t,r))}function A$(t,e){if(e&&(Qn(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return P$(t)}function P$(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function sy(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(sy=function(){return!!t})()}function us(t){return us=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},us(t)}function E$(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&fc(t,e)}function fc(t,e){return fc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},fc(t,e)}function pa(t,e,r){return e=uy(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function uy(t){var e=T$(t,"string");return Qn(e)=="symbol"?e:e+""}function T$(t,e){if(Qn(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Qn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Ct=32,dc=function(t){function e(){return _$(this,e),S$(this,e,arguments)}return E$(e,t),O$(e,[{key:"renderIcon",value:function(n){var i=this.props.inactiveColor,a=Ct/2,o=Ct/6,s=Ct/3,u=n.inactive?i:n.color;if(n.type==="plainline")return x.createElement("line",{strokeWidth:4,fill:"none",stroke:u,strokeDasharray:n.payload.strokeDasharray,x1:0,y1:a,x2:Ct,y2:a,className:"recharts-legend-icon"});if(n.type==="line")return x.createElement("path",{strokeWidth:4,fill:"none",stroke:u,d:"M0,".concat(a,"h").concat(s,`
|
|
85
|
+
*/var bv;function uT(){return bv||(bv=1,process.env.NODE_ENV!=="production"&&function(){var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),o=Symbol.for("react.context"),s=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),l=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,m=!1,b=!1,w;w=Symbol.for("react.module.reference");function O(H){return!!(typeof H=="string"||typeof H=="function"||H===r||H===i||b||H===n||H===l||H===c||m||H===h||y||v||p||typeof H=="object"&&H!==null&&(H.$$typeof===d||H.$$typeof===f||H.$$typeof===a||H.$$typeof===o||H.$$typeof===u||H.$$typeof===w||H.getModuleId!==void 0))}function g(H){if(typeof H=="object"&&H!==null){var _e=H.$$typeof;switch(_e){case t:var Ee=H.type;switch(Ee){case r:case i:case n:case l:case c:return Ee;default:var Ge=Ee&&Ee.$$typeof;switch(Ge){case s:case o:case u:case d:case f:case a:return Ge;default:return _e}}case e:return _e}}}var _=o,S=a,A=t,E=u,N=r,j=d,$=f,k=e,I=i,R=n,M=l,L=c,q=!1,z=!1;function D(H){return q||(q=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function B(H){return z||(z=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function F(H){return g(H)===o}function G(H){return g(H)===a}function J(H){return typeof H=="object"&&H!==null&&H.$$typeof===t}function re(H){return g(H)===u}function ne(H){return g(H)===r}function ue(H){return g(H)===d}function oe(H){return g(H)===f}function W(H){return g(H)===e}function Y(H){return g(H)===i}function te(H){return g(H)===n}function C(H){return g(H)===l}function ye(H){return g(H)===c}Oe.ContextConsumer=_,Oe.ContextProvider=S,Oe.Element=A,Oe.ForwardRef=E,Oe.Fragment=N,Oe.Lazy=j,Oe.Memo=$,Oe.Portal=k,Oe.Profiler=I,Oe.StrictMode=R,Oe.Suspense=M,Oe.SuspenseList=L,Oe.isAsyncMode=D,Oe.isConcurrentMode=B,Oe.isContextConsumer=F,Oe.isContextProvider=G,Oe.isElement=J,Oe.isForwardRef=re,Oe.isFragment=ne,Oe.isLazy=ue,Oe.isMemo=oe,Oe.isPortal=W,Oe.isProfiler=Y,Oe.isStrictMode=te,Oe.isSuspense=C,Oe.isSuspenseList=ye,Oe.isValidElementType=O,Oe.typeOf=g}()),Oe}process.env.NODE_ENV==="production"?Bl.exports=sT():Bl.exports=uT();var lT=Bl.exports,cT=lr,fT=cr,dT="[object Number]";function hT(t){return typeof t=="number"||fT(t)&&cT(t)==dT}var wv=hT;const pT=je(wv);var vT=wv;function yT(t){return vT(t)&&t!=+t}var gT=yT;const Xn=je(gT);var ft=function(e){return e===0?0:e>0?1:-1},nn=function(e){return rn(e)&&e.indexOf("%")===e.length-1},V=function(e){return pT(e)&&!Xn(e)},mT=function(e){return fe(e)},Je=function(e){return V(e)||rn(e)},bT=0,an=function(e){var r=++bT;return"".concat(e||"").concat(r)},dt=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!V(e)&&!rn(e))return n;var a;if(nn(e)){var o=e.indexOf("%");a=r*parseFloat(e.slice(0,o))/100}else a=+e;return Xn(a)&&(a=n),i&&a>r&&(a=r),a},Cr=function(e){if(!e)return null;var r=Object.keys(e);return r&&r.length?e[r[0]]:null},wT=function(e){if(!Array.isArray(e))return!1;for(var r=e.length,n={},i=0;i<r;i++)if(!n[e[i]])n[e[i]]=!0;else return!0;return!1},Fe=function(e,r){return V(e)&&V(r)?function(n){return e+n*(r-e)}:function(){return r}};function Yo(t,e,r){return!t||!t.length?null:t.find(function(n){return n&&(typeof e=="function"?e(n):xt(n,e))===r})}var _T=function(e,r){return V(e)&&V(r)?e-r:rn(e)&&rn(r)?e.localeCompare(r):e instanceof Date&&r instanceof Date?e.getTime()-r.getTime():String(e).localeCompare(String(r))};function Jn(t,e){for(var r in t)if({}.hasOwnProperty.call(t,r)&&(!{}.hasOwnProperty.call(e,r)||t[r]!==e[r]))return!1;for(var n in e)if({}.hasOwnProperty.call(e,n)&&!{}.hasOwnProperty.call(t,n))return!1;return!0}function Ul(t){"@babel/helpers - typeof";return Ul=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ul(t)}var xT=["viewBox","children"],OT=["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"],_v=["points","pathLength"],Fl={svg:xT,polygon:_v,polyline:_v},Wl=["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"],Xo=function(e,r){if(!e||typeof e=="function"||typeof e=="boolean")return null;var n=e;if(x.isValidElement(e)&&(n=e.props),!Vn(n))return null;var i={};return Object.keys(n).forEach(function(a){Wl.includes(a)&&(i[a]=r||function(o){return n[a](n,o)})}),i},ST=function(e,r,n){return function(i){return e(r,n,i),null}},on=function(e,r,n){if(!Vn(e)||Ul(e)!=="object")return null;var i=null;return Object.keys(e).forEach(function(a){var o=e[a];Wl.includes(a)&&typeof o=="function"&&(i||(i={}),i[a]=ST(o,r,n))}),i},AT=["children"],PT=["children"];function xv(t,e){if(t==null)return{};var r=ET(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function ET(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function ql(t){"@babel/helpers - typeof";return ql=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ql(t)}var Ov={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"},fr=function(e){return typeof e=="string"?e:e?e.displayName||e.name||"Component":""},Sv=null,zl=null,Kl=function t(e){if(e===Sv&&Array.isArray(zl))return zl;var r=[];return x.Children.forEach(e,function(n){fe(n)||(lT.isFragment(n)?r=r.concat(t(n.props.children)):r.push(n))}),zl=r,Sv=e,r};function Ot(t,e){var r=[],n=[];return Array.isArray(e)?n=e.map(function(i){return fr(i)}):n=[fr(e)],Kl(t).forEach(function(i){var a=xt(i,"type.displayName")||xt(i,"type.name");n.indexOf(a)!==-1&&r.push(i)}),r}function St(t,e){var r=Ot(t,e);return r&&r[0]}var Av=function(e){if(!e||!e.props)return!1;var r=e.props,n=r.width,i=r.height;return!(!V(n)||n<=0||!V(i)||i<=0)},TT=["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"],jT=function(e){return e&&e.type&&rn(e.type)&&TT.indexOf(e.type)>=0},Pv=function(e){return e&&ql(e)==="object"&&"clipDot"in e},$T=function(e,r,n,i){var a,o=(a=Fl==null?void 0:Fl[i])!==null&&a!==void 0?a:[];return r.startsWith("data-")||!ae(e)&&(i&&o.includes(r)||OT.includes(r))||n&&Wl.includes(r)},Q=function(e,r,n){if(!e||typeof e=="function"||typeof e=="boolean")return null;var i=e;if(x.isValidElement(e)&&(i=e.props),!Vn(i))return null;var a={};return Object.keys(i).forEach(function(o){var s;$T((s=i)===null||s===void 0?void 0:s[o],o,r,n)&&(a[o]=i[o])}),a},Vl=function t(e,r){if(e===r)return!0;var n=x.Children.count(e);if(n!==x.Children.count(r))return!1;if(n===0)return!0;if(n===1)return Ev(Array.isArray(e)?e[0]:e,Array.isArray(r)?r[0]:r);for(var i=0;i<n;i++){var a=e[i],o=r[i];if(Array.isArray(a)||Array.isArray(o)){if(!t(a,o))return!1}else if(!Ev(a,o))return!1}return!0},Ev=function(e,r){if(fe(e)&&fe(r))return!0;if(!fe(e)&&!fe(r)){var n=e.props||{},i=n.children,a=xv(n,AT),o=r.props||{},s=o.children,u=xv(o,PT);return i&&s?Jn(a,u)&&Vl(i,s):!i&&!s?Jn(a,u):!1}return!1},Tv=function(e,r){var n=[],i={};return Kl(e).forEach(function(a,o){if(jT(a))n.push(a);else if(a){var s=fr(a.type),u=r[s]||{},l=u.handler,c=u.once;if(l&&(!c||!i[s])){var f=l(a,s,o);n.push(f),i[s]=!0}}}),n},kT=function(e){var r=e&&e.type;return r&&Ov[r]?Ov[r]:null},CT=function(e,r){return Kl(r).indexOf(e)},IT=["children","width","height","viewBox","className","style","title","desc"];function Hl(){return Hl=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Hl.apply(this,arguments)}function NT(t,e){if(t==null)return{};var r=MT(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function MT(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function Gl(t){var e=t.children,r=t.width,n=t.height,i=t.viewBox,a=t.className,o=t.style,s=t.title,u=t.desc,l=NT(t,IT),c=i||{width:r,height:n,x:0,y:0},f=le("recharts-surface",a);return x.createElement("svg",Hl({},Q(l,!0,"svg"),{className:f,width:r,height:n,style:o,viewBox:"".concat(c.x," ").concat(c.y," ").concat(c.width," ").concat(c.height)}),x.createElement("title",null,s),x.createElement("desc",null,u),e)}var DT=["children","className"];function Yl(){return Yl=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Yl.apply(this,arguments)}function RT(t,e){if(t==null)return{};var r=LT(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function LT(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}var pe=x.forwardRef(function(t,e){var r=t.children,n=t.className,i=RT(t,DT),a=le("recharts-layer",n);return x.createElement("g",Yl({className:a},Q(i,!0),{ref:e}),r)}),BT=process.env.NODE_ENV!=="production",zt=function(e,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;a<n;a++)i[a-2]=arguments[a];if(BT&&typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!e))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 i[o++]}))}};function UT(t,e,r){var n=-1,i=t.length;e<0&&(e=-e>i?0:i+e),r=r>i?i:r,r<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var a=Array(i);++n<i;)a[n]=t[n+e];return a}var FT=UT,WT=FT;function qT(t,e,r){var n=t.length;return r=r===void 0?n:r,!e&&r>=n?t:WT(t,e,r)}var zT=qT,KT="\\ud800-\\udfff",VT="\\u0300-\\u036f",HT="\\ufe20-\\ufe2f",GT="\\u20d0-\\u20ff",YT=VT+HT+GT,XT="\\ufe0e\\ufe0f",JT="\\u200d",ZT=RegExp("["+JT+KT+YT+XT+"]");function QT(t){return ZT.test(t)}var jv=QT;function ej(t){return t.split("")}var tj=ej,$v="\\ud800-\\udfff",rj="\\u0300-\\u036f",nj="\\ufe20-\\ufe2f",ij="\\u20d0-\\u20ff",aj=rj+nj+ij,oj="\\ufe0e\\ufe0f",sj="["+$v+"]",Xl="["+aj+"]",Jl="\\ud83c[\\udffb-\\udfff]",uj="(?:"+Xl+"|"+Jl+")",kv="[^"+$v+"]",Cv="(?:\\ud83c[\\udde6-\\uddff]){2}",Iv="[\\ud800-\\udbff][\\udc00-\\udfff]",lj="\\u200d",Nv=uj+"?",Mv="["+oj+"]?",cj="(?:"+lj+"(?:"+[kv,Cv,Iv].join("|")+")"+Mv+Nv+")*",fj=Mv+Nv+cj,dj="(?:"+[kv+Xl+"?",Xl,Cv,Iv,sj].join("|")+")",hj=RegExp(Jl+"(?="+Jl+")|"+dj+fj,"g");function pj(t){return t.match(hj)||[]}var vj=pj,yj=tj,gj=jv,mj=vj;function bj(t){return gj(t)?mj(t):yj(t)}var wj=bj,_j=zT,xj=jv,Oj=wj,Sj=vv;function Aj(t){return function(e){e=Sj(e);var r=xj(e)?Oj(e):void 0,n=r?r[0]:e.charAt(0),i=r?_j(r,1).join(""):e.slice(1);return n[t]()+i}}var Pj=Aj,Ej=Pj,Tj=Ej("toUpperCase"),jj=Tj;const Jo=je(jj);function Ne(t){return function(){return t}}const Dv=Math.cos,Zo=Math.sin,Kt=Math.sqrt,Qo=Math.PI,es=2*Qo,Zl=Math.PI,Ql=2*Zl,sn=1e-6,$j=Ql-sn;function Rv(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=arguments[e]+t[e]}function kj(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Rv;const r=10**e;return function(n){this._+=n[0];for(let i=1,a=n.length;i<a;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}class Cj{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?Rv:kj(e)}moveTo(e,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,r){this._append`L${this._x1=+e},${this._y1=+r}`}quadraticCurveTo(e,r,n,i){this._append`Q${+e},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(e,r,n,i,a,o){this._append`C${+e},${+r},${+n},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(e,r,n,i,a){if(e=+e,r=+r,n=+n,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,s=this._y1,u=n-e,l=i-r,c=o-e,f=s-r,d=c*c+f*f;if(this._x1===null)this._append`M${this._x1=e},${this._y1=r}`;else if(d>sn)if(!(Math.abs(f*u-l*c)>sn)||!a)this._append`L${this._x1=e},${this._y1=r}`;else{let h=n-o,y=i-s,v=u*u+l*l,p=h*h+y*y,m=Math.sqrt(v),b=Math.sqrt(d),w=a*Math.tan((Zl-Math.acos((v+d-p)/(2*m*b)))/2),O=w/b,g=w/m;Math.abs(O-1)>sn&&this._append`L${e+O*c},${r+O*f}`,this._append`A${a},${a},0,0,${+(f*h>c*y)},${this._x1=e+g*u},${this._y1=r+g*l}`}}arc(e,r,n,i,a,o){if(e=+e,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(i),u=n*Math.sin(i),l=e+s,c=r+u,f=1^o,d=o?i-a:a-i;this._x1===null?this._append`M${l},${c}`:(Math.abs(this._x1-l)>sn||Math.abs(this._y1-c)>sn)&&this._append`L${l},${c}`,n&&(d<0&&(d=d%Ql+Ql),d>$j?this._append`A${n},${n},0,1,${f},${e-s},${r-u}A${n},${n},0,1,${f},${this._x1=l},${this._y1=c}`:d>sn&&this._append`A${n},${n},0,${+(d>=Zl)},${f},${this._x1=e+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(e,r,n,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function ec(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(r==null)e=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);e=n}return t},()=>new Cj(e)}function tc(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Lv(t){this._context=t}Lv.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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function ts(t){return new Lv(t)}function Bv(t){return t[0]}function Uv(t){return t[1]}function Fv(t,e){var r=Ne(!0),n=null,i=ts,a=null,o=ec(s);t=typeof t=="function"?t:t===void 0?Bv:Ne(t),e=typeof e=="function"?e:e===void 0?Uv:Ne(e);function s(u){var l,c=(u=tc(u)).length,f,d=!1,h;for(n==null&&(a=i(h=o())),l=0;l<=c;++l)!(l<c&&r(f=u[l],l,u))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+t(f,l,u),+e(f,l,u));if(h)return a=null,h+""||null}return s.x=function(u){return arguments.length?(t=typeof u=="function"?u:Ne(+u),s):t},s.y=function(u){return arguments.length?(e=typeof u=="function"?u:Ne(+u),s):e},s.defined=function(u){return arguments.length?(r=typeof u=="function"?u:Ne(!!u),s):r},s.curve=function(u){return arguments.length?(i=u,n!=null&&(a=i(n)),s):i},s.context=function(u){return arguments.length?(u==null?n=a=null:a=i(n=u),s):n},s}function rs(t,e,r){var n=null,i=Ne(!0),a=null,o=ts,s=null,u=ec(l);t=typeof t=="function"?t:t===void 0?Bv:Ne(+t),e=typeof e=="function"?e:Ne(e===void 0?0:+e),r=typeof r=="function"?r:r===void 0?Uv:Ne(+r);function l(f){var d,h,y,v=(f=tc(f)).length,p,m=!1,b,w=new Array(v),O=new Array(v);for(a==null&&(s=o(b=u())),d=0;d<=v;++d){if(!(d<v&&i(p=f[d],d,f))===m)if(m=!m)h=d,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),y=d-1;y>=h;--y)s.point(w[y],O[y]);s.lineEnd(),s.areaEnd()}m&&(w[d]=+t(p,d,f),O[d]=+e(p,d,f),s.point(n?+n(p,d,f):w[d],r?+r(p,d,f):O[d]))}if(b)return s=null,b+""||null}function c(){return Fv().defined(i).curve(o).context(a)}return l.x=function(f){return arguments.length?(t=typeof f=="function"?f:Ne(+f),n=null,l):t},l.x0=function(f){return arguments.length?(t=typeof f=="function"?f:Ne(+f),l):t},l.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Ne(+f),l):n},l.y=function(f){return arguments.length?(e=typeof f=="function"?f:Ne(+f),r=null,l):e},l.y0=function(f){return arguments.length?(e=typeof f=="function"?f:Ne(+f),l):e},l.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Ne(+f),l):r},l.lineX0=l.lineY0=function(){return c().x(t).y(e)},l.lineY1=function(){return c().x(t).y(r)},l.lineX1=function(){return c().x(n).y(e)},l.defined=function(f){return arguments.length?(i=typeof f=="function"?f:Ne(!!f),l):i},l.curve=function(f){return arguments.length?(o=f,a!=null&&(s=o(a)),l):o},l.context=function(f){return arguments.length?(f==null?a=s=null:s=o(a=f),l):a},l}class Wv{constructor(e,r){this._context=e,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(e,r){switch(e=+e,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,r,e,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,e,this._y0,e,r);break}}this._x0=e,this._y0=r}}function Ij(t){return new Wv(t,!0)}function Nj(t){return new Wv(t,!1)}const rc={draw(t,e){const r=Kt(e/Qo);t.moveTo(r,0),t.arc(0,0,r,0,es)}},Mj={draw(t,e){const r=Kt(e/5)/2;t.moveTo(-3*r,-r),t.lineTo(-r,-r),t.lineTo(-r,-3*r),t.lineTo(r,-3*r),t.lineTo(r,-r),t.lineTo(3*r,-r),t.lineTo(3*r,r),t.lineTo(r,r),t.lineTo(r,3*r),t.lineTo(-r,3*r),t.lineTo(-r,r),t.lineTo(-3*r,r),t.closePath()}},qv=Kt(1/3),Dj=qv*2,Rj={draw(t,e){const r=Kt(e/Dj),n=r*qv;t.moveTo(0,-r),t.lineTo(n,0),t.lineTo(0,r),t.lineTo(-n,0),t.closePath()}},Lj={draw(t,e){const r=Kt(e),n=-r/2;t.rect(n,n,r,r)}},Bj=.8908130915292852,zv=Zo(Qo/10)/Zo(7*Qo/10),Uj=Zo(es/10)*zv,Fj=-Dv(es/10)*zv,Wj={draw(t,e){const r=Kt(e*Bj),n=Uj*r,i=Fj*r;t.moveTo(0,-r),t.lineTo(n,i);for(let a=1;a<5;++a){const o=es*a/5,s=Dv(o),u=Zo(o);t.lineTo(u*r,-s*r),t.lineTo(s*n-u*i,u*n+s*i)}t.closePath()}},nc=Kt(3),qj={draw(t,e){const r=-Kt(e/(nc*3));t.moveTo(0,r*2),t.lineTo(-nc*r,-r),t.lineTo(nc*r,-r),t.closePath()}},$t=-.5,kt=Kt(3)/2,ic=1/Kt(12),zj=(ic/2+1)*3,Kj={draw(t,e){const r=Kt(e/zj),n=r/2,i=r*ic,a=n,o=r*ic+r,s=-a,u=o;t.moveTo(n,i),t.lineTo(a,o),t.lineTo(s,u),t.lineTo($t*n-kt*i,kt*n+$t*i),t.lineTo($t*a-kt*o,kt*a+$t*o),t.lineTo($t*s-kt*u,kt*s+$t*u),t.lineTo($t*n+kt*i,$t*i-kt*n),t.lineTo($t*a+kt*o,$t*o-kt*a),t.lineTo($t*s+kt*u,$t*u-kt*s),t.closePath()}};function Vj(t,e){let r=null,n=ec(i);t=typeof t=="function"?t:Ne(t||rc),e=typeof e=="function"?e:Ne(e===void 0?64:+e);function i(){let a;if(r||(r=a=n()),t.apply(this,arguments).draw(r,+e.apply(this,arguments)),a)return r=null,a+""||null}return i.type=function(a){return arguments.length?(t=typeof a=="function"?a:Ne(a),i):t},i.size=function(a){return arguments.length?(e=typeof a=="function"?a:Ne(+a),i):e},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function ns(){}function is(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function Kv(t){this._context=t}Kv.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:is(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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);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:is(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Hj(t){return new Kv(t)}function Vv(t){this._context=t}Vv.prototype={areaStart:ns,areaEnd:ns,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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:is(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Gj(t){return new Vv(t)}function Hv(t){this._context=t}Hv.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(t,e){switch(t=+t,e=+e,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+t)/6,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:is(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Yj(t){return new Hv(t)}function Gv(t){this._context=t}Gv.prototype={areaStart:ns,areaEnd:ns,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function Xj(t){return new Gv(t)}function Yv(t){return t<0?-1:1}function Xv(t,e,r){var n=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(n||i<0&&-0),o=(r-t._y1)/(i||n<0&&-0),s=(a*i+o*n)/(n+i);return(Yv(a)+Yv(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Jv(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function ac(t,e,r){var n=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-n)/3;t._context.bezierCurveTo(n+s,i+s*e,a-s,o-s*r,a,o)}function as(t){this._context=t}as.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:ac(this,this._t0,Jv(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var r=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,ac(this,Jv(this,r=Xv(this,t,e)),r);break;default:ac(this,this._t0,r=Xv(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}};function Zv(t){this._context=new Qv(t)}(Zv.prototype=Object.create(as.prototype)).point=function(t,e){as.prototype.point.call(this,e,t)};function Qv(t){this._context=t}Qv.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,r,n,i,a){this._context.bezierCurveTo(e,t,n,r,a,i)}};function Jj(t){return new as(t)}function Zj(t){return new Zv(t)}function ey(t){this._context=t}ey.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,r=t.length;if(r)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),r===2)this._context.lineTo(t[1],e[1]);else for(var n=ty(t),i=ty(e),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],t[o],e[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function ty(t){var e,r=t.length-1,n,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,a[e]=4,o[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/a[e-1],a[e]-=n,o[e]-=n*o[e-1];for(i[r-1]=o[r-1]/a[r-1],e=r-2;e>=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)a[e]=2*t[e+1]-i[e+1];return[i,a]}function Qj(t){return new ey(t)}function os(t,e){this._context=t,this._t=e}os.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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}break}}this._x=t,this._y=e}};function e$(t){return new os(t,.5)}function t$(t){return new os(t,0)}function r$(t){return new os(t,1)}function Zn(t,e){if((o=t.length)>1)for(var r=1,n,i,a=t[e[0]],o,s=a.length;r<o;++r)for(i=a,a=t[e[r]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function oc(t){for(var e=t.length,r=new Array(e);--e>=0;)r[e]=e;return r}function n$(t,e){return t[e]}function i$(t){const e=[];return e.key=t,e}function a$(){var t=Ne([]),e=oc,r=Zn,n=n$;function i(a){var o=Array.from(t.apply(this,arguments),i$),s,u=o.length,l=-1,c;for(const f of a)for(s=0,++l;s<u;++s)(o[s][l]=[0,+n(f,o[s].key,l,a)]).data=f;for(s=0,c=tc(e(o));s<u;++s)o[c[s]].index=s;return r(o,c),o}return i.keys=function(a){return arguments.length?(t=typeof a=="function"?a:Ne(Array.from(a)),i):t},i.value=function(a){return arguments.length?(n=typeof a=="function"?a:Ne(+a),i):n},i.order=function(a){return arguments.length?(e=a==null?oc:typeof a=="function"?a:Ne(Array.from(a)),i):e},i.offset=function(a){return arguments.length?(r=a??Zn,i):r},i}function o$(t,e){if((n=t.length)>0){for(var r,n,i=0,a=t[0].length,o;i<a;++i){for(o=r=0;r<n;++r)o+=t[r][i][1]||0;if(o)for(r=0;r<n;++r)t[r][i][1]/=o}Zn(t,e)}}function s$(t,e){if((i=t.length)>0){for(var r=0,n=t[e[0]],i,a=n.length;r<a;++r){for(var o=0,s=0;o<i;++o)s+=t[o][r][1]||0;n[r][1]+=n[r][0]=-s/2}Zn(t,e)}}function u$(t,e){if(!(!((o=t.length)>0)||!((a=(i=t[e[0]]).length)>0))){for(var r=0,n=1,i,a,o;n<a;++n){for(var s=0,u=0,l=0;s<o;++s){for(var c=t[e[s]],f=c[n][1]||0,d=c[n-1][1]||0,h=(f-d)/2,y=0;y<s;++y){var v=t[e[y]],p=v[n][1]||0,m=v[n-1][1]||0;h+=p-m}u+=f,l+=h*f}i[n-1][1]+=i[n-1][0]=r,u&&(r-=l/u)}i[n-1][1]+=i[n-1][0]=r,Zn(t,e)}}function ha(t){"@babel/helpers - typeof";return ha=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ha(t)}var l$=["type","size","sizeType"];function sc(){return sc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},sc.apply(this,arguments)}function ry(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function ny(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ry(Object(r),!0).forEach(function(n){c$(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ry(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function c$(t,e,r){return e=f$(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function f$(t){var e=d$(t,"string");return ha(e)=="symbol"?e:e+""}function d$(t,e){if(ha(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(ha(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function h$(t,e){if(t==null)return{};var r=p$(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function p$(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}var iy={symbolCircle:rc,symbolCross:Mj,symbolDiamond:Rj,symbolSquare:Lj,symbolStar:Wj,symbolTriangle:qj,symbolWye:Kj},v$=Math.PI/180,y$=function(e){var r="symbol".concat(Jo(e));return iy[r]||rc},g$=function(e,r,n){if(r==="area")return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var i=18*v$;return 1.25*e*e*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},m$=function(e,r){iy["symbol".concat(Jo(e))]=r},uc=function(e){var r=e.type,n=r===void 0?"circle":r,i=e.size,a=i===void 0?64:i,o=e.sizeType,s=o===void 0?"area":o,u=h$(e,l$),l=ny(ny({},u),{},{type:n,size:a,sizeType:s}),c=function(){var p=y$(n),m=Vj().type(p).size(g$(a,s,n));return m()},f=l.className,d=l.cx,h=l.cy,y=Q(l,!0);return d===+d&&h===+h&&a===+a?x.createElement("path",sc({},y,{className:le("recharts-symbols",f),transform:"translate(".concat(d,", ").concat(h,")"),d:c()})):null};uc.registerSymbol=m$;function Qn(t){"@babel/helpers - typeof";return Qn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qn(t)}function lc(){return lc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},lc.apply(this,arguments)}function ay(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function b$(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ay(Object(r),!0).forEach(function(n){pa(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ay(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function w$(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _$(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,sy(n.key),n)}}function x$(t,e,r){return e&&_$(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function O$(t,e,r){return e=ss(e),S$(t,oy()?Reflect.construct(e,r||[],ss(t).constructor):e.apply(t,r))}function S$(t,e){if(e&&(Qn(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return A$(t)}function A$(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function oy(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(oy=function(){return!!t})()}function ss(t){return ss=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ss(t)}function P$(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&cc(t,e)}function cc(t,e){return cc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},cc(t,e)}function pa(t,e,r){return e=sy(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function sy(t){var e=E$(t,"string");return Qn(e)=="symbol"?e:e+""}function E$(t,e){if(Qn(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Qn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Ct=32,fc=function(t){function e(){return w$(this,e),O$(this,e,arguments)}return P$(e,t),x$(e,[{key:"renderIcon",value:function(n){var i=this.props.inactiveColor,a=Ct/2,o=Ct/6,s=Ct/3,u=n.inactive?i:n.color;if(n.type==="plainline")return x.createElement("line",{strokeWidth:4,fill:"none",stroke:u,strokeDasharray:n.payload.strokeDasharray,x1:0,y1:a,x2:Ct,y2:a,className:"recharts-legend-icon"});if(n.type==="line")return x.createElement("path",{strokeWidth:4,fill:"none",stroke:u,d:"M0,".concat(a,"h").concat(s,`
|
|
86
86
|
A`).concat(o,",").concat(o,",0,1,1,").concat(2*s,",").concat(a,`
|
|
87
87
|
H`).concat(Ct,"M").concat(2*s,",").concat(a,`
|
|
88
|
-
A`).concat(o,",").concat(o,",0,1,1,").concat(s,",").concat(a),className:"recharts-legend-icon"});if(n.type==="rect")return x.createElement("path",{stroke:"none",fill:u,d:"M0,".concat(Ct/8,"h").concat(Ct,"v").concat(Ct*3/4,"h").concat(-Ct,"z"),className:"recharts-legend-icon"});if(x.isValidElement(n.legendIcon)){var l=w$({},n);return delete l.legendIcon,x.cloneElement(n.legendIcon,l)}return x.createElement(lc,{fill:u,cx:a,cy:a,size:Ct,sizeType:"diameter",type:n.type})}},{key:"renderItems",value:function(){var n=this,i=this.props,a=i.payload,o=i.iconSize,s=i.layout,u=i.formatter,l=i.inactiveColor,c={x:0,y:0,width:Ct,height:Ct},f={display:s==="horizontal"?"inline-block":"block",marginRight:10},d={display:"inline-block",verticalAlign:"middle",marginRight:4};return a.map(function(h,y){var v=h.formatter||u,p=le(pa(pa({"recharts-legend-item":!0},"legend-item-".concat(y),!0),"inactive",h.inactive));if(h.type==="none")return null;var m=ae(h.value)?null:h.value;zt(!ae(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 b=h.inactive?l:h.color;return x.createElement("li",cc({className:p,style:f,key:"legend-item-".concat(y)},on(n.props,h,y)),x.createElement(Yl,{width:o,height:o,viewBox:c,style:d},n.renderIcon(h)),x.createElement("span",{className:"recharts-legend-item-text",style:{color:b}},v?v(m,h,y):m))})}},{key:"render",value:function(){var n=this.props,i=n.payload,a=n.layout,o=n.align;if(!i||!i.length)return null;var s={padding:0,margin:0,textAlign:a==="horizontal"?o:"left"};return x.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(x.PureComponent);pa(dc,"displayName","Legend"),pa(dc,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var j$=Ho;function $$(){this.__data__=new j$,this.size=0}var k$=$$;function C$(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}var I$=C$;function N$(t){return this.__data__.get(t)}var M$=N$;function D$(t){return this.__data__.has(t)}var R$=D$,L$=Ho,B$=Ml,U$=Dl,F$=200;function W$(t,e){var r=this.__data__;if(r instanceof L$){var n=r.__data__;if(!B$||n.length<F$-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new U$(n)}return r.set(t,e),this.size=r.size,this}var q$=W$,z$=Ho,K$=k$,V$=I$,H$=M$,G$=R$,Y$=q$;function ei(t){var e=this.__data__=new z$(t);this.size=e.size}ei.prototype.clear=K$,ei.prototype.delete=V$,ei.prototype.get=H$,ei.prototype.has=G$,ei.prototype.set=Y$;var ly=ei,X$="__lodash_hash_undefined__";function J$(t){return this.__data__.set(t,X$),this}var Z$=J$;function Q$(t){return this.__data__.has(t)}var ek=Q$,tk=Dl,rk=Z$,nk=ek;function ls(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new tk;++e<r;)this.add(t[e])}ls.prototype.add=ls.prototype.push=rk,ls.prototype.has=nk;var cy=ls;function ik(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}var fy=ik;function ak(t,e){return t.has(e)}var dy=ak,ok=cy,sk=fy,uk=dy,lk=1,ck=2;function fk(t,e,r,n,i,a){var o=r&lk,s=t.length,u=e.length;if(s!=u&&!(o&&u>s))return!1;var l=a.get(t),c=a.get(e);if(l&&c)return l==e&&c==t;var f=-1,d=!0,h=r&ck?new ok:void 0;for(a.set(t,e),a.set(e,t);++f<s;){var y=t[f],v=e[f];if(n)var p=o?n(v,y,f,e,t,a):n(y,v,f,t,e,a);if(p!==void 0){if(p)continue;d=!1;break}if(h){if(!sk(e,function(m,b){if(!uk(h,b)&&(y===m||i(y,m,r,n,a)))return h.push(b)})){d=!1;break}}else if(!(y===v||i(y,v,r,n,a))){d=!1;break}}return a.delete(t),a.delete(e),d}var hy=fk,dk=Qt,hk=dk.Uint8Array,pk=hk;function vk(t){var e=-1,r=Array(t.size);return t.forEach(function(n,i){r[++e]=[i,n]}),r}var yk=vk;function gk(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var hc=gk,py=fa,vy=pk,mk=Nl,bk=hy,wk=yk,_k=hc,xk=1,Ok=2,Sk="[object Boolean]",Ak="[object Date]",Pk="[object Error]",Ek="[object Map]",Tk="[object Number]",jk="[object RegExp]",$k="[object Set]",kk="[object String]",Ck="[object Symbol]",Ik="[object ArrayBuffer]",Nk="[object DataView]",yy=py?py.prototype:void 0,pc=yy?yy.valueOf:void 0;function Mk(t,e,r,n,i,a,o){switch(r){case Nk:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Ik:return!(t.byteLength!=e.byteLength||!a(new vy(t),new vy(e)));case Sk:case Ak:case Tk:return mk(+t,+e);case Pk:return t.name==e.name&&t.message==e.message;case jk:case kk:return t==e+"";case Ek:var s=wk;case $k:var u=n&xk;if(s||(s=_k),t.size!=e.size&&!u)return!1;var l=o.get(t);if(l)return l==e;n|=Ok,o.set(t,e);var c=bk(s(t),s(e),n,i,a,o);return o.delete(t),c;case Ck:if(pc)return pc.call(t)==pc.call(e)}return!1}var Dk=Mk;function Rk(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}var gy=Rk,Lk=gy,Bk=yt;function Uk(t,e,r){var n=e(t);return Bk(t)?n:Lk(n,r(t))}var Fk=Uk;function Wk(t,e){for(var r=-1,n=t==null?0:t.length,i=0,a=[];++r<n;){var o=t[r];e(o,r,t)&&(a[i++]=o)}return a}var qk=Wk;function zk(){return[]}var Kk=zk,Vk=qk,Hk=Kk,Gk=Object.prototype,Yk=Gk.propertyIsEnumerable,my=Object.getOwnPropertySymbols,Xk=my?function(t){return t==null?[]:(t=Object(t),Vk(my(t),function(e){return Yk.call(t,e)}))}:Hk,Jk=Xk;function Zk(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var Qk=Zk,eC=lr,tC=cr,rC="[object Arguments]";function nC(t){return tC(t)&&eC(t)==rC}var iC=nC,by=iC,aC=cr,wy=Object.prototype,oC=wy.hasOwnProperty,sC=wy.propertyIsEnumerable,uC=by(function(){return arguments}())?by:function(t){return aC(t)&&oC.call(t,"callee")&&!sC.call(t,"callee")},vc=uC,cs={exports:{}};function lC(){return!1}var cC=lC;cs.exports,function(t,e){var r=Qt,n=cC,i=e&&!e.nodeType&&e,a=i&&!0&&t&&!t.nodeType&&t,o=a&&a.exports===i,s=o?r.Buffer:void 0,u=s?s.isBuffer:void 0,l=u||n;t.exports=l}(cs,cs.exports);var _y=cs.exports,fC=9007199254740991,dC=/^(?:0|[1-9]\d*)$/;function hC(t,e){var r=typeof t;return e=e??fC,!!e&&(r=="number"||r!="symbol"&&dC.test(t))&&t>-1&&t%1==0&&t<e}var yc=hC,pC=9007199254740991;function vC(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=pC}var gc=vC,yC=lr,gC=gc,mC=cr,bC="[object Arguments]",wC="[object Array]",_C="[object Boolean]",xC="[object Date]",OC="[object Error]",SC="[object Function]",AC="[object Map]",PC="[object Number]",EC="[object Object]",TC="[object RegExp]",jC="[object Set]",$C="[object String]",kC="[object WeakMap]",CC="[object ArrayBuffer]",IC="[object DataView]",NC="[object Float32Array]",MC="[object Float64Array]",DC="[object Int8Array]",RC="[object Int16Array]",LC="[object Int32Array]",BC="[object Uint8Array]",UC="[object Uint8ClampedArray]",FC="[object Uint16Array]",WC="[object Uint32Array]",Re={};Re[NC]=Re[MC]=Re[DC]=Re[RC]=Re[LC]=Re[BC]=Re[UC]=Re[FC]=Re[WC]=!0,Re[bC]=Re[wC]=Re[CC]=Re[_C]=Re[IC]=Re[xC]=Re[OC]=Re[SC]=Re[AC]=Re[PC]=Re[EC]=Re[TC]=Re[jC]=Re[$C]=Re[kC]=!1;function qC(t){return mC(t)&&gC(t.length)&&!!Re[yC(t)]}var zC=qC;function KC(t){return function(e){return t(e)}}var xy=KC,fs={exports:{}};fs.exports,function(t,e){var r=tv,n=e&&!e.nodeType&&e,i=n&&!0&&t&&!t.nodeType&&t,a=i&&i.exports===n,o=a&&r.process,s=function(){try{var u=i&&i.require&&i.require("util").types;return u||o&&o.binding&&o.binding("util")}catch{}}();t.exports=s}(fs,fs.exports);var VC=fs.exports,HC=zC,GC=xy,Oy=VC,Sy=Oy&&Oy.isTypedArray,YC=Sy?GC(Sy):HC,Ay=YC,XC=Qk,JC=vc,ZC=yt,QC=_y,eI=yc,tI=Ay,rI=Object.prototype,nI=rI.hasOwnProperty;function iI(t,e){var r=ZC(t),n=!r&&JC(t),i=!r&&!n&&QC(t),a=!r&&!n&&!i&&tI(t),o=r||n||i||a,s=o?XC(t.length,String):[],u=s.length;for(var l in t)(e||nI.call(t,l))&&!(o&&(l=="length"||i&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||eI(l,u)))&&s.push(l);return s}var aI=iI,oI=Object.prototype;function sI(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||oI;return t===r}var uI=sI;function lI(t,e){return function(r){return t(e(r))}}var Py=lI,cI=Py,fI=cI(Object.keys,Object),dI=fI,hI=uI,pI=dI,vI=Object.prototype,yI=vI.hasOwnProperty;function gI(t){if(!hI(t))return pI(t);var e=[];for(var r in Object(t))yI.call(t,r)&&r!="constructor"&&e.push(r);return e}var mI=gI,bI=Cl,wI=gc;function _I(t){return t!=null&&wI(t.length)&&!bI(t)}var va=_I,xI=aI,OI=mI,SI=va;function AI(t){return SI(t)?xI(t):OI(t)}var ds=AI,PI=Fk,EI=Jk,TI=ds;function jI(t){return PI(t,TI,EI)}var $I=jI,Ey=$I,kI=1,CI=Object.prototype,II=CI.hasOwnProperty;function NI(t,e,r,n,i,a){var o=r&kI,s=Ey(t),u=s.length,l=Ey(e),c=l.length;if(u!=c&&!o)return!1;for(var f=u;f--;){var d=s[f];if(!(o?d in e:II.call(e,d)))return!1}var h=a.get(t),y=a.get(e);if(h&&y)return h==e&&y==t;var v=!0;a.set(t,e),a.set(e,t);for(var p=o;++f<u;){d=s[f];var m=t[d],b=e[d];if(n)var w=o?n(b,m,d,e,t,a):n(m,b,d,t,e,a);if(!(w===void 0?m===b||i(m,b,r,n,a):w)){v=!1;break}p||(p=d=="constructor")}if(v&&!p){var O=t.constructor,g=e.constructor;O!=g&&"constructor"in t&&"constructor"in e&&!(typeof O=="function"&&O instanceof O&&typeof g=="function"&&g instanceof g)&&(v=!1)}return a.delete(t),a.delete(e),v}var MI=NI,DI=tn,RI=Qt,LI=DI(RI,"DataView"),BI=LI,UI=tn,FI=Qt,WI=UI(FI,"Promise"),qI=WI,zI=tn,KI=Qt,VI=zI(KI,"Set"),Ty=VI,HI=tn,GI=Qt,YI=HI(GI,"WeakMap"),XI=YI,mc=BI,bc=Ml,wc=qI,_c=Ty,xc=XI,jy=lr,ti=sv,$y="[object Map]",JI="[object Object]",ky="[object Promise]",Cy="[object Set]",Iy="[object WeakMap]",Ny="[object DataView]",ZI=ti(mc),QI=ti(bc),eN=ti(wc),tN=ti(_c),rN=ti(xc),un=jy;(mc&&un(new mc(new ArrayBuffer(1)))!=Ny||bc&&un(new bc)!=$y||wc&&un(wc.resolve())!=ky||_c&&un(new _c)!=Cy||xc&&un(new xc)!=Iy)&&(un=function(t){var e=jy(t),r=e==JI?t.constructor:void 0,n=r?ti(r):"";if(n)switch(n){case ZI:return Ny;case QI:return $y;case eN:return ky;case tN:return Cy;case rN:return Iy}return e});var nN=un,Oc=ly,iN=hy,aN=Dk,oN=MI,My=nN,Dy=yt,Ry=_y,sN=Ay,uN=1,Ly="[object Arguments]",By="[object Array]",hs="[object Object]",lN=Object.prototype,Uy=lN.hasOwnProperty;function cN(t,e,r,n,i,a){var o=Dy(t),s=Dy(e),u=o?By:My(t),l=s?By:My(e);u=u==Ly?hs:u,l=l==Ly?hs:l;var c=u==hs,f=l==hs,d=u==l;if(d&&Ry(t)){if(!Ry(e))return!1;o=!0,c=!1}if(d&&!c)return a||(a=new Oc),o||sN(t)?iN(t,e,r,n,i,a):aN(t,e,u,r,n,i,a);if(!(r&uN)){var h=c&&Uy.call(t,"__wrapped__"),y=f&&Uy.call(e,"__wrapped__");if(h||y){var v=h?t.value():t,p=y?e.value():e;return a||(a=new Oc),i(v,p,r,n,a)}}return d?(a||(a=new Oc),oN(t,e,r,n,i,a)):!1}var fN=cN,dN=fN,Fy=cr;function Wy(t,e,r,n,i){return t===e?!0:t==null||e==null||!Fy(t)&&!Fy(e)?t!==t&&e!==e:dN(t,e,r,n,Wy,i)}var Sc=Wy,hN=ly,pN=Sc,vN=1,yN=2;function gN(t,e,r,n){var i=r.length,a=i,o=!n;if(t==null)return!a;for(t=Object(t);i--;){var s=r[i];if(o&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<a;){s=r[i];var u=s[0],l=t[u],c=s[1];if(o&&s[2]){if(l===void 0&&!(u in t))return!1}else{var f=new hN;if(n)var d=n(l,c,u,t,e,f);if(!(d===void 0?pN(c,l,vN|yN,n,f):d))return!1}}return!0}var mN=gN,bN=Cr;function wN(t){return t===t&&!bN(t)}var qy=wN,_N=qy,xN=ds;function ON(t){for(var e=xN(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,_N(i)]}return e}var SN=ON;function AN(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}var zy=AN,PN=mN,EN=SN,TN=zy;function jN(t){var e=EN(t);return e.length==1&&e[0][2]?TN(e[0][0],e[0][1]):function(r){return r===t||PN(r,t,e)}}var $N=jN;function kN(t,e){return t!=null&&e in Object(t)}var CN=kN,IN=gv,NN=vc,MN=yt,DN=yc,RN=gc,LN=Yo;function BN(t,e,r){e=IN(e,t);for(var n=-1,i=e.length,a=!1;++n<i;){var o=LN(e[n]);if(!(a=t!=null&&r(t,o)))break;t=t[o]}return a||++n!=i?a:(i=t==null?0:t.length,!!i&&RN(i)&&DN(o,i)&&(MN(t)||NN(t)))}var UN=BN,FN=CN,WN=UN;function qN(t,e){return t!=null&&WN(t,e,FN)}var zN=qN,KN=Sc,VN=mv,HN=zN,GN=kl,YN=qy,XN=zy,JN=Yo,ZN=1,QN=2;function eM(t,e){return GN(t)&&YN(e)?XN(JN(t),e):function(r){var n=VN(r,t);return n===void 0&&n===e?HN(r,t):KN(e,n,ZN|QN)}}var tM=eM;function rM(t){return t}var ri=rM;function nM(t){return function(e){return e==null?void 0:e[t]}}var iM=nM,aM=Bl;function oM(t){return function(e){return aM(e,t)}}var sM=oM,uM=iM,lM=sM,cM=kl,fM=Yo;function dM(t){return cM(t)?uM(fM(t)):lM(t)}var hM=dM,pM=$N,vM=tM,yM=ri,gM=yt,mM=hM;function bM(t){return typeof t=="function"?t:t==null?yM:typeof t=="object"?gM(t)?vM(t[0],t[1]):pM(t):mM(t)}var er=bM;function wM(t,e,r,n){for(var i=t.length,a=r+(n?1:-1);n?a--:++a<i;)if(e(t[a],a,t))return a;return-1}var Ky=wM;function _M(t){return t!==t}var xM=_M;function OM(t,e,r){for(var n=r-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1}var SM=OM,AM=Ky,PM=xM,EM=SM;function TM(t,e,r){return e===e?EM(t,e,r):AM(t,PM,r)}var jM=TM,$M=jM;function kM(t,e){var r=t==null?0:t.length;return!!r&&$M(t,e,0)>-1}var CM=kM;function IM(t,e,r){for(var n=-1,i=t==null?0:t.length;++n<i;)if(r(e,t[n]))return!0;return!1}var NM=IM;function MM(){}var DM=MM,Ac=Ty,RM=DM,LM=hc,BM=1/0,UM=Ac&&1/LM(new Ac([,-0]))[1]==BM?function(t){return new Ac(t)}:RM,FM=UM,WM=cy,qM=CM,zM=NM,KM=dy,VM=FM,HM=hc,GM=200;function YM(t,e,r){var n=-1,i=qM,a=t.length,o=!0,s=[],u=s;if(r)o=!1,i=zM;else if(a>=GM){var l=e?null:VM(t);if(l)return HM(l);o=!1,i=KM,u=new WM}else u=e?[]:s;e:for(;++n<a;){var c=t[n],f=e?e(c):c;if(c=r||c!==0?c:0,o&&f===f){for(var d=u.length;d--;)if(u[d]===f)continue e;e&&u.push(f),s.push(c)}else i(u,f,r)||(u!==s&&u.push(f),s.push(c))}return s}var XM=YM,JM=er,ZM=XM;function QM(t,e){return t&&t.length?ZM(t,JM(e)):[]}var eD=QM;const Vy=je(eD);function Hy(t,e,r){return e===!0?Vy(t,r):ae(e)?Vy(t,e):t}function ni(t){"@babel/helpers - typeof";return ni=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ni(t)}var tD=["ref"];function Gy(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function dr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Gy(Object(r),!0).forEach(function(n){vs(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Gy(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function rD(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Yy(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Jy(n.key),n)}}function nD(t,e,r){return e&&Yy(t.prototype,e),r&&Yy(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function iD(t,e,r){return e=ps(e),aD(t,Xy()?Reflect.construct(e,r||[],ps(t).constructor):e.apply(t,r))}function aD(t,e){if(e&&(ni(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return oD(t)}function oD(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Xy(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Xy=function(){return!!t})()}function ps(t){return ps=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ps(t)}function sD(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Pc(t,e)}function Pc(t,e){return Pc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Pc(t,e)}function vs(t,e,r){return e=Jy(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Jy(t){var e=uD(t,"string");return ni(e)=="symbol"?e:e+""}function uD(t,e){if(ni(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(ni(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function lD(t,e){if(t==null)return{};var r=cD(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function cD(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function fD(t){return t.value}function dD(t,e){if(x.isValidElement(t))return x.cloneElement(t,e);if(typeof t=="function")return x.createElement(t,e);e.ref;var r=lD(e,tD);return x.createElement(dc,r)}var Zy=1,ln=function(t){function e(){var r;rD(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=iD(this,e,[].concat(i)),vs(r,"lastBoundingBox",{width:-1,height:-1}),r}return sD(e,t),nD(e,[{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,i=this.getBBox();i?(Math.abs(i.width-this.lastBoundingBox.width)>Zy||Math.abs(i.height-this.lastBoundingBox.height)>Zy)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,n&&n(i)):(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?dr({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var i=this.props,a=i.layout,o=i.align,s=i.verticalAlign,u=i.margin,l=i.chartWidth,c=i.chartHeight,f,d;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(o==="center"&&a==="vertical"){var h=this.getBBoxSnapshot();f={left:((l||0)-h.width)/2}}else f=o==="right"?{right:u&&u.right||0}:{left:u&&u.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:u&&u.bottom||0}:{top:u&&u.top||0};return dr(dr({},f),d)}},{key:"render",value:function(){var n=this,i=this.props,a=i.content,o=i.width,s=i.height,u=i.wrapperStyle,l=i.payloadUniqBy,c=i.payload,f=dr(dr({position:"absolute",width:o||"auto",height:s||"auto"},this.getDefaultPosition(u)),u);return x.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(h){n.wrapperNode=h}},dD(a,dr(dr({},this.props),{},{payload:Hy(c,l,fD)})))}}],[{key:"getWithHeight",value:function(n,i){var a=dr(dr({},this.defaultProps),n.props),o=a.layout;return o==="vertical"&&V(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||i}:null}}])}(x.PureComponent);vs(ln,"displayName","Legend"),vs(ln,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Qy=fa,hD=vc,pD=yt,eg=Qy?Qy.isConcatSpreadable:void 0;function vD(t){return pD(t)||hD(t)||!!(eg&&t&&t[eg])}var yD=vD,gD=gy,mD=yD;function tg(t,e,r,n,i){var a=-1,o=t.length;for(r||(r=mD),i||(i=[]);++a<o;){var s=t[a];e>0&&r(s)?e>1?tg(s,e-1,r,n,i):gD(i,s):n||(i[i.length]=s)}return i}var rg=tg;function bD(t){return function(e,r,n){for(var i=-1,a=Object(e),o=n(e),s=o.length;s--;){var u=o[t?s:++i];if(r(a[u],u,a)===!1)break}return e}}var wD=bD,_D=wD,xD=_D(),OD=xD,SD=OD,AD=ds;function PD(t,e){return t&&SD(t,e,AD)}var ng=PD,ED=va;function TD(t,e){return function(r,n){if(r==null)return r;if(!ED(r))return t(r,n);for(var i=r.length,a=e?i:-1,o=Object(r);(e?a--:++a<i)&&n(o[a],a,o)!==!1;);return r}}var jD=TD,$D=ng,kD=jD,CD=kD($D),Ec=CD,ID=Ec,ND=va;function MD(t,e){var r=-1,n=ND(t)?Array(t.length):[];return ID(t,function(i,a,o){n[++r]=e(i,a,o)}),n}var ig=MD;function DD(t,e){var r=t.length;for(t.sort(e);r--;)t[r]=t[r].value;return t}var RD=DD,ag=Kn;function LD(t,e){if(t!==e){var r=t!==void 0,n=t===null,i=t===t,a=ag(t),o=e!==void 0,s=e===null,u=e===e,l=ag(e);if(!s&&!l&&!a&&t>e||a&&o&&u&&!s&&!l||n&&o&&u||!r&&u||!i)return 1;if(!n&&!a&&!l&&t<e||l&&r&&i&&!n&&!a||s&&r&&i||!o&&i||!u)return-1}return 0}var BD=LD,UD=BD;function FD(t,e,r){for(var n=-1,i=t.criteria,a=e.criteria,o=i.length,s=r.length;++n<o;){var u=UD(i[n],a[n]);if(u){if(n>=s)return u;var l=r[n];return u*(l=="desc"?-1:1)}}return t.index-e.index}var WD=FD,Tc=Ll,qD=Bl,zD=er,KD=ig,VD=RD,HD=xy,GD=WD,YD=ri,XD=yt;function JD(t,e,r){e.length?e=Tc(e,function(a){return XD(a)?function(o){return qD(o,a.length===1?a[0]:a)}:a}):e=[YD];var n=-1;e=Tc(e,HD(zD));var i=KD(t,function(a,o,s){var u=Tc(e,function(l){return l(a)});return{criteria:u,index:++n,value:a}});return VD(i,function(a,o){return GD(a,o,r)})}var ZD=JD;function QD(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var eR=QD,tR=eR,og=Math.max;function rR(t,e,r){return e=og(e===void 0?t.length-1:e,0),function(){for(var n=arguments,i=-1,a=og(n.length-e,0),o=Array(a);++i<a;)o[i]=n[e+i];i=-1;for(var s=Array(e+1);++i<e;)s[i]=n[i];return s[e]=r(o),tR(t,this,s)}}var nR=rR;function iR(t){return function(){return t}}var aR=iR,oR=tn,sR=function(){try{var t=oR(Object,"defineProperty");return t({},"",{}),t}catch{}}(),sg=sR,uR=aR,ug=sg,lR=ri,cR=ug?function(t,e){return ug(t,"toString",{configurable:!0,enumerable:!1,value:uR(e),writable:!0})}:lR,fR=cR,dR=800,hR=16,pR=Date.now;function vR(t){var e=0,r=0;return function(){var n=pR(),i=hR-(n-r);if(r=n,i>0){if(++e>=dR)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var yR=vR,gR=fR,mR=yR,bR=mR(gR),wR=bR,_R=ri,xR=nR,OR=wR;function SR(t,e){return OR(xR(t,e,_R),t+"")}var AR=SR,PR=Nl,ER=va,TR=yc,jR=Cr;function $R(t,e,r){if(!jR(r))return!1;var n=typeof e;return(n=="number"?ER(r)&&TR(e,r.length):n=="string"&&e in r)?PR(r[e],t):!1}var ys=$R,kR=rg,CR=ZD,IR=AR,lg=ys,NR=IR(function(t,e){if(t==null)return[];var r=e.length;return r>1&&lg(t,e[0],e[1])?e=[]:r>2&&lg(e[0],e[1],e[2])&&(e=[e[0]]),CR(t,kR(e,1),[])}),MR=NR;const jc=je(MR);function ya(t){"@babel/helpers - typeof";return ya=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ya(t)}function $c(){return $c=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},$c.apply(this,arguments)}function DR(t,e){return UR(t)||BR(t,e)||LR(t,e)||RR()}function RR(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
89
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function LR(t,e){if(t){if(typeof t=="string")return cg(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return cg(t,e)}}function cg(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function BR(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,o,s=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(c){l=!0,i=c}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function UR(t){if(Array.isArray(t))return t}function fg(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function kc(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?fg(Object(r),!0).forEach(function(n){FR(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):fg(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function FR(t,e,r){return e=WR(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function WR(t){var e=qR(t,"string");return ya(e)=="symbol"?e:e+""}function qR(t,e){if(ya(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(ya(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function zR(t){return Array.isArray(t)&&Je(t[0])&&Je(t[1])?t.join(" ~ "):t}var KR=function(e){var r=e.separator,n=r===void 0?" : ":r,i=e.contentStyle,a=i===void 0?{}:i,o=e.itemStyle,s=o===void 0?{}:o,u=e.labelStyle,l=u===void 0?{}:u,c=e.payload,f=e.formatter,d=e.itemSorter,h=e.wrapperClassName,y=e.labelClassName,v=e.label,p=e.labelFormatter,m=e.accessibilityLayer,b=m===void 0?!1:m,w=function(){if(c&&c.length){var j={padding:0,margin:0},N=(d?jc(c,d):c).map(function(C,I){if(C.type==="none")return null;var R=kc({display:"block",paddingTop:4,paddingBottom:4,color:C.color||"#000"},s),L=C.formatter||f||zR,F=C.value,z=C.name,D=F,B=z;if(L&&D!=null&&B!=null){var W=L(F,z,C,I,c);if(Array.isArray(W)){var G=DR(W,2);D=G[0],B=G[1]}else D=W}return x.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(I),style:R},Je(B)?x.createElement("span",{className:"recharts-tooltip-item-name"},B):null,Je(B)?x.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,x.createElement("span",{className:"recharts-tooltip-item-value"},D),x.createElement("span",{className:"recharts-tooltip-item-unit"},C.unit||""))});return x.createElement("ul",{className:"recharts-tooltip-item-list",style:j},N)}return null},O=kc({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},a),g=kc({margin:0},l),_=!fe(v),S=_?v:"",A=le("recharts-default-tooltip",h),T=le("recharts-tooltip-label",y);_&&p&&c!==void 0&&c!==null&&(S=p(v,c));var M=b?{role:"status","aria-live":"assertive"}:{};return x.createElement("div",$c({className:A,style:O},M),x.createElement("p",{className:T,style:g},x.isValidElement(S)?S:"".concat(S)),w())};function ga(t){"@babel/helpers - typeof";return ga=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ga(t)}function gs(t,e,r){return e=VR(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function VR(t){var e=HR(t,"string");return ga(e)=="symbol"?e:e+""}function HR(t,e){if(ga(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(ga(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var ma="recharts-tooltip-wrapper",GR={visibility:"hidden"};function YR(t){var e=t.coordinate,r=t.translateX,n=t.translateY;return le(ma,gs(gs(gs(gs({},"".concat(ma,"-right"),V(r)&&e&&V(e.x)&&r>=e.x),"".concat(ma,"-left"),V(r)&&e&&V(e.x)&&r<e.x),"".concat(ma,"-bottom"),V(n)&&e&&V(e.y)&&n>=e.y),"".concat(ma,"-top"),V(n)&&e&&V(e.y)&&n<e.y))}function dg(t){var e=t.allowEscapeViewBox,r=t.coordinate,n=t.key,i=t.offsetTopLeft,a=t.position,o=t.reverseDirection,s=t.tooltipDimension,u=t.viewBox,l=t.viewBoxDimension;if(a&&V(a[n]))return a[n];var c=r[n]-s-i,f=r[n]+i;if(e[n])return o[n]?c:f;if(o[n]){var d=c,h=u[n];return d<h?Math.max(f,u[n]):Math.max(c,u[n])}var y=f+s,v=u[n]+l;return y>v?Math.max(c,u[n]):Math.max(f,u[n])}function XR(t){var e=t.translateX,r=t.translateY,n=t.useTranslate3d;return{transform:n?"translate3d(".concat(e,"px, ").concat(r,"px, 0)"):"translate(".concat(e,"px, ").concat(r,"px)")}}function JR(t){var e=t.allowEscapeViewBox,r=t.coordinate,n=t.offsetTopLeft,i=t.position,a=t.reverseDirection,o=t.tooltipBox,s=t.useTranslate3d,u=t.viewBox,l,c,f;return o.height>0&&o.width>0&&r?(c=dg({allowEscapeViewBox:e,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:u,viewBoxDimension:u.width}),f=dg({allowEscapeViewBox:e,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:u,viewBoxDimension:u.height}),l=XR({translateX:c,translateY:f,useTranslate3d:s})):l=GR,{cssProperties:l,cssClasses:YR({translateX:c,translateY:f,coordinate:r})}}function ii(t){"@babel/helpers - typeof";return ii=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ii(t)}function hg(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function pg(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?hg(Object(r),!0).forEach(function(n){Ic(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):hg(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function ZR(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function QR(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,yg(n.key),n)}}function eL(t,e,r){return e&&QR(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function tL(t,e,r){return e=ms(e),rL(t,vg()?Reflect.construct(e,r||[],ms(t).constructor):e.apply(t,r))}function rL(t,e){if(e&&(ii(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return nL(t)}function nL(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function vg(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(vg=function(){return!!t})()}function ms(t){return ms=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ms(t)}function iL(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Cc(t,e)}function Cc(t,e){return Cc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Cc(t,e)}function Ic(t,e,r){return e=yg(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function yg(t){var e=aL(t,"string");return ii(e)=="symbol"?e:e+""}function aL(t,e){if(ii(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(ii(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var gg=1,oL=function(t){function e(){var r;ZR(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=tL(this,e,[].concat(i)),Ic(r,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),Ic(r,"handleKeyDown",function(o){if(o.key==="Escape"){var s,u,l,c;r.setState({dismissed:!0,dismissedAtCoordinate:{x:(s=(u=r.props.coordinate)===null||u===void 0?void 0:u.x)!==null&&s!==void 0?s:0,y:(l=(c=r.props.coordinate)===null||c===void 0?void 0:c.y)!==null&&l!==void 0?l:0}})}}),r}return iL(e,t),eL(e,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>gg||Math.abs(n.height-this.state.lastBoundingBox.height)>gg)&&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,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,s=i.animationDuration,u=i.animationEasing,l=i.children,c=i.coordinate,f=i.hasPayload,d=i.isAnimationActive,h=i.offset,y=i.position,v=i.reverseDirection,p=i.useTranslate3d,m=i.viewBox,b=i.wrapperStyle,w=JR({allowEscapeViewBox:o,coordinate:c,offsetTopLeft:h,position:y,reverseDirection:v,tooltipBox:this.state.lastBoundingBox,useTranslate3d:p,viewBox:m}),O=w.cssClasses,g=w.cssProperties,_=pg(pg({transition:d&&a?"transform ".concat(s,"ms ").concat(u):void 0},g),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&f?"visible":"hidden",position:"absolute",top:0,left:0},b);return x.createElement("div",{tabIndex:-1,className:O,style:_,ref:function(A){n.wrapperNode=A}},l)}}])}(x.PureComponent),sL=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},It={isSsr:sL(),get:function(e){return It[e]},set:function(e,r){if(typeof e=="string")It[e]=r;else{var n=Object.keys(e);n&&n.length&&n.forEach(function(i){It[i]=e[i]})}}};function ai(t){"@babel/helpers - typeof";return ai=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ai(t)}function mg(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function bg(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?mg(Object(r),!0).forEach(function(n){Mc(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):mg(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function uL(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function lL(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,_g(n.key),n)}}function cL(t,e,r){return e&&lL(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function fL(t,e,r){return e=bs(e),dL(t,wg()?Reflect.construct(e,r||[],bs(t).constructor):e.apply(t,r))}function dL(t,e){if(e&&(ai(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return hL(t)}function hL(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function wg(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(wg=function(){return!!t})()}function bs(t){return bs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},bs(t)}function pL(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Nc(t,e)}function Nc(t,e){return Nc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Nc(t,e)}function Mc(t,e,r){return e=_g(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _g(t){var e=vL(t,"string");return ai(e)=="symbol"?e:e+""}function vL(t,e){if(ai(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(ai(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function yL(t){return t.dataKey}function gL(t,e){return x.isValidElement(t)?x.cloneElement(t,e):typeof t=="function"?x.createElement(t,e):x.createElement(KR,e)}var tr=function(t){function e(){return uL(this,e),fL(this,e,arguments)}return pL(e,t),cL(e,[{key:"render",value:function(){var n=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,s=i.animationDuration,u=i.animationEasing,l=i.content,c=i.coordinate,f=i.filterNull,d=i.isAnimationActive,h=i.offset,y=i.payload,v=i.payloadUniqBy,p=i.position,m=i.reverseDirection,b=i.useTranslate3d,w=i.viewBox,O=i.wrapperStyle,g=y??[];f&&g.length&&(g=Hy(y.filter(function(S){return S.value!=null&&(S.hide!==!0||n.props.includeHidden)}),v,yL));var _=g.length>0;return x.createElement(oL,{allowEscapeViewBox:o,animationDuration:s,animationEasing:u,isAnimationActive:d,active:a,coordinate:c,hasPayload:_,offset:h,position:p,reverseDirection:m,useTranslate3d:b,viewBox:w,wrapperStyle:O},gL(l,bg(bg({},this.props),{},{payload:g})))}}])}(x.PureComponent);Mc(tr,"displayName","Tooltip"),Mc(tr,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!It.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 mL=Qt,bL=function(){return mL.Date.now()},wL=bL,_L=/\s/;function xL(t){for(var e=t.length;e--&&_L.test(t.charAt(e)););return e}var OL=xL,SL=OL,AL=/^\s+/;function PL(t){return t&&t.slice(0,SL(t)+1).replace(AL,"")}var EL=PL,TL=EL,xg=Cr,jL=Kn,Og=NaN,$L=/^[-+]0x[0-9a-f]+$/i,kL=/^0b[01]+$/i,CL=/^0o[0-7]+$/i,IL=parseInt;function NL(t){if(typeof t=="number")return t;if(jL(t))return Og;if(xg(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=xg(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=TL(t);var r=kL.test(t);return r||CL.test(t)?IL(t.slice(2),r?2:8):$L.test(t)?Og:+t}var Sg=NL,ML=Cr,Dc=wL,Ag=Sg,DL="Expected a function",RL=Math.max,LL=Math.min;function BL(t,e,r){var n,i,a,o,s,u,l=0,c=!1,f=!1,d=!0;if(typeof t!="function")throw new TypeError(DL);e=Ag(e)||0,ML(r)&&(c=!!r.leading,f="maxWait"in r,a=f?RL(Ag(r.maxWait)||0,e):a,d="trailing"in r?!!r.trailing:d);function h(_){var S=n,A=i;return n=i=void 0,l=_,o=t.apply(A,S),o}function y(_){return l=_,s=setTimeout(m,e),c?h(_):o}function v(_){var S=_-u,A=_-l,T=e-S;return f?LL(T,a-A):T}function p(_){var S=_-u,A=_-l;return u===void 0||S>=e||S<0||f&&A>=a}function m(){var _=Dc();if(p(_))return b(_);s=setTimeout(m,v(_))}function b(_){return s=void 0,d&&n?h(_):(n=i=void 0,o)}function w(){s!==void 0&&clearTimeout(s),l=0,n=u=i=s=void 0}function O(){return s===void 0?o:b(Dc())}function g(){var _=Dc(),S=p(_);if(n=arguments,i=this,u=_,S){if(s===void 0)return y(u);if(f)return clearTimeout(s),s=setTimeout(m,e),h(u)}return s===void 0&&(s=setTimeout(m,e)),o}return g.cancel=w,g.flush=O,g}var UL=BL,FL=UL,WL=Cr,qL="Expected a function";function zL(t,e,r){var n=!0,i=!0;if(typeof t!="function")throw new TypeError(qL);return WL(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),FL(t,e,{leading:n,maxWait:e,trailing:i})}var KL=zL;const Pg=je(KL);function ba(t){"@babel/helpers - typeof";return ba=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ba(t)}function Eg(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function ws(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Eg(Object(r),!0).forEach(function(n){VL(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Eg(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function VL(t,e,r){return e=HL(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function HL(t){var e=GL(t,"string");return ba(e)=="symbol"?e:e+""}function GL(t,e){if(ba(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(ba(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function YL(t,e){return QL(t)||ZL(t,e)||JL(t,e)||XL()}function XL(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
90
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
91
|
-
maybe you don't need to use a ResponsiveContainer.`,o,u),zt(!r||r>0,"The aspect(%s) must be greater than zero.",r);var
|
|
88
|
+
A`).concat(o,",").concat(o,",0,1,1,").concat(s,",").concat(a),className:"recharts-legend-icon"});if(n.type==="rect")return x.createElement("path",{stroke:"none",fill:u,d:"M0,".concat(Ct/8,"h").concat(Ct,"v").concat(Ct*3/4,"h").concat(-Ct,"z"),className:"recharts-legend-icon"});if(x.isValidElement(n.legendIcon)){var l=b$({},n);return delete l.legendIcon,x.cloneElement(n.legendIcon,l)}return x.createElement(uc,{fill:u,cx:a,cy:a,size:Ct,sizeType:"diameter",type:n.type})}},{key:"renderItems",value:function(){var n=this,i=this.props,a=i.payload,o=i.iconSize,s=i.layout,u=i.formatter,l=i.inactiveColor,c={x:0,y:0,width:Ct,height:Ct},f={display:s==="horizontal"?"inline-block":"block",marginRight:10},d={display:"inline-block",verticalAlign:"middle",marginRight:4};return a.map(function(h,y){var v=h.formatter||u,p=le(pa(pa({"recharts-legend-item":!0},"legend-item-".concat(y),!0),"inactive",h.inactive));if(h.type==="none")return null;var m=ae(h.value)?null:h.value;zt(!ae(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 b=h.inactive?l:h.color;return x.createElement("li",lc({className:p,style:f,key:"legend-item-".concat(y)},on(n.props,h,y)),x.createElement(Gl,{width:o,height:o,viewBox:c,style:d},n.renderIcon(h)),x.createElement("span",{className:"recharts-legend-item-text",style:{color:b}},v?v(m,h,y):m))})}},{key:"render",value:function(){var n=this.props,i=n.payload,a=n.layout,o=n.align;if(!i||!i.length)return null;var s={padding:0,margin:0,textAlign:a==="horizontal"?o:"left"};return x.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(x.PureComponent);pa(fc,"displayName","Legend"),pa(fc,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var T$=Vo;function j$(){this.__data__=new T$,this.size=0}var $$=j$;function k$(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}var C$=k$;function I$(t){return this.__data__.get(t)}var N$=I$;function M$(t){return this.__data__.has(t)}var D$=M$,R$=Vo,L$=Nl,B$=Ml,U$=200;function F$(t,e){var r=this.__data__;if(r instanceof R$){var n=r.__data__;if(!L$||n.length<U$-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new B$(n)}return r.set(t,e),this.size=r.size,this}var W$=F$,q$=Vo,z$=$$,K$=C$,V$=N$,H$=D$,G$=W$;function ei(t){var e=this.__data__=new q$(t);this.size=e.size}ei.prototype.clear=z$,ei.prototype.delete=K$,ei.prototype.get=V$,ei.prototype.has=H$,ei.prototype.set=G$;var uy=ei,Y$="__lodash_hash_undefined__";function X$(t){return this.__data__.set(t,Y$),this}var J$=X$;function Z$(t){return this.__data__.has(t)}var Q$=Z$,ek=Ml,tk=J$,rk=Q$;function us(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new ek;++e<r;)this.add(t[e])}us.prototype.add=us.prototype.push=tk,us.prototype.has=rk;var ly=us;function nk(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}var cy=nk;function ik(t,e){return t.has(e)}var fy=ik,ak=ly,ok=cy,sk=fy,uk=1,lk=2;function ck(t,e,r,n,i,a){var o=r&uk,s=t.length,u=e.length;if(s!=u&&!(o&&u>s))return!1;var l=a.get(t),c=a.get(e);if(l&&c)return l==e&&c==t;var f=-1,d=!0,h=r&lk?new ak:void 0;for(a.set(t,e),a.set(e,t);++f<s;){var y=t[f],v=e[f];if(n)var p=o?n(v,y,f,e,t,a):n(y,v,f,t,e,a);if(p!==void 0){if(p)continue;d=!1;break}if(h){if(!ok(e,function(m,b){if(!sk(h,b)&&(y===m||i(y,m,r,n,a)))return h.push(b)})){d=!1;break}}else if(!(y===v||i(y,v,r,n,a))){d=!1;break}}return a.delete(t),a.delete(e),d}var dy=ck,fk=Qt,dk=fk.Uint8Array,hk=dk;function pk(t){var e=-1,r=Array(t.size);return t.forEach(function(n,i){r[++e]=[i,n]}),r}var vk=pk;function yk(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var dc=yk,hy=fa,py=hk,gk=Il,mk=dy,bk=vk,wk=dc,_k=1,xk=2,Ok="[object Boolean]",Sk="[object Date]",Ak="[object Error]",Pk="[object Map]",Ek="[object Number]",Tk="[object RegExp]",jk="[object Set]",$k="[object String]",kk="[object Symbol]",Ck="[object ArrayBuffer]",Ik="[object DataView]",vy=hy?hy.prototype:void 0,hc=vy?vy.valueOf:void 0;function Nk(t,e,r,n,i,a,o){switch(r){case Ik:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Ck:return!(t.byteLength!=e.byteLength||!a(new py(t),new py(e)));case Ok:case Sk:case Ek:return gk(+t,+e);case Ak:return t.name==e.name&&t.message==e.message;case Tk:case $k:return t==e+"";case Pk:var s=bk;case jk:var u=n&_k;if(s||(s=wk),t.size!=e.size&&!u)return!1;var l=o.get(t);if(l)return l==e;n|=xk,o.set(t,e);var c=mk(s(t),s(e),n,i,a,o);return o.delete(t),c;case kk:if(hc)return hc.call(t)==hc.call(e)}return!1}var Mk=Nk;function Dk(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}var yy=Dk,Rk=yy,Lk=yt;function Bk(t,e,r){var n=e(t);return Lk(t)?n:Rk(n,r(t))}var Uk=Bk;function Fk(t,e){for(var r=-1,n=t==null?0:t.length,i=0,a=[];++r<n;){var o=t[r];e(o,r,t)&&(a[i++]=o)}return a}var Wk=Fk;function qk(){return[]}var zk=qk,Kk=Wk,Vk=zk,Hk=Object.prototype,Gk=Hk.propertyIsEnumerable,gy=Object.getOwnPropertySymbols,Yk=gy?function(t){return t==null?[]:(t=Object(t),Kk(gy(t),function(e){return Gk.call(t,e)}))}:Vk,Xk=Yk;function Jk(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var Zk=Jk,Qk=lr,eC=cr,tC="[object Arguments]";function rC(t){return eC(t)&&Qk(t)==tC}var nC=rC,my=nC,iC=cr,by=Object.prototype,aC=by.hasOwnProperty,oC=by.propertyIsEnumerable,sC=my(function(){return arguments}())?my:function(t){return iC(t)&&aC.call(t,"callee")&&!oC.call(t,"callee")},pc=sC,ls={exports:{}};function uC(){return!1}var lC=uC;ls.exports,function(t,e){var r=Qt,n=lC,i=e&&!e.nodeType&&e,a=i&&!0&&t&&!t.nodeType&&t,o=a&&a.exports===i,s=o?r.Buffer:void 0,u=s?s.isBuffer:void 0,l=u||n;t.exports=l}(ls,ls.exports);var wy=ls.exports,cC=9007199254740991,fC=/^(?:0|[1-9]\d*)$/;function dC(t,e){var r=typeof t;return e=e??cC,!!e&&(r=="number"||r!="symbol"&&fC.test(t))&&t>-1&&t%1==0&&t<e}var vc=dC,hC=9007199254740991;function pC(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=hC}var yc=pC,vC=lr,yC=yc,gC=cr,mC="[object Arguments]",bC="[object Array]",wC="[object Boolean]",_C="[object Date]",xC="[object Error]",OC="[object Function]",SC="[object Map]",AC="[object Number]",PC="[object Object]",EC="[object RegExp]",TC="[object Set]",jC="[object String]",$C="[object WeakMap]",kC="[object ArrayBuffer]",CC="[object DataView]",IC="[object Float32Array]",NC="[object Float64Array]",MC="[object Int8Array]",DC="[object Int16Array]",RC="[object Int32Array]",LC="[object Uint8Array]",BC="[object Uint8ClampedArray]",UC="[object Uint16Array]",FC="[object Uint32Array]",Re={};Re[IC]=Re[NC]=Re[MC]=Re[DC]=Re[RC]=Re[LC]=Re[BC]=Re[UC]=Re[FC]=!0,Re[mC]=Re[bC]=Re[kC]=Re[wC]=Re[CC]=Re[_C]=Re[xC]=Re[OC]=Re[SC]=Re[AC]=Re[PC]=Re[EC]=Re[TC]=Re[jC]=Re[$C]=!1;function WC(t){return gC(t)&&yC(t.length)&&!!Re[vC(t)]}var qC=WC;function zC(t){return function(e){return t(e)}}var _y=zC,cs={exports:{}};cs.exports,function(t,e){var r=ev,n=e&&!e.nodeType&&e,i=n&&!0&&t&&!t.nodeType&&t,a=i&&i.exports===n,o=a&&r.process,s=function(){try{var u=i&&i.require&&i.require("util").types;return u||o&&o.binding&&o.binding("util")}catch{}}();t.exports=s}(cs,cs.exports);var KC=cs.exports,VC=qC,HC=_y,xy=KC,Oy=xy&&xy.isTypedArray,GC=Oy?HC(Oy):VC,Sy=GC,YC=Zk,XC=pc,JC=yt,ZC=wy,QC=vc,eI=Sy,tI=Object.prototype,rI=tI.hasOwnProperty;function nI(t,e){var r=JC(t),n=!r&&XC(t),i=!r&&!n&&ZC(t),a=!r&&!n&&!i&&eI(t),o=r||n||i||a,s=o?YC(t.length,String):[],u=s.length;for(var l in t)(e||rI.call(t,l))&&!(o&&(l=="length"||i&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||QC(l,u)))&&s.push(l);return s}var iI=nI,aI=Object.prototype;function oI(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||aI;return t===r}var sI=oI;function uI(t,e){return function(r){return t(e(r))}}var Ay=uI,lI=Ay,cI=lI(Object.keys,Object),fI=cI,dI=sI,hI=fI,pI=Object.prototype,vI=pI.hasOwnProperty;function yI(t){if(!dI(t))return hI(t);var e=[];for(var r in Object(t))vI.call(t,r)&&r!="constructor"&&e.push(r);return e}var gI=yI,mI=kl,bI=yc;function wI(t){return t!=null&&bI(t.length)&&!mI(t)}var va=wI,_I=iI,xI=gI,OI=va;function SI(t){return OI(t)?_I(t):xI(t)}var fs=SI,AI=Uk,PI=Xk,EI=fs;function TI(t){return AI(t,EI,PI)}var jI=TI,Py=jI,$I=1,kI=Object.prototype,CI=kI.hasOwnProperty;function II(t,e,r,n,i,a){var o=r&$I,s=Py(t),u=s.length,l=Py(e),c=l.length;if(u!=c&&!o)return!1;for(var f=u;f--;){var d=s[f];if(!(o?d in e:CI.call(e,d)))return!1}var h=a.get(t),y=a.get(e);if(h&&y)return h==e&&y==t;var v=!0;a.set(t,e),a.set(e,t);for(var p=o;++f<u;){d=s[f];var m=t[d],b=e[d];if(n)var w=o?n(b,m,d,e,t,a):n(m,b,d,t,e,a);if(!(w===void 0?m===b||i(m,b,r,n,a):w)){v=!1;break}p||(p=d=="constructor")}if(v&&!p){var O=t.constructor,g=e.constructor;O!=g&&"constructor"in t&&"constructor"in e&&!(typeof O=="function"&&O instanceof O&&typeof g=="function"&&g instanceof g)&&(v=!1)}return a.delete(t),a.delete(e),v}var NI=II,MI=tn,DI=Qt,RI=MI(DI,"DataView"),LI=RI,BI=tn,UI=Qt,FI=BI(UI,"Promise"),WI=FI,qI=tn,zI=Qt,KI=qI(zI,"Set"),Ey=KI,VI=tn,HI=Qt,GI=VI(HI,"WeakMap"),YI=GI,gc=LI,mc=Nl,bc=WI,wc=Ey,_c=YI,Ty=lr,ti=ov,jy="[object Map]",XI="[object Object]",$y="[object Promise]",ky="[object Set]",Cy="[object WeakMap]",Iy="[object DataView]",JI=ti(gc),ZI=ti(mc),QI=ti(bc),eN=ti(wc),tN=ti(_c),un=Ty;(gc&&un(new gc(new ArrayBuffer(1)))!=Iy||mc&&un(new mc)!=jy||bc&&un(bc.resolve())!=$y||wc&&un(new wc)!=ky||_c&&un(new _c)!=Cy)&&(un=function(t){var e=Ty(t),r=e==XI?t.constructor:void 0,n=r?ti(r):"";if(n)switch(n){case JI:return Iy;case ZI:return jy;case QI:return $y;case eN:return ky;case tN:return Cy}return e});var rN=un,xc=uy,nN=dy,iN=Mk,aN=NI,Ny=rN,My=yt,Dy=wy,oN=Sy,sN=1,Ry="[object Arguments]",Ly="[object Array]",ds="[object Object]",uN=Object.prototype,By=uN.hasOwnProperty;function lN(t,e,r,n,i,a){var o=My(t),s=My(e),u=o?Ly:Ny(t),l=s?Ly:Ny(e);u=u==Ry?ds:u,l=l==Ry?ds:l;var c=u==ds,f=l==ds,d=u==l;if(d&&Dy(t)){if(!Dy(e))return!1;o=!0,c=!1}if(d&&!c)return a||(a=new xc),o||oN(t)?nN(t,e,r,n,i,a):iN(t,e,u,r,n,i,a);if(!(r&sN)){var h=c&&By.call(t,"__wrapped__"),y=f&&By.call(e,"__wrapped__");if(h||y){var v=h?t.value():t,p=y?e.value():e;return a||(a=new xc),i(v,p,r,n,a)}}return d?(a||(a=new xc),aN(t,e,r,n,i,a)):!1}var cN=lN,fN=cN,Uy=cr;function Fy(t,e,r,n,i){return t===e?!0:t==null||e==null||!Uy(t)&&!Uy(e)?t!==t&&e!==e:fN(t,e,r,n,Fy,i)}var Oc=Fy,dN=uy,hN=Oc,pN=1,vN=2;function yN(t,e,r,n){var i=r.length,a=i,o=!n;if(t==null)return!a;for(t=Object(t);i--;){var s=r[i];if(o&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<a;){s=r[i];var u=s[0],l=t[u],c=s[1];if(o&&s[2]){if(l===void 0&&!(u in t))return!1}else{var f=new dN;if(n)var d=n(l,c,u,t,e,f);if(!(d===void 0?hN(c,l,pN|vN,n,f):d))return!1}}return!0}var gN=yN,mN=kr;function bN(t){return t===t&&!mN(t)}var Wy=bN,wN=Wy,_N=fs;function xN(t){for(var e=_N(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,wN(i)]}return e}var ON=xN;function SN(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}var qy=SN,AN=gN,PN=ON,EN=qy;function TN(t){var e=PN(t);return e.length==1&&e[0][2]?EN(e[0][0],e[0][1]):function(r){return r===t||AN(r,t,e)}}var jN=TN;function $N(t,e){return t!=null&&e in Object(t)}var kN=$N,CN=yv,IN=pc,NN=yt,MN=vc,DN=yc,RN=Go;function LN(t,e,r){e=CN(e,t);for(var n=-1,i=e.length,a=!1;++n<i;){var o=RN(e[n]);if(!(a=t!=null&&r(t,o)))break;t=t[o]}return a||++n!=i?a:(i=t==null?0:t.length,!!i&&DN(i)&&MN(o,i)&&(NN(t)||IN(t)))}var BN=LN,UN=kN,FN=BN;function WN(t,e){return t!=null&&FN(t,e,UN)}var qN=WN,zN=Oc,KN=gv,VN=qN,HN=$l,GN=Wy,YN=qy,XN=Go,JN=1,ZN=2;function QN(t,e){return HN(t)&&GN(e)?YN(XN(t),e):function(r){var n=KN(r,t);return n===void 0&&n===e?VN(r,t):zN(e,n,JN|ZN)}}var eM=QN;function tM(t){return t}var ri=tM;function rM(t){return function(e){return e==null?void 0:e[t]}}var nM=rM,iM=Ll;function aM(t){return function(e){return iM(e,t)}}var oM=aM,sM=nM,uM=oM,lM=$l,cM=Go;function fM(t){return lM(t)?sM(cM(t)):uM(t)}var dM=fM,hM=jN,pM=eM,vM=ri,yM=yt,gM=dM;function mM(t){return typeof t=="function"?t:t==null?vM:typeof t=="object"?yM(t)?pM(t[0],t[1]):hM(t):gM(t)}var er=mM;function bM(t,e,r,n){for(var i=t.length,a=r+(n?1:-1);n?a--:++a<i;)if(e(t[a],a,t))return a;return-1}var zy=bM;function wM(t){return t!==t}var _M=wM;function xM(t,e,r){for(var n=r-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1}var OM=xM,SM=zy,AM=_M,PM=OM;function EM(t,e,r){return e===e?PM(t,e,r):SM(t,AM,r)}var TM=EM,jM=TM;function $M(t,e){var r=t==null?0:t.length;return!!r&&jM(t,e,0)>-1}var kM=$M;function CM(t,e,r){for(var n=-1,i=t==null?0:t.length;++n<i;)if(r(e,t[n]))return!0;return!1}var IM=CM;function NM(){}var MM=NM,Sc=Ey,DM=MM,RM=dc,LM=1/0,BM=Sc&&1/RM(new Sc([,-0]))[1]==LM?function(t){return new Sc(t)}:DM,UM=BM,FM=ly,WM=kM,qM=IM,zM=fy,KM=UM,VM=dc,HM=200;function GM(t,e,r){var n=-1,i=WM,a=t.length,o=!0,s=[],u=s;if(r)o=!1,i=qM;else if(a>=HM){var l=e?null:KM(t);if(l)return VM(l);o=!1,i=zM,u=new FM}else u=e?[]:s;e:for(;++n<a;){var c=t[n],f=e?e(c):c;if(c=r||c!==0?c:0,o&&f===f){for(var d=u.length;d--;)if(u[d]===f)continue e;e&&u.push(f),s.push(c)}else i(u,f,r)||(u!==s&&u.push(f),s.push(c))}return s}var YM=GM,XM=er,JM=YM;function ZM(t,e){return t&&t.length?JM(t,XM(e)):[]}var QM=ZM;const Ky=je(QM);function Vy(t,e,r){return e===!0?Ky(t,r):ae(e)?Ky(t,e):t}function ni(t){"@babel/helpers - typeof";return ni=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ni(t)}var eD=["ref"];function Hy(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function dr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Hy(Object(r),!0).forEach(function(n){ps(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Hy(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function tD(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Gy(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Xy(n.key),n)}}function rD(t,e,r){return e&&Gy(t.prototype,e),r&&Gy(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function nD(t,e,r){return e=hs(e),iD(t,Yy()?Reflect.construct(e,r||[],hs(t).constructor):e.apply(t,r))}function iD(t,e){if(e&&(ni(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return aD(t)}function aD(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Yy(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Yy=function(){return!!t})()}function hs(t){return hs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},hs(t)}function oD(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ac(t,e)}function Ac(t,e){return Ac=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Ac(t,e)}function ps(t,e,r){return e=Xy(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Xy(t){var e=sD(t,"string");return ni(e)=="symbol"?e:e+""}function sD(t,e){if(ni(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(ni(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function uD(t,e){if(t==null)return{};var r=lD(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function lD(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function cD(t){return t.value}function fD(t,e){if(x.isValidElement(t))return x.cloneElement(t,e);if(typeof t=="function")return x.createElement(t,e);e.ref;var r=uD(e,eD);return x.createElement(fc,r)}var Jy=1,ln=function(t){function e(){var r;tD(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=nD(this,e,[].concat(i)),ps(r,"lastBoundingBox",{width:-1,height:-1}),r}return oD(e,t),rD(e,[{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,i=this.getBBox();i?(Math.abs(i.width-this.lastBoundingBox.width)>Jy||Math.abs(i.height-this.lastBoundingBox.height)>Jy)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,n&&n(i)):(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?dr({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var i=this.props,a=i.layout,o=i.align,s=i.verticalAlign,u=i.margin,l=i.chartWidth,c=i.chartHeight,f,d;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(o==="center"&&a==="vertical"){var h=this.getBBoxSnapshot();f={left:((l||0)-h.width)/2}}else f=o==="right"?{right:u&&u.right||0}:{left:u&&u.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:u&&u.bottom||0}:{top:u&&u.top||0};return dr(dr({},f),d)}},{key:"render",value:function(){var n=this,i=this.props,a=i.content,o=i.width,s=i.height,u=i.wrapperStyle,l=i.payloadUniqBy,c=i.payload,f=dr(dr({position:"absolute",width:o||"auto",height:s||"auto"},this.getDefaultPosition(u)),u);return x.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(h){n.wrapperNode=h}},fD(a,dr(dr({},this.props),{},{payload:Vy(c,l,cD)})))}}],[{key:"getWithHeight",value:function(n,i){var a=dr(dr({},this.defaultProps),n.props),o=a.layout;return o==="vertical"&&V(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||i}:null}}])}(x.PureComponent);ps(ln,"displayName","Legend"),ps(ln,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Zy=fa,dD=pc,hD=yt,Qy=Zy?Zy.isConcatSpreadable:void 0;function pD(t){return hD(t)||dD(t)||!!(Qy&&t&&t[Qy])}var vD=pD,yD=yy,gD=vD;function eg(t,e,r,n,i){var a=-1,o=t.length;for(r||(r=gD),i||(i=[]);++a<o;){var s=t[a];e>0&&r(s)?e>1?eg(s,e-1,r,n,i):yD(i,s):n||(i[i.length]=s)}return i}var tg=eg;function mD(t){return function(e,r,n){for(var i=-1,a=Object(e),o=n(e),s=o.length;s--;){var u=o[t?s:++i];if(r(a[u],u,a)===!1)break}return e}}var bD=mD,wD=bD,_D=wD(),xD=_D,OD=xD,SD=fs;function AD(t,e){return t&&OD(t,e,SD)}var rg=AD,PD=va;function ED(t,e){return function(r,n){if(r==null)return r;if(!PD(r))return t(r,n);for(var i=r.length,a=e?i:-1,o=Object(r);(e?a--:++a<i)&&n(o[a],a,o)!==!1;);return r}}var TD=ED,jD=rg,$D=TD,kD=$D(jD),Pc=kD,CD=Pc,ID=va;function ND(t,e){var r=-1,n=ID(t)?Array(t.length):[];return CD(t,function(i,a,o){n[++r]=e(i,a,o)}),n}var ng=ND;function MD(t,e){var r=t.length;for(t.sort(e);r--;)t[r]=t[r].value;return t}var DD=MD,ig=Kn;function RD(t,e){if(t!==e){var r=t!==void 0,n=t===null,i=t===t,a=ig(t),o=e!==void 0,s=e===null,u=e===e,l=ig(e);if(!s&&!l&&!a&&t>e||a&&o&&u&&!s&&!l||n&&o&&u||!r&&u||!i)return 1;if(!n&&!a&&!l&&t<e||l&&r&&i&&!n&&!a||s&&r&&i||!o&&i||!u)return-1}return 0}var LD=RD,BD=LD;function UD(t,e,r){for(var n=-1,i=t.criteria,a=e.criteria,o=i.length,s=r.length;++n<o;){var u=BD(i[n],a[n]);if(u){if(n>=s)return u;var l=r[n];return u*(l=="desc"?-1:1)}}return t.index-e.index}var FD=UD,Ec=Rl,WD=Ll,qD=er,zD=ng,KD=DD,VD=_y,HD=FD,GD=ri,YD=yt;function XD(t,e,r){e.length?e=Ec(e,function(a){return YD(a)?function(o){return WD(o,a.length===1?a[0]:a)}:a}):e=[GD];var n=-1;e=Ec(e,VD(qD));var i=zD(t,function(a,o,s){var u=Ec(e,function(l){return l(a)});return{criteria:u,index:++n,value:a}});return KD(i,function(a,o){return HD(a,o,r)})}var JD=XD;function ZD(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var QD=ZD,eR=QD,ag=Math.max;function tR(t,e,r){return e=ag(e===void 0?t.length-1:e,0),function(){for(var n=arguments,i=-1,a=ag(n.length-e,0),o=Array(a);++i<a;)o[i]=n[e+i];i=-1;for(var s=Array(e+1);++i<e;)s[i]=n[i];return s[e]=r(o),eR(t,this,s)}}var rR=tR;function nR(t){return function(){return t}}var iR=nR,aR=tn,oR=function(){try{var t=aR(Object,"defineProperty");return t({},"",{}),t}catch{}}(),og=oR,sR=iR,sg=og,uR=ri,lR=sg?function(t,e){return sg(t,"toString",{configurable:!0,enumerable:!1,value:sR(e),writable:!0})}:uR,cR=lR,fR=800,dR=16,hR=Date.now;function pR(t){var e=0,r=0;return function(){var n=hR(),i=dR-(n-r);if(r=n,i>0){if(++e>=fR)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var vR=pR,yR=cR,gR=vR,mR=gR(yR),bR=mR,wR=ri,_R=rR,xR=bR;function OR(t,e){return xR(_R(t,e,wR),t+"")}var SR=OR,AR=Il,PR=va,ER=vc,TR=kr;function jR(t,e,r){if(!TR(r))return!1;var n=typeof e;return(n=="number"?PR(r)&&ER(e,r.length):n=="string"&&e in r)?AR(r[e],t):!1}var vs=jR,$R=tg,kR=JD,CR=SR,ug=vs,IR=CR(function(t,e){if(t==null)return[];var r=e.length;return r>1&&ug(t,e[0],e[1])?e=[]:r>2&&ug(e[0],e[1],e[2])&&(e=[e[0]]),kR(t,$R(e,1),[])}),NR=IR;const Tc=je(NR);function ya(t){"@babel/helpers - typeof";return ya=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ya(t)}function jc(){return jc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},jc.apply(this,arguments)}function MR(t,e){return BR(t)||LR(t,e)||RR(t,e)||DR()}function DR(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
89
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function RR(t,e){if(t){if(typeof t=="string")return lg(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return lg(t,e)}}function lg(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function LR(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,o,s=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(c){l=!0,i=c}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function BR(t){if(Array.isArray(t))return t}function cg(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function $c(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?cg(Object(r),!0).forEach(function(n){UR(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):cg(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function UR(t,e,r){return e=FR(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function FR(t){var e=WR(t,"string");return ya(e)=="symbol"?e:e+""}function WR(t,e){if(ya(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(ya(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function qR(t){return Array.isArray(t)&&Je(t[0])&&Je(t[1])?t.join(" ~ "):t}var zR=function(e){var r=e.separator,n=r===void 0?" : ":r,i=e.contentStyle,a=i===void 0?{}:i,o=e.itemStyle,s=o===void 0?{}:o,u=e.labelStyle,l=u===void 0?{}:u,c=e.payload,f=e.formatter,d=e.itemSorter,h=e.wrapperClassName,y=e.labelClassName,v=e.label,p=e.labelFormatter,m=e.accessibilityLayer,b=m===void 0?!1:m,w=function(){if(c&&c.length){var $={padding:0,margin:0},k=(d?Tc(c,d):c).map(function(I,R){if(I.type==="none")return null;var M=$c({display:"block",paddingTop:4,paddingBottom:4,color:I.color||"#000"},s),L=I.formatter||f||qR,q=I.value,z=I.name,D=q,B=z;if(L&&D!=null&&B!=null){var F=L(q,z,I,R,c);if(Array.isArray(F)){var G=MR(F,2);D=G[0],B=G[1]}else D=F}return x.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(R),style:M},Je(B)?x.createElement("span",{className:"recharts-tooltip-item-name"},B):null,Je(B)?x.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,x.createElement("span",{className:"recharts-tooltip-item-value"},D),x.createElement("span",{className:"recharts-tooltip-item-unit"},I.unit||""))});return x.createElement("ul",{className:"recharts-tooltip-item-list",style:$},k)}return null},O=$c({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},a),g=$c({margin:0},l),_=!fe(v),S=_?v:"",A=le("recharts-default-tooltip",h),E=le("recharts-tooltip-label",y);_&&p&&c!==void 0&&c!==null&&(S=p(v,c));var N=b?{role:"status","aria-live":"assertive"}:{};return x.createElement("div",jc({className:A,style:O},N),x.createElement("p",{className:E,style:g},x.isValidElement(S)?S:"".concat(S)),w())};function ga(t){"@babel/helpers - typeof";return ga=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ga(t)}function ys(t,e,r){return e=KR(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function KR(t){var e=VR(t,"string");return ga(e)=="symbol"?e:e+""}function VR(t,e){if(ga(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(ga(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var ma="recharts-tooltip-wrapper",HR={visibility:"hidden"};function GR(t){var e=t.coordinate,r=t.translateX,n=t.translateY;return le(ma,ys(ys(ys(ys({},"".concat(ma,"-right"),V(r)&&e&&V(e.x)&&r>=e.x),"".concat(ma,"-left"),V(r)&&e&&V(e.x)&&r<e.x),"".concat(ma,"-bottom"),V(n)&&e&&V(e.y)&&n>=e.y),"".concat(ma,"-top"),V(n)&&e&&V(e.y)&&n<e.y))}function fg(t){var e=t.allowEscapeViewBox,r=t.coordinate,n=t.key,i=t.offsetTopLeft,a=t.position,o=t.reverseDirection,s=t.tooltipDimension,u=t.viewBox,l=t.viewBoxDimension;if(a&&V(a[n]))return a[n];var c=r[n]-s-i,f=r[n]+i;if(e[n])return o[n]?c:f;if(o[n]){var d=c,h=u[n];return d<h?Math.max(f,u[n]):Math.max(c,u[n])}var y=f+s,v=u[n]+l;return y>v?Math.max(c,u[n]):Math.max(f,u[n])}function YR(t){var e=t.translateX,r=t.translateY,n=t.useTranslate3d;return{transform:n?"translate3d(".concat(e,"px, ").concat(r,"px, 0)"):"translate(".concat(e,"px, ").concat(r,"px)")}}function XR(t){var e=t.allowEscapeViewBox,r=t.coordinate,n=t.offsetTopLeft,i=t.position,a=t.reverseDirection,o=t.tooltipBox,s=t.useTranslate3d,u=t.viewBox,l,c,f;return o.height>0&&o.width>0&&r?(c=fg({allowEscapeViewBox:e,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:u,viewBoxDimension:u.width}),f=fg({allowEscapeViewBox:e,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:u,viewBoxDimension:u.height}),l=YR({translateX:c,translateY:f,useTranslate3d:s})):l=HR,{cssProperties:l,cssClasses:GR({translateX:c,translateY:f,coordinate:r})}}function ii(t){"@babel/helpers - typeof";return ii=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ii(t)}function dg(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function hg(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?dg(Object(r),!0).forEach(function(n){Cc(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):dg(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function JR(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ZR(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,vg(n.key),n)}}function QR(t,e,r){return e&&ZR(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function eL(t,e,r){return e=gs(e),tL(t,pg()?Reflect.construct(e,r||[],gs(t).constructor):e.apply(t,r))}function tL(t,e){if(e&&(ii(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return rL(t)}function rL(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function pg(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(pg=function(){return!!t})()}function gs(t){return gs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},gs(t)}function nL(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&kc(t,e)}function kc(t,e){return kc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},kc(t,e)}function Cc(t,e,r){return e=vg(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function vg(t){var e=iL(t,"string");return ii(e)=="symbol"?e:e+""}function iL(t,e){if(ii(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(ii(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var yg=1,aL=function(t){function e(){var r;JR(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=eL(this,e,[].concat(i)),Cc(r,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),Cc(r,"handleKeyDown",function(o){if(o.key==="Escape"){var s,u,l,c;r.setState({dismissed:!0,dismissedAtCoordinate:{x:(s=(u=r.props.coordinate)===null||u===void 0?void 0:u.x)!==null&&s!==void 0?s:0,y:(l=(c=r.props.coordinate)===null||c===void 0?void 0:c.y)!==null&&l!==void 0?l:0}})}}),r}return nL(e,t),QR(e,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>yg||Math.abs(n.height-this.state.lastBoundingBox.height)>yg)&&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,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,s=i.animationDuration,u=i.animationEasing,l=i.children,c=i.coordinate,f=i.hasPayload,d=i.isAnimationActive,h=i.offset,y=i.position,v=i.reverseDirection,p=i.useTranslate3d,m=i.viewBox,b=i.wrapperStyle,w=XR({allowEscapeViewBox:o,coordinate:c,offsetTopLeft:h,position:y,reverseDirection:v,tooltipBox:this.state.lastBoundingBox,useTranslate3d:p,viewBox:m}),O=w.cssClasses,g=w.cssProperties,_=hg(hg({transition:d&&a?"transform ".concat(s,"ms ").concat(u):void 0},g),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&f?"visible":"hidden",position:"absolute",top:0,left:0},b);return x.createElement("div",{tabIndex:-1,className:O,style:_,ref:function(A){n.wrapperNode=A}},l)}}])}(x.PureComponent),oL=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},It={isSsr:oL(),get:function(e){return It[e]},set:function(e,r){if(typeof e=="string")It[e]=r;else{var n=Object.keys(e);n&&n.length&&n.forEach(function(i){It[i]=e[i]})}}};function ai(t){"@babel/helpers - typeof";return ai=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ai(t)}function gg(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function mg(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?gg(Object(r),!0).forEach(function(n){Nc(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):gg(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function sL(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function uL(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,wg(n.key),n)}}function lL(t,e,r){return e&&uL(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function cL(t,e,r){return e=ms(e),fL(t,bg()?Reflect.construct(e,r||[],ms(t).constructor):e.apply(t,r))}function fL(t,e){if(e&&(ai(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return dL(t)}function dL(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function bg(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(bg=function(){return!!t})()}function ms(t){return ms=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ms(t)}function hL(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ic(t,e)}function Ic(t,e){return Ic=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Ic(t,e)}function Nc(t,e,r){return e=wg(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function wg(t){var e=pL(t,"string");return ai(e)=="symbol"?e:e+""}function pL(t,e){if(ai(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(ai(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function vL(t){return t.dataKey}function yL(t,e){return x.isValidElement(t)?x.cloneElement(t,e):typeof t=="function"?x.createElement(t,e):x.createElement(zR,e)}var tr=function(t){function e(){return sL(this,e),cL(this,e,arguments)}return hL(e,t),lL(e,[{key:"render",value:function(){var n=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,s=i.animationDuration,u=i.animationEasing,l=i.content,c=i.coordinate,f=i.filterNull,d=i.isAnimationActive,h=i.offset,y=i.payload,v=i.payloadUniqBy,p=i.position,m=i.reverseDirection,b=i.useTranslate3d,w=i.viewBox,O=i.wrapperStyle,g=y??[];f&&g.length&&(g=Vy(y.filter(function(S){return S.value!=null&&(S.hide!==!0||n.props.includeHidden)}),v,vL));var _=g.length>0;return x.createElement(aL,{allowEscapeViewBox:o,animationDuration:s,animationEasing:u,isAnimationActive:d,active:a,coordinate:c,hasPayload:_,offset:h,position:p,reverseDirection:m,useTranslate3d:b,viewBox:w,wrapperStyle:O},yL(l,mg(mg({},this.props),{},{payload:g})))}}])}(x.PureComponent);Nc(tr,"displayName","Tooltip"),Nc(tr,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!It.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 gL=Qt,mL=function(){return gL.Date.now()},bL=mL,wL=/\s/;function _L(t){for(var e=t.length;e--&&wL.test(t.charAt(e)););return e}var xL=_L,OL=xL,SL=/^\s+/;function AL(t){return t&&t.slice(0,OL(t)+1).replace(SL,"")}var PL=AL,EL=PL,_g=kr,TL=Kn,xg=NaN,jL=/^[-+]0x[0-9a-f]+$/i,$L=/^0b[01]+$/i,kL=/^0o[0-7]+$/i,CL=parseInt;function IL(t){if(typeof t=="number")return t;if(TL(t))return xg;if(_g(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=_g(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=EL(t);var r=$L.test(t);return r||kL.test(t)?CL(t.slice(2),r?2:8):jL.test(t)?xg:+t}var Og=IL,NL=kr,Mc=bL,Sg=Og,ML="Expected a function",DL=Math.max,RL=Math.min;function LL(t,e,r){var n,i,a,o,s,u,l=0,c=!1,f=!1,d=!0;if(typeof t!="function")throw new TypeError(ML);e=Sg(e)||0,NL(r)&&(c=!!r.leading,f="maxWait"in r,a=f?DL(Sg(r.maxWait)||0,e):a,d="trailing"in r?!!r.trailing:d);function h(_){var S=n,A=i;return n=i=void 0,l=_,o=t.apply(A,S),o}function y(_){return l=_,s=setTimeout(m,e),c?h(_):o}function v(_){var S=_-u,A=_-l,E=e-S;return f?RL(E,a-A):E}function p(_){var S=_-u,A=_-l;return u===void 0||S>=e||S<0||f&&A>=a}function m(){var _=Mc();if(p(_))return b(_);s=setTimeout(m,v(_))}function b(_){return s=void 0,d&&n?h(_):(n=i=void 0,o)}function w(){s!==void 0&&clearTimeout(s),l=0,n=u=i=s=void 0}function O(){return s===void 0?o:b(Mc())}function g(){var _=Mc(),S=p(_);if(n=arguments,i=this,u=_,S){if(s===void 0)return y(u);if(f)return clearTimeout(s),s=setTimeout(m,e),h(u)}return s===void 0&&(s=setTimeout(m,e)),o}return g.cancel=w,g.flush=O,g}var BL=LL,UL=BL,FL=kr,WL="Expected a function";function qL(t,e,r){var n=!0,i=!0;if(typeof t!="function")throw new TypeError(WL);return FL(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),UL(t,e,{leading:n,maxWait:e,trailing:i})}var zL=qL;const Ag=je(zL);function ba(t){"@babel/helpers - typeof";return ba=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ba(t)}function Pg(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function bs(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Pg(Object(r),!0).forEach(function(n){KL(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Pg(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function KL(t,e,r){return e=VL(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function VL(t){var e=HL(t,"string");return ba(e)=="symbol"?e:e+""}function HL(t,e){if(ba(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(ba(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function GL(t,e){return ZL(t)||JL(t,e)||XL(t,e)||YL()}function YL(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
90
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function XL(t,e){if(t){if(typeof t=="string")return Eg(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Eg(t,e)}}function Eg(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function JL(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,o,s=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(c){l=!0,i=c}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function ZL(t){if(Array.isArray(t))return t}var QL=x.forwardRef(function(t,e){var r=t.aspect,n=t.initialDimension,i=n===void 0?{width:-1,height:-1}:n,a=t.width,o=a===void 0?"100%":a,s=t.height,u=s===void 0?"100%":s,l=t.minWidth,c=l===void 0?0:l,f=t.minHeight,d=t.maxHeight,h=t.children,y=t.debounce,v=y===void 0?0:y,p=t.id,m=t.className,b=t.onResize,w=t.style,O=w===void 0?{}:w,g=x.useRef(null),_=x.useRef();_.current=b,x.useImperativeHandle(e,function(){return Object.defineProperty(g.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),g.current},configurable:!0})});var S=x.useState({containerWidth:i.width,containerHeight:i.height}),A=GL(S,2),E=A[0],N=A[1],j=x.useCallback(function(k,I){N(function(R){var M=Math.round(k),L=Math.round(I);return R.containerWidth===M&&R.containerHeight===L?R:{containerWidth:M,containerHeight:L}})},[]);x.useEffect(function(){var k=function(z){var D,B=z[0].contentRect,F=B.width,G=B.height;j(F,G),(D=_.current)===null||D===void 0||D.call(_,F,G)};v>0&&(k=Ag(k,v,{trailing:!0,leading:!1}));var I=new ResizeObserver(k),R=g.current.getBoundingClientRect(),M=R.width,L=R.height;return j(M,L),I.observe(g.current),function(){I.disconnect()}},[j,v]);var $=x.useMemo(function(){var k=E.containerWidth,I=E.containerHeight;if(k<0||I<0)return null;zt(nn(o)||nn(u),`The width(%s) and height(%s) are both fixed numbers,
|
|
91
|
+
maybe you don't need to use a ResponsiveContainer.`,o,u),zt(!r||r>0,"The aspect(%s) must be greater than zero.",r);var R=nn(o)?k:o,M=nn(u)?I:u;r&&r>0&&(R?M=R/r:M&&(R=M*r),d&&M>d&&(M=d)),zt(R>0||M>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
|
92
92
|
please check the style of container, or the props width(%s) and height(%s),
|
|
93
93
|
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
|
|
94
|
-
height and width.`,
|
|
95
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
96
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function E2(t,e){if(t){if(typeof t=="string")return Ug(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ug(t,e)}}function Ug(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function T2(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,o,s=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(c){l=!0,i=c}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function j2(t){if(Array.isArray(t))return t}var Fg=/[ \f\n\r\t\v\u2028\u2029]+/,Wg=function(e){var r=e.children,n=e.breakAll,i=e.style;try{var a=[];fe(r)||(n?a=r.toString().split(""):a=r.toString().split(Fg));var o=a.map(function(u){return{word:u,width:_a(u,i).width}}),s=n?0:_a(" ",i).width;return{wordsWithComputedWidth:o,spaceWidth:s}}catch{return null}},$2=function(e,r,n,i,a){var o=e.maxLines,s=e.children,u=e.style,l=e.breakAll,c=V(o),f=s,d=function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return I.reduce(function(R,L){var F=L.word,z=L.width,D=R[R.length-1];if(D&&(i==null||a||D.width+z+n<Number(i)))D.words.push(F),D.width+=z+n;else{var B={words:[F],width:z};R.push(B)}return R},[])},h=d(r),y=function(I){return I.reduce(function(R,L){return R.width>L.width?R:L})};if(!c)return h;for(var v="…",p=function(I){var R=f.slice(0,I),L=Wg({breakAll:l,style:u,children:R+v}).wordsWithComputedWidth,F=d(L),z=F.length>o||y(F).width>Number(i);return[z,F]},m=0,b=f.length-1,w=0,O;m<=b&&w<=f.length-1;){var g=Math.floor((m+b)/2),_=g-1,S=p(_),A=Bg(S,2),T=A[0],M=A[1],$=p(g),j=Bg($,1),N=j[0];if(!T&&!N&&(m=g+1),T&&N&&(b=g-1),!T&&N){O=M;break}w++}return O||h},qg=function(e){var r=fe(e)?[]:e.toString().split(Fg);return[{words:r}]},k2=function(e){var r=e.width,n=e.scaleToFit,i=e.children,a=e.style,o=e.breakAll,s=e.maxLines;if((r||n)&&!It.isSsr){var u,l,c=Wg({breakAll:o,children:i,style:a});if(c){var f=c.wordsWithComputedWidth,d=c.spaceWidth;u=f,l=d}else return qg(i);return $2({breakAll:o,children:i,maxLines:s,style:a},u,l,r,n)}return qg(i)},zg="#808080",cn=function(e){var r=e.x,n=r===void 0?0:r,i=e.y,a=i===void 0?0:i,o=e.lineHeight,s=o===void 0?"1em":o,u=e.capHeight,l=u===void 0?"0.71em":u,c=e.scaleToFit,f=c===void 0?!1:c,d=e.textAnchor,h=d===void 0?"start":d,y=e.verticalAnchor,v=y===void 0?"end":y,p=e.fill,m=p===void 0?zg:p,b=Lg(e,O2),w=x.useMemo(function(){return k2({breakAll:b.breakAll,children:b.children,maxLines:b.maxLines,scaleToFit:f,style:b.style,width:b.width})},[b.breakAll,b.children,b.maxLines,f,b.style,b.width]),O=b.dx,g=b.dy,_=b.angle,S=b.className,A=b.breakAll,T=Lg(b,S2);if(!Je(n)||!Je(a))return null;var M=n+(V(O)?O:0),$=a+(V(g)?g:0),j;switch(v){case"start":j=Lc("calc(".concat(l,")"));break;case"middle":j=Lc("calc(".concat((w.length-1)/2," * -").concat(s," + (").concat(l," / 2))"));break;default:j=Lc("calc(".concat(w.length-1," * -").concat(s,")"));break}var N=[];if(f){var C=w[0].width,I=b.width;N.push("scale(".concat((V(I)?I/C:1)/C,")"))}return _&&N.push("rotate(".concat(_,", ").concat(M,", ").concat($,")")),N.length&&(T.transform=N.join(" ")),x.createElement("text",Bc({},Q(T,!0),{x:M,y:$,className:le("recharts-text",S),textAnchor:h,fill:m.includes("url")?zg:m}),w.map(function(R,L){var F=R.words.join(A?"":" ");return x.createElement("tspan",{x:M,dy:L===0?j:s,key:"".concat(F,"-").concat(L)},F)}))};function Nr(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function C2(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Uc(t){let e,r,n;t.length!==2?(e=Nr,r=(s,u)=>Nr(t(s),u),n=(s,u)=>t(s)-u):(e=t===Nr||t===C2?t:I2,r=t,n=t);function i(s,u,l=0,c=s.length){if(l<c){if(e(u,u)!==0)return c;do{const f=l+c>>>1;r(s[f],u)<0?l=f+1:c=f}while(l<c)}return l}function a(s,u,l=0,c=s.length){if(l<c){if(e(u,u)!==0)return c;do{const f=l+c>>>1;r(s[f],u)<=0?l=f+1:c=f}while(l<c)}return l}function o(s,u,l=0,c=s.length){const f=i(s,u,l,c-1);return f>l&&n(s[f-1],u)>-n(s[f],u)?f-1:f}return{left:i,center:o,right:a}}function I2(){return 0}function Kg(t){return t===null?NaN:+t}function*N2(t,e){for(let r of t)r!=null&&(r=+r)>=r&&(yield r)}const Oa=Uc(Nr).right;Uc(Kg).center;class Vg extends Map{constructor(e,r=R2){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),e!=null)for(const[n,i]of e)this.set(n,i)}get(e){return super.get(Hg(this,e))}has(e){return super.has(Hg(this,e))}set(e,r){return super.set(M2(this,e),r)}delete(e){return super.delete(D2(this,e))}}function Hg({_intern:t,_key:e},r){const n=e(r);return t.has(n)?t.get(n):r}function M2({_intern:t,_key:e},r){const n=e(r);return t.has(n)?t.get(n):(t.set(n,r),r)}function D2({_intern:t,_key:e},r){const n=e(r);return t.has(n)&&(r=t.get(n),t.delete(n)),r}function R2(t){return t!==null&&typeof t=="object"?t.valueOf():t}function L2(t=Nr){if(t===Nr)return Gg;if(typeof t!="function")throw new TypeError("compare is not a function");return(e,r)=>{const n=t(e,r);return n||n===0?n:(t(r,r)===0)-(t(e,e)===0)}}function Gg(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}const B2=Math.sqrt(50),U2=Math.sqrt(10),F2=Math.sqrt(2);function Ss(t,e,r){const n=(e-t)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),o=a>=B2?10:a>=U2?5:a>=F2?2:1;let s,u,l;return i<0?(l=Math.pow(10,-i)/o,s=Math.round(t*l),u=Math.round(e*l),s/l<t&&++s,u/l>e&&--u,l=-l):(l=Math.pow(10,i)*o,s=Math.round(t/l),u=Math.round(e/l),s*l<t&&++s,u*l>e&&--u),u<s&&.5<=r&&r<2?Ss(t,e,r*2):[s,u,l]}function Fc(t,e,r){if(e=+e,t=+t,r=+r,!(r>0))return[];if(t===e)return[t];const n=e<t,[i,a,o]=n?Ss(e,t,r):Ss(t,e,r);if(!(a>=i))return[];const s=a-i+1,u=new Array(s);if(n)if(o<0)for(let l=0;l<s;++l)u[l]=(a-l)/-o;else for(let l=0;l<s;++l)u[l]=(a-l)*o;else if(o<0)for(let l=0;l<s;++l)u[l]=(i+l)/-o;else for(let l=0;l<s;++l)u[l]=(i+l)*o;return u}function Wc(t,e,r){return e=+e,t=+t,r=+r,Ss(t,e,r)[2]}function qc(t,e,r){e=+e,t=+t,r=+r;const n=e<t,i=n?Wc(e,t,r):Wc(t,e,r);return(n?-1:1)*(i<0?1/-i:i)}function Yg(t,e){let r;for(const n of t)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function Xg(t,e){let r;for(const n of t)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function Jg(t,e,r=0,n=1/0,i){if(e=Math.floor(e),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(t.length-1,n)),!(r<=e&&e<=n))return t;for(i=i===void 0?Gg:L2(i);n>r;){if(n-r>600){const u=n-r+1,l=e-r+1,c=Math.log(u),f=.5*Math.exp(2*c/3),d=.5*Math.sqrt(c*f*(u-f)/u)*(l-u/2<0?-1:1),h=Math.max(r,Math.floor(e-l*f/u+d)),y=Math.min(n,Math.floor(e+(u-l)*f/u+d));Jg(t,e,h,y,i)}const a=t[e];let o=r,s=n;for(Sa(t,r,e),i(t[n],a)>0&&Sa(t,r,n);o<s;){for(Sa(t,o,s),++o,--s;i(t[o],a)<0;)++o;for(;i(t[s],a)>0;)--s}i(t[r],a)===0?Sa(t,r,s):(++s,Sa(t,s,n)),s<=e&&(r=s+1),e<=s&&(n=s-1)}return t}function Sa(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function W2(t,e,r){if(t=Float64Array.from(N2(t)),!(!(n=t.length)||isNaN(e=+e))){if(e<=0||n<2)return Xg(t);if(e>=1)return Yg(t);var n,i=(n-1)*e,a=Math.floor(i),o=Yg(Jg(t,a).subarray(0,a+1)),s=Xg(t.subarray(a+1));return o+(s-o)*(i-a)}}function q2(t,e,r=Kg){if(!(!(n=t.length)||isNaN(e=+e))){if(e<=0||n<2)return+r(t[0],0,t);if(e>=1)return+r(t[n-1],n-1,t);var n,i=(n-1)*e,a=Math.floor(i),o=+r(t[a],a,t),s=+r(t[a+1],a+1,t);return o+(s-o)*(i-a)}}function z2(t,e,r){t=+t,e=+e,r=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((e-t)/r))|0,a=new Array(i);++n<i;)a[n]=t+n*r;return a}function Nt(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function hr(t,e){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}const zc=Symbol("implicit");function Kc(){var t=new Vg,e=[],r=[],n=zc;function i(a){let o=t.get(a);if(o===void 0){if(n!==zc)return n;t.set(a,o=e.push(a)-1)}return r[o%r.length]}return i.domain=function(a){if(!arguments.length)return e.slice();e=[],t=new Vg;for(const o of a)t.has(o)||t.set(o,e.push(o)-1);return i},i.range=function(a){return arguments.length?(r=Array.from(a),i):r.slice()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return Kc(e,r).unknown(n)},Nt.apply(i,arguments),i}function Aa(){var t=Kc().unknown(void 0),e=t.domain,r=t.range,n=0,i=1,a,o,s=!1,u=0,l=0,c=.5;delete t.unknown;function f(){var d=e().length,h=i<n,y=h?i:n,v=h?n:i;a=(v-y)/Math.max(1,d-u+l*2),s&&(a=Math.floor(a)),y+=(v-y-a*(d-u))*c,o=a*(1-u),s&&(y=Math.round(y),o=Math.round(o));var p=z2(d).map(function(m){return y+a*m});return r(h?p.reverse():p)}return t.domain=function(d){return arguments.length?(e(d),f()):e()},t.range=function(d){return arguments.length?([n,i]=d,n=+n,i=+i,f()):[n,i]},t.rangeRound=function(d){return[n,i]=d,n=+n,i=+i,s=!0,f()},t.bandwidth=function(){return o},t.step=function(){return a},t.round=function(d){return arguments.length?(s=!!d,f()):s},t.padding=function(d){return arguments.length?(u=Math.min(1,l=+d),f()):u},t.paddingInner=function(d){return arguments.length?(u=Math.min(1,d),f()):u},t.paddingOuter=function(d){return arguments.length?(l=+d,f()):l},t.align=function(d){return arguments.length?(c=Math.max(0,Math.min(1,d)),f()):c},t.copy=function(){return Aa(e(),[n,i]).round(s).paddingInner(u).paddingOuter(l).align(c)},Nt.apply(f(),arguments)}function Zg(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Zg(e())},t}function Pa(){return Zg(Aa.apply(null,arguments).paddingInner(1))}function Vc(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function Qg(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}function Ea(){}var Ta=.7,As=1/Ta,ui="\\s*([+-]?\\d+)\\s*",ja="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",rr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",K2=/^#([0-9a-f]{3,8})$/,V2=new RegExp(`^rgb\\(${ui},${ui},${ui}\\)$`),H2=new RegExp(`^rgb\\(${rr},${rr},${rr}\\)$`),G2=new RegExp(`^rgba\\(${ui},${ui},${ui},${ja}\\)$`),Y2=new RegExp(`^rgba\\(${rr},${rr},${rr},${ja}\\)$`),X2=new RegExp(`^hsl\\(${ja},${rr},${rr}\\)$`),J2=new RegExp(`^hsla\\(${ja},${rr},${rr},${ja}\\)$`),em={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};Vc(Ea,$a,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:tm,formatHex:tm,formatHex8:Z2,formatHsl:Q2,formatRgb:rm,toString:rm});function tm(){return this.rgb().formatHex()}function Z2(){return this.rgb().formatHex8()}function Q2(){return sm(this).formatHsl()}function rm(){return this.rgb().formatRgb()}function $a(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=K2.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?nm(e):r===3?new gt(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?Ps(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?Ps(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=V2.exec(t))?new gt(e[1],e[2],e[3],1):(e=H2.exec(t))?new gt(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=G2.exec(t))?Ps(e[1],e[2],e[3],e[4]):(e=Y2.exec(t))?Ps(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=X2.exec(t))?om(e[1],e[2]/100,e[3]/100,1):(e=J2.exec(t))?om(e[1],e[2]/100,e[3]/100,e[4]):em.hasOwnProperty(t)?nm(em[t]):t==="transparent"?new gt(NaN,NaN,NaN,0):null}function nm(t){return new gt(t>>16&255,t>>8&255,t&255,1)}function Ps(t,e,r,n){return n<=0&&(t=e=r=NaN),new gt(t,e,r,n)}function eB(t){return t instanceof Ea||(t=$a(t)),t?(t=t.rgb(),new gt(t.r,t.g,t.b,t.opacity)):new gt}function Hc(t,e,r,n){return arguments.length===1?eB(t):new gt(t,e,r,n??1)}function gt(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}Vc(gt,Hc,Qg(Ea,{brighter(t){return t=t==null?As:Math.pow(As,t),new gt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Ta:Math.pow(Ta,t),new gt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new gt(fn(this.r),fn(this.g),fn(this.b),Es(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:im,formatHex:im,formatHex8:tB,formatRgb:am,toString:am}));function im(){return`#${dn(this.r)}${dn(this.g)}${dn(this.b)}`}function tB(){return`#${dn(this.r)}${dn(this.g)}${dn(this.b)}${dn((isNaN(this.opacity)?1:this.opacity)*255)}`}function am(){const t=Es(this.opacity);return`${t===1?"rgb(":"rgba("}${fn(this.r)}, ${fn(this.g)}, ${fn(this.b)}${t===1?")":`, ${t})`}`}function Es(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function fn(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function dn(t){return t=fn(t),(t<16?"0":"")+t.toString(16)}function om(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new Vt(t,e,r,n)}function sm(t){if(t instanceof Vt)return new Vt(t.h,t.s,t.l,t.opacity);if(t instanceof Ea||(t=$a(t)),!t)return new Vt;if(t instanceof Vt)return t;t=t.rgb();var e=t.r/255,r=t.g/255,n=t.b/255,i=Math.min(e,r,n),a=Math.max(e,r,n),o=NaN,s=a-i,u=(a+i)/2;return s?(e===a?o=(r-n)/s+(r<n)*6:r===a?o=(n-e)/s+2:o=(e-r)/s+4,s/=u<.5?a+i:2-a-i,o*=60):s=u>0&&u<1?0:o,new Vt(o,s,u,t.opacity)}function rB(t,e,r,n){return arguments.length===1?sm(t):new Vt(t,e,r,n??1)}function Vt(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}Vc(Vt,rB,Qg(Ea,{brighter(t){return t=t==null?As:Math.pow(As,t),new Vt(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Ta:Math.pow(Ta,t),new Vt(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,i=2*r-n;return new gt(Gc(t>=240?t-240:t+120,i,n),Gc(t,i,n),Gc(t<120?t+240:t-120,i,n),this.opacity)},clamp(){return new Vt(um(this.h),Ts(this.s),Ts(this.l),Es(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Es(this.opacity);return`${t===1?"hsl(":"hsla("}${um(this.h)}, ${Ts(this.s)*100}%, ${Ts(this.l)*100}%${t===1?")":`, ${t})`}`}}));function um(t){return t=(t||0)%360,t<0?t+360:t}function Ts(t){return Math.max(0,Math.min(1,t||0))}function Gc(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}const Yc=t=>()=>t;function nB(t,e){return function(r){return t+r*e}}function iB(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}function aB(t){return(t=+t)==1?lm:function(e,r){return r-e?iB(e,r,t):Yc(isNaN(e)?r:e)}}function lm(t,e){var r=e-t;return r?nB(t,r):Yc(isNaN(t)?e:t)}const cm=function t(e){var r=aB(e);function n(i,a){var o=r((i=Hc(i)).r,(a=Hc(a)).r),s=r(i.g,a.g),u=r(i.b,a.b),l=lm(i.opacity,a.opacity);return function(c){return i.r=o(c),i.g=s(c),i.b=u(c),i.opacity=l(c),i+""}}return n.gamma=t,n}(1);function oB(t,e){e||(e=[]);var r=t?Math.min(e.length,t.length):0,n=e.slice(),i;return function(a){for(i=0;i<r;++i)n[i]=t[i]*(1-a)+e[i]*a;return n}}function sB(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function uB(t,e){var r=e?e.length:0,n=t?Math.min(r,t.length):0,i=new Array(n),a=new Array(r),o;for(o=0;o<n;++o)i[o]=li(t[o],e[o]);for(;o<r;++o)a[o]=e[o];return function(s){for(o=0;o<n;++o)a[o]=i[o](s);return a}}function lB(t,e){var r=new Date;return t=+t,e=+e,function(n){return r.setTime(t*(1-n)+e*n),r}}function js(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}function cB(t,e){var r={},n={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?r[i]=li(t[i],e[i]):n[i]=e[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var Xc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Jc=new RegExp(Xc.source,"g");function fB(t){return function(){return t}}function dB(t){return function(e){return t(e)+""}}function hB(t,e){var r=Xc.lastIndex=Jc.lastIndex=0,n,i,a,o=-1,s=[],u=[];for(t=t+"",e=e+"";(n=Xc.exec(t))&&(i=Jc.exec(e));)(a=i.index)>r&&(a=e.slice(r,a),s[o]?s[o]+=a:s[++o]=a),(n=n[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,u.push({i:o,x:js(n,i)})),r=Jc.lastIndex;return r<e.length&&(a=e.slice(r),s[o]?s[o]+=a:s[++o]=a),s.length<2?u[0]?dB(u[0].x):fB(e):(e=u.length,function(l){for(var c=0,f;c<e;++c)s[(f=u[c]).i]=f.x(l);return s.join("")})}function li(t,e){var r=typeof e,n;return e==null||r==="boolean"?Yc(e):(r==="number"?js:r==="string"?(n=$a(e))?(e=n,cm):hB:e instanceof $a?cm:e instanceof Date?lB:sB(e)?oB:Array.isArray(e)?uB:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?cB:js)(t,e)}function Zc(t,e){return t=+t,e=+e,function(r){return Math.round(t*(1-r)+e*r)}}function pB(t,e){e===void 0&&(e=t,t=li);for(var r=0,n=e.length-1,i=e[0],a=new Array(n<0?0:n);r<n;)a[r]=t(i,i=e[++r]);return function(o){var s=Math.max(0,Math.min(n-1,Math.floor(o*=n)));return a[s](o-s)}}function vB(t){return function(){return t}}function $s(t){return+t}var fm=[0,1];function ht(t){return t}function Qc(t,e){return(e-=t=+t)?function(r){return(r-t)/e}:vB(isNaN(e)?NaN:.5)}function yB(t,e){var r;return t>e&&(r=t,t=e,e=r),function(n){return Math.max(t,Math.min(e,n))}}function gB(t,e,r){var n=t[0],i=t[1],a=e[0],o=e[1];return i<n?(n=Qc(i,n),a=r(o,a)):(n=Qc(n,i),a=r(a,o)),function(s){return a(n(s))}}function mB(t,e,r){var n=Math.min(t.length,e.length)-1,i=new Array(n),a=new Array(n),o=-1;for(t[n]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<n;)i[o]=Qc(t[o],t[o+1]),a[o]=r(e[o],e[o+1]);return function(s){var u=Oa(t,s,1,n)-1;return a[u](i[u](s))}}function ka(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function ks(){var t=fm,e=fm,r=li,n,i,a,o=ht,s,u,l;function c(){var d=Math.min(t.length,e.length);return o!==ht&&(o=yB(t[0],t[d-1])),s=d>2?mB:gB,u=l=null,f}function f(d){return d==null||isNaN(d=+d)?a:(u||(u=s(t.map(n),e,r)))(n(o(d)))}return f.invert=function(d){return o(i((l||(l=s(e,t.map(n),js)))(d)))},f.domain=function(d){return arguments.length?(t=Array.from(d,$s),c()):t.slice()},f.range=function(d){return arguments.length?(e=Array.from(d),c()):e.slice()},f.rangeRound=function(d){return e=Array.from(d),r=Zc,c()},f.clamp=function(d){return arguments.length?(o=d?!0:ht,c()):o!==ht},f.interpolate=function(d){return arguments.length?(r=d,c()):r},f.unknown=function(d){return arguments.length?(a=d,f):a},function(d,h){return n=d,i=h,c()}}function ef(){return ks()(ht,ht)}function bB(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Cs(t,e){if((r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var r,n=t.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+t.slice(r+1)]}function ci(t){return t=Cs(Math.abs(t)),t?t[1]:NaN}function wB(t,e){return function(r,n){for(var i=r.length,a=[],o=0,s=t[0],u=0;i>0&&s>0&&(u+s+1>n&&(s=Math.max(1,n-u)),a.push(r.substring(i-=s,i+s)),!((u+=s+1)>n));)s=t[o=(o+1)%t.length];return a.reverse().join(e)}}function _B(t){return function(e){return e.replace(/[0-9]/g,function(r){return t[+r]})}}var xB=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ca(t){if(!(e=xB.exec(t)))throw new Error("invalid format: "+t);var e;return new tf({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}Ca.prototype=tf.prototype;function tf(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}tf.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 OB(t){e:for(var e=t.length,r=1,n=-1,i;r<e;++r)switch(t[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+t[r])break e;n>0&&(n=0);break}return n>0?t.slice(0,n)+t.slice(i+1):t}var dm;function SB(t,e){var r=Cs(t,e);if(!r)return t+"";var n=r[0],i=r[1],a=i-(dm=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=n.length;return a===o?n:a>o?n+new Array(a-o+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+Cs(t,Math.max(0,e+a-1))[0]}function hm(t,e){var r=Cs(t,e);if(!r)return t+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const pm={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:bB,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>hm(t*100,e),r:hm,s:SB,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function vm(t){return t}var ym=Array.prototype.map,gm=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function AB(t){var e=t.grouping===void 0||t.thousands===void 0?vm:wB(ym.call(t.grouping,Number),t.thousands+""),r=t.currency===void 0?"":t.currency[0]+"",n=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",a=t.numerals===void 0?vm:_B(ym.call(t.numerals,String)),o=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"−":t.minus+"",u=t.nan===void 0?"NaN":t.nan+"";function l(f){f=Ca(f);var d=f.fill,h=f.align,y=f.sign,v=f.symbol,p=f.zero,m=f.width,b=f.comma,w=f.precision,O=f.trim,g=f.type;g==="n"?(b=!0,g="g"):pm[g]||(w===void 0&&(w=12),O=!0,g="g"),(p||d==="0"&&h==="=")&&(p=!0,d="0",h="=");var _=v==="$"?r:v==="#"&&/[boxX]/.test(g)?"0"+g.toLowerCase():"",S=v==="$"?n:/[%p]/.test(g)?o:"",A=pm[g],T=/[defgprs%]/.test(g);w=w===void 0?6:/[gprs]/.test(g)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function M($){var j=_,N=S,C,I,R;if(g==="c")N=A($)+N,$="";else{$=+$;var L=$<0||1/$<0;if($=isNaN($)?u:A(Math.abs($),w),O&&($=OB($)),L&&+$==0&&y!=="+"&&(L=!1),j=(L?y==="("?y:s:y==="-"||y==="("?"":y)+j,N=(g==="s"?gm[8+dm/3]:"")+N+(L&&y==="("?")":""),T){for(C=-1,I=$.length;++C<I;)if(R=$.charCodeAt(C),48>R||R>57){N=(R===46?i+$.slice(C+1):$.slice(C))+N,$=$.slice(0,C);break}}}b&&!p&&($=e($,1/0));var F=j.length+$.length+N.length,z=F<m?new Array(m-F+1).join(d):"";switch(b&&p&&($=e(z+$,z.length?m-N.length:1/0),z=""),h){case"<":$=j+$+N+z;break;case"=":$=j+z+$+N;break;case"^":$=z.slice(0,F=z.length>>1)+j+$+N+z.slice(F);break;default:$=z+j+$+N;break}return a($)}return M.toString=function(){return f+""},M}function c(f,d){var h=l((f=Ca(f),f.type="f",f)),y=Math.max(-8,Math.min(8,Math.floor(ci(d)/3)))*3,v=Math.pow(10,-y),p=gm[8+y/3];return function(m){return h(v*m)+p}}return{format:l,formatPrefix:c}}var Is,rf,mm;PB({thousands:",",grouping:[3],currency:["$",""]});function PB(t){return Is=AB(t),rf=Is.format,mm=Is.formatPrefix,Is}function EB(t){return Math.max(0,-ci(Math.abs(t)))}function TB(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(ci(e)/3)))*3-ci(Math.abs(t)))}function jB(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,ci(e)-ci(t))+1}function bm(t,e,r,n){var i=qc(t,e,r),a;switch(n=Ca(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(t),Math.abs(e));return n.precision==null&&!isNaN(a=TB(i,o))&&(n.precision=a),mm(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=jB(i,Math.max(Math.abs(t),Math.abs(e))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=EB(i))&&(n.precision=a-(n.type==="%")*2);break}}return rf(n)}function Mr(t){var e=t.domain;return t.ticks=function(r){var n=e();return Fc(n[0],n[n.length-1],r??10)},t.tickFormat=function(r,n){var i=e();return bm(i[0],i[i.length-1],r??10,n)},t.nice=function(r){r==null&&(r=10);var n=e(),i=0,a=n.length-1,o=n[i],s=n[a],u,l,c=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);c-- >0;){if(l=Wc(o,s,r),l===u)return n[i]=o,n[a]=s,e(n);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;u=l}return t},t}function Ns(){var t=ef();return t.copy=function(){return ka(t,Ns())},Nt.apply(t,arguments),Mr(t)}function wm(t){var e;function r(n){return n==null||isNaN(n=+n)?e:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(t=Array.from(n,$s),r):t.slice()},r.unknown=function(n){return arguments.length?(e=n,r):e},r.copy=function(){return wm(t).unknown(e)},t=arguments.length?Array.from(t,$s):[0,1],Mr(r)}function _m(t,e){t=t.slice();var r=0,n=t.length-1,i=t[r],a=t[n],o;return a<i&&(o=r,r=n,n=o,o=i,i=a,a=o),t[r]=e.floor(i),t[n]=e.ceil(a),t}function xm(t){return Math.log(t)}function Om(t){return Math.exp(t)}function $B(t){return-Math.log(-t)}function kB(t){return-Math.exp(-t)}function CB(t){return isFinite(t)?+("1e"+t):t<0?0:t}function IB(t){return t===10?CB:t===Math.E?Math.exp:e=>Math.pow(t,e)}function NB(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function Sm(t){return(e,r)=>-t(-e,r)}function nf(t){const e=t(xm,Om),r=e.domain;let n=10,i,a;function o(){return i=NB(n),a=IB(n),r()[0]<0?(i=Sm(i),a=Sm(a),t($B,kB)):t(xm,Om),e}return e.base=function(s){return arguments.length?(n=+s,o()):n},e.domain=function(s){return arguments.length?(r(s),o()):r()},e.ticks=s=>{const u=r();let l=u[0],c=u[u.length-1];const f=c<l;f&&([l,c]=[c,l]);let d=i(l),h=i(c),y,v;const p=s==null?10:+s;let m=[];if(!(n%1)&&h-d<p){if(d=Math.floor(d),h=Math.ceil(h),l>0){for(;d<=h;++d)for(y=1;y<n;++y)if(v=d<0?y/a(-d):y*a(d),!(v<l)){if(v>c)break;m.push(v)}}else for(;d<=h;++d)for(y=n-1;y>=1;--y)if(v=d>0?y/a(-d):y*a(d),!(v<l)){if(v>c)break;m.push(v)}m.length*2<p&&(m=Fc(l,c,p))}else m=Fc(d,h,Math.min(h-d,p)).map(a);return f?m.reverse():m},e.tickFormat=(s,u)=>{if(s==null&&(s=10),u==null&&(u=n===10?"s":","),typeof u!="function"&&(!(n%1)&&(u=Ca(u)).precision==null&&(u.trim=!0),u=rf(u)),s===1/0)return u;const l=Math.max(1,n*s/e.ticks().length);return c=>{let f=c/a(Math.round(i(c)));return f*n<n-.5&&(f*=n),f<=l?u(c):""}},e.nice=()=>r(_m(r(),{floor:s=>a(Math.floor(i(s))),ceil:s=>a(Math.ceil(i(s)))})),e}function Am(){const t=nf(ks()).domain([1,10]);return t.copy=()=>ka(t,Am()).base(t.base()),Nt.apply(t,arguments),t}function Pm(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function Em(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function af(t){var e=1,r=t(Pm(e),Em(e));return r.constant=function(n){return arguments.length?t(Pm(e=+n),Em(e)):e},Mr(r)}function Tm(){var t=af(ks());return t.copy=function(){return ka(t,Tm()).constant(t.constant())},Nt.apply(t,arguments)}function jm(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function MB(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function DB(t){return t<0?-t*t:t*t}function of(t){var e=t(ht,ht),r=1;function n(){return r===1?t(ht,ht):r===.5?t(MB,DB):t(jm(r),jm(1/r))}return e.exponent=function(i){return arguments.length?(r=+i,n()):r},Mr(e)}function sf(){var t=of(ks());return t.copy=function(){return ka(t,sf()).exponent(t.exponent())},Nt.apply(t,arguments),t}function RB(){return sf.apply(null,arguments).exponent(.5)}function $m(t){return Math.sign(t)*t*t}function LB(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}function km(){var t=ef(),e=[0,1],r=!1,n;function i(a){var o=LB(t(a));return isNaN(o)?n:r?Math.round(o):o}return i.invert=function(a){return t.invert($m(a))},i.domain=function(a){return arguments.length?(t.domain(a),i):t.domain()},i.range=function(a){return arguments.length?(t.range((e=Array.from(a,$s)).map($m)),i):e.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(r=!!a,i):r},i.clamp=function(a){return arguments.length?(t.clamp(a),i):t.clamp()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return km(t.domain(),e).round(r).clamp(t.clamp()).unknown(n)},Nt.apply(i,arguments),Mr(i)}function Cm(){var t=[],e=[],r=[],n;function i(){var o=0,s=Math.max(1,e.length);for(r=new Array(s-1);++o<s;)r[o-1]=q2(t,o/s);return a}function a(o){return o==null||isNaN(o=+o)?n:e[Oa(r,o)]}return a.invertExtent=function(o){var s=e.indexOf(o);return s<0?[NaN,NaN]:[s>0?r[s-1]:t[0],s<r.length?r[s]:t[t.length-1]]},a.domain=function(o){if(!arguments.length)return t.slice();t=[];for(let s of o)s!=null&&!isNaN(s=+s)&&t.push(s);return t.sort(Nr),i()},a.range=function(o){return arguments.length?(e=Array.from(o),i()):e.slice()},a.unknown=function(o){return arguments.length?(n=o,a):n},a.quantiles=function(){return r.slice()},a.copy=function(){return Cm().domain(t).range(e).unknown(n)},Nt.apply(a,arguments)}function Im(){var t=0,e=1,r=1,n=[.5],i=[0,1],a;function o(u){return u!=null&&u<=u?i[Oa(n,u,0,r)]:a}function s(){var u=-1;for(n=new Array(r);++u<r;)n[u]=((u+1)*e-(u-r)*t)/(r+1);return o}return o.domain=function(u){return arguments.length?([t,e]=u,t=+t,e=+e,s()):[t,e]},o.range=function(u){return arguments.length?(r=(i=Array.from(u)).length-1,s()):i.slice()},o.invertExtent=function(u){var l=i.indexOf(u);return l<0?[NaN,NaN]:l<1?[t,n[0]]:l>=r?[n[r-1],e]:[n[l-1],n[l]]},o.unknown=function(u){return arguments.length&&(a=u),o},o.thresholds=function(){return n.slice()},o.copy=function(){return Im().domain([t,e]).range(i).unknown(a)},Nt.apply(Mr(o),arguments)}function Nm(){var t=[.5],e=[0,1],r,n=1;function i(a){return a!=null&&a<=a?e[Oa(t,a,0,n)]:r}return i.domain=function(a){return arguments.length?(t=Array.from(a),n=Math.min(t.length,e.length-1),i):t.slice()},i.range=function(a){return arguments.length?(e=Array.from(a),n=Math.min(t.length,e.length-1),i):e.slice()},i.invertExtent=function(a){var o=e.indexOf(a);return[t[o-1],t[o]]},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return Nm().domain(t).range(e).unknown(r)},Nt.apply(i,arguments)}const uf=new Date,lf=new Date;function Ze(t,e,r,n){function i(a){return t(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(t(a=new Date(+a)),a),i.ceil=a=>(t(a=new Date(a-1)),e(a,1),t(a),a),i.round=a=>{const o=i(a),s=i.ceil(a);return a-o<s-a?o:s},i.offset=(a,o)=>(e(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,s)=>{const u=[];if(a=i.ceil(a),s=s==null?1:Math.floor(s),!(a<o)||!(s>0))return u;let l;do u.push(l=new Date(+a)),e(a,s),t(a);while(l<a&&a<o);return u},i.filter=a=>Ze(o=>{if(o>=o)for(;t(o),!a(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;e(o,-1),!a(o););else for(;--s>=0;)for(;e(o,1),!a(o););}),r&&(i.count=(a,o)=>(uf.setTime(+a),lf.setTime(+o),t(uf),t(lf),Math.floor(r(uf,lf))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?o=>n(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const Ms=Ze(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Ms.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?Ze(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):Ms),Ms.range;const pr=1e3,Mt=pr*60,vr=Mt*60,yr=vr*24,cf=yr*7,Mm=yr*30,ff=yr*365,hn=Ze(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*pr)},(t,e)=>(e-t)/pr,t=>t.getUTCSeconds());hn.range;const df=Ze(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*pr)},(t,e)=>{t.setTime(+t+e*Mt)},(t,e)=>(e-t)/Mt,t=>t.getMinutes());df.range;const hf=Ze(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*Mt)},(t,e)=>(e-t)/Mt,t=>t.getUTCMinutes());hf.range;const pf=Ze(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*pr-t.getMinutes()*Mt)},(t,e)=>{t.setTime(+t+e*vr)},(t,e)=>(e-t)/vr,t=>t.getHours());pf.range;const vf=Ze(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*vr)},(t,e)=>(e-t)/vr,t=>t.getUTCHours());vf.range;const Ia=Ze(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Mt)/yr,t=>t.getDate()-1);Ia.range;const Ds=Ze(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yr,t=>t.getUTCDate()-1);Ds.range;const Dm=Ze(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yr,t=>Math.floor(t/yr));Dm.range;function pn(t){return Ze(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,r)=>{e.setDate(e.getDate()+r*7)},(e,r)=>(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*Mt)/cf)}const Rs=pn(0),Ls=pn(1),BB=pn(2),UB=pn(3),fi=pn(4),FB=pn(5),WB=pn(6);Rs.range,Ls.range,BB.range,UB.range,fi.range,FB.range,WB.range;function vn(t){return Ze(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r*7)},(e,r)=>(r-e)/cf)}const Bs=vn(0),Us=vn(1),qB=vn(2),zB=vn(3),di=vn(4),KB=vn(5),VB=vn(6);Bs.range,Us.range,qB.range,zB.range,di.range,KB.range,VB.range;const yf=Ze(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());yf.range;const gf=Ze(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());gf.range;const gr=Ze(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());gr.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Ze(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r*t)}),gr.range;const mr=Ze(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());mr.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Ze(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t)}),mr.range;function Rm(t,e,r,n,i,a){const o=[[hn,1,pr],[hn,5,5*pr],[hn,15,15*pr],[hn,30,30*pr],[a,1,Mt],[a,5,5*Mt],[a,15,15*Mt],[a,30,30*Mt],[i,1,vr],[i,3,3*vr],[i,6,6*vr],[i,12,12*vr],[n,1,yr],[n,2,2*yr],[r,1,cf],[e,1,Mm],[e,3,3*Mm],[t,1,ff]];function s(l,c,f){const d=c<l;d&&([l,c]=[c,l]);const h=f&&typeof f.range=="function"?f:u(l,c,f),y=h?h.range(l,+c+1):[];return d?y.reverse():y}function u(l,c,f){const d=Math.abs(c-l)/f,h=Uc(([,,p])=>p).right(o,d);if(h===o.length)return t.every(qc(l/ff,c/ff,f));if(h===0)return Ms.every(Math.max(qc(l,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,u]}const[HB,GB]=Rm(mr,gf,Bs,Dm,vf,hf),[YB,XB]=Rm(gr,yf,Rs,Ia,pf,df);function mf(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function bf(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Na(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function JB(t){var e=t.dateTime,r=t.date,n=t.time,i=t.periods,a=t.days,o=t.shortDays,s=t.months,u=t.shortMonths,l=Ma(i),c=Da(i),f=Ma(a),d=Da(a),h=Ma(o),y=Da(o),v=Ma(s),p=Da(s),m=Ma(u),b=Da(u),w={a:L,A:F,b:z,B:D,c:null,d:qm,e:qm,f:wU,g:$U,G:CU,H:gU,I:mU,j:bU,L:zm,m:_U,M:xU,p:B,q:W,Q:Xm,s:Jm,S:OU,u:SU,U:AU,V:PU,w:EU,W:TU,x:null,X:null,y:jU,Y:kU,Z:IU,"%":Ym},O={a:G,A:J,b:re,B:ne,c:null,d:Vm,e:Vm,f:RU,g:HU,G:YU,H:NU,I:MU,j:DU,L:Hm,m:LU,M:BU,p:ue,q:oe,Q:Xm,s:Jm,S:UU,u:FU,U:WU,V:qU,w:zU,W:KU,x:null,X:null,y:VU,Y:GU,Z:XU,"%":Ym},g={a:M,A:$,b:j,B:N,c:C,d:Fm,e:Fm,f:hU,g:Um,G:Bm,H:Wm,I:Wm,j:lU,L:dU,m:uU,M:cU,p:T,q:sU,Q:vU,s:yU,S:fU,u:rU,U:nU,V:iU,w:tU,W:aU,x:I,X:R,y:Um,Y:Bm,Z:oU,"%":pU};w.x=_(r,w),w.X=_(n,w),w.c=_(e,w),O.x=_(r,O),O.X=_(n,O),O.c=_(e,O);function _(q,Y){return function(te){var k=[],ye=-1,H=0,_e=q.length,Ee,Ge,Jt;for(te instanceof Date||(te=new Date(+te));++ye<_e;)q.charCodeAt(ye)===37&&(k.push(q.slice(H,ye)),(Ge=Lm[Ee=q.charAt(++ye)])!=null?Ee=q.charAt(++ye):Ge=Ee==="e"?" ":"0",(Jt=Y[Ee])&&(Ee=Jt(te,Ge)),k.push(Ee),H=ye+1);return k.push(q.slice(H,ye)),k.join("")}}function S(q,Y){return function(te){var k=Na(1900,void 0,1),ye=A(k,q,te+="",0),H,_e;if(ye!=te.length)return null;if("Q"in k)return new Date(k.Q);if("s"in k)return new Date(k.s*1e3+("L"in k?k.L:0));if(Y&&!("Z"in k)&&(k.Z=0),"p"in k&&(k.H=k.H%12+k.p*12),k.m===void 0&&(k.m="q"in k?k.q:0),"V"in k){if(k.V<1||k.V>53)return null;"w"in k||(k.w=1),"Z"in k?(H=bf(Na(k.y,0,1)),_e=H.getUTCDay(),H=_e>4||_e===0?Us.ceil(H):Us(H),H=Ds.offset(H,(k.V-1)*7),k.y=H.getUTCFullYear(),k.m=H.getUTCMonth(),k.d=H.getUTCDate()+(k.w+6)%7):(H=mf(Na(k.y,0,1)),_e=H.getDay(),H=_e>4||_e===0?Ls.ceil(H):Ls(H),H=Ia.offset(H,(k.V-1)*7),k.y=H.getFullYear(),k.m=H.getMonth(),k.d=H.getDate()+(k.w+6)%7)}else("W"in k||"U"in k)&&("w"in k||(k.w="u"in k?k.u%7:"W"in k?1:0),_e="Z"in k?bf(Na(k.y,0,1)).getUTCDay():mf(Na(k.y,0,1)).getDay(),k.m=0,k.d="W"in k?(k.w+6)%7+k.W*7-(_e+5)%7:k.w+k.U*7-(_e+6)%7);return"Z"in k?(k.H+=k.Z/100|0,k.M+=k.Z%100,bf(k)):mf(k)}}function A(q,Y,te,k){for(var ye=0,H=Y.length,_e=te.length,Ee,Ge;ye<H;){if(k>=_e)return-1;if(Ee=Y.charCodeAt(ye++),Ee===37){if(Ee=Y.charAt(ye++),Ge=g[Ee in Lm?Y.charAt(ye++):Ee],!Ge||(k=Ge(q,te,k))<0)return-1}else if(Ee!=te.charCodeAt(k++))return-1}return k}function T(q,Y,te){var k=l.exec(Y.slice(te));return k?(q.p=c.get(k[0].toLowerCase()),te+k[0].length):-1}function M(q,Y,te){var k=h.exec(Y.slice(te));return k?(q.w=y.get(k[0].toLowerCase()),te+k[0].length):-1}function $(q,Y,te){var k=f.exec(Y.slice(te));return k?(q.w=d.get(k[0].toLowerCase()),te+k[0].length):-1}function j(q,Y,te){var k=m.exec(Y.slice(te));return k?(q.m=b.get(k[0].toLowerCase()),te+k[0].length):-1}function N(q,Y,te){var k=v.exec(Y.slice(te));return k?(q.m=p.get(k[0].toLowerCase()),te+k[0].length):-1}function C(q,Y,te){return A(q,e,Y,te)}function I(q,Y,te){return A(q,r,Y,te)}function R(q,Y,te){return A(q,n,Y,te)}function L(q){return o[q.getDay()]}function F(q){return a[q.getDay()]}function z(q){return u[q.getMonth()]}function D(q){return s[q.getMonth()]}function B(q){return i[+(q.getHours()>=12)]}function W(q){return 1+~~(q.getMonth()/3)}function G(q){return o[q.getUTCDay()]}function J(q){return a[q.getUTCDay()]}function re(q){return u[q.getUTCMonth()]}function ne(q){return s[q.getUTCMonth()]}function ue(q){return i[+(q.getUTCHours()>=12)]}function oe(q){return 1+~~(q.getUTCMonth()/3)}return{format:function(q){var Y=_(q+="",w);return Y.toString=function(){return q},Y},parse:function(q){var Y=S(q+="",!1);return Y.toString=function(){return q},Y},utcFormat:function(q){var Y=_(q+="",O);return Y.toString=function(){return q},Y},utcParse:function(q){var Y=S(q+="",!0);return Y.toString=function(){return q},Y}}}var Lm={"-":"",_:" ",0:"0"},tt=/^\s*\d+/,ZB=/^%/,QB=/[\\^$*+?|[\]().{}]/g;function be(t,e,r){var n=t<0?"-":"",i=(n?-t:t)+"",a=i.length;return n+(a<r?new Array(r-a+1).join(e)+i:i)}function eU(t){return t.replace(QB,"\\$&")}function Ma(t){return new RegExp("^(?:"+t.map(eU).join("|")+")","i")}function Da(t){return new Map(t.map((e,r)=>[e.toLowerCase(),r]))}function tU(t,e,r){var n=tt.exec(e.slice(r,r+1));return n?(t.w=+n[0],r+n[0].length):-1}function rU(t,e,r){var n=tt.exec(e.slice(r,r+1));return n?(t.u=+n[0],r+n[0].length):-1}function nU(t,e,r){var n=tt.exec(e.slice(r,r+2));return n?(t.U=+n[0],r+n[0].length):-1}function iU(t,e,r){var n=tt.exec(e.slice(r,r+2));return n?(t.V=+n[0],r+n[0].length):-1}function aU(t,e,r){var n=tt.exec(e.slice(r,r+2));return n?(t.W=+n[0],r+n[0].length):-1}function Bm(t,e,r){var n=tt.exec(e.slice(r,r+4));return n?(t.y=+n[0],r+n[0].length):-1}function Um(t,e,r){var n=tt.exec(e.slice(r,r+2));return n?(t.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function oU(t,e,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function sU(t,e,r){var n=tt.exec(e.slice(r,r+1));return n?(t.q=n[0]*3-3,r+n[0].length):-1}function uU(t,e,r){var n=tt.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function Fm(t,e,r){var n=tt.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function lU(t,e,r){var n=tt.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function Wm(t,e,r){var n=tt.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function cU(t,e,r){var n=tt.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function fU(t,e,r){var n=tt.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function dU(t,e,r){var n=tt.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function hU(t,e,r){var n=tt.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function pU(t,e,r){var n=ZB.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function vU(t,e,r){var n=tt.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function yU(t,e,r){var n=tt.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function qm(t,e){return be(t.getDate(),e,2)}function gU(t,e){return be(t.getHours(),e,2)}function mU(t,e){return be(t.getHours()%12||12,e,2)}function bU(t,e){return be(1+Ia.count(gr(t),t),e,3)}function zm(t,e){return be(t.getMilliseconds(),e,3)}function wU(t,e){return zm(t,e)+"000"}function _U(t,e){return be(t.getMonth()+1,e,2)}function xU(t,e){return be(t.getMinutes(),e,2)}function OU(t,e){return be(t.getSeconds(),e,2)}function SU(t){var e=t.getDay();return e===0?7:e}function AU(t,e){return be(Rs.count(gr(t)-1,t),e,2)}function Km(t){var e=t.getDay();return e>=4||e===0?fi(t):fi.ceil(t)}function PU(t,e){return t=Km(t),be(fi.count(gr(t),t)+(gr(t).getDay()===4),e,2)}function EU(t){return t.getDay()}function TU(t,e){return be(Ls.count(gr(t)-1,t),e,2)}function jU(t,e){return be(t.getFullYear()%100,e,2)}function $U(t,e){return t=Km(t),be(t.getFullYear()%100,e,2)}function kU(t,e){return be(t.getFullYear()%1e4,e,4)}function CU(t,e){var r=t.getDay();return t=r>=4||r===0?fi(t):fi.ceil(t),be(t.getFullYear()%1e4,e,4)}function IU(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+be(e/60|0,"0",2)+be(e%60,"0",2)}function Vm(t,e){return be(t.getUTCDate(),e,2)}function NU(t,e){return be(t.getUTCHours(),e,2)}function MU(t,e){return be(t.getUTCHours()%12||12,e,2)}function DU(t,e){return be(1+Ds.count(mr(t),t),e,3)}function Hm(t,e){return be(t.getUTCMilliseconds(),e,3)}function RU(t,e){return Hm(t,e)+"000"}function LU(t,e){return be(t.getUTCMonth()+1,e,2)}function BU(t,e){return be(t.getUTCMinutes(),e,2)}function UU(t,e){return be(t.getUTCSeconds(),e,2)}function FU(t){var e=t.getUTCDay();return e===0?7:e}function WU(t,e){return be(Bs.count(mr(t)-1,t),e,2)}function Gm(t){var e=t.getUTCDay();return e>=4||e===0?di(t):di.ceil(t)}function qU(t,e){return t=Gm(t),be(di.count(mr(t),t)+(mr(t).getUTCDay()===4),e,2)}function zU(t){return t.getUTCDay()}function KU(t,e){return be(Us.count(mr(t)-1,t),e,2)}function VU(t,e){return be(t.getUTCFullYear()%100,e,2)}function HU(t,e){return t=Gm(t),be(t.getUTCFullYear()%100,e,2)}function GU(t,e){return be(t.getUTCFullYear()%1e4,e,4)}function YU(t,e){var r=t.getUTCDay();return t=r>=4||r===0?di(t):di.ceil(t),be(t.getUTCFullYear()%1e4,e,4)}function XU(){return"+0000"}function Ym(){return"%"}function Xm(t){return+t}function Jm(t){return Math.floor(+t/1e3)}var hi,Zm,Qm;JU({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 JU(t){return hi=JB(t),Zm=hi.format,hi.parse,Qm=hi.utcFormat,hi.utcParse,hi}function ZU(t){return new Date(t)}function QU(t){return t instanceof Date?+t:+new Date(+t)}function wf(t,e,r,n,i,a,o,s,u,l){var c=ef(),f=c.invert,d=c.domain,h=l(".%L"),y=l(":%S"),v=l("%I:%M"),p=l("%I %p"),m=l("%a %d"),b=l("%b %d"),w=l("%B"),O=l("%Y");function g(_){return(u(_)<_?h:s(_)<_?y:o(_)<_?v:a(_)<_?p:n(_)<_?i(_)<_?m:b:r(_)<_?w:O)(_)}return c.invert=function(_){return new Date(f(_))},c.domain=function(_){return arguments.length?d(Array.from(_,QU)):d().map(ZU)},c.ticks=function(_){var S=d();return t(S[0],S[S.length-1],_??10)},c.tickFormat=function(_,S){return S==null?g:l(S)},c.nice=function(_){var S=d();return(!_||typeof _.range!="function")&&(_=e(S[0],S[S.length-1],_??10)),_?d(_m(S,_)):c},c.copy=function(){return ka(c,wf(t,e,r,n,i,a,o,s,u,l))},c}function eF(){return Nt.apply(wf(YB,XB,gr,yf,Rs,Ia,pf,df,hn,Zm).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function tF(){return Nt.apply(wf(HB,GB,mr,gf,Bs,Ds,vf,hf,hn,Qm).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Fs(){var t=0,e=1,r,n,i,a,o=ht,s=!1,u;function l(f){return f==null||isNaN(f=+f)?u:o(i===0?.5:(f=(a(f)-r)*i,s?Math.max(0,Math.min(1,f)):f))}l.domain=function(f){return arguments.length?([t,e]=f,r=a(t=+t),n=a(e=+e),i=r===n?0:1/(n-r),l):[t,e]},l.clamp=function(f){return arguments.length?(s=!!f,l):s},l.interpolator=function(f){return arguments.length?(o=f,l):o};function c(f){return function(d){var h,y;return arguments.length?([h,y]=d,o=f(h,y),l):[o(0),o(1)]}}return l.range=c(li),l.rangeRound=c(Zc),l.unknown=function(f){return arguments.length?(u=f,l):u},function(f){return a=f,r=f(t),n=f(e),i=r===n?0:1/(n-r),l}}function Dr(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function eb(){var t=Mr(Fs()(ht));return t.copy=function(){return Dr(t,eb())},hr.apply(t,arguments)}function tb(){var t=nf(Fs()).domain([1,10]);return t.copy=function(){return Dr(t,tb()).base(t.base())},hr.apply(t,arguments)}function rb(){var t=af(Fs());return t.copy=function(){return Dr(t,rb()).constant(t.constant())},hr.apply(t,arguments)}function _f(){var t=of(Fs());return t.copy=function(){return Dr(t,_f()).exponent(t.exponent())},hr.apply(t,arguments)}function rF(){return _f.apply(null,arguments).exponent(.5)}function nb(){var t=[],e=ht;function r(n){if(n!=null&&!isNaN(n=+n))return e((Oa(t,n,1)-1)/(t.length-1))}return r.domain=function(n){if(!arguments.length)return t.slice();t=[];for(let i of n)i!=null&&!isNaN(i=+i)&&t.push(i);return t.sort(Nr),r},r.interpolator=function(n){return arguments.length?(e=n,r):e},r.range=function(){return t.map((n,i)=>e(i/(t.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,a)=>W2(t,a/n))},r.copy=function(){return nb(e).domain(t)},hr.apply(r,arguments)}function Ws(){var t=0,e=.5,r=1,n=1,i,a,o,s,u,l=ht,c,f=!1,d;function h(v){return isNaN(v=+v)?d:(v=.5+((v=+c(v))-a)*(n*v<n*a?s:u),l(f?Math.max(0,Math.min(1,v)):v))}h.domain=function(v){return arguments.length?([t,e,r]=v,i=c(t=+t),a=c(e=+e),o=c(r=+r),s=i===a?0:.5/(a-i),u=a===o?0:.5/(o-a),n=a<i?-1:1,h):[t,e,r]},h.clamp=function(v){return arguments.length?(f=!!v,h):f},h.interpolator=function(v){return arguments.length?(l=v,h):l};function y(v){return function(p){var m,b,w;return arguments.length?([m,b,w]=p,l=pB(v,[m,b,w]),h):[l(0),l(.5),l(1)]}}return h.range=y(li),h.rangeRound=y(Zc),h.unknown=function(v){return arguments.length?(d=v,h):d},function(v){return c=v,i=v(t),a=v(e),o=v(r),s=i===a?0:.5/(a-i),u=a===o?0:.5/(o-a),n=a<i?-1:1,h}}function ib(){var t=Mr(Ws()(ht));return t.copy=function(){return Dr(t,ib())},hr.apply(t,arguments)}function ab(){var t=nf(Ws()).domain([.1,1,10]);return t.copy=function(){return Dr(t,ab()).base(t.base())},hr.apply(t,arguments)}function ob(){var t=af(Ws());return t.copy=function(){return Dr(t,ob()).constant(t.constant())},hr.apply(t,arguments)}function xf(){var t=of(Ws());return t.copy=function(){return Dr(t,xf()).exponent(t.exponent())},hr.apply(t,arguments)}function nF(){return xf.apply(null,arguments).exponent(.5)}const sb=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Aa,scaleDiverging:ib,scaleDivergingLog:ab,scaleDivergingPow:xf,scaleDivergingSqrt:nF,scaleDivergingSymlog:ob,scaleIdentity:wm,scaleImplicit:zc,scaleLinear:Ns,scaleLog:Am,scaleOrdinal:Kc,scalePoint:Pa,scalePow:sf,scaleQuantile:Cm,scaleQuantize:Im,scaleRadial:km,scaleSequential:eb,scaleSequentialLog:tb,scaleSequentialPow:_f,scaleSequentialQuantile:nb,scaleSequentialSqrt:rF,scaleSequentialSymlog:rb,scaleSqrt:RB,scaleSymlog:Tm,scaleThreshold:Nm,scaleTime:eF,scaleUtc:tF,tickFormat:bm},Symbol.toStringTag,{value:"Module"}));var iF=Kn;function aF(t,e,r){for(var n=-1,i=t.length;++n<i;){var a=t[n],o=e(a);if(o!=null&&(s===void 0?o===o&&!iF(o):r(o,s)))var s=o,u=a}return u}var qs=aF;function oF(t,e){return t>e}var ub=oF,sF=qs,uF=ub,lF=ri;function cF(t){return t&&t.length?sF(t,lF,uF):void 0}var fF=cF;const Rr=je(fF);function dF(t,e){return t<e}var lb=dF,hF=qs,pF=lb,vF=ri;function yF(t){return t&&t.length?hF(t,vF,pF):void 0}var gF=yF;const zs=je(gF);var mF=Ll,bF=er,wF=ig,_F=yt;function xF(t,e){var r=_F(t)?mF:wF;return r(t,bF(e))}var OF=xF,SF=rg,AF=OF;function PF(t,e){return SF(AF(t,e),1)}var EF=PF;const TF=je(EF);var jF=Sc;function $F(t,e){return jF(t,e)}var kF=$F;const Lr=je(kF);var pi=1e9,CF={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Af,Be=!0,Dt="[DecimalError] ",yn=Dt+"Invalid argument: ",Of=Dt+"Exponent out of range: ",vi=Math.floor,gn=Math.pow,IF=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,At,rt=1e7,Le=7,cb=9007199254740991,Ks=vi(cb/Le),Z={};Z.absoluteValue=Z.abs=function(){var t=new this.constructor(this);return t.s&&(t.s=1),t},Z.comparedTo=Z.cmp=function(t){var e,r,n,i,a=this;if(t=new a.constructor(t),a.s!==t.s)return a.s||-t.s;if(a.e!==t.e)return a.e>t.e^a.s<0?1:-1;for(n=a.d.length,i=t.d.length,e=0,r=n<i?n:i;e<r;++e)if(a.d[e]!==t.d[e])return a.d[e]>t.d[e]^a.s<0?1:-1;return n===i?0:n>i^a.s<0?1:-1},Z.decimalPlaces=Z.dp=function(){var t=this,e=t.d.length-1,r=(e-t.e)*Le;if(e=t.d[e],e)for(;e%10==0;e/=10)r--;return r<0?0:r},Z.dividedBy=Z.div=function(t){return br(this,new this.constructor(t))},Z.dividedToIntegerBy=Z.idiv=function(t){var e=this,r=e.constructor;return ke(br(e,new r(t),0,1),r.precision)},Z.equals=Z.eq=function(t){return!this.cmp(t)},Z.exponent=function(){return Ve(this)},Z.greaterThan=Z.gt=function(t){return this.cmp(t)>0},Z.greaterThanOrEqualTo=Z.gte=function(t){return this.cmp(t)>=0},Z.isInteger=Z.isint=function(){return this.e>this.d.length-2},Z.isNegative=Z.isneg=function(){return this.s<0},Z.isPositive=Z.ispos=function(){return this.s>0},Z.isZero=function(){return this.s===0},Z.lessThan=Z.lt=function(t){return this.cmp(t)<0},Z.lessThanOrEqualTo=Z.lte=function(t){return this.cmp(t)<1},Z.logarithm=Z.log=function(t){var e,r=this,n=r.constructor,i=n.precision,a=i+5;if(t===void 0)t=new n(10);else if(t=new n(t),t.s<1||t.eq(At))throw Error(Dt+"NaN");if(r.s<1)throw Error(Dt+(r.s?"NaN":"-Infinity"));return r.eq(At)?new n(0):(Be=!1,e=br(Ra(r,a),Ra(t,a),a),Be=!0,ke(e,i))},Z.minus=Z.sub=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?pb(e,t):fb(e,(t.s=-t.s,t))},Z.modulo=Z.mod=function(t){var e,r=this,n=r.constructor,i=n.precision;if(t=new n(t),!t.s)throw Error(Dt+"NaN");return r.s?(Be=!1,e=br(r,t,0,1).times(t),Be=!0,r.minus(e)):ke(new n(r),i)},Z.naturalExponential=Z.exp=function(){return db(this)},Z.naturalLogarithm=Z.ln=function(){return Ra(this)},Z.negated=Z.neg=function(){var t=new this.constructor(this);return t.s=-t.s||0,t},Z.plus=Z.add=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?fb(e,t):pb(e,(t.s=-t.s,t))},Z.precision=Z.sd=function(t){var e,r,n,i=this;if(t!==void 0&&t!==!!t&&t!==1&&t!==0)throw Error(yn+t);if(e=Ve(i)+1,n=i.d.length-1,r=n*Le+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return t&&e>r?e:r},Z.squareRoot=Z.sqrt=function(){var t,e,r,n,i,a,o,s=this,u=s.constructor;if(s.s<1){if(!s.s)return new u(0);throw Error(Dt+"NaN")}for(t=Ve(s),Be=!1,i=Math.sqrt(+s),i==0||i==1/0?(e=ir(s.d),(e.length+t)%2==0&&(e+="0"),i=Math.sqrt(e),t=vi((t+1)/2)-(t<0||t%2),i==1/0?e="5e"+t:(e=i.toExponential(),e=e.slice(0,e.indexOf("e")+1)+t),n=new u(e)):n=new u(i.toString()),r=u.precision,i=o=r+3;;)if(a=n,n=a.plus(br(s,a,o+2)).times(.5),ir(a.d).slice(0,o)===(e=ir(n.d)).slice(0,o)){if(e=e.slice(o-3,o+1),i==o&&e=="4999"){if(ke(a,r+1,0),a.times(a).eq(s)){n=a;break}}else if(e!="9999")break;o+=4}return Be=!0,ke(n,r)},Z.times=Z.mul=function(t){var e,r,n,i,a,o,s,u,l,c=this,f=c.constructor,d=c.d,h=(t=new f(t)).d;if(!c.s||!t.s)return new f(0);for(t.s*=c.s,r=c.e+t.e,u=d.length,l=h.length,u<l&&(a=d,d=h,h=a,o=u,u=l,l=o),a=[],o=u+l,n=o;n--;)a.push(0);for(n=l;--n>=0;){for(e=0,i=u+n;i>n;)s=a[i]+h[n]*d[i-n-1]+e,a[i--]=s%rt|0,e=s/rt|0;a[i]=(a[i]+e)%rt|0}for(;!a[--o];)a.pop();return e?++r:a.shift(),t.d=a,t.e=r,Be?ke(t,f.precision):t},Z.toDecimalPlaces=Z.todp=function(t,e){var r=this,n=r.constructor;return r=new n(r),t===void 0?r:(nr(t,0,pi),e===void 0?e=n.rounding:nr(e,0,8),ke(r,t+Ve(r)+1,e))},Z.toExponential=function(t,e){var r,n=this,i=n.constructor;return t===void 0?r=mn(n,!0):(nr(t,0,pi),e===void 0?e=i.rounding:nr(e,0,8),n=ke(new i(n),t+1,e),r=mn(n,!0,t+1)),r},Z.toFixed=function(t,e){var r,n,i=this,a=i.constructor;return t===void 0?mn(i):(nr(t,0,pi),e===void 0?e=a.rounding:nr(e,0,8),n=ke(new a(i),t+Ve(i)+1,e),r=mn(n.abs(),!1,t+Ve(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)},Z.toInteger=Z.toint=function(){var t=this,e=t.constructor;return ke(new e(t),Ve(t)+1,e.rounding)},Z.toNumber=function(){return+this},Z.toPower=Z.pow=function(t){var e,r,n,i,a,o,s=this,u=s.constructor,l=12,c=+(t=new u(t));if(!t.s)return new u(At);if(s=new u(s),!s.s){if(t.s<1)throw Error(Dt+"Infinity");return s}if(s.eq(At))return s;if(n=u.precision,t.eq(At))return ke(s,n);if(e=t.e,r=t.d.length-1,o=e>=r,a=s.s,o){if((r=c<0?-c:c)<=cb){for(i=new u(At),e=Math.ceil(n/Le+4),Be=!1;r%2&&(i=i.times(s),vb(i.d,e)),r=vi(r/2),r!==0;)s=s.times(s),vb(s.d,e);return Be=!0,t.s<0?new u(At).div(i):ke(i,n)}}else if(a<0)throw Error(Dt+"NaN");return a=a<0&&t.d[Math.max(e,r)]&1?-1:1,s.s=1,Be=!1,i=t.times(Ra(s,n+l)),Be=!0,i=db(i),i.s=a,i},Z.toPrecision=function(t,e){var r,n,i=this,a=i.constructor;return t===void 0?(r=Ve(i),n=mn(i,r<=a.toExpNeg||r>=a.toExpPos)):(nr(t,1,pi),e===void 0?e=a.rounding:nr(e,0,8),i=ke(new a(i),t,e),r=Ve(i),n=mn(i,t<=r||r<=a.toExpNeg,t)),n},Z.toSignificantDigits=Z.tosd=function(t,e){var r=this,n=r.constructor;return t===void 0?(t=n.precision,e=n.rounding):(nr(t,1,pi),e===void 0?e=n.rounding:nr(e,0,8)),ke(new n(r),t,e)},Z.toString=Z.valueOf=Z.val=Z.toJSON=Z[Symbol.for("nodejs.util.inspect.custom")]=function(){var t=this,e=Ve(t),r=t.constructor;return mn(t,e<=r.toExpNeg||e>=r.toExpPos)};function fb(t,e){var r,n,i,a,o,s,u,l,c=t.constructor,f=c.precision;if(!t.s||!e.s)return e.s||(e=new c(t)),Be?ke(e,f):e;if(u=t.d,l=e.d,o=t.e,i=e.e,u=u.slice(),a=o-i,a){for(a<0?(n=u,a=-a,s=l.length):(n=l,i=o,s=u.length),o=Math.ceil(f/Le),s=o>s?o+1:s+1,a>s&&(a=s,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for(s=u.length,a=l.length,s-a<0&&(a=s,n=l,l=u,u=n),r=0;a;)r=(u[--a]=u[a]+l[a]+r)/rt|0,u[a]%=rt;for(r&&(u.unshift(r),++i),s=u.length;u[--s]==0;)u.pop();return e.d=u,e.e=i,Be?ke(e,f):e}function nr(t,e,r){if(t!==~~t||t<e||t>r)throw Error(yn+t)}function ir(t){var e,r,n,i=t.length-1,a="",o=t[0];if(i>0){for(a+=o,e=1;e<i;e++)n=t[e]+"",r=Le-n.length,r&&(a+=Br(r)),a+=n;o=t[e],n=o+"",r=Le-n.length,r&&(a+=Br(r))}else if(o===0)return"0";for(;o%10===0;)o/=10;return a+o}var br=function(){function t(n,i){var a,o=0,s=n.length;for(n=n.slice();s--;)a=n[s]*i+o,n[s]=a%rt|0,o=a/rt|0;return o&&n.unshift(o),n}function e(n,i,a,o){var s,u;if(a!=o)u=a>o?1:-1;else for(s=u=0;s<a;s++)if(n[s]!=i[s]){u=n[s]>i[s]?1:-1;break}return u}function r(n,i,a){for(var o=0;a--;)n[a]-=o,o=n[a]<i[a]?1:0,n[a]=o*rt+n[a]-i[a];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,a,o){var s,u,l,c,f,d,h,y,v,p,m,b,w,O,g,_,S,A,T=n.constructor,M=n.s==i.s?1:-1,$=n.d,j=i.d;if(!n.s)return new T(n);if(!i.s)throw Error(Dt+"Division by zero");for(u=n.e-i.e,S=j.length,g=$.length,h=new T(M),y=h.d=[],l=0;j[l]==($[l]||0);)++l;if(j[l]>($[l]||0)&&--u,a==null?b=a=T.precision:o?b=a+(Ve(n)-Ve(i))+1:b=a,b<0)return new T(0);if(b=b/Le+2|0,l=0,S==1)for(c=0,j=j[0],b++;(l<g||c)&&b--;l++)w=c*rt+($[l]||0),y[l]=w/j|0,c=w%j|0;else{for(c=rt/(j[0]+1)|0,c>1&&(j=t(j,c),$=t($,c),S=j.length,g=$.length),O=S,v=$.slice(0,S),p=v.length;p<S;)v[p++]=0;A=j.slice(),A.unshift(0),_=j[0],j[1]>=rt/2&&++_;do c=0,s=e(j,v,S,p),s<0?(m=v[0],S!=p&&(m=m*rt+(v[1]||0)),c=m/_|0,c>1?(c>=rt&&(c=rt-1),f=t(j,c),d=f.length,p=v.length,s=e(f,v,d,p),s==1&&(c--,r(f,S<d?A: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=e(j,v,S,p),s<1&&(c++,r(v,S<p?A:j,p))),p=v.length):s===0&&(c++,v=[0]),y[l++]=c,s&&v[0]?v[p++]=$[O]||0:(v=[$[O]],p=1);while((O++<g||v[0]!==void 0)&&b--)}return y[0]||y.shift(),h.e=u,ke(h,o?a+Ve(h)+1:a)}}();function db(t,e){var r,n,i,a,o,s,u=0,l=0,c=t.constructor,f=c.precision;if(Ve(t)>16)throw Error(Of+Ve(t));if(!t.s)return new c(At);for(e==null?(Be=!1,s=f):s=e,o=new c(.03125);t.abs().gte(.1);)t=t.times(o),l+=5;for(n=Math.log(gn(2,l))/Math.LN10*2+5|0,s+=n,r=i=a=new c(At),c.precision=s;;){if(i=ke(i.times(t),s),r=r.times(++u),o=a.plus(br(i,r,s)),ir(o.d).slice(0,s)===ir(a.d).slice(0,s)){for(;l--;)a=ke(a.times(a),s);return c.precision=f,e==null?(Be=!0,ke(a,f)):a}a=o}}function Ve(t){for(var e=t.e*Le,r=t.d[0];r>=10;r/=10)e++;return e}function Sf(t,e,r){if(e>t.LN10.sd())throw Be=!0,r&&(t.precision=r),Error(Dt+"LN10 precision limit exceeded");return ke(new t(t.LN10),e)}function Br(t){for(var e="";t--;)e+="0";return e}function Ra(t,e){var r,n,i,a,o,s,u,l,c,f=1,d=10,h=t,y=h.d,v=h.constructor,p=v.precision;if(h.s<1)throw Error(Dt+(h.s?"NaN":"-Infinity"));if(h.eq(At))return new v(0);if(e==null?(Be=!1,l=p):l=e,h.eq(10))return e==null&&(Be=!0),Sf(v,l);if(l+=d,v.precision=l,r=ir(y),n=r.charAt(0),a=Ve(h),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)h=h.times(t),r=ir(h.d),n=r.charAt(0),f++;a=Ve(h),n>1?(h=new v("0."+r),a++):h=new v(n+"."+r.slice(1))}else return u=Sf(v,l+2,p).times(a+""),h=Ra(new v(n+"."+r.slice(1)),l-d).plus(u),v.precision=p,e==null?(Be=!0,ke(h,p)):h;for(s=o=h=br(h.minus(At),h.plus(At),l),c=ke(h.times(h),l),i=3;;){if(o=ke(o.times(c),l),u=s.plus(br(o,new v(i),l)),ir(u.d).slice(0,l)===ir(s.d).slice(0,l))return s=s.times(2),a!==0&&(s=s.plus(Sf(v,l+2,p).times(a+""))),s=br(s,new v(f),l),v.precision=p,e==null?(Be=!0,ke(s,p)):s;s=u,i+=2}}function hb(t,e){var r,n,i;for((r=e.indexOf("."))>-1&&(e=e.replace(".","")),(n=e.search(/e/i))>0?(r<0&&(r=n),r+=+e.slice(n+1),e=e.substring(0,n)):r<0&&(r=e.length),n=0;e.charCodeAt(n)===48;)++n;for(i=e.length;e.charCodeAt(i-1)===48;)--i;if(e=e.slice(n,i),e){if(i-=n,r=r-n-1,t.e=vi(r/Le),t.d=[],n=(r+1)%Le,r<0&&(n+=Le),n<i){for(n&&t.d.push(+e.slice(0,n)),i-=Le;n<i;)t.d.push(+e.slice(n,n+=Le));e=e.slice(n),n=Le-e.length}else n-=i;for(;n--;)e+="0";if(t.d.push(+e),Be&&(t.e>Ks||t.e<-Ks))throw Error(Of+r)}else t.s=0,t.e=0,t.d=[0];return t}function ke(t,e,r){var n,i,a,o,s,u,l,c,f=t.d;for(o=1,a=f[0];a>=10;a/=10)o++;if(n=e-o,n<0)n+=Le,i=e,l=f[c=0];else{if(c=Math.ceil((n+1)/Le),a=f.length,c>=a)return t;for(l=a=f[c],o=1;a>=10;a/=10)o++;n%=Le,i=n-Le+o}if(r!==void 0&&(a=gn(10,o-i-1),s=l/a%10|0,u=e<0||f[c+1]!==void 0||l%a,u=r<4?(s||u)&&(r==0||r==(t.s<0?3:2)):s>5||s==5&&(r==4||u||r==6&&(n>0?i>0?l/gn(10,o-i):0:f[c-1])%10&1||r==(t.s<0?8:7))),e<1||!f[0])return u?(a=Ve(t),f.length=1,e=e-a-1,f[0]=gn(10,(Le-e%Le)%Le),t.e=vi(-e/Le)||0):(f.length=1,f[0]=t.e=t.s=0),t;if(n==0?(f.length=c,a=1,c--):(f.length=c+1,a=gn(10,Le-n),f[c]=i>0?(l/gn(10,o-i)%gn(10,i)|0)*a:0),u)for(;;)if(c==0){(f[0]+=a)==rt&&(f[0]=1,++t.e);break}else{if(f[c]+=a,f[c]!=rt)break;f[c--]=0,a=1}for(n=f.length;f[--n]===0;)f.pop();if(Be&&(t.e>Ks||t.e<-Ks))throw Error(Of+Ve(t));return t}function pb(t,e){var r,n,i,a,o,s,u,l,c,f,d=t.constructor,h=d.precision;if(!t.s||!e.s)return e.s?e.s=-e.s:e=new d(t),Be?ke(e,h):e;if(u=t.d,f=e.d,n=e.e,l=t.e,u=u.slice(),o=l-n,o){for(c=o<0,c?(r=u,o=-o,s=f.length):(r=f,n=l,s=u.length),i=Math.max(Math.ceil(h/Le),s)+2,o>i&&(o=i,r.length=1),r.reverse(),i=o;i--;)r.push(0);r.reverse()}else{for(i=u.length,s=f.length,c=i<s,c&&(s=i),i=0;i<s;i++)if(u[i]!=f[i]){c=u[i]<f[i];break}o=0}for(c&&(r=u,u=f,f=r,e.s=-e.s),s=u.length,i=f.length-s;i>0;--i)u[s++]=0;for(i=f.length;i>o;){if(u[--i]<f[i]){for(a=i;a&&u[--a]===0;)u[a]=rt-1;--u[a],u[i]+=rt}u[i]-=f[i]}for(;u[--s]===0;)u.pop();for(;u[0]===0;u.shift())--n;return u[0]?(e.d=u,e.e=n,Be?ke(e,h):e):new d(0)}function mn(t,e,r){var n,i=Ve(t),a=ir(t.d),o=a.length;return e?(r&&(n=r-o)>0?a=a.charAt(0)+"."+a.slice(1)+Br(n):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+Br(-i-1)+a,r&&(n=r-o)>0&&(a+=Br(n))):i>=o?(a+=Br(i+1-o),r&&(n=r-i-1)>0&&(a=a+"."+Br(n))):((n=i+1)<o&&(a=a.slice(0,n)+"."+a.slice(n)),r&&(n=r-o)>0&&(i+1===o&&(a+="."),a+=Br(n))),t.s<0?"-"+a:a}function vb(t,e){if(t.length>e)return t.length=e,!0}function yb(t){var e,r,n;function i(a){var o=this;if(!(o instanceof i))return new i(a);if(o.constructor=i,a instanceof i){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(yn+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return hb(o,a.toString())}else if(typeof a!="string")throw Error(yn+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,IF.test(a))hb(o,a);else throw Error(yn+a)}if(i.prototype=Z,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=yb,i.config=i.set=NF,t===void 0&&(t={}),t)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],e=0;e<n.length;)t.hasOwnProperty(r=n[e++])||(t[r]=this[r]);return i.config(t),i}function NF(t){if(!t||typeof t!="object")throw Error(Dt+"Object expected");var e,r,n,i=["precision",1,pi,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(e=0;e<i.length;e+=3)if((n=t[r=i[e]])!==void 0)if(vi(n)===n&&n>=i[e+1]&&n<=i[e+2])this[r]=n;else throw Error(yn+r+": "+n);if((n=t[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(yn+r+": "+n);return this}var Af=yb(CF);At=new Af(1);const $e=Af;function MF(t){return BF(t)||LF(t)||RF(t)||DF()}function DF(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
97
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
98
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
99
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
100
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
101
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function EW(t,e){if(t){if(typeof t=="string")return If(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return If(t,e)}}function TW(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function jW(t){if(Array.isArray(t))return If(t)}function If(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Cb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function qe(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Cb(Object(r),!0).forEach(function(n){gi(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Cb(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function gi(t,e,r){return e=$W(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function $W(t){var e=kW(t,"string");return Fa(e)=="symbol"?e:e+""}function kW(t,e){if(Fa(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Fa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function We(t,e,r){return fe(t)||fe(e)?r:Je(e)?xt(t,e,r):ae(e)?e(t):r}function Wa(t,e,r,n){var i=TF(t,function(s){return We(s,e)});if(r==="number"){var a=i.filter(function(s){return V(s)||parseFloat(s)});return a.length?[zs(a),Rr(a)]:[1/0,-1/0]}var o=n?i.filter(function(s){return!fe(s)}):i;return o.map(function(s){return Je(s)||s instanceof Date?s:""})}var CW=function(e){var r,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,a=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(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var u=a.range,l=0;l<s;l++){var c=l>0?i[l-1].coordinate:i[s-1].coordinate,f=i[l].coordinate,d=l>=s-1?i[0].coordinate:i[l+1].coordinate,h=void 0;if(ft(f-c)!==ft(d-f)){var y=[];if(ft(d-f)===ft(u[1]-u[0])){h=d;var v=f+u[1]-u[0];y[0]=Math.min(v,(v+c)/2),y[1]=Math.max(v,(v+c)/2)}else{h=c;var p=d+u[1]-u[0];y[0]=Math.min(f,(p+f)/2),y[1]=Math.max(f,(p+f)/2)}var m=[Math.min(f,(h+f)/2),Math.max(f,(h+f)/2)];if(e>m[0]&&e<=m[1]||e>=y[0]&&e<=y[1]){o=i[l].index;break}}else{var b=Math.min(c,d),w=Math.max(c,d);if(e>(b+f)/2&&e<=(w+f)/2){o=i[l].index;break}}}else for(var O=0;O<s;O++)if(O===0&&e<=(n[O].coordinate+n[O+1].coordinate)/2||O>0&&O<s-1&&e>(n[O].coordinate+n[O-1].coordinate)/2&&e<=(n[O].coordinate+n[O+1].coordinate)/2||O===s-1&&e>(n[O].coordinate+n[O-1].coordinate)/2){o=n[O].index;break}return o},Nf=function(e){var r,n=e,i=n.type.displayName,a=(r=e.type)!==null&&r!==void 0&&r.defaultProps?qe(qe({},e.type.defaultProps),e.props):e.props,o=a.stroke,s=a.fill,u;switch(i){case"Line":u=o;break;case"Area":case"Radar":u=o&&o!=="none"?o:s;break;default:u=s;break}return u},IW=function(e){var r=e.barSize,n=e.totalSize,i=e.stackGroups,a=i===void 0?{}:i;if(!a)return{};for(var o={},s=Object.keys(a),u=0,l=s.length;u<l;u++)for(var c=a[s[u]].stackGroups,f=Object.keys(c),d=0,h=f.length;d<h;d++){var y=c[f[d]],v=y.items,p=y.cateAxisId,m=v.filter(function(S){return fr(S.type).indexOf("Bar")>=0});if(m&&m.length){var b=m[0].type.defaultProps,w=b!==void 0?qe(qe({},b),m[0].props):m[0].props,O=w.barSize,g=w[p];o[g]||(o[g]=[]);var _=fe(O)?r:O;o[g].push({item:m[0],stackList:m.slice(1),barSize:fe(_)?void 0:dt(_,n,0)})}}return o},NW=function(e){var r=e.barGap,n=e.barCategoryGap,i=e.bandSize,a=e.sizeList,o=a===void 0?[]:a,s=e.maxBarSize,u=o.length;if(u<1)return null;var l=dt(r,i,0,!0),c,f=[];if(o[0].barSize===+o[0].barSize){var d=!1,h=i/u,y=o.reduce(function(O,g){return O+g.barSize||0},0);y+=(u-1)*l,y>=i&&(y-=(u-1)*l,l=0),y>=i&&h>0&&(d=!0,h*=.9,y=u*h);var v=(i-y)/2>>0,p={offset:v-l,size:0};c=o.reduce(function(O,g){var _={item:g.item,position:{offset:p.offset+p.size+l,size:d?h:g.barSize}},S=[].concat(kb(O),[_]);return p=S[S.length-1].position,g.stackList&&g.stackList.length&&g.stackList.forEach(function(A){S.push({item:A,position:p})}),S},f)}else{var m=dt(n,i,0,!0);i-2*m-(u-1)*l<=0&&(l=0);var b=(i-2*m-(u-1)*l)/u;b>1&&(b>>=0);var w=s===+s?Math.min(b,s):b;c=o.reduce(function(O,g,_){var S=[].concat(kb(O),[{item:g.item,position:{offset:m+(b+l)*_+(b-w)/2,size:w}}]);return g.stackList&&g.stackList.length&&g.stackList.forEach(function(A){S.push({item:A,position:S[S.length-1].position})}),S},f)}return c},MW=function(e,r,n,i){var a=n.children,o=n.width,s=n.margin,u=o-(s.left||0)-(s.right||0),l=$b({children:a,legendWidth:u});if(l){var c=i||{},f=c.width,d=c.height,h=l.align,y=l.verticalAlign,v=l.layout;if((v==="vertical"||v==="horizontal"&&y==="middle")&&h!=="center"&&V(e[h]))return qe(qe({},e),{},gi({},h,e[h]+(f||0)));if((v==="horizontal"||v==="vertical"&&h==="center")&&y!=="middle"&&V(e[y]))return qe(qe({},e),{},gi({},y,e[y]+(d||0)))}return e},DW=function(e,r,n){return fe(r)?!0:e==="horizontal"?r==="yAxis":e==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},Ib=function(e,r,n,i,a){var o=r.props.children,s=Ot(o,Ba).filter(function(l){return DW(i,a,l.props.direction)});if(s&&s.length){var u=s.map(function(l){return l.props.dataKey});return e.reduce(function(l,c){var f=We(c,n);if(fe(f))return l;var d=Array.isArray(f)?[zs(f),Rr(f)]:[f,f],h=u.reduce(function(y,v){var p=We(c,v,0),m=d[0]-Math.abs(Array.isArray(p)?p[0]:p),b=d[1]+Math.abs(Array.isArray(p)?p[1]:p);return[Math.min(m,y[0]),Math.max(b,y[1])]},[1/0,-1/0]);return[Math.min(h[0],l[0]),Math.max(h[1],l[1])]},[1/0,-1/0])}return null},RW=function(e,r,n,i,a){var o=r.map(function(s){return Ib(e,s,n,a,i)}).filter(function(s){return!fe(s)});return o&&o.length?o.reduce(function(s,u){return[Math.min(s[0],u[0]),Math.max(s[1],u[1])]},[1/0,-1/0]):null},Nb=function(e,r,n,i,a){var o=r.map(function(u){var l=u.props.dataKey;return n==="number"&&l&&Ib(e,u,l,i)||Wa(e,l,n,a)});if(n==="number")return o.reduce(function(u,l){return[Math.min(u[0],l[0]),Math.max(u[1],l[1])]},[1/0,-1/0]);var s={};return o.reduce(function(u,l){for(var c=0,f=l.length;c<f;c++)s[l[c]]||(s[l[c]]=!0,u.push(l[c]));return u},[])},Mb=function(e,r){return e==="horizontal"&&r==="xAxis"||e==="vertical"&&r==="yAxis"||e==="centric"&&r==="angleAxis"||e==="radial"&&r==="radiusAxis"},Db=function(e,r,n,i){if(i)return e.map(function(u){return u.coordinate});var a,o,s=e.map(function(u){return u.coordinate===r&&(a=!0),u.coordinate===n&&(o=!0),u.coordinate});return a||s.push(r),o||s.push(n),s},wr=function(e,r,n){if(!e)return null;var i=e.scale,a=e.duplicateDomain,o=e.type,s=e.range,u=e.realScaleType==="scaleBand"?i.bandwidth()/2:2,l=(r||n)&&o==="category"&&i.bandwidth?i.bandwidth()/u:0;if(l=e.axisType==="angleAxis"&&(s==null?void 0:s.length)>=2?ft(s[0]-s[1])*2*l:l,r&&(e.ticks||e.niceTicks)){var c=(e.ticks||e.niceTicks).map(function(f){var d=a?a.indexOf(f):f;return{coordinate:i(d)+l,value:f,offset:l}});return c.filter(function(f){return!Xn(f.coordinate)})}return e.isCategorical&&e.categoricalDomain?e.categoricalDomain.map(function(f,d){return{coordinate:i(f)+l,value:f,index:d,offset:l}}):i.ticks&&!n?i.ticks(e.tickCount).map(function(f){return{coordinate:i(f)+l,value:f,offset:l}}):i.domain().map(function(f,d){return{coordinate:i(f)+l,value:a?a[f]:f,index:d,offset:l}})},Mf=new WeakMap,Xs=function(e,r){if(typeof r!="function")return e;Mf.has(e)||Mf.set(e,new WeakMap);var n=Mf.get(e);if(n.has(r))return n.get(r);var i=function(){e.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,i),i},Rb=function(e,r,n){var i=e.scale,a=e.type,o=e.layout,s=e.axisType;if(i==="auto")return o==="radial"&&s==="radiusAxis"?{scale:Aa(),realScaleType:"band"}:o==="radial"&&s==="angleAxis"?{scale:Ns(),realScaleType:"linear"}:a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:Pa(),realScaleType:"point"}:a==="category"?{scale:Aa(),realScaleType:"band"}:{scale:Ns(),realScaleType:"linear"};if(rn(i)){var u="scale".concat(Zo(i));return{scale:(sb[u]||Pa)(),realScaleType:sb[u]?u:"point"}}return ae(i)?{scale:i}:{scale:Pa(),realScaleType:"point"}},Lb=1e-4,Bb=function(e){var r=e.domain();if(!(!r||r.length<=2)){var n=r.length,i=e.range(),a=Math.min(i[0],i[1])-Lb,o=Math.max(i[0],i[1])+Lb,s=e(r[0]),u=e(r[n-1]);(s<a||s>o||u<a||u>o)&&e.domain([r[0],r[n-1]])}},LW=function(e,r){if(!e)return null;for(var n=0,i=e.length;n<i;n++)if(e[n].item===r)return e[n].position;return null},BW=function(e,r){if(!r||r.length!==2||!V(r[0])||!V(r[1]))return e;var n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]),a=[e[0],e[1]];return(!V(e[0])||e[0]<n)&&(a[0]=n),(!V(e[1])||e[1]>i)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]<n&&(a[1]=n),a},UW=function(e){var r=e.length;if(!(r<=0))for(var n=0,i=e[0].length;n<i;++n)for(var a=0,o=0,s=0;s<r;++s){var u=Xn(e[s][n][1])?e[s][n][0]:e[s][n][1];u>=0?(e[s][n][0]=a,e[s][n][1]=a+u,a=e[s][n][1]):(e[s][n][0]=o,e[s][n][1]=o+u,o=e[s][n][1])}},FW=function(e){var r=e.length;if(!(r<=0))for(var n=0,i=e[0].length;n<i;++n)for(var a=0,o=0;o<r;++o){var s=Xn(e[o][n][1])?e[o][n][0]:e[o][n][1];s>=0?(e[o][n][0]=a,e[o][n][1]=a+s,a=e[o][n][1]):(e[o][n][0]=0,e[o][n][1]=0)}},WW={sign:UW,expand:s$,none:Zn,silhouette:u$,wiggle:l$,positive:FW},qW=function(e,r,n){var i=r.map(function(s){return s.props.dataKey}),a=WW[n],o=o$().keys(i).value(function(s,u){return+We(s,u,0)}).order(sc).offset(a);return o(e)},zW=function(e,r,n,i,a,o){if(!e)return null;var s=o?r.reverse():r,u={},l=s.reduce(function(f,d){var h,y=(h=d.type)!==null&&h!==void 0&&h.defaultProps?qe(qe({},d.type.defaultProps),d.props):d.props,v=y.stackId,p=y.hide;if(p)return f;var m=y[n],b=f[m]||{hasStack:!1,stackGroups:{}};if(Je(v)){var w=b.stackGroups[v]||{numericAxisId:n,cateAxisId:i,items:[]};w.items.push(d),b.hasStack=!0,b.stackGroups[v]=w}else b.stackGroups[an("_stackId_")]={numericAxisId:n,cateAxisId:i,items:[d]};return qe(qe({},f),{},gi({},m,b))},u),c={};return Object.keys(l).reduce(function(f,d){var h=l[d];if(h.hasStack){var y={};h.stackGroups=Object.keys(h.stackGroups).reduce(function(v,p){var m=h.stackGroups[p];return qe(qe({},v),{},gi({},p,{numericAxisId:n,cateAxisId:i,items:m.items,stackedData:qW(e,m.items,a)}))},y)}return qe(qe({},f),{},gi({},d,h))},c)},Ub=function(e,r){var n=r.realScaleType,i=r.type,a=r.tickCount,o=r.originalDomain,s=r.allowDecimals,u=n||r.scale;if(u!=="auto"&&u!=="linear")return null;if(a&&i==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var l=e.domain();if(!l.length)return null;var c=iW(l,a,s);return e.domain([zs(c),Rr(c)]),{niceTicks:c}}if(a&&i==="number"){var f=e.domain(),d=aW(f,a,s);return{niceTicks:d}}return null};function Js(t){var e=t.axis,r=t.ticks,n=t.bandSize,i=t.entry,a=t.index,o=t.dataKey;if(e.type==="category"){if(!e.allowDuplicatedCategory&&e.dataKey&&!fe(i[e.dataKey])){var s=Xo(r,"value",i[e.dataKey]);if(s)return s.coordinate+n/2}return r[a]?r[a].coordinate+n/2:null}var u=We(i,fe(o)?e.dataKey:o);return fe(u)?null:e.scale(u)}var Fb=function(e){var r=e.axis,n=e.ticks,i=e.offset,a=e.bandSize,o=e.entry,s=e.index;if(r.type==="category")return n[s]?n[s].coordinate+i:null;var u=We(o,r.dataKey,r.domain[s]);return fe(u)?null:r.scale(u)-a/2+i},KW=function(e){var r=e.numericAxis,n=r.scale.domain();if(r.type==="number"){var i=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]);return i<=0&&a>=0?0:a<0?a:i}return n[0]},VW=function(e,r){var n,i=(n=e.type)!==null&&n!==void 0&&n.defaultProps?qe(qe({},e.type.defaultProps),e.props):e.props,a=i.stackId;if(Je(a)){var o=r[a];if(o){var s=o.items.indexOf(e);return s>=0?o.stackedData[s]:null}}return null},HW=function(e){return e.reduce(function(r,n){return[zs(n.concat([r[0]]).filter(V)),Rr(n.concat([r[1]]).filter(V))]},[1/0,-1/0])},Wb=function(e,r,n){return Object.keys(e).reduce(function(i,a){var o=e[a],s=o.stackedData,u=s.reduce(function(l,c){var f=HW(c.slice(r,n+1));return[Math.min(l[0],f[0]),Math.max(l[1],f[1])]},[1/0,-1/0]);return[Math.min(u[0],i[0]),Math.max(u[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},qb=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,zb=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Df=function(e,r,n){if(ae(e))return e(r,n);if(!Array.isArray(e))return r;var i=[];if(V(e[0]))i[0]=n?e[0]:Math.min(e[0],r[0]);else if(qb.test(e[0])){var a=+qb.exec(e[0])[1];i[0]=r[0]-a}else ae(e[0])?i[0]=e[0](r[0]):i[0]=r[0];if(V(e[1]))i[1]=n?e[1]:Math.max(e[1],r[1]);else if(zb.test(e[1])){var o=+zb.exec(e[1])[1];i[1]=r[1]+o}else ae(e[1])?i[1]=e[1](r[1]):i[1]=r[1];return i},Zs=function(e,r,n){if(e&&e.scale&&e.scale.bandwidth){var i=e.scale.bandwidth();if(!n||i>0)return i}if(e&&r&&r.length>=2){for(var a=jc(r,function(f){return f.coordinate}),o=1/0,s=1,u=a.length;s<u;s++){var l=a[s],c=a[s-1];o=Math.min((l.coordinate||0)-(c.coordinate||0),o)}return o===1/0?0:o}return n?void 0:0},Kb=function(e,r,n){return!e||!e.length||Lr(e,xt(n,"type.defaultProps.domain"))?r:e},Vb=function(e,r){var n=e.type.defaultProps?qe(qe({},e.type.defaultProps),e.props):e.props,i=n.dataKey,a=n.name,o=n.unit,s=n.formatter,u=n.tooltipType,l=n.chartType,c=n.hide;return qe(qe({},Q(e,!1)),{},{dataKey:i,unit:o,formatter:s,name:a||i,color:Nf(e),value:We(r,i),type:u,payload:r,chartType:l,hide:c})};function qa(t){"@babel/helpers - typeof";return qa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qa(t)}function Hb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function _r(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Hb(Object(r),!0).forEach(function(n){Gb(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Hb(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Gb(t,e,r){return e=GW(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function GW(t){var e=YW(t,"string");return qa(e)=="symbol"?e:e+""}function YW(t,e){if(qa(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(qa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function XW(t,e){return eq(t)||QW(t,e)||ZW(t,e)||JW()}function JW(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
102
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
103
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
94
|
+
height and width.`,R,M,o,u,c,f,r);var L=!Array.isArray(h)&&fr(h.type).endsWith("Chart");return x.Children.map(h,function(q){return x.isValidElement(q)?x.cloneElement(q,bs({width:R,height:M},L?{style:bs({height:"100%",width:"100%",maxHeight:M,maxWidth:R},q.props.style)}:{})):q})},[r,h,u,d,f,c,E,o]);return x.createElement("div",{id:p?"".concat(p):void 0,className:le("recharts-responsive-container",m),style:bs(bs({},O),{},{width:o,height:u,minWidth:c,minHeight:f,maxHeight:d}),ref:g},$)}),ws=function(e){return null};ws.displayName="Cell";function wa(t){"@babel/helpers - typeof";return wa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wa(t)}function Tg(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Dc(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Tg(Object(r),!0).forEach(function(n){e2(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Tg(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function e2(t,e,r){return e=t2(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function t2(t){var e=r2(t,"string");return wa(e)=="symbol"?e:e+""}function r2(t,e){if(wa(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(wa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var oi={widthCache:{},cacheCount:0},n2=2e3,i2={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},jg="recharts_measurement_span";function a2(t){var e=Dc({},t);return Object.keys(e).forEach(function(r){e[r]||delete e[r]}),e}var _a=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e==null||It.isSsr)return{width:0,height:0};var n=a2(r),i=JSON.stringify({text:e,copyStyle:n});if(oi.widthCache[i])return oi.widthCache[i];try{var a=document.getElementById(jg);a||(a=document.createElement("span"),a.setAttribute("id",jg),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=Dc(Dc({},i2),n);Object.assign(a.style,o),a.textContent="".concat(e);var s=a.getBoundingClientRect(),u={width:s.width,height:s.height};return oi.widthCache[i]=u,++oi.cacheCount>n2&&(oi.cacheCount=0,oi.widthCache={}),u}catch{return{width:0,height:0}}},o2=function(e){return{top:e.top+window.scrollY-document.documentElement.clientTop,left:e.left+window.scrollX-document.documentElement.clientLeft}};function xa(t){"@babel/helpers - typeof";return xa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xa(t)}function _s(t,e){return c2(t)||l2(t,e)||u2(t,e)||s2()}function s2(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
95
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function u2(t,e){if(t){if(typeof t=="string")return $g(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return $g(t,e)}}function $g(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function l2(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,o,s=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(c){l=!0,i=c}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function c2(t){if(Array.isArray(t))return t}function f2(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function kg(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,h2(n.key),n)}}function d2(t,e,r){return e&&kg(t.prototype,e),r&&kg(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function h2(t){var e=p2(t,"string");return xa(e)=="symbol"?e:e+""}function p2(t,e){if(xa(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(xa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var Cg=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Ig=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,v2=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,y2=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,Ng={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},g2=Object.keys(Ng),si="NaN";function m2(t,e){return t*Ng[e]}var xs=function(){function t(e,r){f2(this,t),this.num=e,this.unit=r,this.num=e,this.unit=r,Number.isNaN(e)&&(this.unit=""),r!==""&&!v2.test(r)&&(this.num=NaN,this.unit=""),g2.includes(r)&&(this.num=m2(e,r),this.unit="px")}return d2(t,[{key:"add",value:function(r){return this.unit!==r.unit?new t(NaN,""):new t(this.num+r.num,this.unit)}},{key:"subtract",value:function(r){return this.unit!==r.unit?new t(NaN,""):new t(this.num-r.num,this.unit)}},{key:"multiply",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new t(NaN,""):new t(this.num*r.num,this.unit||r.unit)}},{key:"divide",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new t(NaN,""):new t(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,i=(n=y2.exec(r))!==null&&n!==void 0?n:[],a=_s(i,3),o=a[1],s=a[2];return new t(parseFloat(o),s??"")}}])}();function Mg(t){if(t.includes(si))return si;for(var e=t;e.includes("*")||e.includes("/");){var r,n=(r=Cg.exec(e))!==null&&r!==void 0?r:[],i=_s(n,4),a=i[1],o=i[2],s=i[3],u=xs.parse(a??""),l=xs.parse(s??""),c=o==="*"?u.multiply(l):u.divide(l);if(c.isNaN())return si;e=e.replace(Cg,c.toString())}for(;e.includes("+")||/.-\d+(?:\.\d+)?/.test(e);){var f,d=(f=Ig.exec(e))!==null&&f!==void 0?f:[],h=_s(d,4),y=h[1],v=h[2],p=h[3],m=xs.parse(y??""),b=xs.parse(p??""),w=v==="+"?m.add(b):m.subtract(b);if(w.isNaN())return si;e=e.replace(Ig,w.toString())}return e}var Dg=/\(([^()]*)\)/;function b2(t){for(var e=t;e.includes("(");){var r=Dg.exec(e),n=_s(r,2),i=n[1];e=e.replace(Dg,Mg(i))}return e}function w2(t){var e=t.replace(/\s+/g,"");return e=b2(e),e=Mg(e),e}function _2(t){try{return w2(t)}catch{return si}}function Rc(t){var e=_2(t.slice(5,-1));return e===si?"":e}var x2=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],O2=["dx","dy","angle","className","breakAll"];function Lc(){return Lc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Lc.apply(this,arguments)}function Rg(t,e){if(t==null)return{};var r=S2(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function S2(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function Lg(t,e){return T2(t)||E2(t,e)||P2(t,e)||A2()}function A2(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
96
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function P2(t,e){if(t){if(typeof t=="string")return Bg(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Bg(t,e)}}function Bg(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function E2(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,o,s=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(c){l=!0,i=c}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function T2(t){if(Array.isArray(t))return t}var Ug=/[ \f\n\r\t\v\u2028\u2029]+/,Fg=function(e){var r=e.children,n=e.breakAll,i=e.style;try{var a=[];fe(r)||(n?a=r.toString().split(""):a=r.toString().split(Ug));var o=a.map(function(u){return{word:u,width:_a(u,i).width}}),s=n?0:_a(" ",i).width;return{wordsWithComputedWidth:o,spaceWidth:s}}catch{return null}},j2=function(e,r,n,i,a){var o=e.maxLines,s=e.children,u=e.style,l=e.breakAll,c=V(o),f=s,d=function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return R.reduce(function(M,L){var q=L.word,z=L.width,D=M[M.length-1];if(D&&(i==null||a||D.width+z+n<Number(i)))D.words.push(q),D.width+=z+n;else{var B={words:[q],width:z};M.push(B)}return M},[])},h=d(r),y=function(R){return R.reduce(function(M,L){return M.width>L.width?M:L})};if(!c)return h;for(var v="…",p=function(R){var M=f.slice(0,R),L=Fg({breakAll:l,style:u,children:M+v}).wordsWithComputedWidth,q=d(L),z=q.length>o||y(q).width>Number(i);return[z,q]},m=0,b=f.length-1,w=0,O;m<=b&&w<=f.length-1;){var g=Math.floor((m+b)/2),_=g-1,S=p(_),A=Lg(S,2),E=A[0],N=A[1],j=p(g),$=Lg(j,1),k=$[0];if(!E&&!k&&(m=g+1),E&&k&&(b=g-1),!E&&k){O=N;break}w++}return O||h},Wg=function(e){var r=fe(e)?[]:e.toString().split(Ug);return[{words:r}]},$2=function(e){var r=e.width,n=e.scaleToFit,i=e.children,a=e.style,o=e.breakAll,s=e.maxLines;if((r||n)&&!It.isSsr){var u,l,c=Fg({breakAll:o,children:i,style:a});if(c){var f=c.wordsWithComputedWidth,d=c.spaceWidth;u=f,l=d}else return Wg(i);return j2({breakAll:o,children:i,maxLines:s,style:a},u,l,r,n)}return Wg(i)},qg="#808080",cn=function(e){var r=e.x,n=r===void 0?0:r,i=e.y,a=i===void 0?0:i,o=e.lineHeight,s=o===void 0?"1em":o,u=e.capHeight,l=u===void 0?"0.71em":u,c=e.scaleToFit,f=c===void 0?!1:c,d=e.textAnchor,h=d===void 0?"start":d,y=e.verticalAnchor,v=y===void 0?"end":y,p=e.fill,m=p===void 0?qg:p,b=Rg(e,x2),w=x.useMemo(function(){return $2({breakAll:b.breakAll,children:b.children,maxLines:b.maxLines,scaleToFit:f,style:b.style,width:b.width})},[b.breakAll,b.children,b.maxLines,f,b.style,b.width]),O=b.dx,g=b.dy,_=b.angle,S=b.className,A=b.breakAll,E=Rg(b,O2);if(!Je(n)||!Je(a))return null;var N=n+(V(O)?O:0),j=a+(V(g)?g:0),$;switch(v){case"start":$=Rc("calc(".concat(l,")"));break;case"middle":$=Rc("calc(".concat((w.length-1)/2," * -").concat(s," + (").concat(l," / 2))"));break;default:$=Rc("calc(".concat(w.length-1," * -").concat(s,")"));break}var k=[];if(f){var I=w[0].width,R=b.width;k.push("scale(".concat((V(R)?R/I:1)/I,")"))}return _&&k.push("rotate(".concat(_,", ").concat(N,", ").concat(j,")")),k.length&&(E.transform=k.join(" ")),x.createElement("text",Lc({},Q(E,!0),{x:N,y:j,className:le("recharts-text",S),textAnchor:h,fill:m.includes("url")?qg:m}),w.map(function(M,L){var q=M.words.join(A?"":" ");return x.createElement("tspan",{x:N,dy:L===0?$:s,key:"".concat(q,"-").concat(L)},q)}))};function Ir(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function k2(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Bc(t){let e,r,n;t.length!==2?(e=Ir,r=(s,u)=>Ir(t(s),u),n=(s,u)=>t(s)-u):(e=t===Ir||t===k2?t:C2,r=t,n=t);function i(s,u,l=0,c=s.length){if(l<c){if(e(u,u)!==0)return c;do{const f=l+c>>>1;r(s[f],u)<0?l=f+1:c=f}while(l<c)}return l}function a(s,u,l=0,c=s.length){if(l<c){if(e(u,u)!==0)return c;do{const f=l+c>>>1;r(s[f],u)<=0?l=f+1:c=f}while(l<c)}return l}function o(s,u,l=0,c=s.length){const f=i(s,u,l,c-1);return f>l&&n(s[f-1],u)>-n(s[f],u)?f-1:f}return{left:i,center:o,right:a}}function C2(){return 0}function zg(t){return t===null?NaN:+t}function*I2(t,e){for(let r of t)r!=null&&(r=+r)>=r&&(yield r)}const Oa=Bc(Ir).right;Bc(zg).center;class Kg extends Map{constructor(e,r=D2){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),e!=null)for(const[n,i]of e)this.set(n,i)}get(e){return super.get(Vg(this,e))}has(e){return super.has(Vg(this,e))}set(e,r){return super.set(N2(this,e),r)}delete(e){return super.delete(M2(this,e))}}function Vg({_intern:t,_key:e},r){const n=e(r);return t.has(n)?t.get(n):r}function N2({_intern:t,_key:e},r){const n=e(r);return t.has(n)?t.get(n):(t.set(n,r),r)}function M2({_intern:t,_key:e},r){const n=e(r);return t.has(n)&&(r=t.get(n),t.delete(n)),r}function D2(t){return t!==null&&typeof t=="object"?t.valueOf():t}function R2(t=Ir){if(t===Ir)return Hg;if(typeof t!="function")throw new TypeError("compare is not a function");return(e,r)=>{const n=t(e,r);return n||n===0?n:(t(r,r)===0)-(t(e,e)===0)}}function Hg(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}const L2=Math.sqrt(50),B2=Math.sqrt(10),U2=Math.sqrt(2);function Os(t,e,r){const n=(e-t)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),o=a>=L2?10:a>=B2?5:a>=U2?2:1;let s,u,l;return i<0?(l=Math.pow(10,-i)/o,s=Math.round(t*l),u=Math.round(e*l),s/l<t&&++s,u/l>e&&--u,l=-l):(l=Math.pow(10,i)*o,s=Math.round(t/l),u=Math.round(e/l),s*l<t&&++s,u*l>e&&--u),u<s&&.5<=r&&r<2?Os(t,e,r*2):[s,u,l]}function Uc(t,e,r){if(e=+e,t=+t,r=+r,!(r>0))return[];if(t===e)return[t];const n=e<t,[i,a,o]=n?Os(e,t,r):Os(t,e,r);if(!(a>=i))return[];const s=a-i+1,u=new Array(s);if(n)if(o<0)for(let l=0;l<s;++l)u[l]=(a-l)/-o;else for(let l=0;l<s;++l)u[l]=(a-l)*o;else if(o<0)for(let l=0;l<s;++l)u[l]=(i+l)/-o;else for(let l=0;l<s;++l)u[l]=(i+l)*o;return u}function Fc(t,e,r){return e=+e,t=+t,r=+r,Os(t,e,r)[2]}function Wc(t,e,r){e=+e,t=+t,r=+r;const n=e<t,i=n?Fc(e,t,r):Fc(t,e,r);return(n?-1:1)*(i<0?1/-i:i)}function Gg(t,e){let r;for(const n of t)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function Yg(t,e){let r;for(const n of t)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function Xg(t,e,r=0,n=1/0,i){if(e=Math.floor(e),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(t.length-1,n)),!(r<=e&&e<=n))return t;for(i=i===void 0?Hg:R2(i);n>r;){if(n-r>600){const u=n-r+1,l=e-r+1,c=Math.log(u),f=.5*Math.exp(2*c/3),d=.5*Math.sqrt(c*f*(u-f)/u)*(l-u/2<0?-1:1),h=Math.max(r,Math.floor(e-l*f/u+d)),y=Math.min(n,Math.floor(e+(u-l)*f/u+d));Xg(t,e,h,y,i)}const a=t[e];let o=r,s=n;for(Sa(t,r,e),i(t[n],a)>0&&Sa(t,r,n);o<s;){for(Sa(t,o,s),++o,--s;i(t[o],a)<0;)++o;for(;i(t[s],a)>0;)--s}i(t[r],a)===0?Sa(t,r,s):(++s,Sa(t,s,n)),s<=e&&(r=s+1),e<=s&&(n=s-1)}return t}function Sa(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function F2(t,e,r){if(t=Float64Array.from(I2(t)),!(!(n=t.length)||isNaN(e=+e))){if(e<=0||n<2)return Yg(t);if(e>=1)return Gg(t);var n,i=(n-1)*e,a=Math.floor(i),o=Gg(Xg(t,a).subarray(0,a+1)),s=Yg(t.subarray(a+1));return o+(s-o)*(i-a)}}function W2(t,e,r=zg){if(!(!(n=t.length)||isNaN(e=+e))){if(e<=0||n<2)return+r(t[0],0,t);if(e>=1)return+r(t[n-1],n-1,t);var n,i=(n-1)*e,a=Math.floor(i),o=+r(t[a],a,t),s=+r(t[a+1],a+1,t);return o+(s-o)*(i-a)}}function q2(t,e,r){t=+t,e=+e,r=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((e-t)/r))|0,a=new Array(i);++n<i;)a[n]=t+n*r;return a}function Nt(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function hr(t,e){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}const qc=Symbol("implicit");function zc(){var t=new Kg,e=[],r=[],n=qc;function i(a){let o=t.get(a);if(o===void 0){if(n!==qc)return n;t.set(a,o=e.push(a)-1)}return r[o%r.length]}return i.domain=function(a){if(!arguments.length)return e.slice();e=[],t=new Kg;for(const o of a)t.has(o)||t.set(o,e.push(o)-1);return i},i.range=function(a){return arguments.length?(r=Array.from(a),i):r.slice()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return zc(e,r).unknown(n)},Nt.apply(i,arguments),i}function Aa(){var t=zc().unknown(void 0),e=t.domain,r=t.range,n=0,i=1,a,o,s=!1,u=0,l=0,c=.5;delete t.unknown;function f(){var d=e().length,h=i<n,y=h?i:n,v=h?n:i;a=(v-y)/Math.max(1,d-u+l*2),s&&(a=Math.floor(a)),y+=(v-y-a*(d-u))*c,o=a*(1-u),s&&(y=Math.round(y),o=Math.round(o));var p=q2(d).map(function(m){return y+a*m});return r(h?p.reverse():p)}return t.domain=function(d){return arguments.length?(e(d),f()):e()},t.range=function(d){return arguments.length?([n,i]=d,n=+n,i=+i,f()):[n,i]},t.rangeRound=function(d){return[n,i]=d,n=+n,i=+i,s=!0,f()},t.bandwidth=function(){return o},t.step=function(){return a},t.round=function(d){return arguments.length?(s=!!d,f()):s},t.padding=function(d){return arguments.length?(u=Math.min(1,l=+d),f()):u},t.paddingInner=function(d){return arguments.length?(u=Math.min(1,d),f()):u},t.paddingOuter=function(d){return arguments.length?(l=+d,f()):l},t.align=function(d){return arguments.length?(c=Math.max(0,Math.min(1,d)),f()):c},t.copy=function(){return Aa(e(),[n,i]).round(s).paddingInner(u).paddingOuter(l).align(c)},Nt.apply(f(),arguments)}function Jg(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Jg(e())},t}function Pa(){return Jg(Aa.apply(null,arguments).paddingInner(1))}function Kc(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function Zg(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}function Ea(){}var Ta=.7,Ss=1/Ta,ui="\\s*([+-]?\\d+)\\s*",ja="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",rr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",z2=/^#([0-9a-f]{3,8})$/,K2=new RegExp(`^rgb\\(${ui},${ui},${ui}\\)$`),V2=new RegExp(`^rgb\\(${rr},${rr},${rr}\\)$`),H2=new RegExp(`^rgba\\(${ui},${ui},${ui},${ja}\\)$`),G2=new RegExp(`^rgba\\(${rr},${rr},${rr},${ja}\\)$`),Y2=new RegExp(`^hsl\\(${ja},${rr},${rr}\\)$`),X2=new RegExp(`^hsla\\(${ja},${rr},${rr},${ja}\\)$`),Qg={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};Kc(Ea,$a,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:em,formatHex:em,formatHex8:J2,formatHsl:Z2,formatRgb:tm,toString:tm});function em(){return this.rgb().formatHex()}function J2(){return this.rgb().formatHex8()}function Z2(){return om(this).formatHsl()}function tm(){return this.rgb().formatRgb()}function $a(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=z2.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?rm(e):r===3?new gt(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?As(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?As(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=K2.exec(t))?new gt(e[1],e[2],e[3],1):(e=V2.exec(t))?new gt(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=H2.exec(t))?As(e[1],e[2],e[3],e[4]):(e=G2.exec(t))?As(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Y2.exec(t))?am(e[1],e[2]/100,e[3]/100,1):(e=X2.exec(t))?am(e[1],e[2]/100,e[3]/100,e[4]):Qg.hasOwnProperty(t)?rm(Qg[t]):t==="transparent"?new gt(NaN,NaN,NaN,0):null}function rm(t){return new gt(t>>16&255,t>>8&255,t&255,1)}function As(t,e,r,n){return n<=0&&(t=e=r=NaN),new gt(t,e,r,n)}function Q2(t){return t instanceof Ea||(t=$a(t)),t?(t=t.rgb(),new gt(t.r,t.g,t.b,t.opacity)):new gt}function Vc(t,e,r,n){return arguments.length===1?Q2(t):new gt(t,e,r,n??1)}function gt(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}Kc(gt,Vc,Zg(Ea,{brighter(t){return t=t==null?Ss:Math.pow(Ss,t),new gt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Ta:Math.pow(Ta,t),new gt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new gt(fn(this.r),fn(this.g),fn(this.b),Ps(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:nm,formatHex:nm,formatHex8:eB,formatRgb:im,toString:im}));function nm(){return`#${dn(this.r)}${dn(this.g)}${dn(this.b)}`}function eB(){return`#${dn(this.r)}${dn(this.g)}${dn(this.b)}${dn((isNaN(this.opacity)?1:this.opacity)*255)}`}function im(){const t=Ps(this.opacity);return`${t===1?"rgb(":"rgba("}${fn(this.r)}, ${fn(this.g)}, ${fn(this.b)}${t===1?")":`, ${t})`}`}function Ps(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function fn(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function dn(t){return t=fn(t),(t<16?"0":"")+t.toString(16)}function am(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new Vt(t,e,r,n)}function om(t){if(t instanceof Vt)return new Vt(t.h,t.s,t.l,t.opacity);if(t instanceof Ea||(t=$a(t)),!t)return new Vt;if(t instanceof Vt)return t;t=t.rgb();var e=t.r/255,r=t.g/255,n=t.b/255,i=Math.min(e,r,n),a=Math.max(e,r,n),o=NaN,s=a-i,u=(a+i)/2;return s?(e===a?o=(r-n)/s+(r<n)*6:r===a?o=(n-e)/s+2:o=(e-r)/s+4,s/=u<.5?a+i:2-a-i,o*=60):s=u>0&&u<1?0:o,new Vt(o,s,u,t.opacity)}function tB(t,e,r,n){return arguments.length===1?om(t):new Vt(t,e,r,n??1)}function Vt(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}Kc(Vt,tB,Zg(Ea,{brighter(t){return t=t==null?Ss:Math.pow(Ss,t),new Vt(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Ta:Math.pow(Ta,t),new Vt(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,i=2*r-n;return new gt(Hc(t>=240?t-240:t+120,i,n),Hc(t,i,n),Hc(t<120?t+240:t-120,i,n),this.opacity)},clamp(){return new Vt(sm(this.h),Es(this.s),Es(this.l),Ps(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Ps(this.opacity);return`${t===1?"hsl(":"hsla("}${sm(this.h)}, ${Es(this.s)*100}%, ${Es(this.l)*100}%${t===1?")":`, ${t})`}`}}));function sm(t){return t=(t||0)%360,t<0?t+360:t}function Es(t){return Math.max(0,Math.min(1,t||0))}function Hc(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}const Gc=t=>()=>t;function rB(t,e){return function(r){return t+r*e}}function nB(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}function iB(t){return(t=+t)==1?um:function(e,r){return r-e?nB(e,r,t):Gc(isNaN(e)?r:e)}}function um(t,e){var r=e-t;return r?rB(t,r):Gc(isNaN(t)?e:t)}const lm=function t(e){var r=iB(e);function n(i,a){var o=r((i=Vc(i)).r,(a=Vc(a)).r),s=r(i.g,a.g),u=r(i.b,a.b),l=um(i.opacity,a.opacity);return function(c){return i.r=o(c),i.g=s(c),i.b=u(c),i.opacity=l(c),i+""}}return n.gamma=t,n}(1);function aB(t,e){e||(e=[]);var r=t?Math.min(e.length,t.length):0,n=e.slice(),i;return function(a){for(i=0;i<r;++i)n[i]=t[i]*(1-a)+e[i]*a;return n}}function oB(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function sB(t,e){var r=e?e.length:0,n=t?Math.min(r,t.length):0,i=new Array(n),a=new Array(r),o;for(o=0;o<n;++o)i[o]=li(t[o],e[o]);for(;o<r;++o)a[o]=e[o];return function(s){for(o=0;o<n;++o)a[o]=i[o](s);return a}}function uB(t,e){var r=new Date;return t=+t,e=+e,function(n){return r.setTime(t*(1-n)+e*n),r}}function Ts(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}function lB(t,e){var r={},n={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?r[i]=li(t[i],e[i]):n[i]=e[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var Yc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Xc=new RegExp(Yc.source,"g");function cB(t){return function(){return t}}function fB(t){return function(e){return t(e)+""}}function dB(t,e){var r=Yc.lastIndex=Xc.lastIndex=0,n,i,a,o=-1,s=[],u=[];for(t=t+"",e=e+"";(n=Yc.exec(t))&&(i=Xc.exec(e));)(a=i.index)>r&&(a=e.slice(r,a),s[o]?s[o]+=a:s[++o]=a),(n=n[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,u.push({i:o,x:Ts(n,i)})),r=Xc.lastIndex;return r<e.length&&(a=e.slice(r),s[o]?s[o]+=a:s[++o]=a),s.length<2?u[0]?fB(u[0].x):cB(e):(e=u.length,function(l){for(var c=0,f;c<e;++c)s[(f=u[c]).i]=f.x(l);return s.join("")})}function li(t,e){var r=typeof e,n;return e==null||r==="boolean"?Gc(e):(r==="number"?Ts:r==="string"?(n=$a(e))?(e=n,lm):dB:e instanceof $a?lm:e instanceof Date?uB:oB(e)?aB:Array.isArray(e)?sB:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?lB:Ts)(t,e)}function Jc(t,e){return t=+t,e=+e,function(r){return Math.round(t*(1-r)+e*r)}}function hB(t,e){e===void 0&&(e=t,t=li);for(var r=0,n=e.length-1,i=e[0],a=new Array(n<0?0:n);r<n;)a[r]=t(i,i=e[++r]);return function(o){var s=Math.max(0,Math.min(n-1,Math.floor(o*=n)));return a[s](o-s)}}function pB(t){return function(){return t}}function js(t){return+t}var cm=[0,1];function ht(t){return t}function Zc(t,e){return(e-=t=+t)?function(r){return(r-t)/e}:pB(isNaN(e)?NaN:.5)}function vB(t,e){var r;return t>e&&(r=t,t=e,e=r),function(n){return Math.max(t,Math.min(e,n))}}function yB(t,e,r){var n=t[0],i=t[1],a=e[0],o=e[1];return i<n?(n=Zc(i,n),a=r(o,a)):(n=Zc(n,i),a=r(a,o)),function(s){return a(n(s))}}function gB(t,e,r){var n=Math.min(t.length,e.length)-1,i=new Array(n),a=new Array(n),o=-1;for(t[n]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<n;)i[o]=Zc(t[o],t[o+1]),a[o]=r(e[o],e[o+1]);return function(s){var u=Oa(t,s,1,n)-1;return a[u](i[u](s))}}function ka(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function $s(){var t=cm,e=cm,r=li,n,i,a,o=ht,s,u,l;function c(){var d=Math.min(t.length,e.length);return o!==ht&&(o=vB(t[0],t[d-1])),s=d>2?gB:yB,u=l=null,f}function f(d){return d==null||isNaN(d=+d)?a:(u||(u=s(t.map(n),e,r)))(n(o(d)))}return f.invert=function(d){return o(i((l||(l=s(e,t.map(n),Ts)))(d)))},f.domain=function(d){return arguments.length?(t=Array.from(d,js),c()):t.slice()},f.range=function(d){return arguments.length?(e=Array.from(d),c()):e.slice()},f.rangeRound=function(d){return e=Array.from(d),r=Jc,c()},f.clamp=function(d){return arguments.length?(o=d?!0:ht,c()):o!==ht},f.interpolate=function(d){return arguments.length?(r=d,c()):r},f.unknown=function(d){return arguments.length?(a=d,f):a},function(d,h){return n=d,i=h,c()}}function Qc(){return $s()(ht,ht)}function mB(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function ks(t,e){if((r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var r,n=t.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+t.slice(r+1)]}function ci(t){return t=ks(Math.abs(t)),t?t[1]:NaN}function bB(t,e){return function(r,n){for(var i=r.length,a=[],o=0,s=t[0],u=0;i>0&&s>0&&(u+s+1>n&&(s=Math.max(1,n-u)),a.push(r.substring(i-=s,i+s)),!((u+=s+1)>n));)s=t[o=(o+1)%t.length];return a.reverse().join(e)}}function wB(t){return function(e){return e.replace(/[0-9]/g,function(r){return t[+r]})}}var _B=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ca(t){if(!(e=_B.exec(t)))throw new Error("invalid format: "+t);var e;return new ef({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}Ca.prototype=ef.prototype;function ef(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}ef.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 xB(t){e:for(var e=t.length,r=1,n=-1,i;r<e;++r)switch(t[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+t[r])break e;n>0&&(n=0);break}return n>0?t.slice(0,n)+t.slice(i+1):t}var fm;function OB(t,e){var r=ks(t,e);if(!r)return t+"";var n=r[0],i=r[1],a=i-(fm=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=n.length;return a===o?n:a>o?n+new Array(a-o+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+ks(t,Math.max(0,e+a-1))[0]}function dm(t,e){var r=ks(t,e);if(!r)return t+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const hm={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:mB,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>dm(t*100,e),r:dm,s:OB,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function pm(t){return t}var vm=Array.prototype.map,ym=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function SB(t){var e=t.grouping===void 0||t.thousands===void 0?pm:bB(vm.call(t.grouping,Number),t.thousands+""),r=t.currency===void 0?"":t.currency[0]+"",n=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",a=t.numerals===void 0?pm:wB(vm.call(t.numerals,String)),o=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"−":t.minus+"",u=t.nan===void 0?"NaN":t.nan+"";function l(f){f=Ca(f);var d=f.fill,h=f.align,y=f.sign,v=f.symbol,p=f.zero,m=f.width,b=f.comma,w=f.precision,O=f.trim,g=f.type;g==="n"?(b=!0,g="g"):hm[g]||(w===void 0&&(w=12),O=!0,g="g"),(p||d==="0"&&h==="=")&&(p=!0,d="0",h="=");var _=v==="$"?r:v==="#"&&/[boxX]/.test(g)?"0"+g.toLowerCase():"",S=v==="$"?n:/[%p]/.test(g)?o:"",A=hm[g],E=/[defgprs%]/.test(g);w=w===void 0?6:/[gprs]/.test(g)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function N(j){var $=_,k=S,I,R,M;if(g==="c")k=A(j)+k,j="";else{j=+j;var L=j<0||1/j<0;if(j=isNaN(j)?u:A(Math.abs(j),w),O&&(j=xB(j)),L&&+j==0&&y!=="+"&&(L=!1),$=(L?y==="("?y:s:y==="-"||y==="("?"":y)+$,k=(g==="s"?ym[8+fm/3]:"")+k+(L&&y==="("?")":""),E){for(I=-1,R=j.length;++I<R;)if(M=j.charCodeAt(I),48>M||M>57){k=(M===46?i+j.slice(I+1):j.slice(I))+k,j=j.slice(0,I);break}}}b&&!p&&(j=e(j,1/0));var q=$.length+j.length+k.length,z=q<m?new Array(m-q+1).join(d):"";switch(b&&p&&(j=e(z+j,z.length?m-k.length:1/0),z=""),h){case"<":j=$+j+k+z;break;case"=":j=$+z+j+k;break;case"^":j=z.slice(0,q=z.length>>1)+$+j+k+z.slice(q);break;default:j=z+$+j+k;break}return a(j)}return N.toString=function(){return f+""},N}function c(f,d){var h=l((f=Ca(f),f.type="f",f)),y=Math.max(-8,Math.min(8,Math.floor(ci(d)/3)))*3,v=Math.pow(10,-y),p=ym[8+y/3];return function(m){return h(v*m)+p}}return{format:l,formatPrefix:c}}var Cs,tf,gm;AB({thousands:",",grouping:[3],currency:["$",""]});function AB(t){return Cs=SB(t),tf=Cs.format,gm=Cs.formatPrefix,Cs}function PB(t){return Math.max(0,-ci(Math.abs(t)))}function EB(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(ci(e)/3)))*3-ci(Math.abs(t)))}function TB(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,ci(e)-ci(t))+1}function mm(t,e,r,n){var i=Wc(t,e,r),a;switch(n=Ca(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(t),Math.abs(e));return n.precision==null&&!isNaN(a=EB(i,o))&&(n.precision=a),gm(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=TB(i,Math.max(Math.abs(t),Math.abs(e))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=PB(i))&&(n.precision=a-(n.type==="%")*2);break}}return tf(n)}function Nr(t){var e=t.domain;return t.ticks=function(r){var n=e();return Uc(n[0],n[n.length-1],r??10)},t.tickFormat=function(r,n){var i=e();return mm(i[0],i[i.length-1],r??10,n)},t.nice=function(r){r==null&&(r=10);var n=e(),i=0,a=n.length-1,o=n[i],s=n[a],u,l,c=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);c-- >0;){if(l=Fc(o,s,r),l===u)return n[i]=o,n[a]=s,e(n);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;u=l}return t},t}function Is(){var t=Qc();return t.copy=function(){return ka(t,Is())},Nt.apply(t,arguments),Nr(t)}function bm(t){var e;function r(n){return n==null||isNaN(n=+n)?e:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(t=Array.from(n,js),r):t.slice()},r.unknown=function(n){return arguments.length?(e=n,r):e},r.copy=function(){return bm(t).unknown(e)},t=arguments.length?Array.from(t,js):[0,1],Nr(r)}function wm(t,e){t=t.slice();var r=0,n=t.length-1,i=t[r],a=t[n],o;return a<i&&(o=r,r=n,n=o,o=i,i=a,a=o),t[r]=e.floor(i),t[n]=e.ceil(a),t}function _m(t){return Math.log(t)}function xm(t){return Math.exp(t)}function jB(t){return-Math.log(-t)}function $B(t){return-Math.exp(-t)}function kB(t){return isFinite(t)?+("1e"+t):t<0?0:t}function CB(t){return t===10?kB:t===Math.E?Math.exp:e=>Math.pow(t,e)}function IB(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function Om(t){return(e,r)=>-t(-e,r)}function rf(t){const e=t(_m,xm),r=e.domain;let n=10,i,a;function o(){return i=IB(n),a=CB(n),r()[0]<0?(i=Om(i),a=Om(a),t(jB,$B)):t(_m,xm),e}return e.base=function(s){return arguments.length?(n=+s,o()):n},e.domain=function(s){return arguments.length?(r(s),o()):r()},e.ticks=s=>{const u=r();let l=u[0],c=u[u.length-1];const f=c<l;f&&([l,c]=[c,l]);let d=i(l),h=i(c),y,v;const p=s==null?10:+s;let m=[];if(!(n%1)&&h-d<p){if(d=Math.floor(d),h=Math.ceil(h),l>0){for(;d<=h;++d)for(y=1;y<n;++y)if(v=d<0?y/a(-d):y*a(d),!(v<l)){if(v>c)break;m.push(v)}}else for(;d<=h;++d)for(y=n-1;y>=1;--y)if(v=d>0?y/a(-d):y*a(d),!(v<l)){if(v>c)break;m.push(v)}m.length*2<p&&(m=Uc(l,c,p))}else m=Uc(d,h,Math.min(h-d,p)).map(a);return f?m.reverse():m},e.tickFormat=(s,u)=>{if(s==null&&(s=10),u==null&&(u=n===10?"s":","),typeof u!="function"&&(!(n%1)&&(u=Ca(u)).precision==null&&(u.trim=!0),u=tf(u)),s===1/0)return u;const l=Math.max(1,n*s/e.ticks().length);return c=>{let f=c/a(Math.round(i(c)));return f*n<n-.5&&(f*=n),f<=l?u(c):""}},e.nice=()=>r(wm(r(),{floor:s=>a(Math.floor(i(s))),ceil:s=>a(Math.ceil(i(s)))})),e}function Sm(){const t=rf($s()).domain([1,10]);return t.copy=()=>ka(t,Sm()).base(t.base()),Nt.apply(t,arguments),t}function Am(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function Pm(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function nf(t){var e=1,r=t(Am(e),Pm(e));return r.constant=function(n){return arguments.length?t(Am(e=+n),Pm(e)):e},Nr(r)}function Em(){var t=nf($s());return t.copy=function(){return ka(t,Em()).constant(t.constant())},Nt.apply(t,arguments)}function Tm(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function NB(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function MB(t){return t<0?-t*t:t*t}function af(t){var e=t(ht,ht),r=1;function n(){return r===1?t(ht,ht):r===.5?t(NB,MB):t(Tm(r),Tm(1/r))}return e.exponent=function(i){return arguments.length?(r=+i,n()):r},Nr(e)}function of(){var t=af($s());return t.copy=function(){return ka(t,of()).exponent(t.exponent())},Nt.apply(t,arguments),t}function DB(){return of.apply(null,arguments).exponent(.5)}function jm(t){return Math.sign(t)*t*t}function RB(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}function $m(){var t=Qc(),e=[0,1],r=!1,n;function i(a){var o=RB(t(a));return isNaN(o)?n:r?Math.round(o):o}return i.invert=function(a){return t.invert(jm(a))},i.domain=function(a){return arguments.length?(t.domain(a),i):t.domain()},i.range=function(a){return arguments.length?(t.range((e=Array.from(a,js)).map(jm)),i):e.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(r=!!a,i):r},i.clamp=function(a){return arguments.length?(t.clamp(a),i):t.clamp()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return $m(t.domain(),e).round(r).clamp(t.clamp()).unknown(n)},Nt.apply(i,arguments),Nr(i)}function km(){var t=[],e=[],r=[],n;function i(){var o=0,s=Math.max(1,e.length);for(r=new Array(s-1);++o<s;)r[o-1]=W2(t,o/s);return a}function a(o){return o==null||isNaN(o=+o)?n:e[Oa(r,o)]}return a.invertExtent=function(o){var s=e.indexOf(o);return s<0?[NaN,NaN]:[s>0?r[s-1]:t[0],s<r.length?r[s]:t[t.length-1]]},a.domain=function(o){if(!arguments.length)return t.slice();t=[];for(let s of o)s!=null&&!isNaN(s=+s)&&t.push(s);return t.sort(Ir),i()},a.range=function(o){return arguments.length?(e=Array.from(o),i()):e.slice()},a.unknown=function(o){return arguments.length?(n=o,a):n},a.quantiles=function(){return r.slice()},a.copy=function(){return km().domain(t).range(e).unknown(n)},Nt.apply(a,arguments)}function Cm(){var t=0,e=1,r=1,n=[.5],i=[0,1],a;function o(u){return u!=null&&u<=u?i[Oa(n,u,0,r)]:a}function s(){var u=-1;for(n=new Array(r);++u<r;)n[u]=((u+1)*e-(u-r)*t)/(r+1);return o}return o.domain=function(u){return arguments.length?([t,e]=u,t=+t,e=+e,s()):[t,e]},o.range=function(u){return arguments.length?(r=(i=Array.from(u)).length-1,s()):i.slice()},o.invertExtent=function(u){var l=i.indexOf(u);return l<0?[NaN,NaN]:l<1?[t,n[0]]:l>=r?[n[r-1],e]:[n[l-1],n[l]]},o.unknown=function(u){return arguments.length&&(a=u),o},o.thresholds=function(){return n.slice()},o.copy=function(){return Cm().domain([t,e]).range(i).unknown(a)},Nt.apply(Nr(o),arguments)}function Im(){var t=[.5],e=[0,1],r,n=1;function i(a){return a!=null&&a<=a?e[Oa(t,a,0,n)]:r}return i.domain=function(a){return arguments.length?(t=Array.from(a),n=Math.min(t.length,e.length-1),i):t.slice()},i.range=function(a){return arguments.length?(e=Array.from(a),n=Math.min(t.length,e.length-1),i):e.slice()},i.invertExtent=function(a){var o=e.indexOf(a);return[t[o-1],t[o]]},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return Im().domain(t).range(e).unknown(r)},Nt.apply(i,arguments)}const sf=new Date,uf=new Date;function Ze(t,e,r,n){function i(a){return t(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(t(a=new Date(+a)),a),i.ceil=a=>(t(a=new Date(a-1)),e(a,1),t(a),a),i.round=a=>{const o=i(a),s=i.ceil(a);return a-o<s-a?o:s},i.offset=(a,o)=>(e(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,s)=>{const u=[];if(a=i.ceil(a),s=s==null?1:Math.floor(s),!(a<o)||!(s>0))return u;let l;do u.push(l=new Date(+a)),e(a,s),t(a);while(l<a&&a<o);return u},i.filter=a=>Ze(o=>{if(o>=o)for(;t(o),!a(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;e(o,-1),!a(o););else for(;--s>=0;)for(;e(o,1),!a(o););}),r&&(i.count=(a,o)=>(sf.setTime(+a),uf.setTime(+o),t(sf),t(uf),Math.floor(r(sf,uf))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?o=>n(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const Ns=Ze(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Ns.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?Ze(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):Ns),Ns.range;const pr=1e3,Mt=pr*60,vr=Mt*60,yr=vr*24,lf=yr*7,Nm=yr*30,cf=yr*365,hn=Ze(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*pr)},(t,e)=>(e-t)/pr,t=>t.getUTCSeconds());hn.range;const ff=Ze(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*pr)},(t,e)=>{t.setTime(+t+e*Mt)},(t,e)=>(e-t)/Mt,t=>t.getMinutes());ff.range;const df=Ze(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*Mt)},(t,e)=>(e-t)/Mt,t=>t.getUTCMinutes());df.range;const hf=Ze(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*pr-t.getMinutes()*Mt)},(t,e)=>{t.setTime(+t+e*vr)},(t,e)=>(e-t)/vr,t=>t.getHours());hf.range;const pf=Ze(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*vr)},(t,e)=>(e-t)/vr,t=>t.getUTCHours());pf.range;const Ia=Ze(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Mt)/yr,t=>t.getDate()-1);Ia.range;const Ms=Ze(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yr,t=>t.getUTCDate()-1);Ms.range;const Mm=Ze(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yr,t=>Math.floor(t/yr));Mm.range;function pn(t){return Ze(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,r)=>{e.setDate(e.getDate()+r*7)},(e,r)=>(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*Mt)/lf)}const Ds=pn(0),Rs=pn(1),LB=pn(2),BB=pn(3),fi=pn(4),UB=pn(5),FB=pn(6);Ds.range,Rs.range,LB.range,BB.range,fi.range,UB.range,FB.range;function vn(t){return Ze(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r*7)},(e,r)=>(r-e)/lf)}const Ls=vn(0),Bs=vn(1),WB=vn(2),qB=vn(3),di=vn(4),zB=vn(5),KB=vn(6);Ls.range,Bs.range,WB.range,qB.range,di.range,zB.range,KB.range;const vf=Ze(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());vf.range;const yf=Ze(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());yf.range;const gr=Ze(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());gr.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Ze(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r*t)}),gr.range;const mr=Ze(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());mr.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Ze(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t)}),mr.range;function Dm(t,e,r,n,i,a){const o=[[hn,1,pr],[hn,5,5*pr],[hn,15,15*pr],[hn,30,30*pr],[a,1,Mt],[a,5,5*Mt],[a,15,15*Mt],[a,30,30*Mt],[i,1,vr],[i,3,3*vr],[i,6,6*vr],[i,12,12*vr],[n,1,yr],[n,2,2*yr],[r,1,lf],[e,1,Nm],[e,3,3*Nm],[t,1,cf]];function s(l,c,f){const d=c<l;d&&([l,c]=[c,l]);const h=f&&typeof f.range=="function"?f:u(l,c,f),y=h?h.range(l,+c+1):[];return d?y.reverse():y}function u(l,c,f){const d=Math.abs(c-l)/f,h=Bc(([,,p])=>p).right(o,d);if(h===o.length)return t.every(Wc(l/cf,c/cf,f));if(h===0)return Ns.every(Math.max(Wc(l,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,u]}const[VB,HB]=Dm(mr,yf,Ls,Mm,pf,df),[GB,YB]=Dm(gr,vf,Ds,Ia,hf,ff);function gf(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function mf(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Na(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function XB(t){var e=t.dateTime,r=t.date,n=t.time,i=t.periods,a=t.days,o=t.shortDays,s=t.months,u=t.shortMonths,l=Ma(i),c=Da(i),f=Ma(a),d=Da(a),h=Ma(o),y=Da(o),v=Ma(s),p=Da(s),m=Ma(u),b=Da(u),w={a:L,A:q,b:z,B:D,c:null,d:Wm,e:Wm,f:bU,g:jU,G:kU,H:yU,I:gU,j:mU,L:qm,m:wU,M:_U,p:B,q:F,Q:Ym,s:Xm,S:xU,u:OU,U:SU,V:AU,w:PU,W:EU,x:null,X:null,y:TU,Y:$U,Z:CU,"%":Gm},O={a:G,A:J,b:re,B:ne,c:null,d:Km,e:Km,f:DU,g:VU,G:GU,H:IU,I:NU,j:MU,L:Vm,m:RU,M:LU,p:ue,q:oe,Q:Ym,s:Xm,S:BU,u:UU,U:FU,V:WU,w:qU,W:zU,x:null,X:null,y:KU,Y:HU,Z:YU,"%":Gm},g={a:N,A:j,b:$,B:k,c:I,d:Um,e:Um,f:dU,g:Bm,G:Lm,H:Fm,I:Fm,j:uU,L:fU,m:sU,M:lU,p:E,q:oU,Q:pU,s:vU,S:cU,u:tU,U:rU,V:nU,w:eU,W:iU,x:R,X:M,y:Bm,Y:Lm,Z:aU,"%":hU};w.x=_(r,w),w.X=_(n,w),w.c=_(e,w),O.x=_(r,O),O.X=_(n,O),O.c=_(e,O);function _(W,Y){return function(te){var C=[],ye=-1,H=0,_e=W.length,Ee,Ge,Jt;for(te instanceof Date||(te=new Date(+te));++ye<_e;)W.charCodeAt(ye)===37&&(C.push(W.slice(H,ye)),(Ge=Rm[Ee=W.charAt(++ye)])!=null?Ee=W.charAt(++ye):Ge=Ee==="e"?" ":"0",(Jt=Y[Ee])&&(Ee=Jt(te,Ge)),C.push(Ee),H=ye+1);return C.push(W.slice(H,ye)),C.join("")}}function S(W,Y){return function(te){var C=Na(1900,void 0,1),ye=A(C,W,te+="",0),H,_e;if(ye!=te.length)return null;if("Q"in C)return new Date(C.Q);if("s"in C)return new Date(C.s*1e3+("L"in C?C.L:0));if(Y&&!("Z"in C)&&(C.Z=0),"p"in C&&(C.H=C.H%12+C.p*12),C.m===void 0&&(C.m="q"in C?C.q:0),"V"in C){if(C.V<1||C.V>53)return null;"w"in C||(C.w=1),"Z"in C?(H=mf(Na(C.y,0,1)),_e=H.getUTCDay(),H=_e>4||_e===0?Bs.ceil(H):Bs(H),H=Ms.offset(H,(C.V-1)*7),C.y=H.getUTCFullYear(),C.m=H.getUTCMonth(),C.d=H.getUTCDate()+(C.w+6)%7):(H=gf(Na(C.y,0,1)),_e=H.getDay(),H=_e>4||_e===0?Rs.ceil(H):Rs(H),H=Ia.offset(H,(C.V-1)*7),C.y=H.getFullYear(),C.m=H.getMonth(),C.d=H.getDate()+(C.w+6)%7)}else("W"in C||"U"in C)&&("w"in C||(C.w="u"in C?C.u%7:"W"in C?1:0),_e="Z"in C?mf(Na(C.y,0,1)).getUTCDay():gf(Na(C.y,0,1)).getDay(),C.m=0,C.d="W"in C?(C.w+6)%7+C.W*7-(_e+5)%7:C.w+C.U*7-(_e+6)%7);return"Z"in C?(C.H+=C.Z/100|0,C.M+=C.Z%100,mf(C)):gf(C)}}function A(W,Y,te,C){for(var ye=0,H=Y.length,_e=te.length,Ee,Ge;ye<H;){if(C>=_e)return-1;if(Ee=Y.charCodeAt(ye++),Ee===37){if(Ee=Y.charAt(ye++),Ge=g[Ee in Rm?Y.charAt(ye++):Ee],!Ge||(C=Ge(W,te,C))<0)return-1}else if(Ee!=te.charCodeAt(C++))return-1}return C}function E(W,Y,te){var C=l.exec(Y.slice(te));return C?(W.p=c.get(C[0].toLowerCase()),te+C[0].length):-1}function N(W,Y,te){var C=h.exec(Y.slice(te));return C?(W.w=y.get(C[0].toLowerCase()),te+C[0].length):-1}function j(W,Y,te){var C=f.exec(Y.slice(te));return C?(W.w=d.get(C[0].toLowerCase()),te+C[0].length):-1}function $(W,Y,te){var C=m.exec(Y.slice(te));return C?(W.m=b.get(C[0].toLowerCase()),te+C[0].length):-1}function k(W,Y,te){var C=v.exec(Y.slice(te));return C?(W.m=p.get(C[0].toLowerCase()),te+C[0].length):-1}function I(W,Y,te){return A(W,e,Y,te)}function R(W,Y,te){return A(W,r,Y,te)}function M(W,Y,te){return A(W,n,Y,te)}function L(W){return o[W.getDay()]}function q(W){return a[W.getDay()]}function z(W){return u[W.getMonth()]}function D(W){return s[W.getMonth()]}function B(W){return i[+(W.getHours()>=12)]}function F(W){return 1+~~(W.getMonth()/3)}function G(W){return o[W.getUTCDay()]}function J(W){return a[W.getUTCDay()]}function re(W){return u[W.getUTCMonth()]}function ne(W){return s[W.getUTCMonth()]}function ue(W){return i[+(W.getUTCHours()>=12)]}function oe(W){return 1+~~(W.getUTCMonth()/3)}return{format:function(W){var Y=_(W+="",w);return Y.toString=function(){return W},Y},parse:function(W){var Y=S(W+="",!1);return Y.toString=function(){return W},Y},utcFormat:function(W){var Y=_(W+="",O);return Y.toString=function(){return W},Y},utcParse:function(W){var Y=S(W+="",!0);return Y.toString=function(){return W},Y}}}var Rm={"-":"",_:" ",0:"0"},tt=/^\s*\d+/,JB=/^%/,ZB=/[\\^$*+?|[\]().{}]/g;function be(t,e,r){var n=t<0?"-":"",i=(n?-t:t)+"",a=i.length;return n+(a<r?new Array(r-a+1).join(e)+i:i)}function QB(t){return t.replace(ZB,"\\$&")}function Ma(t){return new RegExp("^(?:"+t.map(QB).join("|")+")","i")}function Da(t){return new Map(t.map((e,r)=>[e.toLowerCase(),r]))}function eU(t,e,r){var n=tt.exec(e.slice(r,r+1));return n?(t.w=+n[0],r+n[0].length):-1}function tU(t,e,r){var n=tt.exec(e.slice(r,r+1));return n?(t.u=+n[0],r+n[0].length):-1}function rU(t,e,r){var n=tt.exec(e.slice(r,r+2));return n?(t.U=+n[0],r+n[0].length):-1}function nU(t,e,r){var n=tt.exec(e.slice(r,r+2));return n?(t.V=+n[0],r+n[0].length):-1}function iU(t,e,r){var n=tt.exec(e.slice(r,r+2));return n?(t.W=+n[0],r+n[0].length):-1}function Lm(t,e,r){var n=tt.exec(e.slice(r,r+4));return n?(t.y=+n[0],r+n[0].length):-1}function Bm(t,e,r){var n=tt.exec(e.slice(r,r+2));return n?(t.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function aU(t,e,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function oU(t,e,r){var n=tt.exec(e.slice(r,r+1));return n?(t.q=n[0]*3-3,r+n[0].length):-1}function sU(t,e,r){var n=tt.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function Um(t,e,r){var n=tt.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function uU(t,e,r){var n=tt.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function Fm(t,e,r){var n=tt.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function lU(t,e,r){var n=tt.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function cU(t,e,r){var n=tt.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function fU(t,e,r){var n=tt.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function dU(t,e,r){var n=tt.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function hU(t,e,r){var n=JB.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function pU(t,e,r){var n=tt.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function vU(t,e,r){var n=tt.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function Wm(t,e){return be(t.getDate(),e,2)}function yU(t,e){return be(t.getHours(),e,2)}function gU(t,e){return be(t.getHours()%12||12,e,2)}function mU(t,e){return be(1+Ia.count(gr(t),t),e,3)}function qm(t,e){return be(t.getMilliseconds(),e,3)}function bU(t,e){return qm(t,e)+"000"}function wU(t,e){return be(t.getMonth()+1,e,2)}function _U(t,e){return be(t.getMinutes(),e,2)}function xU(t,e){return be(t.getSeconds(),e,2)}function OU(t){var e=t.getDay();return e===0?7:e}function SU(t,e){return be(Ds.count(gr(t)-1,t),e,2)}function zm(t){var e=t.getDay();return e>=4||e===0?fi(t):fi.ceil(t)}function AU(t,e){return t=zm(t),be(fi.count(gr(t),t)+(gr(t).getDay()===4),e,2)}function PU(t){return t.getDay()}function EU(t,e){return be(Rs.count(gr(t)-1,t),e,2)}function TU(t,e){return be(t.getFullYear()%100,e,2)}function jU(t,e){return t=zm(t),be(t.getFullYear()%100,e,2)}function $U(t,e){return be(t.getFullYear()%1e4,e,4)}function kU(t,e){var r=t.getDay();return t=r>=4||r===0?fi(t):fi.ceil(t),be(t.getFullYear()%1e4,e,4)}function CU(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+be(e/60|0,"0",2)+be(e%60,"0",2)}function Km(t,e){return be(t.getUTCDate(),e,2)}function IU(t,e){return be(t.getUTCHours(),e,2)}function NU(t,e){return be(t.getUTCHours()%12||12,e,2)}function MU(t,e){return be(1+Ms.count(mr(t),t),e,3)}function Vm(t,e){return be(t.getUTCMilliseconds(),e,3)}function DU(t,e){return Vm(t,e)+"000"}function RU(t,e){return be(t.getUTCMonth()+1,e,2)}function LU(t,e){return be(t.getUTCMinutes(),e,2)}function BU(t,e){return be(t.getUTCSeconds(),e,2)}function UU(t){var e=t.getUTCDay();return e===0?7:e}function FU(t,e){return be(Ls.count(mr(t)-1,t),e,2)}function Hm(t){var e=t.getUTCDay();return e>=4||e===0?di(t):di.ceil(t)}function WU(t,e){return t=Hm(t),be(di.count(mr(t),t)+(mr(t).getUTCDay()===4),e,2)}function qU(t){return t.getUTCDay()}function zU(t,e){return be(Bs.count(mr(t)-1,t),e,2)}function KU(t,e){return be(t.getUTCFullYear()%100,e,2)}function VU(t,e){return t=Hm(t),be(t.getUTCFullYear()%100,e,2)}function HU(t,e){return be(t.getUTCFullYear()%1e4,e,4)}function GU(t,e){var r=t.getUTCDay();return t=r>=4||r===0?di(t):di.ceil(t),be(t.getUTCFullYear()%1e4,e,4)}function YU(){return"+0000"}function Gm(){return"%"}function Ym(t){return+t}function Xm(t){return Math.floor(+t/1e3)}var hi,Jm,Zm;XU({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 XU(t){return hi=XB(t),Jm=hi.format,hi.parse,Zm=hi.utcFormat,hi.utcParse,hi}function JU(t){return new Date(t)}function ZU(t){return t instanceof Date?+t:+new Date(+t)}function bf(t,e,r,n,i,a,o,s,u,l){var c=Qc(),f=c.invert,d=c.domain,h=l(".%L"),y=l(":%S"),v=l("%I:%M"),p=l("%I %p"),m=l("%a %d"),b=l("%b %d"),w=l("%B"),O=l("%Y");function g(_){return(u(_)<_?h:s(_)<_?y:o(_)<_?v:a(_)<_?p:n(_)<_?i(_)<_?m:b:r(_)<_?w:O)(_)}return c.invert=function(_){return new Date(f(_))},c.domain=function(_){return arguments.length?d(Array.from(_,ZU)):d().map(JU)},c.ticks=function(_){var S=d();return t(S[0],S[S.length-1],_??10)},c.tickFormat=function(_,S){return S==null?g:l(S)},c.nice=function(_){var S=d();return(!_||typeof _.range!="function")&&(_=e(S[0],S[S.length-1],_??10)),_?d(wm(S,_)):c},c.copy=function(){return ka(c,bf(t,e,r,n,i,a,o,s,u,l))},c}function QU(){return Nt.apply(bf(GB,YB,gr,vf,Ds,Ia,hf,ff,hn,Jm).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function eF(){return Nt.apply(bf(VB,HB,mr,yf,Ls,Ms,pf,df,hn,Zm).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Us(){var t=0,e=1,r,n,i,a,o=ht,s=!1,u;function l(f){return f==null||isNaN(f=+f)?u:o(i===0?.5:(f=(a(f)-r)*i,s?Math.max(0,Math.min(1,f)):f))}l.domain=function(f){return arguments.length?([t,e]=f,r=a(t=+t),n=a(e=+e),i=r===n?0:1/(n-r),l):[t,e]},l.clamp=function(f){return arguments.length?(s=!!f,l):s},l.interpolator=function(f){return arguments.length?(o=f,l):o};function c(f){return function(d){var h,y;return arguments.length?([h,y]=d,o=f(h,y),l):[o(0),o(1)]}}return l.range=c(li),l.rangeRound=c(Jc),l.unknown=function(f){return arguments.length?(u=f,l):u},function(f){return a=f,r=f(t),n=f(e),i=r===n?0:1/(n-r),l}}function Mr(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function Qm(){var t=Nr(Us()(ht));return t.copy=function(){return Mr(t,Qm())},hr.apply(t,arguments)}function eb(){var t=rf(Us()).domain([1,10]);return t.copy=function(){return Mr(t,eb()).base(t.base())},hr.apply(t,arguments)}function tb(){var t=nf(Us());return t.copy=function(){return Mr(t,tb()).constant(t.constant())},hr.apply(t,arguments)}function wf(){var t=af(Us());return t.copy=function(){return Mr(t,wf()).exponent(t.exponent())},hr.apply(t,arguments)}function tF(){return wf.apply(null,arguments).exponent(.5)}function rb(){var t=[],e=ht;function r(n){if(n!=null&&!isNaN(n=+n))return e((Oa(t,n,1)-1)/(t.length-1))}return r.domain=function(n){if(!arguments.length)return t.slice();t=[];for(let i of n)i!=null&&!isNaN(i=+i)&&t.push(i);return t.sort(Ir),r},r.interpolator=function(n){return arguments.length?(e=n,r):e},r.range=function(){return t.map((n,i)=>e(i/(t.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,a)=>F2(t,a/n))},r.copy=function(){return rb(e).domain(t)},hr.apply(r,arguments)}function Fs(){var t=0,e=.5,r=1,n=1,i,a,o,s,u,l=ht,c,f=!1,d;function h(v){return isNaN(v=+v)?d:(v=.5+((v=+c(v))-a)*(n*v<n*a?s:u),l(f?Math.max(0,Math.min(1,v)):v))}h.domain=function(v){return arguments.length?([t,e,r]=v,i=c(t=+t),a=c(e=+e),o=c(r=+r),s=i===a?0:.5/(a-i),u=a===o?0:.5/(o-a),n=a<i?-1:1,h):[t,e,r]},h.clamp=function(v){return arguments.length?(f=!!v,h):f},h.interpolator=function(v){return arguments.length?(l=v,h):l};function y(v){return function(p){var m,b,w;return arguments.length?([m,b,w]=p,l=hB(v,[m,b,w]),h):[l(0),l(.5),l(1)]}}return h.range=y(li),h.rangeRound=y(Jc),h.unknown=function(v){return arguments.length?(d=v,h):d},function(v){return c=v,i=v(t),a=v(e),o=v(r),s=i===a?0:.5/(a-i),u=a===o?0:.5/(o-a),n=a<i?-1:1,h}}function nb(){var t=Nr(Fs()(ht));return t.copy=function(){return Mr(t,nb())},hr.apply(t,arguments)}function ib(){var t=rf(Fs()).domain([.1,1,10]);return t.copy=function(){return Mr(t,ib()).base(t.base())},hr.apply(t,arguments)}function ab(){var t=nf(Fs());return t.copy=function(){return Mr(t,ab()).constant(t.constant())},hr.apply(t,arguments)}function _f(){var t=af(Fs());return t.copy=function(){return Mr(t,_f()).exponent(t.exponent())},hr.apply(t,arguments)}function rF(){return _f.apply(null,arguments).exponent(.5)}const ob=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Aa,scaleDiverging:nb,scaleDivergingLog:ib,scaleDivergingPow:_f,scaleDivergingSqrt:rF,scaleDivergingSymlog:ab,scaleIdentity:bm,scaleImplicit:qc,scaleLinear:Is,scaleLog:Sm,scaleOrdinal:zc,scalePoint:Pa,scalePow:of,scaleQuantile:km,scaleQuantize:Cm,scaleRadial:$m,scaleSequential:Qm,scaleSequentialLog:eb,scaleSequentialPow:wf,scaleSequentialQuantile:rb,scaleSequentialSqrt:tF,scaleSequentialSymlog:tb,scaleSqrt:DB,scaleSymlog:Em,scaleThreshold:Im,scaleTime:QU,scaleUtc:eF,tickFormat:mm},Symbol.toStringTag,{value:"Module"}));var nF=Kn;function iF(t,e,r){for(var n=-1,i=t.length;++n<i;){var a=t[n],o=e(a);if(o!=null&&(s===void 0?o===o&&!nF(o):r(o,s)))var s=o,u=a}return u}var Ws=iF;function aF(t,e){return t>e}var sb=aF,oF=Ws,sF=sb,uF=ri;function lF(t){return t&&t.length?oF(t,uF,sF):void 0}var cF=lF;const Dr=je(cF);function fF(t,e){return t<e}var ub=fF,dF=Ws,hF=ub,pF=ri;function vF(t){return t&&t.length?dF(t,pF,hF):void 0}var yF=vF;const qs=je(yF);var gF=Rl,mF=er,bF=ng,wF=yt;function _F(t,e){var r=wF(t)?gF:bF;return r(t,mF(e))}var xF=_F,OF=tg,SF=xF;function AF(t,e){return OF(SF(t,e),1)}var PF=AF;const EF=je(PF);var TF=Oc;function jF(t,e){return TF(t,e)}var $F=jF;const Rr=je($F);var pi=1e9,kF={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Sf,Be=!0,Dt="[DecimalError] ",yn=Dt+"Invalid argument: ",xf=Dt+"Exponent out of range: ",vi=Math.floor,gn=Math.pow,CF=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,At,rt=1e7,Le=7,lb=9007199254740991,zs=vi(lb/Le),Z={};Z.absoluteValue=Z.abs=function(){var t=new this.constructor(this);return t.s&&(t.s=1),t},Z.comparedTo=Z.cmp=function(t){var e,r,n,i,a=this;if(t=new a.constructor(t),a.s!==t.s)return a.s||-t.s;if(a.e!==t.e)return a.e>t.e^a.s<0?1:-1;for(n=a.d.length,i=t.d.length,e=0,r=n<i?n:i;e<r;++e)if(a.d[e]!==t.d[e])return a.d[e]>t.d[e]^a.s<0?1:-1;return n===i?0:n>i^a.s<0?1:-1},Z.decimalPlaces=Z.dp=function(){var t=this,e=t.d.length-1,r=(e-t.e)*Le;if(e=t.d[e],e)for(;e%10==0;e/=10)r--;return r<0?0:r},Z.dividedBy=Z.div=function(t){return br(this,new this.constructor(t))},Z.dividedToIntegerBy=Z.idiv=function(t){var e=this,r=e.constructor;return ke(br(e,new r(t),0,1),r.precision)},Z.equals=Z.eq=function(t){return!this.cmp(t)},Z.exponent=function(){return Ve(this)},Z.greaterThan=Z.gt=function(t){return this.cmp(t)>0},Z.greaterThanOrEqualTo=Z.gte=function(t){return this.cmp(t)>=0},Z.isInteger=Z.isint=function(){return this.e>this.d.length-2},Z.isNegative=Z.isneg=function(){return this.s<0},Z.isPositive=Z.ispos=function(){return this.s>0},Z.isZero=function(){return this.s===0},Z.lessThan=Z.lt=function(t){return this.cmp(t)<0},Z.lessThanOrEqualTo=Z.lte=function(t){return this.cmp(t)<1},Z.logarithm=Z.log=function(t){var e,r=this,n=r.constructor,i=n.precision,a=i+5;if(t===void 0)t=new n(10);else if(t=new n(t),t.s<1||t.eq(At))throw Error(Dt+"NaN");if(r.s<1)throw Error(Dt+(r.s?"NaN":"-Infinity"));return r.eq(At)?new n(0):(Be=!1,e=br(Ra(r,a),Ra(t,a),a),Be=!0,ke(e,i))},Z.minus=Z.sub=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?hb(e,t):cb(e,(t.s=-t.s,t))},Z.modulo=Z.mod=function(t){var e,r=this,n=r.constructor,i=n.precision;if(t=new n(t),!t.s)throw Error(Dt+"NaN");return r.s?(Be=!1,e=br(r,t,0,1).times(t),Be=!0,r.minus(e)):ke(new n(r),i)},Z.naturalExponential=Z.exp=function(){return fb(this)},Z.naturalLogarithm=Z.ln=function(){return Ra(this)},Z.negated=Z.neg=function(){var t=new this.constructor(this);return t.s=-t.s||0,t},Z.plus=Z.add=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?cb(e,t):hb(e,(t.s=-t.s,t))},Z.precision=Z.sd=function(t){var e,r,n,i=this;if(t!==void 0&&t!==!!t&&t!==1&&t!==0)throw Error(yn+t);if(e=Ve(i)+1,n=i.d.length-1,r=n*Le+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return t&&e>r?e:r},Z.squareRoot=Z.sqrt=function(){var t,e,r,n,i,a,o,s=this,u=s.constructor;if(s.s<1){if(!s.s)return new u(0);throw Error(Dt+"NaN")}for(t=Ve(s),Be=!1,i=Math.sqrt(+s),i==0||i==1/0?(e=ir(s.d),(e.length+t)%2==0&&(e+="0"),i=Math.sqrt(e),t=vi((t+1)/2)-(t<0||t%2),i==1/0?e="5e"+t:(e=i.toExponential(),e=e.slice(0,e.indexOf("e")+1)+t),n=new u(e)):n=new u(i.toString()),r=u.precision,i=o=r+3;;)if(a=n,n=a.plus(br(s,a,o+2)).times(.5),ir(a.d).slice(0,o)===(e=ir(n.d)).slice(0,o)){if(e=e.slice(o-3,o+1),i==o&&e=="4999"){if(ke(a,r+1,0),a.times(a).eq(s)){n=a;break}}else if(e!="9999")break;o+=4}return Be=!0,ke(n,r)},Z.times=Z.mul=function(t){var e,r,n,i,a,o,s,u,l,c=this,f=c.constructor,d=c.d,h=(t=new f(t)).d;if(!c.s||!t.s)return new f(0);for(t.s*=c.s,r=c.e+t.e,u=d.length,l=h.length,u<l&&(a=d,d=h,h=a,o=u,u=l,l=o),a=[],o=u+l,n=o;n--;)a.push(0);for(n=l;--n>=0;){for(e=0,i=u+n;i>n;)s=a[i]+h[n]*d[i-n-1]+e,a[i--]=s%rt|0,e=s/rt|0;a[i]=(a[i]+e)%rt|0}for(;!a[--o];)a.pop();return e?++r:a.shift(),t.d=a,t.e=r,Be?ke(t,f.precision):t},Z.toDecimalPlaces=Z.todp=function(t,e){var r=this,n=r.constructor;return r=new n(r),t===void 0?r:(nr(t,0,pi),e===void 0?e=n.rounding:nr(e,0,8),ke(r,t+Ve(r)+1,e))},Z.toExponential=function(t,e){var r,n=this,i=n.constructor;return t===void 0?r=mn(n,!0):(nr(t,0,pi),e===void 0?e=i.rounding:nr(e,0,8),n=ke(new i(n),t+1,e),r=mn(n,!0,t+1)),r},Z.toFixed=function(t,e){var r,n,i=this,a=i.constructor;return t===void 0?mn(i):(nr(t,0,pi),e===void 0?e=a.rounding:nr(e,0,8),n=ke(new a(i),t+Ve(i)+1,e),r=mn(n.abs(),!1,t+Ve(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)},Z.toInteger=Z.toint=function(){var t=this,e=t.constructor;return ke(new e(t),Ve(t)+1,e.rounding)},Z.toNumber=function(){return+this},Z.toPower=Z.pow=function(t){var e,r,n,i,a,o,s=this,u=s.constructor,l=12,c=+(t=new u(t));if(!t.s)return new u(At);if(s=new u(s),!s.s){if(t.s<1)throw Error(Dt+"Infinity");return s}if(s.eq(At))return s;if(n=u.precision,t.eq(At))return ke(s,n);if(e=t.e,r=t.d.length-1,o=e>=r,a=s.s,o){if((r=c<0?-c:c)<=lb){for(i=new u(At),e=Math.ceil(n/Le+4),Be=!1;r%2&&(i=i.times(s),pb(i.d,e)),r=vi(r/2),r!==0;)s=s.times(s),pb(s.d,e);return Be=!0,t.s<0?new u(At).div(i):ke(i,n)}}else if(a<0)throw Error(Dt+"NaN");return a=a<0&&t.d[Math.max(e,r)]&1?-1:1,s.s=1,Be=!1,i=t.times(Ra(s,n+l)),Be=!0,i=fb(i),i.s=a,i},Z.toPrecision=function(t,e){var r,n,i=this,a=i.constructor;return t===void 0?(r=Ve(i),n=mn(i,r<=a.toExpNeg||r>=a.toExpPos)):(nr(t,1,pi),e===void 0?e=a.rounding:nr(e,0,8),i=ke(new a(i),t,e),r=Ve(i),n=mn(i,t<=r||r<=a.toExpNeg,t)),n},Z.toSignificantDigits=Z.tosd=function(t,e){var r=this,n=r.constructor;return t===void 0?(t=n.precision,e=n.rounding):(nr(t,1,pi),e===void 0?e=n.rounding:nr(e,0,8)),ke(new n(r),t,e)},Z.toString=Z.valueOf=Z.val=Z.toJSON=Z[Symbol.for("nodejs.util.inspect.custom")]=function(){var t=this,e=Ve(t),r=t.constructor;return mn(t,e<=r.toExpNeg||e>=r.toExpPos)};function cb(t,e){var r,n,i,a,o,s,u,l,c=t.constructor,f=c.precision;if(!t.s||!e.s)return e.s||(e=new c(t)),Be?ke(e,f):e;if(u=t.d,l=e.d,o=t.e,i=e.e,u=u.slice(),a=o-i,a){for(a<0?(n=u,a=-a,s=l.length):(n=l,i=o,s=u.length),o=Math.ceil(f/Le),s=o>s?o+1:s+1,a>s&&(a=s,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for(s=u.length,a=l.length,s-a<0&&(a=s,n=l,l=u,u=n),r=0;a;)r=(u[--a]=u[a]+l[a]+r)/rt|0,u[a]%=rt;for(r&&(u.unshift(r),++i),s=u.length;u[--s]==0;)u.pop();return e.d=u,e.e=i,Be?ke(e,f):e}function nr(t,e,r){if(t!==~~t||t<e||t>r)throw Error(yn+t)}function ir(t){var e,r,n,i=t.length-1,a="",o=t[0];if(i>0){for(a+=o,e=1;e<i;e++)n=t[e]+"",r=Le-n.length,r&&(a+=Lr(r)),a+=n;o=t[e],n=o+"",r=Le-n.length,r&&(a+=Lr(r))}else if(o===0)return"0";for(;o%10===0;)o/=10;return a+o}var br=function(){function t(n,i){var a,o=0,s=n.length;for(n=n.slice();s--;)a=n[s]*i+o,n[s]=a%rt|0,o=a/rt|0;return o&&n.unshift(o),n}function e(n,i,a,o){var s,u;if(a!=o)u=a>o?1:-1;else for(s=u=0;s<a;s++)if(n[s]!=i[s]){u=n[s]>i[s]?1:-1;break}return u}function r(n,i,a){for(var o=0;a--;)n[a]-=o,o=n[a]<i[a]?1:0,n[a]=o*rt+n[a]-i[a];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,a,o){var s,u,l,c,f,d,h,y,v,p,m,b,w,O,g,_,S,A,E=n.constructor,N=n.s==i.s?1:-1,j=n.d,$=i.d;if(!n.s)return new E(n);if(!i.s)throw Error(Dt+"Division by zero");for(u=n.e-i.e,S=$.length,g=j.length,h=new E(N),y=h.d=[],l=0;$[l]==(j[l]||0);)++l;if($[l]>(j[l]||0)&&--u,a==null?b=a=E.precision:o?b=a+(Ve(n)-Ve(i))+1:b=a,b<0)return new E(0);if(b=b/Le+2|0,l=0,S==1)for(c=0,$=$[0],b++;(l<g||c)&&b--;l++)w=c*rt+(j[l]||0),y[l]=w/$|0,c=w%$|0;else{for(c=rt/($[0]+1)|0,c>1&&($=t($,c),j=t(j,c),S=$.length,g=j.length),O=S,v=j.slice(0,S),p=v.length;p<S;)v[p++]=0;A=$.slice(),A.unshift(0),_=$[0],$[1]>=rt/2&&++_;do c=0,s=e($,v,S,p),s<0?(m=v[0],S!=p&&(m=m*rt+(v[1]||0)),c=m/_|0,c>1?(c>=rt&&(c=rt-1),f=t($,c),d=f.length,p=v.length,s=e(f,v,d,p),s==1&&(c--,r(f,S<d?A:$,d))):(c==0&&(s=c=1),f=$.slice()),d=f.length,d<p&&f.unshift(0),r(v,f,p),s==-1&&(p=v.length,s=e($,v,S,p),s<1&&(c++,r(v,S<p?A:$,p))),p=v.length):s===0&&(c++,v=[0]),y[l++]=c,s&&v[0]?v[p++]=j[O]||0:(v=[j[O]],p=1);while((O++<g||v[0]!==void 0)&&b--)}return y[0]||y.shift(),h.e=u,ke(h,o?a+Ve(h)+1:a)}}();function fb(t,e){var r,n,i,a,o,s,u=0,l=0,c=t.constructor,f=c.precision;if(Ve(t)>16)throw Error(xf+Ve(t));if(!t.s)return new c(At);for(e==null?(Be=!1,s=f):s=e,o=new c(.03125);t.abs().gte(.1);)t=t.times(o),l+=5;for(n=Math.log(gn(2,l))/Math.LN10*2+5|0,s+=n,r=i=a=new c(At),c.precision=s;;){if(i=ke(i.times(t),s),r=r.times(++u),o=a.plus(br(i,r,s)),ir(o.d).slice(0,s)===ir(a.d).slice(0,s)){for(;l--;)a=ke(a.times(a),s);return c.precision=f,e==null?(Be=!0,ke(a,f)):a}a=o}}function Ve(t){for(var e=t.e*Le,r=t.d[0];r>=10;r/=10)e++;return e}function Of(t,e,r){if(e>t.LN10.sd())throw Be=!0,r&&(t.precision=r),Error(Dt+"LN10 precision limit exceeded");return ke(new t(t.LN10),e)}function Lr(t){for(var e="";t--;)e+="0";return e}function Ra(t,e){var r,n,i,a,o,s,u,l,c,f=1,d=10,h=t,y=h.d,v=h.constructor,p=v.precision;if(h.s<1)throw Error(Dt+(h.s?"NaN":"-Infinity"));if(h.eq(At))return new v(0);if(e==null?(Be=!1,l=p):l=e,h.eq(10))return e==null&&(Be=!0),Of(v,l);if(l+=d,v.precision=l,r=ir(y),n=r.charAt(0),a=Ve(h),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)h=h.times(t),r=ir(h.d),n=r.charAt(0),f++;a=Ve(h),n>1?(h=new v("0."+r),a++):h=new v(n+"."+r.slice(1))}else return u=Of(v,l+2,p).times(a+""),h=Ra(new v(n+"."+r.slice(1)),l-d).plus(u),v.precision=p,e==null?(Be=!0,ke(h,p)):h;for(s=o=h=br(h.minus(At),h.plus(At),l),c=ke(h.times(h),l),i=3;;){if(o=ke(o.times(c),l),u=s.plus(br(o,new v(i),l)),ir(u.d).slice(0,l)===ir(s.d).slice(0,l))return s=s.times(2),a!==0&&(s=s.plus(Of(v,l+2,p).times(a+""))),s=br(s,new v(f),l),v.precision=p,e==null?(Be=!0,ke(s,p)):s;s=u,i+=2}}function db(t,e){var r,n,i;for((r=e.indexOf("."))>-1&&(e=e.replace(".","")),(n=e.search(/e/i))>0?(r<0&&(r=n),r+=+e.slice(n+1),e=e.substring(0,n)):r<0&&(r=e.length),n=0;e.charCodeAt(n)===48;)++n;for(i=e.length;e.charCodeAt(i-1)===48;)--i;if(e=e.slice(n,i),e){if(i-=n,r=r-n-1,t.e=vi(r/Le),t.d=[],n=(r+1)%Le,r<0&&(n+=Le),n<i){for(n&&t.d.push(+e.slice(0,n)),i-=Le;n<i;)t.d.push(+e.slice(n,n+=Le));e=e.slice(n),n=Le-e.length}else n-=i;for(;n--;)e+="0";if(t.d.push(+e),Be&&(t.e>zs||t.e<-zs))throw Error(xf+r)}else t.s=0,t.e=0,t.d=[0];return t}function ke(t,e,r){var n,i,a,o,s,u,l,c,f=t.d;for(o=1,a=f[0];a>=10;a/=10)o++;if(n=e-o,n<0)n+=Le,i=e,l=f[c=0];else{if(c=Math.ceil((n+1)/Le),a=f.length,c>=a)return t;for(l=a=f[c],o=1;a>=10;a/=10)o++;n%=Le,i=n-Le+o}if(r!==void 0&&(a=gn(10,o-i-1),s=l/a%10|0,u=e<0||f[c+1]!==void 0||l%a,u=r<4?(s||u)&&(r==0||r==(t.s<0?3:2)):s>5||s==5&&(r==4||u||r==6&&(n>0?i>0?l/gn(10,o-i):0:f[c-1])%10&1||r==(t.s<0?8:7))),e<1||!f[0])return u?(a=Ve(t),f.length=1,e=e-a-1,f[0]=gn(10,(Le-e%Le)%Le),t.e=vi(-e/Le)||0):(f.length=1,f[0]=t.e=t.s=0),t;if(n==0?(f.length=c,a=1,c--):(f.length=c+1,a=gn(10,Le-n),f[c]=i>0?(l/gn(10,o-i)%gn(10,i)|0)*a:0),u)for(;;)if(c==0){(f[0]+=a)==rt&&(f[0]=1,++t.e);break}else{if(f[c]+=a,f[c]!=rt)break;f[c--]=0,a=1}for(n=f.length;f[--n]===0;)f.pop();if(Be&&(t.e>zs||t.e<-zs))throw Error(xf+Ve(t));return t}function hb(t,e){var r,n,i,a,o,s,u,l,c,f,d=t.constructor,h=d.precision;if(!t.s||!e.s)return e.s?e.s=-e.s:e=new d(t),Be?ke(e,h):e;if(u=t.d,f=e.d,n=e.e,l=t.e,u=u.slice(),o=l-n,o){for(c=o<0,c?(r=u,o=-o,s=f.length):(r=f,n=l,s=u.length),i=Math.max(Math.ceil(h/Le),s)+2,o>i&&(o=i,r.length=1),r.reverse(),i=o;i--;)r.push(0);r.reverse()}else{for(i=u.length,s=f.length,c=i<s,c&&(s=i),i=0;i<s;i++)if(u[i]!=f[i]){c=u[i]<f[i];break}o=0}for(c&&(r=u,u=f,f=r,e.s=-e.s),s=u.length,i=f.length-s;i>0;--i)u[s++]=0;for(i=f.length;i>o;){if(u[--i]<f[i]){for(a=i;a&&u[--a]===0;)u[a]=rt-1;--u[a],u[i]+=rt}u[i]-=f[i]}for(;u[--s]===0;)u.pop();for(;u[0]===0;u.shift())--n;return u[0]?(e.d=u,e.e=n,Be?ke(e,h):e):new d(0)}function mn(t,e,r){var n,i=Ve(t),a=ir(t.d),o=a.length;return e?(r&&(n=r-o)>0?a=a.charAt(0)+"."+a.slice(1)+Lr(n):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+Lr(-i-1)+a,r&&(n=r-o)>0&&(a+=Lr(n))):i>=o?(a+=Lr(i+1-o),r&&(n=r-i-1)>0&&(a=a+"."+Lr(n))):((n=i+1)<o&&(a=a.slice(0,n)+"."+a.slice(n)),r&&(n=r-o)>0&&(i+1===o&&(a+="."),a+=Lr(n))),t.s<0?"-"+a:a}function pb(t,e){if(t.length>e)return t.length=e,!0}function vb(t){var e,r,n;function i(a){var o=this;if(!(o instanceof i))return new i(a);if(o.constructor=i,a instanceof i){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(yn+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return db(o,a.toString())}else if(typeof a!="string")throw Error(yn+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,CF.test(a))db(o,a);else throw Error(yn+a)}if(i.prototype=Z,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=vb,i.config=i.set=IF,t===void 0&&(t={}),t)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],e=0;e<n.length;)t.hasOwnProperty(r=n[e++])||(t[r]=this[r]);return i.config(t),i}function IF(t){if(!t||typeof t!="object")throw Error(Dt+"Object expected");var e,r,n,i=["precision",1,pi,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(e=0;e<i.length;e+=3)if((n=t[r=i[e]])!==void 0)if(vi(n)===n&&n>=i[e+1]&&n<=i[e+2])this[r]=n;else throw Error(yn+r+": "+n);if((n=t[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(yn+r+": "+n);return this}var Sf=vb(kF);At=new Sf(1);const $e=Sf;function NF(t){return LF(t)||RF(t)||DF(t)||MF()}function MF(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
97
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function DF(t,e){if(t){if(typeof t=="string")return Af(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Af(t,e)}}function RF(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function LF(t){if(Array.isArray(t))return Af(t)}function Af(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var BF=function(e){return e},yb={"@@functional/placeholder":!0},gb=function(e){return e===yb},mb=function(e){return function r(){return arguments.length===0||arguments.length===1&&gb(arguments.length<=0?void 0:arguments[0])?r:e.apply(void 0,arguments)}},UF=function t(e,r){return e===1?r:mb(function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];var o=i.filter(function(s){return s!==yb}).length;return o>=e?r.apply(void 0,i):t(e-o,mb(function(){for(var s=arguments.length,u=new Array(s),l=0;l<s;l++)u[l]=arguments[l];var c=i.map(function(f){return gb(f)?u.shift():f});return r.apply(void 0,NF(c).concat(u))}))})},Ks=function(e){return UF(e.length,e)},Pf=function(e,r){for(var n=[],i=e;i<r;++i)n[i-e]=i;return n},FF=Ks(function(t,e){return Array.isArray(e)?e.map(t):Object.keys(e).map(function(r){return e[r]}).map(t)}),WF=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];if(!r.length)return BF;var i=r.reverse(),a=i[0],o=i.slice(1);return function(){return o.reduce(function(s,u){return u(s)},a.apply(void 0,arguments))}},Ef=function(e){return Array.isArray(e)?e.reverse():e.split("").reverse.join("")},bb=function(e){var r=null,n=null;return function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return r&&a.every(function(s,u){return s===r[u]})||(r=a,n=e.apply(void 0,a)),n}};function qF(t){var e;return t===0?e=1:e=Math.floor(new $e(t).abs().log(10).toNumber())+1,e}function zF(t,e,r){for(var n=new $e(t),i=0,a=[];n.lt(e)&&i<1e5;)a.push(n.toNumber()),n=n.add(r),i++;return a}var KF=Ks(function(t,e,r){var n=+t,i=+e;return n+r*(i-n)}),VF=Ks(function(t,e,r){var n=e-+t;return n=n||1/0,(r-t)/n}),HF=Ks(function(t,e,r){var n=e-+t;return n=n||1/0,Math.max(0,Math.min(1,(r-t)/n))});const Vs={rangeStep:zF,getDigitCount:qF,interpolateNumber:KF,uninterpolateNumber:VF,uninterpolateTruncation:HF};function Tf(t){return XF(t)||YF(t)||wb(t)||GF()}function GF(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
98
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function YF(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function XF(t){if(Array.isArray(t))return jf(t)}function La(t,e){return QF(t)||ZF(t,e)||wb(t,e)||JF()}function JF(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
99
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wb(t,e){if(t){if(typeof t=="string")return jf(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return jf(t,e)}}function jf(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ZF(t,e){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(t)))){var r=[],n=!0,i=!1,a=void 0;try{for(var o=t[Symbol.iterator](),s;!(n=(s=o.next()).done)&&(r.push(s.value),!(e&&r.length===e));n=!0);}catch(u){i=!0,a=u}finally{try{!n&&o.return!=null&&o.return()}finally{if(i)throw a}}return r}}function QF(t){if(Array.isArray(t))return t}function _b(t){var e=La(t,2),r=e[0],n=e[1],i=r,a=n;return r>n&&(i=n,a=r),[i,a]}function xb(t,e,r){if(t.lte(0))return new $e(0);var n=Vs.getDigitCount(t.toNumber()),i=new $e(10).pow(n),a=t.div(i),o=n!==1?.05:.1,s=new $e(Math.ceil(a.div(o).toNumber())).add(r).mul(o),u=s.mul(i);return e?u:new $e(Math.ceil(u))}function eW(t,e,r){var n=1,i=new $e(t);if(!i.isint()&&r){var a=Math.abs(t);a<1?(n=new $e(10).pow(Vs.getDigitCount(t)-1),i=new $e(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new $e(Math.floor(t)))}else t===0?i=new $e(Math.floor((e-1)/2)):r||(i=new $e(Math.floor(t)));var o=Math.floor((e-1)/2),s=WF(FF(function(u){return i.add(new $e(u-o).mul(n)).toNumber()}),Pf);return s(0,e)}function Ob(t,e,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((e-t)/(r-1)))return{step:new $e(0),tickMin:new $e(0),tickMax:new $e(0)};var a=xb(new $e(e).sub(t).div(r-1),n,i),o;t<=0&&e>=0?o=new $e(0):(o=new $e(t).add(e).div(2),o=o.sub(new $e(o).mod(a)));var s=Math.ceil(o.sub(t).div(a).toNumber()),u=Math.ceil(new $e(e).sub(o).div(a).toNumber()),l=s+u+1;return l>r?Ob(t,e,r,n,i+1):(l<r&&(u=e>0?u+(r-l):u,s=e>0?s:s+(r-l)),{step:a,tickMin:o.sub(new $e(s).mul(a)),tickMax:o.add(new $e(u).mul(a))})}function tW(t){var e=La(t,2),r=e[0],n=e[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(i,2),s=_b([r,n]),u=La(s,2),l=u[0],c=u[1];if(l===-1/0||c===1/0){var f=c===1/0?[l].concat(Tf(Pf(0,i-1).map(function(){return 1/0}))):[].concat(Tf(Pf(0,i-1).map(function(){return-1/0})),[c]);return r>n?Ef(f):f}if(l===c)return eW(l,i,a);var d=Ob(l,c,o,a),h=d.step,y=d.tickMin,v=d.tickMax,p=Vs.rangeStep(y,v.add(new $e(.1).mul(h)),h);return r>n?Ef(p):p}function rW(t,e){var r=La(t,2),n=r[0],i=r[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=_b([n,i]),s=La(o,2),u=s[0],l=s[1];if(u===-1/0||l===1/0)return[n,i];if(u===l)return[u];var c=Math.max(e,2),f=xb(new $e(l).sub(u).div(c-1),a,0),d=[].concat(Tf(Vs.rangeStep(new $e(u),new $e(l).sub(new $e(.99).mul(f)),f)),[l]);return n>i?Ef(d):d}var nW=bb(tW),iW=bb(rW),aW=process.env.NODE_ENV==="production",$f="Invariant failed";function mt(t,e){if(aW)throw new Error($f);var r=typeof e=="function"?e():e,n=r?"".concat($f,": ").concat(r):$f;throw new Error(n)}var oW=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function yi(t){"@babel/helpers - typeof";return yi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yi(t)}function Hs(){return Hs=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Hs.apply(this,arguments)}function sW(t,e){return fW(t)||cW(t,e)||lW(t,e)||uW()}function uW(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
100
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lW(t,e){if(t){if(typeof t=="string")return Sb(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Sb(t,e)}}function Sb(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function cW(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,o,s=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(c){l=!0,i=c}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function fW(t){if(Array.isArray(t))return t}function dW(t,e){if(t==null)return{};var r=hW(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function hW(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function pW(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function vW(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Eb(n.key),n)}}function yW(t,e,r){return e&&vW(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function gW(t,e,r){return e=Gs(e),mW(t,Ab()?Reflect.construct(e,r||[],Gs(t).constructor):e.apply(t,r))}function mW(t,e){if(e&&(yi(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return bW(t)}function bW(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ab(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ab=function(){return!!t})()}function Gs(t){return Gs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Gs(t)}function wW(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&kf(t,e)}function kf(t,e){return kf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},kf(t,e)}function Pb(t,e,r){return e=Eb(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Eb(t){var e=_W(t,"string");return yi(e)=="symbol"?e:e+""}function _W(t,e){if(yi(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(yi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Ba=function(t){function e(){return pW(this,e),gW(this,e,arguments)}return wW(e,t),yW(e,[{key:"render",value:function(){var n=this.props,i=n.offset,a=n.layout,o=n.width,s=n.dataKey,u=n.data,l=n.dataPointFormatter,c=n.xAxis,f=n.yAxis,d=dW(n,oW),h=Q(d,!1);this.props.direction==="x"&&c.type!=="number"&&(process.env.NODE_ENV!=="production"?mt(!1,'ErrorBar requires Axis type property to be "number".'):mt());var y=u.map(function(v){var p=l(v,s),m=p.x,b=p.y,w=p.value,O=p.errorVal;if(!O)return null;var g=[],_,S;if(Array.isArray(O)){var A=sW(O,2);_=A[0],S=A[1]}else _=S=O;if(a==="vertical"){var E=c.scale,N=b+i,j=N+o,$=N-o,k=E(w-_),I=E(w+S);g.push({x1:I,y1:j,x2:I,y2:$}),g.push({x1:k,y1:N,x2:I,y2:N}),g.push({x1:k,y1:j,x2:k,y2:$})}else if(a==="horizontal"){var R=f.scale,M=m+i,L=M-o,q=M+o,z=R(w-_),D=R(w+S);g.push({x1:L,y1:D,x2:q,y2:D}),g.push({x1:M,y1:z,x2:M,y2:D}),g.push({x1:L,y1:z,x2:q,y2:z})}return x.createElement(pe,Hs({className:"recharts-errorBar",key:"bar-".concat(g.map(function(B){return"".concat(B.x1,"-").concat(B.x2,"-").concat(B.y1,"-").concat(B.y2)}))},h),g.map(function(B){return x.createElement("line",Hs({},B,{key:"line-".concat(B.x1,"-").concat(B.x2,"-").concat(B.y1,"-").concat(B.y2)}))}))});return x.createElement(pe,{className:"recharts-errorBars"},y)}}])}(x.Component);Pb(Ba,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"}),Pb(Ba,"displayName","ErrorBar");function Ua(t){"@babel/helpers - typeof";return Ua=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ua(t)}function Tb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function bn(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Tb(Object(r),!0).forEach(function(n){xW(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Tb(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function xW(t,e,r){return e=OW(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function OW(t){var e=SW(t,"string");return Ua(e)=="symbol"?e:e+""}function SW(t,e){if(Ua(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Ua(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var jb=function(e){var r=e.children,n=e.formattedGraphicalItems,i=e.legendWidth,a=e.legendContent,o=St(r,ln);if(!o)return null;var s=ln.defaultProps,u=s!==void 0?bn(bn({},s),o.props):{},l;return o.props&&o.props.payload?l=o.props&&o.props.payload:a==="children"?l=(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}}))},[]):l=(n||[]).map(function(c){var f=c.item,d=f.type.defaultProps,h=d!==void 0?bn(bn({},d),f.props):{},y=h.dataKey,v=h.name,p=h.legendType,m=h.hide;return{inactive:m,dataKey:y,type:u.iconType||p||"square",color:If(f),value:v||y,payload:h}}),bn(bn(bn({},u),ln.getWithHeight(o,i)),{},{payload:l,item:o})};function Fa(t){"@babel/helpers - typeof";return Fa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fa(t)}function $b(t){return TW(t)||EW(t)||PW(t)||AW()}function AW(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
101
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function PW(t,e){if(t){if(typeof t=="string")return Cf(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Cf(t,e)}}function EW(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function TW(t){if(Array.isArray(t))return Cf(t)}function Cf(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function kb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function qe(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?kb(Object(r),!0).forEach(function(n){gi(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):kb(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function gi(t,e,r){return e=jW(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function jW(t){var e=$W(t,"string");return Fa(e)=="symbol"?e:e+""}function $W(t,e){if(Fa(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Fa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function We(t,e,r){return fe(t)||fe(e)?r:Je(e)?xt(t,e,r):ae(e)?e(t):r}function Wa(t,e,r,n){var i=EF(t,function(s){return We(s,e)});if(r==="number"){var a=i.filter(function(s){return V(s)||parseFloat(s)});return a.length?[qs(a),Dr(a)]:[1/0,-1/0]}var o=n?i.filter(function(s){return!fe(s)}):i;return o.map(function(s){return Je(s)||s instanceof Date?s:""})}var kW=function(e){var r,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,a=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(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var u=a.range,l=0;l<s;l++){var c=l>0?i[l-1].coordinate:i[s-1].coordinate,f=i[l].coordinate,d=l>=s-1?i[0].coordinate:i[l+1].coordinate,h=void 0;if(ft(f-c)!==ft(d-f)){var y=[];if(ft(d-f)===ft(u[1]-u[0])){h=d;var v=f+u[1]-u[0];y[0]=Math.min(v,(v+c)/2),y[1]=Math.max(v,(v+c)/2)}else{h=c;var p=d+u[1]-u[0];y[0]=Math.min(f,(p+f)/2),y[1]=Math.max(f,(p+f)/2)}var m=[Math.min(f,(h+f)/2),Math.max(f,(h+f)/2)];if(e>m[0]&&e<=m[1]||e>=y[0]&&e<=y[1]){o=i[l].index;break}}else{var b=Math.min(c,d),w=Math.max(c,d);if(e>(b+f)/2&&e<=(w+f)/2){o=i[l].index;break}}}else for(var O=0;O<s;O++)if(O===0&&e<=(n[O].coordinate+n[O+1].coordinate)/2||O>0&&O<s-1&&e>(n[O].coordinate+n[O-1].coordinate)/2&&e<=(n[O].coordinate+n[O+1].coordinate)/2||O===s-1&&e>(n[O].coordinate+n[O-1].coordinate)/2){o=n[O].index;break}return o},If=function(e){var r,n=e,i=n.type.displayName,a=(r=e.type)!==null&&r!==void 0&&r.defaultProps?qe(qe({},e.type.defaultProps),e.props):e.props,o=a.stroke,s=a.fill,u;switch(i){case"Line":u=o;break;case"Area":case"Radar":u=o&&o!=="none"?o:s;break;default:u=s;break}return u},CW=function(e){var r=e.barSize,n=e.totalSize,i=e.stackGroups,a=i===void 0?{}:i;if(!a)return{};for(var o={},s=Object.keys(a),u=0,l=s.length;u<l;u++)for(var c=a[s[u]].stackGroups,f=Object.keys(c),d=0,h=f.length;d<h;d++){var y=c[f[d]],v=y.items,p=y.cateAxisId,m=v.filter(function(S){return fr(S.type).indexOf("Bar")>=0});if(m&&m.length){var b=m[0].type.defaultProps,w=b!==void 0?qe(qe({},b),m[0].props):m[0].props,O=w.barSize,g=w[p];o[g]||(o[g]=[]);var _=fe(O)?r:O;o[g].push({item:m[0],stackList:m.slice(1),barSize:fe(_)?void 0:dt(_,n,0)})}}return o},IW=function(e){var r=e.barGap,n=e.barCategoryGap,i=e.bandSize,a=e.sizeList,o=a===void 0?[]:a,s=e.maxBarSize,u=o.length;if(u<1)return null;var l=dt(r,i,0,!0),c,f=[];if(o[0].barSize===+o[0].barSize){var d=!1,h=i/u,y=o.reduce(function(O,g){return O+g.barSize||0},0);y+=(u-1)*l,y>=i&&(y-=(u-1)*l,l=0),y>=i&&h>0&&(d=!0,h*=.9,y=u*h);var v=(i-y)/2>>0,p={offset:v-l,size:0};c=o.reduce(function(O,g){var _={item:g.item,position:{offset:p.offset+p.size+l,size:d?h:g.barSize}},S=[].concat($b(O),[_]);return p=S[S.length-1].position,g.stackList&&g.stackList.length&&g.stackList.forEach(function(A){S.push({item:A,position:p})}),S},f)}else{var m=dt(n,i,0,!0);i-2*m-(u-1)*l<=0&&(l=0);var b=(i-2*m-(u-1)*l)/u;b>1&&(b>>=0);var w=s===+s?Math.min(b,s):b;c=o.reduce(function(O,g,_){var S=[].concat($b(O),[{item:g.item,position:{offset:m+(b+l)*_+(b-w)/2,size:w}}]);return g.stackList&&g.stackList.length&&g.stackList.forEach(function(A){S.push({item:A,position:S[S.length-1].position})}),S},f)}return c},NW=function(e,r,n,i){var a=n.children,o=n.width,s=n.margin,u=o-(s.left||0)-(s.right||0),l=jb({children:a,legendWidth:u});if(l){var c=i||{},f=c.width,d=c.height,h=l.align,y=l.verticalAlign,v=l.layout;if((v==="vertical"||v==="horizontal"&&y==="middle")&&h!=="center"&&V(e[h]))return qe(qe({},e),{},gi({},h,e[h]+(f||0)));if((v==="horizontal"||v==="vertical"&&h==="center")&&y!=="middle"&&V(e[y]))return qe(qe({},e),{},gi({},y,e[y]+(d||0)))}return e},MW=function(e,r,n){return fe(r)?!0:e==="horizontal"?r==="yAxis":e==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},Cb=function(e,r,n,i,a){var o=r.props.children,s=Ot(o,Ba).filter(function(l){return MW(i,a,l.props.direction)});if(s&&s.length){var u=s.map(function(l){return l.props.dataKey});return e.reduce(function(l,c){var f=We(c,n);if(fe(f))return l;var d=Array.isArray(f)?[qs(f),Dr(f)]:[f,f],h=u.reduce(function(y,v){var p=We(c,v,0),m=d[0]-Math.abs(Array.isArray(p)?p[0]:p),b=d[1]+Math.abs(Array.isArray(p)?p[1]:p);return[Math.min(m,y[0]),Math.max(b,y[1])]},[1/0,-1/0]);return[Math.min(h[0],l[0]),Math.max(h[1],l[1])]},[1/0,-1/0])}return null},DW=function(e,r,n,i,a){var o=r.map(function(s){return Cb(e,s,n,a,i)}).filter(function(s){return!fe(s)});return o&&o.length?o.reduce(function(s,u){return[Math.min(s[0],u[0]),Math.max(s[1],u[1])]},[1/0,-1/0]):null},Ib=function(e,r,n,i,a){var o=r.map(function(u){var l=u.props.dataKey;return n==="number"&&l&&Cb(e,u,l,i)||Wa(e,l,n,a)});if(n==="number")return o.reduce(function(u,l){return[Math.min(u[0],l[0]),Math.max(u[1],l[1])]},[1/0,-1/0]);var s={};return o.reduce(function(u,l){for(var c=0,f=l.length;c<f;c++)s[l[c]]||(s[l[c]]=!0,u.push(l[c]));return u},[])},Nb=function(e,r){return e==="horizontal"&&r==="xAxis"||e==="vertical"&&r==="yAxis"||e==="centric"&&r==="angleAxis"||e==="radial"&&r==="radiusAxis"},Mb=function(e,r,n,i){if(i)return e.map(function(u){return u.coordinate});var a,o,s=e.map(function(u){return u.coordinate===r&&(a=!0),u.coordinate===n&&(o=!0),u.coordinate});return a||s.push(r),o||s.push(n),s},wr=function(e,r,n){if(!e)return null;var i=e.scale,a=e.duplicateDomain,o=e.type,s=e.range,u=e.realScaleType==="scaleBand"?i.bandwidth()/2:2,l=(r||n)&&o==="category"&&i.bandwidth?i.bandwidth()/u:0;if(l=e.axisType==="angleAxis"&&(s==null?void 0:s.length)>=2?ft(s[0]-s[1])*2*l:l,r&&(e.ticks||e.niceTicks)){var c=(e.ticks||e.niceTicks).map(function(f){var d=a?a.indexOf(f):f;return{coordinate:i(d)+l,value:f,offset:l}});return c.filter(function(f){return!Xn(f.coordinate)})}return e.isCategorical&&e.categoricalDomain?e.categoricalDomain.map(function(f,d){return{coordinate:i(f)+l,value:f,index:d,offset:l}}):i.ticks&&!n?i.ticks(e.tickCount).map(function(f){return{coordinate:i(f)+l,value:f,offset:l}}):i.domain().map(function(f,d){return{coordinate:i(f)+l,value:a?a[f]:f,index:d,offset:l}})},Nf=new WeakMap,Ys=function(e,r){if(typeof r!="function")return e;Nf.has(e)||Nf.set(e,new WeakMap);var n=Nf.get(e);if(n.has(r))return n.get(r);var i=function(){e.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,i),i},Db=function(e,r,n){var i=e.scale,a=e.type,o=e.layout,s=e.axisType;if(i==="auto")return o==="radial"&&s==="radiusAxis"?{scale:Aa(),realScaleType:"band"}:o==="radial"&&s==="angleAxis"?{scale:Is(),realScaleType:"linear"}:a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:Pa(),realScaleType:"point"}:a==="category"?{scale:Aa(),realScaleType:"band"}:{scale:Is(),realScaleType:"linear"};if(rn(i)){var u="scale".concat(Jo(i));return{scale:(ob[u]||Pa)(),realScaleType:ob[u]?u:"point"}}return ae(i)?{scale:i}:{scale:Pa(),realScaleType:"point"}},Rb=1e-4,Lb=function(e){var r=e.domain();if(!(!r||r.length<=2)){var n=r.length,i=e.range(),a=Math.min(i[0],i[1])-Rb,o=Math.max(i[0],i[1])+Rb,s=e(r[0]),u=e(r[n-1]);(s<a||s>o||u<a||u>o)&&e.domain([r[0],r[n-1]])}},RW=function(e,r){if(!e)return null;for(var n=0,i=e.length;n<i;n++)if(e[n].item===r)return e[n].position;return null},LW=function(e,r){if(!r||r.length!==2||!V(r[0])||!V(r[1]))return e;var n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]),a=[e[0],e[1]];return(!V(e[0])||e[0]<n)&&(a[0]=n),(!V(e[1])||e[1]>i)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]<n&&(a[1]=n),a},BW=function(e){var r=e.length;if(!(r<=0))for(var n=0,i=e[0].length;n<i;++n)for(var a=0,o=0,s=0;s<r;++s){var u=Xn(e[s][n][1])?e[s][n][0]:e[s][n][1];u>=0?(e[s][n][0]=a,e[s][n][1]=a+u,a=e[s][n][1]):(e[s][n][0]=o,e[s][n][1]=o+u,o=e[s][n][1])}},UW=function(e){var r=e.length;if(!(r<=0))for(var n=0,i=e[0].length;n<i;++n)for(var a=0,o=0;o<r;++o){var s=Xn(e[o][n][1])?e[o][n][0]:e[o][n][1];s>=0?(e[o][n][0]=a,e[o][n][1]=a+s,a=e[o][n][1]):(e[o][n][0]=0,e[o][n][1]=0)}},FW={sign:BW,expand:o$,none:Zn,silhouette:s$,wiggle:u$,positive:UW},WW=function(e,r,n){var i=r.map(function(s){return s.props.dataKey}),a=FW[n],o=a$().keys(i).value(function(s,u){return+We(s,u,0)}).order(oc).offset(a);return o(e)},qW=function(e,r,n,i,a,o){if(!e)return null;var s=o?r.reverse():r,u={},l=s.reduce(function(f,d){var h,y=(h=d.type)!==null&&h!==void 0&&h.defaultProps?qe(qe({},d.type.defaultProps),d.props):d.props,v=y.stackId,p=y.hide;if(p)return f;var m=y[n],b=f[m]||{hasStack:!1,stackGroups:{}};if(Je(v)){var w=b.stackGroups[v]||{numericAxisId:n,cateAxisId:i,items:[]};w.items.push(d),b.hasStack=!0,b.stackGroups[v]=w}else b.stackGroups[an("_stackId_")]={numericAxisId:n,cateAxisId:i,items:[d]};return qe(qe({},f),{},gi({},m,b))},u),c={};return Object.keys(l).reduce(function(f,d){var h=l[d];if(h.hasStack){var y={};h.stackGroups=Object.keys(h.stackGroups).reduce(function(v,p){var m=h.stackGroups[p];return qe(qe({},v),{},gi({},p,{numericAxisId:n,cateAxisId:i,items:m.items,stackedData:WW(e,m.items,a)}))},y)}return qe(qe({},f),{},gi({},d,h))},c)},Bb=function(e,r){var n=r.realScaleType,i=r.type,a=r.tickCount,o=r.originalDomain,s=r.allowDecimals,u=n||r.scale;if(u!=="auto"&&u!=="linear")return null;if(a&&i==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var l=e.domain();if(!l.length)return null;var c=nW(l,a,s);return e.domain([qs(c),Dr(c)]),{niceTicks:c}}if(a&&i==="number"){var f=e.domain(),d=iW(f,a,s);return{niceTicks:d}}return null};function Xs(t){var e=t.axis,r=t.ticks,n=t.bandSize,i=t.entry,a=t.index,o=t.dataKey;if(e.type==="category"){if(!e.allowDuplicatedCategory&&e.dataKey&&!fe(i[e.dataKey])){var s=Yo(r,"value",i[e.dataKey]);if(s)return s.coordinate+n/2}return r[a]?r[a].coordinate+n/2:null}var u=We(i,fe(o)?e.dataKey:o);return fe(u)?null:e.scale(u)}var Ub=function(e){var r=e.axis,n=e.ticks,i=e.offset,a=e.bandSize,o=e.entry,s=e.index;if(r.type==="category")return n[s]?n[s].coordinate+i:null;var u=We(o,r.dataKey,r.domain[s]);return fe(u)?null:r.scale(u)-a/2+i},zW=function(e){var r=e.numericAxis,n=r.scale.domain();if(r.type==="number"){var i=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]);return i<=0&&a>=0?0:a<0?a:i}return n[0]},KW=function(e,r){var n,i=(n=e.type)!==null&&n!==void 0&&n.defaultProps?qe(qe({},e.type.defaultProps),e.props):e.props,a=i.stackId;if(Je(a)){var o=r[a];if(o){var s=o.items.indexOf(e);return s>=0?o.stackedData[s]:null}}return null},VW=function(e){return e.reduce(function(r,n){return[qs(n.concat([r[0]]).filter(V)),Dr(n.concat([r[1]]).filter(V))]},[1/0,-1/0])},Fb=function(e,r,n){return Object.keys(e).reduce(function(i,a){var o=e[a],s=o.stackedData,u=s.reduce(function(l,c){var f=VW(c.slice(r,n+1));return[Math.min(l[0],f[0]),Math.max(l[1],f[1])]},[1/0,-1/0]);return[Math.min(u[0],i[0]),Math.max(u[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},Wb=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,qb=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Mf=function(e,r,n){if(ae(e))return e(r,n);if(!Array.isArray(e))return r;var i=[];if(V(e[0]))i[0]=n?e[0]:Math.min(e[0],r[0]);else if(Wb.test(e[0])){var a=+Wb.exec(e[0])[1];i[0]=r[0]-a}else ae(e[0])?i[0]=e[0](r[0]):i[0]=r[0];if(V(e[1]))i[1]=n?e[1]:Math.max(e[1],r[1]);else if(qb.test(e[1])){var o=+qb.exec(e[1])[1];i[1]=r[1]+o}else ae(e[1])?i[1]=e[1](r[1]):i[1]=r[1];return i},Js=function(e,r,n){if(e&&e.scale&&e.scale.bandwidth){var i=e.scale.bandwidth();if(!n||i>0)return i}if(e&&r&&r.length>=2){for(var a=Tc(r,function(f){return f.coordinate}),o=1/0,s=1,u=a.length;s<u;s++){var l=a[s],c=a[s-1];o=Math.min((l.coordinate||0)-(c.coordinate||0),o)}return o===1/0?0:o}return n?void 0:0},zb=function(e,r,n){return!e||!e.length||Rr(e,xt(n,"type.defaultProps.domain"))?r:e},Kb=function(e,r){var n=e.type.defaultProps?qe(qe({},e.type.defaultProps),e.props):e.props,i=n.dataKey,a=n.name,o=n.unit,s=n.formatter,u=n.tooltipType,l=n.chartType,c=n.hide;return qe(qe({},Q(e,!1)),{},{dataKey:i,unit:o,formatter:s,name:a||i,color:If(e),value:We(r,i),type:u,payload:r,chartType:l,hide:c})};function qa(t){"@babel/helpers - typeof";return qa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qa(t)}function Vb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function _r(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Vb(Object(r),!0).forEach(function(n){Hb(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Vb(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Hb(t,e,r){return e=HW(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function HW(t){var e=GW(t,"string");return qa(e)=="symbol"?e:e+""}function GW(t,e){if(qa(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(qa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function YW(t,e){return QW(t)||ZW(t,e)||JW(t,e)||XW()}function XW(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
102
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function JW(t,e){if(t){if(typeof t=="string")return Gb(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Gb(t,e)}}function Gb(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ZW(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,o,s=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(c){l=!0,i=c}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function QW(t){if(Array.isArray(t))return t}var Zs=Math.PI/180,eq=function(e){return e*180/Math.PI},we=function(e,r,n,i){return{x:e+Math.cos(-Zs*i)*n,y:r+Math.sin(-Zs*i)*n}},Yb=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(e-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},Xb=function(e,r,n,i,a){var o=e.width,s=e.height,u=e.startAngle,l=e.endAngle,c=dt(e.cx,o,o/2),f=dt(e.cy,s,s/2),d=Yb(o,s,n),h=dt(e.innerRadius,d,0),y=dt(e.outerRadius,d,d*.8),v=Object.keys(r);return v.reduce(function(p,m){var b=r[m],w=b.domain,O=b.reversed,g;if(fe(b.range))i==="angleAxis"?g=[u,l]:i==="radiusAxis"&&(g=[h,y]),O&&(g=[g[1],g[0]]);else{g=b.range;var _=g,S=YW(_,2);u=S[0],l=S[1]}var A=Db(b,a),E=A.realScaleType,N=A.scale;N.domain(w).range(g),Lb(N);var j=Bb(N,_r(_r({},b),{},{realScaleType:E})),$=_r(_r(_r({},b),j),{},{range:g,radius:y,realScaleType:E,scale:N,cx:c,cy:f,innerRadius:h,outerRadius:y,startAngle:u,endAngle:l});return _r(_r({},p),{},Hb({},m,$))},{})},tq=function(e,r){var n=e.x,i=e.y,a=r.x,o=r.y;return Math.sqrt(Math.pow(n-a,2)+Math.pow(i-o,2))},rq=function(e,r){var n=e.x,i=e.y,a=r.cx,o=r.cy,s=tq({x:n,y:i},{x:a,y:o});if(s<=0)return{radius:s};var u=(n-a)/s,l=Math.acos(u);return i>o&&(l=2*Math.PI-l),{radius:s,angle:eq(l),angleInRadian:l}},nq=function(e){var r=e.startAngle,n=e.endAngle,i=Math.floor(r/360),a=Math.floor(n/360),o=Math.min(i,a);return{startAngle:r-o*360,endAngle:n-o*360}},iq=function(e,r){var n=r.startAngle,i=r.endAngle,a=Math.floor(n/360),o=Math.floor(i/360),s=Math.min(a,o);return e+s*360},Jb=function(e,r){var n=e.x,i=e.y,a=rq({x:n,y:i},r),o=a.radius,s=a.angle,u=r.innerRadius,l=r.outerRadius;if(o<u||o>l)return!1;if(o===0)return!0;var c=nq(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?_r(_r({},r),{},{radius:o,angle:iq(h,r)}):null},Zb=function(e){return!x.isValidElement(e)&&!ae(e)&&typeof e!="boolean"?e.className:""};function za(t){"@babel/helpers - typeof";return za=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},za(t)}var aq=["offset"];function oq(t){return cq(t)||lq(t)||uq(t)||sq()}function sq(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
103
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uq(t,e){if(t){if(typeof t=="string")return Df(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Df(t,e)}}function lq(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function cq(t){if(Array.isArray(t))return Df(t)}function Df(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function fq(t,e){if(t==null)return{};var r=dq(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function dq(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function Qb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Qe(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Qb(Object(r),!0).forEach(function(n){hq(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Qb(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function hq(t,e,r){return e=pq(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function pq(t){var e=vq(t,"string");return za(e)=="symbol"?e:e+""}function vq(t,e){if(za(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(za(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ka(){return Ka=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Ka.apply(this,arguments)}var yq=function(e){var r=e.value,n=e.formatter,i=fe(e.children)?r:e.children;return ae(n)?n(i):i},gq=function(e,r){var n=ft(r-e),i=Math.min(Math.abs(r-e),360);return n*i},mq=function(e,r,n){var i=e.position,a=e.viewBox,o=e.offset,s=e.className,u=a,l=u.cx,c=u.cy,f=u.innerRadius,d=u.outerRadius,h=u.startAngle,y=u.endAngle,v=u.clockWise,p=(f+d)/2,m=gq(h,y),b=m>=0?1:-1,w,O;i==="insideStart"?(w=h+b*o,O=v):i==="insideEnd"?(w=y-b*o,O=!v):i==="end"&&(w=y+b*o,O=v),O=m<=0?O:!O;var g=we(l,c,p,w),_=we(l,c,p,w+(O?1:-1)*359),S="M".concat(g.x,",").concat(g.y,`
|
|
104
104
|
A`).concat(p,",").concat(p,",0,1,").concat(O?0:1,`,
|
|
105
|
-
`).concat(_.x,",").concat(_.y),A=fe(e.id)?an("recharts-radial-line-"):e.id;return x.createElement("text",Ka({},n,{dominantBaseline:"central",className:le("recharts-radial-bar-label",s)}),x.createElement("defs",null,x.createElement("path",{id:A,d:S})),x.createElement("textPath",{xlinkHref:"#".concat(A)},r))},
|
|
106
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
105
|
+
`).concat(_.x,",").concat(_.y),A=fe(e.id)?an("recharts-radial-line-"):e.id;return x.createElement("text",Ka({},n,{dominantBaseline:"central",className:le("recharts-radial-bar-label",s)}),x.createElement("defs",null,x.createElement("path",{id:A,d:S})),x.createElement("textPath",{xlinkHref:"#".concat(A)},r))},bq=function(e){var r=e.viewBox,n=e.offset,i=e.position,a=r,o=a.cx,s=a.cy,u=a.innerRadius,l=a.outerRadius,c=a.startAngle,f=a.endAngle,d=(c+f)/2;if(i==="outside"){var h=we(o,s,l+n,d),y=h.x,v=h.y;return{x:y,y:v,textAnchor:y>=o?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"end"};var p=(u+l)/2,m=we(o,s,p,d),b=m.x,w=m.y;return{x:b,y:w,textAnchor:"middle",verticalAnchor:"middle"}},wq=function(e){var r=e.viewBox,n=e.parentViewBox,i=e.offset,a=e.position,o=r,s=o.x,u=o.y,l=o.width,c=o.height,f=c>=0?1:-1,d=f*i,h=f>0?"end":"start",y=f>0?"start":"end",v=l>=0?1:-1,p=v*i,m=v>0?"end":"start",b=v>0?"start":"end";if(a==="top"){var w={x:s+l/2,y:u-f*i,textAnchor:"middle",verticalAnchor:h};return Qe(Qe({},w),n?{height:Math.max(u-n.y,0),width:l}:{})}if(a==="bottom"){var O={x:s+l/2,y:u+c+d,textAnchor:"middle",verticalAnchor:y};return Qe(Qe({},O),n?{height:Math.max(n.y+n.height-(u+c),0),width:l}:{})}if(a==="left"){var g={x:s-p,y:u+c/2,textAnchor:m,verticalAnchor:"middle"};return Qe(Qe({},g),n?{width:Math.max(g.x-n.x,0),height:c}:{})}if(a==="right"){var _={x:s+l+p,y:u+c/2,textAnchor:b,verticalAnchor:"middle"};return Qe(Qe({},_),n?{width:Math.max(n.x+n.width-_.x,0),height:c}:{})}var S=n?{width:l,height:c}:{};return a==="insideLeft"?Qe({x:s+p,y:u+c/2,textAnchor:b,verticalAnchor:"middle"},S):a==="insideRight"?Qe({x:s+l-p,y:u+c/2,textAnchor:m,verticalAnchor:"middle"},S):a==="insideTop"?Qe({x:s+l/2,y:u+d,textAnchor:"middle",verticalAnchor:y},S):a==="insideBottom"?Qe({x:s+l/2,y:u+c-d,textAnchor:"middle",verticalAnchor:h},S):a==="insideTopLeft"?Qe({x:s+p,y:u+d,textAnchor:b,verticalAnchor:y},S):a==="insideTopRight"?Qe({x:s+l-p,y:u+d,textAnchor:m,verticalAnchor:y},S):a==="insideBottomLeft"?Qe({x:s+p,y:u+c-d,textAnchor:b,verticalAnchor:h},S):a==="insideBottomRight"?Qe({x:s+l-p,y:u+c-d,textAnchor:m,verticalAnchor:h},S):Vn(a)&&(V(a.x)||nn(a.x))&&(V(a.y)||nn(a.y))?Qe({x:s+dt(a.x,l),y:u+dt(a.y,c),textAnchor:"end",verticalAnchor:"end"},S):Qe({x:s+l/2,y:u+c/2,textAnchor:"middle",verticalAnchor:"middle"},S)},_q=function(e){return"cx"in e&&V(e.cx)};function nt(t){var e=t.offset,r=e===void 0?5:e,n=fq(t,aq),i=Qe({offset:r},n),a=i.viewBox,o=i.position,s=i.value,u=i.children,l=i.content,c=i.className,f=c===void 0?"":c,d=i.textBreakAll;if(!a||fe(s)&&fe(u)&&!x.isValidElement(l)&&!ae(l))return null;if(x.isValidElement(l))return x.cloneElement(l,i);var h;if(ae(l)){if(h=x.createElement(l,i),x.isValidElement(h))return h}else h=yq(i);var y=_q(a),v=Q(i,!0);if(y&&(o==="insideStart"||o==="insideEnd"||o==="end"))return mq(i,h,v);var p=y?bq(i):wq(i);return x.createElement(cn,Ka({className:le("recharts-label",f)},v,p,{breakAll:d}),h)}nt.displayName="Label";var e0=function(e){var r=e.cx,n=e.cy,i=e.angle,a=e.startAngle,o=e.endAngle,s=e.r,u=e.radius,l=e.innerRadius,c=e.outerRadius,f=e.x,d=e.y,h=e.top,y=e.left,v=e.width,p=e.height,m=e.clockWise,b=e.labelViewBox;if(b)return b;if(V(v)&&V(p)){if(V(f)&&V(d))return{x:f,y:d,width:v,height:p};if(V(h)&&V(y))return{x:h,y,width:v,height:p}}return V(f)&&V(d)?{x:f,y:d,width:0,height:0}:V(r)&&V(n)?{cx:r,cy:n,startAngle:a||i||0,endAngle:o||i||0,innerRadius:l||0,outerRadius:c||u||s||0,clockWise:m}:e.viewBox?e.viewBox:{}},xq=function(e,r){return e?e===!0?x.createElement(nt,{key:"label-implicit",viewBox:r}):Je(e)?x.createElement(nt,{key:"label-implicit",viewBox:r,value:e}):x.isValidElement(e)?e.type===nt?x.cloneElement(e,{key:"label-implicit",viewBox:r}):x.createElement(nt,{key:"label-implicit",content:e,viewBox:r}):ae(e)?x.createElement(nt,{key:"label-implicit",content:e,viewBox:r}):Vn(e)?x.createElement(nt,Ka({viewBox:r},e,{key:"label-implicit"})):null:null},Oq=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var i=e.children,a=e0(e),o=Ot(i,nt).map(function(u,l){return x.cloneElement(u,{viewBox:r||a,key:"label-".concat(l)})});if(!n)return o;var s=xq(e.label,r||a);return[s].concat(oq(o))};nt.parseViewBox=e0,nt.renderCallByParent=Oq;function Sq(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}var Aq=Sq;const t0=je(Aq);function Va(t){"@babel/helpers - typeof";return Va=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Va(t)}var Pq=["valueAccessor"],Eq=["data","dataKey","clockWise","id","textBreakAll"];function Tq(t){return Cq(t)||kq(t)||$q(t)||jq()}function jq(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
106
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $q(t,e){if(t){if(typeof t=="string")return Rf(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Rf(t,e)}}function kq(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Cq(t){if(Array.isArray(t))return Rf(t)}function Rf(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Qs(){return Qs=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Qs.apply(this,arguments)}function r0(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function n0(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?r0(Object(r),!0).forEach(function(n){Iq(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):r0(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Iq(t,e,r){return e=Nq(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Nq(t){var e=Mq(t,"string");return Va(e)=="symbol"?e:e+""}function Mq(t,e){if(Va(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Va(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function i0(t,e){if(t==null)return{};var r=Dq(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Dq(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}var Rq=function(e){return Array.isArray(e.value)?t0(e.value):e.value};function Ht(t){var e=t.valueAccessor,r=e===void 0?Rq:e,n=i0(t,Pq),i=n.data,a=n.dataKey,o=n.clockWise,s=n.id,u=n.textBreakAll,l=i0(n,Eq);return!i||!i.length?null:x.createElement(pe,{className:"recharts-label-list"},i.map(function(c,f){var d=fe(a)?r(c,f):We(c&&c.payload,a),h=fe(s)?{}:{id:"".concat(s,"-").concat(f)};return x.createElement(nt,Qs({},Q(c,!0),l,h,{parentViewBox:c.parentViewBox,value:d,textBreakAll:u,viewBox:nt.parseViewBox(fe(o)?c:n0(n0({},c),{},{clockWise:o})),key:"label-".concat(f),index:f}))}))}Ht.displayName="LabelList";function Lq(t,e){return t?t===!0?x.createElement(Ht,{key:"labelList-implicit",data:e}):x.isValidElement(t)||ae(t)?x.createElement(Ht,{key:"labelList-implicit",data:e,content:t}):Vn(t)?x.createElement(Ht,Qs({data:e},t,{key:"labelList-implicit"})):null:null}function Bq(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var n=t.children,i=Ot(n,Ht).map(function(o,s){return x.cloneElement(o,{data:e,key:"labelList-".concat(s)})});if(!r)return i;var a=Lq(t.label,e);return[a].concat(Tq(i))}Ht.renderCallByParent=Bq;function Ha(t){"@babel/helpers - typeof";return Ha=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ha(t)}function Lf(){return Lf=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Lf.apply(this,arguments)}function a0(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function o0(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?a0(Object(r),!0).forEach(function(n){Uq(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):a0(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Uq(t,e,r){return e=Fq(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Fq(t){var e=Wq(t,"string");return Ha(e)=="symbol"?e:e+""}function Wq(t,e){if(Ha(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Ha(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var qq=function(e,r){var n=ft(r-e),i=Math.min(Math.abs(r-e),359.999);return n*i},eu=function(e){var r=e.cx,n=e.cy,i=e.radius,a=e.angle,o=e.sign,s=e.isExternal,u=e.cornerRadius,l=e.cornerIsExternal,c=u*(s?1:-1)+i,f=Math.asin(u/c)/Zs,d=l?a:a+o*f,h=we(r,n,c,d),y=we(r,n,i,d),v=l?a-o*f:a,p=we(r,n,c*Math.cos(f*Zs),v);return{center:h,circleTangency:y,lineTangency:p,theta:f}},s0=function(e){var r=e.cx,n=e.cy,i=e.innerRadius,a=e.outerRadius,o=e.startAngle,s=e.endAngle,u=qq(o,s),l=o+u,c=we(r,n,a,o),f=we(r,n,a,l),d="M ".concat(c.x,",").concat(c.y,`
|
|
107
107
|
A `).concat(a,",").concat(a,`,0,
|
|
108
108
|
`).concat(+(Math.abs(u)>180),",").concat(+(o>l),`,
|
|
109
109
|
`).concat(f.x,",").concat(f.y,`
|
|
110
110
|
`);if(i>0){var h=we(r,n,i,o),y=we(r,n,i,l);d+="L ".concat(y.x,",").concat(y.y,`
|
|
111
111
|
A `).concat(i,",").concat(i,`,0,
|
|
112
112
|
`).concat(+(Math.abs(u)>180),",").concat(+(o<=l),`,
|
|
113
|
-
`).concat(h.x,",").concat(h.y," Z")}else d+="L ".concat(r,",").concat(n," Z");return d},
|
|
113
|
+
`).concat(h.x,",").concat(h.y," Z")}else d+="L ".concat(r,",").concat(n," Z");return d},zq=function(e){var r=e.cx,n=e.cy,i=e.innerRadius,a=e.outerRadius,o=e.cornerRadius,s=e.forceCornerRadius,u=e.cornerIsExternal,l=e.startAngle,c=e.endAngle,f=ft(c-l),d=eu({cx:r,cy:n,radius:a,angle:l,sign:f,cornerRadius:o,cornerIsExternal:u}),h=d.circleTangency,y=d.lineTangency,v=d.theta,p=eu({cx:r,cy:n,radius:a,angle:c,sign:-f,cornerRadius:o,cornerIsExternal:u}),m=p.circleTangency,b=p.lineTangency,w=p.theta,O=u?Math.abs(l-c):Math.abs(l-c)-v-w;if(O<0)return s?"M ".concat(y.x,",").concat(y.y,`
|
|
114
114
|
a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0
|
|
115
115
|
a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0
|
|
116
|
-
`):
|
|
116
|
+
`):s0({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:l,endAngle:c});var g="M ".concat(y.x,",").concat(y.y,`
|
|
117
117
|
A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(h.x,",").concat(h.y,`
|
|
118
118
|
A`).concat(a,",").concat(a,",0,").concat(+(O>180),",").concat(+(f<0),",").concat(m.x,",").concat(m.y,`
|
|
119
119
|
A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(b.x,",").concat(b.y,`
|
|
120
|
-
`);if(i>0){var _=
|
|
121
|
-
A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(
|
|
122
|
-
A`).concat(i,",").concat(i,",0,").concat(+(
|
|
123
|
-
A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(A.x,",").concat(A.y,"Z")}else g+="L".concat(r,",").concat(n,"Z");return g},
|
|
120
|
+
`);if(i>0){var _=eu({cx:r,cy:n,radius:i,angle:l,sign:f,isExternal:!0,cornerRadius:o,cornerIsExternal:u}),S=_.circleTangency,A=_.lineTangency,E=_.theta,N=eu({cx:r,cy:n,radius:i,angle:c,sign:-f,isExternal:!0,cornerRadius:o,cornerIsExternal:u}),j=N.circleTangency,$=N.lineTangency,k=N.theta,I=u?Math.abs(l-c):Math.abs(l-c)-E-k;if(I<0&&o===0)return"".concat(g,"L").concat(r,",").concat(n,"Z");g+="L".concat($.x,",").concat($.y,`
|
|
121
|
+
A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(j.x,",").concat(j.y,`
|
|
122
|
+
A`).concat(i,",").concat(i,",0,").concat(+(I>180),",").concat(+(f>0),",").concat(S.x,",").concat(S.y,`
|
|
123
|
+
A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(A.x,",").concat(A.y,"Z")}else g+="L".concat(r,",").concat(n,"Z");return g},Kq={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},u0=function(e){var r=o0(o0({},Kq),e),n=r.cx,i=r.cy,a=r.innerRadius,o=r.outerRadius,s=r.cornerRadius,u=r.forceCornerRadius,l=r.cornerIsExternal,c=r.startAngle,f=r.endAngle,d=r.className;if(o<a||c===f)return null;var h=le("recharts-sector",d),y=o-a,v=dt(s,y,0,!0),p;return v>0&&Math.abs(c-f)<360?p=zq({cx:n,cy:i,innerRadius:a,outerRadius:o,cornerRadius:Math.min(v,y/2),forceCornerRadius:u,cornerIsExternal:l,startAngle:c,endAngle:f}):p=s0({cx:n,cy:i,innerRadius:a,outerRadius:o,startAngle:c,endAngle:f}),x.createElement("path",Lf({},Q(r,!0),{className:h,d:p,role:"img"}))};function Ga(t){"@babel/helpers - typeof";return Ga=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ga(t)}function Bf(){return Bf=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Bf.apply(this,arguments)}function l0(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function c0(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?l0(Object(r),!0).forEach(function(n){Vq(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):l0(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Vq(t,e,r){return e=Hq(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Hq(t){var e=Gq(t,"string");return Ga(e)=="symbol"?e:e+""}function Gq(t,e){if(Ga(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Ga(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var f0={curveBasisClosed:Gj,curveBasisOpen:Yj,curveBasis:Hj,curveBumpX:Ij,curveBumpY:Nj,curveLinearClosed:Xj,curveLinear:ts,curveMonotoneX:Jj,curveMonotoneY:Zj,curveNatural:Qj,curveStep:e$,curveStepAfter:r$,curveStepBefore:t$},tu=function(e){return e.x===+e.x&&e.y===+e.y},Ya=function(e){return e.x},Xa=function(e){return e.y},Yq=function(e,r){if(ae(e))return e;var n="curve".concat(Jo(e));return(n==="curveMonotone"||n==="curveBump")&&r?f0["".concat(n).concat(r==="vertical"?"Y":"X")]:f0[n]||ts},Xq=function(e){var r=e.type,n=r===void 0?"linear":r,i=e.points,a=i===void 0?[]:i,o=e.baseLine,s=e.layout,u=e.connectNulls,l=u===void 0?!1:u,c=Yq(n,s),f=l?a.filter(function(v){return tu(v)}):a,d;if(Array.isArray(o)){var h=l?o.filter(function(v){return tu(v)}):o,y=f.map(function(v,p){return c0(c0({},v),{},{base:h[p]})});return s==="vertical"?d=rs().y(Xa).x1(Ya).x0(function(v){return v.base.x}):d=rs().x(Ya).y1(Xa).y0(function(v){return v.base.y}),d.defined(tu).curve(c),d(y)}return s==="vertical"&&V(o)?d=rs().y(Xa).x1(Ya).x0(o):V(o)?d=rs().x(Ya).y1(Xa).y0(o):d=Fv().x(Ya).y(Xa),d.defined(tu).curve(c),d(f)},wn=function(e){var r=e.className,n=e.points,i=e.path,a=e.pathRef;if((!n||!n.length)&&!i)return null;var o=n&&n.length?Xq(e):i;return ve.createElement("path",Bf({},Q(e,!1),Xo(e),{className:le("recharts-curve",r),d:o,ref:a}))},Uf={exports:{}},ru={exports:{}},Se={};/** @license React v16.13.1
|
|
124
124
|
* react-is.production.min.js
|
|
125
125
|
*
|
|
126
126
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
127
127
|
*
|
|
128
128
|
* This source code is licensed under the MIT license found in the
|
|
129
129
|
* LICENSE file in the root directory of this source tree.
|
|
130
|
-
*/var
|
|
130
|
+
*/var d0;function Jq(){if(d0)return Se;d0=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,r=t?Symbol.for("react.portal"):60106,n=t?Symbol.for("react.fragment"):60107,i=t?Symbol.for("react.strict_mode"):60108,a=t?Symbol.for("react.profiler"):60114,o=t?Symbol.for("react.provider"):60109,s=t?Symbol.for("react.context"):60110,u=t?Symbol.for("react.async_mode"):60111,l=t?Symbol.for("react.concurrent_mode"):60111,c=t?Symbol.for("react.forward_ref"):60112,f=t?Symbol.for("react.suspense"):60113,d=t?Symbol.for("react.suspense_list"):60120,h=t?Symbol.for("react.memo"):60115,y=t?Symbol.for("react.lazy"):60116,v=t?Symbol.for("react.block"):60121,p=t?Symbol.for("react.fundamental"):60117,m=t?Symbol.for("react.responder"):60118,b=t?Symbol.for("react.scope"):60119;function w(g){if(typeof g=="object"&&g!==null){var _=g.$$typeof;switch(_){case e:switch(g=g.type,g){case u:case l:case n:case a:case i:case f:return g;default:switch(g=g&&g.$$typeof,g){case s:case c:case y:case h:case o:return g;default:return _}}case r:return _}}}function O(g){return w(g)===l}return Se.AsyncMode=u,Se.ConcurrentMode=l,Se.ContextConsumer=s,Se.ContextProvider=o,Se.Element=e,Se.ForwardRef=c,Se.Fragment=n,Se.Lazy=y,Se.Memo=h,Se.Portal=r,Se.Profiler=a,Se.StrictMode=i,Se.Suspense=f,Se.isAsyncMode=function(g){return O(g)||w(g)===u},Se.isConcurrentMode=O,Se.isContextConsumer=function(g){return w(g)===s},Se.isContextProvider=function(g){return w(g)===o},Se.isElement=function(g){return typeof g=="object"&&g!==null&&g.$$typeof===e},Se.isForwardRef=function(g){return w(g)===c},Se.isFragment=function(g){return w(g)===n},Se.isLazy=function(g){return w(g)===y},Se.isMemo=function(g){return w(g)===h},Se.isPortal=function(g){return w(g)===r},Se.isProfiler=function(g){return w(g)===a},Se.isStrictMode=function(g){return w(g)===i},Se.isSuspense=function(g){return w(g)===f},Se.isValidElementType=function(g){return typeof g=="string"||typeof g=="function"||g===n||g===l||g===a||g===i||g===f||g===d||typeof g=="object"&&g!==null&&(g.$$typeof===y||g.$$typeof===h||g.$$typeof===o||g.$$typeof===s||g.$$typeof===c||g.$$typeof===p||g.$$typeof===m||g.$$typeof===b||g.$$typeof===v)},Se.typeOf=w,Se}var Ae={};/** @license React v16.13.1
|
|
131
131
|
* react-is.development.js
|
|
132
132
|
*
|
|
133
133
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
134
134
|
*
|
|
135
135
|
* This source code is licensed under the MIT license found in the
|
|
136
136
|
* LICENSE file in the root directory of this source tree.
|
|
137
|
-
*/var
|
|
137
|
+
*/var h0;function Zq(){return h0||(h0=1,process.env.NODE_ENV!=="production"&&function(){var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,r=t?Symbol.for("react.portal"):60106,n=t?Symbol.for("react.fragment"):60107,i=t?Symbol.for("react.strict_mode"):60108,a=t?Symbol.for("react.profiler"):60114,o=t?Symbol.for("react.provider"):60109,s=t?Symbol.for("react.context"):60110,u=t?Symbol.for("react.async_mode"):60111,l=t?Symbol.for("react.concurrent_mode"):60111,c=t?Symbol.for("react.forward_ref"):60112,f=t?Symbol.for("react.suspense"):60113,d=t?Symbol.for("react.suspense_list"):60120,h=t?Symbol.for("react.memo"):60115,y=t?Symbol.for("react.lazy"):60116,v=t?Symbol.for("react.block"):60121,p=t?Symbol.for("react.fundamental"):60117,m=t?Symbol.for("react.responder"):60118,b=t?Symbol.for("react.scope"):60119;function w(C){return typeof C=="string"||typeof C=="function"||C===n||C===l||C===a||C===i||C===f||C===d||typeof C=="object"&&C!==null&&(C.$$typeof===y||C.$$typeof===h||C.$$typeof===o||C.$$typeof===s||C.$$typeof===c||C.$$typeof===p||C.$$typeof===m||C.$$typeof===b||C.$$typeof===v)}function O(C){if(typeof C=="object"&&C!==null){var ye=C.$$typeof;switch(ye){case e:var H=C.type;switch(H){case u:case l:case n:case a:case i:case f:return H;default:var _e=H&&H.$$typeof;switch(_e){case s:case c:case y:case h:case o:return _e;default:return ye}}case r:return ye}}}var g=u,_=l,S=s,A=o,E=e,N=c,j=n,$=y,k=h,I=r,R=a,M=i,L=f,q=!1;function z(C){return q||(q=!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(C)||O(C)===u}function D(C){return O(C)===l}function B(C){return O(C)===s}function F(C){return O(C)===o}function G(C){return typeof C=="object"&&C!==null&&C.$$typeof===e}function J(C){return O(C)===c}function re(C){return O(C)===n}function ne(C){return O(C)===y}function ue(C){return O(C)===h}function oe(C){return O(C)===r}function W(C){return O(C)===a}function Y(C){return O(C)===i}function te(C){return O(C)===f}Ae.AsyncMode=g,Ae.ConcurrentMode=_,Ae.ContextConsumer=S,Ae.ContextProvider=A,Ae.Element=E,Ae.ForwardRef=N,Ae.Fragment=j,Ae.Lazy=$,Ae.Memo=k,Ae.Portal=I,Ae.Profiler=R,Ae.StrictMode=M,Ae.Suspense=L,Ae.isAsyncMode=z,Ae.isConcurrentMode=D,Ae.isContextConsumer=B,Ae.isContextProvider=F,Ae.isElement=G,Ae.isForwardRef=J,Ae.isFragment=re,Ae.isLazy=ne,Ae.isMemo=ue,Ae.isPortal=oe,Ae.isProfiler=W,Ae.isStrictMode=Y,Ae.isSuspense=te,Ae.isValidElementType=w,Ae.typeOf=O}()),Ae}var p0;function v0(){return p0||(p0=1,process.env.NODE_ENV==="production"?ru.exports=Jq():ru.exports=Zq()),ru.exports}/*
|
|
138
138
|
object-assign
|
|
139
139
|
(c) Sindre Sorhus
|
|
140
140
|
@license MIT
|
|
141
|
-
*/var
|
|
142
|
-
Valid keys: `+JSON.stringify(Object.keys(D),null," "));var
|
|
143
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
144
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
145
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
146
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
147
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
148
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
149
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
141
|
+
*/var Ff,y0;function Qq(){if(y0)return Ff;y0=1;var t=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function i(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var o={},s=0;s<10;s++)o["_"+String.fromCharCode(s)]=s;var u=Object.getOwnPropertyNames(o).map(function(c){return o[c]});if(u.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(c){l[c]=c}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Ff=i()?Object.assign:function(a,o){for(var s,u=n(a),l,c=1;c<arguments.length;c++){s=Object(arguments[c]);for(var f in s)e.call(s,f)&&(u[f]=s[f]);if(t){l=t(s);for(var d=0;d<l.length;d++)r.call(s,l[d])&&(u[l[d]]=s[l[d]])}}return u},Ff}var Wf,g0;function qf(){if(g0)return Wf;g0=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Wf=t,Wf}var zf,m0;function b0(){return m0||(m0=1,zf=Function.call.bind(Object.prototype.hasOwnProperty)),zf}var Kf,w0;function ez(){if(w0)return Kf;w0=1;var t=function(){};if(process.env.NODE_ENV!=="production"){var e=qf(),r={},n=b0();t=function(a){var o="Warning: "+a;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function i(a,o,s,u,l){if(process.env.NODE_ENV!=="production"){for(var c in a)if(n(a,c)){var f;try{if(typeof a[c]!="function"){var d=Error((u||"React class")+": "+s+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}f=a[c](o,c,u,s,null,e)}catch(y){f=y}if(f&&!(f instanceof Error)&&t((u||"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=l?l():"";t("Failed "+s+" type: "+f.message+(h??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},Kf=i,Kf}var Vf,_0;function tz(){if(_0)return Vf;_0=1;var t=v0(),e=Qq(),r=qf(),n=b0(),i=ez(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(s){var u="Warning: "+s;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function o(){return null}return Vf=function(s,u){var l=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function f(D){var B=D&&(l&&D[l]||D[c]);if(typeof B=="function")return B}var d="<<anonymous>>",h={array:m("array"),bigint:m("bigint"),bool:m("boolean"),func:m("function"),number:m("number"),object:m("object"),string:m("string"),symbol:m("symbol"),any:b(),arrayOf:w,element:O(),elementType:g(),instanceOf:_,node:N(),objectOf:A,oneOf:S,oneOfType:E,shape:$,exact:k};function y(D,B){return D===B?D!==0||1/D===1/B:D!==D&&B!==B}function v(D,B){this.message=D,this.data=B&&typeof B=="object"?B:{},this.stack=""}v.prototype=Error.prototype;function p(D){if(process.env.NODE_ENV!=="production")var B={},F=0;function G(re,ne,ue,oe,W,Y,te){if(oe=oe||d,Y=Y||ue,te!==r){if(u){var C=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 C.name="Invariant Violation",C}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ye=oe+":"+ue;!B[ye]&&F<3&&(a("You are manually calling a React.PropTypes validation function for the `"+Y+"` prop on `"+oe+"`. 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."),B[ye]=!0,F++)}}return ne[ue]==null?re?ne[ue]===null?new v("The "+W+" `"+Y+"` is marked as required "+("in `"+oe+"`, but its value is `null`.")):new v("The "+W+" `"+Y+"` is marked as required in "+("`"+oe+"`, but its value is `undefined`.")):null:D(ne,ue,oe,W,Y)}var J=G.bind(null,!1);return J.isRequired=G.bind(null,!0),J}function m(D){function B(F,G,J,re,ne,ue){var oe=F[G],W=M(oe);if(W!==D){var Y=L(oe);return new v("Invalid "+re+" `"+ne+"` of type "+("`"+Y+"` supplied to `"+J+"`, expected ")+("`"+D+"`."),{expectedType:D})}return null}return p(B)}function b(){return p(o)}function w(D){function B(F,G,J,re,ne){if(typeof D!="function")return new v("Property `"+ne+"` of component `"+J+"` has invalid PropType notation inside arrayOf.");var ue=F[G];if(!Array.isArray(ue)){var oe=M(ue);return new v("Invalid "+re+" `"+ne+"` of type "+("`"+oe+"` supplied to `"+J+"`, expected an array."))}for(var W=0;W<ue.length;W++){var Y=D(ue,W,J,re,ne+"["+W+"]",r);if(Y instanceof Error)return Y}return null}return p(B)}function O(){function D(B,F,G,J,re){var ne=B[F];if(!s(ne)){var ue=M(ne);return new v("Invalid "+J+" `"+re+"` of type "+("`"+ue+"` supplied to `"+G+"`, expected a single ReactElement."))}return null}return p(D)}function g(){function D(B,F,G,J,re){var ne=B[F];if(!t.isValidElementType(ne)){var ue=M(ne);return new v("Invalid "+J+" `"+re+"` of type "+("`"+ue+"` supplied to `"+G+"`, expected a single ReactElement type."))}return null}return p(D)}function _(D){function B(F,G,J,re,ne){if(!(F[G]instanceof D)){var ue=D.name||d,oe=z(F[G]);return new v("Invalid "+re+" `"+ne+"` of type "+("`"+oe+"` supplied to `"+J+"`, expected ")+("instance of `"+ue+"`."))}return null}return p(B)}function S(D){if(!Array.isArray(D))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("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])."):a("Invalid argument supplied to oneOf, expected an array.")),o;function B(F,G,J,re,ne){for(var ue=F[G],oe=0;oe<D.length;oe++)if(y(ue,D[oe]))return null;var W=JSON.stringify(D,function(te,C){var ye=L(C);return ye==="symbol"?String(C):C});return new v("Invalid "+re+" `"+ne+"` of value `"+String(ue)+"` "+("supplied to `"+J+"`, expected one of "+W+"."))}return p(B)}function A(D){function B(F,G,J,re,ne){if(typeof D!="function")return new v("Property `"+ne+"` of component `"+J+"` has invalid PropType notation inside objectOf.");var ue=F[G],oe=M(ue);if(oe!=="object")return new v("Invalid "+re+" `"+ne+"` of type "+("`"+oe+"` supplied to `"+J+"`, expected an object."));for(var W in ue)if(n(ue,W)){var Y=D(ue,W,J,re,ne+"."+W,r);if(Y instanceof Error)return Y}return null}return p(B)}function E(D){if(!Array.isArray(D))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var B=0;B<D.length;B++){var F=D[B];if(typeof F!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+q(F)+" at index "+B+"."),o}function G(J,re,ne,ue,oe){for(var W=[],Y=0;Y<D.length;Y++){var te=D[Y],C=te(J,re,ne,ue,oe,r);if(C==null)return null;C.data&&n(C.data,"expectedType")&&W.push(C.data.expectedType)}var ye=W.length>0?", expected one of type ["+W.join(", ")+"]":"";return new v("Invalid "+ue+" `"+oe+"` supplied to "+("`"+ne+"`"+ye+"."))}return p(G)}function N(){function D(B,F,G,J,re){return I(B[F])?null:new v("Invalid "+J+" `"+re+"` supplied to "+("`"+G+"`, expected a ReactNode."))}return p(D)}function j(D,B,F,G,J){return new v((D||"React class")+": "+B+" type `"+F+"."+G+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+J+"`.")}function $(D){function B(F,G,J,re,ne){var ue=F[G],oe=M(ue);if(oe!=="object")return new v("Invalid "+re+" `"+ne+"` of type `"+oe+"` "+("supplied to `"+J+"`, expected `object`."));for(var W in D){var Y=D[W];if(typeof Y!="function")return j(J,re,ne,W,L(Y));var te=Y(ue,W,J,re,ne+"."+W,r);if(te)return te}return null}return p(B)}function k(D){function B(F,G,J,re,ne){var ue=F[G],oe=M(ue);if(oe!=="object")return new v("Invalid "+re+" `"+ne+"` of type `"+oe+"` "+("supplied to `"+J+"`, expected `object`."));var W=e({},F[G],D);for(var Y in W){var te=D[Y];if(n(D,Y)&&typeof te!="function")return j(J,re,ne,Y,L(te));if(!te)return new v("Invalid "+re+" `"+ne+"` key `"+Y+"` supplied to `"+J+"`.\nBad object: "+JSON.stringify(F[G],null," ")+`
|
|
142
|
+
Valid keys: `+JSON.stringify(Object.keys(D),null," "));var C=te(ue,Y,J,re,ne+"."+Y,r);if(C)return C}return null}return p(B)}function I(D){switch(typeof D){case"number":case"string":case"undefined":return!0;case"boolean":return!D;case"object":if(Array.isArray(D))return D.every(I);if(D===null||s(D))return!0;var B=f(D);if(B){var F=B.call(D),G;if(B!==D.entries){for(;!(G=F.next()).done;)if(!I(G.value))return!1}else for(;!(G=F.next()).done;){var J=G.value;if(J&&!I(J[1]))return!1}}else return!1;return!0;default:return!1}}function R(D,B){return D==="symbol"?!0:B?B["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&B instanceof Symbol:!1}function M(D){var B=typeof D;return Array.isArray(D)?"array":D instanceof RegExp?"object":R(B,D)?"symbol":B}function L(D){if(typeof D>"u"||D===null)return""+D;var B=M(D);if(B==="object"){if(D instanceof Date)return"date";if(D instanceof RegExp)return"regexp"}return B}function q(D){var B=L(D);switch(B){case"array":case"object":return"an "+B;case"boolean":case"date":case"regexp":return"a "+B;default:return B}}function z(D){return!D.constructor||!D.constructor.name?d:D.constructor.name}return h.checkPropTypes=i,h.resetWarningCache=i.resetWarningCache,h.PropTypes=h,h},Vf}var Hf,x0;function rz(){if(x0)return Hf;x0=1;var t=qf();function e(){}function r(){}return r.resetWarningCache=e,Hf=function(){function n(o,s,u,l,c,f){if(f!==t){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 i(){return n}var a={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:i,element:n,elementType:n,instanceOf:i,node:n,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:r,resetWarningCache:e};return a.PropTypes=a,a},Hf}if(process.env.NODE_ENV!=="production"){var nz=v0(),iz=!0;Uf.exports=tz()(nz.isElement,iz)}else Uf.exports=rz()();var az=Uf.exports;const Pe=je(az);var oz=Object.getOwnPropertyNames,sz=Object.getOwnPropertySymbols,uz=Object.prototype.hasOwnProperty;function O0(t,e){return function(n,i,a){return t(n,i,a)&&e(n,i,a)}}function nu(t){return function(r,n,i){if(!r||!n||typeof r!="object"||typeof n!="object")return t(r,n,i);var a=i.cache,o=a.get(r),s=a.get(n);if(o&&s)return o===n&&s===r;a.set(r,n),a.set(n,r);var u=t(r,n,i);return a.delete(r),a.delete(n),u}}function S0(t){return oz(t).concat(sz(t))}var lz=Object.hasOwn||function(t,e){return uz.call(t,e)};function _n(t,e){return t===e||!t&&!e&&t!==t&&e!==e}var cz="__v",fz="__o",dz="_owner",A0=Object.getOwnPropertyDescriptor,P0=Object.keys;function hz(t,e,r){var n=t.length;if(e.length!==n)return!1;for(;n-- >0;)if(!r.equals(t[n],e[n],n,n,t,e,r))return!1;return!0}function pz(t,e){return _n(t.getTime(),e.getTime())}function vz(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function yz(t,e){return t===e}function E0(t,e,r){var n=t.size;if(n!==e.size)return!1;if(!n)return!0;for(var i=new Array(n),a=t.entries(),o,s,u=0;(o=a.next())&&!o.done;){for(var l=e.entries(),c=!1,f=0;(s=l.next())&&!s.done;){if(i[f]){f++;continue}var d=o.value,h=s.value;if(r.equals(d[0],h[0],u,f,t,e,r)&&r.equals(d[1],h[1],d[0],h[0],t,e,r)){c=i[f]=!0;break}f++}if(!c)return!1;u++}return!0}var gz=_n;function mz(t,e,r){var n=P0(t),i=n.length;if(P0(e).length!==i)return!1;for(;i-- >0;)if(!j0(t,e,r,n[i]))return!1;return!0}function Ja(t,e,r){var n=S0(t),i=n.length;if(S0(e).length!==i)return!1;for(var a,o,s;i-- >0;)if(a=n[i],!j0(t,e,r,a)||(o=A0(t,a),s=A0(e,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function bz(t,e){return _n(t.valueOf(),e.valueOf())}function wz(t,e){return t.source===e.source&&t.flags===e.flags}function T0(t,e,r){var n=t.size;if(n!==e.size)return!1;if(!n)return!0;for(var i=new Array(n),a=t.values(),o,s;(o=a.next())&&!o.done;){for(var u=e.values(),l=!1,c=0;(s=u.next())&&!s.done;){if(!i[c]&&r.equals(o.value,s.value,o.value,s.value,t,e,r)){l=i[c]=!0;break}c++}if(!l)return!1}return!0}function _z(t,e){var r=t.length;if(e.length!==r)return!1;for(;r-- >0;)if(t[r]!==e[r])return!1;return!0}function xz(t,e){return t.hostname===e.hostname&&t.pathname===e.pathname&&t.protocol===e.protocol&&t.port===e.port&&t.hash===e.hash&&t.username===e.username&&t.password===e.password}function j0(t,e,r,n){return(n===dz||n===fz||n===cz)&&(t.$$typeof||e.$$typeof)?!0:lz(e,n)&&r.equals(t[n],e[n],n,n,t,e,r)}var Oz="[object Arguments]",Sz="[object Boolean]",Az="[object Date]",Pz="[object Error]",Ez="[object Map]",Tz="[object Number]",jz="[object Object]",$z="[object RegExp]",kz="[object Set]",Cz="[object String]",Iz="[object URL]",Nz=Array.isArray,$0=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,k0=Object.assign,Mz=Object.prototype.toString.call.bind(Object.prototype.toString);function Dz(t){var e=t.areArraysEqual,r=t.areDatesEqual,n=t.areErrorsEqual,i=t.areFunctionsEqual,a=t.areMapsEqual,o=t.areNumbersEqual,s=t.areObjectsEqual,u=t.arePrimitiveWrappersEqual,l=t.areRegExpsEqual,c=t.areSetsEqual,f=t.areTypedArraysEqual,d=t.areUrlsEqual;return function(y,v,p){if(y===v)return!0;if(y==null||v==null)return!1;var m=typeof y;if(m!==typeof v)return!1;if(m!=="object")return m==="number"?o(y,v,p):m==="function"?i(y,v,p):!1;var b=y.constructor;if(b!==v.constructor)return!1;if(b===Object)return s(y,v,p);if(Nz(y))return e(y,v,p);if($0!=null&&$0(y))return f(y,v,p);if(b===Date)return r(y,v,p);if(b===RegExp)return l(y,v,p);if(b===Map)return a(y,v,p);if(b===Set)return c(y,v,p);var w=Mz(y);return w===Az?r(y,v,p):w===$z?l(y,v,p):w===Ez?a(y,v,p):w===kz?c(y,v,p):w===jz?typeof y.then!="function"&&typeof v.then!="function"&&s(y,v,p):w===Iz?d(y,v,p):w===Pz?n(y,v,p):w===Oz?s(y,v,p):w===Sz||w===Tz||w===Cz?u(y,v,p):!1}}function Rz(t){var e=t.circular,r=t.createCustomConfig,n=t.strict,i={areArraysEqual:n?Ja:hz,areDatesEqual:pz,areErrorsEqual:vz,areFunctionsEqual:yz,areMapsEqual:n?O0(E0,Ja):E0,areNumbersEqual:gz,areObjectsEqual:n?Ja:mz,arePrimitiveWrappersEqual:bz,areRegExpsEqual:wz,areSetsEqual:n?O0(T0,Ja):T0,areTypedArraysEqual:n?Ja:_z,areUrlsEqual:xz};if(r&&(i=k0({},i,r(i))),e){var a=nu(i.areArraysEqual),o=nu(i.areMapsEqual),s=nu(i.areObjectsEqual),u=nu(i.areSetsEqual);i=k0({},i,{areArraysEqual:a,areMapsEqual:o,areObjectsEqual:s,areSetsEqual:u})}return i}function Lz(t){return function(e,r,n,i,a,o,s){return t(e,r,s)}}function Bz(t){var e=t.circular,r=t.comparator,n=t.createState,i=t.equals,a=t.strict;if(n)return function(u,l){var c=n(),f=c.cache,d=f===void 0?e?new WeakMap:void 0:f,h=c.meta;return r(u,l,{cache:d,equals:i,meta:h,strict:a})};if(e)return function(u,l){return r(u,l,{cache:new WeakMap,equals:i,meta:void 0,strict:a})};var o={cache:void 0,equals:i,meta:void 0,strict:a};return function(u,l){return r(u,l,o)}}var Uz=Br();Br({strict:!0}),Br({circular:!0}),Br({circular:!0,strict:!0}),Br({createInternalComparator:function(){return _n}}),Br({strict:!0,createInternalComparator:function(){return _n}}),Br({circular:!0,createInternalComparator:function(){return _n}}),Br({circular:!0,createInternalComparator:function(){return _n},strict:!0});function Br(t){t===void 0&&(t={});var e=t.circular,r=e===void 0?!1:e,n=t.createInternalComparator,i=t.createState,a=t.strict,o=a===void 0?!1:a,s=Rz(t),u=Dz(s),l=n?n(u):Lz(u);return Bz({circular:r,comparator:u,createState:i,equals:l,strict:o})}function Fz(t){typeof requestAnimationFrame<"u"&&requestAnimationFrame(t)}function C0(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function i(a){r<0&&(r=a),a-r>e?(t(a),r=-1):Fz(i)};requestAnimationFrame(n)}function Gf(t){"@babel/helpers - typeof";return Gf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Gf(t)}function Wz(t){return Vz(t)||Kz(t)||zz(t)||qz()}function qz(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
143
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zz(t,e){if(t){if(typeof t=="string")return I0(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return I0(t,e)}}function I0(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Kz(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Vz(t){if(Array.isArray(t))return t}function Hz(){var t={},e=function(){return null},r=!1,n=function i(a){if(!r){if(Array.isArray(a)){if(!a.length)return;var o=a,s=Wz(o),u=s[0],l=s.slice(1);if(typeof u=="number"){C0(i.bind(null,l),u);return}i(u),C0(i.bind(null,l));return}Gf(a)==="object"&&(t=a,e(t)),typeof a=="function"&&a()}};return{stop:function(){r=!0},start:function(a){r=!1,n(a)},subscribe:function(a){return e=a,function(){e=function(){return null}}}}}function Za(t){"@babel/helpers - typeof";return Za=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Za(t)}function N0(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function M0(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?N0(Object(r),!0).forEach(function(n){D0(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):N0(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function D0(t,e,r){return e=Gz(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Gz(t){var e=Yz(t,"string");return Za(e)==="symbol"?e:String(e)}function Yz(t,e){if(Za(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Za(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Xz=function(e,r){return[Object.keys(e),Object.keys(r)].reduce(function(n,i){return n.filter(function(a){return i.includes(a)})})},Jz=function(e){return e},Zz=function(e){return e.replace(/([A-Z])/g,function(r){return"-".concat(r.toLowerCase())})},Qa=function(e,r){return Object.keys(r).reduce(function(n,i){return M0(M0({},n),{},D0({},i,e(i,r[i])))},{})},R0=function(e,r,n){return e.map(function(i){return"".concat(Zz(i)," ").concat(r,"ms ").concat(n)}).join(",")},Qz=process.env.NODE_ENV!=="production",iu=function(e,r,n,i,a,o,s,u){if(Qz&&typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!e))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 l=[n,i,a,o,s,u],c=0;console.warn(r.replace(/%s/g,function(){return l[c++]}))}};function e3(t,e){return n3(t)||r3(t,e)||L0(t,e)||t3()}function t3(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
144
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function r3(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,o,s=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(c){l=!0,i=c}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function n3(t){if(Array.isArray(t))return t}function i3(t){return s3(t)||o3(t)||L0(t)||a3()}function a3(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
145
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function L0(t,e){if(t){if(typeof t=="string")return Yf(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Yf(t,e)}}function o3(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function s3(t){if(Array.isArray(t))return Yf(t)}function Yf(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var au=1e-4,B0=function(e,r){return[0,3*e,3*r-6*e,3*e-3*r+1]},U0=function(e,r){return e.map(function(n,i){return n*Math.pow(r,i)}).reduce(function(n,i){return n+i})},F0=function(e,r){return function(n){var i=B0(e,r);return U0(i,n)}},u3=function(e,r){return function(n){var i=B0(e,r),a=[].concat(i3(i.map(function(o,s){return o*s}).slice(1)),[0]);return U0(a,n)}},W0=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];var i=r[0],a=r[1],o=r[2],s=r[3];if(r.length===1)switch(r[0]){case"linear":i=0,a=0,o=1,s=1;break;case"ease":i=.25,a=.1,o=.25,s=1;break;case"ease-in":i=.42,a=0,o=1,s=1;break;case"ease-out":i=.42,a=0,o=.58,s=1;break;case"ease-in-out":i=0,a=0,o=.58,s=1;break;default:{var u=r[0].split("(");if(u[0]==="cubic-bezier"&&u[1].split(")")[0].split(",").length===4){var l=u[1].split(")")[0].split(",").map(function(p){return parseFloat(p)}),c=e3(l,4);i=c[0],a=c[1],o=c[2],s=c[3]}else iu(!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)}}iu([i,o,a,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=F0(i,o),d=F0(a,s),h=u3(i,o),y=function(m){return m>1?1:m<0?0:m},v=function(m){for(var b=m>1?1:m,w=b,O=0;O<8;++O){var g=f(w)-b,_=h(w);if(Math.abs(g-b)<au||_<au)return d(w);w=y(w-g/_)}return d(w)};return v.isStepper=!1,v},l3=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=e.stiff,n=r===void 0?100:r,i=e.damping,a=i===void 0?8:i,o=e.dt,s=o===void 0?17:o,u=function(c,f,d){var h=-(c-f)*n,y=d*a,v=d+(h-y)*s/1e3,p=d*s/1e3+c;return Math.abs(p-f)<au&&Math.abs(v)<au?[f,0]:[p,v]};return u.isStepper=!0,u.dt=s,u},c3=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];var i=r[0];if(typeof i=="string")switch(i){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return W0(i);case"spring":return l3();default:if(i.split("(")[0]==="cubic-bezier")return W0(i);iu(!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 i=="function"?i:(iu(!1,"[configEasing]: first argument type should be function or string, instead received %s",r),null)};function eo(t){"@babel/helpers - typeof";return eo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},eo(t)}function q0(t){return h3(t)||d3(t)||K0(t)||f3()}function f3(){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 d3(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function h3(t){if(Array.isArray(t))return Jf(t)}function z0(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function at(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?z0(Object(r),!0).forEach(function(n){Xf(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):z0(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Xf(t,e,r){return e=p3(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function p3(t){var e=v3(t,"string");return eo(e)==="symbol"?e:String(e)}function v3(t,e){if(eo(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(eo(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function y3(t,e){return b3(t)||m3(t,e)||K0(t,e)||g3()}function g3(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
147
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function K0(t,e){if(t){if(typeof t=="string")return Jf(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Jf(t,e)}}function Jf(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function m3(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,o,s=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(c){l=!0,i=c}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function b3(t){if(Array.isArray(t))return t}var ou=function(e,r,n){return e+(r-e)*n},Zf=function(e){var r=e.from,n=e.to;return r!==n},w3=function t(e,r,n){var i=Qa(function(a,o){if(Zf(o)){var s=e(o.from,o.to,o.velocity),u=y3(s,2),l=u[0],c=u[1];return at(at({},o),{},{from:l,velocity:c})}return o},r);return n<1?Qa(function(a,o){return Zf(o)?at(at({},o),{},{velocity:ou(o.velocity,i[a].velocity,n),from:ou(o.from,i[a].from,n)}):o},r):t(e,i,n-1)};const _3=function(t,e,r,n,i){var a=Xz(t,e),o=a.reduce(function(p,m){return at(at({},p),{},Xf({},m,[t[m],e[m]]))},{}),s=a.reduce(function(p,m){return at(at({},p),{},Xf({},m,{from:t[m],velocity:0,to:e[m]}))},{}),u=-1,l,c,f=function(){return null},d=function(){return Qa(function(m,b){return b.from},s)},h=function(){return!Object.values(s).filter(Zf).length},y=function(m){l||(l=m);var b=m-l,w=b/r.dt;s=w3(r,s,w),i(at(at(at({},t),e),d())),l=m,h()||(u=requestAnimationFrame(f))},v=function(m){c||(c=m);var b=(m-c)/n,w=Qa(function(g,_){return ou.apply(void 0,q0(_).concat([r(b)]))},o);if(i(at(at(at({},t),e),w)),b<1)u=requestAnimationFrame(f);else{var O=Qa(function(g,_){return ou.apply(void 0,q0(_).concat([r(1)]))},o);i(at(at(at({},t),e),O))}};return f=r.isStepper?y:v,function(){return requestAnimationFrame(f),function(){cancelAnimationFrame(u)}}};function mi(t){"@babel/helpers - typeof";return mi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mi(t)}var x3=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function O3(t,e){if(t==null)return{};var r=S3(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function S3(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,a;for(a=0;a<n.length;a++)i=n[a],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}function Qf(t){return T3(t)||E3(t)||P3(t)||A3()}function A3(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
148
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function P3(t,e){if(t){if(typeof t=="string")return ed(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ed(t,e)}}function E3(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function T3(t){if(Array.isArray(t))return ed(t)}function ed(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function V0(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Gt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?V0(Object(r),!0).forEach(function(n){to(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):V0(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function to(t,e,r){return e=H0(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function j3(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function $3(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,H0(n.key),n)}}function k3(t,e,r){return e&&$3(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function H0(t){var e=C3(t,"string");return mi(e)==="symbol"?e:String(e)}function C3(t,e){if(mi(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(mi(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function I3(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&td(t,e)}function td(t,e){return td=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},td(t,e)}function N3(t){var e=M3();return function(){var n=su(t),i;if(e){var a=su(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return rd(this,i)}}function rd(t,e){if(e&&(mi(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return nd(t)}function nd(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function M3(){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 su(t){return su=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},su(t)}var Rt=function(t){I3(r,t);var e=N3(r);function r(n,i){var a;j3(this,r),a=e.call(this,n,i);var o=a.props,s=o.isActive,u=o.attributeName,l=o.from,c=o.to,f=o.steps,d=o.children,h=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind(nd(a)),a.changeStyle=a.changeStyle.bind(nd(a)),!s||h<=0)return a.state={style:{}},typeof d=="function"&&(a.state={style:c}),rd(a);if(f&&f.length)a.state={style:f[0].style};else if(l){if(typeof d=="function")return a.state={style:l},rd(a);a.state={style:u?to({},u,l):l}}else a.state={style:{}};return a}return k3(r,[{key:"componentDidMount",value:function(){var i=this.props,a=i.isActive,o=i.canBegin;this.mounted=!0,!(!a||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var a=this.props,o=a.isActive,s=a.canBegin,u=a.attributeName,l=a.shouldReAnimate,c=a.to,f=a.from,d=this.state.style;if(s){if(!o){var h={style:u?to({},u,c):c};this.state&&d&&(u&&d[u]!==c||!u&&d!==c)&&this.setState(h);return}if(!(Uz(i.to,c)&&i.canBegin&&i.isActive)){var y=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var v=y||l?f:i.to;if(this.state&&d){var p={style:u?to({},u,v):v};(u&&d[u]!==v||!u&&d!==v)&&this.setState(p)}this.runAnimation(Gt(Gt({},this.props),{},{from:v,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var a=this,o=i.from,s=i.to,u=i.duration,l=i.easing,c=i.begin,f=i.onAnimationEnd,d=i.onAnimationStart,h=_3(o,s,c3(l),u,this.changeStyle),y=function(){a.stopJSAnimation=h()};this.manager.start([d,c,y,u,f])}},{key:"runStepAnimation",value:function(i){var a=this,o=i.steps,s=i.begin,u=i.onAnimationStart,l=o[0],c=l.style,f=l.duration,d=f===void 0?0:f,h=function(v,p,m){if(m===0)return v;var b=p.duration,w=p.easing,O=w===void 0?"ease":w,g=p.style,_=p.properties,S=p.onAnimationEnd,A=m>0?o[m-1]:p,E=_||Object.keys(g);if(typeof O=="function"||O==="spring")return[].concat(Qf(v),[a.runJSAnimation.bind(a,{from:A.style,to:g,duration:b,easing:O}),b]);var N=R0(E,b,O),j=Gt(Gt(Gt({},A.style),g),{},{transition:N});return[].concat(Qf(v),[j,b,S]).filter(Jz)};return this.manager.start([u].concat(Qf(o.reduce(h,[c,Math.max(d,s)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=Hz());var a=i.begin,o=i.duration,s=i.attributeName,u=i.to,l=i.easing,c=i.onAnimationStart,f=i.onAnimationEnd,d=i.steps,h=i.children,y=this.manager;if(this.unSubscribe=y.subscribe(this.handleStyleChange),typeof l=="function"||typeof h=="function"||l==="spring"){this.runJSAnimation(i);return}if(d.length>1){this.runStepAnimation(i);return}var v=s?to({},s,u):u,p=R0(Object.keys(v),o,l);y.start([c,a,Gt(Gt({},v),{},{transition:p}),o,f])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var o=i.duration;i.attributeName,i.easing;var s=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var u=O3(i,x3),l=x.Children.count(a),c=this.state.style;if(typeof a=="function")return a(c);if(!s||l===0||o<=0)return a;var f=function(h){var y=h.props,v=y.style,p=v===void 0?{}:v,m=y.className,b=x.cloneElement(h,Gt(Gt({},u),{},{style:Gt(Gt({},p),c),className:m}));return b};return l===1?f(x.Children.only(a)):x.createElement("div",null,x.Children.map(a,function(d){return f(d)}))}}]),r}(x.PureComponent);Rt.displayName="Animate",Rt.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}},Rt.propTypes={from:Pe.oneOfType([Pe.object,Pe.string]),to:Pe.oneOfType([Pe.object,Pe.string]),attributeName:Pe.string,duration:Pe.number,begin:Pe.number,easing:Pe.oneOfType([Pe.string,Pe.func]),steps:Pe.arrayOf(Pe.shape({duration:Pe.number.isRequired,style:Pe.object.isRequired,easing:Pe.oneOfType([Pe.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Pe.func]),properties:Pe.arrayOf("string"),onAnimationEnd:Pe.func})),children:Pe.oneOfType([Pe.node,Pe.func]),isActive:Pe.bool,canBegin:Pe.bool,onAnimationEnd:Pe.func,shouldReAnimate:Pe.bool,onAnimationStart:Pe.func,onAnimationReStart:Pe.func};function ro(t){"@babel/helpers - typeof";return ro=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ro(t)}function uu(){return uu=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},uu.apply(this,arguments)}function D3(t,e){return U3(t)||B3(t,e)||L3(t,e)||R3()}function R3(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
149
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function L3(t,e){if(t){if(typeof t=="string")return G0(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return G0(t,e)}}function G0(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function B3(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,o,s=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(c){l=!0,i=c}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function U3(t){if(Array.isArray(t))return t}function Y0(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function X0(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Y0(Object(r),!0).forEach(function(n){F3(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Y0(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function F3(t,e,r){return e=W3(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function W3(t){var e=q3(t,"string");return ro(e)=="symbol"?e:e+""}function q3(t,e){if(ro(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(ro(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var J0=function(e,r,n,i,a){var o=Math.min(Math.abs(n)/2,Math.abs(i)/2),s=i>=0?1:-1,u=n>=0?1:-1,l=i>=0&&n>=0||i<0&&n<0?1:0,c;if(o>0&&a instanceof Array){for(var f=[0,0,0,0],d=0,h=4;d<h;d++)f[d]=a[d]>o?o:a[d];c="M".concat(e,",").concat(r+s*f[0]),f[0]>0&&(c+="A ".concat(f[0],",").concat(f[0],",0,0,").concat(l,",").concat(e+u*f[0],",").concat(r)),c+="L ".concat(e+n-u*f[1],",").concat(r),f[1]>0&&(c+="A ".concat(f[1],",").concat(f[1],",0,0,").concat(l,`,
|
|
150
150
|
`).concat(e+n,",").concat(r+s*f[1])),c+="L ".concat(e+n,",").concat(r+i-s*f[2]),f[2]>0&&(c+="A ".concat(f[2],",").concat(f[2],",0,0,").concat(l,`,
|
|
151
151
|
`).concat(e+n-u*f[2],",").concat(r+i)),c+="L ".concat(e+u*f[3],",").concat(r+i),f[3]>0&&(c+="A ".concat(f[3],",").concat(f[3],",0,0,").concat(l,`,
|
|
152
152
|
`).concat(e,",").concat(r+i-s*f[3])),c+="Z"}else if(o>0&&a===+a&&a>0){var y=Math.min(o,a);c="M ".concat(e,",").concat(r+s*y,`
|
|
@@ -156,20 +156,20 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
156
156
|
L `).concat(e+n,",").concat(r+i-s*y,`
|
|
157
157
|
A `).concat(y,",").concat(y,",0,0,").concat(l,",").concat(e+n-u*y,",").concat(r+i,`
|
|
158
158
|
L `).concat(e+u*y,",").concat(r+i,`
|
|
159
|
-
A `).concat(y,",").concat(y,",0,0,").concat(l,",").concat(e,",").concat(r+i-s*y," Z")}else c="M ".concat(e,",").concat(r," h ").concat(n," v ").concat(i," h ").concat(-n," Z");return c},
|
|
160
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function J3(t,e){if(t){if(typeof t=="string")return od(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return od(t,e)}}function Z3(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Q3(t){if(Array.isArray(t))return od(t)}function od(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var ew=function(e){return e&&e.x===+e.x&&e.y===+e.y},eK=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=[[]];return e.forEach(function(n){ew(n)?r[r.length-1].push(n):r[r.length-1].length>0&&r.push([])}),ew(e[0])&&r[r.length-1].push(e[0]),r[r.length-1].length<=0&&(r=r.slice(0,-1)),r},no=function(e,r){var n=eK(e);r&&(n=[n.reduce(function(a,o){return[].concat(Q0(a),Q0(o))},[])]);var i=n.map(function(a){return a.reduce(function(o,s,u){return"".concat(o).concat(u===0?"M":"L").concat(s.x,",").concat(s.y)},"")}).join("");return n.length===1?"".concat(i,"Z"):i},tK=function(e,r,n){var i=no(e,n);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(no(r.reverse(),n).slice(1))},tw=function(e){var r=e.points,n=e.className,i=e.baseLinePoints,a=e.connectNulls,o=G3(e,H3);if(!r||!r.length)return null;var s=le("recharts-polygon",n);if(i&&i.length){var u=o.stroke&&o.stroke!=="none",l=tK(r,i,a);return x.createElement("g",{className:s},x.createElement("path",bi({},Q(o,!0),{fill:l.slice(-1)==="Z"?o.fill:"none",stroke:"none",d:l})),u?x.createElement("path",bi({},Q(o,!0),{fill:"none",d:no(r,a)})):null,u?x.createElement("path",bi({},Q(o,!0),{fill:"none",d:no(i,a)})):null)}var c=no(r,a);return x.createElement("path",bi({},Q(o,!0),{fill:c.slice(-1)==="Z"?o.fill:"none",className:s,d:c}))};function sd(){return sd=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},sd.apply(this,arguments)}var wi=function(e){var r=e.cx,n=e.cy,i=e.r,a=e.className,o=le("recharts-dot",a);return r===+r&&n===+n&&i===+i?ve.createElement("circle",sd({},Q(e,!1),Jo(e),{className:o,cx:r,cy:n,r:i})):null};function io(t){"@babel/helpers - typeof";return io=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},io(t)}var rK=["x","y","top","left","width","height","className"];function ud(){return ud=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},ud.apply(this,arguments)}function rw(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function nK(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?rw(Object(r),!0).forEach(function(n){iK(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):rw(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function iK(t,e,r){return e=aK(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function aK(t){var e=oK(t,"string");return io(e)=="symbol"?e:e+""}function oK(t,e){if(io(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(io(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function sK(t,e){if(t==null)return{};var r=uK(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function uK(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}var lK=function(e,r,n,i,a,o){return"M".concat(e,",").concat(a,"v").concat(i,"M").concat(o,",").concat(r,"h").concat(n)},cK=function(e){var r=e.x,n=r===void 0?0:r,i=e.y,a=i===void 0?0:i,o=e.top,s=o===void 0?0:o,u=e.left,l=u===void 0?0:u,c=e.width,f=c===void 0?0:c,d=e.height,h=d===void 0?0:d,y=e.className,v=sK(e,rK),p=nK({x:n,y:a,top:s,left:l,width:f,height:h},v);return!V(n)||!V(a)||!V(f)||!V(h)||!V(s)||!V(l)?null:x.createElement("path",ud({},Q(p,!0),{className:le("recharts-cross",y),d:lK(n,a,f,h,s,l)}))},fK=["cx","cy","innerRadius","outerRadius","gridType","radialLines"];function ao(t){"@babel/helpers - typeof";return ao=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ao(t)}function dK(t,e){if(t==null)return{};var r=hK(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function hK(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function xr(){return xr=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},xr.apply(this,arguments)}function nw(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function oo(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?nw(Object(r),!0).forEach(function(n){pK(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):nw(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function pK(t,e,r){return e=vK(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function vK(t){var e=yK(t,"string");return ao(e)=="symbol"?e:e+""}function yK(t,e){if(ao(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(ao(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var gK=function(e,r,n,i){var a="";return i.forEach(function(o,s){var u=we(r,n,e,o);s?a+="L ".concat(u.x,",").concat(u.y):a+="M ".concat(u.x,",").concat(u.y)}),a+="Z",a},mK=function(e){var r=e.cx,n=e.cy,i=e.innerRadius,a=e.outerRadius,o=e.polarAngles,s=e.radialLines;if(!o||!o.length||!s)return null;var u=oo({stroke:"#ccc"},Q(e,!1));return x.createElement("g",{className:"recharts-polar-grid-angle"},o.map(function(l){var c=we(r,n,i,l),f=we(r,n,a,l);return x.createElement("line",xr({},u,{key:"line-".concat(l),x1:c.x,y1:c.y,x2:f.x,y2:f.y}))}))},bK=function(e){var r=e.cx,n=e.cy,i=e.radius,a=e.index,o=oo(oo({stroke:"#ccc"},Q(e,!1)),{},{fill:"none"});return x.createElement("circle",xr({},o,{className:le("recharts-polar-grid-concentric-circle",e.className),key:"circle-".concat(a),cx:r,cy:n,r:i}))},wK=function(e){var r=e.radius,n=e.index,i=oo(oo({stroke:"#ccc"},Q(e,!1)),{},{fill:"none"});return x.createElement("path",xr({},i,{className:le("recharts-polar-grid-concentric-polygon",e.className),key:"path-".concat(n),d:gK(r,e.cx,e.cy,e.polarAngles)}))},_K=function(e){var r=e.polarRadius,n=e.gridType;return!r||!r.length?null:x.createElement("g",{className:"recharts-polar-grid-concentric"},r.map(function(i,a){var o=a;return n==="circle"?x.createElement(bK,xr({key:o},e,{radius:i,index:a})):x.createElement(wK,xr({key:o},e,{radius:i,index:a}))}))},iw=function(e){var r=e.cx,n=r===void 0?0:r,i=e.cy,a=i===void 0?0:i,o=e.innerRadius,s=o===void 0?0:o,u=e.outerRadius,l=u===void 0?0:u,c=e.gridType,f=c===void 0?"polygon":c,d=e.radialLines,h=d===void 0?!0:d,y=dK(e,fK);return l<=0?null:x.createElement("g",{className:"recharts-polar-grid"},x.createElement(mK,xr({cx:n,cy:a,innerRadius:s,outerRadius:l,gridType:f,radialLines:h},y)),x.createElement(_K,xr({cx:n,cy:a,innerRadius:s,outerRadius:l,gridType:f,radialLines:h},y)))};iw.displayName="PolarGrid";var xK=qs,OK=ub,SK=er;function AK(t,e){return t&&t.length?xK(t,SK(e),OK):void 0}var PK=AK;const EK=je(PK);var TK=qs,jK=er,$K=lb;function kK(t,e){return t&&t.length?TK(t,jK(e),$K):void 0}var CK=kK;const IK=je(CK);var NK=["cx","cy","angle","ticks","axisLine"],MK=["ticks","tick","angle","tickFormatter","stroke"];function _i(t){"@babel/helpers - typeof";return _i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_i(t)}function so(){return so=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},so.apply(this,arguments)}function aw(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function xn(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?aw(Object(r),!0).forEach(function(n){fu(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):aw(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function ow(t,e){if(t==null)return{};var r=DK(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function DK(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function RK(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function sw(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,lw(n.key),n)}}function LK(t,e,r){return e&&sw(t.prototype,e),r&&sw(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function BK(t,e,r){return e=cu(e),UK(t,uw()?Reflect.construct(e,r||[],cu(t).constructor):e.apply(t,r))}function UK(t,e){if(e&&(_i(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return FK(t)}function FK(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function uw(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(uw=function(){return!!t})()}function cu(t){return cu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},cu(t)}function WK(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ld(t,e)}function ld(t,e){return ld=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},ld(t,e)}function fu(t,e,r){return e=lw(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function lw(t){var e=qK(t,"string");return _i(e)=="symbol"?e:e+""}function qK(t,e){if(_i(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(_i(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var xi=function(t){function e(){return RK(this,e),BK(this,e,arguments)}return WK(e,t),LK(e,[{key:"getTickValueCoord",value:function(n){var i=n.coordinate,a=this.props,o=a.angle,s=a.cx,u=a.cy;return we(s,u,i,o)}},{key:"getTickTextAnchor",value:function(){var n=this.props.orientation,i;switch(n){case"left":i="end";break;case"right":i="start";break;default:i="middle";break}return i}},{key:"getViewBox",value:function(){var n=this.props,i=n.cx,a=n.cy,o=n.angle,s=n.ticks,u=EK(s,function(c){return c.coordinate||0}),l=IK(s,function(c){return c.coordinate||0});return{cx:i,cy:a,startAngle:o,endAngle:o,innerRadius:l.coordinate||0,outerRadius:u.coordinate||0}}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.cx,a=n.cy,o=n.angle,s=n.ticks,u=n.axisLine,l=ow(n,NK),c=s.reduce(function(y,v){return[Math.min(y[0],v.coordinate),Math.max(y[1],v.coordinate)]},[1/0,-1/0]),f=we(i,a,c[0],o),d=we(i,a,c[1],o),h=xn(xn(xn({},Q(l,!1)),{},{fill:"none"},Q(u,!1)),{},{x1:f.x,y1:f.y,x2:d.x,y2:d.y});return x.createElement("line",so({className:"recharts-polar-radius-axis-line"},h))}},{key:"renderTicks",value:function(){var n=this,i=this.props,a=i.ticks,o=i.tick,s=i.angle,u=i.tickFormatter,l=i.stroke,c=ow(i,MK),f=this.getTickTextAnchor(),d=Q(c,!1),h=Q(o,!1),y=a.map(function(v,p){var m=n.getTickValueCoord(v),b=xn(xn(xn(xn({textAnchor:f,transform:"rotate(".concat(90-s,", ").concat(m.x,", ").concat(m.y,")")},d),{},{stroke:"none",fill:l},h),{},{index:p},m),{},{payload:v});return x.createElement(pe,so({className:le("recharts-polar-radius-axis-tick",Qb(o)),key:"tick-".concat(v.coordinate)},on(n.props,v,p)),e.renderTickItem(o,b,u?u(v.value,p):v.value))});return x.createElement(pe,{className:"recharts-polar-radius-axis-ticks"},y)}},{key:"render",value:function(){var n=this.props,i=n.ticks,a=n.axisLine,o=n.tick;return!i||!i.length?null:x.createElement(pe,{className:le("recharts-polar-radius-axis",this.props.className)},a&&this.renderAxisLine(),o&&this.renderTicks(),nt.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(n,i,a){var o;return x.isValidElement(n)?o=x.cloneElement(n,i):ae(n)?o=n(i):o=x.createElement(cn,so({},i,{className:"recharts-polar-radius-axis-tick-value"}),a),o}}])}(x.PureComponent);fu(xi,"displayName","PolarRadiusAxis"),fu(xi,"axisType","radiusAxis"),fu(xi,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});function Oi(t){"@babel/helpers - typeof";return Oi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Oi(t)}function On(){return On=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},On.apply(this,arguments)}function cw(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Sn(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?cw(Object(r),!0).forEach(function(n){hu(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):cw(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function zK(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fw(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,hw(n.key),n)}}function KK(t,e,r){return e&&fw(t.prototype,e),r&&fw(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function VK(t,e,r){return e=du(e),HK(t,dw()?Reflect.construct(e,r||[],du(t).constructor):e.apply(t,r))}function HK(t,e){if(e&&(Oi(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return GK(t)}function GK(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function dw(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(dw=function(){return!!t})()}function du(t){return du=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},du(t)}function YK(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&cd(t,e)}function cd(t,e){return cd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},cd(t,e)}function hu(t,e,r){return e=hw(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function hw(t){var e=XK(t,"string");return Oi(e)=="symbol"?e:e+""}function XK(t,e){if(Oi(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Oi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var JK=Math.PI/180,pw=1e-5,Si=function(t){function e(){return zK(this,e),VK(this,e,arguments)}return YK(e,t),KK(e,[{key:"getTickLineCoord",value:function(n){var i=this.props,a=i.cx,o=i.cy,s=i.radius,u=i.orientation,l=i.tickSize,c=l||8,f=we(a,o,s,n.coordinate),d=we(a,o,s+(u==="inner"?-1:1)*c,n.coordinate);return{x1:f.x,y1:f.y,x2:d.x,y2:d.y}}},{key:"getTickTextAnchor",value:function(n){var i=this.props.orientation,a=Math.cos(-n.coordinate*JK),o;return a>pw?o=i==="outer"?"start":"end":a<-pw?o=i==="outer"?"end":"start":o="middle",o}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.cx,a=n.cy,o=n.radius,s=n.axisLine,u=n.axisLineType,l=Sn(Sn({},Q(this.props,!1)),{},{fill:"none"},Q(s,!1));if(u==="circle")return x.createElement(wi,On({className:"recharts-polar-angle-axis-line"},l,{cx:i,cy:a,r:o}));var c=this.props.ticks,f=c.map(function(d){return we(i,a,o,d.coordinate)});return x.createElement(tw,On({className:"recharts-polar-angle-axis-line"},l,{points:f}))}},{key:"renderTicks",value:function(){var n=this,i=this.props,a=i.ticks,o=i.tick,s=i.tickLine,u=i.tickFormatter,l=i.stroke,c=Q(this.props,!1),f=Q(o,!1),d=Sn(Sn({},c),{},{fill:"none"},Q(s,!1)),h=a.map(function(y,v){var p=n.getTickLineCoord(y),m=n.getTickTextAnchor(y),b=Sn(Sn(Sn({textAnchor:m},c),{},{stroke:"none",fill:l},f),{},{index:v,payload:y,x:p.x2,y:p.y2});return x.createElement(pe,On({className:le("recharts-polar-angle-axis-tick",Qb(o)),key:"tick-".concat(y.coordinate)},on(n.props,y,v)),s&&x.createElement("line",On({className:"recharts-polar-angle-axis-tick-line"},d,p)),o&&e.renderTickItem(o,b,u?u(y.value,v):y.value))});return x.createElement(pe,{className:"recharts-polar-angle-axis-ticks"},h)}},{key:"render",value:function(){var n=this.props,i=n.ticks,a=n.radius,o=n.axisLine;return a<=0||!i||!i.length?null:x.createElement(pe,{className:le("recharts-polar-angle-axis",this.props.className)},o&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(n,i,a){var o;return x.isValidElement(n)?o=x.cloneElement(n,i):ae(n)?o=n(i):o=x.createElement(cn,On({},i,{className:"recharts-polar-angle-axis-tick-value"}),a),o}}])}(x.PureComponent);hu(Si,"displayName","PolarAngleAxis"),hu(Si,"axisType","angleAxis"),hu(Si,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var ZK=Py,QK=ZK(Object.getPrototypeOf,Object),eV=QK,tV=lr,rV=eV,nV=cr,iV="[object Object]",aV=Function.prototype,oV=Object.prototype,vw=aV.toString,sV=oV.hasOwnProperty,uV=vw.call(Object);function lV(t){if(!nV(t)||tV(t)!=iV)return!1;var e=rV(t);if(e===null)return!0;var r=sV.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&vw.call(r)==uV}var cV=lV;const fV=je(cV);var dV=lr,hV=cr,pV="[object Boolean]";function vV(t){return t===!0||t===!1||hV(t)&&dV(t)==pV}var yV=vV;const gV=je(yV);function uo(t){"@babel/helpers - typeof";return uo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},uo(t)}function pu(){return pu=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},pu.apply(this,arguments)}function mV(t,e){return xV(t)||_V(t,e)||wV(t,e)||bV()}function bV(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
161
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wV(t,e){if(t){if(typeof t=="string")return yw(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return yw(t,e)}}function yw(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function _V(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,o,s=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(c){l=!0,i=c}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function xV(t){if(Array.isArray(t))return t}function gw(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function mw(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?gw(Object(r),!0).forEach(function(n){OV(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):gw(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function OV(t,e,r){return e=SV(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function SV(t){var e=AV(t,"string");return uo(e)=="symbol"?e:e+""}function AV(t,e){if(uo(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(uo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var bw=function(e,r,n,i,a){var o=n-i,s;return s="M ".concat(e,",").concat(r),s+="L ".concat(e+n,",").concat(r),s+="L ".concat(e+n-o/2,",").concat(r+a),s+="L ".concat(e+n-o/2-i,",").concat(r+a),s+="L ".concat(e,",").concat(r," Z"),s},PV={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},EV=function(e){var r=mw(mw({},PV),e),n=x.useRef(),i=x.useState(-1),a=mV(i,2),o=a[0],s=a[1];x.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var w=n.current.getTotalLength();w&&s(w)}catch{}},[]);var u=r.x,l=r.y,c=r.upperWidth,f=r.lowerWidth,d=r.height,h=r.className,y=r.animationEasing,v=r.animationDuration,p=r.animationBegin,m=r.isUpdateAnimationActive;if(u!==+u||l!==+l||c!==+c||f!==+f||d!==+d||c===0&&f===0||d===0)return null;var b=le("recharts-trapezoid",h);return m?x.createElement(Rt,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:d,x:u,y:l},to:{upperWidth:c,lowerWidth:f,height:d,x:u,y:l},duration:v,animationEasing:y,isActive:m},function(w){var O=w.upperWidth,g=w.lowerWidth,_=w.height,S=w.x,A=w.y;return x.createElement(Rt,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:p,duration:v,easing:y},x.createElement("path",pu({},Q(r,!0),{className:b,d:bw(S,A,O,g,_),ref:n})))}):x.createElement("g",null,x.createElement("path",pu({},Q(r,!0),{className:b,d:bw(u,l,c,f,d)})))},TV=["option","shapeType","propTransformer","activeClassName","isActive"];function lo(t){"@babel/helpers - typeof";return lo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},lo(t)}function jV(t,e){if(t==null)return{};var r=$V(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function $V(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function ww(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function vu(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ww(Object(r),!0).forEach(function(n){kV(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ww(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function kV(t,e,r){return e=CV(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function CV(t){var e=IV(t,"string");return lo(e)=="symbol"?e:e+""}function IV(t,e){if(lo(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(lo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function NV(t,e){return vu(vu({},e),t)}function MV(t,e){return t==="symbols"}function _w(t){var e=t.shapeType,r=t.elementProps;switch(e){case"rectangle":return x.createElement(ad,r);case"trapezoid":return x.createElement(EV,r);case"sector":return x.createElement(l0,r);case"symbols":if(MV(e))return x.createElement(lc,r);break;default:return null}}function DV(t){return x.isValidElement(t)?t.props:t}function xw(t){var e=t.option,r=t.shapeType,n=t.propTransformer,i=n===void 0?NV:n,a=t.activeClassName,o=a===void 0?"recharts-active-shape":a,s=t.isActive,u=jV(t,TV),l;if(x.isValidElement(e))l=x.cloneElement(e,vu(vu({},u),DV(e)));else if(ae(e))l=e(u);else if(fV(e)&&!gV(e)){var c=i(e,u);l=x.createElement(_w,{shapeType:r,elementProps:c})}else{var f=u;l=x.createElement(_w,{shapeType:r,elementProps:f})}return s?x.createElement(pe,{className:o},l):l}function yu(t,e){return e!=null&&"trapezoids"in t.props}function gu(t,e){return e!=null&&"sectors"in t.props}function co(t,e){return e!=null&&"points"in t.props}function RV(t,e){var r,n,i=t.x===(e==null||(r=e.labelViewBox)===null||r===void 0?void 0:r.x)||t.x===e.x,a=t.y===(e==null||(n=e.labelViewBox)===null||n===void 0?void 0:n.y)||t.y===e.y;return i&&a}function LV(t,e){var r=t.endAngle===e.endAngle,n=t.startAngle===e.startAngle;return r&&n}function BV(t,e){var r=t.x===e.x,n=t.y===e.y,i=t.z===e.z;return r&&n&&i}function UV(t,e){var r;return yu(t,e)?r=RV:gu(t,e)?r=LV:co(t,e)&&(r=BV),r}function FV(t,e){var r;return yu(t,e)?r="trapezoids":gu(t,e)?r="sectors":co(t,e)&&(r="points"),r}function WV(t,e){if(yu(t,e)){var r;return(r=e.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}if(gu(t,e)){var n;return(n=e.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}return co(t,e)?e.payload:{}}function qV(t){var e=t.activeTooltipItem,r=t.graphicalItem,n=t.itemData,i=FV(r,e),a=WV(r,e),o=n.filter(function(u,l){var c=Lr(a,u),f=r.props[i].filter(function(y){var v=UV(r,e);return v(y,e)}),d=r.props[i].indexOf(f[f.length-1]),h=l===d;return c&&h}),s=n.indexOf(o[o.length-1]);return s}var mu;function Ai(t){"@babel/helpers - typeof";return Ai=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ai(t)}function Pi(){return Pi=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Pi.apply(this,arguments)}function Ow(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Me(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ow(Object(r),!0).forEach(function(n){Lt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ow(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function zV(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Sw(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Pw(n.key),n)}}function KV(t,e,r){return e&&Sw(t.prototype,e),r&&Sw(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function VV(t,e,r){return e=bu(e),HV(t,Aw()?Reflect.construct(e,r||[],bu(t).constructor):e.apply(t,r))}function HV(t,e){if(e&&(Ai(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return GV(t)}function GV(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Aw(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Aw=function(){return!!t})()}function bu(t){return bu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},bu(t)}function YV(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&fd(t,e)}function fd(t,e){return fd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},fd(t,e)}function Lt(t,e,r){return e=Pw(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Pw(t){var e=XV(t,"string");return Ai(e)=="symbol"?e:e+""}function XV(t,e){if(Ai(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Ai(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Or=function(t){function e(r){var n;return zV(this,e),n=VV(this,e,[r]),Lt(n,"pieRef",null),Lt(n,"sectorRefs",[]),Lt(n,"id",an("recharts-pie-")),Lt(n,"handleAnimationEnd",function(){var i=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),ae(i)&&i()}),Lt(n,"handleAnimationStart",function(){var i=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),ae(i)&&i()}),n.state={isAnimationFinished:!r.isAnimationActive,prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,sectorToFocus:0},n}return YV(e,t),KV(e,[{key:"isActiveIndex",value:function(n){var i=this.props.activeIndex;return Array.isArray(i)?i.indexOf(n)!==-1:n===i}},{key:"hasActiveIndex",value:function(){var n=this.props.activeIndex;return Array.isArray(n)?n.length!==0:n||n===0}},{key:"renderLabels",value:function(n){var i=this.props.isAnimationActive;if(i&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.label,s=a.labelLine,u=a.dataKey,l=a.valueKey,c=Q(this.props,!1),f=Q(o,!1),d=Q(s,!1),h=o&&o.offsetRadius||20,y=n.map(function(v,p){var m=(v.startAngle+v.endAngle)/2,b=we(v.cx,v.cy,v.outerRadius+h,m),w=Me(Me(Me(Me({},c),v),{},{stroke:"none"},f),{},{index:p,textAnchor:e.getTextAnchor(b.x,v.cx)},b),O=Me(Me(Me(Me({},c),v),{},{fill:"none",stroke:v.fill},d),{},{index:p,points:[we(v.cx,v.cy,v.outerRadius,m),b]}),g=u;return fe(u)&&fe(l)?g="value":fe(u)&&(g=l),x.createElement(pe,{key:"label-".concat(v.startAngle,"-").concat(v.endAngle,"-").concat(v.midAngle,"-").concat(p)},s&&e.renderLabelLineItem(s,O,"line"),e.renderLabelItem(o,w,We(v,g)))});return x.createElement(pe,{className:"recharts-pie-labels"},y)}},{key:"renderSectorsStatically",value:function(n){var i=this,a=this.props,o=a.activeShape,s=a.blendStroke,u=a.inactiveShape;return n.map(function(l,c){if((l==null?void 0:l.startAngle)===0&&(l==null?void 0:l.endAngle)===0&&n.length!==1)return null;var f=i.isActiveIndex(c),d=u&&i.hasActiveIndex()?u:null,h=f?o:d,y=Me(Me({},l),{},{stroke:s?l.fill:l.stroke,tabIndex:-1});return x.createElement(pe,Pi({ref:function(p){p&&!i.sectorRefs.includes(p)&&i.sectorRefs.push(p)},tabIndex:-1,className:"recharts-pie-sector"},on(i.props,l,c),{key:"sector-".concat(l==null?void 0:l.startAngle,"-").concat(l==null?void 0:l.endAngle,"-").concat(l.midAngle,"-").concat(c)}),x.createElement(xw,Pi({option:h,isActive:f,shapeType:"sector"},y)))})}},{key:"renderSectorsWithAnimation",value:function(){var n=this,i=this.props,a=i.sectors,o=i.isAnimationActive,s=i.animationBegin,u=i.animationDuration,l=i.animationEasing,c=i.animationId,f=this.state,d=f.prevSectors,h=f.prevIsAnimationActive;return x.createElement(Rt,{begin:s,duration:u,isActive:o,easing:l,from:{t:0},to:{t:1},key:"pie-".concat(c,"-").concat(h),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(y){var v=y.t,p=[],m=a&&a[0],b=m.startAngle;return a.forEach(function(w,O){var g=d&&d[O],_=O>0?xt(w,"paddingAngle",0):0;if(g){var S=Fe(g.endAngle-g.startAngle,w.endAngle-w.startAngle),A=Me(Me({},w),{},{startAngle:b+_,endAngle:b+S(v)+_});p.push(A),b=A.endAngle}else{var T=w.endAngle,M=w.startAngle,$=Fe(0,T-M),j=$(v),N=Me(Me({},w),{},{startAngle:b+_,endAngle:b+j+_});p.push(N),b=N.endAngle}}),x.createElement(pe,null,n.renderSectorsStatically(p))})}},{key:"attachKeyboardHandlers",value:function(n){var i=this;n.onkeydown=function(a){if(!a.altKey)switch(a.key){case"ArrowLeft":{var o=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[o].focus(),i.setState({sectorToFocus:o});break}case"ArrowRight":{var s=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[s].focus(),i.setState({sectorToFocus:s});break}case"Escape":{i.sectorRefs[i.state.sectorToFocus].blur(),i.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var n=this.props,i=n.sectors,a=n.isAnimationActive,o=this.state.prevSectors;return a&&i&&i.length&&(!o||!Lr(o,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var n=this,i=this.props,a=i.hide,o=i.sectors,s=i.className,u=i.label,l=i.cx,c=i.cy,f=i.innerRadius,d=i.outerRadius,h=i.isAnimationActive,y=this.state.isAnimationFinished;if(a||!o||!o.length||!V(l)||!V(c)||!V(f)||!V(d))return null;var v=le("recharts-pie",s);return x.createElement(pe,{tabIndex:this.props.rootTabIndex,className:v,ref:function(m){n.pieRef=m}},this.renderSectors(),u&&this.renderLabels(o),nt.renderCallByParent(this.props,null,!1),(!h||y)&&Ht.renderCallByParent(this.props,o,!1))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return i.prevIsAnimationActive!==n.isAnimationActive?{prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:[],isAnimationFinished:!0}:n.isAnimationActive&&n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:i.curSectors,isAnimationFinished:!0}:n.sectors!==i.curSectors?{curSectors:n.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(n,i){return n>i?"start":n<i?"end":"middle"}},{key:"renderLabelLineItem",value:function(n,i,a){if(x.isValidElement(n))return x.cloneElement(n,i);if(ae(n))return n(i);var o=le("recharts-pie-label-line",typeof n!="boolean"?n.className:"");return x.createElement(wn,Pi({},i,{key:a,type:"linear",className:o}))}},{key:"renderLabelItem",value:function(n,i,a){if(x.isValidElement(n))return x.cloneElement(n,i);var o=a;if(ae(n)&&(o=n(i),x.isValidElement(o)))return o;var s=le("recharts-pie-label-text",typeof n!="boolean"&&!ae(n)?n.className:"");return x.createElement(cn,Pi({},i,{alignmentBaseline:"middle",className:s}),o)}}])}(x.PureComponent);mu=Or,Lt(Or,"displayName","Pie"),Lt(Or,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!It.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0}),Lt(Or,"parseDeltaAngle",function(t,e){var r=ft(e-t),n=Math.min(Math.abs(e-t),360);return r*n}),Lt(Or,"getRealPieData",function(t){var e=t.data,r=t.children,n=Q(t,!1),i=Ot(r,_s);return e&&e.length?e.map(function(a,o){return Me(Me(Me({payload:a},n),a),i&&i[o]&&i[o].props)}):i&&i.length?i.map(function(a){return Me(Me({},n),a.props)}):[]}),Lt(Or,"parseCoordinateOfPie",function(t,e){var r=e.top,n=e.left,i=e.width,a=e.height,o=Xb(i,a),s=n+dt(t.cx,i,i/2),u=r+dt(t.cy,a,a/2),l=dt(t.innerRadius,o,0),c=dt(t.outerRadius,o,o*.8),f=t.maxRadius||Math.sqrt(i*i+a*a)/2;return{cx:s,cy:u,innerRadius:l,outerRadius:c,maxRadius:f}}),Lt(Or,"getComposedData",function(t){var e=t.item,r=t.offset,n=e.type.defaultProps!==void 0?Me(Me({},e.type.defaultProps),e.props):e.props,i=mu.getRealPieData(n);if(!i||!i.length)return null;var a=n.cornerRadius,o=n.startAngle,s=n.endAngle,u=n.paddingAngle,l=n.dataKey,c=n.nameKey,f=n.valueKey,d=n.tooltipType,h=Math.abs(n.minAngle),y=mu.parseCoordinateOfPie(n,r),v=mu.parseDeltaAngle(o,s),p=Math.abs(v),m=l;fe(l)&&fe(f)?(zt(!1,`Use "dataKey" to specify the value of pie,
|
|
159
|
+
A `).concat(y,",").concat(y,",0,0,").concat(l,",").concat(e,",").concat(r+i-s*y," Z")}else c="M ".concat(e,",").concat(r," h ").concat(n," v ").concat(i," h ").concat(-n," Z");return c},z3=function(e,r){if(!e||!r)return!1;var n=e.x,i=e.y,a=r.x,o=r.y,s=r.width,u=r.height;if(Math.abs(s)>0&&Math.abs(u)>0){var l=Math.min(a,a+s),c=Math.max(a,a+s),f=Math.min(o,o+u),d=Math.max(o,o+u);return n>=l&&n<=c&&i>=f&&i<=d}return!1},K3={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},id=function(e){var r=X0(X0({},K3),e),n=x.useRef(),i=x.useState(-1),a=D3(i,2),o=a[0],s=a[1];x.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var O=n.current.getTotalLength();O&&s(O)}catch{}},[]);var u=r.x,l=r.y,c=r.width,f=r.height,d=r.radius,h=r.className,y=r.animationEasing,v=r.animationDuration,p=r.animationBegin,m=r.isAnimationActive,b=r.isUpdateAnimationActive;if(u!==+u||l!==+l||c!==+c||f!==+f||c===0||f===0)return null;var w=le("recharts-rectangle",h);return b?x.createElement(Rt,{canBegin:o>0,from:{width:c,height:f,x:u,y:l},to:{width:c,height:f,x:u,y:l},duration:v,animationEasing:y,isActive:b},function(O){var g=O.width,_=O.height,S=O.x,A=O.y;return x.createElement(Rt,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:p,duration:v,isActive:m,easing:y},x.createElement("path",uu({},Q(r,!0),{className:w,d:J0(S,A,g,_,d),ref:n})))}):x.createElement("path",uu({},Q(r,!0),{className:w,d:J0(u,l,c,f,d)}))},V3=["points","className","baseLinePoints","connectNulls"];function bi(){return bi=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},bi.apply(this,arguments)}function H3(t,e){if(t==null)return{};var r=G3(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function G3(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function Z0(t){return Z3(t)||J3(t)||X3(t)||Y3()}function Y3(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
160
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function X3(t,e){if(t){if(typeof t=="string")return ad(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ad(t,e)}}function J3(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Z3(t){if(Array.isArray(t))return ad(t)}function ad(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Q0=function(e){return e&&e.x===+e.x&&e.y===+e.y},Q3=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=[[]];return e.forEach(function(n){Q0(n)?r[r.length-1].push(n):r[r.length-1].length>0&&r.push([])}),Q0(e[0])&&r[r.length-1].push(e[0]),r[r.length-1].length<=0&&(r=r.slice(0,-1)),r},no=function(e,r){var n=Q3(e);r&&(n=[n.reduce(function(a,o){return[].concat(Z0(a),Z0(o))},[])]);var i=n.map(function(a){return a.reduce(function(o,s,u){return"".concat(o).concat(u===0?"M":"L").concat(s.x,",").concat(s.y)},"")}).join("");return n.length===1?"".concat(i,"Z"):i},eK=function(e,r,n){var i=no(e,n);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(no(r.reverse(),n).slice(1))},ew=function(e){var r=e.points,n=e.className,i=e.baseLinePoints,a=e.connectNulls,o=H3(e,V3);if(!r||!r.length)return null;var s=le("recharts-polygon",n);if(i&&i.length){var u=o.stroke&&o.stroke!=="none",l=eK(r,i,a);return x.createElement("g",{className:s},x.createElement("path",bi({},Q(o,!0),{fill:l.slice(-1)==="Z"?o.fill:"none",stroke:"none",d:l})),u?x.createElement("path",bi({},Q(o,!0),{fill:"none",d:no(r,a)})):null,u?x.createElement("path",bi({},Q(o,!0),{fill:"none",d:no(i,a)})):null)}var c=no(r,a);return x.createElement("path",bi({},Q(o,!0),{fill:c.slice(-1)==="Z"?o.fill:"none",className:s,d:c}))};function od(){return od=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},od.apply(this,arguments)}var wi=function(e){var r=e.cx,n=e.cy,i=e.r,a=e.className,o=le("recharts-dot",a);return r===+r&&n===+n&&i===+i?ve.createElement("circle",od({},Q(e,!1),Xo(e),{className:o,cx:r,cy:n,r:i})):null};function io(t){"@babel/helpers - typeof";return io=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},io(t)}var tK=["x","y","top","left","width","height","className"];function sd(){return sd=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},sd.apply(this,arguments)}function tw(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function rK(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?tw(Object(r),!0).forEach(function(n){nK(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):tw(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function nK(t,e,r){return e=iK(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function iK(t){var e=aK(t,"string");return io(e)=="symbol"?e:e+""}function aK(t,e){if(io(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(io(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function oK(t,e){if(t==null)return{};var r=sK(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function sK(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}var uK=function(e,r,n,i,a,o){return"M".concat(e,",").concat(a,"v").concat(i,"M").concat(o,",").concat(r,"h").concat(n)},lK=function(e){var r=e.x,n=r===void 0?0:r,i=e.y,a=i===void 0?0:i,o=e.top,s=o===void 0?0:o,u=e.left,l=u===void 0?0:u,c=e.width,f=c===void 0?0:c,d=e.height,h=d===void 0?0:d,y=e.className,v=oK(e,tK),p=rK({x:n,y:a,top:s,left:l,width:f,height:h},v);return!V(n)||!V(a)||!V(f)||!V(h)||!V(s)||!V(l)?null:x.createElement("path",sd({},Q(p,!0),{className:le("recharts-cross",y),d:uK(n,a,f,h,s,l)}))},cK=["cx","cy","innerRadius","outerRadius","gridType","radialLines"];function ao(t){"@babel/helpers - typeof";return ao=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ao(t)}function fK(t,e){if(t==null)return{};var r=dK(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function dK(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function xr(){return xr=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},xr.apply(this,arguments)}function rw(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function oo(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?rw(Object(r),!0).forEach(function(n){hK(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):rw(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function hK(t,e,r){return e=pK(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function pK(t){var e=vK(t,"string");return ao(e)=="symbol"?e:e+""}function vK(t,e){if(ao(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(ao(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var yK=function(e,r,n,i){var a="";return i.forEach(function(o,s){var u=we(r,n,e,o);s?a+="L ".concat(u.x,",").concat(u.y):a+="M ".concat(u.x,",").concat(u.y)}),a+="Z",a},gK=function(e){var r=e.cx,n=e.cy,i=e.innerRadius,a=e.outerRadius,o=e.polarAngles,s=e.radialLines;if(!o||!o.length||!s)return null;var u=oo({stroke:"#ccc"},Q(e,!1));return x.createElement("g",{className:"recharts-polar-grid-angle"},o.map(function(l){var c=we(r,n,i,l),f=we(r,n,a,l);return x.createElement("line",xr({},u,{key:"line-".concat(l),x1:c.x,y1:c.y,x2:f.x,y2:f.y}))}))},mK=function(e){var r=e.cx,n=e.cy,i=e.radius,a=e.index,o=oo(oo({stroke:"#ccc"},Q(e,!1)),{},{fill:"none"});return x.createElement("circle",xr({},o,{className:le("recharts-polar-grid-concentric-circle",e.className),key:"circle-".concat(a),cx:r,cy:n,r:i}))},bK=function(e){var r=e.radius,n=e.index,i=oo(oo({stroke:"#ccc"},Q(e,!1)),{},{fill:"none"});return x.createElement("path",xr({},i,{className:le("recharts-polar-grid-concentric-polygon",e.className),key:"path-".concat(n),d:yK(r,e.cx,e.cy,e.polarAngles)}))},wK=function(e){var r=e.polarRadius,n=e.gridType;return!r||!r.length?null:x.createElement("g",{className:"recharts-polar-grid-concentric"},r.map(function(i,a){var o=a;return n==="circle"?x.createElement(mK,xr({key:o},e,{radius:i,index:a})):x.createElement(bK,xr({key:o},e,{radius:i,index:a}))}))},nw=function(e){var r=e.cx,n=r===void 0?0:r,i=e.cy,a=i===void 0?0:i,o=e.innerRadius,s=o===void 0?0:o,u=e.outerRadius,l=u===void 0?0:u,c=e.gridType,f=c===void 0?"polygon":c,d=e.radialLines,h=d===void 0?!0:d,y=fK(e,cK);return l<=0?null:x.createElement("g",{className:"recharts-polar-grid"},x.createElement(gK,xr({cx:n,cy:a,innerRadius:s,outerRadius:l,gridType:f,radialLines:h},y)),x.createElement(wK,xr({cx:n,cy:a,innerRadius:s,outerRadius:l,gridType:f,radialLines:h},y)))};nw.displayName="PolarGrid";var _K=Ws,xK=sb,OK=er;function SK(t,e){return t&&t.length?_K(t,OK(e),xK):void 0}var AK=SK;const PK=je(AK);var EK=Ws,TK=er,jK=ub;function $K(t,e){return t&&t.length?EK(t,TK(e),jK):void 0}var kK=$K;const CK=je(kK);var IK=["cx","cy","angle","ticks","axisLine"],NK=["ticks","tick","angle","tickFormatter","stroke"];function _i(t){"@babel/helpers - typeof";return _i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_i(t)}function so(){return so=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},so.apply(this,arguments)}function iw(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function xn(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?iw(Object(r),!0).forEach(function(n){cu(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):iw(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function aw(t,e){if(t==null)return{};var r=MK(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function MK(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function DK(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ow(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,uw(n.key),n)}}function RK(t,e,r){return e&&ow(t.prototype,e),r&&ow(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function LK(t,e,r){return e=lu(e),BK(t,sw()?Reflect.construct(e,r||[],lu(t).constructor):e.apply(t,r))}function BK(t,e){if(e&&(_i(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return UK(t)}function UK(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function sw(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(sw=function(){return!!t})()}function lu(t){return lu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},lu(t)}function FK(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ud(t,e)}function ud(t,e){return ud=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},ud(t,e)}function cu(t,e,r){return e=uw(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function uw(t){var e=WK(t,"string");return _i(e)=="symbol"?e:e+""}function WK(t,e){if(_i(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(_i(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var xi=function(t){function e(){return DK(this,e),LK(this,e,arguments)}return FK(e,t),RK(e,[{key:"getTickValueCoord",value:function(n){var i=n.coordinate,a=this.props,o=a.angle,s=a.cx,u=a.cy;return we(s,u,i,o)}},{key:"getTickTextAnchor",value:function(){var n=this.props.orientation,i;switch(n){case"left":i="end";break;case"right":i="start";break;default:i="middle";break}return i}},{key:"getViewBox",value:function(){var n=this.props,i=n.cx,a=n.cy,o=n.angle,s=n.ticks,u=PK(s,function(c){return c.coordinate||0}),l=CK(s,function(c){return c.coordinate||0});return{cx:i,cy:a,startAngle:o,endAngle:o,innerRadius:l.coordinate||0,outerRadius:u.coordinate||0}}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.cx,a=n.cy,o=n.angle,s=n.ticks,u=n.axisLine,l=aw(n,IK),c=s.reduce(function(y,v){return[Math.min(y[0],v.coordinate),Math.max(y[1],v.coordinate)]},[1/0,-1/0]),f=we(i,a,c[0],o),d=we(i,a,c[1],o),h=xn(xn(xn({},Q(l,!1)),{},{fill:"none"},Q(u,!1)),{},{x1:f.x,y1:f.y,x2:d.x,y2:d.y});return x.createElement("line",so({className:"recharts-polar-radius-axis-line"},h))}},{key:"renderTicks",value:function(){var n=this,i=this.props,a=i.ticks,o=i.tick,s=i.angle,u=i.tickFormatter,l=i.stroke,c=aw(i,NK),f=this.getTickTextAnchor(),d=Q(c,!1),h=Q(o,!1),y=a.map(function(v,p){var m=n.getTickValueCoord(v),b=xn(xn(xn(xn({textAnchor:f,transform:"rotate(".concat(90-s,", ").concat(m.x,", ").concat(m.y,")")},d),{},{stroke:"none",fill:l},h),{},{index:p},m),{},{payload:v});return x.createElement(pe,so({className:le("recharts-polar-radius-axis-tick",Zb(o)),key:"tick-".concat(v.coordinate)},on(n.props,v,p)),e.renderTickItem(o,b,u?u(v.value,p):v.value))});return x.createElement(pe,{className:"recharts-polar-radius-axis-ticks"},y)}},{key:"render",value:function(){var n=this.props,i=n.ticks,a=n.axisLine,o=n.tick;return!i||!i.length?null:x.createElement(pe,{className:le("recharts-polar-radius-axis",this.props.className)},a&&this.renderAxisLine(),o&&this.renderTicks(),nt.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(n,i,a){var o;return x.isValidElement(n)?o=x.cloneElement(n,i):ae(n)?o=n(i):o=x.createElement(cn,so({},i,{className:"recharts-polar-radius-axis-tick-value"}),a),o}}])}(x.PureComponent);cu(xi,"displayName","PolarRadiusAxis"),cu(xi,"axisType","radiusAxis"),cu(xi,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});function Oi(t){"@babel/helpers - typeof";return Oi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Oi(t)}function On(){return On=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},On.apply(this,arguments)}function lw(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Sn(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?lw(Object(r),!0).forEach(function(n){du(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):lw(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function qK(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function cw(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,dw(n.key),n)}}function zK(t,e,r){return e&&cw(t.prototype,e),r&&cw(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function KK(t,e,r){return e=fu(e),VK(t,fw()?Reflect.construct(e,r||[],fu(t).constructor):e.apply(t,r))}function VK(t,e){if(e&&(Oi(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return HK(t)}function HK(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function fw(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(fw=function(){return!!t})()}function fu(t){return fu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},fu(t)}function GK(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ld(t,e)}function ld(t,e){return ld=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},ld(t,e)}function du(t,e,r){return e=dw(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function dw(t){var e=YK(t,"string");return Oi(e)=="symbol"?e:e+""}function YK(t,e){if(Oi(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Oi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var XK=Math.PI/180,hw=1e-5,Si=function(t){function e(){return qK(this,e),KK(this,e,arguments)}return GK(e,t),zK(e,[{key:"getTickLineCoord",value:function(n){var i=this.props,a=i.cx,o=i.cy,s=i.radius,u=i.orientation,l=i.tickSize,c=l||8,f=we(a,o,s,n.coordinate),d=we(a,o,s+(u==="inner"?-1:1)*c,n.coordinate);return{x1:f.x,y1:f.y,x2:d.x,y2:d.y}}},{key:"getTickTextAnchor",value:function(n){var i=this.props.orientation,a=Math.cos(-n.coordinate*XK),o;return a>hw?o=i==="outer"?"start":"end":a<-hw?o=i==="outer"?"end":"start":o="middle",o}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.cx,a=n.cy,o=n.radius,s=n.axisLine,u=n.axisLineType,l=Sn(Sn({},Q(this.props,!1)),{},{fill:"none"},Q(s,!1));if(u==="circle")return x.createElement(wi,On({className:"recharts-polar-angle-axis-line"},l,{cx:i,cy:a,r:o}));var c=this.props.ticks,f=c.map(function(d){return we(i,a,o,d.coordinate)});return x.createElement(ew,On({className:"recharts-polar-angle-axis-line"},l,{points:f}))}},{key:"renderTicks",value:function(){var n=this,i=this.props,a=i.ticks,o=i.tick,s=i.tickLine,u=i.tickFormatter,l=i.stroke,c=Q(this.props,!1),f=Q(o,!1),d=Sn(Sn({},c),{},{fill:"none"},Q(s,!1)),h=a.map(function(y,v){var p=n.getTickLineCoord(y),m=n.getTickTextAnchor(y),b=Sn(Sn(Sn({textAnchor:m},c),{},{stroke:"none",fill:l},f),{},{index:v,payload:y,x:p.x2,y:p.y2});return x.createElement(pe,On({className:le("recharts-polar-angle-axis-tick",Zb(o)),key:"tick-".concat(y.coordinate)},on(n.props,y,v)),s&&x.createElement("line",On({className:"recharts-polar-angle-axis-tick-line"},d,p)),o&&e.renderTickItem(o,b,u?u(y.value,v):y.value))});return x.createElement(pe,{className:"recharts-polar-angle-axis-ticks"},h)}},{key:"render",value:function(){var n=this.props,i=n.ticks,a=n.radius,o=n.axisLine;return a<=0||!i||!i.length?null:x.createElement(pe,{className:le("recharts-polar-angle-axis",this.props.className)},o&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(n,i,a){var o;return x.isValidElement(n)?o=x.cloneElement(n,i):ae(n)?o=n(i):o=x.createElement(cn,On({},i,{className:"recharts-polar-angle-axis-tick-value"}),a),o}}])}(x.PureComponent);du(Si,"displayName","PolarAngleAxis"),du(Si,"axisType","angleAxis"),du(Si,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var JK=Ay,ZK=JK(Object.getPrototypeOf,Object),QK=ZK,eV=lr,tV=QK,rV=cr,nV="[object Object]",iV=Function.prototype,aV=Object.prototype,pw=iV.toString,oV=aV.hasOwnProperty,sV=pw.call(Object);function uV(t){if(!rV(t)||eV(t)!=nV)return!1;var e=tV(t);if(e===null)return!0;var r=oV.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&pw.call(r)==sV}var lV=uV;const cV=je(lV);var fV=lr,dV=cr,hV="[object Boolean]";function pV(t){return t===!0||t===!1||dV(t)&&fV(t)==hV}var vV=pV;const yV=je(vV);function uo(t){"@babel/helpers - typeof";return uo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},uo(t)}function hu(){return hu=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},hu.apply(this,arguments)}function gV(t,e){return _V(t)||wV(t,e)||bV(t,e)||mV()}function mV(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
161
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bV(t,e){if(t){if(typeof t=="string")return vw(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return vw(t,e)}}function vw(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function wV(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,o,s=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(c){l=!0,i=c}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function _V(t){if(Array.isArray(t))return t}function yw(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function gw(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?yw(Object(r),!0).forEach(function(n){xV(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):yw(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function xV(t,e,r){return e=OV(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function OV(t){var e=SV(t,"string");return uo(e)=="symbol"?e:e+""}function SV(t,e){if(uo(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(uo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var mw=function(e,r,n,i,a){var o=n-i,s;return s="M ".concat(e,",").concat(r),s+="L ".concat(e+n,",").concat(r),s+="L ".concat(e+n-o/2,",").concat(r+a),s+="L ".concat(e+n-o/2-i,",").concat(r+a),s+="L ".concat(e,",").concat(r," Z"),s},AV={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},PV=function(e){var r=gw(gw({},AV),e),n=x.useRef(),i=x.useState(-1),a=gV(i,2),o=a[0],s=a[1];x.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var w=n.current.getTotalLength();w&&s(w)}catch{}},[]);var u=r.x,l=r.y,c=r.upperWidth,f=r.lowerWidth,d=r.height,h=r.className,y=r.animationEasing,v=r.animationDuration,p=r.animationBegin,m=r.isUpdateAnimationActive;if(u!==+u||l!==+l||c!==+c||f!==+f||d!==+d||c===0&&f===0||d===0)return null;var b=le("recharts-trapezoid",h);return m?x.createElement(Rt,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:d,x:u,y:l},to:{upperWidth:c,lowerWidth:f,height:d,x:u,y:l},duration:v,animationEasing:y,isActive:m},function(w){var O=w.upperWidth,g=w.lowerWidth,_=w.height,S=w.x,A=w.y;return x.createElement(Rt,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:p,duration:v,easing:y},x.createElement("path",hu({},Q(r,!0),{className:b,d:mw(S,A,O,g,_),ref:n})))}):x.createElement("g",null,x.createElement("path",hu({},Q(r,!0),{className:b,d:mw(u,l,c,f,d)})))},EV=["option","shapeType","propTransformer","activeClassName","isActive"];function lo(t){"@babel/helpers - typeof";return lo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},lo(t)}function TV(t,e){if(t==null)return{};var r=jV(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function jV(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function bw(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function pu(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?bw(Object(r),!0).forEach(function(n){$V(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):bw(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function $V(t,e,r){return e=kV(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function kV(t){var e=CV(t,"string");return lo(e)=="symbol"?e:e+""}function CV(t,e){if(lo(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(lo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function IV(t,e){return pu(pu({},e),t)}function NV(t,e){return t==="symbols"}function ww(t){var e=t.shapeType,r=t.elementProps;switch(e){case"rectangle":return x.createElement(id,r);case"trapezoid":return x.createElement(PV,r);case"sector":return x.createElement(u0,r);case"symbols":if(NV(e))return x.createElement(uc,r);break;default:return null}}function MV(t){return x.isValidElement(t)?t.props:t}function _w(t){var e=t.option,r=t.shapeType,n=t.propTransformer,i=n===void 0?IV:n,a=t.activeClassName,o=a===void 0?"recharts-active-shape":a,s=t.isActive,u=TV(t,EV),l;if(x.isValidElement(e))l=x.cloneElement(e,pu(pu({},u),MV(e)));else if(ae(e))l=e(u);else if(cV(e)&&!yV(e)){var c=i(e,u);l=x.createElement(ww,{shapeType:r,elementProps:c})}else{var f=u;l=x.createElement(ww,{shapeType:r,elementProps:f})}return s?x.createElement(pe,{className:o},l):l}function vu(t,e){return e!=null&&"trapezoids"in t.props}function yu(t,e){return e!=null&&"sectors"in t.props}function co(t,e){return e!=null&&"points"in t.props}function DV(t,e){var r,n,i=t.x===(e==null||(r=e.labelViewBox)===null||r===void 0?void 0:r.x)||t.x===e.x,a=t.y===(e==null||(n=e.labelViewBox)===null||n===void 0?void 0:n.y)||t.y===e.y;return i&&a}function RV(t,e){var r=t.endAngle===e.endAngle,n=t.startAngle===e.startAngle;return r&&n}function LV(t,e){var r=t.x===e.x,n=t.y===e.y,i=t.z===e.z;return r&&n&&i}function BV(t,e){var r;return vu(t,e)?r=DV:yu(t,e)?r=RV:co(t,e)&&(r=LV),r}function UV(t,e){var r;return vu(t,e)?r="trapezoids":yu(t,e)?r="sectors":co(t,e)&&(r="points"),r}function FV(t,e){if(vu(t,e)){var r;return(r=e.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}if(yu(t,e)){var n;return(n=e.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}return co(t,e)?e.payload:{}}function WV(t){var e=t.activeTooltipItem,r=t.graphicalItem,n=t.itemData,i=UV(r,e),a=FV(r,e),o=n.filter(function(u,l){var c=Rr(a,u),f=r.props[i].filter(function(y){var v=BV(r,e);return v(y,e)}),d=r.props[i].indexOf(f[f.length-1]),h=l===d;return c&&h}),s=n.indexOf(o[o.length-1]);return s}var gu;function Ai(t){"@babel/helpers - typeof";return Ai=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ai(t)}function Pi(){return Pi=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Pi.apply(this,arguments)}function xw(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Me(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?xw(Object(r),!0).forEach(function(n){Lt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):xw(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function qV(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ow(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Aw(n.key),n)}}function zV(t,e,r){return e&&Ow(t.prototype,e),r&&Ow(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function KV(t,e,r){return e=mu(e),VV(t,Sw()?Reflect.construct(e,r||[],mu(t).constructor):e.apply(t,r))}function VV(t,e){if(e&&(Ai(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return HV(t)}function HV(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Sw(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Sw=function(){return!!t})()}function mu(t){return mu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},mu(t)}function GV(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&cd(t,e)}function cd(t,e){return cd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},cd(t,e)}function Lt(t,e,r){return e=Aw(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Aw(t){var e=YV(t,"string");return Ai(e)=="symbol"?e:e+""}function YV(t,e){if(Ai(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Ai(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Or=function(t){function e(r){var n;return qV(this,e),n=KV(this,e,[r]),Lt(n,"pieRef",null),Lt(n,"sectorRefs",[]),Lt(n,"id",an("recharts-pie-")),Lt(n,"handleAnimationEnd",function(){var i=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),ae(i)&&i()}),Lt(n,"handleAnimationStart",function(){var i=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),ae(i)&&i()}),n.state={isAnimationFinished:!r.isAnimationActive,prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,sectorToFocus:0},n}return GV(e,t),zV(e,[{key:"isActiveIndex",value:function(n){var i=this.props.activeIndex;return Array.isArray(i)?i.indexOf(n)!==-1:n===i}},{key:"hasActiveIndex",value:function(){var n=this.props.activeIndex;return Array.isArray(n)?n.length!==0:n||n===0}},{key:"renderLabels",value:function(n){var i=this.props.isAnimationActive;if(i&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.label,s=a.labelLine,u=a.dataKey,l=a.valueKey,c=Q(this.props,!1),f=Q(o,!1),d=Q(s,!1),h=o&&o.offsetRadius||20,y=n.map(function(v,p){var m=(v.startAngle+v.endAngle)/2,b=we(v.cx,v.cy,v.outerRadius+h,m),w=Me(Me(Me(Me({},c),v),{},{stroke:"none"},f),{},{index:p,textAnchor:e.getTextAnchor(b.x,v.cx)},b),O=Me(Me(Me(Me({},c),v),{},{fill:"none",stroke:v.fill},d),{},{index:p,points:[we(v.cx,v.cy,v.outerRadius,m),b]}),g=u;return fe(u)&&fe(l)?g="value":fe(u)&&(g=l),x.createElement(pe,{key:"label-".concat(v.startAngle,"-").concat(v.endAngle,"-").concat(v.midAngle,"-").concat(p)},s&&e.renderLabelLineItem(s,O,"line"),e.renderLabelItem(o,w,We(v,g)))});return x.createElement(pe,{className:"recharts-pie-labels"},y)}},{key:"renderSectorsStatically",value:function(n){var i=this,a=this.props,o=a.activeShape,s=a.blendStroke,u=a.inactiveShape;return n.map(function(l,c){if((l==null?void 0:l.startAngle)===0&&(l==null?void 0:l.endAngle)===0&&n.length!==1)return null;var f=i.isActiveIndex(c),d=u&&i.hasActiveIndex()?u:null,h=f?o:d,y=Me(Me({},l),{},{stroke:s?l.fill:l.stroke,tabIndex:-1});return x.createElement(pe,Pi({ref:function(p){p&&!i.sectorRefs.includes(p)&&i.sectorRefs.push(p)},tabIndex:-1,className:"recharts-pie-sector"},on(i.props,l,c),{key:"sector-".concat(l==null?void 0:l.startAngle,"-").concat(l==null?void 0:l.endAngle,"-").concat(l.midAngle,"-").concat(c)}),x.createElement(_w,Pi({option:h,isActive:f,shapeType:"sector"},y)))})}},{key:"renderSectorsWithAnimation",value:function(){var n=this,i=this.props,a=i.sectors,o=i.isAnimationActive,s=i.animationBegin,u=i.animationDuration,l=i.animationEasing,c=i.animationId,f=this.state,d=f.prevSectors,h=f.prevIsAnimationActive;return x.createElement(Rt,{begin:s,duration:u,isActive:o,easing:l,from:{t:0},to:{t:1},key:"pie-".concat(c,"-").concat(h),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(y){var v=y.t,p=[],m=a&&a[0],b=m.startAngle;return a.forEach(function(w,O){var g=d&&d[O],_=O>0?xt(w,"paddingAngle",0):0;if(g){var S=Fe(g.endAngle-g.startAngle,w.endAngle-w.startAngle),A=Me(Me({},w),{},{startAngle:b+_,endAngle:b+S(v)+_});p.push(A),b=A.endAngle}else{var E=w.endAngle,N=w.startAngle,j=Fe(0,E-N),$=j(v),k=Me(Me({},w),{},{startAngle:b+_,endAngle:b+$+_});p.push(k),b=k.endAngle}}),x.createElement(pe,null,n.renderSectorsStatically(p))})}},{key:"attachKeyboardHandlers",value:function(n){var i=this;n.onkeydown=function(a){if(!a.altKey)switch(a.key){case"ArrowLeft":{var o=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[o].focus(),i.setState({sectorToFocus:o});break}case"ArrowRight":{var s=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[s].focus(),i.setState({sectorToFocus:s});break}case"Escape":{i.sectorRefs[i.state.sectorToFocus].blur(),i.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var n=this.props,i=n.sectors,a=n.isAnimationActive,o=this.state.prevSectors;return a&&i&&i.length&&(!o||!Rr(o,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var n=this,i=this.props,a=i.hide,o=i.sectors,s=i.className,u=i.label,l=i.cx,c=i.cy,f=i.innerRadius,d=i.outerRadius,h=i.isAnimationActive,y=this.state.isAnimationFinished;if(a||!o||!o.length||!V(l)||!V(c)||!V(f)||!V(d))return null;var v=le("recharts-pie",s);return x.createElement(pe,{tabIndex:this.props.rootTabIndex,className:v,ref:function(m){n.pieRef=m}},this.renderSectors(),u&&this.renderLabels(o),nt.renderCallByParent(this.props,null,!1),(!h||y)&&Ht.renderCallByParent(this.props,o,!1))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return i.prevIsAnimationActive!==n.isAnimationActive?{prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:[],isAnimationFinished:!0}:n.isAnimationActive&&n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:i.curSectors,isAnimationFinished:!0}:n.sectors!==i.curSectors?{curSectors:n.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(n,i){return n>i?"start":n<i?"end":"middle"}},{key:"renderLabelLineItem",value:function(n,i,a){if(x.isValidElement(n))return x.cloneElement(n,i);if(ae(n))return n(i);var o=le("recharts-pie-label-line",typeof n!="boolean"?n.className:"");return x.createElement(wn,Pi({},i,{key:a,type:"linear",className:o}))}},{key:"renderLabelItem",value:function(n,i,a){if(x.isValidElement(n))return x.cloneElement(n,i);var o=a;if(ae(n)&&(o=n(i),x.isValidElement(o)))return o;var s=le("recharts-pie-label-text",typeof n!="boolean"&&!ae(n)?n.className:"");return x.createElement(cn,Pi({},i,{alignmentBaseline:"middle",className:s}),o)}}])}(x.PureComponent);gu=Or,Lt(Or,"displayName","Pie"),Lt(Or,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!It.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0}),Lt(Or,"parseDeltaAngle",function(t,e){var r=ft(e-t),n=Math.min(Math.abs(e-t),360);return r*n}),Lt(Or,"getRealPieData",function(t){var e=t.data,r=t.children,n=Q(t,!1),i=Ot(r,ws);return e&&e.length?e.map(function(a,o){return Me(Me(Me({payload:a},n),a),i&&i[o]&&i[o].props)}):i&&i.length?i.map(function(a){return Me(Me({},n),a.props)}):[]}),Lt(Or,"parseCoordinateOfPie",function(t,e){var r=e.top,n=e.left,i=e.width,a=e.height,o=Yb(i,a),s=n+dt(t.cx,i,i/2),u=r+dt(t.cy,a,a/2),l=dt(t.innerRadius,o,0),c=dt(t.outerRadius,o,o*.8),f=t.maxRadius||Math.sqrt(i*i+a*a)/2;return{cx:s,cy:u,innerRadius:l,outerRadius:c,maxRadius:f}}),Lt(Or,"getComposedData",function(t){var e=t.item,r=t.offset,n=e.type.defaultProps!==void 0?Me(Me({},e.type.defaultProps),e.props):e.props,i=gu.getRealPieData(n);if(!i||!i.length)return null;var a=n.cornerRadius,o=n.startAngle,s=n.endAngle,u=n.paddingAngle,l=n.dataKey,c=n.nameKey,f=n.valueKey,d=n.tooltipType,h=Math.abs(n.minAngle),y=gu.parseCoordinateOfPie(n,r),v=gu.parseDeltaAngle(o,s),p=Math.abs(v),m=l;fe(l)&&fe(f)?(zt(!1,`Use "dataKey" to specify the value of pie,
|
|
162
162
|
the props "valueKey" will be deprecated in 1.1.0`),m="value"):fe(l)&&(zt(!1,`Use "dataKey" to specify the value of pie,
|
|
163
|
-
the props "valueKey" will be deprecated in 1.1.0`),m=f);var b=i.filter(function(A){return We(A,m,0)!==0}).length,w=(p>=360?b:b-1)*u,O=p-b*h-w,g=i.reduce(function(A,T){var M=We(T,m,0);return A+(V(M)?M:0)},0),_;if(g>0){var S;_=i.map(function(A,T){var M=We(A,m,0),$=We(A,c,T),j=(V(M)?M:0)/g,N;T?N=S.endAngle+ft(v)*u*(M!==0?1:0):N=o;var C=N+ft(v)*((M!==0?h:0)+j*O),I=(N+C)/2,R=(y.innerRadius+y.outerRadius)/2,L=[{name:$,value:M,payload:A,dataKey:m,type:d}],F=we(y.cx,y.cy,R,I);return S=Me(Me(Me({percent:j,cornerRadius:a,name:$,tooltipPayload:L,midAngle:I,middleRadius:R,tooltipPosition:F},A),y),{},{value:We(A,m),startAngle:N,endAngle:C,payload:A,paddingAngle:ft(v)*u}),S})}return Me(Me({},y),{},{sectors:_,data:i})});function JV(t){return t&&t.length?t[0]:void 0}var ZV=JV,QV=ZV;const eH=je(QV);var tH=["key"];function Ei(t){"@babel/helpers - typeof";return Ei=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ei(t)}function rH(t,e){if(t==null)return{};var r=nH(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function nH(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function wu(){return wu=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},wu.apply(this,arguments)}function Ew(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function pt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ew(Object(r),!0).forEach(function(n){Sr(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ew(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function iH(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Tw(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,$w(n.key),n)}}function aH(t,e,r){return e&&Tw(t.prototype,e),r&&Tw(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function oH(t,e,r){return e=_u(e),sH(t,jw()?Reflect.construct(e,r||[],_u(t).constructor):e.apply(t,r))}function sH(t,e){if(e&&(Ei(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return uH(t)}function uH(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function jw(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(jw=function(){return!!t})()}function _u(t){return _u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},_u(t)}function lH(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&dd(t,e)}function dd(t,e){return dd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},dd(t,e)}function Sr(t,e,r){return e=$w(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function $w(t){var e=cH(t,"string");return Ei(e)=="symbol"?e:e+""}function cH(t,e){if(Ei(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Ei(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var fo=function(t){function e(){var r;iH(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=oH(this,e,[].concat(i)),Sr(r,"state",{isAnimationFinished:!1}),Sr(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),ae(o)&&o()}),Sr(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),ae(o)&&o()}),Sr(r,"handleMouseEnter",function(o){var s=r.props.onMouseEnter;s&&s(r.props,o)}),Sr(r,"handleMouseLeave",function(o){var s=r.props.onMouseLeave;s&&s(r.props,o)}),r}return lH(e,t),aH(e,[{key:"renderDots",value:function(n){var i=this.props,a=i.dot,o=i.dataKey,s=Q(this.props,!1),u=Q(a,!0),l=n.map(function(c,f){var d=pt(pt(pt({key:"dot-".concat(f),r:3},s),u),{},{dataKey:o,cx:c.x,cy:c.y,index:f,payload:c});return e.renderDotItem(a,d)});return x.createElement(pe,{className:"recharts-radar-dots"},l)}},{key:"renderPolygonStatically",value:function(n){var i=this.props,a=i.shape,o=i.dot,s=i.isRange,u=i.baseLinePoints,l=i.connectNulls,c;return x.isValidElement(a)?c=x.cloneElement(a,pt(pt({},this.props),{},{points:n})):ae(a)?c=a(pt(pt({},this.props),{},{points:n})):c=x.createElement(tw,wu({},Q(this.props,!0),{onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,points:n,baseLinePoints:s?u:null,connectNulls:l})),x.createElement(pe,{className:"recharts-radar-polygon"},c,o?this.renderDots(n):null)}},{key:"renderPolygonWithAnimation",value:function(){var n=this,i=this.props,a=i.points,o=i.isAnimationActive,s=i.animationBegin,u=i.animationDuration,l=i.animationEasing,c=i.animationId,f=this.state.prevPoints;return x.createElement(Rt,{begin:s,duration:u,isActive:o,easing:l,from:{t:0},to:{t:1},key:"radar-".concat(c),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(d){var h=d.t,y=f&&f.length/a.length,v=a.map(function(p,m){var b=f&&f[Math.floor(m*y)];if(b){var w=Fe(b.x,p.x),O=Fe(b.y,p.y);return pt(pt({},p),{},{x:w(h),y:O(h)})}var g=Fe(p.cx,p.x),_=Fe(p.cy,p.y);return pt(pt({},p),{},{x:g(h),y:_(h)})});return n.renderPolygonStatically(v)})}},{key:"renderPolygon",value:function(){var n=this.props,i=n.points,a=n.isAnimationActive,o=n.isRange,s=this.state.prevPoints;return a&&i&&i.length&&!o&&(!s||!Lr(s,i))?this.renderPolygonWithAnimation():this.renderPolygonStatically(i)}},{key:"render",value:function(){var n=this.props,i=n.hide,a=n.className,o=n.points,s=n.isAnimationActive;if(i||!o||!o.length)return null;var u=this.state.isAnimationFinished,l=le("recharts-radar",a);return x.createElement(pe,{className:l},this.renderPolygon(),(!s||u)&&Ht.renderCallByParent(this.props,o))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:i.curPoints}:n.points!==i.curPoints?{curPoints:n.points}:null}},{key:"renderDotItem",value:function(n,i){var a;if(x.isValidElement(n))a=x.cloneElement(n,i);else if(ae(n))a=n(i);else{var o=i.key,s=rH(i,tH);a=x.createElement(wi,wu({},s,{key:o,className:le("recharts-radar-dot",typeof n!="boolean"?n.className:"")}))}return a}}])}(x.PureComponent);Sr(fo,"displayName","Radar"),Sr(fo,"defaultProps",{angleAxisId:0,radiusAxisId:0,hide:!1,activeDot:!0,dot:!1,legendType:"rect",isAnimationActive:!It.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"}),Sr(fo,"getComposedData",function(t){var e=t.radiusAxis,r=t.angleAxis,n=t.displayedData,i=t.dataKey,a=t.bandSize,o=r.cx,s=r.cy,u=!1,l=[],c=r.type!=="number"?a??0:0;n.forEach(function(d,h){var y=We(d,r.dataKey,h),v=We(d,i),p=r.scale(y)+c,m=Array.isArray(v)?r0(v):v,b=fe(m)?void 0:e.scale(m);Array.isArray(v)&&v.length>=2&&(u=!0),l.push(pt(pt({},we(o,s,b,p)),{},{name:y,value:v,cx:o,cy:s,radius:b,angle:p,payload:d}))});var f=[];return u&&l.forEach(function(d){if(Array.isArray(d.value)){var h=eH(d.value),y=fe(h)?void 0:e.scale(h);f.push(pt(pt({},d),{},{radius:y},we(o,s,y,d.angle)))}else f.push(d)}),{points:l,isRange:u,baseLinePoints:f}});var fH=Math.ceil,dH=Math.max;function hH(t,e,r,n){for(var i=-1,a=dH(fH((e-t)/(r||1)),0),o=Array(a);a--;)o[n?a:++i]=t,t+=r;return o}var pH=hH,vH=Sg,kw=1/0,yH=17976931348623157e292;function gH(t){if(!t)return t===0?t:0;if(t=vH(t),t===kw||t===-kw){var e=t<0?-1:1;return e*yH}return t===t?t:0}var Cw=gH,mH=pH,bH=ys,hd=Cw;function wH(t){return function(e,r,n){return n&&typeof n!="number"&&bH(e,r,n)&&(r=n=void 0),e=hd(e),r===void 0?(r=e,e=0):r=hd(r),n=n===void 0?e<r?1:-1:hd(n),mH(e,r,n,t)}}var _H=wH,xH=_H,OH=xH(),SH=OH;const xu=je(SH);function ho(t){"@babel/helpers - typeof";return ho=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ho(t)}function Iw(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Nw(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Iw(Object(r),!0).forEach(function(n){Mw(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Iw(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Mw(t,e,r){return e=AH(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function AH(t){var e=PH(t,"string");return ho(e)=="symbol"?e:e+""}function PH(t,e){if(ho(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(ho(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var EH=["Webkit","Moz","O","ms"],TH=function(e,r){var n=e.replace(/(\w)/,function(a){return a.toUpperCase()}),i=EH.reduce(function(a,o){return Nw(Nw({},a),{},Mw({},o+n,r))},{});return i[e]=r,i};function Ti(t){"@babel/helpers - typeof";return Ti=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ti(t)}function Ou(){return Ou=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Ou.apply(this,arguments)}function Dw(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function pd(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Dw(Object(r),!0).forEach(function(n){Pt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Dw(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function jH(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Rw(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Bw(n.key),n)}}function $H(t,e,r){return e&&Rw(t.prototype,e),r&&Rw(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function kH(t,e,r){return e=Su(e),CH(t,Lw()?Reflect.construct(e,r||[],Su(t).constructor):e.apply(t,r))}function CH(t,e){if(e&&(Ti(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return IH(t)}function IH(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Lw(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Lw=function(){return!!t})()}function Su(t){return Su=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Su(t)}function NH(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&vd(t,e)}function vd(t,e){return vd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},vd(t,e)}function Pt(t,e,r){return e=Bw(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Bw(t){var e=MH(t,"string");return Ti(e)=="symbol"?e:e+""}function MH(t,e){if(Ti(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Ti(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var DH=function(e){var r=e.data,n=e.startIndex,i=e.endIndex,a=e.x,o=e.width,s=e.travellerWidth;if(!r||!r.length)return{};var u=r.length,l=Pa().domain(xu(0,u)).range([a,a+o-s]),c=l.domain().map(function(f){return l(f)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:l(n),endX:l(i),scale:l,scaleValues:c}},Uw=function(e){return e.changedTouches&&!!e.changedTouches.length},ji=function(t){function e(r){var n;return jH(this,e),n=kH(this,e,[r]),Pt(n,"handleDrag",function(i){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(i):n.state.isSlideMoving&&n.handleSlideDrag(i)}),Pt(n,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&n.handleDrag(i.changedTouches[0])}),Pt(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=n.props,a=i.endIndex,o=i.onDragEnd,s=i.startIndex;o==null||o({endIndex:a,startIndex:s})}),n.detachDragEndListener()}),Pt(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),Pt(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),Pt(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),Pt(n,"handleSlideDragStart",function(i){var a=Uw(i)?i.changedTouches[0]:i;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return NH(e,t),$H(e,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var i=n.startX,a=n.endX,o=this.state.scaleValues,s=this.props,u=s.gap,l=s.data,c=l.length-1,f=Math.min(i,a),d=Math.max(i,a),h=e.getIndexInRange(o,f),y=e.getIndexInRange(o,d);return{startIndex:h-h%u,endIndex:y===c?c:y-y%u}}},{key:"getTextOfTick",value:function(n){var i=this.props,a=i.data,o=i.tickFormatter,s=i.dataKey,u=We(a[n],s,n);return ae(o)?o(u,n):u}},{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 i=this.state,a=i.slideMoveStartX,o=i.startX,s=i.endX,u=this.props,l=u.x,c=u.width,f=u.travellerWidth,d=u.startIndex,h=u.endIndex,y=u.onChange,v=n.pageX-a;v>0?v=Math.min(v,l+c-f-s,l+c-f-o):v<0&&(v=Math.max(v,l-o,l-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,i){var a=Uw(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var i=this.state,a=i.brushMoveStartX,o=i.movingTravellerId,s=i.endX,u=i.startX,l=this.state[o],c=this.props,f=c.x,d=c.width,h=c.travellerWidth,y=c.onChange,v=c.gap,p=c.data,m={startX:this.state.startX,endX:this.state.endX},b=n.pageX-a;b>0?b=Math.min(b,f+d-h-l):b<0&&(b=Math.max(b,f-l)),m[o]=l+b;var w=this.getIndex(m),O=w.startIndex,g=w.endIndex,_=function(){var A=p.length-1;return o==="startX"&&(s>u?O%v===0:g%v===0)||s<u&&g===A||o==="endX"&&(s>u?g%v===0:O%v===0)||s>u&&g===A};this.setState(Pt(Pt({},o,l+b),"brushMoveStartX",n.pageX),function(){y&&_()&&y(w)})}},{key:"handleTravellerMoveKeyboard",value:function(n,i){var a=this,o=this.state,s=o.scaleValues,u=o.startX,l=o.endX,c=this.state[i],f=s.indexOf(c);if(f!==-1){var d=f+n;if(!(d===-1||d>=s.length)){var h=s[d];i==="startX"&&h>=l||i==="endX"&&h<=u||this.setState(Pt({},i,h),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,s=n.height,u=n.fill,l=n.stroke;return x.createElement("rect",{stroke:l,fill:u,x:i,y:a,width:o,height:s})}},{key:"renderPanorama",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,s=n.height,u=n.data,l=n.children,c=n.padding,f=x.Children.only(l);return f?x.cloneElement(f,{x:i,y:a,width:o,height:s,margin:c,compact:!0,data:u}):null}},{key:"renderTravellerLayer",value:function(n,i){var a,o,s=this,u=this.props,l=u.y,c=u.travellerWidth,f=u.height,d=u.traveller,h=u.ariaLabel,y=u.data,v=u.startIndex,p=u.endIndex,m=Math.max(n,this.props.x),b=pd(pd({},Q(this.props,!1)),{},{x:m,y:l,width:c,height:f}),w=h||"Min value: ".concat((a=y[v])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=y[p])===null||o===void 0?void 0:o.name);return x.createElement(pe,{tabIndex:0,role:"slider","aria-label":w,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(g){["ArrowLeft","ArrowRight"].includes(g.key)&&(g.preventDefault(),g.stopPropagation(),s.handleTravellerMoveKeyboard(g.key==="ArrowRight"?1:-1,i))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},e.renderTraveller(d,b))}},{key:"renderSlide",value:function(n,i){var a=this.props,o=a.y,s=a.height,u=a.stroke,l=a.travellerWidth,c=Math.min(n,i)+l,f=Math.max(Math.abs(i-n)-l,0);return x.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:u,fillOpacity:.2,x:c,y:o,width:f,height:s})}},{key:"renderText",value:function(){var n=this.props,i=n.startIndex,a=n.endIndex,o=n.y,s=n.height,u=n.travellerWidth,l=n.stroke,c=this.state,f=c.startX,d=c.endX,h=5,y={pointerEvents:"none",fill:l};return x.createElement(pe,{className:"recharts-brush-texts"},x.createElement(cn,Ou({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,d)-h,y:o+s/2},y),this.getTextOfTick(i)),x.createElement(cn,Ou({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,d)+u+h,y:o+s/2},y),this.getTextOfTick(a)))}},{key:"render",value:function(){var n=this.props,i=n.data,a=n.className,o=n.children,s=n.x,u=n.y,l=n.width,c=n.height,f=n.alwaysShowText,d=this.state,h=d.startX,y=d.endX,v=d.isTextActive,p=d.isSlideMoving,m=d.isTravellerMoving,b=d.isTravellerFocused;if(!i||!i.length||!V(s)||!V(u)||!V(l)||!V(c)||l<=0||c<=0)return null;var w=le("recharts-brush",a),O=x.Children.count(o)===1,g=TH("userSelect","none");return x.createElement(pe,{className:w,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:g},this.renderBackground(),O&&this.renderPanorama(),this.renderSlide(h,y),this.renderTravellerLayer(h,"startX"),this.renderTravellerLayer(y,"endX"),(v||p||m||b||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var i=n.x,a=n.y,o=n.width,s=n.height,u=n.stroke,l=Math.floor(a+s/2)-1;return x.createElement(x.Fragment,null,x.createElement("rect",{x:i,y:a,width:o,height:s,fill:u,stroke:"none"}),x.createElement("line",{x1:i+1,y1:l,x2:i+o-1,y2:l,fill:"none",stroke:"#fff"}),x.createElement("line",{x1:i+1,y1:l+2,x2:i+o-1,y2:l+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,i){var a;return x.isValidElement(n)?a=x.cloneElement(n,i):ae(n)?a=n(i):a=e.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(n,i){var a=n.data,o=n.width,s=n.x,u=n.travellerWidth,l=n.updateId,c=n.startIndex,f=n.endIndex;if(a!==i.prevData||l!==i.prevUpdateId)return pd({prevData:a,prevTravellerWidth:u,prevUpdateId:l,prevX:s,prevWidth:o},a&&a.length?DH({data:a,width:o,x:s,travellerWidth:u,startIndex:c,endIndex:f}):{scale:null,scaleValues:null});if(i.scale&&(o!==i.prevWidth||s!==i.prevX||u!==i.prevTravellerWidth)){i.scale.range([s,s+o-u]);var d=i.scale.domain().map(function(h){return i.scale(h)});return{prevData:a,prevTravellerWidth:u,prevUpdateId:l,prevX:s,prevWidth:o,startX:i.scale(n.startIndex),endX:i.scale(n.endIndex),scaleValues:d}}return null}},{key:"getIndexInRange",value:function(n,i){for(var a=n.length,o=0,s=a-1;s-o>1;){var u=Math.floor((o+s)/2);n[u]>i?s=u:o=u}return i>=n[s]?s:o}}])}(x.PureComponent);Pt(ji,"displayName","Brush"),Pt(ji,"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 RH=Ec;function LH(t,e){var r;return RH(t,function(n,i,a){return r=e(n,i,a),!r}),!!r}var BH=LH,UH=fy,FH=er,WH=BH,qH=yt,zH=ys;function KH(t,e,r){var n=qH(t)?UH:WH;return r&&zH(t,e,r)&&(e=void 0),n(t,FH(e))}var VH=KH;const HH=je(VH);var ar=function(e,r){var n=e.alwaysShow,i=e.ifOverflow;return n&&(i="extendDomain"),i===r},Fw=sg;function GH(t,e,r){e=="__proto__"&&Fw?Fw(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var YH=GH,XH=YH,JH=ng,ZH=er;function QH(t,e){var r={};return e=ZH(e),JH(t,function(n,i,a){XH(r,i,e(n,i,a))}),r}var e8=QH;const t8=je(e8);function r8(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(!e(t[r],r,t))return!1;return!0}var n8=r8,i8=Ec;function a8(t,e){var r=!0;return i8(t,function(n,i,a){return r=!!e(n,i,a),r}),r}var o8=a8,s8=n8,u8=o8,l8=er,c8=yt,f8=ys;function d8(t,e,r){var n=c8(t)?s8:u8;return r&&f8(t,e,r)&&(e=void 0),n(t,l8(e))}var h8=d8;const Ww=je(h8);var p8=["x","y"];function $i(t){"@babel/helpers - typeof";return $i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$i(t)}function yd(){return yd=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},yd.apply(this,arguments)}function qw(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function po(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?qw(Object(r),!0).forEach(function(n){v8(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):qw(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function v8(t,e,r){return e=y8(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function y8(t){var e=g8(t,"string");return $i(e)=="symbol"?e:e+""}function g8(t,e){if($i(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if($i(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function m8(t,e){if(t==null)return{};var r=b8(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function b8(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function w8(t,e){var r=t.x,n=t.y,i=m8(t,p8),a="".concat(r),o=parseInt(a,10),s="".concat(n),u=parseInt(s,10),l="".concat(e.height||i.height),c=parseInt(l,10),f="".concat(e.width||i.width),d=parseInt(f,10);return po(po(po(po(po({},e),i),o?{x:o}:{}),u?{y:u}:{}),{},{height:c,width:d,name:e.name,radius:e.radius})}function zw(t){return x.createElement(xw,yd({shapeType:"rectangle",propTransformer:w8,activeClassName:"recharts-active-bar"},t))}var _8=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,i){if(typeof e=="number")return e;var a=V(n)||bT(n);return a?e(n,i):(a||(process.env.NODE_ENV!=="production"?mt(!1,"minPointSize callback function received a value with type of ".concat($i(n),". Currently only numbers or null/undefined are supported.")):mt()),r)}},x8=["value","background"],Kw;function ki(t){"@babel/helpers - typeof";return ki=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ki(t)}function O8(t,e){if(t==null)return{};var r=S8(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function S8(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function Au(){return Au=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Au.apply(this,arguments)}function Vw(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function He(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Vw(Object(r),!0).forEach(function(n){Fr(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Vw(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function A8(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Hw(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Yw(n.key),n)}}function P8(t,e,r){return e&&Hw(t.prototype,e),r&&Hw(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function E8(t,e,r){return e=Pu(e),T8(t,Gw()?Reflect.construct(e,r||[],Pu(t).constructor):e.apply(t,r))}function T8(t,e){if(e&&(ki(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return j8(t)}function j8(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Gw(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Gw=function(){return!!t})()}function Pu(t){return Pu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Pu(t)}function $8(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&gd(t,e)}function gd(t,e){return gd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},gd(t,e)}function Fr(t,e,r){return e=Yw(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Yw(t){var e=k8(t,"string");return ki(e)=="symbol"?e:e+""}function k8(t,e){if(ki(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(ki(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var An=function(t){function e(){var r;A8(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=E8(this,e,[].concat(i)),Fr(r,"state",{isAnimationFinished:!1}),Fr(r,"id",an("recharts-bar-")),Fr(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),o&&o()}),Fr(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),o&&o()}),r}return $8(e,t),P8(e,[{key:"renderRectanglesStatically",value:function(n){var i=this,a=this.props,o=a.shape,s=a.dataKey,u=a.activeIndex,l=a.activeBar,c=Q(this.props,!1);return n&&n.map(function(f,d){var h=d===u,y=h?l:o,v=He(He(He({},c),f),{},{isActive:h,option:y,index:d,dataKey:s,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return x.createElement(pe,Au({className:"recharts-bar-rectangle"},on(i.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)}),x.createElement(zw,v))})}},{key:"renderRectanglesWithAnimation",value:function(){var n=this,i=this.props,a=i.data,o=i.layout,s=i.isAnimationActive,u=i.animationBegin,l=i.animationDuration,c=i.animationEasing,f=i.animationId,d=this.state.prevData;return x.createElement(Rt,{begin:u,duration:l,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=a.map(function(p,m){var b=d&&d[m];if(b){var w=Fe(b.x,p.x),O=Fe(b.y,p.y),g=Fe(b.width,p.width),_=Fe(b.height,p.height);return He(He({},p),{},{x:w(y),y:O(y),width:g(y),height:_(y)})}if(o==="horizontal"){var S=Fe(0,p.height),A=S(y);return He(He({},p),{},{y:p.y+p.height-A,height:A})}var T=Fe(0,p.width),M=T(y);return He(He({},p),{},{width:M})});return x.createElement(pe,null,n.renderRectanglesStatically(v))})}},{key:"renderRectangles",value:function(){var n=this.props,i=n.data,a=n.isAnimationActive,o=this.state.prevData;return a&&i&&i.length&&(!o||!Lr(o,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var n=this,i=this.props,a=i.data,o=i.dataKey,s=i.activeIndex,u=Q(this.props.background,!1);return a.map(function(l,c){l.value;var f=l.background,d=O8(l,x8);if(!f)return null;var h=He(He(He(He(He({},d),{},{fill:"#eee"},f),u),on(n.props,l,c)),{},{onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd,dataKey:o,index:c,className:"recharts-bar-background-rectangle"});return x.createElement(zw,Au({key:"background-bar-".concat(c),option:n.props.background,isActive:c===s},h))})}},{key:"renderErrorBar",value:function(n,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.data,s=a.xAxis,u=a.yAxis,l=a.layout,c=a.children,f=Ot(c,Ba);if(!f)return null;var d=l==="vertical"?o[0].height/2:o[0].width/2,h=function(p,m){var b=Array.isArray(p.value)?p.value[1]:p.value;return{x:p.x,y:p.y,value:b,errorVal:We(p,m)}},y={clipPath:n?"url(#clipPath-".concat(i,")"):null};return x.createElement(pe,y,f.map(function(v){return x.cloneElement(v,{key:"error-bar-".concat(i,"-").concat(v.props.dataKey),data:o,xAxis:s,yAxis:u,layout:l,offset:d,dataPointFormatter:h})}))}},{key:"render",value:function(){var n=this.props,i=n.hide,a=n.data,o=n.className,s=n.xAxis,u=n.yAxis,l=n.left,c=n.top,f=n.width,d=n.height,h=n.isAnimationActive,y=n.background,v=n.id;if(i||!a||!a.length)return null;var p=this.state.isAnimationFinished,m=le("recharts-bar",o),b=s&&s.allowDataOverflow,w=u&&u.allowDataOverflow,O=b||w,g=fe(v)?this.id:v;return x.createElement(pe,{className:m},b||w?x.createElement("defs",null,x.createElement("clipPath",{id:"clipPath-".concat(g)},x.createElement("rect",{x:b?l:l-f/2,y:w?c:c-d/2,width:b?f:f*2,height:w?d:d*2}))):null,x.createElement(pe,{className:"recharts-bar-rectangles",clipPath:O?"url(#clipPath-".concat(g,")"):null},y?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(O,g),(!h||p)&&Ht.renderCallByParent(this.props,a))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curData:n.data,prevData:i.curData}:n.data!==i.curData?{curData:n.data}:null}}])}(x.PureComponent);Kw=An,Fr(An,"displayName","Bar"),Fr(An,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!It.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"}),Fr(An,"getComposedData",function(t){var e=t.props,r=t.item,n=t.barPosition,i=t.bandSize,a=t.xAxis,o=t.yAxis,s=t.xAxisTicks,u=t.yAxisTicks,l=t.stackedData,c=t.dataStartIndex,f=t.displayedData,d=t.offset,h=LW(n,r);if(!h)return null;var y=e.layout,v=r.type.defaultProps,p=v!==void 0?He(He({},v),r.props):r.props,m=p.dataKey,b=p.children,w=p.minPointSize,O=y==="horizontal"?o:a,g=l?O.scale.domain():null,_=KW({numericAxis:O}),S=Ot(b,_s),A=f.map(function(T,M){var $,j,N,C,I,R;l?$=BW(l[c+M],g):($=We(T,m),Array.isArray($)||($=[_,$]));var L=_8(w,Kw.defaultProps.minPointSize)($[1],M);if(y==="horizontal"){var F,z=[o.scale($[0]),o.scale($[1])],D=z[0],B=z[1];j=Fb({axis:a,ticks:s,bandSize:i,offset:h.offset,entry:T,index:M}),N=(F=B??D)!==null&&F!==void 0?F:void 0,C=h.size;var W=D-B;if(I=Number.isNaN(W)?0:W,R={x:j,y:o.y,width:C,height:o.height},Math.abs(L)>0&&Math.abs(I)<Math.abs(L)){var G=ft(I||L)*(Math.abs(L)-Math.abs(I));N-=G,I+=G}}else{var J=[a.scale($[0]),a.scale($[1])],re=J[0],ne=J[1];if(j=re,N=Fb({axis:o,ticks:u,bandSize:i,offset:h.offset,entry:T,index:M}),C=ne-re,I=h.size,R={x:a.x,y:N,width:a.width,height:I},Math.abs(L)>0&&Math.abs(C)<Math.abs(L)){var ue=ft(C||L)*(Math.abs(L)-Math.abs(C));C+=ue}}return He(He(He({},T),{},{x:j,y:N,width:C,height:I,value:l?$:$[1],payload:T,background:R},S&&S[M]&&S[M].props),{},{tooltipPayload:[Vb(r,T)],tooltipPosition:{x:j+C/2,y:N+I/2}})});return He({data:A,layout:y},d)});function vo(t){"@babel/helpers - typeof";return vo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vo(t)}function C8(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Xw(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Zw(n.key),n)}}function I8(t,e,r){return e&&Xw(t.prototype,e),r&&Xw(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Jw(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Yt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Jw(Object(r),!0).forEach(function(n){Eu(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Jw(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Eu(t,e,r){return e=Zw(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Zw(t){var e=N8(t,"string");return vo(e)=="symbol"?e:e+""}function N8(t,e){if(vo(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(vo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var md=function(e,r,n,i,a){var o=e.width,s=e.height,u=e.layout,l=e.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=!!St(l,An);return c.reduce(function(h,y){var v=r[y],p=v.orientation,m=v.domain,b=v.padding,w=b===void 0?{}:b,O=v.mirror,g=v.reversed,_="".concat(p).concat(O?"Mirror":""),S,A,T,M,$;if(v.type==="number"&&(v.padding==="gap"||v.padding==="no-gap")){var j=m[1]-m[0],N=1/0,C=v.categoricalDomain.sort(xT);if(C.forEach(function(J,re){re>0&&(N=Math.min((J||0)-(C[re-1]||0),N))}),Number.isFinite(N)){var I=N/j,R=v.layout==="vertical"?n.height:n.width;if(v.padding==="gap"&&(S=I*R/2),v.padding==="no-gap"){var L=dt(e.barCategoryGap,I*R),F=I*R/2;S=F-L-(F-L)/R*L}}}i==="xAxis"?A=[n.left+(w.left||0)+(S||0),n.left+n.width-(w.right||0)-(S||0)]:i==="yAxis"?A=u==="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)]:A=v.range,g&&(A=[A[1],A[0]]);var z=Rb(v,a,d),D=z.scale,B=z.realScaleType;D.domain(m).range(A),Bb(D);var W=Ub(D,Yt(Yt({},v),{},{realScaleType:B}));i==="xAxis"?($=p==="top"&&!O||p==="bottom"&&O,T=n.left,M=f[_]-$*v.height):i==="yAxis"&&($=p==="left"&&!O||p==="right"&&O,T=f[_]-$*v.width,M=n.top);var G=Yt(Yt(Yt({},v),W),{},{realScaleType:B,x:T,y:M,scale:D,width:i==="xAxis"?n.width:v.width,height:i==="yAxis"?n.height:v.height});return G.bandSize=Zs(G,W),!v.hide&&i==="xAxis"?f[_]+=($?-1:1)*G.height:v.hide||(f[_]+=($?-1:1)*G.width),Yt(Yt({},h),{},Eu({},y,G))},{})},Qw=function(e,r){var n=e.x,i=e.y,a=r.x,o=r.y;return{x:Math.min(n,a),y:Math.min(i,o),width:Math.abs(a-n),height:Math.abs(o-i)}},M8=function(e){var r=e.x1,n=e.y1,i=e.x2,a=e.y2;return Qw({x:r,y:n},{x:i,y:a})},e_=function(){function t(e){C8(this,t),this.scale=e}return I8(t,[{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]:{},i=n.bandAware,a=n.position;if(r!==void 0){if(a)switch(a){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(i){var u=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+u}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),i=n[0],a=n[n.length-1];return i<=a?r>=i&&r<=a:r>=a&&r<=i}}],[{key:"create",value:function(r){return new t(r)}}])}();Eu(e_,"EPS",1e-4);var bd=function(e){var r=Object.keys(e).reduce(function(n,i){return Yt(Yt({},n),{},Eu({},i,e_.create(e[i])))},{});return Yt(Yt({},r),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,s=a.position;return t8(i,function(u,l){return r[l].apply(u,{bandAware:o,position:s})})},isInRange:function(i){return Ww(i,function(a,o){return r[o].isInRange(a)})}})};function D8(t){return(t%180+180)%180}var R8=function(e){var r=e.width,n=e.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=D8(i),o=a*Math.PI/180,s=Math.atan(n/r),u=o>s&&o<Math.PI-s?n/Math.sin(o):r/Math.cos(o);return Math.abs(u)},L8=er,B8=va,U8=ds;function F8(t){return function(e,r,n){var i=Object(e);if(!B8(e)){var a=L8(r);e=U8(e),r=function(s){return a(i[s],s,i)}}var o=t(e,r,n);return o>-1?i[a?e[o]:o]:void 0}}var W8=F8,q8=Cw;function z8(t){var e=q8(t),r=e%1;return e===e?r?e-r:e:0}var K8=z8,V8=Ky,H8=er,G8=K8,Y8=Math.max;function X8(t,e,r){var n=t==null?0:t.length;if(!n)return-1;var i=r==null?0:G8(r);return i<0&&(i=Y8(n+i,0)),V8(t,H8(e),i)}var J8=X8,Z8=W8,Q8=J8,eG=Z8(Q8),tG=eG;const rG=je(tG);var nG=O1(function(t){return{x:t.left,y:t.top,width:t.width,height:t.height}},function(t){return["l",t.left,"t",t.top,"w",t.width,"h",t.height].join("")});function Tu(t){"@babel/helpers - typeof";return Tu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Tu(t)}var wd=x.createContext(void 0),_d=x.createContext(void 0),t_=x.createContext(void 0),r_=x.createContext({}),n_=x.createContext(void 0),i_=x.createContext(0),a_=x.createContext(0),o_=function(e){var r=e.state,n=r.xAxisMap,i=r.yAxisMap,a=r.offset,o=e.clipPathId,s=e.children,u=e.width,l=e.height,c=nG(a);return x.createElement(wd.Provider,{value:n},x.createElement(_d.Provider,{value:i},x.createElement(r_.Provider,{value:a},x.createElement(t_.Provider,{value:c},x.createElement(n_.Provider,{value:o},x.createElement(i_.Provider,{value:l},x.createElement(a_.Provider,{value:u},s)))))))},iG=function(){return x.useContext(n_)};function s_(t){var e=Object.keys(t);return e.length===0?"There are no available ids.":"Available ids are: ".concat(e,".")}var u_=function(e){var r=x.useContext(wd);r==null&&(process.env.NODE_ENV!=="production"?mt(!1,"Could not find Recharts context; are you sure this is rendered inside a Recharts wrapper component?"):mt());var n=r[e];return n==null&&(process.env.NODE_ENV!=="production"?mt(!1,'Could not find xAxis by id "'.concat(e,'" [').concat(Tu(e),"]. ").concat(s_(r))):mt()),n},aG=function(){var e=x.useContext(wd);return Ir(e)},oG=function(){var e=x.useContext(_d),r=rG(e,function(n){return Ww(n.domain,Number.isFinite)});return r||Ir(e)},l_=function(e){var r=x.useContext(_d);r==null&&(process.env.NODE_ENV!=="production"?mt(!1,"Could not find Recharts context; are you sure this is rendered inside a Recharts wrapper component?"):mt());var n=r[e];return n==null&&(process.env.NODE_ENV!=="production"?mt(!1,'Could not find yAxis by id "'.concat(e,'" [').concat(Tu(e),"]. ").concat(s_(r))):mt()),n},sG=function(){var e=x.useContext(t_);return e},uG=function(){return x.useContext(r_)},xd=function(){return x.useContext(a_)},Od=function(){return x.useContext(i_)};function Ci(t){"@babel/helpers - typeof";return Ci=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ci(t)}function lG(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function cG(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,h_(n.key),n)}}function fG(t,e,r){return e&&cG(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function dG(t,e,r){return e=ju(e),hG(t,c_()?Reflect.construct(e,r||[],ju(t).constructor):e.apply(t,r))}function hG(t,e){if(e&&(Ci(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return pG(t)}function pG(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function c_(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(c_=function(){return!!t})()}function ju(t){return ju=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ju(t)}function vG(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Sd(t,e)}function Sd(t,e){return Sd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Sd(t,e)}function f_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function d_(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?f_(Object(r),!0).forEach(function(n){Ad(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):f_(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Ad(t,e,r){return e=h_(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function h_(t){var e=yG(t,"string");return Ci(e)=="symbol"?e:e+""}function yG(t,e){if(Ci(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Ci(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function gG(t,e){return _G(t)||wG(t,e)||bG(t,e)||mG()}function mG(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
164
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bG(t,e){if(t){if(typeof t=="string")return p_(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return p_(t,e)}}function p_(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function wG(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,o,s=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(c){l=!0,i=c}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function _G(t){if(Array.isArray(t))return t}function Pd(){return Pd=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Pd.apply(this,arguments)}var xG=function(e,r){var n;return x.isValidElement(e)?n=x.cloneElement(e,r):ae(e)?n=e(r):n=x.createElement("line",Pd({},r,{className:"recharts-reference-line-line"})),n},OG=function(e,r,n,i,a,o,s,u,l){var c=a.x,f=a.y,d=a.width,h=a.height;if(n){var y=l.y,v=e.y.apply(y,{position:o});if(ar(l,"discard")&&!e.y.isInRange(v))return null;var p=[{x:c+d,y:v},{x:c,y:v}];return u==="left"?p.reverse():p}if(r){var m=l.x,b=e.x.apply(m,{position:o});if(ar(l,"discard")&&!e.x.isInRange(b))return null;var w=[{x:b,y:f+h},{x:b,y:f}];return s==="top"?w.reverse():w}if(i){var O=l.segment,g=O.map(function(_){return e.apply(_,{position:o})});return ar(l,"discard")&&HH(g,function(_){return!e.isInRange(_)})?null:g}return null};function SG(t){var e=t.x,r=t.y,n=t.segment,i=t.xAxisId,a=t.yAxisId,o=t.shape,s=t.className,u=t.alwaysShow,l=iG(),c=u_(i),f=l_(a),d=sG();if(!l||!d)return null;zt(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var h=bd({x:c.scale,y:f.scale}),y=Je(e),v=Je(r),p=n&&n.length===2,m=OG(h,y,v,p,d,t.position,c.orientation,f.orientation,t);if(!m)return null;var b=gG(m,2),w=b[0],O=w.x,g=w.y,_=b[1],S=_.x,A=_.y,T=ar(t,"hidden")?"url(#".concat(l,")"):void 0,M=d_(d_({clipPath:T},Q(t,!0)),{},{x1:O,y1:g,x2:S,y2:A});return x.createElement(pe,{className:le("recharts-reference-line",s)},xG(o,M),nt.renderCallByParent(t,M8({x1:O,y1:g,x2:S,y2:A})))}var Ed=function(t){function e(){return lG(this,e),dG(this,e,arguments)}return vG(e,t),fG(e,[{key:"render",value:function(){return x.createElement(SG,this.props)}}])}(x.Component);Ad(Ed,"displayName","ReferenceLine"),Ad(Ed,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function Td(){return Td=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Td.apply(this,arguments)}function Ii(t){"@babel/helpers - typeof";return Ii=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ii(t)}function v_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function y_(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?v_(Object(r),!0).forEach(function(n){ku(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):v_(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function AG(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function PG(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,m_(n.key),n)}}function EG(t,e,r){return e&&PG(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function TG(t,e,r){return e=$u(e),jG(t,g_()?Reflect.construct(e,r||[],$u(t).constructor):e.apply(t,r))}function jG(t,e){if(e&&(Ii(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $G(t)}function $G(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function g_(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(g_=function(){return!!t})()}function $u(t){return $u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},$u(t)}function kG(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&jd(t,e)}function jd(t,e){return jd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},jd(t,e)}function ku(t,e,r){return e=m_(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function m_(t){var e=CG(t,"string");return Ii(e)=="symbol"?e:e+""}function CG(t,e){if(Ii(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Ii(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var IG=function(e){var r=e.x,n=e.y,i=e.xAxis,a=e.yAxis,o=bd({x:i.scale,y:a.scale}),s=o.apply({x:r,y:n},{bandAware:!0});return ar(e,"discard")&&!o.isInRange(s)?null:s},Cu=function(t){function e(){return AG(this,e),TG(this,e,arguments)}return kG(e,t),EG(e,[{key:"render",value:function(){var n=this.props,i=n.x,a=n.y,o=n.r,s=n.alwaysShow,u=n.clipPathId,l=Je(i),c=Je(a);if(zt(s===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!l||!c)return null;var f=IG(this.props);if(!f)return null;var d=f.x,h=f.y,y=this.props,v=y.shape,p=y.className,m=ar(this.props,"hidden")?"url(#".concat(u,")"):void 0,b=y_(y_({clipPath:m},Q(this.props,!0)),{},{cx:d,cy:h});return x.createElement(pe,{className:le("recharts-reference-dot",p)},e.renderDot(v,b),nt.renderCallByParent(this.props,{x:d-o,y:h-o,width:2*o,height:2*o}))}}])}(x.Component);ku(Cu,"displayName","ReferenceDot"),ku(Cu,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1}),ku(Cu,"renderDot",function(t,e){var r;return x.isValidElement(t)?r=x.cloneElement(t,e):ae(t)?r=t(e):r=x.createElement(wi,Td({},e,{cx:e.cx,cy:e.cy,className:"recharts-reference-dot-dot"})),r});function $d(){return $d=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},$d.apply(this,arguments)}function Ni(t){"@babel/helpers - typeof";return Ni=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ni(t)}function b_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function w_(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?b_(Object(r),!0).forEach(function(n){Nu(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):b_(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function NG(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function MG(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,x_(n.key),n)}}function DG(t,e,r){return e&&MG(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function RG(t,e,r){return e=Iu(e),LG(t,__()?Reflect.construct(e,r||[],Iu(t).constructor):e.apply(t,r))}function LG(t,e){if(e&&(Ni(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return BG(t)}function BG(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function __(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(__=function(){return!!t})()}function Iu(t){return Iu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Iu(t)}function UG(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&kd(t,e)}function kd(t,e){return kd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},kd(t,e)}function Nu(t,e,r){return e=x_(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function x_(t){var e=FG(t,"string");return Ni(e)=="symbol"?e:e+""}function FG(t,e){if(Ni(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Ni(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var WG=function(e,r,n,i,a){var o=a.x1,s=a.x2,u=a.y1,l=a.y2,c=a.xAxis,f=a.yAxis;if(!c||!f)return null;var d=bd({x:c.scale,y:f.scale}),h={x:e?d.x.apply(o,{position:"start"}):d.x.rangeMin,y:n?d.y.apply(u,{position:"start"}):d.y.rangeMin},y={x:r?d.x.apply(s,{position:"end"}):d.x.rangeMax,y:i?d.y.apply(l,{position:"end"}):d.y.rangeMax};return ar(a,"discard")&&(!d.isInRange(h)||!d.isInRange(y))?null:Qw(h,y)},Mu=function(t){function e(){return NG(this,e),RG(this,e,arguments)}return UG(e,t),DG(e,[{key:"render",value:function(){var n=this.props,i=n.x1,a=n.x2,o=n.y1,s=n.y2,u=n.className,l=n.alwaysShow,c=n.clipPathId;zt(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var f=Je(i),d=Je(a),h=Je(o),y=Je(s),v=this.props.shape;if(!f&&!d&&!h&&!y&&!v)return null;var p=WG(f,d,h,y,this.props);if(!p&&!v)return null;var m=ar(this.props,"hidden")?"url(#".concat(c,")"):void 0;return x.createElement(pe,{className:le("recharts-reference-area",u)},e.renderRect(v,w_(w_({clipPath:m},Q(this.props,!0)),p)),nt.renderCallByParent(this.props,p))}}])}(x.Component);Nu(Mu,"displayName","ReferenceArea"),Nu(Mu,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1}),Nu(Mu,"renderRect",function(t,e){var r;return x.isValidElement(t)?r=x.cloneElement(t,e):ae(t)?r=t(e):r=x.createElement(ad,$d({},e,{className:"recharts-reference-area-rect"})),r});function O_(t,e,r){if(e<1)return[];if(e===1&&r===void 0)return t;for(var n=[],i=0;i<t.length;i+=e)n.push(t[i]);return n}function qG(t,e,r){var n={width:t.width+e.width,height:t.height+e.height};return R8(n,r)}function zG(t,e,r){var n=r==="width",i=t.x,a=t.y,o=t.width,s=t.height;return e===1?{start:n?i:a,end:n?i+o:a+s}:{start:n?i+o:a+s,end:n?i:a}}function Du(t,e,r,n,i){if(t*e<t*n||t*e>t*i)return!1;var a=r();return t*(e-t*a/2-n)>=0&&t*(e+t*a/2-i)<=0}function KG(t,e){return O_(t,e+1)}function VG(t,e,r,n,i){for(var a=(n||[]).slice(),o=e.start,s=e.end,u=0,l=1,c=o,f=function(){var y=n==null?void 0:n[u];if(y===void 0)return{v:O_(n,l)};var v=u,p,m=function(){return p===void 0&&(p=r(y,v)),p},b=y.coordinate,w=u===0||Du(t,b,m,c,s);w||(u=0,c=o,l+=1),w&&(c=b+t*(m()/2+i),u+=l)},d;l<=a.length;)if(d=f(),d)return d.v;return[]}function yo(t){"@babel/helpers - typeof";return yo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yo(t)}function S_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function ot(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?S_(Object(r),!0).forEach(function(n){HG(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):S_(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function HG(t,e,r){return e=GG(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function GG(t){var e=YG(t,"string");return yo(e)=="symbol"?e:e+""}function YG(t,e){if(yo(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(yo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function XG(t,e,r,n,i){for(var a=(n||[]).slice(),o=a.length,s=e.start,u=e.end,l=function(d){var h=a[d],y,v=function(){return y===void 0&&(y=r(h,d)),y};if(d===o-1){var p=t*(h.coordinate+t*v()/2-u);a[d]=h=ot(ot({},h),{},{tickCoord:p>0?h.coordinate-p*t:h.coordinate})}else a[d]=h=ot(ot({},h),{},{tickCoord:h.coordinate});var m=Du(t,h.tickCoord,v,s,u);m&&(u=h.tickCoord-t*(v()/2+i),a[d]=ot(ot({},h),{},{isShow:!0}))},c=o-1;c>=0;c--)l(c);return a}function JG(t,e,r,n,i,a){var o=(n||[]).slice(),s=o.length,u=e.start,l=e.end;if(a){var c=n[s-1],f=r(c,s-1),d=t*(c.coordinate+t*f/2-l);o[s-1]=c=ot(ot({},c),{},{tickCoord:d>0?c.coordinate-d*t:c.coordinate});var h=Du(t,c.tickCoord,function(){return f},u,l);h&&(l=c.tickCoord-t*(f/2+i),o[s-1]=ot(ot({},c),{},{isShow:!0}))}for(var y=a?s-1:s,v=function(b){var w=o[b],O,g=function(){return O===void 0&&(O=r(w,b)),O};if(b===0){var _=t*(w.coordinate-t*g()/2-u);o[b]=w=ot(ot({},w),{},{tickCoord:_<0?w.coordinate-_*t:w.coordinate})}else o[b]=w=ot(ot({},w),{},{tickCoord:w.coordinate});var S=Du(t,w.tickCoord,g,u,l);S&&(u=w.tickCoord+t*(g()/2+i),o[b]=ot(ot({},w),{},{isShow:!0}))},p=0;p<y;p++)v(p);return o}function Cd(t,e,r){var n=t.tick,i=t.ticks,a=t.viewBox,o=t.minTickGap,s=t.orientation,u=t.interval,l=t.tickFormatter,c=t.unit,f=t.angle;if(!i||!i.length||!n)return[];if(V(u)||It.isSsr)return KG(i,typeof u=="number"&&V(u)?u:0);var d=[],h=s==="top"||s==="bottom"?"width":"height",y=c&&h==="width"?_a(c,{fontSize:e,letterSpacing:r}):{width:0,height:0},v=function(w,O){var g=ae(l)?l(w.value,O):w.value;return h==="width"?qG(_a(g,{fontSize:e,letterSpacing:r}),y,f):_a(g,{fontSize:e,letterSpacing:r})[h]},p=i.length>=2?ft(i[1].coordinate-i[0].coordinate):1,m=zG(a,p,h);return u==="equidistantPreserveStart"?VG(p,m,v,i,o):(u==="preserveStart"||u==="preserveStartEnd"?d=JG(p,m,v,i,o,u==="preserveStartEnd"):d=XG(p,m,v,i,o),d.filter(function(b){return b.isShow}))}var ZG=["viewBox"],QG=["viewBox"],e6=["ticks"];function Mi(t){"@babel/helpers - typeof";return Mi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Mi(t)}function Di(){return Di=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Di.apply(this,arguments)}function A_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function et(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?A_(Object(r),!0).forEach(function(n){Md(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):A_(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Id(t,e){if(t==null)return{};var r=t6(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function t6(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function r6(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function P_(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,T_(n.key),n)}}function n6(t,e,r){return e&&P_(t.prototype,e),r&&P_(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function i6(t,e,r){return e=Ru(e),a6(t,E_()?Reflect.construct(e,r||[],Ru(t).constructor):e.apply(t,r))}function a6(t,e){if(e&&(Mi(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return o6(t)}function o6(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function E_(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(E_=function(){return!!t})()}function Ru(t){return Ru=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ru(t)}function s6(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Nd(t,e)}function Nd(t,e){return Nd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Nd(t,e)}function Md(t,e,r){return e=T_(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function T_(t){var e=u6(t,"string");return Mi(e)=="symbol"?e:e+""}function u6(t,e){if(Mi(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Mi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Ri=function(t){function e(r){var n;return r6(this,e),n=i6(this,e,[r]),n.state={fontSize:"",letterSpacing:""},n}return s6(e,t),n6(e,[{key:"shouldComponentUpdate",value:function(n,i){var a=n.viewBox,o=Id(n,ZG),s=this.props,u=s.viewBox,l=Id(s,QG);return!Jn(a,u)||!Jn(o,l)||!Jn(i,this.state)}},{key:"componentDidMount",value:function(){var n=this.layerReference;if(n){var i=n.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];i&&this.setState({fontSize:window.getComputedStyle(i).fontSize,letterSpacing:window.getComputedStyle(i).letterSpacing})}}},{key:"getTickLineCoord",value:function(n){var i=this.props,a=i.x,o=i.y,s=i.width,u=i.height,l=i.orientation,c=i.tickSize,f=i.mirror,d=i.tickMargin,h,y,v,p,m,b,w=f?-1:1,O=n.tickSize||c,g=V(n.tickCoord)?n.tickCoord:n.coordinate;switch(l){case"top":h=y=n.coordinate,p=o+ +!f*u,v=p-w*O,b=v-w*d,m=g;break;case"left":v=p=n.coordinate,y=a+ +!f*s,h=y-w*O,m=h-w*d,b=g;break;case"right":v=p=n.coordinate,y=a+ +f*s,h=y+w*O,m=h+w*d,b=g;break;default:h=y=n.coordinate,p=o+ +f*u,v=p+w*O,b=v+w*d,m=g;break}return{line:{x1:h,y1:v,x2:y,y2:p},tick:{x:m,y:b}}}},{key:"getTickTextAnchor",value:function(){var n=this.props,i=n.orientation,a=n.mirror,o;switch(i){case"left":o=a?"start":"end";break;case"right":o=a?"end":"start";break;default:o="middle";break}return o}},{key:"getTickVerticalAnchor",value:function(){var n=this.props,i=n.orientation,a=n.mirror,o="end";switch(i){case"left":case"right":o="middle";break;case"top":o=a?"start":"end";break;default:o=a?"end":"start";break}return o}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,s=n.height,u=n.orientation,l=n.mirror,c=n.axisLine,f=et(et(et({},Q(this.props,!1)),Q(c,!1)),{},{fill:"none"});if(u==="top"||u==="bottom"){var d=+(u==="top"&&!l||u==="bottom"&&l);f=et(et({},f),{},{x1:i,y1:a+d*s,x2:i+o,y2:a+d*s})}else{var h=+(u==="left"&&!l||u==="right"&&l);f=et(et({},f),{},{x1:i+h*o,y1:a,x2:i+h*o,y2:a+s})}return x.createElement("line",Di({},f,{className:le("recharts-cartesian-axis-line",xt(c,"className"))}))}},{key:"renderTicks",value:function(n,i,a){var o=this,s=this.props,u=s.tickLine,l=s.stroke,c=s.tick,f=s.tickFormatter,d=s.unit,h=Cd(et(et({},this.props),{},{ticks:n}),i,a),y=this.getTickTextAnchor(),v=this.getTickVerticalAnchor(),p=Q(this.props,!1),m=Q(c,!1),b=et(et({},p),{},{fill:"none"},Q(u,!1)),w=h.map(function(O,g){var _=o.getTickLineCoord(O),S=_.line,A=_.tick,T=et(et(et(et({textAnchor:y,verticalAnchor:v},p),{},{stroke:"none",fill:l},m),A),{},{index:g,payload:O,visibleTicksCount:h.length,tickFormatter:f});return x.createElement(pe,Di({className:"recharts-cartesian-axis-tick",key:"tick-".concat(O.value,"-").concat(O.coordinate,"-").concat(O.tickCoord)},on(o.props,O,g)),u&&x.createElement("line",Di({},b,S,{className:le("recharts-cartesian-axis-tick-line",xt(u,"className"))})),c&&e.renderTickItem(c,T,"".concat(ae(f)?f(O.value,g):O.value).concat(d||"")))});return x.createElement("g",{className:"recharts-cartesian-axis-ticks"},w)}},{key:"render",value:function(){var n=this,i=this.props,a=i.axisLine,o=i.width,s=i.height,u=i.ticksGenerator,l=i.className,c=i.hide;if(c)return null;var f=this.props,d=f.ticks,h=Id(f,e6),y=d;return ae(u)&&(y=d&&d.length>0?u(this.props):u(h)),o<=0||s<=0||!y||!y.length?null:x.createElement(pe,{className:le("recharts-cartesian-axis",l),ref:function(p){n.layerReference=p}},a&&this.renderAxisLine(),this.renderTicks(y,this.state.fontSize,this.state.letterSpacing),nt.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,i,a){var o,s=le(i.className,"recharts-cartesian-axis-tick-value");return x.isValidElement(n)?o=x.cloneElement(n,et(et({},i),{},{className:s})):ae(n)?o=n(et(et({},i),{},{className:s})):o=x.createElement(cn,Di({},i,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])}(x.Component);Md(Ri,"displayName","CartesianAxis"),Md(Ri,"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 l6=["x1","y1","x2","y2","key"],c6=["offset"];function Pn(t){"@babel/helpers - typeof";return Pn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pn(t)}function j_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function st(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?j_(Object(r),!0).forEach(function(n){f6(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):j_(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function f6(t,e,r){return e=d6(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function d6(t){var e=h6(t,"string");return Pn(e)=="symbol"?e:e+""}function h6(t,e){if(Pn(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Pn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function En(){return En=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},En.apply(this,arguments)}function $_(t,e){if(t==null)return{};var r=p6(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function p6(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}var v6=function(e){var r=e.fill;if(!r||r==="none")return null;var n=e.fillOpacity,i=e.x,a=e.y,o=e.width,s=e.height,u=e.ry;return x.createElement("rect",{x:i,y:a,ry:u,width:o,height:s,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function k_(t,e){var r;if(x.isValidElement(t))r=x.cloneElement(t,e);else if(ae(t))r=t(e);else{var n=e.x1,i=e.y1,a=e.x2,o=e.y2,s=e.key,u=$_(e,l6),l=Q(u,!1);l.offset;var c=$_(l,c6);r=x.createElement("line",En({},c,{x1:n,y1:i,x2:a,y2:o,fill:"none",key:s}))}return r}function y6(t){var e=t.x,r=t.width,n=t.horizontal,i=n===void 0?!0:n,a=t.horizontalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(s,u){var l=st(st({},t),{},{x1:e,y1:s,x2:e+r,y2:s,key:"line-".concat(u),index:u});return k_(i,l)});return x.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function g6(t){var e=t.y,r=t.height,n=t.vertical,i=n===void 0?!0:n,a=t.verticalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(s,u){var l=st(st({},t),{},{x1:s,y1:e,x2:s,y2:e+r,key:"line-".concat(u),index:u});return k_(i,l)});return x.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function m6(t){var e=t.horizontalFill,r=t.fillOpacity,n=t.x,i=t.y,a=t.width,o=t.height,s=t.horizontalPoints,u=t.horizontal,l=u===void 0?!0:u;if(!l||!e||!e.length)return null;var c=s.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+o-d:c[h+1]-d;if(v<=0)return null;var p=h%e.length;return x.createElement("rect",{key:"react-".concat(h),y:d,x:n,height:v,width:a,stroke:"none",fill:e[p],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return x.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},f)}function b6(t){var e=t.vertical,r=e===void 0?!0:e,n=t.verticalFill,i=t.fillOpacity,a=t.x,o=t.y,s=t.width,u=t.height,l=t.verticalPoints;if(!r||!n||!n.length)return null;var c=l.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+s-d:c[h+1]-d;if(v<=0)return null;var p=h%n.length;return x.createElement("rect",{key:"react-".concat(h),x:d,y:o,width:v,height:u,stroke:"none",fill:n[p],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return x.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var w6=function(e,r){var n=e.xAxis,i=e.width,a=e.height,o=e.offset;return Db(Cd(st(st(st({},Ri.defaultProps),n),{},{ticks:wr(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.left,o.left+o.width,r)},_6=function(e,r){var n=e.yAxis,i=e.width,a=e.height,o=e.offset;return Db(Cd(st(st(st({},Ri.defaultProps),n),{},{ticks:wr(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.top,o.top+o.height,r)},Li={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Lu(t){var e,r,n,i,a,o,s=xd(),u=Od(),l=uG(),c=st(st({},t),{},{stroke:(e=t.stroke)!==null&&e!==void 0?e:Li.stroke,fill:(r=t.fill)!==null&&r!==void 0?r:Li.fill,horizontal:(n=t.horizontal)!==null&&n!==void 0?n:Li.horizontal,horizontalFill:(i=t.horizontalFill)!==null&&i!==void 0?i:Li.horizontalFill,vertical:(a=t.vertical)!==null&&a!==void 0?a:Li.vertical,verticalFill:(o=t.verticalFill)!==null&&o!==void 0?o:Li.verticalFill,x:V(t.x)?t.x:l.left,y:V(t.y)?t.y:l.top,width:V(t.width)?t.width:l.width,height:V(t.height)?t.height:l.height}),f=c.x,d=c.y,h=c.width,y=c.height,v=c.syncWithTicks,p=c.horizontalValues,m=c.verticalValues,b=aG(),w=oG();if(!V(h)||h<=0||!V(y)||y<=0||!V(f)||f!==+f||!V(d)||d!==+d)return null;var O=c.verticalCoordinatesGenerator||w6,g=c.horizontalCoordinatesGenerator||_6,_=c.horizontalPoints,S=c.verticalPoints;if((!_||!_.length)&&ae(g)){var A=p&&p.length,T=g({yAxis:w?st(st({},w),{},{ticks:A?p:w.ticks}):void 0,width:s,height:u,offset:l},A?!0:v);zt(Array.isArray(T),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Pn(T),"]")),Array.isArray(T)&&(_=T)}if((!S||!S.length)&&ae(O)){var M=m&&m.length,$=O({xAxis:b?st(st({},b),{},{ticks:M?m:b.ticks}):void 0,width:s,height:u,offset:l},M?!0:v);zt(Array.isArray($),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Pn($),"]")),Array.isArray($)&&(S=$)}return x.createElement("g",{className:"recharts-cartesian-grid"},x.createElement(v6,{fill:c.fill,fillOpacity:c.fillOpacity,x:c.x,y:c.y,width:c.width,height:c.height,ry:c.ry}),x.createElement(y6,En({},c,{offset:l,horizontalPoints:_,xAxis:b,yAxis:w})),x.createElement(g6,En({},c,{offset:l,verticalPoints:S,xAxis:b,yAxis:w})),x.createElement(m6,En({},c,{horizontalPoints:_})),x.createElement(b6,En({},c,{verticalPoints:S})))}Lu.displayName="CartesianGrid";var x6=["type","layout","connectNulls","ref"],O6=["key"];function Bi(t){"@babel/helpers - typeof";return Bi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bi(t)}function C_(t,e){if(t==null)return{};var r=S6(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function S6(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function go(){return go=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},go.apply(this,arguments)}function I_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Et(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?I_(Object(r),!0).forEach(function(n){Xt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):I_(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Ui(t){return T6(t)||E6(t)||P6(t)||A6()}function A6(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
165
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function P6(t,e){if(t){if(typeof t=="string")return Dd(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Dd(t,e)}}function E6(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function T6(t){if(Array.isArray(t))return Dd(t)}function Dd(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function j6(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function N_(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,D_(n.key),n)}}function $6(t,e,r){return e&&N_(t.prototype,e),r&&N_(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function k6(t,e,r){return e=Bu(e),C6(t,M_()?Reflect.construct(e,r||[],Bu(t).constructor):e.apply(t,r))}function C6(t,e){if(e&&(Bi(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return I6(t)}function I6(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function M_(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(M_=function(){return!!t})()}function Bu(t){return Bu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Bu(t)}function N6(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Rd(t,e)}function Rd(t,e){return Rd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Rd(t,e)}function Xt(t,e,r){return e=D_(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function D_(t){var e=M6(t,"string");return Bi(e)=="symbol"?e:e+""}function M6(t,e){if(Bi(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Bi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var mo=function(t){function e(){var r;j6(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=k6(this,e,[].concat(i)),Xt(r,"state",{isAnimationFinished:!0,totalLength:0}),Xt(r,"generateSimpleStrokeDasharray",function(o,s){return"".concat(s,"px ").concat(o-s,"px")}),Xt(r,"getStrokeDasharray",function(o,s,u){var l=u.reduce(function(m,b){return m+b});if(!l)return r.generateSimpleStrokeDasharray(s,o);for(var c=Math.floor(o/l),f=o%l,d=s-o,h=[],y=0,v=0;y<u.length;v+=u[y],++y)if(v+u[y]>f){h=[].concat(Ui(u.slice(0,y)),[f-v]);break}var p=h.length%2===0?[0,d]:[d];return[].concat(Ui(e.repeat(u,c)),Ui(h),p).map(function(m){return"".concat(m,"px")}).join(", ")}),Xt(r,"id",an("recharts-line-")),Xt(r,"pathRef",function(o){r.mainCurve=o}),Xt(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),Xt(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return N6(e,t),$6(e,[{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,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.points,s=a.xAxis,u=a.yAxis,l=a.layout,c=a.children,f=Ot(c,Ba);if(!f)return null;var d=function(v,p){return{x:v.x,y:v.y,value:v.value,errorVal:We(v.payload,p)}},h={clipPath:n?"url(#clipPath-".concat(i,")"):null};return x.createElement(pe,h,f.map(function(y){return x.cloneElement(y,{key:"bar-".concat(y.props.dataKey),data:o,xAxis:s,yAxis:u,layout:l,dataPointFormatter:d})}))}},{key:"renderDots",value:function(n,i,a){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var s=this.props,u=s.dot,l=s.points,c=s.dataKey,f=Q(this.props,!1),d=Q(u,!0),h=l.map(function(v,p){var m=Et(Et(Et({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:l});return e.renderDotItem(u,m)}),y={clipPath:n?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return x.createElement(pe,go({className:"recharts-line-dots",key:"dots"},y),h)}},{key:"renderCurveStatically",value:function(n,i,a,o){var s=this.props,u=s.type,l=s.layout,c=s.connectNulls;s.ref;var f=C_(s,x6),d=Et(Et(Et({},Q(f,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(a,")"):null,points:n},o),{},{type:u,layout:l,connectNulls:c});return x.createElement(wn,go({},d,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,i){var a=this,o=this.props,s=o.points,u=o.strokeDasharray,l=o.isAnimationActive,c=o.animationBegin,f=o.animationDuration,d=o.animationEasing,h=o.animationId,y=o.animateNewValues,v=o.width,p=o.height,m=this.state,b=m.prevPoints,w=m.totalLength;return x.createElement(Rt,{begin:c,duration:f,isActive:l,easing:d,from:{t:0},to:{t:1},key:"line-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(O){var g=O.t;if(b){var _=b.length/s.length,S=s.map(function(j,N){var C=Math.floor(N*_);if(b[C]){var I=b[C],R=Fe(I.x,j.x),L=Fe(I.y,j.y);return Et(Et({},j),{},{x:R(g),y:L(g)})}if(y){var F=Fe(v*2,j.x),z=Fe(p/2,j.y);return Et(Et({},j),{},{x:F(g),y:z(g)})}return Et(Et({},j),{},{x:j.x,y:j.y})});return a.renderCurveStatically(S,n,i)}var A=Fe(0,w),T=A(g),M;if(u){var $="".concat(u).split(/[,\s]+/gim).map(function(j){return parseFloat(j)});M=a.getStrokeDasharray(T,w,$)}else M=a.generateSimpleStrokeDasharray(w,T);return a.renderCurveStatically(s,n,i,{strokeDasharray:M})})}},{key:"renderCurve",value:function(n,i){var a=this.props,o=a.points,s=a.isAnimationActive,u=this.state,l=u.prevPoints,c=u.totalLength;return s&&o&&o.length&&(!l&&c>0||!Lr(l,o))?this.renderCurveWithAnimation(n,i):this.renderCurveStatically(o,n,i)}},{key:"render",value:function(){var n,i=this.props,a=i.hide,o=i.dot,s=i.points,u=i.className,l=i.xAxis,c=i.yAxis,f=i.top,d=i.left,h=i.width,y=i.height,v=i.isAnimationActive,p=i.id;if(a||!s||!s.length)return null;var m=this.state.isAnimationFinished,b=s.length===1,w=le("recharts-line",u),O=l&&l.allowDataOverflow,g=c&&c.allowDataOverflow,_=O||g,S=fe(p)?this.id:p,A=(n=Q(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},T=A.r,M=T===void 0?3:T,$=A.strokeWidth,j=$===void 0?2:$,N=Ev(o)?o:{},C=N.clipDot,I=C===void 0?!0:C,R=M*2+j;return x.createElement(pe,{className:w},O||g?x.createElement("defs",null,x.createElement("clipPath",{id:"clipPath-".concat(S)},x.createElement("rect",{x:O?d:d-h/2,y:g?f:f-y/2,width:O?h:h*2,height:g?y:y*2})),!I&&x.createElement("clipPath",{id:"clipPath-dots-".concat(S)},x.createElement("rect",{x:d-R/2,y:f-R/2,width:h+R,height:y+R}))):null,!b&&this.renderCurve(_,S),this.renderErrorBar(_,S),(b||o)&&this.renderDots(_,I,S),(!v||m)&&Ht.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:i.curPoints}:n.points!==i.curPoints?{curPoints:n.points}:null}},{key:"repeat",value:function(n,i){for(var a=n.length%2!==0?[].concat(Ui(n),[0]):n,o=[],s=0;s<i;++s)o=[].concat(Ui(o),Ui(a));return o}},{key:"renderDotItem",value:function(n,i){var a;if(x.isValidElement(n))a=x.cloneElement(n,i);else if(ae(n))a=n(i);else{var o=i.key,s=C_(i,O6),u=le("recharts-line-dot",typeof n!="boolean"?n.className:"");a=x.createElement(wi,go({key:o},s,{className:u}))}return a}}])}(x.PureComponent);Xt(mo,"displayName","Line"),Xt(mo,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!It.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1}),Xt(mo,"getComposedData",function(t){var e=t.props,r=t.xAxis,n=t.yAxis,i=t.xAxisTicks,a=t.yAxisTicks,o=t.dataKey,s=t.bandSize,u=t.displayedData,l=t.offset,c=e.layout,f=u.map(function(d,h){var y=We(d,o);return c==="horizontal"?{x:Js({axis:r,ticks:i,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:Js({axis:n,ticks:a,bandSize:s,entry:d,index:h}),value:y,payload:d}});return Et({points:f,layout:c},l)});var D6=["layout","type","stroke","connectNulls","isRange","ref"],R6=["key"],R_;function Fi(t){"@babel/helpers - typeof";return Fi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fi(t)}function L_(t,e){if(t==null)return{};var r=L6(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function L6(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function Tn(){return Tn=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Tn.apply(this,arguments)}function B_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Wr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?B_(Object(r),!0).forEach(function(n){or(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):B_(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function B6(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function U_(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,W_(n.key),n)}}function U6(t,e,r){return e&&U_(t.prototype,e),r&&U_(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function F6(t,e,r){return e=Uu(e),W6(t,F_()?Reflect.construct(e,r||[],Uu(t).constructor):e.apply(t,r))}function W6(t,e){if(e&&(Fi(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return q6(t)}function q6(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function F_(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(F_=function(){return!!t})()}function Uu(t){return Uu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Uu(t)}function z6(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ld(t,e)}function Ld(t,e){return Ld=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Ld(t,e)}function or(t,e,r){return e=W_(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function W_(t){var e=K6(t,"string");return Fi(e)=="symbol"?e:e+""}function K6(t,e){if(Fi(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Fi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var qr=function(t){function e(){var r;B6(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=F6(this,e,[].concat(i)),or(r,"state",{isAnimationFinished:!0}),or(r,"id",an("recharts-area-")),or(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),ae(o)&&o()}),or(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),ae(o)&&o()}),r}return z6(e,t),U6(e,[{key:"renderDots",value:function(n,i,a){var o=this.props.isAnimationActive,s=this.state.isAnimationFinished;if(o&&!s)return null;var u=this.props,l=u.dot,c=u.points,f=u.dataKey,d=Q(this.props,!1),h=Q(l,!0),y=c.map(function(p,m){var b=Wr(Wr(Wr({key:"dot-".concat(m),r:3},d),h),{},{index:m,cx:p.x,cy:p.y,dataKey:f,value:p.value,payload:p.payload,points:c});return e.renderDotItem(l,b)}),v={clipPath:n?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return x.createElement(pe,Tn({className:"recharts-area-dots"},v),y)}},{key:"renderHorizontalRect",value:function(n){var i=this.props,a=i.baseLine,o=i.points,s=i.strokeWidth,u=o[0].x,l=o[o.length-1].x,c=n*Math.abs(u-l),f=Rr(o.map(function(d){return d.y||0}));return V(a)&&typeof a=="number"?f=Math.max(a,f):a&&Array.isArray(a)&&a.length&&(f=Math.max(Rr(a.map(function(d){return d.y||0})),f)),V(f)?x.createElement("rect",{x:u<l?u:u-c,y:0,width:c,height:Math.floor(f+(s?parseInt("".concat(s),10):1))}):null}},{key:"renderVerticalRect",value:function(n){var i=this.props,a=i.baseLine,o=i.points,s=i.strokeWidth,u=o[0].y,l=o[o.length-1].y,c=n*Math.abs(u-l),f=Rr(o.map(function(d){return d.x||0}));return V(a)&&typeof a=="number"?f=Math.max(a,f):a&&Array.isArray(a)&&a.length&&(f=Math.max(Rr(a.map(function(d){return d.x||0})),f)),V(f)?x.createElement("rect",{x:0,y:u<l?u:u-c,width:f+(s?parseInt("".concat(s),10):1),height:Math.floor(c)}):null}},{key:"renderClipRect",value:function(n){var i=this.props.layout;return i==="vertical"?this.renderVerticalRect(n):this.renderHorizontalRect(n)}},{key:"renderAreaStatically",value:function(n,i,a,o){var s=this.props,u=s.layout,l=s.type,c=s.stroke,f=s.connectNulls,d=s.isRange;s.ref;var h=L_(s,D6);return x.createElement(pe,{clipPath:a?"url(#clipPath-".concat(o,")"):null},x.createElement(wn,Tn({},Q(h,!0),{points:n,connectNulls:f,type:l,baseLine:i,layout:u,stroke:"none",className:"recharts-area-area"})),c!=="none"&&x.createElement(wn,Tn({},Q(this.props,!1),{className:"recharts-area-curve",layout:u,type:l,connectNulls:f,fill:"none",points:n})),c!=="none"&&d&&x.createElement(wn,Tn({},Q(this.props,!1),{className:"recharts-area-curve",layout:u,type:l,connectNulls:f,fill:"none",points:i})))}},{key:"renderAreaWithAnimation",value:function(n,i){var a=this,o=this.props,s=o.points,u=o.baseLine,l=o.isAnimationActive,c=o.animationBegin,f=o.animationDuration,d=o.animationEasing,h=o.animationId,y=this.state,v=y.prevPoints,p=y.prevBaseLine;return x.createElement(Rt,{begin:c,duration:f,isActive:l,easing:d,from:{t:0},to:{t:1},key:"area-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(m){var b=m.t;if(v){var w=v.length/s.length,O=s.map(function(A,T){var M=Math.floor(T*w);if(v[M]){var $=v[M],j=Fe($.x,A.x),N=Fe($.y,A.y);return Wr(Wr({},A),{},{x:j(b),y:N(b)})}return A}),g;if(V(u)&&typeof u=="number"){var _=Fe(p,u);g=_(b)}else if(fe(u)||Xn(u)){var S=Fe(p,0);g=S(b)}else g=u.map(function(A,T){var M=Math.floor(T*w);if(p[M]){var $=p[M],j=Fe($.x,A.x),N=Fe($.y,A.y);return Wr(Wr({},A),{},{x:j(b),y:N(b)})}return A});return a.renderAreaStatically(O,g,n,i)}return x.createElement(pe,null,x.createElement("defs",null,x.createElement("clipPath",{id:"animationClipPath-".concat(i)},a.renderClipRect(b))),x.createElement(pe,{clipPath:"url(#animationClipPath-".concat(i,")")},a.renderAreaStatically(s,u,n,i)))})}},{key:"renderArea",value:function(n,i){var a=this.props,o=a.points,s=a.baseLine,u=a.isAnimationActive,l=this.state,c=l.prevPoints,f=l.prevBaseLine,d=l.totalLength;return u&&o&&o.length&&(!c&&d>0||!Lr(c,o)||!Lr(f,s))?this.renderAreaWithAnimation(n,i):this.renderAreaStatically(o,s,n,i)}},{key:"render",value:function(){var n,i=this.props,a=i.hide,o=i.dot,s=i.points,u=i.className,l=i.top,c=i.left,f=i.xAxis,d=i.yAxis,h=i.width,y=i.height,v=i.isAnimationActive,p=i.id;if(a||!s||!s.length)return null;var m=this.state.isAnimationFinished,b=s.length===1,w=le("recharts-area",u),O=f&&f.allowDataOverflow,g=d&&d.allowDataOverflow,_=O||g,S=fe(p)?this.id:p,A=(n=Q(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},T=A.r,M=T===void 0?3:T,$=A.strokeWidth,j=$===void 0?2:$,N=Ev(o)?o:{},C=N.clipDot,I=C===void 0?!0:C,R=M*2+j;return x.createElement(pe,{className:w},O||g?x.createElement("defs",null,x.createElement("clipPath",{id:"clipPath-".concat(S)},x.createElement("rect",{x:O?c:c-h/2,y:g?l:l-y/2,width:O?h:h*2,height:g?y:y*2})),!I&&x.createElement("clipPath",{id:"clipPath-dots-".concat(S)},x.createElement("rect",{x:c-R/2,y:l-R/2,width:h+R,height:y+R}))):null,b?null:this.renderArea(_,S),(o||b)&&this.renderDots(_,I,S),(!v||m)&&Ht.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,curBaseLine:n.baseLine,prevPoints:i.curPoints,prevBaseLine:i.curBaseLine}:n.points!==i.curPoints||n.baseLine!==i.curBaseLine?{curPoints:n.points,curBaseLine:n.baseLine}:null}}])}(x.PureComponent);R_=qr,or(qr,"displayName","Area"),or(qr,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!It.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"}),or(qr,"getBaseValue",function(t,e,r,n){var i=t.layout,a=t.baseValue,o=e.props.baseValue,s=o??a;if(V(s)&&typeof s=="number")return s;var u=i==="horizontal"?n:r,l=u.scale.domain();if(u.type==="number"){var c=Math.max(l[0],l[1]),f=Math.min(l[0],l[1]);return s==="dataMin"?f:s==="dataMax"||c<0?c:Math.max(Math.min(l[0],l[1]),0)}return s==="dataMin"?l[0]:s==="dataMax"?l[1]:l[0]}),or(qr,"getComposedData",function(t){var e=t.props,r=t.item,n=t.xAxis,i=t.yAxis,a=t.xAxisTicks,o=t.yAxisTicks,s=t.bandSize,u=t.dataKey,l=t.stackedData,c=t.dataStartIndex,f=t.displayedData,d=t.offset,h=e.layout,y=l&&l.length,v=R_.getBaseValue(e,r,n,i),p=h==="horizontal",m=!1,b=f.map(function(O,g){var _;y?_=l[c+g]:(_=We(O,u),Array.isArray(_)?m=!0:_=[v,_]);var S=_[1]==null||y&&We(O,u)==null;return p?{x:Js({axis:n,ticks:a,bandSize:s,entry:O,index:g}),y:S?null:i.scale(_[1]),value:_,payload:O}:{x:S?null:n.scale(_[1]),y:Js({axis:i,ticks:o,bandSize:s,entry:O,index:g}),value:_,payload:O}}),w;return y||m?w=b.map(function(O){var g=Array.isArray(O.value)?O.value[0]:null;return p?{x:O.x,y:g!=null&&O.y!=null?i.scale(g):null}:{x:g!=null?n.scale(g):null,y:O.y}}):w=p?i.scale(v):n.scale(v),Wr({points:b,baseLine:w,layout:h,isRange:m},d)}),or(qr,"renderDotItem",function(t,e){var r;if(x.isValidElement(t))r=x.cloneElement(t,e);else if(ae(t))r=t(e);else{var n=le("recharts-area-dot",typeof t!="boolean"?t.className:""),i=e.key,a=L_(e,R6);r=x.createElement(wi,Tn({},a,{key:i,className:n}))}return r});function Wi(t){"@babel/helpers - typeof";return Wi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wi(t)}function V6(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function H6(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,K_(n.key),n)}}function G6(t,e,r){return e&&H6(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function Y6(t,e,r){return e=Fu(e),X6(t,q_()?Reflect.construct(e,r||[],Fu(t).constructor):e.apply(t,r))}function X6(t,e){if(e&&(Wi(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return J6(t)}function J6(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function q_(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(q_=function(){return!!t})()}function Fu(t){return Fu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Fu(t)}function Z6(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Bd(t,e)}function Bd(t,e){return Bd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Bd(t,e)}function z_(t,e,r){return e=K_(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function K_(t){var e=Q6(t,"string");return Wi(e)=="symbol"?e:e+""}function Q6(t,e){if(Wi(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Wi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ud(){return Ud=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Ud.apply(this,arguments)}function e5(t){var e=t.xAxisId,r=xd(),n=Od(),i=u_(e);return i==null?null:ve.createElement(Ri,Ud({},i,{className:le("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(o){return wr(o,!0)}}))}var zr=function(t){function e(){return V6(this,e),Y6(this,e,arguments)}return Z6(e,t),G6(e,[{key:"render",value:function(){return ve.createElement(e5,this.props)}}])}(ve.Component);z_(zr,"displayName","XAxis"),z_(zr,"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 qi(t){"@babel/helpers - typeof";return qi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qi(t)}function t5(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r5(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,G_(n.key),n)}}function n5(t,e,r){return e&&r5(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function i5(t,e,r){return e=Wu(e),a5(t,V_()?Reflect.construct(e,r||[],Wu(t).constructor):e.apply(t,r))}function a5(t,e){if(e&&(qi(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return o5(t)}function o5(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function V_(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(V_=function(){return!!t})()}function Wu(t){return Wu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Wu(t)}function s5(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Fd(t,e)}function Fd(t,e){return Fd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Fd(t,e)}function H_(t,e,r){return e=G_(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function G_(t){var e=u5(t,"string");return qi(e)=="symbol"?e:e+""}function u5(t,e){if(qi(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(qi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Wd(){return Wd=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Wd.apply(this,arguments)}var l5=function(e){var r=e.yAxisId,n=xd(),i=Od(),a=l_(r);return a==null?null:ve.createElement(Ri,Wd({},a,{className:le("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:n,height:i},ticksGenerator:function(s){return wr(s,!0)}}))},Kr=function(t){function e(){return t5(this,e),i5(this,e,arguments)}return s5(e,t),n5(e,[{key:"render",value:function(){return ve.createElement(l5,this.props)}}])}(ve.Component);H_(Kr,"displayName","YAxis"),H_(Kr,"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 Y_(t){return h5(t)||d5(t)||f5(t)||c5()}function c5(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
166
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function f5(t,e){if(t){if(typeof t=="string")return qd(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return qd(t,e)}}function d5(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function h5(t){if(Array.isArray(t))return qd(t)}function qd(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var zd=function(e,r,n,i,a){var o=Ot(e,Ed),s=Ot(e,Cu),u=[].concat(Y_(o),Y_(s)),l=Ot(e,Mu),c="".concat(i,"Id"),f=i[0],d=r;if(u.length&&(d=u.reduce(function(v,p){if(p.props[c]===n&&ar(p.props,"extendDomain")&&V(p.props[f])){var m=p.props[f];return[Math.min(v[0],m),Math.max(v[1],m)]}return v},d)),l.length){var h="".concat(f,"1"),y="".concat(f,"2");d=l.reduce(function(v,p){if(p.props[c]===n&&ar(p.props,"extendDomain")&&V(p.props[h])&&V(p.props[y])){var m=p.props[h],b=p.props[y];return[Math.min(v[0],m,b),Math.max(v[1],m,b)]}return v},d)}return a&&a.length&&(d=a.reduce(function(v,p){return V(p)?[Math.min(v[0],p),Math.max(v[1],p)]:v},d)),d},X_={exports:{}};(function(t){var e=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(u,l,c){this.fn=u,this.context=l,this.once=c||!1}function a(u,l,c,f,d){if(typeof c!="function")throw new TypeError("The listener must be a function");var h=new i(c,f||u,d),y=r?r+l:l;return u._events[y]?u._events[y].fn?u._events[y]=[u._events[y],h]:u._events[y].push(h):(u._events[y]=h,u._eventsCount++),u}function o(u,l){--u._eventsCount===0?u._events=new n:delete u._events[l]}function s(){this._events=new n,this._eventsCount=0}s.prototype.eventNames=function(){var l=[],c,f;if(this._eventsCount===0)return l;for(f in c=this._events)e.call(c,f)&&l.push(r?f.slice(1):f);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(c)):l},s.prototype.listeners=function(l){var c=r?r+l:l,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(l){var c=r?r+l:l,f=this._events[c];return f?f.fn?1:f.length:0},s.prototype.emit=function(l,c,f,d,h,y){var v=r?r+l:l;if(!this._events[v])return!1;var p=this._events[v],m=arguments.length,b,w;if(p.fn){switch(p.once&&this.removeListener(l,p.fn,void 0,!0),m){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,b=new Array(m-1);w<m;w++)b[w-1]=arguments[w];p.fn.apply(p.context,b)}else{var O=p.length,g;for(w=0;w<O;w++)switch(p[w].once&&this.removeListener(l,p[w].fn,void 0,!0),m){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(!b)for(g=1,b=new Array(m-1);g<m;g++)b[g-1]=arguments[g];p[w].fn.apply(p[w].context,b)}}return!0},s.prototype.on=function(l,c,f){return a(this,l,c,f,!1)},s.prototype.once=function(l,c,f){return a(this,l,c,f,!0)},s.prototype.removeListener=function(l,c,f,d){var h=r?r+l:l;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=[],m=y.length;v<m;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(l){var c;return l?(c=r?r+l:l,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,t.exports=s})(X_);var p5=X_.exports;const v5=je(p5);var Kd=new v5,Vd="recharts.syncMouseEvents";function bo(t){"@babel/helpers - typeof";return bo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bo(t)}function y5(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function g5(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,J_(n.key),n)}}function m5(t,e,r){return e&&g5(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function Hd(t,e,r){return e=J_(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function J_(t){var e=b5(t,"string");return bo(e)=="symbol"?e:e+""}function b5(t,e){if(bo(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(bo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var w5=function(){function t(){y5(this,t),Hd(this,"activeIndex",0),Hd(this,"coordinateList",[]),Hd(this,"layout","horizontal")}return m5(t,[{key:"setDetails",value:function(r){var n,i=r.coordinateList,a=i===void 0?null:i,o=r.container,s=o===void 0?null:o,u=r.layout,l=u===void 0?null:u,c=r.offset,f=c===void 0?null:c,d=r.mouseHandlerCallback,h=d===void 0?null:d;this.coordinateList=(n=a??this.coordinateList)!==null&&n!==void 0?n:[],this.container=s??this.container,this.layout=l??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 i=this.container.getBoundingClientRect(),a=i.x,o=i.y,s=i.height,u=this.coordinateList[this.activeIndex].coordinate,l=((r=window)===null||r===void 0?void 0:r.scrollX)||0,c=((n=window)===null||n===void 0?void 0:n.scrollY)||0,f=a+u+l,d=o+this.offset.top+s/2+c;this.mouseHandlerCallback({pageX:f,pageY:d})}}}])}();function _5(t,e,r){if(r==="number"&&e===!0&&Array.isArray(t)){var n=t==null?void 0:t[0],i=t==null?void 0:t[1];if(n&&i&&V(n)&&V(i))return!0}return!1}function x5(t,e,r,n){var i=n/2;return{stroke:"none",fill:"#ccc",x:t==="horizontal"?e.x-i:r.left+.5,y:t==="horizontal"?r.top+.5:e.y-i,width:t==="horizontal"?n:r.width-1,height:t==="horizontal"?r.height-1:n}}function Z_(t){var e=t.cx,r=t.cy,n=t.radius,i=t.startAngle,a=t.endAngle,o=we(e,r,n,i),s=we(e,r,n,a);return{points:[o,s],cx:e,cy:r,radius:n,startAngle:i,endAngle:a}}function O5(t,e,r){var n,i,a,o;if(t==="horizontal")n=e.x,a=n,i=r.top,o=r.top+r.height;else if(t==="vertical")i=e.y,o=i,n=r.left,a=r.left+r.width;else if(e.cx!=null&&e.cy!=null)if(t==="centric"){var s=e.cx,u=e.cy,l=e.innerRadius,c=e.outerRadius,f=e.angle,d=we(s,u,l,f),h=we(s,u,c,f);n=d.x,i=d.y,a=h.x,o=h.y}else return Z_(e);return[{x:n,y:i},{x:a,y:o}]}function wo(t){"@babel/helpers - typeof";return wo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wo(t)}function Q_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function qu(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Q_(Object(r),!0).forEach(function(n){S5(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Q_(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function S5(t,e,r){return e=A5(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function A5(t){var e=P5(t,"string");return wo(e)=="symbol"?e:e+""}function P5(t,e){if(wo(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(wo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function E5(t){var e,r,n=t.element,i=t.tooltipEventType,a=t.isActive,o=t.activeCoordinate,s=t.activePayload,u=t.offset,l=t.activeTooltipIndex,c=t.tooltipAxisBandSize,f=t.layout,d=t.chartName,h=(e=n.props.cursor)!==null&&e!==void 0?e:(r=n.type.defaultProps)===null||r===void 0?void 0:r.cursor;if(!n||!h||!a||!o||d!=="ScatterChart"&&i!=="axis")return null;var y,v=wn;if(d==="ScatterChart")y=o,v=cK;else if(d==="BarChart")y=x5(f,o,u,c),v=ad;else if(f==="radial"){var p=Z_(o),m=p.cx,b=p.cy,w=p.radius,O=p.startAngle,g=p.endAngle;y={cx:m,cy:b,startAngle:O,endAngle:g,innerRadius:w,outerRadius:w},v=l0}else y={points:O5(f,o,u)},v=wn;var _=qu(qu(qu(qu({stroke:"#ccc",pointerEvents:"none"},u),y),Q(h,!1)),{},{payload:s,payloadIndex:l,className:le("recharts-tooltip-cursor",h.className)});return x.isValidElement(h)?x.cloneElement(h,_):x.createElement(v,_)}var T5=["item"],j5=["children","className","width","height","style","compact","title","desc"];function zi(t){"@babel/helpers - typeof";return zi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zi(t)}function Ki(){return Ki=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Ki.apply(this,arguments)}function ex(t,e){return C5(t)||k5(t,e)||nx(t,e)||$5()}function $5(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
167
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
168
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nx(t,e){if(t){if(typeof t=="string")return Yd(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Yd(t,e)}}function W5(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function q5(t){if(Array.isArray(t))return Yd(t)}function Yd(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ix(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function U(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ix(Object(r),!0).forEach(function(n){se(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ix(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function se(t,e,r){return e=ax(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ax(t){var e=z5(t,"string");return zi(e)=="symbol"?e:e+""}function z5(t,e){if(zi(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(zi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var K5={xAxis:["bottom","top"],yAxis:["left","right"]},V5={width:"100%",height:"100%"},ox={x:0,y:0};function Ku(t){return t}var H5=function(e,r){return r==="horizontal"?e.x:r==="vertical"?e.y:r==="centric"?e.angle:e.radius},G5=function(e,r,n,i){var a=r.find(function(c){return c&&c.index===n});if(a){if(e==="horizontal")return{x:a.coordinate,y:i.y};if(e==="vertical")return{x:i.x,y:a.coordinate};if(e==="centric"){var o=a.coordinate,s=i.radius;return U(U(U({},i),we(i.cx,i.cy,s,o)),{},{angle:o,radius:s})}var u=a.coordinate,l=i.angle;return U(U(U({},i),we(i.cx,i.cy,u,l)),{},{angle:l,radius:u})}return ox},Vu=function(e,r){var n=r.graphicalItems,i=r.dataStartIndex,a=r.dataEndIndex,o=(n??[]).reduce(function(s,u){var l=u.props.data;return l&&l.length?[].concat(Vi(s),Vi(l)):s},[]);return o.length>0?o:e&&e.length&&V(i)&&V(a)?e.slice(i,a+1):[]};function sx(t){return t==="number"?[0,"auto"]:void 0}var Xd=function(e,r,n,i){var a=e.graphicalItems,o=e.tooltipAxis,s=Vu(r,e);return n<0||!a||!a.length||n>=s.length?null:a.reduce(function(u,l){var c,f=(c=l.props.data)!==null&&c!==void 0?c:r;f&&e.dataStartIndex+e.dataEndIndex!==0&&e.dataEndIndex-e.dataStartIndex>=n&&(f=f.slice(e.dataStartIndex,e.dataEndIndex+1));var d;if(o.dataKey&&!o.allowDuplicatedCategory){var h=f===void 0?s:f;d=Xo(h,o.dataKey,i)}else d=f&&f[n]||s[n];return d?[].concat(Vi(u),[Vb(l,d)]):u},[])},ux=function(e,r,n,i){var a=i||{x:e.chartX,y:e.chartY},o=H5(a,n),s=e.orderedTooltipTicks,u=e.tooltipAxis,l=e.tooltipTicks,c=CW(o,s,l,u);if(c>=0&&l){var f=l[c]&&l[c].value,d=Xd(e,r,c,f),h=G5(n,s,c,a);return{activeTooltipIndex:c,activeLabel:f,activePayload:d,activeCoordinate:h}}return null},Y5=function(e,r){var n=r.axes,i=r.graphicalItems,a=r.axisType,o=r.axisIdKey,s=r.stackGroups,u=r.dataStartIndex,l=r.dataEndIndex,c=e.layout,f=e.children,d=e.stackOffset,h=Mb(c,a);return n.reduce(function(y,v){var p,m=v.type.defaultProps!==void 0?U(U({},v.type.defaultProps),v.props):v.props,b=m.type,w=m.dataKey,O=m.allowDataOverflow,g=m.allowDuplicatedCategory,_=m.scale,S=m.ticks,A=m.includeHidden,T=m[o];if(y[T])return y;var M=Vu(e.data,{graphicalItems:i.filter(function(W){var G,J=o in W.props?W.props[o]:(G=W.type.defaultProps)===null||G===void 0?void 0:G[o];return J===T}),dataStartIndex:u,dataEndIndex:l}),$=M.length,j,N,C;_5(m.domain,O,b)&&(j=Df(m.domain,null,O),h&&(b==="number"||_!=="auto")&&(C=Wa(M,w,"category")));var I=sx(b);if(!j||j.length===0){var R,L=(R=m.domain)!==null&&R!==void 0?R:I;if(w){if(j=Wa(M,w,b),b==="category"&&h){var F=_T(j);g&&F?(N=j,j=xu(0,$)):g||(j=Kb(L,j,v).reduce(function(W,G){return W.indexOf(G)>=0?W:[].concat(Vi(W),[G])},[]))}else if(b==="category")g?j=j.filter(function(W){return W!==""&&!fe(W)}):j=Kb(L,j,v).reduce(function(W,G){return W.indexOf(G)>=0||G===""||fe(G)?W:[].concat(Vi(W),[G])},[]);else if(b==="number"){var z=RW(M,i.filter(function(W){var G,J,re=o in W.props?W.props[o]:(G=W.type.defaultProps)===null||G===void 0?void 0:G[o],ne="hide"in W.props?W.props.hide:(J=W.type.defaultProps)===null||J===void 0?void 0:J.hide;return re===T&&(A||!ne)}),w,a,c);z&&(j=z)}h&&(b==="number"||_!=="auto")&&(C=Wa(M,w,"category"))}else h?j=xu(0,$):s&&s[T]&&s[T].hasStack&&b==="number"?j=d==="expand"?[0,1]:Wb(s[T].stackGroups,u,l):j=Nb(M,i.filter(function(W){var G=o in W.props?W.props[o]:W.type.defaultProps[o],J="hide"in W.props?W.props.hide:W.type.defaultProps.hide;return G===T&&(A||!J)}),b,c,!0);if(b==="number")j=zd(f,j,T,a,S),L&&(j=Df(L,j,O));else if(b==="category"&&L){var D=L,B=j.every(function(W){return D.indexOf(W)>=0});B&&(j=D)}}return U(U({},y),{},se({},T,U(U({},m),{},{axisType:a,domain:j,categoricalDomain:C,duplicateDomain:N,originalDomain:(p=m.domain)!==null&&p!==void 0?p:I,isCategorical:h,layout:c})))},{})},X5=function(e,r){var n=r.graphicalItems,i=r.Axis,a=r.axisType,o=r.axisIdKey,s=r.stackGroups,u=r.dataStartIndex,l=r.dataEndIndex,c=e.layout,f=e.children,d=Vu(e.data,{graphicalItems:n,dataStartIndex:u,dataEndIndex:l}),h=d.length,y=Mb(c,a),v=-1;return n.reduce(function(p,m){var b=m.type.defaultProps!==void 0?U(U({},m.type.defaultProps),m.props):m.props,w=b[o],O=sx("number");if(!p[w]){v++;var g;return y?g=xu(0,h):s&&s[w]&&s[w].hasStack?(g=Wb(s[w].stackGroups,u,l),g=zd(f,g,w,a)):(g=Df(O,Nb(d,n.filter(function(_){var S,A,T=o in _.props?_.props[o]:(S=_.type.defaultProps)===null||S===void 0?void 0:S[o],M="hide"in _.props?_.props.hide:(A=_.type.defaultProps)===null||A===void 0?void 0:A.hide;return T===w&&!M}),"number",c),i.defaultProps.allowDataOverflow),g=zd(f,g,w,a)),U(U({},p),{},se({},w,U(U({axisType:a},i.defaultProps),{},{hide:!0,orientation:xt(K5,"".concat(a,".").concat(v%2),null),domain:g,originalDomain:O,isCategorical:y,layout:c})))}return p},{})},J5=function(e,r){var n=r.axisType,i=n===void 0?"xAxis":n,a=r.AxisComp,o=r.graphicalItems,s=r.stackGroups,u=r.dataStartIndex,l=r.dataEndIndex,c=e.children,f="".concat(i,"Id"),d=Ot(c,a),h={};return d&&d.length?h=Y5(e,{axes:d,graphicalItems:o,axisType:i,axisIdKey:f,stackGroups:s,dataStartIndex:u,dataEndIndex:l}):o&&o.length&&(h=X5(e,{Axis:a,graphicalItems:o,axisType:i,axisIdKey:f,stackGroups:s,dataStartIndex:u,dataEndIndex:l})),h},Z5=function(e){var r=Ir(e),n=wr(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:jc(n,function(i){return i.coordinate}),tooltipAxis:r,tooltipAxisBandSize:Zs(r,n)}},lx=function(e){var r=e.children,n=e.defaultShowTooltip,i=St(r,ji),a=0,o=0;return e.data&&e.data.length!==0&&(o=e.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(o=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!n}},Q5=function(e){return!e||!e.length?!1:e.some(function(r){var n=fr(r&&r.type);return n&&n.indexOf("Bar")>=0})},cx=function(e){return e==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:e==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:e==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},e4=function(e,r){var n=e.props,i=e.graphicalItems,a=e.xAxisMap,o=a===void 0?{}:a,s=e.yAxisMap,u=s===void 0?{}:s,l=n.width,c=n.height,f=n.children,d=n.margin||{},h=St(f,ji),y=St(f,ln),v=Object.keys(u).reduce(function(g,_){var S=u[_],A=S.orientation;return!S.mirror&&!S.hide?U(U({},g),{},se({},A,g[A]+S.width)):g},{left:d.left||0,right:d.right||0}),p=Object.keys(o).reduce(function(g,_){var S=o[_],A=S.orientation;return!S.mirror&&!S.hide?U(U({},g),{},se({},A,xt(g,"".concat(A))+S.height)):g},{top:d.top||0,bottom:d.bottom||0}),m=U(U({},p),v),b=m.bottom;h&&(m.bottom+=h.props.height||ji.defaultProps.height),y&&r&&(m=MW(m,i,n,r));var w=l-m.left-m.right,O=c-m.top-m.bottom;return U(U({brushBottom:b},m),{},{width:Math.max(w,0),height:Math.max(O,0)})},t4=function(e,r){if(r==="xAxis")return e[r].width;if(r==="yAxis")return e[r].height},_o=function(e){var r=e.chartName,n=e.GraphicalChild,i=e.defaultTooltipEventType,a=i===void 0?"axis":i,o=e.validateTooltipEventTypes,s=o===void 0?["axis"]:o,u=e.axisComponents,l=e.legendContent,c=e.formatAxisMap,f=e.defaultProps,d=function(m,b){var w=b.graphicalItems,O=b.stackGroups,g=b.offset,_=b.updateId,S=b.dataStartIndex,A=b.dataEndIndex,T=m.barSize,M=m.layout,$=m.barGap,j=m.barCategoryGap,N=m.maxBarSize,C=cx(M),I=C.numericAxisName,R=C.cateAxisName,L=Q5(w),F=[];return w.forEach(function(z,D){var B=Vu(m.data,{graphicalItems:[z],dataStartIndex:S,dataEndIndex:A}),W=z.type.defaultProps!==void 0?U(U({},z.type.defaultProps),z.props):z.props,G=W.dataKey,J=W.maxBarSize,re=W["".concat(I,"Id")],ne=W["".concat(R,"Id")],ue={},oe=u.reduce(function(Ar,jt){var So,Ao,Xi=b["".concat(jt.axisType,"Map")],Po=W["".concat(jt.axisType,"Id")];Xi&&Xi[Po]||jt.axisType==="zAxis"||(process.env.NODE_ENV!=="production"?mt(!1,"Specifying a(n) ".concat(jt.axisType,"Id requires a corresponding ").concat(jt.axisType,"Id on the targeted graphical component ").concat((So=z==null||(Ao=z.type)===null||Ao===void 0?void 0:Ao.displayName)!==null&&So!==void 0?So:"")):mt());var Vr=Xi[Po];return U(U({},Ar),{},se(se({},jt.axisType,Vr),"".concat(jt.axisType,"Ticks"),wr(Vr)))},ue),q=oe[R],Y=oe["".concat(R,"Ticks")],te=O&&O[re]&&O[re].hasStack&&VW(z,O[re].stackGroups),k=fr(z.type).indexOf("Bar")>=0,ye=Zs(q,Y),H=[],_e=L&&IW({barSize:T,stackGroups:O,totalSize:t4(oe,R)});if(k){var Ee,Ge,Jt=fe(J)?N:J,Zt=(Ee=(Ge=Zs(q,Y,!0))!==null&&Ge!==void 0?Ge:Jt)!==null&&Ee!==void 0?Ee:0;H=NW({barGap:$,barCategoryGap:j,bandSize:Zt!==ye?Zt:ye,sizeList:_e[ne],maxBarSize:Jt}),Zt!==ye&&(H=H.map(function(Ar){return U(U({},Ar),{},{position:U(U({},Ar.position),{},{offset:Ar.position.offset-Zt/2})})}))}var Yi=z&&z.type&&z.type.getComposedData;Yi&&F.push({props:U(U({},Yi(U(U({},oe),{},{displayedData:B,props:m,dataKey:G,item:z,bandSize:ye,barPosition:H,offset:g,stackedData:te,layout:M,dataStartIndex:S,dataEndIndex:A}))),{},se(se(se({key:z.key||"item-".concat(D)},I,oe[I]),R,oe[R]),"animationId",_)),childIndex:IT(z,m.children),item:z})}),F},h=function(m,b){var w=m.props,O=m.dataStartIndex,g=m.dataEndIndex,_=m.updateId;if(!Pv({props:w}))return null;var S=w.children,A=w.layout,T=w.stackOffset,M=w.data,$=w.reverseStackOrder,j=cx(A),N=j.numericAxisName,C=j.cateAxisName,I=Ot(S,n),R=zW(M,I,"".concat(N,"Id"),"".concat(C,"Id"),T,$),L=u.reduce(function(W,G){var J="".concat(G.axisType,"Map");return U(U({},W),{},se({},J,J5(w,U(U({},G),{},{graphicalItems:I,stackGroups:G.axisType===N&&R,dataStartIndex:O,dataEndIndex:g}))))},{}),F=e4(U(U({},L),{},{props:w,graphicalItems:I}),b==null?void 0:b.legendBBox);Object.keys(L).forEach(function(W){L[W]=c(w,L[W],F,W.replace("Map",""),r)});var z=L["".concat(C,"Map")],D=Z5(z),B=d(w,U(U({},L),{},{dataStartIndex:O,dataEndIndex:g,updateId:_,graphicalItems:I,stackGroups:R,offset:F}));return U(U({formattedGraphicalItems:B,graphicalItems:I,offset:F,stackGroups:R},D),L)},y=function(p){function m(b){var w,O,g;return N5(this,m),g=R5(this,m,[b]),se(g,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),se(g,"accessibilityManager",new w5),se(g,"handleLegendBBoxUpdate",function(_){if(_){var S=g.state,A=S.dataStartIndex,T=S.dataEndIndex,M=S.updateId;g.setState(U({legendBBox:_},h({props:g.props,dataStartIndex:A,dataEndIndex:T,updateId:M},U(U({},g.state),{},{legendBBox:_}))))}}),se(g,"handleReceiveSyncEvent",function(_,S,A){if(g.props.syncId===_){if(A===g.eventEmitterSymbol&&typeof g.props.syncMethod!="function")return;g.applySyncEvent(S)}}),se(g,"handleBrushChange",function(_){var S=_.startIndex,A=_.endIndex;if(S!==g.state.dataStartIndex||A!==g.state.dataEndIndex){var T=g.state.updateId;g.setState(function(){return U({dataStartIndex:S,dataEndIndex:A},h({props:g.props,dataStartIndex:S,dataEndIndex:A,updateId:T},g.state))}),g.triggerSyncEvent({dataStartIndex:S,dataEndIndex:A})}}),se(g,"handleMouseEnter",function(_){var S=g.getMouseInfo(_);if(S){var A=U(U({},S),{},{isTooltipActive:!0});g.setState(A),g.triggerSyncEvent(A);var T=g.props.onMouseEnter;ae(T)&&T(A,_)}}),se(g,"triggeredAfterMouseMove",function(_){var S=g.getMouseInfo(_),A=S?U(U({},S),{},{isTooltipActive:!0}):{isTooltipActive:!1};g.setState(A),g.triggerSyncEvent(A);var T=g.props.onMouseMove;ae(T)&&T(A,_)}),se(g,"handleItemMouseEnter",function(_){g.setState(function(){return{isTooltipActive:!0,activeItem:_,activePayload:_.tooltipPayload,activeCoordinate:_.tooltipPosition||{x:_.cx,y:_.cy}}})}),se(g,"handleItemMouseLeave",function(){g.setState(function(){return{isTooltipActive:!1}})}),se(g,"handleMouseMove",function(_){_.persist(),g.throttleTriggeredAfterMouseMove(_)}),se(g,"handleMouseLeave",function(_){g.throttleTriggeredAfterMouseMove.cancel();var S={isTooltipActive:!1};g.setState(S),g.triggerSyncEvent(S);var A=g.props.onMouseLeave;ae(A)&&A(S,_)}),se(g,"handleOuterEvent",function(_){var S=CT(_),A=xt(g.props,"".concat(S));if(S&&ae(A)){var T,M;/.*touch.*/i.test(S)?M=g.getMouseInfo(_.changedTouches[0]):M=g.getMouseInfo(_),A((T=M)!==null&&T!==void 0?T:{},_)}}),se(g,"handleClick",function(_){var S=g.getMouseInfo(_);if(S){var A=U(U({},S),{},{isTooltipActive:!0});g.setState(A),g.triggerSyncEvent(A);var T=g.props.onClick;ae(T)&&T(A,_)}}),se(g,"handleMouseDown",function(_){var S=g.props.onMouseDown;if(ae(S)){var A=g.getMouseInfo(_);S(A,_)}}),se(g,"handleMouseUp",function(_){var S=g.props.onMouseUp;if(ae(S)){var A=g.getMouseInfo(_);S(A,_)}}),se(g,"handleTouchMove",function(_){_.changedTouches!=null&&_.changedTouches.length>0&&g.throttleTriggeredAfterMouseMove(_.changedTouches[0])}),se(g,"handleTouchStart",function(_){_.changedTouches!=null&&_.changedTouches.length>0&&g.handleMouseDown(_.changedTouches[0])}),se(g,"handleTouchEnd",function(_){_.changedTouches!=null&&_.changedTouches.length>0&&g.handleMouseUp(_.changedTouches[0])}),se(g,"handleDoubleClick",function(_){var S=g.props.onDoubleClick;if(ae(S)){var A=g.getMouseInfo(_);S(A,_)}}),se(g,"handleContextMenu",function(_){var S=g.props.onContextMenu;if(ae(S)){var A=g.getMouseInfo(_);S(A,_)}}),se(g,"triggerSyncEvent",function(_){g.props.syncId!==void 0&&Kd.emit(Vd,g.props.syncId,_,g.eventEmitterSymbol)}),se(g,"applySyncEvent",function(_){var S=g.props,A=S.layout,T=S.syncMethod,M=g.state.updateId,$=_.dataStartIndex,j=_.dataEndIndex;if(_.dataStartIndex!==void 0||_.dataEndIndex!==void 0)g.setState(U({dataStartIndex:$,dataEndIndex:j},h({props:g.props,dataStartIndex:$,dataEndIndex:j,updateId:M},g.state)));else if(_.activeTooltipIndex!==void 0){var N=_.chartX,C=_.chartY,I=_.activeTooltipIndex,R=g.state,L=R.offset,F=R.tooltipTicks;if(!L)return;if(typeof T=="function")I=T(F,_);else if(T==="value"){I=-1;for(var z=0;z<F.length;z++)if(F[z].value===_.activeLabel){I=z;break}}var D=U(U({},L),{},{x:L.left,y:L.top}),B=Math.min(N,D.x+D.width),W=Math.min(C,D.y+D.height),G=F[I]&&F[I].value,J=Xd(g.state,g.props.data,I),re=F[I]?{x:A==="horizontal"?F[I].coordinate:B,y:A==="horizontal"?W:F[I].coordinate}:ox;g.setState(U(U({},_),{},{activeLabel:G,activeCoordinate:re,activePayload:J,activeTooltipIndex:I}))}else g.setState(_)}),se(g,"renderCursor",function(_){var S,A=g.state,T=A.isTooltipActive,M=A.activeCoordinate,$=A.activePayload,j=A.offset,N=A.activeTooltipIndex,C=A.tooltipAxisBandSize,I=g.getTooltipEventType(),R=(S=_.props.active)!==null&&S!==void 0?S:T,L=g.props.layout,F=_.key||"_recharts-cursor";return x.createElement(E5,{key:F,activeCoordinate:M,activePayload:$,activeTooltipIndex:N,chartName:r,element:_,isActive:R,layout:L,offset:j,tooltipAxisBandSize:C,tooltipEventType:I})}),se(g,"renderPolarAxis",function(_,S,A){var T=xt(_,"type.axisType"),M=xt(g.state,"".concat(T,"Map")),$=_.type.defaultProps,j=$!==void 0?U(U({},$),_.props):_.props,N=M&&M[j["".concat(T,"Id")]];return x.cloneElement(_,U(U({},N),{},{className:le(T,N.className),key:_.key||"".concat(S,"-").concat(A),ticks:wr(N,!0)}))}),se(g,"renderPolarGrid",function(_){var S=_.props,A=S.radialLines,T=S.polarAngles,M=S.polarRadius,$=g.state,j=$.radiusAxisMap,N=$.angleAxisMap,C=Ir(j),I=Ir(N),R=I.cx,L=I.cy,F=I.innerRadius,z=I.outerRadius;return x.cloneElement(_,{polarAngles:Array.isArray(T)?T:wr(I,!0).map(function(D){return D.coordinate}),polarRadius:Array.isArray(M)?M:wr(C,!0).map(function(D){return D.coordinate}),cx:R,cy:L,innerRadius:F,outerRadius:z,key:_.key||"polar-grid",radialLines:A})}),se(g,"renderLegend",function(){var _=g.state.formattedGraphicalItems,S=g.props,A=S.children,T=S.width,M=S.height,$=g.props.margin||{},j=T-($.left||0)-($.right||0),N=$b({children:A,formattedGraphicalItems:_,legendWidth:j,legendContent:l});if(!N)return null;var C=N.item,I=tx(N,T5);return x.cloneElement(C,U(U({},I),{},{chartWidth:T,chartHeight:M,margin:$,onBBoxUpdate:g.handleLegendBBoxUpdate}))}),se(g,"renderTooltip",function(){var _,S=g.props,A=S.children,T=S.accessibilityLayer,M=St(A,tr);if(!M)return null;var $=g.state,j=$.isTooltipActive,N=$.activeCoordinate,C=$.activePayload,I=$.activeLabel,R=$.offset,L=(_=M.props.active)!==null&&_!==void 0?_:j;return x.cloneElement(M,{viewBox:U(U({},R),{},{x:R.left,y:R.top}),active:L,label:I,payload:L?C:[],coordinate:N,accessibilityLayer:T})}),se(g,"renderBrush",function(_){var S=g.props,A=S.margin,T=S.data,M=g.state,$=M.offset,j=M.dataStartIndex,N=M.dataEndIndex,C=M.updateId;return x.cloneElement(_,{key:_.key||"_recharts-brush",onChange:Xs(g.handleBrushChange,_.props.onChange),data:T,x:V(_.props.x)?_.props.x:$.left,y:V(_.props.y)?_.props.y:$.top+$.height+$.brushBottom-(A.bottom||0),width:V(_.props.width)?_.props.width:$.width,startIndex:j,endIndex:N,updateId:"brush-".concat(C)})}),se(g,"renderReferenceElement",function(_,S,A){if(!_)return null;var T=g,M=T.clipPathId,$=g.state,j=$.xAxisMap,N=$.yAxisMap,C=$.offset,I=_.type.defaultProps||{},R=_.props,L=R.xAxisId,F=L===void 0?I.xAxisId:L,z=R.yAxisId,D=z===void 0?I.yAxisId:z;return x.cloneElement(_,{key:_.key||"".concat(S,"-").concat(A),xAxis:j[F],yAxis:N[D],viewBox:{x:C.left,y:C.top,width:C.width,height:C.height},clipPathId:M})}),se(g,"renderActivePoints",function(_){var S=_.item,A=_.activePoint,T=_.basePoint,M=_.childIndex,$=_.isRange,j=[],N=S.props.key,C=S.item.type.defaultProps!==void 0?U(U({},S.item.type.defaultProps),S.item.props):S.item.props,I=C.activeDot,R=C.dataKey,L=U(U({index:M,dataKey:R,cx:A.x,cy:A.y,r:4,fill:Nf(S.item),strokeWidth:2,stroke:"#fff",payload:A.payload,value:A.value},Q(I,!1)),Jo(I));return j.push(m.renderActiveDot(I,L,"".concat(N,"-activePoint-").concat(M))),T?j.push(m.renderActiveDot(I,U(U({},L),{},{cx:T.x,cy:T.y}),"".concat(N,"-basePoint-").concat(M))):$&&j.push(null),j}),se(g,"renderGraphicChild",function(_,S,A){var T=g.filterFormatItem(_,S,A);if(!T)return null;var M=g.getTooltipEventType(),$=g.state,j=$.isTooltipActive,N=$.tooltipAxis,C=$.activeTooltipIndex,I=$.activeLabel,R=g.props.children,L=St(R,tr),F=T.props,z=F.points,D=F.isRange,B=F.baseLine,W=T.item.type.defaultProps!==void 0?U(U({},T.item.type.defaultProps),T.item.props):T.item.props,G=W.activeDot,J=W.hide,re=W.activeBar,ne=W.activeShape,ue=!!(!J&&j&&L&&(G||re||ne)),oe={};M!=="axis"&&L&&L.props.trigger==="click"?oe={onClick:Xs(g.handleItemMouseEnter,_.props.onClick)}:M!=="axis"&&(oe={onMouseLeave:Xs(g.handleItemMouseLeave,_.props.onMouseLeave),onMouseEnter:Xs(g.handleItemMouseEnter,_.props.onMouseEnter)});var q=x.cloneElement(_,U(U({},T.props),oe));function Y(jt){return typeof N.dataKey=="function"?N.dataKey(jt.payload):null}if(ue)if(C>=0){var te,k;if(N.dataKey&&!N.allowDuplicatedCategory){var ye=typeof N.dataKey=="function"?Y:"payload.".concat(N.dataKey.toString());te=Xo(z,ye,I),k=D&&B&&Xo(B,ye,I)}else te=z==null?void 0:z[C],k=D&&B&&B[C];if(ne||re){var H=_.props.activeIndex!==void 0?_.props.activeIndex:C;return[x.cloneElement(_,U(U(U({},T.props),oe),{},{activeIndex:H})),null,null]}if(!fe(te))return[q].concat(Vi(g.renderActivePoints({item:T,activePoint:te,basePoint:k,childIndex:C,isRange:D})))}else{var _e,Ee=(_e=g.getItemByXY(g.state.activeCoordinate))!==null&&_e!==void 0?_e:{graphicalItem:q},Ge=Ee.graphicalItem,Jt=Ge.item,Zt=Jt===void 0?_:Jt,Yi=Ge.childIndex,Ar=U(U(U({},T.props),oe),{},{activeIndex:Yi});return[x.cloneElement(Zt,Ar),null,null]}return D?[q,null,null]:[q,null]}),se(g,"renderCustomized",function(_,S,A){return x.cloneElement(_,U(U({key:"recharts-customized-".concat(A)},g.props),g.state))}),se(g,"renderMap",{CartesianGrid:{handler:Ku,once:!0},ReferenceArea:{handler:g.renderReferenceElement},ReferenceLine:{handler:Ku},ReferenceDot:{handler:g.renderReferenceElement},XAxis:{handler:Ku},YAxis:{handler:Ku},Brush:{handler:g.renderBrush,once:!0},Bar:{handler:g.renderGraphicChild},Line:{handler:g.renderGraphicChild},Area:{handler:g.renderGraphicChild},Radar:{handler:g.renderGraphicChild},RadialBar:{handler:g.renderGraphicChild},Scatter:{handler:g.renderGraphicChild},Pie:{handler:g.renderGraphicChild},Funnel:{handler:g.renderGraphicChild},Tooltip:{handler:g.renderCursor,once:!0},PolarGrid:{handler:g.renderPolarGrid,once:!0},PolarAngleAxis:{handler:g.renderPolarAxis},PolarRadiusAxis:{handler:g.renderPolarAxis},Customized:{handler:g.renderCustomized}}),g.clipPathId="".concat((w=b.id)!==null&&w!==void 0?w:an("recharts"),"-clip"),g.throttleTriggeredAfterMouseMove=Pg(g.triggeredAfterMouseMove,(O=b.throttleDelay)!==null&&O!==void 0?O:1e3/60),g.state={},g}return U5(m,p),D5(m,[{key:"componentDidMount",value:function(){var w,O;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(w=this.props.margin.left)!==null&&w!==void 0?w:0,top:(O=this.props.margin.top)!==null&&O!==void 0?O:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var w=this.props,O=w.children,g=w.data,_=w.height,S=w.layout,A=St(O,tr);if(A){var T=A.props.defaultIndex;if(!(typeof T!="number"||T<0||T>this.state.tooltipTicks.length-1)){var M=this.state.tooltipTicks[T]&&this.state.tooltipTicks[T].value,$=Xd(this.state,g,T,M),j=this.state.tooltipTicks[T].coordinate,N=(this.state.offset.top+_)/2,C=S==="horizontal",I=C?{x:j,y:N}:{y:j,x:N},R=this.state.formattedGraphicalItems.find(function(F){var z=F.item;return z.type.name==="Scatter"});R&&(I=U(U({},I),R.props.points[T].tooltipPosition),$=R.props.points[T].tooltipPayload);var L={activeTooltipIndex:T,isTooltipActive:!0,activeLabel:M,activePayload:$,activeCoordinate:I};this.setState(L),this.renderCursor(A),this.accessibilityManager.setIndex(T)}}}},{key:"getSnapshotBeforeUpdate",value:function(w,O){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==O.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 g,_;this.accessibilityManager.setDetails({offset:{left:(g=this.props.margin.left)!==null&&g!==void 0?g:0,top:(_=this.props.margin.top)!==null&&_!==void 0?_:0}})}return null}},{key:"componentDidUpdate",value:function(w){Hl([St(w.children,tr)],[St(this.props.children,tr)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var w=St(this.props.children,tr);if(w&&typeof w.props.shared=="boolean"){var O=w.props.shared?"axis":"item";return s.indexOf(O)>=0?O:a}return a}},{key:"getMouseInfo",value:function(w){if(!this.container)return null;var O=this.container,g=O.getBoundingClientRect(),_=s2(g),S={chartX:Math.round(w.pageX-_.left),chartY:Math.round(w.pageY-_.top)},A=g.width/O.offsetWidth||1,T=this.inRange(S.chartX,S.chartY,A);if(!T)return null;var M=this.state,$=M.xAxisMap,j=M.yAxisMap,N=this.getTooltipEventType(),C=ux(this.state,this.props.data,this.props.layout,T);if(N!=="axis"&&$&&j){var I=Ir($).scale,R=Ir(j).scale,L=I&&I.invert?I.invert(S.chartX):null,F=R&&R.invert?R.invert(S.chartY):null;return U(U({},S),{},{xValue:L,yValue:F},C)}return C?U(U({},S),C):null}},{key:"inRange",value:function(w,O){var g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,_=this.props.layout,S=w/g,A=O/g;if(_==="horizontal"||_==="vertical"){var T=this.state.offset,M=S>=T.left&&S<=T.left+T.width&&A>=T.top&&A<=T.top+T.height;return M?{x:S,y:A}:null}var $=this.state,j=$.angleAxisMap,N=$.radiusAxisMap;if(j&&N){var C=Ir(j);return Zb({x:S,y:A},C)}return null}},{key:"parseEventsOfWrapper",value:function(){var w=this.props.children,O=this.getTooltipEventType(),g=St(w,tr),_={};g&&O==="axis"&&(g.props.trigger==="click"?_={onClick:this.handleClick}:_={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=Jo(this.props,this.handleOuterEvent);return U(U({},S),_)}},{key:"addListener",value:function(){Kd.on(Vd,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){Kd.removeListener(Vd,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(w,O,g){for(var _=this.state.formattedGraphicalItems,S=0,A=_.length;S<A;S++){var T=_[S];if(T.item===w||T.props.key===w.key||O===fr(T.item.type)&&g===T.childIndex)return T}return null}},{key:"renderClipPath",value:function(){var w=this.clipPathId,O=this.state.offset,g=O.left,_=O.top,S=O.height,A=O.width;return x.createElement("defs",null,x.createElement("clipPath",{id:w},x.createElement("rect",{x:g,y:_,height:S,width:A})))}},{key:"getXScales",value:function(){var w=this.state.xAxisMap;return w?Object.entries(w).reduce(function(O,g){var _=ex(g,2),S=_[0],A=_[1];return U(U({},O),{},se({},S,A.scale))},{}):null}},{key:"getYScales",value:function(){var w=this.state.yAxisMap;return w?Object.entries(w).reduce(function(O,g){var _=ex(g,2),S=_[0],A=_[1];return U(U({},O),{},se({},S,A.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(w){var O;return(O=this.state.xAxisMap)===null||O===void 0||(O=O[w])===null||O===void 0?void 0:O.scale}},{key:"getYScaleByAxisId",value:function(w){var O;return(O=this.state.yAxisMap)===null||O===void 0||(O=O[w])===null||O===void 0?void 0:O.scale}},{key:"getItemByXY",value:function(w){var O=this.state,g=O.formattedGraphicalItems,_=O.activeItem;if(g&&g.length)for(var S=0,A=g.length;S<A;S++){var T=g[S],M=T.props,$=T.item,j=$.type.defaultProps!==void 0?U(U({},$.type.defaultProps),$.props):$.props,N=fr($.type);if(N==="Bar"){var C=(M.data||[]).find(function(F){return K3(w,F)});if(C)return{graphicalItem:T,payload:C}}else if(N==="RadialBar"){var I=(M.data||[]).find(function(F){return Zb(w,F)});if(I)return{graphicalItem:T,payload:I}}else if(yu(T,_)||gu(T,_)||co(T,_)){var R=qV({graphicalItem:T,activeTooltipItem:_,itemData:j.data}),L=j.activeIndex===void 0?R:j.activeIndex;return{graphicalItem:U(U({},T),{},{childIndex:L}),payload:co(T,_)?j.data[R]:T.props.data[R]}}}return null}},{key:"render",value:function(){var w=this;if(!Pv(this))return null;var O=this.props,g=O.children,_=O.className,S=O.width,A=O.height,T=O.style,M=O.compact,$=O.title,j=O.desc,N=tx(O,j5),C=Q(N,!1);if(M)return x.createElement(o_,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},x.createElement(Yl,Ki({},C,{width:S,height:A,title:$,desc:j}),this.renderClipPath(),jv(g,this.renderMap)));if(this.props.accessibilityLayer){var I,R;C.tabIndex=(I=this.props.tabIndex)!==null&&I!==void 0?I:0,C.role=(R=this.props.role)!==null&&R!==void 0?R:"application",C.onKeyDown=function(F){w.accessibilityManager.keyboardEvent(F)},C.onFocus=function(){w.accessibilityManager.focus()}}var L=this.parseEventsOfWrapper();return x.createElement(o_,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},x.createElement("div",Ki({className:le("recharts-wrapper",_),style:U({position:"relative",cursor:"default",width:S,height:A},T)},L,{ref:function(z){w.container=z}}),x.createElement(Yl,Ki({},C,{width:S,height:A,title:$,desc:j,style:V5}),this.renderClipPath(),jv(g,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(x.Component);se(y,"displayName",r),se(y,"defaultProps",U({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},f)),se(y,"getDerivedStateFromProps",function(p,m){var b=p.dataKey,w=p.data,O=p.children,g=p.width,_=p.height,S=p.layout,A=p.stackOffset,T=p.margin,M=m.dataStartIndex,$=m.dataEndIndex;if(m.updateId===void 0){var j=lx(p);return U(U(U({},j),{},{updateId:0},h(U(U({props:p},j),{},{updateId:0}),m)),{},{prevDataKey:b,prevData:w,prevWidth:g,prevHeight:_,prevLayout:S,prevStackOffset:A,prevMargin:T,prevChildren:O})}if(b!==m.prevDataKey||w!==m.prevData||g!==m.prevWidth||_!==m.prevHeight||S!==m.prevLayout||A!==m.prevStackOffset||!Jn(T,m.prevMargin)){var N=lx(p),C={chartX:m.chartX,chartY:m.chartY,isTooltipActive:m.isTooltipActive},I=U(U({},ux(m,w,S)),{},{updateId:m.updateId+1}),R=U(U(U({},N),C),I);return U(U(U({},R),h(U({props:p},R),m)),{},{prevDataKey:b,prevData:w,prevWidth:g,prevHeight:_,prevLayout:S,prevStackOffset:A,prevMargin:T,prevChildren:O})}if(!Hl(O,m.prevChildren)){var L,F,z,D,B=St(O,ji),W=B&&(L=(F=B.props)===null||F===void 0?void 0:F.startIndex)!==null&&L!==void 0?L:M,G=B&&(z=(D=B.props)===null||D===void 0?void 0:D.endIndex)!==null&&z!==void 0?z:$,J=W!==M||G!==$,re=!fe(w),ne=re&&!J?m.updateId:m.updateId+1;return U(U({updateId:ne},h(U(U({props:p},m),{},{updateId:ne,dataStartIndex:W,dataEndIndex:G}),m)),{},{prevChildren:O,dataStartIndex:W,dataEndIndex:G})}return null}),se(y,"renderActiveDot",function(p,m,b){var w;return x.isValidElement(p)?w=x.cloneElement(p,m):ae(p)?w=p(m):w=x.createElement(wi,m),x.createElement(pe,{className:"recharts-active-dot",key:b},w)});var v=x.forwardRef(function(m,b){return x.createElement(y,Ki({},m,{ref:b}))});return v.displayName=y.displayName,v},r4=_o({chartName:"LineChart",GraphicalChild:mo,axisComponents:[{axisType:"xAxis",AxisComp:zr},{axisType:"yAxis",AxisComp:Kr}],formatAxisMap:md}),n4=_o({chartName:"BarChart",GraphicalChild:An,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:zr},{axisType:"yAxis",AxisComp:Kr}],formatAxisMap:md}),i4=_o({chartName:"PieChart",GraphicalChild:Or,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:Si},{axisType:"radiusAxis",AxisComp:xi}],formatAxisMap:Jb,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),a4=_o({chartName:"RadarChart",GraphicalChild:fo,axisComponents:[{axisType:"angleAxis",AxisComp:Si},{axisType:"radiusAxis",AxisComp:xi}],formatAxisMap:Jb,defaultProps:{layout:"centric",startAngle:90,endAngle:-270,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),o4=_o({chartName:"AreaChart",GraphicalChild:qr,axisComponents:[{axisType:"xAxis",AxisComp:zr},{axisType:"yAxis",AxisComp:Kr}],formatAxisMap:md});const s4={light:"",dark:".dark"},fx=ve.createContext(null);function dx(){const t=ve.useContext(fx);if(!t)throw new Error("useChart must be used within a <ChartContainer />");return t}const Hi=ve.forwardRef(({id:t,className:e,children:r,config:n,...i},a)=>{const o=ve.useId(),s=`chart-${t||o.replace(/:/g,"")}`;return E.jsx(fx.Provider,{value:{config:n},children:E.jsxs("div",{"data-chart":s,ref:a,className:it("flex w-full h-full justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none",e),...i,children:[E.jsx(u4,{id:s,config:n}),E.jsx(e2,{children:r})]})})});Hi.displayName="Chart";const u4=({id:t,config:e})=>{const r=Object.entries(e).filter(([n,i])=>i.theme||i.color);return r.length?E.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(s4).map(([n,i])=>`
|
|
163
|
+
the props "valueKey" will be deprecated in 1.1.0`),m=f);var b=i.filter(function(A){return We(A,m,0)!==0}).length,w=(p>=360?b:b-1)*u,O=p-b*h-w,g=i.reduce(function(A,E){var N=We(E,m,0);return A+(V(N)?N:0)},0),_;if(g>0){var S;_=i.map(function(A,E){var N=We(A,m,0),j=We(A,c,E),$=(V(N)?N:0)/g,k;E?k=S.endAngle+ft(v)*u*(N!==0?1:0):k=o;var I=k+ft(v)*((N!==0?h:0)+$*O),R=(k+I)/2,M=(y.innerRadius+y.outerRadius)/2,L=[{name:j,value:N,payload:A,dataKey:m,type:d}],q=we(y.cx,y.cy,M,R);return S=Me(Me(Me({percent:$,cornerRadius:a,name:j,tooltipPayload:L,midAngle:R,middleRadius:M,tooltipPosition:q},A),y),{},{value:We(A,m),startAngle:k,endAngle:I,payload:A,paddingAngle:ft(v)*u}),S})}return Me(Me({},y),{},{sectors:_,data:i})});function XV(t){return t&&t.length?t[0]:void 0}var JV=XV,ZV=JV;const QV=je(ZV);var eH=["key"];function Ei(t){"@babel/helpers - typeof";return Ei=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ei(t)}function tH(t,e){if(t==null)return{};var r=rH(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function rH(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function bu(){return bu=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},bu.apply(this,arguments)}function Pw(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function pt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Pw(Object(r),!0).forEach(function(n){Sr(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Pw(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function nH(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ew(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,jw(n.key),n)}}function iH(t,e,r){return e&&Ew(t.prototype,e),r&&Ew(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function aH(t,e,r){return e=wu(e),oH(t,Tw()?Reflect.construct(e,r||[],wu(t).constructor):e.apply(t,r))}function oH(t,e){if(e&&(Ei(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return sH(t)}function sH(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Tw(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Tw=function(){return!!t})()}function wu(t){return wu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},wu(t)}function uH(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&fd(t,e)}function fd(t,e){return fd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},fd(t,e)}function Sr(t,e,r){return e=jw(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function jw(t){var e=lH(t,"string");return Ei(e)=="symbol"?e:e+""}function lH(t,e){if(Ei(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Ei(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var fo=function(t){function e(){var r;nH(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=aH(this,e,[].concat(i)),Sr(r,"state",{isAnimationFinished:!1}),Sr(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),ae(o)&&o()}),Sr(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),ae(o)&&o()}),Sr(r,"handleMouseEnter",function(o){var s=r.props.onMouseEnter;s&&s(r.props,o)}),Sr(r,"handleMouseLeave",function(o){var s=r.props.onMouseLeave;s&&s(r.props,o)}),r}return uH(e,t),iH(e,[{key:"renderDots",value:function(n){var i=this.props,a=i.dot,o=i.dataKey,s=Q(this.props,!1),u=Q(a,!0),l=n.map(function(c,f){var d=pt(pt(pt({key:"dot-".concat(f),r:3},s),u),{},{dataKey:o,cx:c.x,cy:c.y,index:f,payload:c});return e.renderDotItem(a,d)});return x.createElement(pe,{className:"recharts-radar-dots"},l)}},{key:"renderPolygonStatically",value:function(n){var i=this.props,a=i.shape,o=i.dot,s=i.isRange,u=i.baseLinePoints,l=i.connectNulls,c;return x.isValidElement(a)?c=x.cloneElement(a,pt(pt({},this.props),{},{points:n})):ae(a)?c=a(pt(pt({},this.props),{},{points:n})):c=x.createElement(ew,bu({},Q(this.props,!0),{onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,points:n,baseLinePoints:s?u:null,connectNulls:l})),x.createElement(pe,{className:"recharts-radar-polygon"},c,o?this.renderDots(n):null)}},{key:"renderPolygonWithAnimation",value:function(){var n=this,i=this.props,a=i.points,o=i.isAnimationActive,s=i.animationBegin,u=i.animationDuration,l=i.animationEasing,c=i.animationId,f=this.state.prevPoints;return x.createElement(Rt,{begin:s,duration:u,isActive:o,easing:l,from:{t:0},to:{t:1},key:"radar-".concat(c),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(d){var h=d.t,y=f&&f.length/a.length,v=a.map(function(p,m){var b=f&&f[Math.floor(m*y)];if(b){var w=Fe(b.x,p.x),O=Fe(b.y,p.y);return pt(pt({},p),{},{x:w(h),y:O(h)})}var g=Fe(p.cx,p.x),_=Fe(p.cy,p.y);return pt(pt({},p),{},{x:g(h),y:_(h)})});return n.renderPolygonStatically(v)})}},{key:"renderPolygon",value:function(){var n=this.props,i=n.points,a=n.isAnimationActive,o=n.isRange,s=this.state.prevPoints;return a&&i&&i.length&&!o&&(!s||!Rr(s,i))?this.renderPolygonWithAnimation():this.renderPolygonStatically(i)}},{key:"render",value:function(){var n=this.props,i=n.hide,a=n.className,o=n.points,s=n.isAnimationActive;if(i||!o||!o.length)return null;var u=this.state.isAnimationFinished,l=le("recharts-radar",a);return x.createElement(pe,{className:l},this.renderPolygon(),(!s||u)&&Ht.renderCallByParent(this.props,o))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:i.curPoints}:n.points!==i.curPoints?{curPoints:n.points}:null}},{key:"renderDotItem",value:function(n,i){var a;if(x.isValidElement(n))a=x.cloneElement(n,i);else if(ae(n))a=n(i);else{var o=i.key,s=tH(i,eH);a=x.createElement(wi,bu({},s,{key:o,className:le("recharts-radar-dot",typeof n!="boolean"?n.className:"")}))}return a}}])}(x.PureComponent);Sr(fo,"displayName","Radar"),Sr(fo,"defaultProps",{angleAxisId:0,radiusAxisId:0,hide:!1,activeDot:!0,dot:!1,legendType:"rect",isAnimationActive:!It.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"}),Sr(fo,"getComposedData",function(t){var e=t.radiusAxis,r=t.angleAxis,n=t.displayedData,i=t.dataKey,a=t.bandSize,o=r.cx,s=r.cy,u=!1,l=[],c=r.type!=="number"?a??0:0;n.forEach(function(d,h){var y=We(d,r.dataKey,h),v=We(d,i),p=r.scale(y)+c,m=Array.isArray(v)?t0(v):v,b=fe(m)?void 0:e.scale(m);Array.isArray(v)&&v.length>=2&&(u=!0),l.push(pt(pt({},we(o,s,b,p)),{},{name:y,value:v,cx:o,cy:s,radius:b,angle:p,payload:d}))});var f=[];return u&&l.forEach(function(d){if(Array.isArray(d.value)){var h=QV(d.value),y=fe(h)?void 0:e.scale(h);f.push(pt(pt({},d),{},{radius:y},we(o,s,y,d.angle)))}else f.push(d)}),{points:l,isRange:u,baseLinePoints:f}});var cH=Math.ceil,fH=Math.max;function dH(t,e,r,n){for(var i=-1,a=fH(cH((e-t)/(r||1)),0),o=Array(a);a--;)o[n?a:++i]=t,t+=r;return o}var hH=dH,pH=Og,$w=1/0,vH=17976931348623157e292;function yH(t){if(!t)return t===0?t:0;if(t=pH(t),t===$w||t===-$w){var e=t<0?-1:1;return e*vH}return t===t?t:0}var kw=yH,gH=hH,mH=vs,dd=kw;function bH(t){return function(e,r,n){return n&&typeof n!="number"&&mH(e,r,n)&&(r=n=void 0),e=dd(e),r===void 0?(r=e,e=0):r=dd(r),n=n===void 0?e<r?1:-1:dd(n),gH(e,r,n,t)}}var wH=bH,_H=wH,xH=_H(),OH=xH;const _u=je(OH);function ho(t){"@babel/helpers - typeof";return ho=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ho(t)}function Cw(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Iw(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Cw(Object(r),!0).forEach(function(n){Nw(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Cw(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Nw(t,e,r){return e=SH(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function SH(t){var e=AH(t,"string");return ho(e)=="symbol"?e:e+""}function AH(t,e){if(ho(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(ho(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var PH=["Webkit","Moz","O","ms"],EH=function(e,r){var n=e.replace(/(\w)/,function(a){return a.toUpperCase()}),i=PH.reduce(function(a,o){return Iw(Iw({},a),{},Nw({},o+n,r))},{});return i[e]=r,i};function Ti(t){"@babel/helpers - typeof";return Ti=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ti(t)}function xu(){return xu=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},xu.apply(this,arguments)}function Mw(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function hd(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Mw(Object(r),!0).forEach(function(n){Pt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Mw(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function TH(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Dw(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Lw(n.key),n)}}function jH(t,e,r){return e&&Dw(t.prototype,e),r&&Dw(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function $H(t,e,r){return e=Ou(e),kH(t,Rw()?Reflect.construct(e,r||[],Ou(t).constructor):e.apply(t,r))}function kH(t,e){if(e&&(Ti(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return CH(t)}function CH(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Rw(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Rw=function(){return!!t})()}function Ou(t){return Ou=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ou(t)}function IH(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&pd(t,e)}function pd(t,e){return pd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},pd(t,e)}function Pt(t,e,r){return e=Lw(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Lw(t){var e=NH(t,"string");return Ti(e)=="symbol"?e:e+""}function NH(t,e){if(Ti(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Ti(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var MH=function(e){var r=e.data,n=e.startIndex,i=e.endIndex,a=e.x,o=e.width,s=e.travellerWidth;if(!r||!r.length)return{};var u=r.length,l=Pa().domain(_u(0,u)).range([a,a+o-s]),c=l.domain().map(function(f){return l(f)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:l(n),endX:l(i),scale:l,scaleValues:c}},Bw=function(e){return e.changedTouches&&!!e.changedTouches.length},ji=function(t){function e(r){var n;return TH(this,e),n=$H(this,e,[r]),Pt(n,"handleDrag",function(i){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(i):n.state.isSlideMoving&&n.handleSlideDrag(i)}),Pt(n,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&n.handleDrag(i.changedTouches[0])}),Pt(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=n.props,a=i.endIndex,o=i.onDragEnd,s=i.startIndex;o==null||o({endIndex:a,startIndex:s})}),n.detachDragEndListener()}),Pt(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),Pt(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),Pt(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),Pt(n,"handleSlideDragStart",function(i){var a=Bw(i)?i.changedTouches[0]:i;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return IH(e,t),jH(e,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var i=n.startX,a=n.endX,o=this.state.scaleValues,s=this.props,u=s.gap,l=s.data,c=l.length-1,f=Math.min(i,a),d=Math.max(i,a),h=e.getIndexInRange(o,f),y=e.getIndexInRange(o,d);return{startIndex:h-h%u,endIndex:y===c?c:y-y%u}}},{key:"getTextOfTick",value:function(n){var i=this.props,a=i.data,o=i.tickFormatter,s=i.dataKey,u=We(a[n],s,n);return ae(o)?o(u,n):u}},{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 i=this.state,a=i.slideMoveStartX,o=i.startX,s=i.endX,u=this.props,l=u.x,c=u.width,f=u.travellerWidth,d=u.startIndex,h=u.endIndex,y=u.onChange,v=n.pageX-a;v>0?v=Math.min(v,l+c-f-s,l+c-f-o):v<0&&(v=Math.max(v,l-o,l-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,i){var a=Bw(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var i=this.state,a=i.brushMoveStartX,o=i.movingTravellerId,s=i.endX,u=i.startX,l=this.state[o],c=this.props,f=c.x,d=c.width,h=c.travellerWidth,y=c.onChange,v=c.gap,p=c.data,m={startX:this.state.startX,endX:this.state.endX},b=n.pageX-a;b>0?b=Math.min(b,f+d-h-l):b<0&&(b=Math.max(b,f-l)),m[o]=l+b;var w=this.getIndex(m),O=w.startIndex,g=w.endIndex,_=function(){var A=p.length-1;return o==="startX"&&(s>u?O%v===0:g%v===0)||s<u&&g===A||o==="endX"&&(s>u?g%v===0:O%v===0)||s>u&&g===A};this.setState(Pt(Pt({},o,l+b),"brushMoveStartX",n.pageX),function(){y&&_()&&y(w)})}},{key:"handleTravellerMoveKeyboard",value:function(n,i){var a=this,o=this.state,s=o.scaleValues,u=o.startX,l=o.endX,c=this.state[i],f=s.indexOf(c);if(f!==-1){var d=f+n;if(!(d===-1||d>=s.length)){var h=s[d];i==="startX"&&h>=l||i==="endX"&&h<=u||this.setState(Pt({},i,h),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,s=n.height,u=n.fill,l=n.stroke;return x.createElement("rect",{stroke:l,fill:u,x:i,y:a,width:o,height:s})}},{key:"renderPanorama",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,s=n.height,u=n.data,l=n.children,c=n.padding,f=x.Children.only(l);return f?x.cloneElement(f,{x:i,y:a,width:o,height:s,margin:c,compact:!0,data:u}):null}},{key:"renderTravellerLayer",value:function(n,i){var a,o,s=this,u=this.props,l=u.y,c=u.travellerWidth,f=u.height,d=u.traveller,h=u.ariaLabel,y=u.data,v=u.startIndex,p=u.endIndex,m=Math.max(n,this.props.x),b=hd(hd({},Q(this.props,!1)),{},{x:m,y:l,width:c,height:f}),w=h||"Min value: ".concat((a=y[v])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=y[p])===null||o===void 0?void 0:o.name);return x.createElement(pe,{tabIndex:0,role:"slider","aria-label":w,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(g){["ArrowLeft","ArrowRight"].includes(g.key)&&(g.preventDefault(),g.stopPropagation(),s.handleTravellerMoveKeyboard(g.key==="ArrowRight"?1:-1,i))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},e.renderTraveller(d,b))}},{key:"renderSlide",value:function(n,i){var a=this.props,o=a.y,s=a.height,u=a.stroke,l=a.travellerWidth,c=Math.min(n,i)+l,f=Math.max(Math.abs(i-n)-l,0);return x.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:u,fillOpacity:.2,x:c,y:o,width:f,height:s})}},{key:"renderText",value:function(){var n=this.props,i=n.startIndex,a=n.endIndex,o=n.y,s=n.height,u=n.travellerWidth,l=n.stroke,c=this.state,f=c.startX,d=c.endX,h=5,y={pointerEvents:"none",fill:l};return x.createElement(pe,{className:"recharts-brush-texts"},x.createElement(cn,xu({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,d)-h,y:o+s/2},y),this.getTextOfTick(i)),x.createElement(cn,xu({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,d)+u+h,y:o+s/2},y),this.getTextOfTick(a)))}},{key:"render",value:function(){var n=this.props,i=n.data,a=n.className,o=n.children,s=n.x,u=n.y,l=n.width,c=n.height,f=n.alwaysShowText,d=this.state,h=d.startX,y=d.endX,v=d.isTextActive,p=d.isSlideMoving,m=d.isTravellerMoving,b=d.isTravellerFocused;if(!i||!i.length||!V(s)||!V(u)||!V(l)||!V(c)||l<=0||c<=0)return null;var w=le("recharts-brush",a),O=x.Children.count(o)===1,g=EH("userSelect","none");return x.createElement(pe,{className:w,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:g},this.renderBackground(),O&&this.renderPanorama(),this.renderSlide(h,y),this.renderTravellerLayer(h,"startX"),this.renderTravellerLayer(y,"endX"),(v||p||m||b||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var i=n.x,a=n.y,o=n.width,s=n.height,u=n.stroke,l=Math.floor(a+s/2)-1;return x.createElement(x.Fragment,null,x.createElement("rect",{x:i,y:a,width:o,height:s,fill:u,stroke:"none"}),x.createElement("line",{x1:i+1,y1:l,x2:i+o-1,y2:l,fill:"none",stroke:"#fff"}),x.createElement("line",{x1:i+1,y1:l+2,x2:i+o-1,y2:l+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,i){var a;return x.isValidElement(n)?a=x.cloneElement(n,i):ae(n)?a=n(i):a=e.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(n,i){var a=n.data,o=n.width,s=n.x,u=n.travellerWidth,l=n.updateId,c=n.startIndex,f=n.endIndex;if(a!==i.prevData||l!==i.prevUpdateId)return hd({prevData:a,prevTravellerWidth:u,prevUpdateId:l,prevX:s,prevWidth:o},a&&a.length?MH({data:a,width:o,x:s,travellerWidth:u,startIndex:c,endIndex:f}):{scale:null,scaleValues:null});if(i.scale&&(o!==i.prevWidth||s!==i.prevX||u!==i.prevTravellerWidth)){i.scale.range([s,s+o-u]);var d=i.scale.domain().map(function(h){return i.scale(h)});return{prevData:a,prevTravellerWidth:u,prevUpdateId:l,prevX:s,prevWidth:o,startX:i.scale(n.startIndex),endX:i.scale(n.endIndex),scaleValues:d}}return null}},{key:"getIndexInRange",value:function(n,i){for(var a=n.length,o=0,s=a-1;s-o>1;){var u=Math.floor((o+s)/2);n[u]>i?s=u:o=u}return i>=n[s]?s:o}}])}(x.PureComponent);Pt(ji,"displayName","Brush"),Pt(ji,"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 DH=Pc;function RH(t,e){var r;return DH(t,function(n,i,a){return r=e(n,i,a),!r}),!!r}var LH=RH,BH=cy,UH=er,FH=LH,WH=yt,qH=vs;function zH(t,e,r){var n=WH(t)?BH:FH;return r&&qH(t,e,r)&&(e=void 0),n(t,UH(e))}var KH=zH;const VH=je(KH);var ar=function(e,r){var n=e.alwaysShow,i=e.ifOverflow;return n&&(i="extendDomain"),i===r},Uw=og;function HH(t,e,r){e=="__proto__"&&Uw?Uw(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var GH=HH,YH=GH,XH=rg,JH=er;function ZH(t,e){var r={};return e=JH(e),XH(t,function(n,i,a){YH(r,i,e(n,i,a))}),r}var QH=ZH;const e8=je(QH);function t8(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(!e(t[r],r,t))return!1;return!0}var r8=t8,n8=Pc;function i8(t,e){var r=!0;return n8(t,function(n,i,a){return r=!!e(n,i,a),r}),r}var a8=i8,o8=r8,s8=a8,u8=er,l8=yt,c8=vs;function f8(t,e,r){var n=l8(t)?o8:s8;return r&&c8(t,e,r)&&(e=void 0),n(t,u8(e))}var d8=f8;const Fw=je(d8);var h8=["x","y"];function $i(t){"@babel/helpers - typeof";return $i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$i(t)}function vd(){return vd=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},vd.apply(this,arguments)}function Ww(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function po(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ww(Object(r),!0).forEach(function(n){p8(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ww(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function p8(t,e,r){return e=v8(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function v8(t){var e=y8(t,"string");return $i(e)=="symbol"?e:e+""}function y8(t,e){if($i(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if($i(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function g8(t,e){if(t==null)return{};var r=m8(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function m8(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function b8(t,e){var r=t.x,n=t.y,i=g8(t,h8),a="".concat(r),o=parseInt(a,10),s="".concat(n),u=parseInt(s,10),l="".concat(e.height||i.height),c=parseInt(l,10),f="".concat(e.width||i.width),d=parseInt(f,10);return po(po(po(po(po({},e),i),o?{x:o}:{}),u?{y:u}:{}),{},{height:c,width:d,name:e.name,radius:e.radius})}function qw(t){return x.createElement(_w,vd({shapeType:"rectangle",propTransformer:b8,activeClassName:"recharts-active-bar"},t))}var w8=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,i){if(typeof e=="number")return e;var a=V(n)||mT(n);return a?e(n,i):(a||(process.env.NODE_ENV!=="production"?mt(!1,"minPointSize callback function received a value with type of ".concat($i(n),". Currently only numbers or null/undefined are supported.")):mt()),r)}},_8=["value","background"],zw;function ki(t){"@babel/helpers - typeof";return ki=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ki(t)}function x8(t,e){if(t==null)return{};var r=O8(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function O8(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function Su(){return Su=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Su.apply(this,arguments)}function Kw(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function He(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Kw(Object(r),!0).forEach(function(n){Ur(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Kw(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function S8(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Vw(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Gw(n.key),n)}}function A8(t,e,r){return e&&Vw(t.prototype,e),r&&Vw(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function P8(t,e,r){return e=Au(e),E8(t,Hw()?Reflect.construct(e,r||[],Au(t).constructor):e.apply(t,r))}function E8(t,e){if(e&&(ki(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return T8(t)}function T8(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Hw(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Hw=function(){return!!t})()}function Au(t){return Au=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Au(t)}function j8(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&yd(t,e)}function yd(t,e){return yd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},yd(t,e)}function Ur(t,e,r){return e=Gw(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Gw(t){var e=$8(t,"string");return ki(e)=="symbol"?e:e+""}function $8(t,e){if(ki(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(ki(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var An=function(t){function e(){var r;S8(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=P8(this,e,[].concat(i)),Ur(r,"state",{isAnimationFinished:!1}),Ur(r,"id",an("recharts-bar-")),Ur(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),o&&o()}),Ur(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),o&&o()}),r}return j8(e,t),A8(e,[{key:"renderRectanglesStatically",value:function(n){var i=this,a=this.props,o=a.shape,s=a.dataKey,u=a.activeIndex,l=a.activeBar,c=Q(this.props,!1);return n&&n.map(function(f,d){var h=d===u,y=h?l:o,v=He(He(He({},c),f),{},{isActive:h,option:y,index:d,dataKey:s,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return x.createElement(pe,Su({className:"recharts-bar-rectangle"},on(i.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)}),x.createElement(qw,v))})}},{key:"renderRectanglesWithAnimation",value:function(){var n=this,i=this.props,a=i.data,o=i.layout,s=i.isAnimationActive,u=i.animationBegin,l=i.animationDuration,c=i.animationEasing,f=i.animationId,d=this.state.prevData;return x.createElement(Rt,{begin:u,duration:l,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=a.map(function(p,m){var b=d&&d[m];if(b){var w=Fe(b.x,p.x),O=Fe(b.y,p.y),g=Fe(b.width,p.width),_=Fe(b.height,p.height);return He(He({},p),{},{x:w(y),y:O(y),width:g(y),height:_(y)})}if(o==="horizontal"){var S=Fe(0,p.height),A=S(y);return He(He({},p),{},{y:p.y+p.height-A,height:A})}var E=Fe(0,p.width),N=E(y);return He(He({},p),{},{width:N})});return x.createElement(pe,null,n.renderRectanglesStatically(v))})}},{key:"renderRectangles",value:function(){var n=this.props,i=n.data,a=n.isAnimationActive,o=this.state.prevData;return a&&i&&i.length&&(!o||!Rr(o,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var n=this,i=this.props,a=i.data,o=i.dataKey,s=i.activeIndex,u=Q(this.props.background,!1);return a.map(function(l,c){l.value;var f=l.background,d=x8(l,_8);if(!f)return null;var h=He(He(He(He(He({},d),{},{fill:"#eee"},f),u),on(n.props,l,c)),{},{onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd,dataKey:o,index:c,className:"recharts-bar-background-rectangle"});return x.createElement(qw,Su({key:"background-bar-".concat(c),option:n.props.background,isActive:c===s},h))})}},{key:"renderErrorBar",value:function(n,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.data,s=a.xAxis,u=a.yAxis,l=a.layout,c=a.children,f=Ot(c,Ba);if(!f)return null;var d=l==="vertical"?o[0].height/2:o[0].width/2,h=function(p,m){var b=Array.isArray(p.value)?p.value[1]:p.value;return{x:p.x,y:p.y,value:b,errorVal:We(p,m)}},y={clipPath:n?"url(#clipPath-".concat(i,")"):null};return x.createElement(pe,y,f.map(function(v){return x.cloneElement(v,{key:"error-bar-".concat(i,"-").concat(v.props.dataKey),data:o,xAxis:s,yAxis:u,layout:l,offset:d,dataPointFormatter:h})}))}},{key:"render",value:function(){var n=this.props,i=n.hide,a=n.data,o=n.className,s=n.xAxis,u=n.yAxis,l=n.left,c=n.top,f=n.width,d=n.height,h=n.isAnimationActive,y=n.background,v=n.id;if(i||!a||!a.length)return null;var p=this.state.isAnimationFinished,m=le("recharts-bar",o),b=s&&s.allowDataOverflow,w=u&&u.allowDataOverflow,O=b||w,g=fe(v)?this.id:v;return x.createElement(pe,{className:m},b||w?x.createElement("defs",null,x.createElement("clipPath",{id:"clipPath-".concat(g)},x.createElement("rect",{x:b?l:l-f/2,y:w?c:c-d/2,width:b?f:f*2,height:w?d:d*2}))):null,x.createElement(pe,{className:"recharts-bar-rectangles",clipPath:O?"url(#clipPath-".concat(g,")"):null},y?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(O,g),(!h||p)&&Ht.renderCallByParent(this.props,a))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curData:n.data,prevData:i.curData}:n.data!==i.curData?{curData:n.data}:null}}])}(x.PureComponent);zw=An,Ur(An,"displayName","Bar"),Ur(An,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!It.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"}),Ur(An,"getComposedData",function(t){var e=t.props,r=t.item,n=t.barPosition,i=t.bandSize,a=t.xAxis,o=t.yAxis,s=t.xAxisTicks,u=t.yAxisTicks,l=t.stackedData,c=t.dataStartIndex,f=t.displayedData,d=t.offset,h=RW(n,r);if(!h)return null;var y=e.layout,v=r.type.defaultProps,p=v!==void 0?He(He({},v),r.props):r.props,m=p.dataKey,b=p.children,w=p.minPointSize,O=y==="horizontal"?o:a,g=l?O.scale.domain():null,_=zW({numericAxis:O}),S=Ot(b,ws),A=f.map(function(E,N){var j,$,k,I,R,M;l?j=LW(l[c+N],g):(j=We(E,m),Array.isArray(j)||(j=[_,j]));var L=w8(w,zw.defaultProps.minPointSize)(j[1],N);if(y==="horizontal"){var q,z=[o.scale(j[0]),o.scale(j[1])],D=z[0],B=z[1];$=Ub({axis:a,ticks:s,bandSize:i,offset:h.offset,entry:E,index:N}),k=(q=B??D)!==null&&q!==void 0?q:void 0,I=h.size;var F=D-B;if(R=Number.isNaN(F)?0:F,M={x:$,y:o.y,width:I,height:o.height},Math.abs(L)>0&&Math.abs(R)<Math.abs(L)){var G=ft(R||L)*(Math.abs(L)-Math.abs(R));k-=G,R+=G}}else{var J=[a.scale(j[0]),a.scale(j[1])],re=J[0],ne=J[1];if($=re,k=Ub({axis:o,ticks:u,bandSize:i,offset:h.offset,entry:E,index:N}),I=ne-re,R=h.size,M={x:a.x,y:k,width:a.width,height:R},Math.abs(L)>0&&Math.abs(I)<Math.abs(L)){var ue=ft(I||L)*(Math.abs(L)-Math.abs(I));I+=ue}}return He(He(He({},E),{},{x:$,y:k,width:I,height:R,value:l?j:j[1],payload:E,background:M},S&&S[N]&&S[N].props),{},{tooltipPayload:[Kb(r,E)],tooltipPosition:{x:$+I/2,y:k+R/2}})});return He({data:A,layout:y},d)});function vo(t){"@babel/helpers - typeof";return vo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vo(t)}function k8(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Yw(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Jw(n.key),n)}}function C8(t,e,r){return e&&Yw(t.prototype,e),r&&Yw(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Xw(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Yt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Xw(Object(r),!0).forEach(function(n){Pu(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Xw(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Pu(t,e,r){return e=Jw(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Jw(t){var e=I8(t,"string");return vo(e)=="symbol"?e:e+""}function I8(t,e){if(vo(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(vo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var gd=function(e,r,n,i,a){var o=e.width,s=e.height,u=e.layout,l=e.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=!!St(l,An);return c.reduce(function(h,y){var v=r[y],p=v.orientation,m=v.domain,b=v.padding,w=b===void 0?{}:b,O=v.mirror,g=v.reversed,_="".concat(p).concat(O?"Mirror":""),S,A,E,N,j;if(v.type==="number"&&(v.padding==="gap"||v.padding==="no-gap")){var $=m[1]-m[0],k=1/0,I=v.categoricalDomain.sort(_T);if(I.forEach(function(J,re){re>0&&(k=Math.min((J||0)-(I[re-1]||0),k))}),Number.isFinite(k)){var R=k/$,M=v.layout==="vertical"?n.height:n.width;if(v.padding==="gap"&&(S=R*M/2),v.padding==="no-gap"){var L=dt(e.barCategoryGap,R*M),q=R*M/2;S=q-L-(q-L)/M*L}}}i==="xAxis"?A=[n.left+(w.left||0)+(S||0),n.left+n.width-(w.right||0)-(S||0)]:i==="yAxis"?A=u==="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)]:A=v.range,g&&(A=[A[1],A[0]]);var z=Db(v,a,d),D=z.scale,B=z.realScaleType;D.domain(m).range(A),Lb(D);var F=Bb(D,Yt(Yt({},v),{},{realScaleType:B}));i==="xAxis"?(j=p==="top"&&!O||p==="bottom"&&O,E=n.left,N=f[_]-j*v.height):i==="yAxis"&&(j=p==="left"&&!O||p==="right"&&O,E=f[_]-j*v.width,N=n.top);var G=Yt(Yt(Yt({},v),F),{},{realScaleType:B,x:E,y:N,scale:D,width:i==="xAxis"?n.width:v.width,height:i==="yAxis"?n.height:v.height});return G.bandSize=Js(G,F),!v.hide&&i==="xAxis"?f[_]+=(j?-1:1)*G.height:v.hide||(f[_]+=(j?-1:1)*G.width),Yt(Yt({},h),{},Pu({},y,G))},{})},Zw=function(e,r){var n=e.x,i=e.y,a=r.x,o=r.y;return{x:Math.min(n,a),y:Math.min(i,o),width:Math.abs(a-n),height:Math.abs(o-i)}},N8=function(e){var r=e.x1,n=e.y1,i=e.x2,a=e.y2;return Zw({x:r,y:n},{x:i,y:a})},Qw=function(){function t(e){k8(this,t),this.scale=e}return C8(t,[{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]:{},i=n.bandAware,a=n.position;if(r!==void 0){if(a)switch(a){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(i){var u=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+u}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),i=n[0],a=n[n.length-1];return i<=a?r>=i&&r<=a:r>=a&&r<=i}}],[{key:"create",value:function(r){return new t(r)}}])}();Pu(Qw,"EPS",1e-4);var md=function(e){var r=Object.keys(e).reduce(function(n,i){return Yt(Yt({},n),{},Pu({},i,Qw.create(e[i])))},{});return Yt(Yt({},r),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,s=a.position;return e8(i,function(u,l){return r[l].apply(u,{bandAware:o,position:s})})},isInRange:function(i){return Fw(i,function(a,o){return r[o].isInRange(a)})}})};function M8(t){return(t%180+180)%180}var D8=function(e){var r=e.width,n=e.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=M8(i),o=a*Math.PI/180,s=Math.atan(n/r),u=o>s&&o<Math.PI-s?n/Math.sin(o):r/Math.cos(o);return Math.abs(u)},R8=er,L8=va,B8=fs;function U8(t){return function(e,r,n){var i=Object(e);if(!L8(e)){var a=R8(r);e=B8(e),r=function(s){return a(i[s],s,i)}}var o=t(e,r,n);return o>-1?i[a?e[o]:o]:void 0}}var F8=U8,W8=kw;function q8(t){var e=W8(t),r=e%1;return e===e?r?e-r:e:0}var z8=q8,K8=zy,V8=er,H8=z8,G8=Math.max;function Y8(t,e,r){var n=t==null?0:t.length;if(!n)return-1;var i=r==null?0:H8(r);return i<0&&(i=G8(n+i,0)),K8(t,V8(e),i)}var X8=Y8,J8=F8,Z8=X8,Q8=J8(Z8),eG=Q8;const tG=je(eG);var rG=x1(function(t){return{x:t.left,y:t.top,width:t.width,height:t.height}},function(t){return["l",t.left,"t",t.top,"w",t.width,"h",t.height].join("")});function Eu(t){"@babel/helpers - typeof";return Eu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Eu(t)}var bd=x.createContext(void 0),wd=x.createContext(void 0),e_=x.createContext(void 0),t_=x.createContext({}),r_=x.createContext(void 0),n_=x.createContext(0),i_=x.createContext(0),a_=function(e){var r=e.state,n=r.xAxisMap,i=r.yAxisMap,a=r.offset,o=e.clipPathId,s=e.children,u=e.width,l=e.height,c=rG(a);return x.createElement(bd.Provider,{value:n},x.createElement(wd.Provider,{value:i},x.createElement(t_.Provider,{value:a},x.createElement(e_.Provider,{value:c},x.createElement(r_.Provider,{value:o},x.createElement(n_.Provider,{value:l},x.createElement(i_.Provider,{value:u},s)))))))},nG=function(){return x.useContext(r_)};function o_(t){var e=Object.keys(t);return e.length===0?"There are no available ids.":"Available ids are: ".concat(e,".")}var s_=function(e){var r=x.useContext(bd);r==null&&(process.env.NODE_ENV!=="production"?mt(!1,"Could not find Recharts context; are you sure this is rendered inside a Recharts wrapper component?"):mt());var n=r[e];return n==null&&(process.env.NODE_ENV!=="production"?mt(!1,'Could not find xAxis by id "'.concat(e,'" [').concat(Eu(e),"]. ").concat(o_(r))):mt()),n},iG=function(){var e=x.useContext(bd);return Cr(e)},aG=function(){var e=x.useContext(wd),r=tG(e,function(n){return Fw(n.domain,Number.isFinite)});return r||Cr(e)},u_=function(e){var r=x.useContext(wd);r==null&&(process.env.NODE_ENV!=="production"?mt(!1,"Could not find Recharts context; are you sure this is rendered inside a Recharts wrapper component?"):mt());var n=r[e];return n==null&&(process.env.NODE_ENV!=="production"?mt(!1,'Could not find yAxis by id "'.concat(e,'" [').concat(Eu(e),"]. ").concat(o_(r))):mt()),n},oG=function(){var e=x.useContext(e_);return e},sG=function(){return x.useContext(t_)},_d=function(){return x.useContext(i_)},xd=function(){return x.useContext(n_)};function Ci(t){"@babel/helpers - typeof";return Ci=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ci(t)}function uG(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function lG(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,d_(n.key),n)}}function cG(t,e,r){return e&&lG(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function fG(t,e,r){return e=Tu(e),dG(t,l_()?Reflect.construct(e,r||[],Tu(t).constructor):e.apply(t,r))}function dG(t,e){if(e&&(Ci(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return hG(t)}function hG(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function l_(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(l_=function(){return!!t})()}function Tu(t){return Tu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Tu(t)}function pG(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Od(t,e)}function Od(t,e){return Od=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Od(t,e)}function c_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function f_(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?c_(Object(r),!0).forEach(function(n){Sd(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):c_(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Sd(t,e,r){return e=d_(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function d_(t){var e=vG(t,"string");return Ci(e)=="symbol"?e:e+""}function vG(t,e){if(Ci(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Ci(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function yG(t,e){return wG(t)||bG(t,e)||mG(t,e)||gG()}function gG(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
164
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mG(t,e){if(t){if(typeof t=="string")return h_(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return h_(t,e)}}function h_(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function bG(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,o,s=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(c){l=!0,i=c}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function wG(t){if(Array.isArray(t))return t}function Ad(){return Ad=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Ad.apply(this,arguments)}var _G=function(e,r){var n;return x.isValidElement(e)?n=x.cloneElement(e,r):ae(e)?n=e(r):n=x.createElement("line",Ad({},r,{className:"recharts-reference-line-line"})),n},xG=function(e,r,n,i,a,o,s,u,l){var c=a.x,f=a.y,d=a.width,h=a.height;if(n){var y=l.y,v=e.y.apply(y,{position:o});if(ar(l,"discard")&&!e.y.isInRange(v))return null;var p=[{x:c+d,y:v},{x:c,y:v}];return u==="left"?p.reverse():p}if(r){var m=l.x,b=e.x.apply(m,{position:o});if(ar(l,"discard")&&!e.x.isInRange(b))return null;var w=[{x:b,y:f+h},{x:b,y:f}];return s==="top"?w.reverse():w}if(i){var O=l.segment,g=O.map(function(_){return e.apply(_,{position:o})});return ar(l,"discard")&&VH(g,function(_){return!e.isInRange(_)})?null:g}return null};function OG(t){var e=t.x,r=t.y,n=t.segment,i=t.xAxisId,a=t.yAxisId,o=t.shape,s=t.className,u=t.alwaysShow,l=nG(),c=s_(i),f=u_(a),d=oG();if(!l||!d)return null;zt(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var h=md({x:c.scale,y:f.scale}),y=Je(e),v=Je(r),p=n&&n.length===2,m=xG(h,y,v,p,d,t.position,c.orientation,f.orientation,t);if(!m)return null;var b=yG(m,2),w=b[0],O=w.x,g=w.y,_=b[1],S=_.x,A=_.y,E=ar(t,"hidden")?"url(#".concat(l,")"):void 0,N=f_(f_({clipPath:E},Q(t,!0)),{},{x1:O,y1:g,x2:S,y2:A});return x.createElement(pe,{className:le("recharts-reference-line",s)},_G(o,N),nt.renderCallByParent(t,N8({x1:O,y1:g,x2:S,y2:A})))}var Pd=function(t){function e(){return uG(this,e),fG(this,e,arguments)}return pG(e,t),cG(e,[{key:"render",value:function(){return x.createElement(OG,this.props)}}])}(x.Component);Sd(Pd,"displayName","ReferenceLine"),Sd(Pd,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function Ed(){return Ed=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Ed.apply(this,arguments)}function Ii(t){"@babel/helpers - typeof";return Ii=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ii(t)}function p_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function v_(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?p_(Object(r),!0).forEach(function(n){$u(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):p_(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function SG(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function AG(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,g_(n.key),n)}}function PG(t,e,r){return e&&AG(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function EG(t,e,r){return e=ju(e),TG(t,y_()?Reflect.construct(e,r||[],ju(t).constructor):e.apply(t,r))}function TG(t,e){if(e&&(Ii(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return jG(t)}function jG(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function y_(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(y_=function(){return!!t})()}function ju(t){return ju=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ju(t)}function $G(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Td(t,e)}function Td(t,e){return Td=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Td(t,e)}function $u(t,e,r){return e=g_(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function g_(t){var e=kG(t,"string");return Ii(e)=="symbol"?e:e+""}function kG(t,e){if(Ii(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Ii(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var CG=function(e){var r=e.x,n=e.y,i=e.xAxis,a=e.yAxis,o=md({x:i.scale,y:a.scale}),s=o.apply({x:r,y:n},{bandAware:!0});return ar(e,"discard")&&!o.isInRange(s)?null:s},ku=function(t){function e(){return SG(this,e),EG(this,e,arguments)}return $G(e,t),PG(e,[{key:"render",value:function(){var n=this.props,i=n.x,a=n.y,o=n.r,s=n.alwaysShow,u=n.clipPathId,l=Je(i),c=Je(a);if(zt(s===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!l||!c)return null;var f=CG(this.props);if(!f)return null;var d=f.x,h=f.y,y=this.props,v=y.shape,p=y.className,m=ar(this.props,"hidden")?"url(#".concat(u,")"):void 0,b=v_(v_({clipPath:m},Q(this.props,!0)),{},{cx:d,cy:h});return x.createElement(pe,{className:le("recharts-reference-dot",p)},e.renderDot(v,b),nt.renderCallByParent(this.props,{x:d-o,y:h-o,width:2*o,height:2*o}))}}])}(x.Component);$u(ku,"displayName","ReferenceDot"),$u(ku,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1}),$u(ku,"renderDot",function(t,e){var r;return x.isValidElement(t)?r=x.cloneElement(t,e):ae(t)?r=t(e):r=x.createElement(wi,Ed({},e,{cx:e.cx,cy:e.cy,className:"recharts-reference-dot-dot"})),r});function jd(){return jd=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},jd.apply(this,arguments)}function Ni(t){"@babel/helpers - typeof";return Ni=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ni(t)}function m_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function b_(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?m_(Object(r),!0).forEach(function(n){Iu(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):m_(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function IG(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function NG(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,__(n.key),n)}}function MG(t,e,r){return e&&NG(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function DG(t,e,r){return e=Cu(e),RG(t,w_()?Reflect.construct(e,r||[],Cu(t).constructor):e.apply(t,r))}function RG(t,e){if(e&&(Ni(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return LG(t)}function LG(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function w_(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(w_=function(){return!!t})()}function Cu(t){return Cu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Cu(t)}function BG(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&$d(t,e)}function $d(t,e){return $d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},$d(t,e)}function Iu(t,e,r){return e=__(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function __(t){var e=UG(t,"string");return Ni(e)=="symbol"?e:e+""}function UG(t,e){if(Ni(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Ni(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var FG=function(e,r,n,i,a){var o=a.x1,s=a.x2,u=a.y1,l=a.y2,c=a.xAxis,f=a.yAxis;if(!c||!f)return null;var d=md({x:c.scale,y:f.scale}),h={x:e?d.x.apply(o,{position:"start"}):d.x.rangeMin,y:n?d.y.apply(u,{position:"start"}):d.y.rangeMin},y={x:r?d.x.apply(s,{position:"end"}):d.x.rangeMax,y:i?d.y.apply(l,{position:"end"}):d.y.rangeMax};return ar(a,"discard")&&(!d.isInRange(h)||!d.isInRange(y))?null:Zw(h,y)},Nu=function(t){function e(){return IG(this,e),DG(this,e,arguments)}return BG(e,t),MG(e,[{key:"render",value:function(){var n=this.props,i=n.x1,a=n.x2,o=n.y1,s=n.y2,u=n.className,l=n.alwaysShow,c=n.clipPathId;zt(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var f=Je(i),d=Je(a),h=Je(o),y=Je(s),v=this.props.shape;if(!f&&!d&&!h&&!y&&!v)return null;var p=FG(f,d,h,y,this.props);if(!p&&!v)return null;var m=ar(this.props,"hidden")?"url(#".concat(c,")"):void 0;return x.createElement(pe,{className:le("recharts-reference-area",u)},e.renderRect(v,b_(b_({clipPath:m},Q(this.props,!0)),p)),nt.renderCallByParent(this.props,p))}}])}(x.Component);Iu(Nu,"displayName","ReferenceArea"),Iu(Nu,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1}),Iu(Nu,"renderRect",function(t,e){var r;return x.isValidElement(t)?r=x.cloneElement(t,e):ae(t)?r=t(e):r=x.createElement(id,jd({},e,{className:"recharts-reference-area-rect"})),r});function x_(t,e,r){if(e<1)return[];if(e===1&&r===void 0)return t;for(var n=[],i=0;i<t.length;i+=e)n.push(t[i]);return n}function WG(t,e,r){var n={width:t.width+e.width,height:t.height+e.height};return D8(n,r)}function qG(t,e,r){var n=r==="width",i=t.x,a=t.y,o=t.width,s=t.height;return e===1?{start:n?i:a,end:n?i+o:a+s}:{start:n?i+o:a+s,end:n?i:a}}function Mu(t,e,r,n,i){if(t*e<t*n||t*e>t*i)return!1;var a=r();return t*(e-t*a/2-n)>=0&&t*(e+t*a/2-i)<=0}function zG(t,e){return x_(t,e+1)}function KG(t,e,r,n,i){for(var a=(n||[]).slice(),o=e.start,s=e.end,u=0,l=1,c=o,f=function(){var y=n==null?void 0:n[u];if(y===void 0)return{v:x_(n,l)};var v=u,p,m=function(){return p===void 0&&(p=r(y,v)),p},b=y.coordinate,w=u===0||Mu(t,b,m,c,s);w||(u=0,c=o,l+=1),w&&(c=b+t*(m()/2+i),u+=l)},d;l<=a.length;)if(d=f(),d)return d.v;return[]}function yo(t){"@babel/helpers - typeof";return yo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yo(t)}function O_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function ot(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?O_(Object(r),!0).forEach(function(n){VG(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):O_(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function VG(t,e,r){return e=HG(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function HG(t){var e=GG(t,"string");return yo(e)=="symbol"?e:e+""}function GG(t,e){if(yo(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(yo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function YG(t,e,r,n,i){for(var a=(n||[]).slice(),o=a.length,s=e.start,u=e.end,l=function(d){var h=a[d],y,v=function(){return y===void 0&&(y=r(h,d)),y};if(d===o-1){var p=t*(h.coordinate+t*v()/2-u);a[d]=h=ot(ot({},h),{},{tickCoord:p>0?h.coordinate-p*t:h.coordinate})}else a[d]=h=ot(ot({},h),{},{tickCoord:h.coordinate});var m=Mu(t,h.tickCoord,v,s,u);m&&(u=h.tickCoord-t*(v()/2+i),a[d]=ot(ot({},h),{},{isShow:!0}))},c=o-1;c>=0;c--)l(c);return a}function XG(t,e,r,n,i,a){var o=(n||[]).slice(),s=o.length,u=e.start,l=e.end;if(a){var c=n[s-1],f=r(c,s-1),d=t*(c.coordinate+t*f/2-l);o[s-1]=c=ot(ot({},c),{},{tickCoord:d>0?c.coordinate-d*t:c.coordinate});var h=Mu(t,c.tickCoord,function(){return f},u,l);h&&(l=c.tickCoord-t*(f/2+i),o[s-1]=ot(ot({},c),{},{isShow:!0}))}for(var y=a?s-1:s,v=function(b){var w=o[b],O,g=function(){return O===void 0&&(O=r(w,b)),O};if(b===0){var _=t*(w.coordinate-t*g()/2-u);o[b]=w=ot(ot({},w),{},{tickCoord:_<0?w.coordinate-_*t:w.coordinate})}else o[b]=w=ot(ot({},w),{},{tickCoord:w.coordinate});var S=Mu(t,w.tickCoord,g,u,l);S&&(u=w.tickCoord+t*(g()/2+i),o[b]=ot(ot({},w),{},{isShow:!0}))},p=0;p<y;p++)v(p);return o}function kd(t,e,r){var n=t.tick,i=t.ticks,a=t.viewBox,o=t.minTickGap,s=t.orientation,u=t.interval,l=t.tickFormatter,c=t.unit,f=t.angle;if(!i||!i.length||!n)return[];if(V(u)||It.isSsr)return zG(i,typeof u=="number"&&V(u)?u:0);var d=[],h=s==="top"||s==="bottom"?"width":"height",y=c&&h==="width"?_a(c,{fontSize:e,letterSpacing:r}):{width:0,height:0},v=function(w,O){var g=ae(l)?l(w.value,O):w.value;return h==="width"?WG(_a(g,{fontSize:e,letterSpacing:r}),y,f):_a(g,{fontSize:e,letterSpacing:r})[h]},p=i.length>=2?ft(i[1].coordinate-i[0].coordinate):1,m=qG(a,p,h);return u==="equidistantPreserveStart"?KG(p,m,v,i,o):(u==="preserveStart"||u==="preserveStartEnd"?d=XG(p,m,v,i,o,u==="preserveStartEnd"):d=YG(p,m,v,i,o),d.filter(function(b){return b.isShow}))}var JG=["viewBox"],ZG=["viewBox"],QG=["ticks"];function Mi(t){"@babel/helpers - typeof";return Mi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Mi(t)}function Di(){return Di=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Di.apply(this,arguments)}function S_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function et(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?S_(Object(r),!0).forEach(function(n){Nd(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):S_(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Cd(t,e){if(t==null)return{};var r=e6(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function e6(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function t6(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function A_(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,E_(n.key),n)}}function r6(t,e,r){return e&&A_(t.prototype,e),r&&A_(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function n6(t,e,r){return e=Du(e),i6(t,P_()?Reflect.construct(e,r||[],Du(t).constructor):e.apply(t,r))}function i6(t,e){if(e&&(Mi(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return a6(t)}function a6(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function P_(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(P_=function(){return!!t})()}function Du(t){return Du=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Du(t)}function o6(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Id(t,e)}function Id(t,e){return Id=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Id(t,e)}function Nd(t,e,r){return e=E_(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function E_(t){var e=s6(t,"string");return Mi(e)=="symbol"?e:e+""}function s6(t,e){if(Mi(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Mi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Ri=function(t){function e(r){var n;return t6(this,e),n=n6(this,e,[r]),n.state={fontSize:"",letterSpacing:""},n}return o6(e,t),r6(e,[{key:"shouldComponentUpdate",value:function(n,i){var a=n.viewBox,o=Cd(n,JG),s=this.props,u=s.viewBox,l=Cd(s,ZG);return!Jn(a,u)||!Jn(o,l)||!Jn(i,this.state)}},{key:"componentDidMount",value:function(){var n=this.layerReference;if(n){var i=n.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];i&&this.setState({fontSize:window.getComputedStyle(i).fontSize,letterSpacing:window.getComputedStyle(i).letterSpacing})}}},{key:"getTickLineCoord",value:function(n){var i=this.props,a=i.x,o=i.y,s=i.width,u=i.height,l=i.orientation,c=i.tickSize,f=i.mirror,d=i.tickMargin,h,y,v,p,m,b,w=f?-1:1,O=n.tickSize||c,g=V(n.tickCoord)?n.tickCoord:n.coordinate;switch(l){case"top":h=y=n.coordinate,p=o+ +!f*u,v=p-w*O,b=v-w*d,m=g;break;case"left":v=p=n.coordinate,y=a+ +!f*s,h=y-w*O,m=h-w*d,b=g;break;case"right":v=p=n.coordinate,y=a+ +f*s,h=y+w*O,m=h+w*d,b=g;break;default:h=y=n.coordinate,p=o+ +f*u,v=p+w*O,b=v+w*d,m=g;break}return{line:{x1:h,y1:v,x2:y,y2:p},tick:{x:m,y:b}}}},{key:"getTickTextAnchor",value:function(){var n=this.props,i=n.orientation,a=n.mirror,o;switch(i){case"left":o=a?"start":"end";break;case"right":o=a?"end":"start";break;default:o="middle";break}return o}},{key:"getTickVerticalAnchor",value:function(){var n=this.props,i=n.orientation,a=n.mirror,o="end";switch(i){case"left":case"right":o="middle";break;case"top":o=a?"start":"end";break;default:o=a?"end":"start";break}return o}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,s=n.height,u=n.orientation,l=n.mirror,c=n.axisLine,f=et(et(et({},Q(this.props,!1)),Q(c,!1)),{},{fill:"none"});if(u==="top"||u==="bottom"){var d=+(u==="top"&&!l||u==="bottom"&&l);f=et(et({},f),{},{x1:i,y1:a+d*s,x2:i+o,y2:a+d*s})}else{var h=+(u==="left"&&!l||u==="right"&&l);f=et(et({},f),{},{x1:i+h*o,y1:a,x2:i+h*o,y2:a+s})}return x.createElement("line",Di({},f,{className:le("recharts-cartesian-axis-line",xt(c,"className"))}))}},{key:"renderTicks",value:function(n,i,a){var o=this,s=this.props,u=s.tickLine,l=s.stroke,c=s.tick,f=s.tickFormatter,d=s.unit,h=kd(et(et({},this.props),{},{ticks:n}),i,a),y=this.getTickTextAnchor(),v=this.getTickVerticalAnchor(),p=Q(this.props,!1),m=Q(c,!1),b=et(et({},p),{},{fill:"none"},Q(u,!1)),w=h.map(function(O,g){var _=o.getTickLineCoord(O),S=_.line,A=_.tick,E=et(et(et(et({textAnchor:y,verticalAnchor:v},p),{},{stroke:"none",fill:l},m),A),{},{index:g,payload:O,visibleTicksCount:h.length,tickFormatter:f});return x.createElement(pe,Di({className:"recharts-cartesian-axis-tick",key:"tick-".concat(O.value,"-").concat(O.coordinate,"-").concat(O.tickCoord)},on(o.props,O,g)),u&&x.createElement("line",Di({},b,S,{className:le("recharts-cartesian-axis-tick-line",xt(u,"className"))})),c&&e.renderTickItem(c,E,"".concat(ae(f)?f(O.value,g):O.value).concat(d||"")))});return x.createElement("g",{className:"recharts-cartesian-axis-ticks"},w)}},{key:"render",value:function(){var n=this,i=this.props,a=i.axisLine,o=i.width,s=i.height,u=i.ticksGenerator,l=i.className,c=i.hide;if(c)return null;var f=this.props,d=f.ticks,h=Cd(f,QG),y=d;return ae(u)&&(y=d&&d.length>0?u(this.props):u(h)),o<=0||s<=0||!y||!y.length?null:x.createElement(pe,{className:le("recharts-cartesian-axis",l),ref:function(p){n.layerReference=p}},a&&this.renderAxisLine(),this.renderTicks(y,this.state.fontSize,this.state.letterSpacing),nt.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,i,a){var o,s=le(i.className,"recharts-cartesian-axis-tick-value");return x.isValidElement(n)?o=x.cloneElement(n,et(et({},i),{},{className:s})):ae(n)?o=n(et(et({},i),{},{className:s})):o=x.createElement(cn,Di({},i,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])}(x.Component);Nd(Ri,"displayName","CartesianAxis"),Nd(Ri,"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 u6=["x1","y1","x2","y2","key"],l6=["offset"];function Pn(t){"@babel/helpers - typeof";return Pn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pn(t)}function T_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function st(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?T_(Object(r),!0).forEach(function(n){c6(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):T_(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function c6(t,e,r){return e=f6(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function f6(t){var e=d6(t,"string");return Pn(e)=="symbol"?e:e+""}function d6(t,e){if(Pn(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Pn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function En(){return En=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},En.apply(this,arguments)}function j_(t,e){if(t==null)return{};var r=h6(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function h6(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}var p6=function(e){var r=e.fill;if(!r||r==="none")return null;var n=e.fillOpacity,i=e.x,a=e.y,o=e.width,s=e.height,u=e.ry;return x.createElement("rect",{x:i,y:a,ry:u,width:o,height:s,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function $_(t,e){var r;if(x.isValidElement(t))r=x.cloneElement(t,e);else if(ae(t))r=t(e);else{var n=e.x1,i=e.y1,a=e.x2,o=e.y2,s=e.key,u=j_(e,u6),l=Q(u,!1);l.offset;var c=j_(l,l6);r=x.createElement("line",En({},c,{x1:n,y1:i,x2:a,y2:o,fill:"none",key:s}))}return r}function v6(t){var e=t.x,r=t.width,n=t.horizontal,i=n===void 0?!0:n,a=t.horizontalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(s,u){var l=st(st({},t),{},{x1:e,y1:s,x2:e+r,y2:s,key:"line-".concat(u),index:u});return $_(i,l)});return x.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function y6(t){var e=t.y,r=t.height,n=t.vertical,i=n===void 0?!0:n,a=t.verticalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(s,u){var l=st(st({},t),{},{x1:s,y1:e,x2:s,y2:e+r,key:"line-".concat(u),index:u});return $_(i,l)});return x.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function g6(t){var e=t.horizontalFill,r=t.fillOpacity,n=t.x,i=t.y,a=t.width,o=t.height,s=t.horizontalPoints,u=t.horizontal,l=u===void 0?!0:u;if(!l||!e||!e.length)return null;var c=s.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+o-d:c[h+1]-d;if(v<=0)return null;var p=h%e.length;return x.createElement("rect",{key:"react-".concat(h),y:d,x:n,height:v,width:a,stroke:"none",fill:e[p],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return x.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},f)}function m6(t){var e=t.vertical,r=e===void 0?!0:e,n=t.verticalFill,i=t.fillOpacity,a=t.x,o=t.y,s=t.width,u=t.height,l=t.verticalPoints;if(!r||!n||!n.length)return null;var c=l.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+s-d:c[h+1]-d;if(v<=0)return null;var p=h%n.length;return x.createElement("rect",{key:"react-".concat(h),x:d,y:o,width:v,height:u,stroke:"none",fill:n[p],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return x.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var b6=function(e,r){var n=e.xAxis,i=e.width,a=e.height,o=e.offset;return Mb(kd(st(st(st({},Ri.defaultProps),n),{},{ticks:wr(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.left,o.left+o.width,r)},w6=function(e,r){var n=e.yAxis,i=e.width,a=e.height,o=e.offset;return Mb(kd(st(st(st({},Ri.defaultProps),n),{},{ticks:wr(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.top,o.top+o.height,r)},Li={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Ru(t){var e,r,n,i,a,o,s=_d(),u=xd(),l=sG(),c=st(st({},t),{},{stroke:(e=t.stroke)!==null&&e!==void 0?e:Li.stroke,fill:(r=t.fill)!==null&&r!==void 0?r:Li.fill,horizontal:(n=t.horizontal)!==null&&n!==void 0?n:Li.horizontal,horizontalFill:(i=t.horizontalFill)!==null&&i!==void 0?i:Li.horizontalFill,vertical:(a=t.vertical)!==null&&a!==void 0?a:Li.vertical,verticalFill:(o=t.verticalFill)!==null&&o!==void 0?o:Li.verticalFill,x:V(t.x)?t.x:l.left,y:V(t.y)?t.y:l.top,width:V(t.width)?t.width:l.width,height:V(t.height)?t.height:l.height}),f=c.x,d=c.y,h=c.width,y=c.height,v=c.syncWithTicks,p=c.horizontalValues,m=c.verticalValues,b=iG(),w=aG();if(!V(h)||h<=0||!V(y)||y<=0||!V(f)||f!==+f||!V(d)||d!==+d)return null;var O=c.verticalCoordinatesGenerator||b6,g=c.horizontalCoordinatesGenerator||w6,_=c.horizontalPoints,S=c.verticalPoints;if((!_||!_.length)&&ae(g)){var A=p&&p.length,E=g({yAxis:w?st(st({},w),{},{ticks:A?p:w.ticks}):void 0,width:s,height:u,offset:l},A?!0:v);zt(Array.isArray(E),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Pn(E),"]")),Array.isArray(E)&&(_=E)}if((!S||!S.length)&&ae(O)){var N=m&&m.length,j=O({xAxis:b?st(st({},b),{},{ticks:N?m:b.ticks}):void 0,width:s,height:u,offset:l},N?!0:v);zt(Array.isArray(j),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Pn(j),"]")),Array.isArray(j)&&(S=j)}return x.createElement("g",{className:"recharts-cartesian-grid"},x.createElement(p6,{fill:c.fill,fillOpacity:c.fillOpacity,x:c.x,y:c.y,width:c.width,height:c.height,ry:c.ry}),x.createElement(v6,En({},c,{offset:l,horizontalPoints:_,xAxis:b,yAxis:w})),x.createElement(y6,En({},c,{offset:l,verticalPoints:S,xAxis:b,yAxis:w})),x.createElement(g6,En({},c,{horizontalPoints:_})),x.createElement(m6,En({},c,{verticalPoints:S})))}Ru.displayName="CartesianGrid";var _6=["type","layout","connectNulls","ref"],x6=["key"];function Bi(t){"@babel/helpers - typeof";return Bi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bi(t)}function k_(t,e){if(t==null)return{};var r=O6(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function O6(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function go(){return go=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},go.apply(this,arguments)}function C_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Et(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?C_(Object(r),!0).forEach(function(n){Xt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):C_(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Ui(t){return E6(t)||P6(t)||A6(t)||S6()}function S6(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
165
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function A6(t,e){if(t){if(typeof t=="string")return Md(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Md(t,e)}}function P6(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function E6(t){if(Array.isArray(t))return Md(t)}function Md(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function T6(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function I_(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,M_(n.key),n)}}function j6(t,e,r){return e&&I_(t.prototype,e),r&&I_(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function $6(t,e,r){return e=Lu(e),k6(t,N_()?Reflect.construct(e,r||[],Lu(t).constructor):e.apply(t,r))}function k6(t,e){if(e&&(Bi(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return C6(t)}function C6(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function N_(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(N_=function(){return!!t})()}function Lu(t){return Lu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Lu(t)}function I6(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Dd(t,e)}function Dd(t,e){return Dd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Dd(t,e)}function Xt(t,e,r){return e=M_(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function M_(t){var e=N6(t,"string");return Bi(e)=="symbol"?e:e+""}function N6(t,e){if(Bi(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Bi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var mo=function(t){function e(){var r;T6(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=$6(this,e,[].concat(i)),Xt(r,"state",{isAnimationFinished:!0,totalLength:0}),Xt(r,"generateSimpleStrokeDasharray",function(o,s){return"".concat(s,"px ").concat(o-s,"px")}),Xt(r,"getStrokeDasharray",function(o,s,u){var l=u.reduce(function(m,b){return m+b});if(!l)return r.generateSimpleStrokeDasharray(s,o);for(var c=Math.floor(o/l),f=o%l,d=s-o,h=[],y=0,v=0;y<u.length;v+=u[y],++y)if(v+u[y]>f){h=[].concat(Ui(u.slice(0,y)),[f-v]);break}var p=h.length%2===0?[0,d]:[d];return[].concat(Ui(e.repeat(u,c)),Ui(h),p).map(function(m){return"".concat(m,"px")}).join(", ")}),Xt(r,"id",an("recharts-line-")),Xt(r,"pathRef",function(o){r.mainCurve=o}),Xt(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),Xt(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return I6(e,t),j6(e,[{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,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.points,s=a.xAxis,u=a.yAxis,l=a.layout,c=a.children,f=Ot(c,Ba);if(!f)return null;var d=function(v,p){return{x:v.x,y:v.y,value:v.value,errorVal:We(v.payload,p)}},h={clipPath:n?"url(#clipPath-".concat(i,")"):null};return x.createElement(pe,h,f.map(function(y){return x.cloneElement(y,{key:"bar-".concat(y.props.dataKey),data:o,xAxis:s,yAxis:u,layout:l,dataPointFormatter:d})}))}},{key:"renderDots",value:function(n,i,a){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var s=this.props,u=s.dot,l=s.points,c=s.dataKey,f=Q(this.props,!1),d=Q(u,!0),h=l.map(function(v,p){var m=Et(Et(Et({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:l});return e.renderDotItem(u,m)}),y={clipPath:n?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return x.createElement(pe,go({className:"recharts-line-dots",key:"dots"},y),h)}},{key:"renderCurveStatically",value:function(n,i,a,o){var s=this.props,u=s.type,l=s.layout,c=s.connectNulls;s.ref;var f=k_(s,_6),d=Et(Et(Et({},Q(f,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(a,")"):null,points:n},o),{},{type:u,layout:l,connectNulls:c});return x.createElement(wn,go({},d,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,i){var a=this,o=this.props,s=o.points,u=o.strokeDasharray,l=o.isAnimationActive,c=o.animationBegin,f=o.animationDuration,d=o.animationEasing,h=o.animationId,y=o.animateNewValues,v=o.width,p=o.height,m=this.state,b=m.prevPoints,w=m.totalLength;return x.createElement(Rt,{begin:c,duration:f,isActive:l,easing:d,from:{t:0},to:{t:1},key:"line-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(O){var g=O.t;if(b){var _=b.length/s.length,S=s.map(function($,k){var I=Math.floor(k*_);if(b[I]){var R=b[I],M=Fe(R.x,$.x),L=Fe(R.y,$.y);return Et(Et({},$),{},{x:M(g),y:L(g)})}if(y){var q=Fe(v*2,$.x),z=Fe(p/2,$.y);return Et(Et({},$),{},{x:q(g),y:z(g)})}return Et(Et({},$),{},{x:$.x,y:$.y})});return a.renderCurveStatically(S,n,i)}var A=Fe(0,w),E=A(g),N;if(u){var j="".concat(u).split(/[,\s]+/gim).map(function($){return parseFloat($)});N=a.getStrokeDasharray(E,w,j)}else N=a.generateSimpleStrokeDasharray(w,E);return a.renderCurveStatically(s,n,i,{strokeDasharray:N})})}},{key:"renderCurve",value:function(n,i){var a=this.props,o=a.points,s=a.isAnimationActive,u=this.state,l=u.prevPoints,c=u.totalLength;return s&&o&&o.length&&(!l&&c>0||!Rr(l,o))?this.renderCurveWithAnimation(n,i):this.renderCurveStatically(o,n,i)}},{key:"render",value:function(){var n,i=this.props,a=i.hide,o=i.dot,s=i.points,u=i.className,l=i.xAxis,c=i.yAxis,f=i.top,d=i.left,h=i.width,y=i.height,v=i.isAnimationActive,p=i.id;if(a||!s||!s.length)return null;var m=this.state.isAnimationFinished,b=s.length===1,w=le("recharts-line",u),O=l&&l.allowDataOverflow,g=c&&c.allowDataOverflow,_=O||g,S=fe(p)?this.id:p,A=(n=Q(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},E=A.r,N=E===void 0?3:E,j=A.strokeWidth,$=j===void 0?2:j,k=Pv(o)?o:{},I=k.clipDot,R=I===void 0?!0:I,M=N*2+$;return x.createElement(pe,{className:w},O||g?x.createElement("defs",null,x.createElement("clipPath",{id:"clipPath-".concat(S)},x.createElement("rect",{x:O?d:d-h/2,y:g?f:f-y/2,width:O?h:h*2,height:g?y:y*2})),!R&&x.createElement("clipPath",{id:"clipPath-dots-".concat(S)},x.createElement("rect",{x:d-M/2,y:f-M/2,width:h+M,height:y+M}))):null,!b&&this.renderCurve(_,S),this.renderErrorBar(_,S),(b||o)&&this.renderDots(_,R,S),(!v||m)&&Ht.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:i.curPoints}:n.points!==i.curPoints?{curPoints:n.points}:null}},{key:"repeat",value:function(n,i){for(var a=n.length%2!==0?[].concat(Ui(n),[0]):n,o=[],s=0;s<i;++s)o=[].concat(Ui(o),Ui(a));return o}},{key:"renderDotItem",value:function(n,i){var a;if(x.isValidElement(n))a=x.cloneElement(n,i);else if(ae(n))a=n(i);else{var o=i.key,s=k_(i,x6),u=le("recharts-line-dot",typeof n!="boolean"?n.className:"");a=x.createElement(wi,go({key:o},s,{className:u}))}return a}}])}(x.PureComponent);Xt(mo,"displayName","Line"),Xt(mo,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!It.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1}),Xt(mo,"getComposedData",function(t){var e=t.props,r=t.xAxis,n=t.yAxis,i=t.xAxisTicks,a=t.yAxisTicks,o=t.dataKey,s=t.bandSize,u=t.displayedData,l=t.offset,c=e.layout,f=u.map(function(d,h){var y=We(d,o);return c==="horizontal"?{x:Xs({axis:r,ticks:i,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:Xs({axis:n,ticks:a,bandSize:s,entry:d,index:h}),value:y,payload:d}});return Et({points:f,layout:c},l)});var M6=["layout","type","stroke","connectNulls","isRange","ref"],D6=["key"],D_;function Fi(t){"@babel/helpers - typeof";return Fi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fi(t)}function R_(t,e){if(t==null)return{};var r=R6(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function R6(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function Tn(){return Tn=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Tn.apply(this,arguments)}function L_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Fr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?L_(Object(r),!0).forEach(function(n){or(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):L_(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function L6(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function B_(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,F_(n.key),n)}}function B6(t,e,r){return e&&B_(t.prototype,e),r&&B_(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function U6(t,e,r){return e=Bu(e),F6(t,U_()?Reflect.construct(e,r||[],Bu(t).constructor):e.apply(t,r))}function F6(t,e){if(e&&(Fi(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return W6(t)}function W6(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function U_(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(U_=function(){return!!t})()}function Bu(t){return Bu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Bu(t)}function q6(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Rd(t,e)}function Rd(t,e){return Rd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Rd(t,e)}function or(t,e,r){return e=F_(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function F_(t){var e=z6(t,"string");return Fi(e)=="symbol"?e:e+""}function z6(t,e){if(Fi(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Fi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Wr=function(t){function e(){var r;L6(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=U6(this,e,[].concat(i)),or(r,"state",{isAnimationFinished:!0}),or(r,"id",an("recharts-area-")),or(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),ae(o)&&o()}),or(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),ae(o)&&o()}),r}return q6(e,t),B6(e,[{key:"renderDots",value:function(n,i,a){var o=this.props.isAnimationActive,s=this.state.isAnimationFinished;if(o&&!s)return null;var u=this.props,l=u.dot,c=u.points,f=u.dataKey,d=Q(this.props,!1),h=Q(l,!0),y=c.map(function(p,m){var b=Fr(Fr(Fr({key:"dot-".concat(m),r:3},d),h),{},{index:m,cx:p.x,cy:p.y,dataKey:f,value:p.value,payload:p.payload,points:c});return e.renderDotItem(l,b)}),v={clipPath:n?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return x.createElement(pe,Tn({className:"recharts-area-dots"},v),y)}},{key:"renderHorizontalRect",value:function(n){var i=this.props,a=i.baseLine,o=i.points,s=i.strokeWidth,u=o[0].x,l=o[o.length-1].x,c=n*Math.abs(u-l),f=Dr(o.map(function(d){return d.y||0}));return V(a)&&typeof a=="number"?f=Math.max(a,f):a&&Array.isArray(a)&&a.length&&(f=Math.max(Dr(a.map(function(d){return d.y||0})),f)),V(f)?x.createElement("rect",{x:u<l?u:u-c,y:0,width:c,height:Math.floor(f+(s?parseInt("".concat(s),10):1))}):null}},{key:"renderVerticalRect",value:function(n){var i=this.props,a=i.baseLine,o=i.points,s=i.strokeWidth,u=o[0].y,l=o[o.length-1].y,c=n*Math.abs(u-l),f=Dr(o.map(function(d){return d.x||0}));return V(a)&&typeof a=="number"?f=Math.max(a,f):a&&Array.isArray(a)&&a.length&&(f=Math.max(Dr(a.map(function(d){return d.x||0})),f)),V(f)?x.createElement("rect",{x:0,y:u<l?u:u-c,width:f+(s?parseInt("".concat(s),10):1),height:Math.floor(c)}):null}},{key:"renderClipRect",value:function(n){var i=this.props.layout;return i==="vertical"?this.renderVerticalRect(n):this.renderHorizontalRect(n)}},{key:"renderAreaStatically",value:function(n,i,a,o){var s=this.props,u=s.layout,l=s.type,c=s.stroke,f=s.connectNulls,d=s.isRange;s.ref;var h=R_(s,M6);return x.createElement(pe,{clipPath:a?"url(#clipPath-".concat(o,")"):null},x.createElement(wn,Tn({},Q(h,!0),{points:n,connectNulls:f,type:l,baseLine:i,layout:u,stroke:"none",className:"recharts-area-area"})),c!=="none"&&x.createElement(wn,Tn({},Q(this.props,!1),{className:"recharts-area-curve",layout:u,type:l,connectNulls:f,fill:"none",points:n})),c!=="none"&&d&&x.createElement(wn,Tn({},Q(this.props,!1),{className:"recharts-area-curve",layout:u,type:l,connectNulls:f,fill:"none",points:i})))}},{key:"renderAreaWithAnimation",value:function(n,i){var a=this,o=this.props,s=o.points,u=o.baseLine,l=o.isAnimationActive,c=o.animationBegin,f=o.animationDuration,d=o.animationEasing,h=o.animationId,y=this.state,v=y.prevPoints,p=y.prevBaseLine;return x.createElement(Rt,{begin:c,duration:f,isActive:l,easing:d,from:{t:0},to:{t:1},key:"area-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(m){var b=m.t;if(v){var w=v.length/s.length,O=s.map(function(A,E){var N=Math.floor(E*w);if(v[N]){var j=v[N],$=Fe(j.x,A.x),k=Fe(j.y,A.y);return Fr(Fr({},A),{},{x:$(b),y:k(b)})}return A}),g;if(V(u)&&typeof u=="number"){var _=Fe(p,u);g=_(b)}else if(fe(u)||Xn(u)){var S=Fe(p,0);g=S(b)}else g=u.map(function(A,E){var N=Math.floor(E*w);if(p[N]){var j=p[N],$=Fe(j.x,A.x),k=Fe(j.y,A.y);return Fr(Fr({},A),{},{x:$(b),y:k(b)})}return A});return a.renderAreaStatically(O,g,n,i)}return x.createElement(pe,null,x.createElement("defs",null,x.createElement("clipPath",{id:"animationClipPath-".concat(i)},a.renderClipRect(b))),x.createElement(pe,{clipPath:"url(#animationClipPath-".concat(i,")")},a.renderAreaStatically(s,u,n,i)))})}},{key:"renderArea",value:function(n,i){var a=this.props,o=a.points,s=a.baseLine,u=a.isAnimationActive,l=this.state,c=l.prevPoints,f=l.prevBaseLine,d=l.totalLength;return u&&o&&o.length&&(!c&&d>0||!Rr(c,o)||!Rr(f,s))?this.renderAreaWithAnimation(n,i):this.renderAreaStatically(o,s,n,i)}},{key:"render",value:function(){var n,i=this.props,a=i.hide,o=i.dot,s=i.points,u=i.className,l=i.top,c=i.left,f=i.xAxis,d=i.yAxis,h=i.width,y=i.height,v=i.isAnimationActive,p=i.id;if(a||!s||!s.length)return null;var m=this.state.isAnimationFinished,b=s.length===1,w=le("recharts-area",u),O=f&&f.allowDataOverflow,g=d&&d.allowDataOverflow,_=O||g,S=fe(p)?this.id:p,A=(n=Q(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},E=A.r,N=E===void 0?3:E,j=A.strokeWidth,$=j===void 0?2:j,k=Pv(o)?o:{},I=k.clipDot,R=I===void 0?!0:I,M=N*2+$;return x.createElement(pe,{className:w},O||g?x.createElement("defs",null,x.createElement("clipPath",{id:"clipPath-".concat(S)},x.createElement("rect",{x:O?c:c-h/2,y:g?l:l-y/2,width:O?h:h*2,height:g?y:y*2})),!R&&x.createElement("clipPath",{id:"clipPath-dots-".concat(S)},x.createElement("rect",{x:c-M/2,y:l-M/2,width:h+M,height:y+M}))):null,b?null:this.renderArea(_,S),(o||b)&&this.renderDots(_,R,S),(!v||m)&&Ht.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,curBaseLine:n.baseLine,prevPoints:i.curPoints,prevBaseLine:i.curBaseLine}:n.points!==i.curPoints||n.baseLine!==i.curBaseLine?{curPoints:n.points,curBaseLine:n.baseLine}:null}}])}(x.PureComponent);D_=Wr,or(Wr,"displayName","Area"),or(Wr,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!It.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"}),or(Wr,"getBaseValue",function(t,e,r,n){var i=t.layout,a=t.baseValue,o=e.props.baseValue,s=o??a;if(V(s)&&typeof s=="number")return s;var u=i==="horizontal"?n:r,l=u.scale.domain();if(u.type==="number"){var c=Math.max(l[0],l[1]),f=Math.min(l[0],l[1]);return s==="dataMin"?f:s==="dataMax"||c<0?c:Math.max(Math.min(l[0],l[1]),0)}return s==="dataMin"?l[0]:s==="dataMax"?l[1]:l[0]}),or(Wr,"getComposedData",function(t){var e=t.props,r=t.item,n=t.xAxis,i=t.yAxis,a=t.xAxisTicks,o=t.yAxisTicks,s=t.bandSize,u=t.dataKey,l=t.stackedData,c=t.dataStartIndex,f=t.displayedData,d=t.offset,h=e.layout,y=l&&l.length,v=D_.getBaseValue(e,r,n,i),p=h==="horizontal",m=!1,b=f.map(function(O,g){var _;y?_=l[c+g]:(_=We(O,u),Array.isArray(_)?m=!0:_=[v,_]);var S=_[1]==null||y&&We(O,u)==null;return p?{x:Xs({axis:n,ticks:a,bandSize:s,entry:O,index:g}),y:S?null:i.scale(_[1]),value:_,payload:O}:{x:S?null:n.scale(_[1]),y:Xs({axis:i,ticks:o,bandSize:s,entry:O,index:g}),value:_,payload:O}}),w;return y||m?w=b.map(function(O){var g=Array.isArray(O.value)?O.value[0]:null;return p?{x:O.x,y:g!=null&&O.y!=null?i.scale(g):null}:{x:g!=null?n.scale(g):null,y:O.y}}):w=p?i.scale(v):n.scale(v),Fr({points:b,baseLine:w,layout:h,isRange:m},d)}),or(Wr,"renderDotItem",function(t,e){var r;if(x.isValidElement(t))r=x.cloneElement(t,e);else if(ae(t))r=t(e);else{var n=le("recharts-area-dot",typeof t!="boolean"?t.className:""),i=e.key,a=R_(e,D6);r=x.createElement(wi,Tn({},a,{key:i,className:n}))}return r});function Wi(t){"@babel/helpers - typeof";return Wi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wi(t)}function K6(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function V6(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,z_(n.key),n)}}function H6(t,e,r){return e&&V6(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function G6(t,e,r){return e=Uu(e),Y6(t,W_()?Reflect.construct(e,r||[],Uu(t).constructor):e.apply(t,r))}function Y6(t,e){if(e&&(Wi(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return X6(t)}function X6(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function W_(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(W_=function(){return!!t})()}function Uu(t){return Uu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Uu(t)}function J6(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ld(t,e)}function Ld(t,e){return Ld=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Ld(t,e)}function q_(t,e,r){return e=z_(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function z_(t){var e=Z6(t,"string");return Wi(e)=="symbol"?e:e+""}function Z6(t,e){if(Wi(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Wi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Bd(){return Bd=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Bd.apply(this,arguments)}function Q6(t){var e=t.xAxisId,r=_d(),n=xd(),i=s_(e);return i==null?null:ve.createElement(Ri,Bd({},i,{className:le("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(o){return wr(o,!0)}}))}var qr=function(t){function e(){return K6(this,e),G6(this,e,arguments)}return J6(e,t),H6(e,[{key:"render",value:function(){return ve.createElement(Q6,this.props)}}])}(ve.Component);q_(qr,"displayName","XAxis"),q_(qr,"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 qi(t){"@babel/helpers - typeof";return qi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qi(t)}function e5(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function t5(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,H_(n.key),n)}}function r5(t,e,r){return e&&t5(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function n5(t,e,r){return e=Fu(e),i5(t,K_()?Reflect.construct(e,r||[],Fu(t).constructor):e.apply(t,r))}function i5(t,e){if(e&&(qi(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return a5(t)}function a5(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function K_(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(K_=function(){return!!t})()}function Fu(t){return Fu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Fu(t)}function o5(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ud(t,e)}function Ud(t,e){return Ud=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Ud(t,e)}function V_(t,e,r){return e=H_(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function H_(t){var e=s5(t,"string");return qi(e)=="symbol"?e:e+""}function s5(t,e){if(qi(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(qi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Fd(){return Fd=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Fd.apply(this,arguments)}var u5=function(e){var r=e.yAxisId,n=_d(),i=xd(),a=u_(r);return a==null?null:ve.createElement(Ri,Fd({},a,{className:le("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:n,height:i},ticksGenerator:function(s){return wr(s,!0)}}))},zr=function(t){function e(){return e5(this,e),n5(this,e,arguments)}return o5(e,t),r5(e,[{key:"render",value:function(){return ve.createElement(u5,this.props)}}])}(ve.Component);V_(zr,"displayName","YAxis"),V_(zr,"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 G_(t){return d5(t)||f5(t)||c5(t)||l5()}function l5(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
166
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function c5(t,e){if(t){if(typeof t=="string")return Wd(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Wd(t,e)}}function f5(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function d5(t){if(Array.isArray(t))return Wd(t)}function Wd(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var qd=function(e,r,n,i,a){var o=Ot(e,Pd),s=Ot(e,ku),u=[].concat(G_(o),G_(s)),l=Ot(e,Nu),c="".concat(i,"Id"),f=i[0],d=r;if(u.length&&(d=u.reduce(function(v,p){if(p.props[c]===n&&ar(p.props,"extendDomain")&&V(p.props[f])){var m=p.props[f];return[Math.min(v[0],m),Math.max(v[1],m)]}return v},d)),l.length){var h="".concat(f,"1"),y="".concat(f,"2");d=l.reduce(function(v,p){if(p.props[c]===n&&ar(p.props,"extendDomain")&&V(p.props[h])&&V(p.props[y])){var m=p.props[h],b=p.props[y];return[Math.min(v[0],m,b),Math.max(v[1],m,b)]}return v},d)}return a&&a.length&&(d=a.reduce(function(v,p){return V(p)?[Math.min(v[0],p),Math.max(v[1],p)]:v},d)),d},Y_={exports:{}};(function(t){var e=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(u,l,c){this.fn=u,this.context=l,this.once=c||!1}function a(u,l,c,f,d){if(typeof c!="function")throw new TypeError("The listener must be a function");var h=new i(c,f||u,d),y=r?r+l:l;return u._events[y]?u._events[y].fn?u._events[y]=[u._events[y],h]:u._events[y].push(h):(u._events[y]=h,u._eventsCount++),u}function o(u,l){--u._eventsCount===0?u._events=new n:delete u._events[l]}function s(){this._events=new n,this._eventsCount=0}s.prototype.eventNames=function(){var l=[],c,f;if(this._eventsCount===0)return l;for(f in c=this._events)e.call(c,f)&&l.push(r?f.slice(1):f);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(c)):l},s.prototype.listeners=function(l){var c=r?r+l:l,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(l){var c=r?r+l:l,f=this._events[c];return f?f.fn?1:f.length:0},s.prototype.emit=function(l,c,f,d,h,y){var v=r?r+l:l;if(!this._events[v])return!1;var p=this._events[v],m=arguments.length,b,w;if(p.fn){switch(p.once&&this.removeListener(l,p.fn,void 0,!0),m){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,b=new Array(m-1);w<m;w++)b[w-1]=arguments[w];p.fn.apply(p.context,b)}else{var O=p.length,g;for(w=0;w<O;w++)switch(p[w].once&&this.removeListener(l,p[w].fn,void 0,!0),m){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(!b)for(g=1,b=new Array(m-1);g<m;g++)b[g-1]=arguments[g];p[w].fn.apply(p[w].context,b)}}return!0},s.prototype.on=function(l,c,f){return a(this,l,c,f,!1)},s.prototype.once=function(l,c,f){return a(this,l,c,f,!0)},s.prototype.removeListener=function(l,c,f,d){var h=r?r+l:l;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=[],m=y.length;v<m;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(l){var c;return l?(c=r?r+l:l,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,t.exports=s})(Y_);var h5=Y_.exports;const p5=je(h5);var zd=new p5,Kd="recharts.syncMouseEvents";function bo(t){"@babel/helpers - typeof";return bo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bo(t)}function v5(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function y5(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,X_(n.key),n)}}function g5(t,e,r){return e&&y5(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function Vd(t,e,r){return e=X_(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function X_(t){var e=m5(t,"string");return bo(e)=="symbol"?e:e+""}function m5(t,e){if(bo(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(bo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var b5=function(){function t(){v5(this,t),Vd(this,"activeIndex",0),Vd(this,"coordinateList",[]),Vd(this,"layout","horizontal")}return g5(t,[{key:"setDetails",value:function(r){var n,i=r.coordinateList,a=i===void 0?null:i,o=r.container,s=o===void 0?null:o,u=r.layout,l=u===void 0?null:u,c=r.offset,f=c===void 0?null:c,d=r.mouseHandlerCallback,h=d===void 0?null:d;this.coordinateList=(n=a??this.coordinateList)!==null&&n!==void 0?n:[],this.container=s??this.container,this.layout=l??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 i=this.container.getBoundingClientRect(),a=i.x,o=i.y,s=i.height,u=this.coordinateList[this.activeIndex].coordinate,l=((r=window)===null||r===void 0?void 0:r.scrollX)||0,c=((n=window)===null||n===void 0?void 0:n.scrollY)||0,f=a+u+l,d=o+this.offset.top+s/2+c;this.mouseHandlerCallback({pageX:f,pageY:d})}}}])}();function w5(t,e,r){if(r==="number"&&e===!0&&Array.isArray(t)){var n=t==null?void 0:t[0],i=t==null?void 0:t[1];if(n&&i&&V(n)&&V(i))return!0}return!1}function _5(t,e,r,n){var i=n/2;return{stroke:"none",fill:"#ccc",x:t==="horizontal"?e.x-i:r.left+.5,y:t==="horizontal"?r.top+.5:e.y-i,width:t==="horizontal"?n:r.width-1,height:t==="horizontal"?r.height-1:n}}function J_(t){var e=t.cx,r=t.cy,n=t.radius,i=t.startAngle,a=t.endAngle,o=we(e,r,n,i),s=we(e,r,n,a);return{points:[o,s],cx:e,cy:r,radius:n,startAngle:i,endAngle:a}}function x5(t,e,r){var n,i,a,o;if(t==="horizontal")n=e.x,a=n,i=r.top,o=r.top+r.height;else if(t==="vertical")i=e.y,o=i,n=r.left,a=r.left+r.width;else if(e.cx!=null&&e.cy!=null)if(t==="centric"){var s=e.cx,u=e.cy,l=e.innerRadius,c=e.outerRadius,f=e.angle,d=we(s,u,l,f),h=we(s,u,c,f);n=d.x,i=d.y,a=h.x,o=h.y}else return J_(e);return[{x:n,y:i},{x:a,y:o}]}function wo(t){"@babel/helpers - typeof";return wo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wo(t)}function Z_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Wu(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Z_(Object(r),!0).forEach(function(n){O5(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Z_(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function O5(t,e,r){return e=S5(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function S5(t){var e=A5(t,"string");return wo(e)=="symbol"?e:e+""}function A5(t,e){if(wo(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(wo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function P5(t){var e,r,n=t.element,i=t.tooltipEventType,a=t.isActive,o=t.activeCoordinate,s=t.activePayload,u=t.offset,l=t.activeTooltipIndex,c=t.tooltipAxisBandSize,f=t.layout,d=t.chartName,h=(e=n.props.cursor)!==null&&e!==void 0?e:(r=n.type.defaultProps)===null||r===void 0?void 0:r.cursor;if(!n||!h||!a||!o||d!=="ScatterChart"&&i!=="axis")return null;var y,v=wn;if(d==="ScatterChart")y=o,v=lK;else if(d==="BarChart")y=_5(f,o,u,c),v=id;else if(f==="radial"){var p=J_(o),m=p.cx,b=p.cy,w=p.radius,O=p.startAngle,g=p.endAngle;y={cx:m,cy:b,startAngle:O,endAngle:g,innerRadius:w,outerRadius:w},v=u0}else y={points:x5(f,o,u)},v=wn;var _=Wu(Wu(Wu(Wu({stroke:"#ccc",pointerEvents:"none"},u),y),Q(h,!1)),{},{payload:s,payloadIndex:l,className:le("recharts-tooltip-cursor",h.className)});return x.isValidElement(h)?x.cloneElement(h,_):x.createElement(v,_)}var E5=["item"],T5=["children","className","width","height","style","compact","title","desc"];function zi(t){"@babel/helpers - typeof";return zi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zi(t)}function Ki(){return Ki=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Ki.apply(this,arguments)}function Q_(t,e){return k5(t)||$5(t,e)||rx(t,e)||j5()}function j5(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
167
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $5(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,o,s=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(c){l=!0,i=c}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function k5(t){if(Array.isArray(t))return t}function ex(t,e){if(t==null)return{};var r=C5(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function C5(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function I5(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function N5(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ix(n.key),n)}}function M5(t,e,r){return e&&N5(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function D5(t,e,r){return e=qu(e),R5(t,tx()?Reflect.construct(e,r||[],qu(t).constructor):e.apply(t,r))}function R5(t,e){if(e&&(zi(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return L5(t)}function L5(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function tx(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(tx=function(){return!!t})()}function qu(t){return qu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},qu(t)}function B5(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Hd(t,e)}function Hd(t,e){return Hd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Hd(t,e)}function Vi(t){return W5(t)||F5(t)||rx(t)||U5()}function U5(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
168
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rx(t,e){if(t){if(typeof t=="string")return Gd(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Gd(t,e)}}function F5(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function W5(t){if(Array.isArray(t))return Gd(t)}function Gd(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function nx(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function U(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?nx(Object(r),!0).forEach(function(n){se(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):nx(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function se(t,e,r){return e=ix(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ix(t){var e=q5(t,"string");return zi(e)=="symbol"?e:e+""}function q5(t,e){if(zi(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(zi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var z5={xAxis:["bottom","top"],yAxis:["left","right"]},K5={width:"100%",height:"100%"},ax={x:0,y:0};function zu(t){return t}var V5=function(e,r){return r==="horizontal"?e.x:r==="vertical"?e.y:r==="centric"?e.angle:e.radius},H5=function(e,r,n,i){var a=r.find(function(c){return c&&c.index===n});if(a){if(e==="horizontal")return{x:a.coordinate,y:i.y};if(e==="vertical")return{x:i.x,y:a.coordinate};if(e==="centric"){var o=a.coordinate,s=i.radius;return U(U(U({},i),we(i.cx,i.cy,s,o)),{},{angle:o,radius:s})}var u=a.coordinate,l=i.angle;return U(U(U({},i),we(i.cx,i.cy,u,l)),{},{angle:l,radius:u})}return ax},Ku=function(e,r){var n=r.graphicalItems,i=r.dataStartIndex,a=r.dataEndIndex,o=(n??[]).reduce(function(s,u){var l=u.props.data;return l&&l.length?[].concat(Vi(s),Vi(l)):s},[]);return o.length>0?o:e&&e.length&&V(i)&&V(a)?e.slice(i,a+1):[]};function ox(t){return t==="number"?[0,"auto"]:void 0}var Yd=function(e,r,n,i){var a=e.graphicalItems,o=e.tooltipAxis,s=Ku(r,e);return n<0||!a||!a.length||n>=s.length?null:a.reduce(function(u,l){var c,f=(c=l.props.data)!==null&&c!==void 0?c:r;f&&e.dataStartIndex+e.dataEndIndex!==0&&e.dataEndIndex-e.dataStartIndex>=n&&(f=f.slice(e.dataStartIndex,e.dataEndIndex+1));var d;if(o.dataKey&&!o.allowDuplicatedCategory){var h=f===void 0?s:f;d=Yo(h,o.dataKey,i)}else d=f&&f[n]||s[n];return d?[].concat(Vi(u),[Kb(l,d)]):u},[])},sx=function(e,r,n,i){var a=i||{x:e.chartX,y:e.chartY},o=V5(a,n),s=e.orderedTooltipTicks,u=e.tooltipAxis,l=e.tooltipTicks,c=kW(o,s,l,u);if(c>=0&&l){var f=l[c]&&l[c].value,d=Yd(e,r,c,f),h=H5(n,s,c,a);return{activeTooltipIndex:c,activeLabel:f,activePayload:d,activeCoordinate:h}}return null},G5=function(e,r){var n=r.axes,i=r.graphicalItems,a=r.axisType,o=r.axisIdKey,s=r.stackGroups,u=r.dataStartIndex,l=r.dataEndIndex,c=e.layout,f=e.children,d=e.stackOffset,h=Nb(c,a);return n.reduce(function(y,v){var p,m=v.type.defaultProps!==void 0?U(U({},v.type.defaultProps),v.props):v.props,b=m.type,w=m.dataKey,O=m.allowDataOverflow,g=m.allowDuplicatedCategory,_=m.scale,S=m.ticks,A=m.includeHidden,E=m[o];if(y[E])return y;var N=Ku(e.data,{graphicalItems:i.filter(function(F){var G,J=o in F.props?F.props[o]:(G=F.type.defaultProps)===null||G===void 0?void 0:G[o];return J===E}),dataStartIndex:u,dataEndIndex:l}),j=N.length,$,k,I;w5(m.domain,O,b)&&($=Mf(m.domain,null,O),h&&(b==="number"||_!=="auto")&&(I=Wa(N,w,"category")));var R=ox(b);if(!$||$.length===0){var M,L=(M=m.domain)!==null&&M!==void 0?M:R;if(w){if($=Wa(N,w,b),b==="category"&&h){var q=wT($);g&&q?(k=$,$=_u(0,j)):g||($=zb(L,$,v).reduce(function(F,G){return F.indexOf(G)>=0?F:[].concat(Vi(F),[G])},[]))}else if(b==="category")g?$=$.filter(function(F){return F!==""&&!fe(F)}):$=zb(L,$,v).reduce(function(F,G){return F.indexOf(G)>=0||G===""||fe(G)?F:[].concat(Vi(F),[G])},[]);else if(b==="number"){var z=DW(N,i.filter(function(F){var G,J,re=o in F.props?F.props[o]:(G=F.type.defaultProps)===null||G===void 0?void 0:G[o],ne="hide"in F.props?F.props.hide:(J=F.type.defaultProps)===null||J===void 0?void 0:J.hide;return re===E&&(A||!ne)}),w,a,c);z&&($=z)}h&&(b==="number"||_!=="auto")&&(I=Wa(N,w,"category"))}else h?$=_u(0,j):s&&s[E]&&s[E].hasStack&&b==="number"?$=d==="expand"?[0,1]:Fb(s[E].stackGroups,u,l):$=Ib(N,i.filter(function(F){var G=o in F.props?F.props[o]:F.type.defaultProps[o],J="hide"in F.props?F.props.hide:F.type.defaultProps.hide;return G===E&&(A||!J)}),b,c,!0);if(b==="number")$=qd(f,$,E,a,S),L&&($=Mf(L,$,O));else if(b==="category"&&L){var D=L,B=$.every(function(F){return D.indexOf(F)>=0});B&&($=D)}}return U(U({},y),{},se({},E,U(U({},m),{},{axisType:a,domain:$,categoricalDomain:I,duplicateDomain:k,originalDomain:(p=m.domain)!==null&&p!==void 0?p:R,isCategorical:h,layout:c})))},{})},Y5=function(e,r){var n=r.graphicalItems,i=r.Axis,a=r.axisType,o=r.axisIdKey,s=r.stackGroups,u=r.dataStartIndex,l=r.dataEndIndex,c=e.layout,f=e.children,d=Ku(e.data,{graphicalItems:n,dataStartIndex:u,dataEndIndex:l}),h=d.length,y=Nb(c,a),v=-1;return n.reduce(function(p,m){var b=m.type.defaultProps!==void 0?U(U({},m.type.defaultProps),m.props):m.props,w=b[o],O=ox("number");if(!p[w]){v++;var g;return y?g=_u(0,h):s&&s[w]&&s[w].hasStack?(g=Fb(s[w].stackGroups,u,l),g=qd(f,g,w,a)):(g=Mf(O,Ib(d,n.filter(function(_){var S,A,E=o in _.props?_.props[o]:(S=_.type.defaultProps)===null||S===void 0?void 0:S[o],N="hide"in _.props?_.props.hide:(A=_.type.defaultProps)===null||A===void 0?void 0:A.hide;return E===w&&!N}),"number",c),i.defaultProps.allowDataOverflow),g=qd(f,g,w,a)),U(U({},p),{},se({},w,U(U({axisType:a},i.defaultProps),{},{hide:!0,orientation:xt(z5,"".concat(a,".").concat(v%2),null),domain:g,originalDomain:O,isCategorical:y,layout:c})))}return p},{})},X5=function(e,r){var n=r.axisType,i=n===void 0?"xAxis":n,a=r.AxisComp,o=r.graphicalItems,s=r.stackGroups,u=r.dataStartIndex,l=r.dataEndIndex,c=e.children,f="".concat(i,"Id"),d=Ot(c,a),h={};return d&&d.length?h=G5(e,{axes:d,graphicalItems:o,axisType:i,axisIdKey:f,stackGroups:s,dataStartIndex:u,dataEndIndex:l}):o&&o.length&&(h=Y5(e,{Axis:a,graphicalItems:o,axisType:i,axisIdKey:f,stackGroups:s,dataStartIndex:u,dataEndIndex:l})),h},J5=function(e){var r=Cr(e),n=wr(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:Tc(n,function(i){return i.coordinate}),tooltipAxis:r,tooltipAxisBandSize:Js(r,n)}},ux=function(e){var r=e.children,n=e.defaultShowTooltip,i=St(r,ji),a=0,o=0;return e.data&&e.data.length!==0&&(o=e.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(o=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!n}},Z5=function(e){return!e||!e.length?!1:e.some(function(r){var n=fr(r&&r.type);return n&&n.indexOf("Bar")>=0})},lx=function(e){return e==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:e==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:e==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},Q5=function(e,r){var n=e.props,i=e.graphicalItems,a=e.xAxisMap,o=a===void 0?{}:a,s=e.yAxisMap,u=s===void 0?{}:s,l=n.width,c=n.height,f=n.children,d=n.margin||{},h=St(f,ji),y=St(f,ln),v=Object.keys(u).reduce(function(g,_){var S=u[_],A=S.orientation;return!S.mirror&&!S.hide?U(U({},g),{},se({},A,g[A]+S.width)):g},{left:d.left||0,right:d.right||0}),p=Object.keys(o).reduce(function(g,_){var S=o[_],A=S.orientation;return!S.mirror&&!S.hide?U(U({},g),{},se({},A,xt(g,"".concat(A))+S.height)):g},{top:d.top||0,bottom:d.bottom||0}),m=U(U({},p),v),b=m.bottom;h&&(m.bottom+=h.props.height||ji.defaultProps.height),y&&r&&(m=NW(m,i,n,r));var w=l-m.left-m.right,O=c-m.top-m.bottom;return U(U({brushBottom:b},m),{},{width:Math.max(w,0),height:Math.max(O,0)})},e4=function(e,r){if(r==="xAxis")return e[r].width;if(r==="yAxis")return e[r].height},_o=function(e){var r=e.chartName,n=e.GraphicalChild,i=e.defaultTooltipEventType,a=i===void 0?"axis":i,o=e.validateTooltipEventTypes,s=o===void 0?["axis"]:o,u=e.axisComponents,l=e.legendContent,c=e.formatAxisMap,f=e.defaultProps,d=function(m,b){var w=b.graphicalItems,O=b.stackGroups,g=b.offset,_=b.updateId,S=b.dataStartIndex,A=b.dataEndIndex,E=m.barSize,N=m.layout,j=m.barGap,$=m.barCategoryGap,k=m.maxBarSize,I=lx(N),R=I.numericAxisName,M=I.cateAxisName,L=Z5(w),q=[];return w.forEach(function(z,D){var B=Ku(m.data,{graphicalItems:[z],dataStartIndex:S,dataEndIndex:A}),F=z.type.defaultProps!==void 0?U(U({},z.type.defaultProps),z.props):z.props,G=F.dataKey,J=F.maxBarSize,re=F["".concat(R,"Id")],ne=F["".concat(M,"Id")],ue={},oe=u.reduce(function(Ar,jt){var So,Ao,Xi=b["".concat(jt.axisType,"Map")],Po=F["".concat(jt.axisType,"Id")];Xi&&Xi[Po]||jt.axisType==="zAxis"||(process.env.NODE_ENV!=="production"?mt(!1,"Specifying a(n) ".concat(jt.axisType,"Id requires a corresponding ").concat(jt.axisType,"Id on the targeted graphical component ").concat((So=z==null||(Ao=z.type)===null||Ao===void 0?void 0:Ao.displayName)!==null&&So!==void 0?So:"")):mt());var Kr=Xi[Po];return U(U({},Ar),{},se(se({},jt.axisType,Kr),"".concat(jt.axisType,"Ticks"),wr(Kr)))},ue),W=oe[M],Y=oe["".concat(M,"Ticks")],te=O&&O[re]&&O[re].hasStack&&KW(z,O[re].stackGroups),C=fr(z.type).indexOf("Bar")>=0,ye=Js(W,Y),H=[],_e=L&&CW({barSize:E,stackGroups:O,totalSize:e4(oe,M)});if(C){var Ee,Ge,Jt=fe(J)?k:J,Zt=(Ee=(Ge=Js(W,Y,!0))!==null&&Ge!==void 0?Ge:Jt)!==null&&Ee!==void 0?Ee:0;H=IW({barGap:j,barCategoryGap:$,bandSize:Zt!==ye?Zt:ye,sizeList:_e[ne],maxBarSize:Jt}),Zt!==ye&&(H=H.map(function(Ar){return U(U({},Ar),{},{position:U(U({},Ar.position),{},{offset:Ar.position.offset-Zt/2})})}))}var Yi=z&&z.type&&z.type.getComposedData;Yi&&q.push({props:U(U({},Yi(U(U({},oe),{},{displayedData:B,props:m,dataKey:G,item:z,bandSize:ye,barPosition:H,offset:g,stackedData:te,layout:N,dataStartIndex:S,dataEndIndex:A}))),{},se(se(se({key:z.key||"item-".concat(D)},R,oe[R]),M,oe[M]),"animationId",_)),childIndex:CT(z,m.children),item:z})}),q},h=function(m,b){var w=m.props,O=m.dataStartIndex,g=m.dataEndIndex,_=m.updateId;if(!Av({props:w}))return null;var S=w.children,A=w.layout,E=w.stackOffset,N=w.data,j=w.reverseStackOrder,$=lx(A),k=$.numericAxisName,I=$.cateAxisName,R=Ot(S,n),M=qW(N,R,"".concat(k,"Id"),"".concat(I,"Id"),E,j),L=u.reduce(function(F,G){var J="".concat(G.axisType,"Map");return U(U({},F),{},se({},J,X5(w,U(U({},G),{},{graphicalItems:R,stackGroups:G.axisType===k&&M,dataStartIndex:O,dataEndIndex:g}))))},{}),q=Q5(U(U({},L),{},{props:w,graphicalItems:R}),b==null?void 0:b.legendBBox);Object.keys(L).forEach(function(F){L[F]=c(w,L[F],q,F.replace("Map",""),r)});var z=L["".concat(I,"Map")],D=J5(z),B=d(w,U(U({},L),{},{dataStartIndex:O,dataEndIndex:g,updateId:_,graphicalItems:R,stackGroups:M,offset:q}));return U(U({formattedGraphicalItems:B,graphicalItems:R,offset:q,stackGroups:M},D),L)},y=function(p){function m(b){var w,O,g;return I5(this,m),g=D5(this,m,[b]),se(g,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),se(g,"accessibilityManager",new b5),se(g,"handleLegendBBoxUpdate",function(_){if(_){var S=g.state,A=S.dataStartIndex,E=S.dataEndIndex,N=S.updateId;g.setState(U({legendBBox:_},h({props:g.props,dataStartIndex:A,dataEndIndex:E,updateId:N},U(U({},g.state),{},{legendBBox:_}))))}}),se(g,"handleReceiveSyncEvent",function(_,S,A){if(g.props.syncId===_){if(A===g.eventEmitterSymbol&&typeof g.props.syncMethod!="function")return;g.applySyncEvent(S)}}),se(g,"handleBrushChange",function(_){var S=_.startIndex,A=_.endIndex;if(S!==g.state.dataStartIndex||A!==g.state.dataEndIndex){var E=g.state.updateId;g.setState(function(){return U({dataStartIndex:S,dataEndIndex:A},h({props:g.props,dataStartIndex:S,dataEndIndex:A,updateId:E},g.state))}),g.triggerSyncEvent({dataStartIndex:S,dataEndIndex:A})}}),se(g,"handleMouseEnter",function(_){var S=g.getMouseInfo(_);if(S){var A=U(U({},S),{},{isTooltipActive:!0});g.setState(A),g.triggerSyncEvent(A);var E=g.props.onMouseEnter;ae(E)&&E(A,_)}}),se(g,"triggeredAfterMouseMove",function(_){var S=g.getMouseInfo(_),A=S?U(U({},S),{},{isTooltipActive:!0}):{isTooltipActive:!1};g.setState(A),g.triggerSyncEvent(A);var E=g.props.onMouseMove;ae(E)&&E(A,_)}),se(g,"handleItemMouseEnter",function(_){g.setState(function(){return{isTooltipActive:!0,activeItem:_,activePayload:_.tooltipPayload,activeCoordinate:_.tooltipPosition||{x:_.cx,y:_.cy}}})}),se(g,"handleItemMouseLeave",function(){g.setState(function(){return{isTooltipActive:!1}})}),se(g,"handleMouseMove",function(_){_.persist(),g.throttleTriggeredAfterMouseMove(_)}),se(g,"handleMouseLeave",function(_){g.throttleTriggeredAfterMouseMove.cancel();var S={isTooltipActive:!1};g.setState(S),g.triggerSyncEvent(S);var A=g.props.onMouseLeave;ae(A)&&A(S,_)}),se(g,"handleOuterEvent",function(_){var S=kT(_),A=xt(g.props,"".concat(S));if(S&&ae(A)){var E,N;/.*touch.*/i.test(S)?N=g.getMouseInfo(_.changedTouches[0]):N=g.getMouseInfo(_),A((E=N)!==null&&E!==void 0?E:{},_)}}),se(g,"handleClick",function(_){var S=g.getMouseInfo(_);if(S){var A=U(U({},S),{},{isTooltipActive:!0});g.setState(A),g.triggerSyncEvent(A);var E=g.props.onClick;ae(E)&&E(A,_)}}),se(g,"handleMouseDown",function(_){var S=g.props.onMouseDown;if(ae(S)){var A=g.getMouseInfo(_);S(A,_)}}),se(g,"handleMouseUp",function(_){var S=g.props.onMouseUp;if(ae(S)){var A=g.getMouseInfo(_);S(A,_)}}),se(g,"handleTouchMove",function(_){_.changedTouches!=null&&_.changedTouches.length>0&&g.throttleTriggeredAfterMouseMove(_.changedTouches[0])}),se(g,"handleTouchStart",function(_){_.changedTouches!=null&&_.changedTouches.length>0&&g.handleMouseDown(_.changedTouches[0])}),se(g,"handleTouchEnd",function(_){_.changedTouches!=null&&_.changedTouches.length>0&&g.handleMouseUp(_.changedTouches[0])}),se(g,"handleDoubleClick",function(_){var S=g.props.onDoubleClick;if(ae(S)){var A=g.getMouseInfo(_);S(A,_)}}),se(g,"handleContextMenu",function(_){var S=g.props.onContextMenu;if(ae(S)){var A=g.getMouseInfo(_);S(A,_)}}),se(g,"triggerSyncEvent",function(_){g.props.syncId!==void 0&&zd.emit(Kd,g.props.syncId,_,g.eventEmitterSymbol)}),se(g,"applySyncEvent",function(_){var S=g.props,A=S.layout,E=S.syncMethod,N=g.state.updateId,j=_.dataStartIndex,$=_.dataEndIndex;if(_.dataStartIndex!==void 0||_.dataEndIndex!==void 0)g.setState(U({dataStartIndex:j,dataEndIndex:$},h({props:g.props,dataStartIndex:j,dataEndIndex:$,updateId:N},g.state)));else if(_.activeTooltipIndex!==void 0){var k=_.chartX,I=_.chartY,R=_.activeTooltipIndex,M=g.state,L=M.offset,q=M.tooltipTicks;if(!L)return;if(typeof E=="function")R=E(q,_);else if(E==="value"){R=-1;for(var z=0;z<q.length;z++)if(q[z].value===_.activeLabel){R=z;break}}var D=U(U({},L),{},{x:L.left,y:L.top}),B=Math.min(k,D.x+D.width),F=Math.min(I,D.y+D.height),G=q[R]&&q[R].value,J=Yd(g.state,g.props.data,R),re=q[R]?{x:A==="horizontal"?q[R].coordinate:B,y:A==="horizontal"?F:q[R].coordinate}:ax;g.setState(U(U({},_),{},{activeLabel:G,activeCoordinate:re,activePayload:J,activeTooltipIndex:R}))}else g.setState(_)}),se(g,"renderCursor",function(_){var S,A=g.state,E=A.isTooltipActive,N=A.activeCoordinate,j=A.activePayload,$=A.offset,k=A.activeTooltipIndex,I=A.tooltipAxisBandSize,R=g.getTooltipEventType(),M=(S=_.props.active)!==null&&S!==void 0?S:E,L=g.props.layout,q=_.key||"_recharts-cursor";return x.createElement(P5,{key:q,activeCoordinate:N,activePayload:j,activeTooltipIndex:k,chartName:r,element:_,isActive:M,layout:L,offset:$,tooltipAxisBandSize:I,tooltipEventType:R})}),se(g,"renderPolarAxis",function(_,S,A){var E=xt(_,"type.axisType"),N=xt(g.state,"".concat(E,"Map")),j=_.type.defaultProps,$=j!==void 0?U(U({},j),_.props):_.props,k=N&&N[$["".concat(E,"Id")]];return x.cloneElement(_,U(U({},k),{},{className:le(E,k.className),key:_.key||"".concat(S,"-").concat(A),ticks:wr(k,!0)}))}),se(g,"renderPolarGrid",function(_){var S=_.props,A=S.radialLines,E=S.polarAngles,N=S.polarRadius,j=g.state,$=j.radiusAxisMap,k=j.angleAxisMap,I=Cr($),R=Cr(k),M=R.cx,L=R.cy,q=R.innerRadius,z=R.outerRadius;return x.cloneElement(_,{polarAngles:Array.isArray(E)?E:wr(R,!0).map(function(D){return D.coordinate}),polarRadius:Array.isArray(N)?N:wr(I,!0).map(function(D){return D.coordinate}),cx:M,cy:L,innerRadius:q,outerRadius:z,key:_.key||"polar-grid",radialLines:A})}),se(g,"renderLegend",function(){var _=g.state.formattedGraphicalItems,S=g.props,A=S.children,E=S.width,N=S.height,j=g.props.margin||{},$=E-(j.left||0)-(j.right||0),k=jb({children:A,formattedGraphicalItems:_,legendWidth:$,legendContent:l});if(!k)return null;var I=k.item,R=ex(k,E5);return x.cloneElement(I,U(U({},R),{},{chartWidth:E,chartHeight:N,margin:j,onBBoxUpdate:g.handleLegendBBoxUpdate}))}),se(g,"renderTooltip",function(){var _,S=g.props,A=S.children,E=S.accessibilityLayer,N=St(A,tr);if(!N)return null;var j=g.state,$=j.isTooltipActive,k=j.activeCoordinate,I=j.activePayload,R=j.activeLabel,M=j.offset,L=(_=N.props.active)!==null&&_!==void 0?_:$;return x.cloneElement(N,{viewBox:U(U({},M),{},{x:M.left,y:M.top}),active:L,label:R,payload:L?I:[],coordinate:k,accessibilityLayer:E})}),se(g,"renderBrush",function(_){var S=g.props,A=S.margin,E=S.data,N=g.state,j=N.offset,$=N.dataStartIndex,k=N.dataEndIndex,I=N.updateId;return x.cloneElement(_,{key:_.key||"_recharts-brush",onChange:Ys(g.handleBrushChange,_.props.onChange),data:E,x:V(_.props.x)?_.props.x:j.left,y:V(_.props.y)?_.props.y:j.top+j.height+j.brushBottom-(A.bottom||0),width:V(_.props.width)?_.props.width:j.width,startIndex:$,endIndex:k,updateId:"brush-".concat(I)})}),se(g,"renderReferenceElement",function(_,S,A){if(!_)return null;var E=g,N=E.clipPathId,j=g.state,$=j.xAxisMap,k=j.yAxisMap,I=j.offset,R=_.type.defaultProps||{},M=_.props,L=M.xAxisId,q=L===void 0?R.xAxisId:L,z=M.yAxisId,D=z===void 0?R.yAxisId:z;return x.cloneElement(_,{key:_.key||"".concat(S,"-").concat(A),xAxis:$[q],yAxis:k[D],viewBox:{x:I.left,y:I.top,width:I.width,height:I.height},clipPathId:N})}),se(g,"renderActivePoints",function(_){var S=_.item,A=_.activePoint,E=_.basePoint,N=_.childIndex,j=_.isRange,$=[],k=S.props.key,I=S.item.type.defaultProps!==void 0?U(U({},S.item.type.defaultProps),S.item.props):S.item.props,R=I.activeDot,M=I.dataKey,L=U(U({index:N,dataKey:M,cx:A.x,cy:A.y,r:4,fill:If(S.item),strokeWidth:2,stroke:"#fff",payload:A.payload,value:A.value},Q(R,!1)),Xo(R));return $.push(m.renderActiveDot(R,L,"".concat(k,"-activePoint-").concat(N))),E?$.push(m.renderActiveDot(R,U(U({},L),{},{cx:E.x,cy:E.y}),"".concat(k,"-basePoint-").concat(N))):j&&$.push(null),$}),se(g,"renderGraphicChild",function(_,S,A){var E=g.filterFormatItem(_,S,A);if(!E)return null;var N=g.getTooltipEventType(),j=g.state,$=j.isTooltipActive,k=j.tooltipAxis,I=j.activeTooltipIndex,R=j.activeLabel,M=g.props.children,L=St(M,tr),q=E.props,z=q.points,D=q.isRange,B=q.baseLine,F=E.item.type.defaultProps!==void 0?U(U({},E.item.type.defaultProps),E.item.props):E.item.props,G=F.activeDot,J=F.hide,re=F.activeBar,ne=F.activeShape,ue=!!(!J&&$&&L&&(G||re||ne)),oe={};N!=="axis"&&L&&L.props.trigger==="click"?oe={onClick:Ys(g.handleItemMouseEnter,_.props.onClick)}:N!=="axis"&&(oe={onMouseLeave:Ys(g.handleItemMouseLeave,_.props.onMouseLeave),onMouseEnter:Ys(g.handleItemMouseEnter,_.props.onMouseEnter)});var W=x.cloneElement(_,U(U({},E.props),oe));function Y(jt){return typeof k.dataKey=="function"?k.dataKey(jt.payload):null}if(ue)if(I>=0){var te,C;if(k.dataKey&&!k.allowDuplicatedCategory){var ye=typeof k.dataKey=="function"?Y:"payload.".concat(k.dataKey.toString());te=Yo(z,ye,R),C=D&&B&&Yo(B,ye,R)}else te=z==null?void 0:z[I],C=D&&B&&B[I];if(ne||re){var H=_.props.activeIndex!==void 0?_.props.activeIndex:I;return[x.cloneElement(_,U(U(U({},E.props),oe),{},{activeIndex:H})),null,null]}if(!fe(te))return[W].concat(Vi(g.renderActivePoints({item:E,activePoint:te,basePoint:C,childIndex:I,isRange:D})))}else{var _e,Ee=(_e=g.getItemByXY(g.state.activeCoordinate))!==null&&_e!==void 0?_e:{graphicalItem:W},Ge=Ee.graphicalItem,Jt=Ge.item,Zt=Jt===void 0?_:Jt,Yi=Ge.childIndex,Ar=U(U(U({},E.props),oe),{},{activeIndex:Yi});return[x.cloneElement(Zt,Ar),null,null]}return D?[W,null,null]:[W,null]}),se(g,"renderCustomized",function(_,S,A){return x.cloneElement(_,U(U({key:"recharts-customized-".concat(A)},g.props),g.state))}),se(g,"renderMap",{CartesianGrid:{handler:zu,once:!0},ReferenceArea:{handler:g.renderReferenceElement},ReferenceLine:{handler:zu},ReferenceDot:{handler:g.renderReferenceElement},XAxis:{handler:zu},YAxis:{handler:zu},Brush:{handler:g.renderBrush,once:!0},Bar:{handler:g.renderGraphicChild},Line:{handler:g.renderGraphicChild},Area:{handler:g.renderGraphicChild},Radar:{handler:g.renderGraphicChild},RadialBar:{handler:g.renderGraphicChild},Scatter:{handler:g.renderGraphicChild},Pie:{handler:g.renderGraphicChild},Funnel:{handler:g.renderGraphicChild},Tooltip:{handler:g.renderCursor,once:!0},PolarGrid:{handler:g.renderPolarGrid,once:!0},PolarAngleAxis:{handler:g.renderPolarAxis},PolarRadiusAxis:{handler:g.renderPolarAxis},Customized:{handler:g.renderCustomized}}),g.clipPathId="".concat((w=b.id)!==null&&w!==void 0?w:an("recharts"),"-clip"),g.throttleTriggeredAfterMouseMove=Ag(g.triggeredAfterMouseMove,(O=b.throttleDelay)!==null&&O!==void 0?O:1e3/60),g.state={},g}return B5(m,p),M5(m,[{key:"componentDidMount",value:function(){var w,O;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(w=this.props.margin.left)!==null&&w!==void 0?w:0,top:(O=this.props.margin.top)!==null&&O!==void 0?O:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var w=this.props,O=w.children,g=w.data,_=w.height,S=w.layout,A=St(O,tr);if(A){var E=A.props.defaultIndex;if(!(typeof E!="number"||E<0||E>this.state.tooltipTicks.length-1)){var N=this.state.tooltipTicks[E]&&this.state.tooltipTicks[E].value,j=Yd(this.state,g,E,N),$=this.state.tooltipTicks[E].coordinate,k=(this.state.offset.top+_)/2,I=S==="horizontal",R=I?{x:$,y:k}:{y:$,x:k},M=this.state.formattedGraphicalItems.find(function(q){var z=q.item;return z.type.name==="Scatter"});M&&(R=U(U({},R),M.props.points[E].tooltipPosition),j=M.props.points[E].tooltipPayload);var L={activeTooltipIndex:E,isTooltipActive:!0,activeLabel:N,activePayload:j,activeCoordinate:R};this.setState(L),this.renderCursor(A),this.accessibilityManager.setIndex(E)}}}},{key:"getSnapshotBeforeUpdate",value:function(w,O){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==O.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 g,_;this.accessibilityManager.setDetails({offset:{left:(g=this.props.margin.left)!==null&&g!==void 0?g:0,top:(_=this.props.margin.top)!==null&&_!==void 0?_:0}})}return null}},{key:"componentDidUpdate",value:function(w){Vl([St(w.children,tr)],[St(this.props.children,tr)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var w=St(this.props.children,tr);if(w&&typeof w.props.shared=="boolean"){var O=w.props.shared?"axis":"item";return s.indexOf(O)>=0?O:a}return a}},{key:"getMouseInfo",value:function(w){if(!this.container)return null;var O=this.container,g=O.getBoundingClientRect(),_=o2(g),S={chartX:Math.round(w.pageX-_.left),chartY:Math.round(w.pageY-_.top)},A=g.width/O.offsetWidth||1,E=this.inRange(S.chartX,S.chartY,A);if(!E)return null;var N=this.state,j=N.xAxisMap,$=N.yAxisMap,k=this.getTooltipEventType(),I=sx(this.state,this.props.data,this.props.layout,E);if(k!=="axis"&&j&&$){var R=Cr(j).scale,M=Cr($).scale,L=R&&R.invert?R.invert(S.chartX):null,q=M&&M.invert?M.invert(S.chartY):null;return U(U({},S),{},{xValue:L,yValue:q},I)}return I?U(U({},S),I):null}},{key:"inRange",value:function(w,O){var g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,_=this.props.layout,S=w/g,A=O/g;if(_==="horizontal"||_==="vertical"){var E=this.state.offset,N=S>=E.left&&S<=E.left+E.width&&A>=E.top&&A<=E.top+E.height;return N?{x:S,y:A}:null}var j=this.state,$=j.angleAxisMap,k=j.radiusAxisMap;if($&&k){var I=Cr($);return Jb({x:S,y:A},I)}return null}},{key:"parseEventsOfWrapper",value:function(){var w=this.props.children,O=this.getTooltipEventType(),g=St(w,tr),_={};g&&O==="axis"&&(g.props.trigger==="click"?_={onClick:this.handleClick}:_={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=Xo(this.props,this.handleOuterEvent);return U(U({},S),_)}},{key:"addListener",value:function(){zd.on(Kd,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){zd.removeListener(Kd,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(w,O,g){for(var _=this.state.formattedGraphicalItems,S=0,A=_.length;S<A;S++){var E=_[S];if(E.item===w||E.props.key===w.key||O===fr(E.item.type)&&g===E.childIndex)return E}return null}},{key:"renderClipPath",value:function(){var w=this.clipPathId,O=this.state.offset,g=O.left,_=O.top,S=O.height,A=O.width;return x.createElement("defs",null,x.createElement("clipPath",{id:w},x.createElement("rect",{x:g,y:_,height:S,width:A})))}},{key:"getXScales",value:function(){var w=this.state.xAxisMap;return w?Object.entries(w).reduce(function(O,g){var _=Q_(g,2),S=_[0],A=_[1];return U(U({},O),{},se({},S,A.scale))},{}):null}},{key:"getYScales",value:function(){var w=this.state.yAxisMap;return w?Object.entries(w).reduce(function(O,g){var _=Q_(g,2),S=_[0],A=_[1];return U(U({},O),{},se({},S,A.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(w){var O;return(O=this.state.xAxisMap)===null||O===void 0||(O=O[w])===null||O===void 0?void 0:O.scale}},{key:"getYScaleByAxisId",value:function(w){var O;return(O=this.state.yAxisMap)===null||O===void 0||(O=O[w])===null||O===void 0?void 0:O.scale}},{key:"getItemByXY",value:function(w){var O=this.state,g=O.formattedGraphicalItems,_=O.activeItem;if(g&&g.length)for(var S=0,A=g.length;S<A;S++){var E=g[S],N=E.props,j=E.item,$=j.type.defaultProps!==void 0?U(U({},j.type.defaultProps),j.props):j.props,k=fr(j.type);if(k==="Bar"){var I=(N.data||[]).find(function(q){return z3(w,q)});if(I)return{graphicalItem:E,payload:I}}else if(k==="RadialBar"){var R=(N.data||[]).find(function(q){return Jb(w,q)});if(R)return{graphicalItem:E,payload:R}}else if(vu(E,_)||yu(E,_)||co(E,_)){var M=WV({graphicalItem:E,activeTooltipItem:_,itemData:$.data}),L=$.activeIndex===void 0?M:$.activeIndex;return{graphicalItem:U(U({},E),{},{childIndex:L}),payload:co(E,_)?$.data[M]:E.props.data[M]}}}return null}},{key:"render",value:function(){var w=this;if(!Av(this))return null;var O=this.props,g=O.children,_=O.className,S=O.width,A=O.height,E=O.style,N=O.compact,j=O.title,$=O.desc,k=ex(O,T5),I=Q(k,!1);if(N)return x.createElement(a_,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},x.createElement(Gl,Ki({},I,{width:S,height:A,title:j,desc:$}),this.renderClipPath(),Tv(g,this.renderMap)));if(this.props.accessibilityLayer){var R,M;I.tabIndex=(R=this.props.tabIndex)!==null&&R!==void 0?R:0,I.role=(M=this.props.role)!==null&&M!==void 0?M:"application",I.onKeyDown=function(q){w.accessibilityManager.keyboardEvent(q)},I.onFocus=function(){w.accessibilityManager.focus()}}var L=this.parseEventsOfWrapper();return x.createElement(a_,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},x.createElement("div",Ki({className:le("recharts-wrapper",_),style:U({position:"relative",cursor:"default",width:S,height:A},E)},L,{ref:function(z){w.container=z}}),x.createElement(Gl,Ki({},I,{width:S,height:A,title:j,desc:$,style:K5}),this.renderClipPath(),Tv(g,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(x.Component);se(y,"displayName",r),se(y,"defaultProps",U({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},f)),se(y,"getDerivedStateFromProps",function(p,m){var b=p.dataKey,w=p.data,O=p.children,g=p.width,_=p.height,S=p.layout,A=p.stackOffset,E=p.margin,N=m.dataStartIndex,j=m.dataEndIndex;if(m.updateId===void 0){var $=ux(p);return U(U(U({},$),{},{updateId:0},h(U(U({props:p},$),{},{updateId:0}),m)),{},{prevDataKey:b,prevData:w,prevWidth:g,prevHeight:_,prevLayout:S,prevStackOffset:A,prevMargin:E,prevChildren:O})}if(b!==m.prevDataKey||w!==m.prevData||g!==m.prevWidth||_!==m.prevHeight||S!==m.prevLayout||A!==m.prevStackOffset||!Jn(E,m.prevMargin)){var k=ux(p),I={chartX:m.chartX,chartY:m.chartY,isTooltipActive:m.isTooltipActive},R=U(U({},sx(m,w,S)),{},{updateId:m.updateId+1}),M=U(U(U({},k),I),R);return U(U(U({},M),h(U({props:p},M),m)),{},{prevDataKey:b,prevData:w,prevWidth:g,prevHeight:_,prevLayout:S,prevStackOffset:A,prevMargin:E,prevChildren:O})}if(!Vl(O,m.prevChildren)){var L,q,z,D,B=St(O,ji),F=B&&(L=(q=B.props)===null||q===void 0?void 0:q.startIndex)!==null&&L!==void 0?L:N,G=B&&(z=(D=B.props)===null||D===void 0?void 0:D.endIndex)!==null&&z!==void 0?z:j,J=F!==N||G!==j,re=!fe(w),ne=re&&!J?m.updateId:m.updateId+1;return U(U({updateId:ne},h(U(U({props:p},m),{},{updateId:ne,dataStartIndex:F,dataEndIndex:G}),m)),{},{prevChildren:O,dataStartIndex:F,dataEndIndex:G})}return null}),se(y,"renderActiveDot",function(p,m,b){var w;return x.isValidElement(p)?w=x.cloneElement(p,m):ae(p)?w=p(m):w=x.createElement(wi,m),x.createElement(pe,{className:"recharts-active-dot",key:b},w)});var v=x.forwardRef(function(m,b){return x.createElement(y,Ki({},m,{ref:b}))});return v.displayName=y.displayName,v},t4=_o({chartName:"LineChart",GraphicalChild:mo,axisComponents:[{axisType:"xAxis",AxisComp:qr},{axisType:"yAxis",AxisComp:zr}],formatAxisMap:gd}),r4=_o({chartName:"BarChart",GraphicalChild:An,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:qr},{axisType:"yAxis",AxisComp:zr}],formatAxisMap:gd}),n4=_o({chartName:"PieChart",GraphicalChild:Or,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:Si},{axisType:"radiusAxis",AxisComp:xi}],formatAxisMap:Xb,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),i4=_o({chartName:"RadarChart",GraphicalChild:fo,axisComponents:[{axisType:"angleAxis",AxisComp:Si},{axisType:"radiusAxis",AxisComp:xi}],formatAxisMap:Xb,defaultProps:{layout:"centric",startAngle:90,endAngle:-270,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),a4=_o({chartName:"AreaChart",GraphicalChild:Wr,axisComponents:[{axisType:"xAxis",AxisComp:qr},{axisType:"yAxis",AxisComp:zr}],formatAxisMap:gd});const o4={light:"",dark:".dark"},cx=ve.createContext(null);function fx(){const t=ve.useContext(cx);if(!t)throw new Error("useChart must be used within a <ChartContainer />");return t}const Hi=ve.forwardRef(({id:t,className:e,children:r,config:n,...i},a)=>{const o=ve.useId(),s=`chart-${t||o.replace(/:/g,"")}`;return P.jsx(cx.Provider,{value:{config:n},children:P.jsxs("div",{"data-chart":s,ref:a,className:it("flex w-full h-full justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none",e),...i,children:[P.jsx(s4,{id:s,config:n}),P.jsx(QL,{children:r})]})})});Hi.displayName="Chart";const s4=({id:t,config:e})=>{const r=Object.entries(e).filter(([n,i])=>i.theme||i.color);return r.length?P.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(o4).map(([n,i])=>`
|
|
169
169
|
${i} [data-chart=${t}] {
|
|
170
170
|
${r.map(([a,o])=>{var u;const s=((u=o.theme)==null?void 0:u[n])||o.color;return s?` --color-${a}: ${s};`:null}).join(`
|
|
171
171
|
`)}
|
|
172
172
|
}
|
|
173
173
|
`).join(`
|
|
174
|
-
`)}}):null},xo=tr,Gi=ve.forwardRef(({active:t,payload:e,className:r,indicator:n="dot",hideLabel:i=!1,hideIndicator:a=!1,label:o,labelFormatter:s,labelClassName:u,formatter:l,color:c,nameKey:f,labelKey:d},h)=>{const{config:y}=
|
|
175
|
-
`).filter(l=>l.trim()),s=a==="numbered"?"ol":"ul",u=a==="numbered"?"list-decimal list-inside space-y-1":"list-disc list-inside space-y-1";return E.jsx(s,{className:u,children:o.map((l,c)=>E.jsx("li",{children:l},c))})}case"code":{const{code:i,language:a}=r;return E.jsxs("div",{className:"relative",children:[a&&E.jsx("div",{className:"absolute top-2 right-2 text-xs text-muted-foreground bg-muted px-2 py-1 rounded",children:a}),E.jsx("pre",{className:"bg-muted p-4 rounded-lg overflow-x-auto",children:E.jsx("code",{className:"text-sm font-mono",children:i})})]})}case"entity-list":return E.jsx(f4,{content:r});case"entity-detail":return E.jsx(d4,{content:r});case"query":return E.jsx(h4,{content:r});case"chart":return E.jsx(c4,{content:r});case"tabs":{const{tabs:i}=r;return E.jsxs("div",{className:"w-full",children:[E.jsx("div",{className:"border-b border-border mb-4",children:E.jsx("div",{className:"flex gap-4",children:i==null?void 0:i.map((a,o)=>E.jsx("button",{className:`px-4 py-2 font-medium ${o===0?"border-b-2 border-primary":"text-muted-foreground"}`,children:a.label},a.id))})}),E.jsx("div",{className:"p-4",children:((n=i==null?void 0:i[0])==null?void 0:n.content)||"No content"})]})}case"accordion":{const{items:i}=r;return E.jsx("div",{className:"space-y-2",children:i==null?void 0:i.map(a=>E.jsxs(en,{children:[E.jsx(jl,{children:E.jsx("h3",{className:"font-semibold",children:a.title})}),E.jsx($l,{children:E.jsx("p",{className:"text-sm text-muted-foreground",children:a.content})})]},a.id))})}case"card":{const{title:i,description:a,imageUrl:o,buttonText:s,buttonLink:u}=r;return E.jsxs(en,{children:[o&&E.jsx("img",{src:o,alt:i,className:"w-full h-48 object-cover rounded-t-lg"}),E.jsx(jl,{children:E.jsx("h3",{className:"text-xl font-semibold",children:i})}),E.jsxs($l,{children:[E.jsx("p",{className:"text-muted-foreground mb-4",children:a}),s&&E.jsx(Tl,{asChild:!0,children:E.jsx("a",{href:u||"#",children:s})})]})]})}case"form-input":case"form-textarea":case"form-select":case"form-checkbox":case"form-submit":return E.jsx("div",{className:"p-4 border border-dashed border-muted-foreground/30 rounded-lg",children:E.jsx("p",{className:"text-sm text-muted-foreground",children:"Form component (preview not available)"})});default:return console.error("Unknown component type:",e,t),E.jsx("div",{className:"p-4 border border-dashed border-muted-foreground/30 rounded-lg bg-muted/20",children:E.jsxs("p",{className:"text-sm text-muted-foreground",children:["Unknown component type: ",e]})})}},f4=({content:t})=>{const[e,r]=x.useState([]),[n,i]=x.useState([]),[a,o]=x.useState(null),[s,u]=x.useState(!0);x.useEffect(()=>{l()},[t.entityId]);const l=async()=>{if(!t.entityId){u(!1);return}try{const[f,d,h]=await Promise.all([ct.from("entities").select("*").eq("id",t.entityId).eq("is_published",!0).single(),ct.from("entity_fields").select("*").eq("entity_id",t.entityId).order("position"),ct.from("entity_records").select("*").eq("entity_id",t.entityId).eq("is_published",!0).order("created_at",{ascending:t.sortOrder!=="asc"}).limit(t.limit||10)]);o(f.data),i(d.data||[]),r(h.data||[])}catch(f){console.error("Error loading entity data:",f)}u(!1)};if(s)return E.jsx("div",{className:"text-muted-foreground",children:"Loading..."});if(!a)return E.jsx("div",{className:"text-muted-foreground",children:"Entity not found"});if(e.length===0)return E.jsx("div",{className:"text-muted-foreground",children:"No records available"});const c=n.filter(f=>(t.fields||[]).includes(f.name));return t.displayStyle==="table"?E.jsx("div",{className:"overflow-x-auto",children:E.jsxs("table",{className:"w-full border-collapse",children:[E.jsx("thead",{children:E.jsx("tr",{className:"border-b",children:c.map(f=>E.jsx("th",{className:"text-left p-3 font-semibold",children:f.display_name},f.id))})}),E.jsx("tbody",{children:e.map(f=>E.jsx("tr",{className:"border-b",children:c.map(d=>E.jsx("td",{className:"p-3",children:Oo(f.data[d.name],d.field_type)},d.id))},f.id))})]})}):t.displayStyle==="list"?E.jsx("div",{className:"space-y-4",children:e.map(f=>E.jsx(en,{className:"p-4",children:c.map(d=>E.jsxs("div",{className:"mb-2",children:[E.jsxs("span",{className:"font-semibold",children:[d.display_name,": "]}),E.jsx("span",{children:Oo(f.data[d.name],d.field_type)})]},d.id))},f.id))}):E.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:e.map(f=>E.jsx(en,{className:"p-6",children:c.map(d=>E.jsxs("div",{className:"mb-3",children:[E.jsx("div",{className:"text-sm font-semibold text-muted-foreground mb-1",children:d.display_name}),E.jsx("div",{className:"text-base",children:Oo(f.data[d.name],d.field_type)})]},d.id))},f.id))})},d4=({content:t})=>{const[e,r]=x.useState(null),[n,i]=x.useState([]),[a,o]=x.useState(!0);x.useEffect(()=>{s()},[t.entityId,t.recordId]);const s=async()=>{if(!t.entityId||!t.recordId){o(!1);return}try{const[l,c]=await Promise.all([ct.from("entity_fields").select("*").eq("entity_id",t.entityId).order("position"),ct.from("entity_records").select("*").eq("id",t.recordId).eq("is_published",!0).single()]);i(l.data||[]),r(c.data)}catch(l){console.error("Error loading record:",l)}o(!1)};if(a)return E.jsx("div",{className:"text-muted-foreground",children:"Loading..."});if(!e)return E.jsx("div",{className:"text-muted-foreground",children:"Record not found"});const u=n.filter(l=>(t.fields||[]).includes(l.name));return t.layout==="horizontal"?E.jsx("div",{className:"flex flex-wrap gap-6",children:u.map(l=>E.jsxs("div",{className:"flex-1 min-w-[200px]",children:[E.jsx("div",{className:"text-sm font-semibold text-muted-foreground mb-1",children:l.display_name}),E.jsx("div",{className:"text-base",children:Oo(e.data[l.name],l.field_type)})]},l.id))}):E.jsx("div",{className:"space-y-4",children:u.map(l=>E.jsxs("div",{children:[E.jsx("div",{className:"text-sm font-semibold text-muted-foreground mb-1",children:l.display_name}),E.jsx("div",{className:"text-base",children:Oo(e.data[l.name],l.field_type)})]},l.id))})},h4=({content:t})=>{const[e,r]=x.useState([]),[n,i]=x.useState(null),[a,o]=x.useState(!0),[s,u]=x.useState(null);x.useEffect(()=>{l()},[t.queryId]);const l=async()=>{if(!t.queryId){o(!1);return}try{const{data:d,error:h}=await ct.functions.invoke("execute-query",{body:{queryId:t.queryId}});if(h)throw h;d.success?(r(d.data||[]),i(d.settings)):u(d.error||"Failed to execute query")}catch(d){console.error("Error executing query:",d),u("Failed to load query results")}o(!1)};if(a)return E.jsx("div",{className:"text-muted-foreground",children:"Loading query results..."});if(s)return E.jsx("div",{className:"text-destructive",children:s});if(!n)return E.jsx("div",{className:"text-muted-foreground",children:"Query not found"});if(e.length===0)return E.jsx("div",{className:"text-muted-foreground",children:"No results found"});const c=n.display_style||"table",f=n.show_row_numbers||!1;if(c==="table"){const d=Object.keys(e[0]||{});return E.jsx("div",{className:"overflow-x-auto",children:E.jsxs("table",{className:"w-full border-collapse",children:[E.jsx("thead",{children:E.jsxs("tr",{className:"border-b",children:[f&&E.jsx("th",{className:"text-left p-3 font-semibold",children:"#"}),d.map(h=>E.jsx("th",{className:"text-left p-3 font-semibold",children:h},h))]})}),E.jsx("tbody",{children:e.map((h,y)=>E.jsxs("tr",{className:"border-b",children:[f&&E.jsx("td",{className:"p-3 text-muted-foreground",children:y+1}),d.map(v=>E.jsx("td",{className:"p-3",children:h[v]!==null&&h[v]!==void 0?String(h[v]):"-"},v))]},y))})]})})}return c==="list"?E.jsx("div",{className:"space-y-4",children:e.map((d,h)=>E.jsxs(en,{className:"p-4",children:[f&&E.jsxs("div",{className:"text-sm text-muted-foreground mb-2",children:["#",h+1]}),Object.entries(d).map(([y,v])=>E.jsxs("div",{className:"mb-2",children:[E.jsxs("span",{className:"font-semibold",children:[y,": "]}),E.jsx("span",{children:v!=null?String(v):"-"})]},y))]},h))}):E.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:e.map((d,h)=>E.jsxs(en,{className:"p-6",children:[f&&E.jsxs("div",{className:"text-sm text-muted-foreground mb-3",children:["#",h+1]}),Object.entries(d).map(([y,v])=>E.jsxs("div",{className:"mb-3",children:[E.jsx("div",{className:"text-sm font-semibold text-muted-foreground mb-1",children:y}),E.jsx("div",{className:"text-base",children:v!=null?String(v):"-"})]},y))]},h))})},Oo=(t,e)=>{if(t==null||t==="")return"-";switch(e){case"image":return E.jsx("img",{src:t,alt:"",className:"max-w-full h-auto rounded"});case"url":return E.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:t});case"boolean":return t==="true"||t===!0?"Yes":"No";case"longtext":return E.jsx("div",{className:"whitespace-pre-wrap",children:t});case"date":return new Date(t).toLocaleDateString();default:return String(t)}},p4=({slug:t})=>{const e=Eo.useParams(),r=t||e.slug,[n,i]=x.useState(null),[a,o]=x.useState([]),[s,u]=x.useState([]),[l,c]=x.useState(null),[f,d]=x.useState([]),[h,y]=x.useState([]),[v,p]=x.useState([]),[m,b]=x.useState(!0),[w,O]=x.useState(new Map);x.useEffect(()=>{g()},[r]);const g=async()=>{const{data:j}=await ct.from("pages").select("*").eq("is_published",!0).order("menu_order");if(p(j||[]),!r){b(!1);return}const{data:N}=await ct.from("pages").select("*").eq("slug",r).eq("is_published",!0).single();if(N){const{data:C}=await ct.from("page_rows").select("*").eq("page_id",N.id).order("position"),{data:I}=await ct.from("page_components").select("*").eq("page_id",N.id).order("position");if(i(N),o(C||[]),u(I||[]),N.layout_id){const{data:F}=await ct.from("layouts").select("*").eq("id",N.layout_id).eq("is_published",!0).maybeSingle();if(F){const{data:z}=await ct.from("layout_rows").select("*").eq("layout_id",F.id).order("position"),{data:D}=await ct.from("layout_components").select("*").eq("layout_id",F.id).order("position");c(F),d(z||[]),y(D||[])}}const R=(I||[]).filter(F=>F.is_widget_instance&&F.widget_id),L=new Map;for(const F of R)if(!L.has(F.widget_id)){const{data:z}=await ct.from("widget_rows").select("*").eq("widget_id",F.widget_id).order("position"),{data:D}=await ct.from("widget_components").select("*").eq("widget_id",F.widget_id).order("position");L.set(F.widget_id,{rows:z||[],components:D||[]})}O(L)}b(!1)},_=(j,N)=>s.filter(C=>C.row_id===j&&C.column_index===N).sort((C,I)=>C.position-I.position),S=(j,N)=>h.filter(C=>C.row_id===j&&C.column_index===N).sort((C,I)=>C.position-I.position),A={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4"},T=j=>{const N=w.get(j);return N?N.rows.sort((C,I)=>C.position-I.position).map(C=>{const I=N.components.filter(L=>L.row_id===C.id).sort((L,F)=>L.position-F.position),R=Array.from({length:C.columns},()=>[]);return I.forEach(L=>{L.column_index<C.columns&&R[L.column_index].push(L)}),E.jsx("div",{className:`grid gap-6 ${A[C.columns]}`,children:R.map((L,F)=>E.jsx("div",{className:"space-y-6",children:L.map(z=>E.jsx(Zd,{component:z},z.id))},F))},C.id)}):null},M=()=>E.jsxs("div",{className:"max-w-7xl mx-auto space-y-8",children:[!l&&E.jsx("h1",{className:"text-4xl font-bold mb-8",children:n==null?void 0:n.title}),a.map(j=>E.jsx("div",{className:`grid gap-6 ${A[j.columns]}`,children:Array.from({length:j.columns},(N,C)=>E.jsx("div",{className:"space-y-6",children:_(j.id,C).map(I=>I.is_widget_instance&&I.widget_id?E.jsx("div",{children:T(I.widget_id)},I.id):E.jsx(Zd,{component:I},I.id))},C))},j.id))]}),$=()=>l?E.jsx("div",{className:"space-y-8",children:f.map(j=>E.jsx("div",{className:`grid gap-6 ${A[j.columns]}`,children:Array.from({length:j.columns},(N,C)=>E.jsx("div",{className:"space-y-6",children:S(j.id,C).map(I=>I.component_type==="page-content"?E.jsx("div",{className:"space-y-8",children:M()},I.id):E.jsx(Zd,{component:I},I.id))},C))},j.id))}):M();return m?E.jsx("div",{className:"min-h-screen flex items-center justify-center",children:"Loading..."}):E.jsxs("div",{className:"min-h-screen bg-background",children:[E.jsx("nav",{className:"border-b bg-card shadow-[var(--shadow-soft)]",children:E.jsx("div",{className:"container mx-auto px-4 py-4",children:E.jsxs("div",{className:"flex items-center gap-6",children:[E.jsx(Eo.Link,{to:"/",className:"text-xl font-bold bg-gradient-to-r from-primary to-accent bg-clip-text text-transparent",children:"My Website"}),E.jsx("div",{className:"flex gap-4",children:v.map(j=>E.jsx(Eo.Link,{to:`/page/${j.slug}`,className:`text-sm transition-colors hover:text-primary ${j.slug===r?"text-primary font-medium":"text-muted-foreground"}`,children:j.title},j.id))})]})})}),E.jsx("main",{className:"container mx-auto px-4 py-12 overflow-y-auto",children:n?$():E.jsxs("div",{className:"text-center py-20",children:[E.jsx("h1",{className:"text-4xl font-bold mb-4",children:"Welcome to My Website"}),E.jsx("p",{className:"text-muted-foreground mb-8",children:"Select a page from the navigation above to get started"}),E.jsx(Eo.Link,{to:"/auth",className:"inline-flex items-center justify-center rounded-md bg-primary px-6 py-3 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",children:"Admin Login"})]})})]})};Pr.PublicPage=p4,Object.defineProperty(Pr,Symbol.toStringTag,{value:"Module"})});
|
|
174
|
+
`)}}):null},xo=tr,Gi=ve.forwardRef(({active:t,payload:e,className:r,indicator:n="dot",hideLabel:i=!1,hideIndicator:a=!1,label:o,labelFormatter:s,labelClassName:u,formatter:l,color:c,nameKey:f,labelKey:d},h)=>{const{config:y}=fx(),v=ve.useMemo(()=>{var g;if(i||!(e!=null&&e.length))return null;const[m]=e,b=`${d||m.dataKey||m.name||"value"}`,w=Xd(y,m,b),O=!d&&typeof o=="string"?((g=y[o])==null?void 0:g.label)||o:w==null?void 0:w.label;return s?P.jsx("div",{className:it("font-medium",u),children:s(O,e)}):O?P.jsx("div",{className:it("font-medium",u),children:O}):null},[o,s,e,i,u,y,d]);if(!t||!(e!=null&&e.length))return null;const p=e.length===1&&n!=="dot";return P.jsxs("div",{ref:h,className:it("grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",r),children:[p?null:v,P.jsx("div",{className:"grid gap-1.5",children:e.map((m,b)=>{const w=`${f||m.name||m.dataKey||"value"}`,O=Xd(y,m,w),g=c||m.payload.fill||m.color;return P.jsx("div",{className:it("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",n==="dot"&&"items-center"),children:l&&(m==null?void 0:m.value)!==void 0&&m.name?l(m.value,m.name,m,b,m.payload):P.jsxs(P.Fragment,{children:[O!=null&&O.icon?P.jsx(O.icon,{}):!a&&P.jsx("div",{className:it("shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]",{"h-2.5 w-2.5":n==="dot","w-1":n==="line","w-0 border-[1.5px] border-dashed bg-transparent":n==="dashed","my-0.5":p&&n==="dashed"}),style:{"--color-bg":g,"--color-border":g}}),P.jsxs("div",{className:it("flex flex-1 justify-between leading-none",p?"items-end":"items-center"),children:[P.jsxs("div",{className:"grid gap-1.5",children:[p?v:null,P.jsx("span",{className:"text-muted-foreground",children:(O==null?void 0:O.label)||m.name})]}),m.value&&P.jsx("span",{className:"font-mono font-medium tabular-nums text-foreground",children:m.value.toLocaleString()})]})]})},m.dataKey)})})]})});Gi.displayName="ChartTooltip";const u4=ln,dx=ve.forwardRef(({className:t,hideIcon:e=!1,payload:r,verticalAlign:n="bottom",nameKey:i},a)=>{const{config:o}=fx();return r!=null&&r.length?P.jsx("div",{ref:a,className:it("flex items-center justify-center gap-4",n==="top"?"pb-3":"pt-3",t),children:r.map(s=>{const u=`${i||s.dataKey||"value"}`,l=Xd(o,s,u);return P.jsxs("div",{className:it("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"),children:[l!=null&&l.icon&&!e?P.jsx(l.icon,{}):P.jsx("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:s.color}}),l==null?void 0:l.label]},s.value)})}):null});dx.displayName="ChartLegend";function Xd(t,e,r){if(typeof e!="object"||e===null)return;const n="payload"in e&&typeof e.payload=="object"&&e.payload!==null?e.payload:void 0;let i=r;return r in e&&typeof e[r]=="string"?i=e[r]:n&&r in n&&typeof n[r]=="string"&&(i=n[r]),i in t?t[i]:t[r]}const Tt=["hsl(var(--chart-1))","hsl(var(--chart-2))","hsl(var(--chart-3))","hsl(var(--chart-4))","hsl(var(--chart-5))"],l4=({content:t})=>{let e=[];try{e=JSON.parse(t.data||"[]")}catch{return P.jsxs("div",{className:"p-4 border border-destructive/50 rounded-lg bg-destructive/10",children:[P.jsx("p",{className:"text-destructive font-semibold",children:"Invalid chart data"}),P.jsx("p",{className:"text-sm text-muted-foreground",children:"Please provide valid JSON data"})]})}if(!e.length)return P.jsx("div",{className:"p-4 border border-border rounded-lg bg-muted/20",children:P.jsx("p",{className:"text-muted-foreground",children:"No chart data available"})});const r=e.reduce((i,a,o)=>(Object.keys(a).forEach(s=>{s!==t.xAxisKey&&s!=="name"&&!i[s]&&(i[s]={label:s.charAt(0).toUpperCase()+s.slice(1),color:Tt[Object.keys(i).length%Tt.length]})}),i),{}),n=()=>{switch(t.chartType){case"bar":return P.jsx(Hi,{config:r,children:P.jsxs(r4,{data:e,children:[P.jsx(Ru,{strokeDasharray:"3 3",className:"stroke-muted"}),P.jsx(qr,{dataKey:t.xAxisKey||"name",tickLine:!1,axisLine:!1}),P.jsx(zr,{tickLine:!1,axisLine:!1}),P.jsx(xo,{content:P.jsx(Gi,{})}),P.jsx(An,{dataKey:t.yAxisKey||"value",fill:Tt[0],radius:[8,8,0,0]})]})});case"line":const i=(t.dataKeys||"").split(",").filter(Boolean);return P.jsx(Hi,{config:r,children:P.jsxs(t4,{data:e,children:[P.jsx(Ru,{strokeDasharray:"3 3",className:"stroke-muted"}),P.jsx(qr,{dataKey:t.xAxisKey||"month",tickLine:!1,axisLine:!1}),P.jsx(zr,{tickLine:!1,axisLine:!1}),P.jsx(xo,{content:P.jsx(Gi,{})}),P.jsx(u4,{content:P.jsx(dx,{})}),i.map((o,s)=>P.jsx(mo,{type:"monotone",dataKey:o.trim(),stroke:Tt[s%Tt.length],strokeWidth:2,dot:!1},o))]})});case"area":const a=(t.dataKeys||"").split(",").filter(Boolean);return P.jsx(Hi,{config:r,children:P.jsxs(a4,{data:e,children:[P.jsx(Ru,{strokeDasharray:"3 3",className:"stroke-muted"}),P.jsx(qr,{dataKey:t.xAxisKey||"time",tickLine:!1,axisLine:!1}),P.jsx(zr,{tickLine:!1,axisLine:!1}),P.jsx(xo,{content:P.jsx(Gi,{})}),a.map((o,s)=>P.jsx(Wr,{type:"monotone",dataKey:o.trim(),stroke:Tt[s%Tt.length],fill:Tt[s%Tt.length],fillOpacity:.6},o))]})});case"pie":return P.jsx(Hi,{config:r,children:P.jsxs(n4,{children:[P.jsx(xo,{content:P.jsx(Gi,{})}),P.jsx(Or,{data:e,dataKey:"value",nameKey:"name",cx:"50%",cy:"50%",outerRadius:80,label:!0,children:e.map((o,s)=>P.jsx(ws,{fill:Tt[s%Tt.length]},`cell-${s}`))})]})});case"radar":return P.jsx(Hi,{config:r,children:P.jsxs(i4,{data:e,children:[P.jsx(nw,{className:"stroke-muted"}),P.jsx(Si,{dataKey:"subject"}),P.jsx(xi,{}),P.jsx(xo,{content:P.jsx(Gi,{})}),P.jsx(fo,{name:"Score",dataKey:"value",stroke:Tt[0],fill:Tt[0],fillOpacity:.6})]})});default:return P.jsx("div",{className:"text-muted-foreground",children:"Unsupported chart type"})}};return P.jsxs("div",{className:"w-full space-y-4",children:[t.title&&P.jsx("h3",{className:"text-xl font-semibold text-center",children:t.title}),P.jsx("div",{className:"w-full min-h-[300px] max-h-[400px] h-[400px]",children:n()})]})},Jd=({component:t})=>{var n;if(!t)return console.error("ComponentRenderer received undefined component"),null;let{component_type:e,content:r}=t;if(!e)return console.error("Component missing component_type:",t),null;switch(r&&typeof r=="object"&&"content"in r&&Object.keys(r).length===1&&(r=r.content),console.log("Rendering component type:",e,"with content:",r),e){case"heading":{const{text:i,level:a}=r,o=a,s={h1:"text-4xl font-bold",h2:"text-3xl font-bold",h3:"text-2xl font-semibold"};return P.jsx(o,{className:s[a],children:i})}case"text":case"paragraph":{const{text:i}=r;return P.jsx("p",{className:"text-base leading-relaxed whitespace-pre-wrap",children:i})}case"image":{const{url:i,alt:a}=r;return i?P.jsx("img",{src:i,alt:a,className:"w-full max-w-2xl rounded-lg shadow-[var(--shadow-medium)]"}):null}case"button":{const{text:i,link:a}=r;return P.jsx(El,{asChild:!0,children:P.jsx("a",{href:a||"#",children:i})})}case"link":{const{text:i,url:a}=r;return P.jsx("a",{href:a||"#",className:"text-primary hover:underline",children:i})}case"video":{const{url:i}=r;if(!i)return null;let a="";return i.includes("youtube.com")||i.includes("youtu.be")?a=`https://www.youtube.com/embed/${i.includes("youtu.be")?i.split("/").pop():new URLSearchParams(new URL(i).search).get("v")}`:i.includes("vimeo.com")&&(a=`https://player.vimeo.com/video/${i.split("/").pop()}`),a?P.jsx("div",{className:"aspect-video w-full max-w-2xl",children:P.jsx("iframe",{src:a,className:"w-full h-full rounded-lg",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0})}):P.jsx("p",{className:"text-muted-foreground",children:"Invalid video URL"})}case"divider":return P.jsx(Qp,{className:"my-4"});case"spacer":{const{height:i}=r,a={small:"h-5",medium:"h-10",large:"h-20"};return P.jsx("div",{className:a[i]||a.medium})}case"quote":{const{text:i,author:a}=r;return P.jsxs("blockquote",{className:"border-l-4 border-primary pl-4 italic",children:[P.jsx("p",{className:"text-lg",children:i}),a&&P.jsxs("footer",{className:"mt-2 text-sm text-muted-foreground",children:["— ",a]})]})}case"list":{const{items:i,type:a}=r,o=i.split(`
|
|
175
|
+
`).filter(l=>l.trim()),s=a==="numbered"?"ol":"ul",u=a==="numbered"?"list-decimal list-inside space-y-1":"list-disc list-inside space-y-1";return P.jsx(s,{className:u,children:o.map((l,c)=>P.jsx("li",{children:l},c))})}case"code":{const{code:i,language:a}=r;return P.jsxs("div",{className:"relative",children:[a&&P.jsx("div",{className:"absolute top-2 right-2 text-xs text-muted-foreground bg-muted px-2 py-1 rounded",children:a}),P.jsx("pre",{className:"bg-muted p-4 rounded-lg overflow-x-auto",children:P.jsx("code",{className:"text-sm font-mono",children:i})})]})}case"entity-list":return P.jsx(c4,{content:r});case"entity-detail":return P.jsx(f4,{content:r});case"query":return P.jsx(d4,{content:r});case"chart":return P.jsx(l4,{content:r});case"tabs":{const{tabs:i}=r;return P.jsxs("div",{className:"w-full",children:[P.jsx("div",{className:"border-b border-border mb-4",children:P.jsx("div",{className:"flex gap-4",children:i==null?void 0:i.map((a,o)=>P.jsx("button",{className:`px-4 py-2 font-medium ${o===0?"border-b-2 border-primary":"text-muted-foreground"}`,children:a.label},a.id))})}),P.jsx("div",{className:"p-4",children:((n=i==null?void 0:i[0])==null?void 0:n.content)||"No content"})]})}case"accordion":{const{items:i}=r;return P.jsx("div",{className:"space-y-2",children:i==null?void 0:i.map(a=>P.jsxs(en,{children:[P.jsx(Tl,{children:P.jsx("h3",{className:"font-semibold",children:a.title})}),P.jsx(jl,{children:P.jsx("p",{className:"text-sm text-muted-foreground",children:a.content})})]},a.id))})}case"card":{const{title:i,description:a,imageUrl:o,buttonText:s,buttonLink:u}=r;return P.jsxs(en,{children:[o&&P.jsx("img",{src:o,alt:i,className:"w-full h-48 object-cover rounded-t-lg"}),P.jsx(Tl,{children:P.jsx("h3",{className:"text-xl font-semibold",children:i})}),P.jsxs(jl,{children:[P.jsx("p",{className:"text-muted-foreground mb-4",children:a}),s&&P.jsx(El,{asChild:!0,children:P.jsx("a",{href:u||"#",children:s})})]})]})}case"form-input":case"form-textarea":case"form-select":case"form-checkbox":case"form-submit":return P.jsx("div",{className:"p-4 border border-dashed border-muted-foreground/30 rounded-lg",children:P.jsx("p",{className:"text-sm text-muted-foreground",children:"Form component (preview not available)"})});default:return console.error("Unknown component type:",e,t),P.jsx("div",{className:"p-4 border border-dashed border-muted-foreground/30 rounded-lg bg-muted/20",children:P.jsxs("p",{className:"text-sm text-muted-foreground",children:["Unknown component type: ",e]})})}},c4=({content:t})=>{const[e,r]=x.useState([]),[n,i]=x.useState([]),[a,o]=x.useState(null),[s,u]=x.useState(!0);x.useEffect(()=>{l()},[t.entityId]);const l=async()=>{if(!t.entityId){u(!1);return}try{const[f,d,h]=await Promise.all([ct.from("entities").select("*").eq("id",t.entityId).eq("is_published",!0).single(),ct.from("entity_fields").select("*").eq("entity_id",t.entityId).order("position"),ct.from("entity_records").select("*").eq("entity_id",t.entityId).eq("is_published",!0).order("created_at",{ascending:t.sortOrder!=="asc"}).limit(t.limit||10)]);o(f.data),i(d.data||[]),r(h.data||[])}catch(f){console.error("Error loading entity data:",f)}u(!1)};if(s)return P.jsx("div",{className:"text-muted-foreground",children:"Loading..."});if(!a)return P.jsx("div",{className:"text-muted-foreground",children:"Entity not found"});if(e.length===0)return P.jsx("div",{className:"text-muted-foreground",children:"No records available"});const c=n.filter(f=>(t.fields||[]).includes(f.name));return t.displayStyle==="table"?P.jsx("div",{className:"overflow-x-auto",children:P.jsxs("table",{className:"w-full border-collapse",children:[P.jsx("thead",{children:P.jsx("tr",{className:"border-b",children:c.map(f=>P.jsx("th",{className:"text-left p-3 font-semibold",children:f.display_name},f.id))})}),P.jsx("tbody",{children:e.map(f=>P.jsx("tr",{className:"border-b",children:c.map(d=>P.jsx("td",{className:"p-3",children:Oo(f.data[d.name],d.field_type)},d.id))},f.id))})]})}):t.displayStyle==="list"?P.jsx("div",{className:"space-y-4",children:e.map(f=>P.jsx(en,{className:"p-4",children:c.map(d=>P.jsxs("div",{className:"mb-2",children:[P.jsxs("span",{className:"font-semibold",children:[d.display_name,": "]}),P.jsx("span",{children:Oo(f.data[d.name],d.field_type)})]},d.id))},f.id))}):P.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:e.map(f=>P.jsx(en,{className:"p-6",children:c.map(d=>P.jsxs("div",{className:"mb-3",children:[P.jsx("div",{className:"text-sm font-semibold text-muted-foreground mb-1",children:d.display_name}),P.jsx("div",{className:"text-base",children:Oo(f.data[d.name],d.field_type)})]},d.id))},f.id))})},f4=({content:t})=>{const[e,r]=x.useState(null),[n,i]=x.useState([]),[a,o]=x.useState(!0);x.useEffect(()=>{s()},[t.entityId,t.recordId]);const s=async()=>{if(!t.entityId||!t.recordId){o(!1);return}try{const[l,c]=await Promise.all([ct.from("entity_fields").select("*").eq("entity_id",t.entityId).order("position"),ct.from("entity_records").select("*").eq("id",t.recordId).eq("is_published",!0).single()]);i(l.data||[]),r(c.data)}catch(l){console.error("Error loading record:",l)}o(!1)};if(a)return P.jsx("div",{className:"text-muted-foreground",children:"Loading..."});if(!e)return P.jsx("div",{className:"text-muted-foreground",children:"Record not found"});const u=n.filter(l=>(t.fields||[]).includes(l.name));return t.layout==="horizontal"?P.jsx("div",{className:"flex flex-wrap gap-6",children:u.map(l=>P.jsxs("div",{className:"flex-1 min-w-[200px]",children:[P.jsx("div",{className:"text-sm font-semibold text-muted-foreground mb-1",children:l.display_name}),P.jsx("div",{className:"text-base",children:Oo(e.data[l.name],l.field_type)})]},l.id))}):P.jsx("div",{className:"space-y-4",children:u.map(l=>P.jsxs("div",{children:[P.jsx("div",{className:"text-sm font-semibold text-muted-foreground mb-1",children:l.display_name}),P.jsx("div",{className:"text-base",children:Oo(e.data[l.name],l.field_type)})]},l.id))})},d4=({content:t})=>{const[e,r]=x.useState([]),[n,i]=x.useState(null),[a,o]=x.useState(!0),[s,u]=x.useState(null);x.useEffect(()=>{l()},[t.queryId]);const l=async()=>{if(!t.queryId){o(!1);return}try{const{data:d,error:h}=await ct.functions.invoke("execute-query",{body:{queryId:t.queryId}});if(h)throw h;d.success?(r(d.data||[]),i(d.settings)):u(d.error||"Failed to execute query")}catch(d){console.error("Error executing query:",d),u("Failed to load query results")}o(!1)};if(a)return P.jsx("div",{className:"text-muted-foreground",children:"Loading query results..."});if(s)return P.jsx("div",{className:"text-destructive",children:s});if(!n)return P.jsx("div",{className:"text-muted-foreground",children:"Query not found"});if(e.length===0)return P.jsx("div",{className:"text-muted-foreground",children:"No results found"});const c=n.display_style||"table",f=n.show_row_numbers||!1;if(c==="table"){const d=Object.keys(e[0]||{});return P.jsx("div",{className:"overflow-x-auto",children:P.jsxs("table",{className:"w-full border-collapse",children:[P.jsx("thead",{children:P.jsxs("tr",{className:"border-b",children:[f&&P.jsx("th",{className:"text-left p-3 font-semibold",children:"#"}),d.map(h=>P.jsx("th",{className:"text-left p-3 font-semibold",children:h},h))]})}),P.jsx("tbody",{children:e.map((h,y)=>P.jsxs("tr",{className:"border-b",children:[f&&P.jsx("td",{className:"p-3 text-muted-foreground",children:y+1}),d.map(v=>P.jsx("td",{className:"p-3",children:h[v]!==null&&h[v]!==void 0?String(h[v]):"-"},v))]},y))})]})})}return c==="list"?P.jsx("div",{className:"space-y-4",children:e.map((d,h)=>P.jsxs(en,{className:"p-4",children:[f&&P.jsxs("div",{className:"text-sm text-muted-foreground mb-2",children:["#",h+1]}),Object.entries(d).map(([y,v])=>P.jsxs("div",{className:"mb-2",children:[P.jsxs("span",{className:"font-semibold",children:[y,": "]}),P.jsx("span",{children:v!=null?String(v):"-"})]},y))]},h))}):P.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:e.map((d,h)=>P.jsxs(en,{className:"p-6",children:[f&&P.jsxs("div",{className:"text-sm text-muted-foreground mb-3",children:["#",h+1]}),Object.entries(d).map(([y,v])=>P.jsxs("div",{className:"mb-3",children:[P.jsx("div",{className:"text-sm font-semibold text-muted-foreground mb-1",children:y}),P.jsx("div",{className:"text-base",children:v!=null?String(v):"-"})]},y))]},h))})},Oo=(t,e)=>{if(t==null||t==="")return"-";switch(e){case"image":return P.jsx("img",{src:t,alt:"",className:"max-w-full h-auto rounded"});case"url":return P.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:t});case"boolean":return t==="true"||t===!0?"Yes":"No";case"longtext":return P.jsx("div",{className:"whitespace-pre-wrap",children:t});case"date":return new Date(t).toLocaleDateString();default:return String(t)}},h4=({to:t,className:e,children:r})=>P.jsx("a",{href:t,className:e,children:r}),p4=({slug:t,LinkComponent:e=h4})=>{const[r,n]=x.useState(null),[i,a]=x.useState([]),[o,s]=x.useState([]),[u,l]=x.useState(null),[c,f]=x.useState([]),[d,h]=x.useState([]),[y,v]=x.useState([]),[p,m]=x.useState(!0),[b,w]=x.useState(new Map);x.useEffect(()=>{O()},[t]);const O=async()=>{const{data:j}=await ct.from("pages").select("*").eq("is_published",!0).order("menu_order");if(v(j||[]),!t){m(!1);return}const{data:$}=await ct.from("pages").select("*").eq("slug",t).eq("is_published",!0).single();if($){const{data:k}=await ct.from("page_rows").select("*").eq("page_id",$.id).order("position"),{data:I}=await ct.from("page_components").select("*").eq("page_id",$.id).order("position");if(n($),a(k||[]),s(I||[]),$.layout_id){const{data:L}=await ct.from("layouts").select("*").eq("id",$.layout_id).eq("is_published",!0).maybeSingle();if(L){const{data:q}=await ct.from("layout_rows").select("*").eq("layout_id",L.id).order("position"),{data:z}=await ct.from("layout_components").select("*").eq("layout_id",L.id).order("position");l(L),f(q||[]),h(z||[])}}const R=(I||[]).filter(L=>L.is_widget_instance&&L.widget_id),M=new Map;for(const L of R)if(!M.has(L.widget_id)){const{data:q}=await ct.from("widget_rows").select("*").eq("widget_id",L.widget_id).order("position"),{data:z}=await ct.from("widget_components").select("*").eq("widget_id",L.widget_id).order("position");M.set(L.widget_id,{rows:q||[],components:z||[]})}w(M)}m(!1)},g=(j,$)=>o.filter(k=>k.row_id===j&&k.column_index===$).sort((k,I)=>k.position-I.position),_=(j,$)=>d.filter(k=>k.row_id===j&&k.column_index===$).sort((k,I)=>k.position-I.position),S={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4"},A=j=>{const $=b.get(j);return $?$.rows.sort((k,I)=>k.position-I.position).map(k=>{const I=$.components.filter(M=>M.row_id===k.id).sort((M,L)=>M.position-L.position),R=Array.from({length:k.columns},()=>[]);return I.forEach(M=>{M.column_index<k.columns&&R[M.column_index].push(M)}),P.jsx("div",{className:`grid gap-6 ${S[k.columns]}`,children:R.map((M,L)=>P.jsx("div",{className:"space-y-6",children:M.map(q=>P.jsx(Jd,{component:q},q.id))},L))},k.id)}):null},E=()=>P.jsxs("div",{className:"max-w-7xl mx-auto space-y-8",children:[!u&&P.jsx("h1",{className:"text-4xl font-bold mb-8",children:r==null?void 0:r.title}),i.map(j=>P.jsx("div",{className:`grid gap-6 ${S[j.columns]}`,children:Array.from({length:j.columns},($,k)=>P.jsx("div",{className:"space-y-6",children:g(j.id,k).map(I=>I.is_widget_instance&&I.widget_id?P.jsx("div",{children:A(I.widget_id)},I.id):P.jsx(Jd,{component:I},I.id))},k))},j.id))]}),N=()=>u?P.jsx("div",{className:"space-y-8",children:c.map(j=>P.jsx("div",{className:`grid gap-6 ${S[j.columns]}`,children:Array.from({length:j.columns},($,k)=>P.jsx("div",{className:"space-y-6",children:_(j.id,k).map(I=>I.component_type==="page-content"?P.jsx("div",{className:"space-y-8",children:E()},I.id):P.jsx(Jd,{component:I},I.id))},k))},j.id))}):E();return p?P.jsx("div",{className:"min-h-screen flex items-center justify-center",children:"Loading..."}):P.jsxs("div",{className:"min-h-screen bg-background",children:[P.jsx("nav",{className:"border-b bg-card shadow-[var(--shadow-soft)]",children:P.jsx("div",{className:"container mx-auto px-4 py-4",children:P.jsxs("div",{className:"flex items-center gap-6",children:[P.jsx(e,{to:"/",className:"text-xl font-bold bg-gradient-to-r from-primary to-accent bg-clip-text text-transparent",children:"My Website"}),P.jsx("div",{className:"flex gap-4",children:y.map(j=>P.jsx(e,{to:`/page/${j.slug}`,className:`text-sm transition-colors hover:text-primary ${j.slug===t?"text-primary font-medium":"text-muted-foreground"}`,children:j.title},j.id))})]})})}),P.jsx("main",{className:"container mx-auto px-4 py-12 overflow-y-auto",children:r?N():P.jsxs("div",{className:"text-center py-20",children:[P.jsx("h1",{className:"text-4xl font-bold mb-4",children:"Welcome to My Website"}),P.jsx("p",{className:"text-muted-foreground mb-8",children:"Select a page from the navigation above to get started"}),P.jsx(e,{to:"/auth",className:"inline-flex items-center justify-center rounded-md bg-primary px-6 py-3 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",children:"Admin Login"})]})})]})};Vr.PublicPage=p4,Object.defineProperty(Vr,Symbol.toStringTag,{value:"Module"})});
|