/home/awneajlw/.trash/assets.24/index-B-G4rlRt.js
function nH(t,e){for(var r=0;r<e.length;r++){const n=e[r];if(typeof n!="string"&&!Array.isArray(n)){for(const a in n)if(a!=="default"&&!(a in t)){const s=Object.getOwnPropertyDescriptor(n,a);s&&Object.defineProperty(t,a,s.get?s:{enumerable:!0,get:()=>n[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const s of a)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(a){const s={};return a.integrity&&(s.integrity=a.integrity),a.referrerPolicy&&(s.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?s.credentials="include":a.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(a){if(a.ep)return;a.ep=!0;const s=r(a);fetch(a.href,s)}})();function ns(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function aH(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var r=function n(){var a=!1;try{a=this instanceof n}catch{}return a?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 a=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,a.get?a:{enumerable:!0,get:function(){return t[n]}})}),r}var Ov={exports:{}},Zu={};/**
* @license React
* react-jsx-runtime.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Wk;function sH(){if(Wk)return Zu;Wk=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function r(n,a,s){var o=null;if(s!==void 0&&(o=""+s),a.key!==void 0&&(o=""+a.key),"key"in a){s={};for(var l in a)l!=="key"&&(s[l]=a[l])}else s=a;return a=s.ref,{$$typeof:t,type:n,key:o,ref:a!==void 0?a:null,props:s}}return Zu.Fragment=e,Zu.jsx=r,Zu.jsxs=r,Zu}var Xk;function iH(){return Xk||(Xk=1,Ov.exports=sH()),Ov.exports}var i=iH(),Pv={exports:{}},Ze={};/**
* @license React
* react.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Vk;function oH(){if(Vk)return Ze;Vk=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.iterator;function m(F){return F===null||typeof F!="object"?null:(F=p&&F[p]||F["@@iterator"],typeof F=="function"?F:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y=Object.assign,b={};function w(F,G,te){this.props=F,this.context=G,this.refs=b,this.updater=te||x}w.prototype.isReactComponent={},w.prototype.setState=function(F,G){if(typeof F!="object"&&typeof F!="function"&&F!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,F,G,"setState")},w.prototype.forceUpdate=function(F){this.updater.enqueueForceUpdate(this,F,"forceUpdate")};function N(){}N.prototype=w.prototype;function A(F,G,te){this.props=F,this.context=G,this.refs=b,this.updater=te||x}var S=A.prototype=new N;S.constructor=A,y(S,w.prototype),S.isPureReactComponent=!0;var C=Array.isArray,k={H:null,A:null,T:null,S:null,V:null},T=Object.prototype.hasOwnProperty;function E(F,G,te,K,U,re){return te=re.ref,{$$typeof:t,type:F,key:G,ref:te!==void 0?te:null,props:re}}function _(F,G){return E(F.type,G,void 0,void 0,void 0,F.props)}function L(F){return typeof F=="object"&&F!==null&&F.$$typeof===t}function P(F){var G={"=":"=0",":":"=2"};return"$"+F.replace(/[=:]/g,function(te){return G[te]})}var R=/\/+/g;function z(F,G){return typeof F=="object"&&F!==null&&F.key!=null?P(""+F.key):G.toString(36)}function B(){}function Y(F){switch(F.status){case"fulfilled":return F.value;case"rejected":throw F.reason;default:switch(typeof F.status=="string"?F.then(B,B):(F.status="pending",F.then(function(G){F.status==="pending"&&(F.status="fulfilled",F.value=G)},function(G){F.status==="pending"&&(F.status="rejected",F.reason=G)})),F.status){case"fulfilled":return F.value;case"rejected":throw F.reason}}throw F}function X(F,G,te,K,U){var re=typeof F;(re==="undefined"||re==="boolean")&&(F=null);var ae=!1;if(F===null)ae=!0;else switch(re){case"bigint":case"string":case"number":ae=!0;break;case"object":switch(F.$$typeof){case t:case e:ae=!0;break;case h:return ae=F._init,X(ae(F._payload),G,te,K,U)}}if(ae)return U=U(F),ae=K===""?"."+z(F,0):K,C(U)?(te="",ae!=null&&(te=ae.replace(R,"$&/")+"/"),X(U,G,te,"",function(ue){return ue})):U!=null&&(L(U)&&(U=_(U,te+(U.key==null||F&&F.key===U.key?"":(""+U.key).replace(R,"$&/")+"/")+ae)),G.push(U)),1;ae=0;var we=K===""?".":K+":";if(C(F))for(var ye=0;ye<F.length;ye++)K=F[ye],re=we+z(K,ye),ae+=X(K,G,te,re,U);else if(ye=m(F),typeof ye=="function")for(F=ye.call(F),ye=0;!(K=F.next()).done;)K=K.value,re=we+z(K,ye++),ae+=X(K,G,te,re,U);else if(re==="object"){if(typeof F.then=="function")return X(Y(F),G,te,K,U);throw G=String(F),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(F).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return ae}function H(F,G,te){if(F==null)return F;var K=[],U=0;return X(F,K,"","",function(re){return G.call(te,re,U++)}),K}function W(F){if(F._status===-1){var G=F._result;G=G(),G.then(function(te){(F._status===0||F._status===-1)&&(F._status=1,F._result=te)},function(te){(F._status===0||F._status===-1)&&(F._status=2,F._result=te)}),F._status===-1&&(F._status=0,F._result=G)}if(F._status===1)return F._result.default;throw F._result}var V=typeof reportError=="function"?reportError:function(F){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof F=="object"&&F!==null&&typeof F.message=="string"?String(F.message):String(F),error:F});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",F);return}console.error(F)};function Z(){}return Ze.Children={map:H,forEach:function(F,G,te){H(F,function(){G.apply(this,arguments)},te)},count:function(F){var G=0;return H(F,function(){G++}),G},toArray:function(F){return H(F,function(G){return G})||[]},only:function(F){if(!L(F))throw Error("React.Children.only expected to receive a single React element child.");return F}},Ze.Component=w,Ze.Fragment=r,Ze.Profiler=a,Ze.PureComponent=A,Ze.StrictMode=n,Ze.Suspense=c,Ze.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=k,Ze.__COMPILER_RUNTIME={__proto__:null,c:function(F){return k.H.useMemoCache(F)}},Ze.cache=function(F){return function(){return F.apply(null,arguments)}},Ze.cloneElement=function(F,G,te){if(F==null)throw Error("The argument must be a React element, but you passed "+F+".");var K=y({},F.props),U=F.key,re=void 0;if(G!=null)for(ae in G.ref!==void 0&&(re=void 0),G.key!==void 0&&(U=""+G.key),G)!T.call(G,ae)||ae==="key"||ae==="__self"||ae==="__source"||ae==="ref"&&G.ref===void 0||(K[ae]=G[ae]);var ae=arguments.length-2;if(ae===1)K.children=te;else if(1<ae){for(var we=Array(ae),ye=0;ye<ae;ye++)we[ye]=arguments[ye+2];K.children=we}return E(F.type,U,void 0,void 0,re,K)},Ze.createContext=function(F){return F={$$typeof:o,_currentValue:F,_currentValue2:F,_threadCount:0,Provider:null,Consumer:null},F.Provider=F,F.Consumer={$$typeof:s,_context:F},F},Ze.createElement=function(F,G,te){var K,U={},re=null;if(G!=null)for(K in G.key!==void 0&&(re=""+G.key),G)T.call(G,K)&&K!=="key"&&K!=="__self"&&K!=="__source"&&(U[K]=G[K]);var ae=arguments.length-2;if(ae===1)U.children=te;else if(1<ae){for(var we=Array(ae),ye=0;ye<ae;ye++)we[ye]=arguments[ye+2];U.children=we}if(F&&F.defaultProps)for(K in ae=F.defaultProps,ae)U[K]===void 0&&(U[K]=ae[K]);return E(F,re,void 0,void 0,null,U)},Ze.createRef=function(){return{current:null}},Ze.forwardRef=function(F){return{$$typeof:l,render:F}},Ze.isValidElement=L,Ze.lazy=function(F){return{$$typeof:h,_payload:{_status:-1,_result:F},_init:W}},Ze.memo=function(F,G){return{$$typeof:u,type:F,compare:G===void 0?null:G}},Ze.startTransition=function(F){var G=k.T,te={};k.T=te;try{var K=F(),U=k.S;U!==null&&U(te,K),typeof K=="object"&&K!==null&&typeof K.then=="function"&&K.then(Z,V)}catch(re){V(re)}finally{k.T=G}},Ze.unstable_useCacheRefresh=function(){return k.H.useCacheRefresh()},Ze.use=function(F){return k.H.use(F)},Ze.useActionState=function(F,G,te){return k.H.useActionState(F,G,te)},Ze.useCallback=function(F,G){return k.H.useCallback(F,G)},Ze.useContext=function(F){return k.H.useContext(F)},Ze.useDebugValue=function(){},Ze.useDeferredValue=function(F,G){return k.H.useDeferredValue(F,G)},Ze.useEffect=function(F,G,te){var K=k.H;if(typeof te=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return K.useEffect(F,G)},Ze.useId=function(){return k.H.useId()},Ze.useImperativeHandle=function(F,G,te){return k.H.useImperativeHandle(F,G,te)},Ze.useInsertionEffect=function(F,G){return k.H.useInsertionEffect(F,G)},Ze.useLayoutEffect=function(F,G){return k.H.useLayoutEffect(F,G)},Ze.useMemo=function(F,G){return k.H.useMemo(F,G)},Ze.useOptimistic=function(F,G){return k.H.useOptimistic(F,G)},Ze.useReducer=function(F,G,te){return k.H.useReducer(F,G,te)},Ze.useRef=function(F){return k.H.useRef(F)},Ze.useState=function(F){return k.H.useState(F)},Ze.useSyncExternalStore=function(F,G,te){return k.H.useSyncExternalStore(F,G,te)},Ze.useTransition=function(){return k.H.useTransition()},Ze.version="19.1.0",Ze}var qk;function Gl(){return qk||(qk=1,Pv.exports=oH()),Pv.exports}var O=Gl();const Lr=ns(O),A2=nH({__proto__:null,default:Lr},[O]);var _v={exports:{}},Qu={},Rv={exports:{}},Lv={};/**
* @license React
* scheduler.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Gk;function lH(){return Gk||(Gk=1,function(t){function e(H,W){var V=H.length;H.push(W);e:for(;0<V;){var Z=V-1>>>1,F=H[Z];if(0<a(F,W))H[Z]=W,H[V]=F,V=Z;else break e}}function r(H){return H.length===0?null:H[0]}function n(H){if(H.length===0)return null;var W=H[0],V=H.pop();if(V!==W){H[0]=V;e:for(var Z=0,F=H.length,G=F>>>1;Z<G;){var te=2*(Z+1)-1,K=H[te],U=te+1,re=H[U];if(0>a(K,V))U<F&&0>a(re,K)?(H[Z]=re,H[U]=V,Z=U):(H[Z]=K,H[te]=V,Z=te);else if(U<F&&0>a(re,V))H[Z]=re,H[U]=V,Z=U;else break e}}return W}function a(H,W){var V=H.sortIndex-W.sortIndex;return V!==0?V:H.id-W.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,l=o.now();t.unstable_now=function(){return o.now()-l}}var c=[],u=[],h=1,p=null,m=3,x=!1,y=!1,b=!1,w=!1,N=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;function C(H){for(var W=r(u);W!==null;){if(W.callback===null)n(u);else if(W.startTime<=H)n(u),W.sortIndex=W.expirationTime,e(c,W);else break;W=r(u)}}function k(H){if(b=!1,C(H),!y)if(r(c)!==null)y=!0,T||(T=!0,z());else{var W=r(u);W!==null&&X(k,W.startTime-H)}}var T=!1,E=-1,_=5,L=-1;function P(){return w?!0:!(t.unstable_now()-L<_)}function R(){if(w=!1,T){var H=t.unstable_now();L=H;var W=!0;try{e:{y=!1,b&&(b=!1,A(E),E=-1),x=!0;var V=m;try{t:{for(C(H),p=r(c);p!==null&&!(p.expirationTime>H&&P());){var Z=p.callback;if(typeof Z=="function"){p.callback=null,m=p.priorityLevel;var F=Z(p.expirationTime<=H);if(H=t.unstable_now(),typeof F=="function"){p.callback=F,C(H),W=!0;break t}p===r(c)&&n(c),C(H)}else n(c);p=r(c)}if(p!==null)W=!0;else{var G=r(u);G!==null&&X(k,G.startTime-H),W=!1}}break e}finally{p=null,m=V,x=!1}W=void 0}}finally{W?z():T=!1}}}var z;if(typeof S=="function")z=function(){S(R)};else if(typeof MessageChannel<"u"){var B=new MessageChannel,Y=B.port2;B.port1.onmessage=R,z=function(){Y.postMessage(null)}}else z=function(){N(R,0)};function X(H,W){E=N(function(){H(t.unstable_now())},W)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(H){H.callback=null},t.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):_=0<H?Math.floor(1e3/H):5},t.unstable_getCurrentPriorityLevel=function(){return m},t.unstable_next=function(H){switch(m){case 1:case 2:case 3:var W=3;break;default:W=m}var V=m;m=W;try{return H()}finally{m=V}},t.unstable_requestPaint=function(){w=!0},t.unstable_runWithPriority=function(H,W){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var V=m;m=H;try{return W()}finally{m=V}},t.unstable_scheduleCallback=function(H,W,V){var Z=t.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?Z+V:Z):V=Z,H){case 1:var F=-1;break;case 2:F=250;break;case 5:F=1073741823;break;case 4:F=1e4;break;default:F=5e3}return F=V+F,H={id:h++,callback:W,priorityLevel:H,startTime:V,expirationTime:F,sortIndex:-1},V>Z?(H.sortIndex=V,e(u,H),r(c)===null&&H===r(u)&&(b?(A(E),E=-1):b=!0,X(k,V-Z))):(H.sortIndex=F,e(c,H),y||x||(y=!0,T||(T=!0,z()))),H},t.unstable_shouldYield=P,t.unstable_wrapCallback=function(H){var W=m;return function(){var V=m;m=W;try{return H.apply(this,arguments)}finally{m=V}}}}(Lv)),Lv}var Kk;function cH(){return Kk||(Kk=1,Rv.exports=lH()),Rv.exports}var zv={exports:{}},nn={};/**
* @license React
* react-dom.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Zk;function dH(){if(Zk)return nn;Zk=1;var t=Gl();function e(c){var u="https://react.dev/errors/"+c;if(1<arguments.length){u+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)u+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+c+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var n={d:{f:r,r:function(){throw Error(e(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for("react.portal");function s(c,u,h){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:p==null?null:""+p,children:c,containerInfo:u,implementation:h}}var o=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(c,u){if(c==="font")return"";if(typeof u=="string")return u==="use-credentials"?u:""}return nn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,nn.createPortal=function(c,u){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!u||u.nodeType!==1&&u.nodeType!==9&&u.nodeType!==11)throw Error(e(299));return s(c,u,null,h)},nn.flushSync=function(c){var u=o.T,h=n.p;try{if(o.T=null,n.p=2,c)return c()}finally{o.T=u,n.p=h,n.d.f()}},nn.preconnect=function(c,u){typeof c=="string"&&(u?(u=u.crossOrigin,u=typeof u=="string"?u==="use-credentials"?u:"":void 0):u=null,n.d.C(c,u))},nn.prefetchDNS=function(c){typeof c=="string"&&n.d.D(c)},nn.preinit=function(c,u){if(typeof c=="string"&&u&&typeof u.as=="string"){var h=u.as,p=l(h,u.crossOrigin),m=typeof u.integrity=="string"?u.integrity:void 0,x=typeof u.fetchPriority=="string"?u.fetchPriority:void 0;h==="style"?n.d.S(c,typeof u.precedence=="string"?u.precedence:void 0,{crossOrigin:p,integrity:m,fetchPriority:x}):h==="script"&&n.d.X(c,{crossOrigin:p,integrity:m,fetchPriority:x,nonce:typeof u.nonce=="string"?u.nonce:void 0})}},nn.preinitModule=function(c,u){if(typeof c=="string")if(typeof u=="object"&&u!==null){if(u.as==null||u.as==="script"){var h=l(u.as,u.crossOrigin);n.d.M(c,{crossOrigin:h,integrity:typeof u.integrity=="string"?u.integrity:void 0,nonce:typeof u.nonce=="string"?u.nonce:void 0})}}else u==null&&n.d.M(c)},nn.preload=function(c,u){if(typeof c=="string"&&typeof u=="object"&&u!==null&&typeof u.as=="string"){var h=u.as,p=l(h,u.crossOrigin);n.d.L(c,h,{crossOrigin:p,integrity:typeof u.integrity=="string"?u.integrity:void 0,nonce:typeof u.nonce=="string"?u.nonce:void 0,type:typeof u.type=="string"?u.type:void 0,fetchPriority:typeof u.fetchPriority=="string"?u.fetchPriority:void 0,referrerPolicy:typeof u.referrerPolicy=="string"?u.referrerPolicy:void 0,imageSrcSet:typeof u.imageSrcSet=="string"?u.imageSrcSet:void 0,imageSizes:typeof u.imageSizes=="string"?u.imageSizes:void 0,media:typeof u.media=="string"?u.media:void 0})}},nn.preloadModule=function(c,u){if(typeof c=="string")if(u){var h=l(u.as,u.crossOrigin);n.d.m(c,{as:typeof u.as=="string"&&u.as!=="script"?u.as:void 0,crossOrigin:h,integrity:typeof u.integrity=="string"?u.integrity:void 0})}else n.d.m(c)},nn.requestFormReset=function(c){n.d.r(c)},nn.unstable_batchedUpdates=function(c,u){return c(u)},nn.useFormState=function(c,u,h){return o.H.useFormState(c,u,h)},nn.useFormStatus=function(){return o.H.useHostTransitionStatus()},nn.version="19.1.0",nn}var Qk;function vP(){if(Qk)return zv.exports;Qk=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),zv.exports=dH(),zv.exports}/**
* @license React
* react-dom-client.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Jk;function uH(){if(Jk)return Qu;Jk=1;var t=cH(),e=Gl(),r=vP();function n(d){var f="https://react.dev/errors/"+d;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)f+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+d+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(d){return!(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)}function s(d){var f=d,g=d;if(d.alternate)for(;f.return;)f=f.return;else{d=f;do f=d,(f.flags&4098)!==0&&(g=f.return),d=f.return;while(d)}return f.tag===3?g:null}function o(d){if(d.tag===13){var f=d.memoizedState;if(f===null&&(d=d.alternate,d!==null&&(f=d.memoizedState)),f!==null)return f.dehydrated}return null}function l(d){if(s(d)!==d)throw Error(n(188))}function c(d){var f=d.alternate;if(!f){if(f=s(d),f===null)throw Error(n(188));return f!==d?null:d}for(var g=d,v=f;;){var D=g.return;if(D===null)break;var M=D.alternate;if(M===null){if(v=D.return,v!==null){g=v;continue}break}if(D.child===M.child){for(M=D.child;M;){if(M===g)return l(D),d;if(M===v)return l(D),f;M=M.sibling}throw Error(n(188))}if(g.return!==v.return)g=D,v=M;else{for(var I=!1,$=D.child;$;){if($===g){I=!0,g=D,v=M;break}if($===v){I=!0,v=D,g=M;break}$=$.sibling}if(!I){for($=M.child;$;){if($===g){I=!0,g=M,v=D;break}if($===v){I=!0,v=M,g=D;break}$=$.sibling}if(!I)throw Error(n(189))}}if(g.alternate!==v)throw Error(n(190))}if(g.tag!==3)throw Error(n(188));return g.stateNode.current===g?d:f}function u(d){var f=d.tag;if(f===5||f===26||f===27||f===6)return d;for(d=d.child;d!==null;){if(f=u(d),f!==null)return f;d=d.sibling}return null}var h=Object.assign,p=Symbol.for("react.element"),m=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),N=Symbol.for("react.provider"),A=Symbol.for("react.consumer"),S=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),k=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),L=Symbol.for("react.activity"),P=Symbol.for("react.memo_cache_sentinel"),R=Symbol.iterator;function z(d){return d===null||typeof d!="object"?null:(d=R&&d[R]||d["@@iterator"],typeof d=="function"?d:null)}var B=Symbol.for("react.client.reference");function Y(d){if(d==null)return null;if(typeof d=="function")return d.$$typeof===B?null:d.displayName||d.name||null;if(typeof d=="string")return d;switch(d){case y:return"Fragment";case w:return"Profiler";case b:return"StrictMode";case k:return"Suspense";case T:return"SuspenseList";case L:return"Activity"}if(typeof d=="object")switch(d.$$typeof){case x:return"Portal";case S:return(d.displayName||"Context")+".Provider";case A:return(d._context.displayName||"Context")+".Consumer";case C:var f=d.render;return d=d.displayName,d||(d=f.displayName||f.name||"",d=d!==""?"ForwardRef("+d+")":"ForwardRef"),d;case E:return f=d.displayName||null,f!==null?f:Y(d.type)||"Memo";case _:f=d._payload,d=d._init;try{return Y(d(f))}catch{}}return null}var X=Array.isArray,H=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V={pending:!1,data:null,method:null,action:null},Z=[],F=-1;function G(d){return{current:d}}function te(d){0>F||(d.current=Z[F],Z[F]=null,F--)}function K(d,f){F++,Z[F]=d.current,d.current=f}var U=G(null),re=G(null),ae=G(null),we=G(null);function ye(d,f){switch(K(ae,f),K(re,d),K(U,null),f.nodeType){case 9:case 11:d=(d=f.documentElement)&&(d=d.namespaceURI)?yk(d):0;break;default:if(d=f.tagName,f=f.namespaceURI)f=yk(f),d=vk(f,d);else switch(d){case"svg":d=1;break;case"math":d=2;break;default:d=0}}te(U),K(U,d)}function ue(){te(U),te(re),te(ae)}function je(d){d.memoizedState!==null&&K(we,d);var f=U.current,g=vk(f,d.type);f!==g&&(K(re,d),K(U,g))}function Ce(d){re.current===d&&(te(U),te(re)),we.current===d&&(te(we),Xu._currentValue=V)}var pe=Object.prototype.hasOwnProperty,Ye=t.unstable_scheduleCallback,Re=t.unstable_cancelCallback,gt=t.unstable_shouldYield,Ut=t.unstable_requestPaint,xt=t.unstable_now,vn=t.unstable_getCurrentPriorityLevel,pa=t.unstable_ImmediatePriority,Ft=t.unstable_UserBlockingPriority,Hn=t.unstable_NormalPriority,Xe=t.unstable_LowPriority,eu=t.unstable_IdlePriority,vb=t.log,oc=t.unstable_setDisableYieldValue,Ro=null,dn=null;function ls(d){if(typeof vb=="function"&&oc(d),dn&&typeof dn.setStrictMode=="function")try{dn.setStrictMode(Ro,d)}catch{}}var Mr=Math.clz32?Math.clz32:wb,Lo=Math.log,zo=Math.LN2;function wb(d){return d>>>=0,d===0?32:31-(Lo(d)/zo|0)|0}var Rs=256,Jr=4194304;function wn(d){var f=d&42;if(f!==0)return f;switch(d&-d){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return d&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return d}}function en(d,f,g){var v=d.pendingLanes;if(v===0)return 0;var D=0,M=d.suspendedLanes,I=d.pingedLanes;d=d.warmLanes;var $=v&134217727;return $!==0?(v=$&~M,v!==0?D=wn(v):(I&=$,I!==0?D=wn(I):g||(g=$&~d,g!==0&&(D=wn(g))))):($=v&~M,$!==0?D=wn($):I!==0?D=wn(I):g||(g=v&~d,g!==0&&(D=wn(g)))),D===0?0:f!==0&&f!==D&&(f&M)===0&&(M=D&-D,g=f&-f,M>=g||M===32&&(g&4194048)!==0)?f:D}function Io(d,f){return(d.pendingLanes&~(d.suspendedLanes&~d.pingedLanes)&f)===0}function jb(d,f){switch(d){case 1:case 2:case 4:case 8:case 64:return f+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return f+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Bo(){var d=Rs;return Rs<<=1,(Rs&4194048)===0&&(Rs=256),d}function yp(){var d=Jr;return Jr<<=1,(Jr&62914560)===0&&(Jr=4194304),d}function Fo(d){for(var f=[],g=0;31>g;g++)f.push(d);return f}function Ls(d,f){d.pendingLanes|=f,f!==268435456&&(d.suspendedLanes=0,d.pingedLanes=0,d.warmLanes=0)}function vp(d,f,g,v,D,M){var I=d.pendingLanes;d.pendingLanes=g,d.suspendedLanes=0,d.pingedLanes=0,d.warmLanes=0,d.expiredLanes&=g,d.entangledLanes&=g,d.errorRecoveryDisabledLanes&=g,d.shellSuspendCounter=0;var $=d.entanglements,q=d.expirationTimes,ie=d.hiddenUpdates;for(g=I&~g;0<g;){var fe=31-Mr(g),xe=1<<fe;$[fe]=0,q[fe]=-1;var oe=ie[fe];if(oe!==null)for(ie[fe]=null,fe=0;fe<oe.length;fe++){var le=oe[fe];le!==null&&(le.lane&=-536870913)}g&=~xe}v!==0&&wp(d,v,0),M!==0&&D===0&&d.tag!==0&&(d.suspendedLanes|=M&~(I&~f))}function wp(d,f,g){d.pendingLanes|=f,d.suspendedLanes&=~f;var v=31-Mr(f);d.entangledLanes|=f,d.entanglements[v]=d.entanglements[v]|1073741824|g&4194090}function jp(d,f){var g=d.entangledLanes|=f;for(d=d.entanglements;g;){var v=31-Mr(g),D=1<<v;D&f|d[v]&f&&(d[v]|=f),g&=~D}}function tu(d){switch(d){case 2:d=1;break;case 8:d=4;break;case 32:d=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:d=128;break;case 268435456:d=134217728;break;default:d=0}return d}function ru(d){return d&=-d,2<d?8<d?(d&134217727)!==0?32:268435456:8:2}function Np(){var d=W.p;return d!==0?d:(d=window.event,d===void 0?32:Bk(d.type))}function Nb(d,f){var g=W.p;try{return W.p=d,f()}finally{W.p=g}}var cs=Math.random().toString(36).slice(2),ur="__reactFiber$"+cs,Er="__reactProps$"+cs,$n="__reactContainer$"+cs,lc="__reactEvents$"+cs,Sb="__reactListeners$"+cs,Ab="__reactHandles$"+cs,Sp="__reactResources$"+cs,Ho="__reactMarker$"+cs;function nu(d){delete d[ur],delete d[Er],delete d[lc],delete d[Sb],delete d[Ab]}function Mi(d){var f=d[ur];if(f)return f;for(var g=d.parentNode;g;){if(f=g[$n]||g[ur]){if(g=f.alternate,f.child!==null||g!==null&&g.child!==null)for(d=Sk(d);d!==null;){if(g=d[ur])return g;d=Sk(d)}return f}d=g,g=d.parentNode}return null}function Ua(d){if(d=d[ur]||d[$n]){var f=d.tag;if(f===5||f===6||f===13||f===26||f===27||f===3)return d}return null}function zs(d){var f=d.tag;if(f===5||f===26||f===27||f===6)return d.stateNode;throw Error(n(33))}function Wa(d){var f=d[Sp];return f||(f=d[Sp]={hoistableStyles:new Map,hoistableScripts:new Map}),f}function Qt(d){d[Ho]=!0}var ds=new Set,au={};function Q(d,f){Ee(d,f),Ee(d+"Capture",f)}function Ee(d,f){for(au[d]=f,d=0;d<f.length;d++)ds.add(f[d])}var Ke=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),We={},nt={};function $o(d){return pe.call(nt,d)?!0:pe.call(We,d)?!1:Ke.test(d)?nt[d]=!0:(We[d]=!0,!1)}function Ei(d,f,g){if($o(f))if(g===null)d.removeAttribute(f);else{switch(typeof g){case"undefined":case"function":case"symbol":d.removeAttribute(f);return;case"boolean":var v=f.toLowerCase().slice(0,5);if(v!=="data-"&&v!=="aria-"){d.removeAttribute(f);return}}d.setAttribute(f,""+g)}}function Oi(d,f,g){if(g===null)d.removeAttribute(f);else{switch(typeof g){case"undefined":case"function":case"symbol":case"boolean":d.removeAttribute(f);return}d.setAttribute(f,""+g)}}function tn(d,f,g,v){if(v===null)d.removeAttribute(g);else{switch(typeof v){case"undefined":case"function":case"symbol":case"boolean":d.removeAttribute(g);return}d.setAttributeNS(f,g,""+v)}}var Cb,h3;function cc(d){if(Cb===void 0)try{throw Error()}catch(g){var f=g.stack.trim().match(/\n( *(at )?)/);Cb=f&&f[1]||"",h3=-1<g.stack.indexOf(`
at`)?" (<anonymous>)":-1<g.stack.indexOf("@")?"@unknown:0:0":""}return`
`+Cb+d+h3}var kb=!1;function Db(d,f){if(!d||kb)return"";kb=!0;var g=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var v={DetermineComponentFrameRoot:function(){try{if(f){var xe=function(){throw Error()};if(Object.defineProperty(xe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(xe,[])}catch(le){var oe=le}Reflect.construct(d,[],xe)}else{try{xe.call()}catch(le){oe=le}d.call(xe.prototype)}}else{try{throw Error()}catch(le){oe=le}(xe=d())&&typeof xe.catch=="function"&&xe.catch(function(){})}}catch(le){if(le&&oe&&typeof le.stack=="string")return[le.stack,oe.stack]}return[null,null]}};v.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var D=Object.getOwnPropertyDescriptor(v.DetermineComponentFrameRoot,"name");D&&D.configurable&&Object.defineProperty(v.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var M=v.DetermineComponentFrameRoot(),I=M[0],$=M[1];if(I&&$){var q=I.split(`
`),ie=$.split(`
`);for(D=v=0;v<q.length&&!q[v].includes("DetermineComponentFrameRoot");)v++;for(;D<ie.length&&!ie[D].includes("DetermineComponentFrameRoot");)D++;if(v===q.length||D===ie.length)for(v=q.length-1,D=ie.length-1;1<=v&&0<=D&&q[v]!==ie[D];)D--;for(;1<=v&&0<=D;v--,D--)if(q[v]!==ie[D]){if(v!==1||D!==1)do if(v--,D--,0>D||q[v]!==ie[D]){var fe=`
`+q[v].replace(" at new "," at ");return d.displayName&&fe.includes("<anonymous>")&&(fe=fe.replace("<anonymous>",d.displayName)),fe}while(1<=v&&0<=D);break}}}finally{kb=!1,Error.prepareStackTrace=g}return(g=d?d.displayName||d.name:"")?cc(g):""}function ZI(d){switch(d.tag){case 26:case 27:case 5:return cc(d.type);case 16:return cc("Lazy");case 13:return cc("Suspense");case 19:return cc("SuspenseList");case 0:case 15:return Db(d.type,!1);case 11:return Db(d.type.render,!1);case 1:return Db(d.type,!0);case 31:return cc("Activity");default:return""}}function f3(d){try{var f="";do f+=ZI(d),d=d.return;while(d);return f}catch(g){return`
Error generating stack: `+g.message+`
`+g.stack}}function ma(d){switch(typeof d){case"bigint":case"boolean":case"number":case"string":case"undefined":return d;case"object":return d;default:return""}}function p3(d){var f=d.type;return(d=d.nodeName)&&d.toLowerCase()==="input"&&(f==="checkbox"||f==="radio")}function QI(d){var f=p3(d)?"checked":"value",g=Object.getOwnPropertyDescriptor(d.constructor.prototype,f),v=""+d[f];if(!d.hasOwnProperty(f)&&typeof g<"u"&&typeof g.get=="function"&&typeof g.set=="function"){var D=g.get,M=g.set;return Object.defineProperty(d,f,{configurable:!0,get:function(){return D.call(this)},set:function(I){v=""+I,M.call(this,I)}}),Object.defineProperty(d,f,{enumerable:g.enumerable}),{getValue:function(){return v},setValue:function(I){v=""+I},stopTracking:function(){d._valueTracker=null,delete d[f]}}}}function Ap(d){d._valueTracker||(d._valueTracker=QI(d))}function m3(d){if(!d)return!1;var f=d._valueTracker;if(!f)return!0;var g=f.getValue(),v="";return d&&(v=p3(d)?d.checked?"true":"false":d.value),d=v,d!==g?(f.setValue(d),!0):!1}function Cp(d){if(d=d||(typeof document<"u"?document:void 0),typeof d>"u")return null;try{return d.activeElement||d.body}catch{return d.body}}var JI=/[\n"\\]/g;function ga(d){return d.replace(JI,function(f){return"\\"+f.charCodeAt(0).toString(16)+" "})}function Tb(d,f,g,v,D,M,I,$){d.name="",I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"?d.type=I:d.removeAttribute("type"),f!=null?I==="number"?(f===0&&d.value===""||d.value!=f)&&(d.value=""+ma(f)):d.value!==""+ma(f)&&(d.value=""+ma(f)):I!=="submit"&&I!=="reset"||d.removeAttribute("value"),f!=null?Mb(d,I,ma(f)):g!=null?Mb(d,I,ma(g)):v!=null&&d.removeAttribute("value"),D==null&&M!=null&&(d.defaultChecked=!!M),D!=null&&(d.checked=D&&typeof D!="function"&&typeof D!="symbol"),$!=null&&typeof $!="function"&&typeof $!="symbol"&&typeof $!="boolean"?d.name=""+ma($):d.removeAttribute("name")}function g3(d,f,g,v,D,M,I,$){if(M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"&&(d.type=M),f!=null||g!=null){if(!(M!=="submit"&&M!=="reset"||f!=null))return;g=g!=null?""+ma(g):"",f=f!=null?""+ma(f):g,$||f===d.value||(d.value=f),d.defaultValue=f}v=v??D,v=typeof v!="function"&&typeof v!="symbol"&&!!v,d.checked=$?d.checked:!!v,d.defaultChecked=!!v,I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"&&(d.name=I)}function Mb(d,f,g){f==="number"&&Cp(d.ownerDocument)===d||d.defaultValue===""+g||(d.defaultValue=""+g)}function dc(d,f,g,v){if(d=d.options,f){f={};for(var D=0;D<g.length;D++)f["$"+g[D]]=!0;for(g=0;g<d.length;g++)D=f.hasOwnProperty("$"+d[g].value),d[g].selected!==D&&(d[g].selected=D),D&&v&&(d[g].defaultSelected=!0)}else{for(g=""+ma(g),f=null,D=0;D<d.length;D++){if(d[D].value===g){d[D].selected=!0,v&&(d[D].defaultSelected=!0);return}f!==null||d[D].disabled||(f=d[D])}f!==null&&(f.selected=!0)}}function x3(d,f,g){if(f!=null&&(f=""+ma(f),f!==d.value&&(d.value=f),g==null)){d.defaultValue!==f&&(d.defaultValue=f);return}d.defaultValue=g!=null?""+ma(g):""}function b3(d,f,g,v){if(f==null){if(v!=null){if(g!=null)throw Error(n(92));if(X(v)){if(1<v.length)throw Error(n(93));v=v[0]}g=v}g==null&&(g=""),f=g}g=ma(f),d.defaultValue=g,v=d.textContent,v===g&&v!==""&&v!==null&&(d.value=v)}function uc(d,f){if(f){var g=d.firstChild;if(g&&g===d.lastChild&&g.nodeType===3){g.nodeValue=f;return}}d.textContent=f}var eB=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function y3(d,f,g){var v=f.indexOf("--")===0;g==null||typeof g=="boolean"||g===""?v?d.setProperty(f,""):f==="float"?d.cssFloat="":d[f]="":v?d.setProperty(f,g):typeof g!="number"||g===0||eB.has(f)?f==="float"?d.cssFloat=g:d[f]=(""+g).trim():d[f]=g+"px"}function v3(d,f,g){if(f!=null&&typeof f!="object")throw Error(n(62));if(d=d.style,g!=null){for(var v in g)!g.hasOwnProperty(v)||f!=null&&f.hasOwnProperty(v)||(v.indexOf("--")===0?d.setProperty(v,""):v==="float"?d.cssFloat="":d[v]="");for(var D in f)v=f[D],f.hasOwnProperty(D)&&g[D]!==v&&y3(d,D,v)}else for(var M in f)f.hasOwnProperty(M)&&y3(d,M,f[M])}function Eb(d){if(d.indexOf("-")===-1)return!1;switch(d){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var tB=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),rB=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function kp(d){return rB.test(""+d)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":d}var Ob=null;function Pb(d){return d=d.target||d.srcElement||window,d.correspondingUseElement&&(d=d.correspondingUseElement),d.nodeType===3?d.parentNode:d}var hc=null,fc=null;function w3(d){var f=Ua(d);if(f&&(d=f.stateNode)){var g=d[Er]||null;e:switch(d=f.stateNode,f.type){case"input":if(Tb(d,g.value,g.defaultValue,g.defaultValue,g.checked,g.defaultChecked,g.type,g.name),f=g.name,g.type==="radio"&&f!=null){for(g=d;g.parentNode;)g=g.parentNode;for(g=g.querySelectorAll('input[name="'+ga(""+f)+'"][type="radio"]'),f=0;f<g.length;f++){var v=g[f];if(v!==d&&v.form===d.form){var D=v[Er]||null;if(!D)throw Error(n(90));Tb(v,D.value,D.defaultValue,D.defaultValue,D.checked,D.defaultChecked,D.type,D.name)}}for(f=0;f<g.length;f++)v=g[f],v.form===d.form&&m3(v)}break e;case"textarea":x3(d,g.value,g.defaultValue);break e;case"select":f=g.value,f!=null&&dc(d,!!g.multiple,f,!1)}}}var _b=!1;function j3(d,f,g){if(_b)return d(f,g);_b=!0;try{var v=d(f);return v}finally{if(_b=!1,(hc!==null||fc!==null)&&(hm(),hc&&(f=hc,d=fc,fc=hc=null,w3(f),d)))for(f=0;f<d.length;f++)w3(d[f])}}function su(d,f){var g=d.stateNode;if(g===null)return null;var v=g[Er]||null;if(v===null)return null;g=v[f];e:switch(f){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(v=!v.disabled)||(d=d.type,v=!(d==="button"||d==="input"||d==="select"||d==="textarea")),d=!v;break e;default:d=!1}if(d)return null;if(g&&typeof g!="function")throw Error(n(231,f,typeof g));return g}var Is=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Rb=!1;if(Is)try{var iu={};Object.defineProperty(iu,"passive",{get:function(){Rb=!0}}),window.addEventListener("test",iu,iu),window.removeEventListener("test",iu,iu)}catch{Rb=!1}var Pi=null,Lb=null,Dp=null;function N3(){if(Dp)return Dp;var d,f=Lb,g=f.length,v,D="value"in Pi?Pi.value:Pi.textContent,M=D.length;for(d=0;d<g&&f[d]===D[d];d++);var I=g-d;for(v=1;v<=I&&f[g-v]===D[M-v];v++);return Dp=D.slice(d,1<v?1-v:void 0)}function Tp(d){var f=d.keyCode;return"charCode"in d?(d=d.charCode,d===0&&f===13&&(d=13)):d=f,d===10&&(d=13),32<=d||d===13?d:0}function Mp(){return!0}function S3(){return!1}function jn(d){function f(g,v,D,M,I){this._reactName=g,this._targetInst=D,this.type=v,this.nativeEvent=M,this.target=I,this.currentTarget=null;for(var $ in d)d.hasOwnProperty($)&&(g=d[$],this[$]=g?g(M):M[$]);return this.isDefaultPrevented=(M.defaultPrevented!=null?M.defaultPrevented:M.returnValue===!1)?Mp:S3,this.isPropagationStopped=S3,this}return h(f.prototype,{preventDefault:function(){this.defaultPrevented=!0;var g=this.nativeEvent;g&&(g.preventDefault?g.preventDefault():typeof g.returnValue!="unknown"&&(g.returnValue=!1),this.isDefaultPrevented=Mp)},stopPropagation:function(){var g=this.nativeEvent;g&&(g.stopPropagation?g.stopPropagation():typeof g.cancelBubble!="unknown"&&(g.cancelBubble=!0),this.isPropagationStopped=Mp)},persist:function(){},isPersistent:Mp}),f}var Yo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(d){return d.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ep=jn(Yo),ou=h({},Yo,{view:0,detail:0}),nB=jn(ou),zb,Ib,lu,Op=h({},ou,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fb,button:0,buttons:0,relatedTarget:function(d){return d.relatedTarget===void 0?d.fromElement===d.srcElement?d.toElement:d.fromElement:d.relatedTarget},movementX:function(d){return"movementX"in d?d.movementX:(d!==lu&&(lu&&d.type==="mousemove"?(zb=d.screenX-lu.screenX,Ib=d.screenY-lu.screenY):Ib=zb=0,lu=d),zb)},movementY:function(d){return"movementY"in d?d.movementY:Ib}}),A3=jn(Op),aB=h({},Op,{dataTransfer:0}),sB=jn(aB),iB=h({},ou,{relatedTarget:0}),Bb=jn(iB),oB=h({},Yo,{animationName:0,elapsedTime:0,pseudoElement:0}),lB=jn(oB),cB=h({},Yo,{clipboardData:function(d){return"clipboardData"in d?d.clipboardData:window.clipboardData}}),dB=jn(cB),uB=h({},Yo,{data:0}),C3=jn(uB),hB={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},fB={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},pB={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function mB(d){var f=this.nativeEvent;return f.getModifierState?f.getModifierState(d):(d=pB[d])?!!f[d]:!1}function Fb(){return mB}var gB=h({},ou,{key:function(d){if(d.key){var f=hB[d.key]||d.key;if(f!=="Unidentified")return f}return d.type==="keypress"?(d=Tp(d),d===13?"Enter":String.fromCharCode(d)):d.type==="keydown"||d.type==="keyup"?fB[d.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fb,charCode:function(d){return d.type==="keypress"?Tp(d):0},keyCode:function(d){return d.type==="keydown"||d.type==="keyup"?d.keyCode:0},which:function(d){return d.type==="keypress"?Tp(d):d.type==="keydown"||d.type==="keyup"?d.keyCode:0}}),xB=jn(gB),bB=h({},Op,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),k3=jn(bB),yB=h({},ou,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fb}),vB=jn(yB),wB=h({},Yo,{propertyName:0,elapsedTime:0,pseudoElement:0}),jB=jn(wB),NB=h({},Op,{deltaX:function(d){return"deltaX"in d?d.deltaX:"wheelDeltaX"in d?-d.wheelDeltaX:0},deltaY:function(d){return"deltaY"in d?d.deltaY:"wheelDeltaY"in d?-d.wheelDeltaY:"wheelDelta"in d?-d.wheelDelta:0},deltaZ:0,deltaMode:0}),SB=jn(NB),AB=h({},Yo,{newState:0,oldState:0}),CB=jn(AB),kB=[9,13,27,32],Hb=Is&&"CompositionEvent"in window,cu=null;Is&&"documentMode"in document&&(cu=document.documentMode);var DB=Is&&"TextEvent"in window&&!cu,D3=Is&&(!Hb||cu&&8<cu&&11>=cu),T3=" ",M3=!1;function E3(d,f){switch(d){case"keyup":return kB.indexOf(f.keyCode)!==-1;case"keydown":return f.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function O3(d){return d=d.detail,typeof d=="object"&&"data"in d?d.data:null}var pc=!1;function TB(d,f){switch(d){case"compositionend":return O3(f);case"keypress":return f.which!==32?null:(M3=!0,T3);case"textInput":return d=f.data,d===T3&&M3?null:d;default:return null}}function MB(d,f){if(pc)return d==="compositionend"||!Hb&&E3(d,f)?(d=N3(),Dp=Lb=Pi=null,pc=!1,d):null;switch(d){case"paste":return null;case"keypress":if(!(f.ctrlKey||f.altKey||f.metaKey)||f.ctrlKey&&f.altKey){if(f.char&&1<f.char.length)return f.char;if(f.which)return String.fromCharCode(f.which)}return null;case"compositionend":return D3&&f.locale!=="ko"?null:f.data;default:return null}}var EB={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function P3(d){var f=d&&d.nodeName&&d.nodeName.toLowerCase();return f==="input"?!!EB[d.type]:f==="textarea"}function _3(d,f,g,v){hc?fc?fc.push(v):fc=[v]:hc=v,f=bm(f,"onChange"),0<f.length&&(g=new Ep("onChange","change",null,g,v),d.push({event:g,listeners:f}))}var du=null,uu=null;function OB(d){pk(d,0)}function Pp(d){var f=zs(d);if(m3(f))return d}function R3(d,f){if(d==="change")return f}var L3=!1;if(Is){var $b;if(Is){var Yb="oninput"in document;if(!Yb){var z3=document.createElement("div");z3.setAttribute("oninput","return;"),Yb=typeof z3.oninput=="function"}$b=Yb}else $b=!1;L3=$b&&(!document.documentMode||9<document.documentMode)}function I3(){du&&(du.detachEvent("onpropertychange",B3),uu=du=null)}function B3(d){if(d.propertyName==="value"&&Pp(uu)){var f=[];_3(f,uu,d,Pb(d)),j3(OB,f)}}function PB(d,f,g){d==="focusin"?(I3(),du=f,uu=g,du.attachEvent("onpropertychange",B3)):d==="focusout"&&I3()}function _B(d){if(d==="selectionchange"||d==="keyup"||d==="keydown")return Pp(uu)}function RB(d,f){if(d==="click")return Pp(f)}function LB(d,f){if(d==="input"||d==="change")return Pp(f)}function zB(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var Yn=typeof Object.is=="function"?Object.is:zB;function hu(d,f){if(Yn(d,f))return!0;if(typeof d!="object"||d===null||typeof f!="object"||f===null)return!1;var g=Object.keys(d),v=Object.keys(f);if(g.length!==v.length)return!1;for(v=0;v<g.length;v++){var D=g[v];if(!pe.call(f,D)||!Yn(d[D],f[D]))return!1}return!0}function F3(d){for(;d&&d.firstChild;)d=d.firstChild;return d}function H3(d,f){var g=F3(d);d=0;for(var v;g;){if(g.nodeType===3){if(v=d+g.textContent.length,d<=f&&v>=f)return{node:g,offset:f-d};d=v}e:{for(;g;){if(g.nextSibling){g=g.nextSibling;break e}g=g.parentNode}g=void 0}g=F3(g)}}function $3(d,f){return d&&f?d===f?!0:d&&d.nodeType===3?!1:f&&f.nodeType===3?$3(d,f.parentNode):"contains"in d?d.contains(f):d.compareDocumentPosition?!!(d.compareDocumentPosition(f)&16):!1:!1}function Y3(d){d=d!=null&&d.ownerDocument!=null&&d.ownerDocument.defaultView!=null?d.ownerDocument.defaultView:window;for(var f=Cp(d.document);f instanceof d.HTMLIFrameElement;){try{var g=typeof f.contentWindow.location.href=="string"}catch{g=!1}if(g)d=f.contentWindow;else break;f=Cp(d.document)}return f}function Ub(d){var f=d&&d.nodeName&&d.nodeName.toLowerCase();return f&&(f==="input"&&(d.type==="text"||d.type==="search"||d.type==="tel"||d.type==="url"||d.type==="password")||f==="textarea"||d.contentEditable==="true")}var IB=Is&&"documentMode"in document&&11>=document.documentMode,mc=null,Wb=null,fu=null,Xb=!1;function U3(d,f,g){var v=g.window===g?g.document:g.nodeType===9?g:g.ownerDocument;Xb||mc==null||mc!==Cp(v)||(v=mc,"selectionStart"in v&&Ub(v)?v={start:v.selectionStart,end:v.selectionEnd}:(v=(v.ownerDocument&&v.ownerDocument.defaultView||window).getSelection(),v={anchorNode:v.anchorNode,anchorOffset:v.anchorOffset,focusNode:v.focusNode,focusOffset:v.focusOffset}),fu&&hu(fu,v)||(fu=v,v=bm(Wb,"onSelect"),0<v.length&&(f=new Ep("onSelect","select",null,f,g),d.push({event:f,listeners:v}),f.target=mc)))}function Uo(d,f){var g={};return g[d.toLowerCase()]=f.toLowerCase(),g["Webkit"+d]="webkit"+f,g["Moz"+d]="moz"+f,g}var gc={animationend:Uo("Animation","AnimationEnd"),animationiteration:Uo("Animation","AnimationIteration"),animationstart:Uo("Animation","AnimationStart"),transitionrun:Uo("Transition","TransitionRun"),transitionstart:Uo("Transition","TransitionStart"),transitioncancel:Uo("Transition","TransitionCancel"),transitionend:Uo("Transition","TransitionEnd")},Vb={},W3={};Is&&(W3=document.createElement("div").style,"AnimationEvent"in window||(delete gc.animationend.animation,delete gc.animationiteration.animation,delete gc.animationstart.animation),"TransitionEvent"in window||delete gc.transitionend.transition);function Wo(d){if(Vb[d])return Vb[d];if(!gc[d])return d;var f=gc[d],g;for(g in f)if(f.hasOwnProperty(g)&&g in W3)return Vb[d]=f[g];return d}var X3=Wo("animationend"),V3=Wo("animationiteration"),q3=Wo("animationstart"),BB=Wo("transitionrun"),FB=Wo("transitionstart"),HB=Wo("transitioncancel"),G3=Wo("transitionend"),K3=new Map,qb="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");qb.push("scrollEnd");function Xa(d,f){K3.set(d,f),Q(f,[d])}var Z3=new WeakMap;function xa(d,f){if(typeof d=="object"&&d!==null){var g=Z3.get(d);return g!==void 0?g:(f={value:d,source:f,stack:f3(f)},Z3.set(d,f),f)}return{value:d,source:f,stack:f3(f)}}var ba=[],xc=0,Gb=0;function _p(){for(var d=xc,f=Gb=xc=0;f<d;){var g=ba[f];ba[f++]=null;var v=ba[f];ba[f++]=null;var D=ba[f];ba[f++]=null;var M=ba[f];if(ba[f++]=null,v!==null&&D!==null){var I=v.pending;I===null?D.next=D:(D.next=I.next,I.next=D),v.pending=D}M!==0&&Q3(g,D,M)}}function Rp(d,f,g,v){ba[xc++]=d,ba[xc++]=f,ba[xc++]=g,ba[xc++]=v,Gb|=v,d.lanes|=v,d=d.alternate,d!==null&&(d.lanes|=v)}function Kb(d,f,g,v){return Rp(d,f,g,v),Lp(d)}function bc(d,f){return Rp(d,null,null,f),Lp(d)}function Q3(d,f,g){d.lanes|=g;var v=d.alternate;v!==null&&(v.lanes|=g);for(var D=!1,M=d.return;M!==null;)M.childLanes|=g,v=M.alternate,v!==null&&(v.childLanes|=g),M.tag===22&&(d=M.stateNode,d===null||d._visibility&1||(D=!0)),d=M,M=M.return;return d.tag===3?(M=d.stateNode,D&&f!==null&&(D=31-Mr(g),d=M.hiddenUpdates,v=d[D],v===null?d[D]=[f]:v.push(f),f.lane=g|536870912),M):null}function Lp(d){if(50<Iu)throw Iu=0,rv=null,Error(n(185));for(var f=d.return;f!==null;)d=f,f=d.return;return d.tag===3?d.stateNode:null}var yc={};function $B(d,f,g,v){this.tag=d,this.key=g,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=v,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Un(d,f,g,v){return new $B(d,f,g,v)}function Zb(d){return d=d.prototype,!(!d||!d.isReactComponent)}function Bs(d,f){var g=d.alternate;return g===null?(g=Un(d.tag,f,d.key,d.mode),g.elementType=d.elementType,g.type=d.type,g.stateNode=d.stateNode,g.alternate=d,d.alternate=g):(g.pendingProps=f,g.type=d.type,g.flags=0,g.subtreeFlags=0,g.deletions=null),g.flags=d.flags&65011712,g.childLanes=d.childLanes,g.lanes=d.lanes,g.child=d.child,g.memoizedProps=d.memoizedProps,g.memoizedState=d.memoizedState,g.updateQueue=d.updateQueue,f=d.dependencies,g.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},g.sibling=d.sibling,g.index=d.index,g.ref=d.ref,g.refCleanup=d.refCleanup,g}function J3(d,f){d.flags&=65011714;var g=d.alternate;return g===null?(d.childLanes=0,d.lanes=f,d.child=null,d.subtreeFlags=0,d.memoizedProps=null,d.memoizedState=null,d.updateQueue=null,d.dependencies=null,d.stateNode=null):(d.childLanes=g.childLanes,d.lanes=g.lanes,d.child=g.child,d.subtreeFlags=0,d.deletions=null,d.memoizedProps=g.memoizedProps,d.memoizedState=g.memoizedState,d.updateQueue=g.updateQueue,d.type=g.type,f=g.dependencies,d.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext}),d}function zp(d,f,g,v,D,M){var I=0;if(v=d,typeof d=="function")Zb(d)&&(I=1);else if(typeof d=="string")I=UF(d,g,U.current)?26:d==="html"||d==="head"||d==="body"?27:5;else e:switch(d){case L:return d=Un(31,g,f,D),d.elementType=L,d.lanes=M,d;case y:return Xo(g.children,D,M,f);case b:I=8,D|=24;break;case w:return d=Un(12,g,f,D|2),d.elementType=w,d.lanes=M,d;case k:return d=Un(13,g,f,D),d.elementType=k,d.lanes=M,d;case T:return d=Un(19,g,f,D),d.elementType=T,d.lanes=M,d;default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case N:case S:I=10;break e;case A:I=9;break e;case C:I=11;break e;case E:I=14;break e;case _:I=16,v=null;break e}I=29,g=Error(n(130,d===null?"null":typeof d,"")),v=null}return f=Un(I,g,f,D),f.elementType=d,f.type=v,f.lanes=M,f}function Xo(d,f,g,v){return d=Un(7,d,v,f),d.lanes=g,d}function Qb(d,f,g){return d=Un(6,d,null,f),d.lanes=g,d}function Jb(d,f,g){return f=Un(4,d.children!==null?d.children:[],d.key,f),f.lanes=g,f.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},f}var vc=[],wc=0,Ip=null,Bp=0,ya=[],va=0,Vo=null,Fs=1,Hs="";function qo(d,f){vc[wc++]=Bp,vc[wc++]=Ip,Ip=d,Bp=f}function eA(d,f,g){ya[va++]=Fs,ya[va++]=Hs,ya[va++]=Vo,Vo=d;var v=Fs;d=Hs;var D=32-Mr(v)-1;v&=~(1<<D),g+=1;var M=32-Mr(f)+D;if(30<M){var I=D-D%5;M=(v&(1<<I)-1).toString(32),v>>=I,D-=I,Fs=1<<32-Mr(f)+D|g<<D|v,Hs=M+d}else Fs=1<<M|g<<D|v,Hs=d}function ey(d){d.return!==null&&(qo(d,1),eA(d,1,0))}function ty(d){for(;d===Ip;)Ip=vc[--wc],vc[wc]=null,Bp=vc[--wc],vc[wc]=null;for(;d===Vo;)Vo=ya[--va],ya[va]=null,Hs=ya[--va],ya[va]=null,Fs=ya[--va],ya[va]=null}var un=null,Jt=null,ht=!1,Go=null,us=!1,ry=Error(n(519));function Ko(d){var f=Error(n(418,""));throw gu(xa(f,d)),ry}function tA(d){var f=d.stateNode,g=d.type,v=d.memoizedProps;switch(f[ur]=d,f[Er]=v,g){case"dialog":rt("cancel",f),rt("close",f);break;case"iframe":case"object":case"embed":rt("load",f);break;case"video":case"audio":for(g=0;g<Fu.length;g++)rt(Fu[g],f);break;case"source":rt("error",f);break;case"img":case"image":case"link":rt("error",f),rt("load",f);break;case"details":rt("toggle",f);break;case"input":rt("invalid",f),g3(f,v.value,v.defaultValue,v.checked,v.defaultChecked,v.type,v.name,!0),Ap(f);break;case"select":rt("invalid",f);break;case"textarea":rt("invalid",f),b3(f,v.value,v.defaultValue,v.children),Ap(f)}g=v.children,typeof g!="string"&&typeof g!="number"&&typeof g!="bigint"||f.textContent===""+g||v.suppressHydrationWarning===!0||bk(f.textContent,g)?(v.popover!=null&&(rt("beforetoggle",f),rt("toggle",f)),v.onScroll!=null&&rt("scroll",f),v.onScrollEnd!=null&&rt("scrollend",f),v.onClick!=null&&(f.onclick=ym),f=!0):f=!1,f||Ko(d)}function rA(d){for(un=d.return;un;)switch(un.tag){case 5:case 13:us=!1;return;case 27:case 3:us=!0;return;default:un=un.return}}function pu(d){if(d!==un)return!1;if(!ht)return rA(d),ht=!0,!1;var f=d.tag,g;if((g=f!==3&&f!==27)&&((g=f===5)&&(g=d.type,g=!(g!=="form"&&g!=="button")||bv(d.type,d.memoizedProps)),g=!g),g&&Jt&&Ko(d),rA(d),f===13){if(d=d.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(n(317));e:{for(d=d.nextSibling,f=0;d;){if(d.nodeType===8)if(g=d.data,g==="/$"){if(f===0){Jt=qa(d.nextSibling);break e}f--}else g!=="$"&&g!=="$!"&&g!=="$?"||f++;d=d.nextSibling}Jt=null}}else f===27?(f=Jt,Gi(d.type)?(d=jv,jv=null,Jt=d):Jt=f):Jt=un?qa(d.stateNode.nextSibling):null;return!0}function mu(){Jt=un=null,ht=!1}function nA(){var d=Go;return d!==null&&(An===null?An=d:An.push.apply(An,d),Go=null),d}function gu(d){Go===null?Go=[d]:Go.push(d)}var ny=G(null),Zo=null,$s=null;function _i(d,f,g){K(ny,f._currentValue),f._currentValue=g}function Ys(d){d._currentValue=ny.current,te(ny)}function ay(d,f,g){for(;d!==null;){var v=d.alternate;if((d.childLanes&f)!==f?(d.childLanes|=f,v!==null&&(v.childLanes|=f)):v!==null&&(v.childLanes&f)!==f&&(v.childLanes|=f),d===g)break;d=d.return}}function sy(d,f,g,v){var D=d.child;for(D!==null&&(D.return=d);D!==null;){var M=D.dependencies;if(M!==null){var I=D.child;M=M.firstContext;e:for(;M!==null;){var $=M;M=D;for(var q=0;q<f.length;q++)if($.context===f[q]){M.lanes|=g,$=M.alternate,$!==null&&($.lanes|=g),ay(M.return,g,d),v||(I=null);break e}M=$.next}}else if(D.tag===18){if(I=D.return,I===null)throw Error(n(341));I.lanes|=g,M=I.alternate,M!==null&&(M.lanes|=g),ay(I,g,d),I=null}else I=D.child;if(I!==null)I.return=D;else for(I=D;I!==null;){if(I===d){I=null;break}if(D=I.sibling,D!==null){D.return=I.return,I=D;break}I=I.return}D=I}}function xu(d,f,g,v){d=null;for(var D=f,M=!1;D!==null;){if(!M){if((D.flags&524288)!==0)M=!0;else if((D.flags&262144)!==0)break}if(D.tag===10){var I=D.alternate;if(I===null)throw Error(n(387));if(I=I.memoizedProps,I!==null){var $=D.type;Yn(D.pendingProps.value,I.value)||(d!==null?d.push($):d=[$])}}else if(D===we.current){if(I=D.alternate,I===null)throw Error(n(387));I.memoizedState.memoizedState!==D.memoizedState.memoizedState&&(d!==null?d.push(Xu):d=[Xu])}D=D.return}d!==null&&sy(f,d,g,v),f.flags|=262144}function Fp(d){for(d=d.firstContext;d!==null;){if(!Yn(d.context._currentValue,d.memoizedValue))return!0;d=d.next}return!1}function Qo(d){Zo=d,$s=null,d=d.dependencies,d!==null&&(d.firstContext=null)}function rn(d){return aA(Zo,d)}function Hp(d,f){return Zo===null&&Qo(d),aA(d,f)}function aA(d,f){var g=f._currentValue;if(f={context:f,memoizedValue:g,next:null},$s===null){if(d===null)throw Error(n(308));$s=f,d.dependencies={lanes:0,firstContext:f},d.flags|=524288}else $s=$s.next=f;return g}var YB=typeof AbortController<"u"?AbortController:function(){var d=[],f=this.signal={aborted:!1,addEventListener:function(g,v){d.push(v)}};this.abort=function(){f.aborted=!0,d.forEach(function(g){return g()})}},UB=t.unstable_scheduleCallback,WB=t.unstable_NormalPriority,br={$$typeof:S,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function iy(){return{controller:new YB,data:new Map,refCount:0}}function bu(d){d.refCount--,d.refCount===0&&UB(WB,function(){d.controller.abort()})}var yu=null,oy=0,jc=0,Nc=null;function XB(d,f){if(yu===null){var g=yu=[];oy=0,jc=cv(),Nc={status:"pending",value:void 0,then:function(v){g.push(v)}}}return oy++,f.then(sA,sA),f}function sA(){if(--oy===0&&yu!==null){Nc!==null&&(Nc.status="fulfilled");var d=yu;yu=null,jc=0,Nc=null;for(var f=0;f<d.length;f++)(0,d[f])()}}function VB(d,f){var g=[],v={status:"pending",value:null,reason:null,then:function(D){g.push(D)}};return d.then(function(){v.status="fulfilled",v.value=f;for(var D=0;D<g.length;D++)(0,g[D])(f)},function(D){for(v.status="rejected",v.reason=D,D=0;D<g.length;D++)(0,g[D])(void 0)}),v}var iA=H.S;H.S=function(d,f){typeof f=="object"&&f!==null&&typeof f.then=="function"&&XB(d,f),iA!==null&&iA(d,f)};var Jo=G(null);function ly(){var d=Jo.current;return d!==null?d:zt.pooledCache}function $p(d,f){f===null?K(Jo,Jo.current):K(Jo,f.pool)}function oA(){var d=ly();return d===null?null:{parent:br._currentValue,pool:d}}var vu=Error(n(460)),lA=Error(n(474)),Yp=Error(n(542)),cy={then:function(){}};function cA(d){return d=d.status,d==="fulfilled"||d==="rejected"}function Up(){}function dA(d,f,g){switch(g=d[g],g===void 0?d.push(f):g!==f&&(f.then(Up,Up),f=g),f.status){case"fulfilled":return f.value;case"rejected":throw d=f.reason,hA(d),d;default:if(typeof f.status=="string")f.then(Up,Up);else{if(d=zt,d!==null&&100<d.shellSuspendCounter)throw Error(n(482));d=f,d.status="pending",d.then(function(v){if(f.status==="pending"){var D=f;D.status="fulfilled",D.value=v}},function(v){if(f.status==="pending"){var D=f;D.status="rejected",D.reason=v}})}switch(f.status){case"fulfilled":return f.value;case"rejected":throw d=f.reason,hA(d),d}throw wu=f,vu}}var wu=null;function uA(){if(wu===null)throw Error(n(459));var d=wu;return wu=null,d}function hA(d){if(d===vu||d===Yp)throw Error(n(483))}var Ri=!1;function dy(d){d.updateQueue={baseState:d.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function uy(d,f){d=d.updateQueue,f.updateQueue===d&&(f.updateQueue={baseState:d.baseState,firstBaseUpdate:d.firstBaseUpdate,lastBaseUpdate:d.lastBaseUpdate,shared:d.shared,callbacks:null})}function Li(d){return{lane:d,tag:0,payload:null,callback:null,next:null}}function zi(d,f,g){var v=d.updateQueue;if(v===null)return null;if(v=v.shared,(wt&2)!==0){var D=v.pending;return D===null?f.next=f:(f.next=D.next,D.next=f),v.pending=f,f=Lp(d),Q3(d,null,g),f}return Rp(d,v,f,g),Lp(d)}function ju(d,f,g){if(f=f.updateQueue,f!==null&&(f=f.shared,(g&4194048)!==0)){var v=f.lanes;v&=d.pendingLanes,g|=v,f.lanes=g,jp(d,g)}}function hy(d,f){var g=d.updateQueue,v=d.alternate;if(v!==null&&(v=v.updateQueue,g===v)){var D=null,M=null;if(g=g.firstBaseUpdate,g!==null){do{var I={lane:g.lane,tag:g.tag,payload:g.payload,callback:null,next:null};M===null?D=M=I:M=M.next=I,g=g.next}while(g!==null);M===null?D=M=f:M=M.next=f}else D=M=f;g={baseState:v.baseState,firstBaseUpdate:D,lastBaseUpdate:M,shared:v.shared,callbacks:v.callbacks},d.updateQueue=g;return}d=g.lastBaseUpdate,d===null?g.firstBaseUpdate=f:d.next=f,g.lastBaseUpdate=f}var fy=!1;function Nu(){if(fy){var d=Nc;if(d!==null)throw d}}function Su(d,f,g,v){fy=!1;var D=d.updateQueue;Ri=!1;var M=D.firstBaseUpdate,I=D.lastBaseUpdate,$=D.shared.pending;if($!==null){D.shared.pending=null;var q=$,ie=q.next;q.next=null,I===null?M=ie:I.next=ie,I=q;var fe=d.alternate;fe!==null&&(fe=fe.updateQueue,$=fe.lastBaseUpdate,$!==I&&($===null?fe.firstBaseUpdate=ie:$.next=ie,fe.lastBaseUpdate=q))}if(M!==null){var xe=D.baseState;I=0,fe=ie=q=null,$=M;do{var oe=$.lane&-536870913,le=oe!==$.lane;if(le?(at&oe)===oe:(v&oe)===oe){oe!==0&&oe===jc&&(fy=!0),fe!==null&&(fe=fe.next={lane:0,tag:$.tag,payload:$.payload,callback:null,next:null});e:{var $e=d,Fe=$;oe=f;var Dt=g;switch(Fe.tag){case 1:if($e=Fe.payload,typeof $e=="function"){xe=$e.call(Dt,xe,oe);break e}xe=$e;break e;case 3:$e.flags=$e.flags&-65537|128;case 0:if($e=Fe.payload,oe=typeof $e=="function"?$e.call(Dt,xe,oe):$e,oe==null)break e;xe=h({},xe,oe);break e;case 2:Ri=!0}}oe=$.callback,oe!==null&&(d.flags|=64,le&&(d.flags|=8192),le=D.callbacks,le===null?D.callbacks=[oe]:le.push(oe))}else le={lane:oe,tag:$.tag,payload:$.payload,callback:$.callback,next:null},fe===null?(ie=fe=le,q=xe):fe=fe.next=le,I|=oe;if($=$.next,$===null){if($=D.shared.pending,$===null)break;le=$,$=le.next,le.next=null,D.lastBaseUpdate=le,D.shared.pending=null}}while(!0);fe===null&&(q=xe),D.baseState=q,D.firstBaseUpdate=ie,D.lastBaseUpdate=fe,M===null&&(D.shared.lanes=0),Wi|=I,d.lanes=I,d.memoizedState=xe}}function fA(d,f){if(typeof d!="function")throw Error(n(191,d));d.call(f)}function pA(d,f){var g=d.callbacks;if(g!==null)for(d.callbacks=null,d=0;d<g.length;d++)fA(g[d],f)}var Sc=G(null),Wp=G(0);function mA(d,f){d=Ks,K(Wp,d),K(Sc,f),Ks=d|f.baseLanes}function py(){K(Wp,Ks),K(Sc,Sc.current)}function my(){Ks=Wp.current,te(Sc),te(Wp)}var Ii=0,Je=null,Ct=null,hr=null,Xp=!1,Ac=!1,el=!1,Vp=0,Au=0,Cc=null,qB=0;function or(){throw Error(n(321))}function gy(d,f){if(f===null)return!1;for(var g=0;g<f.length&&g<d.length;g++)if(!Yn(d[g],f[g]))return!1;return!0}function xy(d,f,g,v,D,M){return Ii=M,Je=f,f.memoizedState=null,f.updateQueue=null,f.lanes=0,H.H=d===null||d.memoizedState===null?QA:JA,el=!1,M=g(v,D),el=!1,Ac&&(M=xA(f,g,v,D)),gA(d),M}function gA(d){H.H=Jp;var f=Ct!==null&&Ct.next!==null;if(Ii=0,hr=Ct=Je=null,Xp=!1,Au=0,Cc=null,f)throw Error(n(300));d===null||Or||(d=d.dependencies,d!==null&&Fp(d)&&(Or=!0))}function xA(d,f,g,v){Je=d;var D=0;do{if(Ac&&(Cc=null),Au=0,Ac=!1,25<=D)throw Error(n(301));if(D+=1,hr=Ct=null,d.updateQueue!=null){var M=d.updateQueue;M.lastEffect=null,M.events=null,M.stores=null,M.memoCache!=null&&(M.memoCache.index=0)}H.H=tF,M=f(g,v)}while(Ac);return M}function GB(){var d=H.H,f=d.useState()[0];return f=typeof f.then=="function"?Cu(f):f,d=d.useState()[0],(Ct!==null?Ct.memoizedState:null)!==d&&(Je.flags|=1024),f}function by(){var d=Vp!==0;return Vp=0,d}function yy(d,f,g){f.updateQueue=d.updateQueue,f.flags&=-2053,d.lanes&=~g}function vy(d){if(Xp){for(d=d.memoizedState;d!==null;){var f=d.queue;f!==null&&(f.pending=null),d=d.next}Xp=!1}Ii=0,hr=Ct=Je=null,Ac=!1,Au=Vp=0,Cc=null}function Nn(){var d={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return hr===null?Je.memoizedState=hr=d:hr=hr.next=d,hr}function fr(){if(Ct===null){var d=Je.alternate;d=d!==null?d.memoizedState:null}else d=Ct.next;var f=hr===null?Je.memoizedState:hr.next;if(f!==null)hr=f,Ct=d;else{if(d===null)throw Je.alternate===null?Error(n(467)):Error(n(310));Ct=d,d={memoizedState:Ct.memoizedState,baseState:Ct.baseState,baseQueue:Ct.baseQueue,queue:Ct.queue,next:null},hr===null?Je.memoizedState=hr=d:hr=hr.next=d}return hr}function wy(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Cu(d){var f=Au;return Au+=1,Cc===null&&(Cc=[]),d=dA(Cc,d,f),f=Je,(hr===null?f.memoizedState:hr.next)===null&&(f=f.alternate,H.H=f===null||f.memoizedState===null?QA:JA),d}function qp(d){if(d!==null&&typeof d=="object"){if(typeof d.then=="function")return Cu(d);if(d.$$typeof===S)return rn(d)}throw Error(n(438,String(d)))}function jy(d){var f=null,g=Je.updateQueue;if(g!==null&&(f=g.memoCache),f==null){var v=Je.alternate;v!==null&&(v=v.updateQueue,v!==null&&(v=v.memoCache,v!=null&&(f={data:v.data.map(function(D){return D.slice()}),index:0})))}if(f==null&&(f={data:[],index:0}),g===null&&(g=wy(),Je.updateQueue=g),g.memoCache=f,g=f.data[f.index],g===void 0)for(g=f.data[f.index]=Array(d),v=0;v<d;v++)g[v]=P;return f.index++,g}function Us(d,f){return typeof f=="function"?f(d):f}function Gp(d){var f=fr();return Ny(f,Ct,d)}function Ny(d,f,g){var v=d.queue;if(v===null)throw Error(n(311));v.lastRenderedReducer=g;var D=d.baseQueue,M=v.pending;if(M!==null){if(D!==null){var I=D.next;D.next=M.next,M.next=I}f.baseQueue=D=M,v.pending=null}if(M=d.baseState,D===null)d.memoizedState=M;else{f=D.next;var $=I=null,q=null,ie=f,fe=!1;do{var xe=ie.lane&-536870913;if(xe!==ie.lane?(at&xe)===xe:(Ii&xe)===xe){var oe=ie.revertLane;if(oe===0)q!==null&&(q=q.next={lane:0,revertLane:0,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null}),xe===jc&&(fe=!0);else if((Ii&oe)===oe){ie=ie.next,oe===jc&&(fe=!0);continue}else xe={lane:0,revertLane:ie.revertLane,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null},q===null?($=q=xe,I=M):q=q.next=xe,Je.lanes|=oe,Wi|=oe;xe=ie.action,el&&g(M,xe),M=ie.hasEagerState?ie.eagerState:g(M,xe)}else oe={lane:xe,revertLane:ie.revertLane,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null},q===null?($=q=oe,I=M):q=q.next=oe,Je.lanes|=xe,Wi|=xe;ie=ie.next}while(ie!==null&&ie!==f);if(q===null?I=M:q.next=$,!Yn(M,d.memoizedState)&&(Or=!0,fe&&(g=Nc,g!==null)))throw g;d.memoizedState=M,d.baseState=I,d.baseQueue=q,v.lastRenderedState=M}return D===null&&(v.lanes=0),[d.memoizedState,v.dispatch]}function Sy(d){var f=fr(),g=f.queue;if(g===null)throw Error(n(311));g.lastRenderedReducer=d;var v=g.dispatch,D=g.pending,M=f.memoizedState;if(D!==null){g.pending=null;var I=D=D.next;do M=d(M,I.action),I=I.next;while(I!==D);Yn(M,f.memoizedState)||(Or=!0),f.memoizedState=M,f.baseQueue===null&&(f.baseState=M),g.lastRenderedState=M}return[M,v]}function bA(d,f,g){var v=Je,D=fr(),M=ht;if(M){if(g===void 0)throw Error(n(407));g=g()}else g=f();var I=!Yn((Ct||D).memoizedState,g);I&&(D.memoizedState=g,Or=!0),D=D.queue;var $=wA.bind(null,v,D,d);if(ku(2048,8,$,[d]),D.getSnapshot!==f||I||hr!==null&&hr.memoizedState.tag&1){if(v.flags|=2048,kc(9,Kp(),vA.bind(null,v,D,g,f),null),zt===null)throw Error(n(349));M||(Ii&124)!==0||yA(v,f,g)}return g}function yA(d,f,g){d.flags|=16384,d={getSnapshot:f,value:g},f=Je.updateQueue,f===null?(f=wy(),Je.updateQueue=f,f.stores=[d]):(g=f.stores,g===null?f.stores=[d]:g.push(d))}function vA(d,f,g,v){f.value=g,f.getSnapshot=v,jA(f)&&NA(d)}function wA(d,f,g){return g(function(){jA(f)&&NA(d)})}function jA(d){var f=d.getSnapshot;d=d.value;try{var g=f();return!Yn(d,g)}catch{return!0}}function NA(d){var f=bc(d,2);f!==null&&Gn(f,d,2)}function Ay(d){var f=Nn();if(typeof d=="function"){var g=d;if(d=g(),el){ls(!0);try{g()}finally{ls(!1)}}}return f.memoizedState=f.baseState=d,f.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Us,lastRenderedState:d},f}function SA(d,f,g,v){return d.baseState=g,Ny(d,Ct,typeof v=="function"?v:Us)}function KB(d,f,g,v,D){if(Qp(d))throw Error(n(485));if(d=f.action,d!==null){var M={payload:D,action:d,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(I){M.listeners.push(I)}};H.T!==null?g(!0):M.isTransition=!1,v(M),g=f.pending,g===null?(M.next=f.pending=M,AA(f,M)):(M.next=g.next,f.pending=g.next=M)}}function AA(d,f){var g=f.action,v=f.payload,D=d.state;if(f.isTransition){var M=H.T,I={};H.T=I;try{var $=g(D,v),q=H.S;q!==null&&q(I,$),CA(d,f,$)}catch(ie){Cy(d,f,ie)}finally{H.T=M}}else try{M=g(D,v),CA(d,f,M)}catch(ie){Cy(d,f,ie)}}function CA(d,f,g){g!==null&&typeof g=="object"&&typeof g.then=="function"?g.then(function(v){kA(d,f,v)},function(v){return Cy(d,f,v)}):kA(d,f,g)}function kA(d,f,g){f.status="fulfilled",f.value=g,DA(f),d.state=g,f=d.pending,f!==null&&(g=f.next,g===f?d.pending=null:(g=g.next,f.next=g,AA(d,g)))}function Cy(d,f,g){var v=d.pending;if(d.pending=null,v!==null){v=v.next;do f.status="rejected",f.reason=g,DA(f),f=f.next;while(f!==v)}d.action=null}function DA(d){d=d.listeners;for(var f=0;f<d.length;f++)(0,d[f])()}function TA(d,f){return f}function MA(d,f){if(ht){var g=zt.formState;if(g!==null){e:{var v=Je;if(ht){if(Jt){t:{for(var D=Jt,M=us;D.nodeType!==8;){if(!M){D=null;break t}if(D=qa(D.nextSibling),D===null){D=null;break t}}M=D.data,D=M==="F!"||M==="F"?D:null}if(D){Jt=qa(D.nextSibling),v=D.data==="F!";break e}}Ko(v)}v=!1}v&&(f=g[0])}}return g=Nn(),g.memoizedState=g.baseState=f,v={pending:null,lanes:0,dispatch:null,lastRenderedReducer:TA,lastRenderedState:f},g.queue=v,g=GA.bind(null,Je,v),v.dispatch=g,v=Ay(!1),M=Ey.bind(null,Je,!1,v.queue),v=Nn(),D={state:f,dispatch:null,action:d,pending:null},v.queue=D,g=KB.bind(null,Je,D,M,g),D.dispatch=g,v.memoizedState=d,[f,g,!1]}function EA(d){var f=fr();return OA(f,Ct,d)}function OA(d,f,g){if(f=Ny(d,f,TA)[0],d=Gp(Us)[0],typeof f=="object"&&f!==null&&typeof f.then=="function")try{var v=Cu(f)}catch(I){throw I===vu?Yp:I}else v=f;f=fr();var D=f.queue,M=D.dispatch;return g!==f.memoizedState&&(Je.flags|=2048,kc(9,Kp(),ZB.bind(null,D,g),null)),[v,M,d]}function ZB(d,f){d.action=f}function PA(d){var f=fr(),g=Ct;if(g!==null)return OA(f,g,d);fr(),f=f.memoizedState,g=fr();var v=g.queue.dispatch;return g.memoizedState=d,[f,v,!1]}function kc(d,f,g,v){return d={tag:d,create:g,deps:v,inst:f,next:null},f=Je.updateQueue,f===null&&(f=wy(),Je.updateQueue=f),g=f.lastEffect,g===null?f.lastEffect=d.next=d:(v=g.next,g.next=d,d.next=v,f.lastEffect=d),d}function Kp(){return{destroy:void 0,resource:void 0}}function _A(){return fr().memoizedState}function Zp(d,f,g,v){var D=Nn();v=v===void 0?null:v,Je.flags|=d,D.memoizedState=kc(1|f,Kp(),g,v)}function ku(d,f,g,v){var D=fr();v=v===void 0?null:v;var M=D.memoizedState.inst;Ct!==null&&v!==null&&gy(v,Ct.memoizedState.deps)?D.memoizedState=kc(f,M,g,v):(Je.flags|=d,D.memoizedState=kc(1|f,M,g,v))}function RA(d,f){Zp(8390656,8,d,f)}function LA(d,f){ku(2048,8,d,f)}function zA(d,f){return ku(4,2,d,f)}function IA(d,f){return ku(4,4,d,f)}function BA(d,f){if(typeof f=="function"){d=d();var g=f(d);return function(){typeof g=="function"?g():f(null)}}if(f!=null)return d=d(),f.current=d,function(){f.current=null}}function FA(d,f,g){g=g!=null?g.concat([d]):null,ku(4,4,BA.bind(null,f,d),g)}function ky(){}function HA(d,f){var g=fr();f=f===void 0?null:f;var v=g.memoizedState;return f!==null&&gy(f,v[1])?v[0]:(g.memoizedState=[d,f],d)}function $A(d,f){var g=fr();f=f===void 0?null:f;var v=g.memoizedState;if(f!==null&&gy(f,v[1]))return v[0];if(v=d(),el){ls(!0);try{d()}finally{ls(!1)}}return g.memoizedState=[v,f],v}function Dy(d,f,g){return g===void 0||(Ii&1073741824)!==0?d.memoizedState=f:(d.memoizedState=g,d=WC(),Je.lanes|=d,Wi|=d,g)}function YA(d,f,g,v){return Yn(g,f)?g:Sc.current!==null?(d=Dy(d,g,v),Yn(d,f)||(Or=!0),d):(Ii&42)===0?(Or=!0,d.memoizedState=g):(d=WC(),Je.lanes|=d,Wi|=d,f)}function UA(d,f,g,v,D){var M=W.p;W.p=M!==0&&8>M?M:8;var I=H.T,$={};H.T=$,Ey(d,!1,f,g);try{var q=D(),ie=H.S;if(ie!==null&&ie($,q),q!==null&&typeof q=="object"&&typeof q.then=="function"){var fe=VB(q,v);Du(d,f,fe,qn(d))}else Du(d,f,v,qn(d))}catch(xe){Du(d,f,{then:function(){},status:"rejected",reason:xe},qn())}finally{W.p=M,H.T=I}}function QB(){}function Ty(d,f,g,v){if(d.tag!==5)throw Error(n(476));var D=WA(d).queue;UA(d,D,f,V,g===null?QB:function(){return XA(d),g(v)})}function WA(d){var f=d.memoizedState;if(f!==null)return f;f={memoizedState:V,baseState:V,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Us,lastRenderedState:V},next:null};var g={};return f.next={memoizedState:g,baseState:g,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Us,lastRenderedState:g},next:null},d.memoizedState=f,d=d.alternate,d!==null&&(d.memoizedState=f),f}function XA(d){var f=WA(d).next.queue;Du(d,f,{},qn())}function My(){return rn(Xu)}function VA(){return fr().memoizedState}function qA(){return fr().memoizedState}function JB(d){for(var f=d.return;f!==null;){switch(f.tag){case 24:case 3:var g=qn();d=Li(g);var v=zi(f,d,g);v!==null&&(Gn(v,f,g),ju(v,f,g)),f={cache:iy()},d.payload=f;return}f=f.return}}function eF(d,f,g){var v=qn();g={lane:v,revertLane:0,action:g,hasEagerState:!1,eagerState:null,next:null},Qp(d)?KA(f,g):(g=Kb(d,f,g,v),g!==null&&(Gn(g,d,v),ZA(g,f,v)))}function GA(d,f,g){var v=qn();Du(d,f,g,v)}function Du(d,f,g,v){var D={lane:v,revertLane:0,action:g,hasEagerState:!1,eagerState:null,next:null};if(Qp(d))KA(f,D);else{var M=d.alternate;if(d.lanes===0&&(M===null||M.lanes===0)&&(M=f.lastRenderedReducer,M!==null))try{var I=f.lastRenderedState,$=M(I,g);if(D.hasEagerState=!0,D.eagerState=$,Yn($,I))return Rp(d,f,D,0),zt===null&&_p(),!1}catch{}finally{}if(g=Kb(d,f,D,v),g!==null)return Gn(g,d,v),ZA(g,f,v),!0}return!1}function Ey(d,f,g,v){if(v={lane:2,revertLane:cv(),action:v,hasEagerState:!1,eagerState:null,next:null},Qp(d)){if(f)throw Error(n(479))}else f=Kb(d,g,v,2),f!==null&&Gn(f,d,2)}function Qp(d){var f=d.alternate;return d===Je||f!==null&&f===Je}function KA(d,f){Ac=Xp=!0;var g=d.pending;g===null?f.next=f:(f.next=g.next,g.next=f),d.pending=f}function ZA(d,f,g){if((g&4194048)!==0){var v=f.lanes;v&=d.pendingLanes,g|=v,f.lanes=g,jp(d,g)}}var Jp={readContext:rn,use:qp,useCallback:or,useContext:or,useEffect:or,useImperativeHandle:or,useLayoutEffect:or,useInsertionEffect:or,useMemo:or,useReducer:or,useRef:or,useState:or,useDebugValue:or,useDeferredValue:or,useTransition:or,useSyncExternalStore:or,useId:or,useHostTransitionStatus:or,useFormState:or,useActionState:or,useOptimistic:or,useMemoCache:or,useCacheRefresh:or},QA={readContext:rn,use:qp,useCallback:function(d,f){return Nn().memoizedState=[d,f===void 0?null:f],d},useContext:rn,useEffect:RA,useImperativeHandle:function(d,f,g){g=g!=null?g.concat([d]):null,Zp(4194308,4,BA.bind(null,f,d),g)},useLayoutEffect:function(d,f){return Zp(4194308,4,d,f)},useInsertionEffect:function(d,f){Zp(4,2,d,f)},useMemo:function(d,f){var g=Nn();f=f===void 0?null:f;var v=d();if(el){ls(!0);try{d()}finally{ls(!1)}}return g.memoizedState=[v,f],v},useReducer:function(d,f,g){var v=Nn();if(g!==void 0){var D=g(f);if(el){ls(!0);try{g(f)}finally{ls(!1)}}}else D=f;return v.memoizedState=v.baseState=D,d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:D},v.queue=d,d=d.dispatch=eF.bind(null,Je,d),[v.memoizedState,d]},useRef:function(d){var f=Nn();return d={current:d},f.memoizedState=d},useState:function(d){d=Ay(d);var f=d.queue,g=GA.bind(null,Je,f);return f.dispatch=g,[d.memoizedState,g]},useDebugValue:ky,useDeferredValue:function(d,f){var g=Nn();return Dy(g,d,f)},useTransition:function(){var d=Ay(!1);return d=UA.bind(null,Je,d.queue,!0,!1),Nn().memoizedState=d,[!1,d]},useSyncExternalStore:function(d,f,g){var v=Je,D=Nn();if(ht){if(g===void 0)throw Error(n(407));g=g()}else{if(g=f(),zt===null)throw Error(n(349));(at&124)!==0||yA(v,f,g)}D.memoizedState=g;var M={value:g,getSnapshot:f};return D.queue=M,RA(wA.bind(null,v,M,d),[d]),v.flags|=2048,kc(9,Kp(),vA.bind(null,v,M,g,f),null),g},useId:function(){var d=Nn(),f=zt.identifierPrefix;if(ht){var g=Hs,v=Fs;g=(v&~(1<<32-Mr(v)-1)).toString(32)+g,f="«"+f+"R"+g,g=Vp++,0<g&&(f+="H"+g.toString(32)),f+="»"}else g=qB++,f="«"+f+"r"+g.toString(32)+"»";return d.memoizedState=f},useHostTransitionStatus:My,useFormState:MA,useActionState:MA,useOptimistic:function(d){var f=Nn();f.memoizedState=f.baseState=d;var g={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return f.queue=g,f=Ey.bind(null,Je,!0,g),g.dispatch=f,[d,f]},useMemoCache:jy,useCacheRefresh:function(){return Nn().memoizedState=JB.bind(null,Je)}},JA={readContext:rn,use:qp,useCallback:HA,useContext:rn,useEffect:LA,useImperativeHandle:FA,useInsertionEffect:zA,useLayoutEffect:IA,useMemo:$A,useReducer:Gp,useRef:_A,useState:function(){return Gp(Us)},useDebugValue:ky,useDeferredValue:function(d,f){var g=fr();return YA(g,Ct.memoizedState,d,f)},useTransition:function(){var d=Gp(Us)[0],f=fr().memoizedState;return[typeof d=="boolean"?d:Cu(d),f]},useSyncExternalStore:bA,useId:VA,useHostTransitionStatus:My,useFormState:EA,useActionState:EA,useOptimistic:function(d,f){var g=fr();return SA(g,Ct,d,f)},useMemoCache:jy,useCacheRefresh:qA},tF={readContext:rn,use:qp,useCallback:HA,useContext:rn,useEffect:LA,useImperativeHandle:FA,useInsertionEffect:zA,useLayoutEffect:IA,useMemo:$A,useReducer:Sy,useRef:_A,useState:function(){return Sy(Us)},useDebugValue:ky,useDeferredValue:function(d,f){var g=fr();return Ct===null?Dy(g,d,f):YA(g,Ct.memoizedState,d,f)},useTransition:function(){var d=Sy(Us)[0],f=fr().memoizedState;return[typeof d=="boolean"?d:Cu(d),f]},useSyncExternalStore:bA,useId:VA,useHostTransitionStatus:My,useFormState:PA,useActionState:PA,useOptimistic:function(d,f){var g=fr();return Ct!==null?SA(g,Ct,d,f):(g.baseState=d,[d,g.queue.dispatch])},useMemoCache:jy,useCacheRefresh:qA},Dc=null,Tu=0;function em(d){var f=Tu;return Tu+=1,Dc===null&&(Dc=[]),dA(Dc,d,f)}function Mu(d,f){f=f.props.ref,d.ref=f!==void 0?f:null}function tm(d,f){throw f.$$typeof===p?Error(n(525)):(d=Object.prototype.toString.call(f),Error(n(31,d==="[object Object]"?"object with keys {"+Object.keys(f).join(", ")+"}":d)))}function eC(d){var f=d._init;return f(d._payload)}function tC(d){function f(ne,ee){if(d){var se=ne.deletions;se===null?(ne.deletions=[ee],ne.flags|=16):se.push(ee)}}function g(ne,ee){if(!d)return null;for(;ee!==null;)f(ne,ee),ee=ee.sibling;return null}function v(ne){for(var ee=new Map;ne!==null;)ne.key!==null?ee.set(ne.key,ne):ee.set(ne.index,ne),ne=ne.sibling;return ee}function D(ne,ee){return ne=Bs(ne,ee),ne.index=0,ne.sibling=null,ne}function M(ne,ee,se){return ne.index=se,d?(se=ne.alternate,se!==null?(se=se.index,se<ee?(ne.flags|=67108866,ee):se):(ne.flags|=67108866,ee)):(ne.flags|=1048576,ee)}function I(ne){return d&&ne.alternate===null&&(ne.flags|=67108866),ne}function $(ne,ee,se,me){return ee===null||ee.tag!==6?(ee=Qb(se,ne.mode,me),ee.return=ne,ee):(ee=D(ee,se),ee.return=ne,ee)}function q(ne,ee,se,me){var Me=se.type;return Me===y?fe(ne,ee,se.props.children,me,se.key):ee!==null&&(ee.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===_&&eC(Me)===ee.type)?(ee=D(ee,se.props),Mu(ee,se),ee.return=ne,ee):(ee=zp(se.type,se.key,se.props,null,ne.mode,me),Mu(ee,se),ee.return=ne,ee)}function ie(ne,ee,se,me){return ee===null||ee.tag!==4||ee.stateNode.containerInfo!==se.containerInfo||ee.stateNode.implementation!==se.implementation?(ee=Jb(se,ne.mode,me),ee.return=ne,ee):(ee=D(ee,se.children||[]),ee.return=ne,ee)}function fe(ne,ee,se,me,Me){return ee===null||ee.tag!==7?(ee=Xo(se,ne.mode,me,Me),ee.return=ne,ee):(ee=D(ee,se),ee.return=ne,ee)}function xe(ne,ee,se){if(typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint")return ee=Qb(""+ee,ne.mode,se),ee.return=ne,ee;if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case m:return se=zp(ee.type,ee.key,ee.props,null,ne.mode,se),Mu(se,ee),se.return=ne,se;case x:return ee=Jb(ee,ne.mode,se),ee.return=ne,ee;case _:var me=ee._init;return ee=me(ee._payload),xe(ne,ee,se)}if(X(ee)||z(ee))return ee=Xo(ee,ne.mode,se,null),ee.return=ne,ee;if(typeof ee.then=="function")return xe(ne,em(ee),se);if(ee.$$typeof===S)return xe(ne,Hp(ne,ee),se);tm(ne,ee)}return null}function oe(ne,ee,se,me){var Me=ee!==null?ee.key:null;if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return Me!==null?null:$(ne,ee,""+se,me);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case m:return se.key===Me?q(ne,ee,se,me):null;case x:return se.key===Me?ie(ne,ee,se,me):null;case _:return Me=se._init,se=Me(se._payload),oe(ne,ee,se,me)}if(X(se)||z(se))return Me!==null?null:fe(ne,ee,se,me,null);if(typeof se.then=="function")return oe(ne,ee,em(se),me);if(se.$$typeof===S)return oe(ne,ee,Hp(ne,se),me);tm(ne,se)}return null}function le(ne,ee,se,me,Me){if(typeof me=="string"&&me!==""||typeof me=="number"||typeof me=="bigint")return ne=ne.get(se)||null,$(ee,ne,""+me,Me);if(typeof me=="object"&&me!==null){switch(me.$$typeof){case m:return ne=ne.get(me.key===null?se:me.key)||null,q(ee,ne,me,Me);case x:return ne=ne.get(me.key===null?se:me.key)||null,ie(ee,ne,me,Me);case _:var et=me._init;return me=et(me._payload),le(ne,ee,se,me,Me)}if(X(me)||z(me))return ne=ne.get(se)||null,fe(ee,ne,me,Me,null);if(typeof me.then=="function")return le(ne,ee,se,em(me),Me);if(me.$$typeof===S)return le(ne,ee,se,Hp(ee,me),Me);tm(ee,me)}return null}function $e(ne,ee,se,me){for(var Me=null,et=null,Le=ee,He=ee=0,_r=null;Le!==null&&He<se.length;He++){Le.index>He?(_r=Le,Le=null):_r=Le.sibling;var ct=oe(ne,Le,se[He],me);if(ct===null){Le===null&&(Le=_r);break}d&&Le&&ct.alternate===null&&f(ne,Le),ee=M(ct,ee,He),et===null?Me=ct:et.sibling=ct,et=ct,Le=_r}if(He===se.length)return g(ne,Le),ht&&qo(ne,He),Me;if(Le===null){for(;He<se.length;He++)Le=xe(ne,se[He],me),Le!==null&&(ee=M(Le,ee,He),et===null?Me=Le:et.sibling=Le,et=Le);return ht&&qo(ne,He),Me}for(Le=v(Le);He<se.length;He++)_r=le(Le,ne,He,se[He],me),_r!==null&&(d&&_r.alternate!==null&&Le.delete(_r.key===null?He:_r.key),ee=M(_r,ee,He),et===null?Me=_r:et.sibling=_r,et=_r);return d&&Le.forEach(function(eo){return f(ne,eo)}),ht&&qo(ne,He),Me}function Fe(ne,ee,se,me){if(se==null)throw Error(n(151));for(var Me=null,et=null,Le=ee,He=ee=0,_r=null,ct=se.next();Le!==null&&!ct.done;He++,ct=se.next()){Le.index>He?(_r=Le,Le=null):_r=Le.sibling;var eo=oe(ne,Le,ct.value,me);if(eo===null){Le===null&&(Le=_r);break}d&&Le&&eo.alternate===null&&f(ne,Le),ee=M(eo,ee,He),et===null?Me=eo:et.sibling=eo,et=eo,Le=_r}if(ct.done)return g(ne,Le),ht&&qo(ne,He),Me;if(Le===null){for(;!ct.done;He++,ct=se.next())ct=xe(ne,ct.value,me),ct!==null&&(ee=M(ct,ee,He),et===null?Me=ct:et.sibling=ct,et=ct);return ht&&qo(ne,He),Me}for(Le=v(Le);!ct.done;He++,ct=se.next())ct=le(Le,ne,He,ct.value,me),ct!==null&&(d&&ct.alternate!==null&&Le.delete(ct.key===null?He:ct.key),ee=M(ct,ee,He),et===null?Me=ct:et.sibling=ct,et=ct);return d&&Le.forEach(function(rH){return f(ne,rH)}),ht&&qo(ne,He),Me}function Dt(ne,ee,se,me){if(typeof se=="object"&&se!==null&&se.type===y&&se.key===null&&(se=se.props.children),typeof se=="object"&&se!==null){switch(se.$$typeof){case m:e:{for(var Me=se.key;ee!==null;){if(ee.key===Me){if(Me=se.type,Me===y){if(ee.tag===7){g(ne,ee.sibling),me=D(ee,se.props.children),me.return=ne,ne=me;break e}}else if(ee.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===_&&eC(Me)===ee.type){g(ne,ee.sibling),me=D(ee,se.props),Mu(me,se),me.return=ne,ne=me;break e}g(ne,ee);break}else f(ne,ee);ee=ee.sibling}se.type===y?(me=Xo(se.props.children,ne.mode,me,se.key),me.return=ne,ne=me):(me=zp(se.type,se.key,se.props,null,ne.mode,me),Mu(me,se),me.return=ne,ne=me)}return I(ne);case x:e:{for(Me=se.key;ee!==null;){if(ee.key===Me)if(ee.tag===4&&ee.stateNode.containerInfo===se.containerInfo&&ee.stateNode.implementation===se.implementation){g(ne,ee.sibling),me=D(ee,se.children||[]),me.return=ne,ne=me;break e}else{g(ne,ee);break}else f(ne,ee);ee=ee.sibling}me=Jb(se,ne.mode,me),me.return=ne,ne=me}return I(ne);case _:return Me=se._init,se=Me(se._payload),Dt(ne,ee,se,me)}if(X(se))return $e(ne,ee,se,me);if(z(se)){if(Me=z(se),typeof Me!="function")throw Error(n(150));return se=Me.call(se),Fe(ne,ee,se,me)}if(typeof se.then=="function")return Dt(ne,ee,em(se),me);if(se.$$typeof===S)return Dt(ne,ee,Hp(ne,se),me);tm(ne,se)}return typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint"?(se=""+se,ee!==null&&ee.tag===6?(g(ne,ee.sibling),me=D(ee,se),me.return=ne,ne=me):(g(ne,ee),me=Qb(se,ne.mode,me),me.return=ne,ne=me),I(ne)):g(ne,ee)}return function(ne,ee,se,me){try{Tu=0;var Me=Dt(ne,ee,se,me);return Dc=null,Me}catch(Le){if(Le===vu||Le===Yp)throw Le;var et=Un(29,Le,null,ne.mode);return et.lanes=me,et.return=ne,et}finally{}}}var Tc=tC(!0),rC=tC(!1),wa=G(null),hs=null;function Bi(d){var f=d.alternate;K(yr,yr.current&1),K(wa,d),hs===null&&(f===null||Sc.current!==null||f.memoizedState!==null)&&(hs=d)}function nC(d){if(d.tag===22){if(K(yr,yr.current),K(wa,d),hs===null){var f=d.alternate;f!==null&&f.memoizedState!==null&&(hs=d)}}else Fi()}function Fi(){K(yr,yr.current),K(wa,wa.current)}function Ws(d){te(wa),hs===d&&(hs=null),te(yr)}var yr=G(0);function rm(d){for(var f=d;f!==null;){if(f.tag===13){var g=f.memoizedState;if(g!==null&&(g=g.dehydrated,g===null||g.data==="$?"||wv(g)))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if((f.flags&128)!==0)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===d)break;for(;f.sibling===null;){if(f.return===null||f.return===d)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}function Oy(d,f,g,v){f=d.memoizedState,g=g(v,f),g=g==null?f:h({},f,g),d.memoizedState=g,d.lanes===0&&(d.updateQueue.baseState=g)}var Py={enqueueSetState:function(d,f,g){d=d._reactInternals;var v=qn(),D=Li(v);D.payload=f,g!=null&&(D.callback=g),f=zi(d,D,v),f!==null&&(Gn(f,d,v),ju(f,d,v))},enqueueReplaceState:function(d,f,g){d=d._reactInternals;var v=qn(),D=Li(v);D.tag=1,D.payload=f,g!=null&&(D.callback=g),f=zi(d,D,v),f!==null&&(Gn(f,d,v),ju(f,d,v))},enqueueForceUpdate:function(d,f){d=d._reactInternals;var g=qn(),v=Li(g);v.tag=2,f!=null&&(v.callback=f),f=zi(d,v,g),f!==null&&(Gn(f,d,g),ju(f,d,g))}};function aC(d,f,g,v,D,M,I){return d=d.stateNode,typeof d.shouldComponentUpdate=="function"?d.shouldComponentUpdate(v,M,I):f.prototype&&f.prototype.isPureReactComponent?!hu(g,v)||!hu(D,M):!0}function sC(d,f,g,v){d=f.state,typeof f.componentWillReceiveProps=="function"&&f.componentWillReceiveProps(g,v),typeof f.UNSAFE_componentWillReceiveProps=="function"&&f.UNSAFE_componentWillReceiveProps(g,v),f.state!==d&&Py.enqueueReplaceState(f,f.state,null)}function tl(d,f){var g=f;if("ref"in f){g={};for(var v in f)v!=="ref"&&(g[v]=f[v])}if(d=d.defaultProps){g===f&&(g=h({},g));for(var D in d)g[D]===void 0&&(g[D]=d[D])}return g}var nm=typeof reportError=="function"?reportError:function(d){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var f=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof d=="object"&&d!==null&&typeof d.message=="string"?String(d.message):String(d),error:d});if(!window.dispatchEvent(f))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",d);return}console.error(d)};function iC(d){nm(d)}function oC(d){console.error(d)}function lC(d){nm(d)}function am(d,f){try{var g=d.onUncaughtError;g(f.value,{componentStack:f.stack})}catch(v){setTimeout(function(){throw v})}}function cC(d,f,g){try{var v=d.onCaughtError;v(g.value,{componentStack:g.stack,errorBoundary:f.tag===1?f.stateNode:null})}catch(D){setTimeout(function(){throw D})}}function _y(d,f,g){return g=Li(g),g.tag=3,g.payload={element:null},g.callback=function(){am(d,f)},g}function dC(d){return d=Li(d),d.tag=3,d}function uC(d,f,g,v){var D=g.type.getDerivedStateFromError;if(typeof D=="function"){var M=v.value;d.payload=function(){return D(M)},d.callback=function(){cC(f,g,v)}}var I=g.stateNode;I!==null&&typeof I.componentDidCatch=="function"&&(d.callback=function(){cC(f,g,v),typeof D!="function"&&(Xi===null?Xi=new Set([this]):Xi.add(this));var $=v.stack;this.componentDidCatch(v.value,{componentStack:$!==null?$:""})})}function rF(d,f,g,v,D){if(g.flags|=32768,v!==null&&typeof v=="object"&&typeof v.then=="function"){if(f=g.alternate,f!==null&&xu(f,g,D,!0),g=wa.current,g!==null){switch(g.tag){case 13:return hs===null?av():g.alternate===null&&er===0&&(er=3),g.flags&=-257,g.flags|=65536,g.lanes=D,v===cy?g.flags|=16384:(f=g.updateQueue,f===null?g.updateQueue=new Set([v]):f.add(v),iv(d,v,D)),!1;case 22:return g.flags|=65536,v===cy?g.flags|=16384:(f=g.updateQueue,f===null?(f={transitions:null,markerInstances:null,retryQueue:new Set([v])},g.updateQueue=f):(g=f.retryQueue,g===null?f.retryQueue=new Set([v]):g.add(v)),iv(d,v,D)),!1}throw Error(n(435,g.tag))}return iv(d,v,D),av(),!1}if(ht)return f=wa.current,f!==null?((f.flags&65536)===0&&(f.flags|=256),f.flags|=65536,f.lanes=D,v!==ry&&(d=Error(n(422),{cause:v}),gu(xa(d,g)))):(v!==ry&&(f=Error(n(423),{cause:v}),gu(xa(f,g))),d=d.current.alternate,d.flags|=65536,D&=-D,d.lanes|=D,v=xa(v,g),D=_y(d.stateNode,v,D),hy(d,D),er!==4&&(er=2)),!1;var M=Error(n(520),{cause:v});if(M=xa(M,g),zu===null?zu=[M]:zu.push(M),er!==4&&(er=2),f===null)return!0;v=xa(v,g),g=f;do{switch(g.tag){case 3:return g.flags|=65536,d=D&-D,g.lanes|=d,d=_y(g.stateNode,v,d),hy(g,d),!1;case 1:if(f=g.type,M=g.stateNode,(g.flags&128)===0&&(typeof f.getDerivedStateFromError=="function"||M!==null&&typeof M.componentDidCatch=="function"&&(Xi===null||!Xi.has(M))))return g.flags|=65536,D&=-D,g.lanes|=D,D=dC(D),uC(D,d,g,v),hy(g,D),!1}g=g.return}while(g!==null);return!1}var hC=Error(n(461)),Or=!1;function Hr(d,f,g,v){f.child=d===null?rC(f,null,g,v):Tc(f,d.child,g,v)}function fC(d,f,g,v,D){g=g.render;var M=f.ref;if("ref"in v){var I={};for(var $ in v)$!=="ref"&&(I[$]=v[$])}else I=v;return Qo(f),v=xy(d,f,g,I,M,D),$=by(),d!==null&&!Or?(yy(d,f,D),Xs(d,f,D)):(ht&&$&&ey(f),f.flags|=1,Hr(d,f,v,D),f.child)}function pC(d,f,g,v,D){if(d===null){var M=g.type;return typeof M=="function"&&!Zb(M)&&M.defaultProps===void 0&&g.compare===null?(f.tag=15,f.type=M,mC(d,f,M,v,D)):(d=zp(g.type,null,v,f,f.mode,D),d.ref=f.ref,d.return=f,f.child=d)}if(M=d.child,!$y(d,D)){var I=M.memoizedProps;if(g=g.compare,g=g!==null?g:hu,g(I,v)&&d.ref===f.ref)return Xs(d,f,D)}return f.flags|=1,d=Bs(M,v),d.ref=f.ref,d.return=f,f.child=d}function mC(d,f,g,v,D){if(d!==null){var M=d.memoizedProps;if(hu(M,v)&&d.ref===f.ref)if(Or=!1,f.pendingProps=v=M,$y(d,D))(d.flags&131072)!==0&&(Or=!0);else return f.lanes=d.lanes,Xs(d,f,D)}return Ry(d,f,g,v,D)}function gC(d,f,g){var v=f.pendingProps,D=v.children,M=d!==null?d.memoizedState:null;if(v.mode==="hidden"){if((f.flags&128)!==0){if(v=M!==null?M.baseLanes|g:g,d!==null){for(D=f.child=d.child,M=0;D!==null;)M=M|D.lanes|D.childLanes,D=D.sibling;f.childLanes=M&~v}else f.childLanes=0,f.child=null;return xC(d,f,v,g)}if((g&536870912)!==0)f.memoizedState={baseLanes:0,cachePool:null},d!==null&&$p(f,M!==null?M.cachePool:null),M!==null?mA(f,M):py(),nC(f);else return f.lanes=f.childLanes=536870912,xC(d,f,M!==null?M.baseLanes|g:g,g)}else M!==null?($p(f,M.cachePool),mA(f,M),Fi(),f.memoizedState=null):(d!==null&&$p(f,null),py(),Fi());return Hr(d,f,D,g),f.child}function xC(d,f,g,v){var D=ly();return D=D===null?null:{parent:br._currentValue,pool:D},f.memoizedState={baseLanes:g,cachePool:D},d!==null&&$p(f,null),py(),nC(f),d!==null&&xu(d,f,v,!0),null}function sm(d,f){var g=f.ref;if(g===null)d!==null&&d.ref!==null&&(f.flags|=4194816);else{if(typeof g!="function"&&typeof g!="object")throw Error(n(284));(d===null||d.ref!==g)&&(f.flags|=4194816)}}function Ry(d,f,g,v,D){return Qo(f),g=xy(d,f,g,v,void 0,D),v=by(),d!==null&&!Or?(yy(d,f,D),Xs(d,f,D)):(ht&&v&&ey(f),f.flags|=1,Hr(d,f,g,D),f.child)}function bC(d,f,g,v,D,M){return Qo(f),f.updateQueue=null,g=xA(f,v,g,D),gA(d),v=by(),d!==null&&!Or?(yy(d,f,M),Xs(d,f,M)):(ht&&v&&ey(f),f.flags|=1,Hr(d,f,g,M),f.child)}function yC(d,f,g,v,D){if(Qo(f),f.stateNode===null){var M=yc,I=g.contextType;typeof I=="object"&&I!==null&&(M=rn(I)),M=new g(v,M),f.memoizedState=M.state!==null&&M.state!==void 0?M.state:null,M.updater=Py,f.stateNode=M,M._reactInternals=f,M=f.stateNode,M.props=v,M.state=f.memoizedState,M.refs={},dy(f),I=g.contextType,M.context=typeof I=="object"&&I!==null?rn(I):yc,M.state=f.memoizedState,I=g.getDerivedStateFromProps,typeof I=="function"&&(Oy(f,g,I,v),M.state=f.memoizedState),typeof g.getDerivedStateFromProps=="function"||typeof M.getSnapshotBeforeUpdate=="function"||typeof M.UNSAFE_componentWillMount!="function"&&typeof M.componentWillMount!="function"||(I=M.state,typeof M.componentWillMount=="function"&&M.componentWillMount(),typeof M.UNSAFE_componentWillMount=="function"&&M.UNSAFE_componentWillMount(),I!==M.state&&Py.enqueueReplaceState(M,M.state,null),Su(f,v,M,D),Nu(),M.state=f.memoizedState),typeof M.componentDidMount=="function"&&(f.flags|=4194308),v=!0}else if(d===null){M=f.stateNode;var $=f.memoizedProps,q=tl(g,$);M.props=q;var ie=M.context,fe=g.contextType;I=yc,typeof fe=="object"&&fe!==null&&(I=rn(fe));var xe=g.getDerivedStateFromProps;fe=typeof xe=="function"||typeof M.getSnapshotBeforeUpdate=="function",$=f.pendingProps!==$,fe||typeof M.UNSAFE_componentWillReceiveProps!="function"&&typeof M.componentWillReceiveProps!="function"||($||ie!==I)&&sC(f,M,v,I),Ri=!1;var oe=f.memoizedState;M.state=oe,Su(f,v,M,D),Nu(),ie=f.memoizedState,$||oe!==ie||Ri?(typeof xe=="function"&&(Oy(f,g,xe,v),ie=f.memoizedState),(q=Ri||aC(f,g,q,v,oe,ie,I))?(fe||typeof M.UNSAFE_componentWillMount!="function"&&typeof M.componentWillMount!="function"||(typeof M.componentWillMount=="function"&&M.componentWillMount(),typeof M.UNSAFE_componentWillMount=="function"&&M.UNSAFE_componentWillMount()),typeof M.componentDidMount=="function"&&(f.flags|=4194308)):(typeof M.componentDidMount=="function"&&(f.flags|=4194308),f.memoizedProps=v,f.memoizedState=ie),M.props=v,M.state=ie,M.context=I,v=q):(typeof M.componentDidMount=="function"&&(f.flags|=4194308),v=!1)}else{M=f.stateNode,uy(d,f),I=f.memoizedProps,fe=tl(g,I),M.props=fe,xe=f.pendingProps,oe=M.context,ie=g.contextType,q=yc,typeof ie=="object"&&ie!==null&&(q=rn(ie)),$=g.getDerivedStateFromProps,(ie=typeof $=="function"||typeof M.getSnapshotBeforeUpdate=="function")||typeof M.UNSAFE_componentWillReceiveProps!="function"&&typeof M.componentWillReceiveProps!="function"||(I!==xe||oe!==q)&&sC(f,M,v,q),Ri=!1,oe=f.memoizedState,M.state=oe,Su(f,v,M,D),Nu();var le=f.memoizedState;I!==xe||oe!==le||Ri||d!==null&&d.dependencies!==null&&Fp(d.dependencies)?(typeof $=="function"&&(Oy(f,g,$,v),le=f.memoizedState),(fe=Ri||aC(f,g,fe,v,oe,le,q)||d!==null&&d.dependencies!==null&&Fp(d.dependencies))?(ie||typeof M.UNSAFE_componentWillUpdate!="function"&&typeof M.componentWillUpdate!="function"||(typeof M.componentWillUpdate=="function"&&M.componentWillUpdate(v,le,q),typeof M.UNSAFE_componentWillUpdate=="function"&&M.UNSAFE_componentWillUpdate(v,le,q)),typeof M.componentDidUpdate=="function"&&(f.flags|=4),typeof M.getSnapshotBeforeUpdate=="function"&&(f.flags|=1024)):(typeof M.componentDidUpdate!="function"||I===d.memoizedProps&&oe===d.memoizedState||(f.flags|=4),typeof M.getSnapshotBeforeUpdate!="function"||I===d.memoizedProps&&oe===d.memoizedState||(f.flags|=1024),f.memoizedProps=v,f.memoizedState=le),M.props=v,M.state=le,M.context=q,v=fe):(typeof M.componentDidUpdate!="function"||I===d.memoizedProps&&oe===d.memoizedState||(f.flags|=4),typeof M.getSnapshotBeforeUpdate!="function"||I===d.memoizedProps&&oe===d.memoizedState||(f.flags|=1024),v=!1)}return M=v,sm(d,f),v=(f.flags&128)!==0,M||v?(M=f.stateNode,g=v&&typeof g.getDerivedStateFromError!="function"?null:M.render(),f.flags|=1,d!==null&&v?(f.child=Tc(f,d.child,null,D),f.child=Tc(f,null,g,D)):Hr(d,f,g,D),f.memoizedState=M.state,d=f.child):d=Xs(d,f,D),d}function vC(d,f,g,v){return mu(),f.flags|=256,Hr(d,f,g,v),f.child}var Ly={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function zy(d){return{baseLanes:d,cachePool:oA()}}function Iy(d,f,g){return d=d!==null?d.childLanes&~g:0,f&&(d|=ja),d}function wC(d,f,g){var v=f.pendingProps,D=!1,M=(f.flags&128)!==0,I;if((I=M)||(I=d!==null&&d.memoizedState===null?!1:(yr.current&2)!==0),I&&(D=!0,f.flags&=-129),I=(f.flags&32)!==0,f.flags&=-33,d===null){if(ht){if(D?Bi(f):Fi(),ht){var $=Jt,q;if(q=$){e:{for(q=$,$=us;q.nodeType!==8;){if(!$){$=null;break e}if(q=qa(q.nextSibling),q===null){$=null;break e}}$=q}$!==null?(f.memoizedState={dehydrated:$,treeContext:Vo!==null?{id:Fs,overflow:Hs}:null,retryLane:536870912,hydrationErrors:null},q=Un(18,null,null,0),q.stateNode=$,q.return=f,f.child=q,un=f,Jt=null,q=!0):q=!1}q||Ko(f)}if($=f.memoizedState,$!==null&&($=$.dehydrated,$!==null))return wv($)?f.lanes=32:f.lanes=536870912,null;Ws(f)}return $=v.children,v=v.fallback,D?(Fi(),D=f.mode,$=im({mode:"hidden",children:$},D),v=Xo(v,D,g,null),$.return=f,v.return=f,$.sibling=v,f.child=$,D=f.child,D.memoizedState=zy(g),D.childLanes=Iy(d,I,g),f.memoizedState=Ly,v):(Bi(f),By(f,$))}if(q=d.memoizedState,q!==null&&($=q.dehydrated,$!==null)){if(M)f.flags&256?(Bi(f),f.flags&=-257,f=Fy(d,f,g)):f.memoizedState!==null?(Fi(),f.child=d.child,f.flags|=128,f=null):(Fi(),D=v.fallback,$=f.mode,v=im({mode:"visible",children:v.children},$),D=Xo(D,$,g,null),D.flags|=2,v.return=f,D.return=f,v.sibling=D,f.child=v,Tc(f,d.child,null,g),v=f.child,v.memoizedState=zy(g),v.childLanes=Iy(d,I,g),f.memoizedState=Ly,f=D);else if(Bi(f),wv($)){if(I=$.nextSibling&&$.nextSibling.dataset,I)var ie=I.dgst;I=ie,v=Error(n(419)),v.stack="",v.digest=I,gu({value:v,source:null,stack:null}),f=Fy(d,f,g)}else if(Or||xu(d,f,g,!1),I=(g&d.childLanes)!==0,Or||I){if(I=zt,I!==null&&(v=g&-g,v=(v&42)!==0?1:tu(v),v=(v&(I.suspendedLanes|g))!==0?0:v,v!==0&&v!==q.retryLane))throw q.retryLane=v,bc(d,v),Gn(I,d,v),hC;$.data==="$?"||av(),f=Fy(d,f,g)}else $.data==="$?"?(f.flags|=192,f.child=d.child,f=null):(d=q.treeContext,Jt=qa($.nextSibling),un=f,ht=!0,Go=null,us=!1,d!==null&&(ya[va++]=Fs,ya[va++]=Hs,ya[va++]=Vo,Fs=d.id,Hs=d.overflow,Vo=f),f=By(f,v.children),f.flags|=4096);return f}return D?(Fi(),D=v.fallback,$=f.mode,q=d.child,ie=q.sibling,v=Bs(q,{mode:"hidden",children:v.children}),v.subtreeFlags=q.subtreeFlags&65011712,ie!==null?D=Bs(ie,D):(D=Xo(D,$,g,null),D.flags|=2),D.return=f,v.return=f,v.sibling=D,f.child=v,v=D,D=f.child,$=d.child.memoizedState,$===null?$=zy(g):(q=$.cachePool,q!==null?(ie=br._currentValue,q=q.parent!==ie?{parent:ie,pool:ie}:q):q=oA(),$={baseLanes:$.baseLanes|g,cachePool:q}),D.memoizedState=$,D.childLanes=Iy(d,I,g),f.memoizedState=Ly,v):(Bi(f),g=d.child,d=g.sibling,g=Bs(g,{mode:"visible",children:v.children}),g.return=f,g.sibling=null,d!==null&&(I=f.deletions,I===null?(f.deletions=[d],f.flags|=16):I.push(d)),f.child=g,f.memoizedState=null,g)}function By(d,f){return f=im({mode:"visible",children:f},d.mode),f.return=d,d.child=f}function im(d,f){return d=Un(22,d,null,f),d.lanes=0,d.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},d}function Fy(d,f,g){return Tc(f,d.child,null,g),d=By(f,f.pendingProps.children),d.flags|=2,f.memoizedState=null,d}function jC(d,f,g){d.lanes|=f;var v=d.alternate;v!==null&&(v.lanes|=f),ay(d.return,f,g)}function Hy(d,f,g,v,D){var M=d.memoizedState;M===null?d.memoizedState={isBackwards:f,rendering:null,renderingStartTime:0,last:v,tail:g,tailMode:D}:(M.isBackwards=f,M.rendering=null,M.renderingStartTime=0,M.last=v,M.tail=g,M.tailMode=D)}function NC(d,f,g){var v=f.pendingProps,D=v.revealOrder,M=v.tail;if(Hr(d,f,v.children,g),v=yr.current,(v&2)!==0)v=v&1|2,f.flags|=128;else{if(d!==null&&(d.flags&128)!==0)e:for(d=f.child;d!==null;){if(d.tag===13)d.memoizedState!==null&&jC(d,g,f);else if(d.tag===19)jC(d,g,f);else if(d.child!==null){d.child.return=d,d=d.child;continue}if(d===f)break e;for(;d.sibling===null;){if(d.return===null||d.return===f)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}v&=1}switch(K(yr,v),D){case"forwards":for(g=f.child,D=null;g!==null;)d=g.alternate,d!==null&&rm(d)===null&&(D=g),g=g.sibling;g=D,g===null?(D=f.child,f.child=null):(D=g.sibling,g.sibling=null),Hy(f,!1,D,g,M);break;case"backwards":for(g=null,D=f.child,f.child=null;D!==null;){if(d=D.alternate,d!==null&&rm(d)===null){f.child=D;break}d=D.sibling,D.sibling=g,g=D,D=d}Hy(f,!0,g,null,M);break;case"together":Hy(f,!1,null,null,void 0);break;default:f.memoizedState=null}return f.child}function Xs(d,f,g){if(d!==null&&(f.dependencies=d.dependencies),Wi|=f.lanes,(g&f.childLanes)===0)if(d!==null){if(xu(d,f,g,!1),(g&f.childLanes)===0)return null}else return null;if(d!==null&&f.child!==d.child)throw Error(n(153));if(f.child!==null){for(d=f.child,g=Bs(d,d.pendingProps),f.child=g,g.return=f;d.sibling!==null;)d=d.sibling,g=g.sibling=Bs(d,d.pendingProps),g.return=f;g.sibling=null}return f.child}function $y(d,f){return(d.lanes&f)!==0?!0:(d=d.dependencies,!!(d!==null&&Fp(d)))}function nF(d,f,g){switch(f.tag){case 3:ye(f,f.stateNode.containerInfo),_i(f,br,d.memoizedState.cache),mu();break;case 27:case 5:je(f);break;case 4:ye(f,f.stateNode.containerInfo);break;case 10:_i(f,f.type,f.memoizedProps.value);break;case 13:var v=f.memoizedState;if(v!==null)return v.dehydrated!==null?(Bi(f),f.flags|=128,null):(g&f.child.childLanes)!==0?wC(d,f,g):(Bi(f),d=Xs(d,f,g),d!==null?d.sibling:null);Bi(f);break;case 19:var D=(d.flags&128)!==0;if(v=(g&f.childLanes)!==0,v||(xu(d,f,g,!1),v=(g&f.childLanes)!==0),D){if(v)return NC(d,f,g);f.flags|=128}if(D=f.memoizedState,D!==null&&(D.rendering=null,D.tail=null,D.lastEffect=null),K(yr,yr.current),v)break;return null;case 22:case 23:return f.lanes=0,gC(d,f,g);case 24:_i(f,br,d.memoizedState.cache)}return Xs(d,f,g)}function SC(d,f,g){if(d!==null)if(d.memoizedProps!==f.pendingProps)Or=!0;else{if(!$y(d,g)&&(f.flags&128)===0)return Or=!1,nF(d,f,g);Or=(d.flags&131072)!==0}else Or=!1,ht&&(f.flags&1048576)!==0&&eA(f,Bp,f.index);switch(f.lanes=0,f.tag){case 16:e:{d=f.pendingProps;var v=f.elementType,D=v._init;if(v=D(v._payload),f.type=v,typeof v=="function")Zb(v)?(d=tl(v,d),f.tag=1,f=yC(null,f,v,d,g)):(f.tag=0,f=Ry(null,f,v,d,g));else{if(v!=null){if(D=v.$$typeof,D===C){f.tag=11,f=fC(null,f,v,d,g);break e}else if(D===E){f.tag=14,f=pC(null,f,v,d,g);break e}}throw f=Y(v)||v,Error(n(306,f,""))}}return f;case 0:return Ry(d,f,f.type,f.pendingProps,g);case 1:return v=f.type,D=tl(v,f.pendingProps),yC(d,f,v,D,g);case 3:e:{if(ye(f,f.stateNode.containerInfo),d===null)throw Error(n(387));v=f.pendingProps;var M=f.memoizedState;D=M.element,uy(d,f),Su(f,v,null,g);var I=f.memoizedState;if(v=I.cache,_i(f,br,v),v!==M.cache&&sy(f,[br],g,!0),Nu(),v=I.element,M.isDehydrated)if(M={element:v,isDehydrated:!1,cache:I.cache},f.updateQueue.baseState=M,f.memoizedState=M,f.flags&256){f=vC(d,f,v,g);break e}else if(v!==D){D=xa(Error(n(424)),f),gu(D),f=vC(d,f,v,g);break e}else{switch(d=f.stateNode.containerInfo,d.nodeType){case 9:d=d.body;break;default:d=d.nodeName==="HTML"?d.ownerDocument.body:d}for(Jt=qa(d.firstChild),un=f,ht=!0,Go=null,us=!0,g=rC(f,null,v,g),f.child=g;g;)g.flags=g.flags&-3|4096,g=g.sibling}else{if(mu(),v===D){f=Xs(d,f,g);break e}Hr(d,f,v,g)}f=f.child}return f;case 26:return sm(d,f),d===null?(g=Dk(f.type,null,f.pendingProps,null))?f.memoizedState=g:ht||(g=f.type,d=f.pendingProps,v=vm(ae.current).createElement(g),v[ur]=f,v[Er]=d,Yr(v,g,d),Qt(v),f.stateNode=v):f.memoizedState=Dk(f.type,d.memoizedProps,f.pendingProps,d.memoizedState),null;case 27:return je(f),d===null&&ht&&(v=f.stateNode=Ak(f.type,f.pendingProps,ae.current),un=f,us=!0,D=Jt,Gi(f.type)?(jv=D,Jt=qa(v.firstChild)):Jt=D),Hr(d,f,f.pendingProps.children,g),sm(d,f),d===null&&(f.flags|=4194304),f.child;case 5:return d===null&&ht&&((D=v=Jt)&&(v=EF(v,f.type,f.pendingProps,us),v!==null?(f.stateNode=v,un=f,Jt=qa(v.firstChild),us=!1,D=!0):D=!1),D||Ko(f)),je(f),D=f.type,M=f.pendingProps,I=d!==null?d.memoizedProps:null,v=M.children,bv(D,M)?v=null:I!==null&&bv(D,I)&&(f.flags|=32),f.memoizedState!==null&&(D=xy(d,f,GB,null,null,g),Xu._currentValue=D),sm(d,f),Hr(d,f,v,g),f.child;case 6:return d===null&&ht&&((d=g=Jt)&&(g=OF(g,f.pendingProps,us),g!==null?(f.stateNode=g,un=f,Jt=null,d=!0):d=!1),d||Ko(f)),null;case 13:return wC(d,f,g);case 4:return ye(f,f.stateNode.containerInfo),v=f.pendingProps,d===null?f.child=Tc(f,null,v,g):Hr(d,f,v,g),f.child;case 11:return fC(d,f,f.type,f.pendingProps,g);case 7:return Hr(d,f,f.pendingProps,g),f.child;case 8:return Hr(d,f,f.pendingProps.children,g),f.child;case 12:return Hr(d,f,f.pendingProps.children,g),f.child;case 10:return v=f.pendingProps,_i(f,f.type,v.value),Hr(d,f,v.children,g),f.child;case 9:return D=f.type._context,v=f.pendingProps.children,Qo(f),D=rn(D),v=v(D),f.flags|=1,Hr(d,f,v,g),f.child;case 14:return pC(d,f,f.type,f.pendingProps,g);case 15:return mC(d,f,f.type,f.pendingProps,g);case 19:return NC(d,f,g);case 31:return v=f.pendingProps,g=f.mode,v={mode:v.mode,children:v.children},d===null?(g=im(v,g),g.ref=f.ref,f.child=g,g.return=f,f=g):(g=Bs(d.child,v),g.ref=f.ref,f.child=g,g.return=f,f=g),f;case 22:return gC(d,f,g);case 24:return Qo(f),v=rn(br),d===null?(D=ly(),D===null&&(D=zt,M=iy(),D.pooledCache=M,M.refCount++,M!==null&&(D.pooledCacheLanes|=g),D=M),f.memoizedState={parent:v,cache:D},dy(f),_i(f,br,D)):((d.lanes&g)!==0&&(uy(d,f),Su(f,null,null,g),Nu()),D=d.memoizedState,M=f.memoizedState,D.parent!==v?(D={parent:v,cache:v},f.memoizedState=D,f.lanes===0&&(f.memoizedState=f.updateQueue.baseState=D),_i(f,br,v)):(v=M.cache,_i(f,br,v),v!==D.cache&&sy(f,[br],g,!0))),Hr(d,f,f.pendingProps.children,g),f.child;case 29:throw f.pendingProps}throw Error(n(156,f.tag))}function Vs(d){d.flags|=4}function AC(d,f){if(f.type!=="stylesheet"||(f.state.loading&4)!==0)d.flags&=-16777217;else if(d.flags|=16777216,!Pk(f)){if(f=wa.current,f!==null&&((at&4194048)===at?hs!==null:(at&62914560)!==at&&(at&536870912)===0||f!==hs))throw wu=cy,lA;d.flags|=8192}}function om(d,f){f!==null&&(d.flags|=4),d.flags&16384&&(f=d.tag!==22?yp():536870912,d.lanes|=f,Pc|=f)}function Eu(d,f){if(!ht)switch(d.tailMode){case"hidden":f=d.tail;for(var g=null;f!==null;)f.alternate!==null&&(g=f),f=f.sibling;g===null?d.tail=null:g.sibling=null;break;case"collapsed":g=d.tail;for(var v=null;g!==null;)g.alternate!==null&&(v=g),g=g.sibling;v===null?f||d.tail===null?d.tail=null:d.tail.sibling=null:v.sibling=null}}function Kt(d){var f=d.alternate!==null&&d.alternate.child===d.child,g=0,v=0;if(f)for(var D=d.child;D!==null;)g|=D.lanes|D.childLanes,v|=D.subtreeFlags&65011712,v|=D.flags&65011712,D.return=d,D=D.sibling;else for(D=d.child;D!==null;)g|=D.lanes|D.childLanes,v|=D.subtreeFlags,v|=D.flags,D.return=d,D=D.sibling;return d.subtreeFlags|=v,d.childLanes=g,f}function aF(d,f,g){var v=f.pendingProps;switch(ty(f),f.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Kt(f),null;case 1:return Kt(f),null;case 3:return g=f.stateNode,v=null,d!==null&&(v=d.memoizedState.cache),f.memoizedState.cache!==v&&(f.flags|=2048),Ys(br),ue(),g.pendingContext&&(g.context=g.pendingContext,g.pendingContext=null),(d===null||d.child===null)&&(pu(f)?Vs(f):d===null||d.memoizedState.isDehydrated&&(f.flags&256)===0||(f.flags|=1024,nA())),Kt(f),null;case 26:return g=f.memoizedState,d===null?(Vs(f),g!==null?(Kt(f),AC(f,g)):(Kt(f),f.flags&=-16777217)):g?g!==d.memoizedState?(Vs(f),Kt(f),AC(f,g)):(Kt(f),f.flags&=-16777217):(d.memoizedProps!==v&&Vs(f),Kt(f),f.flags&=-16777217),null;case 27:Ce(f),g=ae.current;var D=f.type;if(d!==null&&f.stateNode!=null)d.memoizedProps!==v&&Vs(f);else{if(!v){if(f.stateNode===null)throw Error(n(166));return Kt(f),null}d=U.current,pu(f)?tA(f):(d=Ak(D,v,g),f.stateNode=d,Vs(f))}return Kt(f),null;case 5:if(Ce(f),g=f.type,d!==null&&f.stateNode!=null)d.memoizedProps!==v&&Vs(f);else{if(!v){if(f.stateNode===null)throw Error(n(166));return Kt(f),null}if(d=U.current,pu(f))tA(f);else{switch(D=vm(ae.current),d){case 1:d=D.createElementNS("http://www.w3.org/2000/svg",g);break;case 2:d=D.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;default:switch(g){case"svg":d=D.createElementNS("http://www.w3.org/2000/svg",g);break;case"math":d=D.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;case"script":d=D.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof v.is=="string"?D.createElement("select",{is:v.is}):D.createElement("select"),v.multiple?d.multiple=!0:v.size&&(d.size=v.size);break;default:d=typeof v.is=="string"?D.createElement(g,{is:v.is}):D.createElement(g)}}d[ur]=f,d[Er]=v;e:for(D=f.child;D!==null;){if(D.tag===5||D.tag===6)d.appendChild(D.stateNode);else if(D.tag!==4&&D.tag!==27&&D.child!==null){D.child.return=D,D=D.child;continue}if(D===f)break e;for(;D.sibling===null;){if(D.return===null||D.return===f)break e;D=D.return}D.sibling.return=D.return,D=D.sibling}f.stateNode=d;e:switch(Yr(d,g,v),g){case"button":case"input":case"select":case"textarea":d=!!v.autoFocus;break e;case"img":d=!0;break e;default:d=!1}d&&Vs(f)}}return Kt(f),f.flags&=-16777217,null;case 6:if(d&&f.stateNode!=null)d.memoizedProps!==v&&Vs(f);else{if(typeof v!="string"&&f.stateNode===null)throw Error(n(166));if(d=ae.current,pu(f)){if(d=f.stateNode,g=f.memoizedProps,v=null,D=un,D!==null)switch(D.tag){case 27:case 5:v=D.memoizedProps}d[ur]=f,d=!!(d.nodeValue===g||v!==null&&v.suppressHydrationWarning===!0||bk(d.nodeValue,g)),d||Ko(f)}else d=vm(d).createTextNode(v),d[ur]=f,f.stateNode=d}return Kt(f),null;case 13:if(v=f.memoizedState,d===null||d.memoizedState!==null&&d.memoizedState.dehydrated!==null){if(D=pu(f),v!==null&&v.dehydrated!==null){if(d===null){if(!D)throw Error(n(318));if(D=f.memoizedState,D=D!==null?D.dehydrated:null,!D)throw Error(n(317));D[ur]=f}else mu(),(f.flags&128)===0&&(f.memoizedState=null),f.flags|=4;Kt(f),D=!1}else D=nA(),d!==null&&d.memoizedState!==null&&(d.memoizedState.hydrationErrors=D),D=!0;if(!D)return f.flags&256?(Ws(f),f):(Ws(f),null)}if(Ws(f),(f.flags&128)!==0)return f.lanes=g,f;if(g=v!==null,d=d!==null&&d.memoizedState!==null,g){v=f.child,D=null,v.alternate!==null&&v.alternate.memoizedState!==null&&v.alternate.memoizedState.cachePool!==null&&(D=v.alternate.memoizedState.cachePool.pool);var M=null;v.memoizedState!==null&&v.memoizedState.cachePool!==null&&(M=v.memoizedState.cachePool.pool),M!==D&&(v.flags|=2048)}return g!==d&&g&&(f.child.flags|=8192),om(f,f.updateQueue),Kt(f),null;case 4:return ue(),d===null&&fv(f.stateNode.containerInfo),Kt(f),null;case 10:return Ys(f.type),Kt(f),null;case 19:if(te(yr),D=f.memoizedState,D===null)return Kt(f),null;if(v=(f.flags&128)!==0,M=D.rendering,M===null)if(v)Eu(D,!1);else{if(er!==0||d!==null&&(d.flags&128)!==0)for(d=f.child;d!==null;){if(M=rm(d),M!==null){for(f.flags|=128,Eu(D,!1),d=M.updateQueue,f.updateQueue=d,om(f,d),f.subtreeFlags=0,d=g,g=f.child;g!==null;)J3(g,d),g=g.sibling;return K(yr,yr.current&1|2),f.child}d=d.sibling}D.tail!==null&&xt()>dm&&(f.flags|=128,v=!0,Eu(D,!1),f.lanes=4194304)}else{if(!v)if(d=rm(M),d!==null){if(f.flags|=128,v=!0,d=d.updateQueue,f.updateQueue=d,om(f,d),Eu(D,!0),D.tail===null&&D.tailMode==="hidden"&&!M.alternate&&!ht)return Kt(f),null}else 2*xt()-D.renderingStartTime>dm&&g!==536870912&&(f.flags|=128,v=!0,Eu(D,!1),f.lanes=4194304);D.isBackwards?(M.sibling=f.child,f.child=M):(d=D.last,d!==null?d.sibling=M:f.child=M,D.last=M)}return D.tail!==null?(f=D.tail,D.rendering=f,D.tail=f.sibling,D.renderingStartTime=xt(),f.sibling=null,d=yr.current,K(yr,v?d&1|2:d&1),f):(Kt(f),null);case 22:case 23:return Ws(f),my(),v=f.memoizedState!==null,d!==null?d.memoizedState!==null!==v&&(f.flags|=8192):v&&(f.flags|=8192),v?(g&536870912)!==0&&(f.flags&128)===0&&(Kt(f),f.subtreeFlags&6&&(f.flags|=8192)):Kt(f),g=f.updateQueue,g!==null&&om(f,g.retryQueue),g=null,d!==null&&d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(g=d.memoizedState.cachePool.pool),v=null,f.memoizedState!==null&&f.memoizedState.cachePool!==null&&(v=f.memoizedState.cachePool.pool),v!==g&&(f.flags|=2048),d!==null&&te(Jo),null;case 24:return g=null,d!==null&&(g=d.memoizedState.cache),f.memoizedState.cache!==g&&(f.flags|=2048),Ys(br),Kt(f),null;case 25:return null;case 30:return null}throw Error(n(156,f.tag))}function sF(d,f){switch(ty(f),f.tag){case 1:return d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 3:return Ys(br),ue(),d=f.flags,(d&65536)!==0&&(d&128)===0?(f.flags=d&-65537|128,f):null;case 26:case 27:case 5:return Ce(f),null;case 13:if(Ws(f),d=f.memoizedState,d!==null&&d.dehydrated!==null){if(f.alternate===null)throw Error(n(340));mu()}return d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 19:return te(yr),null;case 4:return ue(),null;case 10:return Ys(f.type),null;case 22:case 23:return Ws(f),my(),d!==null&&te(Jo),d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 24:return Ys(br),null;case 25:return null;default:return null}}function CC(d,f){switch(ty(f),f.tag){case 3:Ys(br),ue();break;case 26:case 27:case 5:Ce(f);break;case 4:ue();break;case 13:Ws(f);break;case 19:te(yr);break;case 10:Ys(f.type);break;case 22:case 23:Ws(f),my(),d!==null&&te(Jo);break;case 24:Ys(br)}}function Ou(d,f){try{var g=f.updateQueue,v=g!==null?g.lastEffect:null;if(v!==null){var D=v.next;g=D;do{if((g.tag&d)===d){v=void 0;var M=g.create,I=g.inst;v=M(),I.destroy=v}g=g.next}while(g!==D)}}catch($){Ot(f,f.return,$)}}function Hi(d,f,g){try{var v=f.updateQueue,D=v!==null?v.lastEffect:null;if(D!==null){var M=D.next;v=M;do{if((v.tag&d)===d){var I=v.inst,$=I.destroy;if($!==void 0){I.destroy=void 0,D=f;var q=g,ie=$;try{ie()}catch(fe){Ot(D,q,fe)}}}v=v.next}while(v!==M)}}catch(fe){Ot(f,f.return,fe)}}function kC(d){var f=d.updateQueue;if(f!==null){var g=d.stateNode;try{pA(f,g)}catch(v){Ot(d,d.return,v)}}}function DC(d,f,g){g.props=tl(d.type,d.memoizedProps),g.state=d.memoizedState;try{g.componentWillUnmount()}catch(v){Ot(d,f,v)}}function Pu(d,f){try{var g=d.ref;if(g!==null){switch(d.tag){case 26:case 27:case 5:var v=d.stateNode;break;case 30:v=d.stateNode;break;default:v=d.stateNode}typeof g=="function"?d.refCleanup=g(v):g.current=v}}catch(D){Ot(d,f,D)}}function fs(d,f){var g=d.ref,v=d.refCleanup;if(g!==null)if(typeof v=="function")try{v()}catch(D){Ot(d,f,D)}finally{d.refCleanup=null,d=d.alternate,d!=null&&(d.refCleanup=null)}else if(typeof g=="function")try{g(null)}catch(D){Ot(d,f,D)}else g.current=null}function TC(d){var f=d.type,g=d.memoizedProps,v=d.stateNode;try{e:switch(f){case"button":case"input":case"select":case"textarea":g.autoFocus&&v.focus();break e;case"img":g.src?v.src=g.src:g.srcSet&&(v.srcset=g.srcSet)}}catch(D){Ot(d,d.return,D)}}function Yy(d,f,g){try{var v=d.stateNode;CF(v,d.type,g,f),v[Er]=f}catch(D){Ot(d,d.return,D)}}function MC(d){return d.tag===5||d.tag===3||d.tag===26||d.tag===27&&Gi(d.type)||d.tag===4}function Uy(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||MC(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.tag===27&&Gi(d.type)||d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function Wy(d,f,g){var v=d.tag;if(v===5||v===6)d=d.stateNode,f?(g.nodeType===9?g.body:g.nodeName==="HTML"?g.ownerDocument.body:g).insertBefore(d,f):(f=g.nodeType===9?g.body:g.nodeName==="HTML"?g.ownerDocument.body:g,f.appendChild(d),g=g._reactRootContainer,g!=null||f.onclick!==null||(f.onclick=ym));else if(v!==4&&(v===27&&Gi(d.type)&&(g=d.stateNode,f=null),d=d.child,d!==null))for(Wy(d,f,g),d=d.sibling;d!==null;)Wy(d,f,g),d=d.sibling}function lm(d,f,g){var v=d.tag;if(v===5||v===6)d=d.stateNode,f?g.insertBefore(d,f):g.appendChild(d);else if(v!==4&&(v===27&&Gi(d.type)&&(g=d.stateNode),d=d.child,d!==null))for(lm(d,f,g),d=d.sibling;d!==null;)lm(d,f,g),d=d.sibling}function EC(d){var f=d.stateNode,g=d.memoizedProps;try{for(var v=d.type,D=f.attributes;D.length;)f.removeAttributeNode(D[0]);Yr(f,v,g),f[ur]=d,f[Er]=g}catch(M){Ot(d,d.return,M)}}var qs=!1,lr=!1,Xy=!1,OC=typeof WeakSet=="function"?WeakSet:Set,Pr=null;function iF(d,f){if(d=d.containerInfo,gv=Cm,d=Y3(d),Ub(d)){if("selectionStart"in d)var g={start:d.selectionStart,end:d.selectionEnd};else e:{g=(g=d.ownerDocument)&&g.defaultView||window;var v=g.getSelection&&g.getSelection();if(v&&v.rangeCount!==0){g=v.anchorNode;var D=v.anchorOffset,M=v.focusNode;v=v.focusOffset;try{g.nodeType,M.nodeType}catch{g=null;break e}var I=0,$=-1,q=-1,ie=0,fe=0,xe=d,oe=null;t:for(;;){for(var le;xe!==g||D!==0&&xe.nodeType!==3||($=I+D),xe!==M||v!==0&&xe.nodeType!==3||(q=I+v),xe.nodeType===3&&(I+=xe.nodeValue.length),(le=xe.firstChild)!==null;)oe=xe,xe=le;for(;;){if(xe===d)break t;if(oe===g&&++ie===D&&($=I),oe===M&&++fe===v&&(q=I),(le=xe.nextSibling)!==null)break;xe=oe,oe=xe.parentNode}xe=le}g=$===-1||q===-1?null:{start:$,end:q}}else g=null}g=g||{start:0,end:0}}else g=null;for(xv={focusedElem:d,selectionRange:g},Cm=!1,Pr=f;Pr!==null;)if(f=Pr,d=f.child,(f.subtreeFlags&1024)!==0&&d!==null)d.return=f,Pr=d;else for(;Pr!==null;){switch(f=Pr,M=f.alternate,d=f.flags,f.tag){case 0:break;case 11:case 15:break;case 1:if((d&1024)!==0&&M!==null){d=void 0,g=f,D=M.memoizedProps,M=M.memoizedState,v=g.stateNode;try{var $e=tl(g.type,D,g.elementType===g.type);d=v.getSnapshotBeforeUpdate($e,M),v.__reactInternalSnapshotBeforeUpdate=d}catch(Fe){Ot(g,g.return,Fe)}}break;case 3:if((d&1024)!==0){if(d=f.stateNode.containerInfo,g=d.nodeType,g===9)vv(d);else if(g===1)switch(d.nodeName){case"HEAD":case"HTML":case"BODY":vv(d);break;default:d.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((d&1024)!==0)throw Error(n(163))}if(d=f.sibling,d!==null){d.return=f.return,Pr=d;break}Pr=f.return}}function PC(d,f,g){var v=g.flags;switch(g.tag){case 0:case 11:case 15:$i(d,g),v&4&&Ou(5,g);break;case 1:if($i(d,g),v&4)if(d=g.stateNode,f===null)try{d.componentDidMount()}catch(I){Ot(g,g.return,I)}else{var D=tl(g.type,f.memoizedProps);f=f.memoizedState;try{d.componentDidUpdate(D,f,d.__reactInternalSnapshotBeforeUpdate)}catch(I){Ot(g,g.return,I)}}v&64&&kC(g),v&512&&Pu(g,g.return);break;case 3:if($i(d,g),v&64&&(d=g.updateQueue,d!==null)){if(f=null,g.child!==null)switch(g.child.tag){case 27:case 5:f=g.child.stateNode;break;case 1:f=g.child.stateNode}try{pA(d,f)}catch(I){Ot(g,g.return,I)}}break;case 27:f===null&&v&4&&EC(g);case 26:case 5:$i(d,g),f===null&&v&4&&TC(g),v&512&&Pu(g,g.return);break;case 12:$i(d,g);break;case 13:$i(d,g),v&4&&LC(d,g),v&64&&(d=g.memoizedState,d!==null&&(d=d.dehydrated,d!==null&&(g=mF.bind(null,g),PF(d,g))));break;case 22:if(v=g.memoizedState!==null||qs,!v){f=f!==null&&f.memoizedState!==null||lr,D=qs;var M=lr;qs=v,(lr=f)&&!M?Yi(d,g,(g.subtreeFlags&8772)!==0):$i(d,g),qs=D,lr=M}break;case 30:break;default:$i(d,g)}}function _C(d){var f=d.alternate;f!==null&&(d.alternate=null,_C(f)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(f=d.stateNode,f!==null&&nu(f)),d.stateNode=null,d.return=null,d.dependencies=null,d.memoizedProps=null,d.memoizedState=null,d.pendingProps=null,d.stateNode=null,d.updateQueue=null}var Wt=null,Sn=!1;function Gs(d,f,g){for(g=g.child;g!==null;)RC(d,f,g),g=g.sibling}function RC(d,f,g){if(dn&&typeof dn.onCommitFiberUnmount=="function")try{dn.onCommitFiberUnmount(Ro,g)}catch{}switch(g.tag){case 26:lr||fs(g,f),Gs(d,f,g),g.memoizedState?g.memoizedState.count--:g.stateNode&&(g=g.stateNode,g.parentNode.removeChild(g));break;case 27:lr||fs(g,f);var v=Wt,D=Sn;Gi(g.type)&&(Wt=g.stateNode,Sn=!1),Gs(d,f,g),$u(g.stateNode),Wt=v,Sn=D;break;case 5:lr||fs(g,f);case 6:if(v=Wt,D=Sn,Wt=null,Gs(d,f,g),Wt=v,Sn=D,Wt!==null)if(Sn)try{(Wt.nodeType===9?Wt.body:Wt.nodeName==="HTML"?Wt.ownerDocument.body:Wt).removeChild(g.stateNode)}catch(M){Ot(g,f,M)}else try{Wt.removeChild(g.stateNode)}catch(M){Ot(g,f,M)}break;case 18:Wt!==null&&(Sn?(d=Wt,Nk(d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d,g.stateNode),Ku(d)):Nk(Wt,g.stateNode));break;case 4:v=Wt,D=Sn,Wt=g.stateNode.containerInfo,Sn=!0,Gs(d,f,g),Wt=v,Sn=D;break;case 0:case 11:case 14:case 15:lr||Hi(2,g,f),lr||Hi(4,g,f),Gs(d,f,g);break;case 1:lr||(fs(g,f),v=g.stateNode,typeof v.componentWillUnmount=="function"&&DC(g,f,v)),Gs(d,f,g);break;case 21:Gs(d,f,g);break;case 22:lr=(v=lr)||g.memoizedState!==null,Gs(d,f,g),lr=v;break;default:Gs(d,f,g)}}function LC(d,f){if(f.memoizedState===null&&(d=f.alternate,d!==null&&(d=d.memoizedState,d!==null&&(d=d.dehydrated,d!==null))))try{Ku(d)}catch(g){Ot(f,f.return,g)}}function oF(d){switch(d.tag){case 13:case 19:var f=d.stateNode;return f===null&&(f=d.stateNode=new OC),f;case 22:return d=d.stateNode,f=d._retryCache,f===null&&(f=d._retryCache=new OC),f;default:throw Error(n(435,d.tag))}}function Vy(d,f){var g=oF(d);f.forEach(function(v){var D=gF.bind(null,d,v);g.has(v)||(g.add(v),v.then(D,D))})}function Wn(d,f){var g=f.deletions;if(g!==null)for(var v=0;v<g.length;v++){var D=g[v],M=d,I=f,$=I;e:for(;$!==null;){switch($.tag){case 27:if(Gi($.type)){Wt=$.stateNode,Sn=!1;break e}break;case 5:Wt=$.stateNode,Sn=!1;break e;case 3:case 4:Wt=$.stateNode.containerInfo,Sn=!0;break e}$=$.return}if(Wt===null)throw Error(n(160));RC(M,I,D),Wt=null,Sn=!1,M=D.alternate,M!==null&&(M.return=null),D.return=null}if(f.subtreeFlags&13878)for(f=f.child;f!==null;)zC(f,d),f=f.sibling}var Va=null;function zC(d,f){var g=d.alternate,v=d.flags;switch(d.tag){case 0:case 11:case 14:case 15:Wn(f,d),Xn(d),v&4&&(Hi(3,d,d.return),Ou(3,d),Hi(5,d,d.return));break;case 1:Wn(f,d),Xn(d),v&512&&(lr||g===null||fs(g,g.return)),v&64&&qs&&(d=d.updateQueue,d!==null&&(v=d.callbacks,v!==null&&(g=d.shared.hiddenCallbacks,d.shared.hiddenCallbacks=g===null?v:g.concat(v))));break;case 26:var D=Va;if(Wn(f,d),Xn(d),v&512&&(lr||g===null||fs(g,g.return)),v&4){var M=g!==null?g.memoizedState:null;if(v=d.memoizedState,g===null)if(v===null)if(d.stateNode===null){e:{v=d.type,g=d.memoizedProps,D=D.ownerDocument||D;t:switch(v){case"title":M=D.getElementsByTagName("title")[0],(!M||M[Ho]||M[ur]||M.namespaceURI==="http://www.w3.org/2000/svg"||M.hasAttribute("itemprop"))&&(M=D.createElement(v),D.head.insertBefore(M,D.querySelector("head > title"))),Yr(M,v,g),M[ur]=d,Qt(M),v=M;break e;case"link":var I=Ek("link","href",D).get(v+(g.href||""));if(I){for(var $=0;$<I.length;$++)if(M=I[$],M.getAttribute("href")===(g.href==null||g.href===""?null:g.href)&&M.getAttribute("rel")===(g.rel==null?null:g.rel)&&M.getAttribute("title")===(g.title==null?null:g.title)&&M.getAttribute("crossorigin")===(g.crossOrigin==null?null:g.crossOrigin)){I.splice($,1);break t}}M=D.createElement(v),Yr(M,v,g),D.head.appendChild(M);break;case"meta":if(I=Ek("meta","content",D).get(v+(g.content||""))){for($=0;$<I.length;$++)if(M=I[$],M.getAttribute("content")===(g.content==null?null:""+g.content)&&M.getAttribute("name")===(g.name==null?null:g.name)&&M.getAttribute("property")===(g.property==null?null:g.property)&&M.getAttribute("http-equiv")===(g.httpEquiv==null?null:g.httpEquiv)&&M.getAttribute("charset")===(g.charSet==null?null:g.charSet)){I.splice($,1);break t}}M=D.createElement(v),Yr(M,v,g),D.head.appendChild(M);break;default:throw Error(n(468,v))}M[ur]=d,Qt(M),v=M}d.stateNode=v}else Ok(D,d.type,d.stateNode);else d.stateNode=Mk(D,v,d.memoizedProps);else M!==v?(M===null?g.stateNode!==null&&(g=g.stateNode,g.parentNode.removeChild(g)):M.count--,v===null?Ok(D,d.type,d.stateNode):Mk(D,v,d.memoizedProps)):v===null&&d.stateNode!==null&&Yy(d,d.memoizedProps,g.memoizedProps)}break;case 27:Wn(f,d),Xn(d),v&512&&(lr||g===null||fs(g,g.return)),g!==null&&v&4&&Yy(d,d.memoizedProps,g.memoizedProps);break;case 5:if(Wn(f,d),Xn(d),v&512&&(lr||g===null||fs(g,g.return)),d.flags&32){D=d.stateNode;try{uc(D,"")}catch(le){Ot(d,d.return,le)}}v&4&&d.stateNode!=null&&(D=d.memoizedProps,Yy(d,D,g!==null?g.memoizedProps:D)),v&1024&&(Xy=!0);break;case 6:if(Wn(f,d),Xn(d),v&4){if(d.stateNode===null)throw Error(n(162));v=d.memoizedProps,g=d.stateNode;try{g.nodeValue=v}catch(le){Ot(d,d.return,le)}}break;case 3:if(Nm=null,D=Va,Va=wm(f.containerInfo),Wn(f,d),Va=D,Xn(d),v&4&&g!==null&&g.memoizedState.isDehydrated)try{Ku(f.containerInfo)}catch(le){Ot(d,d.return,le)}Xy&&(Xy=!1,IC(d));break;case 4:v=Va,Va=wm(d.stateNode.containerInfo),Wn(f,d),Xn(d),Va=v;break;case 12:Wn(f,d),Xn(d);break;case 13:Wn(f,d),Xn(d),d.child.flags&8192&&d.memoizedState!==null!=(g!==null&&g.memoizedState!==null)&&(Jy=xt()),v&4&&(v=d.updateQueue,v!==null&&(d.updateQueue=null,Vy(d,v)));break;case 22:D=d.memoizedState!==null;var q=g!==null&&g.memoizedState!==null,ie=qs,fe=lr;if(qs=ie||D,lr=fe||q,Wn(f,d),lr=fe,qs=ie,Xn(d),v&8192)e:for(f=d.stateNode,f._visibility=D?f._visibility&-2:f._visibility|1,D&&(g===null||q||qs||lr||rl(d)),g=null,f=d;;){if(f.tag===5||f.tag===26){if(g===null){q=g=f;try{if(M=q.stateNode,D)I=M.style,typeof I.setProperty=="function"?I.setProperty("display","none","important"):I.display="none";else{$=q.stateNode;var xe=q.memoizedProps.style,oe=xe!=null&&xe.hasOwnProperty("display")?xe.display:null;$.style.display=oe==null||typeof oe=="boolean"?"":(""+oe).trim()}}catch(le){Ot(q,q.return,le)}}}else if(f.tag===6){if(g===null){q=f;try{q.stateNode.nodeValue=D?"":q.memoizedProps}catch(le){Ot(q,q.return,le)}}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===d)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===d)break e;for(;f.sibling===null;){if(f.return===null||f.return===d)break e;g===f&&(g=null),f=f.return}g===f&&(g=null),f.sibling.return=f.return,f=f.sibling}v&4&&(v=d.updateQueue,v!==null&&(g=v.retryQueue,g!==null&&(v.retryQueue=null,Vy(d,g))));break;case 19:Wn(f,d),Xn(d),v&4&&(v=d.updateQueue,v!==null&&(d.updateQueue=null,Vy(d,v)));break;case 30:break;case 21:break;default:Wn(f,d),Xn(d)}}function Xn(d){var f=d.flags;if(f&2){try{for(var g,v=d.return;v!==null;){if(MC(v)){g=v;break}v=v.return}if(g==null)throw Error(n(160));switch(g.tag){case 27:var D=g.stateNode,M=Uy(d);lm(d,M,D);break;case 5:var I=g.stateNode;g.flags&32&&(uc(I,""),g.flags&=-33);var $=Uy(d);lm(d,$,I);break;case 3:case 4:var q=g.stateNode.containerInfo,ie=Uy(d);Wy(d,ie,q);break;default:throw Error(n(161))}}catch(fe){Ot(d,d.return,fe)}d.flags&=-3}f&4096&&(d.flags&=-4097)}function IC(d){if(d.subtreeFlags&1024)for(d=d.child;d!==null;){var f=d;IC(f),f.tag===5&&f.flags&1024&&f.stateNode.reset(),d=d.sibling}}function $i(d,f){if(f.subtreeFlags&8772)for(f=f.child;f!==null;)PC(d,f.alternate,f),f=f.sibling}function rl(d){for(d=d.child;d!==null;){var f=d;switch(f.tag){case 0:case 11:case 14:case 15:Hi(4,f,f.return),rl(f);break;case 1:fs(f,f.return);var g=f.stateNode;typeof g.componentWillUnmount=="function"&&DC(f,f.return,g),rl(f);break;case 27:$u(f.stateNode);case 26:case 5:fs(f,f.return),rl(f);break;case 22:f.memoizedState===null&&rl(f);break;case 30:rl(f);break;default:rl(f)}d=d.sibling}}function Yi(d,f,g){for(g=g&&(f.subtreeFlags&8772)!==0,f=f.child;f!==null;){var v=f.alternate,D=d,M=f,I=M.flags;switch(M.tag){case 0:case 11:case 15:Yi(D,M,g),Ou(4,M);break;case 1:if(Yi(D,M,g),v=M,D=v.stateNode,typeof D.componentDidMount=="function")try{D.componentDidMount()}catch(ie){Ot(v,v.return,ie)}if(v=M,D=v.updateQueue,D!==null){var $=v.stateNode;try{var q=D.shared.hiddenCallbacks;if(q!==null)for(D.shared.hiddenCallbacks=null,D=0;D<q.length;D++)fA(q[D],$)}catch(ie){Ot(v,v.return,ie)}}g&&I&64&&kC(M),Pu(M,M.return);break;case 27:EC(M);case 26:case 5:Yi(D,M,g),g&&v===null&&I&4&&TC(M),Pu(M,M.return);break;case 12:Yi(D,M,g);break;case 13:Yi(D,M,g),g&&I&4&&LC(D,M);break;case 22:M.memoizedState===null&&Yi(D,M,g),Pu(M,M.return);break;case 30:break;default:Yi(D,M,g)}f=f.sibling}}function qy(d,f){var g=null;d!==null&&d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(g=d.memoizedState.cachePool.pool),d=null,f.memoizedState!==null&&f.memoizedState.cachePool!==null&&(d=f.memoizedState.cachePool.pool),d!==g&&(d!=null&&d.refCount++,g!=null&&bu(g))}function Gy(d,f){d=null,f.alternate!==null&&(d=f.alternate.memoizedState.cache),f=f.memoizedState.cache,f!==d&&(f.refCount++,d!=null&&bu(d))}function ps(d,f,g,v){if(f.subtreeFlags&10256)for(f=f.child;f!==null;)BC(d,f,g,v),f=f.sibling}function BC(d,f,g,v){var D=f.flags;switch(f.tag){case 0:case 11:case 15:ps(d,f,g,v),D&2048&&Ou(9,f);break;case 1:ps(d,f,g,v);break;case 3:ps(d,f,g,v),D&2048&&(d=null,f.alternate!==null&&(d=f.alternate.memoizedState.cache),f=f.memoizedState.cache,f!==d&&(f.refCount++,d!=null&&bu(d)));break;case 12:if(D&2048){ps(d,f,g,v),d=f.stateNode;try{var M=f.memoizedProps,I=M.id,$=M.onPostCommit;typeof $=="function"&&$(I,f.alternate===null?"mount":"update",d.passiveEffectDuration,-0)}catch(q){Ot(f,f.return,q)}}else ps(d,f,g,v);break;case 13:ps(d,f,g,v);break;case 23:break;case 22:M=f.stateNode,I=f.alternate,f.memoizedState!==null?M._visibility&2?ps(d,f,g,v):_u(d,f):M._visibility&2?ps(d,f,g,v):(M._visibility|=2,Mc(d,f,g,v,(f.subtreeFlags&10256)!==0)),D&2048&&qy(I,f);break;case 24:ps(d,f,g,v),D&2048&&Gy(f.alternate,f);break;default:ps(d,f,g,v)}}function Mc(d,f,g,v,D){for(D=D&&(f.subtreeFlags&10256)!==0,f=f.child;f!==null;){var M=d,I=f,$=g,q=v,ie=I.flags;switch(I.tag){case 0:case 11:case 15:Mc(M,I,$,q,D),Ou(8,I);break;case 23:break;case 22:var fe=I.stateNode;I.memoizedState!==null?fe._visibility&2?Mc(M,I,$,q,D):_u(M,I):(fe._visibility|=2,Mc(M,I,$,q,D)),D&&ie&2048&&qy(I.alternate,I);break;case 24:Mc(M,I,$,q,D),D&&ie&2048&&Gy(I.alternate,I);break;default:Mc(M,I,$,q,D)}f=f.sibling}}function _u(d,f){if(f.subtreeFlags&10256)for(f=f.child;f!==null;){var g=d,v=f,D=v.flags;switch(v.tag){case 22:_u(g,v),D&2048&&qy(v.alternate,v);break;case 24:_u(g,v),D&2048&&Gy(v.alternate,v);break;default:_u(g,v)}f=f.sibling}}var Ru=8192;function Ec(d){if(d.subtreeFlags&Ru)for(d=d.child;d!==null;)FC(d),d=d.sibling}function FC(d){switch(d.tag){case 26:Ec(d),d.flags&Ru&&d.memoizedState!==null&&XF(Va,d.memoizedState,d.memoizedProps);break;case 5:Ec(d);break;case 3:case 4:var f=Va;Va=wm(d.stateNode.containerInfo),Ec(d),Va=f;break;case 22:d.memoizedState===null&&(f=d.alternate,f!==null&&f.memoizedState!==null?(f=Ru,Ru=16777216,Ec(d),Ru=f):Ec(d));break;default:Ec(d)}}function HC(d){var f=d.alternate;if(f!==null&&(d=f.child,d!==null)){f.child=null;do f=d.sibling,d.sibling=null,d=f;while(d!==null)}}function Lu(d){var f=d.deletions;if((d.flags&16)!==0){if(f!==null)for(var g=0;g<f.length;g++){var v=f[g];Pr=v,YC(v,d)}HC(d)}if(d.subtreeFlags&10256)for(d=d.child;d!==null;)$C(d),d=d.sibling}function $C(d){switch(d.tag){case 0:case 11:case 15:Lu(d),d.flags&2048&&Hi(9,d,d.return);break;case 3:Lu(d);break;case 12:Lu(d);break;case 22:var f=d.stateNode;d.memoizedState!==null&&f._visibility&2&&(d.return===null||d.return.tag!==13)?(f._visibility&=-3,cm(d)):Lu(d);break;default:Lu(d)}}function cm(d){var f=d.deletions;if((d.flags&16)!==0){if(f!==null)for(var g=0;g<f.length;g++){var v=f[g];Pr=v,YC(v,d)}HC(d)}for(d=d.child;d!==null;){switch(f=d,f.tag){case 0:case 11:case 15:Hi(8,f,f.return),cm(f);break;case 22:g=f.stateNode,g._visibility&2&&(g._visibility&=-3,cm(f));break;default:cm(f)}d=d.sibling}}function YC(d,f){for(;Pr!==null;){var g=Pr;switch(g.tag){case 0:case 11:case 15:Hi(8,g,f);break;case 23:case 22:if(g.memoizedState!==null&&g.memoizedState.cachePool!==null){var v=g.memoizedState.cachePool.pool;v!=null&&v.refCount++}break;case 24:bu(g.memoizedState.cache)}if(v=g.child,v!==null)v.return=g,Pr=v;else e:for(g=d;Pr!==null;){v=Pr;var D=v.sibling,M=v.return;if(_C(v),v===g){Pr=null;break e}if(D!==null){D.return=M,Pr=D;break e}Pr=M}}}var lF={getCacheForType:function(d){var f=rn(br),g=f.data.get(d);return g===void 0&&(g=d(),f.data.set(d,g)),g}},cF=typeof WeakMap=="function"?WeakMap:Map,wt=0,zt=null,tt=null,at=0,jt=0,Vn=null,Ui=!1,Oc=!1,Ky=!1,Ks=0,er=0,Wi=0,nl=0,Zy=0,ja=0,Pc=0,zu=null,An=null,Qy=!1,Jy=0,dm=1/0,um=null,Xi=null,$r=0,Vi=null,_c=null,Rc=0,ev=0,tv=null,UC=null,Iu=0,rv=null;function qn(){if((wt&2)!==0&&at!==0)return at&-at;if(H.T!==null){var d=jc;return d!==0?d:cv()}return Np()}function WC(){ja===0&&(ja=(at&536870912)===0||ht?Bo():536870912);var d=wa.current;return d!==null&&(d.flags|=32),ja}function Gn(d,f,g){(d===zt&&(jt===2||jt===9)||d.cancelPendingCommit!==null)&&(Lc(d,0),qi(d,at,ja,!1)),Ls(d,g),((wt&2)===0||d!==zt)&&(d===zt&&((wt&2)===0&&(nl|=g),er===4&&qi(d,at,ja,!1)),ms(d))}function XC(d,f,g){if((wt&6)!==0)throw Error(n(327));var v=!g&&(f&124)===0&&(f&d.expiredLanes)===0||Io(d,f),D=v?hF(d,f):sv(d,f,!0),M=v;do{if(D===0){Oc&&!v&&qi(d,f,0,!1);break}else{if(g=d.current.alternate,M&&!dF(g)){D=sv(d,f,!1),M=!1;continue}if(D===2){if(M=f,d.errorRecoveryDisabledLanes&M)var I=0;else I=d.pendingLanes&-536870913,I=I!==0?I:I&536870912?536870912:0;if(I!==0){f=I;e:{var $=d;D=zu;var q=$.current.memoizedState.isDehydrated;if(q&&(Lc($,I).flags|=256),I=sv($,I,!1),I!==2){if(Ky&&!q){$.errorRecoveryDisabledLanes|=M,nl|=M,D=4;break e}M=An,An=D,M!==null&&(An===null?An=M:An.push.apply(An,M))}D=I}if(M=!1,D!==2)continue}}if(D===1){Lc(d,0),qi(d,f,0,!0);break}e:{switch(v=d,M=D,M){case 0:case 1:throw Error(n(345));case 4:if((f&4194048)!==f)break;case 6:qi(v,f,ja,!Ui);break e;case 2:An=null;break;case 3:case 5:break;default:throw Error(n(329))}if((f&62914560)===f&&(D=Jy+300-xt(),10<D)){if(qi(v,f,ja,!Ui),en(v,0,!0)!==0)break e;v.timeoutHandle=wk(VC.bind(null,v,g,An,um,Qy,f,ja,nl,Pc,Ui,M,2,-0,0),D);break e}VC(v,g,An,um,Qy,f,ja,nl,Pc,Ui,M,0,-0,0)}}break}while(!0);ms(d)}function VC(d,f,g,v,D,M,I,$,q,ie,fe,xe,oe,le){if(d.timeoutHandle=-1,xe=f.subtreeFlags,(xe&8192||(xe&16785408)===16785408)&&(Wu={stylesheets:null,count:0,unsuspend:WF},FC(f),xe=VF(),xe!==null)){d.cancelPendingCommit=xe(ek.bind(null,d,f,M,g,v,D,I,$,q,fe,1,oe,le)),qi(d,M,I,!ie);return}ek(d,f,M,g,v,D,I,$,q)}function dF(d){for(var f=d;;){var g=f.tag;if((g===0||g===11||g===15)&&f.flags&16384&&(g=f.updateQueue,g!==null&&(g=g.stores,g!==null)))for(var v=0;v<g.length;v++){var D=g[v],M=D.getSnapshot;D=D.value;try{if(!Yn(M(),D))return!1}catch{return!1}}if(g=f.child,f.subtreeFlags&16384&&g!==null)g.return=f,f=g;else{if(f===d)break;for(;f.sibling===null;){if(f.return===null||f.return===d)return!0;f=f.return}f.sibling.return=f.return,f=f.sibling}}return!0}function qi(d,f,g,v){f&=~Zy,f&=~nl,d.suspendedLanes|=f,d.pingedLanes&=~f,v&&(d.warmLanes|=f),v=d.expirationTimes;for(var D=f;0<D;){var M=31-Mr(D),I=1<<M;v[M]=-1,D&=~I}g!==0&&wp(d,g,f)}function hm(){return(wt&6)===0?(Bu(0),!1):!0}function nv(){if(tt!==null){if(jt===0)var d=tt.return;else d=tt,$s=Zo=null,vy(d),Dc=null,Tu=0,d=tt;for(;d!==null;)CC(d.alternate,d),d=d.return;tt=null}}function Lc(d,f){var g=d.timeoutHandle;g!==-1&&(d.timeoutHandle=-1,DF(g)),g=d.cancelPendingCommit,g!==null&&(d.cancelPendingCommit=null,g()),nv(),zt=d,tt=g=Bs(d.current,null),at=f,jt=0,Vn=null,Ui=!1,Oc=Io(d,f),Ky=!1,Pc=ja=Zy=nl=Wi=er=0,An=zu=null,Qy=!1,(f&8)!==0&&(f|=f&32);var v=d.entangledLanes;if(v!==0)for(d=d.entanglements,v&=f;0<v;){var D=31-Mr(v),M=1<<D;f|=d[D],v&=~M}return Ks=f,_p(),g}function qC(d,f){Je=null,H.H=Jp,f===vu||f===Yp?(f=uA(),jt=3):f===lA?(f=uA(),jt=4):jt=f===hC?8:f!==null&&typeof f=="object"&&typeof f.then=="function"?6:1,Vn=f,tt===null&&(er=1,am(d,xa(f,d.current)))}function GC(){var d=H.H;return H.H=Jp,d===null?Jp:d}function KC(){var d=H.A;return H.A=lF,d}function av(){er=4,Ui||(at&4194048)!==at&&wa.current!==null||(Oc=!0),(Wi&134217727)===0&&(nl&134217727)===0||zt===null||qi(zt,at,ja,!1)}function sv(d,f,g){var v=wt;wt|=2;var D=GC(),M=KC();(zt!==d||at!==f)&&(um=null,Lc(d,f)),f=!1;var I=er;e:do try{if(jt!==0&&tt!==null){var $=tt,q=Vn;switch(jt){case 8:nv(),I=6;break e;case 3:case 2:case 9:case 6:wa.current===null&&(f=!0);var ie=jt;if(jt=0,Vn=null,zc(d,$,q,ie),g&&Oc){I=0;break e}break;default:ie=jt,jt=0,Vn=null,zc(d,$,q,ie)}}uF(),I=er;break}catch(fe){qC(d,fe)}while(!0);return f&&d.shellSuspendCounter++,$s=Zo=null,wt=v,H.H=D,H.A=M,tt===null&&(zt=null,at=0,_p()),I}function uF(){for(;tt!==null;)ZC(tt)}function hF(d,f){var g=wt;wt|=2;var v=GC(),D=KC();zt!==d||at!==f?(um=null,dm=xt()+500,Lc(d,f)):Oc=Io(d,f);e:do try{if(jt!==0&&tt!==null){f=tt;var M=Vn;t:switch(jt){case 1:jt=0,Vn=null,zc(d,f,M,1);break;case 2:case 9:if(cA(M)){jt=0,Vn=null,QC(f);break}f=function(){jt!==2&&jt!==9||zt!==d||(jt=7),ms(d)},M.then(f,f);break e;case 3:jt=7;break e;case 4:jt=5;break e;case 7:cA(M)?(jt=0,Vn=null,QC(f)):(jt=0,Vn=null,zc(d,f,M,7));break;case 5:var I=null;switch(tt.tag){case 26:I=tt.memoizedState;case 5:case 27:var $=tt;if(!I||Pk(I)){jt=0,Vn=null;var q=$.sibling;if(q!==null)tt=q;else{var ie=$.return;ie!==null?(tt=ie,fm(ie)):tt=null}break t}}jt=0,Vn=null,zc(d,f,M,5);break;case 6:jt=0,Vn=null,zc(d,f,M,6);break;case 8:nv(),er=6;break e;default:throw Error(n(462))}}fF();break}catch(fe){qC(d,fe)}while(!0);return $s=Zo=null,H.H=v,H.A=D,wt=g,tt!==null?0:(zt=null,at=0,_p(),er)}function fF(){for(;tt!==null&&!gt();)ZC(tt)}function ZC(d){var f=SC(d.alternate,d,Ks);d.memoizedProps=d.pendingProps,f===null?fm(d):tt=f}function QC(d){var f=d,g=f.alternate;switch(f.tag){case 15:case 0:f=bC(g,f,f.pendingProps,f.type,void 0,at);break;case 11:f=bC(g,f,f.pendingProps,f.type.render,f.ref,at);break;case 5:vy(f);default:CC(g,f),f=tt=J3(f,Ks),f=SC(g,f,Ks)}d.memoizedProps=d.pendingProps,f===null?fm(d):tt=f}function zc(d,f,g,v){$s=Zo=null,vy(f),Dc=null,Tu=0;var D=f.return;try{if(rF(d,D,f,g,at)){er=1,am(d,xa(g,d.current)),tt=null;return}}catch(M){if(D!==null)throw tt=D,M;er=1,am(d,xa(g,d.current)),tt=null;return}f.flags&32768?(ht||v===1?d=!0:Oc||(at&536870912)!==0?d=!1:(Ui=d=!0,(v===2||v===9||v===3||v===6)&&(v=wa.current,v!==null&&v.tag===13&&(v.flags|=16384))),JC(f,d)):fm(f)}function fm(d){var f=d;do{if((f.flags&32768)!==0){JC(f,Ui);return}d=f.return;var g=aF(f.alternate,f,Ks);if(g!==null){tt=g;return}if(f=f.sibling,f!==null){tt=f;return}tt=f=d}while(f!==null);er===0&&(er=5)}function JC(d,f){do{var g=sF(d.alternate,d);if(g!==null){g.flags&=32767,tt=g;return}if(g=d.return,g!==null&&(g.flags|=32768,g.subtreeFlags=0,g.deletions=null),!f&&(d=d.sibling,d!==null)){tt=d;return}tt=d=g}while(d!==null);er=6,tt=null}function ek(d,f,g,v,D,M,I,$,q){d.cancelPendingCommit=null;do pm();while($r!==0);if((wt&6)!==0)throw Error(n(327));if(f!==null){if(f===d.current)throw Error(n(177));if(M=f.lanes|f.childLanes,M|=Gb,vp(d,g,M,I,$,q),d===zt&&(tt=zt=null,at=0),_c=f,Vi=d,Rc=g,ev=M,tv=D,UC=v,(f.subtreeFlags&10256)!==0||(f.flags&10256)!==0?(d.callbackNode=null,d.callbackPriority=0,xF(Hn,function(){return sk(),null})):(d.callbackNode=null,d.callbackPriority=0),v=(f.flags&13878)!==0,(f.subtreeFlags&13878)!==0||v){v=H.T,H.T=null,D=W.p,W.p=2,I=wt,wt|=4;try{iF(d,f,g)}finally{wt=I,W.p=D,H.T=v}}$r=1,tk(),rk(),nk()}}function tk(){if($r===1){$r=0;var d=Vi,f=_c,g=(f.flags&13878)!==0;if((f.subtreeFlags&13878)!==0||g){g=H.T,H.T=null;var v=W.p;W.p=2;var D=wt;wt|=4;try{zC(f,d);var M=xv,I=Y3(d.containerInfo),$=M.focusedElem,q=M.selectionRange;if(I!==$&&$&&$.ownerDocument&&$3($.ownerDocument.documentElement,$)){if(q!==null&&Ub($)){var ie=q.start,fe=q.end;if(fe===void 0&&(fe=ie),"selectionStart"in $)$.selectionStart=ie,$.selectionEnd=Math.min(fe,$.value.length);else{var xe=$.ownerDocument||document,oe=xe&&xe.defaultView||window;if(oe.getSelection){var le=oe.getSelection(),$e=$.textContent.length,Fe=Math.min(q.start,$e),Dt=q.end===void 0?Fe:Math.min(q.end,$e);!le.extend&&Fe>Dt&&(I=Dt,Dt=Fe,Fe=I);var ne=H3($,Fe),ee=H3($,Dt);if(ne&&ee&&(le.rangeCount!==1||le.anchorNode!==ne.node||le.anchorOffset!==ne.offset||le.focusNode!==ee.node||le.focusOffset!==ee.offset)){var se=xe.createRange();se.setStart(ne.node,ne.offset),le.removeAllRanges(),Fe>Dt?(le.addRange(se),le.extend(ee.node,ee.offset)):(se.setEnd(ee.node,ee.offset),le.addRange(se))}}}}for(xe=[],le=$;le=le.parentNode;)le.nodeType===1&&xe.push({element:le,left:le.scrollLeft,top:le.scrollTop});for(typeof $.focus=="function"&&$.focus(),$=0;$<xe.length;$++){var me=xe[$];me.element.scrollLeft=me.left,me.element.scrollTop=me.top}}Cm=!!gv,xv=gv=null}finally{wt=D,W.p=v,H.T=g}}d.current=f,$r=2}}function rk(){if($r===2){$r=0;var d=Vi,f=_c,g=(f.flags&8772)!==0;if((f.subtreeFlags&8772)!==0||g){g=H.T,H.T=null;var v=W.p;W.p=2;var D=wt;wt|=4;try{PC(d,f.alternate,f)}finally{wt=D,W.p=v,H.T=g}}$r=3}}function nk(){if($r===4||$r===3){$r=0,Ut();var d=Vi,f=_c,g=Rc,v=UC;(f.subtreeFlags&10256)!==0||(f.flags&10256)!==0?$r=5:($r=0,_c=Vi=null,ak(d,d.pendingLanes));var D=d.pendingLanes;if(D===0&&(Xi=null),ru(g),f=f.stateNode,dn&&typeof dn.onCommitFiberRoot=="function")try{dn.onCommitFiberRoot(Ro,f,void 0,(f.current.flags&128)===128)}catch{}if(v!==null){f=H.T,D=W.p,W.p=2,H.T=null;try{for(var M=d.onRecoverableError,I=0;I<v.length;I++){var $=v[I];M($.value,{componentStack:$.stack})}}finally{H.T=f,W.p=D}}(Rc&3)!==0&&pm(),ms(d),D=d.pendingLanes,(g&4194090)!==0&&(D&42)!==0?d===rv?Iu++:(Iu=0,rv=d):Iu=0,Bu(0)}}function ak(d,f){(d.pooledCacheLanes&=f)===0&&(f=d.pooledCache,f!=null&&(d.pooledCache=null,bu(f)))}function pm(d){return tk(),rk(),nk(),sk()}function sk(){if($r!==5)return!1;var d=Vi,f=ev;ev=0;var g=ru(Rc),v=H.T,D=W.p;try{W.p=32>g?32:g,H.T=null,g=tv,tv=null;var M=Vi,I=Rc;if($r=0,_c=Vi=null,Rc=0,(wt&6)!==0)throw Error(n(331));var $=wt;if(wt|=4,$C(M.current),BC(M,M.current,I,g),wt=$,Bu(0,!1),dn&&typeof dn.onPostCommitFiberRoot=="function")try{dn.onPostCommitFiberRoot(Ro,M)}catch{}return!0}finally{W.p=D,H.T=v,ak(d,f)}}function ik(d,f,g){f=xa(g,f),f=_y(d.stateNode,f,2),d=zi(d,f,2),d!==null&&(Ls(d,2),ms(d))}function Ot(d,f,g){if(d.tag===3)ik(d,d,g);else for(;f!==null;){if(f.tag===3){ik(f,d,g);break}else if(f.tag===1){var v=f.stateNode;if(typeof f.type.getDerivedStateFromError=="function"||typeof v.componentDidCatch=="function"&&(Xi===null||!Xi.has(v))){d=xa(g,d),g=dC(2),v=zi(f,g,2),v!==null&&(uC(g,v,f,d),Ls(v,2),ms(v));break}}f=f.return}}function iv(d,f,g){var v=d.pingCache;if(v===null){v=d.pingCache=new cF;var D=new Set;v.set(f,D)}else D=v.get(f),D===void 0&&(D=new Set,v.set(f,D));D.has(g)||(Ky=!0,D.add(g),d=pF.bind(null,d,f,g),f.then(d,d))}function pF(d,f,g){var v=d.pingCache;v!==null&&v.delete(f),d.pingedLanes|=d.suspendedLanes&g,d.warmLanes&=~g,zt===d&&(at&g)===g&&(er===4||er===3&&(at&62914560)===at&&300>xt()-Jy?(wt&2)===0&&Lc(d,0):Zy|=g,Pc===at&&(Pc=0)),ms(d)}function ok(d,f){f===0&&(f=yp()),d=bc(d,f),d!==null&&(Ls(d,f),ms(d))}function mF(d){var f=d.memoizedState,g=0;f!==null&&(g=f.retryLane),ok(d,g)}function gF(d,f){var g=0;switch(d.tag){case 13:var v=d.stateNode,D=d.memoizedState;D!==null&&(g=D.retryLane);break;case 19:v=d.stateNode;break;case 22:v=d.stateNode._retryCache;break;default:throw Error(n(314))}v!==null&&v.delete(f),ok(d,g)}function xF(d,f){return Ye(d,f)}var mm=null,Ic=null,ov=!1,gm=!1,lv=!1,al=0;function ms(d){d!==Ic&&d.next===null&&(Ic===null?mm=Ic=d:Ic=Ic.next=d),gm=!0,ov||(ov=!0,yF())}function Bu(d,f){if(!lv&&gm){lv=!0;do for(var g=!1,v=mm;v!==null;){if(d!==0){var D=v.pendingLanes;if(D===0)var M=0;else{var I=v.suspendedLanes,$=v.pingedLanes;M=(1<<31-Mr(42|d)+1)-1,M&=D&~(I&~$),M=M&201326741?M&201326741|1:M?M|2:0}M!==0&&(g=!0,uk(v,M))}else M=at,M=en(v,v===zt?M:0,v.cancelPendingCommit!==null||v.timeoutHandle!==-1),(M&3)===0||Io(v,M)||(g=!0,uk(v,M));v=v.next}while(g);lv=!1}}function bF(){lk()}function lk(){gm=ov=!1;var d=0;al!==0&&(kF()&&(d=al),al=0);for(var f=xt(),g=null,v=mm;v!==null;){var D=v.next,M=ck(v,f);M===0?(v.next=null,g===null?mm=D:g.next=D,D===null&&(Ic=g)):(g=v,(d!==0||(M&3)!==0)&&(gm=!0)),v=D}Bu(d)}function ck(d,f){for(var g=d.suspendedLanes,v=d.pingedLanes,D=d.expirationTimes,M=d.pendingLanes&-62914561;0<M;){var I=31-Mr(M),$=1<<I,q=D[I];q===-1?(($&g)===0||($&v)!==0)&&(D[I]=jb($,f)):q<=f&&(d.expiredLanes|=$),M&=~$}if(f=zt,g=at,g=en(d,d===f?g:0,d.cancelPendingCommit!==null||d.timeoutHandle!==-1),v=d.callbackNode,g===0||d===f&&(jt===2||jt===9)||d.cancelPendingCommit!==null)return v!==null&&v!==null&&Re(v),d.callbackNode=null,d.callbackPriority=0;if((g&3)===0||Io(d,g)){if(f=g&-g,f===d.callbackPriority)return f;switch(v!==null&&Re(v),ru(g)){case 2:case 8:g=Ft;break;case 32:g=Hn;break;case 268435456:g=eu;break;default:g=Hn}return v=dk.bind(null,d),g=Ye(g,v),d.callbackPriority=f,d.callbackNode=g,f}return v!==null&&v!==null&&Re(v),d.callbackPriority=2,d.callbackNode=null,2}function dk(d,f){if($r!==0&&$r!==5)return d.callbackNode=null,d.callbackPriority=0,null;var g=d.callbackNode;if(pm()&&d.callbackNode!==g)return null;var v=at;return v=en(d,d===zt?v:0,d.cancelPendingCommit!==null||d.timeoutHandle!==-1),v===0?null:(XC(d,v,f),ck(d,xt()),d.callbackNode!=null&&d.callbackNode===g?dk.bind(null,d):null)}function uk(d,f){if(pm())return null;XC(d,f,!0)}function yF(){TF(function(){(wt&6)!==0?Ye(pa,bF):lk()})}function cv(){return al===0&&(al=Bo()),al}function hk(d){return d==null||typeof d=="symbol"||typeof d=="boolean"?null:typeof d=="function"?d:kp(""+d)}function fk(d,f){var g=f.ownerDocument.createElement("input");return g.name=f.name,g.value=f.value,d.id&&g.setAttribute("form",d.id),f.parentNode.insertBefore(g,f),d=new FormData(d),g.parentNode.removeChild(g),d}function vF(d,f,g,v,D){if(f==="submit"&&g&&g.stateNode===D){var M=hk((D[Er]||null).action),I=v.submitter;I&&(f=(f=I[Er]||null)?hk(f.formAction):I.getAttribute("formAction"),f!==null&&(M=f,I=null));var $=new Ep("action","action",null,v,D);d.push({event:$,listeners:[{instance:null,listener:function(){if(v.defaultPrevented){if(al!==0){var q=I?fk(D,I):new FormData(D);Ty(g,{pending:!0,data:q,method:D.method,action:M},null,q)}}else typeof M=="function"&&($.preventDefault(),q=I?fk(D,I):new FormData(D),Ty(g,{pending:!0,data:q,method:D.method,action:M},M,q))},currentTarget:D}]})}}for(var dv=0;dv<qb.length;dv++){var uv=qb[dv],wF=uv.toLowerCase(),jF=uv[0].toUpperCase()+uv.slice(1);Xa(wF,"on"+jF)}Xa(X3,"onAnimationEnd"),Xa(V3,"onAnimationIteration"),Xa(q3,"onAnimationStart"),Xa("dblclick","onDoubleClick"),Xa("focusin","onFocus"),Xa("focusout","onBlur"),Xa(BB,"onTransitionRun"),Xa(FB,"onTransitionStart"),Xa(HB,"onTransitionCancel"),Xa(G3,"onTransitionEnd"),Ee("onMouseEnter",["mouseout","mouseover"]),Ee("onMouseLeave",["mouseout","mouseover"]),Ee("onPointerEnter",["pointerout","pointerover"]),Ee("onPointerLeave",["pointerout","pointerover"]),Q("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Q("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Q("onBeforeInput",["compositionend","keypress","textInput","paste"]),Q("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Q("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Q("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Fu="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),NF=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Fu));function pk(d,f){f=(f&4)!==0;for(var g=0;g<d.length;g++){var v=d[g],D=v.event;v=v.listeners;e:{var M=void 0;if(f)for(var I=v.length-1;0<=I;I--){var $=v[I],q=$.instance,ie=$.currentTarget;if($=$.listener,q!==M&&D.isPropagationStopped())break e;M=$,D.currentTarget=ie;try{M(D)}catch(fe){nm(fe)}D.currentTarget=null,M=q}else for(I=0;I<v.length;I++){if($=v[I],q=$.instance,ie=$.currentTarget,$=$.listener,q!==M&&D.isPropagationStopped())break e;M=$,D.currentTarget=ie;try{M(D)}catch(fe){nm(fe)}D.currentTarget=null,M=q}}}}function rt(d,f){var g=f[lc];g===void 0&&(g=f[lc]=new Set);var v=d+"__bubble";g.has(v)||(mk(f,d,2,!1),g.add(v))}function hv(d,f,g){var v=0;f&&(v|=4),mk(g,d,v,f)}var xm="_reactListening"+Math.random().toString(36).slice(2);function fv(d){if(!d[xm]){d[xm]=!0,ds.forEach(function(g){g!=="selectionchange"&&(NF.has(g)||hv(g,!1,d),hv(g,!0,d))});var f=d.nodeType===9?d:d.ownerDocument;f===null||f[xm]||(f[xm]=!0,hv("selectionchange",!1,f))}}function mk(d,f,g,v){switch(Bk(f)){case 2:var D=KF;break;case 8:D=ZF;break;default:D=kv}g=D.bind(null,f,g,d),D=void 0,!Rb||f!=="touchstart"&&f!=="touchmove"&&f!=="wheel"||(D=!0),v?D!==void 0?d.addEventListener(f,g,{capture:!0,passive:D}):d.addEventListener(f,g,!0):D!==void 0?d.addEventListener(f,g,{passive:D}):d.addEventListener(f,g,!1)}function pv(d,f,g,v,D){var M=v;if((f&1)===0&&(f&2)===0&&v!==null)e:for(;;){if(v===null)return;var I=v.tag;if(I===3||I===4){var $=v.stateNode.containerInfo;if($===D)break;if(I===4)for(I=v.return;I!==null;){var q=I.tag;if((q===3||q===4)&&I.stateNode.containerInfo===D)return;I=I.return}for(;$!==null;){if(I=Mi($),I===null)return;if(q=I.tag,q===5||q===6||q===26||q===27){v=M=I;continue e}$=$.parentNode}}v=v.return}j3(function(){var ie=M,fe=Pb(g),xe=[];e:{var oe=K3.get(d);if(oe!==void 0){var le=Ep,$e=d;switch(d){case"keypress":if(Tp(g)===0)break e;case"keydown":case"keyup":le=xB;break;case"focusin":$e="focus",le=Bb;break;case"focusout":$e="blur",le=Bb;break;case"beforeblur":case"afterblur":le=Bb;break;case"click":if(g.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":le=A3;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":le=sB;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":le=vB;break;case X3:case V3:case q3:le=lB;break;case G3:le=jB;break;case"scroll":case"scrollend":le=nB;break;case"wheel":le=SB;break;case"copy":case"cut":case"paste":le=dB;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":le=k3;break;case"toggle":case"beforetoggle":le=CB}var Fe=(f&4)!==0,Dt=!Fe&&(d==="scroll"||d==="scrollend"),ne=Fe?oe!==null?oe+"Capture":null:oe;Fe=[];for(var ee=ie,se;ee!==null;){var me=ee;if(se=me.stateNode,me=me.tag,me!==5&&me!==26&&me!==27||se===null||ne===null||(me=su(ee,ne),me!=null&&Fe.push(Hu(ee,me,se))),Dt)break;ee=ee.return}0<Fe.length&&(oe=new le(oe,$e,null,g,fe),xe.push({event:oe,listeners:Fe}))}}if((f&7)===0){e:{if(oe=d==="mouseover"||d==="pointerover",le=d==="mouseout"||d==="pointerout",oe&&g!==Ob&&($e=g.relatedTarget||g.fromElement)&&(Mi($e)||$e[$n]))break e;if((le||oe)&&(oe=fe.window===fe?fe:(oe=fe.ownerDocument)?oe.defaultView||oe.parentWindow:window,le?($e=g.relatedTarget||g.toElement,le=ie,$e=$e?Mi($e):null,$e!==null&&(Dt=s($e),Fe=$e.tag,$e!==Dt||Fe!==5&&Fe!==27&&Fe!==6)&&($e=null)):(le=null,$e=ie),le!==$e)){if(Fe=A3,me="onMouseLeave",ne="onMouseEnter",ee="mouse",(d==="pointerout"||d==="pointerover")&&(Fe=k3,me="onPointerLeave",ne="onPointerEnter",ee="pointer"),Dt=le==null?oe:zs(le),se=$e==null?oe:zs($e),oe=new Fe(me,ee+"leave",le,g,fe),oe.target=Dt,oe.relatedTarget=se,me=null,Mi(fe)===ie&&(Fe=new Fe(ne,ee+"enter",$e,g,fe),Fe.target=se,Fe.relatedTarget=Dt,me=Fe),Dt=me,le&&$e)t:{for(Fe=le,ne=$e,ee=0,se=Fe;se;se=Bc(se))ee++;for(se=0,me=ne;me;me=Bc(me))se++;for(;0<ee-se;)Fe=Bc(Fe),ee--;for(;0<se-ee;)ne=Bc(ne),se--;for(;ee--;){if(Fe===ne||ne!==null&&Fe===ne.alternate)break t;Fe=Bc(Fe),ne=Bc(ne)}Fe=null}else Fe=null;le!==null&&gk(xe,oe,le,Fe,!1),$e!==null&&Dt!==null&&gk(xe,Dt,$e,Fe,!0)}}e:{if(oe=ie?zs(ie):window,le=oe.nodeName&&oe.nodeName.toLowerCase(),le==="select"||le==="input"&&oe.type==="file")var Me=R3;else if(P3(oe))if(L3)Me=LB;else{Me=_B;var et=PB}else le=oe.nodeName,!le||le.toLowerCase()!=="input"||oe.type!=="checkbox"&&oe.type!=="radio"?ie&&Eb(ie.elementType)&&(Me=R3):Me=RB;if(Me&&(Me=Me(d,ie))){_3(xe,Me,g,fe);break e}et&&et(d,oe,ie),d==="focusout"&&ie&&oe.type==="number"&&ie.memoizedProps.value!=null&&Mb(oe,"number",oe.value)}switch(et=ie?zs(ie):window,d){case"focusin":(P3(et)||et.contentEditable==="true")&&(mc=et,Wb=ie,fu=null);break;case"focusout":fu=Wb=mc=null;break;case"mousedown":Xb=!0;break;case"contextmenu":case"mouseup":case"dragend":Xb=!1,U3(xe,g,fe);break;case"selectionchange":if(IB)break;case"keydown":case"keyup":U3(xe,g,fe)}var Le;if(Hb)e:{switch(d){case"compositionstart":var He="onCompositionStart";break e;case"compositionend":He="onCompositionEnd";break e;case"compositionupdate":He="onCompositionUpdate";break e}He=void 0}else pc?E3(d,g)&&(He="onCompositionEnd"):d==="keydown"&&g.keyCode===229&&(He="onCompositionStart");He&&(D3&&g.locale!=="ko"&&(pc||He!=="onCompositionStart"?He==="onCompositionEnd"&&pc&&(Le=N3()):(Pi=fe,Lb="value"in Pi?Pi.value:Pi.textContent,pc=!0)),et=bm(ie,He),0<et.length&&(He=new C3(He,d,null,g,fe),xe.push({event:He,listeners:et}),Le?He.data=Le:(Le=O3(g),Le!==null&&(He.data=Le)))),(Le=DB?TB(d,g):MB(d,g))&&(He=bm(ie,"onBeforeInput"),0<He.length&&(et=new C3("onBeforeInput","beforeinput",null,g,fe),xe.push({event:et,listeners:He}),et.data=Le)),vF(xe,d,ie,g,fe)}pk(xe,f)})}function Hu(d,f,g){return{instance:d,listener:f,currentTarget:g}}function bm(d,f){for(var g=f+"Capture",v=[];d!==null;){var D=d,M=D.stateNode;if(D=D.tag,D!==5&&D!==26&&D!==27||M===null||(D=su(d,g),D!=null&&v.unshift(Hu(d,D,M)),D=su(d,f),D!=null&&v.push(Hu(d,D,M))),d.tag===3)return v;d=d.return}return[]}function Bc(d){if(d===null)return null;do d=d.return;while(d&&d.tag!==5&&d.tag!==27);return d||null}function gk(d,f,g,v,D){for(var M=f._reactName,I=[];g!==null&&g!==v;){var $=g,q=$.alternate,ie=$.stateNode;if($=$.tag,q!==null&&q===v)break;$!==5&&$!==26&&$!==27||ie===null||(q=ie,D?(ie=su(g,M),ie!=null&&I.unshift(Hu(g,ie,q))):D||(ie=su(g,M),ie!=null&&I.push(Hu(g,ie,q)))),g=g.return}I.length!==0&&d.push({event:f,listeners:I})}var SF=/\r\n?/g,AF=/\u0000|\uFFFD/g;function xk(d){return(typeof d=="string"?d:""+d).replace(SF,`
`).replace(AF,"")}function bk(d,f){return f=xk(f),xk(d)===f}function ym(){}function kt(d,f,g,v,D,M){switch(g){case"children":typeof v=="string"?f==="body"||f==="textarea"&&v===""||uc(d,v):(typeof v=="number"||typeof v=="bigint")&&f!=="body"&&uc(d,""+v);break;case"className":Oi(d,"class",v);break;case"tabIndex":Oi(d,"tabindex",v);break;case"dir":case"role":case"viewBox":case"width":case"height":Oi(d,g,v);break;case"style":v3(d,v,M);break;case"data":if(f!=="object"){Oi(d,"data",v);break}case"src":case"href":if(v===""&&(f!=="a"||g!=="href")){d.removeAttribute(g);break}if(v==null||typeof v=="function"||typeof v=="symbol"||typeof v=="boolean"){d.removeAttribute(g);break}v=kp(""+v),d.setAttribute(g,v);break;case"action":case"formAction":if(typeof v=="function"){d.setAttribute(g,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof M=="function"&&(g==="formAction"?(f!=="input"&&kt(d,f,"name",D.name,D,null),kt(d,f,"formEncType",D.formEncType,D,null),kt(d,f,"formMethod",D.formMethod,D,null),kt(d,f,"formTarget",D.formTarget,D,null)):(kt(d,f,"encType",D.encType,D,null),kt(d,f,"method",D.method,D,null),kt(d,f,"target",D.target,D,null)));if(v==null||typeof v=="symbol"||typeof v=="boolean"){d.removeAttribute(g);break}v=kp(""+v),d.setAttribute(g,v);break;case"onClick":v!=null&&(d.onclick=ym);break;case"onScroll":v!=null&&rt("scroll",d);break;case"onScrollEnd":v!=null&&rt("scrollend",d);break;case"dangerouslySetInnerHTML":if(v!=null){if(typeof v!="object"||!("__html"in v))throw Error(n(61));if(g=v.__html,g!=null){if(D.children!=null)throw Error(n(60));d.innerHTML=g}}break;case"multiple":d.multiple=v&&typeof v!="function"&&typeof v!="symbol";break;case"muted":d.muted=v&&typeof v!="function"&&typeof v!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(v==null||typeof v=="function"||typeof v=="boolean"||typeof v=="symbol"){d.removeAttribute("xlink:href");break}g=kp(""+v),d.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",g);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":v!=null&&typeof v!="function"&&typeof v!="symbol"?d.setAttribute(g,""+v):d.removeAttribute(g);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":v&&typeof v!="function"&&typeof v!="symbol"?d.setAttribute(g,""):d.removeAttribute(g);break;case"capture":case"download":v===!0?d.setAttribute(g,""):v!==!1&&v!=null&&typeof v!="function"&&typeof v!="symbol"?d.setAttribute(g,v):d.removeAttribute(g);break;case"cols":case"rows":case"size":case"span":v!=null&&typeof v!="function"&&typeof v!="symbol"&&!isNaN(v)&&1<=v?d.setAttribute(g,v):d.removeAttribute(g);break;case"rowSpan":case"start":v==null||typeof v=="function"||typeof v=="symbol"||isNaN(v)?d.removeAttribute(g):d.setAttribute(g,v);break;case"popover":rt("beforetoggle",d),rt("toggle",d),Ei(d,"popover",v);break;case"xlinkActuate":tn(d,"http://www.w3.org/1999/xlink","xlink:actuate",v);break;case"xlinkArcrole":tn(d,"http://www.w3.org/1999/xlink","xlink:arcrole",v);break;case"xlinkRole":tn(d,"http://www.w3.org/1999/xlink","xlink:role",v);break;case"xlinkShow":tn(d,"http://www.w3.org/1999/xlink","xlink:show",v);break;case"xlinkTitle":tn(d,"http://www.w3.org/1999/xlink","xlink:title",v);break;case"xlinkType":tn(d,"http://www.w3.org/1999/xlink","xlink:type",v);break;case"xmlBase":tn(d,"http://www.w3.org/XML/1998/namespace","xml:base",v);break;case"xmlLang":tn(d,"http://www.w3.org/XML/1998/namespace","xml:lang",v);break;case"xmlSpace":tn(d,"http://www.w3.org/XML/1998/namespace","xml:space",v);break;case"is":Ei(d,"is",v);break;case"innerText":case"textContent":break;default:(!(2<g.length)||g[0]!=="o"&&g[0]!=="O"||g[1]!=="n"&&g[1]!=="N")&&(g=tB.get(g)||g,Ei(d,g,v))}}function mv(d,f,g,v,D,M){switch(g){case"style":v3(d,v,M);break;case"dangerouslySetInnerHTML":if(v!=null){if(typeof v!="object"||!("__html"in v))throw Error(n(61));if(g=v.__html,g!=null){if(D.children!=null)throw Error(n(60));d.innerHTML=g}}break;case"children":typeof v=="string"?uc(d,v):(typeof v=="number"||typeof v=="bigint")&&uc(d,""+v);break;case"onScroll":v!=null&&rt("scroll",d);break;case"onScrollEnd":v!=null&&rt("scrollend",d);break;case"onClick":v!=null&&(d.onclick=ym);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!au.hasOwnProperty(g))e:{if(g[0]==="o"&&g[1]==="n"&&(D=g.endsWith("Capture"),f=g.slice(2,D?g.length-7:void 0),M=d[Er]||null,M=M!=null?M[g]:null,typeof M=="function"&&d.removeEventListener(f,M,D),typeof v=="function")){typeof M!="function"&&M!==null&&(g in d?d[g]=null:d.hasAttribute(g)&&d.removeAttribute(g)),d.addEventListener(f,v,D);break e}g in d?d[g]=v:v===!0?d.setAttribute(g,""):Ei(d,g,v)}}}function Yr(d,f,g){switch(f){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":rt("error",d),rt("load",d);var v=!1,D=!1,M;for(M in g)if(g.hasOwnProperty(M)){var I=g[M];if(I!=null)switch(M){case"src":v=!0;break;case"srcSet":D=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(n(137,f));default:kt(d,f,M,I,g,null)}}D&&kt(d,f,"srcSet",g.srcSet,g,null),v&&kt(d,f,"src",g.src,g,null);return;case"input":rt("invalid",d);var $=M=I=D=null,q=null,ie=null;for(v in g)if(g.hasOwnProperty(v)){var fe=g[v];if(fe!=null)switch(v){case"name":D=fe;break;case"type":I=fe;break;case"checked":q=fe;break;case"defaultChecked":ie=fe;break;case"value":M=fe;break;case"defaultValue":$=fe;break;case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(n(137,f));break;default:kt(d,f,v,fe,g,null)}}g3(d,M,$,q,ie,I,D,!1),Ap(d);return;case"select":rt("invalid",d),v=I=M=null;for(D in g)if(g.hasOwnProperty(D)&&($=g[D],$!=null))switch(D){case"value":M=$;break;case"defaultValue":I=$;break;case"multiple":v=$;default:kt(d,f,D,$,g,null)}f=M,g=I,d.multiple=!!v,f!=null?dc(d,!!v,f,!1):g!=null&&dc(d,!!v,g,!0);return;case"textarea":rt("invalid",d),M=D=v=null;for(I in g)if(g.hasOwnProperty(I)&&($=g[I],$!=null))switch(I){case"value":v=$;break;case"defaultValue":D=$;break;case"children":M=$;break;case"dangerouslySetInnerHTML":if($!=null)throw Error(n(91));break;default:kt(d,f,I,$,g,null)}b3(d,v,D,M),Ap(d);return;case"option":for(q in g)if(g.hasOwnProperty(q)&&(v=g[q],v!=null))switch(q){case"selected":d.selected=v&&typeof v!="function"&&typeof v!="symbol";break;default:kt(d,f,q,v,g,null)}return;case"dialog":rt("beforetoggle",d),rt("toggle",d),rt("cancel",d),rt("close",d);break;case"iframe":case"object":rt("load",d);break;case"video":case"audio":for(v=0;v<Fu.length;v++)rt(Fu[v],d);break;case"image":rt("error",d),rt("load",d);break;case"details":rt("toggle",d);break;case"embed":case"source":case"link":rt("error",d),rt("load",d);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ie in g)if(g.hasOwnProperty(ie)&&(v=g[ie],v!=null))switch(ie){case"children":case"dangerouslySetInnerHTML":throw Error(n(137,f));default:kt(d,f,ie,v,g,null)}return;default:if(Eb(f)){for(fe in g)g.hasOwnProperty(fe)&&(v=g[fe],v!==void 0&&mv(d,f,fe,v,g,void 0));return}}for($ in g)g.hasOwnProperty($)&&(v=g[$],v!=null&&kt(d,f,$,v,g,null))}function CF(d,f,g,v){switch(f){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var D=null,M=null,I=null,$=null,q=null,ie=null,fe=null;for(le in g){var xe=g[le];if(g.hasOwnProperty(le)&&xe!=null)switch(le){case"checked":break;case"value":break;case"defaultValue":q=xe;default:v.hasOwnProperty(le)||kt(d,f,le,null,v,xe)}}for(var oe in v){var le=v[oe];if(xe=g[oe],v.hasOwnProperty(oe)&&(le!=null||xe!=null))switch(oe){case"type":M=le;break;case"name":D=le;break;case"checked":ie=le;break;case"defaultChecked":fe=le;break;case"value":I=le;break;case"defaultValue":$=le;break;case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(n(137,f));break;default:le!==xe&&kt(d,f,oe,le,v,xe)}}Tb(d,I,$,q,ie,fe,M,D);return;case"select":le=I=$=oe=null;for(M in g)if(q=g[M],g.hasOwnProperty(M)&&q!=null)switch(M){case"value":break;case"multiple":le=q;default:v.hasOwnProperty(M)||kt(d,f,M,null,v,q)}for(D in v)if(M=v[D],q=g[D],v.hasOwnProperty(D)&&(M!=null||q!=null))switch(D){case"value":oe=M;break;case"defaultValue":$=M;break;case"multiple":I=M;default:M!==q&&kt(d,f,D,M,v,q)}f=$,g=I,v=le,oe!=null?dc(d,!!g,oe,!1):!!v!=!!g&&(f!=null?dc(d,!!g,f,!0):dc(d,!!g,g?[]:"",!1));return;case"textarea":le=oe=null;for($ in g)if(D=g[$],g.hasOwnProperty($)&&D!=null&&!v.hasOwnProperty($))switch($){case"value":break;case"children":break;default:kt(d,f,$,null,v,D)}for(I in v)if(D=v[I],M=g[I],v.hasOwnProperty(I)&&(D!=null||M!=null))switch(I){case"value":oe=D;break;case"defaultValue":le=D;break;case"children":break;case"dangerouslySetInnerHTML":if(D!=null)throw Error(n(91));break;default:D!==M&&kt(d,f,I,D,v,M)}x3(d,oe,le);return;case"option":for(var $e in g)if(oe=g[$e],g.hasOwnProperty($e)&&oe!=null&&!v.hasOwnProperty($e))switch($e){case"selected":d.selected=!1;break;default:kt(d,f,$e,null,v,oe)}for(q in v)if(oe=v[q],le=g[q],v.hasOwnProperty(q)&&oe!==le&&(oe!=null||le!=null))switch(q){case"selected":d.selected=oe&&typeof oe!="function"&&typeof oe!="symbol";break;default:kt(d,f,q,oe,v,le)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Fe in g)oe=g[Fe],g.hasOwnProperty(Fe)&&oe!=null&&!v.hasOwnProperty(Fe)&&kt(d,f,Fe,null,v,oe);for(ie in v)if(oe=v[ie],le=g[ie],v.hasOwnProperty(ie)&&oe!==le&&(oe!=null||le!=null))switch(ie){case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(n(137,f));break;default:kt(d,f,ie,oe,v,le)}return;default:if(Eb(f)){for(var Dt in g)oe=g[Dt],g.hasOwnProperty(Dt)&&oe!==void 0&&!v.hasOwnProperty(Dt)&&mv(d,f,Dt,void 0,v,oe);for(fe in v)oe=v[fe],le=g[fe],!v.hasOwnProperty(fe)||oe===le||oe===void 0&&le===void 0||mv(d,f,fe,oe,v,le);return}}for(var ne in g)oe=g[ne],g.hasOwnProperty(ne)&&oe!=null&&!v.hasOwnProperty(ne)&&kt(d,f,ne,null,v,oe);for(xe in v)oe=v[xe],le=g[xe],!v.hasOwnProperty(xe)||oe===le||oe==null&&le==null||kt(d,f,xe,oe,v,le)}var gv=null,xv=null;function vm(d){return d.nodeType===9?d:d.ownerDocument}function yk(d){switch(d){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function vk(d,f){if(d===0)switch(f){case"svg":return 1;case"math":return 2;default:return 0}return d===1&&f==="foreignObject"?0:d}function bv(d,f){return d==="textarea"||d==="noscript"||typeof f.children=="string"||typeof f.children=="number"||typeof f.children=="bigint"||typeof f.dangerouslySetInnerHTML=="object"&&f.dangerouslySetInnerHTML!==null&&f.dangerouslySetInnerHTML.__html!=null}var yv=null;function kF(){var d=window.event;return d&&d.type==="popstate"?d===yv?!1:(yv=d,!0):(yv=null,!1)}var wk=typeof setTimeout=="function"?setTimeout:void 0,DF=typeof clearTimeout=="function"?clearTimeout:void 0,jk=typeof Promise=="function"?Promise:void 0,TF=typeof queueMicrotask=="function"?queueMicrotask:typeof jk<"u"?function(d){return jk.resolve(null).then(d).catch(MF)}:wk;function MF(d){setTimeout(function(){throw d})}function Gi(d){return d==="head"}function Nk(d,f){var g=f,v=0,D=0;do{var M=g.nextSibling;if(d.removeChild(g),M&&M.nodeType===8)if(g=M.data,g==="/$"){if(0<v&&8>v){g=v;var I=d.ownerDocument;if(g&1&&$u(I.documentElement),g&2&&$u(I.body),g&4)for(g=I.head,$u(g),I=g.firstChild;I;){var $=I.nextSibling,q=I.nodeName;I[Ho]||q==="SCRIPT"||q==="STYLE"||q==="LINK"&&I.rel.toLowerCase()==="stylesheet"||g.removeChild(I),I=$}}if(D===0){d.removeChild(M),Ku(f);return}D--}else g==="$"||g==="$?"||g==="$!"?D++:v=g.charCodeAt(0)-48;else v=0;g=M}while(g);Ku(f)}function vv(d){var f=d.firstChild;for(f&&f.nodeType===10&&(f=f.nextSibling);f;){var g=f;switch(f=f.nextSibling,g.nodeName){case"HTML":case"HEAD":case"BODY":vv(g),nu(g);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(g.rel.toLowerCase()==="stylesheet")continue}d.removeChild(g)}}function EF(d,f,g,v){for(;d.nodeType===1;){var D=g;if(d.nodeName.toLowerCase()!==f.toLowerCase()){if(!v&&(d.nodeName!=="INPUT"||d.type!=="hidden"))break}else if(v){if(!d[Ho])switch(f){case"meta":if(!d.hasAttribute("itemprop"))break;return d;case"link":if(M=d.getAttribute("rel"),M==="stylesheet"&&d.hasAttribute("data-precedence"))break;if(M!==D.rel||d.getAttribute("href")!==(D.href==null||D.href===""?null:D.href)||d.getAttribute("crossorigin")!==(D.crossOrigin==null?null:D.crossOrigin)||d.getAttribute("title")!==(D.title==null?null:D.title))break;return d;case"style":if(d.hasAttribute("data-precedence"))break;return d;case"script":if(M=d.getAttribute("src"),(M!==(D.src==null?null:D.src)||d.getAttribute("type")!==(D.type==null?null:D.type)||d.getAttribute("crossorigin")!==(D.crossOrigin==null?null:D.crossOrigin))&&M&&d.hasAttribute("async")&&!d.hasAttribute("itemprop"))break;return d;default:return d}}else if(f==="input"&&d.type==="hidden"){var M=D.name==null?null:""+D.name;if(D.type==="hidden"&&d.getAttribute("name")===M)return d}else return d;if(d=qa(d.nextSibling),d===null)break}return null}function OF(d,f,g){if(f==="")return null;for(;d.nodeType!==3;)if((d.nodeType!==1||d.nodeName!=="INPUT"||d.type!=="hidden")&&!g||(d=qa(d.nextSibling),d===null))return null;return d}function wv(d){return d.data==="$!"||d.data==="$?"&&d.ownerDocument.readyState==="complete"}function PF(d,f){var g=d.ownerDocument;if(d.data!=="$?"||g.readyState==="complete")f();else{var v=function(){f(),g.removeEventListener("DOMContentLoaded",v)};g.addEventListener("DOMContentLoaded",v),d._reactRetry=v}}function qa(d){for(;d!=null;d=d.nextSibling){var f=d.nodeType;if(f===1||f===3)break;if(f===8){if(f=d.data,f==="$"||f==="$!"||f==="$?"||f==="F!"||f==="F")break;if(f==="/$")return null}}return d}var jv=null;function Sk(d){d=d.previousSibling;for(var f=0;d;){if(d.nodeType===8){var g=d.data;if(g==="$"||g==="$!"||g==="$?"){if(f===0)return d;f--}else g==="/$"&&f++}d=d.previousSibling}return null}function Ak(d,f,g){switch(f=vm(g),d){case"html":if(d=f.documentElement,!d)throw Error(n(452));return d;case"head":if(d=f.head,!d)throw Error(n(453));return d;case"body":if(d=f.body,!d)throw Error(n(454));return d;default:throw Error(n(451))}}function $u(d){for(var f=d.attributes;f.length;)d.removeAttributeNode(f[0]);nu(d)}var Na=new Map,Ck=new Set;function wm(d){return typeof d.getRootNode=="function"?d.getRootNode():d.nodeType===9?d:d.ownerDocument}var Zs=W.d;W.d={f:_F,r:RF,D:LF,C:zF,L:IF,m:BF,X:HF,S:FF,M:$F};function _F(){var d=Zs.f(),f=hm();return d||f}function RF(d){var f=Ua(d);f!==null&&f.tag===5&&f.type==="form"?XA(f):Zs.r(d)}var Fc=typeof document>"u"?null:document;function kk(d,f,g){var v=Fc;if(v&&typeof f=="string"&&f){var D=ga(f);D='link[rel="'+d+'"][href="'+D+'"]',typeof g=="string"&&(D+='[crossorigin="'+g+'"]'),Ck.has(D)||(Ck.add(D),d={rel:d,crossOrigin:g,href:f},v.querySelector(D)===null&&(f=v.createElement("link"),Yr(f,"link",d),Qt(f),v.head.appendChild(f)))}}function LF(d){Zs.D(d),kk("dns-prefetch",d,null)}function zF(d,f){Zs.C(d,f),kk("preconnect",d,f)}function IF(d,f,g){Zs.L(d,f,g);var v=Fc;if(v&&d&&f){var D='link[rel="preload"][as="'+ga(f)+'"]';f==="image"&&g&&g.imageSrcSet?(D+='[imagesrcset="'+ga(g.imageSrcSet)+'"]',typeof g.imageSizes=="string"&&(D+='[imagesizes="'+ga(g.imageSizes)+'"]')):D+='[href="'+ga(d)+'"]';var M=D;switch(f){case"style":M=Hc(d);break;case"script":M=$c(d)}Na.has(M)||(d=h({rel:"preload",href:f==="image"&&g&&g.imageSrcSet?void 0:d,as:f},g),Na.set(M,d),v.querySelector(D)!==null||f==="style"&&v.querySelector(Yu(M))||f==="script"&&v.querySelector(Uu(M))||(f=v.createElement("link"),Yr(f,"link",d),Qt(f),v.head.appendChild(f)))}}function BF(d,f){Zs.m(d,f);var g=Fc;if(g&&d){var v=f&&typeof f.as=="string"?f.as:"script",D='link[rel="modulepreload"][as="'+ga(v)+'"][href="'+ga(d)+'"]',M=D;switch(v){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":M=$c(d)}if(!Na.has(M)&&(d=h({rel:"modulepreload",href:d},f),Na.set(M,d),g.querySelector(D)===null)){switch(v){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(g.querySelector(Uu(M)))return}v=g.createElement("link"),Yr(v,"link",d),Qt(v),g.head.appendChild(v)}}}function FF(d,f,g){Zs.S(d,f,g);var v=Fc;if(v&&d){var D=Wa(v).hoistableStyles,M=Hc(d);f=f||"default";var I=D.get(M);if(!I){var $={loading:0,preload:null};if(I=v.querySelector(Yu(M)))$.loading=5;else{d=h({rel:"stylesheet",href:d,"data-precedence":f},g),(g=Na.get(M))&&Nv(d,g);var q=I=v.createElement("link");Qt(q),Yr(q,"link",d),q._p=new Promise(function(ie,fe){q.onload=ie,q.onerror=fe}),q.addEventListener("load",function(){$.loading|=1}),q.addEventListener("error",function(){$.loading|=2}),$.loading|=4,jm(I,f,v)}I={type:"stylesheet",instance:I,count:1,state:$},D.set(M,I)}}}function HF(d,f){Zs.X(d,f);var g=Fc;if(g&&d){var v=Wa(g).hoistableScripts,D=$c(d),M=v.get(D);M||(M=g.querySelector(Uu(D)),M||(d=h({src:d,async:!0},f),(f=Na.get(D))&&Sv(d,f),M=g.createElement("script"),Qt(M),Yr(M,"link",d),g.head.appendChild(M)),M={type:"script",instance:M,count:1,state:null},v.set(D,M))}}function $F(d,f){Zs.M(d,f);var g=Fc;if(g&&d){var v=Wa(g).hoistableScripts,D=$c(d),M=v.get(D);M||(M=g.querySelector(Uu(D)),M||(d=h({src:d,async:!0,type:"module"},f),(f=Na.get(D))&&Sv(d,f),M=g.createElement("script"),Qt(M),Yr(M,"link",d),g.head.appendChild(M)),M={type:"script",instance:M,count:1,state:null},v.set(D,M))}}function Dk(d,f,g,v){var D=(D=ae.current)?wm(D):null;if(!D)throw Error(n(446));switch(d){case"meta":case"title":return null;case"style":return typeof g.precedence=="string"&&typeof g.href=="string"?(f=Hc(g.href),g=Wa(D).hoistableStyles,v=g.get(f),v||(v={type:"style",instance:null,count:0,state:null},g.set(f,v)),v):{type:"void",instance:null,count:0,state:null};case"link":if(g.rel==="stylesheet"&&typeof g.href=="string"&&typeof g.precedence=="string"){d=Hc(g.href);var M=Wa(D).hoistableStyles,I=M.get(d);if(I||(D=D.ownerDocument||D,I={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},M.set(d,I),(M=D.querySelector(Yu(d)))&&!M._p&&(I.instance=M,I.state.loading=5),Na.has(d)||(g={rel:"preload",as:"style",href:g.href,crossOrigin:g.crossOrigin,integrity:g.integrity,media:g.media,hrefLang:g.hrefLang,referrerPolicy:g.referrerPolicy},Na.set(d,g),M||YF(D,d,g,I.state))),f&&v===null)throw Error(n(528,""));return I}if(f&&v!==null)throw Error(n(529,""));return null;case"script":return f=g.async,g=g.src,typeof g=="string"&&f&&typeof f!="function"&&typeof f!="symbol"?(f=$c(g),g=Wa(D).hoistableScripts,v=g.get(f),v||(v={type:"script",instance:null,count:0,state:null},g.set(f,v)),v):{type:"void",instance:null,count:0,state:null};default:throw Error(n(444,d))}}function Hc(d){return'href="'+ga(d)+'"'}function Yu(d){return'link[rel="stylesheet"]['+d+"]"}function Tk(d){return h({},d,{"data-precedence":d.precedence,precedence:null})}function YF(d,f,g,v){d.querySelector('link[rel="preload"][as="style"]['+f+"]")?v.loading=1:(f=d.createElement("link"),v.preload=f,f.addEventListener("load",function(){return v.loading|=1}),f.addEventListener("error",function(){return v.loading|=2}),Yr(f,"link",g),Qt(f),d.head.appendChild(f))}function $c(d){return'[src="'+ga(d)+'"]'}function Uu(d){return"script[async]"+d}function Mk(d,f,g){if(f.count++,f.instance===null)switch(f.type){case"style":var v=d.querySelector('style[data-href~="'+ga(g.href)+'"]');if(v)return f.instance=v,Qt(v),v;var D=h({},g,{"data-href":g.href,"data-precedence":g.precedence,href:null,precedence:null});return v=(d.ownerDocument||d).createElement("style"),Qt(v),Yr(v,"style",D),jm(v,g.precedence,d),f.instance=v;case"stylesheet":D=Hc(g.href);var M=d.querySelector(Yu(D));if(M)return f.state.loading|=4,f.instance=M,Qt(M),M;v=Tk(g),(D=Na.get(D))&&Nv(v,D),M=(d.ownerDocument||d).createElement("link"),Qt(M);var I=M;return I._p=new Promise(function($,q){I.onload=$,I.onerror=q}),Yr(M,"link",v),f.state.loading|=4,jm(M,g.precedence,d),f.instance=M;case"script":return M=$c(g.src),(D=d.querySelector(Uu(M)))?(f.instance=D,Qt(D),D):(v=g,(D=Na.get(M))&&(v=h({},g),Sv(v,D)),d=d.ownerDocument||d,D=d.createElement("script"),Qt(D),Yr(D,"link",v),d.head.appendChild(D),f.instance=D);case"void":return null;default:throw Error(n(443,f.type))}else f.type==="stylesheet"&&(f.state.loading&4)===0&&(v=f.instance,f.state.loading|=4,jm(v,g.precedence,d));return f.instance}function jm(d,f,g){for(var v=g.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),D=v.length?v[v.length-1]:null,M=D,I=0;I<v.length;I++){var $=v[I];if($.dataset.precedence===f)M=$;else if(M!==D)break}M?M.parentNode.insertBefore(d,M.nextSibling):(f=g.nodeType===9?g.head:g,f.insertBefore(d,f.firstChild))}function Nv(d,f){d.crossOrigin==null&&(d.crossOrigin=f.crossOrigin),d.referrerPolicy==null&&(d.referrerPolicy=f.referrerPolicy),d.title==null&&(d.title=f.title)}function Sv(d,f){d.crossOrigin==null&&(d.crossOrigin=f.crossOrigin),d.referrerPolicy==null&&(d.referrerPolicy=f.referrerPolicy),d.integrity==null&&(d.integrity=f.integrity)}var Nm=null;function Ek(d,f,g){if(Nm===null){var v=new Map,D=Nm=new Map;D.set(g,v)}else D=Nm,v=D.get(g),v||(v=new Map,D.set(g,v));if(v.has(d))return v;for(v.set(d,null),g=g.getElementsByTagName(d),D=0;D<g.length;D++){var M=g[D];if(!(M[Ho]||M[ur]||d==="link"&&M.getAttribute("rel")==="stylesheet")&&M.namespaceURI!=="http://www.w3.org/2000/svg"){var I=M.getAttribute(f)||"";I=d+I;var $=v.get(I);$?$.push(M):v.set(I,[M])}}return v}function Ok(d,f,g){d=d.ownerDocument||d,d.head.insertBefore(g,f==="title"?d.querySelector("head > title"):null)}function UF(d,f,g){if(g===1||f.itemProp!=null)return!1;switch(d){case"meta":case"title":return!0;case"style":if(typeof f.precedence!="string"||typeof f.href!="string"||f.href==="")break;return!0;case"link":if(typeof f.rel!="string"||typeof f.href!="string"||f.href===""||f.onLoad||f.onError)break;switch(f.rel){case"stylesheet":return d=f.disabled,typeof f.precedence=="string"&&d==null;default:return!0}case"script":if(f.async&&typeof f.async!="function"&&typeof f.async!="symbol"&&!f.onLoad&&!f.onError&&f.src&&typeof f.src=="string")return!0}return!1}function Pk(d){return!(d.type==="stylesheet"&&(d.state.loading&3)===0)}var Wu=null;function WF(){}function XF(d,f,g){if(Wu===null)throw Error(n(475));var v=Wu;if(f.type==="stylesheet"&&(typeof g.media!="string"||matchMedia(g.media).matches!==!1)&&(f.state.loading&4)===0){if(f.instance===null){var D=Hc(g.href),M=d.querySelector(Yu(D));if(M){d=M._p,d!==null&&typeof d=="object"&&typeof d.then=="function"&&(v.count++,v=Sm.bind(v),d.then(v,v)),f.state.loading|=4,f.instance=M,Qt(M);return}M=d.ownerDocument||d,g=Tk(g),(D=Na.get(D))&&Nv(g,D),M=M.createElement("link"),Qt(M);var I=M;I._p=new Promise(function($,q){I.onload=$,I.onerror=q}),Yr(M,"link",g),f.instance=M}v.stylesheets===null&&(v.stylesheets=new Map),v.stylesheets.set(f,d),(d=f.state.preload)&&(f.state.loading&3)===0&&(v.count++,f=Sm.bind(v),d.addEventListener("load",f),d.addEventListener("error",f))}}function VF(){if(Wu===null)throw Error(n(475));var d=Wu;return d.stylesheets&&d.count===0&&Av(d,d.stylesheets),0<d.count?function(f){var g=setTimeout(function(){if(d.stylesheets&&Av(d,d.stylesheets),d.unsuspend){var v=d.unsuspend;d.unsuspend=null,v()}},6e4);return d.unsuspend=f,function(){d.unsuspend=null,clearTimeout(g)}}:null}function Sm(){if(this.count--,this.count===0){if(this.stylesheets)Av(this,this.stylesheets);else if(this.unsuspend){var d=this.unsuspend;this.unsuspend=null,d()}}}var Am=null;function Av(d,f){d.stylesheets=null,d.unsuspend!==null&&(d.count++,Am=new Map,f.forEach(qF,d),Am=null,Sm.call(d))}function qF(d,f){if(!(f.state.loading&4)){var g=Am.get(d);if(g)var v=g.get(null);else{g=new Map,Am.set(d,g);for(var D=d.querySelectorAll("link[data-precedence],style[data-precedence]"),M=0;M<D.length;M++){var I=D[M];(I.nodeName==="LINK"||I.getAttribute("media")!=="not all")&&(g.set(I.dataset.precedence,I),v=I)}v&&g.set(null,v)}D=f.instance,I=D.getAttribute("data-precedence"),M=g.get(I)||v,M===v&&g.set(null,D),g.set(I,D),this.count++,v=Sm.bind(this),D.addEventListener("load",v),D.addEventListener("error",v),M?M.parentNode.insertBefore(D,M.nextSibling):(d=d.nodeType===9?d.head:d,d.insertBefore(D,d.firstChild)),f.state.loading|=4}}var Xu={$$typeof:S,Provider:null,Consumer:null,_currentValue:V,_currentValue2:V,_threadCount:0};function GF(d,f,g,v,D,M,I,$){this.tag=1,this.containerInfo=d,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Fo(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Fo(0),this.hiddenUpdates=Fo(null),this.identifierPrefix=v,this.onUncaughtError=D,this.onCaughtError=M,this.onRecoverableError=I,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=$,this.incompleteTransitions=new Map}function _k(d,f,g,v,D,M,I,$,q,ie,fe,xe){return d=new GF(d,f,g,I,$,q,ie,xe),f=1,M===!0&&(f|=24),M=Un(3,null,null,f),d.current=M,M.stateNode=d,f=iy(),f.refCount++,d.pooledCache=f,f.refCount++,M.memoizedState={element:v,isDehydrated:g,cache:f},dy(M),d}function Rk(d){return d?(d=yc,d):yc}function Lk(d,f,g,v,D,M){D=Rk(D),v.context===null?v.context=D:v.pendingContext=D,v=Li(f),v.payload={element:g},M=M===void 0?null:M,M!==null&&(v.callback=M),g=zi(d,v,f),g!==null&&(Gn(g,d,f),ju(g,d,f))}function zk(d,f){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var g=d.retryLane;d.retryLane=g!==0&&g<f?g:f}}function Cv(d,f){zk(d,f),(d=d.alternate)&&zk(d,f)}function Ik(d){if(d.tag===13){var f=bc(d,67108864);f!==null&&Gn(f,d,67108864),Cv(d,67108864)}}var Cm=!0;function KF(d,f,g,v){var D=H.T;H.T=null;var M=W.p;try{W.p=2,kv(d,f,g,v)}finally{W.p=M,H.T=D}}function ZF(d,f,g,v){var D=H.T;H.T=null;var M=W.p;try{W.p=8,kv(d,f,g,v)}finally{W.p=M,H.T=D}}function kv(d,f,g,v){if(Cm){var D=Dv(v);if(D===null)pv(d,f,v,km,g),Fk(d,v);else if(JF(D,d,f,g,v))v.stopPropagation();else if(Fk(d,v),f&4&&-1<QF.indexOf(d)){for(;D!==null;){var M=Ua(D);if(M!==null)switch(M.tag){case 3:if(M=M.stateNode,M.current.memoizedState.isDehydrated){var I=wn(M.pendingLanes);if(I!==0){var $=M;for($.pendingLanes|=2,$.entangledLanes|=2;I;){var q=1<<31-Mr(I);$.entanglements[1]|=q,I&=~q}ms(M),(wt&6)===0&&(dm=xt()+500,Bu(0))}}break;case 13:$=bc(M,2),$!==null&&Gn($,M,2),hm(),Cv(M,2)}if(M=Dv(v),M===null&&pv(d,f,v,km,g),M===D)break;D=M}D!==null&&v.stopPropagation()}else pv(d,f,v,null,g)}}function Dv(d){return d=Pb(d),Tv(d)}var km=null;function Tv(d){if(km=null,d=Mi(d),d!==null){var f=s(d);if(f===null)d=null;else{var g=f.tag;if(g===13){if(d=o(f),d!==null)return d;d=null}else if(g===3){if(f.stateNode.current.memoizedState.isDehydrated)return f.tag===3?f.stateNode.containerInfo:null;d=null}else f!==d&&(d=null)}}return km=d,null}function Bk(d){switch(d){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(vn()){case pa:return 2;case Ft:return 8;case Hn:case Xe:return 32;case eu:return 268435456;default:return 32}default:return 32}}var Mv=!1,Ki=null,Zi=null,Qi=null,Vu=new Map,qu=new Map,Ji=[],QF="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Fk(d,f){switch(d){case"focusin":case"focusout":Ki=null;break;case"dragenter":case"dragleave":Zi=null;break;case"mouseover":case"mouseout":Qi=null;break;case"pointerover":case"pointerout":Vu.delete(f.pointerId);break;case"gotpointercapture":case"lostpointercapture":qu.delete(f.pointerId)}}function Gu(d,f,g,v,D,M){return d===null||d.nativeEvent!==M?(d={blockedOn:f,domEventName:g,eventSystemFlags:v,nativeEvent:M,targetContainers:[D]},f!==null&&(f=Ua(f),f!==null&&Ik(f)),d):(d.eventSystemFlags|=v,f=d.targetContainers,D!==null&&f.indexOf(D)===-1&&f.push(D),d)}function JF(d,f,g,v,D){switch(f){case"focusin":return Ki=Gu(Ki,d,f,g,v,D),!0;case"dragenter":return Zi=Gu(Zi,d,f,g,v,D),!0;case"mouseover":return Qi=Gu(Qi,d,f,g,v,D),!0;case"pointerover":var M=D.pointerId;return Vu.set(M,Gu(Vu.get(M)||null,d,f,g,v,D)),!0;case"gotpointercapture":return M=D.pointerId,qu.set(M,Gu(qu.get(M)||null,d,f,g,v,D)),!0}return!1}function Hk(d){var f=Mi(d.target);if(f!==null){var g=s(f);if(g!==null){if(f=g.tag,f===13){if(f=o(g),f!==null){d.blockedOn=f,Nb(d.priority,function(){if(g.tag===13){var v=qn();v=tu(v);var D=bc(g,v);D!==null&&Gn(D,g,v),Cv(g,v)}});return}}else if(f===3&&g.stateNode.current.memoizedState.isDehydrated){d.blockedOn=g.tag===3?g.stateNode.containerInfo:null;return}}}d.blockedOn=null}function Dm(d){if(d.blockedOn!==null)return!1;for(var f=d.targetContainers;0<f.length;){var g=Dv(d.nativeEvent);if(g===null){g=d.nativeEvent;var v=new g.constructor(g.type,g);Ob=v,g.target.dispatchEvent(v),Ob=null}else return f=Ua(g),f!==null&&Ik(f),d.blockedOn=g,!1;f.shift()}return!0}function $k(d,f,g){Dm(d)&&g.delete(f)}function eH(){Mv=!1,Ki!==null&&Dm(Ki)&&(Ki=null),Zi!==null&&Dm(Zi)&&(Zi=null),Qi!==null&&Dm(Qi)&&(Qi=null),Vu.forEach($k),qu.forEach($k)}function Tm(d,f){d.blockedOn===f&&(d.blockedOn=null,Mv||(Mv=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,eH)))}var Mm=null;function Yk(d){Mm!==d&&(Mm=d,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Mm===d&&(Mm=null);for(var f=0;f<d.length;f+=3){var g=d[f],v=d[f+1],D=d[f+2];if(typeof v!="function"){if(Tv(v||g)===null)continue;break}var M=Ua(g);M!==null&&(d.splice(f,3),f-=3,Ty(M,{pending:!0,data:D,method:g.method,action:v},v,D))}}))}function Ku(d){function f(q){return Tm(q,d)}Ki!==null&&Tm(Ki,d),Zi!==null&&Tm(Zi,d),Qi!==null&&Tm(Qi,d),Vu.forEach(f),qu.forEach(f);for(var g=0;g<Ji.length;g++){var v=Ji[g];v.blockedOn===d&&(v.blockedOn=null)}for(;0<Ji.length&&(g=Ji[0],g.blockedOn===null);)Hk(g),g.blockedOn===null&&Ji.shift();if(g=(d.ownerDocument||d).$$reactFormReplay,g!=null)for(v=0;v<g.length;v+=3){var D=g[v],M=g[v+1],I=D[Er]||null;if(typeof M=="function")I||Yk(g);else if(I){var $=null;if(M&&M.hasAttribute("formAction")){if(D=M,I=M[Er]||null)$=I.formAction;else if(Tv(D)!==null)continue}else $=I.action;typeof $=="function"?g[v+1]=$:(g.splice(v,3),v-=3),Yk(g)}}}function Ev(d){this._internalRoot=d}Em.prototype.render=Ev.prototype.render=function(d){var f=this._internalRoot;if(f===null)throw Error(n(409));var g=f.current,v=qn();Lk(g,v,d,f,null,null)},Em.prototype.unmount=Ev.prototype.unmount=function(){var d=this._internalRoot;if(d!==null){this._internalRoot=null;var f=d.containerInfo;Lk(d.current,2,null,d,null,null),hm(),f[$n]=null}};function Em(d){this._internalRoot=d}Em.prototype.unstable_scheduleHydration=function(d){if(d){var f=Np();d={blockedOn:null,target:d,priority:f};for(var g=0;g<Ji.length&&f!==0&&f<Ji[g].priority;g++);Ji.splice(g,0,d),g===0&&Hk(d)}};var Uk=e.version;if(Uk!=="19.1.0")throw Error(n(527,Uk,"19.1.0"));W.findDOMNode=function(d){var f=d._reactInternals;if(f===void 0)throw typeof d.render=="function"?Error(n(188)):(d=Object.keys(d).join(","),Error(n(268,d)));return d=c(f),d=d!==null?u(d):null,d=d===null?null:d.stateNode,d};var tH={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:H,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Om=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Om.isDisabled&&Om.supportsFiber)try{Ro=Om.inject(tH),dn=Om}catch{}}return Qu.createRoot=function(d,f){if(!a(d))throw Error(n(299));var g=!1,v="",D=iC,M=oC,I=lC,$=null;return f!=null&&(f.unstable_strictMode===!0&&(g=!0),f.identifierPrefix!==void 0&&(v=f.identifierPrefix),f.onUncaughtError!==void 0&&(D=f.onUncaughtError),f.onCaughtError!==void 0&&(M=f.onCaughtError),f.onRecoverableError!==void 0&&(I=f.onRecoverableError),f.unstable_transitionCallbacks!==void 0&&($=f.unstable_transitionCallbacks)),f=_k(d,1,!1,null,null,g,v,D,M,I,$,null),d[$n]=f.current,fv(d),new Ev(f)},Qu.hydrateRoot=function(d,f,g){if(!a(d))throw Error(n(299));var v=!1,D="",M=iC,I=oC,$=lC,q=null,ie=null;return g!=null&&(g.unstable_strictMode===!0&&(v=!0),g.identifierPrefix!==void 0&&(D=g.identifierPrefix),g.onUncaughtError!==void 0&&(M=g.onUncaughtError),g.onCaughtError!==void 0&&(I=g.onCaughtError),g.onRecoverableError!==void 0&&($=g.onRecoverableError),g.unstable_transitionCallbacks!==void 0&&(q=g.unstable_transitionCallbacks),g.formState!==void 0&&(ie=g.formState)),f=_k(d,1,!0,f,g??null,v,D,M,I,$,q,ie),f.context=Rk(null),g=f.current,v=qn(),v=tu(v),D=Li(v),D.callback=null,zi(g,D,v),g=v,f.current.lanes=g,Ls(f,g),ms(f),d[$n]=f.current,fv(d),new Em(f)},Qu.version="19.1.0",Qu}var e5;function hH(){if(e5)return _v.exports;e5=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),_v.exports=uH(),_v.exports}var fH=hH();/**
* react-router v7.7.0
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/var t5="popstate";function pH(t={}){function e(n,a){let{pathname:s,search:o,hash:l}=n.location;return C2("",{pathname:s,search:o,hash:l},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(n,a){return typeof a=="string"?a:Zh(a)}return gH(e,r,null,t)}function Gt(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function es(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function mH(){return Math.random().toString(36).substring(2,10)}function r5(t,e){return{usr:t.state,key:t.key,idx:e}}function C2(t,e,r=null,n){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof e=="string"?Md(e):e,state:r,key:e&&e.key||n||mH()}}function Zh({pathname:t="/",search:e="",hash:r=""}){return e&&e!=="?"&&(t+=e.charAt(0)==="?"?e:"?"+e),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Md(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substring(r),t=t.substring(0,r));let n=t.indexOf("?");n>=0&&(e.search=t.substring(n),t=t.substring(0,n)),t&&(e.pathname=t)}return e}function gH(t,e,r,n={}){let{window:a=document.defaultView,v5Compat:s=!1}=n,o=a.history,l="POP",c=null,u=h();u==null&&(u=0,o.replaceState({...o.state,idx:u},""));function h(){return(o.state||{idx:null}).idx}function p(){l="POP";let w=h(),N=w==null?null:w-u;u=w,c&&c({action:l,location:b.location,delta:N})}function m(w,N){l="PUSH";let A=C2(b.location,w,N);u=h()+1;let S=r5(A,u),C=b.createHref(A);try{o.pushState(S,"",C)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;a.location.assign(C)}s&&c&&c({action:l,location:b.location,delta:1})}function x(w,N){l="REPLACE";let A=C2(b.location,w,N);u=h();let S=r5(A,u),C=b.createHref(A);o.replaceState(S,"",C),s&&c&&c({action:l,location:b.location,delta:0})}function y(w){return xH(w)}let b={get action(){return l},get location(){return t(a,o)},listen(w){if(c)throw new Error("A history only accepts one active listener");return a.addEventListener(t5,p),c=w,()=>{a.removeEventListener(t5,p),c=null}},createHref(w){return e(a,w)},createURL:y,encodeLocation(w){let N=y(w);return{pathname:N.pathname,search:N.search,hash:N.hash}},push:m,replace:x,go(w){return o.go(w)}};return b}function xH(t,e=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),Gt(r,"No window.location.(origin|href) available to create URL");let n=typeof t=="string"?t:Zh(t);return n=n.replace(/ $/,"%20"),!e&&n.startsWith("//")&&(n=r+n),new URL(n,r)}function wP(t,e,r="/"){return bH(t,e,r,!1)}function bH(t,e,r,n){let a=typeof e=="string"?Md(e):e,s=gi(a.pathname||"/",r);if(s==null)return null;let o=jP(t);yH(o);let l=null;for(let c=0;l==null&&c<o.length;++c){let u=MH(s);l=DH(o[c],u,n)}return l}function jP(t,e=[],r=[],n=""){let a=(s,o,l)=>{let c={relativePath:l===void 0?s.path||"":l,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};c.relativePath.startsWith("/")&&(Gt(c.relativePath.startsWith(n),`Absolute route path "${c.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(n.length));let u=fi([n,c.relativePath]),h=r.concat(c);s.children&&s.children.length>0&&(Gt(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),jP(s.children,e,h,u)),!(s.path==null&&!s.index)&&e.push({path:u,score:CH(u,s.index),routesMeta:h})};return t.forEach((s,o)=>{if(s.path===""||!s.path?.includes("?"))a(s,o);else for(let l of NP(s.path))a(s,o,l)}),e}function NP(t){let e=t.split("/");if(e.length===0)return[];let[r,...n]=e,a=r.endsWith("?"),s=r.replace(/\?$/,"");if(n.length===0)return a?[s,""]:[s];let o=NP(n.join("/")),l=[];return l.push(...o.map(c=>c===""?s:[s,c].join("/"))),a&&l.push(...o),l.map(c=>t.startsWith("/")&&c===""?"/":c)}function yH(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:kH(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var vH=/^:[\w-]+$/,wH=3,jH=2,NH=1,SH=10,AH=-2,n5=t=>t==="*";function CH(t,e){let r=t.split("/"),n=r.length;return r.some(n5)&&(n+=AH),e&&(n+=jH),r.filter(a=>!n5(a)).reduce((a,s)=>a+(vH.test(s)?wH:s===""?NH:SH),n)}function kH(t,e){return t.length===e.length&&t.slice(0,-1).every((n,a)=>n===e[a])?t[t.length-1]-e[e.length-1]:0}function DH(t,e,r=!1){let{routesMeta:n}=t,a={},s="/",o=[];for(let l=0;l<n.length;++l){let c=n[l],u=l===n.length-1,h=s==="/"?e:e.slice(s.length)||"/",p=Zg({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},h),m=c.route;if(!p&&u&&r&&!n[n.length-1].route.index&&(p=Zg({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},h)),!p)return null;Object.assign(a,p.params),o.push({params:a,pathname:fi([s,p.pathname]),pathnameBase:_H(fi([s,p.pathnameBase])),route:m}),p.pathnameBase!=="/"&&(s=fi([s,p.pathnameBase]))}return o}function Zg(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[r,n]=TH(t.path,t.caseSensitive,t.end),a=e.match(r);if(!a)return null;let s=a[0],o=s.replace(/(.)\/+$/,"$1"),l=a.slice(1);return{params:n.reduce((u,{paramName:h,isOptional:p},m)=>{if(h==="*"){let y=l[m]||"";o=s.slice(0,s.length-y.length).replace(/(.)\/+$/,"$1")}const x=l[m];return p&&!x?u[h]=void 0:u[h]=(x||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:o,pattern:t}}function TH(t,e=!1,r=!0){es(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let n=[],a="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,l,c)=>(n.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(n.push({paramName:"*"}),a+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":t!==""&&t!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,e?void 0:"i"),n]}function MH(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return es(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),t}}function gi(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,n=t.charAt(r);return n&&n!=="/"?null:t.slice(r)||"/"}function EH(t,e="/"){let{pathname:r,search:n="",hash:a=""}=typeof t=="string"?Md(t):t;return{pathname:r?r.startsWith("/")?r:OH(r,e):e,search:RH(n),hash:LH(a)}}function OH(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function Iv(t,e,r,n){return`Cannot include a '${t}' character in a manually specified \`to.${e}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function PH(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function x4(t){let e=PH(t);return e.map((r,n)=>n===e.length-1?r.pathname:r.pathnameBase)}function b4(t,e,r,n=!1){let a;typeof t=="string"?a=Md(t):(a={...t},Gt(!a.pathname||!a.pathname.includes("?"),Iv("?","pathname","search",a)),Gt(!a.pathname||!a.pathname.includes("#"),Iv("#","pathname","hash",a)),Gt(!a.search||!a.search.includes("#"),Iv("#","search","hash",a)));let s=t===""||a.pathname==="",o=s?"/":a.pathname,l;if(o==null)l=r;else{let p=e.length-1;if(!n&&o.startsWith("..")){let m=o.split("/");for(;m[0]==="..";)m.shift(),p-=1;a.pathname=m.join("/")}l=p>=0?e[p]:"/"}let c=EH(a,l),u=o&&o!=="/"&&o.endsWith("/"),h=(s||o===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(u||h)&&(c.pathname+="/"),c}var fi=t=>t.join("/").replace(/\/\/+/g,"/"),_H=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),RH=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,LH=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function zH(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}var SP=["POST","PUT","PATCH","DELETE"];new Set(SP);var IH=["GET",...SP];new Set(IH);var Ed=O.createContext(null);Ed.displayName="DataRouter";var c0=O.createContext(null);c0.displayName="DataRouterState";O.createContext(!1);var AP=O.createContext({isTransitioning:!1});AP.displayName="ViewTransition";var BH=O.createContext(new Map);BH.displayName="Fetchers";var FH=O.createContext(null);FH.displayName="Await";var as=O.createContext(null);as.displayName="Navigation";var Df=O.createContext(null);Df.displayName="Location";var ss=O.createContext({outlet:null,matches:[],isDataRoute:!1});ss.displayName="Route";var y4=O.createContext(null);y4.displayName="RouteError";function HH(t,{relative:e}={}){Gt(Od(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=O.useContext(as),{hash:a,pathname:s,search:o}=Tf(t,{relative:e}),l=s;return r!=="/"&&(l=s==="/"?r:fi([r,s])),n.createHref({pathname:l,search:o,hash:a})}function Od(){return O.useContext(Df)!=null}function Cr(){return Gt(Od(),"useLocation() may be used only in the context of a <Router> component."),O.useContext(Df).location}var CP="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function kP(t){O.useContext(as).static||O.useLayoutEffect(t)}function Ao(){let{isDataRoute:t}=O.useContext(ss);return t?e$():$H()}function $H(){Gt(Od(),"useNavigate() may be used only in the context of a <Router> component.");let t=O.useContext(Ed),{basename:e,navigator:r}=O.useContext(as),{matches:n}=O.useContext(ss),{pathname:a}=Cr(),s=JSON.stringify(x4(n)),o=O.useRef(!1);return kP(()=>{o.current=!0}),O.useCallback((c,u={})=>{if(es(o.current,CP),!o.current)return;if(typeof c=="number"){r.go(c);return}let h=b4(c,JSON.parse(s),a,u.relative==="path");t==null&&e!=="/"&&(h.pathname=h.pathname==="/"?e:fi([e,h.pathname])),(u.replace?r.replace:r.push)(h,u.state,u)},[e,r,s,a,t])}O.createContext(null);function DP(){let{matches:t}=O.useContext(ss),e=t[t.length-1];return e?e.params:{}}function Tf(t,{relative:e}={}){let{matches:r}=O.useContext(ss),{pathname:n}=Cr(),a=JSON.stringify(x4(r));return O.useMemo(()=>b4(t,JSON.parse(a),n,e==="path"),[t,a,n,e])}function YH(t,e){return TP(t,e)}function TP(t,e,r,n){Gt(Od(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=O.useContext(as),{matches:s}=O.useContext(ss),o=s[s.length-1],l=o?o.params:{},c=o?o.pathname:"/",u=o?o.pathnameBase:"/",h=o&&o.route;{let N=h&&h.path||"";MP(c,!h||N.endsWith("*")||N.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${N}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
Please change the parent <Route path="${N}"> to <Route path="${N==="/"?"*":`${N}/*`}">.`)}let p=Cr(),m;if(e){let N=typeof e=="string"?Md(e):e;Gt(u==="/"||N.pathname?.startsWith(u),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${N.pathname}" was given in the \`location\` prop.`),m=N}else m=p;let x=m.pathname||"/",y=x;if(u!=="/"){let N=u.replace(/^\//,"").split("/");y="/"+x.replace(/^\//,"").split("/").slice(N.length).join("/")}let b=wP(t,{pathname:y});es(h||b!=null,`No routes matched location "${m.pathname}${m.search}${m.hash}" `),es(b==null||b[b.length-1].route.element!==void 0||b[b.length-1].route.Component!==void 0||b[b.length-1].route.lazy!==void 0,`Matched leaf route at location "${m.pathname}${m.search}${m.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let w=qH(b&&b.map(N=>Object.assign({},N,{params:Object.assign({},l,N.params),pathname:fi([u,a.encodeLocation?a.encodeLocation(N.pathname).pathname:N.pathname]),pathnameBase:N.pathnameBase==="/"?u:fi([u,a.encodeLocation?a.encodeLocation(N.pathnameBase).pathname:N.pathnameBase])})),s,r,n);return e&&w?O.createElement(Df.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...m},navigationType:"POP"}},w):w}function UH(){let t=JH(),e=zH(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,n="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:n},s={padding:"2px 4px",backgroundColor:n},o=null;return console.error("Error handled by React Router default ErrorBoundary:",t),o=O.createElement(O.Fragment,null,O.createElement("p",null,"💿 Hey developer 👋"),O.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",O.createElement("code",{style:s},"ErrorBoundary")," or"," ",O.createElement("code",{style:s},"errorElement")," prop on your route.")),O.createElement(O.Fragment,null,O.createElement("h2",null,"Unexpected Application Error!"),O.createElement("h3",{style:{fontStyle:"italic"}},e),r?O.createElement("pre",{style:a},r):null,o)}var WH=O.createElement(UH,null),XH=class extends O.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||e.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){console.error("React Router caught the following error during render",t,e)}render(){return this.state.error!==void 0?O.createElement(ss.Provider,{value:this.props.routeContext},O.createElement(y4.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function VH({routeContext:t,match:e,children:r}){let n=O.useContext(Ed);return n&&n.static&&n.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=e.route.id),O.createElement(ss.Provider,{value:t},r)}function qH(t,e=[],r=null,n=null){if(t==null){if(!r)return null;if(r.errors)t=r.matches;else if(e.length===0&&!r.initialized&&r.matches.length>0)t=r.matches;else return null}let a=t,s=r?.errors;if(s!=null){let c=a.findIndex(u=>u.route.id&&s?.[u.route.id]!==void 0);Gt(c>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),a=a.slice(0,Math.min(a.length,c+1))}let o=!1,l=-1;if(r)for(let c=0;c<a.length;c++){let u=a[c];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(l=c),u.route.id){let{loaderData:h,errors:p}=r,m=u.route.loader&&!h.hasOwnProperty(u.route.id)&&(!p||p[u.route.id]===void 0);if(u.route.lazy||m){o=!0,l>=0?a=a.slice(0,l+1):a=[a[0]];break}}}return a.reduceRight((c,u,h)=>{let p,m=!1,x=null,y=null;r&&(p=s&&u.route.id?s[u.route.id]:void 0,x=u.route.errorElement||WH,o&&(l<0&&h===0?(MP("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),m=!0,y=null):l===h&&(m=!0,y=u.route.hydrateFallbackElement||null)));let b=e.concat(a.slice(0,h+1)),w=()=>{let N;return p?N=x:m?N=y:u.route.Component?N=O.createElement(u.route.Component,null):u.route.element?N=u.route.element:N=c,O.createElement(VH,{match:u,routeContext:{outlet:c,matches:b,isDataRoute:r!=null},children:N})};return r&&(u.route.ErrorBoundary||u.route.errorElement||h===0)?O.createElement(XH,{location:r.location,revalidation:r.revalidation,component:x,error:p,children:w(),routeContext:{outlet:null,matches:b,isDataRoute:!0}}):w()},null)}function v4(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function GH(t){let e=O.useContext(Ed);return Gt(e,v4(t)),e}function KH(t){let e=O.useContext(c0);return Gt(e,v4(t)),e}function ZH(t){let e=O.useContext(ss);return Gt(e,v4(t)),e}function w4(t){let e=ZH(t),r=e.matches[e.matches.length-1];return Gt(r.route.id,`${t} can only be used on routes that contain a unique "id"`),r.route.id}function QH(){return w4("useRouteId")}function JH(){let t=O.useContext(y4),e=KH("useRouteError"),r=w4("useRouteError");return t!==void 0?t:e.errors?.[r]}function e$(){let{router:t}=GH("useNavigate"),e=w4("useNavigate"),r=O.useRef(!1);return kP(()=>{r.current=!0}),O.useCallback(async(a,s={})=>{es(r.current,CP),r.current&&(typeof a=="number"?t.navigate(a):await t.navigate(a,{fromRouteId:e,...s}))},[t,e])}var a5={};function MP(t,e,r){!e&&!a5[t]&&(a5[t]=!0,es(!1,r))}O.memo(t$);function t$({routes:t,future:e,state:r}){return TP(t,void 0,r,e)}function Bv({to:t,replace:e,state:r,relative:n}){Gt(Od(),"<Navigate> may be used only in the context of a <Router> component.");let{static:a}=O.useContext(as);es(!a,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:s}=O.useContext(ss),{pathname:o}=Cr(),l=Ao(),c=b4(t,x4(s),o,n==="path"),u=JSON.stringify(c);return O.useEffect(()=>{l(JSON.parse(u),{replace:e,state:r,relative:n})},[l,u,n,e,r]),null}function ke(t){Gt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function r$({basename:t="/",children:e=null,location:r,navigationType:n="POP",navigator:a,static:s=!1}){Gt(!Od(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let o=t.replace(/^\/*/,"/"),l=O.useMemo(()=>({basename:o,navigator:a,static:s,future:{}}),[o,a,s]);typeof r=="string"&&(r=Md(r));let{pathname:c="/",search:u="",hash:h="",state:p=null,key:m="default"}=r,x=O.useMemo(()=>{let y=gi(c,o);return y==null?null:{location:{pathname:y,search:u,hash:h,state:p,key:m},navigationType:n}},[o,c,u,h,p,m,n]);return es(x!=null,`<Router basename="${o}"> is not able to match the URL "${c}${u}${h}" because it does not start with the basename, so the <Router> won't render anything.`),x==null?null:O.createElement(as.Provider,{value:l},O.createElement(Df.Provider,{children:e,value:x}))}function n$({children:t,location:e}){return YH(k2(t),e)}function k2(t,e=[]){let r=[];return O.Children.forEach(t,(n,a)=>{if(!O.isValidElement(n))return;let s=[...e,a];if(n.type===O.Fragment){r.push.apply(r,k2(n.props.children,s));return}Gt(n.type===ke,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Gt(!n.props.index||!n.props.children,"An index route cannot have child routes.");let o={id:n.props.id||s.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=k2(n.props.children,s)),r.push(o)}),r}var wg="get",jg="application/x-www-form-urlencoded";function d0(t){return t!=null&&typeof t.tagName=="string"}function a$(t){return d0(t)&&t.tagName.toLowerCase()==="button"}function s$(t){return d0(t)&&t.tagName.toLowerCase()==="form"}function i$(t){return d0(t)&&t.tagName.toLowerCase()==="input"}function o$(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function l$(t,e){return t.button===0&&(!e||e==="_self")&&!o$(t)}var Pm=null;function c$(){if(Pm===null)try{new FormData(document.createElement("form"),0),Pm=!1}catch{Pm=!0}return Pm}var d$=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Fv(t){return t!=null&&!d$.has(t)?(es(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${jg}"`),null):t}function u$(t,e){let r,n,a,s,o;if(s$(t)){let l=t.getAttribute("action");n=l?gi(l,e):null,r=t.getAttribute("method")||wg,a=Fv(t.getAttribute("enctype"))||jg,s=new FormData(t)}else if(a$(t)||i$(t)&&(t.type==="submit"||t.type==="image")){let l=t.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=t.getAttribute("formaction")||l.getAttribute("action");if(n=c?gi(c,e):null,r=t.getAttribute("formmethod")||l.getAttribute("method")||wg,a=Fv(t.getAttribute("formenctype"))||Fv(l.getAttribute("enctype"))||jg,s=new FormData(l,t),!c$()){let{name:u,type:h,value:p}=t;if(h==="image"){let m=u?`${u}.`:"";s.append(`${m}x`,"0"),s.append(`${m}y`,"0")}else u&&s.append(u,p)}}else{if(d0(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=wg,n=null,a=jg,o=t}return s&&a==="text/plain"&&(o=s,s=void 0),{action:n,method:r.toLowerCase(),encType:a,formData:s,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function j4(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function h$(t,e,r){let n=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return n.pathname==="/"?n.pathname=`_root.${r}`:e&&gi(n.pathname,e)==="/"?n.pathname=`${e.replace(/\/$/,"")}/_root.${r}`:n.pathname=`${n.pathname.replace(/\/$/,"")}.${r}`,n}async function f$(t,e){if(t.id in e)return e[t.id];try{let r=await import(t.module);return e[t.id]=r,r}catch(r){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function p$(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function m$(t,e,r){let n=await Promise.all(t.map(async a=>{let s=e.routes[a.route.id];if(s){let o=await f$(s,r);return o.links?o.links():[]}return[]}));return y$(n.flat(1).filter(p$).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function s5(t,e,r,n,a,s){let o=(c,u)=>r[u]?c.route.id!==r[u].route.id:!0,l=(c,u)=>r[u].pathname!==c.pathname||r[u].route.path?.endsWith("*")&&r[u].params["*"]!==c.params["*"];return s==="assets"?e.filter((c,u)=>o(c,u)||l(c,u)):s==="data"?e.filter((c,u)=>{let h=n.routes[c.route.id];if(!h||!h.hasLoader)return!1;if(o(c,u)||l(c,u))return!0;if(c.route.shouldRevalidate){let p=c.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(t,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof p=="boolean")return p}return!0}):[]}function g$(t,e,{includeHydrateFallback:r}={}){return x$(t.map(n=>{let a=e.routes[n.route.id];if(!a)return[];let s=[a.module];return a.clientActionModule&&(s=s.concat(a.clientActionModule)),a.clientLoaderModule&&(s=s.concat(a.clientLoaderModule)),r&&a.hydrateFallbackModule&&(s=s.concat(a.hydrateFallbackModule)),a.imports&&(s=s.concat(a.imports)),s}).flat(1))}function x$(t){return[...new Set(t)]}function b$(t){let e={},r=Object.keys(t).sort();for(let n of r)e[n]=t[n];return e}function y$(t,e){let r=new Set;return new Set(e),t.reduce((n,a)=>{let s=JSON.stringify(b$(a));return r.has(s)||(r.add(s),n.push({key:s,link:a})),n},[])}function EP(){let t=O.useContext(Ed);return j4(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function v$(){let t=O.useContext(c0);return j4(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var N4=O.createContext(void 0);N4.displayName="FrameworkContext";function OP(){let t=O.useContext(N4);return j4(t,"You must render this element inside a <HydratedRouter> element"),t}function w$(t,e){let r=O.useContext(N4),[n,a]=O.useState(!1),[s,o]=O.useState(!1),{onFocus:l,onBlur:c,onMouseEnter:u,onMouseLeave:h,onTouchStart:p}=e,m=O.useRef(null);O.useEffect(()=>{if(t==="render"&&o(!0),t==="viewport"){let b=N=>{N.forEach(A=>{o(A.isIntersecting)})},w=new IntersectionObserver(b,{threshold:.5});return m.current&&w.observe(m.current),()=>{w.disconnect()}}},[t]),O.useEffect(()=>{if(n){let b=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(b)}}},[n]);let x=()=>{a(!0)},y=()=>{a(!1),o(!1)};return r?t!=="intent"?[s,m,{}]:[s,m,{onFocus:Ju(l,x),onBlur:Ju(c,y),onMouseEnter:Ju(u,x),onMouseLeave:Ju(h,y),onTouchStart:Ju(p,x)}]:[!1,m,{}]}function Ju(t,e){return r=>{t&&t(r),r.defaultPrevented||e(r)}}function j$({page:t,...e}){let{router:r}=EP(),n=O.useMemo(()=>wP(r.routes,t,r.basename),[r.routes,t,r.basename]);return n?O.createElement(S$,{page:t,matches:n,...e}):null}function N$(t){let{manifest:e,routeModules:r}=OP(),[n,a]=O.useState([]);return O.useEffect(()=>{let s=!1;return m$(t,e,r).then(o=>{s||a(o)}),()=>{s=!0}},[t,e,r]),n}function S$({page:t,matches:e,...r}){let n=Cr(),{manifest:a,routeModules:s}=OP(),{basename:o}=EP(),{loaderData:l,matches:c}=v$(),u=O.useMemo(()=>s5(t,e,c,a,n,"data"),[t,e,c,a,n]),h=O.useMemo(()=>s5(t,e,c,a,n,"assets"),[t,e,c,a,n]),p=O.useMemo(()=>{if(t===n.pathname+n.search+n.hash)return[];let y=new Set,b=!1;if(e.forEach(N=>{let A=a.routes[N.route.id];!A||!A.hasLoader||(!u.some(S=>S.route.id===N.route.id)&&N.route.id in l&&s[N.route.id]?.shouldRevalidate||A.hasClientLoader?b=!0:y.add(N.route.id))}),y.size===0)return[];let w=h$(t,o,"data");return b&&y.size>0&&w.searchParams.set("_routes",e.filter(N=>y.has(N.route.id)).map(N=>N.route.id).join(",")),[w.pathname+w.search]},[o,l,n,a,u,e,t,s]),m=O.useMemo(()=>g$(h,a),[h,a]),x=N$(h);return O.createElement(O.Fragment,null,p.map(y=>O.createElement("link",{key:y,rel:"prefetch",as:"fetch",href:y,...r})),m.map(y=>O.createElement("link",{key:y,rel:"modulepreload",href:y,...r})),x.map(({key:y,link:b})=>O.createElement("link",{key:y,...b})))}function A$(...t){return e=>{t.forEach(r=>{typeof r=="function"?r(e):r!=null&&(r.current=e)})}}var PP=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{PP&&(window.__reactRouterVersion="7.7.0")}catch{}function C$({basename:t,children:e,window:r}){let n=O.useRef();n.current==null&&(n.current=pH({window:r,v5Compat:!0}));let a=n.current,[s,o]=O.useState({action:a.action,location:a.location}),l=O.useCallback(c=>{O.startTransition(()=>o(c))},[o]);return O.useLayoutEffect(()=>a.listen(l),[a,l]),O.createElement(r$,{basename:t,children:e,location:s.location,navigationType:s.action,navigator:a})}var _P=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Pe=O.forwardRef(function({onClick:e,discover:r="render",prefetch:n="none",relative:a,reloadDocument:s,replace:o,state:l,target:c,to:u,preventScrollReset:h,viewTransition:p,...m},x){let{basename:y}=O.useContext(as),b=typeof u=="string"&&_P.test(u),w,N=!1;if(typeof u=="string"&&b&&(w=u,PP))try{let L=new URL(window.location.href),P=u.startsWith("//")?new URL(L.protocol+u):new URL(u),R=gi(P.pathname,y);P.origin===L.origin&&R!=null?u=R+P.search+P.hash:N=!0}catch{es(!1,`<Link to="${u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let A=HH(u,{relative:a}),[S,C,k]=w$(n,m),T=T$(u,{replace:o,state:l,target:c,preventScrollReset:h,relative:a,viewTransition:p});function E(L){e&&e(L),L.defaultPrevented||T(L)}let _=O.createElement("a",{...m,...k,href:w||A,onClick:N||s?e:E,ref:A$(x,C),target:c,"data-discover":!b&&r==="render"?"true":void 0});return S&&!b?O.createElement(O.Fragment,null,_,O.createElement(j$,{page:A})):_});Pe.displayName="Link";var RP=O.forwardRef(function({"aria-current":e="page",caseSensitive:r=!1,className:n="",end:a=!1,style:s,to:o,viewTransition:l,children:c,...u},h){let p=Tf(o,{relative:u.relative}),m=Cr(),x=O.useContext(c0),{navigator:y,basename:b}=O.useContext(as),w=x!=null&&_$(p)&&l===!0,N=y.encodeLocation?y.encodeLocation(p).pathname:p.pathname,A=m.pathname,S=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;r||(A=A.toLowerCase(),S=S?S.toLowerCase():null,N=N.toLowerCase()),S&&b&&(S=gi(S,b)||S);const C=N!=="/"&&N.endsWith("/")?N.length-1:N.length;let k=A===N||!a&&A.startsWith(N)&&A.charAt(C)==="/",T=S!=null&&(S===N||!a&&S.startsWith(N)&&S.charAt(N.length)==="/"),E={isActive:k,isPending:T,isTransitioning:w},_=k?e:void 0,L;typeof n=="function"?L=n(E):L=[n,k?"active":null,T?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let P=typeof s=="function"?s(E):s;return O.createElement(Pe,{...u,"aria-current":_,className:L,ref:h,style:P,to:o,viewTransition:l},typeof c=="function"?c(E):c)});RP.displayName="NavLink";var k$=O.forwardRef(({discover:t="render",fetcherKey:e,navigate:r,reloadDocument:n,replace:a,state:s,method:o=wg,action:l,onSubmit:c,relative:u,preventScrollReset:h,viewTransition:p,...m},x)=>{let y=O$(),b=P$(l,{relative:u}),w=o.toLowerCase()==="get"?"get":"post",N=typeof l=="string"&&_P.test(l),A=S=>{if(c&&c(S),S.defaultPrevented)return;S.preventDefault();let C=S.nativeEvent.submitter,k=C?.getAttribute("formmethod")||o;y(C||S.currentTarget,{fetcherKey:e,method:k,navigate:r,replace:a,state:s,relative:u,preventScrollReset:h,viewTransition:p})};return O.createElement("form",{ref:x,method:w,action:b,onSubmit:n?c:A,...m,"data-discover":!N&&t==="render"?"true":void 0})});k$.displayName="Form";function D$(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function LP(t){let e=O.useContext(Ed);return Gt(e,D$(t)),e}function T$(t,{target:e,replace:r,state:n,preventScrollReset:a,relative:s,viewTransition:o}={}){let l=Ao(),c=Cr(),u=Tf(t,{relative:s});return O.useCallback(h=>{if(l$(h,e)){h.preventDefault();let p=r!==void 0?r:Zh(c)===Zh(u);l(t,{replace:p,state:n,preventScrollReset:a,relative:s,viewTransition:o})}},[c,l,u,r,n,e,t,a,s,o])}var M$=0,E$=()=>`__${String(++M$)}__`;function O$(){let{router:t}=LP("useSubmit"),{basename:e}=O.useContext(as),r=QH();return O.useCallback(async(n,a={})=>{let{action:s,method:o,encType:l,formData:c,body:u}=u$(n,e);if(a.navigate===!1){let h=a.fetcherKey||E$();await t.fetch(h,r,a.action||s,{preventScrollReset:a.preventScrollReset,formData:c,body:u,formMethod:a.method||o,formEncType:a.encType||l,flushSync:a.flushSync})}else await t.navigate(a.action||s,{preventScrollReset:a.preventScrollReset,formData:c,body:u,formMethod:a.method||o,formEncType:a.encType||l,replace:a.replace,state:a.state,fromRouteId:r,flushSync:a.flushSync,viewTransition:a.viewTransition})},[t,e,r])}function P$(t,{relative:e}={}){let{basename:r}=O.useContext(as),n=O.useContext(ss);Gt(n,"useFormAction must be used inside a RouteContext");let[a]=n.matches.slice(-1),s={...Tf(t||".",{relative:e})},o=Cr();if(t==null){s.search=o.search;let l=new URLSearchParams(s.search),c=l.getAll("index");if(c.some(h=>h==="")){l.delete("index"),c.filter(p=>p).forEach(p=>l.append("index",p));let h=l.toString();s.search=h?`?${h}`:""}}return(!t||t===".")&&a.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(s.pathname=s.pathname==="/"?r:fi([r,s.pathname])),Zh(s)}function _$(t,e={}){let r=O.useContext(AP);Gt(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=LP("useViewTransitionState"),a=Tf(t,{relative:e.relative});if(!r.isTransitioning)return!1;let s=gi(r.currentLocation.pathname,n)||r.currentLocation.pathname,o=gi(r.nextLocation.pathname,n)||r.nextLocation.pathname;return Zg(a.pathname,o)!=null||Zg(a.pathname,s)!=null}var R$=vP(),Hv={exports:{}},$v={};/**
* @license React
* use-sync-external-store-with-selector.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var i5;function L$(){if(i5)return $v;i5=1;var t=Gl();function e(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:e,n=t.useSyncExternalStore,a=t.useRef,s=t.useEffect,o=t.useMemo,l=t.useDebugValue;return $v.useSyncExternalStoreWithSelector=function(c,u,h,p,m){var x=a(null);if(x.current===null){var y={hasValue:!1,value:null};x.current=y}else y=x.current;x=o(function(){function w(k){if(!N){if(N=!0,A=k,k=p(k),m!==void 0&&y.hasValue){var T=y.value;if(m(T,k))return S=T}return S=k}if(T=S,r(A,k))return T;var E=p(k);return m!==void 0&&m(T,E)?(A=k,T):(A=k,S=E)}var N=!1,A,S,C=h===void 0?null:h;return[function(){return w(u())},C===null?void 0:function(){return w(C())}]},[u,h,p,m]);var b=n(c,x[0],x[1]);return s(function(){y.hasValue=!0,y.value=b},[b]),l(b),b},$v}var o5;function z$(){return o5||(o5=1,Hv.exports=L$()),Hv.exports}var I$=z$();function zP(t){t()}function B$(){let t=null,e=null;return{clear(){t=null,e=null},notify(){zP(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=t;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const a=e={callback:r,next:null,prev:e};return a.prev?a.prev.next=a:t=a,function(){!n||t===null||(n=!1,a.next?a.next.prev=a.prev:e=a.prev,a.prev?a.prev.next=a.next:t=a.next)}}}}var l5={notify(){},get:()=>[]};function F$(t,e){let r,n=l5,a=0,s=!1;function o(b){h();const w=n.subscribe(b);let N=!1;return()=>{N||(N=!0,w(),p())}}function l(){n.notify()}function c(){y.onStateChange&&y.onStateChange()}function u(){return s}function h(){a++,r||(r=t.subscribe(c),n=B$())}function p(){a--,r&&a===0&&(r(),r=void 0,n.clear(),n=l5)}function m(){s||(s=!0,h())}function x(){s&&(s=!1,p())}const y={addNestedSub:o,notifyNestedSubs:l,handleChangeWrapper:c,isSubscribed:u,trySubscribe:m,tryUnsubscribe:x,getListeners:()=>n};return y}var H$=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",$$=H$(),Y$=()=>typeof navigator<"u"&&navigator.product==="ReactNative",U$=Y$(),W$=()=>$$||U$?O.useLayoutEffect:O.useEffect,X$=W$();function c5(t,e){return t===e?t!==0||e!==0||1/t===1/e:t!==t&&e!==e}function Eh(t,e){if(c5(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;const r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(let a=0;a<r.length;a++)if(!Object.prototype.hasOwnProperty.call(e,r[a])||!c5(t[r[a]],e[r[a]]))return!1;return!0}var V$=Symbol.for("react-redux-context"),q$=typeof globalThis<"u"?globalThis:{};function G$(){if(!O.createContext)return{};const t=q$[V$]??=new Map;let e=t.get(O.createContext);return e||(e=O.createContext(null),t.set(O.createContext,e)),e}var go=G$();function K$(t){const{children:e,context:r,serverState:n,store:a}=t,s=O.useMemo(()=>{const c=F$(a);return{store:a,subscription:c,getServerState:n?()=>n:void 0}},[a,n]),o=O.useMemo(()=>a.getState(),[a]);X$(()=>{const{subscription:c}=s;return c.onStateChange=c.notifyNestedSubs,c.trySubscribe(),o!==a.getState()&&c.notifyNestedSubs(),()=>{c.tryUnsubscribe(),c.onStateChange=void 0}},[s,o]);const l=r||go;return O.createElement(l.Provider,{value:s},e)}var IP=K$;function S4(t=go){return function(){return O.useContext(t)}}var BP=S4();function FP(t=go){const e=t===go?BP:S4(t),r=()=>{const{store:n}=e();return n};return Object.assign(r,{withTypes:()=>r}),r}var HP=FP();function Z$(t=go){const e=t===go?HP:FP(t),r=()=>e().dispatch;return Object.assign(r,{withTypes:()=>r}),r}var Ba=Z$(),Q$=(t,e)=>t===e;function J$(t=go){const e=t===go?BP:S4(t),r=(n,a={})=>{const{equalityFn:s=Q$}=typeof a=="function"?{equalityFn:a}:a,o=e(),{store:l,subscription:c,getServerState:u}=o;O.useRef(!0);const h=O.useCallback({[n.name](m){return n(m)}}[n.name],[n]),p=I$.useSyncExternalStoreWithSelector(c.addNestedSub,l.getState,u||l.getState,h,s);return O.useDebugValue(p),p};return Object.assign(r,{withTypes:()=>r}),r}var ua=J$(),eY=zP;function Ur(t){return`Minified Redux error #${t}; visit https://redux.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var tY=typeof Symbol=="function"&&Symbol.observable||"@@observable",d5=tY,Yv=()=>Math.random().toString(36).substring(7).split("").join("."),rY={INIT:`@@redux/INIT${Yv()}`,REPLACE:`@@redux/REPLACE${Yv()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Yv()}`},Qg=rY;function xo(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function $P(t,e,r){if(typeof t!="function")throw new Error(Ur(2));if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Ur(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Ur(1));return r($P)(t,e)}let n=t,a=e,s=new Map,o=s,l=0,c=!1;function u(){o===s&&(o=new Map,s.forEach((w,N)=>{o.set(N,w)}))}function h(){if(c)throw new Error(Ur(3));return a}function p(w){if(typeof w!="function")throw new Error(Ur(4));if(c)throw new Error(Ur(5));let N=!0;u();const A=l++;return o.set(A,w),function(){if(N){if(c)throw new Error(Ur(6));N=!1,u(),o.delete(A),s=null}}}function m(w){if(!xo(w))throw new Error(Ur(7));if(typeof w.type>"u")throw new Error(Ur(8));if(typeof w.type!="string")throw new Error(Ur(17));if(c)throw new Error(Ur(9));try{c=!0,a=n(a,w)}finally{c=!1}return(s=o).forEach(A=>{A()}),w}function x(w){if(typeof w!="function")throw new Error(Ur(10));n=w,m({type:Qg.REPLACE})}function y(){const w=p;return{subscribe(N){if(typeof N!="object"||N===null)throw new Error(Ur(11));function A(){const C=N;C.next&&C.next(h())}return A(),{unsubscribe:w(A)}},[d5](){return this}}}return m({type:Qg.INIT}),{dispatch:m,subscribe:p,getState:h,replaceReducer:x,[d5]:y}}function nY(t){Object.keys(t).forEach(e=>{const r=t[e];if(typeof r(void 0,{type:Qg.INIT})>"u")throw new Error(Ur(12));if(typeof r(void 0,{type:Qg.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ur(13))})}function A4(t){const e=Object.keys(t),r={};for(let s=0;s<e.length;s++){const o=e[s];typeof t[o]=="function"&&(r[o]=t[o])}const n=Object.keys(r);let a;try{nY(r)}catch(s){a=s}return function(o={},l){if(a)throw a;let c=!1;const u={};for(let h=0;h<n.length;h++){const p=n[h],m=r[p],x=o[p],y=m(x,l);if(typeof y>"u")throw l&&l.type,new Error(Ur(14));u[p]=y,c=c||y!==x}return c=c||n.length!==Object.keys(o).length,c?u:o}}function Jg(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,r)=>(...n)=>e(r(...n)))}function aY(...t){return e=>(r,n)=>{const a=e(r,n);let s=()=>{throw new Error(Ur(15))};const o={getState:a.getState,dispatch:(c,...u)=>s(c,...u)},l=t.map(c=>c(o));return s=Jg(...l)(a.dispatch),{...a,dispatch:s}}}function C4(t){return xo(t)&&"type"in t&&typeof t.type=="string"}var k4=Symbol.for("immer-nothing"),Oh=Symbol.for("immer-draftable"),In=Symbol.for("immer-state");function qr(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var zl=Object.getPrototypeOf;function Ts(t){return!!t&&!!t[In]}function ts(t){return t?YP(t)||Array.isArray(t)||!!t[Oh]||!!t.constructor?.[Oh]||Mf(t)||Ef(t):!1}var sY=Object.prototype.constructor.toString();function YP(t){if(!t||typeof t!="object")return!1;const e=zl(t);if(e===null)return!0;const r=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===sY}function iY(t){return Ts(t)||qr(15,t),t[In].base_}function Qh(t,e){Il(t)===0?Reflect.ownKeys(t).forEach(r=>{e(r,t[r],t)}):t.forEach((r,n)=>e(n,r,t))}function Il(t){const e=t[In];return e?e.type_:Array.isArray(t)?1:Mf(t)?2:Ef(t)?3:0}function Jh(t,e){return Il(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Uv(t,e){return Il(t)===2?t.get(e):t[e]}function UP(t,e,r){const n=Il(t);n===2?t.set(e,r):n===3?t.add(r):t[e]=r}function oY(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}function Mf(t){return t instanceof Map}function Ef(t){return t instanceof Set}function cl(t){return t.copy_||t.base_}function D2(t,e){if(Mf(t))return new Map(t);if(Ef(t))return new Set(t);if(Array.isArray(t))return Array.prototype.slice.call(t);const r=YP(t);if(e===!0||e==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(t);delete n[In];let a=Reflect.ownKeys(n);for(let s=0;s<a.length;s++){const o=a[s],l=n[o];l.writable===!1&&(l.writable=!0,l.configurable=!0),(l.get||l.set)&&(n[o]={configurable:!0,writable:!0,enumerable:l.enumerable,value:t[o]})}return Object.create(zl(t),n)}else{const n=zl(t);if(n!==null&&r)return{...t};const a=Object.create(n);return Object.assign(a,t)}}function D4(t,e=!1){return u0(t)||Ts(t)||!ts(t)||(Il(t)>1&&(t.set=t.add=t.clear=t.delete=lY),Object.freeze(t),e&&Object.entries(t).forEach(([r,n])=>D4(n,!0))),t}function lY(){qr(2)}function u0(t){return Object.isFrozen(t)}var T2={};function Bl(t){const e=T2[t];return e||qr(0,t),e}function cY(t,e){T2[t]||(T2[t]=e)}var ef;function WP(){return ef}function dY(t,e){return{drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function u5(t,e){e&&(Bl("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function M2(t){E2(t),t.drafts_.forEach(uY),t.drafts_=null}function E2(t){t===ef&&(ef=t.parent_)}function h5(t){return ef=dY(ef,t)}function uY(t){const e=t[In];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function f5(t,e){e.unfinalizedDrafts_=e.drafts_.length;const r=e.drafts_[0];return t!==void 0&&t!==r?(r[In].modified_&&(M2(e),qr(4)),ts(t)&&(t=ex(e,t),e.parent_||tx(e,t)),e.patches_&&Bl("Patches").generateReplacementPatches_(r[In].base_,t,e.patches_,e.inversePatches_)):t=ex(e,r,[]),M2(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==k4?t:void 0}function ex(t,e,r){if(u0(e))return e;const n=e[In];if(!n)return Qh(e,(a,s)=>p5(t,n,e,a,s,r)),e;if(n.scope_!==t)return e;if(!n.modified_)return tx(t,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;const a=n.copy_;let s=a,o=!1;n.type_===3&&(s=new Set(a),a.clear(),o=!0),Qh(s,(l,c)=>p5(t,n,a,l,c,r,o)),tx(t,a,!1),r&&t.patches_&&Bl("Patches").generatePatches_(n,r,t.patches_,t.inversePatches_)}return n.copy_}function p5(t,e,r,n,a,s,o){if(Ts(a)){const l=s&&e&&e.type_!==3&&!Jh(e.assigned_,n)?s.concat(n):void 0,c=ex(t,a,l);if(UP(r,n,c),Ts(c))t.canAutoFreeze_=!1;else return}else o&&r.add(a);if(ts(a)&&!u0(a)){if(!t.immer_.autoFreeze_&&t.unfinalizedDrafts_<1)return;ex(t,a),(!e||!e.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,n)&&tx(t,a)}}function tx(t,e,r=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&D4(e,r)}function hY(t,e){const r=Array.isArray(t),n={type_:r?1:0,scope_:e?e.scope_:WP(),modified_:!1,finalized_:!1,assigned_:{},parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1};let a=n,s=T4;r&&(a=[n],s=tf);const{revoke:o,proxy:l}=Proxy.revocable(a,s);return n.draft_=l,n.revoke_=o,l}var T4={get(t,e){if(e===In)return t;const r=cl(t);if(!Jh(r,e))return fY(t,r,e);const n=r[e];return t.finalized_||!ts(n)?n:n===Wv(t.base_,e)?(Xv(t),t.copy_[e]=P2(n,t)):n},has(t,e){return e in cl(t)},ownKeys(t){return Reflect.ownKeys(cl(t))},set(t,e,r){const n=XP(cl(t),e);if(n?.set)return n.set.call(t.draft_,r),!0;if(!t.modified_){const a=Wv(cl(t),e),s=a?.[In];if(s&&s.base_===r)return t.copy_[e]=r,t.assigned_[e]=!1,!0;if(oY(r,a)&&(r!==void 0||Jh(t.base_,e)))return!0;Xv(t),O2(t)}return t.copy_[e]===r&&(r!==void 0||e in t.copy_)||Number.isNaN(r)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=r,t.assigned_[e]=!0),!0},deleteProperty(t,e){return Wv(t.base_,e)!==void 0||e in t.base_?(t.assigned_[e]=!1,Xv(t),O2(t)):delete t.assigned_[e],t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){const r=cl(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{writable:!0,configurable:t.type_!==1||e!=="length",enumerable:n.enumerable,value:r[e]}},defineProperty(){qr(11)},getPrototypeOf(t){return zl(t.base_)},setPrototypeOf(){qr(12)}},tf={};Qh(T4,(t,e)=>{tf[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}});tf.deleteProperty=function(t,e){return tf.set.call(this,t,e,void 0)};tf.set=function(t,e,r){return T4.set.call(this,t[0],e,r,t[0])};function Wv(t,e){const r=t[In];return(r?cl(r):t)[e]}function fY(t,e,r){const n=XP(e,r);return n?"value"in n?n.value:n.get?.call(t.draft_):void 0}function XP(t,e){if(!(e in t))return;let r=zl(t);for(;r;){const n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=zl(r)}}function O2(t){t.modified_||(t.modified_=!0,t.parent_&&O2(t.parent_))}function Xv(t){t.copy_||(t.copy_=D2(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var pY=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,r,n)=>{if(typeof e=="function"&&typeof r!="function"){const s=r;r=e;const o=this;return function(c=s,...u){return o.produce(c,h=>r.call(this,h,...u))}}typeof r!="function"&&qr(6),n!==void 0&&typeof n!="function"&&qr(7);let a;if(ts(e)){const s=h5(this),o=P2(e,void 0);let l=!0;try{a=r(o),l=!1}finally{l?M2(s):E2(s)}return u5(s,n),f5(a,s)}else if(!e||typeof e!="object"){if(a=r(e),a===void 0&&(a=e),a===k4&&(a=void 0),this.autoFreeze_&&D4(a,!0),n){const s=[],o=[];Bl("Patches").generateReplacementPatches_(e,a,s,o),n(s,o)}return a}else qr(1,e)},this.produceWithPatches=(e,r)=>{if(typeof e=="function")return(o,...l)=>this.produceWithPatches(o,c=>e(c,...l));let n,a;return[this.produce(e,r,(o,l)=>{n=o,a=l}),n,a]},typeof t?.autoFreeze=="boolean"&&this.setAutoFreeze(t.autoFreeze),typeof t?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(t.useStrictShallowCopy)}createDraft(t){ts(t)||qr(8),Ts(t)&&(t=pi(t));const e=h5(this),r=P2(t,void 0);return r[In].isManual_=!0,E2(e),r}finishDraft(t,e){const r=t&&t[In];(!r||!r.isManual_)&&qr(9);const{scope_:n}=r;return u5(n,e),f5(void 0,n)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}applyPatches(t,e){let r;for(r=e.length-1;r>=0;r--){const a=e[r];if(a.path.length===0&&a.op==="replace"){t=a.value;break}}r>-1&&(e=e.slice(r+1));const n=Bl("Patches").applyPatches_;return Ts(t)?n(t,e):this.produce(t,a=>n(a,e))}};function P2(t,e){const r=Mf(t)?Bl("MapSet").proxyMap_(t,e):Ef(t)?Bl("MapSet").proxySet_(t,e):hY(t,e);return(e?e.scope_:WP()).drafts_.push(r),r}function pi(t){return Ts(t)||qr(10,t),VP(t)}function VP(t){if(!ts(t)||u0(t))return t;const e=t[In];let r;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,r=D2(t,e.scope_.immer_.useStrictShallowCopy_)}else r=D2(t,!0);return Qh(r,(n,a)=>{UP(r,n,VP(a))}),e&&(e.finalized_=!1),r}function mY(){const e="replace",n="remove";function a(m,x,y,b){switch(m.type_){case 0:case 2:return o(m,x,y,b);case 1:return s(m,x,y,b);case 3:return l(m,x,y,b)}}function s(m,x,y,b){let{base_:w,assigned_:N}=m,A=m.copy_;A.length<w.length&&([w,A]=[A,w],[y,b]=[b,y]);for(let S=0;S<w.length;S++)if(N[S]&&A[S]!==w[S]){const C=x.concat([S]);y.push({op:e,path:C,value:p(A[S])}),b.push({op:e,path:C,value:p(w[S])})}for(let S=w.length;S<A.length;S++){const C=x.concat([S]);y.push({op:"add",path:C,value:p(A[S])})}for(let S=A.length-1;w.length<=S;--S){const C=x.concat([S]);b.push({op:n,path:C})}}function o(m,x,y,b){const{base_:w,copy_:N}=m;Qh(m.assigned_,(A,S)=>{const C=Uv(w,A),k=Uv(N,A),T=S?Jh(w,A)?e:"add":n;if(C===k&&T===e)return;const E=x.concat(A);y.push(T===n?{op:T,path:E}:{op:T,path:E,value:k}),b.push(T==="add"?{op:n,path:E}:T===n?{op:"add",path:E,value:p(C)}:{op:e,path:E,value:p(C)})})}function l(m,x,y,b){let{base_:w,copy_:N}=m,A=0;w.forEach(S=>{if(!N.has(S)){const C=x.concat([A]);y.push({op:n,path:C,value:S}),b.unshift({op:"add",path:C,value:S})}A++}),A=0,N.forEach(S=>{if(!w.has(S)){const C=x.concat([A]);y.push({op:"add",path:C,value:S}),b.unshift({op:n,path:C,value:S})}A++})}function c(m,x,y,b){y.push({op:e,path:[],value:x===k4?void 0:x}),b.push({op:e,path:[],value:m})}function u(m,x){return x.forEach(y=>{const{path:b,op:w}=y;let N=m;for(let k=0;k<b.length-1;k++){const T=Il(N);let E=b[k];typeof E!="string"&&typeof E!="number"&&(E=""+E),(T===0||T===1)&&(E==="__proto__"||E==="constructor")&&qr(19),typeof N=="function"&&E==="prototype"&&qr(19),N=Uv(N,E),typeof N!="object"&&qr(18,b.join("/"))}const A=Il(N),S=h(y.value),C=b[b.length-1];switch(w){case e:switch(A){case 2:return N.set(C,S);case 3:qr(16);default:return N[C]=S}case"add":switch(A){case 1:return C==="-"?N.push(S):N.splice(C,0,S);case 2:return N.set(C,S);case 3:return N.add(S);default:return N[C]=S}case n:switch(A){case 1:return N.splice(C,1);case 2:return N.delete(C);case 3:return N.delete(y.value);default:return delete N[C]}default:qr(17,w)}}),m}function h(m){if(!ts(m))return m;if(Array.isArray(m))return m.map(h);if(Mf(m))return new Map(Array.from(m.entries()).map(([y,b])=>[y,h(b)]));if(Ef(m))return new Set(Array.from(m).map(h));const x=Object.create(zl(m));for(const y in m)x[y]=h(m[y]);return Jh(m,Oh)&&(x[Oh]=m[Oh]),x}function p(m){return Ts(m)?h(m):m}cY("Patches",{applyPatches_:u,generatePatches_:a,generateReplacementPatches_:c})}var oa=new pY,Of=oa.produce,qP=oa.produceWithPatches.bind(oa);oa.setAutoFreeze.bind(oa);oa.setUseStrictShallowCopy.bind(oa);var m5=oa.applyPatches.bind(oa);oa.createDraft.bind(oa);oa.finishDraft.bind(oa);function gY(t,e=`expected a function, instead received ${typeof t}`){if(typeof t!="function")throw new TypeError(e)}function xY(t,e=`expected an object, instead received ${typeof t}`){if(typeof t!="object")throw new TypeError(e)}function bY(t,e="expected all items to be functions, instead received the following types: "){if(!t.every(r=>typeof r=="function")){const r=t.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${e}[${r}]`)}}var g5=t=>Array.isArray(t)?t:[t];function yY(t){const e=Array.isArray(t[0])?t[0]:t;return bY(e,"createSelector expects all input-selectors to be functions, but received the following types: "),e}function vY(t,e){const r=[],{length:n}=t;for(let a=0;a<n;a++)r.push(t[a].apply(null,e));return r}var wY=class{constructor(t){this.value=t}deref(){return this.value}},jY=typeof WeakRef<"u"?WeakRef:wY,NY=0,x5=1;function _m(){return{s:NY,v:void 0,o:null,p:null}}function rx(t,e={}){let r=_m();const{resultEqualityCheck:n}=e;let a,s=0;function o(){let l=r;const{length:c}=arguments;for(let p=0,m=c;p<m;p++){const x=arguments[p];if(typeof x=="function"||typeof x=="object"&&x!==null){let y=l.o;y===null&&(l.o=y=new WeakMap);const b=y.get(x);b===void 0?(l=_m(),y.set(x,l)):l=b}else{let y=l.p;y===null&&(l.p=y=new Map);const b=y.get(x);b===void 0?(l=_m(),y.set(x,l)):l=b}}const u=l;let h;if(l.s===x5)h=l.v;else if(h=t.apply(null,arguments),s++,n){const p=a?.deref?.()??a;p!=null&&n(p,h)&&(h=p,s!==0&&s--),a=typeof h=="object"&&h!==null||typeof h=="function"?new jY(h):h}return u.s=x5,u.v=h,h}return o.clearCache=()=>{r=_m(),o.resetResultsCount()},o.resultsCount=()=>s,o.resetResultsCount=()=>{s=0},o}function SY(t,...e){const r=typeof t=="function"?{memoize:t,memoizeOptions:e}:t,n=(...a)=>{let s=0,o=0,l,c={},u=a.pop();typeof u=="object"&&(c=u,u=a.pop()),gY(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);const h={...r,...c},{memoize:p,memoizeOptions:m=[],argsMemoize:x=rx,argsMemoizeOptions:y=[]}=h,b=g5(m),w=g5(y),N=yY(a),A=p(function(){return s++,u.apply(null,arguments)},...b),S=x(function(){o++;const k=vY(N,arguments);return l=A.apply(null,k),l},...w);return Object.assign(S,{resultFunc:u,memoizedResultFunc:A,dependencies:N,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>l,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:p,argsMemoize:x})};return Object.assign(n,{withTypes:()=>n}),n}var de=SY(rx),AY=Object.assign((t,e=de)=>{xY(t,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof t}`);const r=Object.keys(t),n=r.map(s=>t[s]);return e(n,(...s)=>s.reduce((o,l,c)=>(o[r[c]]=l,o),{}))},{withTypes:()=>AY});function GP(t){return({dispatch:r,getState:n})=>a=>s=>typeof s=="function"?s(r,n,t):a(s)}var CY=GP(),kY=GP,DY=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Jg:Jg.apply(null,arguments)},TY=t=>t&&typeof t.match=="function";function cr(t,e){function r(...n){if(e){let a=e(...n);if(!a)throw new Error(xn(0));return{type:t,payload:a.payload,..."meta"in a&&{meta:a.meta},..."error"in a&&{error:a.error}}}return{type:t,payload:n[0]}}return r.toString=()=>`${t}`,r.type=t,r.match=n=>C4(n)&&n.type===t,r}var KP=class wh extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,wh.prototype)}static get[Symbol.species](){return wh}concat(...e){return super.concat.apply(this,e)}prepend(...e){return e.length===1&&Array.isArray(e[0])?new wh(...e[0].concat(this)):new wh(...e.concat(this))}};function b5(t){return ts(t)?Of(t,()=>{}):t}function Rm(t,e,r){return t.has(e)?t.get(e):t.set(e,r(e)).get(e)}function MY(t){return typeof t=="boolean"}var EY=()=>function(e){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:a=!0,actionCreatorCheck:s=!0}=e??{};let o=new KP;return r&&(MY(r)?o.push(CY):o.push(kY(r.extraArgument))),o},h0="RTK_autoBatch",eh=()=>t=>({payload:t,meta:{[h0]:!0}}),y5=t=>e=>{setTimeout(e,t)},OY=(t={type:"raf"})=>e=>(...r)=>{const n=e(...r);let a=!0,s=!1,o=!1;const l=new Set,c=t.type==="tick"?queueMicrotask:t.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:y5(10):t.type==="callback"?t.queueNotification:y5(t.timeout),u=()=>{o=!1,s&&(s=!1,l.forEach(h=>h()))};return Object.assign({},n,{subscribe(h){const p=()=>a&&h(),m=n.subscribe(p);return l.add(h),()=>{m(),l.delete(h)}},dispatch(h){try{return a=!h?.meta?.[h0],s=!a,s&&(o||(o=!0,c(u))),n.dispatch(h)}finally{a=!0}}})},PY=t=>function(r){const{autoBatch:n=!0}=r??{};let a=new KP(t);return n&&a.push(OY(typeof n=="object"?n:void 0)),a};function ZP(t){const e=EY(),{reducer:r=void 0,middleware:n,devTools:a=!0,duplicateMiddlewareCheck:s=!0,preloadedState:o=void 0,enhancers:l=void 0}=t||{};let c;if(typeof r=="function")c=r;else if(xo(r))c=A4(r);else throw new Error(xn(1));let u;typeof n=="function"?u=n(e):u=e();let h=Jg;a&&(h=DY({trace:!1,...typeof a=="object"&&a}));const p=aY(...u),m=PY(p);let x=typeof l=="function"?l(m):m();const y=h(...x);return $P(c,o,y)}function QP(t){const e={},r=[];let n;const a={addCase(s,o){const l=typeof s=="string"?s:s.type;if(!l)throw new Error(xn(28));if(l in e)throw new Error(xn(29));return e[l]=o,a},addMatcher(s,o){return r.push({matcher:s,reducer:o}),a},addDefaultCase(s){return n=s,a}};return t(a),[e,r,n]}function _Y(t){return typeof t=="function"}function RY(t,e){let[r,n,a]=QP(e),s;if(_Y(t))s=()=>b5(t());else{const l=b5(t);s=()=>l}function o(l=s(),c){let u=[r[c.type],...n.filter(({matcher:h})=>h(c)).map(({reducer:h})=>h)];return u.filter(h=>!!h).length===0&&(u=[a]),u.reduce((h,p)=>{if(p)if(Ts(h)){const x=p(h,c);return x===void 0?h:x}else{if(ts(h))return Of(h,m=>p(m,c));{const m=p(h,c);if(m===void 0){if(h===null)return h;throw Error("A case reducer on a non-draftable value must not return undefined")}return m}}return h},l)}return o.getInitialState=s,o}var JP=(t,e)=>TY(t)?t.match(e):t(e);function xi(...t){return e=>t.some(r=>JP(r,e))}function Ph(...t){return e=>t.every(r=>JP(r,e))}function f0(t,e){if(!t||!t.meta)return!1;const r=typeof t.meta.requestId=="string",n=e.indexOf(t.meta.requestStatus)>-1;return r&&n}function Pf(t){return typeof t[0]=="function"&&"pending"in t[0]&&"fulfilled"in t[0]&&"rejected"in t[0]}function M4(...t){return t.length===0?e=>f0(e,["pending"]):Pf(t)?xi(...t.map(e=>e.pending)):M4()(t[0])}function fd(...t){return t.length===0?e=>f0(e,["rejected"]):Pf(t)?xi(...t.map(e=>e.rejected)):fd()(t[0])}function p0(...t){const e=r=>r&&r.meta&&r.meta.rejectedWithValue;return t.length===0?Ph(fd(...t),e):Pf(t)?Ph(fd(...t),e):p0()(t[0])}function bo(...t){return t.length===0?e=>f0(e,["fulfilled"]):Pf(t)?xi(...t.map(e=>e.fulfilled)):bo()(t[0])}function _2(...t){return t.length===0?e=>f0(e,["pending","fulfilled","rejected"]):Pf(t)?xi(...t.flatMap(e=>[e.pending,e.rejected,e.fulfilled])):_2()(t[0])}var LY="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",m0=(t=21)=>{let e="",r=t;for(;r--;)e+=LY[Math.random()*64|0];return e},zY=["name","message","stack","code"],Vv=class{constructor(t,e){this.payload=t,this.meta=e}_type},v5=class{constructor(t,e){this.payload=t,this.meta=e}_type},IY=t=>{if(typeof t=="object"&&t!==null){const e={};for(const r of zY)typeof t[r]=="string"&&(e[r]=t[r]);return e}return{message:String(t)}},w5="External signal was aborted",Zt=(()=>{function t(e,r,n){const a=cr(e+"/fulfilled",(c,u,h,p)=>({payload:c,meta:{...p||{},arg:h,requestId:u,requestStatus:"fulfilled"}})),s=cr(e+"/pending",(c,u,h)=>({payload:void 0,meta:{...h||{},arg:u,requestId:c,requestStatus:"pending"}})),o=cr(e+"/rejected",(c,u,h,p,m)=>({payload:p,error:(n&&n.serializeError||IY)(c||"Rejected"),meta:{...m||{},arg:h,requestId:u,rejectedWithValue:!!p,requestStatus:"rejected",aborted:c?.name==="AbortError",condition:c?.name==="ConditionError"}}));function l(c,{signal:u}={}){return(h,p,m)=>{const x=n?.idGenerator?n.idGenerator(c):m0(),y=new AbortController;let b,w;function N(S){w=S,y.abort()}u&&(u.aborted?N(w5):u.addEventListener("abort",()=>N(w5),{once:!0}));const A=async function(){let S;try{let k=n?.condition?.(c,{getState:p,extra:m});if(FY(k)&&(k=await k),k===!1||y.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const T=new Promise((E,_)=>{b=()=>{_({name:"AbortError",message:w||"Aborted"})},y.signal.addEventListener("abort",b)});h(s(x,c,n?.getPendingMeta?.({requestId:x,arg:c},{getState:p,extra:m}))),S=await Promise.race([T,Promise.resolve(r(c,{dispatch:h,getState:p,extra:m,requestId:x,signal:y.signal,abort:N,rejectWithValue:(E,_)=>new Vv(E,_),fulfillWithValue:(E,_)=>new v5(E,_)})).then(E=>{if(E instanceof Vv)throw E;return E instanceof v5?a(E.payload,x,c,E.meta):a(E,x,c)})])}catch(k){S=k instanceof Vv?o(null,x,c,k.payload,k.meta):o(k,x,c)}finally{b&&y.signal.removeEventListener("abort",b)}return n&&!n.dispatchConditionRejection&&o.match(S)&&S.meta.condition||h(S),S}();return Object.assign(A,{abort:N,requestId:x,arg:c,unwrap(){return A.then(BY)}})}}return Object.assign(l,{pending:s,rejected:o,fulfilled:a,settled:xi(o,a),typePrefix:e})}return t.withTypes=()=>t,t})();function BY(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function FY(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var HY=Symbol.for("rtk-slice-createasyncthunk");function $Y(t,e){return`${t}/${e}`}function YY({creators:t}={}){const e=t?.asyncThunk?.[HY];return function(n){const{name:a,reducerPath:s=a}=n;if(!a)throw new Error(xn(11));const o=(typeof n.reducers=="function"?n.reducers(WY()):n.reducers)||{},l=Object.keys(o),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},u={addCase(S,C){const k=typeof S=="string"?S:S.type;if(!k)throw new Error(xn(12));if(k in c.sliceCaseReducersByType)throw new Error(xn(13));return c.sliceCaseReducersByType[k]=C,u},addMatcher(S,C){return c.sliceMatchers.push({matcher:S,reducer:C}),u},exposeAction(S,C){return c.actionCreators[S]=C,u},exposeCaseReducer(S,C){return c.sliceCaseReducersByName[S]=C,u}};l.forEach(S=>{const C=o[S],k={reducerName:S,type:$Y(a,S),createNotation:typeof n.reducers=="function"};VY(C)?GY(k,C,u,e):XY(k,C,u)});function h(){const[S={},C=[],k=void 0]=typeof n.extraReducers=="function"?QP(n.extraReducers):[n.extraReducers],T={...S,...c.sliceCaseReducersByType};return RY(n.initialState,E=>{for(let _ in T)E.addCase(_,T[_]);for(let _ of c.sliceMatchers)E.addMatcher(_.matcher,_.reducer);for(let _ of C)E.addMatcher(_.matcher,_.reducer);k&&E.addDefaultCase(k)})}const p=S=>S,m=new Map,x=new WeakMap;let y;function b(S,C){return y||(y=h()),y(S,C)}function w(){return y||(y=h()),y.getInitialState()}function N(S,C=!1){function k(E){let _=E[S];return typeof _>"u"&&C&&(_=Rm(x,k,w)),_}function T(E=p){const _=Rm(m,C,()=>new WeakMap);return Rm(_,E,()=>{const L={};for(const[P,R]of Object.entries(n.selectors??{}))L[P]=UY(R,E,()=>Rm(x,E,w),C);return L})}return{reducerPath:S,getSelectors:T,get selectors(){return T(k)},selectSlice:k}}const A={name:a,reducer:b,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:w,...N(s),injectInto(S,{reducerPath:C,...k}={}){const T=C??s;return S.inject({reducerPath:T,reducer:b},k),{...A,...N(T,!0)}}};return A}}function UY(t,e,r,n){function a(s,...o){let l=e(s);return typeof l>"u"&&n&&(l=r()),t(l,...o)}return a.unwrapped=t,a}var $t=YY();function WY(){function t(e,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...r}}return t.withTypes=()=>t,{reducer(e){return Object.assign({[e.name](...r){return e(...r)}}[e.name],{_reducerDefinitionType:"reducer"})},preparedReducer(e,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:r}},asyncThunk:t}}function XY({type:t,reducerName:e,createNotation:r},n,a){let s,o;if("reducer"in n){if(r&&!qY(n))throw new Error(xn(17));s=n.reducer,o=n.prepare}else s=n;a.addCase(t,s).exposeCaseReducer(e,s).exposeAction(e,o?cr(t,o):cr(t))}function VY(t){return t._reducerDefinitionType==="asyncThunk"}function qY(t){return t._reducerDefinitionType==="reducerWithPrepare"}function GY({type:t,reducerName:e},r,n,a){if(!a)throw new Error(xn(18));const{payloadCreator:s,fulfilled:o,pending:l,rejected:c,settled:u,options:h}=r,p=a(t,s,h);n.exposeAction(e,p),o&&n.addCase(p.fulfilled,o),l&&n.addCase(p.pending,l),c&&n.addCase(p.rejected,c),u&&n.addMatcher(p.settled,u),n.exposeCaseReducer(e,{fulfilled:o||Lm,pending:l||Lm,rejected:c||Lm,settled:u||Lm})}function Lm(){}var KY="task",e8="listener",t8="completed",E4="cancelled",ZY=`task-${E4}`,QY=`task-${t8}`,R2=`${e8}-${E4}`,JY=`${e8}-${t8}`,g0=class{constructor(t){this.code=t,this.message=`${KY} ${E4} (reason: ${t})`}name="TaskAbortError";message},O4=(t,e)=>{if(typeof t!="function")throw new TypeError(xn(32))},nx=()=>{},r8=(t,e=nx)=>(t.catch(e),t),n8=(t,e)=>(t.addEventListener("abort",e,{once:!0}),()=>t.removeEventListener("abort",e)),Dl=(t,e)=>{const r=t.signal;r.aborted||("reason"in r||Object.defineProperty(r,"reason",{enumerable:!0,value:e,configurable:!0,writable:!0}),t.abort(e))},Tl=t=>{if(t.aborted){const{reason:e}=t;throw new g0(e)}};function a8(t,e){let r=nx;return new Promise((n,a)=>{const s=()=>a(new g0(t.reason));if(t.aborted){s();return}r=n8(t,s),e.finally(()=>r()).then(n,a)}).finally(()=>{r=nx})}var eU=async(t,e)=>{try{return await Promise.resolve(),{status:"ok",value:await t()}}catch(r){return{status:r instanceof g0?"cancelled":"rejected",error:r}}finally{e?.()}},ax=t=>e=>r8(a8(t,e).then(r=>(Tl(t),r))),s8=t=>{const e=ax(t);return r=>e(new Promise(n=>setTimeout(n,r)))},{assign:nd}=Object,j5={},x0="listenerMiddleware",tU=(t,e)=>{const r=n=>n8(t,()=>Dl(n,t.reason));return(n,a)=>{O4(n);const s=new AbortController;r(s);const o=eU(async()=>{Tl(t),Tl(s.signal);const l=await n({pause:ax(s.signal),delay:s8(s.signal),signal:s.signal});return Tl(s.signal),l},()=>Dl(s,QY));return a?.autoJoin&&e.push(o.catch(nx)),{result:ax(t)(o),cancel(){Dl(s,ZY)}}}},rU=(t,e)=>{const r=async(n,a)=>{Tl(e);let s=()=>{};const l=[new Promise((c,u)=>{let h=t({predicate:n,effect:(p,m)=>{m.unsubscribe(),c([p,m.getState(),m.getOriginalState()])}});s=()=>{h(),u()}})];a!=null&&l.push(new Promise(c=>setTimeout(c,a,null)));try{const c=await a8(e,Promise.race(l));return Tl(e),c}finally{s()}};return(n,a)=>r8(r(n,a))},i8=t=>{let{type:e,actionCreator:r,matcher:n,predicate:a,effect:s}=t;if(e)a=cr(e).match;else if(r)e=r.type,a=r.match;else if(n)a=n;else if(!a)throw new Error(xn(21));return O4(s),{predicate:a,type:e,effect:s}},o8=nd(t=>{const{type:e,predicate:r,effect:n}=i8(t);return{id:m0(),effect:n,type:e,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(xn(22))}}},{withTypes:()=>o8}),N5=(t,e)=>{const{type:r,effect:n,predicate:a}=i8(e);return Array.from(t.values()).find(s=>(typeof r=="string"?s.type===r:s.predicate===a)&&s.effect===n)},L2=t=>{t.pending.forEach(e=>{Dl(e,R2)})},nU=t=>()=>{t.forEach(L2),t.clear()},S5=(t,e,r)=>{try{t(e,r)}catch(n){setTimeout(()=>{throw n},0)}},l8=nd(cr(`${x0}/add`),{withTypes:()=>l8}),aU=cr(`${x0}/removeAll`),c8=nd(cr(`${x0}/remove`),{withTypes:()=>c8}),sU=(...t)=>{console.error(`${x0}/error`,...t)},_f=(t={})=>{const e=new Map,{extra:r,onError:n=sU}=t;O4(n);const a=h=>(h.unsubscribe=()=>e.delete(h.id),e.set(h.id,h),p=>{h.unsubscribe(),p?.cancelActive&&L2(h)}),s=h=>{const p=N5(e,h)??o8(h);return a(p)};nd(s,{withTypes:()=>s});const o=h=>{const p=N5(e,h);return p&&(p.unsubscribe(),h.cancelActive&&L2(p)),!!p};nd(o,{withTypes:()=>o});const l=async(h,p,m,x)=>{const y=new AbortController,b=rU(s,y.signal),w=[];try{h.pending.add(y),await Promise.resolve(h.effect(p,nd({},m,{getOriginalState:x,condition:(N,A)=>b(N,A).then(Boolean),take:b,delay:s8(y.signal),pause:ax(y.signal),extra:r,signal:y.signal,fork:tU(y.signal,w),unsubscribe:h.unsubscribe,subscribe:()=>{e.set(h.id,h)},cancelActiveListeners:()=>{h.pending.forEach((N,A,S)=>{N!==y&&(Dl(N,R2),S.delete(N))})},cancel:()=>{Dl(y,R2),h.pending.delete(y)},throwIfCancelled:()=>{Tl(y.signal)}})))}catch(N){N instanceof g0||S5(n,N,{raisedBy:"effect"})}finally{await Promise.all(w),Dl(y,JY),h.pending.delete(y)}},c=nU(e);return{middleware:h=>p=>m=>{if(!C4(m))return p(m);if(l8.match(m))return s(m.payload);if(aU.match(m)){c();return}if(c8.match(m))return o(m.payload);let x=h.getState();const y=()=>{if(x===j5)throw new Error(xn(23));return x};let b;try{if(b=p(m),e.size>0){const w=h.getState(),N=Array.from(e.values());for(const A of N){let S=!1;try{S=A.predicate(m,w,x)}catch(C){S=!1,S5(n,C,{raisedBy:"predicate"})}S&&l(A,m,h,y)}}}finally{x=j5}return b},startListening:s,stopListening:o,clearListeners:c}};function xn(t){return`Minified Redux Toolkit error #${t}; visit https://redux-toolkit.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}const rf=t=>{if(!t)return!1;try{const e=JSON.parse(atob(t.split(".")[1])),r=Date.now()/1e3;return e.exp&&e.exp>r}catch(e){return console.error("Error validating token:",e),!1}},A5=t=>{if(!t)return null;try{const e=JSON.parse(atob(t.split(".")[1]));return e.exp?new Date(e.exp*1e3):null}catch(e){return console.error("Error getting token expiration:",e),null}},_h=()=>{try{const t=localStorage.getItem("token"),e=JSON.parse(localStorage.getItem("user")||"null"),r=localStorage.getItem("sessionExpiry");return r&&new Date>new Date(r)?(console.log("Session expired based on stored expiry time"),localStorage.removeItem("token"),localStorage.removeItem("user"),localStorage.removeItem("sessionExpiry"),{token:null,user:null}):t&&rf(t)?{token:t,user:e}:(localStorage.removeItem("token"),localStorage.removeItem("user"),localStorage.removeItem("sessionExpiry"),{token:null,user:null})}catch(t){return console.error("Error reading from localStorage:",t),localStorage.removeItem("token"),localStorage.removeItem("user"),localStorage.removeItem("sessionExpiry"),{token:null,user:null}}},iU={user:_h().user,token:_h().token,isAuthenticated:!!_h().token,loading:!1,error:null,sessionExpired:!1},d8=$t({name:"auth",initialState:iU,reducers:{setCredentials:(t,e)=>{const{token:r,user:n,rememberMe:a=!1}=e.payload;t.token=r,t.user=n,t.isAuthenticated=!0,t.error=null,t.sessionExpired=!1;const s=a?localStorage:sessionStorage;s.setItem("token",r),n&&s.setItem("user",JSON.stringify(n)),localStorage.setItem("token",r),n&&localStorage.setItem("user",JSON.stringify(n))},logout:(t,e)=>{const r=e.payload?.reason||"manual";console.log(`Logging out user. Reason: ${r}`),t.user=null,t.token=null,t.isAuthenticated=!1,t.sessionExpired=r==="expired",t.error=r==="expired"?"Session expired. Please login again.":null,localStorage.removeItem("token"),localStorage.removeItem("user"),localStorage.removeItem("sessionExpiry"),sessionStorage.removeItem("token"),sessionStorage.removeItem("user"),sessionStorage.removeItem("sessionExpiry"),localStorage.removeItem("lastActivity")},clearSessionExpired:t=>{t.sessionExpired=!1,t.error=null},setError:(t,e)=>{t.error=e.payload,t.loading=!1},setLoading:(t,e)=>{t.loading=e.payload},checkTokenValidity:t=>{const{token:e,user:r}=_h();!e||!rf(e)?(t.user=null,t.token=null,t.isAuthenticated=!1,t.sessionExpired=!0,t.error="Session expired. Please login again.",localStorage.removeItem("token"),localStorage.removeItem("user"),localStorage.removeItem("sessionExpiry"),sessionStorage.removeItem("token"),sessionStorage.removeItem("user"),sessionStorage.removeItem("sessionExpiry")):localStorage.setItem("lastActivity",new Date().toISOString())},recoverSession:t=>{const{token:e,user:r}=_h();e&&r&&rf(e)&&(t.token=e,t.user=r,t.isAuthenticated=!0,t.error=null,console.log("Session recovered successfully"))},updateLastActivity:t=>{t.isAuthenticated&&localStorage.setItem("lastActivity",new Date().toISOString())}}}),{setCredentials:u8,logout:pd,clearSessionExpired:Z1e,setError:C5,setLoading:k5,checkTokenValidity:D5,recoverSession:Q1e,updateLastActivity:J1e}=d8.actions,oU=d8.reducer,Te=({children:t})=>{const{isAuthenticated:e,token:r}=ua(a=>a.auth),n=Cr();if(!e||!r)return i.jsx(Bv,{to:"/",state:{from:n},replace:!0});try{if(r){const a=JSON.parse(atob(r.split(".")[1])),s=Date.now()/1e3;if(a.exp&&a.exp<s)return localStorage.removeItem("token"),i.jsx(Bv,{to:"/",state:{from:n},replace:!0})}}catch(a){return console.error("Invalid token format:",a),localStorage.removeItem("token"),i.jsx(Bv,{to:"/",state:{from:n},replace:!0})}return t},lU="modulepreload",cU=function(t,e){return new URL(t,e).href},T5={},dU=function(e,r,n){let a=Promise.resolve();if(r&&r.length>0){let u=function(h){return Promise.all(h.map(p=>Promise.resolve(p).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};const o=document.getElementsByTagName("link"),l=document.querySelector("meta[property=csp-nonce]"),c=l?.nonce||l?.getAttribute("nonce");a=u(r.map(h=>{if(h=cU(h,n),h in T5)return;T5[h]=!0;const p=h.endsWith(".css"),m=p?'[rel="stylesheet"]':"";if(!!n)for(let b=o.length-1;b>=0;b--){const w=o[b];if(w.href===h&&(!p||w.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${h}"]${m}`))return;const y=document.createElement("link");if(y.rel=p?"stylesheet":lU,p||(y.as="script"),y.crossOrigin="",y.href=h,c&&y.setAttribute("nonce",c),document.head.appendChild(y),p)return new Promise((b,w)=>{y.addEventListener("load",b),y.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${h}`)))})}))}function s(o){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o}return a.then(o=>{for(const l of o||[])l.status==="rejected"&&s(l.reason);return e().catch(s)})};function h8(t,e){return function(){return t.apply(e,arguments)}}const{toString:uU}=Object.prototype,{getPrototypeOf:P4}=Object,{iterator:b0,toStringTag:f8}=Symbol,y0=(t=>e=>{const r=uU.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),is=t=>(t=t.toLowerCase(),e=>y0(e)===t),v0=t=>e=>typeof e===t,{isArray:Pd}=Array,nf=v0("undefined");function Rf(t){return t!==null&&!nf(t)&&t.constructor!==null&&!nf(t.constructor)&&Rn(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const p8=is("ArrayBuffer");function hU(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&p8(t.buffer),e}const fU=v0("string"),Rn=v0("function"),m8=v0("number"),Lf=t=>t!==null&&typeof t=="object",pU=t=>t===!0||t===!1,Ng=t=>{if(y0(t)!=="object")return!1;const e=P4(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(f8 in t)&&!(b0 in t)},mU=t=>{if(!Lf(t)||Rf(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},gU=is("Date"),xU=is("File"),bU=is("Blob"),yU=is("FileList"),vU=t=>Lf(t)&&Rn(t.pipe),wU=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Rn(t.append)&&((e=y0(t))==="formdata"||e==="object"&&Rn(t.toString)&&t.toString()==="[object FormData]"))},jU=is("URLSearchParams"),[NU,SU,AU,CU]=["ReadableStream","Request","Response","Headers"].map(is),kU=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function zf(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let n,a;if(typeof t!="object"&&(t=[t]),Pd(t))for(n=0,a=t.length;n<a;n++)e.call(null,t[n],n,t);else{if(Rf(t))return;const s=r?Object.getOwnPropertyNames(t):Object.keys(t),o=s.length;let l;for(n=0;n<o;n++)l=s[n],e.call(null,t[l],l,t)}}function g8(t,e){if(Rf(t))return null;e=e.toLowerCase();const r=Object.keys(t);let n=r.length,a;for(;n-- >0;)if(a=r[n],e===a.toLowerCase())return a;return null}const gl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,x8=t=>!nf(t)&&t!==gl;function z2(){const{caseless:t}=x8(this)&&this||{},e={},r=(n,a)=>{const s=t&&g8(e,a)||a;Ng(e[s])&&Ng(n)?e[s]=z2(e[s],n):Ng(n)?e[s]=z2({},n):Pd(n)?e[s]=n.slice():e[s]=n};for(let n=0,a=arguments.length;n<a;n++)arguments[n]&&zf(arguments[n],r);return e}const DU=(t,e,r,{allOwnKeys:n}={})=>(zf(e,(a,s)=>{r&&Rn(a)?t[s]=h8(a,r):t[s]=a},{allOwnKeys:n}),t),TU=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),MU=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},EU=(t,e,r,n)=>{let a,s,o;const l={};if(e=e||{},t==null)return e;do{for(a=Object.getOwnPropertyNames(t),s=a.length;s-- >0;)o=a[s],(!n||n(o,t,e))&&!l[o]&&(e[o]=t[o],l[o]=!0);t=r!==!1&&P4(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},OU=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return n!==-1&&n===r},PU=t=>{if(!t)return null;if(Pd(t))return t;let e=t.length;if(!m8(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},_U=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&P4(Uint8Array)),RU=(t,e)=>{const n=(t&&t[b0]).call(t);let a;for(;(a=n.next())&&!a.done;){const s=a.value;e.call(t,s[0],s[1])}},LU=(t,e)=>{let r;const n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},zU=is("HTMLFormElement"),IU=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,a){return n.toUpperCase()+a}),M5=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),BU=is("RegExp"),b8=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};zf(r,(a,s)=>{let o;(o=e(a,s,t))!==!1&&(n[s]=o||a)}),Object.defineProperties(t,n)},FU=t=>{b8(t,(e,r)=>{if(Rn(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=t[r];if(Rn(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},HU=(t,e)=>{const r={},n=a=>{a.forEach(s=>{r[s]=!0})};return Pd(t)?n(t):n(String(t).split(e)),r},$U=()=>{},YU=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function UU(t){return!!(t&&Rn(t.append)&&t[f8]==="FormData"&&t[b0])}const WU=t=>{const e=new Array(10),r=(n,a)=>{if(Lf(n)){if(e.indexOf(n)>=0)return;if(Rf(n))return n;if(!("toJSON"in n)){e[a]=n;const s=Pd(n)?[]:{};return zf(n,(o,l)=>{const c=r(o,a+1);!nf(c)&&(s[l]=c)}),e[a]=void 0,s}}return n};return r(t,0)},XU=is("AsyncFunction"),VU=t=>t&&(Lf(t)||Rn(t))&&Rn(t.then)&&Rn(t.catch),y8=((t,e)=>t?setImmediate:e?((r,n)=>(gl.addEventListener("message",({source:a,data:s})=>{a===gl&&s===r&&n.length&&n.shift()()},!1),a=>{n.push(a),gl.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Rn(gl.postMessage)),qU=typeof queueMicrotask<"u"?queueMicrotask.bind(gl):typeof process<"u"&&process.nextTick||y8,GU=t=>t!=null&&Rn(t[b0]),ce={isArray:Pd,isArrayBuffer:p8,isBuffer:Rf,isFormData:wU,isArrayBufferView:hU,isString:fU,isNumber:m8,isBoolean:pU,isObject:Lf,isPlainObject:Ng,isEmptyObject:mU,isReadableStream:NU,isRequest:SU,isResponse:AU,isHeaders:CU,isUndefined:nf,isDate:gU,isFile:xU,isBlob:bU,isRegExp:BU,isFunction:Rn,isStream:vU,isURLSearchParams:jU,isTypedArray:_U,isFileList:yU,forEach:zf,merge:z2,extend:DU,trim:kU,stripBOM:TU,inherits:MU,toFlatObject:EU,kindOf:y0,kindOfTest:is,endsWith:OU,toArray:PU,forEachEntry:RU,matchAll:LU,isHTMLForm:zU,hasOwnProperty:M5,hasOwnProp:M5,reduceDescriptors:b8,freezeMethods:FU,toObjectSet:HU,toCamelCase:IU,noop:$U,toFiniteNumber:YU,findKey:g8,global:gl,isContextDefined:x8,isSpecCompliantForm:UU,toJSONObject:WU,isAsyncFn:XU,isThenable:VU,setImmediate:y8,asap:qU,isIterable:GU};function qe(t,e,r,n,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),a&&(this.response=a,this.status=a.status?a.status:null)}ce.inherits(qe,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ce.toJSONObject(this.config),code:this.code,status:this.status}}});const v8=qe.prototype,w8={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{w8[t]={value:t}});Object.defineProperties(qe,w8);Object.defineProperty(v8,"isAxiosError",{value:!0});qe.from=(t,e,r,n,a,s)=>{const o=Object.create(v8);return ce.toFlatObject(t,o,function(c){return c!==Error.prototype},l=>l!=="isAxiosError"),qe.call(o,t.message,e,r,n,a),o.cause=t,o.name=t.name,s&&Object.assign(o,s),o};const KU=null;function I2(t){return ce.isPlainObject(t)||ce.isArray(t)}function j8(t){return ce.endsWith(t,"[]")?t.slice(0,-2):t}function E5(t,e,r){return t?t.concat(e).map(function(a,s){return a=j8(a),!r&&s?"["+a+"]":a}).join(r?".":""):e}function ZU(t){return ce.isArray(t)&&!t.some(I2)}const QU=ce.toFlatObject(ce,{},null,function(e){return/^is[A-Z]/.test(e)});function w0(t,e,r){if(!ce.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,r=ce.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,w){return!ce.isUndefined(w[b])});const n=r.metaTokens,a=r.visitor||h,s=r.dots,o=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&ce.isSpecCompliantForm(e);if(!ce.isFunction(a))throw new TypeError("visitor must be a function");function u(y){if(y===null)return"";if(ce.isDate(y))return y.toISOString();if(ce.isBoolean(y))return y.toString();if(!c&&ce.isBlob(y))throw new qe("Blob is not supported. Use a Buffer instead.");return ce.isArrayBuffer(y)||ce.isTypedArray(y)?c&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function h(y,b,w){let N=y;if(y&&!w&&typeof y=="object"){if(ce.endsWith(b,"{}"))b=n?b:b.slice(0,-2),y=JSON.stringify(y);else if(ce.isArray(y)&&ZU(y)||(ce.isFileList(y)||ce.endsWith(b,"[]"))&&(N=ce.toArray(y)))return b=j8(b),N.forEach(function(S,C){!(ce.isUndefined(S)||S===null)&&e.append(o===!0?E5([b],C,s):o===null?b:b+"[]",u(S))}),!1}return I2(y)?!0:(e.append(E5(w,b,s),u(y)),!1)}const p=[],m=Object.assign(QU,{defaultVisitor:h,convertValue:u,isVisitable:I2});function x(y,b){if(!ce.isUndefined(y)){if(p.indexOf(y)!==-1)throw Error("Circular reference detected in "+b.join("."));p.push(y),ce.forEach(y,function(N,A){(!(ce.isUndefined(N)||N===null)&&a.call(e,N,ce.isString(A)?A.trim():A,b,m))===!0&&x(N,b?b.concat(A):[A])}),p.pop()}}if(!ce.isObject(t))throw new TypeError("data must be an object");return x(t),e}function O5(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function _4(t,e){this._pairs=[],t&&w0(t,this,e)}const N8=_4.prototype;N8.append=function(e,r){this._pairs.push([e,r])};N8.toString=function(e){const r=e?function(n){return e.call(this,n,O5)}:O5;return this._pairs.map(function(a){return r(a[0])+"="+r(a[1])},"").join("&")};function JU(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function S8(t,e,r){if(!e)return t;const n=r&&r.encode||JU;ce.isFunction(r)&&(r={serialize:r});const a=r&&r.serialize;let s;if(a?s=a(e,r):s=ce.isURLSearchParams(e)?e.toString():new _4(e,r).toString(n),s){const o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class P5{constructor(){this.handlers=[]}use(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){ce.forEach(this.handlers,function(n){n!==null&&e(n)})}}const A8={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},eW=typeof URLSearchParams<"u"?URLSearchParams:_4,tW=typeof FormData<"u"?FormData:null,rW=typeof Blob<"u"?Blob:null,nW={isBrowser:!0,classes:{URLSearchParams:eW,FormData:tW,Blob:rW},protocols:["http","https","file","blob","url","data"]},R4=typeof window<"u"&&typeof document<"u",B2=typeof navigator=="object"&&navigator||void 0,aW=R4&&(!B2||["ReactNative","NativeScript","NS"].indexOf(B2.product)<0),sW=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",iW=R4&&window.location.href||"http://localhost",oW=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:R4,hasStandardBrowserEnv:aW,hasStandardBrowserWebWorkerEnv:sW,navigator:B2,origin:iW},Symbol.toStringTag,{value:"Module"})),cn={...oW,...nW};function lW(t,e){return w0(t,new cn.classes.URLSearchParams,{visitor:function(r,n,a,s){return cn.isNode&&ce.isBuffer(r)?(this.append(n,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...e})}function cW(t){return ce.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function dW(t){const e={},r=Object.keys(t);let n;const a=r.length;let s;for(n=0;n<a;n++)s=r[n],e[s]=t[s];return e}function C8(t){function e(r,n,a,s){let o=r[s++];if(o==="__proto__")return!0;const l=Number.isFinite(+o),c=s>=r.length;return o=!o&&ce.isArray(a)?a.length:o,c?(ce.hasOwnProp(a,o)?a[o]=[a[o],n]:a[o]=n,!l):((!a[o]||!ce.isObject(a[o]))&&(a[o]=[]),e(r,n,a[o],s)&&ce.isArray(a[o])&&(a[o]=dW(a[o])),!l)}if(ce.isFormData(t)&&ce.isFunction(t.entries)){const r={};return ce.forEachEntry(t,(n,a)=>{e(cW(n),a,r,0)}),r}return null}function uW(t,e,r){if(ce.isString(t))try{return(e||JSON.parse)(t),ce.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}const If={transitional:A8,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){const n=r.getContentType()||"",a=n.indexOf("application/json")>-1,s=ce.isObject(e);if(s&&ce.isHTMLForm(e)&&(e=new FormData(e)),ce.isFormData(e))return a?JSON.stringify(C8(e)):e;if(ce.isArrayBuffer(e)||ce.isBuffer(e)||ce.isStream(e)||ce.isFile(e)||ce.isBlob(e)||ce.isReadableStream(e))return e;if(ce.isArrayBufferView(e))return e.buffer;if(ce.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let l;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return lW(e,this.formSerializer).toString();if((l=ce.isFileList(e))||n.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return w0(l?{"files[]":e}:e,c&&new c,this.formSerializer)}}return s||a?(r.setContentType("application/json",!1),uW(e)):e}],transformResponse:[function(e){const r=this.transitional||If.transitional,n=r&&r.forcedJSONParsing,a=this.responseType==="json";if(ce.isResponse(e)||ce.isReadableStream(e))return e;if(e&&ce.isString(e)&&(n&&!this.responseType||a)){const o=!(r&&r.silentJSONParsing)&&a;try{return JSON.parse(e)}catch(l){if(o)throw l.name==="SyntaxError"?qe.from(l,qe.ERR_BAD_RESPONSE,this,null,this.response):l}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:cn.classes.FormData,Blob:cn.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ce.forEach(["delete","get","head","post","put","patch"],t=>{If.headers[t]={}});const hW=ce.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),fW=t=>{const e={};let r,n,a;return t&&t.split(`
`).forEach(function(o){a=o.indexOf(":"),r=o.substring(0,a).trim().toLowerCase(),n=o.substring(a+1).trim(),!(!r||e[r]&&hW[r])&&(r==="set-cookie"?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)}),e},_5=Symbol("internals");function th(t){return t&&String(t).trim().toLowerCase()}function Sg(t){return t===!1||t==null?t:ce.isArray(t)?t.map(Sg):String(t)}function pW(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}const mW=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function qv(t,e,r,n,a){if(ce.isFunction(n))return n.call(this,e,r);if(a&&(e=r),!!ce.isString(e)){if(ce.isString(n))return e.indexOf(n)!==-1;if(ce.isRegExp(n))return n.test(e)}}function gW(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,n)=>r.toUpperCase()+n)}function xW(t,e){const r=ce.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(a,s,o){return this[n].call(this,e,a,s,o)},configurable:!0})})}let Ln=class{constructor(e){e&&this.set(e)}set(e,r,n){const a=this;function s(l,c,u){const h=th(c);if(!h)throw new Error("header name must be a non-empty string");const p=ce.findKey(a,h);(!p||a[p]===void 0||u===!0||u===void 0&&a[p]!==!1)&&(a[p||c]=Sg(l))}const o=(l,c)=>ce.forEach(l,(u,h)=>s(u,h,c));if(ce.isPlainObject(e)||e instanceof this.constructor)o(e,r);else if(ce.isString(e)&&(e=e.trim())&&!mW(e))o(fW(e),r);else if(ce.isObject(e)&&ce.isIterable(e)){let l={},c,u;for(const h of e){if(!ce.isArray(h))throw TypeError("Object iterator must return a key-value pair");l[u=h[0]]=(c=l[u])?ce.isArray(c)?[...c,h[1]]:[c,h[1]]:h[1]}o(l,r)}else e!=null&&s(r,e,n);return this}get(e,r){if(e=th(e),e){const n=ce.findKey(this,e);if(n){const a=this[n];if(!r)return a;if(r===!0)return pW(a);if(ce.isFunction(r))return r.call(this,a,n);if(ce.isRegExp(r))return r.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=th(e),e){const n=ce.findKey(this,e);return!!(n&&this[n]!==void 0&&(!r||qv(this,this[n],n,r)))}return!1}delete(e,r){const n=this;let a=!1;function s(o){if(o=th(o),o){const l=ce.findKey(n,o);l&&(!r||qv(n,n[l],l,r))&&(delete n[l],a=!0)}}return ce.isArray(e)?e.forEach(s):s(e),a}clear(e){const r=Object.keys(this);let n=r.length,a=!1;for(;n--;){const s=r[n];(!e||qv(this,this[s],s,e,!0))&&(delete this[s],a=!0)}return a}normalize(e){const r=this,n={};return ce.forEach(this,(a,s)=>{const o=ce.findKey(n,s);if(o){r[o]=Sg(a),delete r[s];return}const l=e?gW(s):String(s).trim();l!==s&&delete r[s],r[l]=Sg(a),n[l]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const r=Object.create(null);return ce.forEach(this,(n,a)=>{n!=null&&n!==!1&&(r[a]=e&&ce.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){const n=new this(e);return r.forEach(a=>n.set(a)),n}static accessor(e){const n=(this[_5]=this[_5]={accessors:{}}).accessors,a=this.prototype;function s(o){const l=th(o);n[l]||(xW(a,o),n[l]=!0)}return ce.isArray(e)?e.forEach(s):s(e),this}};Ln.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ce.reduceDescriptors(Ln.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[r]=n}}});ce.freezeMethods(Ln);function Gv(t,e){const r=this||If,n=e||r,a=Ln.from(n.headers);let s=n.data;return ce.forEach(t,function(l){s=l.call(r,s,a.normalize(),e?e.status:void 0)}),a.normalize(),s}function k8(t){return!!(t&&t.__CANCEL__)}function _d(t,e,r){qe.call(this,t??"canceled",qe.ERR_CANCELED,e,r),this.name="CanceledError"}ce.inherits(_d,qe,{__CANCEL__:!0});function D8(t,e,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?t(r):e(new qe("Request failed with status code "+r.status,[qe.ERR_BAD_REQUEST,qe.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function bW(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function yW(t,e){t=t||10;const r=new Array(t),n=new Array(t);let a=0,s=0,o;return e=e!==void 0?e:1e3,function(c){const u=Date.now(),h=n[s];o||(o=u),r[a]=c,n[a]=u;let p=s,m=0;for(;p!==a;)m+=r[p++],p=p%t;if(a=(a+1)%t,a===s&&(s=(s+1)%t),u-o<e)return;const x=h&&u-h;return x?Math.round(m*1e3/x):void 0}}function vW(t,e){let r=0,n=1e3/e,a,s;const o=(u,h=Date.now())=>{r=h,a=null,s&&(clearTimeout(s),s=null),t(...u)};return[(...u)=>{const h=Date.now(),p=h-r;p>=n?o(u,h):(a=u,s||(s=setTimeout(()=>{s=null,o(a)},n-p)))},()=>a&&o(a)]}const sx=(t,e,r=3)=>{let n=0;const a=yW(50,250);return vW(s=>{const o=s.loaded,l=s.lengthComputable?s.total:void 0,c=o-n,u=a(c),h=o<=l;n=o;const p={loaded:o,total:l,progress:l?o/l:void 0,bytes:c,rate:u||void 0,estimated:u&&l&&h?(l-o)/u:void 0,event:s,lengthComputable:l!=null,[e?"download":"upload"]:!0};t(p)},r)},R5=(t,e)=>{const r=t!=null;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},L5=t=>(...e)=>ce.asap(()=>t(...e)),wW=cn.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,cn.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(cn.origin),cn.navigator&&/(msie|trident)/i.test(cn.navigator.userAgent)):()=>!0,jW=cn.hasStandardBrowserEnv?{write(t,e,r,n,a,s){const o=[t+"="+encodeURIComponent(e)];ce.isNumber(r)&&o.push("expires="+new Date(r).toGMTString()),ce.isString(n)&&o.push("path="+n),ce.isString(a)&&o.push("domain="+a),s===!0&&o.push("secure"),document.cookie=o.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function NW(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function SW(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function T8(t,e,r){let n=!NW(e);return t&&(n||r==!1)?SW(t,e):e}const z5=t=>t instanceof Ln?{...t}:t;function Fl(t,e){e=e||{};const r={};function n(u,h,p,m){return ce.isPlainObject(u)&&ce.isPlainObject(h)?ce.merge.call({caseless:m},u,h):ce.isPlainObject(h)?ce.merge({},h):ce.isArray(h)?h.slice():h}function a(u,h,p,m){if(ce.isUndefined(h)){if(!ce.isUndefined(u))return n(void 0,u,p,m)}else return n(u,h,p,m)}function s(u,h){if(!ce.isUndefined(h))return n(void 0,h)}function o(u,h){if(ce.isUndefined(h)){if(!ce.isUndefined(u))return n(void 0,u)}else return n(void 0,h)}function l(u,h,p){if(p in e)return n(u,h);if(p in t)return n(void 0,u)}const c={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:l,headers:(u,h,p)=>a(z5(u),z5(h),p,!0)};return ce.forEach(Object.keys({...t,...e}),function(h){const p=c[h]||a,m=p(t[h],e[h],h);ce.isUndefined(m)&&p!==l||(r[h]=m)}),r}const M8=t=>{const e=Fl({},t);let{data:r,withXSRFToken:n,xsrfHeaderName:a,xsrfCookieName:s,headers:o,auth:l}=e;e.headers=o=Ln.from(o),e.url=S8(T8(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),l&&o.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let c;if(ce.isFormData(r)){if(cn.hasStandardBrowserEnv||cn.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((c=o.getContentType())!==!1){const[u,...h]=c?c.split(";").map(p=>p.trim()).filter(Boolean):[];o.setContentType([u||"multipart/form-data",...h].join("; "))}}if(cn.hasStandardBrowserEnv&&(n&&ce.isFunction(n)&&(n=n(e)),n||n!==!1&&wW(e.url))){const u=a&&s&&jW.read(s);u&&o.set(a,u)}return e},AW=typeof XMLHttpRequest<"u",CW=AW&&function(t){return new Promise(function(r,n){const a=M8(t);let s=a.data;const o=Ln.from(a.headers).normalize();let{responseType:l,onUploadProgress:c,onDownloadProgress:u}=a,h,p,m,x,y;function b(){x&&x(),y&&y(),a.cancelToken&&a.cancelToken.unsubscribe(h),a.signal&&a.signal.removeEventListener("abort",h)}let w=new XMLHttpRequest;w.open(a.method.toUpperCase(),a.url,!0),w.timeout=a.timeout;function N(){if(!w)return;const S=Ln.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders()),k={data:!l||l==="text"||l==="json"?w.responseText:w.response,status:w.status,statusText:w.statusText,headers:S,config:t,request:w};D8(function(E){r(E),b()},function(E){n(E),b()},k),w=null}"onloadend"in w?w.onloadend=N:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout(N)},w.onabort=function(){w&&(n(new qe("Request aborted",qe.ECONNABORTED,t,w)),w=null)},w.onerror=function(){n(new qe("Network Error",qe.ERR_NETWORK,t,w)),w=null},w.ontimeout=function(){let C=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const k=a.transitional||A8;a.timeoutErrorMessage&&(C=a.timeoutErrorMessage),n(new qe(C,k.clarifyTimeoutError?qe.ETIMEDOUT:qe.ECONNABORTED,t,w)),w=null},s===void 0&&o.setContentType(null),"setRequestHeader"in w&&ce.forEach(o.toJSON(),function(C,k){w.setRequestHeader(k,C)}),ce.isUndefined(a.withCredentials)||(w.withCredentials=!!a.withCredentials),l&&l!=="json"&&(w.responseType=a.responseType),u&&([m,y]=sx(u,!0),w.addEventListener("progress",m)),c&&w.upload&&([p,x]=sx(c),w.upload.addEventListener("progress",p),w.upload.addEventListener("loadend",x)),(a.cancelToken||a.signal)&&(h=S=>{w&&(n(!S||S.type?new _d(null,t,w):S),w.abort(),w=null)},a.cancelToken&&a.cancelToken.subscribe(h),a.signal&&(a.signal.aborted?h():a.signal.addEventListener("abort",h)));const A=bW(a.url);if(A&&cn.protocols.indexOf(A)===-1){n(new qe("Unsupported protocol "+A+":",qe.ERR_BAD_REQUEST,t));return}w.send(s||null)})},kW=(t,e)=>{const{length:r}=t=t?t.filter(Boolean):[];if(e||r){let n=new AbortController,a;const s=function(u){if(!a){a=!0,l();const h=u instanceof Error?u:this.reason;n.abort(h instanceof qe?h:new _d(h instanceof Error?h.message:h))}};let o=e&&setTimeout(()=>{o=null,s(new qe(`timeout ${e} of ms exceeded`,qe.ETIMEDOUT))},e);const l=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(u=>{u.unsubscribe?u.unsubscribe(s):u.removeEventListener("abort",s)}),t=null)};t.forEach(u=>u.addEventListener("abort",s));const{signal:c}=n;return c.unsubscribe=()=>ce.asap(l),c}},DW=function*(t,e){let r=t.byteLength;if(r<e){yield t;return}let n=0,a;for(;n<r;)a=n+e,yield t.slice(n,a),n=a},TW=async function*(t,e){for await(const r of MW(t))yield*DW(r,e)},MW=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:r,value:n}=await e.read();if(r)break;yield n}}finally{await e.cancel()}},I5=(t,e,r,n)=>{const a=TW(t,e);let s=0,o,l=c=>{o||(o=!0,n&&n(c))};return new ReadableStream({async pull(c){try{const{done:u,value:h}=await a.next();if(u){l(),c.close();return}let p=h.byteLength;if(r){let m=s+=p;r(m)}c.enqueue(new Uint8Array(h))}catch(u){throw l(u),u}},cancel(c){return l(c),a.return()}},{highWaterMark:2})},j0=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",E8=j0&&typeof ReadableStream=="function",EW=j0&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),O8=(t,...e)=>{try{return!!t(...e)}catch{return!1}},OW=E8&&O8(()=>{let t=!1;const e=new Request(cn.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),B5=64*1024,F2=E8&&O8(()=>ce.isReadableStream(new Response("").body)),ix={stream:F2&&(t=>t.body)};j0&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!ix[e]&&(ix[e]=ce.isFunction(t[e])?r=>r[e]():(r,n)=>{throw new qe(`Response type '${e}' is not supported`,qe.ERR_NOT_SUPPORT,n)})})})(new Response);const PW=async t=>{if(t==null)return 0;if(ce.isBlob(t))return t.size;if(ce.isSpecCompliantForm(t))return(await new Request(cn.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(ce.isArrayBufferView(t)||ce.isArrayBuffer(t))return t.byteLength;if(ce.isURLSearchParams(t)&&(t=t+""),ce.isString(t))return(await EW(t)).byteLength},_W=async(t,e)=>{const r=ce.toFiniteNumber(t.getContentLength());return r??PW(e)},RW=j0&&(async t=>{let{url:e,method:r,data:n,signal:a,cancelToken:s,timeout:o,onDownloadProgress:l,onUploadProgress:c,responseType:u,headers:h,withCredentials:p="same-origin",fetchOptions:m}=M8(t);u=u?(u+"").toLowerCase():"text";let x=kW([a,s&&s.toAbortSignal()],o),y;const b=x&&x.unsubscribe&&(()=>{x.unsubscribe()});let w;try{if(c&&OW&&r!=="get"&&r!=="head"&&(w=await _W(h,n))!==0){let k=new Request(e,{method:"POST",body:n,duplex:"half"}),T;if(ce.isFormData(n)&&(T=k.headers.get("content-type"))&&h.setContentType(T),k.body){const[E,_]=R5(w,sx(L5(c)));n=I5(k.body,B5,E,_)}}ce.isString(p)||(p=p?"include":"omit");const N="credentials"in Request.prototype;y=new Request(e,{...m,signal:x,method:r.toUpperCase(),headers:h.normalize().toJSON(),body:n,duplex:"half",credentials:N?p:void 0});let A=await fetch(y,m);const S=F2&&(u==="stream"||u==="response");if(F2&&(l||S&&b)){const k={};["status","statusText","headers"].forEach(L=>{k[L]=A[L]});const T=ce.toFiniteNumber(A.headers.get("content-length")),[E,_]=l&&R5(T,sx(L5(l),!0))||[];A=new Response(I5(A.body,B5,E,()=>{_&&_(),b&&b()}),k)}u=u||"text";let C=await ix[ce.findKey(ix,u)||"text"](A,t);return!S&&b&&b(),await new Promise((k,T)=>{D8(k,T,{data:C,headers:Ln.from(A.headers),status:A.status,statusText:A.statusText,config:t,request:y})})}catch(N){throw b&&b(),N&&N.name==="TypeError"&&/Load failed|fetch/i.test(N.message)?Object.assign(new qe("Network Error",qe.ERR_NETWORK,t,y),{cause:N.cause||N}):qe.from(N,N&&N.code,t,y)}}),H2={http:KU,xhr:CW,fetch:RW};ce.forEach(H2,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const F5=t=>`- ${t}`,LW=t=>ce.isFunction(t)||t===null||t===!1,P8={getAdapter:t=>{t=ce.isArray(t)?t:[t];const{length:e}=t;let r,n;const a={};for(let s=0;s<e;s++){r=t[s];let o;if(n=r,!LW(r)&&(n=H2[(o=String(r)).toLowerCase()],n===void 0))throw new qe(`Unknown adapter '${o}'`);if(n)break;a[o||"#"+s]=n}if(!n){const s=Object.entries(a).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let o=e?s.length>1?`since :
`+s.map(F5).join(`
`):" "+F5(s[0]):"as no adapter specified";throw new qe("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return n},adapters:H2};function Kv(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new _d(null,t)}function H5(t){return Kv(t),t.headers=Ln.from(t.headers),t.data=Gv.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),P8.getAdapter(t.adapter||If.adapter)(t).then(function(n){return Kv(t),n.data=Gv.call(t,t.transformResponse,n),n.headers=Ln.from(n.headers),n},function(n){return k8(n)||(Kv(t),n&&n.response&&(n.response.data=Gv.call(t,t.transformResponse,n.response),n.response.headers=Ln.from(n.response.headers))),Promise.reject(n)})}const _8="1.11.0",N0={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{N0[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const $5={};N0.transitional=function(e,r,n){function a(s,o){return"[Axios v"+_8+"] Transitional option '"+s+"'"+o+(n?". "+n:"")}return(s,o,l)=>{if(e===!1)throw new qe(a(o," has been removed"+(r?" in "+r:"")),qe.ERR_DEPRECATED);return r&&!$5[o]&&($5[o]=!0,console.warn(a(o," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(s,o,l):!0}};N0.spelling=function(e){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function zW(t,e,r){if(typeof t!="object")throw new qe("options must be an object",qe.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let a=n.length;for(;a-- >0;){const s=n[a],o=e[s];if(o){const l=t[s],c=l===void 0||o(l,s,t);if(c!==!0)throw new qe("option "+s+" must be "+c,qe.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new qe("Unknown option "+s,qe.ERR_BAD_OPTION)}}const Ag={assertOptions:zW,validators:N0},gs=Ag.validators;let Ml=class{constructor(e){this.defaults=e||{},this.interceptors={request:new P5,response:new P5}}async request(e,r){try{return await this._request(e,r)}catch(n){if(n instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const s=a.stack?a.stack.replace(/^.+\n/,""):"";try{n.stack?s&&!String(n.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(n.stack+=`
`+s):n.stack=s}catch{}}throw n}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=Fl(this.defaults,r);const{transitional:n,paramsSerializer:a,headers:s}=r;n!==void 0&&Ag.assertOptions(n,{silentJSONParsing:gs.transitional(gs.boolean),forcedJSONParsing:gs.transitional(gs.boolean),clarifyTimeoutError:gs.transitional(gs.boolean)},!1),a!=null&&(ce.isFunction(a)?r.paramsSerializer={serialize:a}:Ag.assertOptions(a,{encode:gs.function,serialize:gs.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Ag.assertOptions(r,{baseUrl:gs.spelling("baseURL"),withXsrfToken:gs.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=s&&ce.merge(s.common,s[r.method]);s&&ce.forEach(["delete","get","head","post","put","patch","common"],y=>{delete s[y]}),r.headers=Ln.concat(o,s);const l=[];let c=!0;this.interceptors.request.forEach(function(b){typeof b.runWhen=="function"&&b.runWhen(r)===!1||(c=c&&b.synchronous,l.unshift(b.fulfilled,b.rejected))});const u=[];this.interceptors.response.forEach(function(b){u.push(b.fulfilled,b.rejected)});let h,p=0,m;if(!c){const y=[H5.bind(this),void 0];for(y.unshift(...l),y.push(...u),m=y.length,h=Promise.resolve(r);p<m;)h=h.then(y[p++],y[p++]);return h}m=l.length;let x=r;for(p=0;p<m;){const y=l[p++],b=l[p++];try{x=y(x)}catch(w){b.call(this,w);break}}try{h=H5.call(this,x)}catch(y){return Promise.reject(y)}for(p=0,m=u.length;p<m;)h=h.then(u[p++],u[p++]);return h}getUri(e){e=Fl(this.defaults,e);const r=T8(e.baseURL,e.url,e.allowAbsoluteUrls);return S8(r,e.params,e.paramsSerializer)}};ce.forEach(["delete","get","head","options"],function(e){Ml.prototype[e]=function(r,n){return this.request(Fl(n||{},{method:e,url:r,data:(n||{}).data}))}});ce.forEach(["post","put","patch"],function(e){function r(n){return function(s,o,l){return this.request(Fl(l||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}Ml.prototype[e]=r(),Ml.prototype[e+"Form"]=r(!0)});let IW=class R8{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(s){r=s});const n=this;this.promise.then(a=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](a);n._listeners=null}),this.promise.then=a=>{let s;const o=new Promise(l=>{n.subscribe(l),s=l}).then(a);return o.cancel=function(){n.unsubscribe(s)},o},e(function(s,o,l){n.reason||(n.reason=new _d(s,o,l),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const e=new AbortController,r=n=>{e.abort(n)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new R8(function(a){e=a}),cancel:e}}};function BW(t){return function(r){return t.apply(null,r)}}function FW(t){return ce.isObject(t)&&t.isAxiosError===!0}const $2={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries($2).forEach(([t,e])=>{$2[e]=t});function L8(t){const e=new Ml(t),r=h8(Ml.prototype.request,e);return ce.extend(r,Ml.prototype,e,{allOwnKeys:!0}),ce.extend(r,e,null,{allOwnKeys:!0}),r.create=function(a){return L8(Fl(t,a))},r}const _e=L8(If);_e.Axios=Ml;_e.CanceledError=_d;_e.CancelToken=IW;_e.isCancel=k8;_e.VERSION=_8;_e.toFormData=w0;_e.AxiosError=qe;_e.Cancel=_e.CanceledError;_e.all=function(e){return Promise.all(e)};_e.spread=BW;_e.isAxiosError=FW;_e.mergeConfig=Fl;_e.AxiosHeaders=Ln;_e.formToJSON=t=>C8(ce.isHTMLForm(t)?new FormData(t):t);_e.getAdapter=P8.getAdapter;_e.HttpStatusCode=$2;_e.default=_e;const{Axios:rwe,AxiosError:nwe,CanceledError:awe,isCancel:swe,CancelToken:iwe,VERSION:owe,all:lwe,Cancel:cwe,isAxiosError:dwe,spread:uwe,toFormData:hwe,AxiosHeaders:fwe,HttpStatusCode:pwe,formToJSON:mwe,getAdapter:gwe,mergeConfig:xwe}=_e;var HW=class extends Error{issues;constructor(t){super(t[0].message),this.name="SchemaError",this.issues=t}},z8=(t=>(t.uninitialized="uninitialized",t.pending="pending",t.fulfilled="fulfilled",t.rejected="rejected",t))(z8||{});function Y5(t){return{status:t,isUninitialized:t==="uninitialized",isLoading:t==="pending",isSuccess:t==="fulfilled",isError:t==="rejected"}}var U5=xo;function I8(t,e){if(t===e||!(U5(t)&&U5(e)||Array.isArray(t)&&Array.isArray(e)))return e;const r=Object.keys(e),n=Object.keys(t);let a=r.length===n.length;const s=Array.isArray(e)?[]:{};for(const o of r)s[o]=I8(t[o],e[o]),a&&(a=t[o]===s[o]);return a?t:s}function ad(t){let e=0;for(const r in t)e++;return e}var W5=t=>[].concat(...t);function $W(t){return new RegExp("(^|:)//").test(t)}function YW(){return typeof document>"u"?!0:document.visibilityState!=="hidden"}function ox(t){return t!=null}function UW(){return typeof navigator>"u"||navigator.onLine===void 0?!0:navigator.onLine}var WW=t=>t.replace(/\/$/,""),XW=t=>t.replace(/^\//,"");function VW(t,e){if(!t)return e;if(!e)return t;if($W(e))return e;const r=t.endsWith("/")||!e.startsWith("?")?"/":"";return t=WW(t),e=XW(e),`${t}${r}${e}`}function qW(t,e,r){return t.has(e)?t.get(e):t.set(e,r).get(e)}var X5=(...t)=>fetch(...t),GW=t=>t.status>=200&&t.status<=299,KW=t=>/ion\/(vnd\.api\+)?json/.test(t.get("content-type")||"");function V5(t){if(!xo(t))return t;const e={...t};for(const[r,n]of Object.entries(e))n===void 0&&delete e[r];return e}function ZW({baseUrl:t,prepareHeaders:e=p=>p,fetchFn:r=X5,paramsSerializer:n,isJsonContentType:a=KW,jsonContentType:s="application/json",jsonReplacer:o,timeout:l,responseHandler:c,validateStatus:u,...h}={}){return typeof fetch>"u"&&r===X5&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),async(m,x,y)=>{const{getState:b,extra:w,endpoint:N,forced:A,type:S}=x;let C,{url:k,headers:T=new Headers(h.headers),params:E=void 0,responseHandler:_=c??"json",validateStatus:L=u??GW,timeout:P=l,...R}=typeof m=="string"?{url:m}:m,z,B=x.signal;P&&(z=new AbortController,x.signal.addEventListener("abort",z.abort),B=z.signal);let Y={...h,signal:B,...R};T=new Headers(V5(T)),Y.headers=await e(T,{getState:b,arg:m,extra:w,endpoint:N,forced:A,type:S,extraOptions:y})||T;const X=U=>typeof U=="object"&&(xo(U)||Array.isArray(U)||typeof U.toJSON=="function");if(!Y.headers.has("content-type")&&X(Y.body)&&Y.headers.set("content-type",s),X(Y.body)&&a(Y.headers)&&(Y.body=JSON.stringify(Y.body,o)),E){const U=~k.indexOf("?")?"&":"?",re=n?n(E):new URLSearchParams(V5(E));k+=U+re}k=VW(t,k);const H=new Request(k,Y);C={request:new Request(k,Y)};let V,Z=!1,F=z&&setTimeout(()=>{Z=!0,z.abort()},P);try{V=await r(H)}catch(U){return{error:{status:Z?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(U)},meta:C}}finally{F&&clearTimeout(F),z?.signal.removeEventListener("abort",z.abort)}const G=V.clone();C.response=G;let te,K="";try{let U;if(await Promise.all([p(V,_).then(re=>te=re,re=>U=re),G.text().then(re=>K=re,()=>{})]),U)throw U}catch(U){return{error:{status:"PARSING_ERROR",originalStatus:V.status,data:K,error:String(U)},meta:C}}return L(V,te)?{data:te,meta:C}:{error:{status:V.status,data:te},meta:C}};async function p(m,x){if(typeof x=="function")return x(m);if(x==="content-type"&&(x=a(m.headers)?"json":"text"),x==="json"){const y=await m.text();return y.length?JSON.parse(y):null}return m.text()}}var q5=class{constructor(t,e=void 0){this.value=t,this.meta=e}},L4=cr("__rtkq/focused"),B8=cr("__rtkq/unfocused"),z4=cr("__rtkq/online"),F8=cr("__rtkq/offline");function S0(t){return t.type==="query"}function QW(t){return t.type==="mutation"}function A0(t){return t.type==="infinitequery"}function lx(t){return S0(t)||A0(t)}function I4(t,e,r,n,a,s){return JW(t)?t(e,r,n,a).filter(ox).map(Y2).map(s):Array.isArray(t)?t.map(Y2).map(s):[]}function JW(t){return typeof t=="function"}function Y2(t){return typeof t=="string"?{type:t}:t}function eX(t,e){return t.catch(e)}var af=Symbol("forceQueryFn"),U2=t=>typeof t[af]=="function";function tX({serializeQueryArgs:t,queryThunk:e,infiniteQueryThunk:r,mutationThunk:n,api:a,context:s}){const o=new Map,l=new Map,{unsubscribeQueryResult:c,removeMutationResult:u,updateSubscriptionOptions:h}=a.internalActions;return{buildInitiateQuery:w,buildInitiateInfiniteQuery:N,buildInitiateMutation:A,getRunningQueryThunk:p,getRunningMutationThunk:m,getRunningQueriesThunk:x,getRunningMutationsThunk:y};function p(S,C){return k=>{const T=s.endpointDefinitions[S],E=t({queryArgs:C,endpointDefinition:T,endpointName:S});return o.get(k)?.[E]}}function m(S,C){return k=>l.get(k)?.[C]}function x(){return S=>Object.values(o.get(S)||{}).filter(ox)}function y(){return S=>Object.values(l.get(S)||{}).filter(ox)}function b(S,C){const k=(T,{subscribe:E=!0,forceRefetch:_,subscriptionOptions:L,[af]:P,...R}={})=>(z,B)=>{const Y=t({queryArgs:T,endpointDefinition:C,endpointName:S});let X;const H={...R,type:"query",subscribe:E,forceRefetch:_,subscriptionOptions:L,endpointName:S,originalArgs:T,queryCacheKey:Y,[af]:P};if(S0(C))X=e(H);else{const{direction:ae,initialPageParam:we}=R;X=r({...H,direction:ae,initialPageParam:we})}const W=a.endpoints[S].select(T),V=z(X),Z=W(B()),{requestId:F,abort:G}=V,te=Z.requestId!==F,K=o.get(z)?.[Y],U=()=>W(B()),re=Object.assign(P?V.then(U):te&&!K?Promise.resolve(Z):Promise.all([K,V]).then(U),{arg:T,requestId:F,subscriptionOptions:L,queryCacheKey:Y,abort:G,async unwrap(){const ae=await re;if(ae.isError)throw ae.error;return ae.data},refetch:()=>z(k(T,{subscribe:!1,forceRefetch:!0})),unsubscribe(){E&&z(c({queryCacheKey:Y,requestId:F}))},updateSubscriptionOptions(ae){re.subscriptionOptions=ae,z(h({endpointName:S,requestId:F,queryCacheKey:Y,options:ae}))}});if(!K&&!te&&!P){const ae=qW(o,z,{});ae[Y]=re,re.then(()=>{delete ae[Y],ad(ae)||o.delete(z)})}return re};return k}function w(S,C){return b(S,C)}function N(S,C){return b(S,C)}function A(S){return(C,{track:k=!0,fixedCacheKey:T}={})=>(E,_)=>{const L=n({type:"mutation",endpointName:S,originalArgs:C,track:k,fixedCacheKey:T}),P=E(L),{requestId:R,abort:z,unwrap:B}=P,Y=eX(P.unwrap().then(V=>({data:V})),V=>({error:V})),X=()=>{E(u({requestId:R,fixedCacheKey:T}))},H=Object.assign(Y,{arg:P.arg,requestId:R,abort:z,unwrap:B,reset:X}),W=l.get(E)||{};return l.set(E,W),W[R]=H,H.then(()=>{delete W[R],ad(W)||l.delete(E)}),T&&(W[T]=H,H.then(()=>{W[T]===H&&(delete W[T],ad(W)||l.delete(E))})),H}}}var H8=class extends HW{constructor(t,e,r,n){super(t),this.value=e,this.schemaName=r,this._bqMeta=n}};async function sl(t,e,r,n){const a=await t["~standard"].validate(e);if(a.issues)throw new H8(a.issues,e,r,n);return a.value}function rX(t){return t}var rh=(t={})=>({...t,[h0]:!0});function nX({reducerPath:t,baseQuery:e,context:{endpointDefinitions:r},serializeQueryArgs:n,api:a,assertTagType:s,selectors:o,onSchemaFailure:l,catchSchemaFailure:c,skipSchemaValidation:u}){const h=(R,z,B,Y)=>(X,H)=>{const W=r[R],V=n({queryArgs:z,endpointDefinition:W,endpointName:R});if(X(a.internalActions.queryResultPatched({queryCacheKey:V,patches:B})),!Y)return;const Z=a.endpoints[R].select(z)(H()),F=I4(W.providesTags,Z.data,void 0,z,{},s);X(a.internalActions.updateProvidedBy([{queryCacheKey:V,providedTags:F}]))};function p(R,z,B=0){const Y=[z,...R];return B&&Y.length>B?Y.slice(0,-1):Y}function m(R,z,B=0){const Y=[...R,z];return B&&Y.length>B?Y.slice(1):Y}const x=(R,z,B,Y=!0)=>(X,H)=>{const V=a.endpoints[R].select(z)(H()),Z={patches:[],inversePatches:[],undo:()=>X(a.util.patchQueryData(R,z,Z.inversePatches,Y))};if(V.status==="uninitialized")return Z;let F;if("data"in V)if(ts(V.data)){const[G,te,K]=qP(V.data,B);Z.patches.push(...te),Z.inversePatches.push(...K),F=G}else F=B(V.data),Z.patches.push({op:"replace",path:[],value:F}),Z.inversePatches.push({op:"replace",path:[],value:V.data});return Z.patches.length===0||X(a.util.patchQueryData(R,z,Z.patches,Y)),Z},y=(R,z,B)=>Y=>Y(a.endpoints[R].initiate(z,{subscribe:!1,forceRefetch:!0,[af]:()=>({data:B})})),b=(R,z)=>R.query&&R[z]?R[z]:rX,w=async(R,{signal:z,abort:B,rejectWithValue:Y,fulfillWithValue:X,dispatch:H,getState:W,extra:V})=>{const Z=r[R.endpointName],{metaSchema:F,skipSchemaValidation:G=u}=Z;try{let te=b(Z,"transformResponse");const K={signal:z,abort:B,dispatch:H,getState:W,extra:V,endpoint:R.endpointName,type:R.type,forced:R.type==="query"?N(R,W()):void 0,queryCacheKey:R.type==="query"?R.queryCacheKey:void 0},U=R.type==="query"?R[af]:void 0;let re;const ae=async(ye,ue,je,Ce)=>{if(ue==null&&ye.pages.length)return Promise.resolve({data:ye});const pe={queryArg:R.originalArgs,pageParam:ue},Ye=await we(pe),Re=Ce?p:m;return{data:{pages:Re(ye.pages,Ye.data,je),pageParams:Re(ye.pageParams,ue,je)},meta:Ye.meta}};async function we(ye){let ue;const{extraOptions:je,argSchema:Ce,rawResponseSchema:pe,responseSchema:Ye}=Z;if(Ce&&!G&&(ye=await sl(Ce,ye,"argSchema",{})),U?ue=U():Z.query?ue=await e(Z.query(ye),K,je):ue=await Z.queryFn(ye,K,je,Ut=>e(Ut,K,je)),typeof process<"u",ue.error)throw new q5(ue.error,ue.meta);let{data:Re}=ue;pe&&!G&&(Re=await sl(pe,ue.data,"rawResponseSchema",ue.meta));let gt=await te(Re,ue.meta,ye);return Ye&&!G&&(gt=await sl(Ye,gt,"responseSchema",ue.meta)),{...ue,data:gt}}if(R.type==="query"&&"infiniteQueryOptions"in Z){const{infiniteQueryOptions:ye}=Z,{maxPages:ue=1/0}=ye;let je;const Ce={pages:[],pageParams:[]},pe=o.selectQueryEntry(W(),R.queryCacheKey)?.data,Re=N(R,W())&&!R.direction||!pe?Ce:pe;if("direction"in R&&R.direction&&Re.pages.length){const gt=R.direction==="backward",xt=(gt?$8:W2)(ye,Re,R.originalArgs);je=await ae(Re,xt,ue,gt)}else{const{initialPageParam:gt=ye.initialPageParam}=R,Ut=pe?.pageParams??[],xt=Ut[0]??gt,vn=Ut.length;je=await ae(Re,xt,ue),U&&(je={data:je.data.pages[0]});for(let pa=1;pa<vn;pa++){const Ft=W2(ye,je.data,R.originalArgs);je=await ae(je.data,Ft,ue)}}re=je}else re=await we(R.originalArgs);return F&&!G&&re.meta&&(re.meta=await sl(F,re.meta,"metaSchema",re.meta)),X(re.data,rh({fulfilledTimeStamp:Date.now(),baseQueryMeta:re.meta}))}catch(te){let K=te;if(K instanceof q5){let U=b(Z,"transformErrorResponse");const{rawErrorResponseSchema:re,errorResponseSchema:ae}=Z;let{value:we,meta:ye}=K;try{re&&!G&&(we=await sl(re,we,"rawErrorResponseSchema",ye)),F&&!G&&(ye=await sl(F,ye,"metaSchema",ye));let ue=await U(we,ye,R.originalArgs);return ae&&!G&&(ue=await sl(ae,ue,"errorResponseSchema",ye)),Y(ue,rh({baseQueryMeta:ye}))}catch(ue){K=ue}}try{if(K instanceof H8){const U={endpoint:R.endpointName,arg:R.originalArgs,type:R.type,queryCacheKey:R.type==="query"?R.queryCacheKey:void 0};Z.onSchemaFailure?.(K,U),l?.(K,U);const{catchSchemaFailure:re=c}=Z;if(re)return Y(re(K,U),rh({baseQueryMeta:K._bqMeta}))}}catch(U){K=U}throw console.error(K),K}};function N(R,z){const B=o.selectQueryEntry(z,R.queryCacheKey),Y=o.selectConfig(z).refetchOnMountOrArgChange,X=B?.fulfilledTimeStamp,H=R.forceRefetch??(R.subscribe&&Y);return H?H===!0||(Number(new Date)-Number(X))/1e3>=H:!1}const A=()=>Zt(`${t}/executeQuery`,w,{getPendingMeta({arg:z}){const B=r[z.endpointName];return rh({startedTimeStamp:Date.now(),...A0(B)?{direction:z.direction}:{}})},condition(z,{getState:B}){const Y=B(),X=o.selectQueryEntry(Y,z.queryCacheKey),H=X?.fulfilledTimeStamp,W=z.originalArgs,V=X?.originalArgs,Z=r[z.endpointName],F=z.direction;return U2(z)?!0:X?.status==="pending"?!1:N(z,Y)||S0(Z)&&Z?.forceRefetch?.({currentArg:W,previousArg:V,endpointState:X,state:Y})?!0:!(H&&!F)},dispatchConditionRejection:!0}),S=A(),C=A(),k=Zt(`${t}/executeMutation`,w,{getPendingMeta(){return rh({startedTimeStamp:Date.now()})}}),T=R=>"force"in R,E=R=>"ifOlderThan"in R,_=(R,z,B)=>(Y,X)=>{const H=T(B)&&B.force,W=E(B)&&B.ifOlderThan,V=(F=!0)=>{const G={forceRefetch:F,isPrefetch:!0};return a.endpoints[R].initiate(z,G)},Z=a.endpoints[R].select(z)(X());if(H)Y(V());else if(W){const F=Z?.fulfilledTimeStamp;if(!F){Y(V());return}(Number(new Date)-Number(new Date(F)))/1e3>=W&&Y(V())}else Y(V(!1))};function L(R){return z=>z?.meta?.arg?.endpointName===R}function P(R,z){return{matchPending:Ph(M4(R),L(z)),matchFulfilled:Ph(bo(R),L(z)),matchRejected:Ph(fd(R),L(z))}}return{queryThunk:S,mutationThunk:k,infiniteQueryThunk:C,prefetch:_,updateQueryData:x,upsertQueryData:y,patchQueryData:h,buildMatchThunkActions:P}}function W2(t,{pages:e,pageParams:r},n){const a=e.length-1;return t.getNextPageParam(e[a],e,r[a],r,n)}function $8(t,{pages:e,pageParams:r},n){return t.getPreviousPageParam?.(e[0],e,r[0],r,n)}function Y8(t,e,r,n){return I4(r[t.meta.arg.endpointName][e],bo(t)?t.payload:void 0,p0(t)?t.payload:void 0,t.meta.arg.originalArgs,"baseQueryMeta"in t.meta?t.meta.baseQueryMeta:void 0,n)}function zm(t,e,r){const n=t[e];n&&r(n)}function sf(t){return("arg"in t?t.arg.fixedCacheKey:t.fixedCacheKey)??t.requestId}function G5(t,e,r){const n=t[sf(e)];n&&r(n)}var Im={};function aX({reducerPath:t,queryThunk:e,mutationThunk:r,serializeQueryArgs:n,context:{endpointDefinitions:a,apiUid:s,extractRehydrationInfo:o,hasRehydrationInfo:l},assertTagType:c,config:u}){const h=cr(`${t}/resetApiState`);function p(L,P,R,z){L[P.queryCacheKey]??={status:"uninitialized",endpointName:P.endpointName},zm(L,P.queryCacheKey,B=>{B.status="pending",B.requestId=R&&B.requestId?B.requestId:z.requestId,P.originalArgs!==void 0&&(B.originalArgs=P.originalArgs),B.startedTimeStamp=z.startedTimeStamp;const Y=a[z.arg.endpointName];A0(Y)&&"direction"in P&&(B.direction=P.direction)})}function m(L,P,R,z){zm(L,P.arg.queryCacheKey,B=>{if(B.requestId!==P.requestId&&!z)return;const{merge:Y}=a[P.arg.endpointName];if(B.status="fulfilled",Y)if(B.data!==void 0){const{fulfilledTimeStamp:X,arg:H,baseQueryMeta:W,requestId:V}=P;let Z=Of(B.data,F=>Y(F,R,{arg:H.originalArgs,baseQueryMeta:W,fulfilledTimeStamp:X,requestId:V}));B.data=Z}else B.data=R;else B.data=a[P.arg.endpointName].structuralSharing??!0?I8(Ts(B.data)?iY(B.data):B.data,R):R;delete B.error,B.fulfilledTimeStamp=P.fulfilledTimeStamp})}const x=$t({name:`${t}/queries`,initialState:Im,reducers:{removeQueryResult:{reducer(L,{payload:{queryCacheKey:P}}){delete L[P]},prepare:eh()},cacheEntriesUpserted:{reducer(L,P){for(const R of P.payload){const{queryDescription:z,value:B}=R;p(L,z,!0,{arg:z,requestId:P.meta.requestId,startedTimeStamp:P.meta.timestamp}),m(L,{arg:z,requestId:P.meta.requestId,fulfilledTimeStamp:P.meta.timestamp,baseQueryMeta:{}},B,!0)}},prepare:L=>({payload:L.map(z=>{const{endpointName:B,arg:Y,value:X}=z,H=a[B];return{queryDescription:{type:"query",endpointName:B,originalArgs:z.arg,queryCacheKey:n({queryArgs:Y,endpointDefinition:H,endpointName:B})},value:X}}),meta:{[h0]:!0,requestId:m0(),timestamp:Date.now()}})},queryResultPatched:{reducer(L,{payload:{queryCacheKey:P,patches:R}}){zm(L,P,z=>{z.data=m5(z.data,R.concat())})},prepare:eh()}},extraReducers(L){L.addCase(e.pending,(P,{meta:R,meta:{arg:z}})=>{const B=U2(z);p(P,z,B,R)}).addCase(e.fulfilled,(P,{meta:R,payload:z})=>{const B=U2(R.arg);m(P,R,z,B)}).addCase(e.rejected,(P,{meta:{condition:R,arg:z,requestId:B},error:Y,payload:X})=>{zm(P,z.queryCacheKey,H=>{if(!R){if(H.requestId!==B)return;H.status="rejected",H.error=X??Y}})}).addMatcher(l,(P,R)=>{const{queries:z}=o(R);for(const[B,Y]of Object.entries(z))(Y?.status==="fulfilled"||Y?.status==="rejected")&&(P[B]=Y)})}}),y=$t({name:`${t}/mutations`,initialState:Im,reducers:{removeMutationResult:{reducer(L,{payload:P}){const R=sf(P);R in L&&delete L[R]},prepare:eh()}},extraReducers(L){L.addCase(r.pending,(P,{meta:R,meta:{requestId:z,arg:B,startedTimeStamp:Y}})=>{B.track&&(P[sf(R)]={requestId:z,status:"pending",endpointName:B.endpointName,startedTimeStamp:Y})}).addCase(r.fulfilled,(P,{payload:R,meta:z})=>{z.arg.track&&G5(P,z,B=>{B.requestId===z.requestId&&(B.status="fulfilled",B.data=R,B.fulfilledTimeStamp=z.fulfilledTimeStamp)})}).addCase(r.rejected,(P,{payload:R,error:z,meta:B})=>{B.arg.track&&G5(P,B,Y=>{Y.requestId===B.requestId&&(Y.status="rejected",Y.error=R??z)})}).addMatcher(l,(P,R)=>{const{mutations:z}=o(R);for(const[B,Y]of Object.entries(z))(Y?.status==="fulfilled"||Y?.status==="rejected")&&B!==Y?.requestId&&(P[B]=Y)})}}),b={tags:{},keys:{}},w=$t({name:`${t}/invalidation`,initialState:b,reducers:{updateProvidedBy:{reducer(L,P){for(const{queryCacheKey:R,providedTags:z}of P.payload){N(L,R);for(const{type:B,id:Y}of z){const X=(L.tags[B]??={})[Y||"__internal_without_id"]??=[];X.includes(R)||X.push(R)}L.keys[R]=z}},prepare:eh()}},extraReducers(L){L.addCase(x.actions.removeQueryResult,(P,{payload:{queryCacheKey:R}})=>{N(P,R)}).addMatcher(l,(P,R)=>{const{provided:z}=o(R);for(const[B,Y]of Object.entries(z))for(const[X,H]of Object.entries(Y)){const W=(P.tags[B]??={})[X||"__internal_without_id"]??=[];for(const V of H)W.includes(V)||W.push(V)}}).addMatcher(xi(bo(e),p0(e)),(P,R)=>{A(P,[R])}).addMatcher(x.actions.cacheEntriesUpserted.match,(P,R)=>{const z=R.payload.map(({queryDescription:B,value:Y})=>({type:"UNKNOWN",payload:Y,meta:{requestStatus:"fulfilled",requestId:"UNKNOWN",arg:B}}));A(P,z)})}});function N(L,P){const R=L.keys[P]??[];for(const z of R){const B=z.type,Y=z.id??"__internal_without_id",X=L.tags[B]?.[Y];X&&(L.tags[B][Y]=X.filter(H=>H!==P))}delete L.keys[P]}function A(L,P){const R=P.map(z=>{const B=Y8(z,"providesTags",a,c),{queryCacheKey:Y}=z.meta.arg;return{queryCacheKey:Y,providedTags:B}});w.caseReducers.updateProvidedBy(L,w.actions.updateProvidedBy(R))}const S=$t({name:`${t}/subscriptions`,initialState:Im,reducers:{updateSubscriptionOptions(L,P){},unsubscribeQueryResult(L,P){},internal_getRTKQSubscriptions(){}}}),C=$t({name:`${t}/internalSubscriptions`,initialState:Im,reducers:{subscriptionsUpdated:{reducer(L,P){return m5(L,P.payload)},prepare:eh()}}}),k=$t({name:`${t}/config`,initialState:{online:UW(),focused:YW(),middlewareRegistered:!1,...u},reducers:{middlewareRegistered(L,{payload:P}){L.middlewareRegistered=L.middlewareRegistered==="conflict"||s!==P?"conflict":!0}},extraReducers:L=>{L.addCase(z4,P=>{P.online=!0}).addCase(F8,P=>{P.online=!1}).addCase(L4,P=>{P.focused=!0}).addCase(B8,P=>{P.focused=!1}).addMatcher(l,P=>({...P}))}}),T=A4({queries:x.reducer,mutations:y.reducer,provided:w.reducer,subscriptions:C.reducer,config:k.reducer}),E=(L,P)=>T(h.match(P)?void 0:L,P),_={...k.actions,...x.actions,...S.actions,...C.actions,...y.actions,...w.actions,resetApiState:h};return{reducer:E,actions:_}}var Ga=Symbol.for("RTKQ/skipToken"),U8={status:"uninitialized"},K5=Of(U8,()=>{}),Z5=Of(U8,()=>{});function sX({serializeQueryArgs:t,reducerPath:e,createSelector:r}){const n=S=>K5,a=S=>Z5;return{buildQuerySelector:m,buildInfiniteQuerySelector:x,buildMutationSelector:y,selectInvalidatedBy:b,selectCachedArgsForQuery:w,selectApiState:o,selectQueries:l,selectMutations:u,selectQueryEntry:c,selectConfig:h};function s(S){return{...S,...Y5(S.status)}}function o(S){return S[e]}function l(S){return o(S)?.queries}function c(S,C){return l(S)?.[C]}function u(S){return o(S)?.mutations}function h(S){return o(S)?.config}function p(S,C,k){return T=>{if(T===Ga)return r(n,k);const E=t({queryArgs:T,endpointDefinition:C,endpointName:S});return r(L=>c(L,E)??K5,k)}}function m(S,C){return p(S,C,s)}function x(S,C){const{infiniteQueryOptions:k}=C;function T(E){const _={...E,...Y5(E.status)},{isLoading:L,isError:P,direction:R}=_,z=R==="forward",B=R==="backward";return{..._,hasNextPage:N(k,_.data,_.originalArgs),hasPreviousPage:A(k,_.data,_.originalArgs),isFetchingNextPage:L&&z,isFetchingPreviousPage:L&&B,isFetchNextPageError:P&&z,isFetchPreviousPageError:P&&B}}return p(S,C,T)}function y(){return S=>{let C;return typeof S=="object"?C=sf(S)??Ga:C=S,r(C===Ga?a:E=>o(E)?.mutations?.[C]??Z5,s)}}function b(S,C){const k=S[e],T=new Set;for(const E of C.filter(ox).map(Y2)){const _=k.provided.tags[E.type];if(!_)continue;let L=(E.id!==void 0?_[E.id]:W5(Object.values(_)))??[];for(const P of L)T.add(P)}return W5(Array.from(T.values()).map(E=>{const _=k.queries[E];return _?[{queryCacheKey:E,endpointName:_.endpointName,originalArgs:_.originalArgs}]:[]}))}function w(S,C){return Object.values(l(S)).filter(k=>k?.endpointName===C&&k.status!=="uninitialized").map(k=>k.originalArgs)}function N(S,C,k){return C?W2(S,C,k)!=null:!1}function A(S,C,k){return!C||!S.getPreviousPageParam?!1:$8(S,C,k)!=null}}var Q5=WeakMap?new WeakMap:void 0,cx=({endpointName:t,queryArgs:e})=>{let r="";const n=Q5?.get(e);if(typeof n=="string")r=n;else{const a=JSON.stringify(e,(s,o)=>(o=typeof o=="bigint"?{$bigint:o.toString()}:o,o=xo(o)?Object.keys(o).sort().reduce((l,c)=>(l[c]=o[c],l),{}):o,o));xo(e)&&Q5?.set(e,a),r=a}return`${t}(${r})`};function W8(...t){return function(r){const n=rx(u=>r.extractRehydrationInfo?.(u,{reducerPath:r.reducerPath??"api"})),a={reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1,invalidationBehavior:"delayed",...r,extractRehydrationInfo:n,serializeQueryArgs(u){let h=cx;if("serializeQueryArgs"in u.endpointDefinition){const p=u.endpointDefinition.serializeQueryArgs;h=m=>{const x=p(m);return typeof x=="string"?x:cx({...m,queryArgs:x})}}else r.serializeQueryArgs&&(h=r.serializeQueryArgs);return h(u)},tagTypes:[...r.tagTypes||[]]},s={endpointDefinitions:{},batch(u){u()},apiUid:m0(),extractRehydrationInfo:n,hasRehydrationInfo:rx(u=>n(u)!=null)},o={injectEndpoints:c,enhanceEndpoints({addTagTypes:u,endpoints:h}){if(u)for(const p of u)a.tagTypes.includes(p)||a.tagTypes.push(p);if(h)for(const[p,m]of Object.entries(h))typeof m=="function"?m(s.endpointDefinitions[p]):Object.assign(s.endpointDefinitions[p]||{},m);return o}},l=t.map(u=>u.init(o,a,s));function c(u){const h=u.endpoints({query:p=>({...p,type:"query"}),mutation:p=>({...p,type:"mutation"}),infiniteQuery:p=>({...p,type:"infinitequery"})});for(const[p,m]of Object.entries(h)){if(u.overrideExisting!==!0&&p in s.endpointDefinitions){if(u.overrideExisting==="throw")throw new Error(xn(39));continue}s.endpointDefinitions[p]=m;for(const x of l)x.injectEndpoint(p,m)}return o}return o.injectEndpoints({endpoints:r.endpoints})}}function Qs(t,...e){return Object.assign(t,...e)}var iX=({api:t,queryThunk:e,internalState:r})=>{const n=`${t.reducerPath}/subscriptions`;let a=null,s=null;const{updateSubscriptionOptions:o,unsubscribeQueryResult:l}=t.internalActions,c=(x,y)=>{if(o.match(y)){const{queryCacheKey:w,requestId:N,options:A}=y.payload;return x?.[w]?.[N]&&(x[w][N]=A),!0}if(l.match(y)){const{queryCacheKey:w,requestId:N}=y.payload;return x[w]&&delete x[w][N],!0}if(t.internalActions.removeQueryResult.match(y))return delete x[y.payload.queryCacheKey],!0;if(e.pending.match(y)){const{meta:{arg:w,requestId:N}}=y,A=x[w.queryCacheKey]??={};return A[`${N}_running`]={},w.subscribe&&(A[N]=w.subscriptionOptions??A[N]??{}),!0}let b=!1;if(e.fulfilled.match(y)||e.rejected.match(y)){const w=x[y.meta.arg.queryCacheKey]||{},N=`${y.meta.requestId}_running`;b||=!!w[N],delete w[N]}if(e.rejected.match(y)){const{meta:{condition:w,arg:N,requestId:A}}=y;if(w&&N.subscribe){const S=x[N.queryCacheKey]??={};S[A]=N.subscriptionOptions??S[A]??{},b=!0}}return b},u=()=>r.currentSubscriptions,m={getSubscriptions:u,getSubscriptionCount:x=>{const b=u()[x]??{};return ad(b)},isRequestSubscribed:(x,y)=>!!u()?.[x]?.[y]};return(x,y)=>{if(a||(a=JSON.parse(JSON.stringify(r.currentSubscriptions))),t.util.resetApiState.match(x))return a=r.currentSubscriptions={},s=null,[!0,!1];if(t.internalActions.internal_getRTKQSubscriptions.match(x))return[!1,m];const b=c(r.currentSubscriptions,x);let w=!0;if(b){s||(s=setTimeout(()=>{const S=JSON.parse(JSON.stringify(r.currentSubscriptions)),[,C]=qP(a,()=>S);y.next(t.internalActions.subscriptionsUpdated(C)),a=S,s=null},500));const N=typeof x.type=="string"&&!!x.type.startsWith(n),A=e.rejected.match(x)&&x.meta.condition&&!!x.meta.arg.subscribe;w=!N&&!A}return[w,!1]}};function oX(t){for(const e in t)return!1;return!0}var lX=2147483647/1e3-1,cX=({reducerPath:t,api:e,queryThunk:r,context:n,internalState:a,selectors:{selectQueryEntry:s,selectConfig:o}})=>{const{removeQueryResult:l,unsubscribeQueryResult:c,cacheEntriesUpserted:u}=e.internalActions,h=xi(c.match,r.fulfilled,r.rejected,u.match);function p(w){const N=a.currentSubscriptions[w];return!!N&&!oX(N)}const m={},x=(w,N,A)=>{const S=N.getState(),C=o(S);if(h(w)){let k;if(u.match(w))k=w.payload.map(T=>T.queryDescription.queryCacheKey);else{const{queryCacheKey:T}=c.match(w)?w.payload:w.meta.arg;k=[T]}y(k,N,C)}if(e.util.resetApiState.match(w))for(const[k,T]of Object.entries(m))T&&clearTimeout(T),delete m[k];if(n.hasRehydrationInfo(w)){const{queries:k}=n.extractRehydrationInfo(w);y(Object.keys(k),N,C)}};function y(w,N,A){const S=N.getState();for(const C of w){const k=s(S,C);b(C,k?.endpointName,N,A)}}function b(w,N,A,S){const k=n.endpointDefinitions[N]?.keepUnusedDataFor??S.keepUnusedDataFor;if(k===1/0)return;const T=Math.max(0,Math.min(k,lX));if(!p(w)){const E=m[w];E&&clearTimeout(E),m[w]=setTimeout(()=>{p(w)||A.dispatch(l({queryCacheKey:w})),delete m[w]},T*1e3)}}return x},J5=new Error("Promise never resolved before cacheEntryRemoved."),dX=({api:t,reducerPath:e,context:r,queryThunk:n,mutationThunk:a,internalState:s,selectors:{selectQueryEntry:o,selectApiState:l}})=>{const c=_2(n),u=_2(a),h=bo(n,a),p={};function m(N,A,S){const C=p[N];C?.valueResolved&&(C.valueResolved({data:A,meta:S}),delete C.valueResolved)}function x(N){const A=p[N];A&&(delete p[N],A.cacheEntryRemoved())}const y=(N,A,S)=>{const C=b(N);function k(T,E,_,L){const P=o(S,E),R=o(A.getState(),E);!P&&R&&w(T,L,E,A,_)}if(n.pending.match(N))k(N.meta.arg.endpointName,C,N.meta.requestId,N.meta.arg.originalArgs);else if(t.internalActions.cacheEntriesUpserted.match(N))for(const{queryDescription:T,value:E}of N.payload){const{endpointName:_,originalArgs:L,queryCacheKey:P}=T;k(_,P,N.meta.requestId,L),m(P,E,{})}else if(a.pending.match(N))A.getState()[e].mutations[C]&&w(N.meta.arg.endpointName,N.meta.arg.originalArgs,C,A,N.meta.requestId);else if(h(N))m(C,N.payload,N.meta.baseQueryMeta);else if(t.internalActions.removeQueryResult.match(N)||t.internalActions.removeMutationResult.match(N))x(C);else if(t.util.resetApiState.match(N))for(const T of Object.keys(p))x(T)};function b(N){return c(N)?N.meta.arg.queryCacheKey:u(N)?N.meta.arg.fixedCacheKey??N.meta.requestId:t.internalActions.removeQueryResult.match(N)?N.payload.queryCacheKey:t.internalActions.removeMutationResult.match(N)?sf(N.payload):""}function w(N,A,S,C,k){const T=r.endpointDefinitions[N],E=T?.onCacheEntryAdded;if(!E)return;const _={},L=new Promise(X=>{_.cacheEntryRemoved=X}),P=Promise.race([new Promise(X=>{_.valueResolved=X}),L.then(()=>{throw J5})]);P.catch(()=>{}),p[S]=_;const R=t.endpoints[N].select(lx(T)?A:S),z=C.dispatch((X,H,W)=>W),B={...C,getCacheEntry:()=>R(C.getState()),requestId:k,extra:z,updateCachedData:lx(T)?X=>C.dispatch(t.util.updateQueryData(N,A,X)):void 0,cacheDataLoaded:P,cacheEntryRemoved:L},Y=E(A,B);Promise.resolve(Y).catch(X=>{if(X!==J5)throw X})}return y},uX=({api:t,context:{apiUid:e},reducerPath:r})=>(n,a)=>{t.util.resetApiState.match(n)&&a.dispatch(t.internalActions.middlewareRegistered(e))},hX=({reducerPath:t,context:e,context:{endpointDefinitions:r},mutationThunk:n,queryThunk:a,api:s,assertTagType:o,refetchQuery:l,internalState:c})=>{const{removeQueryResult:u}=s.internalActions,h=xi(bo(n),p0(n)),p=xi(bo(n,a),fd(n,a));let m=[];const x=(w,N)=>{h(w)?b(Y8(w,"invalidatesTags",r,o),N):p(w)?b([],N):s.util.invalidateTags.match(w)&&b(I4(w.payload,void 0,void 0,void 0,void 0,o),N)};function y(w){const{queries:N,mutations:A}=w;for(const S of[N,A])for(const C in S)if(S[C]?.status==="pending")return!0;return!1}function b(w,N){const A=N.getState(),S=A[t];if(m.push(...w),S.config.invalidationBehavior==="delayed"&&y(S))return;const C=m;if(m=[],C.length===0)return;const k=s.util.selectInvalidatedBy(A,C);e.batch(()=>{const T=Array.from(k.values());for(const{queryCacheKey:E}of T){const _=S.queries[E],L=c.currentSubscriptions[E]??{};_&&(ad(L)===0?N.dispatch(u({queryCacheKey:E})):_.status!=="uninitialized"&&N.dispatch(l(_)))}})}return x},fX=({reducerPath:t,queryThunk:e,api:r,refetchQuery:n,internalState:a})=>{const s={},o=(m,x)=>{(r.internalActions.updateSubscriptionOptions.match(m)||r.internalActions.unsubscribeQueryResult.match(m))&&c(m.payload,x),(e.pending.match(m)||e.rejected.match(m)&&m.meta.condition)&&c(m.meta.arg,x),(e.fulfilled.match(m)||e.rejected.match(m)&&!m.meta.condition)&&l(m.meta.arg,x),r.util.resetApiState.match(m)&&h()};function l({queryCacheKey:m},x){const y=x.getState()[t],b=y.queries[m],w=a.currentSubscriptions[m];if(!b||b.status==="uninitialized")return;const{lowestPollingInterval:N,skipPollingIfUnfocused:A}=p(w);if(!Number.isFinite(N))return;const S=s[m];S?.timeout&&(clearTimeout(S.timeout),S.timeout=void 0);const C=Date.now()+N;s[m]={nextPollTimestamp:C,pollingInterval:N,timeout:setTimeout(()=>{(y.config.focused||!A)&&x.dispatch(n(b)),l({queryCacheKey:m},x)},N)}}function c({queryCacheKey:m},x){const b=x.getState()[t].queries[m],w=a.currentSubscriptions[m];if(!b||b.status==="uninitialized")return;const{lowestPollingInterval:N}=p(w);if(!Number.isFinite(N)){u(m);return}const A=s[m],S=Date.now()+N;(!A||S<A.nextPollTimestamp)&&l({queryCacheKey:m},x)}function u(m){const x=s[m];x?.timeout&&clearTimeout(x.timeout),delete s[m]}function h(){for(const m of Object.keys(s))u(m)}function p(m={}){let x=!1,y=Number.POSITIVE_INFINITY;for(let b in m)m[b].pollingInterval&&(y=Math.min(m[b].pollingInterval,y),x=m[b].skipPollingIfUnfocused||x);return{lowestPollingInterval:y,skipPollingIfUnfocused:x}}return o},pX=({api:t,context:e,queryThunk:r,mutationThunk:n})=>{const a=M4(r,n),s=fd(r,n),o=bo(r,n),l={};return(u,h)=>{if(a(u)){const{requestId:p,arg:{endpointName:m,originalArgs:x}}=u.meta,y=e.endpointDefinitions[m],b=y?.onQueryStarted;if(b){const w={},N=new Promise((k,T)=>{w.resolve=k,w.reject=T});N.catch(()=>{}),l[p]=w;const A=t.endpoints[m].select(lx(y)?x:p),S=h.dispatch((k,T,E)=>E),C={...h,getCacheEntry:()=>A(h.getState()),requestId:p,extra:S,updateCachedData:lx(y)?k=>h.dispatch(t.util.updateQueryData(m,x,k)):void 0,queryFulfilled:N};b(x,C)}}else if(o(u)){const{requestId:p,baseQueryMeta:m}=u.meta;l[p]?.resolve({data:u.payload,meta:m}),delete l[p]}else if(s(u)){const{requestId:p,rejectedWithValue:m,baseQueryMeta:x}=u.meta;l[p]?.reject({error:u.payload??u.error,isUnhandledError:!m,meta:x}),delete l[p]}}},mX=({reducerPath:t,context:e,api:r,refetchQuery:n,internalState:a})=>{const{removeQueryResult:s}=r.internalActions,o=(c,u)=>{L4.match(c)&&l(u,"refetchOnFocus"),z4.match(c)&&l(u,"refetchOnReconnect")};function l(c,u){const h=c.getState()[t],p=h.queries,m=a.currentSubscriptions;e.batch(()=>{for(const x of Object.keys(m)){const y=p[x],b=m[x];if(!b||!y)continue;(Object.values(b).some(N=>N[u]===!0)||Object.values(b).every(N=>N[u]===void 0)&&h.config[u])&&(ad(b)===0?c.dispatch(s({queryCacheKey:x})):y.status!=="uninitialized"&&c.dispatch(n(y)))}})}return o};function gX(t){const{reducerPath:e,queryThunk:r,api:n,context:a}=t,{apiUid:s}=a,o={invalidateTags:cr(`${e}/invalidateTags`)},l=p=>p.type.startsWith(`${e}/`),c=[uX,cX,hX,fX,dX,pX];return{middleware:p=>{let m=!1;const y={...t,internalState:{currentSubscriptions:{}},refetchQuery:h,isThisApiSliceAction:l},b=c.map(A=>A(y)),w=iX(y),N=mX(y);return A=>S=>{if(!C4(S))return A(S);m||(m=!0,p.dispatch(n.internalActions.middlewareRegistered(s)));const C={...p,next:A},k=p.getState(),[T,E]=w(S,C,k);let _;if(T?_=A(S):_=E,p.getState()[e]&&(N(S,C,k),l(S)||a.hasRehydrationInfo(S)))for(const L of b)L(S,C,k);return _}},actions:o};function h(p){return t.api.endpoints[p.endpointName].initiate(p.originalArgs,{subscribe:!1,forceRefetch:!0})}}var e6=Symbol(),X8=({createSelector:t=de}={})=>({name:e6,init(e,{baseQuery:r,tagTypes:n,reducerPath:a,serializeQueryArgs:s,keepUnusedDataFor:o,refetchOnMountOrArgChange:l,refetchOnFocus:c,refetchOnReconnect:u,invalidationBehavior:h,onSchemaFailure:p,catchSchemaFailure:m,skipSchemaValidation:x},y){mY();const b=re=>re;Object.assign(e,{reducerPath:a,endpoints:{},internalActions:{onOnline:z4,onOffline:F8,onFocus:L4,onFocusLost:B8},util:{}});const w=sX({serializeQueryArgs:s,reducerPath:a,createSelector:t}),{selectInvalidatedBy:N,selectCachedArgsForQuery:A,buildQuerySelector:S,buildInfiniteQuerySelector:C,buildMutationSelector:k}=w;Qs(e.util,{selectInvalidatedBy:N,selectCachedArgsForQuery:A});const{queryThunk:T,infiniteQueryThunk:E,mutationThunk:_,patchQueryData:L,updateQueryData:P,upsertQueryData:R,prefetch:z,buildMatchThunkActions:B}=nX({baseQuery:r,reducerPath:a,context:y,api:e,serializeQueryArgs:s,assertTagType:b,selectors:w,onSchemaFailure:p,catchSchemaFailure:m,skipSchemaValidation:x}),{reducer:Y,actions:X}=aX({context:y,queryThunk:T,mutationThunk:_,serializeQueryArgs:s,reducerPath:a,assertTagType:b,config:{refetchOnFocus:c,refetchOnReconnect:u,refetchOnMountOrArgChange:l,keepUnusedDataFor:o,reducerPath:a,invalidationBehavior:h}});Qs(e.util,{patchQueryData:L,updateQueryData:P,upsertQueryData:R,prefetch:z,resetApiState:X.resetApiState,upsertQueryEntries:X.cacheEntriesUpserted}),Qs(e.internalActions,X);const{middleware:H,actions:W}=gX({reducerPath:a,context:y,queryThunk:T,mutationThunk:_,infiniteQueryThunk:E,api:e,assertTagType:b,selectors:w});Qs(e.util,W),Qs(e,{reducer:Y,middleware:H});const{buildInitiateQuery:V,buildInitiateInfiniteQuery:Z,buildInitiateMutation:F,getRunningMutationThunk:G,getRunningMutationsThunk:te,getRunningQueriesThunk:K,getRunningQueryThunk:U}=tX({queryThunk:T,mutationThunk:_,infiniteQueryThunk:E,api:e,serializeQueryArgs:s,context:y});return Qs(e.util,{getRunningMutationThunk:G,getRunningMutationsThunk:te,getRunningQueryThunk:U,getRunningQueriesThunk:K}),{name:e6,injectEndpoint(re,ae){const we=e,ye=we.endpoints[re]??={};S0(ae)&&Qs(ye,{name:re,select:S(re,ae),initiate:V(re,ae)},B(T,re)),QW(ae)&&Qs(ye,{name:re,select:k(),initiate:F(re)},B(_,re)),A0(ae)&&Qs(ye,{name:re,select:C(re,ae),initiate:Z(re,ae)},B(T,re))}}}});X8();function Bm(t){return t.replace(t[0],t[0].toUpperCase())}function xX(t){return t.type==="query"}function bX(t){return t.type==="mutation"}function V8(t){return t.type==="infinitequery"}function nh(t,...e){return Object.assign(t,...e)}var Zv=Symbol();function Qv(t,e,r,n){const a=O.useMemo(()=>({queryArgs:t,serialized:typeof t=="object"?e({queryArgs:t,endpointDefinition:r,endpointName:n}):t}),[t,e,r,n]),s=O.useRef(a);return O.useEffect(()=>{s.current.serialized!==a.serialized&&(s.current=a)},[a]),s.current.serialized===a.serialized?s.current.queryArgs:t}function Fm(t){const e=O.useRef(t);return O.useEffect(()=>{Eh(e.current,t)||(e.current=t)},[t]),Eh(e.current,t)?e.current:t}var yX=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",vX=yX(),wX=()=>typeof navigator<"u"&&navigator.product==="ReactNative",jX=wX(),NX=()=>vX||jX?O.useLayoutEffect:O.useEffect,SX=NX(),t6=t=>t.isUninitialized?{...t,isUninitialized:!1,isFetching:!0,isLoading:t.data===void 0,status:z8.pending}:t;function Jv(t,...e){const r={};return e.forEach(n=>{r[n]=t[n]}),r}var e1=["data","status","isLoading","isSuccess","isError","error"];function AX({api:t,moduleOptions:{batch:e,hooks:{useDispatch:r,useSelector:n,useStore:a},unstable__sideEffectsInRender:s,createSelector:o},serializeQueryArgs:l,context:c}){const u=s?C=>C():O.useEffect;return{buildQueryHooks:N,buildInfiniteQueryHooks:A,buildMutationHook:S,usePrefetch:m};function h(C,k,T){if(k?.endpointName&&C.isUninitialized){const{endpointName:z}=k,B=c.endpointDefinitions[z];T!==Ga&&l({queryArgs:k.originalArgs,endpointDefinition:B,endpointName:z})===l({queryArgs:T,endpointDefinition:B,endpointName:z})&&(k=void 0)}let E=C.isSuccess?C.data:k?.data;E===void 0&&(E=C.data);const _=E!==void 0,L=C.isLoading,P=(!k||k.isLoading||k.isUninitialized)&&!_&&L,R=C.isSuccess||_&&(L&&!k?.isError||C.isUninitialized);return{...C,data:E,currentData:C.data,isFetching:L,isLoading:P,isSuccess:R}}function p(C,k,T){if(k?.endpointName&&C.isUninitialized){const{endpointName:z}=k,B=c.endpointDefinitions[z];T!==Ga&&l({queryArgs:k.originalArgs,endpointDefinition:B,endpointName:z})===l({queryArgs:T,endpointDefinition:B,endpointName:z})&&(k=void 0)}let E=C.isSuccess?C.data:k?.data;E===void 0&&(E=C.data);const _=E!==void 0,L=C.isLoading,P=(!k||k.isLoading||k.isUninitialized)&&!_&&L,R=C.isSuccess||L&&_;return{...C,data:E,currentData:C.data,isFetching:L,isLoading:P,isSuccess:R}}function m(C,k){const T=r(),E=Fm(k);return O.useCallback((_,L)=>T(t.util.prefetch(C,_,{...E,...L})),[C,T,E])}function x(C,k,{refetchOnReconnect:T,refetchOnFocus:E,refetchOnMountOrArgChange:_,skip:L=!1,pollingInterval:P=0,skipPollingIfUnfocused:R=!1,...z}={}){const{initiate:B}=t.endpoints[C],Y=r(),X=O.useRef(void 0);if(!X.current){const re=Y(t.internalActions.internal_getRTKQSubscriptions());X.current=re}const H=Qv(L?Ga:k,cx,c.endpointDefinitions[C],C),W=Fm({refetchOnReconnect:T,refetchOnFocus:E,pollingInterval:P,skipPollingIfUnfocused:R}),V=z.initialPageParam,Z=Fm(V),F=O.useRef(void 0);let{queryCacheKey:G,requestId:te}=F.current||{},K=!1;G&&te&&(K=X.current.isRequestSubscribed(G,te));const U=!K&&F.current!==void 0;return u(()=>{U&&(F.current=void 0)},[U]),u(()=>{const re=F.current;if(H===Ga){re?.unsubscribe(),F.current=void 0;return}const ae=F.current?.subscriptionOptions;if(!re||re.arg!==H){re?.unsubscribe();const we=Y(B(H,{subscriptionOptions:W,forceRefetch:_,...V8(c.endpointDefinitions[C])?{initialPageParam:Z}:{}}));F.current=we}else W!==ae&&re.updateSubscriptionOptions(W)},[Y,B,_,H,W,U,Z,C]),[F,Y,B,W]}function y(C,k){return(E,{skip:_=!1,selectFromResult:L}={})=>{const{select:P}=t.endpoints[C],R=Qv(_?Ga:E,l,c.endpointDefinitions[C],C),z=O.useRef(void 0),B=O.useMemo(()=>o([P(R),(V,Z)=>Z,V=>R],k,{memoizeOptions:{resultEqualityCheck:Eh}}),[P,R]),Y=O.useMemo(()=>L?o([B],L,{devModeChecks:{identityFunctionCheck:"never"}}):B,[B,L]),X=n(V=>Y(V,z.current),Eh),H=a(),W=B(H.getState(),z.current);return SX(()=>{z.current=W},[W]),X}}function b(C){O.useEffect(()=>()=>{C.current?.unsubscribe?.(),C.current=void 0},[C])}function w(C){if(!C.current)throw new Error(xn(38));return C.current.refetch()}function N(C){const k=(_,L={})=>{const[P]=x(C,_,L);return b(P),O.useMemo(()=>({refetch:()=>w(P)}),[P])},T=({refetchOnReconnect:_,refetchOnFocus:L,pollingInterval:P=0,skipPollingIfUnfocused:R=!1}={})=>{const{initiate:z}=t.endpoints[C],B=r(),[Y,X]=O.useState(Zv),H=O.useRef(void 0),W=Fm({refetchOnReconnect:_,refetchOnFocus:L,pollingInterval:P,skipPollingIfUnfocused:R});u(()=>{const G=H.current?.subscriptionOptions;W!==G&&H.current?.updateSubscriptionOptions(W)},[W]);const V=O.useRef(W);u(()=>{V.current=W},[W]);const Z=O.useCallback(function(G,te=!1){let K;return e(()=>{H.current?.unsubscribe(),H.current=K=B(z(G,{subscriptionOptions:V.current,forceRefetch:!te})),X(G)}),K},[B,z]),F=O.useCallback(()=>{H.current?.queryCacheKey&&B(t.internalActions.removeQueryResult({queryCacheKey:H.current?.queryCacheKey}))},[B]);return O.useEffect(()=>()=>{H?.current?.unsubscribe()},[]),O.useEffect(()=>{Y!==Zv&&!H.current&&Z(Y,!0)},[Y,Z]),O.useMemo(()=>[Z,Y,{reset:F}],[Z,Y,F])},E=y(C,h);return{useQueryState:E,useQuerySubscription:k,useLazyQuerySubscription:T,useLazyQuery(_){const[L,P,{reset:R}]=T(_),z=E(P,{..._,skip:P===Zv}),B=O.useMemo(()=>({lastArg:P}),[P]);return O.useMemo(()=>[L,{...z,reset:R},B],[L,z,R,B])},useQuery(_,L){const P=k(_,L),R=E(_,{selectFromResult:_===Ga||L?.skip?void 0:t6,...L}),z=Jv(R,...e1);return O.useDebugValue(z),O.useMemo(()=>({...R,...P}),[R,P])}}}function A(C){const k=(E,_={})=>{const[L,P,R,z]=x(C,E,_),B=O.useRef(z);u(()=>{B.current=z},[z]);const Y=O.useCallback(function(W,V){let Z;return e(()=>{L.current?.unsubscribe(),L.current=Z=P(R(W,{subscriptionOptions:B.current,direction:V}))}),Z},[L,P,R]);b(L);const X=Qv(_.skip?Ga:E,cx,c.endpointDefinitions[C],C),H=O.useCallback(()=>w(L),[L]);return O.useMemo(()=>({trigger:Y,refetch:H,fetchNextPage:()=>Y(X,"forward"),fetchPreviousPage:()=>Y(X,"backward")}),[H,Y,X])},T=y(C,p);return{useInfiniteQueryState:T,useInfiniteQuerySubscription:k,useInfiniteQuery(E,_){const{refetch:L,fetchNextPage:P,fetchPreviousPage:R}=k(E,_),z=T(E,{selectFromResult:E===Ga||_?.skip?void 0:t6,..._}),B=Jv(z,...e1,"hasNextPage","hasPreviousPage");return O.useDebugValue(B),O.useMemo(()=>({...z,fetchNextPage:P,fetchPreviousPage:R,refetch:L}),[z,P,R,L])}}}function S(C){return({selectFromResult:k,fixedCacheKey:T}={})=>{const{select:E,initiate:_}=t.endpoints[C],L=r(),[P,R]=O.useState();O.useEffect(()=>()=>{P?.arg.fixedCacheKey||P?.reset()},[P]);const z=O.useCallback(function(G){const te=L(_(G,{fixedCacheKey:T}));return R(te),te},[L,_,T]),{requestId:B}=P||{},Y=O.useMemo(()=>E({fixedCacheKey:T,requestId:P?.requestId}),[T,P,E]),X=O.useMemo(()=>k?o([Y],k):Y,[k,Y]),H=n(X,Eh),W=T==null?P?.arg.originalArgs:void 0,V=O.useCallback(()=>{e(()=>{P&&R(void 0),T&&L(t.internalActions.removeMutationResult({requestId:B,fixedCacheKey:T}))})},[L,T,P,B]),Z=Jv(H,...e1,"endpointName");O.useDebugValue(Z);const F=O.useMemo(()=>({...H,originalArgs:W,reset:V}),[H,W,V]);return O.useMemo(()=>[z,F],[z,F])}}}var CX=Symbol(),kX=({batch:t=eY,hooks:e={useDispatch:Ba,useSelector:ua,useStore:HP},createSelector:r=de,unstable__sideEffectsInRender:n=!1,...a}={})=>({name:CX,init(s,{serializeQueryArgs:o},l){const c=s,{buildQueryHooks:u,buildInfiniteQueryHooks:h,buildMutationHook:p,usePrefetch:m}=AX({api:s,moduleOptions:{batch:t,hooks:e,unstable__sideEffectsInRender:n,createSelector:r},serializeQueryArgs:o,context:l});return nh(c,{usePrefetch:m}),nh(l,{batch:t}),{injectEndpoint(x,y){if(xX(y)){const{useQuery:b,useLazyQuery:w,useLazyQuerySubscription:N,useQueryState:A,useQuerySubscription:S}=u(x);nh(c.endpoints[x],{useQuery:b,useLazyQuery:w,useLazyQuerySubscription:N,useQueryState:A,useQuerySubscription:S}),s[`use${Bm(x)}Query`]=b,s[`useLazy${Bm(x)}Query`]=w}if(bX(y)){const b=p(x);nh(c.endpoints[x],{useMutation:b}),s[`use${Bm(x)}Mutation`]=b}else if(V8(y)){const{useInfiniteQuery:b,useInfiniteQuerySubscription:w,useInfiniteQueryState:N}=h(x);nh(c.endpoints[x],{useInfiniteQuery:b,useInfiniteQuerySubscription:w,useInfiniteQueryState:N}),s[`use${Bm(x)}InfiniteQuery`]=b}}}}}),DX=W8(X8(),kX());const TX="https://aaaogo.xyz/api",uo=DX({reducerPath:"api",baseQuery:ZW({baseUrl:TX,prepareHeaders:(t,{getState:e})=>{const r=e().auth.token;return r?t.set("Authorization",`Bearer ${r}`):console.log("No token found in Redux state"),t}}),tagTypes:["PendingKYCs","User"],endpoints:t=>({loginUser:t.mutation({query:e=>({url:"/user/login",method:"POST",body:e})}),getPendingKYCs:t.query({query:()=>({url:"/user/pending-kycs",method:"GET"}),providesTags:["PendingKYCs"]}),approveKyc:t.mutation({query:({userId:e})=>({url:"/user/approve-kyc",method:"POST",body:{userId:e}}),invalidatesTags:["PendingKYCs"]}),rejectKyc:t.mutation({query:({userId:e,reason:r})=>({url:"/user/reject-kyc",method:"POST",body:{userId:e,reason:r}}),invalidatesTags:["PendingKYCs"]}),getCurrentUser:t.query({query:()=>({url:"/drivers/get-current-user",method:"GET"}),providesTags:["User"],transformResponse:e=>(console.log("getCurrentUser Response:",e),e)}),getPendingApprovalsEarnings:t.query({query:()=>({url:"/mlm/pending-approvals-earnings/",method:"GET"}),providesTags:["PendingKYCs","User"],transformResponse:e=>(console.log("getPendingApprovalsEarnings Response:",e),e?.data||e)})})}),{useLoginUserMutation:MX,useGetPendingKYCsQuery:EX,useGetCurrentUserQuery:OX,useGetPendingApprovalsEarningsQuery:PX}=uo,Kl="https://aaaogo.xyz/api/vehicle-hiring",_X=async t=>{try{return(await _e.get(`${Kl}/all-driver-hirings`,{headers:{Authorization:`Bearer ${t}`}})).data}catch(e){throw e.response?.data?.message||"Failed to fetch all driver hirings"}},RX=async t=>{try{return(await _e.get(`${Kl}/pending-driver-hirings`,{headers:{Authorization:`Bearer ${t}`}})).data}catch(e){throw e.response?.data?.message||"Failed to fetch pending driver hirings"}},LX=async(t,e)=>{try{return(await _e.get(`${Kl}/driver-hiring/${t}`,{headers:{Authorization:`Bearer ${e}`}})).data}catch(r){throw r.response?.data?.message||"Failed to fetch driver hiring details"}},zX=async(t,e)=>{try{return(await _e.post(`${Kl}/accept-driver-hiring/${t}`,{},{headers:{Authorization:`Bearer ${e}`}})).data}catch(r){throw r.response?.data?.message||"Failed to approve driver hiring"}},IX=async(t,e,r)=>{try{return(await _e.post(`${Kl}/reject-driver-hiring/${t}`,{reason:e},{headers:{Authorization:`Bearer ${r}`}})).data}catch(n){throw n.response?.data?.message||"Failed to reject driver hiring"}},BX=async(t,e,r)=>{try{return(await _e.put(`${Kl}/update-driver-hiring/${t}`,{terms:e},{headers:{Authorization:`Bearer ${r}`}})).data}catch(n){throw n.response?.data?.message||"Failed to update driver hiring terms"}},FX=async(t,e,r)=>{try{return(await _e.post(`${Kl}/add-note/${t}`,{note:e},{headers:{Authorization:`Bearer ${r}`}})).data}catch(n){throw n.response?.data?.message||"Failed to add internal note"}},t1=Zt("driverHiring/fetchAll",async(t,{rejectWithValue:e})=>{try{return await _X(t)}catch(r){return e(r)}}),Cg=Zt("driverHiring/fetchPending",async(t,{rejectWithValue:e})=>{try{return await RX(t)}catch(r){return e(r)}}),kg=Zt("driverHiring/fetchById",async({driverHiringId:t,token:e},{rejectWithValue:r})=>{try{return await LX(t,e)}catch(n){return r(n)}}),Rh=Zt("driverHiring/approve",async({driverHiringId:t,token:e},{rejectWithValue:r})=>{try{return await zX(t,e)}catch(n){return r(n)}}),Lh=Zt("driverHiring/reject",async({driverHiringId:t,reason:e,token:r},{rejectWithValue:n})=>{try{return await IX(t,e,r)}catch(a){return n(a)}}),Dg=Zt("driverHiring/updateTerms",async({driverHiringId:t,terms:e,token:r},{rejectWithValue:n})=>{try{return await BX(t,e,r)}catch(a){return n(a)}}),Tg=Zt("driverHiring/addNote",async({driverHiringId:t,note:e,token:r},{rejectWithValue:n})=>{try{return await FX(t,e,r)}catch(a){return n(a)}}),q8=$t({name:"driverHiring",initialState:{driverHirings:[],pendingHirings:[],totalPending:0,currentHiring:null,loading:!1,error:null,success:null},reducers:{resetStatus:t=>{t.error=null,t.success=null}},extraReducers:t=>{t.addCase(t1.pending,e=>{e.loading=!0,e.error=null,e.success=null}).addCase(t1.fulfilled,(e,r)=>{e.loading=!1,e.driverHirings=r.payload.driverHirings,e.success=r.payload.message}).addCase(t1.rejected,(e,r)=>{e.loading=!1,e.error=r.payload||"Failed to fetch all driver hirings"}),t.addCase(Cg.pending,e=>{e.loading=!0,e.error=null,e.success=null}).addCase(Cg.fulfilled,(e,r)=>{e.loading=!1,e.pendingHirings=r.payload.pendingHirings,e.totalPending=r.payload.totalPending,e.success=r.payload.message}).addCase(Cg.rejected,(e,r)=>{e.loading=!1,e.error=r.payload||"Failed to fetch pending driver hirings"}),t.addCase(kg.pending,e=>{e.loading=!0,e.error=null,e.success=null}).addCase(kg.fulfilled,(e,r)=>{e.loading=!1,e.currentHiring=r.payload.driverHiring,e.success=r.payload.message}).addCase(kg.rejected,(e,r)=>{e.loading=!1,e.error=r.payload||"Failed to fetch driver hiring details"}),t.addCase(Rh.pending,e=>{e.loading=!0,e.error=null,e.success=null}).addCase(Rh.fulfilled,(e,r)=>{e.loading=!1,e.pendingHirings=e.pendingHirings.filter(n=>n._id!==r.payload.driverHiringId),e.totalPending=e.pendingHirings.length,e.currentHiring=null,e.success=r.payload.message}).addCase(Rh.rejected,(e,r)=>{e.loading=!1,e.error=r.payload||"Failed to approve driver hiring"}),t.addCase(Lh.pending,e=>{e.loading=!0,e.error=null,e.success=null}).addCase(Lh.fulfilled,(e,r)=>{e.loading=!1,e.pendingHirings=e.pendingHirings.filter(n=>n._id!==r.payload.driverHiringId),e.totalPending=e.pendingHirings.length,e.currentHiring=null,e.success=r.payload.message}).addCase(Lh.rejected,(e,r)=>{e.loading=!1,e.error=r.payload||"Failed to reject driver hiring"}),t.addCase(Dg.pending,e=>{e.loading=!0,e.error=null,e.success=null}).addCase(Dg.fulfilled,(e,r)=>{e.loading=!1,e.currentHiring=r.payload.driverHiring,e.success=r.payload.message}).addCase(Dg.rejected,(e,r)=>{e.loading=!1,e.error=r.payload||"Failed to update driver hiring terms"}),t.addCase(Tg.pending,e=>{e.loading=!0,e.error=null,e.success=null}).addCase(Tg.fulfilled,(e,r)=>{e.loading=!1,e.currentHiring=r.payload.driverHiring,e.success=r.payload.message}).addCase(Tg.rejected,(e,r)=>{e.loading=!1,e.error=r.payload||"Failed to add internal note"})}}),{resetStatus:G8}=q8.actions,HX=q8.reducer,C0="https://aaaogo.xyz/api/mlm/",$X=async()=>{try{const t=await _e.get(`${C0}admin-dashboard`,{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}});if(t.data.success)return t.data.data;throw new Error(t.data.message||"Failed to fetch MLM dashboard")}catch(t){throw t.response?.status===401&&(window.location.href="/login"),new Error(t.response?.data?.message||t.message)}},YX=async t=>{try{const e=await _e.put(`${C0}update-all`,t,{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}});if(e.data.success)return e.data.data;throw new Error(e.data.message||"Failed to update MLM distributions")}catch(e){throw e.response?.status===401&&(window.location.href="/login"),new Error(e.response?.data?.message||e.message)}},UX=async()=>{try{const t=await _e.get(`${C0.replace("/mlm/","/mlm")}`,{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}});if(t.data.success)return t.data.data;throw new Error(t.data.message||"Failed to fetch MLM dashboard")}catch(t){throw t.response?.status===401&&(window.location.href="/login"),new Error(t.response?.data?.message||t.message)}},WX=async()=>{try{const t=await _e.get(`${C0}ddr/leaderboard`,{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}});if(t.data.success)return t.data.data;throw new Error(t.data.message||"Failed to fetch DDR leaderboard")}catch(t){throw t.response?.status===401&&(window.location.href="/login"),new Error(t.response?.data?.message||t.message)}},zh=Zt("mlm/fetchMLMDashboard",async(t,{rejectWithValue:e})=>{try{const r=await $X();return console.log("Fetched dashboard:",r),r}catch(r){return console.error("Fetch error:",r),e(r.message)}}),Mg=Zt("mlm/updateMLMDistributions",async(t,{rejectWithValue:e})=>{try{console.log("Sending update payload:",t);const r=await YX(t);return console.log("Received update response:",r),r}catch(r){return console.error("Update error:",r),e(r.message)}}),Eg=Zt("mlm/fetchMLMDashboardData",async(t,{rejectWithValue:e})=>{try{return await UX()}catch(r){return e(r.message)}}),Og=Zt("mlm/fetchDDRLeaderboard",async(t,{rejectWithValue:e})=>{try{return await WX()}catch(r){return e(r.message)}}),XX={dashboard:null,dashboardData:null,leaderboard:null,loading:!1,error:null,success:!1},K8=$t({name:"mlm",initialState:XX,reducers:{resetMlmState:t=>{t.loading=!1,t.error=null,t.success=!1}},extraReducers:t=>{t.addCase(zh.pending,e=>{e.loading=!0,e.error=null}).addCase(zh.fulfilled,(e,r)=>{e.loading=!1,e.dashboard=r.payload}).addCase(zh.rejected,(e,r)=>{e.loading=!1,e.error=r.payload}).addCase(Mg.pending,e=>{e.loading=!0,e.error=null,e.success=!1}).addCase(Mg.fulfilled,(e,r)=>{e.loading=!1,e.success=!0;const n={...e.dashboard.percentageConfiguration,...r.payload.mainDistributions,ddrSubDistribution:{...e.dashboard.percentageConfiguration?.ddrSubDistribution,level1:r.payload.ddrSubDistributions.ddrLevel1,level2:r.payload.ddrSubDistributions.ddrLevel2,level3:r.payload.ddrSubDistributions.ddrLevel3,level4:r.payload.ddrSubDistributions.ddrLevel4},porparleTeamSubDistribution:{...e.dashboard.percentageConfiguration?.porparleTeamSubDistribution,...r.payload.porparleTeamSubDistributions},topTeamPerformSubDistribution:{...e.dashboard.percentageConfiguration?.topTeamPerformSubDistribution,...r.payload.topTeamSubDistributions},companyOperationsSubDistribution:{...e.dashboard.percentageConfiguration?.companyOperationsSubDistribution,...r.payload.companyOperationsSubDistributions},publicShareSubDistribution:{...e.dashboard.percentageConfiguration?.publicShareSubDistribution,...r.payload.publicShareSubDistributions}};e.dashboard={...e.dashboard,percentageConfiguration:n},console.log("Updated state:",e.dashboard)}).addCase(Mg.rejected,(e,r)=>{e.loading=!1,e.error=r.payload}).addCase(Eg.pending,e=>{e.loading=!0,e.error=null}).addCase(Eg.fulfilled,(e,r)=>{e.loading=!1,e.dashboardData=r.payload}).addCase(Eg.rejected,(e,r)=>{e.loading=!1,e.error=r.payload}).addCase(Og.pending,e=>{e.loading=!0,e.error=null}).addCase(Og.fulfilled,(e,r)=>{e.loading=!1,e.leaderboard=r.payload}).addCase(Og.rejected,(e,r)=>{e.loading=!1,e.error=r.payload})}}),{resetMlmState:r6}=K8.actions,VX=K8.reducer,bi="/user/",qX=async()=>{try{const t=await la.get(`${bi}customers`);return console.log("getAllUsers response:",t.data),{users:t.data.customers,totalUsers:t.data.totalCustomers,success:t.data.success,message:t.data.message}}catch(t){console.error("getAllUsers error:",t.response?.data||t.message);const e=t.response?.data?.message||t.message||"Failed to fetch customers";throw new Error(e)}},GX=async t=>(await la.post(`${bi}admin/add-admin`,t)).data,KX=async()=>{try{const t=await la.get(`${bi}drivers`);return console.log("getAllDrivers response:",t.data),{drivers:t.data.drivers,totalDrivers:t.data.totalDrivers,success:t.data.success,message:t.data.message}}catch(t){console.error("getAllDrivers error:",t.response?.data||t.message);const e=t.response?.data?.message||t.message||"Failed to fetch drivers";throw new Error(e)}},ZX=async(t,e)=>{console.log(`Sending PUT request for userId: ${t}, URL: ${bi}edit-driver/${t}, Data:`,e);try{const r=new AbortController,n=setTimeout(()=>{console.log(`Request timeout for userId: ${t}`),r.abort()},1e4),a=await la.put(`${bi}edit-driver/${t}`,e,{headers:{"Content-Type":e instanceof FormData?"multipart/form-data":"application/json"},signal:r.signal});return clearTimeout(n),console.log("Edit driver response:",a.data),a.data}catch(r){console.error("Edit driver error:",r.response?.data||r.message);const n=r.response?.data?.message||r.response?.data?.errors||r.message||"Failed to edit driver";throw new Error(JSON.stringify(n))}},QX=async(t,e)=>{console.log(`Sending PATCH request for userId: ${t}, URL: ${bi}edit/${t}, Data:`,e);try{const r=new AbortController,n=setTimeout(()=>{console.log(`Request timeout for userId: ${t}`),r.abort()},1e4),a=await la.patch(`${bi}edit/${t}`,e,{headers:{},signal:r.signal});return clearTimeout(n),console.log("Edit response:",a.data),a.data}catch(r){console.error("Edit error:",r.response?.data||r.message);const n=r.response?.data?.message||r.response?.data?.errors||r.message||"Failed to edit user";throw new Error(JSON.stringify(n))}},JX=async t=>{console.log(`Sending DELETE request for userId: ${t}, URL: ${bi}delete/${t}`);try{const e=new AbortController,r=setTimeout(()=>{console.log(`Request timeout for userId: ${t}`),e.abort()},15e3),n=await la.delete(`${bi}delete/${t}`,{signal:e.signal});return clearTimeout(r),console.log("Delete response:",n.data),n.data}catch(e){console.error("Delete error:",e.response?.data||e.message);const r=e.response?.data?.message||e.message||"Failed to delete user";throw new Error(r)}},Rd={getAllUsers:qX,editUser:QX,deleteUser:JX,getAllDrivers:KX,editDriver:ZX,addAdmin:GX},Ih=Zt("users/fetchAll",async(t,e)=>{try{console.log("Starting fetchAllUsers");const r=await Rd.getAllUsers();return console.log("fetchAllUsers response:",r),r}catch(r){const n=r.message||"Failed to fetch customers";return console.error("fetchAllUsers error:",n),e.rejectWithValue(n)}}),sd=Zt("users/fetchAllDrivers",async(t,e)=>{try{console.log("Starting fetchAllDrivers");const r=await Rd.getAllDrivers();return console.log("fetchAllDrivers response:",r),r}catch(r){const n=r.message||"Failed to fetch drivers";return console.error("fetchAllDrivers error:",n),e.rejectWithValue(n)}}),Pg=Zt("users/edit",async({userId:t,userData:e},r)=>{console.log(`Starting editUser thunk for userId: ${t}`);try{const n=await Rd.editUser(t,e);return console.log("editUser response:",n),await r.dispatch(Ih()).unwrap(),{userId:n.user?.userId||t,message:n.message,success:n.success}}catch(n){let a;try{a=JSON.parse(n.message)}catch{a=n.message||"Failed to edit user"}return console.error("editUser error:",a),r.rejectWithValue(a)}}),_g=Zt("users/editDriver",async({userId:t,userData:e},r)=>{console.log(`Starting editDriver thunk for userId: ${t}`);try{const n=await Rd.editDriver(t,e);return console.log("editDriver response:",n),await r.dispatch(sd()).unwrap(),{userId:n.user?.userId||t,message:n.message,success:n.success}}catch(n){let a;try{a=JSON.parse(n.message)}catch{a=n.message||"Failed to edit driver"}return console.error("editDriver error:",a),r.rejectWithValue(a)}}),Bh=Zt("users/delete",async(t,e)=>{console.log(`Starting deleteUser thunk for userId: ${t}`);try{const r=await Rd.deleteUser(t);return console.log("deleteUser response:",r),await e.dispatch(sd()).unwrap(),{userId:r.userId||t,message:r.message,success:r.success}}catch(r){const n=r.message||"Failed to delete user";return console.error("deleteUser error:",n),e.rejectWithValue(n)}}),Z8=$t({name:"users",initialState:{users:[],drivers:[],totalUsers:0,totalDrivers:0,loading:!1,error:null,success:!1,editSuccess:!1,deleteSuccess:!1,updateKey:0},reducers:{resetUserState:t=>{console.log("Resetting user state"),t.loading=!1,t.error=null,t.success=!1,t.editSuccess=!1,t.deleteSuccess=!1}},extraReducers:t=>{t.addCase(Ih.pending,e=>{console.log("fetchAllUsers pending"),e.loading=!0,e.error=null,e.success=!1}).addCase(Ih.fulfilled,(e,r)=>{console.log("fetchAllUsers fulfilled:",r.payload),e.loading=!1,e.users=r.payload.users||[],e.totalUsers=r.payload.totalUsers||0,e.success=!0}).addCase(Ih.rejected,(e,r)=>{console.log("fetchAllUsers rejected:",r.payload),e.loading=!1,e.error=r.payload,e.success=!1}).addCase(sd.pending,e=>{console.log("fetchAllDrivers pending"),e.loading=!0,e.error=null,e.success=!1}).addCase(sd.fulfilled,(e,r)=>{console.log("fetchAllDrivers fulfilled:",r.payload),e.loading=!1,e.drivers=r.payload.drivers||[],e.totalDrivers=r.payload.totalDrivers||0,e.success=!0}).addCase(sd.rejected,(e,r)=>{console.log("fetchAllDrivers rejected:",r.payload),e.loading=!1,e.error=r.payload,e.success=!1}).addCase(Pg.pending,e=>{console.log("editUser pending"),e.loading=!0,e.error=null,e.editSuccess=!1}).addCase(Pg.fulfilled,(e,r)=>{console.log("editUser fulfilled:",r.payload),e.loading=!1,e.editSuccess=r.payload.success||!1,e.updateKey=Date.now()}).addCase(Pg.rejected,(e,r)=>{console.log("editUser rejected:",r.payload),e.loading=!1,e.error=r.payload,e.editSuccess=!1}).addCase(_g.pending,e=>{console.log("editDriver pending"),e.loading=!0,e.error=null,e.editSuccess=!1}).addCase(_g.fulfilled,(e,r)=>{console.log("editDriver fulfilled:",r.payload),e.loading=!1,e.editSuccess=r.payload.success||!1,e.updateKey=Date.now()}).addCase(_g.rejected,(e,r)=>{console.log("editDriver rejected:",r.payload),e.loading=!1,e.error=r.payload,e.editSuccess=!1}).addCase(Bh.pending,e=>{console.log("deleteUser pending"),e.loading=!0,e.error=null,e.deleteSuccess=!1}).addCase(Bh.fulfilled,(e,r)=>{console.log("deleteUser fulfilled:",r.payload),e.loading=!1,e.deleteSuccess=r.payload.success||!1,e.updateKey=Date.now()}).addCase(Bh.rejected,(e,r)=>{console.log("deleteUser rejected:",r.payload),e.loading=!1,e.error=r.payload,e.deleteSuccess=!1})}}),{resetUserState:Q8}=Z8.actions,eV=Z8.reducer,r1=Zt("admin/addAdmin",async(t,e)=>{try{console.log("Starting addAdmin:",t);const r=await Rd.addAdmin(t);return console.log("addAdmin response:",r),r}catch(r){const n=r.message||"Failed to add admin";return console.error("addAdmin error:",n),e.rejectWithValue(n)}}),tV=Zt("admin/setUser",async(t,e)=>(console.log("Setting user:",t),t)),J8=$t({name:"admin",initialState:{user:null,loading:!1,error:null,success:!1},reducers:{resetAdminState:t=>{console.log("Resetting admin state"),t.loading=!1,t.error=null,t.success=!1}},extraReducers:t=>{t.addCase(tV.fulfilled,(e,r)=>{console.log("setUser fulfilled:",r.payload),e.user=r.payload,e.success=!0}).addCase(r1.pending,e=>{console.log("addAdmin pending"),e.loading=!0,e.error=null,e.success=!1}).addCase(r1.fulfilled,(e,r)=>{console.log("addAdmin fulfilled:",r.payload),e.loading=!1,e.success=!0}).addCase(r1.rejected,(e,r)=>{console.log("addAdmin rejected:",r.payload),e.loading=!1,e.error=r.payload,e.success=!1})}}),{resetAdminState:bwe}=J8.actions,rV=J8.reducer,Rg=Zt("services/fetchServices",async(t,{rejectWithValue:e})=>{try{return(await _e.get("https://aaaogo.xyz/api/user/services",{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}})).data.services}catch(r){return e(r.response.data)}}),e_=Zt("services/approveService",async(t,{rejectWithValue:e})=>{try{return(await _e.post(`https://aaaogo.xyz/api/user/services/approve/${t}`,{},{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}})).data}catch(r){return e(r.response.data)}}),t_=Zt("services/rejectService",async({serviceId:t,reason:e},{rejectWithValue:r})=>{try{return(await _e.post(`https://aaaogo.xyz/api/user/services/reject/${t}`,{reason:e},{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}})).data}catch(n){return r(n.response.data)}}),nV=$t({name:"services",initialState:{services:[],loading:!1,error:null},reducers:{},extraReducers:t=>{t.addCase(Rg.pending,e=>{e.loading=!0,e.error=null}).addCase(Rg.fulfilled,(e,r)=>{e.loading=!1,e.services=r.payload}).addCase(Rg.rejected,(e,r)=>{e.loading=!1,e.error=r.payload}).addCase(e_.fulfilled,(e,r)=>{const n=e.services.findIndex(a=>a._id===r.payload.serviceId);n!==-1&&(e.services[n].status="approved")}).addCase(t_.fulfilled,(e,r)=>{const n=e.services.findIndex(a=>a._id===r.payload.serviceId);n!==-1&&(e.services[n].status="rejected",e.services[n].rejectionReason=r.meta.arg.reason)})}}),aV=nV.reducer,ta=ZP({reducer:{[uo.reducerPath]:uo.reducer,user:eV,admin:rV,auth:oU,driverHiring:HX,services:aV,mlm:VX},middleware:t=>t().concat(uo.middleware),devTools:!1}),la=_e.create({baseURL:"https://aaaogo.xyz/api",timeout:1e4});la.interceptors.request.use(t=>{const r=ta.getState().auth.token;if(r)try{const n=JSON.parse(atob(r.split(".")[1])),a=Date.now()/1e3;if(n.exp&&n.exp<a)return ta.dispatch(pd()),window.location.href="/",Promise.reject(new Error("Token expired"));t.headers.Authorization=`Bearer ${r}`}catch(n){return console.error("Invalid token format:",n),ta.dispatch(pd()),window.location.href="/",Promise.reject(new Error("Invalid token"))}return t},t=>Promise.reject(t));la.interceptors.response.use(t=>t,async t=>{const{response:e,config:r}=t;if(e?.status===401||e?.status===403){if(console.log("Unauthorized access detected:",e.status),r.url?.includes("/auth/refresh"))return console.log("Token refresh failed, logging out..."),ta.dispatch(pd({reason:"refresh_failed"})),typeof window<"u"&&(window.location.href="/"),Promise.reject(t);try{const n=ta.getState(),{token:a}=n.auth;if(a&&rf(a)){const{default:s}=await dU(async()=>{const{default:l}=await Promise.resolve().then(()=>sV);return{default:l}},[],import.meta.url);if(await s.refreshToken()){const c=ta.getState().auth.token;if(c)return r.headers.Authorization=`Bearer ${c}`,la(r)}}}catch(n){console.error("Token refresh attempt failed:",n)}console.log("Token expired or unauthorized, logging out..."),ta.dispatch(pd({reason:"expired"})),typeof window<"u"&&(window.location.href="/")}return e?.status>=500?console.error("Server error:",e.status,e.data):e?.status===429?console.warn("Rate limit exceeded, please try again later"):e?console.error("API Error:",e.data?.message||t.message):t.request?console.error("Network error - please check your connection"):console.error("Request error:",t.message),Promise.reject(t)});class r_{constructor(){this.refreshPromise=null,this.refreshThreshold=300*1e3,this.checkInterval=null}startTokenRefreshCheck(){this.checkInterval&&clearInterval(this.checkInterval),this.checkInterval=setInterval(()=>{this.checkAndRefreshToken()},60*1e3)}stopTokenRefreshCheck(){this.checkInterval&&(clearInterval(this.checkInterval),this.checkInterval=null)}async checkAndRefreshToken(){const e=ta.getState(),{token:r,isAuthenticated:n}=e.auth;if(!n||!r)return!1;const a=A5(r);if(!a)return!1;const s=new Date;return a.getTime()-s.getTime()<=this.refreshThreshold?(console.log("Token is about to expire, attempting refresh..."),await this.refreshToken()):!0}async refreshToken(){if(this.refreshPromise)return this.refreshPromise;this.refreshPromise=this._performTokenRefresh();try{return await this.refreshPromise}finally{this.refreshPromise=null}}async _performTokenRefresh(){try{const e=ta.getState(),{token:r}=e.auth;if(!r)throw new Error("No token available for refresh");const n=await la.post("/auth/refresh",{refreshToken:r}),{token:a,user:s}=n.data;if(a&&rf(a))return ta.dispatch(u8({token:a,user:s})),console.log("Token refreshed successfully"),!0;throw new Error("Invalid token received from refresh")}catch(e){return console.error("Token refresh failed:",e.response?.data||e.message),ta.dispatch(pd({reason:"expired"})),typeof window<"u"&&(window.location.href="/"),!1}}getTimeUntilExpiration(){const e=ta.getState(),{token:r}=e.auth;if(!r)return 0;const n=A5(r);if(!n)return 0;const a=new Date;return Math.max(0,n.getTime()-a.getTime())}shouldRefreshSoon(){const e=this.getTimeUntilExpiration();return e>0&&e<=this.refreshThreshold}}const X2=new r_,sV=Object.freeze(Object.defineProperty({__proto__:null,TokenRefreshService:r_,default:X2},Symbol.toStringTag,{value:"Module"}));let iV={data:""},oV=t=>typeof window=="object"?((t?t.querySelector("#_goober"):window._goober)||Object.assign((t||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:t||iV,lV=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,cV=/\/\*[^]*?\*\/| +/g,n6=/\n+/g,ao=(t,e)=>{let r="",n="",a="";for(let s in t){let o=t[s];s[0]=="@"?s[1]=="i"?r=s+" "+o+";":n+=s[1]=="f"?ao(o,s):s+"{"+ao(o,s[1]=="k"?"":e)+"}":typeof o=="object"?n+=ao(o,e?e.replace(/([^,])+/g,l=>s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,c=>/&/.test(c)?c.replace(/&/g,l):l?l+" "+c:c)):s):o!=null&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),a+=ao.p?ao.p(s,o):s+":"+o+";")}return r+(e&&a?e+"{"+a+"}":a)+n},Js={},n_=t=>{if(typeof t=="object"){let e="";for(let r in t)e+=r+n_(t[r]);return e}return t},dV=(t,e,r,n,a)=>{let s=n_(t),o=Js[s]||(Js[s]=(c=>{let u=0,h=11;for(;u<c.length;)h=101*h+c.charCodeAt(u++)>>>0;return"go"+h})(s));if(!Js[o]){let c=s!==t?t:(u=>{let h,p,m=[{}];for(;h=lV.exec(u.replace(cV,""));)h[4]?m.shift():h[3]?(p=h[3].replace(n6," ").trim(),m.unshift(m[0][p]=m[0][p]||{})):m[0][h[1]]=h[2].replace(n6," ").trim();return m[0]})(t);Js[o]=ao(a?{["@keyframes "+o]:c}:c,r?"":"."+o)}let l=r&&Js.g?Js.g:null;return r&&(Js.g=Js[o]),((c,u,h,p)=>{p?u.data=u.data.replace(p,c):u.data.indexOf(c)===-1&&(u.data=h?c+u.data:u.data+c)})(Js[o],e,n,l),o},uV=(t,e,r)=>t.reduce((n,a,s)=>{let o=e[s];if(o&&o.call){let l=o(r),c=l&&l.props&&l.props.className||/^go/.test(l)&&l;o=c?"."+c:l&&typeof l=="object"?l.props?"":ao(l,""):l===!1?"":l}return n+a+(o??"")},"");function k0(t){let e=this||{},r=t.call?t(e.p):t;return dV(r.unshift?r.raw?uV(r,[].slice.call(arguments,1),e.p):r.reduce((n,a)=>Object.assign(n,a&&a.call?a(e.p):a),{}):r,oV(e.target),e.g,e.o,e.k)}let a_,V2,q2;k0.bind({g:1});let yi=k0.bind({k:1});function hV(t,e,r,n){ao.p=e,a_=t,V2=r,q2=n}function Co(t,e){let r=this||{};return function(){let n=arguments;function a(s,o){let l=Object.assign({},s),c=l.className||a.className;r.p=Object.assign({theme:V2&&V2()},l),r.o=/ *go\d+/.test(c),l.className=k0.apply(r,n)+(c?" "+c:"");let u=t;return t[0]&&(u=l.as||t,delete l.as),q2&&u[0]&&q2(l),a_(u,l)}return a}}var fV=t=>typeof t=="function",dx=(t,e)=>fV(t)?t(e):t,pV=(()=>{let t=0;return()=>(++t).toString()})(),s_=(()=>{let t;return()=>{if(t===void 0&&typeof window<"u"){let e=matchMedia("(prefers-reduced-motion: reduce)");t=!e||e.matches}return t}})(),mV=20,B4="default",i_=(t,e)=>{let{toastLimit:r}=t.settings;switch(e.type){case 0:return{...t,toasts:[e.toast,...t.toasts].slice(0,r)};case 1:return{...t,toasts:t.toasts.map(o=>o.id===e.toast.id?{...o,...e.toast}:o)};case 2:let{toast:n}=e;return i_(t,{type:t.toasts.find(o=>o.id===n.id)?1:0,toast:n});case 3:let{toastId:a}=e;return{...t,toasts:t.toasts.map(o=>o.id===a||a===void 0?{...o,dismissed:!0,visible:!1}:o)};case 4:return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(o=>o.id!==e.toastId)};case 5:return{...t,pausedAt:e.time};case 6:let s=e.time-(t.pausedAt||0);return{...t,pausedAt:void 0,toasts:t.toasts.map(o=>({...o,pauseDuration:o.pauseDuration+s}))}}},Lg=[],o_={toasts:[],pausedAt:void 0,settings:{toastLimit:mV}},As={},l_=(t,e=B4)=>{As[e]=i_(As[e]||o_,t),Lg.forEach(([r,n])=>{r===e&&n(As[e])})},c_=t=>Object.keys(As).forEach(e=>l_(t,e)),gV=t=>Object.keys(As).find(e=>As[e].toasts.some(r=>r.id===t)),D0=(t=B4)=>e=>{l_(e,t)},xV={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},bV=(t={},e=B4)=>{let[r,n]=O.useState(As[e]||o_),a=O.useRef(As[e]);O.useEffect(()=>(a.current!==As[e]&&n(As[e]),Lg.push([e,n]),()=>{let o=Lg.findIndex(([l])=>l===e);o>-1&&Lg.splice(o,1)}),[e]);let s=r.toasts.map(o=>{var l,c,u;return{...t,...t[o.type],...o,removeDelay:o.removeDelay||((l=t[o.type])==null?void 0:l.removeDelay)||t?.removeDelay,duration:o.duration||((c=t[o.type])==null?void 0:c.duration)||t?.duration||xV[o.type],style:{...t.style,...(u=t[o.type])==null?void 0:u.style,...o.style}}});return{...r,toasts:s}},yV=(t,e="blank",r)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:e,ariaProps:{role:"status","aria-live":"polite"},message:t,pauseDuration:0,...r,id:r?.id||pV()}),Bf=t=>(e,r)=>{let n=yV(e,t,r);return D0(n.toasterId||gV(n.id))({type:2,toast:n}),n.id},wr=(t,e)=>Bf("blank")(t,e);wr.error=Bf("error");wr.success=Bf("success");wr.loading=Bf("loading");wr.custom=Bf("custom");wr.dismiss=(t,e)=>{let r={type:3,toastId:t};e?D0(e)(r):c_(r)};wr.dismissAll=t=>wr.dismiss(void 0,t);wr.remove=(t,e)=>{let r={type:4,toastId:t};e?D0(e)(r):c_(r)};wr.removeAll=t=>wr.remove(void 0,t);wr.promise=(t,e,r)=>{let n=wr.loading(e.loading,{...r,...r?.loading});return typeof t=="function"&&(t=t()),t.then(a=>{let s=e.success?dx(e.success,a):void 0;return s?wr.success(s,{id:n,...r,...r?.success}):wr.dismiss(n),a}).catch(a=>{let s=e.error?dx(e.error,a):void 0;s?wr.error(s,{id:n,...r,...r?.error}):wr.dismiss(n)}),t};var vV=1e3,wV=(t,e="default")=>{let{toasts:r,pausedAt:n}=bV(t,e),a=O.useRef(new Map).current,s=O.useCallback((p,m=vV)=>{if(a.has(p))return;let x=setTimeout(()=>{a.delete(p),o({type:4,toastId:p})},m);a.set(p,x)},[]);O.useEffect(()=>{if(n)return;let p=Date.now(),m=r.map(x=>{if(x.duration===1/0)return;let y=(x.duration||0)+x.pauseDuration-(p-x.createdAt);if(y<0){x.visible&&wr.dismiss(x.id);return}return setTimeout(()=>wr.dismiss(x.id,e),y)});return()=>{m.forEach(x=>x&&clearTimeout(x))}},[r,n,e]);let o=O.useCallback(D0(e),[e]),l=O.useCallback(()=>{o({type:5,time:Date.now()})},[o]),c=O.useCallback((p,m)=>{o({type:1,toast:{id:p,height:m}})},[o]),u=O.useCallback(()=>{n&&o({type:6,time:Date.now()})},[n,o]),h=O.useCallback((p,m)=>{let{reverseOrder:x=!1,gutter:y=8,defaultPosition:b}=m||{},w=r.filter(S=>(S.position||b)===(p.position||b)&&S.height),N=w.findIndex(S=>S.id===p.id),A=w.filter((S,C)=>C<N&&S.visible).length;return w.filter(S=>S.visible).slice(...x?[A+1]:[0,A]).reduce((S,C)=>S+(C.height||0)+y,0)},[r]);return O.useEffect(()=>{r.forEach(p=>{if(p.dismissed)s(p.id,p.removeDelay);else{let m=a.get(p.id);m&&(clearTimeout(m),a.delete(p.id))}})},[r,s]),{toasts:r,handlers:{updateHeight:c,startPause:l,endPause:u,calculateOffset:h}}},jV=yi`
from {
transform: scale(0) rotate(45deg);
opacity: 0;
}
to {
transform: scale(1) rotate(45deg);
opacity: 1;
}`,NV=yi`
from {
transform: scale(0);
opacity: 0;
}
to {
transform: scale(1);
opacity: 1;
}`,SV=yi`
from {
transform: scale(0) rotate(90deg);
opacity: 0;
}
to {
transform: scale(1) rotate(90deg);
opacity: 1;
}`,AV=Co("div")`
width: 20px;
opacity: 0;
height: 20px;
border-radius: 10px;
background: ${t=>t.primary||"#ff4b4b"};
position: relative;
transform: rotate(45deg);
animation: ${jV} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
forwards;
animation-delay: 100ms;
&:after,
&:before {
content: '';
animation: ${NV} 0.15s ease-out forwards;
animation-delay: 150ms;
position: absolute;
border-radius: 3px;
opacity: 0;
background: ${t=>t.secondary||"#fff"};
bottom: 9px;
left: 4px;
height: 2px;
width: 12px;
}
&:before {
animation: ${SV} 0.15s ease-out forwards;
animation-delay: 180ms;
transform: rotate(90deg);
}
`,CV=yi`
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
`,kV=Co("div")`
width: 12px;
height: 12px;
box-sizing: border-box;
border: 2px solid;
border-radius: 100%;
border-color: ${t=>t.secondary||"#e0e0e0"};
border-right-color: ${t=>t.primary||"#616161"};
animation: ${CV} 1s linear infinite;
`,DV=yi`
from {
transform: scale(0) rotate(45deg);
opacity: 0;
}
to {
transform: scale(1) rotate(45deg);
opacity: 1;
}`,TV=yi`
0% {
height: 0;
width: 0;
opacity: 0;
}
40% {
height: 0;
width: 6px;
opacity: 1;
}
100% {
opacity: 1;
height: 10px;
}`,MV=Co("div")`
width: 20px;
opacity: 0;
height: 20px;
border-radius: 10px;
background: ${t=>t.primary||"#61d345"};
position: relative;
transform: rotate(45deg);
animation: ${DV} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
forwards;
animation-delay: 100ms;
&:after {
content: '';
box-sizing: border-box;
animation: ${TV} 0.2s ease-out forwards;
opacity: 0;
animation-delay: 200ms;
position: absolute;
border-right: 2px solid;
border-bottom: 2px solid;
border-color: ${t=>t.secondary||"#fff"};
bottom: 6px;
left: 6px;
height: 10px;
width: 6px;
}
`,EV=Co("div")`
position: absolute;
`,OV=Co("div")`
position: relative;
display: flex;
justify-content: center;
align-items: center;
min-width: 20px;
min-height: 20px;
`,PV=yi`
from {
transform: scale(0.6);
opacity: 0.4;
}
to {
transform: scale(1);
opacity: 1;
}`,_V=Co("div")`
position: relative;
transform: scale(0.6);
opacity: 0.4;
min-width: 20px;
animation: ${PV} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
forwards;
`,RV=({toast:t})=>{let{icon:e,type:r,iconTheme:n}=t;return e!==void 0?typeof e=="string"?O.createElement(_V,null,e):e:r==="blank"?null:O.createElement(OV,null,O.createElement(kV,{...n}),r!=="loading"&&O.createElement(EV,null,r==="error"?O.createElement(AV,{...n}):O.createElement(MV,{...n})))},LV=t=>`
0% {transform: translate3d(0,${t*-200}%,0) scale(.6); opacity:.5;}
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
`,zV=t=>`
0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
100% {transform: translate3d(0,${t*-150}%,-1px) scale(.6); opacity:0;}
`,IV="0%{opacity:0;} 100%{opacity:1;}",BV="0%{opacity:1;} 100%{opacity:0;}",FV=Co("div")`
display: flex;
align-items: center;
background: #fff;
color: #363636;
line-height: 1.3;
will-change: transform;
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);
max-width: 350px;
pointer-events: auto;
padding: 8px 10px;
border-radius: 8px;
`,HV=Co("div")`
display: flex;
justify-content: center;
margin: 4px 10px;
color: inherit;
flex: 1 1 auto;
white-space: pre-line;
`,$V=(t,e)=>{let r=t.includes("top")?1:-1,[n,a]=s_()?[IV,BV]:[LV(r),zV(r)];return{animation:e?`${yi(n)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${yi(a)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},YV=O.memo(({toast:t,position:e,style:r,children:n})=>{let a=t.height?$V(t.position||e||"top-center",t.visible):{opacity:0},s=O.createElement(RV,{toast:t}),o=O.createElement(HV,{...t.ariaProps},dx(t.message,t));return O.createElement(FV,{className:t.className,style:{...a,...r,...t.style}},typeof n=="function"?n({icon:s,message:o}):O.createElement(O.Fragment,null,s,o))});hV(O.createElement);var UV=({id:t,className:e,style:r,onHeightUpdate:n,children:a})=>{let s=O.useCallback(o=>{if(o){let l=()=>{let c=o.getBoundingClientRect().height;n(t,c)};l(),new MutationObserver(l).observe(o,{subtree:!0,childList:!0,characterData:!0})}},[t,n]);return O.createElement("div",{ref:s,className:e,style:r},a)},WV=(t,e)=>{let r=t.includes("top"),n=r?{top:0}:{bottom:0},a=t.includes("center")?{justifyContent:"center"}:t.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:s_()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${e*(r?1:-1)}px)`,...n,...a}},XV=k0`
z-index: 9999;
> * {
pointer-events: auto;
}
`,Hm=16,d_=({reverseOrder:t,position:e="top-center",toastOptions:r,gutter:n,children:a,toasterId:s,containerStyle:o,containerClassName:l})=>{let{toasts:c,handlers:u}=wV(r,s);return O.createElement("div",{"data-rht-toaster":s||"",style:{position:"fixed",zIndex:9999,top:Hm,left:Hm,right:Hm,bottom:Hm,pointerEvents:"none",...o},className:l,onMouseEnter:u.startPause,onMouseLeave:u.endPause},c.map(h=>{let p=h.position||e,m=u.calculateOffset(h,{reverseOrder:t,gutter:n,defaultPosition:e}),x=WV(p,m);return O.createElement(UV,{id:h.id,key:h.id,onHeightUpdate:u.updateHeight,className:h.visible?XV:"",style:x},h.type==="custom"?dx(h.message,h):a?a(h):O.createElement(YV,{toast:h,position:p}))}))},Ne=wr,u_={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},a6=Lr.createContext&&Lr.createContext(u_),VV=["attr","size","title"];function qV(t,e){if(t==null)return{};var r=GV(t,e),n,a;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(a=0;a<s.length;a++)n=s[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function GV(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 ux(){return ux=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},ux.apply(this,arguments)}function s6(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function hx(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?s6(Object(r),!0).forEach(function(n){KV(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):s6(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function KV(t,e,r){return e=ZV(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ZV(t){var e=QV(t,"string");return typeof e=="symbol"?e:e+""}function QV(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function h_(t){return t&&t.map((e,r)=>Lr.createElement(e.tag,hx({key:r},e.attr),h_(e.child)))}function be(t){return e=>Lr.createElement(JV,ux({attr:hx({},t.attr)},e),h_(t.child))}function JV(t){var e=r=>{var{attr:n,size:a,title:s}=t,o=qV(t,VV),l=a||r.size||"1em",c;return r.className&&(c=r.className),t.className&&(c=(c?c+" ":"")+t.className),Lr.createElement("svg",ux({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,o,{className:c,style:hx(hx({color:t.color||r.color},r.style),t.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),s&&Lr.createElement("title",null,s),t.children)};return a6!==void 0?Lr.createElement(a6.Consumer,null,r=>e(r)):e(u_)}function eq(t){return be({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Bookmark_Plus"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M17.6,21.938a1.482,1.482,0,0,1-1.011-.4l-4.251-3.9a.5.5,0,0,0-.678,0L7.41,21.538a1.5,1.5,0,0,1-2.517-1.1V4.563a2.5,2.5,0,0,1,2.5-2.5h9.214a2.5,2.5,0,0,1,2.5,2.5V20.435a1.483,1.483,0,0,1-.9,1.375A1.526,1.526,0,0,1,17.6,21.938ZM12,16.5a1.5,1.5,0,0,1,1.018.395L17.269,20.8a.5.5,0,0,0,.838-.368V4.563a1.5,1.5,0,0,0-1.5-1.5H7.393a1.5,1.5,0,0,0-1.5,1.5V20.435a.5.5,0,0,0,.839.368L10.983,16.9A1.5,1.5,0,0,1,12,16.5Z"},child:[]},{tag:"path",attr:{d:"M14,10.28H12.5v1.5a.5.5,0,0,1-1,0v-1.5H10a.5.5,0,0,1,0-1h1.5V7.78a.5.5,0,0,1,1,0v1.5H14A.5.5,0,0,1,14,10.28Z"},child:[]}]}]}]})(t)}function tq(t){return be({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Location_On"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M12,21.933a1.715,1.715,0,0,1-1.384-.691L5.555,14.5a7.894,7.894,0,1,1,12.885-.009L13.385,21.24A1.717,1.717,0,0,1,12,21.933ZM11.992,3.066A6.81,6.81,0,0,0,7.414,4.815a6.891,6.891,0,0,0-1.05,9.1l5.051,6.727a.725.725,0,0,0,.584.292h0a.732.732,0,0,0,.586-.292l5.044-6.734A6.874,6.874,0,0,0,12.81,3.113,7.277,7.277,0,0,0,11.992,3.066Z"},child:[]},{tag:"path",attr:{d:"M12,12.5A2.5,2.5,0,1,1,14.5,10,2.5,2.5,0,0,1,12,12.5Zm0-4A1.5,1.5,0,1,0,13.5,10,1.5,1.5,0,0,0,12,8.5Z"},child:[]}]}]}]})(t)}function rq(t){return be({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Login"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M20.944,18.432a2.577,2.577,0,0,1-2.729,2.5c-2.153.012-4.307,0-6.46,0a.5.5,0,0,1,0-1c2.2,0,4.4.032,6.6,0,1.107-.016,1.589-.848,1.589-1.838V5.63a1.545,1.545,0,0,0-.969-1.471,3.027,3.027,0,0,0-1.061-.095H11.755a.5.5,0,0,1,0-1c2.225,0,4.465-.085,6.688,0a2.566,2.566,0,0,1,2.5,2.67Z"},child:[]},{tag:"path",attr:{d:"M15.794,12.354a.459.459,0,0,0,.138-.312A.3.3,0,0,0,15.938,12a.29.29,0,0,0-.006-.041.455.455,0,0,0-.138-.313L12.125,7.978a.5.5,0,0,0-.707.707L14.234,11.5H3.492a.5.5,0,0,0,0,1H14.234l-2.816,2.815a.5.5,0,0,0,.707.707Z"},child:[]}]}]}]})(t)}function f_(t){return be({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Warning"},child:[{tag:"g",attr:{},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M12.5,8.752a.5.5,0,0,0-1,0h0v6a.5.5,0,0,0,1,0Z"},child:[]},{tag:"circle",attr:{cx:"11.999",cy:"16.736",r:"0.5"},child:[]}]},{tag:"path",attr:{d:"M18.642,20.934H5.385A2.5,2.5,0,0,1,3.163,17.29L9.792,4.421a2.5,2.5,0,0,1,4.444,0L20.865,17.29a2.5,2.5,0,0,1-2.223,3.644ZM12.014,4.065a1.478,1.478,0,0,0-1.334.814L4.052,17.748a1.5,1.5,0,0,0,1.333,2.186H18.642a1.5,1.5,0,0,0,1.334-2.186L13.348,4.879A1.478,1.478,0,0,0,12.014,4.065Z"},child:[]}]}]}]})(t)}function T0(t){return be({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinejoin:"round",strokeWidth:"32",d:"M240 424v-96c116.4 0 159.39 33.76 208 96 0-119.23-39.57-240-208-240V88L64 256z"},child:[]}]})(t)}function i6(t){return be({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M469.71 234.6c-7.33-9.73-34.56-16.43-46.08-33.94s-20.95-55.43-50.27-70S288 112 256 112s-88 4-117.36 18.63-38.75 52.52-50.27 70-38.75 24.24-46.08 33.97S29.8 305.84 32.94 336s9 48 9 48h86c14.08 0 18.66-5.29 47.46-8 31.6-3 62.6-4 80.6-4s50 1 81.58 4c28.8 2.73 33.53 8 47.46 8h85s5.86-17.84 9-48-2.04-91.67-9.33-101.4zM400 384h56v16h-56zm-344 0h56v16H56z"},child:[]},{tag:"path",attr:{d:"M364.47 309.16c-5.91-6.83-25.17-12.53-50.67-16.35S279 288 256.2 288s-33.17 1.64-57.61 4.81-42.79 8.81-50.66 16.35C136.12 320.6 153.42 333.44 167 335c13.16 1.5 39.47.95 89.31.95s76.15.55 89.31-.95c13.56-1.65 29.62-13.6 18.85-25.84zm67.1-66.11a3.23 3.23 0 0 0-3.1-3c-11.81-.42-23.8.42-45.07 6.69a93.88 93.88 0 0 0-30.08 15.06c-2.28 1.78-1.47 6.59 1.39 7.1a455.32 455.32 0 0 0 52.82 3.1c10.59 0 21.52-3 23.55-12.44a52.41 52.41 0 0 0 .49-16.51zm-351.14 0a3.23 3.23 0 0 1 3.1-3c11.81-.42 23.8.42 45.07 6.69a93.88 93.88 0 0 1 30.08 15.06c2.28 1.78 1.47 6.59-1.39 7.1a455.32 455.32 0 0 1-52.82 3.1c-10.59 0-21.52-3-23.55-12.44a52.41 52.41 0 0 1-.49-16.51z"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M432 192h16m-384 0h16m-2 19s46.35-12 178-12 178 12 178 12"},child:[]}]})(t)}function p_(t){return be({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 0 0-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 0 0 0-17.47C428.89 172.28 347.8 112 255.66 112z"},child:[]},{tag:"circle",attr:{cx:"256",cy:"256",r:"80",fill:"none",strokeMiterlimit:"10",strokeWidth:"32"},child:[]}]})(t)}function m_(t){return be({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M32 144h448M112 256h288M208 368h96"},child:[]}]})(t)}function nq(t){return be({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M262.29 192.31a64 64 0 1 0 57.4 57.4 64.13 64.13 0 0 0-57.4-57.4zM416.39 256a154.34 154.34 0 0 1-1.53 20.79l45.21 35.46a10.81 10.81 0 0 1 2.45 13.75l-42.77 74a10.81 10.81 0 0 1-13.14 4.59l-44.9-18.08a16.11 16.11 0 0 0-15.17 1.75A164.48 164.48 0 0 1 325 400.8a15.94 15.94 0 0 0-8.82 12.14l-6.73 47.89a11.08 11.08 0 0 1-10.68 9.17h-85.54a11.11 11.11 0 0 1-10.69-8.87l-6.72-47.82a16.07 16.07 0 0 0-9-12.22 155.3 155.3 0 0 1-21.46-12.57 16 16 0 0 0-15.11-1.71l-44.89 18.07a10.81 10.81 0 0 1-13.14-4.58l-42.77-74a10.8 10.8 0 0 1 2.45-13.75l38.21-30a16.05 16.05 0 0 0 6-14.08c-.36-4.17-.58-8.33-.58-12.5s.21-8.27.58-12.35a16 16 0 0 0-6.07-13.94l-38.19-30A10.81 10.81 0 0 1 49.48 186l42.77-74a10.81 10.81 0 0 1 13.14-4.59l44.9 18.08a16.11 16.11 0 0 0 15.17-1.75A164.48 164.48 0 0 1 187 111.2a15.94 15.94 0 0 0 8.82-12.14l6.73-47.89A11.08 11.08 0 0 1 213.23 42h85.54a11.11 11.11 0 0 1 10.69 8.87l6.72 47.82a16.07 16.07 0 0 0 9 12.22 155.3 155.3 0 0 1 21.46 12.57 16 16 0 0 0 15.11 1.71l44.89-18.07a10.81 10.81 0 0 1 13.14 4.58l42.77 74a10.8 10.8 0 0 1-2.45 13.75l-38.21 30a16.05 16.05 0 0 0-6.05 14.08c.33 4.14.55 8.3.55 12.47z"},child:[]}]})(t)}function F4(t){return be({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M217.9 256L345 129c9.4-9.4 9.4-24.6 0-33.9-9.4-9.4-24.6-9.3-34 0L167 239c-9.1 9.1-9.3 23.7-.7 33.1L310.9 417c4.7 4.7 10.9 7 17 7s12.3-2.3 17-7c9.4-9.4 9.4-24.6 0-33.9L217.9 256z"},child:[]}]})(t)}function H4(t){return be({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 294.1L383 167c9.4-9.4 24.6-9.4 33.9 0s9.3 24.6 0 34L273 345c-9.1 9.1-23.7 9.3-33.1.7L95 201.1c-4.7-4.7-7-10.9-7-17s2.3-12.3 7-17c9.4-9.4 24.6-9.4 33.9 0l127.1 127z"},child:[]}]})(t)}function $4(t){return be({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M294.1 256L167 129c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.3 34 0L345 239c9.1 9.1 9.3 23.7.7 33.1L201.1 417c-4.7 4.7-10.9 7-17 7s-12.3-2.3-17-7c-9.4-9.4-9.4-24.6 0-33.9l127-127.1z"},child:[]}]})(t)}function o6(t){return be({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M295.6 163.7c-5.1 5-5.1 13.3-.1 18.4l60.8 60.9H124.9c-7.1 0-12.9 5.8-12.9 13s5.8 13 12.9 13h231.3l-60.8 60.9c-5 5.1-4.9 13.3.1 18.4 5.1 5 13.2 5 18.3-.1l82.4-83c1.1-1.2 2-2.5 2.7-4.1.7-1.6 1-3.3 1-5 0-3.4-1.3-6.6-3.7-9.1l-82.4-83c-4.9-5.2-13.1-5.3-18.2-.3z"},child:[]}]})(t)}function of(t){return be({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M48 87.2c0 5.8 2 11.4 5.6 15.7l152.2 179.8c3.6 4.3 5.6 9.9 5.6 15.7v107c0 10 5.9 18.8 14.6 22l55 19.8c9.6 3.5 19.6-4.3 19.6-15.3V298.3c0-5.8 2-11.4 5.6-15.7l152.2-179.8c3.6-4.3 5.6-9.9 5.6-15.7 0-12.8-9.6-23.2-21.4-23.2H69.4C57.6 64 48 74.4 48 87.2z"},child:[]}]})(t)}function aq(t){return be({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M255.9 456c31.1 0 48.1-22 48.1-53h-96.3c0 31 17 53 48.2 53zM412 352.2c-15.4-20.3-45.7-32.2-45.7-123.1 0-93.3-41.2-130.8-79.6-139.8-3.6-.9-6.2-2.1-6.2-5.9v-2.9c0-13.4-11-24.7-24.4-24.6-13.4-.2-24.4 11.2-24.4 24.6v2.9c0 3.7-2.6 5-6.2 5.9-38.5 9.1-79.6 46.5-79.6 139.8 0 90.9-30.3 102.7-45.7 123.1-9.9 13.1-.5 31.8 15.9 31.8h280.1c16.3 0 25.7-18.8 15.8-31.8z"},child:[]}]})(t)}function sq(t){return be({attr:{viewBox:"0 0 512 512"},child:[{tag:"g",attr:{fillOpacity:".9"},child:[{tag:"path",attr:{d:"M255.8 48C141 48 48 141.2 48 256s93 208 207.8 208c115 0 208.2-93.2 208.2-208S370.8 48 255.8 48zm.2 374.4c-91.9 0-166.4-74.5-166.4-166.4S164.1 89.6 256 89.6 422.4 164.1 422.4 256 347.9 422.4 256 422.4z"},child:[]},{tag:"path",attr:{d:"M266.4 152h-31.2v124.8l109.2 65.5 15.6-25.6-93.6-55.5V152z"},child:[]}]}]})(t)}function l6(t){return be({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M21 3H5a1 1 0 0 0-1 1v2.59c0 .523.213 1.037.583 1.407L10 13.414V21a1.001 1.001 0 0 0 1.447.895l4-2c.339-.17.553-.516.553-.895v-5.586l5.417-5.417c.37-.37.583-.884.583-1.407V4a1 1 0 0 0-1-1zm-6.707 9.293A.996.996 0 0 0 14 13v5.382l-2 1V13a.996.996 0 0 0-.293-.707L6 6.59V5h14.001l.002 1.583-5.71 5.71z"},child:[]}]})(t)}function g_(t){return be({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M7 22V2l10 5-10 5"},child:[]}]})(t)}function iq(t){return be({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{width:"7",height:"9",x:"3",y:"3",rx:"1"},child:[]},{tag:"rect",attr:{width:"7",height:"5",x:"14",y:"3",rx:"1"},child:[]},{tag:"rect",attr:{width:"7",height:"9",x:"14",y:"12",rx:"1"},child:[]},{tag:"rect",attr:{width:"7",height:"5",x:"3",y:"16",rx:"1"},child:[]}]})(t)}function oq(t){return be({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"},child:[]},{tag:"path",attr:{d:"M13 8H7"},child:[]},{tag:"path",attr:{d:"M17 12H7"},child:[]}]})(t)}function lq(t){return be({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"},child:[]},{tag:"path",attr:{d:"M3 3v5h5"},child:[]},{tag:"path",attr:{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16"},child:[]},{tag:"path",attr:{d:"M16 16h5v5"},child:[]}]})(t)}function cq(t){return be({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M320 336c0 8.84-7.16 16-16 16h-96c-8.84 0-16-7.16-16-16v-48H0v144c0 25.6 22.4 48 48 48h416c25.6 0 48-22.4 48-48V288H320v48zm144-208h-80V80c0-25.6-22.4-48-48-48H176c-25.6 0-48 22.4-48 48v48H48c-25.6 0-48 22.4-48 48v80h512v-80c0-25.6-22.4-48-48-48zm-144 0H192V96h128v32z"},child:[]}]})(t)}function Y4(t){return be({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M0 464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V192H0v272zm320-196c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40zm0 128c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40zM192 268c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40zm0 128c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40zM64 268c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12H76c-6.6 0-12-5.4-12-12v-40zm0 128c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12H76c-6.6 0-12-5.4-12-12v-40zM400 64h-48V16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v48H160V16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v48H48C21.5 64 0 85.5 0 112v48h448v-48c0-26.5-21.5-48-48-48z"},child:[]}]})(t)}function x_(t){return be({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M499.99 176h-59.87l-16.64-41.6C406.38 91.63 365.57 64 319.5 64h-127c-46.06 0-86.88 27.63-103.99 70.4L71.87 176H12.01C4.2 176-1.53 183.34.37 190.91l6 24C7.7 220.25 12.5 224 18.01 224h20.07C24.65 235.73 16 252.78 16 272v48c0 16.12 6.16 30.67 16 41.93V416c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32v-32h256v32c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32v-54.07c9.84-11.25 16-25.8 16-41.93v-48c0-19.22-8.65-36.27-22.07-48H494c5.51 0 10.31-3.75 11.64-9.09l6-24c1.89-7.57-3.84-14.91-11.65-14.91zm-352.06-17.83c7.29-18.22 24.94-30.17 44.57-30.17h127c19.63 0 37.28 11.95 44.57 30.17L384 208H128l19.93-49.83zM96 319.8c-19.2 0-32-12.76-32-31.9S76.8 256 96 256s48 28.71 48 47.85-28.8 15.95-48 15.95zm320 0c-19.2 0-48 3.19-48-15.95S396.8 256 416 256s32 12.76 32 31.9-12.8 31.9-32 31.9z"},child:[]}]})(t)}function dq(t){return be({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"},child:[]}]})(t)}function Ff(t){return be({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"},child:[]}]})(t)}function U4(t){return be({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z"},child:[]}]})(t)}function b_(t){return be({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256,8C119,8,8,119,8,256S119,504,256,504,504,393,504,256,393,8,256,8Zm92.49,313h0l-20,25a16,16,0,0,1-22.49,2.5h0l-67-49.72a40,40,0,0,1-15-31.23V112a16,16,0,0,1,16-16h32a16,16,0,0,1,16,16V256l58,42.5A16,16,0,0,1,348.49,321Z"},child:[]}]})(t)}function c6(t){return be({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 32C114.6 32 0 125.1 0 240c0 49.6 21.4 95 57 130.7C44.5 421.1 2.7 466 2.2 466.5c-2.2 2.3-2.8 5.7-1.5 8.7S4.8 480 8 480c66.3 0 116-31.8 140.6-51.4 32.7 12.3 69 19.4 107.4 19.4 141.4 0 256-93.1 256-208S397.4 32 256 32z"},child:[]}]})(t)}function jh(t){return be({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M402.6 83.2l90.2 90.2c3.8 3.8 3.8 10 0 13.8L274.4 405.6l-92.8 10.3c-12.4 1.4-22.9-9.1-21.5-21.5l10.3-92.8L388.8 83.2c3.8-3.8 10-3.8 13.8 0zm162-22.9l-48.8-48.8c-15.2-15.2-39.9-15.2-55.2 0l-35.4 35.4c-3.8 3.8-3.8 10 0 13.8l90.2 90.2c3.8 3.8 10 3.8 13.8 0l35.4-35.4c15.2-15.3 15.2-40 0-55.2zM384 346.2V448H64V128h229.8c3.2 0 6.2-1.3 8.5-3.5l40-40c7.6-7.6 2.2-20.5-8.5-20.5H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V306.2c0-10.7-12.9-16-20.5-8.5l-40 40c-2.2 2.3-3.5 5.3-3.5 8.5z"},child:[]}]})(t)}function Fh(t){return be({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},child:[]}]})(t)}function uq(t){return be({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"},child:[]}]})(t)}function y_(t){return be({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"},child:[]}]})(t)}function hq(t){return be({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M565.3 328.1c-11.8-10.7-30.2-10-42.6 0L430.3 402c-11.3 9.1-25.4 14-40 14H272c-8.8 0-16-7.2-16-16s7.2-16 16-16h78.3c15.9 0 30.7-10.9 33.3-26.6 3.3-20-12.1-37.4-31.6-37.4H192c-27 0-53.1 9.3-74.1 26.3L71.4 384H16c-8.8 0-16 7.2-16 16v96c0 8.8 7.2 16 16 16h356.8c14.5 0 28.6-4.9 40-14L564 377c15.2-12.1 16.4-35.3 1.3-48.9z"},child:[]}]})(t)}function fq(t){return be({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M462.3 62.6C407.5 15.9 326 24.3 275.7 76.2L256 96.5l-19.7-20.3C186.1 24.3 104.5 15.9 49.7 62.6c-62.8 53.6-66.1 149.8-9.9 207.9l193.5 199.8c12.5 12.9 32.8 12.9 45.3 0l193.5-199.8c56.3-58.1 53-154.3-9.8-207.9z"},child:[]}]})(t)}function pq(t){return be({attr:{viewBox:"0 0 352 512"},child:[{tag:"path",attr:{d:"M176 352c53.02 0 96-42.98 96-96V96c0-53.02-42.98-96-96-96S80 42.98 80 96v160c0 53.02 42.98 96 96 96zm160-160h-16c-8.84 0-16 7.16-16 16v48c0 74.8-64.49 134.82-140.79 127.38C96.71 376.89 48 317.11 48 250.3V208c0-8.84-7.16-16-16-16H16c-8.84 0-16 7.16-16 16v40.16c0 89.64 63.97 169.55 152 181.69V464H96c-8.84 0-16 7.16-16 16v16c0 8.84 7.16 16 16 16h160c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16h-56v-33.77C285.71 418.47 352 344.9 352 256v-48c0-8.84-7.16-16-16-16z"},child:[]}]})(t)}function mq(t){return be({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M621.16 54.46C582.37 38.19 543.55 32 504.75 32c-123.17-.01-246.33 62.34-369.5 62.34-30.89 0-61.76-3.92-92.65-13.72-3.47-1.1-6.95-1.62-10.35-1.62C15.04 79 0 92.32 0 110.81v317.26c0 12.63 7.23 24.6 18.84 29.46C57.63 473.81 96.45 480 135.25 480c123.17 0 246.34-62.35 369.51-62.35 30.89 0 61.76 3.92 92.65 13.72 3.47 1.1 6.95 1.62 10.35 1.62 17.21 0 32.25-13.32 32.25-31.81V83.93c-.01-12.64-7.24-24.6-18.85-29.47zM48 132.22c20.12 5.04 41.12 7.57 62.72 8.93C104.84 170.54 79 192.69 48 192.69v-60.47zm0 285v-47.78c34.37 0 62.18 27.27 63.71 61.4-22.53-1.81-43.59-6.31-63.71-13.62zM320 352c-44.19 0-80-42.99-80-96 0-53.02 35.82-96 80-96s80 42.98 80 96c0 53.03-35.83 96-80 96zm272 27.78c-17.52-4.39-35.71-6.85-54.32-8.44 5.87-26.08 27.5-45.88 54.32-49.28v57.72zm0-236.11c-30.89-3.91-54.86-29.7-55.81-61.55 19.54 2.17 38.09 6.23 55.81 12.66v48.89z"},child:[]}]})(t)}function gq(t){return be({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M476 3.2L12.5 270.6c-18.1 10.4-15.8 35.6 2.2 43.2L121 358.4l287.3-253.2c5.5-4.9 13.3 2.6 8.6 8.3L176 407v80.5c0 23.6 28.5 32.9 42.5 15.8L282 426l124.6 52.2c14.2 6 30.4-2.9 33-18.2l72-432C515 7.8 493.3-6.8 476 3.2z"},child:[]}]})(t)}function xq(t){return be({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M144 479H48c-26.5 0-48-21.5-48-48V79c0-26.5 21.5-48 48-48h96c26.5 0 48 21.5 48 48v352c0 26.5-21.5 48-48 48zm304-48V79c0-26.5-21.5-48-48-48h-96c-26.5 0-48 21.5-48 48v352c0 26.5 21.5 48 48 48h96c26.5 0 48-21.5 48-48z"},child:[]}]})(t)}function bq(t){return be({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M128 352H32c-17.67 0-32 14.33-32 32v96c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32v-96c0-17.67-14.33-32-32-32zm-24-80h192v48h48v-48h192v48h48v-57.59c0-21.17-17.23-38.41-38.41-38.41H344v-64h40c17.67 0 32-14.33 32-32V32c0-17.67-14.33-32-32-32H256c-17.67 0-32 14.33-32 32v96c0 17.67 14.33 32 32 32h40v64H94.41C73.23 224 56 241.23 56 262.41V320h48v-48zm264 80h-96c-17.67 0-32 14.33-32 32v96c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32v-96c0-17.67-14.33-32-32-32zm240 0h-96c-17.67 0-32 14.33-32 32v96c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32v-96c0-17.67-14.33-32-32-32z"},child:[]}]})(t)}function yq(t){return be({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M497.941 225.941L286.059 14.059A48 48 0 0 0 252.118 0H48C21.49 0 0 21.49 0 48v204.118a48 48 0 0 0 14.059 33.941l211.882 211.882c18.744 18.745 49.136 18.746 67.882 0l204.118-204.118c18.745-18.745 18.745-49.137 0-67.882zM112 160c-26.51 0-48-21.49-48-48s21.49-48 48-48 48 21.49 48 48-21.49 48-48 48zm513.941 133.823L421.823 497.941c-18.745 18.745-49.137 18.745-67.882 0l-.36-.36L527.64 323.522c16.999-16.999 26.36-39.6 26.36-63.64s-9.362-46.641-26.36-63.64L331.397 0h48.721a48 48 0 0 1 33.941 14.059l211.882 211.882c18.745 18.745 18.745 49.137 0 67.882z"},child:[]}]})(t)}function vq(t){return be({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M624 352h-16V243.9c0-12.7-5.1-24.9-14.1-33.9L494 110.1c-9-9-21.2-14.1-33.9-14.1H416V48c0-26.5-21.5-48-48-48H48C21.5 0 0 21.5 0 48v320c0 26.5 21.5 48 48 48h16c0 53 43 96 96 96s96-43 96-96h128c0 53 43 96 96 96s96-43 96-96h48c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zM160 464c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48zm320 0c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48zm80-208H416V144h44.1l99.9 99.9V256z"},child:[]}]})(t)}function n1(t){return be({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M624 208h-64v-64c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v64h-64c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h64v64c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-64h64c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm-400 48c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"},child:[]}]})(t)}function wq(t){return be({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M622.3 271.1l-115.2-45c-4.1-1.6-12.6-3.7-22.2 0l-115.2 45c-10.7 4.2-17.7 14-17.7 24.9 0 111.6 68.7 188.8 132.9 213.9 9.6 3.7 18 1.6 22.2 0C558.4 489.9 640 420.5 640 296c0-10.9-7-20.7-17.7-24.9zM496 462.4V273.3l95.5 37.3c-5.6 87.1-60.9 135.4-95.5 151.8zM224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm96 40c0-2.5.8-4.8 1.1-7.2-2.5-.1-4.9-.8-7.5-.8h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c6.8 0 13.3-1.5 19.2-4-54-42.9-99.2-116.7-99.2-212z"},child:[]}]})(t)}function jq(t){return be({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm95.8 32.6L272 480l-32-136 32-56h-96l32 56-32 136-47.8-191.4C56.9 292 0 350.3 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-72.1-56.9-130.4-128.2-133.8z"},child:[]}]})(t)}function M0(t){return be({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"},child:[]}]})(t)}function Nq(t){return be({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M96 224c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm448 0c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm32 32h-64c-17.6 0-33.5 7.1-45.1 18.6 40.3 22.1 68.9 62 75.1 109.4h66c17.7 0 32-14.3 32-32v-32c0-35.3-28.7-64-64-64zm-256 0c61.9 0 112-50.1 112-112S381.9 32 320 32 208 82.1 208 144s50.1 112 112 112zm76.8 32h-8.3c-20.8 10-43.9 16-68.5 16s-47.6-6-68.5-16h-8.3C179.6 288 128 339.6 128 403.2V432c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48v-28.8c0-63.6-51.6-115.2-115.2-115.2zm-223.7-13.4C161.5 263.1 145.6 256 128 256H64c-35.3 0-64 28.7-64 64v32c0 17.7 14.3 32 32 32h65.9c6.3-47.4 34.9-87.3 75.2-109.4z"},child:[]}]})(t)}function Sq(t){return be({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M148 288h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12zm108-12v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm96 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm-96 96v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm-96 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm192 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm96-260v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h48V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h128V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h48c26.5 0 48 21.5 48 48zm-48 346V160H48v298c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z"},child:[]}]})(t)}function Aq(t){return be({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200zm61.8-104.4l-84.9-61.7c-3.1-2.3-4.9-5.9-4.9-9.7V116c0-6.6 5.4-12 12-12h32c6.6 0 12 5.4 12 12v141.7l66.8 48.6c5.4 3.9 6.5 11.4 2.6 16.8L334.6 349c-3.9 5.3-11.4 6.5-16.8 2.6z"},child:[]}]})(t)}function v_(t){return be({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M288 144a110.94 110.94 0 0 0-31.24 5 55.4 55.4 0 0 1 7.24 27 56 56 0 0 1-56 56 55.4 55.4 0 0 1-27-7.24A111.71 111.71 0 1 0 288 144zm284.52 97.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400c-98.65 0-189.09-55-237.93-144C98.91 167 189.34 112 288 112s189.09 55 237.93 144C477.1 345 386.66 400 288 400z"},child:[]}]})(t)}const Cq="https://aaaogo.xyz",kq=()=>{Cr();const t=Ao(),e=Ba(),{isAuthenticated:r,token:n}=ua(y=>y.auth),a=O.useRef(null);console.log("Auth State:",{isAuthenticated:r,token:n});const{data:s,isLoading:o,error:l}=OX(void 0,{skip:!r||!n});console.log("API Response:",{userData:s,isLoading:o,error:l}),console.log("User Data Details:",s?.user);const c=r&&s?.user?.role==="superadmin",u=()=>{e(pd()),e(uo.util.resetApiState()),localStorage.removeItem("token"),t("/")},h=s?.user?.selfieImage?`${Cq}/uploads/${s.user.selfieImage.replace(/^\/?uploads\//,"")}`:null,p=y=>y?y.split(" ").map(b=>b[0]).join("").toUpperCase().slice(0,2):"G";console.log("Selfie Image URL:",h);const m=()=>{a.current&&a.current.click()},x=async y=>{const b=y.target.files[0];if(!b)return;if(!["image/jpeg","image/jpg","image/png","image/gif"].includes(b.type)){Ne.error("Please select a valid image file (JPEG, PNG, GIF)");return}const N=5*1024*1024;if(b.size>N){Ne.error("File size must be less than 5MB");return}try{const A=new FormData;A.append("profilePicture",b),(await la.patch("/user/update-profile-picture",A,{headers:{"Content-Type":"multipart/form-data"}})).data.success?(Ne.success("Profile picture updated successfully!"),e(uo.util.invalidateTags(["User"]))):Ne.error("Failed to update profile picture")}catch(A){console.error("Error updating profile picture:",A),Ne.error("Failed to update profile picture")}y.target.value=""};return i.jsxs("div",{className:"flex justify-between items-center px-2 border-b border-[#3A5719]",children:[i.jsxs("div",{className:"flex items-center gap-4 pr-[50px] py-1 border-r border-[#546816]",children:[i.jsx("input",{type:"file",ref:a,onChange:x,accept:"image/*",style:{display:"none"}}),h?i.jsx("img",{className:"rounded-full w-20 h-20 object-cover border-2 border-[#DDC104] cursor-pointer hover:opacity-80 transition-opacity",src:h,alt:"Profile",onClick:m,title:"Click to update profile picture",onError:y=>{console.log("Image load error:",y),y.target.style.display="none",y.target.nextSibling.style.display="flex"}}):null,i.jsx("div",{className:`rounded-full w-20 h-20 border-2 border-[#DDC104] bg-[#013220] flex items-center justify-center cursor-pointer hover:bg-[#024A30] transition-colors ${h?"hidden":"flex"}`,onClick:m,title:"Click to add profile picture",children:s?.user?.username?i.jsx("span",{className:"text-[#DDC104] font-bold text-xl",children:p(s.user.username)}):i.jsx(M0,{className:"text-[#DDC104] text-2xl"})}),i.jsxs("div",{className:"flex flex-col justify-center",children:[i.jsx("h6",{className:"text-xs",children:"Welcome"}),i.jsx("h1",{className:"font-bold text-lg",children:o?"Loading...":l||!r?"Guest":s?.user?.username||"Guest"}),i.jsx("p",{className:"text-xs",children:o?"Loading...":l||!r?"No email available":s?.user?.email||"No email available"})]})]}),i.jsxs("div",{className:"flex gap-4 items-center text-[#DDC104]",children:[i.jsx("div",{className:"p-2 border border-[#DDC104] rounded-full hover:bg-[#DDC104] hover:text-black transition cursor-pointer",children:i.jsx(nq,{size:25})}),c&&i.jsx(RP,{to:"/adminmanagement",className:({isActive:y})=>`p-2 border border-[#DDC104] rounded-full hover:bg-[#DDC104] hover:text-black transition cursor-pointer ${y?"bg-yellow-400 text-black":""}`,title:"Admin Management",children:i.jsx(wq,{size:25})}),i.jsx("button",{onClick:u,className:"p-2 border border-[#DDC104] rounded-full hover:bg-[#DDC104] hover:text-black transition cursor-pointer",title:"Logout",children:i.jsx(rq,{size:25})})]})]})};function Hf(t){return be({attr:{version:"1.2",baseProfile:"tiny",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M19.164 19.547c-1.641-2.5-3.669-3.285-6.164-3.484v1.437c0 .534-.208 1.036-.586 1.414-.756.756-2.077.751-2.823.005l-6.293-6.207c-.191-.189-.298-.444-.298-.713s.107-.524.298-.712l6.288-6.203c.754-.755 2.073-.756 2.829.001.377.378.585.88.585 1.414v1.704c4.619.933 8 4.997 8 9.796v1c0 .442-.29.832-.714.958-.095.027-.19.042-.286.042-.331 0-.646-.165-.836-.452zm-7.141-5.536c2.207.056 4.638.394 6.758 2.121-.768-3.216-3.477-5.702-6.893-6.08-.504-.056-.888-.052-.888-.052v-3.497l-5.576 5.496 5.576 5.5v-3.499l1.023.011z"},child:[]}]})(t)}function Dq(t){return be({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M20 8h-2.81a5.985 5.985 0 0 0-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5c-.49 0-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8zm-6 8h-4v-2h4v2zm0-4h-4v-2h4v2z"},child:[]}]})(t)}function G2(t){return be({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"},child:[]}]})(t)}function Tq(t){return be({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"},child:[]}]})(t)}function d6(t){return be({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m16 6 2.29 2.29-4.88 4.88-4-4L2 16.59 3.41 18l6-6 4 4 6.3-6.29L22 12V6z"},child:[]}]})(t)}function Mq(t){return be({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 1 3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm-2 16-4-4 1.41-1.41L10 14.17l6.59-6.59L18 9l-8 8z"},child:[]}]})(t)}function Eq(t){return be({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"},child:[]}]})(t)}function Oq(t){return be({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04a.996.996 0 0 0 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"},child:[]}]})(t)}function a1(t){return be({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"},child:[]}]})(t)}function $f(t){return be({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"},child:[]}]})(t)}function K2(t){return be({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"},child:[]}]})(t)}function u6(t){return be({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"circle",attr:{cx:"12",cy:"19",r:"2"},child:[]},{tag:"path",attr:{d:"M10 3h4v12h-4z"},child:[]}]})(t)}function Pq(t){return be({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M11 15h2v2h-2zm0-8h2v6h-2zm8-4h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-.14 0-.27.01-.4.04a2.008 2.008 0 0 0-1.44 1.19c-.1.23-.16.49-.16.77v14c0 .27.06.54.16.78s.25.45.43.64c.27.27.62.47 1.01.55.13.02.26.03.4.03h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7-.25c.41 0 .75.34.75.75s-.34.75-.75.75-.75-.34-.75-.75.34-.75.75-.75zM19 19H5V5h14v14z"},child:[]}]})(t)}function h6(t){return be({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M14 5h8v2h-8V5zm0 5.5h8v2h-8v-2zm0 5.5h8v2h-8v-2zM2 11.5C2 15.08 4.92 18 8.5 18H9v2l3-3-3-3v2h-.5C6.02 16 4 13.98 4 11.5S6.02 7 8.5 7H12V5H8.5C4.92 5 2 7.92 2 11.5z"},child:[]}]})(t)}function _q(t){return be({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M18 1c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm.5 6h-1V3h1v4zm0 1v1h-1V8h1zM6 13.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5S8.33 15 7.5 15 6 14.33 6 13.5zm13-.57a6.72 6.72 0 0 0 2-.6V19c0 .55-.45 1-1 1h-1c-.55 0-1-.45-1-1v-1H6v1c0 .55-.45 1-1 1H4c-.55 0-1-.45-1-1v-8l2.08-5.99C5.29 4.42 5.84 4 6.5 4h4.79c-.19.63-.29 1.31-.29 2H6.85L5.81 9h5.86c.36.75.84 1.43 1.43 2H5v5h14v-3.07zm-1.09.07a6.92 6.92 0 0 1-2.53-.51c-.23.27-.38.62-.38 1.01 0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5c0-.18-.03-.34-.09-.5z"},child:[]}]})(t)}function Rq(t){return be({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zM7 11h10v2H7z"},child:[]}]})(t)}function Lq(t){return be({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M5 17m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M17 17m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M7 18h8m4 0h2v-6a5 5 0 0 0 -5 -5h-1l1.5 5h4.5"},child:[]},{tag:"path",attr:{d:"M12 18v-11h3"},child:[]},{tag:"path",attr:{d:"M3 17v-5h9"},child:[]},{tag:"path",attr:{d:"M4 12v-6l18 -3v2"},child:[]},{tag:"path",attr:{d:"M8 12v-4l-4 -2"},child:[]}]})(t)}function w_(t){return be({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1"},child:[]},{tag:"path",attr:{d:"M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415z"},child:[]},{tag:"path",attr:{d:"M16 5l3 3"},child:[]}]})(t)}function zq(t){return be({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 11v.01"},child:[]},{tag:"path",attr:{d:"M8 11v.01"},child:[]},{tag:"path",attr:{d:"M16 11v.01"},child:[]},{tag:"path",attr:{d:"M18 4a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-5l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3z"},child:[]}]})(t)}function j_(t){return be({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0"},child:[]},{tag:"path",attr:{d:"M6 21v-2a4 4 0 0 1 4 -4h3.5"},child:[]},{tag:"path",attr:{d:"M19 22v.01"},child:[]},{tag:"path",attr:{d:"M19 19a2.003 2.003 0 0 0 .914 -3.782a1.98 1.98 0 0 0 -2.414 .483"},child:[]}]})(t)}function Iq(t){return be({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M228.75,100.05c-3.52-3.67-7.15-7.46-8.34-10.33-1.06-2.56-1.14-7.83-1.21-12.47-.15-10-.34-22.44-9.18-31.27s-21.27-9-31.27-9.18c-4.64-.07-9.91-.15-12.47-1.21-2.87-1.19-6.66-4.82-10.33-8.34C148.87,20.46,140.05,12,128,12s-20.87,8.46-27.95,15.25c-3.67,3.52-7.46,7.15-10.33,8.34-2.56,1.06-7.83,1.14-12.47,1.21C67.25,37,54.81,37.14,46,46S37,67.25,36.8,77.25c-.07,4.64-.15,9.91-1.21,12.47-1.19,2.87-4.82,6.66-8.34,10.33C20.46,107.13,12,116,12,128S20.46,148.87,27.25,156c3.52,3.67,7.15,7.46,8.34,10.33,1.06,2.56,1.14,7.83,1.21,12.47.15,10,.34,22.44,9.18,31.27s21.27,9,31.27,9.18c4.64.07,9.91.15,12.47,1.21,2.87,1.19,6.66,4.82,10.33,8.34C107.13,235.54,116,244,128,244s20.87-8.46,27.95-15.25c3.67-3.52,7.46-7.15,10.33-8.34,2.56-1.06,7.83-1.14,12.47-1.21,10-.15,22.44-.34,31.27-9.18s9-21.27,9.18-31.27c.07-4.64.15-9.91,1.21-12.47,1.19-2.87,4.82-6.66,8.34-10.33C235.54,148.87,244,140.05,244,128S235.54,107.13,228.75,100.05Zm-17.32,39.29c-4.82,5-10.28,10.72-13.19,17.76-2.82,6.8-2.93,14.16-3,21.29-.08,5.36-.19,12.71-2.15,14.66s-9.3,2.07-14.66,2.15c-7.13.11-14.49.22-21.29,3-7,2.91-12.73,8.37-17.76,13.19C135.78,214.84,130.4,220,128,220s-7.78-5.16-11.34-8.57c-5-4.82-10.72-10.28-17.76-13.19-6.8-2.82-14.16-2.93-21.29-3-5.36-.08-12.71-.19-14.66-2.15s-2.07-9.3-2.15-14.66c-.11-7.13-.22-14.49-3-21.29-2.91-7-8.37-12.73-13.19-17.76C41.16,135.78,36,130.4,36,128s5.16-7.78,8.57-11.34c4.82-5,10.28-10.72,13.19-17.76,2.82-6.8,2.93-14.16,3-21.29C60.88,72.25,61,64.9,63,63s9.3-2.07,14.66-2.15c7.13-.11,14.49-.22,21.29-3,7-2.91,12.73-8.37,17.76-13.19C120.22,41.16,125.6,36,128,36s7.78,5.16,11.34,8.57c5,4.82,10.72,10.28,17.76,13.19,6.8,2.82,14.16,2.93,21.29,3,5.36.08,12.71.19,14.66,2.15s2.07,9.3,2.15,14.66c.11,7.13.22,14.49,3,21.29,2.91,7,8.37,12.73,13.19,17.76,3.41,3.56,8.57,8.94,8.57,11.34S214.84,135.78,211.43,139.34ZM144,180a16,16,0,1,1-16-16A16,16,0,0,1,144,180Zm28-72c0,18.37-13.69,33.88-32.27,38.56A12,12,0,0,1,116,144v-8a12,12,0,0,1,12-12c11,0,20-7.18,20-16s-9-16-20-16-20,7.18-20,16v4a12,12,0,0,1-24,0v-4c0-22.06,19.74-40,44-40S172,85.94,172,108Z"},child:[]}]})(t)}function Bq(t){return be({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M242,98.33l-184-64A6,6,0,0,0,50,40V216a6,6,0,0,0,12,0V172.27l180-62.6a6,6,0,0,0,0-11.34ZM62,159.56V48.44L221.74,104Z"},child:[]}]})(t)}function N_(t){return be({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M128,166a38,38,0,1,0-38-38A38,38,0,0,0,128,166Zm0-64a26,26,0,1,1-26,26A26,26,0,0,1,128,102ZM240,58H16a6,6,0,0,0-6,6V192a6,6,0,0,0,6,6H240a6,6,0,0,0,6-6V64A6,6,0,0,0,240,58ZM22,108.82A54.73,54.73,0,0,0,60.82,70H195.18A54.73,54.73,0,0,0,234,108.82v38.36A54.73,54.73,0,0,0,195.18,186H60.82A54.73,54.73,0,0,0,22,147.18ZM234,96.29A42.8,42.8,0,0,1,207.71,70H234ZM48.29,70A42.8,42.8,0,0,1,22,96.29V70ZM22,159.71A42.8,42.8,0,0,1,48.29,186H22ZM207.71,186A42.8,42.8,0,0,1,234,159.71V186Z"},child:[]}]})(t)}function Fq(t){return be({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M224,40V76a8,8,0,0,1-16,0V48H180a8,8,0,0,1,0-16h36A8,8,0,0,1,224,40Zm-8,132a8,8,0,0,0-8,8v28H180a8,8,0,0,0,0,16h36a8,8,0,0,0,8-8V180A8,8,0,0,0,216,172ZM76,208H48V180a8,8,0,0,0-16,0v36a8,8,0,0,0,8,8H76a8,8,0,0,0,0-16ZM40,84a8,8,0,0,0,8-8V48H76a8,8,0,0,0,0-16H40a8,8,0,0,0-8,8V76A8,8,0,0,0,40,84Zm136,92a8,8,0,0,1-6.41-3.19,52,52,0,0,0-83.2,0,8,8,0,1,1-12.8-9.62A67.94,67.94,0,0,1,101,141.51a40,40,0,1,1,53.94,0,67.94,67.94,0,0,1,27.43,21.68A8,8,0,0,1,176,176Zm-48-40a24,24,0,1,0-24-24A24,24,0,0,0,128,136Z"},child:[]}]})(t)}function Hq(t){return be({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M241.31,100.22l-184-64A4,4,0,0,0,52,40V216a4,4,0,0,0,8,0V170.84l181.31-63.06a4,4,0,0,0,0-7.56ZM60,162.37V45.63L227.82,104Z"},child:[]}]})(t)}function $q(t){return be({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"},child:[]},{tag:"path",attr:{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"},child:[]}]})(t)}function Yq(t){return be({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"line",attr:{x1:"8",y1:"12",x2:"16",y2:"12"},child:[]}]})(t)}function Uq(t){return be({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"line",attr:{x1:"12",y1:"8",x2:"12",y2:"16"},child:[]},{tag:"line",attr:{x1:"8",y1:"12",x2:"16",y2:"12"},child:[]}]})(t)}function Wq(t){return be({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"11",cy:"11",r:"8"},child:[]},{tag:"line",attr:{x1:"21",y1:"21",x2:"16.65",y2:"16.65"},child:[]}]})(t)}function S_(t){return be({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"},child:[]},{tag:"circle",attr:{cx:"8.5",cy:"7",r:"4"},child:[]},{tag:"polyline",attr:{points:"17 11 19 13 23 9"},child:[]}]})(t)}function Xq(t){return be({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M12.0001 18C12.7144 18 13.3704 18.2497 13.8856 18.6665L12.0001 21L10.1145 18.6665C10.6297 18.2497 11.2857 18 12.0001 18ZM2.80766 1.39343L20.4853 19.0711L19.0711 20.4853L13.8913 15.3042C13.2967 15.1069 12.6609 15 12.0001 15C10.5719 15 9.26024 15.499 8.22998 16.3322L6.97363 14.7759C8.24961 13.7442 9.84925 13.0969 11.5964 13.01L9.00025 10.414C7.55273 10.8234 6.22651 11.5217 5.0878 12.4426L3.83099 10.8868C4.89946 10.0226 6.10763 9.32438 7.41633 8.83118L5.13168 6.5451C3.98878 7.08913 2.92058 7.76472 1.94666 8.55228L0.689453 6.99674C1.60358 6.25747 2.59156 5.60589 3.64058 5.05479L1.39345 2.80765L2.80766 1.39343ZM14.5004 10.2854L12.2165 8.00243L12 8C15.0947 8 17.9369 9.08141 20.1693 10.8869L18.9123 12.4426C17.6438 11.4167 16.1427 10.6672 14.5004 10.2854ZM12.0001 3.00003C16.2849 3.00003 20.22 4.49719 23.3109 6.99691L22.0534 8.55228C19.3061 6.33062 15.8085 5.00003 12.0001 5.00003C11.122 5.00003 10.2604 5.07077 9.42075 5.20685L7.72455 3.51088C9.09498 3.17702 10.5268 3.00003 12.0001 3.00003Z"},child:[]}]})(t)}function f6(t){return be({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M14.8287 7.75737L9.1718 13.4142C8.78127 13.8047 8.78127 14.4379 9.1718 14.8284C9.56232 15.219 10.1955 15.219 10.586 14.8284L16.2429 9.17158C17.4144 8.00001 17.4144 6.10052 16.2429 4.92894C15.0713 3.75737 13.1718 3.75737 12.0002 4.92894L6.34337 10.5858C4.39075 12.5384 4.39075 15.7042 6.34337 17.6569C8.29599 19.6095 11.4618 19.6095 13.4144 17.6569L19.0713 12L20.4855 13.4142L14.8287 19.0711C12.095 21.8047 7.66283 21.8047 4.92916 19.0711C2.19549 16.3374 2.19549 11.9053 4.92916 9.17158L10.586 3.51473C12.5386 1.56211 15.7045 1.56211 17.6571 3.51473C19.6097 5.46735 19.6097 8.63317 17.6571 10.5858L12.0002 16.2427C10.8287 17.4142 8.92916 17.4142 7.75759 16.2427C6.58601 15.0711 6.58601 13.1716 7.75759 12L13.4144 6.34316L14.8287 7.75737Z"},child:[]}]})(t)}function Vq(t){return be({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M22.0049 5.99979H15.0049C11.6912 5.99979 9.00488 8.68608 9.00488 11.9998C9.00488 15.3135 11.6912 17.9998 15.0049 17.9998H22.0049V19.9998C22.0049 20.5521 21.5572 20.9998 21.0049 20.9998H3.00488C2.4526 20.9998 2.00488 20.5521 2.00488 19.9998V3.99979C2.00488 3.4475 2.4526 2.99979 3.00488 2.99979H21.0049C21.5572 2.99979 22.0049 3.4475 22.0049 3.99979V5.99979ZM15.0049 7.99979H23.0049V15.9998H15.0049C12.7957 15.9998 11.0049 14.2089 11.0049 11.9998C11.0049 9.79065 12.7957 7.99979 15.0049 7.99979ZM15.0049 10.9998V12.9998H18.0049V10.9998H15.0049Z"},child:[]}]})(t)}function A_(t){return be({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M17 6H22V8H20V21C20 21.5523 19.5523 22 19 22H5C4.44772 22 4 21.5523 4 21V8H2V6H7V3C7 2.44772 7.44772 2 8 2H16C16.5523 2 17 2.44772 17 3V6ZM18 8H6V20H18V8ZM9 11H11V17H9V11ZM13 11H15V17H13V11ZM9 4V6H15V4H9Z"},child:[]}]})(t)}function qq(t){return be({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M12 10C14.2091 10 16 8.20914 16 6 16 3.79086 14.2091 2 12 2 9.79086 2 8 3.79086 8 6 8 8.20914 9.79086 10 12 10ZM5.5 13C6.88071 13 8 11.8807 8 10.5 8 9.11929 6.88071 8 5.5 8 4.11929 8 3 9.11929 3 10.5 3 11.8807 4.11929 13 5.5 13ZM21 10.5C21 11.8807 19.8807 13 18.5 13 17.1193 13 16 11.8807 16 10.5 16 9.11929 17.1193 8 18.5 8 19.8807 8 21 9.11929 21 10.5ZM12 11C14.7614 11 17 13.2386 17 16V22H7V16C7 13.2386 9.23858 11 12 11ZM5 15.9999C5 15.307 5.10067 14.6376 5.28818 14.0056L5.11864 14.0204C3.36503 14.2104 2 15.6958 2 17.4999V21.9999H5V15.9999ZM22 21.9999V17.4999C22 15.6378 20.5459 14.1153 18.7118 14.0056 18.8993 14.6376 19 15.307 19 15.9999V21.9999H22Z"},child:[]}]})(t)}function C_(t){return be({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M12 14V22H4C4 17.5817 7.58172 14 12 14ZM18 21.5L15.0611 23.0451L15.6224 19.7725L13.2447 17.4549L16.5305 16.9775L18 14L19.4695 16.9775L22.7553 17.4549L20.3776 19.7725L20.9389 23.0451L18 21.5ZM12 13C8.685 13 6 10.315 6 7C6 3.685 8.685 1 12 1C15.315 1 18 3.685 18 7C18 10.315 15.315 13 12 13Z"},child:[]}]})(t)}function Gq(t){return be({attr:{viewBox:"0 0 32 32"},child:[{tag:"path",attr:{d:"M 5 6 C 3.355469 6 2 7.355469 2 9 L 2 23 C 2 24.644531 3.355469 26 5 26 L 27 26 C 28.644531 26 30 24.644531 30 23 L 30 9 C 30 7.355469 28.644531 6 27 6 Z M 5 8 L 27 8 C 27.566406 8 28 8.433594 28 9 L 28 23 C 28 23.566406 27.566406 24 27 24 L 5 24 C 4.433594 24 4 23.566406 4 23 L 4 9 C 4 8.433594 4.433594 8 5 8 Z M 11 10 C 8.800781 10 7 11.800781 7 14 C 7 15.113281 7.476563 16.117188 8.21875 16.84375 C 6.886719 17.746094 6 19.28125 6 21 L 8 21 C 8 19.332031 9.332031 18 11 18 C 12.667969 18 14 19.332031 14 21 L 16 21 C 16 19.28125 15.113281 17.746094 13.78125 16.84375 C 14.523438 16.117188 15 15.113281 15 14 C 15 11.800781 13.199219 10 11 10 Z M 18 11 L 18 13 L 26 13 L 26 11 Z M 11 12 C 12.117188 12 13 12.882813 13 14 C 13 15.117188 12.117188 16 11 16 C 9.882813 16 9 15.117188 9 14 C 9 12.882813 9.882813 12 11 12 Z M 18 15 L 18 17 L 26 17 L 26 15 Z M 18 19 L 18 21 L 23 21 L 23 19 Z"},child:[]}]})(t)}function Kq(t){return be({attr:{viewBox:"0 0 32 32"},child:[{tag:"path",attr:{d:"M 9 7 C 5.699219 7 3 9.699219 3 13 C 3 14.984375 3.976563 16.75 5.46875 17.84375 C 2.832031 19.152344 1 21.863281 1 25 L 3 25 C 3 21.675781 5.675781 19 9 19 C 12.324219 19 15 21.675781 15 25 L 17 25 C 17 21.675781 19.675781 19 23 19 C 26.324219 19 29 21.675781 29 25 L 31 25 C 31 21.863281 29.167969 19.152344 26.53125 17.84375 C 28.023438 16.75 29 14.984375 29 13 C 29 9.699219 26.300781 7 23 7 C 19.699219 7 17 9.699219 17 13 C 17 14.984375 17.976563 16.75 19.46875 17.84375 C 18.011719 18.566406 16.789063 19.707031 16 21.125 C 15.210938 19.707031 13.988281 18.566406 12.53125 17.84375 C 14.023438 16.75 15 14.984375 15 13 C 15 9.699219 12.300781 7 9 7 Z M 9 9 C 11.222656 9 13 10.777344 13 13 C 13 15.222656 11.222656 17 9 17 C 6.777344 17 5 15.222656 5 13 C 5 10.777344 6.777344 9 9 9 Z M 23 9 C 25.222656 9 27 10.777344 27 13 C 27 15.222656 25.222656 17 23 17 C 20.777344 17 19 15.222656 19 13 C 19 10.777344 20.777344 9 23 9 Z"},child:[]}]})(t)}function p6(t){return be({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"},child:[]}]})(t)}function Zq(t){return be({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M353.8 54.1L330.2 6.3c-3.9-8.3-16.1-8.6-20.4 0L286.2 54.1l-52.3 7.5c-9.3 1.4-13.3 12.9-6.4 19.8l38 37-9 52.1c-1.4 9.3 8.2 16.5 16.8 12.2l46.9-24.8 46.6 24.4c8.6 4.3 18.3-2.9 16.8-12.2l-9-52.1 38-36.6c6.8-6.8 2.9-18.3-6.4-19.8l-52.3-7.5zM256 256c-17.7 0-32 14.3-32 32l0 192c0 17.7 14.3 32 32 32l128 0c17.7 0 32-14.3 32-32l0-192c0-17.7-14.3-32-32-32l-128 0zM32 320c-17.7 0-32 14.3-32 32L0 480c0 17.7 14.3 32 32 32l128 0c17.7 0 32-14.3 32-32l0-128c0-17.7-14.3-32-32-32L32 320zm416 96l0 64c0 17.7 14.3 32 32 32l128 0c17.7 0 32-14.3 32-32l0-64c0-17.7-14.3-32-32-32l-128 0c-17.7 0-32 14.3-32 32z"},child:[]}]})(t)}function Qq(t){return be({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M320 96L192 96 144.6 24.9C137.5 14.2 145.1 0 157.9 0L354.1 0c12.8 0 20.4 14.2 13.3 24.9L320 96zM192 128l128 0c3.8 2.5 8.1 5.3 13 8.4C389.7 172.7 512 250.9 512 416c0 53-43 96-96 96L96 512c-53 0-96-43-96-96C0 250.9 122.3 172.7 179 136.4c0 0 0 0 0 0s0 0 0 0c4.8-3.1 9.2-5.9 13-8.4zm84 88c0-11-9-20-20-20s-20 9-20 20l0 14c-7.6 1.7-15.2 4.4-22.2 8.5c-13.9 8.3-25.9 22.8-25.8 43.9c.1 20.3 12 33.1 24.7 40.7c11 6.6 24.7 10.8 35.6 14l1.7 .5c12.6 3.8 21.8 6.8 28 10.7c5.1 3.2 5.8 5.4 5.9 8.2c.1 5-1.8 8-5.9 10.5c-5 3.1-12.9 5-21.4 4.7c-11.1-.4-21.5-3.9-35.1-8.5c-2.3-.8-4.7-1.6-7.2-2.4c-10.5-3.5-21.8 2.2-25.3 12.6s2.2 21.8 12.6 25.3c1.9 .6 4 1.3 6.1 2.1c0 0 0 0 0 0s0 0 0 0c8.3 2.9 17.9 6.2 28.2 8.4l0 14.6c0 11 9 20 20 20s20-9 20-20l0-13.8c8-1.7 16-4.5 23.2-9c14.3-8.9 25.1-24.1 24.8-45c-.3-20.3-11.7-33.4-24.6-41.6c-11.5-7.2-25.9-11.6-37.1-15c0 0 0 0 0 0l-.7-.2c-12.8-3.9-21.9-6.7-28.3-10.5c-5.2-3.1-5.3-4.9-5.3-6.7c0-3.7 1.4-6.5 6.2-9.3c5.4-3.2 13.6-5.1 21.5-5c9.6 .1 20.2 2.2 31.2 5.2c10.7 2.8 21.6-3.5 24.5-14.2s-3.5-21.6-14.2-24.5c-6.5-1.7-13.7-3.4-21.1-4.7l0-13.9z"},child:[]}]})(t)}function Jq(t){return be({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M224 256A128 128 0 1 0 224 0a128 128 0 1 0 0 256zm-45.7 48C79.8 304 0 383.8 0 482.3C0 498.7 13.3 512 29.7 512l388.6 0c1.8 0 3.5-.2 5.3-.5c-76.3-55.1-99.8-141-103.1-200.2c-16.1-4.8-33.1-7.3-50.7-7.3l-91.4 0zm308.8-78.3l-120 48C358 277.4 352 286.2 352 296c0 63.3 25.9 168.8 134.8 214.2c5.9 2.5 12.6 2.5 18.5 0C614.1 464.8 640 359.3 640 296c0-9.8-6-18.6-15.1-22.3l-120-48c-5.7-2.3-12.1-2.3-17.8 0zM591.4 312c-3.9 50.7-27.2 116.7-95.4 149.7l0-187.8L591.4 312z"},child:[]}]})(t)}function eG(t){return be({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M96 128a128 128 0 1 0 256 0A128 128 0 1 0 96 128zm94.5 200.2l18.6 31L175.8 483.1l-36-146.9c-2-8.1-9.8-13.4-17.9-11.3C51.9 342.4 0 405.8 0 481.3c0 17 13.8 30.7 30.7 30.7l131.7 0c0 0 0 0 .1 0l5.5 0 112 0 5.5 0c0 0 0 0 .1 0l131.7 0c17 0 30.7-13.8 30.7-30.7c0-75.5-51.9-138.9-121.9-156.4c-8.1-2-15.9 3.3-17.9 11.3l-36 146.9L238.9 359.2l18.6-31c6.4-10.7-1.3-24.2-13.7-24.2L224 304l-19.7 0c-12.4 0-20.1 13.6-13.7 24.2z"},child:[]}]})(t)}const Ue=()=>{const t=Cr(),[e,r]=O.useState([]),[n,a]=O.useState("");O.useEffect(()=>{(async()=>{try{const u=await _e.get("https://aaaogo.xyz/api/user/me",{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}});r(u.data.user.adminPermissions||[]),a(u.data.user.role)}catch(u){console.error("Failed to fetch user permissions:",u)}})()},[]);const s=c=>`px-4 py-2 rounded-full border border-[#DDC104] transition-all duration-300 font-medium text-lg flex items-center gap-3 ${t.pathname===c?"bg-[#DDC104] text-[#013220] shadow-md":"hover:bg-yellow-100 hover:text-[#013220]"}`,o=[{path:"/home",name:"Dashboard",icon:i.jsx(iq,{size:20}),permission:"home"},{path:"/mlm",name:"MLM",icon:i.jsx(bq,{size:20}),permission:"mlm"},{path:"/dispatch",name:"Dispatch Center",icon:i.jsx(vq,{size:20}),permission:"dispatch"},{path:"/drivermanagement",name:"Driver Management",icon:i.jsx(jq,{size:20}),permission:"drivermanagement"},{path:"/customermanagement",name:"Customer Management",icon:i.jsx(Kq,{size:20}),permission:"customermanagement"},{path:"/customersupport",name:"Customer Support",icon:i.jsx(Mq,{size:20}),permission:"customersupport"},{path:"/websiteuser",name:"Website User",icon:i.jsx(Nq,{size:20}),permission:"websiteuser"},{path:"/proposalmanagement",name:"Career Management",icon:i.jsx("div",{className:"flex items-center gap-2",children:i.jsxs("div",{className:"relative w-6 h-6",children:[i.jsx(cq,{size:16,className:"absolute top-0 left-1/2 -translate-x-1/2"}),i.jsx(hq,{size:16,className:"absolute bottom-0 left-1/2 -translate-x-1/2"})]})}),permission:"proposalmanagement"},{path:"/overview",name:"Fraud Detection",icon:i.jsx(Rq,{size:20}),permission:"overview"},{path:"/paymentoverview",name:"Wallet & Panel",icon:i.jsx(Vq,{size:20}),permission:"paymentoverview"},{path:"/chatdetail",name:"Monitor",icon:i.jsx(zq,{size:20}),subtext:"(Chats & Activity)",permission:"chatdetail"},{path:"/kycverification",name:"Admin Approvals",icon:i.jsx(S_,{size:20}),permission:"kycverification"},{path:"/reportanalytics",name:"Reports",icon:i.jsx(Fq,{size:25}),permission:"reportanalytics"},{path:"/reviewandrating",name:"Rating & Reviews",icon:i.jsx(eq,{size:25}),permission:"reviewandrating"},{path:"/officialsandfeed",name:"Officials & Feed",icon:i.jsx(yq,{size:20}),permission:"officialsandfeed"},{path:"/adminmanagement",name:"Admin Management",icon:i.jsx(Jq,{size:20}),permission:"adminmanagement"}],l=n==="superadmin"?o:o.filter(c=>c.permission==="adminmanagement"?n==="superadmin":e.includes(c.permission));return i.jsx("div",{className:"sticky top-0 left-0 overflow-y-auto overflow-x-hidden z-10 p-6 flex flex-col gap-12 border-r border-[#546816] min-h-screen",children:i.jsx("div",{className:"flex flex-col gap-6 w-64",children:l.map(c=>i.jsxs(Pe,{to:c.path,className:s(c.path),children:[c.icon,c.subtext?i.jsxs("p",{className:"truncate",children:[c.name," ",i.jsx("span",{className:"text-sm",children:c.subtext})]}):i.jsx("span",{className:"truncate",children:c.name})]},c.path))})})},tG={general:[{id:1,name:"Zoe",message:"Zoe Sent You A Message",image:"https://randomuser.me/api/portraits/women/44.jpg",detail:"General: Lorem Ipsum Dolor Sit Amet Consectetur. Augue Dolor Proin Nulla Eu Mi Tincidunt.",time:"Just Now"}],booking:[{id:2,name:"Zoe",message:"Booking Confirmed",image:"https://randomuser.me/api/portraits/women/44.jpg",detail:"Booking: Your appointment has been confirmed for tomorrow at 10AM.",time:"2 hours ago"}],important:[{id:3,name:"Admin",message:"Important Policy Update",image:"https://randomuser.me/api/portraits/men/10.jpg",detail:"Important: New wallet freezing rules are now in effect. Please review.",time:"5 hours ago"}]},rG=()=>{const[t,e]=O.useState("general"),r=tG[t];return i.jsxs("div",{className:"flex bg-[#13220] min-h-screen",children:[i.jsx(Ue,{}),i.jsxs("div",{className:"flex-1 p-6 relative",children:[i.jsx("div",{className:"flex items-center gap-2",children:i.jsxs(Pe,{to:"/",className:"flex items-center gap-2",children:[i.jsx(Hf,{size:30,className:"cursor-pointer"}),i.jsx("span",{className:"text-lg font-semibold",children:"Back"})]})}),i.jsxs("div",{className:"py-10",children:[i.jsxs("h1",{className:"text-xl font-semibold inline-block relative pb-1",children:["Notification & Alerts",i.jsx("span",{className:"absolute left-0 bottom-0 w-full h-[1px] bg-yellow-400 rounded-full"})]}),i.jsx("h5",{className:"text-sm float-right text-yellow-400 cursor-pointer",children:"Mark All As Read"})]}),i.jsx("div",{className:"border-b border-yellow-400 mb-6",children:i.jsx("div",{className:"flex gap-20 text-sm font-semibold items-center pb-2",children:["general","booking","important"].map(n=>i.jsxs("div",{onClick:()=>e(n),className:"relative cursor-pointer",children:[n==="general"&&"General Notification",n==="booking"&&"Booking Notification",n==="important"&&"Important Notification",t===n&&i.jsx("div",{className:"absolute bottom-[-2px] left-0 w-full h-[2px] bg-yellow-400 rounded-full"})]},n))})}),i.jsx("div",{className:"flex flex-col gap-4",children:r.length===0?i.jsx("div",{className:"text-center py-8 text-sm text-yellow-200",children:"No notifications in this category."}):r.map(n=>i.jsxs("div",{className:"bg-[#0A3A26] border border-[#3A4F3A] p-4 rounded-xl flex justify-between items-start",children:[i.jsxs("div",{className:"flex gap-4",children:[i.jsx("img",{src:n.image,alt:"avatar",className:"w-10 h-10 rounded-full object-cover"}),i.jsxs("div",{children:[i.jsx("p",{className:"font-semibold text-sm mb-1",children:n.message}),i.jsx("p",{className:"text-xs",children:n.detail}),i.jsxs("div",{className:"flex items-center text-xs mt-1 ",children:[i.jsx(b_,{className:"mr-1"}),n.time]})]})]}),i.jsx("button",{className:"text-yellow-400 text-sm whitespace-nowrap relative hover:underline",children:"View Detail"})]},n.id))})]})]})},nG=()=>{const t=[{id:1,name:"Alice Smith",pickup:"Pickup:Dubai",Dropoff:"Drop_off:Sharjah",status:"Active"},{id:1,name:"Alice Smith",pickup:"Pickup:Dubai",Dropoff:"Drop_off:Sharjah",status:"Active"},{id:1,name:"Alice Smith",pickup:"Pickup:Dubai",Dropoff:"Drop_off:Sharjah",status:"Active"}];return i.jsx("div",{children:i.jsxs("table",{className:"w-full p-6",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"text-left border-b border-t border-yellow-400",children:[i.jsx("th",{className:"text-sm px-4 py-2",children:"ID"}),i.jsx("th",{className:"text-sm px-4 py-2",children:"Client Name"}),i.jsx("th",{className:"text-sm px-4 py-2",children:"Pickup & Drop-off"}),i.jsx("th",{className:"text-sm px-4 py-2",children:"Status"}),i.jsx("th",{className:"text-sm px-4 py-2 text-center",children:"Action"})]})}),i.jsx("tbody",{children:t.map((e,r)=>i.jsxs("tr",{children:[i.jsxs("td",{className:"text-sm px-4 py-2",children:["00",e.id]}),i.jsx("td",{className:"text-sm px-4 py-2",children:e.name}),i.jsx("td",{className:"text-sm px-4 py-2",children:i.jsxs("div",{className:"flex flex-col",children:[i.jsx("span",{children:e.pickup}),i.jsx("span",{children:e.Dropoff})]})}),i.jsx("td",{className:"text-sm px-4 py-2",children:e.status}),i.jsx("td",{className:"px-4 py-2 flex justify-center",children:i.jsxs(Pe,{to:"/livelocation",className:"inline-flex items-center gap-1 px-3 py-1.5 text-xs font-medium bg-yellow-400 rounded-full text-[#013220] hover:bg-yellow-300 transition-all whitespace-nowrap",children:[i.jsx(v_,{className:"text-sm"}),"Live Location"]})})]},r))})]})})},aG=()=>{const t=[{id:1,name:"Alice Smith",pickup:"Pickup:Dubai",Dropoff:"Drop_off:Sharjah",status:"Assigned"},{id:1,name:"Alice Smith",pickup:"Pickup:Dubai",Dropoff:"Drop_off:Sharjah",status:"Assigned"},{id:1,name:"Alice Smith",pickup:"Pickup:Dubai",Dropoff:"Drop_off:Sharjah",status:"Assigned"}];return i.jsx("div",{children:i.jsxs("table",{className:"w-full p-6",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"text-left border-b border-t border-yellow-400",children:[i.jsx("th",{className:"text-sm px-4 py-2",children:"ID"}),i.jsx("th",{className:"text-sm px-4 py-2",children:"Client Name"}),i.jsx("th",{className:"text-sm px-4 py-2",children:"Pickup & Drop-off"}),i.jsx("th",{className:"text-sm px-4 py-2",children:"Status"}),i.jsx("th",{className:"text-sm px-4 py-2 text-center",children:"Action"})]})}),i.jsx("tbody",{children:t.map((e,r)=>i.jsxs("tr",{children:[i.jsxs("td",{className:"text-sm px-4 py-2",children:["00",e.id]}),i.jsx("td",{className:"text-sm px-4 py-2",children:e.name}),i.jsx("td",{className:"text-sm px-4 py-2",children:i.jsxs("div",{className:"flex flex-col",children:[i.jsx("span",{children:e.pickup}),i.jsx("span",{children:e.Dropoff})]})}),i.jsx("td",{className:"text-sm px-4 py-2",children:e.status}),i.jsx("td",{className:"px-4 py-2 flex justify-center",children:i.jsxs(Pe,{to:"/livelocation",className:"inline-flex items-center gap-1 px-3 py-1.5 text-xs font-medium bg-yellow-400 rounded-full text-black hover:bg-yellow-300 transition-all whitespace-nowrap",children:[i.jsx(v_,{className:"text-sm"}),"Live Location"]})})]},r))})]})})},sG=()=>{const t=[{id:1,name:"Alice Smith",pickup:"Pickup:Dubai",Dropoff:"Drop_off:Sharjah",status:"Completed"},{id:1,name:"Alice Smith",pickup:"Pickup:Dubai",Dropoff:"Drop_off:Sharjah",status:"Completed"},{id:1,name:"Alice Smith",pickup:"Pickup:Dubai",Dropoff:"Drop_off:Sharjah",status:"Completed"}];return i.jsx("div",{children:i.jsxs("table",{className:"w-full p-6",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"text-left border-b border-t border-yellow-400",children:[i.jsx("th",{className:"text-sm px-4 py-2",children:"ID"}),i.jsx("th",{className:"text-sm px-4 py-2",children:"Client Name"}),i.jsx("th",{className:"text-sm px-4 py-2",children:"Pickup & Drop-off"}),i.jsx("th",{className:"text-sm px-4 py-2",children:"Status"})]})}),i.jsx("tbody",{children:t.map((e,r)=>i.jsxs("tr",{children:[i.jsxs("td",{className:"text-sm px-4 py-2",children:["00",e.id]}),i.jsx("td",{className:"text-sm px-4 py-2",children:e.name}),i.jsx("td",{className:"text-sm px-4 py-2",children:i.jsxs("div",{className:"flex flex-col",children:[i.jsx("span",{children:e.pickup}),i.jsx("span",{children:e.Dropoff})]})}),i.jsx("td",{className:"text-sm px-4 py-2",children:e.status})]},r))})]})})},iG=()=>{const t=[{id:1,name:"Alice Smith",pickup:"Pickup:Dubai",Dropoff:"Drop_off:Sharjah",status:"Cancelled"},{id:1,name:"Alice Smith",pickup:"Pickup:Dubai",Dropoff:"Drop_off:Sharjah",status:"Cancelled"},{id:1,name:"Alice Smith",pickup:"Pickup:Dubai",Dropoff:"Drop_off:Sharjah",status:"Cancelled"}];return i.jsx("div",{children:i.jsxs("table",{className:"w-full p-6",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"text-left border-b border-t border-yellow-400",children:[i.jsx("th",{className:"text-sm px-4 py-2",children:"ID"}),i.jsx("th",{className:"text-sm px-4 py-2",children:"Client Name"}),i.jsx("th",{className:"text-sm px-4 py-2",children:"Pickup & Drop-off"}),i.jsx("th",{className:"text-sm px-4 py-2",children:"Status"})]})}),i.jsx("tbody",{children:t.map((e,r)=>i.jsxs("tr",{children:[i.jsxs("td",{className:"text-sm px-4 py-2",children:["00",e.id]}),i.jsx("td",{className:"text-sm px-4 py-2",children:e.name}),i.jsx("td",{className:"text-sm px-4 py-2",children:i.jsxs("div",{className:"flex flex-col",children:[i.jsx("span",{children:e.pickup}),i.jsx("span",{children:e.Dropoff})]})}),i.jsx("td",{className:"text-sm px-4 py-2",children:e.status})]},r))})]})})};function m6(t){return be({attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M960 95.888l-256.224.001V32.113c0-17.68-14.32-32-32-32s-32 14.32-32 32v63.76h-256v-63.76c0-17.68-14.32-32-32-32s-32 14.32-32 32v63.76H64c-35.344 0-64 28.656-64 64v800c0 35.343 28.656 64 64 64h896c35.344 0 64-28.657 64-64v-800c0-35.329-28.656-63.985-64-63.985zm0 863.985H64v-800h255.776v32.24c0 17.679 14.32 32 32 32s32-14.321 32-32v-32.224h256v32.24c0 17.68 14.32 32 32 32s32-14.32 32-32v-32.24H960v799.984zM736 511.888h64c17.664 0 32-14.336 32-32v-64c0-17.664-14.336-32-32-32h-64c-17.664 0-32 14.336-32 32v64c0 17.664 14.336 32 32 32zm0 255.984h64c17.664 0 32-14.32 32-32v-64c0-17.664-14.336-32-32-32h-64c-17.664 0-32 14.336-32 32v64c0 17.696 14.336 32 32 32zm-192-128h-64c-17.664 0-32 14.336-32 32v64c0 17.68 14.336 32 32 32h64c17.664 0 32-14.32 32-32v-64c0-17.648-14.336-32-32-32zm0-255.984h-64c-17.664 0-32 14.336-32 32v64c0 17.664 14.336 32 32 32h64c17.664 0 32-14.336 32-32v-64c0-17.68-14.336-32-32-32zm-256 0h-64c-17.664 0-32 14.336-32 32v64c0 17.664 14.336 32 32 32h64c17.664 0 32-14.336 32-32v-64c0-17.68-14.336-32-32-32zm0 255.984h-64c-17.664 0-32 14.336-32 32v64c0 17.68 14.336 32 32 32h64c17.664 0 32-14.32 32-32v-64c0-17.648-14.336-32-32-32z"},child:[]}]})(t)}function oG(t){return be({attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M497.408 898.56c-.08-.193-.272-.323-.385-.483l-91.92-143.664c-6.528-10.72-20.688-14.527-31.728-8.512l-8.193 5.04c-11.007 6-10.767 21.537-4.255 32.256l58.927 91.409c-5.024-1.104-10.096-2-15.056-3.296-103.184-26.993-190.495-96.832-239.535-191.6-46.336-89.52-55.04-191.695-24.512-287.743 30.512-96.048 99.775-174.464 189.295-220.784 15.248-7.888 21.2-26.64 13.312-41.856-7.872-15.264-26.64-21.231-41.855-13.327-104.272 53.952-184.4 145.28-219.969 257.152C45.982 485.008 56.11 604.033 110.078 708.29c57.136 110.336 158.832 191.664 279.024 223.136 1.36.352 2.784.56 4.16.911l-81.311 41.233c-11.008 6.032-14.657 19.631-8.128 30.351l3.152 8.176c6.56 10.72 17.84 14.527 28.815 8.512L484.622 944.4c.193-.128.385-.096.578-.224l9.984-5.456c5.52-3.024 9.168-7.969 10.624-13.505 1.52-5.52.815-11.663-2.448-16.991zm416.496-577.747c-57.056-110.304-155.586-191.63-275.762-223.118-8.56-2.24-17.311-3.984-26.048-5.712l79.824-40.48c11.008-6.033 17.568-19.632 11.04-30.369l-3.153-8.16c-6.56-10.736-20.752-14.528-31.727-8.528L519.262 80.654c-.176.112-.384.08-.577.208l-9.967 5.472c-5.537 3.04-9.168 7.967-10.624 13.503-1.52 5.52-.816 11.648 2.464 16.976l5.92 9.712c.096.192.272.305.384.497l91.92 143.648c6.512 10.736 20.688 14.528 31.712 8.513l7.216-5.025c11.008-6 11.727-21.536 5.231-32.24l-59.2-91.856c13.008 2 25.968 4.416 38.624 7.76 103.232 27.04 187.393 96.864 236.4 191.568 46.32 89.519 55.024 191.695 24.48 287.728-30.511 96.047-96.655 174.448-186.174 220.816-15.233 7.887-21.168 26.607-13.28 41.87 5.519 10.64 16.335 16.768 27.599 16.768 4.8 0 9.664-1.12 14.272-3.488 104.272-53.936 181.248-145.279 216.816-257.119 35.536-111.904 25.393-230.929-28.574-335.152z"},child:[]}]})(t)}const g6=["All","Assigned","Completed","Cancelled"],lG=()=>{const[t,e]=O.useState(""),[r,n]=O.useState(""),[a,s]=O.useState(""),[o,l]=O.useState(""),[c,u]=O.useState("All"),h=()=>{switch(c){case"Assigned":return i.jsx(aG,{});case"Completed":return i.jsx(sG,{});case"Cancelled":return i.jsx(iG,{});default:return i.jsx(nG,{activeTab:c})}};return i.jsxs("div",{className:"flex min-h-screen",children:[i.jsx(Ue,{}),i.jsxs("div",{className:"flex-1",children:[i.jsxs("div",{className:"flex gap-6 p-6 flex-wrap",children:[i.jsxs("select",{value:t,onChange:p=>e(p.target.value),className:"border border-yellow-400 rounded-full px-4 py-2 bg-transparent text-yellow-400 focus:outline-none",children:[i.jsx("option",{value:"",children:"Services type"}),i.jsx("option",{value:"Tow",children:"Tow"}),i.jsx("option",{value:"Repair",children:"Repair"}),i.jsx("option",{value:"Delivery",children:"Delivery"})]}),i.jsxs("select",{value:r,onChange:p=>n(p.target.value),className:"border border-yellow-400 rounded-full px-4 py-2 bg-transparent text-yellow-400 focus:outline-none",children:[i.jsx("option",{value:"",children:"City"}),i.jsx("option",{value:"North",children:"Dubai"}),i.jsx("option",{value:"South",children:"Abu Dhabi"})]}),i.jsxs("select",{value:a,onChange:p=>s(p.target.value),className:"border border-yellow-400 rounded-full px-4 py-2 bg-transparent text-yellow-400 focus:outline-none",children:[i.jsx("option",{value:"",children:"Sort By"}),i.jsx("option",{value:"date",children:"Date"}),i.jsx("option",{value:"status",children:"Status"}),i.jsx("option",{value:"priority",children:"Priority"})]}),i.jsx("input",{type:"date",value:o,onChange:p=>l(p.target.value),className:"border border-yellow-400 rounded-full px-4 py-2 bg-transparent text-yellow-400 focus:outline-none"}),i.jsxs("button",{className:"flex gap-2 items-center border border-yellow-400 rounded-full px-4 py-2 bg-transparent text-yellow-400 focus:outline-none",children:[i.jsx(oG,{})," Refresh"]})]}),i.jsx("div",{className:"flex gap-6 p-6 items-center font-bold",children:g6.map((p,m)=>i.jsxs(Lr.Fragment,{children:[i.jsx("p",{onClick:()=>u(p),className:`cursor-pointer pb-1 transition-colors duration-200 ${c===p?"text-yellow-400 border-b-2 border-yellow-400":"hover:text-yellow-300"}`,children:p}),m!==g6.length-1&&i.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"})]},m))}),h()]})]})},ko=()=>{const t=Cr();Ao();const e=r=>`menu-tab ${t.pathname===r?"active":""}`;return i.jsxs("div",{className:"px-10",children:[i.jsx("div",{className:"flex items-center gap-2 pb-6",children:i.jsxs(Pe,{to:t.pathname==="/driverprofile"?"/drivermanagement":"/driverprofile",className:"flex items-center gap-2 cursor-pointer",children:[i.jsx(Hf,{size:30,className:"text-lg"}),i.jsx("span",{className:"text-lg font-semibold",children:"Back"})]})}),i.jsxs("div",{className:"flex justify-between items-center border-b border-yellow-400",children:[i.jsx(Pe,{to:"/driverprofile",className:e("/driverprofile"),children:"Profile"}),i.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),i.jsx(Pe,{to:"/drivermonitoring",className:e("/drivermonitoring"),children:"Monitoring"}),i.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),i.jsx(Pe,{to:"/driverhistory",className:e("/driverhistory"),children:"History"}),i.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),i.jsx(Pe,{to:"/earningandpayouts",className:e("/earningandpayouts"),children:"Earning & Payouts"}),i.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),i.jsx(Pe,{to:"/ratings",className:e("/ratings"),children:"Ratings"}),i.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),i.jsx(Pe,{to:"/penalty",className:e("/penalty"),children:"Penalty"}),i.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),i.jsx(Pe,{to:"/report",className:e("/report"),children:"Report"}),i.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),i.jsx(Pe,{to:"/referraltree",className:e("/referraltree"),children:"Referral Tree"})]})]})},cG=[{id:1,date:"21/July/2025",type:"Booking",name:"Allice Smith",status:"Completed",fare:100,action:"View"},{id:1,date:"21/July/2025",type:"Booking",name:"Allice Smith",status:"Completed",fare:100,action:"View"},{id:1,date:"21/July/2025",type:"Booking",name:"Allice Smith",status:"Completed",fare:100,action:"View"}],dG=()=>i.jsx(i.Fragment,{children:i.jsxs("div",{children:[i.jsx(ko,{}),i.jsx("div",{className:" pt-4",children:i.jsxs("table",{className:"w-full text-sm text-left",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-yellow-200",children:[i.jsx("th",{className:"px-3 py-3",children:"ID"}),i.jsx("th",{className:"px-4 py-3",children:"Date"}),i.jsx("th",{className:"px-4 py-3 text-cente",children:"Type"}),i.jsx("th",{className:"px-4 py-3",children:"Customer Name"}),i.jsx("th",{className:"px-4 py-3",children:"Status"}),i.jsx("th",{className:"px-4 py-3",children:"Fare"}),i.jsx("th",{className:"px-4 py-3 text-center align-middle",children:"Action"})]})}),i.jsx("tbody",{children:cG.map((t,e)=>i.jsxs("tr",{children:[i.jsxs("td",{className:"px-4 py-3",children:["00",t.id]}),i.jsx("td",{className:"px-4 py-3",children:t.date}),i.jsx("td",{className:"px-4 py-3 r",children:t.type}),i.jsx("td",{className:"px-4 py-3",children:t.name}),i.jsx("td",{className:"px-4 py-3",children:t.status}),i.jsx("td",{className:"px-4 py-3",children:t.fare}),i.jsx("td",{className:"px-4 py-3",children:i.jsx("div",{className:"flex items-center gap-3 justify-center",children:i.jsx("button",{className:"bg-yellow-400 text-black px-4 py-1.5 cursor-pointer rounded-full text-xs font-medium",children:"View"})})})]},e))})]})})]})}),uG=()=>i.jsx("div",{className:"w-full h-[700px]",children:i.jsx("iframe",{title:"Google Map with Zoom",src:"https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3321.64236278531!2d73.07320327479474!3d33.64051393936022!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x11a4d1a8d62fd41%3A0x1feebab68518189!2sCodesVista!5e0!3m2!1sen!2s!4v1753601036017!5m2!1sen!2s",width:"100%",height:"100%",style:{border:0},allowFullScreen:"",loading:"lazy",referrerPolicy:"no-referrer-when-downgrade"})}),hG=()=>{const[t,e]=O.useState("chat"),[r,n]=O.useState(""),[a,s]=O.useState("allchats"),o=[{sender:"Smith Joy",time:"10:45 AM",text:"Lorem ipsum dolor sit amet consectetur. Volutpatte enim duis orci tortor amet lorem quam tellus.",avatar:"https://i.pravatar.cc/40?img=1"},{sender:"You",time:"11:15 AM",text:"Lorem dolor sit amet consectetur. Volutpatte enim duis orci tortor amet lorem quam tellus.",avatar:"https://i.pravatar.cc/40?img=2"}],l=Array(9).fill({name:"Smith Joy",time:"10:45 AM",text:"Lorem ipsum dolor sit amet consectetur. Volutpatte enim duis orci tortor amet lorem quam tellus.",avatar:"https://i.pravatar.cc/40?img=1"});return i.jsxs("div",{className:"flex",children:[i.jsx("div",{children:i.jsx(Ue,{})}),i.jsxs("div",{className:"flex-1 p-6 flex flex-col overflow-hidden",children:[i.jsx("div",{className:"flex items-center gap-2 py-4",children:i.jsxs(Pe,{to:"/",className:"flex items-center gap-2",children:[i.jsx(Hf,{size:30,className:"cursor-pointer text-lg"}),i.jsx("span",{className:"text-lg font-semibold",children:"Back"})]})}),i.jsxs("div",{className:"flex gap-2 pb-6",children:[i.jsx("button",{onClick:()=>e("chat"),className:`menu-tab ${t==="chat"?"active":""}`,children:"Chat"}),i.jsx("button",{onClick:()=>e("explore"),className:`menu-tab ${t==="explore"?"active":""}`,children:"Explore"})]}),i.jsxs("div",{className:"flex flex-1 gap-3 overflow-hidden",children:[i.jsxs("div",{className:"w-[40%] bg-yellow-400 rounded-xl text-[#1c350d] p-4 space-y-2 overflow-y-auto ",children:[i.jsxs("div",{className:"flex justify-between",children:[i.jsx("h3",{onClick:()=>s("allchats"),className:` text-bold mb-2 menu-tab ${a=="allchats"?"linebelow":" "}`,children:"All Chats"}),i.jsx("h3",{onClick:()=>s("resolution"),className:` text-bold mb-2 menu-tab ${a=="resolution"?"linebelow":" "}`,children:"Resolution Channel"}),i.jsx("h3",{onClick:()=>s("assigned"),className:` text-bold mb-2 menu-tab ${a=="assigned"?"linebelow":" "}`,children:"Assigned Agent"})]}),l.map((c,u)=>i.jsxs("div",{className:"p-2 rounded-lg hover:bg-yellow-200 transition",children:[i.jsx("div",{className:"text-right text-xs text-gray-800",children:c.time}),i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx("img",{src:c.avatar,alt:"avatar",className:"w-8 h-8 rounded-full"}),i.jsxs("div",{children:[i.jsx("p",{className:"font-semibold text-sm",children:c.name}),i.jsxs("div",{className:"flex gap-12",children:[i.jsxs("p",{className:"text-xs",children:[c.text.slice(0,40),"..."]}),i.jsx(oq,{size:20})]})]})]})]},u))]}),i.jsxs("div",{className:"flex-1 flex flex-col justify-between p-4 space-y-4 shadow-sm shadow-black/70 rounded-xl border-t border-b border-black",children:[i.jsx("div",{className:"space-y-4 overflow-y-auto pr-2 rounded-xl px-2 py-4",children:o.map((c,u)=>i.jsx("div",{className:`flex ${c.sender==="You"?"justify-end":"justify-start"}`,children:i.jsxs("div",{className:`${c.sender==="You"?"bg-gray-800 text-white":"bg-yellow-400 text-black"} p-3 rounded-xl max-w-sm shadow-md`,children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("img",{src:c.avatar,alt:"avatar",className:"w-6 h-6 rounded-full"}),i.jsx("p",{className:"text-xs text-right mt-1",children:c.time})]}),i.jsx("p",{className:"text-sm mt-2",children:c.text})]})},u))}),i.jsxs("div",{className:"flex items-center gap-3 ",children:[i.jsx("button",{className:"hover:text-yellow-600",children:i.jsx(pq,{size:25})}),i.jsx("div",{className:"border w-full border-yellow-400 rounded-full px-4 py-2 text-yellow-400 shadow-md",children:i.jsx("input",{type:"text",placeholder:"Type here...",value:r,onChange:c=>n(c.target.value),className:"flex-1 bg-transparent focus:outline-none placeholder-yellow-400 text-yellow-400"})}),i.jsx("button",{className:"hover:text-yellow-600",children:i.jsx(gq,{size:25})})]})]})]})]})]})},md=({isOpen:t,onClose:e,onConfirm:r,title:n,message:a,showInput:s=!1,inputPlaceholder:o=""})=>{const[l,c]=O.useState(""),u=()=>{s?r(l):r(),c(""),e()},h=()=>{c(""),e()};return t?i.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:i.jsxs("div",{className:"bg-[#013220] border border-[#374151] rounded-lg p-6 max-w-md w-full mx-4 shadow-xl",children:[i.jsx("h3",{className:"text-lg font-semibold text-white mb-4",children:n}),i.jsx("p",{className:"text-white mb-6",children:a}),s&&i.jsx("input",{type:"text",value:l,onChange:p=>c(p.target.value),placeholder:o,className:"w-full px-3 py-2 bg-[#1f2937] border border-[#374151] text-white rounded-md focus:outline-none focus:ring-2 focus:ring-[#DDC104] focus:border-[#DDC104] mb-6 placeholder-gray-400",autoFocus:!0}),i.jsxs("div",{className:"flex justify-end space-x-3",children:[i.jsx("button",{onClick:h,className:"px-4 py-2 text-white bg-[#1f2937] border border-white rounded-md hover:bg-[#374151] transition-colors",children:"Cancel"}),i.jsx("button",{onClick:u,disabled:s&&!l.trim(),className:"px-4 py-2 bg-[#DDC104] text-white font-semibold rounded-md hover:bg-[#f59e0b] disabled:bg-gray-600 disabled:text-gray-400 disabled:cursor-not-allowed transition-colors",children:"Confirm"})]})]})}):null},fG=()=>{const t=Ba(),{users:e,loading:r,error:n,success:a,editSuccess:s,deleteSuccess:o,totalUsers:l,updateKey:c}=ua(F=>F.user),[u,h]=O.useState("All"),[p,m]=O.useState(null),[x,y]=O.useState(null),[b,w]=O.useState(null),[N,A]=O.useState({username:"",firstName:"",lastName:"",email:"",phoneNumber:"",gender:"",country:"",kycLevel:"",kycStatus:"",hasVehicle:""}),[S,C]=O.useState({}),[k,T]=O.useState(!1),[E,_]=O.useState(null);O.useEffect(()=>{console.log("Fetching all customers"),t(Ih())},[t]),O.useEffect(()=>{if(n||s||o){console.log("Resetting state due to:",{error:n,editSuccess:s,deleteSuccess:o});const F=setTimeout(()=>{t(Q8()),w(null),C({})},5e3);return()=>clearTimeout(F)}},[n,s,o,t]);const L=F=>{console.log("Sort changed to:",F.target.value),h(F.target.value)},P=F=>{console.log("Viewing customer:",F._id),m(F)},R=F=>{console.log("Editing customer:",F._id),y(F),A({username:F.username||"",firstName:F.firstName||"",lastName:F.lastName||"",email:F.email||"",phoneNumber:F.phoneNumber||"",gender:F.gender||"",country:F.country||"",kycLevel:F.kycLevel!==void 0?String(F.kycLevel):"",kycStatus:F.kycStatus||"",hasVehicle:F.hasVehicle||""}),C({})},z=()=>{console.log("Closing customer popup"),m(null),y(null),C({})},B=F=>{const{name:G,value:te}=F.target;A(K=>({...K,[G]:te})),C(K=>({...K,[G]:""}))},Y=async F=>{F.preventDefault(),console.log("Submitting edit for userId:",x._id,"Data:",N);try{await t(Pg({userId:x._id,userData:N})).unwrap(),console.log("Edit customer successful:",x._id),y(null),A({username:"",firstName:"",lastName:"",email:"",phoneNumber:"",gender:"",country:"",kycLevel:"",kycStatus:"",hasVehicle:""})}catch(G){console.error("Edit customer failed:",G);try{const te=typeof G=="string"?JSON.parse(G):G;C(typeof te=="object"&&te!==null?te:{general:te||"Failed to edit customer"})}catch{C({general:G||"Failed to edit customer"})}}},X=F=>{_(F),T(!0)},H=async()=>{if(E){console.log("Initiating delete for userId:",E),w(E);try{await t(Bh(E)).unwrap(),console.log("Delete customer successful:",E)}catch(F){console.error("Delete customer failed:",F),w(null)}}T(!1),_(null)},W=()=>{T(!1),_(null)},V=e.filter(F=>u==="All"?!0:u==="Pending"||u==="Approved"?F.kycStatus===u.toLowerCase()||!F.kycStatus&&u==="Pending":!1);console.log("Rendering with customers:",V.map(F=>F._id),"updateKey:",c);const Z="https://aaaogo.xyz/";return i.jsxs("div",{className:"flex min-h-screen bg-[#013220] text-[#DDC104] font-sans",children:[i.jsx(Ue,{}),i.jsx("div",{className:"flex-1 p-8",children:i.jsxs("div",{className:"max-w-7xl mx-auto",children:[i.jsx("h1",{className:"text-4xl font-bold mb-8 text-center tracking-wide",children:"Customer Management Dashboard"}),r&&!b&&!x&&!p&&i.jsx("div",{className:"text-center py-8",children:i.jsx("div",{className:"animate-spin inline-block w-8 h-8 border-4 border-[#DDC104] border-t-transparent rounded-full",role:"status",children:i.jsx("span",{className:"sr-only",children:"Loading..."})})}),n&&i.jsxs("div",{className:"bg-red-600 text-white p-4 rounded-lg mb-6 shadow-lg outline outline-black/20 shadow-black/80 flex items-center",children:[i.jsx("svg",{className:"w-6 h-6 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),i.jsx("span",{children:typeof n=="string"&&n==="canceled"?"Request timed out. Please try again.":typeof n=="string"?n:n.general||"An error occurred"})]}),a&&i.jsxs("div",{className:"bg-[#038A59] text-white p-4 rounded-lg mb-6 shadow-lg outline outline-black/20 shadow-black/80 flex items-center",children:[i.jsx("svg",{className:"w-6 h-6 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M5 13l4 4L19 7"})}),i.jsxs("span",{children:["Customers fetched successfully! Total: ",l]})]}),s&&i.jsxs("div",{className:"bg-[#038A59] text-white p-4 rounded-lg mb-6 shadow-lg outline outline-black/20 shadow-black/80 flex items-center",children:[i.jsx("svg",{className:"w-6 h-6 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M5 13l4 4L19 7"})}),i.jsx("span",{children:"Customer updated successfully!"})]}),o&&i.jsxs("div",{className:"bg-[#038A59] text-white p-4 rounded-lg mb-6 shadow-lg outline outline-black/20 shadow-black/80 flex items-center",children:[i.jsx("svg",{className:"w-6 h-6 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M5 13l4 4L19 7"})}),i.jsx("span",{children:"Customer deleted successfully!"})]}),!r&&!n&&e.length>0&&i.jsxs("div",{className:"bg-gradient-to-b from-[#038A59] to-[#013723] rounded-lg shadow-lg outline outline-black/20 shadow-black/80 p-6 transform hover:scale-105 transition duration-300",children:[i.jsxs("div",{className:"flex justify-between items-center mb-6",children:[i.jsx("h2",{className:"text-2xl font-semibold tracking-wide",children:"Customer List"}),i.jsxs("div",{className:"flex items-center",children:[i.jsx("label",{htmlFor:"sortBy",className:"text-sm mr-2 tracking-wide",children:"Sort by:"}),i.jsxs("div",{className:"relative",children:[i.jsxs("select",{id:"sortBy",value:u,onChange:L,className:"bg-transparent text-sm text-[#DDC104] focus:outline-none appearance-none pr-8",children:[i.jsx("option",{className:"bg-yellow-300 text-black",value:"All",children:"All"}),i.jsx("option",{className:"bg-yellow-300 text-black",value:"Pending",children:"Pending KYC"}),i.jsx("option",{className:"bg-yellow-300 text-black",value:"Approved",children:"Approved KYC"})]}),i.jsx(H4,{className:"absolute right-2 top-1/2 transform -translate-y-1/2 text-[#DDC104]"})]})]})]}),i.jsx("div",{className:"overflow-x-auto",children:i.jsxs("table",{className:"w-full text-sm text-left bg-[#013723] rounded-lg shadow",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-[#038A59] bg-[#038A59]",children:[i.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"ID"}),i.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"Username"}),i.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"Email"}),i.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"KYC Status"}),i.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"KYC Level"}),i.jsx("th",{className:"px-4 py-3 font-medium tracking-wide text-center",children:"Action"})]})}),i.jsx("tbody",{children:V.map(F=>i.jsxs("tr",{className:"border-b border-[#013723] hover:bg-[#038A59]/50",children:[i.jsx("td",{className:"px-4 py-3",children:F._id.slice(-6)}),i.jsx("td",{className:"px-4 py-3",children:F.username}),i.jsx("td",{className:"px-4 py-3",children:F.email}),i.jsx("td",{className:"px-4 py-3",children:F.kycStatus||"Pending"}),i.jsx("td",{className:"px-4 py-3",children:F.kycLevel||"N/A"}),i.jsx("td",{className:"px-4 py-3",children:i.jsxs("div",{className:"flex items-center gap-3 justify-center",children:[i.jsx("button",{onClick:()=>R(F),className:"border border-[#DDC104] p-2 rounded-full text-[#DDC104] hover:bg-[#DDC104] hover:text-[#013723] transition duration-200",disabled:b===F._id,children:i.jsx(w_,{size:16})}),i.jsx("button",{onClick:()=>P(F),className:"bg-[#DDC104] text-[#013723] px-4 py-1.5 rounded-full text-xs font-medium hover:bg-[#e8d34a] transition duration-200",children:"View"}),i.jsx("button",{onClick:()=>X(F._id),className:"border border-[#DDC104] p-2 rounded-full text-[#DDC104] hover:bg-[#DDC104] hover:text-[#013723] transition duration-200",disabled:b===F._id,children:b===F._id?i.jsx("div",{className:"animate-spin inline-block w-4 h-4 border-2 border-[#DDC104] border-t-transparent rounded-full"}):i.jsx(A_,{size:16})})]})})]},F._id))})]})})]}),!r&&!n&&e.length===0&&i.jsxs("div",{className:"bg-[#038A59] text-white p-4 rounded-lg mb-6 shadow-lg outline outline-black/20 shadow-black/80 flex items-center",children:[i.jsx("svg",{className:"w-6 h-6 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),i.jsx("span",{children:"No customers found"})]}),p&&i.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",role:"dialog","aria-modal":"true",tabIndex:"-1",children:i.jsxs("div",{className:"bg-gradient-to-b from-[#038A59] to-[#013723] rounded-lg shadow-lg outline outline-black/20 shadow-black/80 p-6 w-full max-w-4xl text-[#DDC104] font-sans transform transition-all duration-300 overflow-y-auto max-h-[90vh]",children:[i.jsx("h2",{className:"text-2xl font-semibold tracking-wide mb-4",children:"Customer Details"}),i.jsxs("div",{className:"mb-6",children:[i.jsx("h3",{className:"text-xl font-medium tracking-wide mb-2",children:"Customer Information"}),i.jsx("table",{className:"w-full text-sm text-left bg-[#013723] rounded-lg shadow no-scrollbar",children:i.jsxs("tbody",{children:[i.jsxs("tr",{className:"border-b border-[#038A59]",children:[i.jsx("td",{className:"px-4 py-2 font-medium",children:"ID"}),i.jsx("td",{className:"px-4 py-2",children:p._id?.slice(-6)||"N/A"})]}),i.jsxs("tr",{className:"border-b border-[#038A59]",children:[i.jsx("td",{className:"px-4 py-2 font-medium",children:"Username"}),i.jsx("td",{className:"px-4 py-2",children:p.username||"N/A"})]}),i.jsxs("tr",{className:"border-b border-[#038A59]",children:[i.jsx("td",{className:"px-4 py-2 font-medium",children:"Full Name"}),i.jsxs("td",{className:"px-4 py-2",children:[p.firstName||""," ",p.lastName||""]})]}),i.jsxs("tr",{className:"border-b border-[#038A59]",children:[i.jsx("td",{className:"px-4 py-2 font-medium",children:"Email"}),i.jsx("td",{className:"px-4 py-2",children:p.email||"N/A"})]}),i.jsxs("tr",{className:"border-b border-[#038A59]",children:[i.jsx("td",{className:"px-4 py-2 font-medium",children:"Phone Number"}),i.jsx("td",{className:"px-4 py-2",children:p.phoneNumber||"N/A"})]}),i.jsxs("tr",{className:"border-b border-[#038A59]",children:[i.jsx("td",{className:"px-4 py-2 font-medium",children:"Gender"}),i.jsx("td",{className:"px-4 py-2",children:p.gender||"N/A"})]}),i.jsxs("tr",{className:"border-b border-[#038A59]",children:[i.jsx("td",{className:"px-4 py-2 font-medium",children:"Country"}),i.jsx("td",{className:"px-4 py-2",children:p.country||"N/A"})]}),i.jsxs("tr",{className:"border-b border-[#038A59]",children:[i.jsx("td",{className:"px-4 py-2 font-medium",children:"KYC Status"}),i.jsx("td",{className:"px-4 py-2",children:p.kycStatus||"Pending"})]}),i.jsxs("tr",{className:"border-b border-[#038A59]",children:[i.jsx("td",{className:"px-4 py-2 font-medium",children:"KYC Level"}),i.jsx("td",{className:"px-4 py-2",children:p.kycLevel!==void 0?p.kycLevel:"N/A"})]}),i.jsxs("tr",{className:"border-b border-[#038A59]",children:[i.jsx("td",{className:"px-4 py-2 font-medium",children:"Has Vehicle"}),i.jsx("td",{className:"px-4 py-2",children:p.hasVehicle?"Yes":"No"})]}),i.jsxs("tr",{className:"border-b border-[#038A59]",children:[i.jsx("td",{className:"px-4 py-2 font-medium",children:"Created At"}),i.jsx("td",{className:"px-4 py-2",children:p.createdAt?new Date(p.createdAt).toLocaleString():"N/A"})]})]})})]}),(p.cnicImages?.front||p.cnicImages?.back||p.selfieImage)&&i.jsxs("div",{className:"mb-6",children:[i.jsx("h3",{className:"text-xl font-medium tracking-wide mb-2",children:"KYC Images"}),i.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[p.cnicImages?.front&&i.jsxs("div",{children:[i.jsx("p",{className:"font-medium",children:"CNIC Front"}),i.jsx("img",{src:`${Z}${p.cnicImages.front}`,alt:"CNIC Front",className:"w-full h-48 object-contain rounded-lg",onError:F=>{F.target.src="https://via.placeholder.com/150?text=Image+Not+Found"}})]}),p.cnicImages?.back&&i.jsxs("div",{children:[i.jsx("p",{className:"font-medium",children:"CNIC Back"}),i.jsx("img",{src:`${Z}${p.cnicImages.back}`,alt:"CNIC Back",className:"w-full h-48 object-contain rounded-lg",onError:F=>{F.target.src="https://via.placeholder.com/150?text=Image+Not+Found"}})]}),p.selfieImage&&i.jsxs("div",{children:[i.jsx("p",{className:"font-medium",children:"Selfie"}),i.jsx("img",{src:`${Z}${p.selfieImage}`,alt:"Selfie",className:"w-full h-48 object-contain rounded-lg",onError:F=>{F.target.src="https://via.placeholder.com/150?text=Image+Not+Found"}})]})]})]}),i.jsx("div",{className:"mt-6 flex justify-end",children:i.jsx("button",{onClick:z,className:"bg-[#DDC104] text-[#013723] px-4 py-2 rounded-full text-sm font-medium hover:bg-[#e8d34a] transition duration-200",autoFocus:!0,children:"Close"})})]})}),x&&i.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",role:"dialog","aria-modal":"true",tabIndex:"-1",children:i.jsxs("div",{className:"bg-gradient-to-b from-[#038A59] to-[#013723] rounded-lg shadow-lg outline outline-black/20 shadow-black/80 p-4 w-full max-w-sm sm:max-w-md text-[#DDC104] font-sans transform transition-all duration-300 overflow-y-auto max-h-[80vh]",children:[i.jsx("h2",{className:"text-xl font-semibold tracking-wide mb-3",children:"Edit Customer"}),i.jsxs("form",{onSubmit:Y,className:"space-y-3",children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium",children:"Username"}),i.jsx("input",{type:"text",name:"username",value:N.username,onChange:B,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm"}),S.username&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:S.username})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium",children:"First Name"}),i.jsx("input",{type:"text",name:"firstName",value:N.firstName,onChange:B,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm"}),S.firstName&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:S.firstName})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium",children:"Last Name"}),i.jsx("input",{type:"text",name:"lastName",value:N.lastName,onChange:B,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm"}),S.lastName&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:S.lastName})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium",children:"Email"}),i.jsx("input",{type:"email",name:"email",value:N.email,onChange:B,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm"}),S.email&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:S.email})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium",children:"Phone Number"}),i.jsx("input",{type:"text",name:"phoneNumber",value:N.phoneNumber,onChange:B,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm"}),S.phoneNumber&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:S.phoneNumber})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium",children:"Gender"}),i.jsxs("select",{name:"gender",value:N.gender,onChange:B,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm",children:[i.jsx("option",{value:"",children:"Select Gender"}),i.jsx("option",{value:"Male",children:"Male"}),i.jsx("option",{value:"Female",children:"Female"}),i.jsx("option",{value:"Other",children:"Other"})]}),S.gender&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:S.gender})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium",children:"Country"}),i.jsx("input",{type:"text",name:"country",value:N.country,onChange:B,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm"}),S.country&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:S.country})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium",children:"KYC Level"}),i.jsxs("select",{name:"kycLevel",value:N.kycLevel,onChange:B,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm",children:[i.jsx("option",{value:"",children:"Select KYC Level"}),i.jsx("option",{value:"0",children:"0"}),i.jsx("option",{value:"1",children:"1"}),i.jsx("option",{value:"2",children:"2"})]}),S.kycLevel&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:S.kycLevel})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium",children:"KYC Status"}),i.jsxs("select",{name:"kycStatus",value:N.kycStatus,onChange:B,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm",children:[i.jsx("option",{value:"",children:"Select KYC Status"}),i.jsx("option",{value:"pending",children:"Pending"}),i.jsx("option",{value:"approved",children:"Approved"}),i.jsx("option",{value:"rejected",children:"Rejected"})]}),S.kycStatus&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:S.kycStatus})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium",children:"Has Vehicle"}),i.jsxs("select",{name:"hasVehicle",value:N.hasVehicle,onChange:B,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm",children:[i.jsx("option",{value:"",children:"Select Vehicle Status"}),i.jsx("option",{value:"yes",children:"Yes"}),i.jsx("option",{value:"no",children:"No"})]}),S.hasVehicle&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:S.hasVehicle})]}),i.jsxs("div",{className:"flex justify-end gap-2 mt-4",children:[i.jsx("button",{type:"button",onClick:z,className:"bg-gray-500 text-white px-3 py-1.5 rounded-full text-xs font-medium hover:bg-gray-600 transition duration-200",children:"Cancel"}),i.jsx("button",{type:"submit",className:"bg-[#DDC104] text-[#013723] px-3 py-1.5 rounded-full text-xs font-medium hover:bg-[#e8d34a] transition duration-200",disabled:r,children:r?i.jsx("div",{className:"animate-spin inline-block w-4 h-4 border-2 border-[#013723] border-t-transparent rounded-full"}):"Save"})]})]})]})})]})}),i.jsx(md,{isOpen:k,title:"Delete Customer",message:"Are you sure you want to delete this customer? This action cannot be undone.",onConfirm:H,onClose:W}),i.jsx("style",{jsx:!0,children:`
.no-scrollbar {
scrollbar-width: none; /* Firefox */
-ms-overflow-style: none; /* IE and Edge */
}
.no-scrollbar::-webkit-scrollbar {
display: none; /* Chrome, Safari, Edge */
}
`})]})},Zl=()=>{const t=Cr();Ao();const e=r=>`menu-tab ${t.pathname===r?"active":""}`;return i.jsxs("div",{className:"px-10",children:[i.jsx("div",{className:"flex items-center gap-2 pb-6",children:i.jsxs(Pe,{to:t.pathname==="/customerprofile"?"/customermanagement":"/customerprofile",className:"flex items-center gap-2 cursor-pointer",children:[i.jsx(Hf,{size:30,className:"text-lg"}),i.jsx("span",{className:"text-lg font-semibold",children:"Back"})]})}),i.jsxs("div",{className:"flex justify-between items-center border-b border-yellow-400",children:[i.jsx(Pe,{to:"/customerprofile",className:e("/customerprofile"),children:"Profile"}),i.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),i.jsx(Pe,{to:"/customerhistory",className:e("/customerhistory"),children:"History"}),i.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),i.jsx(Pe,{to:"/customerearningpayout",className:e("/customerearningpayout"),children:"Earning & Payouts"}),i.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),i.jsx(Pe,{to:"/customermlm",className:e("/customermlm"),children:"MLM"}),i.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),i.jsx(Pe,{to:"/customerrating",className:e("/customerrating"),children:"Ratings"}),i.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),i.jsx(Pe,{to:"/customercomplain",className:e("/customercomplain"),children:"Complain"}),i.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),i.jsx(Pe,{to:"/customerreferraltree",className:e("/customerreferraltree"),children:"Referral Tree"})]})]})};var s1={};/*!
* ApexCharts v5.3.1
* (c) 2018-2025 ApexCharts
*/function Z2(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function k_(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Se(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function x6(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 Ae(t,e,r){return e&&x6(t.prototype,e),r&&x6(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Nh(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=W4(t))||e){r&&(t=r);var n=0,a=function(){};return{s:a,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(c){throw c},f:a}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s,o=!0,l=!1;return{s:function(){r=r.call(t)},n:function(){var c=r.next();return o=c.done,c},e:function(c){l=!0,s=c},f:function(){try{o||r.return==null||r.return()}finally{if(l)throw s}}}}function Yf(t){var e=D_();return function(){var r,n=px(t);if(e){var a=px(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return function(s,o){if(o&&(typeof o=="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return k_(s)}(this,r)}}function fx(t,e,r){return(e=M_(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function px(t){return px=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},px(t)}function Uf(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&&Q2(t,e)}function D_(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(D_=function(){return!!t})()}function b6(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function ve(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?b6(Object(r),!0).forEach(function(n){fx(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):b6(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Q2(t,e){return Q2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Q2(t,e)}function T_(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var a=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(a!=null){var s,o,l,c,u=[],h=!0,p=!1;try{if(l=(a=a.call(r)).next,n===0){if(Object(a)!==a)return;h=!1}else for(;!(h=(s=l.call(a)).done)&&(u.push(s.value),u.length!==n);h=!0);}catch(m){p=!0,o=m}finally{try{if(!h&&a.return!=null&&(c=a.return(),Object(c)!==c))return}finally{if(p)throw o}}return u}}(t,e)||W4(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Nr(t){return function(e){if(Array.isArray(e))return Z2(e)}(t)||function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(t)||W4(t)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function M_(t){var e=function(r,n){if(typeof r!="object"||!r)return r;var a=r[Symbol.toPrimitive];if(a!==void 0){var s=a.call(r,n);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(r)}(t,"string");return typeof e=="symbol"?e:e+""}function fn(t){return fn=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},fn(t)}function W4(t,e){if(t){if(typeof t=="string")return Z2(t,e);var r={}.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Z2(t,e):void 0}}var J=function(){function t(){Se(this,t)}return Ae(t,[{key:"shadeRGBColor",value:function(e,r){var n=r.split(","),a=e<0?0:255,s=e<0?-1*e:e,o=parseInt(n[0].slice(4),10),l=parseInt(n[1],10),c=parseInt(n[2],10);return"rgb("+(Math.round((a-o)*s)+o)+","+(Math.round((a-l)*s)+l)+","+(Math.round((a-c)*s)+c)+")"}},{key:"shadeHexColor",value:function(e,r){var n=parseInt(r.slice(1),16),a=e<0?0:255,s=e<0?-1*e:e,o=n>>16,l=n>>8&255,c=255&n;return"#"+(16777216+65536*(Math.round((a-o)*s)+o)+256*(Math.round((a-l)*s)+l)+(Math.round((a-c)*s)+c)).toString(16).slice(1)}},{key:"shadeColor",value:function(e,r){return t.isColorHex(r)?this.shadeHexColor(e,r):this.shadeRGBColor(e,r)}}],[{key:"bind",value:function(e,r){return function(){return e.apply(r,arguments)}}},{key:"isObject",value:function(e){return e&&fn(e)==="object"&&!Array.isArray(e)&&e!=null}},{key:"is",value:function(e,r){return Object.prototype.toString.call(r)==="[object "+e+"]"}},{key:"isSafari",value:function(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}},{key:"listToArray",value:function(e){var r,n=[];for(r=0;r<e.length;r++)n[r]=e[r];return n}},{key:"extend",value:function(e,r){var n=this;typeof Object.assign!="function"&&(Object.assign=function(s){if(s==null)throw new TypeError("Cannot convert undefined or null to object");for(var o=Object(s),l=1;l<arguments.length;l++){var c=arguments[l];if(c!=null)for(var u in c)c.hasOwnProperty(u)&&(o[u]=c[u])}return o});var a=Object.assign({},e);return this.isObject(e)&&this.isObject(r)&&Object.keys(r).forEach(function(s){n.isObject(r[s])&&s in e?a[s]=n.extend(e[s],r[s]):Object.assign(a,fx({},s,r[s]))}),a}},{key:"extendArray",value:function(e,r){var n=[];return e.map(function(a){n.push(t.extend(r,a))}),e=n}},{key:"monthMod",value:function(e){return e%12}},{key:"clone",value:function(e){var r,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new WeakMap;if(e===null||fn(e)!=="object")return e;if(n.has(e))return n.get(e);if(Array.isArray(e)){r=[],n.set(e,r);for(var a=0;a<e.length;a++)r[a]=this.clone(e[a],n)}else if(e instanceof Date)r=new Date(e.getTime());else for(var s in r={},n.set(e,r),e)e.hasOwnProperty(s)&&(r[s]=this.clone(e[s],n));return r}},{key:"log10",value:function(e){return Math.log(e)/Math.LN10}},{key:"roundToBase10",value:function(e){return Math.pow(10,Math.floor(Math.log10(e)))}},{key:"roundToBase",value:function(e,r){return Math.pow(r,Math.floor(Math.log(e)/Math.log(r)))}},{key:"parseNumber",value:function(e){return typeof e=="number"||e===null?e:parseFloat(e)}},{key:"stripNumber",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return Number.isInteger(e)?e:parseFloat(e.toPrecision(r))}},{key:"randomId",value:function(){return(Math.random()+1).toString(36).substring(4)}},{key:"noExponents",value:function(e){return e.toString().includes("e")?Math.round(e):e}},{key:"elementExists",value:function(e){return!(!e||!e.isConnected)}},{key:"getDimensions",value:function(e){var r=getComputedStyle(e,null),n=e.clientHeight,a=e.clientWidth;return n-=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom),[a-=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),n]}},{key:"getBoundingClientRect",value:function(e){var r=e.getBoundingClientRect();return{top:r.top,right:r.right,bottom:r.bottom,left:r.left,width:e.clientWidth,height:e.clientHeight,x:r.left,y:r.top}}},{key:"getLargestStringFromArr",value:function(e){return e.reduce(function(r,n){return Array.isArray(n)&&(n=n.reduce(function(a,s){return a.length>s.length?a:s})),r.length>n.length?r:n},0)}},{key:"hexToRgba",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"#999999",r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:.6;e.substring(0,1)!=="#"&&(e="#999999");var n=e.replace("#","");n=n.match(new RegExp("(.{"+n.length/3+"})","g"));for(var a=0;a<n.length;a++)n[a]=parseInt(n[a].length===1?n[a]+n[a]:n[a],16);return r!==void 0&&n.push(r),"rgba("+n.join(",")+")"}},{key:"getOpacityFromRGBA",value:function(e){return parseFloat(e.replace(/^.*,(.+)\)/,"$1"))}},{key:"rgb2hex",value:function(e){return(e=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&e.length===4?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):""}},{key:"isColorHex",value:function(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)|(^#[0-9A-F]{8}$)/i.test(e)}},{key:"getPolygonPos",value:function(e,r){for(var n=[],a=2*Math.PI/r,s=0;s<r;s++){var o={};o.x=e*Math.sin(s*a),o.y=-e*Math.cos(s*a),n.push(o)}return n}},{key:"polarToCartesian",value:function(e,r,n,a){var s=(a-90)*Math.PI/180;return{x:e+n*Math.cos(s),y:r+n*Math.sin(s)}}},{key:"escapeString",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"x",n=e.toString().slice();return n=n.replace(/[` ~!@#$%^&*()|+\=?;:'",.<>{}[\]\\/]/gi,r)}},{key:"negToZero",value:function(e){return e<0?0:e}},{key:"moveIndexInArray",value:function(e,r,n){if(n>=e.length)for(var a=n-e.length+1;a--;)e.push(void 0);return e.splice(n,0,e.splice(r,1)[0]),e}},{key:"extractNumber",value:function(e){return parseFloat(e.replace(/[^\d.]*/g,""))}},{key:"findAncestor",value:function(e,r){for(;(e=e.parentElement)&&!e.classList.contains(r););return e}},{key:"setELstyles",value:function(e,r){for(var n in r)r.hasOwnProperty(n)&&(e.style.key=r[n])}},{key:"preciseAddition",value:function(e,r){var n=(String(e).split(".")[1]||"").length,a=(String(r).split(".")[1]||"").length,s=Math.pow(10,Math.max(n,a));return(Math.round(e*s)+Math.round(r*s))/s}},{key:"isNumber",value:function(e){return!isNaN(e)&&parseFloat(Number(e))===e&&!isNaN(parseInt(e,10))}},{key:"isFloat",value:function(e){return Number(e)===e&&e%1!=0}},{key:"isMsEdge",value:function(){var e=window.navigator.userAgent,r=e.indexOf("Edge/");return r>0&&parseInt(e.substring(r+5,e.indexOf(".",r)),10)}},{key:"getGCD",value:function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:7,a=Math.pow(10,n-Math.floor(Math.log10(Math.max(e,r))));for(e=Math.round(Math.abs(e)*a),r=Math.round(Math.abs(r)*a);r;){var s=r;r=e%r,e=s}return e/a}},{key:"getPrimeFactors",value:function(e){for(var r=[],n=2;e>=2;)e%n==0?(r.push(n),e/=n):n++;return r}},{key:"mod",value:function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:7,a=Math.pow(10,n-Math.floor(Math.log10(Math.max(e,r))));return(e=Math.round(Math.abs(e)*a))%(r=Math.round(Math.abs(r)*a))/a}}]),t}(),Ld=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w}return Ae(t,[{key:"animateLine",value:function(e,r,n,a){e.attr(r).animate(a).attr(n)}},{key:"animateMarker",value:function(e,r,n,a){e.attr({opacity:0}).animate(r).attr({opacity:1}).after(function(){a()})}},{key:"animateRect",value:function(e,r,n,a,s){e.attr(r).animate(a).attr(n).after(function(){return s()})}},{key:"animatePathsGradually",value:function(e){var r=e.el,n=e.realIndex,a=e.j,s=e.fill,o=e.pathFrom,l=e.pathTo,c=e.speed,u=e.delay,h=this.w,p=0;h.config.chart.animations.animateGradually.enabled&&(p=h.config.chart.animations.animateGradually.delay),h.config.chart.animations.dynamicAnimation.enabled&&h.globals.dataChanged&&h.config.chart.type!=="bar"&&(p=0),this.morphSVG(r,n,a,h.config.chart.type!=="line"||h.globals.comboCharts?s:"stroke",o,l,c,u*p)}},{key:"showDelayedElements",value:function(){this.w.globals.delayedElements.forEach(function(e){var r=e.el;r.classList.remove("apexcharts-element-hidden"),r.classList.add("apexcharts-hidden-element-shown")})}},{key:"animationCompleted",value:function(e){var r=this.w;r.globals.animationEnded||(r.globals.animationEnded=!0,this.showDelayedElements(),typeof r.config.chart.events.animationEnd=="function"&&r.config.chart.events.animationEnd(this.ctx,{el:e,w:r}))}},{key:"morphSVG",value:function(e,r,n,a,s,o,l,c){var u=this,h=this.w;s||(s=e.attr("pathFrom")),o||(o=e.attr("pathTo"));var p=function(m){return h.config.chart.type==="radar"&&(l=1),"M 0 ".concat(h.globals.gridHeight)};(!s||s.indexOf("undefined")>-1||s.indexOf("NaN")>-1)&&(s=p()),(!o.trim()||o.indexOf("undefined")>-1||o.indexOf("NaN")>-1)&&(o=p()),h.globals.shouldAnimate||(l=1),e.plot(s).animate(1,c).plot(s).animate(l,c).plot(o).after(function(){J.isNumber(n)?n===h.globals.series[h.globals.maxValsInArrayIndex].length-2&&h.globals.shouldAnimate&&u.animationCompleted(e):a!=="none"&&h.globals.shouldAnimate&&(!h.globals.comboCharts&&r===h.globals.series.length-1||h.globals.comboCharts)&&u.animationCompleted(e),u.showDelayedElements()})}}]),t}();const J2={},E_=[];function Qe(t,e){if(Array.isArray(t))for(const r of t)Qe(r,e);else if(typeof t!="object")O_(Object.getOwnPropertyNames(e)),J2[t]=Object.assign(J2[t]||{},e);else for(const r in t)Qe(r,t[r])}function Cn(t){return J2[t]||{}}function O_(t){E_.push(...t)}function X4(t,e){let r;const n=t.length,a=[];for(r=0;r<n;r++)a.push(e(t[r]));return a}function i1(t){return t%360*Math.PI/180}function zd(t){return t.charAt(0).toUpperCase()+t.slice(1)}function Id(t,e,r,n){return e!=null&&r!=null||(n=n||t.bbox(),e==null?e=n.width/n.height*r:r==null&&(r=n.height/n.width*e)),{width:e,height:r}}function ej(t,e){const r=t.origin;let n=t.ox!=null?t.ox:t.originX!=null?t.originX:"center",a=t.oy!=null?t.oy:t.originY!=null?t.originY:"center";r!=null&&([n,a]=Array.isArray(r)?r:typeof r=="object"?[r.x,r.y]:[r,r]);const s=typeof n=="string",o=typeof a=="string";if(s||o){const{height:l,width:c,x:u,y:h}=e.bbox();s&&(n=n.includes("left")?u:n.includes("right")?u+c:u+c/2),o&&(a=a.includes("top")?h:a.includes("bottom")?h+l:h+l/2)}return[n,a]}const pG=new Set(["desc","metadata","title"]),tj=t=>pG.has(t.nodeName),P_=(t,e,r={})=>{const n={...e};for(const a in n)n[a].valueOf()===r[a]&&delete n[a];Object.keys(n).length?t.node.setAttribute("data-svgjs",JSON.stringify(n)):(t.node.removeAttribute("data-svgjs"),t.node.removeAttribute("svgjs:data"))},V4="http://www.w3.org/2000/svg",o1="http://www.w3.org/2000/xmlns/",Bd="http://www.w3.org/1999/xlink",it={window:typeof window>"u"?null:window,document:typeof document>"u"?null:document};function Wf(){return it.window}let q4=class{};const El={},G4="___SYMBOL___ROOT___";function lf(t,e=V4){return it.document.createElementNS(e,t)}function pn(t,e=!1){if(t instanceof q4)return t;if(typeof t=="object")return l1(t);if(t==null)return new El[G4];if(typeof t=="string"&&t.charAt(0)!=="<")return l1(it.document.querySelector(t));const r=e?it.document.createElement("div"):lf("svg");return r.innerHTML=t,t=l1(r.firstChild),r.removeChild(r.firstChild),t}function Et(t,e){return e&&(e instanceof it.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:lf(t)}function Ta(t){if(!t)return null;if(t.instance instanceof q4)return t.instance;if(t.nodeName==="#document-fragment")return new El.Fragment(t);let e=zd(t.nodeName||"Dom");return e==="LinearGradient"||e==="RadialGradient"?e="Gradient":El[e]||(e="Dom"),new El[e](t)}let l1=Ta;function lt(t,e=t.name,r=!1){return El[e]=t,r&&(El[G4]=t),O_(Object.getOwnPropertyNames(t.prototype)),t}let mG=1e3;function __(t){return"Svgjs"+zd(t)+mG++}function R_(t){for(let e=t.children.length-1;e>=0;e--)R_(t.children[e]);return t.id&&(t.id=__(t.nodeName)),t}function Ie(t,e){let r,n;for(n=(t=Array.isArray(t)?t:[t]).length-1;n>=0;n--)for(r in e)t[n].prototype[r]=e[r]}function Mt(t){return function(...e){const r=e[e.length-1];return!r||r.constructor!==Object||r instanceof Array?t.apply(this,e):t.apply(this,e.slice(0,-1)).attr(r)}}Qe("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){const t=this.position();return this.parent().add(this.remove(),t+1),this},backward:function(){const t=this.position();return this.parent().add(this.remove(),t?t-1:0),this},front:function(){return this.parent().add(this.remove()),this},back:function(){return this.parent().add(this.remove(),0),this},before:function(t){(t=pn(t)).remove();const e=this.position();return this.parent().add(t,e),this},after:function(t){(t=pn(t)).remove();const e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){return(t=pn(t)).before(this),this},insertAfter:function(t){return(t=pn(t)).after(this),this}});const L_=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,gG=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,xG=/rgb\((\d+),(\d+),(\d+)\)/,bG=/(#[a-z_][a-z0-9\-_]*)/i,yG=/\)\s*,?\s*/,vG=/\s/g,y6=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,v6=/^rgb\(/,w6=/^(\s+)?$/,j6=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,wG=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,Si=/[\s,]+/,K4=/[MLHVCSQTAZ]/i;function jG(t){const e=Math.round(t),r=Math.max(0,Math.min(255,e)).toString(16);return r.length===1?"0"+r:r}function Yc(t,e){for(let r=e.length;r--;)if(t[e[r]]==null)return!1;return!0}function c1(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}Qe("Dom",{classes:function(){const t=this.attr("class");return t==null?[]:t.trim().split(Si)},hasClass:function(t){return this.classes().indexOf(t)!==-1},addClass:function(t){if(!this.hasClass(t)){const e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter(function(e){return e!==t}).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),Qe("Dom",{css:function(t,e){const r={};if(arguments.length===0)return this.node.style.cssText.split(/\s*;\s*/).filter(function(n){return!!n.length}).forEach(function(n){const a=n.split(/\s*:\s*/);r[a[0]]=a[1]}),r;if(arguments.length<2){if(Array.isArray(t)){for(const n of t){const a=n;r[n]=this.node.style.getPropertyValue(a)}return r}if(typeof t=="string")return this.node.style.getPropertyValue(t);if(typeof t=="object")for(const n in t)this.node.style.setProperty(n,t[n]==null||w6.test(t[n])?"":t[n])}return arguments.length===2&&this.node.style.setProperty(t,e==null||w6.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return this.css("display")!=="none"}}),Qe("Dom",{data:function(t,e,r){if(t==null)return this.data(X4(function(n,a){let s;const o=n.length,l=[];for(s=0;s<o;s++)a(n[s])&&l.push(n[s]);return l}(this.node.attributes,n=>n.nodeName.indexOf("data-")===0),n=>n.nodeName.slice(5)));if(t instanceof Array){const n={};for(const a of t)n[a]=this.data(a);return n}if(typeof t=="object")for(e in t)this.data(e,t[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch{return this.attr("data-"+t)}else this.attr("data-"+t,e===null?null:r===!0||typeof e=="string"||typeof e=="number"?e:JSON.stringify(e));return this}}),Qe("Dom",{remember:function(t,e){if(typeof arguments[0]=="object")for(const r in t)this.remember(r,t[r]);else{if(arguments.length===1)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(arguments.length===0)this._memory={};else for(let t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});class Nt{constructor(...e){this.init(...e)}static isColor(e){return e&&(e instanceof Nt||this.isRgb(e)||this.test(e))}static isRgb(e){return e&&typeof e.r=="number"&&typeof e.g=="number"&&typeof e.b=="number"}static random(e="vibrant",r){const{random:n,round:a,sin:s,PI:o}=Math;if(e==="vibrant"){const l=24*n()+57,c=38*n()+45,u=360*n();return new Nt(l,c,u,"lch")}if(e==="sine"){const l=a(80*s(2*o*(r=r??n())/.5+.01)+150),c=a(50*s(2*o*r/.5+4.6)+200),u=a(100*s(2*o*r/.5+2.3)+150);return new Nt(l,c,u)}if(e==="pastel"){const l=8*n()+86,c=17*n()+9,u=360*n();return new Nt(l,c,u,"lch")}if(e==="dark"){const l=10+10*n(),c=50*n()+86,u=360*n();return new Nt(l,c,u,"lch")}if(e==="rgb"){const l=255*n(),c=255*n(),u=255*n();return new Nt(l,c,u)}if(e==="lab"){const l=100*n(),c=256*n()-128,u=256*n()-128;return new Nt(l,c,u,"lab")}if(e==="grey"){const l=255*n();return new Nt(l,l,l)}throw new Error("Unsupported random color mode")}static test(e){return typeof e=="string"&&(y6.test(e)||v6.test(e))}cmyk(){const{_a:e,_b:r,_c:n}=this.rgb(),[a,s,o]=[e,r,n].map(c=>c/255),l=Math.min(1-a,1-s,1-o);return l===1?new Nt(0,0,0,1,"cmyk"):new Nt((1-a-l)/(1-l),(1-s-l)/(1-l),(1-o-l)/(1-l),l,"cmyk")}hsl(){const{_a:e,_b:r,_c:n}=this.rgb(),[a,s,o]=[e,r,n].map(m=>m/255),l=Math.max(a,s,o),c=Math.min(a,s,o),u=(l+c)/2,h=l===c,p=l-c;return new Nt(360*(h?0:l===a?((s-o)/p+(s<o?6:0))/6:l===s?((o-a)/p+2)/6:l===o?((a-s)/p+4)/6:0),100*(h?0:u>.5?p/(2-l-c):p/(l+c)),100*u,"hsl")}init(e=0,r=0,n=0,a=0,s="rgb"){if(e=e||0,this.space)for(const p in this.space)delete this[this.space[p]];if(typeof e=="number")s=typeof a=="string"?a:s,a=typeof a=="string"?0:a,Object.assign(this,{_a:e,_b:r,_c:n,_d:a,space:s});else if(e instanceof Array)this.space=r||(typeof e[3]=="string"?e[3]:e[4])||"rgb",Object.assign(this,{_a:e[0],_b:e[1],_c:e[2],_d:e[3]||0});else if(e instanceof Object){const p=function(m,x){const y=Yc(m,"rgb")?{_a:m.r,_b:m.g,_c:m.b,_d:0,space:"rgb"}:Yc(m,"xyz")?{_a:m.x,_b:m.y,_c:m.z,_d:0,space:"xyz"}:Yc(m,"hsl")?{_a:m.h,_b:m.s,_c:m.l,_d:0,space:"hsl"}:Yc(m,"lab")?{_a:m.l,_b:m.a,_c:m.b,_d:0,space:"lab"}:Yc(m,"lch")?{_a:m.l,_b:m.c,_c:m.h,_d:0,space:"lch"}:Yc(m,"cmyk")?{_a:m.c,_b:m.m,_c:m.y,_d:m.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return y.space=x||y.space,y}(e,r);Object.assign(this,p)}else if(typeof e=="string")if(v6.test(e)){const p=e.replace(vG,""),[m,x,y]=xG.exec(p).slice(1,4).map(b=>parseInt(b));Object.assign(this,{_a:m,_b:x,_c:y,_d:0,space:"rgb"})}else{if(!y6.test(e))throw Error("Unsupported string format, can't construct Color");{const p=b=>parseInt(b,16),[,m,x,y]=gG.exec(function(b){return b.length===4?["#",b.substring(1,2),b.substring(1,2),b.substring(2,3),b.substring(2,3),b.substring(3,4),b.substring(3,4)].join(""):b}(e)).map(p);Object.assign(this,{_a:m,_b:x,_c:y,_d:0,space:"rgb"})}}const{_a:o,_b:l,_c:c,_d:u}=this,h=this.space==="rgb"?{r:o,g:l,b:c}:this.space==="xyz"?{x:o,y:l,z:c}:this.space==="hsl"?{h:o,s:l,l:c}:this.space==="lab"?{l:o,a:l,b:c}:this.space==="lch"?{l:o,c:l,h:c}:this.space==="cmyk"?{c:o,m:l,y:c,k:u}:{};Object.assign(this,h)}lab(){const{x:e,y:r,z:n}=this.xyz();return new Nt(116*r-16,500*(e-r),200*(r-n),"lab")}lch(){const{l:e,a:r,b:n}=this.lab(),a=Math.sqrt(r**2+n**2);let s=180*Math.atan2(n,r)/Math.PI;return s<0&&(s*=-1,s=360-s),new Nt(e,a,s,"lch")}rgb(){if(this.space==="rgb")return this;if((e=this.space)==="lab"||e==="xyz"||e==="lch"){let{x:r,y:n,z:a}=this;if(this.space==="lab"||this.space==="lch"){let{l:x,a:y,b}=this;if(this.space==="lch"){const{c:T,h:E}=this,_=Math.PI/180;y=T*Math.cos(_*E),b=T*Math.sin(_*E)}const w=(x+16)/116,N=y/500+w,A=w-b/200,S=16/116,C=.008856,k=7.787;r=.95047*(N**3>C?N**3:(N-S)/k),n=1*(w**3>C?w**3:(w-S)/k),a=1.08883*(A**3>C?A**3:(A-S)/k)}const s=3.2406*r+-1.5372*n+-.4986*a,o=-.9689*r+1.8758*n+.0415*a,l=.0557*r+-.204*n+1.057*a,c=Math.pow,u=.0031308,h=s>u?1.055*c(s,1/2.4)-.055:12.92*s,p=o>u?1.055*c(o,1/2.4)-.055:12.92*o,m=l>u?1.055*c(l,1/2.4)-.055:12.92*l;return new Nt(255*h,255*p,255*m)}if(this.space==="hsl"){let{h:r,s:n,l:a}=this;if(r/=360,n/=100,a/=100,n===0)return a*=255,new Nt(a,a,a);const s=a<.5?a*(1+n):a+n-a*n,o=2*a-s,l=255*c1(o,s,r+1/3),c=255*c1(o,s,r),u=255*c1(o,s,r-1/3);return new Nt(l,c,u)}if(this.space==="cmyk"){const{c:r,m:n,y:a,k:s}=this,o=255*(1-Math.min(1,r*(1-s)+s)),l=255*(1-Math.min(1,n*(1-s)+s)),c=255*(1-Math.min(1,a*(1-s)+s));return new Nt(o,l,c)}return this;var e}toArray(){const{_a:e,_b:r,_c:n,_d:a,space:s}=this;return[e,r,n,a,s]}toHex(){const[e,r,n]=this._clamped().map(jG);return`#${e}${r}${n}`}toRgb(){const[e,r,n]=this._clamped();return`rgb(${e},${r},${n})`}toString(){return this.toHex()}xyz(){const{_a:e,_b:r,_c:n}=this.rgb(),[a,s,o]=[e,r,n].map(w=>w/255),l=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92,c=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92,u=o>.04045?Math.pow((o+.055)/1.055,2.4):o/12.92,h=(.4124*l+.3576*c+.1805*u)/.95047,p=(.2126*l+.7152*c+.0722*u)/1,m=(.0193*l+.1192*c+.9505*u)/1.08883,x=h>.008856?Math.pow(h,1/3):7.787*h+16/116,y=p>.008856?Math.pow(p,1/3):7.787*p+16/116,b=m>.008856?Math.pow(m,1/3):7.787*m+16/116;return new Nt(x,y,b,"xyz")}_clamped(){const{_a:e,_b:r,_c:n}=this.rgb(),{max:a,min:s,round:o}=Math;return[e,r,n].map(l=>a(0,s(o(l),255)))}}class mt{constructor(...e){this.init(...e)}clone(){return new mt(this)}init(e,r){const s=Array.isArray(e)?{x:e[0],y:e[1]}:typeof e=="object"?{x:e.x,y:e.y}:{x:e,y:r};return this.x=s.x==null?0:s.x,this.y=s.y==null?0:s.y,this}toArray(){return[this.x,this.y]}transform(e){return this.clone().transformO(e)}transformO(e){ze.isMatrixLike(e)||(e=new ze(e));const{x:r,y:n}=this;return this.x=e.a*r+e.c*n+e.e,this.y=e.b*r+e.d*n+e.f,this}}function Uc(t,e,r){return Math.abs(e-t)<1e-6}class ze{constructor(...e){this.init(...e)}static formatTransforms(e){const r=e.flip==="both"||e.flip===!0,n=e.flip&&(r||e.flip==="x")?-1:1,a=e.flip&&(r||e.flip==="y")?-1:1,s=e.skew&&e.skew.length?e.skew[0]:isFinite(e.skew)?e.skew:isFinite(e.skewX)?e.skewX:0,o=e.skew&&e.skew.length?e.skew[1]:isFinite(e.skew)?e.skew:isFinite(e.skewY)?e.skewY:0,l=e.scale&&e.scale.length?e.scale[0]*n:isFinite(e.scale)?e.scale*n:isFinite(e.scaleX)?e.scaleX*n:n,c=e.scale&&e.scale.length?e.scale[1]*a:isFinite(e.scale)?e.scale*a:isFinite(e.scaleY)?e.scaleY*a:a,u=e.shear||0,h=e.rotate||e.theta||0,p=new mt(e.origin||e.around||e.ox||e.originX,e.oy||e.originY),m=p.x,x=p.y,y=new mt(e.position||e.px||e.positionX||NaN,e.py||e.positionY||NaN),b=y.x,w=y.y,N=new mt(e.translate||e.tx||e.translateX,e.ty||e.translateY),A=N.x,S=N.y,C=new mt(e.relative||e.rx||e.relativeX,e.ry||e.relativeY);return{scaleX:l,scaleY:c,skewX:s,skewY:o,shear:u,theta:h,rx:C.x,ry:C.y,tx:A,ty:S,ox:m,oy:x,px:b,py:w}}static fromArray(e){return{a:e[0],b:e[1],c:e[2],d:e[3],e:e[4],f:e[5]}}static isMatrixLike(e){return e.a!=null||e.b!=null||e.c!=null||e.d!=null||e.e!=null||e.f!=null}static matrixMultiply(e,r,n){const a=e.a*r.a+e.c*r.b,s=e.b*r.a+e.d*r.b,o=e.a*r.c+e.c*r.d,l=e.b*r.c+e.d*r.d,c=e.e+e.a*r.e+e.c*r.f,u=e.f+e.b*r.e+e.d*r.f;return n.a=a,n.b=s,n.c=o,n.d=l,n.e=c,n.f=u,n}around(e,r,n){return this.clone().aroundO(e,r,n)}aroundO(e,r,n){const a=e||0,s=r||0;return this.translateO(-a,-s).lmultiplyO(n).translateO(a,s)}clone(){return new ze(this)}decompose(e=0,r=0){const n=this.a,a=this.b,s=this.c,o=this.d,l=this.e,c=this.f,u=n*o-a*s,h=u>0?1:-1,p=h*Math.sqrt(n*n+a*a),m=Math.atan2(h*a,h*n),x=180/Math.PI*m,y=Math.cos(m),b=Math.sin(m),w=(n*s+a*o)/u,N=s*p/(w*n-a)||o*p/(w*a+n);return{scaleX:p,scaleY:N,shear:w,rotate:x,translateX:l-e+e*y*p+r*(w*y*p-b*N),translateY:c-r+e*b*p+r*(w*b*p+y*N),originX:e,originY:r,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(e){if(e===this)return!0;const r=new ze(e);return Uc(this.a,r.a)&&Uc(this.b,r.b)&&Uc(this.c,r.c)&&Uc(this.d,r.d)&&Uc(this.e,r.e)&&Uc(this.f,r.f)}flip(e,r){return this.clone().flipO(e,r)}flipO(e,r){return e==="x"?this.scaleO(-1,1,r,0):e==="y"?this.scaleO(1,-1,0,r):this.scaleO(-1,-1,e,r||e)}init(e){const r=ze.fromArray([1,0,0,1,0,0]);return e=e instanceof Zr?e.matrixify():typeof e=="string"?ze.fromArray(e.split(Si).map(parseFloat)):Array.isArray(e)?ze.fromArray(e):typeof e=="object"&&ze.isMatrixLike(e)?e:typeof e=="object"?new ze().transform(e):arguments.length===6?ze.fromArray([].slice.call(arguments)):r,this.a=e.a!=null?e.a:r.a,this.b=e.b!=null?e.b:r.b,this.c=e.c!=null?e.c:r.c,this.d=e.d!=null?e.d:r.d,this.e=e.e!=null?e.e:r.e,this.f=e.f!=null?e.f:r.f,this}inverse(){return this.clone().inverseO()}inverseO(){const e=this.a,r=this.b,n=this.c,a=this.d,s=this.e,o=this.f,l=e*a-r*n;if(!l)throw new Error("Cannot invert "+this);const c=a/l,u=-r/l,h=-n/l,p=e/l,m=-(c*s+h*o),x=-(u*s+p*o);return this.a=c,this.b=u,this.c=h,this.d=p,this.e=m,this.f=x,this}lmultiply(e){return this.clone().lmultiplyO(e)}lmultiplyO(e){const r=e instanceof ze?e:new ze(e);return ze.matrixMultiply(r,this,this)}multiply(e){return this.clone().multiplyO(e)}multiplyO(e){const r=e instanceof ze?e:new ze(e);return ze.matrixMultiply(this,r,this)}rotate(e,r,n){return this.clone().rotateO(e,r,n)}rotateO(e,r=0,n=0){e=i1(e);const a=Math.cos(e),s=Math.sin(e),{a:o,b:l,c,d:u,e:h,f:p}=this;return this.a=o*a-l*s,this.b=l*a+o*s,this.c=c*a-u*s,this.d=u*a+c*s,this.e=h*a-p*s+n*s-r*a+r,this.f=p*a+h*s-r*s-n*a+n,this}scale(){return this.clone().scaleO(...arguments)}scaleO(e,r=e,n=0,a=0){arguments.length===3&&(a=n,n=r,r=e);const{a:s,b:o,c:l,d:c,e:u,f:h}=this;return this.a=s*e,this.b=o*r,this.c=l*e,this.d=c*r,this.e=u*e-n*e+n,this.f=h*r-a*r+a,this}shear(e,r,n){return this.clone().shearO(e,r,n)}shearO(e,r=0,n=0){const{a,b:s,c:o,d:l,e:c,f:u}=this;return this.a=a+s*e,this.c=o+l*e,this.e=c+u*e-n*e,this}skew(){return this.clone().skewO(...arguments)}skewO(e,r=e,n=0,a=0){arguments.length===3&&(a=n,n=r,r=e),e=i1(e),r=i1(r);const s=Math.tan(e),o=Math.tan(r),{a:l,b:c,c:u,d:h,e:p,f:m}=this;return this.a=l+c*s,this.b=c+l*o,this.c=u+h*s,this.d=h+u*o,this.e=p+m*s-a*s,this.f=m+p*o-n*o,this}skewX(e,r,n){return this.skew(e,0,r,n)}skewY(e,r,n){return this.skew(0,e,r,n)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(e){if(ze.isMatrixLike(e))return new ze(e).multiplyO(this);const r=ze.formatTransforms(e),{x:n,y:a}=new mt(r.ox,r.oy).transform(this),s=new ze().translateO(r.rx,r.ry).lmultiplyO(this).translateO(-n,-a).scaleO(r.scaleX,r.scaleY).skewO(r.skewX,r.skewY).shearO(r.shear).rotateO(r.theta).translateO(n,a);if(isFinite(r.px)||isFinite(r.py)){const o=new mt(n,a).transform(s),l=isFinite(r.px)?r.px-o.x:0,c=isFinite(r.py)?r.py-o.y:0;s.translateO(l,c)}return s.translateO(r.tx,r.ty),s}translate(e,r){return this.clone().translateO(e,r)}translateO(e,r){return this.e+=e||0,this.f+=r||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}function so(){if(!so.nodes){const t=pn().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");const e=t.path().node;so.nodes={svg:t,path:e}}if(!so.nodes.svg.node.parentNode){const t=it.document.body||it.document.documentElement;so.nodes.svg.addTo(t)}return so.nodes}function z_(t){return!(t.width||t.height||t.x||t.y)}lt(ze,"Matrix");class ar{constructor(...e){this.init(...e)}addOffset(){return this.x+=it.window.pageXOffset,this.y+=it.window.pageYOffset,new ar(this)}init(e){return e=typeof e=="string"?e.split(Si).map(parseFloat):Array.isArray(e)?e:typeof e=="object"?[e.left!=null?e.left:e.x,e.top!=null?e.top:e.y,e.width,e.height]:arguments.length===4?[].slice.call(arguments):[0,0,0,0],this.x=e[0]||0,this.y=e[1]||0,this.width=this.w=e[2]||0,this.height=this.h=e[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return z_(this)}merge(e){const r=Math.min(this.x,e.x),n=Math.min(this.y,e.y),a=Math.max(this.x+this.width,e.x+e.width)-r,s=Math.max(this.y+this.height,e.y+e.height)-n;return new ar(r,n,a,s)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(e){e instanceof ze||(e=new ze(e));let r=1/0,n=-1/0,a=1/0,s=-1/0;return[new mt(this.x,this.y),new mt(this.x2,this.y),new mt(this.x,this.y2),new mt(this.x2,this.y2)].forEach(function(o){o=o.transform(e),r=Math.min(r,o.x),n=Math.max(n,o.x),a=Math.min(a,o.y),s=Math.max(s,o.y)}),new ar(r,a,n-r,s-a)}}function N6(t,e,r){let n;try{if(n=e(t.node),z_(n)&&(a=t.node)!==it.document&&!(it.document.documentElement.contains||function(s){for(;s.parentNode;)s=s.parentNode;return s===it.document}).call(it.document.documentElement,a))throw new Error("Element not in the dom")}catch{n=r(t)}var a;return n}Qe({viewbox:{viewbox(t,e,r,n){return t==null?new ar(this.attr("viewBox")):this.attr("viewBox",new ar(t,e,r,n))},zoom(t,e){let{width:r,height:n}=this.attr(["width","height"]);if((r||n)&&typeof r!="string"&&typeof n!="string"||(r=this.node.clientWidth,n=this.node.clientHeight),!r||!n)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const a=this.viewbox(),s=r/a.width,o=n/a.height,l=Math.min(s,o);if(t==null)return l;let c=l/t;c===1/0&&(c=Number.MAX_SAFE_INTEGER/100),e=e||new mt(r/2/s+a.x,n/2/o+a.y);const u=new ar(a).transform(new ze({scale:c,origin:e}));return this.viewbox(u)}}}),lt(ar,"Box");class Hl extends Array{constructor(e=[],...r){if(super(e,...r),typeof e=="number")return this;this.length=0,this.push(...e)}}Ie([Hl],{each(t,...e){return typeof t=="function"?this.map((r,n,a)=>t.call(r,r,n,a)):this.map(r=>r[t](...e))},toArray(){return Array.prototype.concat.apply([],this)}});const NG=["toArray","constructor","each"];function Ql(t,e){return new Hl(X4((e||it.document).querySelectorAll(t),function(r){return Ta(r)}))}Hl.extend=function(t){t=t.reduce((e,r)=>(NG.includes(r)||r[0]==="_"||(r in Array.prototype&&(e["$"+r]=Array.prototype[r]),e[r]=function(...n){return this.each(r,...n)}),e),{}),Ie([Hl],t)};let SG=0;const I_={};function B_(t){let e=t.getEventHolder();return e===it.window&&(e=I_),e.events||(e.events={}),e.events}function Z4(t){return t.getEventTarget()}function li(t,e,r,n,a){const s=r.bind(n||t),o=pn(t),l=B_(o),c=Z4(o);e=Array.isArray(e)?e:e.split(Si),r._svgjsListenerId||(r._svgjsListenerId=++SG),e.forEach(function(u){const h=u.split(".")[0],p=u.split(".")[1]||"*";l[h]=l[h]||{},l[h][p]=l[h][p]||{},l[h][p][r._svgjsListenerId]=s,c.addEventListener(h,s,a||!1)})}function Pa(t,e,r,n){const a=pn(t),s=B_(a),o=Z4(a);(typeof r!="function"||(r=r._svgjsListenerId))&&(e=Array.isArray(e)?e:(e||"").split(Si)).forEach(function(l){const c=l&&l.split(".")[0],u=l&&l.split(".")[1];let h,p;if(r)s[c]&&s[c][u||"*"]&&(o.removeEventListener(c,s[c][u||"*"][r],n||!1),delete s[c][u||"*"][r]);else if(c&&u){if(s[c]&&s[c][u]){for(p in s[c][u])Pa(o,[c,u].join("."),p);delete s[c][u]}}else if(u)for(l in s)for(h in s[l])u===h&&Pa(o,[l,u].join("."));else if(c){if(s[c]){for(h in s[c])Pa(o,[c,h].join("."));delete s[c]}}else{for(l in s)Pa(o,l);(function(m){let x=m.getEventHolder();x===it.window&&(x=I_),x.events&&(x.events={})})(a)}})}class Xf extends q4{addEventListener(){}dispatch(e,r,n){return function(a,s,o,l){const c=Z4(a);return s instanceof it.window.Event||(s=new it.window.CustomEvent(s,{detail:o,cancelable:!0,...l})),c.dispatchEvent(s),s}(this,e,r,n)}dispatchEvent(e){const r=this.getEventHolder().events;if(!r)return!0;const n=r[e.type];for(const a in n)for(const s in n[a])n[a][s](e);return!e.defaultPrevented}fire(e,r,n){return this.dispatch(e,r,n),this}getEventHolder(){return this}getEventTarget(){return this}off(e,r,n){return Pa(this,e,r,n),this}on(e,r,n,a){return li(this,e,r,n,a),this}removeEventListener(){}}function S6(){}lt(Xf,"EventTarget");const d1=400,AG=">",CG=0,kG={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};class $l extends Array{constructor(...e){super(...e),this.init(...e)}clone(){return new this.constructor(this)}init(e){return typeof e=="number"||(this.length=0,this.push(...this.parse(e))),this}parse(e=[]){return e instanceof Array?e:e.trim().split(Si).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const e=[];return e.push(...this),e}}class Ve{constructor(...e){this.init(...e)}convert(e){return new Ve(this.value,e)}divide(e){return e=new Ve(e),new Ve(this/e,this.unit||e.unit)}init(e,r){return r=Array.isArray(e)?e[1]:r,e=Array.isArray(e)?e[0]:e,this.value=0,this.unit=r||"",typeof e=="number"?this.value=isNaN(e)?0:isFinite(e)?e:e<0?-34e37:34e37:typeof e=="string"?(r=e.match(L_))&&(this.value=parseFloat(r[1]),r[5]==="%"?this.value/=100:r[5]==="s"&&(this.value*=1e3),this.unit=r[5]):e instanceof Ve&&(this.value=e.valueOf(),this.unit=e.unit),this}minus(e){return e=new Ve(e),new Ve(this-e,this.unit||e.unit)}plus(e){return e=new Ve(e),new Ve(this+e,this.unit||e.unit)}times(e){return e=new Ve(e),new Ve(this*e,this.unit||e.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return(this.unit==="%"?~~(1e8*this.value)/1e6:this.unit==="s"?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}}const DG=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),F_=[];class yo extends Xf{constructor(e,r){super(),this.node=e,this.type=e.nodeName,r&&e!==r&&this.attr(r)}add(e,r){return(e=pn(e)).removeNamespace&&this.node instanceof it.window.SVGElement&&e.removeNamespace(),r==null?this.node.appendChild(e.node):e.node!==this.node.childNodes[r]&&this.node.insertBefore(e.node,this.node.childNodes[r]),this}addTo(e,r){return pn(e).put(this,r)}children(){return new Hl(X4(this.node.children,function(e){return Ta(e)}))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(e=!0,r=!0){this.writeDataToDom();let n=this.node.cloneNode(e);return r&&(n=R_(n)),new this.constructor(n)}each(e,r){const n=this.children();let a,s;for(a=0,s=n.length;a<s;a++)e.apply(n[a],[a,n]),r&&n[a].each(e,r);return this}element(e,r){return this.put(new yo(lf(e),r))}first(){return Ta(this.node.firstChild)}get(e){return Ta(this.node.childNodes[e])}getEventHolder(){return this.node}getEventTarget(){return this.node}has(e){return this.index(e)>=0}html(e,r){return this.xml(e,r,"http://www.w3.org/1999/xhtml")}id(e){return e!==void 0||this.node.id||(this.node.id=__(this.type)),this.attr("id",e)}index(e){return[].slice.call(this.node.childNodes).indexOf(e.node)}last(){return Ta(this.node.lastChild)}matches(e){const r=this.node,n=r.matches||r.matchesSelector||r.msMatchesSelector||r.mozMatchesSelector||r.webkitMatchesSelector||r.oMatchesSelector||null;return n&&n.call(r,e)}parent(e){let r=this;if(!r.node.parentNode)return null;if(r=Ta(r.node.parentNode),!e)return r;do if(typeof e=="string"?r.matches(e):r instanceof e)return r;while(r=Ta(r.node.parentNode));return r}put(e,r){return e=pn(e),this.add(e,r),e}putIn(e,r){return pn(e).add(this,r)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(e){return this.node.removeChild(e.node),this}replace(e){return e=pn(e),this.node.parentNode&&this.node.parentNode.replaceChild(e.node,this.node),e}round(e=2,r=null){const n=10**e,a=this.attr(r);for(const s in a)typeof a[s]=="number"&&(a[s]=Math.round(a[s]*n)/n);return this.attr(a),this}svg(e,r){return this.xml(e,r,V4)}toString(){return this.id()}words(e){return this.node.textContent=e,this}wrap(e){const r=this.parent();if(!r)return this.addTo(e);const n=r.index(this);return r.put(e,n).put(this)}writeDataToDom(){return this.each(function(){this.writeDataToDom()}),this}xml(e,r,n){if(typeof e=="boolean"&&(n=r,r=e,e=null),e==null||typeof e=="function"){r=r==null||r,this.writeDataToDom();let l=this;if(e!=null){if(l=Ta(l.node.cloneNode(!0)),r){const c=e(l);if(l=c||l,c===!1)return""}l.each(function(){const c=e(this),u=c||this;c===!1?this.remove():c&&this!==u&&this.replace(u)},!0)}return r?l.node.outerHTML:l.node.innerHTML}r=r!=null&&r;const a=lf("wrapper",n),s=it.document.createDocumentFragment();a.innerHTML=e;for(let l=a.children.length;l--;)s.appendChild(a.firstElementChild);const o=this.parent();return r?this.replace(s)&&o:this.add(s)}}Ie(yo,{attr:function(t,e,r){if(t==null){t={},e=this.node.attributes;for(const n of e)t[n.nodeName]=j6.test(n.nodeValue)?parseFloat(n.nodeValue):n.nodeValue;return t}if(t instanceof Array)return t.reduce((n,a)=>(n[a]=this.attr(a),n),{});if(typeof t=="object"&&t.constructor===Object)for(e in t)this.attr(e,t[e]);else if(e===null)this.node.removeAttribute(t);else{if(e==null)return(e=this.node.getAttribute(t))==null?kG[t]:j6.test(e)?parseFloat(e):e;typeof(e=F_.reduce((n,a)=>a(t,n,this),e))=="number"?e=new Ve(e):DG.has(t)&&Nt.isColor(e)?e=new Nt(e):e.constructor===Array&&(e=new $l(e)),t==="leading"?this.leading&&this.leading(e):typeof r=="string"?this.node.setAttributeNS(r,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||t!=="font-size"&&t!=="x"||this.rebuild()}return this},find:function(t){return Ql(t,this.node)},findOne:function(t){return Ta(this.node.querySelector(t))}}),lt(yo,"Dom");let Zr=class extends yo{constructor(t,e){super(t,e),this.dom={},this.node.instance=this,(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&this.setData(JSON.parse(t.getAttribute("data-svgjs"))??JSON.parse(t.getAttribute("svgjs:data"))??{})}center(t,e){return this.cx(t).cy(e)}cx(t){return t==null?this.x()+this.width()/2:this.x(t-this.width()/2)}cy(t){return t==null?this.y()+this.height()/2:this.y(t-this.height()/2)}defs(){const t=this.root();return t&&t.defs()}dmove(t,e){return this.dx(t).dy(e)}dx(t=0){return this.x(new Ve(t).plus(this.x()))}dy(t=0){return this.y(new Ve(t).plus(this.y()))}getEventHolder(){return this}height(t){return this.attr("height",t)}move(t,e){return this.x(t).y(e)}parents(t=this.root()){const e=typeof t=="string";e||(t=pn(t));const r=new Hl;let n=this;for(;(n=n.parent())&&n.node!==it.document&&n.nodeName!=="#document-fragment"&&(r.push(n),e||n.node!==t.node)&&(!e||!n.matches(t));)if(n.node===this.root().node)return null;return r}reference(t){if(!(t=this.attr(t)))return null;const e=(t+"").match(bG);return e?pn(e[1]):null}root(){const t=this.parent(function(e){return El[e]}(G4));return t&&t.root()}setData(t){return this.dom=t,this}size(t,e){const r=Id(this,t,e);return this.width(new Ve(r.width)).height(new Ve(r.height))}width(t){return this.attr("width",t)}writeDataToDom(){return P_(this,this.dom),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}};Ie(Zr,{bbox:function(){const t=N6(this,e=>e.getBBox(),e=>{try{const r=e.clone().addTo(so().svg).show(),n=r.node.getBBox();return r.remove(),n}catch(r){throw new Error(`Getting bbox of element "${e.node.nodeName}" is not possible: ${r.toString()}`)}});return new ar(t)},rbox:function(t){const e=N6(this,n=>n.getBoundingClientRect(),n=>{throw new Error(`Getting rbox of element "${n.node.nodeName}" is not possible`)}),r=new ar(e);return t?r.transform(t.screenCTM().inverseO()):r.addOffset()},inside:function(t,e){const r=this.bbox();return t>r.x&&e>r.y&&t<r.x+r.width&&e<r.y+r.height},point:function(t,e){return new mt(t,e).transformO(this.screenCTM().inverseO())},ctm:function(){return new ze(this.node.getCTM())},screenCTM:function(){try{if(typeof this.isRoot=="function"&&!this.isRoot()){const t=this.rect(1,1),e=t.node.getScreenCTM();return t.remove(),new ze(e)}return new ze(this.node.getScreenCTM())}catch{return console.warn(`Cannot get CTM from SVG node ${this.node.nodeName}. Is the element rendered?`),new ze}}}),lt(Zr,"Element");const ah={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(t,e){return e==="color"?t:t+"-"+e}};["fill","stroke"].forEach(function(t){const e={};let r;e[t]=function(n){if(n===void 0)return this.attr(t);if(typeof n=="string"||n instanceof Nt||Nt.isRgb(n)||n instanceof Zr)this.attr(t,n);else for(r=ah[t].length-1;r>=0;r--)n[ah[t][r]]!=null&&this.attr(ah.prefix(t,ah[t][r]),n[ah[t][r]]);return this},Qe(["Element","Runner"],e)}),Qe(["Element","Runner"],{matrix:function(t,e,r,n,a,s){return t==null?new ze(this):this.attr("transform",new ze(t,e,r,n,a,s))},rotate:function(t,e,r){return this.transform({rotate:t,ox:e,oy:r},!0)},skew:function(t,e,r,n){return arguments.length===1||arguments.length===3?this.transform({skew:t,ox:e,oy:r},!0):this.transform({skew:[t,e],ox:r,oy:n},!0)},shear:function(t,e,r){return this.transform({shear:t,ox:e,oy:r},!0)},scale:function(t,e,r,n){return arguments.length===1||arguments.length===3?this.transform({scale:t,ox:e,oy:r},!0):this.transform({scale:[t,e],ox:r,oy:n},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(t="both",e="center"){return"xybothtrue".indexOf(t)===-1&&(e=t,t="both"),this.transform({flip:t,origin:e},!0)},opacity:function(t){return this.attr("opacity",t)}}),Qe("radius",{radius:function(t,e=t){return(this._element||this).type==="radialGradient"?this.attr("r",new Ve(t)):this.rx(t).ry(e)}}),Qe("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new mt(this.node.getPointAtLength(t))}}),Qe(["Element","Runner"],{font:function(t,e){if(typeof t=="object"){for(e in t)this.font(e,t[e]);return this}return t==="leading"?this.leading(e):t==="anchor"?this.attr("text-anchor",e):t==="size"||t==="family"||t==="weight"||t==="stretch"||t==="variant"||t==="style"?this.attr("font-"+t,e):this.attr(t,e)}});Qe("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce(function(t,e){return t[e]=function(r){return r===null?this.off(e):this.on(e,r),this},t},{})),Qe("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(yG).slice(0,-1).map(function(e){const r=e.trim().split("(");return[r[0],r[1].split(Si).map(function(n){return parseFloat(n)})]}).reverse().reduce(function(e,r){return r[0]==="matrix"?e.lmultiply(ze.fromArray(r[1])):e[r[0]].apply(e,r[1])},new ze)},toParent:function(t,e){if(this===t)return this;if(tj(this.node))return this.addTo(t,e);const r=this.screenCTM(),n=t.screenCTM().inverse();return this.addTo(t,e).untransform().transform(n.multiply(r)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,e){if(t==null||typeof t=="string"){const n=new ze(this).decompose();return t==null?n:n[t]}ze.isMatrixLike(t)||(t={...t,origin:ej(t,this)});const r=new ze(e===!0?this:e||!1).transform(t);return this.attr("transform",r)}});class yn extends Zr{flatten(){return this.each(function(){if(this instanceof yn)return this.flatten().ungroup()}),this}ungroup(e=this.parent(),r=e.index(this)){return r=r===-1?e.children().length:r,this.each(function(n,a){return a[a.length-n-1].toParent(e,r)}),this.remove()}}lt(yn,"Container");class E0 extends yn{constructor(e,r=e){super(Et("defs",e),r)}flatten(){return this}ungroup(){return this}}lt(E0,"Defs");class ha extends Zr{}function Q4(t){return this.attr("rx",t)}function J4(t){return this.attr("ry",t)}function H_(t){return t==null?this.cx()-this.rx():this.cx(t+this.rx())}function $_(t){return t==null?this.cy()-this.ry():this.cy(t+this.ry())}function Y_(t){return this.attr("cx",t)}function U_(t){return this.attr("cy",t)}function W_(t){return t==null?2*this.rx():this.rx(new Ve(t).divide(2))}function X_(t){return t==null?2*this.ry():this.ry(new Ve(t).divide(2))}lt(ha,"Shape");var TG=Object.freeze({__proto__:null,cx:Y_,cy:U_,height:X_,rx:Q4,ry:J4,width:W_,x:H_,y:$_});class zg extends ha{constructor(e,r=e){super(Et("ellipse",e),r)}size(e,r){const n=Id(this,e,r);return this.rx(new Ve(n.width).divide(2)).ry(new Ve(n.height).divide(2))}}Ie(zg,TG),Qe("Container",{ellipse:Mt(function(t=0,e=t){return this.put(new zg).size(t,e).move(0,0)})}),lt(zg,"Ellipse");let V_=class extends yo{constructor(e=it.document.createDocumentFragment()){super(e)}xml(e,r,n){if(typeof e=="boolean"&&(n=r,r=e,e=null),e==null||typeof e=="function"){const a=new yo(lf("wrapper",n));return a.add(this.node.cloneNode(!0)),a.xml(!1,n)}return super.xml(e,!1,n)}};function q_(t,e){return(this._element||this).type==="radialGradient"?this.attr({fx:new Ve(t),fy:new Ve(e)}):this.attr({x1:new Ve(t),y1:new Ve(e)})}function G_(t,e){return(this._element||this).type==="radialGradient"?this.attr({cx:new Ve(t),cy:new Ve(e)}):this.attr({x2:new Ve(t),y2:new Ve(e)})}lt(V_,"Fragment");var MG=Object.freeze({__proto__:null,from:q_,to:G_});class Hh extends yn{constructor(e,r){super(Et(e+"Gradient",typeof e=="string"?null:e),r)}attr(e,r,n){return e==="transform"&&(e="gradientTransform"),super.attr(e,r,n)}bbox(){return new ar}targets(){return Ql("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(e){return this.clear(),typeof e=="function"&&e.call(this,this),this}url(){return"url(#"+this.id()+")"}}Ie(Hh,MG),Qe({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:Mt(function(t,e){return this.put(new Hh(t)).update(e)})}}),lt(Hh,"Gradient");class cf extends yn{constructor(e,r=e){super(Et("pattern",e),r)}attr(e,r,n){return e==="transform"&&(e="patternTransform"),super.attr(e,r,n)}bbox(){return new ar}targets(){return Ql("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(e){return this.clear(),typeof e=="function"&&e.call(this,this),this}url(){return"url(#"+this.id()+")"}}Qe({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:Mt(function(t,e,r){return this.put(new cf).update(r).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})})}}),lt(cf,"Pattern");let Ig=class extends ha{constructor(t,e=t){super(Et("image",t),e)}load(t,e){if(!t)return this;const r=new it.window.Image;return li(r,"load",function(n){const a=this.parent(cf);this.width()===0&&this.height()===0&&this.size(r.width,r.height),a instanceof cf&&a.width()===0&&a.height()===0&&a.size(this.width(),this.height()),typeof e=="function"&&e.call(this,n)},this),li(r,"load error",function(){Pa(r)}),this.attr("href",r.src=t,Bd)}};var A6;A6=function(t,e,r){return t!=="fill"&&t!=="stroke"||wG.test(e)&&(e=r.root().defs().image(e)),e instanceof Ig&&(e=r.root().defs().pattern(0,0,n=>{n.add(e)})),e},F_.push(A6),Qe({Container:{image:Mt(function(t,e){return this.put(new Ig).size(0,0).load(t,e)})}}),lt(Ig,"Image");class vo extends $l{bbox(){let e=-1/0,r=-1/0,n=1/0,a=1/0;return this.forEach(function(s){e=Math.max(s[0],e),r=Math.max(s[1],r),n=Math.min(s[0],n),a=Math.min(s[1],a)}),new ar(n,a,e-n,r-a)}move(e,r){const n=this.bbox();if(e-=n.x,r-=n.y,!isNaN(e)&&!isNaN(r))for(let a=this.length-1;a>=0;a--)this[a]=[this[a][0]+e,this[a][1]+r];return this}parse(e=[0,0]){const r=[];(e=e instanceof Array?Array.prototype.concat.apply([],e):e.trim().split(Si).map(parseFloat)).length%2!=0&&e.pop();for(let n=0,a=e.length;n<a;n+=2)r.push([e[n],e[n+1]]);return r}size(e,r){let n;const a=this.bbox();for(n=this.length-1;n>=0;n--)a.width&&(this[n][0]=(this[n][0]-a.x)*e/a.width+a.x),a.height&&(this[n][1]=(this[n][1]-a.y)*r/a.height+a.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const e=[];for(let r=0,n=this.length;r<n;r++)e.push(this[r].join(","));return e.join(" ")}transform(e){return this.clone().transformO(e)}transformO(e){ze.isMatrixLike(e)||(e=new ze(e));for(let r=this.length;r--;){const[n,a]=this[r];this[r][0]=e.a*n+e.c*a+e.e,this[r][1]=e.b*n+e.d*a+e.f}return this}}const EG=vo;var eN=Object.freeze({__proto__:null,MorphArray:EG,height:function(t){const e=this.bbox();return t==null?e.height:this.size(e.width,t)},width:function(t){const e=this.bbox();return t==null?e.width:this.size(t,e.height)},x:function(t){return t==null?this.bbox().x:this.move(t,this.bbox().y)},y:function(t){return t==null?this.bbox().y:this.move(this.bbox().x,t)}});let xl=class extends ha{constructor(t,e=t){super(Et("line",t),e)}array(){return new vo([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}move(t,e){return this.attr(this.array().move(t,e).toLine())}plot(t,e,r,n){return t==null?this.array():(t=e!==void 0?{x1:t,y1:e,x2:r,y2:n}:new vo(t).toLine(),this.attr(t))}size(t,e){const r=Id(this,t,e);return this.attr(this.array().size(r.width,r.height).toLine())}};Ie(xl,eN),Qe({Container:{line:Mt(function(...t){return xl.prototype.plot.apply(this.put(new xl),t[0]!=null?t:[0,0,0,0])})}}),lt(xl,"Line");let Bg=class extends yn{constructor(t,e=t){super(Et("marker",t),e)}height(t){return this.attr("markerHeight",t)}orient(t){return this.attr("orient",t)}ref(t,e){return this.attr("refX",t).attr("refY",e)}toString(){return"url(#"+this.id()+")"}update(t){return this.clear(),typeof t=="function"&&t.call(this,this),this}width(t){return this.attr("markerWidth",t)}};function ed(t,e){return function(r){return r==null?this[t]:(this[t]=r,e&&e.call(this),this)}}Qe({Container:{marker(...t){return this.defs().marker(...t)}},Defs:{marker:Mt(function(t,e,r){return this.put(new Bg).size(t,e).ref(t/2,e/2).viewbox(0,0,t,e).attr("orient","auto").update(r)})},marker:{marker(t,e,r,n){let a=["marker"];return t!=="all"&&a.push(t),a=a.join("-"),t=arguments[1]instanceof Bg?arguments[1]:this.defs().marker(e,r,n),this.attr(a,t)}}}),lt(Bg,"Marker");const OG={"-":function(t){return t},"<>":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,e,r,n){return function(a){return a<0?t>0?e/t*a:r>0?n/r*a:0:a>1?r<1?(1-n)/(1-r)*a+(n-r)/(1-r):t<1?(1-e)/(1-t)*a+(e-t)/(1-t):1:3*a*(1-a)**2*e+3*a**2*(1-a)*n+a**3}},steps:function(t,e="end"){e=e.split("-").reverse()[0];let r=t;return e==="none"?--r:e==="both"&&++r,(n,a=!1)=>{let s=Math.floor(n*t);const o=n*s%1==0;return e!=="start"&&e!=="both"||++s,a&&o&&--s,n>=0&&s<0&&(s=0),n<=1&&s>r&&(s=r),s/r}}};class tN{done(){return!1}}class rj extends tN{constructor(e=AG){super(),this.ease=OG[e]||e}step(e,r,n){return typeof e!="number"?n<1?e:r:e+(r-e)*this.ease(n)}}class mx extends tN{constructor(e){super(),this.stepper=e}done(e){return e.done}step(e,r,n,a){return this.stepper(e,r,n,a)}}function C6(){const t=(this._duration||500)/1e3,e=this._overshoot||0,r=Math.PI,n=Math.log(e/100+1e-10),a=-n/Math.sqrt(r*r+n*n),s=3.9/(a*t);this.d=2*a*s,this.k=s*s}Ie(class extends mx{constructor(t=500,e=0){super(),this.duration(t).overshoot(e)}step(t,e,r,n){if(typeof t=="string")return t;if(n.done=r===1/0,r===1/0)return e;if(r===0)return t;r>100&&(r=16),r/=1e3;const a=n.velocity||0,s=-this.d*a-this.k*(t-e),o=t+a*r+s*r*r/2;return n.velocity=a+s*r,n.done=Math.abs(e-o)+Math.abs(a)<.002,n.done?e:o}},{duration:ed("_duration",C6),overshoot:ed("_overshoot",C6)});Ie(class extends mx{constructor(t=.1,e=.01,r=0,n=1e3){super(),this.p(t).i(e).d(r).windup(n)}step(t,e,r,n){if(typeof t=="string")return t;if(n.done=r===1/0,r===1/0)return e;if(r===0)return t;const a=e-t;let s=(n.integral||0)+a*r;const o=(a-(n.error||0))/r,l=this._windup;return l!==!1&&(s=Math.max(-l,Math.min(s,l))),n.error=a,n.integral=s,n.done=Math.abs(a)<.001,n.done?e:t+(this.P*a+this.I*s+this.D*o)}},{windup:ed("_windup"),p:ed("P"),i:ed("I"),d:ed("D")});const PG={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},nj={M:function(t,e,r){return e.x=r.x=t[0],e.y=r.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,r){return e.x=r.x,e.y=r.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},u1="mlhvqtcsaz".split("");for(let t=0,e=u1.length;t<e;++t)nj[u1[t]]=function(r){return function(n,a,s){if(r==="H")n[0]=n[0]+a.x;else if(r==="V")n[0]=n[0]+a.y;else if(r==="A")n[5]=n[5]+a.x,n[6]=n[6]+a.y;else for(let o=0,l=n.length;o<l;++o)n[o]=n[o]+(o%2?a.y:a.x);return nj[r](n,a,s)}}(u1[t].toUpperCase());function aj(t){return t.segment.length&&t.segment.length-1===PG[t.segment[0].toUpperCase()]}function _G(t,e){t.inNumber&&dl(t,!1);const r=K4.test(e);if(r)t.segment=[e];else{const n=t.lastCommand,a=n.toLowerCase(),s=n===a;t.segment=[a==="m"?s?"l":"L":n]}return t.inSegment=!0,t.lastCommand=t.segment[0],r}function dl(t,e){if(!t.inNumber)throw new Error("Parser Error");t.number&&t.segment.push(parseFloat(t.number)),t.inNumber=e,t.number="",t.pointSeen=!1,t.hasExponent=!1,aj(t)&&sj(t)}function sj(t){t.inSegment=!1,t.absolute&&(t.segment=function(e){const r=e.segment[0];return nj[r](e.segment.slice(1),e.p,e.p0)}(t)),t.segments.push(t.segment)}function RG(t){if(!t.segment.length)return!1;const e=t.segment[0].toUpperCase()==="A",r=t.segment.length;return e&&(r===4||r===5)}function LG(t){return t.lastToken.toUpperCase()==="E"}const zG=new Set([" ",","," ",`
`,"\r","\f"]);class Za extends $l{bbox(){return so().path.setAttribute("d",this.toString()),new ar(so.nodes.path.getBBox())}move(e,r){const n=this.bbox();if(e-=n.x,r-=n.y,!isNaN(e)&&!isNaN(r))for(let a,s=this.length-1;s>=0;s--)a=this[s][0],a==="M"||a==="L"||a==="T"?(this[s][1]+=e,this[s][2]+=r):a==="H"?this[s][1]+=e:a==="V"?this[s][1]+=r:a==="C"||a==="S"||a==="Q"?(this[s][1]+=e,this[s][2]+=r,this[s][3]+=e,this[s][4]+=r,a==="C"&&(this[s][5]+=e,this[s][6]+=r)):a==="A"&&(this[s][6]+=e,this[s][7]+=r);return this}parse(e="M0 0"){return Array.isArray(e)&&(e=Array.prototype.concat.apply([],e).toString()),function(r,n=!0){let a=0,s="";const o={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:n,p0:new mt,p:new mt};for(;o.lastToken=s,s=r.charAt(a++);)if(o.inSegment||!_G(o,s))if(s!==".")if(isNaN(parseInt(s)))if(zG.has(s))o.inNumber&&dl(o,!1);else if(s!=="-"&&s!=="+")if(s.toUpperCase()!=="E"){if(K4.test(s)){if(o.inNumber)dl(o,!1);else{if(!aj(o))throw new Error("parser Error");sj(o)}--a}}else o.number+=s,o.hasExponent=!0;else{if(o.inNumber&&!LG(o)){dl(o,!1),--a;continue}o.number+=s,o.inNumber=!0}else{if(o.number==="0"||RG(o)){o.inNumber=!0,o.number=s,dl(o,!0);continue}o.inNumber=!0,o.number+=s}else{if(o.pointSeen||o.hasExponent){dl(o,!1),--a;continue}o.inNumber=!0,o.pointSeen=!0,o.number+=s}return o.inNumber&&dl(o,!1),o.inSegment&&aj(o)&&sj(o),o.segments}(e)}size(e,r){const n=this.bbox();let a,s;for(n.width=n.width===0?1:n.width,n.height=n.height===0?1:n.height,a=this.length-1;a>=0;a--)s=this[a][0],s==="M"||s==="L"||s==="T"?(this[a][1]=(this[a][1]-n.x)*e/n.width+n.x,this[a][2]=(this[a][2]-n.y)*r/n.height+n.y):s==="H"?this[a][1]=(this[a][1]-n.x)*e/n.width+n.x:s==="V"?this[a][1]=(this[a][1]-n.y)*r/n.height+n.y:s==="C"||s==="S"||s==="Q"?(this[a][1]=(this[a][1]-n.x)*e/n.width+n.x,this[a][2]=(this[a][2]-n.y)*r/n.height+n.y,this[a][3]=(this[a][3]-n.x)*e/n.width+n.x,this[a][4]=(this[a][4]-n.y)*r/n.height+n.y,s==="C"&&(this[a][5]=(this[a][5]-n.x)*e/n.width+n.x,this[a][6]=(this[a][6]-n.y)*r/n.height+n.y)):s==="A"&&(this[a][1]=this[a][1]*e/n.width,this[a][2]=this[a][2]*r/n.height,this[a][6]=(this[a][6]-n.x)*e/n.width+n.x,this[a][7]=(this[a][7]-n.y)*r/n.height+n.y);return this}toString(){return function(e){let r="";for(let n=0,a=e.length;n<a;n++)r+=e[n][0],e[n][1]!=null&&(r+=e[n][1],e[n][2]!=null&&(r+=" ",r+=e[n][2],e[n][3]!=null&&(r+=" ",r+=e[n][3],r+=" ",r+=e[n][4],e[n][5]!=null&&(r+=" ",r+=e[n][5],r+=" ",r+=e[n][6],e[n][7]!=null&&(r+=" ",r+=e[n][7])))));return r+" "}(this)}}const K_=t=>{const e=typeof t;return e==="number"?Ve:e==="string"?Nt.isColor(t)?Nt:Si.test(t)?K4.test(t)?Za:$l:L_.test(t)?Ve:ij:oj.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?$l:e==="object"?df:ij};class ul{constructor(e){this._stepper=e||new rj("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(e){return this._morphObj.morph(this._from,this._to,e,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce(function(e,r){return e&&r},!0)}from(e){return e==null?this._from:(this._from=this._set(e),this)}stepper(e){return e==null?this._stepper:(this._stepper=e,this)}to(e){return e==null?this._to:(this._to=this._set(e),this)}type(e){return e==null?this._type:(this._type=e,this)}_set(e){this._type||this.type(K_(e));let r=new this._type(e);return this._type===Nt&&(r=this._to?r[this._to[4]]():this._from?r[this._from[4]]():r),this._type===df&&(r=this._to?r.align(this._to):this._from?r.align(this._from):r),r=r.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(r.length)).map(Object).map(function(n){return n.done=!0,n}),r}}class ij{constructor(...e){this.init(...e)}init(e){return e=Array.isArray(e)?e[0]:e,this.value=e,this}toArray(){return[this.value]}valueOf(){return this.value}}class Vf{constructor(...e){this.init(...e)}init(e){return Array.isArray(e)&&(e={scaleX:e[0],scaleY:e[1],shear:e[2],rotate:e[3],translateX:e[4],translateY:e[5],originX:e[6],originY:e[7]}),Object.assign(this,Vf.defaults,e),this}toArray(){const e=this;return[e.scaleX,e.scaleY,e.shear,e.rotate,e.translateX,e.translateY,e.originX,e.originY]}}Vf.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const IG=(t,e)=>t[0]<e[0]?-1:t[0]>e[0]?1:0;class df{constructor(...e){this.init(...e)}align(e){const r=this.values;for(let n=0,a=r.length;n<a;++n){if(r[n+1]===e[n+1]){if(r[n+1]===Nt&&e[n+7]!==r[n+7]){const l=e[n+7],c=new Nt(this.values.splice(n+3,5))[l]().toArray();this.values.splice(n+3,0,...c)}n+=r[n+2]+2;continue}if(!e[n+1])return this;const s=new e[n+1]().toArray(),o=r[n+2]+3;r.splice(n,o,e[n],e[n+1],e[n+2],...s),n+=r[n+2]+2}return this}init(e){if(this.values=[],Array.isArray(e))return void(this.values=e.slice());e=e||{};const r=[];for(const n in e){const a=K_(e[n]),s=new a(e[n]).toArray();r.push([n,a,s.length,...s])}return r.sort(IG),this.values=r.reduce((n,a)=>n.concat(a),[]),this}toArray(){return this.values}valueOf(){const e={},r=this.values;for(;r.length;){const n=r.shift(),a=r.shift(),s=r.shift(),o=r.splice(0,s);e[n]=new a(o)}return e}}const oj=[ij,Vf,df];class id extends ha{constructor(e,r=e){super(Et("path",e),r)}array(){return this._array||(this._array=new Za(this.attr("d")))}clear(){return delete this._array,this}height(e){return e==null?this.bbox().height:this.size(this.bbox().width,e)}move(e,r){return this.attr("d",this.array().move(e,r))}plot(e){return e==null?this.array():this.clear().attr("d",typeof e=="string"?e:this._array=new Za(e))}size(e,r){const n=Id(this,e,r);return this.attr("d",this.array().size(n.width,n.height))}width(e){return e==null?this.bbox().width:this.size(e,this.bbox().height)}x(e){return e==null?this.bbox().x:this.move(e,this.bbox().y)}y(e){return e==null?this.bbox().y:this.move(this.bbox().x,e)}}id.prototype.MorphArray=Za,Qe({Container:{path:Mt(function(t){return this.put(new id).plot(t||new Za)})}}),lt(id,"Path");var Z_=Object.freeze({__proto__:null,array:function(){return this._array||(this._array=new vo(this.attr("points")))},clear:function(){return delete this._array,this},move:function(t,e){return this.attr("points",this.array().move(t,e))},plot:function(t){return t==null?this.array():this.clear().attr("points",typeof t=="string"?t:this._array=new vo(t))},size:function(t,e){const r=Id(this,t,e);return this.attr("points",this.array().size(r.width,r.height))}});class bl extends ha{constructor(e,r=e){super(Et("polygon",e),r)}}Qe({Container:{polygon:Mt(function(t){return this.put(new bl).plot(t||new vo)})}}),Ie(bl,eN),Ie(bl,Z_),lt(bl,"Polygon");class yl extends ha{constructor(e,r=e){super(Et("polyline",e),r)}}Qe({Container:{polyline:Mt(function(t){return this.put(new yl).plot(t||new vo)})}}),Ie(yl,eN),Ie(yl,Z_),lt(yl,"Polyline");class Fg extends ha{constructor(e,r=e){super(Et("rect",e),r)}}Ie(Fg,{rx:Q4,ry:J4}),Qe({Container:{rect:Mt(function(t,e){return this.put(new Fg).size(t,e)})}}),lt(Fg,"Rect");class h1{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(e){const r=e.next!==void 0?e:{value:e,next:null,prev:null};return this._last?(r.prev=this._last,this._last.next=r,this._last=r):(this._last=r,this._first=r),r}remove(e){e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e===this._last&&(this._last=e.prev),e===this._first&&(this._first=e.next),e.prev=null,e.next=null}shift(){const e=this._first;return e?(this._first=e.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,e.value):null}}const yt={nextDraw:null,frames:new h1,timeouts:new h1,immediates:new h1,timer:()=>it.window.performance||it.window.Date,transforms:[],frame(t){const e=yt.frames.push({run:t});return yt.nextDraw===null&&(yt.nextDraw=it.window.requestAnimationFrame(yt._draw)),e},timeout(t,e){e=e||0;const r=yt.timer().now()+e,n=yt.timeouts.push({run:t,time:r});return yt.nextDraw===null&&(yt.nextDraw=it.window.requestAnimationFrame(yt._draw)),n},immediate(t){const e=yt.immediates.push(t);return yt.nextDraw===null&&(yt.nextDraw=it.window.requestAnimationFrame(yt._draw)),e},cancelFrame(t){t!=null&&yt.frames.remove(t)},clearTimeout(t){t!=null&&yt.timeouts.remove(t)},cancelImmediate(t){t!=null&&yt.immediates.remove(t)},_draw(t){let e=null;const r=yt.timeouts.last();for(;(e=yt.timeouts.shift())&&(t>=e.time?e.run():yt.timeouts.push(e),e!==r););let n=null;const a=yt.frames.last();for(;n!==a&&(n=yt.frames.shift());)n.run(t);let s=null;for(;s=yt.immediates.shift();)s();yt.nextDraw=yt.timeouts.first()||yt.frames.first()?it.window.requestAnimationFrame(yt._draw):null}},BG=function(t){const e=t.start,r=t.runner.duration();return{start:e,duration:r,end:e+r,runner:t.runner}},FG=function(){const t=it.window;return(t.performance||t.Date).now()};class Q_ extends Xf{constructor(e=FG){super(),this._timeSource=e,this.terminate()}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const e=this.getLastRunnerInfo(),r=e?e.runner.duration():0;return(e?e.start:this._time)+r}getEndTimeOfTimeline(){const e=this._runners.map(r=>r.start+r.runner.duration());return Math.max(0,...e)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(e){return this._runners[this._runnerIds.indexOf(e)]||null}pause(){return this._paused=!0,this._continue()}persist(e){return e==null?this._persist:(this._persist=e,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(e){const r=this.speed();if(e==null)return this.speed(-r);const n=Math.abs(r);return this.speed(e?-n:n)}schedule(e,r,n){if(e==null)return this._runners.map(BG);let a=0;const s=this.getEndTime();if(r=r||0,n==null||n==="last"||n==="after")a=s;else if(n==="absolute"||n==="start")a=r,r=0;else if(n==="now")a=this._time;else if(n==="relative"){const c=this.getRunnerInfoById(e.id);c&&(a=c.start+r,r=0)}else{if(n!=="with-last")throw new Error('Invalid value for the "when" parameter');{const c=this.getLastRunnerInfo();a=c?c.start:this._time}}e.unschedule(),e.timeline(this);const o=e.persist(),l={persist:o===null?this._persist:o,start:a+r,runner:e};return this._lastRunnerId=e.id,this._runners.push(l),this._runners.sort((c,u)=>c.start-u.start),this._runnerIds=this._runners.map(c=>c.runner.id),this.updateTime()._continue(),this}seek(e){return this.time(this._time+e)}source(e){return e==null?this._timeSource:(this._timeSource=e,this)}speed(e){return e==null?this._speed:(this._speed=e,this)}stop(){return this.time(0),this.pause()}time(e){return e==null?this._time:(this._time=e,this._continue(!0))}unschedule(e){const r=this._runnerIds.indexOf(e.id);return r<0||(this._runners.splice(r,1),this._runnerIds.splice(r,1),e.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(e=!1){return yt.cancelFrame(this._nextFrame),this._nextFrame=null,e?this._stepImmediate():(this._paused||(this._nextFrame=yt.frame(this._step)),this)}_stepFn(e=!1){const r=this._timeSource();let n=r-this._lastSourceTime;e&&(n=0);const a=this._speed*n+(this._time-this._lastStepTime);this._lastSourceTime=r,e||(this._time+=a,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let o=this._runners.length;o--;){const l=this._runners[o],c=l.runner;this._time-l.start<=0&&c.reset()}let s=!1;for(let o=0,l=this._runners.length;o<l;o++){const c=this._runners[o],u=c.runner;let h=a;const p=this._time-c.start;if(p<=0){s=!0;continue}p<h&&(h=p),u.active()&&(u.step(h).done?c.persist!==!0&&u.duration()-u.time()+this._time+c.persist<this._time&&(u.unschedule(),--o,--l):s=!0)}return s&&!(this._speed<0&&this._time===0)||this._runnerIds.length&&this._speed<0&&this._time>0?this._continue():(this.pause(),this.fire("finished")),this}terminate(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}}Qe({Element:{timeline:function(t){return t==null?(this._timeline=this._timeline||new Q_,this._timeline):(this._timeline=t,this)}}});class aa extends Xf{constructor(e){super(),this.id=aa.id++,e=typeof(e=e??d1)=="function"?new mx(e):e,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration=typeof e=="number"&&e,this._isDeclarative=e instanceof mx,this._stepper=this._isDeclarative?e:new rj,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new ze,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(e,r,n){let a=1,s=!1,o=0;return r=r??CG,n=n||"last",typeof(e=e??d1)!="object"||e instanceof tN||(r=e.delay??r,n=e.when??n,s=e.swing||s,a=e.times??a,o=e.wait??o,e=e.duration??d1),{duration:e,delay:r,swing:s,times:a,wait:o,when:n}}active(e){return e==null?this.enabled:(this.enabled=e,this)}addTransform(e){return this.transforms.lmultiplyO(e),this}after(e){return this.on("finished",e)}animate(e,r,n){const a=aa.sanitise(e,r,n),s=new aa(a.duration);return this._timeline&&s.timeline(this._timeline),this._element&&s.element(this._element),s.loop(a).schedule(a.delay,a.when)}clearTransform(){return this.transforms=new ze,this}clearTransformsFromQueue(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter(e=>!e.isTransform))}delay(e){return this.animate(0,e)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(e){return this.queue(null,e)}ease(e){return this._stepper=new rj(e),this}element(e){return e==null?this._element:(this._element=e,e._prepareRunner(),this)}finish(){return this.step(1/0)}loop(e,r,n){return typeof e=="object"&&(r=e.swing,n=e.wait,e=e.times),this._times=e||1/0,this._swing=r||!1,this._wait=n||0,this._times===!0&&(this._times=1/0),this}loops(e){const r=this._duration+this._wait;if(e==null){const s=Math.floor(this._time/r),o=(this._time-s*r)/this._duration;return Math.min(s+o,this._times)}const n=e%1,a=r*Math.floor(e)+this._duration*n;return this.time(a)}persist(e){return e==null?this._persist:(this._persist=e,this)}position(e){const r=this._time,n=this._duration,a=this._wait,s=this._times,o=this._swing,l=this._reverse;let c;if(e==null){const p=function(x){const y=o*Math.floor(x%(2*(a+n))/(a+n)),b=y&&!l||!y&&l,w=Math.pow(-1,b)*(x%(a+n))/n+b;return Math.max(Math.min(w,1),0)},m=s*(a+n)-a;return c=r<=0?Math.round(p(1e-5)):r<m?p(r):Math.round(p(m-1e-5)),c}const u=Math.floor(this.loops()),h=o&&u%2==0;return c=u+(h&&!l||l&&h?e:1-e),this.loops(c)}progress(e){return e==null?Math.min(1,this._time/this.duration()):this.time(e*this.duration())}queue(e,r,n,a){return this._queue.push({initialiser:e||S6,runner:r||S6,retarget:n,isTransform:a,initialised:!1,finished:!1}),this.timeline()&&this.timeline()._continue(),this}reset(){return this._reseted||(this.time(0),this._reseted=!0),this}reverse(e){return this._reverse=e??!this._reverse,this}schedule(e,r,n){if(e instanceof Q_||(n=r,r=e,e=this.timeline()),!e)throw Error("Runner cannot be scheduled without timeline");return e.schedule(this,r,n),this}step(e){if(!this.enabled)return this;e=e??16,this._time+=e;const r=this.position(),n=this._lastPosition!==r&&this._time>=0;this._lastPosition=r;const a=this.duration(),s=this._lastTime<=0&&this._time>0,o=this._lastTime<a&&this._time>=a;this._lastTime=this._time,s&&this.fire("start",this);const l=this._isDeclarative;this.done=!l&&!o&&this._time>=a,this._reseted=!1;let c=!1;return(n||l)&&(this._initialise(n),this.transforms=new ze,c=this._run(l?e:r),this.fire("step",this)),this.done=this.done||c&&l,o&&this.fire("finished",this),this}time(e){if(e==null)return this._time;const r=e-this._time;return this.step(r),this}timeline(e){return e===void 0?this._timeline:(this._timeline=e,this)}unschedule(){const e=this.timeline();return e&&e.unschedule(this),this}_initialise(e){if(e||this._isDeclarative)for(let r=0,n=this._queue.length;r<n;++r){const a=this._queue[r],s=this._isDeclarative||!a.initialised&&e;e=!a.finished,s&&e&&(a.initialiser.call(this),a.initialised=!0)}}_rememberMorpher(e,r){if(this._history[e]={morpher:r,caller:this._queue[this._queue.length-1]},this._isDeclarative){const n=this.timeline();n&&n.play()}}_run(e){let r=!0;for(let n=0,a=this._queue.length;n<a;++n){const s=this._queue[n],o=s.runner.call(this,e);s.finished=s.finished||o===!0,r=r&&s.finished}return r}_tryRetarget(e,r,n){if(this._history[e]){if(!this._history[e].caller.initialised){const s=this._queue.indexOf(this._history[e].caller);return this._queue.splice(s,1),!1}this._history[e].caller.retarget?this._history[e].caller.retarget.call(this,r,n):this._history[e].morpher.to(r),this._history[e].caller.finished=!1;const a=this.timeline();return a&&a.play(),!0}return!1}}aa.id=0;class gx{constructor(e=new ze,r=-1,n=!0){this.transforms=e,this.id=r,this.done=n}clearTransformsFromQueue(){}}Ie([aa,gx],{mergeWith(t){return new gx(t.transforms.lmultiply(this.transforms),t.id)}});const J_=(t,e)=>t.lmultiplyO(e),eR=t=>t.transforms;function HG(){const t=this._transformationRunners.runners.map(eR).reduce(J_,new ze);this.transform(t),this._transformationRunners.merge(),this._transformationRunners.length()===1&&(this._frameId=null)}class $G{constructor(){this.runners=[],this.ids=[]}add(e){if(this.runners.includes(e))return;const r=e.id+1;return this.runners.push(e),this.ids.push(r),this}clearBefore(e){const r=this.ids.indexOf(e+1)||1;return this.ids.splice(0,r,0),this.runners.splice(0,r,new gx).forEach(n=>n.clearTransformsFromQueue()),this}edit(e,r){const n=this.ids.indexOf(e+1);return this.ids.splice(n,1,e+1),this.runners.splice(n,1,r),this}getByID(e){return this.runners[this.ids.indexOf(e+1)]}length(){return this.ids.length}merge(){let e=null;for(let r=0;r<this.runners.length;++r){const n=this.runners[r];if(e&&n.done&&e.done&&(!n._timeline||!n._timeline._runnerIds.includes(n.id))&&(!e._timeline||!e._timeline._runnerIds.includes(e.id))){this.remove(n.id);const a=n.mergeWith(e);this.edit(e.id,a),e=a,--r}else e=n}return this}remove(e){const r=this.ids.indexOf(e+1);return this.ids.splice(r,1),this.runners.splice(r,1),this}}Qe({Element:{animate(t,e,r){const n=aa.sanitise(t,e,r),a=this.timeline();return new aa(n.duration).loop(n).element(this).timeline(a.play()).schedule(n.delay,n.when)},delay(t,e){return this.animate(0,t,e)},_clearTransformRunnersBefore(t){this._transformationRunners.clearBefore(t.id)},_currentTransform(t){return this._transformationRunners.runners.filter(e=>e.id<=t.id).map(eR).reduce(J_,new ze)},_addRunner(t){this._transformationRunners.add(t),yt.cancelImmediate(this._frameId),this._frameId=yt.immediate(HG.bind(this))},_prepareRunner(){this._frameId==null&&(this._transformationRunners=new $G().add(new gx(new ze(this))))}}});Ie(aa,{attr(t,e){return this.styleAttr("attr",t,e)},css(t,e){return this.styleAttr("css",t,e)},styleAttr(t,e,r){if(typeof e=="string")return this.styleAttr(t,{[e]:r});let n=e;if(this._tryRetarget(t,n))return this;let a=new ul(this._stepper).to(n),s=Object.keys(n);return this.queue(function(){a=a.from(this.element()[t](s))},function(o){return this.element()[t](a.at(o).valueOf()),a.done()},function(o){const l=Object.keys(o),c=(u=s,l.filter(p=>!u.includes(p)));var u;if(c.length){const p=this.element()[t](c),m=new df(a.from()).valueOf();Object.assign(m,p),a.from(m)}const h=new df(a.to()).valueOf();Object.assign(h,o),a.to(h),s=l,n=o}),this._rememberMorpher(t,a),this},zoom(t,e){if(this._tryRetarget("zoom",t,e))return this;let r=new ul(this._stepper).to(new Ve(t));return this.queue(function(){r=r.from(this.element().zoom())},function(n){return this.element().zoom(r.at(n),e),r.done()},function(n,a){e=a,r.to(n)}),this._rememberMorpher("zoom",r),this},transform(t,e,r){if(e=t.relative||e,this._isDeclarative&&!e&&this._tryRetarget("transform",t))return this;const n=ze.isMatrixLike(t);r=t.affine!=null?t.affine:r??!n;const a=new ul(this._stepper).type(r?Vf:ze);let s,o,l,c,u;return this.queue(function(){o=o||this.element(),s=s||ej(t,o),u=new ze(e?void 0:o),o._addRunner(this),e||o._clearTransformRunnersBefore(this)},function(h){e||this.clearTransform();const{x:p,y:m}=new mt(s).transform(o._currentTransform(this));let x=new ze({...t,origin:[p,m]}),y=this._isDeclarative&&l?l:u;if(r){x=x.decompose(p,m),y=y.decompose(p,m);const w=x.rotate,N=y.rotate,A=[w-360,w,w+360],S=A.map(T=>Math.abs(T-N)),C=Math.min(...S),k=S.indexOf(C);x.rotate=A[k]}e&&(n||(x.rotate=t.rotate||0),this._isDeclarative&&c&&(y.rotate=c)),a.from(y),a.to(x);const b=a.at(h);return c=b.rotate,l=new ze(b),this.addTransform(l),o._addRunner(this),a.done()},function(h){(h.origin||"center").toString()!==(t.origin||"center").toString()&&(s=ej(h,o)),t={...h,origin:s}},!0),this._isDeclarative&&this._rememberMorpher("transform",a),this},x(t){return this._queueNumber("x",t)},y(t){return this._queueNumber("y",t)},ax(t){return this._queueNumber("ax",t)},ay(t){return this._queueNumber("ay",t)},dx(t=0){return this._queueNumberDelta("x",t)},dy(t=0){return this._queueNumberDelta("y",t)},dmove(t,e){return this.dx(t).dy(e)},_queueNumberDelta(t,e){if(e=new Ve(e),this._tryRetarget(t,e))return this;const r=new ul(this._stepper).to(e);let n=null;return this.queue(function(){n=this.element()[t](),r.from(n),r.to(n+e)},function(a){return this.element()[t](r.at(a)),r.done()},function(a){r.to(n+new Ve(a))}),this._rememberMorpher(t,r),this},_queueObject(t,e){if(this._tryRetarget(t,e))return this;const r=new ul(this._stepper).to(e);return this.queue(function(){r.from(this.element()[t]())},function(n){return this.element()[t](r.at(n)),r.done()}),this._rememberMorpher(t,r),this},_queueNumber(t,e){return this._queueObject(t,new Ve(e))},cx(t){return this._queueNumber("cx",t)},cy(t){return this._queueNumber("cy",t)},move(t,e){return this.x(t).y(e)},amove(t,e){return this.ax(t).ay(e)},center(t,e){return this.cx(t).cy(e)},size(t,e){let r;return t&&e||(r=this._element.bbox()),t||(t=r.width/r.height*e),e||(e=r.height/r.width*t),this.width(t).height(e)},width(t){return this._queueNumber("width",t)},height(t){return this._queueNumber("height",t)},plot(t,e,r,n){if(arguments.length===4)return this.plot([t,e,r,n]);if(this._tryRetarget("plot",t))return this;const a=new ul(this._stepper).type(this._element.MorphArray).to(t);return this.queue(function(){a.from(this._element.array())},function(s){return this._element.plot(a.at(s)),a.done()}),this._rememberMorpher("plot",a),this},leading(t){return this._queueNumber("leading",t)},viewbox(t,e,r,n){return this._queueObject("viewbox",new ar(t,e,r,n))},update(t){return typeof t!="object"?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(t.opacity!=null&&this.attr("stop-opacity",t.opacity),t.color!=null&&this.attr("stop-color",t.color),t.offset!=null&&this.attr("offset",t.offset),this)}}),Ie(aa,{rx:Q4,ry:J4,from:q_,to:G_}),lt(aa,"Runner");class lj extends yn{constructor(e,r=e){super(Et("svg",e),r),this.namespace()}defs(){return this.isRoot()?Ta(this.node.querySelector("defs"))||this.put(new E0):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof it.window.SVGElement)&&this.node.parentNode.nodeName!=="#document-fragment"}namespace(){return this.isRoot()?this.attr({xmlns:V4,version:"1.1"}).attr("xmlns:xlink",Bd,o1):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,o1).attr("xmlns:svgjs",null,o1)}root(){return this.isRoot()?this:super.root()}}Qe({Container:{nested:Mt(function(){return this.put(new lj)})}}),lt(lj,"Svg",!0);let cj=class extends yn{constructor(t,e=t){super(Et("symbol",t),e)}};Qe({Container:{symbol:Mt(function(){return this.put(new cj)})}}),lt(cj,"Symbol");var tR=Object.freeze({__proto__:null,amove:function(t,e){return this.ax(t).ay(e)},ax:function(t){return this.attr("x",t)},ay:function(t){return this.attr("y",t)},build:function(t){return this._build=!!t,this},center:function(t,e,r=this.bbox()){return this.cx(t,r).cy(e,r)},cx:function(t,e=this.bbox()){return t==null?e.cx:this.attr("x",this.attr("x")+t-e.cx)},cy:function(t,e=this.bbox()){return t==null?e.cy:this.attr("y",this.attr("y")+t-e.cy)},length:function(){return this.node.getComputedTextLength()},move:function(t,e,r=this.bbox()){return this.x(t,r).y(e,r)},plain:function(t){return this._build===!1&&this.clear(),this.node.appendChild(it.document.createTextNode(t)),this},x:function(t,e=this.bbox()){return t==null?e.x:this.attr("x",this.attr("x")+t-e.x)},y:function(t,e=this.bbox()){return t==null?e.y:this.attr("y",this.attr("y")+t-e.y)}});class Qa extends ha{constructor(e,r=e){super(Et("text",e),r),this.dom.leading=this.dom.leading??new Ve(1.3),this._rebuild=!0,this._build=!1}leading(e){return e==null?this.dom.leading:(this.dom.leading=new Ve(e),this.rebuild())}rebuild(e){if(typeof e=="boolean"&&(this._rebuild=e),this._rebuild){const r=this;let n=0;const a=this.dom.leading;this.each(function(s){if(tj(this.node))return;const o=it.window.getComputedStyle(this.node).getPropertyValue("font-size"),l=a*new Ve(o);this.dom.newLined&&(this.attr("x",r.attr("x")),this.text()===`
`?n+=l:(this.attr("dy",s?l+n:0),n=0))}),this.fire("rebuild")}return this}setData(e){return this.dom=e,this.dom.leading=new Ve(e.leading||1.3),this}writeDataToDom(){return P_(this,this.dom,{leading:1.3}),this}text(e){if(e===void 0){const r=this.node.childNodes;let n=0;e="";for(let a=0,s=r.length;a<s;++a)r[a].nodeName==="textPath"||tj(r[a])?a===0&&(n=a+1):(a!==n&&r[a].nodeType!==3&&Ta(r[a]).dom.newLined===!0&&(e+=`
`),e+=r[a].textContent);return e}if(this.clear().build(!0),typeof e=="function")e.call(this,this);else for(let r=0,n=(e=(e+"").split(`
`)).length;r<n;r++)this.newLine(e[r]);return this.build(!1).rebuild()}}Ie(Qa,tR),Qe({Container:{text:Mt(function(t=""){return this.put(new Qa).text(t)}),plain:Mt(function(t=""){return this.put(new Qa).plain(t)})}}),lt(Qa,"Text");class Hg extends ha{constructor(e,r=e){super(Et("tspan",e),r),this._build=!1}dx(e){return this.attr("dx",e)}dy(e){return this.attr("dy",e)}newLine(){this.dom.newLined=!0;const e=this.parent();if(!(e instanceof Qa))return this;const r=e.index(this),n=it.window.getComputedStyle(this.node).getPropertyValue("font-size"),a=e.dom.leading*new Ve(n);return this.dy(r?a:0).attr("x",e.x())}text(e){return e==null?this.node.textContent+(this.dom.newLined?`
`:""):(typeof e=="function"?(this.clear().build(!0),e.call(this,this),this.build(!1)):this.plain(e),this)}}Ie(Hg,tR),Qe({Tspan:{tspan:Mt(function(t=""){const e=new Hg;return this._build||this.clear(),this.put(e).text(t)})},Text:{newLine:function(t=""){return this.tspan(t).newLine()}}}),lt(Hg,"Tspan");class f1 extends ha{constructor(e,r=e){super(Et("circle",e),r)}radius(e){return this.attr("r",e)}rx(e){return this.attr("r",e)}ry(e){return this.rx(e)}size(e){return this.radius(new Ve(e).divide(2))}}Ie(f1,{x:H_,y:$_,cx:Y_,cy:U_,width:W_,height:X_}),Qe({Container:{circle:Mt(function(t=0){return this.put(new f1).size(t).move(0,0)})}}),lt(f1,"Circle");class p1 extends yn{constructor(e,r=e){super(Et("clipPath",e),r)}remove(){return this.targets().forEach(function(e){e.unclip()}),super.remove()}targets(){return Ql("svg [clip-path*="+this.id()+"]")}}Qe({Container:{clip:Mt(function(){return this.defs().put(new p1)})},Element:{clipper(){return this.reference("clip-path")},clipWith(t){const e=t instanceof p1?t:this.parent().clip().add(t);return this.attr("clip-path","url(#"+e.id()+")")},unclip(){return this.attr("clip-path",null)}}}),lt(p1,"ClipPath");class k6 extends Zr{constructor(e,r=e){super(Et("foreignObject",e),r)}}Qe({Container:{foreignObject:Mt(function(t,e){return this.put(new k6).size(t,e)})}}),lt(k6,"ForeignObject");var rR=Object.freeze({__proto__:null,dmove:function(t,e){return this.children().forEach(r=>{let n;try{n=r.node instanceof Wf().SVGSVGElement?new ar(r.attr(["x","y","width","height"])):r.bbox()}catch{return}const a=new ze(r),s=a.translate(t,e).transform(a.inverse()),o=new mt(n.x,n.y).transform(s);r.move(o.x,o.y)}),this},dx:function(t){return this.dmove(t,0)},dy:function(t){return this.dmove(0,t)},height:function(t,e=this.bbox()){return t==null?e.height:this.size(e.width,t,e)},move:function(t=0,e=0,r=this.bbox()){const n=t-r.x,a=e-r.y;return this.dmove(n,a)},size:function(t,e,r=this.bbox()){const n=Id(this,t,e,r),a=n.width/r.width,s=n.height/r.height;return this.children().forEach(o=>{const l=new mt(r).transform(new ze(o).inverse());o.scale(a,s,l.x,l.y)}),this},width:function(t,e=this.bbox()){return t==null?e.width:this.size(t,e.height,e)},x:function(t,e=this.bbox()){return t==null?e.x:this.move(t,e.y,e)},y:function(t,e=this.bbox()){return t==null?e.y:this.move(e.x,t,e)}});class ho extends yn{constructor(e,r=e){super(Et("g",e),r)}}Ie(ho,rR),Qe({Container:{group:Mt(function(){return this.put(new ho)})}}),lt(ho,"G");let $m=class extends yn{constructor(e,r=e){super(Et("a",e),r)}target(e){return this.attr("target",e)}to(e){return this.attr("href",e,Bd)}};Ie($m,rR),Qe({Container:{link:Mt(function(t){return this.put(new $m).to(t)})},Element:{unlink(){const t=this.linker();if(!t)return this;const e=t.parent();if(!e)return this.remove();const r=e.index(t);return e.add(this,r),t.remove(),this},linkTo(t){let e=this.linker();return e||(e=new $m,this.wrap(e)),typeof t=="function"?t.call(e,e):e.to(t),this},linker(){const t=this.parent();return t&&t.node.nodeName.toLowerCase()==="a"?t:null}}}),lt($m,"A");class m1 extends yn{constructor(e,r=e){super(Et("mask",e),r)}remove(){return this.targets().forEach(function(e){e.unmask()}),super.remove()}targets(){return Ql("svg [mask*="+this.id()+"]")}}Qe({Container:{mask:Mt(function(){return this.defs().put(new m1)})},Element:{masker(){return this.reference("mask")},maskWith(t){const e=t instanceof m1?t:this.parent().mask().add(t);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}}),lt(m1,"Mask");class D6 extends Zr{constructor(e,r=e){super(Et("stop",e),r)}update(e){return(typeof e=="number"||e instanceof Ve)&&(e={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),e.opacity!=null&&this.attr("stop-opacity",e.opacity),e.color!=null&&this.attr("stop-color",e.color),e.offset!=null&&this.attr("offset",new Ve(e.offset)),this}}Qe({Gradient:{stop:function(t,e,r){return this.put(new D6).update(t,e,r)}}}),lt(D6,"Stop");class g1 extends Zr{constructor(e,r=e){super(Et("style",e),r)}addText(e=""){return this.node.textContent+=e,this}font(e,r,n={}){return this.rule("@font-face",{fontFamily:e,src:r,...n})}rule(e,r){return this.addText(function(n,a){if(!n)return"";if(!a)return n;let s=n+"{";for(const o in a)s+=o.replace(/([A-Z])/g,function(l,c){return"-"+c.toLowerCase()})+":"+a[o]+";";return s+="}",s}(e,r))}}Qe("Dom",{style(t,e){return this.put(new g1).rule(t,e)},fontface(t,e,r){return this.put(new g1).font(t,e,r)}}),lt(g1,"Style");class x1 extends Qa{constructor(e,r=e){super(Et("textPath",e),r)}array(){const e=this.track();return e?e.array():null}plot(e){const r=this.track();let n=null;return r&&(n=r.plot(e)),e==null?n:this}track(){return this.reference("href")}}Qe({Container:{textPath:Mt(function(t,e){return t instanceof Qa||(t=this.text(t)),t.path(e)})},Text:{path:Mt(function(t,e=!0){const r=new x1;let n;if(t instanceof id||(t=this.defs().path(t)),r.attr("href","#"+t,Bd),e)for(;n=this.node.firstChild;)r.node.appendChild(n);return this.put(r)}),textPath(){return this.findOne("textPath")}},Path:{text:Mt(function(t){return t instanceof Qa||(t=new Qa().addTo(this.parent()).text(t)),t.path(this)}),targets(){return Ql("svg textPath").filter(t=>(t.attr("href")||"").includes(this.id()))}}}),x1.prototype.MorphArray=Za,lt(x1,"TextPath");class T6 extends ha{constructor(e,r=e){super(Et("use",e),r)}use(e,r){return this.attr("href",(r||"")+"#"+e,Bd)}}Qe({Container:{use:Mt(function(t,e){return this.put(new T6).use(t,e)})}}),lt(T6,"Use");const YG=pn;Ie([lj,cj,Ig,cf,Bg],Cn("viewbox")),Ie([xl,yl,bl,id],Cn("marker")),Ie(Qa,Cn("Text")),Ie(id,Cn("Path")),Ie(E0,Cn("Defs")),Ie([Qa,Hg],Cn("Tspan")),Ie([Fg,zg,Hh,aa],Cn("radius")),Ie(Xf,Cn("EventTarget")),Ie(yo,Cn("Dom")),Ie(Zr,Cn("Element")),Ie(ha,Cn("Shape")),Ie([yn,V_],Cn("Container")),Ie(Hh,Cn("Gradient")),Ie(aa,Cn("Runner")),Hl.extend([...new Set(E_)]),function(t=[]){oj.push(...[].concat(t))}([Ve,Nt,ar,ze,$l,vo,Za,mt]),Ie(oj,{to(t){return new ul().type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,e,r,n,a){return this.fromArray(t.map(function(s,o){return n.step(s,e[o],r,a[o],a)}))}});class Bt extends Zr{constructor(e){super(Et("filter",e),e),this.$source="SourceGraphic",this.$sourceAlpha="SourceAlpha",this.$background="BackgroundImage",this.$backgroundAlpha="BackgroundAlpha",this.$fill="FillPaint",this.$stroke="StrokePaint",this.$autoSetIn=!0}put(e,r){return!(e=super.put(e,r)).attr("in")&&this.$autoSetIn&&e.attr("in",this.$source),e.attr("result")||e.attr("result",e.id()),e}remove(){return this.targets().each("unfilter"),super.remove()}targets(){return Ql('svg [filter*="'+this.id()+'"]')}toString(){return"url(#"+this.id()+")"}}class rN extends Zr{constructor(e,r){super(e,r),this.result(this.id())}in(e){if(e==null){const r=this.attr("in");return this.parent()&&this.parent().find(`[result="${r}"]`)[0]||r}return this.attr("in",e)}result(e){return this.attr("result",e)}toString(){return this.result()}}const Sa=t=>function(...e){for(let r=t.length;r--;)e[r]!=null&&this.attr(t[r],e[r])},UG={blend:Sa(["in","in2","mode"]),colorMatrix:Sa(["type","values"]),composite:Sa(["in","in2","operator"]),convolveMatrix:function(t){t=new $l(t).toString(),this.attr({order:Math.sqrt(t.split(" ").length),kernelMatrix:t})},diffuseLighting:Sa(["surfaceScale","lightingColor","diffuseConstant","kernelUnitLength"]),displacementMap:Sa(["in","in2","scale","xChannelSelector","yChannelSelector"]),dropShadow:Sa(["in","dx","dy","stdDeviation"]),flood:Sa(["flood-color","flood-opacity"]),gaussianBlur:function(t=0,e=t){this.attr("stdDeviation",t+" "+e)},image:function(t){this.attr("href",t,Bd)},morphology:Sa(["operator","radius"]),offset:Sa(["dx","dy"]),specularLighting:Sa(["surfaceScale","lightingColor","diffuseConstant","specularExponent","kernelUnitLength"]),tile:Sa([]),turbulence:Sa(["baseFrequency","numOctaves","seed","stitchTiles","type"])};["blend","colorMatrix","componentTransfer","composite","convolveMatrix","diffuseLighting","displacementMap","dropShadow","flood","gaussianBlur","image","merge","morphology","offset","specularLighting","tile","turbulence"].forEach(t=>{const e=zd(t),r=UG[t];Bt[e+"Effect"]=class extends rN{constructor(n){super(Et("fe"+e,n),n)}update(n){return r.apply(this,n),this}},Bt.prototype[t]=Mt(function(n,...a){const s=new Bt[e+"Effect"];return n==null?this.put(s):(typeof n=="function"?n.call(s,s):a.unshift(n),this.put(s).update(a))})}),Ie(Bt,{merge(t){const e=this.put(new Bt.MergeEffect);return typeof t=="function"?(t.call(e,e),e):((t instanceof Array?t:[...arguments]).forEach(r=>{r instanceof Bt.MergeNode?e.put(r):e.mergeNode(r)}),e)},componentTransfer(t={}){const e=this.put(new Bt.ComponentTransferEffect);if(typeof t=="function")return t.call(e,e),e;t.r||t.g||t.b||t.a||(t={r:t,g:t,b:t,a:t});for(const r in t)e.add(new Bt["Func"+r.toUpperCase()](t[r]));return e}});["distantLight","pointLight","spotLight","mergeNode","FuncR","FuncG","FuncB","FuncA"].forEach(t=>{const e=zd(t);Bt[e]=class extends rN{constructor(r){super(Et("fe"+e,r),r)}}});["funcR","funcG","funcB","funcA"].forEach(function(t){const e=Bt[zd(t)],r=Mt(function(){return this.put(new e)});Bt.ComponentTransferEffect.prototype[t]=r});["distantLight","pointLight","spotLight"].forEach(t=>{const e=Bt[zd(t)],r=Mt(function(){return this.put(new e)});Bt.DiffuseLightingEffect.prototype[t]=r,Bt.SpecularLightingEffect.prototype[t]=r}),Ie(Bt.MergeEffect,{mergeNode(t){return this.put(new Bt.MergeNode).attr("in",t)}}),Ie(E0,{filter:function(t){const e=this.put(new Bt);return typeof t=="function"&&t.call(e,e),e}}),Ie(yn,{filter:function(t){return this.defs().filter(t)}}),Ie(Zr,{filterWith:function(t){const e=t instanceof Bt?t:this.defs().filter(t);return this.attr("filter",e)},unfilter:function(t){return this.attr("filter",null)},filterer(){return this.reference("filter")}});const WG={blend:function(t,e){return this.parent()&&this.parent().blend(this,t,e)},colorMatrix:function(t,e){return this.parent()&&this.parent().colorMatrix(t,e).in(this)},componentTransfer:function(t){return this.parent()&&this.parent().componentTransfer(t).in(this)},composite:function(t,e){return this.parent()&&this.parent().composite(this,t,e)},convolveMatrix:function(t){return this.parent()&&this.parent().convolveMatrix(t).in(this)},diffuseLighting:function(t,e,r,n){return this.parent()&&this.parent().diffuseLighting(t,r,n).in(this)},displacementMap:function(t,e,r,n){return this.parent()&&this.parent().displacementMap(this,t,e,r,n)},dropShadow:function(t,e,r){return this.parent()&&this.parent().dropShadow(this,t,e,r).in(this)},flood:function(t,e){return this.parent()&&this.parent().flood(t,e)},gaussianBlur:function(t,e){return this.parent()&&this.parent().gaussianBlur(t,e).in(this)},image:function(t){return this.parent()&&this.parent().image(t)},merge:function(t){return t=t instanceof Array?t:[...t],this.parent()&&this.parent().merge(this,...t)},morphology:function(t,e){return this.parent()&&this.parent().morphology(t,e).in(this)},offset:function(t,e){return this.parent()&&this.parent().offset(t,e).in(this)},specularLighting:function(t,e,r,n,a){return this.parent()&&this.parent().specularLighting(t,r,n,a).in(this)},tile:function(){return this.parent()&&this.parent().tile().in(this)},turbulence:function(t,e,r,n,a){return this.parent()&&this.parent().turbulence(t,e,r,n,a).in(this)}};Ie(rN,WG),Ie(Bt.MergeEffect,{in:function(t){return t instanceof Bt.MergeNode?this.add(t,0):this.add(new Bt.MergeNode().in(t),0),this}}),Ie([Bt.CompositeEffect,Bt.BlendEffect,Bt.DisplacementMapEffect],{in2:function(t){if(t==null){const e=this.attr("in2");return this.parent()&&this.parent().find(`[result="${e}"]`)[0]||e}return this.attr("in2",t)}}),Bt.filter={sepiatone:[.343,.669,.119,0,0,.249,.626,.13,0,0,.172,.334,.111,0,0,0,0,0,1,0]};var Gr=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w}return Ae(t,[{key:"getDefaultFilter",value:function(e,r){var n=this.w;e.unfilter(!0),new Bt().size("120%","180%","-5%","-40%"),n.config.chart.dropShadow.enabled&&this.dropShadow(e,n.config.chart.dropShadow,r)}},{key:"applyFilter",value:function(e,r,n){var a,s=this,o=this.w;if(e.unfilter(!0),n!=="none"){var l,c,u=o.config.chart.dropShadow,h=n==="lighten"?2:.3;e.filterWith(function(p){p.colorMatrix({type:"matrix",values:`
`.concat(h,` 0 0 0 0
0 `).concat(h,` 0 0 0
0 0 `).concat(h,` 0 0
0 0 0 1 0
`),in:"SourceGraphic",result:"brightness"}),u.enabled&&s.addShadow(p,r,u,"brightness")}),!u.noUserSpaceOnUse&&((l=e.filterer())===null||l===void 0||(c=l.node)===null||c===void 0||c.setAttribute("filterUnits","userSpaceOnUse")),this._scaleFilterSize((a=e.filterer())===null||a===void 0?void 0:a.node)}else this.getDefaultFilter(e,r)}},{key:"addShadow",value:function(e,r,n,a){var s,o=this.w,l=n.blur,c=n.top,u=n.left,h=n.color,p=n.opacity;if(h=Array.isArray(h)?h[r]:h,((s=o.config.chart.dropShadow.enabledOnSeries)===null||s===void 0?void 0:s.length)>0&&o.config.chart.dropShadow.enabledOnSeries.indexOf(r)===-1)return e;e.offset({in:a,dx:u,dy:c,result:"offset"}),e.gaussianBlur({in:"offset",stdDeviation:l,result:"blur"}),e.flood({"flood-color":h,"flood-opacity":p,result:"flood"}),e.composite({in:"flood",in2:"blur",operator:"in",result:"shadow"}),e.merge(["shadow",a])}},{key:"dropShadow",value:function(e,r){var n,a,s,o,l,c=this,u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,h=this.w;return e.unfilter(!0),J.isMsEdge()&&h.config.chart.type==="radialBar"||((n=h.config.chart.dropShadow.enabledOnSeries)===null||n===void 0?void 0:n.length)>0&&((s=h.config.chart.dropShadow.enabledOnSeries)===null||s===void 0?void 0:s.indexOf(u))===-1?e:(e.filterWith(function(p){c.addShadow(p,u,r,"SourceGraphic")}),r.noUserSpaceOnUse||(o=e.filterer())===null||o===void 0||(l=o.node)===null||l===void 0||l.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize((a=e.filterer())===null||a===void 0?void 0:a.node),e)}},{key:"setSelectionFilter",value:function(e,r,n){var a=this.w;if(a.globals.selectedDataPoints[r]!==void 0&&a.globals.selectedDataPoints[r].indexOf(n)>-1){e.node.setAttribute("selected",!0);var s=a.config.states.active.filter;s!=="none"&&this.applyFilter(e,r,s.type)}}},{key:"_scaleFilterSize",value:function(e){e&&function(r){for(var n in r)r.hasOwnProperty(n)&&e.setAttribute(n,r[n])}({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}]),t}(),ge=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w}return Ae(t,[{key:"roundPathCorners",value:function(e,r){function n(_,L,P){var R=L.x-_.x,z=L.y-_.y,B=Math.sqrt(R*R+z*z);return a(_,L,Math.min(1,P/B))}function a(_,L,P){return{x:_.x+(L.x-_.x)*P,y:_.y+(L.y-_.y)*P}}function s(_,L){_.length>2&&(_[_.length-2]=L.x,_[_.length-1]=L.y)}function o(_){return{x:parseFloat(_[_.length-2]),y:parseFloat(_[_.length-1])}}e.indexOf("NaN")>-1&&(e="");var l=e.split(/[,\s]/).reduce(function(_,L){var P=L.match(/^([a-zA-Z])(.+)/);return P?(_.push(P[1]),_.push(P[2])):_.push(L),_},[]).reduce(function(_,L){return parseFloat(L)==L&&_.length?_[_.length-1].push(L):_.push([L]),_},[]),c=[];if(l.length>1){var u=o(l[0]),h=null;l[l.length-1][0]=="Z"&&l[0].length>2&&(h=["L",u.x,u.y],l[l.length-1]=h),c.push(l[0]);for(var p=1;p<l.length;p++){var m=c[c.length-1],x=l[p],y=x==h?l[1]:l[p+1];if(y&&m&&m.length>2&&x[0]=="L"&&y.length>2&&y[0]=="L"){var b,w,N=o(m),A=o(x),S=o(y);b=n(A,N,r),w=n(A,S,r),s(x,b),x.origPoint=A,c.push(x);var C=a(b,A,.5),k=a(A,w,.5),T=["C",C.x,C.y,k.x,k.y,w.x,w.y];T.origPoint=A,c.push(T)}else c.push(x)}if(h){var E=o(c[c.length-1]);c.push(["Z"]),s(c[0],E)}}else c=l;return c.reduce(function(_,L){return _+L.join(" ")+" "},"")}},{key:"drawLine",value:function(e,r,n,a){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"#a8a8a8",o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0,l=arguments.length>6&&arguments[6]!==void 0?arguments[6]:null,c=arguments.length>7&&arguments[7]!==void 0?arguments[7]:"butt";return this.w.globals.dom.Paper.line().attr({x1:e,y1:r,x2:n,y2:a,stroke:s,"stroke-dasharray":o,"stroke-width":l,"stroke-linecap":c})}},{key:"drawRect",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"#fefefe",l=arguments.length>6&&arguments[6]!==void 0?arguments[6]:1,c=arguments.length>7&&arguments[7]!==void 0?arguments[7]:null,u=arguments.length>8&&arguments[8]!==void 0?arguments[8]:null,h=arguments.length>9&&arguments[9]!==void 0?arguments[9]:0,p=this.w.globals.dom.Paper.rect();return p.attr({x:e,y:r,width:n>0?n:0,height:a>0?a:0,rx:s,ry:s,opacity:l,"stroke-width":c!==null?c:0,stroke:u!==null?u:"none","stroke-dasharray":h}),p.node.setAttribute("fill",o),p}},{key:"drawPolygon",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"#e1e1e1",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"none";return this.w.globals.dom.Paper.polygon(e).attr({fill:a,stroke:r,"stroke-width":n})}},{key:"drawCircle",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;e<0&&(e=0);var n=this.w.globals.dom.Paper.circle(2*e);return r!==null&&n.attr(r),n}},{key:"drawPath",value:function(e){var r=e.d,n=r===void 0?"":r,a=e.stroke,s=a===void 0?"#a8a8a8":a,o=e.strokeWidth,l=o===void 0?1:o,c=e.fill,u=e.fillOpacity,h=u===void 0?1:u,p=e.strokeOpacity,m=p===void 0?1:p,x=e.classes,y=e.strokeLinecap,b=y===void 0?null:y,w=e.strokeDashArray,N=w===void 0?0:w,A=this.w;return b===null&&(b=A.config.stroke.lineCap),(n.indexOf("undefined")>-1||n.indexOf("NaN")>-1)&&(n="M 0 ".concat(A.globals.gridHeight)),A.globals.dom.Paper.path(n).attr({fill:c,"fill-opacity":h,stroke:s,"stroke-opacity":m,"stroke-linecap":b,"stroke-width":l,"stroke-dasharray":N,class:x})}},{key:"group",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,r=this.w.globals.dom.Paper.group();return e!==null&&r.attr(e),r}},{key:"move",value:function(e,r){var n=["M",e,r].join(" ");return n}},{key:"line",value:function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,a=null;return n===null?a=[" L",e,r].join(" "):n==="H"?a=[" H",e].join(" "):n==="V"&&(a=[" V",r].join(" ")),a}},{key:"curve",value:function(e,r,n,a,s,o){var l=["C",e,r,n,a,s,o].join(" ");return l}},{key:"quadraticCurve",value:function(e,r,n,a){return["Q",e,r,n,a].join(" ")}},{key:"arc",value:function(e,r,n,a,s,o,l){var c="A";arguments.length>7&&arguments[7]!==void 0&&arguments[7]&&(c="a");var u=[c,e,r,n,a,s,o,l].join(" ");return u}},{key:"renderPaths",value:function(e){var r,n=e.j,a=e.realIndex,s=e.pathFrom,o=e.pathTo,l=e.stroke,c=e.strokeWidth,u=e.strokeLinecap,h=e.fill,p=e.animationDelay,m=e.initialSpeed,x=e.dataChangeSpeed,y=e.className,b=e.chartType,w=e.shouldClipToGrid,N=w===void 0||w,A=e.bindEventsOnPaths,S=A===void 0||A,C=e.drawShadow,k=C===void 0||C,T=this.w,E=new Gr(this.ctx),_=new Ld(this.ctx),L=this.w.config.chart.animations.enabled,P=L&&this.w.config.chart.animations.dynamicAnimation.enabled;if(s&&s.startsWith("M 0 0")&&o){var R=o.match(/^M\s+[\d.-]+\s+[\d.-]+/);R&&(s=s.replace(/^M\s+0\s+0/,R[0]))}var z=!!(L&&!T.globals.resized||P&&T.globals.dataChanged&&T.globals.shouldAnimate);z?r=s:(r=o,T.globals.animationEnded=!0);var B=T.config.stroke.dashArray,Y=0;Y=Array.isArray(B)?B[a]:T.config.stroke.dashArray;var X=this.drawPath({d:r,stroke:l,strokeWidth:c,fill:h,fillOpacity:1,classes:y,strokeLinecap:u,strokeDashArray:Y});X.attr("index",a),N&&(b==="bar"&&!T.globals.isHorizontal||T.globals.comboCharts?X.attr({"clip-path":"url(#gridRectBarMask".concat(T.globals.cuid,")")}):X.attr({"clip-path":"url(#gridRectMask".concat(T.globals.cuid,")")})),T.config.chart.dropShadow.enabled&&k&&E.dropShadow(X,T.config.chart.dropShadow,a),S&&(X.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,X)),X.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,X)),X.node.addEventListener("mousedown",this.pathMouseDown.bind(this,X))),X.attr({pathTo:o,pathFrom:s});var H={el:X,j:n,realIndex:a,pathFrom:s,pathTo:o,fill:h,strokeWidth:c,delay:p};return!L||T.globals.resized||T.globals.dataChanged?!T.globals.resized&&T.globals.dataChanged||_.showDelayedElements():_.animatePathsGradually(ve(ve({},H),{},{speed:m})),T.globals.dataChanged&&P&&z&&_.animatePathsGradually(ve(ve({},H),{},{speed:x})),X}},{key:"drawPattern",value:function(e,r,n){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"#a8a8a8",s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;return this.w.globals.dom.Paper.pattern(r,n,function(o){e==="horizontalLines"?o.line(0,0,n,0).stroke({color:a,width:s+1}):e==="verticalLines"?o.line(0,0,0,r).stroke({color:a,width:s+1}):e==="slantedLines"?o.line(0,0,r,n).stroke({color:a,width:s}):e==="squares"?o.rect(r,n).fill("none").stroke({color:a,width:s}):e==="circles"&&o.circle(r).fill("none").stroke({color:a,width:s})})}},{key:"drawGradient",value:function(e,r,n,a,s){var o,l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:null,c=arguments.length>6&&arguments[6]!==void 0?arguments[6]:null,u=arguments.length>7&&arguments[7]!==void 0?arguments[7]:[],h=arguments.length>8&&arguments[8]!==void 0?arguments[8]:0,p=this.w;r.length<9&&r.indexOf("#")===0&&(r=J.hexToRgba(r,a)),n.length<9&&n.indexOf("#")===0&&(n=J.hexToRgba(n,s));var m=0,x=1,y=1,b=null;c!==null&&(m=c[0]!==void 0?c[0]/100:0,x=c[1]!==void 0?c[1]/100:1,y=c[2]!==void 0?c[2]/100:1,b=c[3]!==void 0?c[3]/100:null);var w=!(p.config.chart.type!=="donut"&&p.config.chart.type!=="pie"&&p.config.chart.type!=="polarArea"&&p.config.chart.type!=="bubble");if(o=u&&u.length!==0?p.globals.dom.Paper.gradient(w?"radial":"linear",function(S){(Array.isArray(u[h])?u[h]:u).forEach(function(C){S.stop(C.offset/100,C.color,C.opacity)})}):p.globals.dom.Paper.gradient(w?"radial":"linear",function(S){S.stop(m,r,a),S.stop(x,n,s),S.stop(y,n,s),b!==null&&S.stop(b,r,a)}),w){var N=p.globals.gridWidth/2,A=p.globals.gridHeight/2;p.config.chart.type!=="bubble"?o.attr({gradientUnits:"userSpaceOnUse",cx:N,cy:A,r:l}):o.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else e==="vertical"?o.from(0,0).to(0,1):e==="diagonal"?o.from(0,0).to(1,1):e==="horizontal"?o.from(0,1).to(1,1):e==="diagonal2"&&o.from(1,0).to(0,1);return o}},{key:"getTextBasedOnMaxWidth",value:function(e){var r=e.text,n=e.maxWidth,a=e.fontSize,s=e.fontFamily,o=this.getTextRects(r,a,s),l=o.width/r.length,c=Math.floor(n/l);return n<o.width?r.slice(0,c-3)+"...":r}},{key:"drawText",value:function(e){var r=this,n=e.x,a=e.y,s=e.text,o=e.textAnchor,l=e.fontSize,c=e.fontFamily,u=e.fontWeight,h=e.foreColor,p=e.opacity,m=e.maxWidth,x=e.cssClass,y=x===void 0?"":x,b=e.isPlainText,w=b===void 0||b,N=e.dominantBaseline,A=N===void 0?"auto":N,S=this.w;s===void 0&&(s="");var C=s;o||(o="start"),h&&h.length||(h=S.config.chart.foreColor),c=c||S.config.chart.fontFamily,u=u||"regular";var k,T={maxWidth:m,fontSize:l=l||"11px",fontFamily:c};return Array.isArray(s)?k=S.globals.dom.Paper.text(function(E){for(var _=0;_<s.length;_++)C=s[_],m&&(C=r.getTextBasedOnMaxWidth(ve({text:s[_]},T))),_===0?E.tspan(C):E.tspan(C).newLine()}):(m&&(C=this.getTextBasedOnMaxWidth(ve({text:s},T))),k=w?S.globals.dom.Paper.plain(s):S.globals.dom.Paper.text(function(E){return E.tspan(C)})),k.attr({x:n,y:a,"text-anchor":o,"dominant-baseline":A,"font-size":l,"font-family":c,"font-weight":u,fill:h,class:"apexcharts-text "+y}),k.node.style.fontFamily=c,k.node.style.opacity=p,k}},{key:"getMarkerPath",value:function(e,r,n,a){var s="";switch(n){case"cross":s="M ".concat(e-(a/=1.4)," ").concat(r-a," L ").concat(e+a," ").concat(r+a," M ").concat(e-a," ").concat(r+a," L ").concat(e+a," ").concat(r-a);break;case"plus":s="M ".concat(e-(a/=1.12)," ").concat(r," L ").concat(e+a," ").concat(r," M ").concat(e," ").concat(r-a," L ").concat(e," ").concat(r+a);break;case"star":case"sparkle":var o=5;a*=1.15,n==="sparkle"&&(a/=1.1,o=4);for(var l=Math.PI/o,c=0;c<=2*o;c++){var u=c*l,h=c%2==0?a:a/2;s+=(c===0?"M":"L")+(e+h*Math.sin(u))+","+(r-h*Math.cos(u))}s+="Z";break;case"triangle":s="M ".concat(e," ").concat(r-a,`
L `).concat(e+a," ").concat(r+a,`
L `).concat(e-a," ").concat(r+a,`
Z`);break;case"square":case"rect":s="M ".concat(e-(a/=1.125)," ").concat(r-a,`
L `).concat(e+a," ").concat(r-a,`
L `).concat(e+a," ").concat(r+a,`
L `).concat(e-a," ").concat(r+a,`
Z`);break;case"diamond":a*=1.05,s="M ".concat(e," ").concat(r-a,`
L `).concat(e+a," ").concat(r,`
L `).concat(e," ").concat(r+a,`
L `).concat(e-a," ").concat(r,`
Z`);break;case"line":s="M ".concat(e-(a/=1.1)," ").concat(r,`
L `).concat(e+a," ").concat(r);break;default:a*=2,s="M ".concat(e,", ").concat(r,`
m -`).concat(a/2,`, 0
a `).concat(a/2,",").concat(a/2," 0 1,0 ").concat(a,`,0
a `).concat(a/2,",").concat(a/2," 0 1,0 -").concat(a,",0")}return s}},{key:"drawMarkerShape",value:function(e,r,n,a,s){var o=this.drawPath({d:this.getMarkerPath(e,r,n,a,s),stroke:s.pointStrokeColor,strokeDashArray:s.pointStrokeDashArray,strokeWidth:s.pointStrokeWidth,fill:s.pointFillColor,fillOpacity:s.pointFillOpacity,strokeOpacity:s.pointStrokeOpacity});return o.attr({cx:e,cy:r,shape:s.shape,class:s.class?s.class:""}),o}},{key:"drawMarker",value:function(e,r,n){e=e||0;var a=n.pSize||0;return J.isNumber(r)||(a=0,r=0),this.drawMarkerShape(e,r,n?.shape,a,ve(ve({},n),n.shape==="line"||n.shape==="plus"||n.shape==="cross"?{pointStrokeColor:n.pointFillColor,pointStrokeOpacity:n.pointFillOpacity}:{}))}},{key:"pathMouseEnter",value:function(e,r){var n=this.w,a=new Gr(this.ctx),s=parseInt(e.node.getAttribute("index"),10),o=parseInt(e.node.getAttribute("j"),10);if(typeof n.config.chart.events.dataPointMouseEnter=="function"&&n.config.chart.events.dataPointMouseEnter(r,this.ctx,{seriesIndex:s,dataPointIndex:o,w:n}),this.ctx.events.fireEvent("dataPointMouseEnter",[r,this.ctx,{seriesIndex:s,dataPointIndex:o,w:n}]),(n.config.states.active.filter.type==="none"||e.node.getAttribute("selected")!=="true")&&n.config.states.hover.filter.type!=="none"&&!n.globals.isTouchDevice){var l=n.config.states.hover.filter;a.applyFilter(e,s,l.type)}}},{key:"pathMouseLeave",value:function(e,r){var n=this.w,a=new Gr(this.ctx),s=parseInt(e.node.getAttribute("index"),10),o=parseInt(e.node.getAttribute("j"),10);typeof n.config.chart.events.dataPointMouseLeave=="function"&&n.config.chart.events.dataPointMouseLeave(r,this.ctx,{seriesIndex:s,dataPointIndex:o,w:n}),this.ctx.events.fireEvent("dataPointMouseLeave",[r,this.ctx,{seriesIndex:s,dataPointIndex:o,w:n}]),n.config.states.active.filter.type!=="none"&&e.node.getAttribute("selected")==="true"||n.config.states.hover.filter.type!=="none"&&a.getDefaultFilter(e,s)}},{key:"pathMouseDown",value:function(e,r){var n=this.w,a=new Gr(this.ctx),s=parseInt(e.node.getAttribute("index"),10),o=parseInt(e.node.getAttribute("j"),10),l="false";if(e.node.getAttribute("selected")==="true"){if(e.node.setAttribute("selected","false"),n.globals.selectedDataPoints[s].indexOf(o)>-1){var c=n.globals.selectedDataPoints[s].indexOf(o);n.globals.selectedDataPoints[s].splice(c,1)}}else{if(!n.config.states.active.allowMultipleDataPointsSelection&&n.globals.selectedDataPoints.length>0){n.globals.selectedDataPoints=[];var u=n.globals.dom.Paper.find(".apexcharts-series path:not(.apexcharts-decoration-element)"),h=n.globals.dom.Paper.find(".apexcharts-series circle:not(.apexcharts-decoration-element), .apexcharts-series rect:not(.apexcharts-decoration-element)"),p=function(y){Array.prototype.forEach.call(y,function(b){b.node.setAttribute("selected","false"),a.getDefaultFilter(b,s)})};p(u),p(h)}e.node.setAttribute("selected","true"),l="true",n.globals.selectedDataPoints[s]===void 0&&(n.globals.selectedDataPoints[s]=[]),n.globals.selectedDataPoints[s].push(o)}if(l==="true"){var m=n.config.states.active.filter;if(m!=="none")a.applyFilter(e,s,m.type);else if(n.config.states.hover.filter!=="none"&&!n.globals.isTouchDevice){var x=n.config.states.hover.filter;a.applyFilter(e,s,x.type)}}else n.config.states.active.filter.type!=="none"&&(n.config.states.hover.filter.type==="none"||n.globals.isTouchDevice?a.getDefaultFilter(e,s):(x=n.config.states.hover.filter,a.applyFilter(e,s,x.type)));typeof n.config.chart.events.dataPointSelection=="function"&&n.config.chart.events.dataPointSelection(r,this.ctx,{selectedDataPoints:n.globals.selectedDataPoints,seriesIndex:s,dataPointIndex:o,w:n}),r&&this.ctx.events.fireEvent("dataPointSelection",[r,this.ctx,{selectedDataPoints:n.globals.selectedDataPoints,seriesIndex:s,dataPointIndex:o,w:n}])}},{key:"rotateAroundCenter",value:function(e){var r={};return e&&typeof e.getBBox=="function"&&(r=e.getBBox()),{x:r.x+r.width/2,y:r.y+r.height/2}}},{key:"getTextRects",value:function(e,r,n,a){var s=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4],o=this.w,l=this.drawText({x:-200,y:-200,text:e,textAnchor:"start",fontSize:r,fontFamily:n,foreColor:"#fff",opacity:0});a&&l.attr("transform",a),o.globals.dom.Paper.add(l);var c=l.bbox();return s||(c=l.node.getBoundingClientRect()),l.remove(),{width:c.width,height:c.height}}},{key:"placeTextWithEllipsis",value:function(e,r,n){if(typeof e.getComputedTextLength=="function"&&(e.textContent=r,r.length>0&&e.getComputedTextLength()>=n/1.1)){for(var a=r.length-3;a>0;a-=3)if(e.getSubStringLength(0,a)<=n/1.1)return void(e.textContent=r.substring(0,a)+"...");e.textContent="."}}}],[{key:"setAttrs",value:function(e,r){for(var n in r)r.hasOwnProperty(n)&&e.setAttribute(n,r[n])}}]),t}(),ir=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w}return Ae(t,[{key:"getStackedSeriesTotals",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=this.w,n=[];if(r.globals.series.length===0)return n;for(var a=0;a<r.globals.series[r.globals.maxValsInArrayIndex].length;a++){for(var s=0,o=0;o<r.globals.series.length;o++)r.globals.series[o][a]!==void 0&&e.indexOf(o)===-1&&(s+=r.globals.series[o][a]);n.push(s)}return n}},{key:"getSeriesTotalByIndex",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return e===null?this.w.config.series.reduce(function(r,n){return r+n},0):this.w.globals.series[e].reduce(function(r,n){return r+n},0)}},{key:"getStackedSeriesTotalsByGroups",value:function(){var e=this,r=this.w,n=[];return r.globals.seriesGroups.forEach(function(a){var s=[];r.config.series.forEach(function(l,c){a.indexOf(r.globals.seriesNames[c])>-1&&s.push(c)});var o=r.globals.series.map(function(l,c){return s.indexOf(c)===-1?c:-1}).filter(function(l){return l!==-1});n.push(e.getStackedSeriesTotals(o))}),n}},{key:"setSeriesYAxisMappings",value:function(){var e=this.w.globals,r=this.w.config,n=[],a=[],s=[],o=e.series.length>r.yaxis.length||r.yaxis.some(function(p){return Array.isArray(p.seriesName)});r.series.forEach(function(p,m){s.push(m),a.push(null)}),r.yaxis.forEach(function(p,m){n[m]=[]});var l=[];r.yaxis.forEach(function(p,m){var x=!1;if(p.seriesName){var y=[];Array.isArray(p.seriesName)?y=p.seriesName:y.push(p.seriesName),y.forEach(function(b){r.series.forEach(function(w,N){if(w.name===b){var A=N;m===N||o?!o||s.indexOf(N)>-1?n[m].push([m,N]):console.warn("Series '"+w.name+"' referenced more than once in what looks like the new style. That is, when using either seriesName: [], or when there are more series than yaxes."):(n[N].push([N,m]),A=m),x=!0,(A=s.indexOf(A))!==-1&&s.splice(A,1)}})})}x||l.push(m)}),n=n.map(function(p,m){var x=[];return p.forEach(function(y){a[y[1]]=y[0],x.push(y[1])}),x});for(var c=r.yaxis.length-1,u=0;u<l.length&&(c=l[u],n[c]=[],s);u++){var h=s[0];s.shift(),n[c].push(h),a[h]=c}s.forEach(function(p){n[c].push(p),a[p]=c}),e.seriesYAxisMap=n.map(function(p){return p}),e.seriesYAxisReverseMap=a.map(function(p){return p}),e.seriesYAxisMap.forEach(function(p,m){p.forEach(function(x){r.series[x]&&r.series[x].group===void 0&&(r.series[x].group="apexcharts-axis-".concat(m.toString()))})})}},{key:"isSeriesNull",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return(e===null?this.w.config.series.filter(function(r){return r!==null}):this.w.config.series[e].data.filter(function(r){return r!==null})).length===0}},{key:"seriesHaveSameValues",value:function(e){return this.w.globals.series[e].every(function(r,n,a){return r===a[0]})}},{key:"getCategoryLabels",value:function(e){var r=this.w,n=e.slice();return r.config.xaxis.convertedCatToNumeric&&(n=e.map(function(a,s){return r.config.xaxis.labels.formatter(a-r.globals.minX+1)})),n}},{key:"getLargestSeries",value:function(){var e=this.w;e.globals.maxValsInArrayIndex=e.globals.series.map(function(r){return r.length}).indexOf(Math.max.apply(Math,e.globals.series.map(function(r){return r.length})))}},{key:"getLargestMarkerSize",value:function(){var e=this.w,r=0;return e.globals.markers.size.forEach(function(n){r=Math.max(r,n)}),e.config.markers.discrete&&e.config.markers.discrete.length&&e.config.markers.discrete.forEach(function(n){r=Math.max(r,n.size)}),r>0&&(e.config.markers.hover.size>0?r=e.config.markers.hover.size:r+=e.config.markers.hover.sizeOffset),e.globals.markers.largestSize=r,r}},{key:"getSeriesTotals",value:function(){var e=this.w;e.globals.seriesTotals=e.globals.series.map(function(r,n){var a=0;if(Array.isArray(r))for(var s=0;s<r.length;s++)a+=r[s];else a+=r;return a})}},{key:"getSeriesTotalsXRange",value:function(e,r){var n=this.w;return n.globals.series.map(function(a,s){for(var o=0,l=0;l<a.length;l++)n.globals.seriesX[s][l]>e&&n.globals.seriesX[s][l]<r&&(o+=a[l]);return o})}},{key:"getPercentSeries",value:function(){var e=this.w;e.globals.seriesPercent=e.globals.series.map(function(r,n){var a=[];if(Array.isArray(r))for(var s=0;s<r.length;s++){var o=e.globals.stackedSeriesTotals[s],l=0;o&&(l=100*r[s]/o),a.push(l)}else{var c=100*r/e.globals.seriesTotals.reduce(function(u,h){return u+h},0);a.push(c)}return a})}},{key:"getCalculatedRatios",value:function(){var e,r,n,a=this,s=this.w,o=s.globals,l=[],c=0,u=[],h=.1,p=0;if(o.yRange=[],o.isMultipleYAxis)for(var m=0;m<o.minYArr.length;m++)o.yRange.push(Math.abs(o.minYArr[m]-o.maxYArr[m])),u.push(0);else o.yRange.push(Math.abs(o.minY-o.maxY));o.xRange=Math.abs(o.maxX-o.minX),o.zRange=Math.abs(o.maxZ-o.minZ);for(var x=0;x<o.yRange.length;x++)l.push(o.yRange[x]/o.gridHeight);if(r=o.xRange/o.gridWidth,e=o.yRange/o.gridWidth,n=o.xRange/o.gridHeight,(c=o.zRange/o.gridHeight*16)||(c=1),o.minY!==Number.MIN_VALUE&&Math.abs(o.minY)!==0&&(o.hasNegs=!0),s.globals.seriesYAxisReverseMap.length>0){var y=function(w,N){var A=s.config.yaxis[s.globals.seriesYAxisReverseMap[N]],S=w<0?-1:1;return w=Math.abs(w),A.logarithmic&&(w=a.getBaseLog(A.logBase,w)),-S*w/l[N]};if(o.isMultipleYAxis){u=[];for(var b=0;b<l.length;b++)u.push(y(o.minYArr[b],b))}else(u=[]).push(y(o.minY,0)),o.minY!==Number.MIN_VALUE&&Math.abs(o.minY)!==0&&(h=-o.minY/e,p=o.minX/r)}else(u=[]).push(0),h=0,p=0;return{yRatio:l,invertedYRatio:e,zRatio:c,xRatio:r,invertedXRatio:n,baseLineInvertedY:h,baseLineY:u,baseLineX:p}}},{key:"getLogSeries",value:function(e){var r=this,n=this.w;return n.globals.seriesLog=e.map(function(a,s){var o=n.globals.seriesYAxisReverseMap[s];return n.config.yaxis[o]&&n.config.yaxis[o].logarithmic?a.map(function(l){return l===null?null:r.getLogVal(n.config.yaxis[o].logBase,l,s)}):a}),n.globals.invalidLogScale?e:n.globals.seriesLog}},{key:"getLogValAtSeriesIndex",value:function(e,r){if(e===null)return null;var n=this.w,a=n.globals.seriesYAxisReverseMap[r];return n.config.yaxis[a]&&n.config.yaxis[a].logarithmic?this.getLogVal(n.config.yaxis[a].logBase,e,r):e}},{key:"getBaseLog",value:function(e,r){return Math.log(r)/Math.log(e)}},{key:"getLogVal",value:function(e,r,n){if(r<=0)return 0;var a=this.w,s=a.globals.minYArr[n]===0?-1:this.getBaseLog(e,a.globals.minYArr[n]),o=(a.globals.maxYArr[n]===0?0:this.getBaseLog(e,a.globals.maxYArr[n]))-s;return r<1?r/o:(this.getBaseLog(e,r)-s)/o}},{key:"getLogYRatios",value:function(e){var r=this,n=this.w,a=this.w.globals;return a.yLogRatio=e.slice(),a.logYRange=a.yRange.map(function(s,o){var l=n.globals.seriesYAxisReverseMap[o];if(n.config.yaxis[l]&&r.w.config.yaxis[l].logarithmic){var c,u=-Number.MAX_VALUE,h=Number.MIN_VALUE;return a.seriesLog.forEach(function(p,m){p.forEach(function(x){n.config.yaxis[m]&&n.config.yaxis[m].logarithmic&&(u=Math.max(x,u),h=Math.min(x,h))})}),c=Math.pow(a.yRange[o],Math.abs(h-u)/a.yRange[o]),a.yLogRatio[o]=c/a.gridHeight,c}}),a.invalidLogScale?e.slice():a.yLogRatio}},{key:"drawSeriesByGroup",value:function(e,r,n,a){var s=this.w,o=[];return e.series.length>0&&r.forEach(function(l){var c=[],u=[];e.i.forEach(function(h,p){s.config.series[h].group===l&&(c.push(e.series[p]),u.push(h))}),c.length>0&&o.push(a.draw(c,n,u))}),o}}],[{key:"checkComboSeries",value:function(e,r){var n=!1,a=0,s=0;return r===void 0&&(r="line"),e.length&&e[0].type!==void 0&&e.forEach(function(o){o.type!=="bar"&&o.type!=="column"&&o.type!=="candlestick"&&o.type!=="boxPlot"||a++,o.type!==void 0&&o.type!==r&&s++}),s>0&&(n=!0),{comboBarCount:a,comboCharts:n}}},{key:"extendArrayProps",value:function(e,r,n){var a,s,o,l,c,u;return(a=r)!==null&&a!==void 0&&a.yaxis&&(r=e.extendYAxis(r,n)),(s=r)!==null&&s!==void 0&&s.annotations&&(r.annotations.yaxis&&(r=e.extendYAxisAnnotations(r)),(o=r)!==null&&o!==void 0&&(l=o.annotations)!==null&&l!==void 0&&l.xaxis&&(r=e.extendXAxisAnnotations(r)),(c=r)!==null&&c!==void 0&&(u=c.annotations)!==null&&u!==void 0&&u.points&&(r=e.extendPointAnnotations(r))),r}}]),t}(),O0=function(){function t(e){Se(this,t),this.w=e.w,this.annoCtx=e}return Ae(t,[{key:"setOrientations",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,n=this.w;if(e.label.orientation==="vertical"){var a=r!==null?r:0,s=n.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='".concat(a,"']"));if(s!==null){var o=s.getBoundingClientRect();s.setAttribute("x",parseFloat(s.getAttribute("x"))-o.height+4);var l=e.label.position==="top"?o.width:-o.width;s.setAttribute("y",parseFloat(s.getAttribute("y"))+l);var c=this.annoCtx.graphics.rotateAroundCenter(s),u=c.x,h=c.y;s.setAttribute("transform","rotate(-90 ".concat(u," ").concat(h,")"))}}}},{key:"addBackgroundToAnno",value:function(e,r){var n=this.w;if(!e||!r.label.text||!String(r.label.text).trim())return null;var a=n.globals.dom.baseEl.querySelector(".apexcharts-grid").getBoundingClientRect(),s=e.getBoundingClientRect(),o=r.label.style.padding,l=o.left,c=o.right,u=o.top,h=o.bottom;if(r.label.orientation==="vertical"){var p=[l,c,u,h];u=p[0],h=p[1],l=p[2],c=p[3]}var m=s.left-a.left-l,x=s.top-a.top-u,y=this.annoCtx.graphics.drawRect(m-n.globals.barPadForNumericAxis,x,s.width+l+c,s.height+u+h,r.label.borderRadius,r.label.style.background,1,r.label.borderWidth,r.label.borderColor,0);return r.id&&y.node.classList.add(r.id),y}},{key:"annotationsBackground",value:function(){var e=this,r=this.w,n=function(a,s,o){var l=r.globals.dom.baseEl.querySelector(".apexcharts-".concat(o,"-annotations .apexcharts-").concat(o,"-annotation-label[rel='").concat(s,"']"));if(l){var c=l.parentNode,u=e.addBackgroundToAnno(l,a);u&&(c.insertBefore(u.node,l),a.label.mouseEnter&&u.node.addEventListener("mouseenter",a.label.mouseEnter.bind(e,a)),a.label.mouseLeave&&u.node.addEventListener("mouseleave",a.label.mouseLeave.bind(e,a)),a.label.click&&u.node.addEventListener("click",a.label.click.bind(e,a)))}};r.config.annotations.xaxis.forEach(function(a,s){return n(a,s,"xaxis")}),r.config.annotations.yaxis.forEach(function(a,s){return n(a,s,"yaxis")}),r.config.annotations.points.forEach(function(a,s){return n(a,s,"point")})}},{key:"getY1Y2",value:function(e,r){var n,a=this.w,s=e==="y1"?r.y:r.y2,o=!1;if(this.annoCtx.invertAxis){var l=a.config.xaxis.convertedCatToNumeric?a.globals.categoryLabels:a.globals.labels,c=l.indexOf(s),u=a.globals.dom.baseEl.querySelector(".apexcharts-yaxis-texts-g text:nth-child(".concat(c+1,")"));n=u?parseFloat(u.getAttribute("y")):(a.globals.gridHeight/l.length-1)*(c+1)-a.globals.barHeight,r.seriesIndex!==void 0&&a.globals.barHeight&&(n-=a.globals.barHeight/2*(a.globals.series.length-1)-a.globals.barHeight*r.seriesIndex)}else{var h,p=a.globals.seriesYAxisMap[r.yAxisIndex][0],m=a.config.yaxis[r.yAxisIndex].logarithmic?new ir(this.annoCtx.ctx).getLogVal(a.config.yaxis[r.yAxisIndex].logBase,s,p)/a.globals.yLogRatio[p]:(s-a.globals.minYArr[p])/(a.globals.yRange[p]/a.globals.gridHeight);n=a.globals.gridHeight-Math.min(Math.max(m,0),a.globals.gridHeight),o=m>a.globals.gridHeight||m<0,!r.marker||r.y!==void 0&&r.y!==null||(n=0),(h=a.config.yaxis[r.yAxisIndex])!==null&&h!==void 0&&h.reversed&&(n=m)}return typeof s=="string"&&s.includes("px")&&(n=parseFloat(s)),{yP:n,clipped:o}}},{key:"getX1X2",value:function(e,r){var n=this.w,a=e==="x1"?r.x:r.x2,s=this.annoCtx.invertAxis?n.globals.minY:n.globals.minX,o=this.annoCtx.invertAxis?n.globals.maxY:n.globals.maxX,l=this.annoCtx.invertAxis?n.globals.yRange[0]:n.globals.xRange,c=!1,u=this.annoCtx.inversedReversedAxis?(o-a)/(l/n.globals.gridWidth):(a-s)/(l/n.globals.gridWidth);return n.config.xaxis.type!=="category"&&!n.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||n.globals.dataFormatXNumeric||n.config.chart.sparkline.enabled||(u=this.getStringX(a)),typeof a=="string"&&a.includes("px")&&(u=parseFloat(a)),a==null&&r.marker&&(u=n.globals.gridWidth),r.seriesIndex!==void 0&&n.globals.barWidth&&!this.annoCtx.invertAxis&&(u-=n.globals.barWidth/2*(n.globals.series.length-1)-n.globals.barWidth*r.seriesIndex),typeof u!="number"&&(u=0,c=!0),parseFloat(u.toFixed(10))>parseFloat(n.globals.gridWidth.toFixed(10))?(u=n.globals.gridWidth,c=!0):u<0&&(u=0,c=!0),{x:u,clipped:c}}},{key:"getStringX",value:function(e){var r=this.w,n=e;r.config.xaxis.convertedCatToNumeric&&r.globals.categoryLabels.length&&(e=r.globals.categoryLabels.indexOf(e)+1);var a=r.globals.labels.map(function(o){return Array.isArray(o)?o.join(" "):o}).indexOf(e),s=r.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g text:nth-child(".concat(a+1,")"));return s&&(n=parseFloat(s.getAttribute("x"))),n}}]),t}(),XG=function(){function t(e){Se(this,t),this.w=e.w,this.annoCtx=e,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new O0(this.annoCtx)}return Ae(t,[{key:"addXaxisAnnotation",value:function(e,r,n){var a,s=this.w,o=this.helpers.getX1X2("x1",e),l=o.x,c=o.clipped,u=!0,h=e.label.text,p=e.strokeDashArray;if(J.isNumber(l)){if(e.x2===null||e.x2===void 0){if(!c){var m=this.annoCtx.graphics.drawLine(l+e.offsetX,0+e.offsetY,l+e.offsetX,s.globals.gridHeight+e.offsetY,e.borderColor,p,e.borderWidth);r.appendChild(m.node),e.id&&m.node.classList.add(e.id)}}else{var x=this.helpers.getX1X2("x2",e);if(a=x.x,u=x.clipped,a<l){var y=l;l=a,a=y}var b=this.annoCtx.graphics.drawRect(l+e.offsetX,0+e.offsetY,a-l,s.globals.gridHeight+e.offsetY,0,e.fillColor,e.opacity,1,e.borderColor,p);b.node.classList.add("apexcharts-annotation-rect"),b.attr("clip-path","url(#gridRectMask".concat(s.globals.cuid,")")),r.appendChild(b.node),e.id&&b.node.classList.add(e.id)}if(!c||!u){var w=this.annoCtx.graphics.getTextRects(h,parseFloat(e.label.style.fontSize)),N=e.label.position==="top"?4:e.label.position==="center"?s.globals.gridHeight/2+(e.label.orientation==="vertical"?w.width/2:0):s.globals.gridHeight,A=this.annoCtx.graphics.drawText({x:l+e.label.offsetX,y:N+e.label.offsetY-(e.label.orientation==="vertical"?e.label.position==="top"?w.width/2-12:-w.width/2:0),text:h,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:"apexcharts-xaxis-annotation-label ".concat(e.label.style.cssClass," ").concat(e.id?e.id:"")});A.attr({rel:n}),r.appendChild(A.node),this.annoCtx.helpers.setOrientations(e,n)}}}},{key:"drawXAxisAnnotations",value:function(){var e=this,r=this.w,n=this.annoCtx.graphics.group({class:"apexcharts-xaxis-annotations"});return r.config.annotations.xaxis.map(function(a,s){e.addXaxisAnnotation(a,n.node,s)}),n}}]),t}(),Vr=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w,this.months31=[1,3,5,7,8,10,12],this.months30=[2,4,6,9,11],this.daysCntOfYear=[0,31,59,90,120,151,181,212,243,273,304,334]}return Ae(t,[{key:"isValidDate",value:function(e){return typeof e!="number"&&!isNaN(this.parseDate(e))}},{key:"getTimeStamp",value:function(e){return Date.parse(e)?this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(e).toISOString().substr(0,25)).getTime():new Date(e).getTime():e}},{key:"getDate",value:function(e){return this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(e).toUTCString()):new Date(e)}},{key:"parseDate",value:function(e){var r=Date.parse(e);if(!isNaN(r))return this.getTimeStamp(e);var n=Date.parse(e.replace(/-/g,"/").replace(/[a-z]+/gi," "));return n=this.getTimeStamp(n)}},{key:"parseDateWithTimezone",value:function(e){return Date.parse(e.replace(/-/g,"/").replace(/[a-z]+/gi," "))}},{key:"formatDate",value:function(e,r){var n=this.w.globals.locale,a=this.w.config.xaxis.labels.datetimeUTC,s=["\0"].concat(Nr(n.months)),o=[""].concat(Nr(n.shortMonths)),l=[""].concat(Nr(n.days)),c=[""].concat(Nr(n.shortDays));function u(_,L){var P=_+"";for(L=L||2;P.length<L;)P="0"+P;return P}var h=a?e.getUTCFullYear():e.getFullYear();r=(r=(r=r.replace(/(^|[^\\])yyyy+/g,"$1"+h)).replace(/(^|[^\\])yy/g,"$1"+h.toString().substr(2,2))).replace(/(^|[^\\])y/g,"$1"+h);var p=(a?e.getUTCMonth():e.getMonth())+1;r=(r=(r=(r=r.replace(/(^|[^\\])MMMM+/g,"$1"+s[0])).replace(/(^|[^\\])MMM/g,"$1"+o[0])).replace(/(^|[^\\])MM/g,"$1"+u(p))).replace(/(^|[^\\])M/g,"$1"+p);var m=a?e.getUTCDate():e.getDate();r=(r=(r=(r=r.replace(/(^|[^\\])dddd+/g,"$1"+l[0])).replace(/(^|[^\\])ddd/g,"$1"+c[0])).replace(/(^|[^\\])dd/g,"$1"+u(m))).replace(/(^|[^\\])d/g,"$1"+m);var x=a?e.getUTCHours():e.getHours(),y=x>12?x-12:x===0?12:x;r=(r=(r=(r=r.replace(/(^|[^\\])HH+/g,"$1"+u(x))).replace(/(^|[^\\])H/g,"$1"+x)).replace(/(^|[^\\])hh+/g,"$1"+u(y))).replace(/(^|[^\\])h/g,"$1"+y);var b=a?e.getUTCMinutes():e.getMinutes();r=(r=r.replace(/(^|[^\\])mm+/g,"$1"+u(b))).replace(/(^|[^\\])m/g,"$1"+b);var w=a?e.getUTCSeconds():e.getSeconds();r=(r=r.replace(/(^|[^\\])ss+/g,"$1"+u(w))).replace(/(^|[^\\])s/g,"$1"+w);var N=a?e.getUTCMilliseconds():e.getMilliseconds();r=r.replace(/(^|[^\\])fff+/g,"$1"+u(N,3)),N=Math.round(N/10),r=r.replace(/(^|[^\\])ff/g,"$1"+u(N)),N=Math.round(N/10);var A=x<12?"AM":"PM";r=(r=(r=r.replace(/(^|[^\\])f/g,"$1"+N)).replace(/(^|[^\\])TT+/g,"$1"+A)).replace(/(^|[^\\])T/g,"$1"+A.charAt(0));var S=A.toLowerCase();r=(r=r.replace(/(^|[^\\])tt+/g,"$1"+S)).replace(/(^|[^\\])t/g,"$1"+S.charAt(0));var C=-e.getTimezoneOffset(),k=a||!C?"Z":C>0?"+":"-";if(!a){var T=(C=Math.abs(C))%60;k+=u(Math.floor(C/60))+":"+u(T)}r=r.replace(/(^|[^\\])K/g,"$1"+k);var E=(a?e.getUTCDay():e.getDay())+1;return r=(r=(r=(r=(r=r.replace(new RegExp(l[0],"g"),l[E])).replace(new RegExp(c[0],"g"),c[E])).replace(new RegExp(s[0],"g"),s[p])).replace(new RegExp(o[0],"g"),o[p])).replace(/\\(.)/g,"$1")}},{key:"getTimeUnitsfromTimestamp",value:function(e,r,n){var a=this.w;a.config.xaxis.min!==void 0&&(e=a.config.xaxis.min),a.config.xaxis.max!==void 0&&(r=a.config.xaxis.max);var s=this.getDate(e),o=this.getDate(r),l=this.formatDate(s,"yyyy MM dd HH mm ss fff").split(" "),c=this.formatDate(o,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(l[6],10),maxMillisecond:parseInt(c[6],10),minSecond:parseInt(l[5],10),maxSecond:parseInt(c[5],10),minMinute:parseInt(l[4],10),maxMinute:parseInt(c[4],10),minHour:parseInt(l[3],10),maxHour:parseInt(c[3],10),minDate:parseInt(l[2],10),maxDate:parseInt(c[2],10),minMonth:parseInt(l[1],10)-1,maxMonth:parseInt(c[1],10)-1,minYear:parseInt(l[0],10),maxYear:parseInt(c[0],10)}}},{key:"isLeapYear",value:function(e){return e%4==0&&e%100!=0||e%400==0}},{key:"calculcateLastDaysOfMonth",value:function(e,r,n){return this.determineDaysOfMonths(e,r)-n}},{key:"determineDaysOfYear",value:function(e){var r=365;return this.isLeapYear(e)&&(r=366),r}},{key:"determineRemainingDaysOfYear",value:function(e,r,n){var a=this.daysCntOfYear[r]+n;return r>1&&this.isLeapYear()&&a++,a}},{key:"determineDaysOfMonths",value:function(e,r){var n=30;switch(e=J.monthMod(e),!0){case this.months30.indexOf(e)>-1:e===2&&(n=this.isLeapYear(r)?29:28);break;case this.months31.indexOf(e)>-1:default:n=31}return n}}]),t}(),qf=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w,this.tooltipKeyFormat="dd MMM"}return Ae(t,[{key:"xLabelFormat",value:function(e,r,n,a){var s=this.w;if(s.config.xaxis.type==="datetime"&&s.config.xaxis.labels.formatter===void 0&&s.config.tooltip.x.formatter===void 0){var o=new Vr(this.ctx);return o.formatDate(o.getDate(r),s.config.tooltip.x.format)}return e(r,n,a)}},{key:"defaultGeneralFormatter",value:function(e){return Array.isArray(e)?e.map(function(r){return r}):e}},{key:"defaultYFormatter",value:function(e,r,n){var a=this.w;if(J.isNumber(e))if(a.globals.yValueDecimal!==0)e=e.toFixed(r.decimalsInFloat!==void 0?r.decimalsInFloat:a.globals.yValueDecimal);else{var s=e.toFixed(0);e=e==s?s:e.toFixed(1)}return e}},{key:"setLabelFormatters",value:function(){var e=this,r=this.w;return r.globals.xaxisTooltipFormatter=function(n){return e.defaultGeneralFormatter(n)},r.globals.ttKeyFormatter=function(n){return e.defaultGeneralFormatter(n)},r.globals.ttZFormatter=function(n){return n},r.globals.legendFormatter=function(n){return e.defaultGeneralFormatter(n)},r.config.xaxis.labels.formatter!==void 0?r.globals.xLabelFormatter=r.config.xaxis.labels.formatter:r.globals.xLabelFormatter=function(n){if(J.isNumber(n)){if(!r.config.xaxis.convertedCatToNumeric&&r.config.xaxis.type==="numeric"){if(J.isNumber(r.config.xaxis.decimalsInFloat))return n.toFixed(r.config.xaxis.decimalsInFloat);var a=r.globals.maxX-r.globals.minX;return a>0&&a<100?n.toFixed(1):n.toFixed(0)}return r.globals.isBarHorizontal&&r.globals.maxY-r.globals.minYArr<4?n.toFixed(1):n.toFixed(0)}return n},typeof r.config.tooltip.x.formatter=="function"?r.globals.ttKeyFormatter=r.config.tooltip.x.formatter:r.globals.ttKeyFormatter=r.globals.xLabelFormatter,typeof r.config.xaxis.tooltip.formatter=="function"&&(r.globals.xaxisTooltipFormatter=r.config.xaxis.tooltip.formatter),(Array.isArray(r.config.tooltip.y)||r.config.tooltip.y.formatter!==void 0)&&(r.globals.ttVal=r.config.tooltip.y),r.config.tooltip.z.formatter!==void 0&&(r.globals.ttZFormatter=r.config.tooltip.z.formatter),r.config.legend.formatter!==void 0&&(r.globals.legendFormatter=r.config.legend.formatter),r.config.yaxis.forEach(function(n,a){n.labels.formatter!==void 0?r.globals.yLabelFormatters[a]=n.labels.formatter:r.globals.yLabelFormatters[a]=function(s){return r.globals.xyCharts?Array.isArray(s)?s.map(function(o){return e.defaultYFormatter(o,n,a)}):e.defaultYFormatter(s,n,a):s}}),r.globals}},{key:"heatmapLabelFormatters",value:function(){var e=this.w;if(e.config.chart.type==="heatmap"){e.globals.yAxisScale[0].result=e.globals.seriesNames.slice();var r=e.globals.seriesNames.reduce(function(n,a){return n.length>a.length?n:a},0);e.globals.yAxisScale[0].niceMax=r,e.globals.yAxisScale[0].niceMin=r}}}]),t}(),wo=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w}return Ae(t,[{key:"getLabel",value:function(e,r,n,a){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[],o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"12px",l=!(arguments.length>6&&arguments[6]!==void 0)||arguments[6],c=this.w,u=e[a]===void 0?"":e[a],h=u,p=c.globals.xLabelFormatter,m=c.config.xaxis.labels.formatter,x=!1,y=new qf(this.ctx),b=u;l&&(h=y.xLabelFormat(p,u,b,{i:a,dateFormatter:new Vr(this.ctx).formatDate,w:c}),m!==void 0&&(h=m(u,e[a],{i:a,dateFormatter:new Vr(this.ctx).formatDate,w:c})));var w,N;r.length>0?(w=r[a].unit,N=null,r.forEach(function(k){k.unit==="month"?N="year":k.unit==="day"?N="month":k.unit==="hour"?N="day":k.unit==="minute"&&(N="hour")}),x=N===w,n=r[a].position,h=r[a].value):c.config.xaxis.type==="datetime"&&m===void 0&&(h=""),h===void 0&&(h=""),h=Array.isArray(h)?h:h.toString();var A=new ge(this.ctx),S={};S=c.globals.rotateXLabels&&l?A.getTextRects(h,parseInt(o,10),null,"rotate(".concat(c.config.xaxis.labels.rotate," 0 0)"),!1):A.getTextRects(h,parseInt(o,10));var C=!c.config.xaxis.labels.showDuplicates&&this.ctx.timeScale;return!Array.isArray(h)&&(String(h)==="NaN"||s.indexOf(h)>=0&&C)&&(h=""),{x:n,text:h,textRect:S,isBold:x}}},{key:"checkLabelBasedOnTickamount",value:function(e,r,n){var a=this.w,s=a.config.xaxis.tickAmount;return s==="dataPoints"&&(s=Math.round(a.globals.gridWidth/120)),s>n||e%Math.round(n/(s+1))==0||(r.text=""),r}},{key:"checkForOverflowingLabels",value:function(e,r,n,a,s){var o=this.w;if(e===0&&o.globals.skipFirstTimelinelabel&&(r.text=""),e===n-1&&o.globals.skipLastTimelinelabel&&(r.text=""),o.config.xaxis.labels.hideOverlappingLabels&&a.length>0){var l=s[s.length-1];if(o.config.xaxis.labels.trim&&o.config.xaxis.type!=="datetime")return r;r.x<l.textRect.width/(o.globals.rotateXLabels?Math.abs(o.config.xaxis.labels.rotate)/12:1.01)+l.x&&(r.text="")}return r}},{key:"checkForReversedLabels",value:function(e,r){var n=this.w;return n.config.yaxis[e]&&n.config.yaxis[e].reversed&&r.reverse(),r}},{key:"yAxisAllSeriesCollapsed",value:function(e){var r=this.w.globals;return!r.seriesYAxisMap[e].some(function(n){return r.collapsedSeriesIndices.indexOf(n)===-1})}},{key:"translateYAxisIndex",value:function(e){var r=this.w,n=r.globals,a=r.config.yaxis;return n.series.length>a.length||a.some(function(s){return Array.isArray(s.seriesName)})?e:n.seriesYAxisReverseMap[e]}},{key:"isYAxisHidden",value:function(e){var r=this.w,n=r.config.yaxis[e];if(!n.show||this.yAxisAllSeriesCollapsed(e))return!0;if(!n.showForNullSeries){var a=r.globals.seriesYAxisMap[e],s=new ir(this.ctx);return a.every(function(o){return s.isSeriesNull(o)})}return!1}},{key:"getYAxisForeColor",value:function(e,r){var n=this.w;return Array.isArray(e)&&n.globals.yAxisScale[r]&&this.ctx.theme.pushExtraColors(e,n.globals.yAxisScale[r].result.length,!1),e}},{key:"drawYAxisTicks",value:function(e,r,n,a,s,o,l){var c=this.w,u=new ge(this.ctx),h=c.globals.translateY+c.config.yaxis[s].labels.offsetY;if(c.globals.isBarHorizontal?h=0:c.config.chart.type==="heatmap"&&(h+=o/2),a.show&&r>0){c.config.yaxis[s].opposite===!0&&(e+=a.width);for(var p=r;p>=0;p--){var m=u.drawLine(e+n.offsetX-a.width+a.offsetX,h+a.offsetY,e+n.offsetX+a.offsetX,h+a.offsetY,a.color);l.add(m),h+=o}}}}]),t}(),VG=function(){function t(e){Se(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new O0(this.annoCtx),this.axesUtils=new wo(this.annoCtx)}return Ae(t,[{key:"addYaxisAnnotation",value:function(e,r,n){var a,s=this.w,o=e.strokeDashArray,l=this.helpers.getY1Y2("y1",e),c=l.yP,u=l.clipped,h=!0,p=!1,m=e.label.text;if(e.y2===null||e.y2===void 0){if(!u){p=!0;var x=this.annoCtx.graphics.drawLine(0+e.offsetX,c+e.offsetY,this._getYAxisAnnotationWidth(e),c+e.offsetY,e.borderColor,o,e.borderWidth);r.appendChild(x.node),e.id&&x.node.classList.add(e.id)}}else{if(a=(l=this.helpers.getY1Y2("y2",e)).yP,h=l.clipped,a>c){var y=c;c=a,a=y}if(!u||!h){p=!0;var b=this.annoCtx.graphics.drawRect(0+e.offsetX,a+e.offsetY,this._getYAxisAnnotationWidth(e),c-a,0,e.fillColor,e.opacity,1,e.borderColor,o);b.node.classList.add("apexcharts-annotation-rect"),b.attr("clip-path","url(#gridRectMask".concat(s.globals.cuid,")")),r.appendChild(b.node),e.id&&b.node.classList.add(e.id)}}if(p){var w=e.label.position==="right"?s.globals.gridWidth:e.label.position==="center"?s.globals.gridWidth/2:0,N=this.annoCtx.graphics.drawText({x:w+e.label.offsetX,y:(a??c)+e.label.offsetY-3,text:m,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:"apexcharts-yaxis-annotation-label ".concat(e.label.style.cssClass," ").concat(e.id?e.id:"")});N.attr({rel:n}),r.appendChild(N.node)}}},{key:"_getYAxisAnnotationWidth",value:function(e){var r=this.w;return r.globals.gridWidth,(e.width.indexOf("%")>-1?r.globals.gridWidth*parseInt(e.width,10)/100:parseInt(e.width,10))+e.offsetX}},{key:"drawYAxisAnnotations",value:function(){var e=this,r=this.w,n=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return r.config.annotations.yaxis.forEach(function(a,s){a.yAxisIndex=e.axesUtils.translateYAxisIndex(a.yAxisIndex),e.axesUtils.isYAxisHidden(a.yAxisIndex)&&e.axesUtils.yAxisAllSeriesCollapsed(a.yAxisIndex)||e.addYaxisAnnotation(a,n.node,s)}),n}}]),t}(),qG=function(){function t(e){Se(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new O0(this.annoCtx)}return Ae(t,[{key:"addPointAnnotation",value:function(e,r,n){if(!(this.w.globals.collapsedSeriesIndices.indexOf(e.seriesIndex)>-1)){var a=this.helpers.getX1X2("x1",e),s=a.x,o=a.clipped,l=(a=this.helpers.getY1Y2("y1",e)).yP,c=a.clipped;if(J.isNumber(s)&&!c&&!o){var u={pSize:e.marker.size,pointStrokeWidth:e.marker.strokeWidth,pointFillColor:e.marker.fillColor,pointStrokeColor:e.marker.strokeColor,shape:e.marker.shape,pRadius:e.marker.radius,class:"apexcharts-point-annotation-marker ".concat(e.marker.cssClass," ").concat(e.id?e.id:"")},h=this.annoCtx.graphics.drawMarker(s+e.marker.offsetX,l+e.marker.offsetY,u);r.appendChild(h.node);var p=e.label.text?e.label.text:"",m=this.annoCtx.graphics.drawText({x:s+e.label.offsetX,y:l+e.label.offsetY-e.marker.size-parseFloat(e.label.style.fontSize)/1.6,text:p,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:"apexcharts-point-annotation-label ".concat(e.label.style.cssClass," ").concat(e.id?e.id:"")});if(m.attr({rel:n}),r.appendChild(m.node),e.customSVG.SVG){var x=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+e.customSVG.cssClass});x.attr({transform:"translate(".concat(s+e.customSVG.offsetX,", ").concat(l+e.customSVG.offsetY,")")}),x.node.innerHTML=e.customSVG.SVG,r.appendChild(x.node)}if(e.image.path){var y=e.image.width?e.image.width:20,b=e.image.height?e.image.height:20;h=this.annoCtx.addImage({x:s+e.image.offsetX-y/2,y:l+e.image.offsetY-b/2,width:y,height:b,path:e.image.path,appendTo:".apexcharts-point-annotations"})}e.mouseEnter&&h.node.addEventListener("mouseenter",e.mouseEnter.bind(this,e)),e.mouseLeave&&h.node.addEventListener("mouseleave",e.mouseLeave.bind(this,e)),e.click&&h.node.addEventListener("click",e.click.bind(this,e))}}}},{key:"drawPointAnnotations",value:function(){var e=this,r=this.w,n=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return r.config.annotations.points.map(function(a,s){e.addPointAnnotation(a,n.node,s)}),n}}]),t}(),nR={name:"en",options:{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"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],toolbar:{exportToSVG:"Download SVG",exportToPNG:"Download PNG",exportToCSV:"Download CSV",menu:"Menu",selection:"Selection",selectionZoom:"Selection Zoom",zoomIn:"Zoom In",zoomOut:"Zoom Out",pan:"Panning",reset:"Reset Zoom"}}},ml=function(){function t(){Se(this,t),this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount:void 0,stepSize:void 0,forceNiceScale:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,showDuplicates:!1,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:"11px",fontWeight:400,fontFamily:void 0,cssClass:""},formatter:void 0},axisBorder:{show:!1,color:"#e0e0e0",width:1,offsetX:0,offsetY:0},axisTicks:{show:!1,color:"#e0e0e0",width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:"11px",fontWeight:900,fontFamily:void 0,cssClass:""}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:"front",stroke:{color:"#b6b6b6",width:1,dashArray:0}}},this.pointAnnotation={id:void 0,x:0,y:null,yAxisIndex:0,seriesIndex:void 0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,marker:{size:4,fillColor:"#fff",strokeWidth:2,strokeColor:"#333",shape:"circle",offsetX:0,offsetY:0,cssClass:""},label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}},customSVG:{SVG:void 0,cssClass:void 0,offsetX:0,offsetY:0},image:{path:void 0,width:20,height:20,offsetX:0,offsetY:0}},this.yAxisAnnotation={id:void 0,y:0,y2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,width:"100%",yAxisIndex:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"end",position:"right",offsetX:0,offsetY:-3,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.xAxisAnnotation={id:void 0,x:0,x2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",orientation:"vertical",position:"top",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:"",textAnchor:"start",foreColor:void 0,fontSize:"13px",fontFamily:void 0,fontWeight:400,appendTo:".apexcharts-annotations",backgroundColor:"transparent",borderColor:"#c2c2c2",borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}return Ae(t,[{key:"init",value:function(){return{annotations:{yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},chart:{animations:{enabled:!0,speed:800,animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350}},background:"",locales:[nR],defaultLocale:"en",dropShadow:{enabled:!1,enabledOnSeries:void 0,top:2,left:2,blur:4,color:"#000",opacity:.7},events:{animationEnd:void 0,beforeMount:void 0,mounted:void 0,updated:void 0,click:void 0,mouseMove:void 0,mouseLeave:void 0,xAxisLabelClick:void 0,legendClick:void 0,markerClick:void 0,selection:void 0,dataPointSelection:void 0,dataPointMouseEnter:void 0,dataPointMouseLeave:void 0,beforeZoom:void 0,beforeResetZoom:void 0,zoomed:void 0,scrolled:void 0,brushScrolled:void 0},foreColor:"#373d3f",fontFamily:"Helvetica, Arial, sans-serif",height:"auto",parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,id:void 0,group:void 0,nonce:void 0,offsetX:0,offsetY:0,selection:{enabled:!1,type:"x",fill:{color:"#24292e",opacity:.1},stroke:{width:1,color:"#24292e",opacity:.4,dashArray:3},xaxis:{min:void 0,max:void 0},yaxis:{min:void 0,max:void 0}},sparkline:{enabled:!1},brush:{enabled:!1,autoScaleYaxis:!0,target:void 0,targets:void 0},stacked:!1,stackOnlyBar:!0,stackType:"normal",toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,customIcons:[]},export:{csv:{filename:void 0,columnDelimiter:",",headerCategory:"category",headerValue:"value",categoryFormatter:void 0,valueFormatter:void 0},png:{filename:void 0},svg:{filename:void 0},scale:void 0,width:void 0},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,allowMouseWheelZoom:!0,zoomedArea:{fill:{color:"#90CAF9",opacity:.4},stroke:{color:"#0D47A1",opacity:.4,width:1}}}},parsing:{x:void 0,y:void 0},plotOptions:{line:{isSlopeChart:!1,colors:{threshold:0,colorAboveThreshold:void 0,colorBelowThreshold:void 0}},area:{fillTo:"origin"},bar:{horizontal:!1,columnWidth:"70%",barHeight:"70%",distributed:!1,borderRadius:0,borderRadiusApplication:"around",borderRadiusWhenStacked:"last",rangeBarOverlap:!0,rangeBarGroupRows:!1,hideZeroBarsWhenGrouped:!1,isDumbbell:!1,dumbbellColors:void 0,isFunnel:!1,isFunnel3d:!0,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:"top",maxItems:100,hideOverflowingLabels:!0,orientation:"horizontal",total:{enabled:!1,formatter:void 0,offsetX:0,offsetY:0,style:{color:"#373d3f",fontSize:"12px",fontFamily:void 0,fontWeight:600}}}},bubble:{zScaling:!0,minBubbleRadius:void 0,maxBubbleRadius:void 0},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},boxPlot:{colors:{upper:"#00E396",lower:"#008FFB"}},heatmap:{radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,borderRadius:4,dataLabels:{format:"scale"},colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0},seriesTitle:{show:!0,offsetY:1,offsetX:1,borderColor:"#000",borderWidth:1,borderRadius:2,style:{background:"rgba(0, 0, 0, 0.6)",color:"#fff",fontSize:"12px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:6,right:6,top:2,bottom:2}}}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,hollow:{margin:5,size:"50%",background:"transparent",image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:"front",dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},track:{show:!0,startAngle:void 0,endAngle:void 0,background:"#f2f2f2",strokeWidth:"97%",opacity:1,margin:5,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},dataLabels:{show:!0,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter:function(e){return e}},value:{show:!0,fontSize:"14px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter:function(e){return e+"%"}},total:{show:!1,label:"Total",fontSize:"16px",fontWeight:600,fontFamily:void 0,color:void 0,formatter:function(e){return e.globals.seriesTotals.reduce(function(r,n){return r+n},0)/e.globals.series.length+"%"}}},barLabels:{enabled:!1,offsetX:0,offsetY:0,useSeriesColors:!0,fontFamily:void 0,fontWeight:600,fontSize:"16px",formatter:function(e){return e},onClick:void 0}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!0,dataLabels:{offset:0,minAngleToShowLabel:10},donut:{size:"65%",background:"transparent",labels:{show:!1,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter:function(e){return e}},value:{show:!0,fontSize:"20px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter:function(e){return e}},total:{show:!1,showAlways:!1,label:"Total",fontSize:"16px",fontWeight:400,fontFamily:void 0,color:void 0,formatter:function(e){return e.globals.seriesTotals.reduce(function(r,n){return r+n},0)}}}}},polarArea:{rings:{strokeWidth:1,strokeColor:"#e8e8e8"},spokes:{strokeWidth:1,connectorColors:"#e8e8e8"}},radar:{size:void 0,offsetX:0,offsetY:0,polygons:{strokeWidth:1,strokeColors:"#e8e8e8",connectorColors:"#e8e8e8",fill:{colors:void 0}}}},colors:void 0,dataLabels:{enabled:!0,enabledOnSeries:void 0,formatter:function(e){return e!==null?e:""},textAnchor:"middle",distributed:!1,offsetX:0,offsetY:0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0},background:{enabled:!0,foreColor:"#fff",backgroundColor:void 0,borderRadius:2,padding:4,opacity:.9,borderWidth:1,borderColor:"#fff",dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8}},dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8}},fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:"squares",width:6,height:6,strokeWidth:2}},forecastDataPoints:{count:0,fillOpacity:.5,strokeWidth:void 0,dashArray:4},grid:{show:!0,borderColor:"#e0e0e0",strokeDashArray:0,position:"back",xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:"bottom",horizontalAlign:"center",inverseOrder:!1,fontSize:"12px",fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],clusterGroupedSeries:!0,clusterGroupedSeriesOrientation:"vertical",labels:{colors:void 0,useSeriesColors:!1},markers:{size:7,fillColors:void 0,strokeWidth:1,shape:void 0,offsetX:0,offsetY:0,customHTML:void 0,onClick:void 0},itemMargin:{horizontal:5,vertical:4},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:"#fff",strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:"circle",offsetX:0,offsetY:0,showNullDataPoints:!0,onClick:void 0,onDblClick:void 0,hover:{size:void 0,sizeOffset:3}},noData:{text:void 0,align:"center",verticalAlign:"middle",offsetX:0,offsetY:0,style:{color:void 0,fontSize:"14px",fontFamily:void 0}},responsive:[],series:void 0,states:{hover:{filter:{type:"lighten"}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken"}}},title:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:"14px",fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:"12px",fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:"smooth",lineCap:"butt",width:2,colors:void 0,dashArray:0,fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]}}},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,hideEmptySeries:!1,followCursor:!1,intersect:!1,inverseOrder:!1,custom:void 0,fillSeriesColor:!1,theme:"light",cssClass:"",style:{fontSize:"12px",fontFamily:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:"dd MMM",formatter:void 0},y:{formatter:void 0,title:{formatter:function(e){return e?e+": ":""}}},z:{formatter:void 0,title:"Size: "},marker:{show:!0,fillColors:void 0},items:{display:"flex"},fixed:{enabled:!1,position:"topRight",offsetX:0,offsetY:0}},xaxis:{type:"category",categories:[],convertedCatToNumeric:!1,offsetX:0,offsetY:0,overwriteCategories:void 0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!1,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!0,datetimeFormatter:{year:"yyyy",month:"MMM 'yy",day:"dd MMM",hour:"HH:mm",minute:"HH:mm:ss",second:"HH:mm:ss"}},group:{groups:[],style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""}},axisBorder:{show:!0,color:"#e0e0e0",width:"100%",height:1,offsetX:0,offsetY:0},axisTicks:{show:!0,color:"#e0e0e0",height:6,offsetX:0,offsetY:0},stepSize:void 0,tickAmount:void 0,tickPlacement:"on",min:void 0,max:void 0,range:void 0,floating:!1,decimalsInFloat:void 0,position:"bottom",title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:"12px",fontWeight:900,fontFamily:void 0,cssClass:""}},crosshairs:{show:!0,width:1,position:"back",opacity:.9,stroke:{color:"#b6b6b6",width:1,dashArray:3},fill:{type:"solid",color:"#B1B9C4",gradient:{colorFrom:"#D8E3F0",colorTo:"#BED1E6",stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.8}},tooltip:{enabled:!0,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"",palette:"palette1",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65}}}}}]),t}(),GG=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w,this.graphics=new ge(this.ctx),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new O0(this),this.xAxisAnnotations=new XG(this),this.yAxisAnnotations=new VG(this),this.pointsAnnotations=new qG(this),this.w.globals.isBarHorizontal&&this.w.config.yaxis[0].reversed&&(this.inversedReversedAxis=!0),this.xDivision=this.w.globals.gridWidth/this.w.globals.dataPoints}return Ae(t,[{key:"drawAxesAnnotations",value:function(){var e=this.w;if(e.globals.axisCharts&&e.globals.dataPoints){for(var r=this.yAxisAnnotations.drawYAxisAnnotations(),n=this.xAxisAnnotations.drawXAxisAnnotations(),a=this.pointsAnnotations.drawPointAnnotations(),s=e.config.chart.animations.enabled,o=[r,n,a],l=[n.node,r.node,a.node],c=0;c<3;c++)e.globals.dom.elGraphical.add(o[c]),!s||e.globals.resized||e.globals.dataChanged||e.config.chart.type!=="scatter"&&e.config.chart.type!=="bubble"&&e.globals.dataPoints>1&&l[c].classList.add("apexcharts-element-hidden"),e.globals.delayedElements.push({el:l[c],index:0});this.helpers.annotationsBackground()}}},{key:"drawImageAnnos",value:function(){var e=this;this.w.config.annotations.images.map(function(r,n){e.addImage(r,n)})}},{key:"drawTextAnnos",value:function(){var e=this;this.w.config.annotations.texts.map(function(r,n){e.addText(r,n)})}},{key:"addXaxisAnnotation",value:function(e,r,n){this.xAxisAnnotations.addXaxisAnnotation(e,r,n)}},{key:"addYaxisAnnotation",value:function(e,r,n){this.yAxisAnnotations.addYaxisAnnotation(e,r,n)}},{key:"addPointAnnotation",value:function(e,r,n){this.pointsAnnotations.addPointAnnotation(e,r,n)}},{key:"addText",value:function(e,r){var n=e.x,a=e.y,s=e.text,o=e.textAnchor,l=e.foreColor,c=e.fontSize,u=e.fontFamily,h=e.fontWeight,p=e.cssClass,m=e.backgroundColor,x=e.borderWidth,y=e.strokeDashArray,b=e.borderRadius,w=e.borderColor,N=e.appendTo,A=N===void 0?".apexcharts-svg":N,S=e.paddingLeft,C=S===void 0?4:S,k=e.paddingRight,T=k===void 0?4:k,E=e.paddingBottom,_=E===void 0?2:E,L=e.paddingTop,P=L===void 0?2:L,R=this.w,z=this.graphics.drawText({x:n,y:a,text:s,textAnchor:o||"start",fontSize:c||"12px",fontWeight:h||"regular",fontFamily:u||R.config.chart.fontFamily,foreColor:l||R.config.chart.foreColor,cssClass:p}),B=R.globals.dom.baseEl.querySelector(A);B&&B.appendChild(z.node);var Y=z.bbox();if(s){var X=this.graphics.drawRect(Y.x-C,Y.y-P,Y.width+C+T,Y.height+_+P,b,m||"transparent",1,x,w,y);B.insertBefore(X.node,z.node)}}},{key:"addImage",value:function(e,r){var n=this.w,a=e.path,s=e.x,o=s===void 0?0:s,l=e.y,c=l===void 0?0:l,u=e.width,h=u===void 0?20:u,p=e.height,m=p===void 0?20:p,x=e.appendTo,y=x===void 0?".apexcharts-svg":x,b=n.globals.dom.Paper.image(a);b.size(h,m).move(o,c);var w=n.globals.dom.baseEl.querySelector(y);return w&&w.appendChild(b.node),b}},{key:"addXaxisAnnotationExternal",value:function(e,r,n){return this.addAnnotationExternal({params:e,pushToMemory:r,context:n,type:"xaxis",contextMethod:n.addXaxisAnnotation}),n}},{key:"addYaxisAnnotationExternal",value:function(e,r,n){return this.addAnnotationExternal({params:e,pushToMemory:r,context:n,type:"yaxis",contextMethod:n.addYaxisAnnotation}),n}},{key:"addPointAnnotationExternal",value:function(e,r,n){return this.invertAxis===void 0&&(this.invertAxis=n.w.globals.isBarHorizontal),this.addAnnotationExternal({params:e,pushToMemory:r,context:n,type:"point",contextMethod:n.addPointAnnotation}),n}},{key:"addAnnotationExternal",value:function(e){var r=e.params,n=e.pushToMemory,a=e.context,s=e.type,o=e.contextMethod,l=a,c=l.w,u=c.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations")),h=u.childNodes.length+1,p=new ml,m=Object.assign({},s==="xaxis"?p.xAxisAnnotation:s==="yaxis"?p.yAxisAnnotation:p.pointAnnotation),x=J.extend(m,r);switch(s){case"xaxis":this.addXaxisAnnotation(x,u,h);break;case"yaxis":this.addYaxisAnnotation(x,u,h);break;case"point":this.addPointAnnotation(x,u,h)}var y=c.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations .apexcharts-").concat(s,"-annotation-label[rel='").concat(h,"']")),b=this.helpers.addBackgroundToAnno(y,x);return b&&u.insertBefore(b.node,y),n&&c.globals.memory.methodsToExec.push({context:l,id:x.id?x.id:J.randomId(),method:o,label:"addAnnotation",params:r}),a}},{key:"clearAnnotations",value:function(e){for(var r=e.w,n=r.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations"),a=r.globals.memory.methodsToExec.length-1;a>=0;a--)r.globals.memory.methodsToExec[a].label!=="addText"&&r.globals.memory.methodsToExec[a].label!=="addAnnotation"||r.globals.memory.methodsToExec.splice(a,1);n=J.listToArray(n),Array.prototype.forEach.call(n,function(s){for(;s.firstChild;)s.removeChild(s.firstChild)})}},{key:"removeAnnotation",value:function(e,r){var n=e.w,a=n.globals.dom.baseEl.querySelectorAll(".".concat(r));a&&(n.globals.memory.methodsToExec.map(function(s,o){s.id===r&&n.globals.memory.methodsToExec.splice(o,1)}),Object.keys(n.config.annotations).forEach(function(s){var o=n.config.annotations[s];Array.isArray(o)&&(n.config.annotations[s]=o.filter(function(l){return l.id!==r}))}),Array.prototype.forEach.call(a,function(s){s.parentElement.removeChild(s)}))}}]),t}(),b1=function(t){var e,r=t.isTimeline,n=t.ctx,a=t.seriesIndex,s=t.dataPointIndex,o=t.y1,l=t.y2,c=t.w,u=c.globals.seriesRangeStart[a][s],h=c.globals.seriesRangeEnd[a][s],p=c.globals.labels[s],m=c.config.series[a].name?c.config.series[a].name:"",x=c.globals.ttKeyFormatter,y=c.config.tooltip.y.title.formatter,b={w:c,seriesIndex:a,dataPointIndex:s,start:u,end:h};typeof y=="function"&&(m=y(m,b)),(e=c.config.series[a].data[s])!==null&&e!==void 0&&e.x&&(p=c.config.series[a].data[s].x),r||c.config.xaxis.type==="datetime"&&(p=new qf(n).xLabelFormat(c.globals.ttKeyFormatter,p,p,{i:void 0,dateFormatter:new Vr(n).formatDate,w:c})),typeof x=="function"&&(p=x(p,b)),Number.isFinite(o)&&Number.isFinite(l)&&(u=o,h=l);var w="",N="",A=c.globals.colors[a];if(c.config.tooltip.x.formatter===void 0)if(c.config.xaxis.type==="datetime"){var S=new Vr(n);w=S.formatDate(S.getDate(u),c.config.tooltip.x.format),N=S.formatDate(S.getDate(h),c.config.tooltip.x.format)}else w=u,N=h;else w=c.config.tooltip.x.formatter(u),N=c.config.tooltip.x.formatter(h);return{start:u,end:h,startVal:w,endVal:N,ylabel:p,color:A,seriesName:m}},y1=function(t){var e=t.color,r=t.seriesName,n=t.ylabel,a=t.start,s=t.end,o=t.seriesIndex,l=t.dataPointIndex,c=t.ctx.tooltip.tooltipLabels.getFormatters(o);a=c.yLbFormatter(a),s=c.yLbFormatter(s);var u=c.yLbFormatter(t.w.globals.series[o][l]),h=`<span class="value start-value">
`.concat(a,`
</span> <span class="separator">-</span> <span class="value end-value">
`).concat(s,`
</span>`);return'<div class="apexcharts-tooltip-rangebar"><div> <span class="series-name" style="color: '+e+'">'+(r||"")+'</span></div><div> <span class="category">'+n+": </span> "+(t.w.globals.comboCharts?t.w.config.series[o].type==="rangeArea"||t.w.config.series[o].type==="rangeBar"?h:"<span>".concat(u,"</span>"):h)+" </div></div>"},uf=function(){function t(e){Se(this,t),this.opts=e}return Ae(t,[{key:"hideYAxis",value:function(){this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text="",this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0}},{key:"line",value:function(){return{dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}},{key:"sparkline",value:function(e){return this.hideYAxis(),J.extend(e,{grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}})}},{key:"slope",value:function(){return this.hideYAxis(),{chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!0,formatter:function(e,r){var n=r.w.config.series[r.seriesIndex].name;return e!==null?n+": "+e:""},background:{enabled:!1},offsetX:-5},grid:{xaxis:{lines:{show:!0}},yaxis:{lines:{show:!1}}},xaxis:{position:"top",labels:{style:{fontSize:14,fontWeight:900}},tooltip:{enabled:!1},crosshairs:{show:!1}},markers:{size:8,hover:{sizeOffset:1}},legend:{show:!1},tooltip:{shared:!1,intersect:!0,followCursor:!0},stroke:{width:5,curve:"straight"}}}},{key:"bar",value:function(){return{chart:{stacked:!1},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]},background:{enabled:!1}},stroke:{width:0,lineCap:"square"},fill:{opacity:.85},legend:{markers:{shape:"square"}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:"between",crosshairs:{width:"barWidth",position:"back",fill:{type:"gradient"},dropShadow:{enabled:!1},stroke:{width:0}}}}}},{key:"funnel",value:function(){return this.hideYAxis(),ve(ve({},this.bar()),{},{chart:{animations:{speed:800,animateGradually:{enabled:!1}}},plotOptions:{bar:{horizontal:!0,borderRadiusApplication:"around",borderRadius:0,dataLabels:{position:"center"}}},grid:{show:!1,padding:{left:0,right:0}},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}}})}},{key:"candlestick",value:function(){var e=this;return{stroke:{width:1},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(r){var n=r.seriesIndex,a=r.dataPointIndex,s=r.w;return e._getBoxTooltip(s,n,a,["Open","High","","Low","Close"],"candlestick")}},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}},{key:"boxPlot",value:function(){var e=this;return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(r){var n=r.seriesIndex,a=r.dataPointIndex,s=r.w;return e._getBoxTooltip(s,n,a,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot")}},markers:{size:7,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}},{key:"rangeBar",value:function(){return{chart:{animations:{animateGradually:!1}},stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter:function(e,r){r.ctx;var n=r.seriesIndex,a=r.dataPointIndex,s=r.w,o=function(){var l=s.globals.seriesRangeStart[n][a];return s.globals.seriesRangeEnd[n][a]-l};return s.globals.comboCharts?s.config.series[n].type==="rangeBar"||s.config.series[n].type==="rangeArea"?o():e:o()},background:{enabled:!1},style:{colors:["#fff"]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom:function(e){return e.w.config.plotOptions&&e.w.config.plotOptions.bar&&e.w.config.plotOptions.bar.horizontal?function(r){var n=b1(ve(ve({},r),{},{isTimeline:!0})),a=n.color,s=n.seriesName,o=n.ylabel,l=n.startVal,c=n.endVal;return y1(ve(ve({},r),{},{color:a,seriesName:s,ylabel:o,start:l,end:c}))}(e):function(r){var n=b1(r),a=n.color,s=n.seriesName,o=n.ylabel,l=n.start,c=n.end;return y1(ve(ve({},r),{},{color:a,seriesName:s,ylabel:o,start:l,end:c}))}(e)}},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}},{key:"dumbbell",value:function(e){var r,n;return(r=e.plotOptions.bar)!==null&&r!==void 0&&r.barHeight||(e.plotOptions.bar.barHeight=2),(n=e.plotOptions.bar)!==null&&n!==void 0&&n.columnWidth||(e.plotOptions.bar.columnWidth=2),e}},{key:"area",value:function(){return{stroke:{width:4,fill:{type:"solid",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}}},fill:{type:"gradient",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}},{key:"rangeArea",value:function(){return{stroke:{curve:"straight",width:0},fill:{type:"solid",opacity:.6},markers:{size:0},states:{hover:{filter:{type:"none"}},active:{filter:{type:"none"}}},tooltip:{intersect:!1,shared:!0,followCursor:!0,custom:function(e){return function(r){var n=b1(r),a=n.color,s=n.seriesName,o=n.ylabel,l=n.start,c=n.end;return y1(ve(ve({},r),{},{color:a,seriesName:s,ylabel:o,start:l,end:c}))}(e)}}}}},{key:"brush",value:function(e){return J.extend(e,{chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}},{key:"stacked100",value:function(e){e.dataLabels=e.dataLabels||{},e.dataLabels.formatter=e.dataLabels.formatter||void 0;var r=e.dataLabels.formatter;return e.yaxis.forEach(function(n,a){e.yaxis[a].min=0,e.yaxis[a].max=100}),e.chart.type==="bar"&&(e.dataLabels.formatter=r||function(n){return typeof n=="number"&&n?n.toFixed(0)+"%":n}),e}},{key:"stackedBars",value:function(){var e=this.bar();return ve(ve({},e),{},{plotOptions:ve(ve({},e.plotOptions),{},{bar:ve(ve({},e.plotOptions.bar),{},{borderRadiusApplication:"end",borderRadiusWhenStacked:"last"})})})}},{key:"convertCatToNumeric",value:function(e){return e.xaxis.convertedCatToNumeric=!0,e}},{key:"convertCatToNumericXaxis",value:function(e,r,n){e.xaxis.type="numeric",e.xaxis.labels=e.xaxis.labels||{},e.xaxis.labels.formatter=e.xaxis.labels.formatter||function(o){return J.isNumber(o)?Math.floor(o):o};var a=e.xaxis.labels.formatter,s=e.xaxis.categories&&e.xaxis.categories.length?e.xaxis.categories:e.labels;return n&&n.length&&(s=n.map(function(o){return Array.isArray(o)?o:String(o)})),s&&s.length&&(e.xaxis.labels.formatter=function(o){return J.isNumber(o)?a(s[Math.floor(o)-1]):a(o)}),e.xaxis.categories=[],e.labels=[],e.xaxis.tickAmount=e.xaxis.tickAmount||"dataPoints",e}},{key:"bubble",value:function(){return{dataLabels:{style:{colors:["#fff"]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:"solid",gradient:{shade:"light",inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}},{key:"scatter",value:function(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}},{key:"heatmap",value:function(){return{chart:{stacked:!1},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!0,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square"}},grid:{padding:{right:20}}}}},{key:"treemap",value:function(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:["#fff"]}},stroke:{show:!0,width:2,colors:["#fff"]},legend:{show:!1},fill:{opacity:1,gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1}}}}},{key:"pie",value:function(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:function(e){return e.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"donut",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(e){return e.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"polarArea",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(e){return e.toFixed(1)+"%"},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"radar",value:function(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:"11px"}},stroke:{width:2},markers:{size:5,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},xaxis:{labels:{formatter:function(e){return e},style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}},{key:"radialBar",value:function(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"_getBoxTooltip",value:function(e,r,n,a,s){var o=e.globals.seriesCandleO[r][n],l=e.globals.seriesCandleH[r][n],c=e.globals.seriesCandleM[r][n],u=e.globals.seriesCandleL[r][n],h=e.globals.seriesCandleC[r][n];return e.config.series[r].type&&e.config.series[r].type!==s?`<div class="apexcharts-custom-tooltip">
`.concat(e.config.series[r].name?e.config.series[r].name:"series-"+(r+1),": <strong>").concat(e.globals.series[r][n],`</strong>
</div>`):'<div class="apexcharts-tooltip-box apexcharts-tooltip-'.concat(e.config.chart.type,'">')+"<div>".concat(a[0],': <span class="value">')+o+"</span></div>"+"<div>".concat(a[1],': <span class="value">')+l+"</span></div>"+(c?"<div>".concat(a[2],': <span class="value">')+c+"</span></div>":"")+"<div>".concat(a[3],': <span class="value">')+u+"</span></div>"+"<div>".concat(a[4],': <span class="value">')+h+"</span></div></div>"}}]),t}(),hf=function(){function t(e){Se(this,t),this.opts=e}return Ae(t,[{key:"init",value:function(e){var r=e.responsiveOverride,n=this.opts,a=new ml,s=new uf(n);this.chartType=n.chart.type,n=this.extendYAxis(n),n=this.extendAnnotations(n);var o=a.init(),l={};if(n&&fn(n)==="object"){var c,u,h,p,m,x,y,b,w,N,A={};A=["line","area","bar","candlestick","boxPlot","rangeBar","rangeArea","bubble","scatter","heatmap","treemap","pie","polarArea","donut","radar","radialBar"].indexOf(n.chart.type)!==-1?s[n.chart.type]():s.line(),(c=n.plotOptions)!==null&&c!==void 0&&(u=c.bar)!==null&&u!==void 0&&u.isFunnel&&(A=s.funnel()),n.chart.stacked&&n.chart.type==="bar"&&(A=s.stackedBars()),(h=n.chart.brush)!==null&&h!==void 0&&h.enabled&&(A=s.brush(A)),(p=n.plotOptions)!==null&&p!==void 0&&(m=p.line)!==null&&m!==void 0&&m.isSlopeChart&&(A=s.slope()),n.chart.stacked&&n.chart.stackType==="100%"&&(n=s.stacked100(n)),(x=n.plotOptions)!==null&&x!==void 0&&(y=x.bar)!==null&&y!==void 0&&y.isDumbbell&&(n=s.dumbbell(n)),this.checkForDarkTheme(window.Apex),this.checkForDarkTheme(n),n.xaxis=n.xaxis||window.Apex.xaxis||{},r||(n.xaxis.convertedCatToNumeric=!1),((b=(n=this.checkForCatToNumericXAxis(this.chartType,A,n)).chart.sparkline)!==null&&b!==void 0&&b.enabled||(w=window.Apex.chart)!==null&&w!==void 0&&(N=w.sparkline)!==null&&N!==void 0&&N.enabled)&&(A=s.sparkline(A)),l=J.extend(o,A)}var S=J.extend(l,window.Apex);return o=J.extend(S,n),o=this.handleUserInputErrors(o)}},{key:"checkForCatToNumericXAxis",value:function(e,r,n){var a,s,o=new uf(n),l=(e==="bar"||e==="boxPlot")&&((a=n.plotOptions)===null||a===void 0||(s=a.bar)===null||s===void 0?void 0:s.horizontal),c=e==="pie"||e==="polarArea"||e==="donut"||e==="radar"||e==="radialBar"||e==="heatmap",u=n.xaxis.type!=="datetime"&&n.xaxis.type!=="numeric",h=n.xaxis.tickPlacement?n.xaxis.tickPlacement:r.xaxis&&r.xaxis.tickPlacement;return l||c||!u||h==="between"||(n=o.convertCatToNumeric(n)),n}},{key:"extendYAxis",value:function(e,r){var n=new ml;(e.yaxis===void 0||!e.yaxis||Array.isArray(e.yaxis)&&e.yaxis.length===0)&&(e.yaxis={}),e.yaxis.constructor!==Array&&window.Apex.yaxis&&window.Apex.yaxis.constructor!==Array&&(e.yaxis=J.extend(e.yaxis,window.Apex.yaxis)),e.yaxis.constructor!==Array?e.yaxis=[J.extend(n.yAxis,e.yaxis)]:e.yaxis=J.extendArray(e.yaxis,n.yAxis);var a=!1;e.yaxis.forEach(function(o){o.logarithmic&&(a=!0)});var s=e.series;return r&&!s&&(s=r.config.series),a&&s.length!==e.yaxis.length&&s.length&&(e.yaxis=s.map(function(o,l){if(o.name||(s[l].name="series-".concat(l+1)),e.yaxis[l])return e.yaxis[l].seriesName=s[l].name,e.yaxis[l];var c=J.extend(n.yAxis,e.yaxis[0]);return c.show=!1,c})),a&&s.length>1&&s.length!==e.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes"),e}},{key:"extendAnnotations",value:function(e){return e.annotations===void 0&&(e.annotations={},e.annotations.yaxis=[],e.annotations.xaxis=[],e.annotations.points=[]),e=this.extendYAxisAnnotations(e),e=this.extendXAxisAnnotations(e),e=this.extendPointAnnotations(e)}},{key:"extendYAxisAnnotations",value:function(e){var r=new ml;return e.annotations.yaxis=J.extendArray(e.annotations.yaxis!==void 0?e.annotations.yaxis:[],r.yAxisAnnotation),e}},{key:"extendXAxisAnnotations",value:function(e){var r=new ml;return e.annotations.xaxis=J.extendArray(e.annotations.xaxis!==void 0?e.annotations.xaxis:[],r.xAxisAnnotation),e}},{key:"extendPointAnnotations",value:function(e){var r=new ml;return e.annotations.points=J.extendArray(e.annotations.points!==void 0?e.annotations.points:[],r.pointAnnotation),e}},{key:"checkForDarkTheme",value:function(e){e.theme&&e.theme.mode==="dark"&&(e.tooltip||(e.tooltip={}),e.tooltip.theme!=="light"&&(e.tooltip.theme="dark"),e.chart.foreColor||(e.chart.foreColor="#f6f7f8"),e.theme.palette||(e.theme.palette="palette4"))}},{key:"handleUserInputErrors",value:function(e){var r=e;if(r.tooltip.shared&&r.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if(r.chart.type==="bar"&&r.plotOptions.bar.horizontal){if(r.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");r.yaxis[0].reversed&&(r.yaxis[0].opposite=!0),r.xaxis.tooltip.enabled=!1,r.yaxis[0].tooltip.enabled=!1,r.chart.zoom.enabled=!1}return r.chart.type!=="bar"&&r.chart.type!=="rangeBar"||r.tooltip.shared&&r.xaxis.crosshairs.width==="barWidth"&&r.series.length>1&&(r.xaxis.crosshairs.width="tickWidth"),r.chart.type!=="candlestick"&&r.chart.type!=="boxPlot"||r.yaxis[0].reversed&&(console.warn("Reversed y-axis in ".concat(r.chart.type," chart is not supported.")),r.yaxis[0].reversed=!1),r}}]),t}(),aR=function(){function t(){Se(this,t)}return Ae(t,[{key:"initGlobalVars",value:function(e){e.series=[],e.seriesCandleO=[],e.seriesCandleH=[],e.seriesCandleM=[],e.seriesCandleL=[],e.seriesCandleC=[],e.seriesRangeStart=[],e.seriesRangeEnd=[],e.seriesRange=[],e.seriesPercent=[],e.seriesGoals=[],e.seriesX=[],e.seriesZ=[],e.seriesNames=[],e.seriesTotals=[],e.seriesLog=[],e.seriesColors=[],e.stackedSeriesTotals=[],e.seriesXvalues=[],e.seriesYvalues=[],e.dataWasParsed=!1,e.originalSeries=null,e.labels=[],e.hasXaxisGroups=!1,e.groups=[],e.barGroups=[],e.lineGroups=[],e.areaGroups=[],e.hasSeriesGroups=!1,e.seriesGroups=[],e.categoryLabels=[],e.timescaleLabels=[],e.noLabelsProvided=!1,e.resizeTimer=null,e.selectionResizeTimer=null,e.lastWheelExecution=0,e.delayedElements=[],e.pointsArray=[],e.dataLabelsRects=[],e.isXNumeric=!1,e.skipLastTimelinelabel=!1,e.skipFirstTimelinelabel=!1,e.isDataXYZ=!1,e.isMultiLineX=!1,e.isMultipleYAxis=!1,e.maxY=-Number.MAX_VALUE,e.minY=Number.MIN_VALUE,e.minYArr=[],e.maxYArr=[],e.maxX=-Number.MAX_VALUE,e.minX=Number.MAX_VALUE,e.initialMaxX=-Number.MAX_VALUE,e.initialMinX=Number.MAX_VALUE,e.maxDate=0,e.minDate=Number.MAX_VALUE,e.minZ=Number.MAX_VALUE,e.maxZ=-Number.MAX_VALUE,e.minXDiff=Number.MAX_VALUE,e.yAxisScale=[],e.xAxisScale=null,e.xAxisTicksPositions=[],e.yLabelsCoords=[],e.yTitleCoords=[],e.barPadForNumericAxis=0,e.padHorizontal=0,e.xRange=0,e.yRange=[],e.zRange=0,e.dataPoints=0,e.xTickAmount=0,e.multiAxisTickAmount=0}},{key:"globalVars",value:function(e){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],clientX:null,clientY:null,fill:{colors:[]},stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:e.markers.size,largestSize:0},animationEnded:!1,isTouchDevice:"ontouchstart"in window||navigator.msMaxTouchPoints,isDirty:!1,isExecCalled:!1,initialConfig:null,initialSeries:[],lastXAxis:[],lastYAxis:[],columnSeries:null,labels:[],timescaleLabels:[],noLabelsProvided:!1,allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],risingSeries:[],dataFormatXNumeric:!1,capturedSeriesIndex:-1,capturedDataPointIndex:-1,selectedDataPoints:[],invalidLogScale:!1,ignoreYAxisIndexes:[],maxValsInArrayIndex:0,radialSize:0,selection:void 0,zoomEnabled:e.chart.toolbar.autoSelected==="zoom"&&e.chart.toolbar.tools.zoom&&e.chart.zoom.enabled,panEnabled:e.chart.toolbar.autoSelected==="pan"&&e.chart.toolbar.tools.pan,selectionEnabled:e.chart.toolbar.autoSelected==="selection"&&e.chart.toolbar.tools.selection,yaxis:null,mousedown:!1,lastClientPosition:{},visibleXRange:void 0,yValueDecimal:0,total:0,SVGNS:"http://www.w3.org/2000/svg",svgWidth:0,svgHeight:0,noData:!1,locale:{},dom:{},memory:{methodsToExec:[]},shouldAnimate:!0,skipLastTimelinelabel:!1,skipFirstTimelinelabel:!1,delayedElements:[],axisCharts:!0,isDataXYZ:!1,isSlopeChart:e.plotOptions.line.isSlopeChart,resized:!1,resizeTimer:null,comboCharts:!1,dataChanged:!1,previousPaths:[],allSeriesHasEqualX:!0,pointsArray:[],dataLabelsRects:[],lastDrawnDataLabelsIndexes:[],hasNullValues:!1,zoomed:!1,gridWidth:0,gridHeight:0,rotateXLabels:!1,defaultLabels:!1,xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,LINE_HEIGHT_RATIO:1.618,xAxisLabelsHeight:0,xAxisGroupLabelsHeight:0,xAxisLabelsWidth:0,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateX:0,translateY:0,translateYAxisX:[],yAxisWidths:[],translateXAxisY:0,translateXAxisX:0,tooltip:null,niceScaleAllowedMagMsd:[[1,1,2,5,5,5,10,10,10,10,10],[1,1,2,5,5,5,10,10,10,10,10]],niceScaleDefaultTicks:[1,2,4,4,6,6,6,6,6,6,6,6,6,6,6,6,6,6,12,12,12,12,12,12,12,12,12,24],seriesYAxisMap:[],seriesYAxisReverseMap:[]}}},{key:"init",value:function(e){var r=this.globalVars(e);return this.initGlobalVars(r),r.initialConfig=J.extend({},e),r.initialSeries=J.clone(e.series),r.lastXAxis=J.clone(r.initialConfig.xaxis),r.lastYAxis=J.clone(r.initialConfig.yaxis),r}}]),t}(),KG=function(){function t(e){Se(this,t),this.opts=e}return Ae(t,[{key:"init",value:function(){var e=new hf(this.opts).init({responsiveOverride:!1});return{config:e,globals:new aR().init(e)}}}]),t}(),Ja=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w,this.opts=null,this.seriesIndex=0,this.patternIDs=[]}return Ae(t,[{key:"clippedImgArea",value:function(e){var r=this.w,n=r.config,a=parseInt(r.globals.gridWidth,10),s=parseInt(r.globals.gridHeight,10),o=a>s?a:s,l=e.image,c=0,u=0;e.width===void 0&&e.height===void 0?n.fill.image.width!==void 0&&n.fill.image.height!==void 0?(c=n.fill.image.width+1,u=n.fill.image.height):(c=o+1,u=o):(c=e.width,u=e.height);var h=document.createElementNS(r.globals.SVGNS,"pattern");ge.setAttrs(h,{id:e.patternID,patternUnits:e.patternUnits?e.patternUnits:"userSpaceOnUse",width:c+"px",height:u+"px"});var p=document.createElementNS(r.globals.SVGNS,"image");h.appendChild(p),p.setAttributeNS(window.SVG.xlink,"href",l),ge.setAttrs(p,{x:0,y:0,preserveAspectRatio:"none",width:c+"px",height:u+"px"}),p.style.opacity=e.opacity,r.globals.dom.elDefs.node.appendChild(h)}},{key:"getSeriesIndex",value:function(e){var r=this.w,n=r.config.chart.type;return(n==="bar"||n==="rangeBar")&&r.config.plotOptions.bar.distributed||n==="heatmap"||n==="treemap"?this.seriesIndex=e.seriesNumber:this.seriesIndex=e.seriesNumber%r.globals.series.length,this.seriesIndex}},{key:"computeColorStops",value:function(e,r){var n,a=this.w,s=null,o=null,l=Nh(e);try{for(l.s();!(n=l.n()).done;){var c=n.value;c>=r.threshold?(s===null||c>s)&&(s=c):(o===null||c<o)&&(o=c)}}catch(p){l.e(p)}finally{l.f()}s===null&&(s=r.threshold),o===null&&(o=r.threshold);var u=s-r.threshold+(r.threshold-o);u===0&&(u=1);var h=100-(r.threshold-o)/u*100;return[{offset:h=Math.max(0,Math.min(h,100)),color:r.colorAboveThreshold,opacity:a.config.fill.opacity},{offset:0,color:r.colorBelowThreshold,opacity:a.config.fill.opacity}]}},{key:"fillPath",value:function(e){var r,n,a,s=this.w;this.opts=e;var o,l,c,u=this.w.config;this.seriesIndex=this.getSeriesIndex(e);var h=u.plotOptions.line.colors.colorAboveThreshold&&u.plotOptions.line.colors.colorBelowThreshold,p=this.getFillColors()[this.seriesIndex];s.globals.seriesColors[this.seriesIndex]!==void 0&&(p=s.globals.seriesColors[this.seriesIndex]),typeof p=="function"&&(p=p({seriesIndex:this.seriesIndex,dataPointIndex:e.dataPointIndex,value:e.value,w:s}));var m,x,y,b=e.fillType?e.fillType:this.getFillType(this.seriesIndex),w=Array.isArray(u.fill.opacity)?u.fill.opacity[this.seriesIndex]:u.fill.opacity,N=b==="gradient"||h;e.color&&(p=e.color),(r=s.config.series[this.seriesIndex])!==null&&r!==void 0&&(n=r.data)!==null&&n!==void 0&&(a=n[e.dataPointIndex])!==null&&a!==void 0&&a.fillColor&&(p=(m=s.config.series[this.seriesIndex])===null||m===void 0||(x=m.data)===null||x===void 0||(y=x[e.dataPointIndex])===null||y===void 0?void 0:y.fillColor),p||(p="#fff",console.warn("undefined color - ApexCharts"));var A=p;if(p.indexOf("rgb")===-1?p.indexOf("#")===-1?A=p:p.length<9&&(A=J.hexToRgba(p,w)):p.indexOf("rgba")>-1?w=J.getOpacityFromRGBA(p):A=J.hexToRgba(J.rgb2hex(p),w),e.opacity&&(w=e.opacity),b==="pattern"&&(l=this.handlePatternFill({fillConfig:e.fillConfig,patternFill:l,fillColor:p,fillOpacity:w,defaultColor:A})),N){var S=Nr(u.fill.gradient.colorStops)||[],C=u.fill.gradient.type;h&&(S[this.seriesIndex]=this.computeColorStops(s.globals.series[this.seriesIndex],u.plotOptions.line.colors),C="vertical"),c=this.handleGradientFill({type:C,fillConfig:e.fillConfig,fillColor:p,fillOpacity:w,colorStops:S,i:this.seriesIndex})}if(b==="image"){var k=u.fill.image.src,T=e.patternID?e.patternID:"",E="pattern".concat(s.globals.cuid).concat(e.seriesNumber+1).concat(T);this.patternIDs.indexOf(E)===-1&&(this.clippedImgArea({opacity:w,image:Array.isArray(k)?e.seriesNumber<k.length?k[e.seriesNumber]:k[0]:k,width:e.width?e.width:void 0,height:e.height?e.height:void 0,patternUnits:e.patternUnits,patternID:E}),this.patternIDs.push(E)),o="url(#".concat(E,")")}else o=N?c:b==="pattern"?l:A;return e.solid&&(o=A),o}},{key:"getFillType",value:function(e){var r=this.w;return Array.isArray(r.config.fill.type)?r.config.fill.type[e]:r.config.fill.type}},{key:"getFillColors",value:function(){var e=this.w,r=e.config,n=this.opts,a=[];return e.globals.comboCharts?e.config.series[this.seriesIndex].type==="line"?Array.isArray(e.globals.stroke.colors)?a=e.globals.stroke.colors:a.push(e.globals.stroke.colors):Array.isArray(e.globals.fill.colors)?a=e.globals.fill.colors:a.push(e.globals.fill.colors):r.chart.type==="line"?Array.isArray(e.globals.stroke.colors)?a=e.globals.stroke.colors:a.push(e.globals.stroke.colors):Array.isArray(e.globals.fill.colors)?a=e.globals.fill.colors:a.push(e.globals.fill.colors),n.fillColors!==void 0&&(a=[],Array.isArray(n.fillColors)?a=n.fillColors.slice():a.push(n.fillColors)),a}},{key:"handlePatternFill",value:function(e){var r=e.fillConfig,n=e.patternFill,a=e.fillColor,s=e.fillOpacity,o=e.defaultColor,l=this.w.config.fill;r&&(l=r);var c=this.opts,u=new ge(this.ctx),h=Array.isArray(l.pattern.strokeWidth)?l.pattern.strokeWidth[this.seriesIndex]:l.pattern.strokeWidth,p=a;return Array.isArray(l.pattern.style)?n=l.pattern.style[c.seriesNumber]!==void 0?u.drawPattern(l.pattern.style[c.seriesNumber],l.pattern.width,l.pattern.height,p,h,s):o:n=u.drawPattern(l.pattern.style,l.pattern.width,l.pattern.height,p,h,s),n}},{key:"handleGradientFill",value:function(e){var r=e.type,n=e.fillColor,a=e.fillOpacity,s=e.fillConfig,o=e.colorStops,l=e.i,c=this.w.config.fill;s&&(c=ve(ve({},c),s));var u=this.opts,h=new ge(this.ctx),p=new J;r=r||c.gradient.type;var m,x=n,y=c.gradient.opacityFrom===void 0?a:Array.isArray(c.gradient.opacityFrom)?c.gradient.opacityFrom[l]:c.gradient.opacityFrom;x.indexOf("rgba")>-1&&(y=J.getOpacityFromRGBA(x));var b=c.gradient.opacityTo===void 0?a:Array.isArray(c.gradient.opacityTo)?c.gradient.opacityTo[l]:c.gradient.opacityTo;if(c.gradient.gradientToColors===void 0||c.gradient.gradientToColors.length===0)m=c.gradient.shade==="dark"?p.shadeColor(-1*parseFloat(c.gradient.shadeIntensity),n.indexOf("rgb")>-1?J.rgb2hex(n):n):p.shadeColor(parseFloat(c.gradient.shadeIntensity),n.indexOf("rgb")>-1?J.rgb2hex(n):n);else if(c.gradient.gradientToColors[u.seriesNumber]){var w=c.gradient.gradientToColors[u.seriesNumber];m=w,w.indexOf("rgba")>-1&&(b=J.getOpacityFromRGBA(w))}else m=n;if(c.gradient.gradientFrom&&(x=c.gradient.gradientFrom),c.gradient.gradientTo&&(m=c.gradient.gradientTo),c.gradient.inverseColors){var N=x;x=m,m=N}return x.indexOf("rgb")>-1&&(x=J.rgb2hex(x)),m.indexOf("rgb")>-1&&(m=J.rgb2hex(m)),h.drawGradient(r,x,m,y,b,u.size,c.gradient.stops,o,l)}}]),t}(),Fd=function(){function t(e,r){Se(this,t),this.ctx=e,this.w=e.w}return Ae(t,[{key:"setGlobalMarkerSize",value:function(){var e=this.w;if(e.globals.markers.size=Array.isArray(e.config.markers.size)?e.config.markers.size:[e.config.markers.size],e.globals.markers.size.length>0){if(e.globals.markers.size.length<e.globals.series.length+1)for(var r=0;r<=e.globals.series.length;r++)e.globals.markers.size[r]===void 0&&e.globals.markers.size.push(e.globals.markers.size[0])}else e.globals.markers.size=e.config.series.map(function(n){return e.config.markers.size})}},{key:"plotChartMarkers",value:function(e){var r=e.pointsPos,n=e.seriesIndex,a=e.j,s=e.pSize,o=e.alwaysDrawMarker,l=o!==void 0&&o,c=e.isVirtualPoint,u=c!==void 0&&c,h=this.w,p=n,m=r,x=null,y=new ge(this.ctx),b=h.config.markers.discrete&&h.config.markers.discrete.length;if(Array.isArray(m.x))for(var w=0;w<m.x.length;w++){var N=void 0,A=a,S=!J.isNumber(m.y[w]);h.globals.markers.largestSize===0&&h.globals.hasNullValues&&h.globals.series[p][a+1]!==null&&!u&&(S=!0),a===1&&w===0&&(A=0),a===1&&w===1&&(A=1);var C="apexcharts-marker";if(h.config.chart.type!=="line"&&h.config.chart.type!=="area"||h.globals.comboCharts||h.config.tooltip.intersect||(C+=" no-pointer-events"),(Array.isArray(h.config.markers.size)?h.globals.markers.size[n]>0:h.config.markers.size>0)||l||b){S||(C+=" w".concat(J.randomId()));var k=this.getMarkerConfig({cssClass:C,seriesIndex:n,dataPointIndex:A});h.config.series[p].data[A]&&(h.config.series[p].data[A].fillColor&&(k.pointFillColor=h.config.series[p].data[A].fillColor),h.config.series[p].data[A].strokeColor&&(k.pointStrokeColor=h.config.series[p].data[A].strokeColor)),s!==void 0&&(k.pSize=s),(m.x[w]<-h.globals.markers.largestSize||m.x[w]>h.globals.gridWidth+h.globals.markers.largestSize||m.y[w]<-h.globals.markers.largestSize||m.y[w]>h.globals.gridHeight+h.globals.markers.largestSize)&&(k.pSize=0),!S&&((h.globals.markers.size[n]>0||l||b)&&!x&&(x=y.group({class:l||b?"":"apexcharts-series-markers"})).attr("clip-path","url(#gridRectMarkerMask".concat(h.globals.cuid,")")),(N=y.drawMarker(m.x[w],m.y[w],k)).attr("rel",A),N.attr("j",A),N.attr("index",n),N.node.setAttribute("default-marker-size",k.pSize),new Gr(this.ctx).setSelectionFilter(N,n,A),this.addEvents(N),x&&x.add(N))}else h.globals.pointsArray[n]===void 0&&(h.globals.pointsArray[n]=[]),h.globals.pointsArray[n].push([m.x[w],m.y[w]])}return x}},{key:"getMarkerConfig",value:function(e){var r=e.cssClass,n=e.seriesIndex,a=e.dataPointIndex,s=a===void 0?null:a,o=e.radius,l=o===void 0?null:o,c=e.size,u=c===void 0?null:c,h=e.strokeWidth,p=h===void 0?null:h,m=this.w,x=this.getMarkerStyle(n),y=u===null?m.globals.markers.size[n]:u,b=m.config.markers;return s!==null&&b.discrete.length&&b.discrete.map(function(w){w.seriesIndex===n&&w.dataPointIndex===s&&(x.pointStrokeColor=w.strokeColor,x.pointFillColor=w.fillColor,y=w.size,x.pointShape=w.shape)}),{pSize:l===null?y:l,pRadius:l!==null?l:b.radius,pointStrokeWidth:p!==null?p:Array.isArray(b.strokeWidth)?b.strokeWidth[n]:b.strokeWidth,pointStrokeColor:x.pointStrokeColor,pointFillColor:x.pointFillColor,shape:x.pointShape||(Array.isArray(b.shape)?b.shape[n]:b.shape),class:r,pointStrokeOpacity:Array.isArray(b.strokeOpacity)?b.strokeOpacity[n]:b.strokeOpacity,pointStrokeDashArray:Array.isArray(b.strokeDashArray)?b.strokeDashArray[n]:b.strokeDashArray,pointFillOpacity:Array.isArray(b.fillOpacity)?b.fillOpacity[n]:b.fillOpacity,seriesIndex:n}}},{key:"addEvents",value:function(e){var r=this.w,n=new ge(this.ctx);e.node.addEventListener("mouseenter",n.pathMouseEnter.bind(this.ctx,e)),e.node.addEventListener("mouseleave",n.pathMouseLeave.bind(this.ctx,e)),e.node.addEventListener("mousedown",n.pathMouseDown.bind(this.ctx,e)),e.node.addEventListener("click",r.config.markers.onClick),e.node.addEventListener("dblclick",r.config.markers.onDblClick),e.node.addEventListener("touchstart",n.pathMouseDown.bind(this.ctx,e),{passive:!0})}},{key:"getMarkerStyle",value:function(e){var r=this.w,n=r.globals.markers.colors,a=r.config.markers.strokeColor||r.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(a)?a[e]:a,pointFillColor:Array.isArray(n)?n[e]:n}}}]),t}(),sR=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w,this.initialAnim=this.w.config.chart.animations.enabled}return Ae(t,[{key:"draw",value:function(e,r,n){var a=this.w,s=new ge(this.ctx),o=n.realIndex,l=n.pointsPos,c=n.zRatio,u=n.elParent,h=s.group({class:"apexcharts-series-markers apexcharts-series-".concat(a.config.chart.type)});if(h.attr("clip-path","url(#gridRectMarkerMask".concat(a.globals.cuid,")")),Array.isArray(l.x))for(var p=0;p<l.x.length;p++){var m=r+1,x=!0;r===0&&p===0&&(m=0),r===0&&p===1&&(m=1);var y=a.globals.markers.size[o];if(c!==1/0){var b=a.config.plotOptions.bubble;y=a.globals.seriesZ[o][m],b.zScaling&&(y/=c),b.minBubbleRadius&&y<b.minBubbleRadius&&(y=b.minBubbleRadius),b.maxBubbleRadius&&y>b.maxBubbleRadius&&(y=b.maxBubbleRadius)}var w=l.x[p],N=l.y[p];if(y=y||0,N!==null&&a.globals.series[o][m]!==void 0||(x=!1),x){var A=this.drawPoint(w,N,y,o,m,r);h.add(A)}u.add(h)}}},{key:"drawPoint",value:function(e,r,n,a,s,o){var l=this.w,c=a,u=new Ld(this.ctx),h=new Gr(this.ctx),p=new Ja(this.ctx),m=new Fd(this.ctx),x=new ge(this.ctx),y=m.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:c,dataPointIndex:s,radius:l.config.chart.type==="bubble"||l.globals.comboCharts&&l.config.series[a]&&l.config.series[a].type==="bubble"?n:null}),b=p.fillPath({seriesNumber:a,dataPointIndex:s,color:y.pointFillColor,patternUnits:"objectBoundingBox",value:l.globals.series[a][o]}),w=x.drawMarker(e,r,y);if(l.config.series[c].data[s]&&l.config.series[c].data[s].fillColor&&(b=l.config.series[c].data[s].fillColor),w.attr({fill:b}),l.config.chart.dropShadow.enabled){var N=l.config.chart.dropShadow;h.dropShadow(w,N,a)}if(!this.initialAnim||l.globals.dataChanged||l.globals.resized)l.globals.animationEnded=!0;else{var A=l.config.chart.animations.speed;u.animateMarker(w,A,l.globals.easing,function(){window.setTimeout(function(){u.animationCompleted(w)},100)})}return w.attr({rel:s,j:s,index:a,"default-marker-size":y.pSize}),h.setSelectionFilter(w,a,s),m.addEvents(w),w.node.classList.add("apexcharts-marker"),w}},{key:"centerTextInBubble",value:function(e){var r=this.w;return{y:e+=parseInt(r.config.dataLabels.style.fontSize,10)/4}}}]),t}(),gd=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w}return Ae(t,[{key:"dataLabelsCorrection",value:function(e,r,n,a,s,o,l){var c=this.w,u=!1,h=new ge(this.ctx).getTextRects(n,l),p=h.width,m=h.height;r<0&&(r=0),r>c.globals.gridHeight+m&&(r=c.globals.gridHeight+m/2),c.globals.dataLabelsRects[a]===void 0&&(c.globals.dataLabelsRects[a]=[]),c.globals.dataLabelsRects[a].push({x:e,y:r,width:p,height:m});var x=c.globals.dataLabelsRects[a].length-2,y=c.globals.lastDrawnDataLabelsIndexes[a]!==void 0?c.globals.lastDrawnDataLabelsIndexes[a][c.globals.lastDrawnDataLabelsIndexes[a].length-1]:0;if(c.globals.dataLabelsRects[a][x]!==void 0){var b=c.globals.dataLabelsRects[a][y];(e>b.x+b.width||r>b.y+b.height||r+m<b.y||e+p<b.x)&&(u=!0)}return(s===0||o)&&(u=!0),{x:e,y:r,textRects:h,drawnextLabel:u}}},{key:"drawDataLabel",value:function(e){var r=this,n=e.type,a=e.pos,s=e.i,o=e.j,l=e.isRangeStart,c=e.strokeWidth,u=c===void 0?2:c,h=this.w,p=new ge(this.ctx),m=h.config.dataLabels,x=0,y=0,b=o,w=null;if(h.globals.collapsedSeriesIndices.indexOf(s)!==-1||!m.enabled||!Array.isArray(a.x))return w;w=p.group({class:"apexcharts-data-labels"});for(var N=0;N<a.x.length;N++)if(x=a.x[N]+m.offsetX,y=a.y[N]+m.offsetY+u,!isNaN(x)){o===1&&N===0&&(b=0),o===1&&N===1&&(b=1);var A=h.globals.series[s][b];n==="rangeArea"&&(A=l?h.globals.seriesRangeStart[s][b]:h.globals.seriesRangeEnd[s][b]);var S="",C=function(T){return h.config.dataLabels.formatter(T,{ctx:r.ctx,seriesIndex:s,dataPointIndex:b,w:h})};h.config.chart.type==="bubble"?(S=C(A=h.globals.seriesZ[s][b]),y=a.y[N],y=new sR(this.ctx).centerTextInBubble(y,s,b).y):A!==void 0&&(S=C(A));var k=h.config.dataLabels.textAnchor;h.globals.isSlopeChart&&(k=b===0?"end":b===h.config.series[s].data.length-1?"start":"middle"),this.plotDataLabelsText({x,y,text:S,i:s,j:b,parent:w,offsetCorrection:!0,dataLabelsConfig:h.config.dataLabels,textAnchor:k})}return w}},{key:"plotDataLabelsText",value:function(e){var r=this.w,n=new ge(this.ctx),a=e.x,s=e.y,o=e.i,l=e.j,c=e.text,u=e.textAnchor,h=e.fontSize,p=e.parent,m=e.dataLabelsConfig,x=e.color,y=e.alwaysDrawDataLabel,b=e.offsetCorrection,w=e.className,N=null;if(Array.isArray(r.config.dataLabels.enabledOnSeries)&&r.config.dataLabels.enabledOnSeries.indexOf(o)<0)return N;var A={x:a,y:s,drawnextLabel:!0,textRects:null};b&&(A=this.dataLabelsCorrection(a,s,c,o,l,y,parseInt(m.style.fontSize,10))),r.globals.zoomed||(a=A.x,s=A.y),A.textRects&&(a<-20-A.textRects.width||a>r.globals.gridWidth+A.textRects.width+30)&&(c="");var S=r.globals.dataLabels.style.colors[o];((r.config.chart.type==="bar"||r.config.chart.type==="rangeBar")&&r.config.plotOptions.bar.distributed||r.config.dataLabels.distributed)&&(S=r.globals.dataLabels.style.colors[l]),typeof S=="function"&&(S=S({series:r.globals.series,seriesIndex:o,dataPointIndex:l,w:r})),x&&(S=x);var C=m.offsetX,k=m.offsetY;if(r.config.chart.type!=="bar"&&r.config.chart.type!=="rangeBar"||(C=0,k=0),r.globals.isSlopeChart&&(l!==0&&(C=-2*m.offsetX+5),l!==0&&l!==r.config.series[o].data.length-1&&(C=0)),A.drawnextLabel){if(u==="middle"&&a===r.globals.gridWidth&&(u="end"),(N=n.drawText({width:100,height:parseInt(m.style.fontSize,10),x:a+C,y:s+k,foreColor:S,textAnchor:u||m.textAnchor,text:c,fontSize:h||m.style.fontSize,fontFamily:m.style.fontFamily,fontWeight:m.style.fontWeight||"normal"})).attr({class:w||"apexcharts-datalabel",cx:a,cy:s}),m.dropShadow.enabled){var T=m.dropShadow;new Gr(this.ctx).dropShadow(N,T)}p.add(N),r.globals.lastDrawnDataLabelsIndexes[o]===void 0&&(r.globals.lastDrawnDataLabelsIndexes[o]=[]),r.globals.lastDrawnDataLabelsIndexes[o].push(l)}return N}},{key:"addBackgroundToDataLabel",value:function(e,r){var n=this.w,a=n.config.dataLabels.background,s=a.padding,o=a.padding/2,l=r.width,c=r.height,u=new ge(this.ctx).drawRect(r.x-s,r.y-o/2,l+2*s,c+o,a.borderRadius,n.config.chart.background!=="transparent"&&n.config.chart.background?n.config.chart.background:"#fff",a.opacity,a.borderWidth,a.borderColor);return a.dropShadow.enabled&&new Gr(this.ctx).dropShadow(u,a.dropShadow),u}},{key:"dataLabelsBackground",value:function(){var e=this.w;if(e.config.chart.type!=="bubble")for(var r=e.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels text"),n=0;n<r.length;n++){var a=r[n],s=a.getBBox(),o=null;if(s.width&&s.height&&(o=this.addBackgroundToDataLabel(a,s)),o){a.parentNode.insertBefore(o.node,a);var l=e.config.dataLabels.background.backgroundColor||a.getAttribute("fill");e.config.chart.animations.enabled&&!e.globals.resized&&!e.globals.dataChanged?o.animate().attr({fill:l}):o.attr({fill:l}),a.setAttribute("fill",e.config.dataLabels.background.foreColor)}}}},{key:"bringForward",value:function(){for(var e=this.w,r=e.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels"),n=e.globals.dom.baseEl.querySelector(".apexcharts-plot-series:last-child"),a=0;a<r.length;a++)n&&n.insertBefore(r[a],n.nextSibling)}}]),t}(),Ra=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w,this.legendInactiveClass="legend-mouseover-inactive"}return Ae(t,[{key:"getAllSeriesEls",value:function(){return this.w.globals.dom.baseEl.getElementsByClassName("apexcharts-series")}},{key:"getSeriesByName",value:function(e){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner .apexcharts-series[seriesName='".concat(J.escapeString(e),"']"))}},{key:"isSeriesHidden",value:function(e){var r=this.getSeriesByName(e),n=parseInt(r.getAttribute("data:realIndex"),10);return{isHidden:r.classList.contains("apexcharts-series-collapsed"),realIndex:n}}},{key:"addCollapsedClassToSeries",value:function(e,r){var n=this.w;function a(s){for(var o=0;o<s.length;o++)s[o].index===r&&e.node.classList.add("apexcharts-series-collapsed")}a(n.globals.collapsedSeries),a(n.globals.ancillaryCollapsedSeries)}},{key:"toggleSeries",value:function(e){var r=this.isSeriesHidden(e);return this.ctx.legend.legendHelpers.toggleDataSeries(r.realIndex,r.isHidden),r.isHidden}},{key:"showSeries",value:function(e){var r=this.isSeriesHidden(e);r.isHidden&&this.ctx.legend.legendHelpers.toggleDataSeries(r.realIndex,!0)}},{key:"hideSeries",value:function(e){var r=this.isSeriesHidden(e);r.isHidden||this.ctx.legend.legendHelpers.toggleDataSeries(r.realIndex,!1)}},{key:"resetSeries",value:function(){var e=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],r=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],n=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],a=this.w,s=J.clone(a.globals.initialSeries);a.globals.previousPaths=[],n?(a.globals.collapsedSeries=[],a.globals.ancillaryCollapsedSeries=[],a.globals.collapsedSeriesIndices=[],a.globals.ancillaryCollapsedSeriesIndices=[]):s=this.emptyCollapsedSeries(s),a.config.series=s,e&&(r&&(a.globals.zoomed=!1,this.ctx.updateHelpers.revertDefaultAxisMinMax()),this.ctx.updateHelpers._updateSeries(s,a.config.chart.animations.dynamicAnimation.enabled))}},{key:"emptyCollapsedSeries",value:function(e){for(var r=this.w,n=0;n<e.length;n++)r.globals.collapsedSeriesIndices.indexOf(n)>-1&&(e[n].data=[]);return e}},{key:"highlightSeries",value:function(e){var r=this.w,n=this.getSeriesByName(e),a=parseInt(n?.getAttribute("data:realIndex"),10),s=r.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis"),o=null,l=null,c=null;if(r.globals.axisCharts||r.config.chart.type==="radialBar")if(r.globals.axisCharts){o=r.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(a,"']")),l=r.globals.dom.baseEl.querySelector(".apexcharts-datalabels[data\\:realIndex='".concat(a,"']"));var u=r.globals.seriesYAxisReverseMap[a];c=r.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(u,"']"))}else o=r.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(a+1,"']"));else o=r.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(a+1,"'] path"));for(var h=0;h<s.length;h++)s[h].classList.add(this.legendInactiveClass);if(o)r.globals.axisCharts||o.parentNode.classList.remove(this.legendInactiveClass),o.classList.remove(this.legendInactiveClass),l!==null&&l.classList.remove(this.legendInactiveClass),c!==null&&c.classList.remove(this.legendInactiveClass);else for(var p=0;p<s.length;p++)s[p].classList.remove(this.legendInactiveClass)}},{key:"toggleSeriesOnHover",value:function(e,r){var n=this.w;r||(r=e.target);var a=n.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis");if(e.type==="mousemove"){var s=parseInt(r.getAttribute("rel"),10)-1;this.highlightSeries(n.globals.seriesNames[s])}else if(e.type==="mouseout")for(var o=0;o<a.length;o++)a[o].classList.remove(this.legendInactiveClass)}},{key:"highlightRangeInSeries",value:function(e,r){var n=this,a=this.w,s=a.globals.dom.baseEl.getElementsByClassName("apexcharts-heatmap-rect"),o=function(u){for(var h=0;h<s.length;h++)s[h].classList[u](n.legendInactiveClass)};if(e.type==="mousemove"){var l=parseInt(r.getAttribute("rel"),10)-1;o("add");var c=a.config.plotOptions.heatmap.colorScale.ranges;(function(u,h){for(var p=0;p<s.length;p++){var m=Number(s[p].getAttribute("val"));m>=u.from&&(m<u.to||u.to===h&&m===h)&&s[p].classList.remove(n.legendInactiveClass)}})(c[l],c.reduce(function(u,h){return Math.max(u,h.to)},0))}else e.type==="mouseout"&&o("remove")}},{key:"getActiveConfigSeriesIndex",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"asc",r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=this.w,a=0;if(n.config.series.length>1){for(var s=n.config.series.map(function(l,c){return l.data&&l.data.length>0&&n.globals.collapsedSeriesIndices.indexOf(c)===-1&&(!n.globals.comboCharts||r.length===0||r.length&&r.indexOf(n.config.series[c].type)>-1)?c:-1}),o=e==="asc"?0:s.length-1;e==="asc"?o<s.length:o>=0;e==="asc"?o++:o--)if(s[o]!==-1){a=s[o];break}}return a}},{key:"getBarSeriesIndices",value:function(){return this.w.globals.comboCharts?this.w.config.series.map(function(e,r){return e.type==="bar"||e.type==="column"?r:-1}).filter(function(e){return e!==-1}):this.w.config.series.map(function(e,r){return r})}},{key:"getPreviousPaths",value:function(){var e=this.w;function r(o,l,c){for(var u=o[l].childNodes,h={type:c,paths:[],realIndex:o[l].getAttribute("data:realIndex")},p=0;p<u.length;p++)if(u[p].hasAttribute("pathTo")){var m=u[p].getAttribute("pathTo");h.paths.push({d:m})}e.globals.previousPaths.push(h)}e.globals.previousPaths=[],["line","area","bar","rangebar","rangeArea","candlestick","radar"].forEach(function(o){for(var l,c=(l=o,e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(l,"-series .apexcharts-series"))),u=0;u<c.length;u++)r(c,u,o)});var n=e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(e.config.chart.type," .apexcharts-series"));if(n.length>0)for(var a=function(o){for(var l=e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(e.config.chart.type," .apexcharts-series[data\\:realIndex='").concat(o,"'] rect")),c=[],u=function(p){var m=function(y){return l[p].getAttribute(y)},x={x:parseFloat(m("x")),y:parseFloat(m("y")),width:parseFloat(m("width")),height:parseFloat(m("height"))};c.push({rect:x,color:l[p].getAttribute("color")})},h=0;h<l.length;h++)u(h);e.globals.previousPaths.push(c)},s=0;s<n.length;s++)a(s);e.globals.axisCharts||(e.globals.previousPaths=e.globals.series)}},{key:"clearPreviousPaths",value:function(){var e=this.w;e.globals.previousPaths=[],e.globals.allSeriesCollapsed=!1}},{key:"handleNoData",value:function(){var e=this.w,r=e.config.noData,n=new ge(this.ctx),a=e.globals.svgWidth/2,s=e.globals.svgHeight/2,o="middle";if(e.globals.noData=!0,e.globals.animationEnded=!0,r.align==="left"?(a=10,o="start"):r.align==="right"&&(a=e.globals.svgWidth-10,o="end"),r.verticalAlign==="top"?s=50:r.verticalAlign==="bottom"&&(s=e.globals.svgHeight-50),a+=r.offsetX,s=s+parseInt(r.style.fontSize,10)+2+r.offsetY,r.text!==void 0&&r.text!==""){var l=n.drawText({x:a,y:s,text:r.text,textAnchor:o,fontSize:r.style.fontSize,fontFamily:r.style.fontFamily,foreColor:r.style.color,opacity:1,class:"apexcharts-text-nodata"});e.globals.dom.Paper.add(l)}}},{key:"setNullSeriesToZeroValues",value:function(e){for(var r=this.w,n=0;n<e.length;n++)if(e[n].length===0)for(var a=0;a<e[r.globals.maxValsInArrayIndex].length;a++)e[n].push(0);return e}},{key:"hasAllSeriesEqualX",value:function(){for(var e=!0,r=this.w,n=this.filteredSeriesX(),a=0;a<n.length-1;a++)if(n[a][0]!==n[a+1][0]){e=!1;break}return r.globals.allSeriesHasEqualX=e,e}},{key:"filteredSeriesX",value:function(){var e=this.w.globals.seriesX.map(function(r){return r.length>0?r:[]});return e}}]),t}(),nN=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new ir(this.ctx)}return Ae(t,[{key:"isMultiFormat",value:function(){return this.isFormatXY()||this.isFormat2DArray()}},{key:"isFormatXY",value:function(){var e=this.w.config.series.slice(),r=new Ra(this.ctx);if(this.activeSeriesIndex=r.getActiveConfigSeriesIndex(),e[this.activeSeriesIndex].data!==void 0&&e[this.activeSeriesIndex].data.length>0&&e[this.activeSeriesIndex].data[0]!==null&&e[this.activeSeriesIndex].data[0].x!==void 0&&e[this.activeSeriesIndex].data[0]!==null)return!0}},{key:"isFormat2DArray",value:function(){var e=this.w.config.series.slice(),r=new Ra(this.ctx);if(this.activeSeriesIndex=r.getActiveConfigSeriesIndex(),e[this.activeSeriesIndex].data!==void 0&&e[this.activeSeriesIndex].data.length>0&&e[this.activeSeriesIndex].data[0]!==void 0&&e[this.activeSeriesIndex].data[0]!==null&&e[this.activeSeriesIndex].data[0].constructor===Array)return!0}},{key:"handleFormat2DArray",value:function(e,r){for(var n=this.w.config,a=this.w.globals,s=n.chart.type==="boxPlot"||n.series[r].type==="boxPlot",o=0;o<e[r].data.length;o++)if(e[r].data[o][1]!==void 0&&(Array.isArray(e[r].data[o][1])&&e[r].data[o][1].length===4&&!s?this.twoDSeries.push(J.parseNumber(e[r].data[o][1][3])):e[r].data[o].length>=5?this.twoDSeries.push(J.parseNumber(e[r].data[o][4])):this.twoDSeries.push(J.parseNumber(e[r].data[o][1])),a.dataFormatXNumeric=!0),n.xaxis.type==="datetime"){var l=new Date(e[r].data[o][0]);l=new Date(l).getTime(),this.twoDSeriesX.push(l)}else this.twoDSeriesX.push(e[r].data[o][0]);for(var c=0;c<e[r].data.length;c++)e[r].data[c][2]!==void 0&&(this.threeDSeries.push(e[r].data[c][2]),a.isDataXYZ=!0)}},{key:"handleFormatXY",value:function(e,r){var n=this.w.config,a=this.w.globals,s=new Vr(this.ctx),o=r;a.collapsedSeriesIndices.indexOf(r)>-1&&(o=this.activeSeriesIndex);for(var l=0;l<e[r].data.length;l++)e[r].data[l].y!==void 0&&(Array.isArray(e[r].data[l].y)?this.twoDSeries.push(J.parseNumber(e[r].data[l].y[e[r].data[l].y.length-1])):this.twoDSeries.push(J.parseNumber(e[r].data[l].y))),e[r].data[l].goals!==void 0&&Array.isArray(e[r].data[l].goals)?(this.seriesGoals[r]===void 0&&(this.seriesGoals[r]=[]),this.seriesGoals[r].push(e[r].data[l].goals)):(this.seriesGoals[r]===void 0&&(this.seriesGoals[r]=[]),this.seriesGoals[r].push(null));for(var c=0;c<e[o].data.length;c++){var u=typeof e[o].data[c].x=="string",h=Array.isArray(e[o].data[c].x),p=!h&&!!s.isValidDate(e[o].data[c].x);if(u||p)if(u||n.xaxis.convertedCatToNumeric){var m=a.isBarHorizontal&&a.isRangeData;n.xaxis.type!=="datetime"||m?(this.fallbackToCategory=!0,this.twoDSeriesX.push(e[o].data[c].x),isNaN(e[o].data[c].x)||this.w.config.xaxis.type==="category"||typeof e[o].data[c].x=="string"||(a.isXNumeric=!0)):this.twoDSeriesX.push(s.parseDate(e[o].data[c].x))}else n.xaxis.type==="datetime"?this.twoDSeriesX.push(s.parseDate(e[o].data[c].x.toString())):(a.dataFormatXNumeric=!0,a.isXNumeric=!0,this.twoDSeriesX.push(parseFloat(e[o].data[c].x)));else h?(this.fallbackToCategory=!0,this.twoDSeriesX.push(e[o].data[c].x)):(a.isXNumeric=!0,a.dataFormatXNumeric=!0,this.twoDSeriesX.push(e[o].data[c].x))}if(e[r].data[0]&&e[r].data[0].z!==void 0){for(var x=0;x<e[r].data.length;x++)this.threeDSeries.push(e[r].data[x].z);a.isDataXYZ=!0}}},{key:"handleRangeData",value:function(e,r){var n=this.w.globals,a={};return this.isFormat2DArray()?a=this.handleRangeDataFormat("array",e,r):this.isFormatXY()&&(a=this.handleRangeDataFormat("xy",e,r)),n.seriesRangeStart[r]=a.start===void 0?[]:a.start,n.seriesRangeEnd[r]=a.end===void 0?[]:a.end,n.seriesRange[r]=a.rangeUniques,n.seriesRange.forEach(function(s,o){s&&s.forEach(function(l,c){l.y.forEach(function(u,h){for(var p=0;p<l.y.length;p++)if(h!==p){var m=u.y1,x=u.y2,y=l.y[p].y1;m<=l.y[p].y2&&y<=x&&(l.overlaps.indexOf(u.rangeName)<0&&l.overlaps.push(u.rangeName),l.overlaps.indexOf(l.y[p].rangeName)<0&&l.overlaps.push(l.y[p].rangeName))}})})}),a}},{key:"handleCandleStickBoxData",value:function(e,r){var n=this.w.globals,a={};return this.isFormat2DArray()?a=this.handleCandleStickBoxDataFormat("array",e,r):this.isFormatXY()&&(a=this.handleCandleStickBoxDataFormat("xy",e,r)),n.seriesCandleO[r]=a.o,n.seriesCandleH[r]=a.h,n.seriesCandleM[r]=a.m,n.seriesCandleL[r]=a.l,n.seriesCandleC[r]=a.c,a}},{key:"handleRangeDataFormat",value:function(e,r,n){var a=[],s=[],o=r[n].data.filter(function(h,p,m){return p===m.findIndex(function(x){return x.x===h.x})}).map(function(h,p){return{x:h.x,overlaps:[],y:[]}});if(e==="array")for(var l=0;l<r[n].data.length;l++)Array.isArray(r[n].data[l])?(a.push(r[n].data[l][1][0]),s.push(r[n].data[l][1][1])):(a.push(r[n].data[l]),s.push(r[n].data[l]));else if(e==="xy")for(var c=function(h){var p=Array.isArray(r[n].data[h].y),m=J.randomId(),x=r[n].data[h].x,y={y1:p?r[n].data[h].y[0]:r[n].data[h].y,y2:p?r[n].data[h].y[1]:r[n].data[h].y,rangeName:m};r[n].data[h].rangeName=m;var b=o.findIndex(function(w){return w.x===x});o[b].y.push(y),a.push(y.y1),s.push(y.y2)},u=0;u<r[n].data.length;u++)c(u);return{start:a,end:s,rangeUniques:o}}},{key:"handleCandleStickBoxDataFormat",value:function(e,r,n){var a=this.w,s=a.config.chart.type==="boxPlot"||a.config.series[n].type==="boxPlot",o=[],l=[],c=[],u=[],h=[];if(e==="array")if(s&&r[n].data[0].length===6||!s&&r[n].data[0].length===5)for(var p=0;p<r[n].data.length;p++)o.push(r[n].data[p][1]),l.push(r[n].data[p][2]),s?(c.push(r[n].data[p][3]),u.push(r[n].data[p][4]),h.push(r[n].data[p][5])):(u.push(r[n].data[p][3]),h.push(r[n].data[p][4]));else for(var m=0;m<r[n].data.length;m++)Array.isArray(r[n].data[m][1])&&(o.push(r[n].data[m][1][0]),l.push(r[n].data[m][1][1]),s?(c.push(r[n].data[m][1][2]),u.push(r[n].data[m][1][3]),h.push(r[n].data[m][1][4])):(u.push(r[n].data[m][1][2]),h.push(r[n].data[m][1][3])));else if(e==="xy")for(var x=0;x<r[n].data.length;x++)Array.isArray(r[n].data[x].y)&&(o.push(r[n].data[x].y[0]),l.push(r[n].data[x].y[1]),s?(c.push(r[n].data[x].y[2]),u.push(r[n].data[x].y[3]),h.push(r[n].data[x].y[4])):(u.push(r[n].data[x].y[2]),h.push(r[n].data[x].y[3])));return{o,h:l,m:c,l:u,c:h}}},{key:"parseDataAxisCharts",value:function(e){var r=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.ctx,a=this.w.config,s=this.w.globals,o=new Vr(n),l=a.labels.length>0?a.labels.slice():a.xaxis.categories.slice();s.isRangeBar=a.chart.type==="rangeBar"&&s.isBarHorizontal,s.hasXaxisGroups=a.xaxis.type==="category"&&a.xaxis.group.groups.length>0,s.hasXaxisGroups&&(s.groups=a.xaxis.group.groups),e.forEach(function(x,y){x.name!==void 0?s.seriesNames.push(x.name):s.seriesNames.push("series-"+parseInt(y+1,10))}),this.coreUtils.setSeriesYAxisMappings();var c=[],u=Nr(new Set(a.series.map(function(x){return x.group})));a.series.forEach(function(x,y){var b=u.indexOf(x.group);c[b]||(c[b]=[]),c[b].push(s.seriesNames[y])}),s.seriesGroups=c;for(var h=function(){for(var x=0;x<l.length;x++)if(typeof l[x]=="string"){if(!o.isValidDate(l[x]))throw new Error("You have provided invalid Date format. Please provide a valid JavaScript Date");r.twoDSeriesX.push(o.parseDate(l[x]))}else r.twoDSeriesX.push(l[x])},p=0;p<e.length;p++){if(this.twoDSeries=[],this.twoDSeriesX=[],this.threeDSeries=[],e[p].data===void 0)return void console.error("It is a possibility that you may have not included 'data' property in series.");if(a.chart.type!=="rangeBar"&&a.chart.type!=="rangeArea"&&e[p].type!=="rangeBar"&&e[p].type!=="rangeArea"||(s.isRangeData=!0,this.handleRangeData(e,p)),this.isMultiFormat())this.isFormat2DArray()?this.handleFormat2DArray(e,p):this.isFormatXY()&&this.handleFormatXY(e,p),a.chart.type!=="candlestick"&&e[p].type!=="candlestick"&&a.chart.type!=="boxPlot"&&e[p].type!=="boxPlot"||this.handleCandleStickBoxData(e,p),s.series.push(this.twoDSeries),s.labels.push(this.twoDSeriesX),s.seriesX.push(this.twoDSeriesX),s.seriesGoals=this.seriesGoals,p!==this.activeSeriesIndex||this.fallbackToCategory||(s.isXNumeric=!0);else{a.xaxis.type==="datetime"?(s.isXNumeric=!0,h(),s.seriesX.push(this.twoDSeriesX)):a.xaxis.type==="numeric"&&(s.isXNumeric=!0,l.length>0&&(this.twoDSeriesX=l,s.seriesX.push(this.twoDSeriesX))),s.labels.push(this.twoDSeriesX);var m=e[p].data.map(function(x){return J.parseNumber(x)});s.series.push(m)}s.seriesZ.push(this.threeDSeries),e[p].color!==void 0?s.seriesColors.push(e[p].color):s.seriesColors.push(void 0)}return this.w}},{key:"parseDataNonAxisCharts",value:function(e){var r=this.w.globals,n=this.w.config,a=Array.isArray(e)&&e.every(function(h){return typeof h=="number"})&&n.labels.length>0,s=Array.isArray(e)&&e.some(function(h){return h&&fn(h)==="object"&&h.data||h&&fn(h)==="object"&&h.parsing});if(a&&s&&console.warn("ApexCharts: Both old format (numeric series + labels) and new format (series objects with data/parsing) detected. Using old format for backward compatibility."),a){r.series=e.slice(),r.seriesNames=n.labels.slice();for(var o=0;o<r.series.length;o++)r.seriesNames[o]===void 0&&r.seriesNames.push("series-"+(o+1));return this.w}if(Array.isArray(e)&&e.every(function(h){return typeof h=="number"})){r.series=e.slice(),r.seriesNames=[];for(var l=0;l<r.series.length;l++)r.seriesNames.push(n.labels[l]||"series-".concat(l+1));return this.w}var c=this.extractPieDataFromSeries(e);r.series=c.values,r.seriesNames=c.labels,n.chart.type==="radialBar"&&(r.series=r.series.map(function(h){var p=J.parseNumber(h);return p>100&&console.warn("ApexCharts: RadialBar value ".concat(p," > 100, consider using percentage values (0-100)")),p}));for(var u=0;u<r.series.length;u++)r.seriesNames[u]===void 0&&r.seriesNames.push("series-"+(u+1));return this.w}},{key:"extractPieDataFromSeries",value:function(e){var r=[],n=[];if(!Array.isArray(e))return console.warn("ApexCharts: Expected array for series data"),{values:[],labels:[]};if(e.length===0)return console.warn("ApexCharts: Empty series array"),{values:[],labels:[]};var a=e[0];return fn(a)==="object"&&a!==null&&a.data?(this.extractPieDataFromSeriesObjects(e,r,n),{values:r,labels:n}):(console.warn("ApexCharts: Unsupported series format for pie/donut/radialBar. Expected series objects with data property."),{values:[],labels:[]})}},{key:"extractPieDataFromSeriesObjects",value:function(e,r,n){e.forEach(function(a,s){a.data&&Array.isArray(a.data)?a.data.forEach(function(o){fn(o)==="object"&&o!==null?o.x!==void 0&&o.y!==void 0?(n.push(String(o.x)),r.push(J.parseNumber(o.y))):console.warn("ApexCharts: Invalid data point format for pie chart. Expected {x, y} format:",o):console.warn("ApexCharts: Expected object data point, got:",fn(o))}):console.warn("ApexCharts: Series ".concat(s," has no valid data array"))})}},{key:"handleExternalLabelsData",value:function(e){var r=this.w.config,n=this.w.globals;r.xaxis.categories.length>0?n.labels=r.xaxis.categories:r.labels.length>0?n.labels=r.labels.slice():this.fallbackToCategory?(n.labels=n.labels[0],n.seriesRange.length&&(n.seriesRange.map(function(a){a.forEach(function(s){n.labels.indexOf(s.x)<0&&s.x&&n.labels.push(s.x)})}),n.labels=Array.from(new Set(n.labels.map(JSON.stringify)),JSON.parse)),r.xaxis.convertedCatToNumeric&&(new uf(r).convertCatToNumericXaxis(r,this.ctx,n.seriesX[0]),this._generateExternalLabels(e))):this._generateExternalLabels(e)}},{key:"_generateExternalLabels",value:function(e){var r=this.w.globals,n=this.w.config,a=[];if(r.axisCharts){if(r.series.length>0)if(this.isFormatXY())for(var s=n.series.map(function(p,m){return p.data.filter(function(x,y,b){return b.findIndex(function(w){return w.x===x.x})===y})}),o=s.reduce(function(p,m,x,y){return y[p].length>m.length?p:x},0),l=0;l<s[o].length;l++)a.push(l+1);else for(var c=0;c<r.series[r.maxValsInArrayIndex].length;c++)a.push(c+1);r.seriesX=[];for(var u=0;u<e.length;u++)r.seriesX.push(a);this.w.globals.isBarHorizontal||(r.isXNumeric=!0)}if(a.length===0){a=r.axisCharts?[]:r.series.map(function(p,m){return m+1});for(var h=0;h<e.length;h++)r.seriesX.push(a)}r.labels=a,n.xaxis.convertedCatToNumeric&&(r.categoryLabels=a.map(function(p){return n.xaxis.labels.formatter(p)})),r.noLabelsProvided=!0}},{key:"parseRawDataIfNeeded",value:function(e){var r=this,n=this.w.config,a=this.w.globals,s=n.parsing;if(a.dataWasParsed||!s&&!e.some(function(l){return l.parsing}))return e;var o=e.map(function(l,c){var u,h;if(!l.data||!Array.isArray(l.data)||l.data.length===0)return l;var p={x:((u=l.parsing)===null||u===void 0?void 0:u.x)||s?.x,y:((h=l.parsing)===null||h===void 0?void 0:h.y)||s?.y};if(!p.x&&!p.y)return l;var m=l.data[0];if(fn(m)==="object"&&m!==null&&(m.hasOwnProperty("x")||m.hasOwnProperty("y"))||Array.isArray(m))return l;if(!p.x||!p.y)return console.warn("ApexCharts: Series ".concat(c," has parsing config but missing x or y field specification")),l;var x=l.data.map(function(y,b){if(fn(y)!=="object"||y===null)return console.warn("ApexCharts: Series ".concat(c,", data point ").concat(b," is not an object, skipping parsing")),y;var w=r.getNestedValue(y,p.x),N=r.getNestedValue(y,p.y);return w===void 0&&console.warn("ApexCharts: Series ".concat(c,", data point ").concat(b," missing field '").concat(p.x,"'")),N===void 0&&console.warn("ApexCharts: Series ".concat(c,", data point ").concat(b," missing field '").concat(p.y,"'")),{x:w,y:N}});return ve(ve({},l),{},{data:x,__apexParsed:!0})});return a.dataWasParsed=!0,a.originalSeries||(a.originalSeries=J.clone(e)),o}},{key:"getNestedValue",value:function(e,r){if(e&&fn(e)==="object"&&r){if(r.indexOf(".")===-1)return e[r];for(var n=r.split("."),a=e,s=0;s<n.length;s++){if(a==null||fn(a)!=="object")return;a=a[n[s]]}return a}}},{key:"parseData",value:function(e){var r=this.w,n=r.config,a=r.globals;if(e=this.parseRawDataIfNeeded(e),n.series=e,this.excludeCollapsedSeriesInYAxis(),this.fallbackToCategory=!1,this.ctx.core.resetGlobals(),this.ctx.core.isMultipleY(),a.axisCharts?(this.parseDataAxisCharts(e),this.coreUtils.getLargestSeries()):this.parseDataNonAxisCharts(e),n.chart.stacked){var s=new Ra(this.ctx);a.series=s.setNullSeriesToZeroValues(a.series)}this.coreUtils.getSeriesTotals(),a.axisCharts&&(a.stackedSeriesTotals=this.coreUtils.getStackedSeriesTotals(),a.stackedSeriesTotalsByGroups=this.coreUtils.getStackedSeriesTotalsByGroups()),this.coreUtils.getPercentSeries(),a.dataFormatXNumeric||a.isXNumeric&&(n.xaxis.type!=="numeric"||n.labels.length!==0||n.xaxis.categories.length!==0)||this.handleExternalLabelsData(e);for(var o=this.coreUtils.getCategoryLabels(a.labels),l=0;l<o.length;l++)if(Array.isArray(o[l])){a.isMultiLineX=!0;break}}},{key:"excludeCollapsedSeriesInYAxis",value:function(){var e=this.w,r=[];e.globals.seriesYAxisMap.forEach(function(n,a){var s=0;n.forEach(function(o){e.globals.collapsedSeriesIndices.indexOf(o)!==-1&&s++}),s>0&&s==n.length&&r.push(a)}),e.globals.ignoreYAxisIndexes=r.map(function(n){return n})}}]),t}(),$h=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w}return Ae(t,[{key:"svgStringToNode",value:function(e){return new DOMParser().parseFromString(e,"image/svg+xml").documentElement}},{key:"scaleSvgNode",value:function(e,r){var n=parseFloat(e.getAttributeNS(null,"width")),a=parseFloat(e.getAttributeNS(null,"height"));e.setAttributeNS(null,"width",n*r),e.setAttributeNS(null,"height",a*r),e.setAttributeNS(null,"viewBox","0 0 "+n+" "+a)}},{key:"getSvgString",value:function(e){var r=this;return new Promise(function(n){var a=r.w,s=e||a.config.chart.toolbar.export.scale||a.config.chart.toolbar.export.width/a.globals.svgWidth;s||(s=1);var o=a.globals.svgWidth*s,l=a.globals.svgHeight*s,c=a.globals.dom.elWrap.cloneNode(!0);c.style.width=o+"px",c.style.height=l+"px";var u=new XMLSerializer().serializeToString(c),h=`
<svg xmlns="http://www.w3.org/2000/svg"
version="1.1"
xmlns:xlink="http://www.w3.org/1999/xlink"
class="apexcharts-svg"
xmlns:data="ApexChartsNS"
transform="translate(0, 0)"
width="`.concat(a.globals.svgWidth,'px" height="').concat(a.globals.svgHeight,`px">
<foreignObject width="100%" height="100%">
<div xmlns="http://www.w3.org/1999/xhtml" style="width:`).concat(o,"px; height:").concat(l,`px;">
<style type="text/css">
.apexcharts-tooltip, .apexcharts-toolbar, .apexcharts-xaxistooltip, .apexcharts-yaxistooltip, .apexcharts-xcrosshairs, .apexcharts-ycrosshairs, .apexcharts-zoom-rect, .apexcharts-selection-rect {
display: none;
}
</style>
`).concat(u,`
</div>
</foreignObject>
</svg>
`),p=r.svgStringToNode(h);s!==1&&r.scaleSvgNode(p,s),r.convertImagesToBase64(p).then(function(){h=new XMLSerializer().serializeToString(p),n(h.replace(/ /g," "))})})}},{key:"convertImagesToBase64",value:function(e){var r=this,n=e.getElementsByTagName("image"),a=Array.from(n).map(function(s){var o=s.getAttributeNS("http://www.w3.org/1999/xlink","href");return o&&!o.startsWith("data:")?r.getBase64FromUrl(o).then(function(l){s.setAttributeNS("http://www.w3.org/1999/xlink","href",l)}).catch(function(l){console.error("Error converting image to base64:",l)}):Promise.resolve()});return Promise.all(a)}},{key:"getBase64FromUrl",value:function(e){return new Promise(function(r,n){var a=new Image;a.crossOrigin="Anonymous",a.onload=function(){var s=document.createElement("canvas");s.width=a.width,s.height=a.height,s.getContext("2d").drawImage(a,0,0),r(s.toDataURL())},a.onerror=n,a.src=e})}},{key:"svgUrl",value:function(){var e=this;return new Promise(function(r){e.getSvgString().then(function(n){var a=new Blob([n],{type:"image/svg+xml;charset=utf-8"});r(URL.createObjectURL(a))})})}},{key:"dataURI",value:function(e){var r=this;return new Promise(function(n){var a=r.w,s=e?e.scale||e.width/a.globals.svgWidth:1,o=document.createElement("canvas");o.width=a.globals.svgWidth*s,o.height=parseInt(a.globals.dom.elWrap.style.height,10)*s;var l=a.config.chart.background!=="transparent"&&a.config.chart.background?a.config.chart.background:"#fff",c=o.getContext("2d");c.fillStyle=l,c.fillRect(0,0,o.width*s,o.height*s),r.getSvgString(s).then(function(u){var h="data:image/svg+xml,"+encodeURIComponent(u),p=new Image;p.crossOrigin="anonymous",p.onload=function(){if(c.drawImage(p,0,0),o.msToBlob){var m=o.msToBlob();n({blob:m})}else{var x=o.toDataURL("image/png");n({imgURI:x})}},p.src=h})})}},{key:"exportToSVG",value:function(){var e=this;this.svgUrl().then(function(r){e.triggerDownload(r,e.w.config.chart.toolbar.export.svg.filename,".svg")})}},{key:"exportToPng",value:function(){var e=this,r=this.w.config.chart.toolbar.export.scale,n=this.w.config.chart.toolbar.export.width,a=r?{scale:r}:n?{width:n}:void 0;this.dataURI(a).then(function(s){var o=s.imgURI,l=s.blob;l?navigator.msSaveOrOpenBlob(l,e.w.globals.chartID+".png"):e.triggerDownload(o,e.w.config.chart.toolbar.export.png.filename,".png")})}},{key:"exportToCSV",value:function(e){var r=this,n=e.series,a=e.fileName,s=e.columnDelimiter,o=s===void 0?",":s,l=e.lineDelimiter,c=l===void 0?`
`:l,u=this.w;n||(n=u.config.series);var h=[],p=[],m="",x=u.globals.series.map(function(k,T){return u.globals.collapsedSeriesIndices.indexOf(T)===-1?k:[]}),y=function(k){return typeof u.config.chart.toolbar.export.csv.categoryFormatter=="function"?u.config.chart.toolbar.export.csv.categoryFormatter(k):u.config.xaxis.type==="datetime"&&String(k).length>=10?new Date(k).toDateString():J.isNumber(k)?k:k.split(o).join("")},b=function(k){return typeof u.config.chart.toolbar.export.csv.valueFormatter=="function"?u.config.chart.toolbar.export.csv.valueFormatter(k):k},w=Math.max.apply(Math,Nr(n.map(function(k){return k.data?k.data.length:0}))),N=new nN(this.ctx),A=new wo(this.ctx),S=function(k){var T="";if(u.globals.axisCharts){if(u.config.xaxis.type==="category"||u.config.xaxis.convertedCatToNumeric)if(u.globals.isBarHorizontal){var E=u.globals.yLabelFormatters[0],_=new Ra(r.ctx).getActiveConfigSeriesIndex();T=E(u.globals.labels[k],{seriesIndex:_,dataPointIndex:k,w:u})}else T=A.getLabel(u.globals.labels,u.globals.timescaleLabels,0,k).text;u.config.xaxis.type==="datetime"&&(u.config.xaxis.categories.length?T=u.config.xaxis.categories[k]:u.config.labels.length&&(T=u.config.labels[k]))}else T=u.config.labels[k];return T===null?"nullvalue":(Array.isArray(T)&&(T=T.join(" ")),J.isNumber(T)?T:T.split(o).join(""))},C=function(k,T){if(h.length&&T===0&&p.push(h.join(o)),k.data){k.data=k.data.length&&k.data||Nr(Array(w)).map(function(){return""});for(var E=0;E<k.data.length;E++){h=[];var _=S(E);if(_!=="nullvalue"){if(_||(N.isFormatXY()?_=n[T].data[E].x:N.isFormat2DArray()&&(_=n[T].data[E]?n[T].data[E][0]:"")),T===0){h.push(y(_));for(var L=0;L<u.globals.series.length;L++){var P,R=N.isFormatXY()?(P=n[L].data[E])===null||P===void 0?void 0:P.y:x[L][E];h.push(b(R))}}(u.config.chart.type==="candlestick"||k.type&&k.type==="candlestick")&&(h.pop(),h.push(u.globals.seriesCandleO[T][E]),h.push(u.globals.seriesCandleH[T][E]),h.push(u.globals.seriesCandleL[T][E]),h.push(u.globals.seriesCandleC[T][E])),(u.config.chart.type==="boxPlot"||k.type&&k.type==="boxPlot")&&(h.pop(),h.push(u.globals.seriesCandleO[T][E]),h.push(u.globals.seriesCandleH[T][E]),h.push(u.globals.seriesCandleM[T][E]),h.push(u.globals.seriesCandleL[T][E]),h.push(u.globals.seriesCandleC[T][E])),u.config.chart.type==="rangeBar"&&(h.pop(),h.push(u.globals.seriesRangeStart[T][E]),h.push(u.globals.seriesRangeEnd[T][E])),h.length&&p.push(h.join(o))}}}};h.push(u.config.chart.toolbar.export.csv.headerCategory),u.config.chart.type==="boxPlot"?(h.push("minimum"),h.push("q1"),h.push("median"),h.push("q3"),h.push("maximum")):u.config.chart.type==="candlestick"?(h.push("open"),h.push("high"),h.push("low"),h.push("close")):u.config.chart.type==="rangeBar"?(h.push("minimum"),h.push("maximum")):n.map(function(k,T){var E=(k.name?k.name:"series-".concat(T))+"";u.globals.axisCharts&&h.push(E.split(o).join("")?E.split(o).join(""):"series-".concat(T))}),u.globals.axisCharts||(h.push(u.config.chart.toolbar.export.csv.headerValue),p.push(h.join(o))),u.globals.allSeriesHasEqualX||!u.globals.axisCharts||u.config.xaxis.categories.length||u.config.labels.length?n.map(function(k,T){u.globals.axisCharts?C(k,T):((h=[]).push(y(u.globals.labels[T])),h.push(b(x[T])),p.push(h.join(o)))}):function(){var k=new Set,T={};n.forEach(function(E,_){E?.data.forEach(function(L){var P,R;if(N.isFormatXY())P=L.x,R=L.y;else{if(!N.isFormat2DArray())return;P=L[0],R=L[1]}T[P]||(T[P]=Array(n.length).fill("")),T[P][_]=b(R),k.add(P)})}),h.length&&p.push(h.join(o)),Array.from(k).sort().forEach(function(E){p.push([y(E),T[E].join(o)])})}(),m+=p.join(c),this.triggerDownload("data:text/csv; charset=utf-8,"+encodeURIComponent("\uFEFF"+m),a||u.config.chart.toolbar.export.csv.filename,".csv")}},{key:"triggerDownload",value:function(e,r,n){var a=document.createElement("a");a.href=e,a.download=(r||this.w.globals.chartID)+n,document.body.appendChild(a),a.click(),document.body.removeChild(a)}}]),t}(),ff=function(){function t(e,r){Se(this,t),this.ctx=e,this.elgrid=r,this.w=e.w;var n=this.w;this.axesUtils=new wo(e),this.xaxisLabels=n.globals.labels.slice(),n.globals.timescaleLabels.length>0&&!n.globals.isBarHorizontal&&(this.xaxisLabels=n.globals.timescaleLabels.slice()),n.config.xaxis.overwriteCategories&&(this.xaxisLabels=n.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],n.config.xaxis.position==="top"?this.offY=0:this.offY=n.globals.gridHeight,this.offY=this.offY+n.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal=n.config.chart.type==="bar"&&n.config.plotOptions.bar.horizontal,this.xaxisFontSize=n.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=n.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=n.config.xaxis.labels.style.colors,this.xaxisBorderWidth=n.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=n.config.yaxis[0].axisBorder.width.toString()),this.xaxisBorderWidth.indexOf("%")>-1?this.xaxisBorderWidth=n.globals.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=n.config.xaxis.axisBorder.height,this.yaxis=n.config.yaxis[0]}return Ae(t,[{key:"drawXaxis",value:function(){var e=this.w,r=new ge(this.ctx),n=r.group({class:"apexcharts-xaxis",transform:"translate(".concat(e.config.xaxis.offsetX,", ").concat(e.config.xaxis.offsetY,")")}),a=r.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(e.globals.translateXAxisX,", ").concat(e.globals.translateXAxisY,")")});n.add(a);for(var s=[],o=0;o<this.xaxisLabels.length;o++)s.push(this.xaxisLabels[o]);if(this.drawXAxisLabelAndGroup(!0,r,a,s,e.globals.isXNumeric,function(y,b){return b}),e.globals.hasXaxisGroups){var l=e.globals.groups;s=[];for(var c=0;c<l.length;c++)s.push(l[c].title);var u={};e.config.xaxis.group.style&&(u.xaxisFontSize=e.config.xaxis.group.style.fontSize,u.xaxisFontFamily=e.config.xaxis.group.style.fontFamily,u.xaxisForeColors=e.config.xaxis.group.style.colors,u.fontWeight=e.config.xaxis.group.style.fontWeight,u.cssClass=e.config.xaxis.group.style.cssClass),this.drawXAxisLabelAndGroup(!1,r,a,s,!1,function(y,b){return l[y].cols*b},u)}if(e.config.xaxis.title.text!==void 0){var h=r.group({class:"apexcharts-xaxis-title"}),p=r.drawText({x:e.globals.gridWidth/2+e.config.xaxis.title.offsetX,y:this.offY+parseFloat(this.xaxisFontSize)+(e.config.xaxis.position==="bottom"?e.globals.xAxisLabelsHeight:-e.globals.xAxisLabelsHeight-10)+e.config.xaxis.title.offsetY,text:e.config.xaxis.title.text,textAnchor:"middle",fontSize:e.config.xaxis.title.style.fontSize,fontFamily:e.config.xaxis.title.style.fontFamily,fontWeight:e.config.xaxis.title.style.fontWeight,foreColor:e.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text "+e.config.xaxis.title.style.cssClass});h.add(p),n.add(h)}if(e.config.xaxis.axisBorder.show){var m=e.globals.barPadForNumericAxis,x=r.drawLine(e.globals.padHorizontal+e.config.xaxis.axisBorder.offsetX-m,this.offY,this.xaxisBorderWidth+m,this.offY,e.config.xaxis.axisBorder.color,0,this.xaxisBorderHeight);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(x):n.add(x)}return n}},{key:"drawXAxisLabelAndGroup",value:function(e,r,n,a,s,o){var l,c=this,u=arguments.length>6&&arguments[6]!==void 0?arguments[6]:{},h=[],p=[],m=this.w,x=u.xaxisFontSize||this.xaxisFontSize,y=u.xaxisFontFamily||this.xaxisFontFamily,b=u.xaxisForeColors||this.xaxisForeColors,w=u.fontWeight||m.config.xaxis.labels.style.fontWeight,N=u.cssClass||m.config.xaxis.labels.style.cssClass,A=m.globals.padHorizontal,S=a.length,C=m.config.xaxis.type==="category"?m.globals.dataPoints:S;if(C===0&&S>C&&(C=S),s){var k=Math.max(Number(m.config.xaxis.tickAmount)||1,C>1?C-1:C);l=m.globals.gridWidth/Math.min(k,S-1),A=A+o(0,l)/2+m.config.xaxis.labels.offsetX}else l=m.globals.gridWidth/C,A=A+o(0,l)+m.config.xaxis.labels.offsetX;for(var T=function(_){var L=A-o(_,l)/2+m.config.xaxis.labels.offsetX;_===0&&S===1&&l/2===A&&C===1&&(L=m.globals.gridWidth/2);var P=c.axesUtils.getLabel(a,m.globals.timescaleLabels,L,_,h,x,e),R=28;if(m.globals.rotateXLabels&&e&&(R=22),m.config.xaxis.title.text&&m.config.xaxis.position==="top"&&(R+=parseFloat(m.config.xaxis.title.style.fontSize)+2),e||(R=R+parseFloat(x)+(m.globals.xAxisLabelsHeight-m.globals.xAxisGroupLabelsHeight)+(m.globals.rotateXLabels?10:0)),P=m.config.xaxis.tickAmount!==void 0&&m.config.xaxis.tickAmount!=="dataPoints"&&m.config.xaxis.type!=="datetime"?c.axesUtils.checkLabelBasedOnTickamount(_,P,S):c.axesUtils.checkForOverflowingLabels(_,P,S,h,p),m.config.xaxis.labels.show){var z=r.drawText({x:P.x,y:c.offY+m.config.xaxis.labels.offsetY+R-(m.config.xaxis.position==="top"?m.globals.xAxisHeight+m.config.xaxis.axisTicks.height-2:0),text:P.text,textAnchor:"middle",fontWeight:P.isBold?600:w,fontSize:x,fontFamily:y,foreColor:Array.isArray(b)?e&&m.config.xaxis.convertedCatToNumeric?b[m.globals.minX+_-1]:b[_]:b,isPlainText:!1,cssClass:(e?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+N});if(n.add(z),z.on("click",function(Y){if(typeof m.config.chart.events.xAxisLabelClick=="function"){var X=Object.assign({},m,{labelIndex:_});m.config.chart.events.xAxisLabelClick(Y,c.ctx,X)}}),e){var B=document.createElementNS(m.globals.SVGNS,"title");B.textContent=Array.isArray(P.text)?P.text.join(" "):P.text,z.node.appendChild(B),P.text!==""&&(h.push(P.text),p.push(P))}}_<S-1&&(A+=o(_+1,l))},E=0;E<=S-1;E++)T(E)}},{key:"drawXaxisInversed",value:function(e){var r,n,a=this,s=this.w,o=new ge(this.ctx),l=s.config.yaxis[0].opposite?s.globals.translateYAxisX[e]:0,c=o.group({class:"apexcharts-yaxis apexcharts-xaxis-inversed",rel:e}),u=o.group({class:"apexcharts-yaxis-texts-g apexcharts-xaxis-inversed-texts-g",transform:"translate("+l+", 0)"});c.add(u);var h=[];if(s.config.yaxis[e].show)for(var p=0;p<this.xaxisLabels.length;p++)h.push(this.xaxisLabels[p]);r=s.globals.gridHeight/h.length,n=-r/2.2;var m=s.globals.yLabelFormatters[0],x=s.config.yaxis[0].labels;if(x.show)for(var y=function(k){var T=h[k]===void 0?"":h[k];T=m(T,{seriesIndex:e,dataPointIndex:k,w:s});var E=a.axesUtils.getYAxisForeColor(x.style.colors,e),_=0;Array.isArray(T)&&(_=T.length/2*parseInt(x.style.fontSize,10));var L=x.offsetX-15,P="end";a.yaxis.opposite&&(P="start"),s.config.yaxis[0].labels.align==="left"?(L=x.offsetX,P="start"):s.config.yaxis[0].labels.align==="center"?(L=x.offsetX,P="middle"):s.config.yaxis[0].labels.align==="right"&&(P="end");var R=o.drawText({x:L,y:n+r+x.offsetY-_,text:T,textAnchor:P,foreColor:Array.isArray(E)?E[k]:E,fontSize:x.style.fontSize,fontFamily:x.style.fontFamily,fontWeight:x.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+x.style.cssClass,maxWidth:x.maxWidth});u.add(R),R.on("click",function(Y){if(typeof s.config.chart.events.xAxisLabelClick=="function"){var X=Object.assign({},s,{labelIndex:k});s.config.chart.events.xAxisLabelClick(Y,a.ctx,X)}});var z=document.createElementNS(s.globals.SVGNS,"title");if(z.textContent=Array.isArray(T)?T.join(" "):T,R.node.appendChild(z),s.config.yaxis[e].labels.rotate!==0){var B=o.rotateAroundCenter(R.node);R.node.setAttribute("transform","rotate(".concat(s.config.yaxis[e].labels.rotate," 0 ").concat(B.y,")"))}n+=r},b=0;b<=h.length-1;b++)y(b);if(s.config.yaxis[0].title.text!==void 0){var w=o.group({class:"apexcharts-yaxis-title apexcharts-xaxis-title-inversed",transform:"translate("+l+", 0)"}),N=o.drawText({x:s.config.yaxis[0].title.offsetX,y:s.globals.gridHeight/2+s.config.yaxis[0].title.offsetY,text:s.config.yaxis[0].title.text,textAnchor:"middle",foreColor:s.config.yaxis[0].title.style.color,fontSize:s.config.yaxis[0].title.style.fontSize,fontWeight:s.config.yaxis[0].title.style.fontWeight,fontFamily:s.config.yaxis[0].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+s.config.yaxis[0].title.style.cssClass});w.add(N),c.add(w)}var A=0;this.isCategoryBarHorizontal&&s.config.yaxis[0].opposite&&(A=s.globals.gridWidth);var S=s.config.xaxis.axisBorder;if(S.show){var C=o.drawLine(s.globals.padHorizontal+S.offsetX+A,1+S.offsetY,s.globals.padHorizontal+S.offsetX+A,s.globals.gridHeight+S.offsetY,S.color,0);this.elgrid&&this.elgrid.elGridBorders&&s.config.grid.show?this.elgrid.elGridBorders.add(C):c.add(C)}return s.config.yaxis[0].axisTicks.show&&this.axesUtils.drawYAxisTicks(A,h.length,s.config.yaxis[0].axisBorder,s.config.yaxis[0].axisTicks,0,r,c),c}},{key:"drawXaxisTicks",value:function(e,r,n){var a=this.w,s=e;if(!(e<0||e-2>a.globals.gridWidth)){var o=this.offY+a.config.xaxis.axisTicks.offsetY;if(r=r+o+a.config.xaxis.axisTicks.height,a.config.xaxis.position==="top"&&(r=o-a.config.xaxis.axisTicks.height),a.config.xaxis.axisTicks.show){var l=new ge(this.ctx).drawLine(e+a.config.xaxis.axisTicks.offsetX,o+a.config.xaxis.offsetY,s+a.config.xaxis.axisTicks.offsetX,r+a.config.xaxis.offsetY,a.config.xaxis.axisTicks.color);n.add(l),l.node.classList.add("apexcharts-xaxis-tick")}}}},{key:"getXAxisTicksPositions",value:function(){var e=this.w,r=[],n=this.xaxisLabels.length,a=e.globals.padHorizontal;if(e.globals.timescaleLabels.length>0)for(var s=0;s<n;s++)a=this.xaxisLabels[s].position,r.push(a);else for(var o=n,l=0;l<o;l++){var c=o;e.globals.isXNumeric&&e.config.chart.type!=="bar"&&(c-=1),a+=e.globals.gridWidth/c,r.push(a)}return r}},{key:"xAxisLabelCorrections",value:function(){var e=this.w,r=new ge(this.ctx),n=e.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g"),a=e.globals.dom.baseEl.querySelectorAll(".apexcharts-xaxis-texts-g text:not(.apexcharts-xaxis-group-label)"),s=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-inversed text"),o=e.globals.dom.baseEl.querySelectorAll(".apexcharts-xaxis-inversed-texts-g text tspan");if(e.globals.rotateXLabels||e.config.xaxis.labels.rotateAlways)for(var l=0;l<a.length;l++){var c=r.rotateAroundCenter(a[l]);c.y=c.y-1,c.x=c.x+1,a[l].setAttribute("transform","rotate(".concat(e.config.xaxis.labels.rotate," ").concat(c.x," ").concat(c.y,")")),a[l].setAttribute("text-anchor","end"),n.setAttribute("transform","translate(0, ".concat(-10,")"));var u=a[l].childNodes;e.config.xaxis.labels.trim&&Array.prototype.forEach.call(u,function(x){r.placeTextWithEllipsis(x,x.textContent,e.globals.xAxisLabelsHeight-(e.config.legend.position==="bottom"?20:10))})}else(function(){for(var x=e.globals.gridWidth/(e.globals.labels.length+1),y=0;y<a.length;y++){var b=a[y].childNodes;e.config.xaxis.labels.trim&&e.config.xaxis.type!=="datetime"&&Array.prototype.forEach.call(b,function(w){r.placeTextWithEllipsis(w,w.textContent,x)})}})();if(s.length>0){var h=s[s.length-1].getBBox(),p=s[0].getBBox();h.x<-20&&s[s.length-1].parentNode.removeChild(s[s.length-1]),p.x+p.width>e.globals.gridWidth&&!e.globals.isBarHorizontal&&s[0].parentNode.removeChild(s[0]);for(var m=0;m<o.length;m++)r.placeTextWithEllipsis(o[m],o[m].textContent,e.config.yaxis[0].labels.maxWidth-(e.config.yaxis[0].title.text?2*parseFloat(e.config.yaxis[0].title.style.fontSize):0)-15)}}}]),t}(),iR=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w;var r=this.w;this.xaxisLabels=r.globals.labels.slice(),this.axesUtils=new wo(e),this.isRangeBar=r.globals.seriesRange.length&&r.globals.isBarHorizontal,r.globals.timescaleLabels.length>0&&(this.xaxisLabels=r.globals.timescaleLabels.slice())}return Ae(t,[{key:"drawGridArea",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,r=this.w,n=new ge(this.ctx);e||(e=n.group({class:"apexcharts-grid"}));var a=n.drawLine(r.globals.padHorizontal,1,r.globals.padHorizontal,r.globals.gridHeight,"transparent"),s=n.drawLine(r.globals.padHorizontal,r.globals.gridHeight,r.globals.gridWidth,r.globals.gridHeight,"transparent");return e.add(s),e.add(a),e}},{key:"drawGrid",value:function(){if(this.w.globals.axisCharts){var e=this.renderGrid();return this.drawGridArea(e.el),e}return null}},{key:"createGridMask",value:function(){var e=this.w,r=e.globals,n=new ge(this.ctx),a=Array.isArray(e.config.stroke.width)?Math.max.apply(Math,Nr(e.config.stroke.width)):e.config.stroke.width,s=function(h){var p=document.createElementNS(r.SVGNS,"clipPath");return p.setAttribute("id",h),p};r.dom.elGridRectMask=s("gridRectMask".concat(r.cuid)),r.dom.elGridRectBarMask=s("gridRectBarMask".concat(r.cuid)),r.dom.elGridRectMarkerMask=s("gridRectMarkerMask".concat(r.cuid)),r.dom.elForecastMask=s("forecastMask".concat(r.cuid)),r.dom.elNonForecastMask=s("nonForecastMask".concat(r.cuid));var o=0,l=0;(["bar","rangeBar","candlestick","boxPlot"].includes(e.config.chart.type)||e.globals.comboBarCount>0)&&e.globals.isXNumeric&&!e.globals.isBarHorizontal&&(o=Math.max(e.config.grid.padding.left,r.barPadForNumericAxis),l=Math.max(e.config.grid.padding.right,r.barPadForNumericAxis)),r.dom.elGridRect=n.drawRect(-a/2-2,-a/2-2,r.gridWidth+a+4,r.gridHeight+a+4,0,"#fff"),r.dom.elGridRectBar=n.drawRect(-a/2-o-2,-a/2-2,r.gridWidth+a+l+o+4,r.gridHeight+a+4,0,"#fff");var c=e.globals.markers.largestSize;r.dom.elGridRectMarker=n.drawRect(Math.min(-a/2-o-2,-c),-c,r.gridWidth+Math.max(a+l+o+4,2*c),r.gridHeight+2*c,0,"#fff"),r.dom.elGridRectMask.appendChild(r.dom.elGridRect.node),r.dom.elGridRectBarMask.appendChild(r.dom.elGridRectBar.node),r.dom.elGridRectMarkerMask.appendChild(r.dom.elGridRectMarker.node);var u=r.dom.baseEl.querySelector("defs");u.appendChild(r.dom.elGridRectMask),u.appendChild(r.dom.elGridRectBarMask),u.appendChild(r.dom.elGridRectMarkerMask),u.appendChild(r.dom.elForecastMask),u.appendChild(r.dom.elNonForecastMask)}},{key:"_drawGridLines",value:function(e){var r=e.i,n=e.x1,a=e.y1,s=e.x2,o=e.y2,l=e.xCount,c=e.parent,u=this.w;if(!(r===0&&u.globals.skipFirstTimelinelabel||r===l-1&&u.globals.skipLastTimelinelabel&&!u.config.xaxis.labels.formatter||u.config.chart.type==="radar")){u.config.grid.xaxis.lines.show&&this._drawGridLine({i:r,x1:n,y1:a,x2:s,y2:o,xCount:l,parent:c});var h=0;if(u.globals.hasXaxisGroups&&u.config.xaxis.tickPlacement==="between"){var p=u.globals.groups;if(p){for(var m=0,x=0;m<r&&x<p.length;x++)m+=p[x].cols;m===r&&(h=.6*u.globals.xAxisLabelsHeight)}}new ff(this.ctx).drawXaxisTicks(n,h,u.globals.dom.elGraphical)}}},{key:"_drawGridLine",value:function(e){var r=e.i,n=e.x1,a=e.y1,s=e.x2,o=e.y2,l=e.xCount,c=e.parent,u=this.w,h=c.node.classList.contains("apexcharts-gridlines-horizontal"),p=u.globals.barPadForNumericAxis,m=a===0&&o===0||n===0&&s===0||a===u.globals.gridHeight&&o===u.globals.gridHeight||u.globals.isBarHorizontal&&(r===0||r===l-1),x=new ge(this).drawLine(n-(h?p:0),a,s+(h?p:0),o,u.config.grid.borderColor,u.config.grid.strokeDashArray);x.node.classList.add("apexcharts-gridline"),m&&u.config.grid.show?this.elGridBorders.add(x):c.add(x)}},{key:"_drawGridBandRect",value:function(e){var r=e.c,n=e.x1,a=e.y1,s=e.x2,o=e.y2,l=e.type,c=this.w,u=new ge(this.ctx),h=c.globals.barPadForNumericAxis,p=c.config.grid[l].colors[r],m=u.drawRect(n-(l==="row"?h:0),a,s+(l==="row"?2*h:0),o,0,p,c.config.grid[l].opacity);this.elg.add(m),m.attr("clip-path","url(#gridRectMask".concat(c.globals.cuid,")")),m.node.classList.add("apexcharts-grid-".concat(l))}},{key:"_drawXYLines",value:function(e){var r=this,n=e.xCount,a=e.tickAmount,s=this.w;if(s.config.grid.xaxis.lines.show||s.config.xaxis.axisTicks.show){var o,l=s.globals.padHorizontal,c=s.globals.gridHeight;s.globals.timescaleLabels.length?function(y){for(var b=y.xC,w=y.x1,N=y.y1,A=y.x2,S=y.y2,C=0;C<b;C++)w=r.xaxisLabels[C].position,A=r.xaxisLabels[C].position,r._drawGridLines({i:C,x1:w,y1:N,x2:A,y2:S,xCount:n,parent:r.elgridLinesV})}({xC:n,x1:l,y1:0,x2:o,y2:c}):(s.globals.isXNumeric&&(n=s.globals.xAxisScale.result.length),function(y){for(var b=y.xC,w=y.x1,N=y.y1,A=y.x2,S=y.y2,C=0;C<b+(s.globals.isXNumeric?0:1);C++)C===0&&b===1&&s.globals.dataPoints===1&&(A=w=s.globals.gridWidth/2),r._drawGridLines({i:C,x1:w,y1:N,x2:A,y2:S,xCount:n,parent:r.elgridLinesV}),A=w+=s.globals.gridWidth/(s.globals.isXNumeric?b-1:b)}({xC:n,x1:l,y1:0,x2:o,y2:c}))}if(s.config.grid.yaxis.lines.show){var u=0,h=0,p=s.globals.gridWidth,m=a+1;this.isRangeBar&&(m=s.globals.labels.length);for(var x=0;x<m+(this.isRangeBar?1:0);x++)this._drawGridLine({i:x,xCount:m+(this.isRangeBar?1:0),x1:0,y1:u,x2:p,y2:h,parent:this.elgridLinesH}),h=u+=s.globals.gridHeight/(this.isRangeBar?m:a)}}},{key:"_drawInvertedXYLines",value:function(e){var r=e.xCount,n=this.w;if(n.config.grid.xaxis.lines.show||n.config.xaxis.axisTicks.show)for(var a,s=n.globals.padHorizontal,o=n.globals.gridHeight,l=0;l<r+1;l++)n.config.grid.xaxis.lines.show&&this._drawGridLine({i:l,xCount:r+1,x1:s,y1:0,x2:a,y2:o,parent:this.elgridLinesV}),new ff(this.ctx).drawXaxisTicks(s,0,n.globals.dom.elGraphical),a=s+=n.globals.gridWidth/r;if(n.config.grid.yaxis.lines.show)for(var c=0,u=0,h=n.globals.gridWidth,p=0;p<n.globals.dataPoints+1;p++)this._drawGridLine({i:p,xCount:n.globals.dataPoints+1,x1:0,y1:c,x2:h,y2:u,parent:this.elgridLinesH}),u=c+=n.globals.gridHeight/n.globals.dataPoints}},{key:"renderGrid",value:function(){var e=this.w,r=e.globals,n=new ge(this.ctx);this.elg=n.group({class:"apexcharts-grid"}),this.elgridLinesH=n.group({class:"apexcharts-gridlines-horizontal"}),this.elgridLinesV=n.group({class:"apexcharts-gridlines-vertical"}),this.elGridBorders=n.group({class:"apexcharts-grid-borders"}),this.elg.add(this.elgridLinesH),this.elg.add(this.elgridLinesV),e.config.grid.show||(this.elgridLinesV.hide(),this.elgridLinesH.hide(),this.elGridBorders.hide());for(var a=0;a<r.seriesYAxisMap.length&&r.ignoreYAxisIndexes.includes(a);)a++;a===r.seriesYAxisMap.length&&(a=0);var s,o=r.yAxisScale[a].result.length-1;if(!r.isBarHorizontal||this.isRangeBar){var l,c,u;s=this.xaxisLabels.length,this.isRangeBar&&(o=r.labels.length,e.config.xaxis.tickAmount&&e.config.xaxis.labels.formatter&&(s=e.config.xaxis.tickAmount),((l=r.yAxisScale)===null||l===void 0||(c=l[a])===null||c===void 0||(u=c.result)===null||u===void 0?void 0:u.length)>0&&e.config.xaxis.type!=="datetime"&&(s=r.yAxisScale[a].result.length-1)),this._drawXYLines({xCount:s,tickAmount:o})}else s=o,o=r.xTickAmount,this._drawInvertedXYLines({xCount:s,tickAmount:o});return this.drawGridBands(s,o),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:r.gridWidth/s}}},{key:"drawGridBands",value:function(e,r){var n,a,s=this,o=this.w;if(((n=o.config.grid.row.colors)===null||n===void 0?void 0:n.length)>0&&function(y,b,w,N,A,S){for(var C=0,k=0;C<b;C++,k++)k>=o.config.grid[y].colors.length&&(k=0),s._drawGridBandRect({c:k,x1:w,y1:N,x2:A,y2:S,type:y}),N+=o.globals.gridHeight/r}("row",r,0,0,o.globals.gridWidth,o.globals.gridHeight/r),((a=o.config.grid.column.colors)===null||a===void 0?void 0:a.length)>0){var l=o.globals.isBarHorizontal||o.config.xaxis.tickPlacement!=="on"||o.config.xaxis.type!=="category"&&!o.config.xaxis.convertedCatToNumeric?e:e-1;o.globals.isXNumeric&&(l=o.globals.xAxisScale.result.length-1);for(var c=o.globals.padHorizontal,u=o.globals.padHorizontal+o.globals.gridWidth/l,h=o.globals.gridHeight,p=0,m=0;p<e;p++,m++){var x;m>=o.config.grid.column.colors.length&&(m=0),o.config.xaxis.type==="datetime"&&(c=this.xaxisLabels[p].position,u=(((x=this.xaxisLabels[p+1])===null||x===void 0?void 0:x.position)||o.globals.gridWidth)-this.xaxisLabels[p].position),this._drawGridBandRect({c:m,x1:c,y1:0,x2:u,y2:h,type:"column"}),c+=o.globals.gridWidth/l}}}}]),t}(),oR=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w,this.coreUtils=new ir(this.ctx)}return Ae(t,[{key:"niceScale",value:function(e,r){var n,a,s,o,l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,c=1e-11,u=this.w,h=u.globals;h.isBarHorizontal?(n=u.config.xaxis,a=Math.max((h.svgWidth-100)/25,2)):(n=u.config.yaxis[l],a=Math.max((h.svgHeight-100)/15,2)),J.isNumber(a)||(a=10),s=n.min!==void 0&&n.min!==null,o=n.max!==void 0&&n.min!==null;var p=n.stepSize!==void 0&&n.stepSize!==null,m=n.tickAmount!==void 0&&n.tickAmount!==null,x=m?n.tickAmount:h.niceScaleDefaultTicks[Math.min(Math.round(a/2),h.niceScaleDefaultTicks.length-1)];if(h.isMultipleYAxis&&!m&&h.multiAxisTickAmount>0&&(x=h.multiAxisTickAmount,m=!0),x=x==="dataPoints"?h.dataPoints-1:Math.abs(Math.round(x)),(e===Number.MIN_VALUE&&r===0||!J.isNumber(e)&&!J.isNumber(r)||e===Number.MIN_VALUE&&r===-Number.MAX_VALUE)&&(e=J.isNumber(n.min)?n.min:0,r=J.isNumber(n.max)?n.max:e+x,h.allSeriesCollapsed=!1),e>r){console.warn("axis.min cannot be greater than axis.max: swapping min and max");var y=r;r=e,e=y}else e===r&&(e=e===0?0:e-1,r=r===0?2:r+1);var b=[];x<1&&(x=1);var w=x,N=Math.abs(r-e);!s&&e>0&&e/N<.15&&(e=0,s=!0),!o&&r<0&&-r/N<.15&&(r=0,o=!0);var A=(N=Math.abs(r-e))/w,S=A,C=Math.floor(Math.log10(S)),k=Math.pow(10,C),T=Math.ceil(S/k);if(A=S=(T=h.niceScaleAllowedMagMsd[h.yValueDecimal===0?0:1][T])*k,h.isBarHorizontal&&n.stepSize&&n.type!=="datetime"?(A=n.stepSize,p=!0):p&&(A=n.stepSize),p&&n.forceNiceScale){var E=Math.floor(Math.log10(A));A*=Math.pow(10,C-E)}if(s&&o){var _=N/w;if(m)if(p)if(J.mod(N,A)!=0){var L=J.getGCD(A,_);A=_/L<10?L:_}else J.mod(A,_)==0?A=_:(_=A,m=!1);else A=_;else if(p)J.mod(N,A)==0?_=A:A=_;else if(J.mod(N,A)==0)_=A;else{_=N/(w=Math.ceil(N/A));var P=J.getGCD(N,A);N/P<a&&(_=P),A=_}w=Math.round(N/A)}else{if(s||o){if(o)if(m)e=r-A*w;else{var R=e;e=A*Math.floor(e/A),Math.abs(r-e)/J.getGCD(N,A)>a&&(e=r-A*x,e+=A*Math.floor((R-e)/A))}else if(s)if(m)r=e+A*w;else{var z=r;r=A*Math.ceil(r/A),Math.abs(r-e)/J.getGCD(N,A)>a&&(r=e+A*x,r+=A*Math.ceil((z-r)/A))}}else if(h.isMultipleYAxis&&m){var B=A*Math.floor(e/A),Y=B+A*w;Y<r&&(A*=2),Y=r,r=(e=B)+A*w,N=Math.abs(r-e),e>0&&e<Math.abs(Y-r)&&(e=0,r=A*w),r<0&&-r<Math.abs(B-e)&&(r=0,e=-A*w)}else e=A*Math.floor(e/A),r=A*Math.ceil(r/A);N=Math.abs(r-e),A=J.getGCD(N,A),w=Math.round(N/A)}if(m||s||o||(w=Math.ceil((N-c)/(A+c)))>16&&J.getPrimeFactors(w).length<2&&w++,!m&&n.forceNiceScale&&h.yValueDecimal===0&&w>N&&(w=N,A=Math.round(N/w)),w>a&&(!m&&!p||n.forceNiceScale)){var X=J.getPrimeFactors(w),H=X.length-1,W=w;e:for(var V=0;V<H;V++)for(var Z=0;Z<=H-V;Z++){for(var F=Math.min(Z+V,H),G=W,te=1,K=Z;K<=F;K++)te*=X[K];if((G/=te)<a){W=G;break e}}A=W===w?N:N/W,w=Math.round(N/A)}h.isMultipleYAxis&&h.multiAxisTickAmount==0&&h.ignoreYAxisIndexes.indexOf(l)<0&&(h.multiAxisTickAmount=w);var U=e-A,re=A*c;do U+=A,b.push(J.stripNumber(U,7));while(r-U>re);return{result:b,niceMin:b[0],niceMax:b[b.length-1]}}},{key:"linearScale",value:function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:10,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:void 0,o=Math.abs(r-e),l=[];if(e===r)return{result:l=[e],niceMin:l[0],niceMax:l[l.length-1]};(n=this._adjustTicksForSmallRange(n,a,o))==="dataPoints"&&(n=this.w.globals.dataPoints-1),s||(s=o/n),s=Math.round(100*(s+Number.EPSILON))/100,n===Number.MAX_VALUE&&(n=5,s=1);for(var c=e;n>=0;)l.push(c),c=J.preciseAddition(c,s),n-=1;return{result:l,niceMin:l[0],niceMax:l[l.length-1]}}},{key:"logarithmicScaleNice",value:function(e,r,n){r<=0&&(r=Math.max(e,n)),e<=0&&(e=Math.min(r,n));for(var a=[],s=Math.ceil(Math.log(r)/Math.log(n)+1),o=Math.floor(Math.log(e)/Math.log(n));o<s;o++)a.push(Math.pow(n,o));return{result:a,niceMin:a[0],niceMax:a[a.length-1]}}},{key:"logarithmicScale",value:function(e,r,n){r<=0&&(r=Math.max(e,n)),e<=0&&(e=Math.min(r,n));for(var a=[],s=Math.log(r)/Math.log(n),o=Math.log(e)/Math.log(n),l=s-o,c=Math.round(l),u=l/c,h=0,p=o;h<c;h++,p+=u)a.push(Math.pow(n,p));return a.push(Math.pow(n,s)),{result:a,niceMin:e,niceMax:r}}},{key:"_adjustTicksForSmallRange",value:function(e,r,n){var a=e;if(r!==void 0&&this.w.config.yaxis[r].labels.formatter&&this.w.config.yaxis[r].tickAmount===void 0){var s=Number(this.w.config.yaxis[r].labels.formatter(1));J.isNumber(s)&&this.w.globals.yValueDecimal===0&&(a=Math.ceil(n))}return a<e?a:e}},{key:"setYScaleForIndex",value:function(e,r,n){var a=this.w.globals,s=this.w.config,o=a.isBarHorizontal?s.xaxis:s.yaxis[e];a.yAxisScale[e]===void 0&&(a.yAxisScale[e]=[]);var l=Math.abs(n-r);o.logarithmic&&l<=5&&(a.invalidLogScale=!0),o.logarithmic&&l>5?(a.allSeriesCollapsed=!1,a.yAxisScale[e]=o.forceNiceScale?this.logarithmicScaleNice(r,n,o.logBase):this.logarithmicScale(r,n,o.logBase)):n!==-Number.MAX_VALUE&&J.isNumber(n)&&r!==Number.MAX_VALUE&&J.isNumber(r)?(a.allSeriesCollapsed=!1,a.yAxisScale[e]=this.niceScale(r,n,e)):a.yAxisScale[e]=this.niceScale(Number.MIN_VALUE,0,e)}},{key:"setXScale",value:function(e,r){var n=this.w,a=n.globals;if(r!==-Number.MAX_VALUE&&J.isNumber(r)){var s=a.xTickAmount;a.xAxisScale=this.linearScale(e,r,s,0,n.config.xaxis.stepSize)}else a.xAxisScale=this.linearScale(0,10,10);return a.xAxisScale}},{key:"scaleMultipleYAxes",value:function(){var e=this,r=this.w.config,n=this.w.globals;this.coreUtils.setSeriesYAxisMappings();var a=n.seriesYAxisMap,s=n.minYArr,o=n.maxYArr;n.allSeriesCollapsed=!0,n.barGroups=[],a.forEach(function(l,c){var u=[];l.forEach(function(h){var p,m=(p=r.series[h])===null||p===void 0?void 0:p.group;u.indexOf(m)<0&&u.push(m)}),l.length>0?function(){var h,p,m=Number.MAX_VALUE,x=-Number.MAX_VALUE,y=m,b=x;if(r.chart.stacked)(function(){var A=new Array(n.dataPoints).fill(0),S=[],C=[],k=[];u.forEach(function(){S.push(A.map(function(){return Number.MIN_VALUE})),C.push(A.map(function(){return Number.MIN_VALUE})),k.push(A.map(function(){return Number.MIN_VALUE}))});for(var T=function(_){!h&&r.series[l[_]].type&&(h=r.series[l[_]].type);var L=l[_];p=r.series[L].group?r.series[L].group:"axis-".concat(c),!(n.collapsedSeriesIndices.indexOf(L)<0&&n.ancillaryCollapsedSeriesIndices.indexOf(L)<0)||(n.allSeriesCollapsed=!1,u.forEach(function(P,R){if(r.series[L].group===P)for(var z=0;z<n.series[L].length;z++){var B=n.series[L][z];B>=0?C[R][z]+=B:k[R][z]+=B,S[R][z]+=B,y=Math.min(y,B),b=Math.max(b,B)}})),h!=="bar"&&h!=="column"||n.barGroups.push(p)},E=0;E<l.length;E++)T(E);h||(h=r.chart.type),h==="bar"||h==="column"?u.forEach(function(_,L){m=Math.min(m,Math.min.apply(null,k[L])),x=Math.max(x,Math.max.apply(null,C[L]))}):(u.forEach(function(_,L){y=Math.min(y,Math.min.apply(null,S[L])),b=Math.max(b,Math.max.apply(null,S[L]))}),m=y,x=b),m===Number.MIN_VALUE&&x===Number.MIN_VALUE&&(x=-Number.MAX_VALUE)})();else for(var w=0;w<l.length;w++){var N=l[w];m=Math.min(m,s[N]),x=Math.max(x,o[N]),!(n.collapsedSeriesIndices.indexOf(N)<0&&n.ancillaryCollapsedSeriesIndices.indexOf(N)<0)||(n.allSeriesCollapsed=!1)}r.yaxis[c].min!==void 0&&(m=typeof r.yaxis[c].min=="function"?r.yaxis[c].min(m):r.yaxis[c].min),r.yaxis[c].max!==void 0&&(x=typeof r.yaxis[c].max=="function"?r.yaxis[c].max(x):r.yaxis[c].max),n.barGroups=n.barGroups.filter(function(A,S,C){return C.indexOf(A)===S}),e.setYScaleForIndex(c,m,x),l.forEach(function(A){s[A]=n.yAxisScale[c].niceMin,o[A]=n.yAxisScale[c].niceMax})}():e.setYScaleForIndex(c,0,-Number.MAX_VALUE)})}}]),t}(),dj=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w,this.scales=new oR(e)}return Ae(t,[{key:"init",value:function(){this.setYRange(),this.setXRange(),this.setZRange()}},{key:"getMinYMaxY",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:-Number.MAX_VALUE,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,s=this.w.config,o=this.w.globals,l=-Number.MAX_VALUE,c=Number.MIN_VALUE;a===null&&(a=e+1);var u=o.series,h=u,p=u;s.chart.type==="candlestick"?(h=o.seriesCandleL,p=o.seriesCandleH):s.chart.type==="boxPlot"?(h=o.seriesCandleO,p=o.seriesCandleC):o.isRangeData&&(h=o.seriesRangeStart,p=o.seriesRangeEnd);var m=!1;if(o.seriesX.length>=a){var x,y=(x=o.brushSource)===null||x===void 0?void 0:x.w.config.chart.brush;(s.chart.zoom.enabled&&s.chart.zoom.autoScaleYaxis||y!=null&&y.enabled&&y!=null&&y.autoScaleYaxis)&&(m=!0)}for(var b=e;b<a;b++){o.dataPoints=Math.max(o.dataPoints,u[b].length);var w=s.series[b].type;o.categoryLabels.length&&(o.dataPoints=o.categoryLabels.filter(function(L){return L!==void 0}).length),o.labels.length&&s.xaxis.type!=="datetime"&&o.series.reduce(function(L,P){return L+P.length},0)!==0&&(o.dataPoints=Math.max(o.dataPoints,o.labels.length));var N=0,A=u[b].length-1;if(m){if(s.xaxis.min)for(;N<A&&o.seriesX[b][N]<s.xaxis.min;N++);if(s.xaxis.max)for(;A>N&&o.seriesX[b][A]>s.xaxis.max;A--);}for(var S=N;S<=A&&S<o.series[b].length;S++){var C=u[b][S];if(C!==null&&J.isNumber(C)){var k,T,E,_;switch(((k=p[b])===null||k===void 0?void 0:k[S])!==void 0&&(l=Math.max(l,p[b][S]),r=Math.min(r,p[b][S])),((T=h[b])===null||T===void 0?void 0:T[S])!==void 0&&(r=Math.min(r,h[b][S]),n=Math.max(n,h[b][S])),w){case"candlestick":o.seriesCandleC[b][S]!==void 0&&(l=Math.max(l,o.seriesCandleH[b][S]),r=Math.min(r,o.seriesCandleL[b][S]));break;case"boxPlot":o.seriesCandleC[b][S]!==void 0&&(l=Math.max(l,o.seriesCandleC[b][S]),r=Math.min(r,o.seriesCandleO[b][S]))}w&&w!=="candlestick"&&w!=="boxPlot"&&w!=="rangeArea"&&w!=="rangeBar"&&(l=Math.max(l,o.series[b][S]),r=Math.min(r,o.series[b][S])),o.seriesGoals[b]&&o.seriesGoals[b][S]&&Array.isArray(o.seriesGoals[b][S])&&o.seriesGoals[b][S].forEach(function(L){l=Math.max(l,L.value),r=Math.min(r,L.value)}),n=l,C=J.noExponents(C),J.isFloat(C)&&(o.yValueDecimal=Math.max(o.yValueDecimal,C.toString().split(".")[1].length)),c>((E=h[b])===null||E===void 0?void 0:E[S])&&((_=h[b])===null||_===void 0?void 0:_[S])<0&&(c=h[b][S])}else o.hasNullValues=!0}w!=="bar"&&w!=="column"||(c<0&&l<0&&(l=0,n=Math.max(n,0)),c===Number.MIN_VALUE&&(c=0,r=Math.min(r,0)))}return s.chart.type==="rangeBar"&&o.seriesRangeStart.length&&o.isBarHorizontal&&(c=r),s.chart.type==="bar"&&(c<0&&l<0&&(l=0),c===Number.MIN_VALUE&&(c=0)),{minY:c,maxY:l,lowestY:r,highestY:n}}},{key:"setYRange",value:function(){var e=this.w.globals,r=this.w.config;e.maxY=-Number.MAX_VALUE,e.minY=Number.MIN_VALUE;var n,a=Number.MAX_VALUE;if(e.isMultipleYAxis){a=Number.MAX_VALUE;for(var s=0;s<e.series.length;s++)n=this.getMinYMaxY(s),e.minYArr[s]=n.lowestY,e.maxYArr[s]=n.highestY,a=Math.min(a,n.lowestY)}return n=this.getMinYMaxY(0,a,null,e.series.length),r.chart.type==="bar"?(e.minY=n.minY,e.maxY=n.maxY):(e.minY=n.lowestY,e.maxY=n.highestY),a=n.lowestY,r.chart.stacked&&this._setStackedMinMax(),r.chart.type==="line"||r.chart.type==="area"||r.chart.type==="scatter"||r.chart.type==="candlestick"||r.chart.type==="boxPlot"||r.chart.type==="rangeBar"&&!e.isBarHorizontal?e.minY===Number.MIN_VALUE&&a!==-Number.MAX_VALUE&&a!==e.maxY&&(e.minY=a):e.minY=e.minY!==Number.MIN_VALUE?Math.min(n.minY,e.minY):n.minY,r.yaxis.forEach(function(o,l){o.max!==void 0&&(typeof o.max=="number"?e.maxYArr[l]=o.max:typeof o.max=="function"&&(e.maxYArr[l]=o.max(e.isMultipleYAxis?e.maxYArr[l]:e.maxY)),e.maxY=e.maxYArr[l]),o.min!==void 0&&(typeof o.min=="number"?e.minYArr[l]=o.min:typeof o.min=="function"&&(e.minYArr[l]=o.min(e.isMultipleYAxis?e.minYArr[l]===Number.MIN_VALUE?0:e.minYArr[l]:e.minY)),e.minY=e.minYArr[l])}),e.isBarHorizontal&&["min","max"].forEach(function(o){r.xaxis[o]!==void 0&&typeof r.xaxis[o]=="number"&&(o==="min"?e.minY=r.xaxis[o]:e.maxY=r.xaxis[o])}),e.isMultipleYAxis?(this.scales.scaleMultipleYAxes(),e.minY=a):(this.scales.setYScaleForIndex(0,e.minY,e.maxY),e.minY=e.yAxisScale[0].niceMin,e.maxY=e.yAxisScale[0].niceMax,e.minYArr[0]=e.minY,e.maxYArr[0]=e.maxY),e.barGroups=[],e.lineGroups=[],e.areaGroups=[],r.series.forEach(function(o){switch(o.type||r.chart.type){case"bar":case"column":e.barGroups.push(o.group);break;case"line":e.lineGroups.push(o.group);break;case"area":e.areaGroups.push(o.group)}}),e.barGroups=e.barGroups.filter(function(o,l,c){return c.indexOf(o)===l}),e.lineGroups=e.lineGroups.filter(function(o,l,c){return c.indexOf(o)===l}),e.areaGroups=e.areaGroups.filter(function(o,l,c){return c.indexOf(o)===l}),{minY:e.minY,maxY:e.maxY,minYArr:e.minYArr,maxYArr:e.maxYArr,yAxisScale:e.yAxisScale}}},{key:"setXRange",value:function(){var e=this.w.globals,r=this.w.config,n=r.xaxis.type==="numeric"||r.xaxis.type==="datetime"||r.xaxis.type==="category"&&!e.noLabelsProvided||e.noLabelsProvided||e.isXNumeric;if(e.isXNumeric&&function(){for(var c=0;c<e.series.length;c++)if(e.labels[c])for(var u=0;u<e.labels[c].length;u++)e.labels[c][u]!==null&&J.isNumber(e.labels[c][u])&&(e.maxX=Math.max(e.maxX,e.labels[c][u]),e.initialMaxX=Math.max(e.maxX,e.labels[c][u]),e.minX=Math.min(e.minX,e.labels[c][u]),e.initialMinX=Math.min(e.minX,e.labels[c][u]))}(),e.noLabelsProvided&&r.xaxis.categories.length===0&&(e.maxX=e.labels[e.labels.length-1],e.initialMaxX=e.labels[e.labels.length-1],e.minX=1,e.initialMinX=1),e.isXNumeric||e.noLabelsProvided||e.dataFormatXNumeric){var a=10;if(r.xaxis.tickAmount===void 0)a=Math.round(e.svgWidth/150),r.xaxis.type==="numeric"&&e.dataPoints<30&&(a=e.dataPoints-1),a>e.dataPoints&&e.dataPoints!==0&&(a=e.dataPoints-1);else if(r.xaxis.tickAmount==="dataPoints"){if(e.series.length>1&&(a=e.series[e.maxValsInArrayIndex].length-1),e.isXNumeric){var s=Math.round(e.maxX-e.minX);s<30&&(a=s)}}else a=r.xaxis.tickAmount;if(e.xTickAmount=a,r.xaxis.max!==void 0&&typeof r.xaxis.max=="number"&&(e.maxX=r.xaxis.max),r.xaxis.min!==void 0&&typeof r.xaxis.min=="number"&&(e.minX=r.xaxis.min),r.xaxis.range!==void 0&&(e.minX=e.maxX-r.xaxis.range),e.minX!==Number.MAX_VALUE&&e.maxX!==-Number.MAX_VALUE)if(r.xaxis.convertedCatToNumeric&&!e.dataFormatXNumeric){for(var o=[],l=e.minX-1;l<e.maxX;l++)o.push(l+1);e.xAxisScale={result:o,niceMin:o[0],niceMax:o[o.length-1]}}else e.xAxisScale=this.scales.setXScale(e.minX,e.maxX);else e.xAxisScale=this.scales.linearScale(0,a,a,0,r.xaxis.stepSize),e.noLabelsProvided&&e.labels.length>0&&(e.xAxisScale=this.scales.linearScale(1,e.labels.length,a-1,0,r.xaxis.stepSize),e.seriesX=e.labels.slice());n&&(e.labels=e.xAxisScale.result.slice())}return e.isBarHorizontal&&e.labels.length&&(e.xTickAmount=e.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:e.minX,maxX:e.maxX}}},{key:"setZRange",value:function(){var e=this.w.globals;if(e.isDataXYZ){for(var r=0;r<e.series.length;r++)if(e.seriesZ[r]!==void 0)for(var n=0;n<e.seriesZ[r].length;n++)e.seriesZ[r][n]!==null&&J.isNumber(e.seriesZ[r][n])&&(e.maxZ=Math.max(e.maxZ,e.seriesZ[r][n]),e.minZ=Math.min(e.minZ,e.seriesZ[r][n]))}}},{key:"_handleSingleDataPoint",value:function(){var e=this.w.globals,r=this.w.config;if(e.minX===e.maxX){var n=new Vr(this.ctx);if(r.xaxis.type==="datetime"){var a=n.getDate(e.minX);r.xaxis.labels.datetimeUTC?a.setUTCDate(a.getUTCDate()-2):a.setDate(a.getDate()-2),e.minX=new Date(a).getTime();var s=n.getDate(e.maxX);r.xaxis.labels.datetimeUTC?s.setUTCDate(s.getUTCDate()+2):s.setDate(s.getDate()+2),e.maxX=new Date(s).getTime()}else(r.xaxis.type==="numeric"||r.xaxis.type==="category"&&!e.noLabelsProvided)&&(e.minX=e.minX-2,e.initialMinX=e.minX,e.maxX=e.maxX+2,e.initialMaxX=e.maxX)}}},{key:"_getMinXDiff",value:function(){var e=this.w.globals;e.isXNumeric&&e.seriesX.forEach(function(r,n){if(r.length){r.length===1&&r.push(e.seriesX[e.maxValsInArrayIndex][e.seriesX[e.maxValsInArrayIndex].length-1]);var a=r.slice();a.sort(function(s,o){return s-o}),a.forEach(function(s,o){if(o>0){var l=s-a[o-1];l>0&&(e.minXDiff=Math.min(l,e.minXDiff))}}),e.dataPoints!==1&&e.minXDiff!==Number.MAX_VALUE||(e.minXDiff=.5)}})}},{key:"_setStackedMinMax",value:function(){var e=this,r=this.w.globals;if(r.series.length){var n=r.seriesGroups;n.length||(n=[this.w.globals.seriesNames.map(function(o){return o})]);var a={},s={};n.forEach(function(o){a[o]=[],s[o]=[],e.w.config.series.map(function(l,c){return o.indexOf(r.seriesNames[c])>-1?c:null}).filter(function(l){return l!==null}).forEach(function(l){for(var c=0;c<r.series[r.maxValsInArrayIndex].length;c++){var u,h,p,m;a[o][c]===void 0&&(a[o][c]=0,s[o][c]=0),(e.w.config.chart.stacked&&!r.comboCharts||e.w.config.chart.stacked&&r.comboCharts&&(!e.w.config.chart.stackOnlyBar||((u=e.w.config.series)===null||u===void 0||(h=u[l])===null||h===void 0?void 0:h.type)==="bar"||((p=e.w.config.series)===null||p===void 0||(m=p[l])===null||m===void 0?void 0:m.type)==="column"))&&r.series[l][c]!==null&&J.isNumber(r.series[l][c])&&(r.series[l][c]>0?a[o][c]+=parseFloat(r.series[l][c])+1e-4:s[o][c]+=parseFloat(r.series[l][c]))}})}),Object.entries(a).forEach(function(o){var l=T_(o,1)[0];a[l].forEach(function(c,u){r.maxY=Math.max(r.maxY,a[l][u]),r.minY=Math.min(r.minY,s[l][u])})})}}}]),t}(),aN=function(){function t(e,r){Se(this,t),this.ctx=e,this.elgrid=r,this.w=e.w;var n=this.w;this.xaxisFontSize=n.config.xaxis.labels.style.fontSize,this.axisFontFamily=n.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=n.config.xaxis.labels.style.colors,this.isCategoryBarHorizontal=n.config.chart.type==="bar"&&n.config.plotOptions.bar.horizontal,this.xAxisoffX=n.config.xaxis.position==="bottom"?n.globals.gridHeight:0,this.drawnLabels=[],this.axesUtils=new wo(e)}return Ae(t,[{key:"drawYaxis",value:function(e){var r=this.w,n=new ge(this.ctx),a=r.config.yaxis[e].labels.style,s=a.fontSize,o=a.fontFamily,l=a.fontWeight,c=n.group({class:"apexcharts-yaxis",rel:e,transform:"translate(".concat(r.globals.translateYAxisX[e],", 0)")});if(this.axesUtils.isYAxisHidden(e))return c;var u=n.group({class:"apexcharts-yaxis-texts-g"});c.add(u);var h=r.globals.yAxisScale[e].result.length-1,p=r.globals.gridHeight/h,m=r.globals.yLabelFormatters[e],x=this.axesUtils.checkForReversedLabels(e,r.globals.yAxisScale[e].result.slice());if(r.config.yaxis[e].labels.show){var y=r.globals.translateY+r.config.yaxis[e].labels.offsetY;r.globals.isBarHorizontal?y=0:r.config.chart.type==="heatmap"&&(y-=p/2),y+=parseInt(s,10)/3;for(var b=h;b>=0;b--){var w=m(x[b],b,r),N=r.config.yaxis[e].labels.padding;r.config.yaxis[e].opposite&&r.config.yaxis.length!==0&&(N*=-1);var A=this.getTextAnchor(r.config.yaxis[e].labels.align,r.config.yaxis[e].opposite),S=this.axesUtils.getYAxisForeColor(a.colors,e),C=Array.isArray(S)?S[b]:S,k=J.listToArray(r.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(e,"'] .apexcharts-yaxis-label tspan"))).map(function(E){return E.textContent}),T=n.drawText({x:N,y,text:k.includes(w)&&!r.config.yaxis[e].labels.showDuplicates?"":w,textAnchor:A,fontSize:s,fontFamily:o,fontWeight:l,maxWidth:r.config.yaxis[e].labels.maxWidth,foreColor:C,isPlainText:!1,cssClass:"apexcharts-yaxis-label ".concat(a.cssClass)});u.add(T),this.addTooltip(T,w),r.config.yaxis[e].labels.rotate!==0&&this.rotateLabel(n,T,firstLabel,r.config.yaxis[e].labels.rotate),y+=p}}return this.addYAxisTitle(n,c,e),this.addAxisBorder(n,c,e,h,p),c}},{key:"getTextAnchor",value:function(e,r){return e==="left"?"start":e==="center"?"middle":e==="right"?"end":r?"start":"end"}},{key:"addTooltip",value:function(e,r){var n=document.createElementNS(this.w.globals.SVGNS,"title");n.textContent=Array.isArray(r)?r.join(" "):r,e.node.appendChild(n)}},{key:"rotateLabel",value:function(e,r,n,a){var s=e.rotateAroundCenter(n.node),o=e.rotateAroundCenter(r.node);r.node.setAttribute("transform","rotate(".concat(a," ").concat(s.x," ").concat(o.y,")"))}},{key:"addYAxisTitle",value:function(e,r,n){var a=this.w;if(a.config.yaxis[n].title.text!==void 0){var s=e.group({class:"apexcharts-yaxis-title"}),o=a.config.yaxis[n].opposite?a.globals.translateYAxisX[n]:0,l=e.drawText({x:o,y:a.globals.gridHeight/2+a.globals.translateY+a.config.yaxis[n].title.offsetY,text:a.config.yaxis[n].title.text,textAnchor:"end",foreColor:a.config.yaxis[n].title.style.color,fontSize:a.config.yaxis[n].title.style.fontSize,fontWeight:a.config.yaxis[n].title.style.fontWeight,fontFamily:a.config.yaxis[n].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text ".concat(a.config.yaxis[n].title.style.cssClass)});s.add(l),r.add(s)}}},{key:"addAxisBorder",value:function(e,r,n,a,s){var o=this.w,l=o.config.yaxis[n].axisBorder,c=31+l.offsetX;if(o.config.yaxis[n].opposite&&(c=-31-l.offsetX),l.show){var u=e.drawLine(c,o.globals.translateY+l.offsetY-2,c,o.globals.gridHeight+o.globals.translateY+l.offsetY+2,l.color,0,l.width);r.add(u)}o.config.yaxis[n].axisTicks.show&&this.axesUtils.drawYAxisTicks(c,a,l,o.config.yaxis[n].axisTicks,n,s,r)}},{key:"drawYaxisInversed",value:function(e){var r=this.w,n=new ge(this.ctx),a=n.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),s=n.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(r.globals.translateXAxisX,", ").concat(r.globals.translateXAxisY,")")});a.add(s);var o=r.globals.yAxisScale[e].result.length-1,l=r.globals.gridWidth/o+.1,c=l+r.config.xaxis.labels.offsetX,u=r.globals.xLabelFormatter,h=this.axesUtils.checkForReversedLabels(e,r.globals.yAxisScale[e].result.slice()),p=r.globals.timescaleLabels;if(p.length>0&&(this.xaxisLabels=p.slice(),o=(h=p.slice()).length),r.config.xaxis.labels.show)for(var m=p.length?0:o;p.length?m<p.length:m>=0;p.length?m++:m--){var x=u(h[m],m,r),y=r.globals.gridWidth+r.globals.padHorizontal-(c-l+r.config.xaxis.labels.offsetX);if(p.length){var b=this.axesUtils.getLabel(h,p,y,m,this.drawnLabels,this.xaxisFontSize);y=b.x,x=b.text,this.drawnLabels.push(b.text),m===0&&r.globals.skipFirstTimelinelabel&&(x=""),m===h.length-1&&r.globals.skipLastTimelinelabel&&(x="")}var w=n.drawText({x:y,y:this.xAxisoffX+r.config.xaxis.labels.offsetY+30-(r.config.xaxis.position==="top"?r.globals.xAxisHeight+r.config.xaxis.axisTicks.height-2:0),text:x,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[e]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.xaxisFontFamily,fontWeight:r.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-xaxis-label ".concat(r.config.xaxis.labels.style.cssClass)});s.add(w),w.tspan(x),this.addTooltip(w,x),c+=l}return this.inversedYAxisTitleText(a),this.inversedYAxisBorder(a),a}},{key:"inversedYAxisBorder",value:function(e){var r=this.w,n=new ge(this.ctx),a=r.config.xaxis.axisBorder;if(a.show){var s=0;r.config.chart.type==="bar"&&r.globals.isXNumeric&&(s-=15);var o=n.drawLine(r.globals.padHorizontal+s+a.offsetX,this.xAxisoffX,r.globals.gridWidth,this.xAxisoffX,a.color,0,a.height);this.elgrid&&this.elgrid.elGridBorders&&r.config.grid.show?this.elgrid.elGridBorders.add(o):e.add(o)}}},{key:"inversedYAxisTitleText",value:function(e){var r=this.w,n=new ge(this.ctx);if(r.config.xaxis.title.text!==void 0){var a=n.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),s=n.drawText({x:r.globals.gridWidth/2+r.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(r.config.xaxis.title.style.fontSize)+r.config.xaxis.title.offsetY+20,text:r.config.xaxis.title.text,textAnchor:"middle",fontSize:r.config.xaxis.title.style.fontSize,fontFamily:r.config.xaxis.title.style.fontFamily,fontWeight:r.config.xaxis.title.style.fontWeight,foreColor:r.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text ".concat(r.config.xaxis.title.style.cssClass)});a.add(s),e.add(a)}}},{key:"yAxisTitleRotate",value:function(e,r){var n=this.w,a=new ge(this.ctx),s=n.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(e,"'] .apexcharts-yaxis-texts-g")),o=s?s.getBoundingClientRect():{width:0,height:0},l=n.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(e,"'] .apexcharts-yaxis-title text")),c=l?l.getBoundingClientRect():{width:0,height:0};if(l){var u=this.xPaddingForYAxisTitle(e,o,c,r);l.setAttribute("x",u.xPos-(r?10:0));var h=a.rotateAroundCenter(l);l.setAttribute("transform","rotate(".concat(r?-1*n.config.yaxis[e].title.rotate:n.config.yaxis[e].title.rotate," ").concat(h.x," ").concat(h.y,")"))}}},{key:"xPaddingForYAxisTitle",value:function(e,r,n,a){var s=this.w,o=0,l=10;return s.config.yaxis[e].title.text===void 0||e<0?{xPos:o,padd:0}:(a?o=r.width+s.config.yaxis[e].title.offsetX+n.width/2+l/2:(o=-1*r.width+s.config.yaxis[e].title.offsetX+l/2+n.width/2,s.globals.isBarHorizontal&&(l=25,o=-1*r.width-s.config.yaxis[e].title.offsetX-l)),{xPos:o,padd:l})}},{key:"setYAxisXPosition",value:function(e,r){var n=this.w,a=0,s=0,o=18,l=1;n.config.yaxis.length>1&&(this.multipleYs=!0),n.config.yaxis.forEach(function(c,u){var h=n.globals.ignoreYAxisIndexes.includes(u)||!c.show||c.floating||e[u].width===0,p=e[u].width+r[u].width;c.opposite?n.globals.isBarHorizontal?(s=n.globals.gridWidth+n.globals.translateX-1,n.globals.translateYAxisX[u]=s-c.labels.offsetX):(s=n.globals.gridWidth+n.globals.translateX+l,h||(l+=p+20),n.globals.translateYAxisX[u]=s-c.labels.offsetX+20):(a=n.globals.translateX-o,h||(o+=p+20),n.globals.translateYAxisX[u]=a+c.labels.offsetX)})}},{key:"setYAxisTextAlignments",value:function(){var e=this.w;J.listToArray(e.globals.dom.baseEl.getElementsByClassName("apexcharts-yaxis")).forEach(function(r,n){var a=e.config.yaxis[n];if(a&&!a.floating&&a.labels.align!==void 0){var s=e.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(n,"'] .apexcharts-yaxis-texts-g")),o=J.listToArray(e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(n,"'] .apexcharts-yaxis-label"))),l=s.getBoundingClientRect();o.forEach(function(c){c.setAttribute("text-anchor",a.labels.align)}),a.labels.align!=="left"||a.opposite?a.labels.align==="center"?s.setAttribute("transform","translate(".concat(l.width/2*(a.opposite?1:-1),", 0)")):a.labels.align==="right"&&a.opposite&&s.setAttribute("transform","translate(".concat(l.width,", 0)")):s.setAttribute("transform","translate(-".concat(l.width,", 0)"))}})}}]),t}(),ZG=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w,this.documentEvent=J.bind(this.documentEvent,this)}return Ae(t,[{key:"addEventListener",value:function(e,r){var n=this.w;n.globals.events.hasOwnProperty(e)?n.globals.events[e].push(r):n.globals.events[e]=[r]}},{key:"removeEventListener",value:function(e,r){var n=this.w;if(n.globals.events.hasOwnProperty(e)){var a=n.globals.events[e].indexOf(r);a!==-1&&n.globals.events[e].splice(a,1)}}},{key:"fireEvent",value:function(e,r){var n=this.w;if(n.globals.events.hasOwnProperty(e)){r&&r.length||(r=[]);for(var a=n.globals.events[e],s=a.length,o=0;o<s;o++)a[o].apply(null,r)}}},{key:"setupEventHandlers",value:function(){var e=this,r=this.w,n=this.ctx,a=r.globals.dom.baseEl.querySelector(r.globals.chartClass);this.ctx.eventList.forEach(function(s){a.addEventListener(s,function(o){var l=o.target.getAttribute("i")===null&&r.globals.capturedSeriesIndex!==-1?r.globals.capturedSeriesIndex:o.target.getAttribute("i"),c=o.target.getAttribute("j")===null&&r.globals.capturedDataPointIndex!==-1?r.globals.capturedDataPointIndex:o.target.getAttribute("j"),u=Object.assign({},r,{seriesIndex:r.globals.axisCharts?l:0,dataPointIndex:c});o.type==="mousemove"||o.type==="touchmove"?typeof r.config.chart.events.mouseMove=="function"&&r.config.chart.events.mouseMove(o,n,u):o.type==="mouseleave"||o.type==="touchleave"?typeof r.config.chart.events.mouseLeave=="function"&&r.config.chart.events.mouseLeave(o,n,u):(o.type==="mouseup"&&o.which===1||o.type==="touchend")&&(typeof r.config.chart.events.click=="function"&&r.config.chart.events.click(o,n,u),n.ctx.events.fireEvent("click",[o,n,u]))},{capture:!1,passive:!0})}),this.ctx.eventList.forEach(function(s){r.globals.dom.baseEl.addEventListener(s,e.documentEvent,{passive:!0})}),this.ctx.core.setupBrushHandler()}},{key:"documentEvent",value:function(e){var r=this.w,n=e.target.className;if(e.type==="click"){var a=r.globals.dom.baseEl.querySelector(".apexcharts-menu");a&&a.classList.contains("apexcharts-menu-open")&&n!=="apexcharts-menu-icon"&&a.classList.remove("apexcharts-menu-open")}r.globals.clientX=e.type==="touchmove"?e.touches[0].clientX:e.clientX,r.globals.clientY=e.type==="touchmove"?e.touches[0].clientY:e.clientY}}]),t}(),QG=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w}return Ae(t,[{key:"setCurrentLocaleValues",value:function(e){var r=this.w.config.chart.locales;window.Apex.chart&&window.Apex.chart.locales&&window.Apex.chart.locales.length>0&&(r=this.w.config.chart.locales.concat(window.Apex.chart.locales));var n=r.filter(function(s){return s.name===e})[0];if(!n)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");var a=J.extend(nR,n);this.w.globals.locale=a.options}}]),t}(),JG=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w}return Ae(t,[{key:"drawAxis",value:function(e,r){var n,a,s=this,o=this.w.globals,l=this.w.config,c=new ff(this.ctx,r),u=new aN(this.ctx,r);o.axisCharts&&e!=="radar"&&(o.isBarHorizontal?(a=u.drawYaxisInversed(0),n=c.drawXaxisInversed(0),o.dom.elGraphical.add(n),o.dom.elGraphical.add(a)):(n=c.drawXaxis(),o.dom.elGraphical.add(n),l.yaxis.map(function(h,p){if(o.ignoreYAxisIndexes.indexOf(p)===-1&&(a=u.drawYaxis(p),o.dom.Paper.add(a),s.w.config.grid.position==="back")){var m=o.dom.Paper.children()[1];m.remove(),o.dom.Paper.add(m)}})))}}]),t}(),uj=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w}return Ae(t,[{key:"drawXCrosshairs",value:function(){var e=this.w,r=new ge(this.ctx),n=new Gr(this.ctx),a=e.config.xaxis.crosshairs.fill.gradient,s=e.config.xaxis.crosshairs.dropShadow,o=e.config.xaxis.crosshairs.fill.type,l=a.colorFrom,c=a.colorTo,u=a.opacityFrom,h=a.opacityTo,p=a.stops,m=s.enabled,x=s.left,y=s.top,b=s.blur,w=s.color,N=s.opacity,A=e.config.xaxis.crosshairs.fill.color;if(e.config.xaxis.crosshairs.show){o==="gradient"&&(A=r.drawGradient("vertical",l,c,u,h,null,p,null));var S=r.drawRect();e.config.xaxis.crosshairs.width===1&&(S=r.drawLine());var C=e.globals.gridHeight;(!J.isNumber(C)||C<0)&&(C=0);var k=e.config.xaxis.crosshairs.width;(!J.isNumber(k)||k<0)&&(k=0),S.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:C,width:k,height:C,fill:A,filter:"none","fill-opacity":e.config.xaxis.crosshairs.opacity,stroke:e.config.xaxis.crosshairs.stroke.color,"stroke-width":e.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":e.config.xaxis.crosshairs.stroke.dashArray}),m&&(S=n.dropShadow(S,{left:x,top:y,blur:b,color:w,opacity:N})),e.globals.dom.elGraphical.add(S)}}},{key:"drawYCrosshairs",value:function(){var e=this.w,r=new ge(this.ctx),n=e.config.yaxis[0].crosshairs,a=e.globals.barPadForNumericAxis;if(e.config.yaxis[0].crosshairs.show){var s=r.drawLine(-a,0,e.globals.gridWidth+a,0,n.stroke.color,n.stroke.dashArray,n.stroke.width);s.attr({class:"apexcharts-ycrosshairs"}),e.globals.dom.elGraphical.add(s)}var o=r.drawLine(-a,0,e.globals.gridWidth+a,0,n.stroke.color,0,0);o.attr({class:"apexcharts-ycrosshairs-hidden"}),e.globals.dom.elGraphical.add(o)}}]),t}(),eK=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w}return Ae(t,[{key:"checkResponsiveConfig",value:function(e){var r=this,n=this.w,a=n.config;if(a.responsive.length!==0){var s=a.responsive.slice();s.sort(function(u,h){return u.breakpoint>h.breakpoint?1:h.breakpoint>u.breakpoint?-1:0}).reverse();var o=new hf({}),l=function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},h=s[0].breakpoint,p=window.innerWidth>0?window.innerWidth:screen.width;if(p>h){var m=J.clone(n.globals.initialConfig);m.series=J.clone(n.config.series);var x=ir.extendArrayProps(o,m,n);u=J.extend(x,u),u=J.extend(n.config,u),r.overrideResponsiveOptions(u)}else for(var y=0;y<s.length;y++)p<s[y].breakpoint&&(u=ir.extendArrayProps(o,s[y].options,n),u=J.extend(n.config,u),r.overrideResponsiveOptions(u))};if(e){var c=ir.extendArrayProps(o,e,n);c=J.extend(n.config,c),l(c=J.extend(c,e))}else l({})}}},{key:"overrideResponsiveOptions",value:function(e){var r=new hf(e).init({responsiveOverride:!0});this.w.config=r}}]),t}(),tK=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w,this.colors=[],this.isColorFn=!1,this.isHeatmapDistributed=this.checkHeatmapDistributed(),this.isBarDistributed=this.checkBarDistributed()}return Ae(t,[{key:"checkHeatmapDistributed",value:function(){var e=this.w.config,r=e.chart,n=e.plotOptions;return r.type==="treemap"&&n.treemap&&n.treemap.distributed||r.type==="heatmap"&&n.heatmap&&n.heatmap.distributed}},{key:"checkBarDistributed",value:function(){var e=this.w.config,r=e.chart,n=e.plotOptions;return n.bar&&n.bar.distributed&&(r.type==="bar"||r.type==="rangeBar")}},{key:"init",value:function(){this.setDefaultColors()}},{key:"setDefaultColors",value:function(){var e=this.w,r=new J;e.globals.dom.elWrap.classList.add("apexcharts-theme-".concat(e.config.theme.mode||"light"));var n=Nr(e.config.colors||e.config.fill.colors||[]);e.globals.colors=this.getColors(n),this.applySeriesColors(e.globals.seriesColors,e.globals.colors),e.config.theme.monochrome.enabled&&(e.globals.colors=this.getMonochromeColors(e.config.theme.monochrome,e.globals.series,r));var a=e.globals.colors.slice();this.pushExtraColors(e.globals.colors),this.applyColorTypes(["fill","stroke"],a),this.applyDataLabelsColors(a),this.applyRadarPolygonsColors(),this.applyMarkersColors(a)}},{key:"getColors",value:function(e){var r=this,n=this.w;return e&&e.length!==0?Array.isArray(e)&&e.length>0&&typeof e[0]=="function"?(this.isColorFn=!0,n.config.series.map(function(a,s){var o=e[s]||e[0];return typeof o=="function"?o({value:n.globals.axisCharts?n.globals.series[s][0]||0:n.globals.series[s],seriesIndex:s,dataPointIndex:s,w:r.w}):o})):e:this.predefined()}},{key:"applySeriesColors",value:function(e,r){e.forEach(function(n,a){n&&(r[a]=n)})}},{key:"getMonochromeColors",value:function(e,r,n){var a=e.color,s=e.shadeIntensity,o=e.shadeTo,l=this.isBarDistributed||this.isHeatmapDistributed?r[0].length*r.length:r.length,c=1/(l/s),u=0;return Array.from({length:l},function(){var h=o==="dark"?n.shadeColor(-1*u,a):n.shadeColor(u,a);return u+=c,h})}},{key:"applyColorTypes",value:function(e,r){var n=this,a=this.w;e.forEach(function(s){a.globals[s].colors=a.config[s].colors===void 0?n.isColorFn?a.config.colors:r:a.config[s].colors.slice(),n.pushExtraColors(a.globals[s].colors)})}},{key:"applyDataLabelsColors",value:function(e){var r=this.w;r.globals.dataLabels.style.colors=r.config.dataLabels.style.colors===void 0?e:r.config.dataLabels.style.colors.slice(),this.pushExtraColors(r.globals.dataLabels.style.colors,50)}},{key:"applyRadarPolygonsColors",value:function(){var e=this.w;e.globals.radarPolygons.fill.colors=e.config.plotOptions.radar.polygons.fill.colors===void 0?[e.config.theme.mode==="dark"?"#343A3F":"none"]:e.config.plotOptions.radar.polygons.fill.colors.slice(),this.pushExtraColors(e.globals.radarPolygons.fill.colors,20)}},{key:"applyMarkersColors",value:function(e){var r=this.w;r.globals.markers.colors=r.config.markers.colors===void 0?e:r.config.markers.colors.slice(),this.pushExtraColors(r.globals.markers.colors)}},{key:"pushExtraColors",value:function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,a=this.w,s=r||a.globals.series.length;if(n===null&&(n=this.isBarDistributed||this.isHeatmapDistributed||a.config.chart.type==="heatmap"&&a.config.plotOptions.heatmap&&a.config.plotOptions.heatmap.colorScale.inverse),n&&a.globals.series.length&&(s=a.globals.series[a.globals.maxValsInArrayIndex].length*a.globals.series.length),e.length<s)for(var o=s-e.length,l=0;l<o;l++)e.push(e[l])}},{key:"updateThemeOptions",value:function(e){e.chart=e.chart||{},e.tooltip=e.tooltip||{};var r=e.theme.mode,n=r==="dark"?"palette4":r==="light"?"palette1":e.theme.palette||"palette1",a=r==="dark"?"#f6f7f8":r==="light"?"#373d3f":e.chart.foreColor||"#373d3f";return e.tooltip.theme=r||"light",e.chart.foreColor=a,e.theme.palette=n,e}},{key:"predefined",value:function(){var e=this.w.config.theme.palette,r=this.ctx.constructor.getThemePalettes();return r[e]||r.palette1}}]),t}(),rK=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w}return Ae(t,[{key:"draw",value:function(){this.drawTitleSubtitle("title"),this.drawTitleSubtitle("subtitle")}},{key:"drawTitleSubtitle",value:function(e){var r=this.w,n=e==="title"?r.config.title:r.config.subtitle,a=r.globals.svgWidth/2,s=n.offsetY,o="middle";if(n.align==="left"?(a=10,o="start"):n.align==="right"&&(a=r.globals.svgWidth-10,o="end"),a+=n.offsetX,s=s+parseInt(n.style.fontSize,10)+n.margin/2,n.text!==void 0){var l=new ge(this.ctx).drawText({x:a,y:s,text:n.text,textAnchor:o,fontSize:n.style.fontSize,fontFamily:n.style.fontFamily,fontWeight:n.style.fontWeight,foreColor:n.style.color,opacity:1});l.node.setAttribute("class","apexcharts-".concat(e,"-text")),r.globals.dom.Paper.add(l)}}}]),t}(),nK=function(){function t(e){Se(this,t),this.w=e.w,this.dCtx=e}return Ae(t,[{key:"getTitleSubtitleCoords",value:function(e){var r=this.w,n=0,a=0,s=e==="title"?r.config.title.floating:r.config.subtitle.floating,o=r.globals.dom.baseEl.querySelector(".apexcharts-".concat(e,"-text"));if(o!==null&&!s){var l=o.getBoundingClientRect();n=l.width,a=r.globals.axisCharts?l.height+5:l.height}return{width:n,height:a}}},{key:"getLegendsRect",value:function(){var e=this.w,r=e.globals.dom.elLegendWrap;e.config.legend.height||e.config.legend.position!=="top"&&e.config.legend.position!=="bottom"||(r.style.maxHeight=e.globals.svgHeight/2+"px");var n=Object.assign({},J.getBoundingClientRect(r));return r!==null&&!e.config.legend.floating&&e.config.legend.show?this.dCtx.lgRect={x:n.x,y:n.y,height:n.height,width:n.height===0?0:n.width}:this.dCtx.lgRect={x:0,y:0,height:0,width:0},e.config.legend.position!=="left"&&e.config.legend.position!=="right"||1.5*this.dCtx.lgRect.width>e.globals.svgWidth&&(this.dCtx.lgRect.width=e.globals.svgWidth/1.5),this.dCtx.lgRect}},{key:"getDatalabelsRect",value:function(){var e=this,r=this.w,n=[];r.config.series.forEach(function(c,u){c.data.forEach(function(h,p){var m;m=r.globals.series[u][p],a=r.config.dataLabels.formatter(m,{ctx:e.dCtx.ctx,seriesIndex:u,dataPointIndex:p,w:r}),n.push(a)})});var a=J.getLargestStringFromArr(n),s=new ge(this.dCtx.ctx),o=r.config.dataLabels.style,l=s.getTextRects(a,parseInt(o.fontSize),o.fontFamily);return{width:1.05*l.width,height:l.height}}},{key:"getLargestStringFromMultiArr",value:function(e,r){var n=e;if(this.w.globals.isMultiLineX){var a=r.map(function(o,l){return Array.isArray(o)?o.length:1}),s=Math.max.apply(Math,Nr(a));n=r[a.indexOf(s)]}return n}}]),t}(),aK=function(){function t(e){Se(this,t),this.w=e.w,this.dCtx=e}return Ae(t,[{key:"getxAxisLabelsCoords",value:function(){var e,r=this.w,n=r.globals.labels.slice();if(r.config.xaxis.convertedCatToNumeric&&n.length===0&&(n=r.globals.categoryLabels),r.globals.timescaleLabels.length>0){var a=this.getxAxisTimeScaleLabelsCoords();e={width:a.width,height:a.height},r.globals.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends=r.config.legend.position!=="left"&&r.config.legend.position!=="right"||r.config.legend.floating?0:this.dCtx.lgRect.width;var s=r.globals.xLabelFormatter,o=J.getLargestStringFromArr(n),l=this.dCtx.dimHelpers.getLargestStringFromMultiArr(o,n);r.globals.isBarHorizontal&&(l=o=r.globals.yAxisScale[0].result.reduce(function(y,b){return y.length>b.length?y:b},0));var c=new qf(this.dCtx.ctx),u=o;o=c.xLabelFormat(s,o,u,{i:void 0,dateFormatter:new Vr(this.dCtx.ctx).formatDate,w:r}),l=c.xLabelFormat(s,l,u,{i:void 0,dateFormatter:new Vr(this.dCtx.ctx).formatDate,w:r}),(r.config.xaxis.convertedCatToNumeric&&o===void 0||String(o).trim()==="")&&(l=o="1");var h=new ge(this.dCtx.ctx),p=h.getTextRects(o,r.config.xaxis.labels.style.fontSize),m=p;if(o!==l&&(m=h.getTextRects(l,r.config.xaxis.labels.style.fontSize)),(e={width:p.width>=m.width?p.width:m.width,height:p.height>=m.height?p.height:m.height}).width*n.length>r.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&r.config.xaxis.labels.rotate!==0||r.config.xaxis.labels.rotateAlways){if(!r.globals.isBarHorizontal){r.globals.rotateXLabels=!0;var x=function(y){return h.getTextRects(y,r.config.xaxis.labels.style.fontSize,r.config.xaxis.labels.style.fontFamily,"rotate(".concat(r.config.xaxis.labels.rotate," 0 0)"),!1)};p=x(o),o!==l&&(m=x(l)),e.height=(p.height>m.height?p.height:m.height)/1.5,e.width=p.width>m.width?p.width:m.width}}else r.globals.rotateXLabels=!1}return r.config.xaxis.labels.show||(e={width:0,height:0}),{width:e.width,height:e.height}}},{key:"getxAxisGroupLabelsCoords",value:function(){var e,r=this.w;if(!r.globals.hasXaxisGroups)return{width:0,height:0};var n,a=((e=r.config.xaxis.group.style)===null||e===void 0?void 0:e.fontSize)||r.config.xaxis.labels.style.fontSize,s=r.globals.groups.map(function(p){return p.title}),o=J.getLargestStringFromArr(s),l=this.dCtx.dimHelpers.getLargestStringFromMultiArr(o,s),c=new ge(this.dCtx.ctx),u=c.getTextRects(o,a),h=u;return o!==l&&(h=c.getTextRects(l,a)),n={width:u.width>=h.width?u.width:h.width,height:u.height>=h.height?u.height:h.height},r.config.xaxis.labels.show||(n={width:0,height:0}),{width:n.width,height:n.height}}},{key:"getxAxisTitleCoords",value:function(){var e=this.w,r=0,n=0;if(e.config.xaxis.title.text!==void 0){var a=new ge(this.dCtx.ctx).getTextRects(e.config.xaxis.title.text,e.config.xaxis.title.style.fontSize);r=a.width,n=a.height}return{width:r,height:n}}},{key:"getxAxisTimeScaleLabelsCoords",value:function(){var e,r=this.w;this.dCtx.timescaleLabels=r.globals.timescaleLabels.slice();var n=this.dCtx.timescaleLabels.map(function(s){return s.value}),a=n.reduce(function(s,o){return s===void 0?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):s.length>o.length?s:o},0);return 1.05*(e=new ge(this.dCtx.ctx).getTextRects(a,r.config.xaxis.labels.style.fontSize)).width*n.length>r.globals.gridWidth&&r.config.xaxis.labels.rotate!==0&&(r.globals.overlappingXLabels=!0),e}},{key:"additionalPaddingXLabels",value:function(e){var r=this,n=this.w,a=n.globals,s=n.config,o=s.xaxis.type,l=e.width;a.skipLastTimelinelabel=!1,a.skipFirstTimelinelabel=!1;var c=n.config.yaxis[0].opposite&&n.globals.isBarHorizontal,u=function(h,p){s.yaxis.length>1&&function(m){return a.collapsedSeriesIndices.indexOf(m)!==-1}(p)||function(m){if(r.dCtx.timescaleLabels&&r.dCtx.timescaleLabels.length){var x=r.dCtx.timescaleLabels[0],y=r.dCtx.timescaleLabels[r.dCtx.timescaleLabels.length-1].position+l/1.75-r.dCtx.yAxisWidthRight,b=x.position-l/1.75+r.dCtx.yAxisWidthLeft,w=n.config.legend.position==="right"&&r.dCtx.lgRect.width>0?r.dCtx.lgRect.width:0;y>a.svgWidth-a.translateX-w&&(a.skipLastTimelinelabel=!0),b<-(m.show&&!m.floating||s.chart.type!=="bar"&&s.chart.type!=="candlestick"&&s.chart.type!=="rangeBar"&&s.chart.type!=="boxPlot"?10:l/1.75)&&(a.skipFirstTimelinelabel=!0)}else o==="datetime"?r.dCtx.gridPad.right<l&&!a.rotateXLabels&&(a.skipLastTimelinelabel=!0):o!=="datetime"&&r.dCtx.gridPad.right<l/2-r.dCtx.yAxisWidthRight&&!a.rotateXLabels&&!n.config.xaxis.labels.trim&&(r.dCtx.xPadRight=l/2+1)}(h)};s.yaxis.forEach(function(h,p){c?(r.dCtx.gridPad.left<l&&(r.dCtx.xPadLeft=l/2+1),r.dCtx.xPadRight=l/2+1):u(h,p)})}}]),t}(),sK=function(){function t(e){Se(this,t),this.w=e.w,this.dCtx=e}return Ae(t,[{key:"getyAxisLabelsCoords",value:function(){var e=this,r=this.w,n=[],a=10,s=new wo(this.dCtx.ctx);return r.config.yaxis.map(function(o,l){var c={seriesIndex:l,dataPointIndex:-1,w:r},u=r.globals.yAxisScale[l],h=0;if(!s.isYAxisHidden(l)&&o.labels.show&&o.labels.minWidth!==void 0&&(h=o.labels.minWidth),!s.isYAxisHidden(l)&&o.labels.show&&u.result.length){var p=r.globals.yLabelFormatters[l],m=u.niceMin===Number.MIN_VALUE?0:u.niceMin,x=u.result.reduce(function(C,k){var T,E;return((T=String(p(C,c)))===null||T===void 0?void 0:T.length)>((E=String(p(k,c)))===null||E===void 0?void 0:E.length)?C:k},m),y=x=p(x,c);if(x!==void 0&&x.length!==0||(x=u.niceMax),r.globals.isBarHorizontal){a=0;var b=r.globals.labels.slice();x=J.getLargestStringFromArr(b),x=p(x,{seriesIndex:l,dataPointIndex:-1,w:r}),y=e.dCtx.dimHelpers.getLargestStringFromMultiArr(x,b)}var w=new ge(e.dCtx.ctx),N="rotate(".concat(o.labels.rotate," 0 0)"),A=w.getTextRects(x,o.labels.style.fontSize,o.labels.style.fontFamily,N,!1),S=A;x!==y&&(S=w.getTextRects(y,o.labels.style.fontSize,o.labels.style.fontFamily,N,!1)),n.push({width:(h>S.width||h>A.width?h:S.width>A.width?S.width:A.width)+a,height:S.height>A.height?S.height:A.height})}else n.push({width:0,height:0})}),n}},{key:"getyAxisTitleCoords",value:function(){var e=this,r=this.w,n=[];return r.config.yaxis.map(function(a,s){if(a.show&&a.title.text!==void 0){var o=new ge(e.dCtx.ctx),l="rotate(".concat(a.title.rotate," 0 0)"),c=o.getTextRects(a.title.text,a.title.style.fontSize,a.title.style.fontFamily,l,!1);n.push({width:c.width,height:c.height})}else n.push({width:0,height:0})}),n}},{key:"getTotalYAxisWidth",value:function(){var e=this.w,r=0,n=0,a=0,s=e.globals.yAxisScale.length>1?10:0,o=new wo(this.dCtx.ctx),l=function(c,u){var h=e.config.yaxis[u].floating,p=0;c.width>0&&!h?(p=c.width+s,function(m){return e.globals.ignoreYAxisIndexes.indexOf(m)>-1}(u)&&(p=p-c.width-s)):p=h||o.isYAxisHidden(u)?0:5,e.config.yaxis[u].opposite?a+=p:n+=p,r+=p};return e.globals.yLabelsCoords.map(function(c,u){l(c,u)}),e.globals.yTitleCoords.map(function(c,u){l(c,u)}),e.globals.isBarHorizontal&&!e.config.yaxis[0].floating&&(r=e.globals.yLabelsCoords[0].width+e.globals.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=n,this.dCtx.yAxisWidthRight=a,r}}]),t}(),iK=function(){function t(e){Se(this,t),this.w=e.w,this.dCtx=e}return Ae(t,[{key:"gridPadForColumnsInNumericAxis",value:function(e){var r=this.w,n=r.config,a=r.globals;if(a.noData||a.collapsedSeries.length+a.ancillaryCollapsedSeries.length===n.series.length)return 0;var s=function(x){return["bar","rangeBar","candlestick","boxPlot"].includes(x)},o=n.chart.type,l=0,c=s(o)?n.series.length:1;a.comboBarCount>0&&(c=a.comboBarCount),a.collapsedSeries.forEach(function(x){s(x.type)&&(c-=1)}),n.chart.stacked&&(c=1);var u=s(o)||a.comboBarCount>0,h=Math.abs(a.initialMaxX-a.initialMinX);if(u&&a.isXNumeric&&!a.isBarHorizontal&&c>0&&h!==0){h<=3&&(h=a.dataPoints);var p=h/e,m=a.minXDiff&&a.minXDiff/p>0?a.minXDiff/p:0;m>e/2&&(m/=2),(l=m*parseInt(n.plotOptions.bar.columnWidth,10)/100)<1&&(l=1),a.barPadForNumericAxis=l}return l}},{key:"gridPadFortitleSubtitle",value:function(){var e=this,r=this.w,n=r.globals,a=this.dCtx.isSparkline||!n.axisCharts?0:10;["title","subtitle"].forEach(function(l){r.config[l].text!==void 0?a+=r.config[l].margin:a+=e.dCtx.isSparkline||!n.axisCharts?0:5}),!r.config.legend.show||r.config.legend.position!=="bottom"||r.config.legend.floating||n.axisCharts||(a+=10);var s=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),o=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");n.gridHeight-=s.height+o.height+a,n.translateY+=s.height+o.height+a}},{key:"setGridXPosForDualYAxis",value:function(e,r){var n=this.w,a=new wo(this.dCtx.ctx);n.config.yaxis.forEach(function(s,o){n.globals.ignoreYAxisIndexes.indexOf(o)!==-1||s.floating||a.isYAxisHidden(o)||(s.opposite&&(n.globals.translateX-=r[o].width+e[o].width+parseInt(s.labels.style.fontSize,10)/1.2+12),n.globals.translateX<2&&(n.globals.translateX=2))})}}]),t}(),xx=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w,this.lgRect={},this.yAxisWidth=0,this.yAxisWidthLeft=0,this.yAxisWidthRight=0,this.xAxisHeight=0,this.isSparkline=this.w.config.chart.sparkline.enabled,this.dimHelpers=new nK(this),this.dimYAxis=new sK(this),this.dimXAxis=new aK(this),this.dimGrid=new iK(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0}return Ae(t,[{key:"plotCoords",value:function(){var e=this,r=this.w,n=r.globals;this.lgRect=this.dimHelpers.getLegendsRect(),this.datalabelsCoords={width:0,height:0};var a=Array.isArray(r.config.stroke.width)?Math.max.apply(Math,Nr(r.config.stroke.width)):r.config.stroke.width;this.isSparkline&&((r.config.markers.discrete.length>0||r.config.markers.size>0)&&Object.entries(this.gridPad).forEach(function(o){var l=T_(o,2),c=l[0],u=l[1];e.gridPad[c]=Math.max(u,e.w.globals.markers.largestSize/1.5)}),this.gridPad.top=Math.max(a/2,this.gridPad.top),this.gridPad.bottom=Math.max(a/2,this.gridPad.bottom)),n.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),n.gridHeight=n.gridHeight-this.gridPad.top-this.gridPad.bottom,n.gridWidth=n.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;var s=this.dimGrid.gridPadForColumnsInNumericAxis(n.gridWidth);n.gridWidth=n.gridWidth-2*s,n.translateX=n.translateX+this.gridPad.left+this.xPadLeft+(s>0?s:0),n.translateY=n.translateY+this.gridPad.top}},{key:"setDimensionsForAxisCharts",value:function(){var e=this,r=this.w,n=r.globals,a=this.dimYAxis.getyAxisLabelsCoords(),s=this.dimYAxis.getyAxisTitleCoords();n.isSlopeChart&&(this.datalabelsCoords=this.dimHelpers.getDatalabelsRect()),r.globals.yLabelsCoords=[],r.globals.yTitleCoords=[],r.config.yaxis.map(function(x,y){r.globals.yLabelsCoords.push({width:a[y].width,index:y}),r.globals.yTitleCoords.push({width:s[y].width,index:y})}),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();var o=this.dimXAxis.getxAxisLabelsCoords(),l=this.dimXAxis.getxAxisGroupLabelsCoords(),c=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(o,c,l),n.translateXAxisY=r.globals.rotateXLabels?this.xAxisHeight/8:-4,n.translateXAxisX=r.globals.rotateXLabels&&r.globals.isXNumeric&&r.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,r.globals.isBarHorizontal&&(n.rotateXLabels=!1,n.translateXAxisY=parseInt(r.config.xaxis.labels.style.fontSize,10)/1.5*-1),n.translateXAxisY=n.translateXAxisY+r.config.xaxis.labels.offsetY,n.translateXAxisX=n.translateXAxisX+r.config.xaxis.labels.offsetX;var u=this.yAxisWidth,h=this.xAxisHeight;n.xAxisLabelsHeight=this.xAxisHeight-c.height,n.xAxisGroupLabelsHeight=n.xAxisLabelsHeight-o.height,n.xAxisLabelsWidth=this.xAxisWidth,n.xAxisHeight=this.xAxisHeight;var p=10;(r.config.chart.type==="radar"||this.isSparkline)&&(u=0,h=0),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||r.config.chart.type==="treemap")&&(u=0,h=0,p=0),this.isSparkline||r.config.chart.type==="treemap"||this.dimXAxis.additionalPaddingXLabels(o);var m=function(){n.translateX=u+e.datalabelsCoords.width,n.gridHeight=n.svgHeight-e.lgRect.height-h-(e.isSparkline||r.config.chart.type==="treemap"?0:r.globals.rotateXLabels?10:15),n.gridWidth=n.svgWidth-u-2*e.datalabelsCoords.width};switch(r.config.xaxis.position==="top"&&(p=n.xAxisHeight-r.config.xaxis.axisTicks.height-5),r.config.legend.position){case"bottom":n.translateY=p,m();break;case"top":n.translateY=this.lgRect.height+p,m();break;case"left":n.translateY=p,n.translateX=this.lgRect.width+u+this.datalabelsCoords.width,n.gridHeight=n.svgHeight-h-12,n.gridWidth=n.svgWidth-this.lgRect.width-u-2*this.datalabelsCoords.width;break;case"right":n.translateY=p,n.translateX=u+this.datalabelsCoords.width,n.gridHeight=n.svgHeight-h-12,n.gridWidth=n.svgWidth-this.lgRect.width-u-2*this.datalabelsCoords.width-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(s,a),new aN(this.ctx).setYAxisXPosition(a,s)}},{key:"setDimensionsForNonAxisCharts",value:function(){var e=this.w,r=e.globals,n=e.config,a=0;e.config.legend.show&&!e.config.legend.floating&&(a=20);var s=n.chart.type==="pie"||n.chart.type==="polarArea"||n.chart.type==="donut"?"pie":"radialBar",o=n.plotOptions[s].offsetY,l=n.plotOptions[s].offsetX;if(!n.legend.show||n.legend.floating){r.gridHeight=r.svgHeight;var c=r.dom.elWrap.getBoundingClientRect().width;return r.gridWidth=Math.min(c,r.gridHeight),r.translateY=o,void(r.translateX=l+(r.svgWidth-r.gridWidth)/2)}switch(n.legend.position){case"bottom":r.gridHeight=r.svgHeight-this.lgRect.height,r.gridWidth=r.svgWidth,r.translateY=o-10,r.translateX=l+(r.svgWidth-r.gridWidth)/2;break;case"top":r.gridHeight=r.svgHeight-this.lgRect.height,r.gridWidth=r.svgWidth,r.translateY=this.lgRect.height+o+10,r.translateX=l+(r.svgWidth-r.gridWidth)/2;break;case"left":r.gridWidth=r.svgWidth-this.lgRect.width-a,r.gridHeight=n.chart.height!=="auto"?r.svgHeight:r.gridWidth,r.translateY=o,r.translateX=l+this.lgRect.width+a;break;case"right":r.gridWidth=r.svgWidth-this.lgRect.width-a-5,r.gridHeight=n.chart.height!=="auto"?r.svgHeight:r.gridWidth,r.translateY=o,r.translateX=l+10;break;default:throw new Error("Legend position not supported")}}},{key:"conditionalChecksForAxisCoords",value:function(e,r,n){var a=this.w,s=a.globals.hasXaxisGroups?2:1,o=n.height+e.height+r.height,l=a.globals.isMultiLineX?1.2:a.globals.LINE_HEIGHT_RATIO,c=a.globals.rotateXLabels?22:10,u=a.globals.rotateXLabels&&a.config.legend.position==="bottom"?10:0;this.xAxisHeight=o*l+s*c+u,this.xAxisWidth=e.width,this.xAxisHeight-r.height>a.config.xaxis.labels.maxHeight&&(this.xAxisHeight=a.config.xaxis.labels.maxHeight),a.config.xaxis.labels.minHeight&&this.xAxisHeight<a.config.xaxis.labels.minHeight&&(this.xAxisHeight=a.config.xaxis.labels.minHeight),a.config.xaxis.floating&&(this.xAxisHeight=0);var h=0,p=0;a.config.yaxis.forEach(function(m){h+=m.labels.minWidth,p+=m.labels.maxWidth}),this.yAxisWidth<h&&(this.yAxisWidth=h),this.yAxisWidth>p&&(this.yAxisWidth=p)}}]),t}(),oK=function(){function t(e){Se(this,t),this.w=e.w,this.lgCtx=e}return Ae(t,[{key:"getLegendStyles",value:function(){var e,r,n,a=document.createElement("style");a.setAttribute("type","text/css");var s=((e=this.lgCtx.ctx)===null||e===void 0||(r=e.opts)===null||r===void 0||(n=r.chart)===null||n===void 0?void 0:n.nonce)||this.w.config.chart.nonce;s&&a.setAttribute("nonce",s);var o=document.createTextNode(`
.apexcharts-flip-y {
transform: scaleY(-1) translateY(-100%);
transform-origin: top;
transform-box: fill-box;
}
.apexcharts-flip-x {
transform: scaleX(-1);
transform-origin: center;
transform-box: fill-box;
}
.apexcharts-legend {
display: flex;
overflow: auto;
padding: 0 10px;
}
.apexcharts-legend.apexcharts-legend-group-horizontal {
flex-direction: column;
}
.apexcharts-legend-group {
display: flex;
}
.apexcharts-legend-group-vertical {
flex-direction: column-reverse;
}
.apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top {
flex-wrap: wrap
}
.apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {
flex-direction: column;
bottom: 0;
}
.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-left, .apexcharts-legend.apx-legend-position-top.apexcharts-align-left, .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {
justify-content: flex-start;
align-items: flex-start;
}
.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center {
justify-content: center;
align-items: center;
}
.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right {
justify-content: flex-end;
align-items: flex-end;
}
.apexcharts-legend-series {
cursor: pointer;
line-height: normal;
display: flex;
align-items: center;
}
.apexcharts-legend-text {
position: relative;
font-size: 14px;
}
.apexcharts-legend-text *, .apexcharts-legend-marker * {
pointer-events: none;
}
.apexcharts-legend-marker {
position: relative;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
margin-right: 1px;
}
.apexcharts-legend-series.apexcharts-no-click {
cursor: auto;
}
.apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {
display: none !important;
}
.apexcharts-inactive-legend {
opacity: 0.45;
}
`);return a.appendChild(o),a}},{key:"getLegendDimensions",value:function(){var e=this.w.globals.dom.baseEl.querySelector(".apexcharts-legend").getBoundingClientRect(),r=e.width;return{clwh:e.height,clww:r}}},{key:"appendToForeignObject",value:function(){this.w.globals.dom.elLegendForeign.appendChild(this.getLegendStyles())}},{key:"toggleDataSeries",value:function(e,r){var n=this,a=this.w;if(a.globals.axisCharts||a.config.chart.type==="radialBar"){a.globals.resized=!0;var s=null,o=null;a.globals.risingSeries=[],a.globals.axisCharts?(s=a.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(e,"']")),o=parseInt(s.getAttribute("data:realIndex"),10)):(s=a.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(e+1,"']")),o=parseInt(s.getAttribute("rel"),10)-1),r?[{cs:a.globals.collapsedSeries,csi:a.globals.collapsedSeriesIndices},{cs:a.globals.ancillaryCollapsedSeries,csi:a.globals.ancillaryCollapsedSeriesIndices}].forEach(function(h){n.riseCollapsedSeries(h.cs,h.csi,o)}):this.hideSeries({seriesEl:s,realIndex:o})}else{var l=a.globals.dom.Paper.findOne(" .apexcharts-series[rel='".concat(e+1,"'] path")),c=a.config.chart.type;if(c==="pie"||c==="polarArea"||c==="donut"){var u=a.config.plotOptions.pie.donut.labels;new ge(this.lgCtx.ctx).pathMouseDown(l,null),this.lgCtx.ctx.pie.printDataLabelsInner(l.node,u)}l.fire("click")}}},{key:"getSeriesAfterCollapsing",value:function(e){var r=e.realIndex,n=this.w,a=n.globals,s=J.clone(n.config.series);if(a.axisCharts){var o=n.config.yaxis[a.seriesYAxisReverseMap[r]],l={index:r,data:s[r].data.slice(),type:s[r].type||n.config.chart.type};if(o&&o.show&&o.showAlways)a.ancillaryCollapsedSeriesIndices.indexOf(r)<0&&(a.ancillaryCollapsedSeries.push(l),a.ancillaryCollapsedSeriesIndices.push(r));else if(a.collapsedSeriesIndices.indexOf(r)<0){a.collapsedSeries.push(l),a.collapsedSeriesIndices.push(r);var c=a.risingSeries.indexOf(r);a.risingSeries.splice(c,1)}}else a.collapsedSeries.push({index:r,data:s[r]}),a.collapsedSeriesIndices.push(r);return a.allSeriesCollapsed=a.collapsedSeries.length+a.ancillaryCollapsedSeries.length===n.config.series.length,this._getSeriesBasedOnCollapsedState(s)}},{key:"hideSeries",value:function(e){for(var r=e.seriesEl,n=e.realIndex,a=this.w,s=this.getSeriesAfterCollapsing({realIndex:n}),o=r.childNodes,l=0;l<o.length;l++)o[l].classList.contains("apexcharts-series-markers-wrap")&&(o[l].classList.contains("apexcharts-hide")?o[l].classList.remove("apexcharts-hide"):o[l].classList.add("apexcharts-hide"));this.lgCtx.ctx.updateHelpers._updateSeries(s,a.config.chart.animations.dynamicAnimation.enabled)}},{key:"riseCollapsedSeries",value:function(e,r,n){var a=this.w,s=J.clone(a.config.series);if(e.length>0){for(var o=0;o<e.length;o++)e[o].index===n&&(a.globals.axisCharts?s[n].data=e[o].data.slice():s[n]=e[o].data,typeof s[n]!="number"&&(s[n].hidden=!1),e.splice(o,1),r.splice(o,1),a.globals.risingSeries.push(n));s=this._getSeriesBasedOnCollapsedState(s),this.lgCtx.ctx.updateHelpers._updateSeries(s,a.config.chart.animations.dynamicAnimation.enabled)}}},{key:"_getSeriesBasedOnCollapsedState",value:function(e){var r=this.w,n=0;return r.globals.axisCharts?e.forEach(function(a,s){r.globals.collapsedSeriesIndices.indexOf(s)<0&&r.globals.ancillaryCollapsedSeriesIndices.indexOf(s)<0||(e[s].data=[],n++)}):e.forEach(function(a,s){!r.globals.collapsedSeriesIndices.indexOf(s)<0&&(e[s]=0,n++)}),r.globals.allSeriesCollapsed=n===e.length,e}}]),t}(),lR=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w,this.onLegendClick=this.onLegendClick.bind(this),this.onLegendHovered=this.onLegendHovered.bind(this),this.isBarsDistributed=this.w.config.chart.type==="bar"&&this.w.config.plotOptions.bar.distributed&&this.w.config.series.length===1,this.legendHelpers=new oK(this)}return Ae(t,[{key:"init",value:function(){var e=this.w,r=e.globals,n=e.config,a=n.legend.showForSingleSeries&&r.series.length===1||this.isBarsDistributed||r.series.length>1;if(this.legendHelpers.appendToForeignObject(),(a||!r.axisCharts)&&n.legend.show){for(;r.dom.elLegendWrap.firstChild;)r.dom.elLegendWrap.removeChild(r.dom.elLegendWrap.firstChild);this.drawLegends(),n.legend.position==="bottom"||n.legend.position==="top"?this.legendAlignHorizontal():n.legend.position!=="right"&&n.legend.position!=="left"||this.legendAlignVertical()}}},{key:"createLegendMarker",value:function(e){var r=e.i,n=e.fillcolor,a=this.w,s=document.createElement("span");s.classList.add("apexcharts-legend-marker");var o=a.config.legend.markers.shape||a.config.markers.shape,l=o;Array.isArray(o)&&(l=o[r]);var c=Array.isArray(a.config.legend.markers.size)?parseFloat(a.config.legend.markers.size[r]):parseFloat(a.config.legend.markers.size),u=Array.isArray(a.config.legend.markers.offsetX)?parseFloat(a.config.legend.markers.offsetX[r]):parseFloat(a.config.legend.markers.offsetX),h=Array.isArray(a.config.legend.markers.offsetY)?parseFloat(a.config.legend.markers.offsetY[r]):parseFloat(a.config.legend.markers.offsetY),p=Array.isArray(a.config.legend.markers.strokeWidth)?parseFloat(a.config.legend.markers.strokeWidth[r]):parseFloat(a.config.legend.markers.strokeWidth),m=s.style;if(m.height=2*(c+p)+"px",m.width=2*(c+p)+"px",m.left=u+"px",m.top=h+"px",a.config.legend.markers.customHTML)m.background="transparent",m.color=n[r],Array.isArray(a.config.legend.markers.customHTML)?a.config.legend.markers.customHTML[r]&&(s.innerHTML=a.config.legend.markers.customHTML[r]()):s.innerHTML=a.config.legend.markers.customHTML();else{var x=new Fd(this.ctx).getMarkerConfig({cssClass:"apexcharts-legend-marker apexcharts-marker apexcharts-marker-".concat(l),seriesIndex:r,strokeWidth:p,size:c}),y=window.SVG().addTo(s).size("100%","100%"),b=new ge(this.ctx).drawMarker(0,0,ve(ve({},x),{},{pointFillColor:Array.isArray(n)?n[r]:x.pointFillColor,shape:l}));a.globals.dom.Paper.find(".apexcharts-legend-marker.apexcharts-marker").forEach(function(w){w.node.classList.contains("apexcharts-marker-triangle")?w.node.style.transform="translate(50%, 45%)":w.node.style.transform="translate(50%, 50%)"}),y.add(b)}return s}},{key:"drawLegends",value:function(){var e=this,r=this,n=this.w,a=n.config.legend.fontFamily,s=n.globals.seriesNames,o=n.config.legend.markers.fillColors?n.config.legend.markers.fillColors.slice():n.globals.colors.slice();if(n.config.chart.type==="heatmap"){var l=n.config.plotOptions.heatmap.colorScale.ranges;s=l.map(function(x){return x.name?x.name:x.from+" - "+x.to}),o=l.map(function(x){return x.color})}else this.isBarsDistributed&&(s=n.globals.labels.slice());n.config.legend.customLegendItems.length&&(s=n.config.legend.customLegendItems);var c=n.globals.legendFormatter,u=n.config.legend.inverseOrder,h=[];n.globals.seriesGroups.length>1&&n.config.legend.clusterGroupedSeries&&n.globals.seriesGroups.forEach(function(x,y){h[y]=document.createElement("div"),h[y].classList.add("apexcharts-legend-group","apexcharts-legend-group-".concat(y)),n.config.legend.clusterGroupedSeriesOrientation==="horizontal"?n.globals.dom.elLegendWrap.classList.add("apexcharts-legend-group-horizontal"):h[y].classList.add("apexcharts-legend-group-vertical")});for(var p=function(x){var y,b=c(s[x],{seriesIndex:x,w:n}),w=!1,N=!1;if(n.globals.collapsedSeries.length>0)for(var A=0;A<n.globals.collapsedSeries.length;A++)n.globals.collapsedSeries[A].index===x&&(w=!0);if(n.globals.ancillaryCollapsedSeriesIndices.length>0)for(var S=0;S<n.globals.ancillaryCollapsedSeriesIndices.length;S++)n.globals.ancillaryCollapsedSeriesIndices[S]===x&&(N=!0);var C=e.createLegendMarker({i:x,fillcolor:o});ge.setAttrs(C,{rel:x+1,"data:collapsed":w||N}),(w||N)&&C.classList.add("apexcharts-inactive-legend");var k=document.createElement("div"),T=document.createElement("span");T.classList.add("apexcharts-legend-text"),T.innerHTML=Array.isArray(b)?b.join(" "):b;var E=n.config.legend.labels.useSeriesColors?n.globals.colors[x]:Array.isArray(n.config.legend.labels.colors)?(y=n.config.legend.labels.colors)===null||y===void 0?void 0:y[x]:n.config.legend.labels.colors;E||(E=n.config.chart.foreColor),T.style.color=E,T.style.fontSize=parseFloat(n.config.legend.fontSize)+"px",T.style.fontWeight=n.config.legend.fontWeight,T.style.fontFamily=a||n.config.chart.fontFamily,ge.setAttrs(T,{rel:x+1,i:x,"data:default-text":encodeURIComponent(b),"data:collapsed":w||N}),k.appendChild(C),k.appendChild(T);var _=new ir(e.ctx);n.config.legend.showForZeroSeries||_.getSeriesTotalByIndex(x)===0&&_.seriesHaveSameValues(x)&&!_.isSeriesNull(x)&&n.globals.collapsedSeriesIndices.indexOf(x)===-1&&n.globals.ancillaryCollapsedSeriesIndices.indexOf(x)===-1&&k.classList.add("apexcharts-hidden-zero-series"),n.config.legend.showForNullSeries||_.isSeriesNull(x)&&n.globals.collapsedSeriesIndices.indexOf(x)===-1&&n.globals.ancillaryCollapsedSeriesIndices.indexOf(x)===-1&&k.classList.add("apexcharts-hidden-null-series"),h.length?n.globals.seriesGroups.forEach(function(L,P){var R;L.includes((R=n.config.series[x])===null||R===void 0?void 0:R.name)&&(n.globals.dom.elLegendWrap.appendChild(h[P]),h[P].appendChild(k))}):n.globals.dom.elLegendWrap.appendChild(k),n.globals.dom.elLegendWrap.classList.add("apexcharts-align-".concat(n.config.legend.horizontalAlign)),n.globals.dom.elLegendWrap.classList.add("apx-legend-position-"+n.config.legend.position),k.classList.add("apexcharts-legend-series"),k.style.margin="".concat(n.config.legend.itemMargin.vertical,"px ").concat(n.config.legend.itemMargin.horizontal,"px"),n.globals.dom.elLegendWrap.style.width=n.config.legend.width?n.config.legend.width+"px":"",n.globals.dom.elLegendWrap.style.height=n.config.legend.height?n.config.legend.height+"px":"",ge.setAttrs(k,{rel:x+1,seriesName:J.escapeString(s[x]),"data:collapsed":w||N}),(w||N)&&k.classList.add("apexcharts-inactive-legend"),n.config.legend.onItemClick.toggleDataSeries||k.classList.add("apexcharts-no-click")},m=u?s.length-1:0;u?m>=0:m<=s.length-1;u?m--:m++)p(m);n.globals.dom.elWrap.addEventListener("click",r.onLegendClick,!0),n.config.legend.onItemHover.highlightDataSeries&&n.config.legend.customLegendItems.length===0&&(n.globals.dom.elWrap.addEventListener("mousemove",r.onLegendHovered,!0),n.globals.dom.elWrap.addEventListener("mouseout",r.onLegendHovered,!0))}},{key:"setLegendWrapXY",value:function(e,r){var n=this.w,a=n.globals.dom.elLegendWrap,s=a.clientHeight,o=0,l=0;if(n.config.legend.position==="bottom")l=n.globals.svgHeight-Math.min(s,n.globals.svgHeight/2)-5;else if(n.config.legend.position==="top"){var c=new xx(this.ctx),u=c.dimHelpers.getTitleSubtitleCoords("title").height,h=c.dimHelpers.getTitleSubtitleCoords("subtitle").height;l=(u>0?u-10:0)+(h>0?h-10:0)}a.style.position="absolute",o=o+e+n.config.legend.offsetX,l=l+r+n.config.legend.offsetY,a.style.left=o+"px",a.style.top=l+"px",n.config.legend.position==="right"&&(a.style.left="auto",a.style.right=25+n.config.legend.offsetX+"px"),["width","height"].forEach(function(p){a.style[p]&&(a.style[p]=parseInt(n.config.legend[p],10)+"px")})}},{key:"legendAlignHorizontal",value:function(){var e=this.w;e.globals.dom.elLegendWrap.style.right=0;var r=new xx(this.ctx),n=r.dimHelpers.getTitleSubtitleCoords("title"),a=r.dimHelpers.getTitleSubtitleCoords("subtitle"),s=0;e.config.legend.position==="top"&&(s=n.height+a.height+e.config.title.margin+e.config.subtitle.margin-10),this.setLegendWrapXY(20,s)}},{key:"legendAlignVertical",value:function(){var e=this.w,r=this.legendHelpers.getLegendDimensions(),n=0;e.config.legend.position==="left"&&(n=20),e.config.legend.position==="right"&&(n=e.globals.svgWidth-r.clww-10),this.setLegendWrapXY(n,20)}},{key:"onLegendHovered",value:function(e){var r=this.w,n=e.target.classList.contains("apexcharts-legend-series")||e.target.classList.contains("apexcharts-legend-text")||e.target.classList.contains("apexcharts-legend-marker");if(r.config.chart.type==="heatmap"||this.isBarsDistributed){if(n){var a=parseInt(e.target.getAttribute("rel"),10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,a,this.w]),new Ra(this.ctx).highlightRangeInSeries(e,e.target)}}else!e.target.classList.contains("apexcharts-inactive-legend")&&n&&new Ra(this.ctx).toggleSeriesOnHover(e,e.target)}},{key:"onLegendClick",value:function(e){var r=this.w;if(!r.config.legend.customLegendItems.length&&(e.target.classList.contains("apexcharts-legend-series")||e.target.classList.contains("apexcharts-legend-text")||e.target.classList.contains("apexcharts-legend-marker"))){var n=parseInt(e.target.getAttribute("rel"),10)-1,a=e.target.getAttribute("data:collapsed")==="true",s=this.w.config.chart.events.legendClick;typeof s=="function"&&s(this.ctx,n,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,n,this.w]);var o=this.w.config.legend.markers.onClick;typeof o=="function"&&e.target.classList.contains("apexcharts-legend-marker")&&(o(this.ctx,n,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,n,this.w])),r.config.chart.type!=="treemap"&&r.config.chart.type!=="heatmap"&&!this.isBarsDistributed&&r.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(n,a)}}}]),t}(),cR=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w;var r=this.w;this.ev=this.w.config.chart.events,this.selectedClass="apexcharts-selected",this.localeValues=this.w.globals.locale.toolbar,this.minX=r.globals.minX,this.maxX=r.globals.maxX}return Ae(t,[{key:"createToolbar",value:function(){var e=this,r=this.w,n=function(){return document.createElement("div")},a=n();if(a.setAttribute("class","apexcharts-toolbar"),a.style.top=r.config.chart.toolbar.offsetY+"px",a.style.right=3-r.config.chart.toolbar.offsetX+"px",r.globals.dom.elWrap.appendChild(a),this.elZoom=n(),this.elZoomIn=n(),this.elZoomOut=n(),this.elPan=n(),this.elSelection=n(),this.elZoomReset=n(),this.elMenuIcon=n(),this.elMenu=n(),this.elCustomIcons=[],this.t=r.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(var s=0;s<this.t.customIcons.length;s++)this.elCustomIcons.push(n());var o=[],l=function(p,m,x){var y=p.toLowerCase();e.t[y]&&r.config.chart.zoom.enabled&&o.push({el:m,icon:typeof e.t[y]=="string"?e.t[y]:x,title:e.localeValues[p],class:"apexcharts-".concat(y,"-icon")})};l("zoomIn",this.elZoomIn,`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<path d="M0 0h24v24H0z" fill="none"/>
<path d="M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/>
</svg>
`),l("zoomOut",this.elZoomOut,`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<path d="M0 0h24v24H0z" fill="none"/>
<path d="M7 11v2h10v-2H7zm5-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/>
</svg>
`);var c=function(p){e.t[p]&&r.config.chart[p].enabled&&o.push({el:p==="zoom"?e.elZoom:e.elSelection,icon:typeof e.t[p]=="string"?e.t[p]:p==="zoom"?`<svg xmlns="http://www.w3.org/2000/svg" fill="#000000" height="24" viewBox="0 0 24 24" width="24">
<path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/>
<path d="M0 0h24v24H0V0z" fill="none"/>
<path d="M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z"/>
</svg>`:`<svg fill="#6E8192" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="M0 0h24v24H0z" fill="none"/>
<path d="M3 5h2V3c-1.1 0-2 .9-2 2zm0 8h2v-2H3v2zm4 8h2v-2H7v2zM3 9h2V7H3v2zm10-6h-2v2h2V3zm6 0v2h2c0-1.1-.9-2-2-2zM5 21v-2H3c0 1.1.9 2 2 2zm-2-4h2v-2H3v2zM9 3H7v2h2V3zm2 18h2v-2h-2v2zm8-8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2zm0-12h2V7h-2v2zm0 8h2v-2h-2v2zm-4 4h2v-2h-2v2zm0-16h2V3h-2v2z"/>
</svg>`,title:e.localeValues[p==="zoom"?"selectionZoom":"selection"],class:r.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-".concat(p,"-icon")})};c("zoom"),c("selection"),this.t.pan&&r.config.chart.zoom.enabled&&o.push({el:this.elPan,icon:typeof this.t.pan=="string"?this.t.pan:`<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="#000000" height="24" viewBox="0 0 24 24" width="24">
<defs>
<path d="M0 0h24v24H0z" id="a"/>
</defs>
<clipPath id="b">
<use overflow="visible" xlink:href="#a"/>
</clipPath>
<path clip-path="url(#b)" d="M23 5.5V20c0 2.2-1.8 4-4 4h-7.3c-1.08 0-2.1-.43-2.85-1.19L1 14.83s1.26-1.23 1.3-1.25c.22-.19.49-.29.79-.29.22 0 .42.06.6.16.04.01 4.31 2.46 4.31 2.46V4c0-.83.67-1.5 1.5-1.5S11 3.17 11 4v7h1V1.5c0-.83.67-1.5 1.5-1.5S15 .67 15 1.5V11h1V2.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5V11h1V5.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5z"/>
</svg>`,title:this.localeValues.pan,class:r.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-pan-icon"}),l("reset",this.elZoomReset,`<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/>
<path d="M0 0h24v24H0z" fill="none"/>
</svg>`),this.t.download&&o.push({el:this.elMenuIcon,icon:typeof this.t.download=="string"?this.t.download:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/></svg>',title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(var u=0;u<this.elCustomIcons.length;u++)o.push({el:this.elCustomIcons[u],icon:this.t.customIcons[u].icon,title:this.t.customIcons[u].title,index:this.t.customIcons[u].index,class:"apexcharts-toolbar-custom-icon "+this.t.customIcons[u].class});o.forEach(function(p,m){p.index&&J.moveIndexInArray(o,m,p.index)});for(var h=0;h<o.length;h++)ge.setAttrs(o[h].el,{class:o[h].class,title:o[h].title}),o[h].el.innerHTML=o[h].icon,a.appendChild(o[h].el);this._createHamburgerMenu(a),r.globals.zoomEnabled?this.elZoom.classList.add(this.selectedClass):r.globals.panEnabled?this.elPan.classList.add(this.selectedClass):r.globals.selectionEnabled&&this.elSelection.classList.add(this.selectedClass),this.addToolbarEventListeners()}},{key:"_createHamburgerMenu",value:function(e){this.elMenuItems=[],e.appendChild(this.elMenu),ge.setAttrs(this.elMenu,{class:"apexcharts-menu"});for(var r=[{name:"exportSVG",title:this.localeValues.exportToSVG},{name:"exportPNG",title:this.localeValues.exportToPNG},{name:"exportCSV",title:this.localeValues.exportToCSV}],n=0;n<r.length;n++)this.elMenuItems.push(document.createElement("div")),this.elMenuItems[n].innerHTML=r[n].title,ge.setAttrs(this.elMenuItems[n],{class:"apexcharts-menu-item ".concat(r[n].name),title:r[n].title}),this.elMenu.appendChild(this.elMenuItems[n])}},{key:"addToolbarEventListeners",value:function(){var e=this;this.elZoomReset.addEventListener("click",this.handleZoomReset.bind(this)),this.elSelection.addEventListener("click",this.toggleZoomSelection.bind(this,"selection")),this.elZoom.addEventListener("click",this.toggleZoomSelection.bind(this,"zoom")),this.elZoomIn.addEventListener("click",this.handleZoomIn.bind(this)),this.elZoomOut.addEventListener("click",this.handleZoomOut.bind(this)),this.elPan.addEventListener("click",this.togglePanning.bind(this)),this.elMenuIcon.addEventListener("click",this.toggleMenu.bind(this)),this.elMenuItems.forEach(function(n){n.classList.contains("exportSVG")?n.addEventListener("click",e.handleDownload.bind(e,"svg")):n.classList.contains("exportPNG")?n.addEventListener("click",e.handleDownload.bind(e,"png")):n.classList.contains("exportCSV")&&n.addEventListener("click",e.handleDownload.bind(e,"csv"))});for(var r=0;r<this.t.customIcons.length;r++)this.elCustomIcons[r].addEventListener("click",this.t.customIcons[r].click.bind(this,this.ctx,this.ctx.w))}},{key:"toggleZoomSelection",value:function(e){this.ctx.getSyncedCharts().forEach(function(r){r.ctx.toolbar.toggleOtherControls();var n=e==="selection"?r.ctx.toolbar.elSelection:r.ctx.toolbar.elZoom,a=e==="selection"?"selectionEnabled":"zoomEnabled";r.w.globals[a]=!r.w.globals[a],n.classList.contains(r.ctx.toolbar.selectedClass)?n.classList.remove(r.ctx.toolbar.selectedClass):n.classList.add(r.ctx.toolbar.selectedClass)})}},{key:"getToolbarIconsReference",value:function(){var e=this.w;this.elZoom||(this.elZoom=e.globals.dom.baseEl.querySelector(".apexcharts-zoom-icon")),this.elPan||(this.elPan=e.globals.dom.baseEl.querySelector(".apexcharts-pan-icon")),this.elSelection||(this.elSelection=e.globals.dom.baseEl.querySelector(".apexcharts-selection-icon"))}},{key:"enableZoomPanFromToolbar",value:function(e){this.toggleOtherControls(),e==="pan"?this.w.globals.panEnabled=!0:this.w.globals.zoomEnabled=!0;var r=e==="pan"?this.elPan:this.elZoom,n=e==="pan"?this.elZoom:this.elPan;r&&r.classList.add(this.selectedClass),n&&n.classList.remove(this.selectedClass)}},{key:"togglePanning",value:function(){this.ctx.getSyncedCharts().forEach(function(e){e.ctx.toolbar.toggleOtherControls(),e.w.globals.panEnabled=!e.w.globals.panEnabled,e.ctx.toolbar.elPan.classList.contains(e.ctx.toolbar.selectedClass)?e.ctx.toolbar.elPan.classList.remove(e.ctx.toolbar.selectedClass):e.ctx.toolbar.elPan.classList.add(e.ctx.toolbar.selectedClass)})}},{key:"toggleOtherControls",value:function(){var e=this,r=this.w;r.globals.panEnabled=!1,r.globals.zoomEnabled=!1,r.globals.selectionEnabled=!1,this.getToolbarIconsReference(),[this.elPan,this.elSelection,this.elZoom].forEach(function(n){n&&n.classList.remove(e.selectedClass)})}},{key:"handleZoomIn",value:function(){var e=this.w;e.globals.isRangeBar&&(this.minX=e.globals.minY,this.maxX=e.globals.maxY);var r=(this.minX+this.maxX)/2,n=(this.minX+r)/2,a=(this.maxX+r)/2,s=this._getNewMinXMaxX(n,a);e.globals.disableZoomIn||this.zoomUpdateOptions(s.minX,s.maxX)}},{key:"handleZoomOut",value:function(){var e=this.w;if(e.globals.isRangeBar&&(this.minX=e.globals.minY,this.maxX=e.globals.maxY),!(e.config.xaxis.type==="datetime"&&new Date(this.minX).getUTCFullYear()<1e3)){var r=(this.minX+this.maxX)/2,n=this.minX-(r-this.minX),a=this.maxX-(r-this.maxX),s=this._getNewMinXMaxX(n,a);e.globals.disableZoomOut||this.zoomUpdateOptions(s.minX,s.maxX)}}},{key:"_getNewMinXMaxX",value:function(e,r){var n=this.w.config.xaxis.convertedCatToNumeric;return{minX:n?Math.floor(e):e,maxX:n?Math.floor(r):r}}},{key:"zoomUpdateOptions",value:function(e,r){var n=this.w;if(e!==void 0||r!==void 0){if(!(n.config.xaxis.convertedCatToNumeric&&(e<1&&(e=1,r=n.globals.dataPoints),r-e<2))){var a={min:e,max:r},s=this.getBeforeZoomRange(a);s&&(a=s.xaxis);var o={xaxis:a},l=J.clone(n.globals.initialConfig.yaxis);n.config.chart.group||(o.yaxis=l),this.w.globals.zoomed=!0,this.ctx.updateHelpers._updateOptions(o,!1,this.w.config.chart.animations.dynamicAnimation.enabled),this.zoomCallback(a,l)}}else this.handleZoomReset()}},{key:"zoomCallback",value:function(e,r){typeof this.ev.zoomed=="function"&&(this.ev.zoomed(this.ctx,{xaxis:e,yaxis:r}),this.ctx.events.fireEvent("zoomed",{xaxis:e,yaxis:r}))}},{key:"getBeforeZoomRange",value:function(e,r){var n=null;return typeof this.ev.beforeZoom=="function"&&(n=this.ev.beforeZoom(this,{xaxis:e,yaxis:r})),n}},{key:"toggleMenu",value:function(){var e=this;window.setTimeout(function(){e.elMenu.classList.contains("apexcharts-menu-open")?e.elMenu.classList.remove("apexcharts-menu-open"):e.elMenu.classList.add("apexcharts-menu-open")},0)}},{key:"handleDownload",value:function(e){var r=this.w,n=new $h(this.ctx);switch(e){case"svg":n.exportToSVG(this.ctx);break;case"png":n.exportToPng(this.ctx);break;case"csv":n.exportToCSV({series:r.config.series,columnDelimiter:r.config.chart.toolbar.export.csv.columnDelimiter})}}},{key:"handleZoomReset",value:function(e){this.ctx.getSyncedCharts().forEach(function(r){var n=r.w;if(n.globals.lastXAxis.min=n.globals.initialConfig.xaxis.min,n.globals.lastXAxis.max=n.globals.initialConfig.xaxis.max,r.updateHelpers.revertDefaultAxisMinMax(),typeof n.config.chart.events.beforeResetZoom=="function"){var a=n.config.chart.events.beforeResetZoom(r,n);a&&r.updateHelpers.revertDefaultAxisMinMax(a)}typeof n.config.chart.events.zoomed=="function"&&r.ctx.toolbar.zoomCallback({min:n.config.xaxis.min,max:n.config.xaxis.max}),n.globals.zoomed=!1;var s=r.ctx.series.emptyCollapsedSeries(J.clone(n.globals.initialSeries));r.updateHelpers._updateSeries(s,n.config.chart.animations.dynamicAnimation.enabled)})}},{key:"destroy",value:function(){this.elZoom=null,this.elZoomIn=null,this.elZoomOut=null,this.elPan=null,this.elSelection=null,this.elZoomReset=null,this.elMenuIcon=null}}]),t}(),lK=function(t){Uf(r,cR);var e=Yf(r);function r(n){var a;return Se(this,r),(a=e.call(this,n)).ctx=n,a.w=n.w,a.dragged=!1,a.graphics=new ge(a.ctx),a.eventList=["mousedown","mouseleave","mousemove","touchstart","touchmove","mouseup","touchend","wheel"],a.clientX=0,a.clientY=0,a.startX=0,a.endX=0,a.dragX=0,a.startY=0,a.endY=0,a.dragY=0,a.moveDirection="none",a.debounceTimer=null,a.debounceDelay=100,a.wheelDelay=400,a}return Ae(r,[{key:"init",value:function(n){var a=this,s=n.xyRatios,o=this.w,l=this;this.xyRatios=s,this.zoomRect=this.graphics.drawRect(0,0,0,0),this.selectionRect=this.graphics.drawRect(0,0,0,0),this.gridRect=o.globals.dom.baseEl.querySelector(".apexcharts-grid"),this.constraints=new ar(0,0,o.globals.gridWidth,o.globals.gridHeight),this.zoomRect.node.classList.add("apexcharts-zoom-rect"),this.selectionRect.node.classList.add("apexcharts-selection-rect"),o.globals.dom.Paper.add(this.zoomRect),o.globals.dom.Paper.add(this.selectionRect),o.config.chart.selection.type==="x"?this.slDraggableRect=this.selectionRect.draggable({minX:0,minY:0,maxX:o.globals.gridWidth,maxY:o.globals.gridHeight}).on("dragmove.namespace",this.selectionDragging.bind(this,"dragging")):o.config.chart.selection.type==="y"?this.slDraggableRect=this.selectionRect.draggable({minX:0,maxX:o.globals.gridWidth}).on("dragmove.namespace",this.selectionDragging.bind(this,"dragging")):this.slDraggableRect=this.selectionRect.draggable().on("dragmove.namespace",this.selectionDragging.bind(this,"dragging")),this.preselectedSelection(),this.hoverArea=o.globals.dom.baseEl.querySelector("".concat(o.globals.chartClass," .apexcharts-svg")),this.hoverArea.classList.add("apexcharts-zoomable"),this.eventList.forEach(function(c){a.hoverArea.addEventListener(c,l.svgMouseEvents.bind(l,s),{capture:!1,passive:!0})}),o.config.chart.zoom.enabled&&o.config.chart.zoom.allowMouseWheelZoom&&this.hoverArea.addEventListener("wheel",l.mouseWheelEvent.bind(l),{capture:!1,passive:!1})}},{key:"destroy",value:function(){this.slDraggableRect&&(this.slDraggableRect.draggable(!1),this.slDraggableRect.off(),this.selectionRect.off()),this.selectionRect=null,this.zoomRect=null,this.gridRect=null}},{key:"svgMouseEvents",value:function(n,a){var s=this.w,o=this.ctx.toolbar,l=s.globals.zoomEnabled?s.config.chart.zoom.type:s.config.chart.selection.type,c=s.config.chart.toolbar.autoSelected;if(a.shiftKey?(this.shiftWasPressed=!0,o.enableZoomPanFromToolbar(c==="pan"?"zoom":"pan")):this.shiftWasPressed&&(o.enableZoomPanFromToolbar(c),this.shiftWasPressed=!1),a.target){var u,h=a.target.classList;if(a.target.parentNode&&a.target.parentNode!==null&&(u=a.target.parentNode.classList),!(h.contains("apexcharts-legend-marker")||h.contains("apexcharts-legend-text")||u&&u.contains("apexcharts-toolbar"))){if(this.clientX=a.type==="touchmove"||a.type==="touchstart"?a.touches[0].clientX:a.type==="touchend"?a.changedTouches[0].clientX:a.clientX,this.clientY=a.type==="touchmove"||a.type==="touchstart"?a.touches[0].clientY:a.type==="touchend"?a.changedTouches[0].clientY:a.clientY,a.type==="mousedown"&&a.which===1||a.type==="touchstart"){var p=this.gridRect.getBoundingClientRect();this.startX=this.clientX-p.left-s.globals.barPadForNumericAxis,this.startY=this.clientY-p.top,this.dragged=!1,this.w.globals.mousedown=!0}(a.type==="mousemove"&&a.which===1||a.type==="touchmove")&&(this.dragged=!0,s.globals.panEnabled?(s.globals.selection=null,this.w.globals.mousedown&&this.panDragging({context:this,zoomtype:l,xyRatios:n})):(this.w.globals.mousedown&&s.globals.zoomEnabled||this.w.globals.mousedown&&s.globals.selectionEnabled)&&(this.selection=this.selectionDrawing({context:this,zoomtype:l}))),a.type!=="mouseup"&&a.type!=="touchend"&&a.type!=="mouseleave"||this.handleMouseUp({zoomtype:l}),this.makeSelectionRectDraggable()}}}},{key:"handleMouseUp",value:function(n){var a,s=n.zoomtype,o=n.isResized,l=this.w,c=(a=this.gridRect)===null||a===void 0?void 0:a.getBoundingClientRect();c&&(this.w.globals.mousedown||o)&&(this.endX=this.clientX-c.left-l.globals.barPadForNumericAxis,this.endY=this.clientY-c.top,this.dragX=Math.abs(this.endX-this.startX),this.dragY=Math.abs(this.endY-this.startY),(l.globals.zoomEnabled||l.globals.selectionEnabled)&&this.selectionDrawn({context:this,zoomtype:s})),l.globals.zoomEnabled&&this.hideSelectionRect(this.selectionRect),this.dragged=!1,this.w.globals.mousedown=!1}},{key:"mouseWheelEvent",value:function(n){var a=this,s=this.w;n.preventDefault();var o=Date.now();o-s.globals.lastWheelExecution>this.wheelDelay&&(this.executeMouseWheelZoom(n),s.globals.lastWheelExecution=o),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(function(){o-s.globals.lastWheelExecution>a.wheelDelay&&(a.executeMouseWheelZoom(n),s.globals.lastWheelExecution=o)},this.debounceDelay)}},{key:"executeMouseWheelZoom",value:function(n){var a,s=this.w;this.minX=s.globals.isRangeBar?s.globals.minY:s.globals.minX,this.maxX=s.globals.isRangeBar?s.globals.maxY:s.globals.maxX;var o=(a=this.gridRect)===null||a===void 0?void 0:a.getBoundingClientRect();if(o){var l,c,u,h=(n.clientX-o.left)/o.width,p=this.minX,m=this.maxX,x=m-p;if(n.deltaY<0){var y=p+h*x;c=y-(l=.5*x)/2,u=y+l/2}else c=p-(l=1.5*x)/2,u=m+l/2;if(!s.globals.isRangeBar){c=Math.max(c,s.globals.initialMinX),u=Math.min(u,s.globals.initialMaxX);var b=.01*(s.globals.initialMaxX-s.globals.initialMinX);if(u-c<b){var w=(c+u)/2;c=w-b/2,u=w+b/2}}var N=this._getNewMinXMaxX(c,u);isNaN(N.minX)||isNaN(N.maxX)||this.zoomUpdateOptions(N.minX,N.maxX)}}},{key:"makeSelectionRectDraggable",value:function(){var n=this,a=this.w;if(this.selectionRect){var s=this.selectionRect.node.getBoundingClientRect();s.width>0&&s.height>0&&(this.selectionRect.select(!1).resize(!1),this.selectionRect.select({createRot:function(){},updateRot:function(){},createHandle:function(o,l,c,u,h){return h==="l"||h==="r"?o.circle(8).css({"stroke-width":1,stroke:"#333",fill:"#fff"}):o.circle(0)},updateHandle:function(o,l){return o.center(l[0],l[1])}}).resize().on("resize",function(){var o=a.globals.zoomEnabled?a.config.chart.zoom.type:a.config.chart.selection.type;n.handleMouseUp({zoomtype:o,isResized:!0})}))}}},{key:"preselectedSelection",value:function(){var n=this.w,a=this.xyRatios;if(!n.globals.zoomEnabled){if(n.globals.selection!==void 0&&n.globals.selection!==null)this.drawSelectionRect(ve(ve({},n.globals.selection),{},{translateX:n.globals.translateX,translateY:n.globals.translateY}));else if(n.config.chart.selection.xaxis.min!==void 0&&n.config.chart.selection.xaxis.max!==void 0){var s=(n.config.chart.selection.xaxis.min-n.globals.minX)/a.xRatio,o=n.globals.gridWidth-(n.globals.maxX-n.config.chart.selection.xaxis.max)/a.xRatio-s;n.globals.isRangeBar&&(s=(n.config.chart.selection.xaxis.min-n.globals.yAxisScale[0].niceMin)/a.invertedYRatio,o=(n.config.chart.selection.xaxis.max-n.config.chart.selection.xaxis.min)/a.invertedYRatio);var l={x:s,y:0,width:o,height:n.globals.gridHeight,translateX:n.globals.translateX,translateY:n.globals.translateY,selectionEnabled:!0};this.drawSelectionRect(l),this.makeSelectionRectDraggable(),typeof n.config.chart.events.selection=="function"&&n.config.chart.events.selection(this.ctx,{xaxis:{min:n.config.chart.selection.xaxis.min,max:n.config.chart.selection.xaxis.max},yaxis:{}})}}}},{key:"drawSelectionRect",value:function(n){var a=n.x,s=n.y,o=n.width,l=n.height,c=n.translateX,u=c===void 0?0:c,h=n.translateY,p=h===void 0?0:h,m=this.w,x=this.zoomRect,y=this.selectionRect;if(this.dragged||m.globals.selection!==null){var b={transform:"translate("+u+", "+p+")"};m.globals.zoomEnabled&&this.dragged&&(o<0&&(o=1),x.attr({x:a,y:s,width:o,height:l,fill:m.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":m.config.chart.zoom.zoomedArea.fill.opacity,stroke:m.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":m.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":m.config.chart.zoom.zoomedArea.stroke.opacity}),ge.setAttrs(x.node,b)),m.globals.selectionEnabled&&(y.attr({x:a,y:s,width:o>0?o:0,height:l>0?l:0,fill:m.config.chart.selection.fill.color,"fill-opacity":m.config.chart.selection.fill.opacity,stroke:m.config.chart.selection.stroke.color,"stroke-width":m.config.chart.selection.stroke.width,"stroke-dasharray":m.config.chart.selection.stroke.dashArray,"stroke-opacity":m.config.chart.selection.stroke.opacity}),ge.setAttrs(y.node,b))}}},{key:"hideSelectionRect",value:function(n){n&&n.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(n){var a=n.context,s=n.zoomtype,o=this.w,l=a,c=this.gridRect.getBoundingClientRect(),u=l.startX-1,h=l.startY,p=!1,m=!1,x=l.clientX-c.left-o.globals.barPadForNumericAxis,y=l.clientY-c.top,b=x-u,w=y-h,N={translateX:o.globals.translateX,translateY:o.globals.translateY};return Math.abs(b+u)>o.globals.gridWidth?b=o.globals.gridWidth-u:x<0&&(b=u),u>x&&(p=!0,b=Math.abs(b)),h>y&&(m=!0,w=Math.abs(w)),N=ve(ve({},N=s==="x"?{x:p?u-b:u,y:0,width:b,height:o.globals.gridHeight}:s==="y"?{x:0,y:m?h-w:h,width:o.globals.gridWidth,height:w}:{x:p?u-b:u,y:m?h-w:h,width:b,height:w}),{},{translateX:o.globals.translateX,translateY:o.globals.translateY}),l.drawSelectionRect(N),l.selectionDragging("resizing"),N}},{key:"selectionDragging",value:function(n,a){var s=this,o=this.w;if(a){a.preventDefault();var l=a.detail,c=l.handler,u=l.box,h=u.x,p=u.y;h<this.constraints.x&&(h=this.constraints.x),p<this.constraints.y&&(p=this.constraints.y),u.x2>this.constraints.x2&&(h=this.constraints.x2-u.w),u.y2>this.constraints.y2&&(p=this.constraints.y2-u.h),c.move(h,p);var m=this.xyRatios,x=this.selectionRect,y=0;n==="resizing"&&(y=30);var b=function(N){return parseFloat(x.node.getAttribute(N))},w={x:b("x"),y:b("y"),width:b("width"),height:b("height")};o.globals.selection=w,typeof o.config.chart.events.selection=="function"&&o.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout(function(){var N,A,S,C,k=s.gridRect.getBoundingClientRect(),T=x.node.getBoundingClientRect();o.globals.isRangeBar?(N=o.globals.yAxisScale[0].niceMin+(T.left-k.left)*m.invertedYRatio,A=o.globals.yAxisScale[0].niceMin+(T.right-k.left)*m.invertedYRatio,S=0,C=1):(N=o.globals.xAxisScale.niceMin+(T.left-k.left)*m.xRatio,A=o.globals.xAxisScale.niceMin+(T.right-k.left)*m.xRatio,S=o.globals.yAxisScale[0].niceMin+(k.bottom-T.bottom)*m.yRatio[0],C=o.globals.yAxisScale[0].niceMax-(T.top-k.top)*m.yRatio[0]);var E={xaxis:{min:N,max:A},yaxis:{min:S,max:C}};o.config.chart.events.selection(s.ctx,E),o.config.chart.brush.enabled&&o.config.chart.events.brushScrolled!==void 0&&o.config.chart.events.brushScrolled(s.ctx,E)},y))}}},{key:"selectionDrawn",value:function(n){var a,s,o=n.context,l=n.zoomtype,c=this.w,u=o,h=this.xyRatios,p=this.ctx.toolbar,m=c.globals.zoomEnabled?u.zoomRect.node.getBoundingClientRect():u.selectionRect.node.getBoundingClientRect(),x=u.gridRect.getBoundingClientRect(),y=m.left-x.left-c.globals.barPadForNumericAxis,b=m.right-x.left-c.globals.barPadForNumericAxis,w=m.top-x.top,N=m.bottom-x.top;c.globals.isRangeBar?(a=c.globals.yAxisScale[0].niceMin+y*h.invertedYRatio,s=c.globals.yAxisScale[0].niceMin+b*h.invertedYRatio):(a=c.globals.xAxisScale.niceMin+y*h.xRatio,s=c.globals.xAxisScale.niceMin+b*h.xRatio);var A=[],S=[];if(c.config.yaxis.forEach(function(P,R){var z=c.globals.seriesYAxisMap[R][0],B=c.globals.yAxisScale[R].niceMax-h.yRatio[z]*w,Y=c.globals.yAxisScale[R].niceMax-h.yRatio[z]*N;A.push(B),S.push(Y)}),u.dragged&&(u.dragX>10||u.dragY>10)&&a!==s){if(c.globals.zoomEnabled){var C=J.clone(c.globals.initialConfig.yaxis),k=J.clone(c.globals.initialConfig.xaxis);if(c.globals.zoomed=!0,c.config.xaxis.convertedCatToNumeric&&(a=Math.floor(a),s=Math.floor(s),a<1&&(a=1,s=c.globals.dataPoints),s-a<2&&(s=a+1)),l!=="xy"&&l!=="x"||(k={min:a,max:s}),l!=="xy"&&l!=="y"||C.forEach(function(P,R){C[R].min=S[R],C[R].max=A[R]}),p){var T=p.getBeforeZoomRange(k,C);T&&(k=T.xaxis?T.xaxis:k,C=T.yaxis?T.yaxis:C)}var E={xaxis:k};c.config.chart.group||(E.yaxis=C),u.ctx.updateHelpers._updateOptions(E,!1,u.w.config.chart.animations.dynamicAnimation.enabled),typeof c.config.chart.events.zoomed=="function"&&p.zoomCallback(k,C)}else if(c.globals.selectionEnabled){var _,L=null;_={min:a,max:s},l!=="xy"&&l!=="y"||(L=J.clone(c.config.yaxis)).forEach(function(P,R){L[R].min=S[R],L[R].max=A[R]}),c.globals.selection=u.selection,typeof c.config.chart.events.selection=="function"&&c.config.chart.events.selection(u.ctx,{xaxis:_,yaxis:L})}}}},{key:"panDragging",value:function(n){var a=n.context,s=this.w,o=a;if(s.globals.lastClientPosition.x!==void 0){var l=s.globals.lastClientPosition.x-o.clientX,c=s.globals.lastClientPosition.y-o.clientY;Math.abs(l)>Math.abs(c)&&l>0?this.moveDirection="left":Math.abs(l)>Math.abs(c)&&l<0?this.moveDirection="right":Math.abs(c)>Math.abs(l)&&c>0?this.moveDirection="up":Math.abs(c)>Math.abs(l)&&c<0&&(this.moveDirection="down")}s.globals.lastClientPosition={x:o.clientX,y:o.clientY};var u=s.globals.isRangeBar?s.globals.minY:s.globals.minX,h=s.globals.isRangeBar?s.globals.maxY:s.globals.maxX;o.panScrolled(u,h)}},{key:"panScrolled",value:function(n,a){var s=this.w,o=this.xyRatios,l=J.clone(s.globals.initialConfig.yaxis),c=o.xRatio,u=s.globals.minX,h=s.globals.maxX;s.globals.isRangeBar&&(c=o.invertedYRatio,u=s.globals.minY,h=s.globals.maxY),this.moveDirection==="left"?(n=u+s.globals.gridWidth/15*c,a=h+s.globals.gridWidth/15*c):this.moveDirection==="right"&&(n=u-s.globals.gridWidth/15*c,a=h-s.globals.gridWidth/15*c),s.globals.isRangeBar||(n<s.globals.initialMinX||a>s.globals.initialMaxX)&&(n=u,a=h);var p={xaxis:{min:n,max:a}};s.config.chart.group||(p.yaxis=l),this.updateScrolledChart(p,n,a)}},{key:"updateScrolledChart",value:function(n,a,s){var o=this.w;if(this.ctx.updateHelpers._updateOptions(n,!1,!1),typeof o.config.chart.events.scrolled=="function"){var l={xaxis:{min:a,max:s}};o.config.chart.events.scrolled(this.ctx,l),this.ctx.events.fireEvent("scrolled",l)}}}]),r}(),dR=function(){function t(e){Se(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx}return Ae(t,[{key:"getNearestValues",value:function(e){var r=e.hoverArea,n=e.elGrid,a=e.clientX,s=e.clientY,o=this.w,l=n.getBoundingClientRect(),c=l.width,u=l.height,h=c/(o.globals.dataPoints-1),p=u/o.globals.dataPoints,m=this.hasBars();!o.globals.comboCharts&&!m||o.config.xaxis.convertedCatToNumeric||(h=c/o.globals.dataPoints);var x=a-l.left-o.globals.barPadForNumericAxis,y=s-l.top;x<0||y<0||x>c||y>u?(r.classList.remove("hovering-zoom"),r.classList.remove("hovering-pan")):o.globals.zoomEnabled?(r.classList.remove("hovering-pan"),r.classList.add("hovering-zoom")):o.globals.panEnabled&&(r.classList.remove("hovering-zoom"),r.classList.add("hovering-pan"));var b=Math.round(x/h),w=Math.floor(y/p);m&&!o.config.xaxis.convertedCatToNumeric&&(b=Math.ceil(x/h),b-=1);var N=null,A=null,S=o.globals.seriesXvalues.map(function(_){return _.filter(function(L){return J.isNumber(L)})}),C=o.globals.seriesYvalues.map(function(_){return _.filter(function(L){return J.isNumber(L)})});if(o.globals.isXNumeric){var k=this.ttCtx.getElGrid().getBoundingClientRect(),T=x*(k.width/c),E=y*(k.height/u);N=(A=this.closestInMultiArray(T,E,S,C)).index,b=A.j,N!==null&&o.globals.hasNullValues&&(S=o.globals.seriesXvalues[N],b=(A=this.closestInArray(T,S)).j)}return o.globals.capturedSeriesIndex=N===null?-1:N,(!b||b<1)&&(b=0),o.globals.isBarHorizontal?o.globals.capturedDataPointIndex=w:o.globals.capturedDataPointIndex=b,{capturedSeries:N,j:o.globals.isBarHorizontal?w:b,hoverX:x,hoverY:y}}},{key:"getFirstActiveXArray",value:function(e){for(var r=this.w,n=0,a=e.map(function(o,l){return o.length>0?l:-1}),s=0;s<a.length;s++)if(a[s]!==-1&&r.globals.collapsedSeriesIndices.indexOf(s)===-1&&r.globals.ancillaryCollapsedSeriesIndices.indexOf(s)===-1){n=a[s];break}return n}},{key:"closestInMultiArray",value:function(e,r,n,a){for(var s,o=this.w,l=1/0,c=null,u=null,h=0;h<n.length;h++)if(s=h,o.globals.collapsedSeriesIndices.indexOf(s)===-1&&o.globals.ancillaryCollapsedSeriesIndices.indexOf(s)===-1)for(var p=n[h],m=a[h],x=Math.min(p.length,m.length),y=0;y<x;y++){var b=e-p[y],w=Math.sqrt(b*b);if(!o.globals.allSeriesHasEqualX){var N=r-m[y];w=Math.sqrt(b*b+N*N)}w<l&&(l=w,c=h,u=y)}return{index:c,j:u}}},{key:"closestInArray",value:function(e,r){for(var n=r[0],a=null,s=Math.abs(e-n),o=0;o<r.length;o++){var l=Math.abs(e-r[o]);l<s&&(s=l,a=o)}return{j:a}}},{key:"isXoverlap",value:function(e){var r=[],n=this.w.globals.seriesX.filter(function(s){return s[0]!==void 0});if(n.length>0)for(var a=0;a<n.length-1;a++)n[a][e]!==void 0&&n[a+1][e]!==void 0&&n[a][e]!==n[a+1][e]&&r.push("unEqual");return r.length===0}},{key:"isInitialSeriesSameLen",value:function(){for(var e=!0,r=this.w.globals.initialSeries,n=0;n<r.length-1;n++)if(r[n].data.length!==r[n+1].data.length){e=!1;break}return e}},{key:"getBarsHeight",value:function(e){return Nr(e).reduce(function(r,n){return r+n.getBBox().height},0)}},{key:"getElMarkers",value:function(e){return typeof e=="number"?this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series[data\\:realIndex='".concat(e,"'] .apexcharts-series-markers-wrap > *")):this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap > *")}},{key:"getAllMarkers",value:function(){var e=this,r=arguments.length>0&&arguments[0]!==void 0&&arguments[0],n=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap");n=Nr(n),r&&(n=n.filter(function(s){var o=Number(s.getAttribute("data:realIndex"));return e.w.globals.collapsedSeriesIndices.indexOf(o)===-1})),n.sort(function(s,o){var l=Number(s.getAttribute("data:realIndex")),c=Number(o.getAttribute("data:realIndex"));return c<l?1:c>l?-1:0});var a=[];return n.forEach(function(s){a.push(s.querySelector(".apexcharts-marker"))}),a}},{key:"hasMarkers",value:function(e){return this.getElMarkers(e).length>0}},{key:"getPathFromPoint",value:function(e,r){var n=Number(e.getAttribute("cx")),a=Number(e.getAttribute("cy")),s=e.getAttribute("shape");return new ge(this.ctx).getMarkerPath(n,a,s,r)}},{key:"getElBars",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-rangebar-series")}},{key:"hasBars",value:function(){return this.getElBars().length>0}},{key:"getHoverMarkerSize",value:function(e){var r=this.w,n=r.config.markers.hover.size;return n===void 0&&(n=r.globals.markers.size[e]+r.config.markers.hover.sizeOffset),n}},{key:"toggleAllTooltipSeriesGroups",value:function(e){var r=this.w,n=this.ttCtx;n.allTooltipSeriesGroups.length===0&&(n.allTooltipSeriesGroups=r.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var a=n.allTooltipSeriesGroups,s=0;s<a.length;s++)e==="enable"?(a[s].classList.add("apexcharts-active"),a[s].style.display=r.config.tooltip.items.display):(a[s].classList.remove("apexcharts-active"),a[s].style.display="none")}}]),t}(),cK=function(){function t(e){Se(this,t),this.w=e.w,this.ctx=e.ctx,this.ttCtx=e,this.tooltipUtil=new dR(e)}return Ae(t,[{key:"drawSeriesTexts",value:function(e){var r=e.shared,n=r===void 0||r,a=e.ttItems,s=e.i,o=s===void 0?0:s,l=e.j,c=l===void 0?null:l,u=e.y1,h=e.y2,p=e.e,m=this.w;m.config.tooltip.custom!==void 0?this.handleCustomTooltip({i:o,j:c,y1:u,y2:h,w:m}):this.toggleActiveInactiveSeries(n,o);var x=this.getValuesToPrint({i:o,j:c});this.printLabels({i:o,j:c,values:x,ttItems:a,shared:n,e:p});var y=this.ttCtx.getElTooltip();this.ttCtx.tooltipRect.ttWidth=y.getBoundingClientRect().width,this.ttCtx.tooltipRect.ttHeight=y.getBoundingClientRect().height}},{key:"printLabels",value:function(e){var r,n=this,a=e.i,s=e.j,o=e.values,l=e.ttItems,c=e.shared,u=e.e,h=this.w,p=[],m=function(k){return h.globals.seriesGoals[k]&&h.globals.seriesGoals[k][s]&&Array.isArray(h.globals.seriesGoals[k][s])},x=o.xVal,y=o.zVal,b=o.xAxisTTVal,w="",N=h.globals.colors[a];s!==null&&h.config.plotOptions.bar.distributed&&(N=h.globals.colors[s]);for(var A=function(k,T){var E=n.getFormatters(a);w=n.getSeriesName({fn:E.yLbTitleFormatter,index:a,seriesIndex:a,j:s}),h.config.chart.type==="treemap"&&(w=E.yLbTitleFormatter(String(h.config.series[a].data[s].x),{series:h.globals.series,seriesIndex:a,dataPointIndex:s,w:h}));var _=h.config.tooltip.inverseOrder?T:k;if(h.globals.axisCharts){var L=function(z){var B,Y,X,H;return h.globals.isRangeData?E.yLbFormatter((B=h.globals.seriesRangeStart)===null||B===void 0||(Y=B[z])===null||Y===void 0?void 0:Y[s],{series:h.globals.seriesRangeStart,seriesIndex:z,dataPointIndex:s,w:h})+" - "+E.yLbFormatter((X=h.globals.seriesRangeEnd)===null||X===void 0||(H=X[z])===null||H===void 0?void 0:H[s],{series:h.globals.seriesRangeEnd,seriesIndex:z,dataPointIndex:s,w:h}):E.yLbFormatter(h.globals.series[z][s],{series:h.globals.series,seriesIndex:z,dataPointIndex:s,w:h})};if(c)E=n.getFormatters(_),w=n.getSeriesName({fn:E.yLbTitleFormatter,index:_,seriesIndex:a,j:s}),N=h.globals.colors[_],r=L(_),m(_)&&(p=h.globals.seriesGoals[_][s].map(function(z){return{attrs:z,val:E.yLbFormatter(z.value,{seriesIndex:_,dataPointIndex:s,w:h})}}));else{var P,R=u==null||(P=u.target)===null||P===void 0?void 0:P.getAttribute("fill");R&&(R.indexOf("url")!==-1?R.indexOf("Pattern")!==-1&&(N=h.globals.dom.baseEl.querySelector(R.substr(4).slice(0,-1)).childNodes[0].getAttribute("stroke")):N=R),r=L(a),m(a)&&Array.isArray(h.globals.seriesGoals[a][s])&&(p=h.globals.seriesGoals[a][s].map(function(z){return{attrs:z,val:E.yLbFormatter(z.value,{seriesIndex:a,dataPointIndex:s,w:h})}}))}}s===null&&(r=E.yLbFormatter(h.globals.series[a],ve(ve({},h),{},{seriesIndex:a,dataPointIndex:a}))),n.DOMHandling({i:a,t:_,j:s,ttItems:l,values:{val:r,goalVals:p,xVal:x,xAxisTTVal:b,zVal:y},seriesName:w,shared:c,pColor:N})},S=0,C=h.globals.series.length-1;S<h.globals.series.length;S++,C--)A(S,C)}},{key:"getFormatters",value:function(e){var r,n=this.w,a=n.globals.yLabelFormatters[e];return n.globals.ttVal!==void 0?Array.isArray(n.globals.ttVal)?(a=n.globals.ttVal[e]&&n.globals.ttVal[e].formatter,r=n.globals.ttVal[e]&&n.globals.ttVal[e].title&&n.globals.ttVal[e].title.formatter):(a=n.globals.ttVal.formatter,typeof n.globals.ttVal.title.formatter=="function"&&(r=n.globals.ttVal.title.formatter)):r=n.config.tooltip.y.title.formatter,typeof a!="function"&&(a=n.globals.yLabelFormatters[0]?n.globals.yLabelFormatters[0]:function(s){return s}),typeof r!="function"&&(r=function(s){return s?s+": ":""}),{yLbFormatter:a,yLbTitleFormatter:r}}},{key:"getSeriesName",value:function(e){var r=e.fn,n=e.index,a=e.seriesIndex,s=e.j,o=this.w;return r(String(o.globals.seriesNames[n]),{series:o.globals.series,seriesIndex:a,dataPointIndex:s,w:o})}},{key:"DOMHandling",value:function(e){e.i;var r=e.t,n=e.j,a=e.ttItems,s=e.values,o=e.seriesName,l=e.shared,c=e.pColor,u=this.w,h=this.ttCtx,p=s.val,m=s.goalVals,x=s.xVal,y=s.xAxisTTVal,b=s.zVal,w=null;w=a[r].children,u.config.tooltip.fillSeriesColor&&(a[r].style.backgroundColor=c,w[0].style.display="none"),h.showTooltipTitle&&(h.tooltipTitle===null&&(h.tooltipTitle=u.globals.dom.baseEl.querySelector(".apexcharts-tooltip-title")),h.tooltipTitle.innerHTML=x),h.isXAxisTooltipEnabled&&(h.xaxisTooltipText.innerHTML=y!==""?y:x);var N=a[r].querySelector(".apexcharts-tooltip-text-y-label");N&&(N.innerHTML=o||"");var A=a[r].querySelector(".apexcharts-tooltip-text-y-value");A&&(A.innerHTML=p!==void 0?p:""),w[0]&&w[0].classList.contains("apexcharts-tooltip-marker")&&(u.config.tooltip.marker.fillColors&&Array.isArray(u.config.tooltip.marker.fillColors)&&(c=u.config.tooltip.marker.fillColors[r]),u.config.tooltip.fillSeriesColor?w[0].style.backgroundColor=c:w[0].style.color=c),u.config.tooltip.marker.show||(w[0].style.display="none");var S=a[r].querySelector(".apexcharts-tooltip-text-goals-label"),C=a[r].querySelector(".apexcharts-tooltip-text-goals-value");if(m.length&&u.globals.seriesGoals[r]){var k=function(){var _="<div>",L="<div>";m.forEach(function(P,R){_+=' <div style="display: flex"><span class="apexcharts-tooltip-marker" style="background-color: '.concat(P.attrs.strokeColor,'; height: 3px; border-radius: 0; top: 5px;"></span> ').concat(P.attrs.name,"</div>"),L+="<div>".concat(P.val,"</div>")}),S.innerHTML=_+"</div>",C.innerHTML=L+"</div>"};l?u.globals.seriesGoals[r][n]&&Array.isArray(u.globals.seriesGoals[r][n])?k():(S.innerHTML="",C.innerHTML=""):k()}else S.innerHTML="",C.innerHTML="";if(b!==null&&(a[r].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=u.config.tooltip.z.title,a[r].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=b!==void 0?b:""),l&&w[0]){if(u.config.tooltip.hideEmptySeries){var T=a[r].querySelector(".apexcharts-tooltip-marker"),E=a[r].querySelector(".apexcharts-tooltip-text");parseFloat(p)==0?(T.style.display="none",E.style.display="none"):(T.style.display="block",E.style.display="block")}p==null||u.globals.ancillaryCollapsedSeriesIndices.indexOf(r)>-1||u.globals.collapsedSeriesIndices.indexOf(r)>-1||Array.isArray(h.tConfig.enabledOnSeries)&&h.tConfig.enabledOnSeries.indexOf(r)===-1?w[0].parentNode.style.display="none":w[0].parentNode.style.display=u.config.tooltip.items.display}else Array.isArray(h.tConfig.enabledOnSeries)&&h.tConfig.enabledOnSeries.indexOf(r)===-1&&(w[0].parentNode.style.display="none")}},{key:"toggleActiveInactiveSeries",value:function(e,r){var n=this.w;if(e)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");var a=n.globals.dom.baseEl.querySelector(".apexcharts-tooltip-series-group-".concat(r));a&&(a.classList.add("apexcharts-active"),a.style.display=n.config.tooltip.items.display)}}},{key:"getValuesToPrint",value:function(e){var r=e.i,n=e.j,a=this.w,s=this.ctx.series.filteredSeriesX(),o="",l="",c=null,u=null,h={series:a.globals.series,seriesIndex:r,dataPointIndex:n,w:a},p=a.globals.ttZFormatter;n===null?u=a.globals.series[r]:a.globals.isXNumeric&&a.config.chart.type!=="treemap"?(o=s[r][n],s[r].length===0&&(o=s[this.tooltipUtil.getFirstActiveXArray(s)][n])):o=new nN(this.ctx).isFormatXY()?a.config.series[r].data[n]!==void 0?a.config.series[r].data[n].x:"":a.globals.labels[n]!==void 0?a.globals.labels[n]:"";var m=o;return a.globals.isXNumeric&&a.config.xaxis.type==="datetime"?o=new qf(this.ctx).xLabelFormat(a.globals.ttKeyFormatter,m,m,{i:void 0,dateFormatter:new Vr(this.ctx).formatDate,w:this.w}):o=a.globals.isBarHorizontal?a.globals.yLabelFormatters[0](m,h):a.globals.xLabelFormatter(m,h),a.config.tooltip.x.formatter!==void 0&&(o=a.globals.ttKeyFormatter(m,h)),a.globals.seriesZ.length>0&&a.globals.seriesZ[r].length>0&&(c=p(a.globals.seriesZ[r][n],a)),l=typeof a.config.xaxis.tooltip.formatter=="function"?a.globals.xaxisTooltipFormatter(m,h):o,{val:Array.isArray(u)?u.join(" "):u,xVal:Array.isArray(o)?o.join(" "):o,xAxisTTVal:Array.isArray(l)?l.join(" "):l,zVal:c}}},{key:"handleCustomTooltip",value:function(e){var r=e.i,n=e.j,a=e.y1,s=e.y2,o=e.w,l=this.ttCtx.getElTooltip(),c=o.config.tooltip.custom;Array.isArray(c)&&c[r]&&(c=c[r]);var u=c({ctx:this.ctx,series:o.globals.series,seriesIndex:r,dataPointIndex:n,y1:a,y2:s,w:o});typeof u=="string"||typeof u=="number"?l.innerHTML=u:(u instanceof Element||typeof u.nodeName=="string")&&(l.innerHTML="",l.appendChild(u.cloneNode(!0)))}}]),t}(),uR=function(){function t(e){Se(this,t),this.ttCtx=e,this.ctx=e.ctx,this.w=e.w}return Ae(t,[{key:"moveXCrosshairs",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,n=this.ttCtx,a=this.w,s=n.getElXCrosshairs(),o=e-n.xcrosshairsWidth/2,l=a.globals.labels.slice().length;if(r!==null&&(o=a.globals.gridWidth/l*r),s===null||a.globals.isBarHorizontal||(s.setAttribute("x",o),s.setAttribute("x1",o),s.setAttribute("x2",o),s.setAttribute("y2",a.globals.gridHeight),s.classList.add("apexcharts-active")),o<0&&(o=0),o>a.globals.gridWidth&&(o=a.globals.gridWidth),n.isXAxisTooltipEnabled){var c=o;a.config.xaxis.crosshairs.width!=="tickWidth"&&a.config.xaxis.crosshairs.width!=="barWidth"||(c=o+n.xcrosshairsWidth/2),this.moveXAxisTooltip(c)}}},{key:"moveYCrosshairs",value:function(e){var r=this.ttCtx;r.ycrosshairs!==null&&ge.setAttrs(r.ycrosshairs,{y1:e,y2:e}),r.ycrosshairsHidden!==null&&ge.setAttrs(r.ycrosshairsHidden,{y1:e,y2:e})}},{key:"moveXAxisTooltip",value:function(e){var r=this.w,n=this.ttCtx;if(n.xaxisTooltip!==null&&n.xcrosshairsWidth!==0){n.xaxisTooltip.classList.add("apexcharts-active");var a=n.xaxisOffY+r.config.xaxis.tooltip.offsetY+r.globals.translateY+1+r.config.xaxis.offsetY;if(e-=n.xaxisTooltip.getBoundingClientRect().width/2,!isNaN(e)){e+=r.globals.translateX;var s;s=new ge(this.ctx).getTextRects(n.xaxisTooltipText.innerHTML),n.xaxisTooltipText.style.minWidth=s.width+"px",n.xaxisTooltip.style.left=e+"px",n.xaxisTooltip.style.top=a+"px"}}}},{key:"moveYAxisTooltip",value:function(e){var r=this.w,n=this.ttCtx;n.yaxisTTEls===null&&(n.yaxisTTEls=r.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var a=parseInt(n.ycrosshairsHidden.getAttribute("y1"),10),s=r.globals.translateY+a,o=n.yaxisTTEls[e].getBoundingClientRect(),l=o.height,c=r.globals.translateYAxisX[e]-2;r.config.yaxis[e].opposite&&(c-=o.width),s-=l/2,r.globals.ignoreYAxisIndexes.indexOf(e)===-1&&s>0&&s<r.globals.gridHeight?(n.yaxisTTEls[e].classList.add("apexcharts-active"),n.yaxisTTEls[e].style.top=s+"px",n.yaxisTTEls[e].style.left=c+r.config.yaxis[e].tooltip.offsetX+"px"):n.yaxisTTEls[e].classList.remove("apexcharts-active")}},{key:"moveTooltip",value:function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,a=this.w,s=this.ttCtx,o=s.getElTooltip(),l=s.tooltipRect,c=n!==null?parseFloat(n):1,u=parseFloat(e)+c+5,h=parseFloat(r)+c/2;if(u>a.globals.gridWidth/2&&(u=u-l.ttWidth-c-10),u>a.globals.gridWidth-l.ttWidth-10&&(u=a.globals.gridWidth-l.ttWidth),u<-20&&(u=-20),a.config.tooltip.followCursor){var p=s.getElGrid().getBoundingClientRect();(u=s.e.clientX-p.left)>a.globals.gridWidth/2&&(u-=s.tooltipRect.ttWidth),(h=s.e.clientY+a.globals.translateY-p.top)>a.globals.gridHeight/2&&(h-=s.tooltipRect.ttHeight)}else a.globals.isBarHorizontal||l.ttHeight/2+h>a.globals.gridHeight&&(h=a.globals.gridHeight-l.ttHeight+a.globals.translateY);isNaN(u)||(u+=a.globals.translateX,o.style.left=u+"px",o.style.top=h+"px")}},{key:"moveMarkers",value:function(e,r){var n=this.w,a=this.ttCtx;if(n.globals.markers.size[e]>0)for(var s=n.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(e,"'] .apexcharts-marker")),o=0;o<s.length;o++)parseInt(s[o].getAttribute("rel"),10)===r&&(a.marker.resetPointsSize(),a.marker.enlargeCurrentPoint(r,s[o]));else a.marker.resetPointsSize(),this.moveDynamicPointOnHover(r,e)}},{key:"moveDynamicPointOnHover",value:function(e,r){var n,a,s,o,l=this.w,c=this.ttCtx,u=new ge(this.ctx),h=l.globals.pointsArray,p=c.tooltipUtil.getHoverMarkerSize(r),m=l.config.series[r].type;if(!m||m!=="column"&&m!=="candlestick"&&m!=="boxPlot"){s=(n=h[r][e])===null||n===void 0?void 0:n[0],o=((a=h[r][e])===null||a===void 0?void 0:a[1])||0;var x=l.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(r,"'] .apexcharts-series-markers path"));if(x&&o<l.globals.gridHeight&&o>0){var y=x.getAttribute("shape"),b=u.getMarkerPath(s,o,y,1.5*p);x.setAttribute("d",b)}this.moveXCrosshairs(s),c.fixedTooltip||this.moveTooltip(s,o,p)}}},{key:"moveDynamicPointsOnHover",value:function(e){var r,n=this.ttCtx,a=n.w,s=0,o=0,l=a.globals.pointsArray,c=new Ra(this.ctx),u=new ge(this.ctx);r=c.getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);var h=n.tooltipUtil.getHoverMarkerSize(r);if(l[r]&&(s=l[r][e][0],o=l[r][e][1]),!isNaN(s)){var p=n.tooltipUtil.getAllMarkers();if(p.length)for(var m=0;m<a.globals.series.length;m++){var x=l[m];if(a.globals.comboCharts&&x===void 0&&p.splice(m,0,null),x&&x.length){var y=l[m][e][1],b=void 0;p[m].setAttribute("cx",s);var w=p[m].getAttribute("shape");if(a.config.chart.type==="rangeArea"&&!a.globals.comboCharts){var N=e+a.globals.series[m].length;b=l[m][N][1],y-=Math.abs(y-b)/2}if(y!==null&&!isNaN(y)&&y<a.globals.gridHeight+h&&y+h>0){var A=u.getMarkerPath(s,y,w,h);p[m].setAttribute("d",A)}else p[m].setAttribute("d","")}}this.moveXCrosshairs(s),n.fixedTooltip||this.moveTooltip(s,o||a.globals.gridHeight,h)}}},{key:"moveStickyTooltipOverBars",value:function(e,r){var n=this.w,a=this.ttCtx,s=n.globals.columnSeries?n.globals.columnSeries.length:n.globals.series.length;n.config.chart.stacked&&(s=n.globals.barGroups.length);var o=s>=2&&s%2==0?Math.floor(s/2):Math.floor(s/2)+1;n.globals.isBarHorizontal&&(o=new Ra(this.ctx).getActiveConfigSeriesIndex("desc")+1);var l=n.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(o,"'] path[j='").concat(e,"'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(o,"'] path[j='").concat(e,"'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(o,"'] path[j='").concat(e,"'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(o,"'] path[j='").concat(e,"']"));l||typeof r!="number"||(l=n.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[data\\:realIndex='".concat(r,"'] path[j='").concat(e,`'],
.apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='`).concat(r,"'] path[j='").concat(e,`'],
.apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='`).concat(r,"'] path[j='").concat(e,`'],
.apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='`).concat(r,"'] path[j='").concat(e,"']")));var c=l?parseFloat(l.getAttribute("cx")):0,u=l?parseFloat(l.getAttribute("cy")):0,h=l?parseFloat(l.getAttribute("barWidth")):0,p=a.getElGrid().getBoundingClientRect(),m=l&&(l.classList.contains("apexcharts-candlestick-area")||l.classList.contains("apexcharts-boxPlot-area"));n.globals.isXNumeric?(l&&!m&&(c-=s%2!=0?h/2:0),l&&m&&(c-=h/2)):n.globals.isBarHorizontal||(c=a.xAxisTicksPositions[e-1]+a.dataPointsDividedWidth/2,isNaN(c)&&(c=a.xAxisTicksPositions[e]-a.dataPointsDividedWidth/2)),n.globals.isBarHorizontal?u-=a.tooltipRect.ttHeight:n.config.tooltip.followCursor?u=a.e.clientY-p.top-a.tooltipRect.ttHeight/2:u+a.tooltipRect.ttHeight+15>n.globals.gridHeight&&(u=n.globals.gridHeight),n.globals.isBarHorizontal||this.moveXCrosshairs(c),a.fixedTooltip||this.moveTooltip(c,u||n.globals.gridHeight)}}]),t}(),dK=function(){function t(e){Se(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx,this.tooltipPosition=new uR(e)}return Ae(t,[{key:"drawDynamicPoints",value:function(){var e=this.w,r=new ge(this.ctx),n=new Fd(this.ctx),a=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series");a=Nr(a),e.config.chart.stacked&&a.sort(function(p,m){return parseFloat(p.getAttribute("data:realIndex"))-parseFloat(m.getAttribute("data:realIndex"))});for(var s=0;s<a.length;s++){var o=a[s].querySelector(".apexcharts-series-markers-wrap");if(o!==null){var l=void 0,c="apexcharts-marker w".concat((Math.random()+1).toString(36).substring(4));e.config.chart.type!=="line"&&e.config.chart.type!=="area"||e.globals.comboCharts||e.config.tooltip.intersect||(c+=" no-pointer-events");var u=n.getMarkerConfig({cssClass:c,seriesIndex:Number(o.getAttribute("data:realIndex"))});(l=r.drawMarker(0,0,u)).node.setAttribute("default-marker-size",0);var h=document.createElementNS(e.globals.SVGNS,"g");h.classList.add("apexcharts-series-markers"),h.appendChild(l.node),o.appendChild(h)}}}},{key:"enlargeCurrentPoint",value:function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,s=this.w;s.config.chart.type!=="bubble"&&this.newPointSize(e,r);var o=r.getAttribute("cx"),l=r.getAttribute("cy");if(n!==null&&a!==null&&(o=n,l=a),this.tooltipPosition.moveXCrosshairs(o),!this.fixedTooltip){if(s.config.chart.type==="radar"){var c=this.ttCtx.getElGrid().getBoundingClientRect();o=this.ttCtx.e.clientX-c.left}this.tooltipPosition.moveTooltip(o,l,s.config.markers.hover.size)}}},{key:"enlargePoints",value:function(e){for(var r=this.w,n=this,a=this.ttCtx,s=e,o=r.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),l=r.config.markers.hover.size,c=0;c<o.length;c++){var u=o[c].getAttribute("rel"),h=o[c].getAttribute("index");if(l===void 0&&(l=r.globals.markers.size[h]+r.config.markers.hover.sizeOffset),s===parseInt(u,10)){n.newPointSize(s,o[c]);var p=o[c].getAttribute("cx"),m=o[c].getAttribute("cy");n.tooltipPosition.moveXCrosshairs(p),a.fixedTooltip||n.tooltipPosition.moveTooltip(p,m,l)}else n.oldPointSize(o[c])}}},{key:"newPointSize",value:function(e,r){var n=this.w,a=n.config.markers.hover.size,s=e===0?r.parentNode.firstChild:r.parentNode.lastChild;if(s.getAttribute("default-marker-size")!=="0"){var o=parseInt(s.getAttribute("index"),10);a===void 0&&(a=n.globals.markers.size[o]+n.config.markers.hover.sizeOffset),a<0&&(a=0);var l=this.ttCtx.tooltipUtil.getPathFromPoint(r,a);r.setAttribute("d",l)}}},{key:"oldPointSize",value:function(e){var r=parseFloat(e.getAttribute("default-marker-size")),n=this.ttCtx.tooltipUtil.getPathFromPoint(e,r);e.setAttribute("d",n)}},{key:"resetPointsSize",value:function(){for(var e=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),r=0;r<e.length;r++){var n=parseFloat(e[r].getAttribute("default-marker-size"));if(J.isNumber(n)&&n>0){var a=this.ttCtx.tooltipUtil.getPathFromPoint(e[r],n);e[r].setAttribute("d",a)}else e[r].setAttribute("d","M0,0")}}}]),t}(),uK=function(){function t(e){Se(this,t),this.w=e.w;var r=this.w;this.ttCtx=e,this.isVerticalGroupedRangeBar=!r.globals.isBarHorizontal&&r.config.chart.type==="rangeBar"&&r.config.plotOptions.bar.rangeBarGroupRows}return Ae(t,[{key:"getAttr",value:function(e,r){return parseFloat(e.target.getAttribute(r))}},{key:"handleHeatTreeTooltip",value:function(e){var r=e.e,n=e.opt,a=e.x,s=e.y,o=e.type,l=this.ttCtx,c=this.w;if(r.target.classList.contains("apexcharts-".concat(o,"-rect"))){var u=this.getAttr(r,"i"),h=this.getAttr(r,"j"),p=this.getAttr(r,"cx"),m=this.getAttr(r,"cy"),x=this.getAttr(r,"width"),y=this.getAttr(r,"height");if(l.tooltipLabels.drawSeriesTexts({ttItems:n.ttItems,i:u,j:h,shared:!1,e:r}),c.globals.capturedSeriesIndex=u,c.globals.capturedDataPointIndex=h,a=p+l.tooltipRect.ttWidth/2+x,s=m+l.tooltipRect.ttHeight/2-y/2,l.tooltipPosition.moveXCrosshairs(p+x/2),a>c.globals.gridWidth/2&&(a=p-l.tooltipRect.ttWidth/2+x),l.w.config.tooltip.followCursor){var b=c.globals.dom.elWrap.getBoundingClientRect();a=c.globals.clientX-b.left-(a>c.globals.gridWidth/2?l.tooltipRect.ttWidth:0),s=c.globals.clientY-b.top-(s>c.globals.gridHeight/2?l.tooltipRect.ttHeight:0)}}return{x:a,y:s}}},{key:"handleMarkerTooltip",value:function(e){var r,n,a=e.e,s=e.opt,o=e.x,l=e.y,c=this.w,u=this.ttCtx;if(a.target.classList.contains("apexcharts-marker")){var h=parseInt(s.paths.getAttribute("cx"),10),p=parseInt(s.paths.getAttribute("cy"),10),m=parseFloat(s.paths.getAttribute("val"));if(n=parseInt(s.paths.getAttribute("rel"),10),r=parseInt(s.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,u.intersect){var x=J.findAncestor(s.paths,"apexcharts-series");x&&(r=parseInt(x.getAttribute("data:realIndex"),10))}if(u.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:r,j:n,shared:!u.showOnIntersect&&c.config.tooltip.shared,e:a}),a.type==="mouseup"&&u.markerClick(a,r,n),c.globals.capturedSeriesIndex=r,c.globals.capturedDataPointIndex=n,o=h,l=p+c.globals.translateY-1.4*u.tooltipRect.ttHeight,u.w.config.tooltip.followCursor){var y=u.getElGrid().getBoundingClientRect();l=u.e.clientY+c.globals.translateY-y.top}m<0&&(l=p),u.marker.enlargeCurrentPoint(n,s.paths,o,l)}return{x:o,y:l}}},{key:"handleBarTooltip",value:function(e){var r,n,a=e.e,s=e.opt,o=this.w,l=this.ttCtx,c=l.getElTooltip(),u=0,h=0,p=0,m=this.getBarTooltipXY({e:a,opt:s});if(m.j!==null||m.barHeight!==0||m.barWidth!==0){r=m.i;var x=m.j;if(o.globals.capturedSeriesIndex=r,o.globals.capturedDataPointIndex=x,o.globals.isBarHorizontal&&l.tooltipUtil.hasBars()||!o.config.tooltip.shared?(h=m.x,p=m.y,n=Array.isArray(o.config.stroke.width)?o.config.stroke.width[r]:o.config.stroke.width,u=h):o.globals.comboCharts||o.config.tooltip.shared||(u/=2),isNaN(p)&&(p=o.globals.svgHeight-l.tooltipRect.ttHeight),parseInt(s.paths.parentNode.getAttribute("data:realIndex"),10),h+l.tooltipRect.ttWidth>o.globals.gridWidth?h-=l.tooltipRect.ttWidth:h<0&&(h=0),l.w.config.tooltip.followCursor){var y=l.getElGrid().getBoundingClientRect();p=l.e.clientY-y.top}l.tooltip===null&&(l.tooltip=o.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),o.config.tooltip.shared||(o.globals.comboBarCount>0?l.tooltipPosition.moveXCrosshairs(u+n/2):l.tooltipPosition.moveXCrosshairs(u)),!l.fixedTooltip&&(!o.config.tooltip.shared||o.globals.isBarHorizontal&&l.tooltipUtil.hasBars())&&(p=p+o.globals.translateY-l.tooltipRect.ttHeight/2,c.style.left=h+o.globals.translateX+"px",c.style.top=p+"px")}}},{key:"getBarTooltipXY",value:function(e){var r=this,n=e.e,a=e.opt,s=this.w,o=null,l=this.ttCtx,c=0,u=0,h=0,p=0,m=0,x=n.target.classList;if(x.contains("apexcharts-bar-area")||x.contains("apexcharts-candlestick-area")||x.contains("apexcharts-boxPlot-area")||x.contains("apexcharts-rangebar-area")){var y=n.target,b=y.getBoundingClientRect(),w=a.elGrid.getBoundingClientRect(),N=b.height;m=b.height;var A=b.width,S=parseInt(y.getAttribute("cx"),10),C=parseInt(y.getAttribute("cy"),10);p=parseFloat(y.getAttribute("barWidth"));var k=n.type==="touchmove"?n.touches[0].clientX:n.clientX;o=parseInt(y.getAttribute("j"),10),c=parseInt(y.parentNode.getAttribute("rel"),10)-1;var T=y.getAttribute("data-range-y1"),E=y.getAttribute("data-range-y2");s.globals.comboCharts&&(c=parseInt(y.parentNode.getAttribute("data:realIndex"),10));var _=function(P){return s.globals.isXNumeric?S-A/2:r.isVerticalGroupedRangeBar?S+A/2:S-l.dataPointsDividedWidth+A/2},L=function(){return C-l.dataPointsDividedHeight+N/2-l.tooltipRect.ttHeight/2};l.tooltipLabels.drawSeriesTexts({ttItems:a.ttItems,i:c,j:o,y1:T?parseInt(T,10):null,y2:E?parseInt(E,10):null,shared:!l.showOnIntersect&&s.config.tooltip.shared,e:n}),s.config.tooltip.followCursor?s.globals.isBarHorizontal?(u=k-w.left+15,h=L()):(u=_(),h=n.clientY-w.top-l.tooltipRect.ttHeight/2-15):s.globals.isBarHorizontal?((u=S)<l.xyRatios.baseLineInvertedY&&(u=S-l.tooltipRect.ttWidth),h=L()):(u=_(),h=C)}return{x:u,y:h,barHeight:m,barWidth:p,i:c,j:o}}}]),t}(),hK=function(){function t(e){Se(this,t),this.w=e.w,this.ttCtx=e}return Ae(t,[{key:"drawXaxisTooltip",value:function(){var e=this.w,r=this.ttCtx,n=e.config.xaxis.position==="bottom";r.xaxisOffY=n?e.globals.gridHeight+1:-e.globals.xAxisHeight-e.config.xaxis.axisTicks.height+3;var a=n?"apexcharts-xaxistooltip apexcharts-xaxistooltip-bottom":"apexcharts-xaxistooltip apexcharts-xaxistooltip-top",s=e.globals.dom.elWrap;r.isXAxisTooltipEnabled&&e.globals.dom.baseEl.querySelector(".apexcharts-xaxistooltip")===null&&(r.xaxisTooltip=document.createElement("div"),r.xaxisTooltip.setAttribute("class",a+" apexcharts-theme-"+e.config.tooltip.theme),s.appendChild(r.xaxisTooltip),r.xaxisTooltipText=document.createElement("div"),r.xaxisTooltipText.classList.add("apexcharts-xaxistooltip-text"),r.xaxisTooltipText.style.fontFamily=e.config.xaxis.tooltip.style.fontFamily||e.config.chart.fontFamily,r.xaxisTooltipText.style.fontSize=e.config.xaxis.tooltip.style.fontSize,r.xaxisTooltip.appendChild(r.xaxisTooltipText))}},{key:"drawYaxisTooltip",value:function(){for(var e=this.w,r=this.ttCtx,n=0;n<e.config.yaxis.length;n++){var a=e.config.yaxis[n].opposite||e.config.yaxis[n].crosshairs.opposite;r.yaxisOffX=a?e.globals.gridWidth+1:1;var s="apexcharts-yaxistooltip apexcharts-yaxistooltip-".concat(n,a?" apexcharts-yaxistooltip-right":" apexcharts-yaxistooltip-left"),o=e.globals.dom.elWrap;e.globals.dom.baseEl.querySelector(".apexcharts-yaxistooltip apexcharts-yaxistooltip-".concat(n))===null&&(r.yaxisTooltip=document.createElement("div"),r.yaxisTooltip.setAttribute("class",s+" apexcharts-theme-"+e.config.tooltip.theme),o.appendChild(r.yaxisTooltip),n===0&&(r.yaxisTooltipText=[]),r.yaxisTooltipText[n]=document.createElement("div"),r.yaxisTooltipText[n].classList.add("apexcharts-yaxistooltip-text"),r.yaxisTooltip.appendChild(r.yaxisTooltipText[n]))}}},{key:"setXCrosshairWidth",value:function(){var e=this.w,r=this.ttCtx,n=r.getElXCrosshairs();if(r.xcrosshairsWidth=parseInt(e.config.xaxis.crosshairs.width,10),e.globals.comboCharts){var a=e.globals.dom.baseEl.querySelector(".apexcharts-bar-area");if(a!==null&&e.config.xaxis.crosshairs.width==="barWidth"){var s=parseFloat(a.getAttribute("barWidth"));r.xcrosshairsWidth=s}else if(e.config.xaxis.crosshairs.width==="tickWidth"){var o=e.globals.labels.length;r.xcrosshairsWidth=e.globals.gridWidth/o}}else if(e.config.xaxis.crosshairs.width==="tickWidth"){var l=e.globals.labels.length;r.xcrosshairsWidth=e.globals.gridWidth/l}else if(e.config.xaxis.crosshairs.width==="barWidth"){var c=e.globals.dom.baseEl.querySelector(".apexcharts-bar-area");if(c!==null){var u=parseFloat(c.getAttribute("barWidth"));r.xcrosshairsWidth=u}else r.xcrosshairsWidth=1}e.globals.isBarHorizontal&&(r.xcrosshairsWidth=0),n!==null&&r.xcrosshairsWidth>0&&n.setAttribute("width",r.xcrosshairsWidth)}},{key:"handleYCrosshair",value:function(){var e=this.w,r=this.ttCtx;r.ycrosshairs=e.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),r.ycrosshairsHidden=e.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}},{key:"drawYaxisTooltipText",value:function(e,r,n){var a=this.ttCtx,s=this.w,o=s.globals,l=o.seriesYAxisMap[e];if(a.yaxisTooltips[e]&&l.length>0){var c=o.yLabelFormatters[e],u=a.getElGrid().getBoundingClientRect(),h=l[0],p=0;n.yRatio.length>1&&(p=h);var m=(r-u.top)*n.yRatio[p],x=o.maxYArr[h]-o.minYArr[h],y=o.minYArr[h]+(x-m);s.config.yaxis[e].reversed&&(y=o.maxYArr[h]-(x-m)),a.tooltipPosition.moveYCrosshairs(r-u.top),a.yaxisTooltipText[e].innerHTML=c(y),a.tooltipPosition.moveYAxisTooltip(e)}}}]),t}(),M6=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w;var r=this.w;this.tConfig=r.config.tooltip,this.tooltipUtil=new dR(this),this.tooltipLabels=new cK(this),this.tooltipPosition=new uR(this),this.marker=new dK(this),this.intersect=new uK(this),this.axesTooltip=new hK(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.xaxisTooltip=null,this.yaxisTTEls=null,this.isBarShared=!r.globals.isBarHorizontal&&this.tConfig.shared,this.lastHoverTime=Date.now()}return Ae(t,[{key:"getElTooltip",value:function(e){return e||(e=this),e.w.globals.dom.baseEl?e.w.globals.dom.baseEl.querySelector(".apexcharts-tooltip"):null}},{key:"getElXCrosshairs",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-xcrosshairs")}},{key:"getElGrid",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-grid")}},{key:"drawTooltip",value:function(e){var r=this.w;this.xyRatios=e,this.isXAxisTooltipEnabled=r.config.xaxis.tooltip.enabled&&r.globals.axisCharts,this.yaxisTooltips=r.config.yaxis.map(function(o,l){return!!(o.show&&o.tooltip.enabled&&r.globals.axisCharts)}),this.allTooltipSeriesGroups=[],r.globals.axisCharts||(this.showTooltipTitle=!1);var n=document.createElement("div");if(n.classList.add("apexcharts-tooltip"),r.config.tooltip.cssClass&&n.classList.add(r.config.tooltip.cssClass),n.classList.add("apexcharts-theme-".concat(this.tConfig.theme||"light")),r.globals.dom.elWrap.appendChild(n),r.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();var a=new ff(this.ctx);this.xAxisTicksPositions=a.getXAxisTicksPositions()}if(!r.globals.comboCharts&&!this.tConfig.intersect&&r.config.chart.type!=="rangeBar"||this.tConfig.shared||(this.showOnIntersect=!0),r.config.markers.size!==0&&r.globals.markers.largestSize!==0||this.marker.drawDynamicPoints(this),r.globals.collapsedSeries.length!==r.globals.series.length){this.dataPointsDividedHeight=r.globals.gridHeight/r.globals.dataPoints,this.dataPointsDividedWidth=r.globals.gridWidth/r.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||r.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,n.appendChild(this.tooltipTitle));var s=r.globals.series.length;(r.globals.xyCharts||r.globals.comboCharts)&&this.tConfig.shared&&(s=this.showOnIntersect?1:r.globals.series.length),this.legendLabels=r.globals.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(s),this.addSVGEvents()}}},{key:"createTTElements",value:function(e){for(var r=this,n=this.w,a=[],s=this.getElTooltip(),o=function(c){var u=document.createElement("div");u.classList.add("apexcharts-tooltip-series-group","apexcharts-tooltip-series-group-".concat(c)),u.style.order=n.config.tooltip.inverseOrder?e-c:c+1;var h=document.createElement("span");h.classList.add("apexcharts-tooltip-marker"),n.config.tooltip.fillSeriesColor?h.style.backgroundColor=n.globals.colors[c]:h.style.color=n.globals.colors[c];var p=n.config.markers.shape,m=p;Array.isArray(p)&&(m=p[c]),h.setAttribute("shape",m),u.appendChild(h);var x=document.createElement("div");x.classList.add("apexcharts-tooltip-text"),x.style.fontFamily=r.tConfig.style.fontFamily||n.config.chart.fontFamily,x.style.fontSize=r.tConfig.style.fontSize,["y","goals","z"].forEach(function(y){var b=document.createElement("div");b.classList.add("apexcharts-tooltip-".concat(y,"-group"));var w=document.createElement("span");w.classList.add("apexcharts-tooltip-text-".concat(y,"-label")),b.appendChild(w);var N=document.createElement("span");N.classList.add("apexcharts-tooltip-text-".concat(y,"-value")),b.appendChild(N),x.appendChild(b)}),u.appendChild(x),s.appendChild(u),a.push(u)},l=0;l<e;l++)o(l);return a}},{key:"addSVGEvents",value:function(){var e=this.w,r=e.config.chart.type,n=this.getElTooltip(),a=!(r!=="bar"&&r!=="candlestick"&&r!=="boxPlot"&&r!=="rangeBar"),s=r==="area"||r==="line"||r==="scatter"||r==="bubble"||r==="radar",o=e.globals.dom.Paper.node,l=this.getElGrid();l&&(this.seriesBound=l.getBoundingClientRect());var c,u=[],h=[],p={hoverArea:o,elGrid:l,tooltipEl:n,tooltipY:u,tooltipX:h,ttItems:this.ttItems};if(e.globals.axisCharts&&(s?c=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series[data\\:longestSeries='true'] .apexcharts-marker"):a?c=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-bar-area, .apexcharts-series .apexcharts-candlestick-area, .apexcharts-series .apexcharts-boxPlot-area, .apexcharts-series .apexcharts-rangebar-area"):r!=="heatmap"&&r!=="treemap"||(c=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-heatmap, .apexcharts-series .apexcharts-treemap")),c&&c.length))for(var m=0;m<c.length;m++)u.push(c[m].getAttribute("cy")),h.push(c[m].getAttribute("cx"));if(e.globals.xyCharts&&!this.showOnIntersect||e.globals.comboCharts&&!this.showOnIntersect||a&&this.tooltipUtil.hasBars()&&this.tConfig.shared)this.addPathsEventListeners([o],p);else if(a&&!e.globals.comboCharts||s&&this.showOnIntersect)this.addDatapointEventsListeners(p);else if(!e.globals.axisCharts||r==="heatmap"||r==="treemap"){var x=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series");this.addPathsEventListeners(x,p)}if(this.showOnIntersect){var y=e.globals.dom.baseEl.querySelectorAll(".apexcharts-line-series .apexcharts-marker, .apexcharts-area-series .apexcharts-marker");y.length>0&&this.addPathsEventListeners(y,p),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(p)}}},{key:"drawFixedTooltipRect",value:function(){var e=this.w,r=this.getElTooltip(),n=r.getBoundingClientRect(),a=n.width+10,s=n.height+10,o=this.tConfig.fixed.offsetX,l=this.tConfig.fixed.offsetY,c=this.tConfig.fixed.position.toLowerCase();return c.indexOf("right")>-1&&(o=o+e.globals.svgWidth-a+10),c.indexOf("bottom")>-1&&(l=l+e.globals.svgHeight-s-10),r.style.left=o+"px",r.style.top=l+"px",{x:o,y:l,ttWidth:a,ttHeight:s}}},{key:"addDatapointEventsListeners",value:function(e){var r=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(r,e)}},{key:"addPathsEventListeners",value:function(e,r){for(var n=this,a=function(o){var l={paths:e[o],tooltipEl:r.tooltipEl,tooltipY:r.tooltipY,tooltipX:r.tooltipX,elGrid:r.elGrid,hoverArea:r.hoverArea,ttItems:r.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map(function(c){return e[o].addEventListener(c,n.onSeriesHover.bind(n,l),{capture:!1,passive:!0})})},s=0;s<e.length;s++)a(s)}},{key:"onSeriesHover",value:function(e,r){var n=this,a=Date.now()-this.lastHoverTime;a>=20?this.seriesHover(e,r):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout(function(){n.seriesHover(e,r)},20-a))}},{key:"seriesHover",value:function(e,r){var n=this;this.lastHoverTime=Date.now();var a=[],s=this.w;s.config.chart.group&&(a=this.ctx.getGroupedCharts()),s.globals.axisCharts&&(s.globals.minX===-1/0&&s.globals.maxX===1/0||s.globals.dataPoints===0)||(a.length?a.forEach(function(o){var l=n.getElTooltip(o),c={paths:e.paths,tooltipEl:l,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:o.w.globals.tooltip.ttItems};o.w.globals.minX===n.w.globals.minX&&o.w.globals.maxX===n.w.globals.maxX&&o.w.globals.tooltip.seriesHoverByContext({chartCtx:o,ttCtx:o.w.globals.tooltip,opt:c,e:r})}):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:e,e:r}))}},{key:"seriesHoverByContext",value:function(e){var r=e.chartCtx,n=e.ttCtx,a=e.opt,s=e.e,o=r.w,l=this.getElTooltip(r);l&&(n.tooltipRect={x:0,y:0,ttWidth:l.getBoundingClientRect().width,ttHeight:l.getBoundingClientRect().height},n.e=s,n.tooltipUtil.hasBars()&&!o.globals.comboCharts&&!n.isBarShared&&this.tConfig.onDatasetHover.highlightDataSeries&&new Ra(r).toggleSeriesOnHover(s,s.target.parentNode),o.globals.axisCharts?n.axisChartsTooltips({e:s,opt:a,tooltipRect:n.tooltipRect}):n.nonAxisChartsTooltips({e:s,opt:a,tooltipRect:n.tooltipRect}),n.fixedTooltip&&n.drawFixedTooltipRect())}},{key:"axisChartsTooltips",value:function(e){var r,n,a=e.e,s=e.opt,o=this.w,l=s.elGrid.getBoundingClientRect(),c=a.type==="touchmove"?a.touches[0].clientX:a.clientX,u=a.type==="touchmove"?a.touches[0].clientY:a.clientY;if(this.clientY=u,this.clientX=c,o.globals.capturedSeriesIndex=-1,o.globals.capturedDataPointIndex=-1,u<l.top||u>l.top+l.height)this.handleMouseOut(s);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!o.config.tooltip.shared){var h=parseInt(s.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(h)<0)return void this.handleMouseOut(s)}var p=this.getElTooltip(),m=this.getElXCrosshairs(),x=[];o.config.chart.group&&(x=this.ctx.getSyncedCharts());var y=o.globals.xyCharts||o.config.chart.type==="bar"&&!o.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||o.globals.comboCharts&&this.tooltipUtil.hasBars();if(a.type==="mousemove"||a.type==="touchmove"||a.type==="mouseup"){if(o.globals.collapsedSeries.length+o.globals.ancillaryCollapsedSeries.length===o.globals.series.length)return;m!==null&&m.classList.add("apexcharts-active");var b=this.yaxisTooltips.filter(function(A){return A===!0});if(this.ycrosshairs!==null&&b.length&&this.ycrosshairs.classList.add("apexcharts-active"),y&&!this.showOnIntersect||x.length>1)this.handleStickyTooltip(a,c,u,s);else if(o.config.chart.type==="heatmap"||o.config.chart.type==="treemap"){var w=this.intersect.handleHeatTreeTooltip({e:a,opt:s,x:r,y:n,type:o.config.chart.type});r=w.x,n=w.y,p.style.left=r+"px",p.style.top=n+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:a,opt:s}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e:a,opt:s,x:r,y:n});if(this.yaxisTooltips.length)for(var N=0;N<o.config.yaxis.length;N++)this.axesTooltip.drawYaxisTooltipText(N,u,this.xyRatios);o.globals.dom.baseEl.classList.add("apexcharts-tooltip-active"),s.tooltipEl.classList.add("apexcharts-active")}else a.type!=="mouseout"&&a.type!=="touchend"||this.handleMouseOut(s)}}},{key:"nonAxisChartsTooltips",value:function(e){var r=e.e,n=e.opt,a=e.tooltipRect,s=this.w,o=n.paths.getAttribute("rel"),l=this.getElTooltip(),c=s.globals.dom.elWrap.getBoundingClientRect();if(r.type==="mousemove"||r.type==="touchmove"){s.globals.dom.baseEl.classList.add("apexcharts-tooltip-active"),l.classList.add("apexcharts-active"),this.tooltipLabels.drawSeriesTexts({ttItems:n.ttItems,i:parseInt(o,10)-1,shared:!1});var u=s.globals.clientX-c.left-a.ttWidth/2,h=s.globals.clientY-c.top-a.ttHeight-10;if(l.style.left=u+"px",l.style.top=h+"px",s.config.legend.tooltipHoverFormatter){var p=o-1,m=(0,s.config.legend.tooltipHoverFormatter)(this.legendLabels[p].getAttribute("data:default-text"),{seriesIndex:p,dataPointIndex:p,w:s});this.legendLabels[p].innerHTML=m}}else r.type!=="mouseout"&&r.type!=="touchend"||(l.classList.remove("apexcharts-active"),s.globals.dom.baseEl.classList.remove("apexcharts-tooltip-active"),s.config.legend.tooltipHoverFormatter&&this.legendLabels.forEach(function(x){var y=x.getAttribute("data:default-text");x.innerHTML=decodeURIComponent(y)}))}},{key:"handleStickyTooltip",value:function(e,r,n,a){var s=this.w,o=this.tooltipUtil.getNearestValues({context:this,hoverArea:a.hoverArea,elGrid:a.elGrid,clientX:r,clientY:n}),l=o.j,c=o.capturedSeries;s.globals.collapsedSeriesIndices.includes(c)&&(c=null);var u=a.elGrid.getBoundingClientRect();if(o.hoverX<0||o.hoverX>u.width)this.handleMouseOut(a);else if(c!==null)this.handleStickyCapturedSeries(e,c,a,l);else if(this.tooltipUtil.isXoverlap(l)||s.globals.isBarHorizontal){var h=s.globals.series.findIndex(function(p,m){return!s.globals.collapsedSeriesIndices.includes(m)});this.create(e,this,h,l,a.ttItems)}}},{key:"handleStickyCapturedSeries",value:function(e,r,n,a){var s=this.w;if(!this.tConfig.shared&&s.globals.series[r][a]===null)return void this.handleMouseOut(n);if(s.globals.series[r][a]!==void 0)this.tConfig.shared&&this.tooltipUtil.isXoverlap(a)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(e,this,r,a,n.ttItems):this.create(e,this,r,a,n.ttItems,!1);else if(this.tooltipUtil.isXoverlap(a)){var o=s.globals.series.findIndex(function(l,c){return!s.globals.collapsedSeriesIndices.includes(c)});this.create(e,this,o,a,n.ttItems)}}},{key:"deactivateHoverFilter",value:function(){for(var e=this.w,r=new ge(this.ctx),n=e.globals.dom.Paper.find(".apexcharts-bar-area"),a=0;a<n.length;a++)r.pathMouseLeave(n[a])}},{key:"handleMouseOut",value:function(e){var r=this.w,n=this.getElXCrosshairs();if(r.globals.dom.baseEl.classList.remove("apexcharts-tooltip-active"),e.tooltipEl.classList.remove("apexcharts-active"),this.deactivateHoverFilter(),r.config.chart.type!=="bubble"&&this.marker.resetPointsSize(),n!==null&&n.classList.remove("apexcharts-active"),this.ycrosshairs!==null&&this.ycrosshairs.classList.remove("apexcharts-active"),this.isXAxisTooltipEnabled&&this.xaxisTooltip.classList.remove("apexcharts-active"),this.yaxisTooltips.length){this.yaxisTTEls===null&&(this.yaxisTTEls=r.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));for(var a=0;a<this.yaxisTTEls.length;a++)this.yaxisTTEls[a].classList.remove("apexcharts-active")}r.config.legend.tooltipHoverFormatter&&this.legendLabels.forEach(function(s){var o=s.getAttribute("data:default-text");s.innerHTML=decodeURIComponent(o)})}},{key:"markerClick",value:function(e,r,n){var a=this.w;typeof a.config.chart.events.markerClick=="function"&&a.config.chart.events.markerClick(e,this.ctx,{seriesIndex:r,dataPointIndex:n,w:a}),this.ctx.events.fireEvent("markerClick",[e,this.ctx,{seriesIndex:r,dataPointIndex:n,w:a}])}},{key:"create",value:function(e,r,n,a,s){var o,l,c,u,h,p,m,x,y,b,w,N,A,S,C,k,T=arguments.length>5&&arguments[5]!==void 0?arguments[5]:null,E=this.w,_=r;e.type==="mouseup"&&this.markerClick(e,n,a),T===null&&(T=this.tConfig.shared);var L=this.tooltipUtil.hasMarkers(n),P=this.tooltipUtil.getElBars(),R=function(){E.globals.markers.largestSize>0?_.marker.enlargePoints(a):_.tooltipPosition.moveDynamicPointsOnHover(a)};if(E.config.legend.tooltipHoverFormatter){var z=E.config.legend.tooltipHoverFormatter,B=Array.from(this.legendLabels);B.forEach(function(K){var U=K.getAttribute("data:default-text");K.innerHTML=decodeURIComponent(U)});for(var Y=0;Y<B.length;Y++){var X=B[Y],H=parseInt(X.getAttribute("i"),10),W=decodeURIComponent(X.getAttribute("data:default-text")),V=z(W,{seriesIndex:T?H:n,dataPointIndex:a,w:E});if(T)X.innerHTML=E.globals.collapsedSeriesIndices.indexOf(H)<0?V:W;else if(X.innerHTML=H===n?V:W,n===H)break}}var Z=ve(ve({ttItems:s,i:n,j:a},((o=E.globals.seriesRange)===null||o===void 0||(l=o[n])===null||l===void 0||(c=l[a])===null||c===void 0||(u=c.y[0])===null||u===void 0?void 0:u.y1)!==void 0&&{y1:(h=E.globals.seriesRange)===null||h===void 0||(p=h[n])===null||p===void 0||(m=p[a])===null||m===void 0||(x=m.y[0])===null||x===void 0?void 0:x.y1}),((y=E.globals.seriesRange)===null||y===void 0||(b=y[n])===null||b===void 0||(w=b[a])===null||w===void 0||(N=w.y[0])===null||N===void 0?void 0:N.y2)!==void 0&&{y2:(A=E.globals.seriesRange)===null||A===void 0||(S=A[n])===null||S===void 0||(C=S[a])===null||C===void 0||(k=C.y[0])===null||k===void 0?void 0:k.y2});if(T){if(_.tooltipLabels.drawSeriesTexts(ve(ve({},Z),{},{shared:!this.showOnIntersect&&this.tConfig.shared})),L)R();else if(this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(P),this.barSeriesHeight>0)){var F=new ge(this.ctx),G=E.globals.dom.Paper.find(".apexcharts-bar-area[j='".concat(a,"']"));this.deactivateHoverFilter(),_.tooltipUtil.getAllMarkers(!0).length&&!this.barSeriesHeight&&R(),_.tooltipPosition.moveStickyTooltipOverBars(a,n);for(var te=0;te<G.length;te++)F.pathMouseEnter(G[te])}}else _.tooltipLabels.drawSeriesTexts(ve({shared:!1},Z)),this.tooltipUtil.hasBars()&&_.tooltipPosition.moveStickyTooltipOverBars(a,n),L&&_.tooltipPosition.moveMarkers(n,a)}}]),t}(),fK=function(){function t(e){Se(this,t),this.w=e.w,this.barCtx=e,this.totalFormatter=this.w.config.plotOptions.bar.dataLabels.total.formatter,this.totalFormatter||(this.totalFormatter=this.w.config.dataLabels.formatter)}return Ae(t,[{key:"handleBarDataLabels",value:function(e){var r,n,a=e.x,s=e.y,o=e.y1,l=e.y2,c=e.i,u=e.j,h=e.realIndex,p=e.columnGroupIndex,m=e.series,x=e.barHeight,y=e.barWidth,b=e.barXPosition,w=e.barYPosition,N=e.visibleSeries,A=this.w,S=new ge(this.barCtx.ctx),C=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[h]:this.barCtx.strokeWidth;A.globals.isXNumeric&&!A.globals.isBarHorizontal?(r=a+parseFloat(y*(N+1)),n=s+parseFloat(x*(N+1))-C):(r=a+parseFloat(y*N),n=s+parseFloat(x*N));var k,T=null,E=a,_=s,L={},P=A.config.dataLabels,R=this.barCtx.barOptions.dataLabels,z=this.barCtx.barOptions.dataLabels.total;w!==void 0&&this.barCtx.isRangeBar&&(n=w,_=w),b!==void 0&&this.barCtx.isVerticalGroupedRangeBar&&(r=b,E=b);var B=P.offsetX,Y=P.offsetY,X={width:0,height:0};if(A.config.dataLabels.enabled){var H=A.globals.series[c][u];X=S.getTextRects(A.config.dataLabels.formatter?A.config.dataLabels.formatter(H,ve(ve({},A),{},{seriesIndex:c,dataPointIndex:u,w:A})):A.globals.yLabelFormatters[0](H),parseFloat(P.style.fontSize))}var W={x:a,y:s,i:c,j:u,realIndex:h,columnGroupIndex:p,bcx:r,bcy:n,barHeight:x,barWidth:y,textRects:X,strokeWidth:C,dataLabelsX:E,dataLabelsY:_,dataLabelsConfig:P,barDataLabelsConfig:R,barTotalDataLabelsConfig:z,offX:B,offY:Y};return L=this.barCtx.isHorizontal?this.calculateBarsDataLabelsPosition(W):this.calculateColumnsDataLabelsPosition(W),k=this.drawCalculatedDataLabels({x:L.dataLabelsX,y:L.dataLabelsY,val:this.barCtx.isRangeBar?[o,l]:A.config.chart.stackType==="100%"?m[h][u]:A.globals.series[h][u],i:h,j:u,barWidth:y,barHeight:x,textRects:X,dataLabelsConfig:P}),A.config.chart.stacked&&z.enabled&&(T=this.drawTotalDataLabels({x:L.totalDataLabelsX,y:L.totalDataLabelsY,barWidth:y,barHeight:x,realIndex:h,textAnchor:L.totalDataLabelsAnchor,val:this.getStackedTotalDataLabel({realIndex:h,j:u}),dataLabelsConfig:P,barTotalDataLabelsConfig:z})),{dataLabelsPos:L,dataLabels:k,totalDataLabels:T}}},{key:"getStackedTotalDataLabel",value:function(e){var r=e.realIndex,n=e.j,a=this.w,s=this.barCtx.stackedSeriesTotals[n];return this.totalFormatter&&(s=this.totalFormatter(s,ve(ve({},a),{},{seriesIndex:r,dataPointIndex:n,w:a}))),s}},{key:"calculateColumnsDataLabelsPosition",value:function(e){var r=this,n=this.w,a=e.i,s=e.j,o=e.realIndex;e.columnGroupIndex;var l,c,u=e.y,h=e.bcx,p=e.barWidth,m=e.barHeight,x=e.textRects,y=e.dataLabelsX,b=e.dataLabelsY,w=e.dataLabelsConfig,N=e.barDataLabelsConfig,A=e.barTotalDataLabelsConfig,S=e.strokeWidth,C=e.offX,k=e.offY,T=h;m=Math.abs(m);var E=n.config.plotOptions.bar.dataLabels.orientation==="vertical",_=this.barCtx.barHelpers.getZeroValueEncounters({i:a,j:s}).zeroEncounters;h-=S/2;var L=n.globals.gridWidth/n.globals.dataPoints;this.barCtx.isVerticalGroupedRangeBar?y+=p/2:(y=n.globals.isXNumeric?h-p/2+C:h-L+p/2+C,!n.config.chart.stacked&&_>0&&n.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(y-=p*_)),E&&(y=y+x.height/2-S/2-2);var P=n.globals.series[a][s]<0,R=u;switch(this.barCtx.isReversed&&(R=u+(P?m:-m)),N.position){case"center":b=E?P?R-m/2+k:R+m/2-k:P?R-m/2+x.height/2+k:R+m/2+x.height/2-k;break;case"bottom":b=E?P?R-m+k:R+m-k:P?R-m+x.height+S+k:R+m-x.height/2+S-k;break;case"top":b=E?P?R+k:R-k:P?R-x.height/2-k:R+x.height+k}var z=R;if(n.globals.seriesGroups.forEach(function(X){var H;(H=r.barCtx[X.join(",")])===null||H===void 0||H.prevY.forEach(function(W){z=P?Math.max(W[s],z):Math.min(W[s],z)})}),this.barCtx.lastActiveBarSerieIndex===o&&A.enabled){var B=new ge(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:o,j:s}),w.fontSize);l=P?z-B.height/2-k-A.offsetY+18:z+B.height+k+A.offsetY-18;var Y=L;c=T+(n.globals.isXNumeric?-p*n.globals.barGroups.length/2:n.globals.barGroups.length*p/2-(n.globals.barGroups.length-1)*p-Y)+A.offsetX}return n.config.chart.stacked||(b<0?b=0+S:b+x.height/3>n.globals.gridHeight&&(b=n.globals.gridHeight-S)),{bcx:h,bcy:u,dataLabelsX:y,dataLabelsY:b,totalDataLabelsX:c,totalDataLabelsY:l,totalDataLabelsAnchor:"middle"}}},{key:"calculateBarsDataLabelsPosition",value:function(e){var r=this,n=this.w,a=e.x,s=e.i,o=e.j,l=e.realIndex,c=e.bcy,u=e.barHeight,h=e.barWidth,p=e.textRects,m=e.dataLabelsX,x=e.strokeWidth,y=e.dataLabelsConfig,b=e.barDataLabelsConfig,w=e.barTotalDataLabelsConfig,N=e.offX,A=e.offY,S=n.globals.gridHeight/n.globals.dataPoints,C=this.barCtx.barHelpers.getZeroValueEncounters({i:s,j:o}).zeroEncounters;h=Math.abs(h);var k,T,E=c-(this.barCtx.isRangeBar?0:S)+u/2+p.height/2+A-3;!n.config.chart.stacked&&C>0&&n.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(E-=u*C);var _="start",L=n.globals.series[s][o]<0,P=a;switch(this.barCtx.isReversed&&(P=a+(L?-h:h),_=L?"start":"end"),b.position){case"center":m=L?P+h/2-N:Math.max(p.width/2,P-h/2)+N;break;case"bottom":m=L?P+h-x-N:P-h+x+N;break;case"top":m=L?P-x-N:P-x+N}var R=P;if(n.globals.seriesGroups.forEach(function(B){var Y;(Y=r.barCtx[B.join(",")])===null||Y===void 0||Y.prevX.forEach(function(X){R=L?Math.min(X[o],R):Math.max(X[o],R)})}),this.barCtx.lastActiveBarSerieIndex===l&&w.enabled){var z=new ge(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:l,j:o}),y.fontSize);L?(k=R-x-N-w.offsetX,_="end"):k=R+N+w.offsetX+(this.barCtx.isReversed?-(h+x):x),T=E-p.height/2+z.height/2+w.offsetY+x,n.globals.barGroups.length>1&&(T-=n.globals.barGroups.length/2*(u/2))}return n.config.chart.stacked||(y.textAnchor==="start"?m-p.width<0?m=L?p.width+x:x:m+p.width>n.globals.gridWidth&&(m=L?n.globals.gridWidth-x:n.globals.gridWidth-p.width-x):y.textAnchor==="middle"?m-p.width/2<0?m=p.width/2+x:m+p.width/2>n.globals.gridWidth&&(m=n.globals.gridWidth-p.width/2-x):y.textAnchor==="end"&&(m<1?m=p.width+x:m+1>n.globals.gridWidth&&(m=n.globals.gridWidth-p.width-x))),{bcx:a,bcy:c,dataLabelsX:m,dataLabelsY:E,totalDataLabelsX:k,totalDataLabelsY:T,totalDataLabelsAnchor:_}}},{key:"drawCalculatedDataLabels",value:function(e){var r=e.x,n=e.y,a=e.val,s=e.i,o=e.j,l=e.textRects,c=e.barHeight,u=e.barWidth,h=e.dataLabelsConfig,p=this.w,m="rotate(0)";p.config.plotOptions.bar.dataLabels.orientation==="vertical"&&(m="rotate(-90, ".concat(r,", ").concat(n,")"));var x=new gd(this.barCtx.ctx),y=new ge(this.barCtx.ctx),b=h.formatter,w=null,N=p.globals.collapsedSeriesIndices.indexOf(s)>-1;if(h.enabled&&!N){w=y.group({class:"apexcharts-data-labels",transform:m});var A="";a!==void 0&&(A=b(a,ve(ve({},p),{},{seriesIndex:s,dataPointIndex:o,w:p}))),!a&&p.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(A="");var S=p.globals.series[s][o]<0,C=p.config.plotOptions.bar.dataLabels.position;p.config.plotOptions.bar.dataLabels.orientation==="vertical"&&(C==="top"&&(h.textAnchor=S?"end":"start"),C==="center"&&(h.textAnchor="middle"),C==="bottom"&&(h.textAnchor=S?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&u<y.getTextRects(A,parseFloat(h.style.fontSize)).width&&(A=""),p.config.chart.stacked&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&(this.barCtx.isHorizontal?l.width/1.6>Math.abs(u)&&(A=""):l.height/1.6>Math.abs(c)&&(A=""));var k=ve({},h);this.barCtx.isHorizontal&&a<0&&(h.textAnchor==="start"?k.textAnchor="end":h.textAnchor==="end"&&(k.textAnchor="start")),x.plotDataLabelsText({x:r,y:n,text:A,i:s,j:o,parent:w,dataLabelsConfig:k,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return w}},{key:"drawTotalDataLabels",value:function(e){var r=e.x,n=e.y,a=e.val,s=e.realIndex,o=e.textAnchor,l=e.barTotalDataLabelsConfig;this.w;var c,u=new ge(this.barCtx.ctx);return l.enabled&&r!==void 0&&n!==void 0&&this.barCtx.lastActiveBarSerieIndex===s&&(c=u.drawText({x:r,y:n,foreColor:l.style.color,text:a,textAnchor:o,fontFamily:l.style.fontFamily,fontSize:l.style.fontSize,fontWeight:l.style.fontWeight})),c}}]),t}(),pK=function(){function t(e){Se(this,t),this.w=e.w,this.barCtx=e}return Ae(t,[{key:"initVariables",value:function(e){var r=this.w;this.barCtx.series=e,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(var n=0;n<e.length;n++)if(e[n].length>0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=e[n].length),r.globals.isXNumeric)for(var a=0;a<e[n].length;a++)r.globals.seriesX[n][a]>r.globals.minX&&r.globals.seriesX[n][a]<r.globals.maxX&&this.barCtx.visibleItems++;else this.barCtx.visibleItems=r.globals.dataPoints;this.arrBorderRadius=this.createBorderRadiusArr(r.globals.series),J.isSafari()&&(this.arrBorderRadius=this.arrBorderRadius.map(function(s){return s.map(function(o){return"none"})})),this.barCtx.seriesLen===0&&(this.barCtx.seriesLen=1),this.barCtx.zeroSerieses=[],r.globals.comboCharts||this.checkZeroSeries({series:e})}},{key:"initialPositions",value:function(e){var r,n,a,s,o,l,c,u,h=this.w,p=h.globals.dataPoints;this.barCtx.isRangeBar&&(p=h.globals.labels.length);var m=this.barCtx.seriesLen;if(h.config.plotOptions.bar.rangeBarGroupRows&&(m=1),this.barCtx.isHorizontal)o=(a=h.globals.gridHeight/p)/m,h.globals.isXNumeric&&(o=(a=h.globals.gridHeight/this.barCtx.totalItems)/this.barCtx.seriesLen),o=o*parseInt(this.barCtx.barOptions.barHeight,10)/100,String(this.barCtx.barOptions.barHeight).indexOf("%")===-1&&(o=parseInt(this.barCtx.barOptions.barHeight,10)),u=this.barCtx.baseLineInvertedY+h.globals.padHorizontal+(this.barCtx.isReversed?h.globals.gridWidth:0)-(this.barCtx.isReversed?2*this.barCtx.baseLineInvertedY:0),this.barCtx.isFunnel&&(u=h.globals.gridWidth/2),n=(a-o*this.barCtx.seriesLen)/2;else{if(s=h.globals.gridWidth/this.barCtx.visibleItems,h.config.xaxis.convertedCatToNumeric&&(s=h.globals.gridWidth/h.globals.dataPoints),l=s/m*parseInt(this.barCtx.barOptions.columnWidth,10)/100,h.globals.isXNumeric){var x=this.barCtx.xRatio;h.globals.minXDiff&&h.globals.minXDiff!==.5&&h.globals.minXDiff/x>0&&(s=h.globals.minXDiff/x),(l=s/m*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(l=1)}String(this.barCtx.barOptions.columnWidth).indexOf("%")===-1&&(l=parseInt(this.barCtx.barOptions.columnWidth,10)),c=h.globals.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?h.globals.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.translationsIndex]:0),h.globals.isXNumeric?r=this.barCtx.getBarXForNumericXAxis({x:r,j:0,realIndex:e,barWidth:l}).x:r=h.globals.padHorizontal+J.noExponents(s-l*this.barCtx.seriesLen)/2}return h.globals.barHeight=o,h.globals.barWidth=l,{x:r,y:n,yDivision:a,xDivision:s,barHeight:o,barWidth:l,zeroH:c,zeroW:u}}},{key:"initializeStackedPrevVars",value:function(e){e.w.globals.seriesGroups.forEach(function(r){e[r]||(e[r]={}),e[r].prevY=[],e[r].prevX=[],e[r].prevYF=[],e[r].prevXF=[],e[r].prevYVal=[],e[r].prevXVal=[]})}},{key:"initializeStackedXYVars",value:function(e){e.w.globals.seriesGroups.forEach(function(r){e[r]||(e[r]={}),e[r].xArrj=[],e[r].xArrjF=[],e[r].xArrjVal=[],e[r].yArrj=[],e[r].yArrjF=[],e[r].yArrjVal=[]})}},{key:"getPathFillColor",value:function(e,r,n,a){var s,o,l,c,u=this.w,h=this.barCtx.ctx.fill,p=null,m=this.barCtx.barOptions.distributed?n:r,x=!1;return this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map(function(y){e[r][n]>=y.from&&e[r][n]<=y.to&&(p=y.color,x=!0)}),{color:h.fillPath({seriesNumber:this.barCtx.barOptions.distributed?m:a,dataPointIndex:n,color:p,value:e[r][n],fillConfig:(s=u.config.series[r].data[n])===null||s===void 0?void 0:s.fill,fillType:(o=u.config.series[r].data[n])!==null&&o!==void 0&&(l=o.fill)!==null&&l!==void 0&&l.type?(c=u.config.series[r].data[n])===null||c===void 0?void 0:c.fill.type:Array.isArray(u.config.fill.type)?u.config.fill.type[a]:u.config.fill.type}),useRangeColor:x}}},{key:"getStrokeWidth",value:function(e,r,n){var a=0,s=this.w;return this.barCtx.series[e][r]===void 0||this.barCtx.series[e][r]===null?this.barCtx.isNullValue=!0:this.barCtx.isNullValue=!1,s.config.stroke.show&&(this.barCtx.isNullValue||(a=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[n]:this.barCtx.strokeWidth)),a}},{key:"createBorderRadiusArr",value:function(e){var r,n=this.w,a=!this.w.config.chart.stacked||n.config.plotOptions.bar.borderRadius<=0,s=e.length,o=0|((r=e[0])===null||r===void 0?void 0:r.length),l=Array.from({length:s},function(){return Array(o).fill(a?"top":"none")});if(a)return l;for(var c=0;c<o;c++){for(var u=[],h=[],p=0,m=0;m<s;m++){var x=e[m][c];x>0?(u.push(m),p++):x<0&&(h.push(m),p++)}if(u.length>0&&h.length===0)if(u.length===1)l[u[0]][c]="both";else{var y,b=u[0],w=u[u.length-1],N=Nh(u);try{for(N.s();!(y=N.n()).done;){var A=y.value;l[A][c]=A===b?"bottom":A===w?"top":"none"}}catch(H){N.e(H)}finally{N.f()}}else if(h.length>0&&u.length===0)if(h.length===1)l[h[0]][c]="both";else{var S,C=Math.max.apply(Math,h),k=Math.min.apply(Math,h),T=Nh(h);try{for(T.s();!(S=T.n()).done;){var E=S.value;l[E][c]=E===C?"bottom":E===k?"top":"none"}}catch(H){T.e(H)}finally{T.f()}}else if(u.length>0&&h.length>0){var _,L=u[u.length-1],P=Nh(u);try{for(P.s();!(_=P.n()).done;){var R=_.value;l[R][c]=R===L?"top":"none"}}catch(H){P.e(H)}finally{P.f()}var z,B=Math.max.apply(Math,h),Y=Nh(h);try{for(Y.s();!(z=Y.n()).done;){var X=z.value;l[X][c]=X===B?"bottom":"none"}}catch(H){Y.e(H)}finally{Y.f()}}else p===1&&(l[u[0]||h[0]][c]="both")}return l}},{key:"barBackground",value:function(e){var r=e.j,n=e.i,a=e.x1,s=e.x2,o=e.y1,l=e.y2,c=e.elSeries,u=this.w,h=new ge(this.barCtx.ctx),p=new Ra(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&p===n){r>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(r%=this.barCtx.barOptions.colors.backgroundBarColors.length);var m=this.barCtx.barOptions.colors.backgroundBarColors[r],x=h.drawRect(a!==void 0?a:0,o!==void 0?o:0,s!==void 0?s:u.globals.gridWidth,l!==void 0?l:u.globals.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,m,this.barCtx.barOptions.colors.backgroundBarOpacity);c.add(x),x.node.classList.add("apexcharts-backgroundBar")}}},{key:"getColumnPaths",value:function(e){var r,n=e.barWidth,a=e.barXPosition,s=e.y1,o=e.y2,l=e.strokeWidth,c=e.isReversed,u=e.series,h=e.seriesGroup,p=e.realIndex,m=e.i,x=e.j,y=e.w,b=new ge(this.barCtx.ctx);(l=Array.isArray(l)?l[p]:l)||(l=0);var w=n,N=a;(r=y.config.series[p].data[x])!==null&&r!==void 0&&r.columnWidthOffset&&(N=a-y.config.series[p].data[x].columnWidthOffset/2,w=n+y.config.series[p].data[x].columnWidthOffset);var A=l/2,S=N+A,C=N+w-A,k=(u[m][x]>=0?1:-1)*(c?-1:1);s+=.001-A*k,o+=.001+A*k;var T=b.move(S,s),E=b.move(S,s),_=b.line(C,s);if(y.globals.previousPaths.length>0&&(E=this.barCtx.getPreviousPath(p,x,!1)),T=T+b.line(S,o)+b.line(C,o)+_+(y.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[p][x]==="both"?" Z":" z"),E=E+b.line(S,s)+_+_+_+_+_+b.line(S,s)+(y.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[p][x]==="both"?" Z":" z"),this.arrBorderRadius[p][x]!=="none"&&(T=b.roundPathCorners(T,y.config.plotOptions.bar.borderRadius)),y.config.chart.stacked){var L=this.barCtx;(L=this.barCtx[h]).yArrj.push(o-A*k),L.yArrjF.push(Math.abs(s-o+l*k)),L.yArrjVal.push(this.barCtx.series[m][x])}return{pathTo:T,pathFrom:E}}},{key:"getBarpaths",value:function(e){var r,n=e.barYPosition,a=e.barHeight,s=e.x1,o=e.x2,l=e.strokeWidth,c=e.isReversed,u=e.series,h=e.seriesGroup,p=e.realIndex,m=e.i,x=e.j,y=e.w,b=new ge(this.barCtx.ctx);(l=Array.isArray(l)?l[p]:l)||(l=0);var w=n,N=a;(r=y.config.series[p].data[x])!==null&&r!==void 0&&r.barHeightOffset&&(w=n-y.config.series[p].data[x].barHeightOffset/2,N=a+y.config.series[p].data[x].barHeightOffset);var A=l/2,S=w+A,C=w+N-A,k=(u[m][x]>=0?1:-1)*(c?-1:1);s+=.001+A*k,o+=.001-A*k;var T=b.move(s,S),E=b.move(s,S);y.globals.previousPaths.length>0&&(E=this.barCtx.getPreviousPath(p,x,!1));var _=b.line(s,C);if(T=T+b.line(o,S)+b.line(o,C)+_+(y.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[p][x]==="both"?" Z":" z"),E=E+b.line(s,S)+_+_+_+_+_+b.line(s,S)+(y.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[p][x]==="both"?" Z":" z"),this.arrBorderRadius[p][x]!=="none"&&(T=b.roundPathCorners(T,y.config.plotOptions.bar.borderRadius)),y.config.chart.stacked){var L=this.barCtx;(L=this.barCtx[h]).xArrj.push(o+A*k),L.xArrjF.push(Math.abs(s-o-l*k)),L.xArrjVal.push(this.barCtx.series[m][x])}return{pathTo:T,pathFrom:E}}},{key:"checkZeroSeries",value:function(e){for(var r=e.series,n=this.w,a=0;a<r.length;a++){for(var s=0,o=0;o<r[n.globals.maxValsInArrayIndex].length;o++)s+=r[a][o];s===0&&this.barCtx.zeroSerieses.push(a)}}},{key:"getXForValue",value:function(e,r){var n=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2]?r:null;return e!=null&&(n=r+e/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?e/this.barCtx.invertedYRatio:0)),n}},{key:"getYForValue",value:function(e,r,n){var a=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3]?r:null;return e!=null&&(a=r-e/this.barCtx.yRatio[n]+2*(this.barCtx.isReversed?e/this.barCtx.yRatio[n]:0)),a}},{key:"getGoalValues",value:function(e,r,n,a,s,o){var l=this,c=this.w,u=[],h=function(x,y){var b;u.push((fx(b={},e,e==="x"?l.getXForValue(x,r,!1):l.getYForValue(x,n,o,!1)),fx(b,"attrs",y),b))};if(c.globals.seriesGoals[a]&&c.globals.seriesGoals[a][s]&&Array.isArray(c.globals.seriesGoals[a][s])&&c.globals.seriesGoals[a][s].forEach(function(x){h(x.value,x)}),this.barCtx.barOptions.isDumbbell&&c.globals.seriesRange.length){var p=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:c.globals.colors,m={strokeHeight:e==="x"?0:c.globals.markers.size[a],strokeWidth:e==="x"?c.globals.markers.size[a]:0,strokeDashArray:0,strokeLineCap:"round",strokeColor:Array.isArray(p[a])?p[a][0]:p[a]};h(c.globals.seriesRangeStart[a][s],m),h(c.globals.seriesRangeEnd[a][s],ve(ve({},m),{},{strokeColor:Array.isArray(p[a])?p[a][1]:p[a]}))}return u}},{key:"drawGoalLine",value:function(e){var r=e.barXPosition,n=e.barYPosition,a=e.goalX,s=e.goalY,o=e.barWidth,l=e.barHeight,c=new ge(this.barCtx.ctx),u=c.group({className:"apexcharts-bar-goals-groups"});u.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:u.node}),u.attr("clip-path","url(#gridRectMarkerMask".concat(this.barCtx.w.globals.cuid,")"));var h=null;return this.barCtx.isHorizontal?Array.isArray(a)&&a.forEach(function(p){if(p.x>=-1&&p.x<=c.w.globals.gridWidth+1){var m=p.attrs.strokeHeight!==void 0?p.attrs.strokeHeight:l/2,x=n+m+l/2;h=c.drawLine(p.x,x-2*m,p.x,x,p.attrs.strokeColor?p.attrs.strokeColor:void 0,p.attrs.strokeDashArray,p.attrs.strokeWidth?p.attrs.strokeWidth:2,p.attrs.strokeLineCap),u.add(h)}}):Array.isArray(s)&&s.forEach(function(p){if(p.y>=-1&&p.y<=c.w.globals.gridHeight+1){var m=p.attrs.strokeWidth!==void 0?p.attrs.strokeWidth:o/2,x=r+m+o/2;h=c.drawLine(x-2*m,p.y,x,p.y,p.attrs.strokeColor?p.attrs.strokeColor:void 0,p.attrs.strokeDashArray,p.attrs.strokeHeight?p.attrs.strokeHeight:2,p.attrs.strokeLineCap),u.add(h)}}),u}},{key:"drawBarShadow",value:function(e){var r=e.prevPaths,n=e.currPaths,a=e.color,s=this.w,o=r.x,l=r.x1,c=r.barYPosition,u=n.x,h=n.x1,p=n.barYPosition,m=c+n.barHeight,x=new ge(this.barCtx.ctx),y=new J,b=x.move(l,m)+x.line(o,m)+x.line(u,p)+x.line(h,p)+x.line(l,m)+(s.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[realIndex][j]==="both"?" Z":" z");return x.drawPath({d:b,fill:y.shadeColor(.5,J.rgb2hex(a)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadow apexcharts-decoration-element"})}},{key:"getZeroValueEncounters",value:function(e){var r,n=e.i,a=e.j,s=this.w,o=0,l=0;return(s.config.plotOptions.bar.horizontal?s.globals.series.map(function(c,u){return u}):((r=s.globals.columnSeries)===null||r===void 0?void 0:r.i.map(function(c){return c}))||[]).forEach(function(c){var u=s.globals.seriesPercent[c][a];u&&o++,c<n&&u===0&&l++}),{nonZeroColumns:o,zeroEncounters:l}}},{key:"getGroupIndex",value:function(e){var r=this.w,n=r.globals.seriesGroups.findIndex(function(o){return o.indexOf(r.globals.seriesNames[e])>-1}),a=this.barCtx.columnGroupIndices,s=a.indexOf(n);return s<0&&(a.push(n),s=a.length-1),{groupIndex:n,columnGroupIndex:s}}}]),t}(),xd=function(){function t(e,r){Se(this,t),this.ctx=e,this.w=e.w;var n=this.w;this.barOptions=n.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=n.config.stroke.width,this.isNullValue=!1,this.isRangeBar=n.globals.seriesRange.length&&this.isHorizontal,this.isVerticalGroupedRangeBar=!n.globals.isBarHorizontal&&n.globals.seriesRange.length&&n.config.plotOptions.bar.rangeBarGroupRows,this.isFunnel=this.barOptions.isFunnel,this.xyRatios=r,this.xyRatios!==null&&(this.xRatio=r.xRatio,this.yRatio=r.yRatio,this.invertedXRatio=r.invertedXRatio,this.invertedYRatio=r.invertedYRatio,this.baseLineY=r.baseLineY,this.baseLineInvertedY=r.baseLineInvertedY),this.yaxisIndex=0,this.translationsIndex=0,this.seriesLen=0,this.pathArr=[];var a=new Ra(this.ctx);this.lastActiveBarSerieIndex=a.getActiveConfigSeriesIndex("desc",["bar","column"]),this.columnGroupIndices=[];var s=a.getBarSeriesIndices(),o=new ir(this.ctx);this.stackedSeriesTotals=o.getStackedSeriesTotals(this.w.config.series.map(function(l,c){return s.indexOf(c)===-1?c:-1}).filter(function(l){return l!==-1})),this.barHelpers=new pK(this)}return Ae(t,[{key:"draw",value:function(e,r){var n=this.w,a=new ge(this.ctx),s=new ir(this.ctx,n);e=s.getLogSeries(e),this.series=e,this.yRatio=s.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e);var o=a.group({class:"apexcharts-bar-series apexcharts-plot-series"});n.config.dataLabels.enabled&&this.totalItems>this.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering - ApexCharts");for(var l=0,c=0;l<e.length;l++,c++){var u,h,p,m,x=void 0,y=void 0,b=[],w=[],N=n.globals.comboCharts?r[l]:l,A=this.barHelpers.getGroupIndex(N).columnGroupIndex,S=a.group({class:"apexcharts-series",rel:l+1,seriesName:J.escapeString(n.globals.seriesNames[N]),"data:realIndex":N});this.ctx.series.addCollapsedClassToSeries(S,N),e[l].length>0&&(this.visibleI=this.visibleI+1);var C=0,k=0;this.yRatio.length>1&&(this.yaxisIndex=n.globals.seriesYAxisReverseMap[N],this.translationsIndex=N);var T=this.translationsIndex;this.isReversed=n.config.yaxis[this.yaxisIndex]&&n.config.yaxis[this.yaxisIndex].reversed;var E=this.barHelpers.initialPositions(N);y=E.y,C=E.barHeight,h=E.yDivision,m=E.zeroW,x=E.x,k=E.barWidth,u=E.xDivision,p=E.zeroH,this.isHorizontal||w.push(x+k/2);var _=a.group({class:"apexcharts-datalabels","data:realIndex":N});n.globals.delayedElements.push({el:_.node}),_.node.classList.add("apexcharts-element-hidden");var L=a.group({class:"apexcharts-bar-goals-markers"}),P=a.group({class:"apexcharts-bar-shadows"});n.globals.delayedElements.push({el:P.node}),P.node.classList.add("apexcharts-element-hidden");for(var R=0;R<e[l].length;R++){var z=this.barHelpers.getStrokeWidth(l,R,N),B=null,Y={indexes:{i:l,j:R,realIndex:N,translationsIndex:T,bc:c},x,y,strokeWidth:z,elSeries:S};this.isHorizontal?(B=this.drawBarPaths(ve(ve({},Y),{},{barHeight:C,zeroW:m,yDivision:h})),k=this.series[l][R]/this.invertedYRatio):(B=this.drawColumnPaths(ve(ve({},Y),{},{xDivision:u,barWidth:k,zeroH:p})),C=this.series[l][R]/this.yRatio[T]);var X=this.barHelpers.getPathFillColor(e,l,R,N);if(this.isFunnel&&this.barOptions.isFunnel3d&&this.pathArr.length&&R>0){var H,W=this.barHelpers.drawBarShadow({color:typeof X.color=="string"&&((H=X.color)===null||H===void 0?void 0:H.indexOf("url"))===-1?X.color:J.hexToRgba(n.globals.colors[l]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:B});P.add(W),n.config.chart.dropShadow.enabled&&new Gr(this.ctx).dropShadow(W,n.config.chart.dropShadow,N)}this.pathArr.push(B);var V=this.barHelpers.drawGoalLine({barXPosition:B.barXPosition,barYPosition:B.barYPosition,goalX:B.goalX,goalY:B.goalY,barHeight:C,barWidth:k});V&&L.add(V),y=B.y,x=B.x,R>0&&w.push(x+k/2),b.push(y),this.renderSeries(ve(ve({realIndex:N,pathFill:X.color},X.useRangeColor?{lineFill:X.color}:{}),{},{j:R,i:l,columnGroupIndex:A,pathFrom:B.pathFrom,pathTo:B.pathTo,strokeWidth:z,elSeries:S,x,y,series:e,barHeight:Math.abs(B.barHeight?B.barHeight:C),barWidth:Math.abs(B.barWidth?B.barWidth:k),elDataLabelsWrap:_,elGoalsMarkers:L,elBarShadows:P,visibleSeries:this.visibleI,type:"bar"}))}n.globals.seriesXvalues[N]=w,n.globals.seriesYvalues[N]=b,o.add(S)}return o}},{key:"renderSeries",value:function(e){var r=e.realIndex,n=e.pathFill,a=e.lineFill,s=e.j,o=e.i,l=e.columnGroupIndex,c=e.pathFrom,u=e.pathTo,h=e.strokeWidth,p=e.elSeries,m=e.x,x=e.y,y=e.y1,b=e.y2,w=e.series,N=e.barHeight,A=e.barWidth,S=e.barXPosition,C=e.barYPosition,k=e.elDataLabelsWrap,T=e.elGoalsMarkers,E=e.elBarShadows,_=e.visibleSeries,L=e.type,P=e.classes,R=this.w,z=new ge(this.ctx),B=!1;if(!a){var Y=typeof R.globals.stroke.colors[r]=="function"?function(Z){var F,G=R.config.stroke.colors;return Array.isArray(G)&&G.length>0&&((F=G[Z])||(F=""),typeof F=="function")?F({value:R.globals.series[Z][s],dataPointIndex:s,w:R}):F}(r):R.globals.stroke.colors[r];a=this.barOptions.distributed?R.globals.stroke.colors[s]:Y}var X=new fK(this).handleBarDataLabels({x:m,y:x,y1:y,y2:b,i:o,j:s,series:w,realIndex:r,columnGroupIndex:l,barHeight:N,barWidth:A,barXPosition:S,barYPosition:C,visibleSeries:_});R.globals.isBarHorizontal||(X.dataLabelsPos.dataLabelsX+Math.max(A,R.globals.barPadForNumericAxis)<0||X.dataLabelsPos.dataLabelsX-Math.max(A,R.globals.barPadForNumericAxis)>R.globals.gridWidth)&&(B=!0),R.config.series[o].data[s]&&R.config.series[o].data[s].strokeColor&&(a=R.config.series[o].data[s].strokeColor),this.isNullValue&&(n="none");var H=s/R.config.chart.animations.animateGradually.delay*(R.config.chart.animations.speed/R.globals.dataPoints)/2.4;if(!B){var W=z.renderPaths({i:o,j:s,realIndex:r,pathFrom:c,pathTo:u,stroke:a,strokeWidth:h,strokeLineCap:R.config.stroke.lineCap,fill:n,animationDelay:H,initialSpeed:R.config.chart.animations.speed,dataChangeSpeed:R.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(L,"-area ").concat(P),chartType:L});W.attr("clip-path","url(#gridRectBarMask".concat(R.globals.cuid,")"));var V=R.config.forecastDataPoints;V.count>0&&s>=R.globals.dataPoints-V.count&&(W.node.setAttribute("stroke-dasharray",V.dashArray),W.node.setAttribute("stroke-width",V.strokeWidth),W.node.setAttribute("fill-opacity",V.fillOpacity)),y!==void 0&&b!==void 0&&(W.attr("data-range-y1",y),W.attr("data-range-y2",b)),new Gr(this.ctx).setSelectionFilter(W,r,s),p.add(W),W.attr({cy:X.dataLabelsPos.bcy,cx:X.dataLabelsPos.bcx,j:s,val:R.globals.series[o][s],barHeight:N,barWidth:A}),X.dataLabels!==null&&k.add(X.dataLabels),X.totalDataLabels&&k.add(X.totalDataLabels),p.add(k),T&&p.add(T),E&&p.add(E)}return p}},{key:"drawBarPaths",value:function(e){var r,n=e.indexes,a=e.barHeight,s=e.strokeWidth,o=e.zeroW,l=e.x,c=e.y,u=e.yDivision,h=e.elSeries,p=this.w,m=n.i,x=n.j;if(p.globals.isXNumeric)r=(c=(p.globals.seriesX[m][x]-p.globals.minX)/this.invertedXRatio-a)+a*this.visibleI;else if(p.config.plotOptions.bar.hideZeroBarsWhenGrouped){var y=this.barHelpers.getZeroValueEncounters({i:m,j:x}),b=y.nonZeroColumns,w=y.zeroEncounters;b>0&&(a=this.seriesLen*a/b),r=c+a*this.visibleI,r-=a*w}else r=c+a*this.visibleI;this.isFunnel&&(o-=(this.barHelpers.getXForValue(this.series[m][x],o)-o)/2),l=this.barHelpers.getXForValue(this.series[m][x],o);var N=this.barHelpers.getBarpaths({barYPosition:r,barHeight:a,x1:o,x2:l,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:n.realIndex,i:m,j:x,w:p});return p.globals.isXNumeric||(c+=u),this.barHelpers.barBackground({j:x,i:m,y1:r-a*this.visibleI,y2:a*this.seriesLen,elSeries:h}),{pathTo:N.pathTo,pathFrom:N.pathFrom,x1:o,x:l,y:c,goalX:this.barHelpers.getGoalValues("x",o,null,m,x),barYPosition:r,barHeight:a}}},{key:"drawColumnPaths",value:function(e){var r,n=e.indexes,a=e.x,s=e.y,o=e.xDivision,l=e.barWidth,c=e.zeroH,u=e.strokeWidth,h=e.elSeries,p=this.w,m=n.realIndex,x=n.translationsIndex,y=n.i,b=n.j,w=n.bc;if(p.globals.isXNumeric){var N=this.getBarXForNumericXAxis({x:a,j:b,realIndex:m,barWidth:l});a=N.x,r=N.barXPosition}else if(p.config.plotOptions.bar.hideZeroBarsWhenGrouped){var A=this.barHelpers.getZeroValueEncounters({i:y,j:b}),S=A.nonZeroColumns,C=A.zeroEncounters;S>0&&(l=this.seriesLen*l/S),r=a+l*this.visibleI,r-=l*C}else r=a+l*this.visibleI;s=this.barHelpers.getYForValue(this.series[y][b],c,x);var k=this.barHelpers.getColumnPaths({barXPosition:r,barWidth:l,y1:c,y2:s,strokeWidth:u,isReversed:this.isReversed,series:this.series,realIndex:m,i:y,j:b,w:p});return p.globals.isXNumeric||(a+=o),this.barHelpers.barBackground({bc:w,j:b,i:y,x1:r-u/2-l*this.visibleI,x2:l*this.seriesLen+u/2,elSeries:h}),{pathTo:k.pathTo,pathFrom:k.pathFrom,x:a,y:s,goalY:this.barHelpers.getGoalValues("y",null,c,y,b,x),barXPosition:r,barWidth:l}}},{key:"getBarXForNumericXAxis",value:function(e){var r=e.x,n=e.barWidth,a=e.realIndex,s=e.j,o=this.w,l=a;return o.globals.seriesX[a].length||(l=o.globals.maxValsInArrayIndex),J.isNumber(o.globals.seriesX[l][s])&&(r=(o.globals.seriesX[l][s]-o.globals.minX)/this.xRatio-n*this.seriesLen/2),{barXPosition:r+n*this.visibleI,x:r}}},{key:"getPreviousPath",value:function(e,r){for(var n=this.w,a="M 0 0",s=0;s<n.globals.previousPaths.length;s++){var o=n.globals.previousPaths[s];o.paths&&o.paths.length>0&&parseInt(o.realIndex,10)===parseInt(e,10)&&n.globals.previousPaths[s].paths[r]!==void 0&&(a=n.globals.previousPaths[s].paths[r].d)}return a}}]),t}(),E6=function(t){Uf(r,xd);var e=Yf(r);function r(){return Se(this,r),e.apply(this,arguments)}return Ae(r,[{key:"draw",value:function(n,a){var s=this,o=this.w;this.graphics=new ge(this.ctx),this.bar=new xd(this.ctx,this.xyRatios);var l=new ir(this.ctx,o);n=l.getLogSeries(n),this.yRatio=l.getLogYRatios(this.yRatio),this.barHelpers.initVariables(n),o.config.chart.stackType==="100%"&&(n=o.globals.comboCharts?a.map(function(y){return o.globals.seriesPercent[y]}):o.globals.seriesPercent.slice()),this.series=n,this.barHelpers.initializeStackedPrevVars(this);for(var c=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"}),u=0,h=0,p=function(y,b){var w=void 0,N=void 0,A=void 0,S=void 0,C=o.globals.comboCharts?a[y]:y,k=s.barHelpers.getGroupIndex(C),T=k.groupIndex,E=k.columnGroupIndex;s.groupCtx=s[o.globals.seriesGroups[T]];var _=[],L=[],P=0;s.yRatio.length>1&&(s.yaxisIndex=o.globals.seriesYAxisReverseMap[C][0],P=C),s.isReversed=o.config.yaxis[s.yaxisIndex]&&o.config.yaxis[s.yaxisIndex].reversed;var R=s.graphics.group({class:"apexcharts-series",seriesName:J.escapeString(o.globals.seriesNames[C]),rel:y+1,"data:realIndex":C});s.ctx.series.addCollapsedClassToSeries(R,C);var z=s.graphics.group({class:"apexcharts-datalabels","data:realIndex":C}),B=s.graphics.group({class:"apexcharts-bar-goals-markers"}),Y=0,X=0,H=s.initialPositions(u,h,w,N,A,S,P);h=H.y,Y=H.barHeight,N=H.yDivision,S=H.zeroW,u=H.x,X=H.barWidth,w=H.xDivision,A=H.zeroH,o.globals.barHeight=Y,o.globals.barWidth=X,s.barHelpers.initializeStackedXYVars(s),s.groupCtx.prevY.length===1&&s.groupCtx.prevY[0].every(function(re){return isNaN(re)})&&(s.groupCtx.prevY[0]=s.groupCtx.prevY[0].map(function(){return A}),s.groupCtx.prevYF[0]=s.groupCtx.prevYF[0].map(function(){return 0}));for(var W=0;W<o.globals.dataPoints;W++){var V=s.barHelpers.getStrokeWidth(y,W,C),Z={indexes:{i:y,j:W,realIndex:C,translationsIndex:P,bc:b},strokeWidth:V,x:u,y:h,elSeries:R,columnGroupIndex:E,seriesGroup:o.globals.seriesGroups[T]},F=null;s.isHorizontal?(F=s.drawStackedBarPaths(ve(ve({},Z),{},{zeroW:S,barHeight:Y,yDivision:N})),X=s.series[y][W]/s.invertedYRatio):(F=s.drawStackedColumnPaths(ve(ve({},Z),{},{xDivision:w,barWidth:X,zeroH:A})),Y=s.series[y][W]/s.yRatio[P]);var G=s.barHelpers.drawGoalLine({barXPosition:F.barXPosition,barYPosition:F.barYPosition,goalX:F.goalX,goalY:F.goalY,barHeight:Y,barWidth:X});G&&B.add(G),h=F.y,u=F.x,_.push(u),L.push(h);var te=s.barHelpers.getPathFillColor(n,y,W,C),K="",U=o.globals.isBarHorizontal?"apexcharts-flip-x":"apexcharts-flip-y";(s.barHelpers.arrBorderRadius[C][W]==="bottom"&&o.globals.series[C][W]>0||s.barHelpers.arrBorderRadius[C][W]==="top"&&o.globals.series[C][W]<0)&&(K=U),R=s.renderSeries(ve(ve({realIndex:C,pathFill:te.color},te.useRangeColor?{lineFill:te.color}:{}),{},{j:W,i:y,columnGroupIndex:E,pathFrom:F.pathFrom,pathTo:F.pathTo,strokeWidth:V,elSeries:R,x:u,y:h,series:n,barHeight:Y,barWidth:X,elDataLabelsWrap:z,elGoalsMarkers:B,type:"bar",visibleSeries:E,classes:K}))}o.globals.seriesXvalues[C]=_,o.globals.seriesYvalues[C]=L,s.groupCtx.prevY.push(s.groupCtx.yArrj),s.groupCtx.prevYF.push(s.groupCtx.yArrjF),s.groupCtx.prevYVal.push(s.groupCtx.yArrjVal),s.groupCtx.prevX.push(s.groupCtx.xArrj),s.groupCtx.prevXF.push(s.groupCtx.xArrjF),s.groupCtx.prevXVal.push(s.groupCtx.xArrjVal),c.add(R)},m=0,x=0;m<n.length;m++,x++)p(m,x);return c}},{key:"initialPositions",value:function(n,a,s,o,l,c,u){var h,p,m=this.w;if(this.isHorizontal){o=m.globals.gridHeight/m.globals.dataPoints;var x=m.config.plotOptions.bar.barHeight;h=String(x).indexOf("%")===-1?parseInt(x,10):o*parseInt(x,10)/100,c=m.globals.padHorizontal+(this.isReversed?m.globals.gridWidth-this.baseLineInvertedY:this.baseLineInvertedY),a=(o-h)/2}else{p=s=m.globals.gridWidth/m.globals.dataPoints;var y=m.config.plotOptions.bar.columnWidth;m.globals.isXNumeric&&m.globals.dataPoints>1?p=(s=m.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:String(y).indexOf("%")===-1?p=parseInt(y,10):p*=parseInt(y,10)/100,l=this.isReversed?this.baseLineY[u]:m.globals.gridHeight-this.baseLineY[u],n=m.globals.padHorizontal+(s-p)/2}var b=m.globals.barGroups.length||1;return{x:n,y:a,yDivision:o,xDivision:s,barHeight:h/b,barWidth:p/b,zeroH:l,zeroW:c}}},{key:"drawStackedBarPaths",value:function(n){for(var a,s=n.indexes,o=n.barHeight,l=n.strokeWidth,c=n.zeroW,u=n.x,h=n.y,p=n.columnGroupIndex,m=n.seriesGroup,x=n.yDivision,y=n.elSeries,b=this.w,w=h+p*o,N=s.i,A=s.j,S=s.realIndex,C=s.translationsIndex,k=0,T=0;T<this.groupCtx.prevXF.length;T++)k+=this.groupCtx.prevXF[T][A];var E=N;if(b.config.series[S].name&&(E=m.indexOf(b.config.series[S].name)),E>0){var _=c;this.groupCtx.prevXVal[E-1][A]<0?_=this.series[N][A]>=0?this.groupCtx.prevX[E-1][A]+k-2*(this.isReversed?k:0):this.groupCtx.prevX[E-1][A]:this.groupCtx.prevXVal[E-1][A]>=0&&(_=this.series[N][A]>=0?this.groupCtx.prevX[E-1][A]:this.groupCtx.prevX[E-1][A]-k+2*(this.isReversed?k:0)),a=_}else a=c;u=this.series[N][A]===null?a:a+this.series[N][A]/this.invertedYRatio-2*(this.isReversed?this.series[N][A]/this.invertedYRatio:0);var L=this.barHelpers.getBarpaths({barYPosition:w,barHeight:o,x1:a,x2:u,strokeWidth:l,isReversed:this.isReversed,series:this.series,realIndex:s.realIndex,seriesGroup:m,i:N,j:A,w:b});return this.barHelpers.barBackground({j:A,i:N,y1:w,y2:o,elSeries:y}),h+=x,{pathTo:L.pathTo,pathFrom:L.pathFrom,goalX:this.barHelpers.getGoalValues("x",c,null,N,A,C),barXPosition:a,barYPosition:w,x:u,y:h}}},{key:"drawStackedColumnPaths",value:function(n){var a=n.indexes,s=n.x,o=n.y,l=n.xDivision,c=n.barWidth,u=n.zeroH,h=n.columnGroupIndex,p=n.seriesGroup,m=n.elSeries,x=this.w,y=a.i,b=a.j,w=a.bc,N=a.realIndex,A=a.translationsIndex;if(x.globals.isXNumeric){var S=x.globals.seriesX[N][b];S||(S=0),s=(S-x.globals.minX)/this.xRatio-c/2*x.globals.barGroups.length}for(var C,k=s+h*c,T=0,E=0;E<this.groupCtx.prevYF.length;E++)T+=isNaN(this.groupCtx.prevYF[E][b])?0:this.groupCtx.prevYF[E][b];var _=y;if(p&&(_=p.indexOf(x.globals.seriesNames[N])),_>0&&!x.globals.isXNumeric||_>0&&x.globals.isXNumeric&&x.globals.seriesX[N-1][b]===x.globals.seriesX[N][b]){var L,P,R,z=Math.min(this.yRatio.length+1,N+1);if(this.groupCtx.prevY[_-1]!==void 0&&this.groupCtx.prevY[_-1].length)for(var B=1;B<z;B++){var Y;if(!isNaN((Y=this.groupCtx.prevY[_-B])===null||Y===void 0?void 0:Y[b])){R=this.groupCtx.prevY[_-B][b];break}}for(var X=1;X<z;X++){var H,W;if(((H=this.groupCtx.prevYVal[_-X])===null||H===void 0?void 0:H[b])<0){P=this.series[y][b]>=0?R-T+2*(this.isReversed?T:0):R;break}if(((W=this.groupCtx.prevYVal[_-X])===null||W===void 0?void 0:W[b])>=0){P=this.series[y][b]>=0?R:R+T-2*(this.isReversed?T:0);break}}P===void 0&&(P=x.globals.gridHeight),C=(L=this.groupCtx.prevYF[0])!==null&&L!==void 0&&L.every(function(Z){return Z===0})&&this.groupCtx.prevYF.slice(1,_).every(function(Z){return Z.every(function(F){return isNaN(F)})})?u:P}else C=u;o=this.series[y][b]?C-this.series[y][b]/this.yRatio[A]+2*(this.isReversed?this.series[y][b]/this.yRatio[A]:0):C;var V=this.barHelpers.getColumnPaths({barXPosition:k,barWidth:c,y1:C,y2:o,yRatio:this.yRatio[A],strokeWidth:this.strokeWidth,isReversed:this.isReversed,series:this.series,seriesGroup:p,realIndex:a.realIndex,i:y,j:b,w:x});return this.barHelpers.barBackground({bc:w,j:b,i:y,x1:k,x2:c,elSeries:m}),{pathTo:V.pathTo,pathFrom:V.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,u,y,b),barXPosition:k,x:x.globals.isXNumeric?s:s+l,y:o}}}]),r}(),v1=function(t){Uf(r,xd);var e=Yf(r);function r(){return Se(this,r),e.apply(this,arguments)}return Ae(r,[{key:"draw",value:function(n,a,s){var o=this,l=this.w,c=new ge(this.ctx),u=l.globals.comboCharts?a:l.config.chart.type,h=new Ja(this.ctx);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=l.config.plotOptions.bar.horizontal,this.isOHLC=this.candlestickOptions&&this.candlestickOptions.type==="ohlc";var p=new ir(this.ctx,l);n=p.getLogSeries(n),this.series=n,this.yRatio=p.getLogYRatios(this.yRatio),this.barHelpers.initVariables(n);for(var m=c.group({class:"apexcharts-".concat(u,"-series apexcharts-plot-series")}),x=function(b){o.isBoxPlot=l.config.chart.type==="boxPlot"||l.config.series[b].type==="boxPlot";var w,N,A,S,C=void 0,k=void 0,T=[],E=[],_=l.globals.comboCharts?s[b]:b,L=o.barHelpers.getGroupIndex(_).columnGroupIndex,P=c.group({class:"apexcharts-series",seriesName:J.escapeString(l.globals.seriesNames[_]),rel:b+1,"data:realIndex":_});o.ctx.series.addCollapsedClassToSeries(P,_),n[b].length>0&&(o.visibleI=o.visibleI+1);var R,z,B=0;o.yRatio.length>1&&(o.yaxisIndex=l.globals.seriesYAxisReverseMap[_][0],B=_);var Y=o.barHelpers.initialPositions(_);k=Y.y,R=Y.barHeight,N=Y.yDivision,S=Y.zeroW,C=Y.x,z=Y.barWidth,w=Y.xDivision,A=Y.zeroH,E.push(C+z/2);for(var X=c.group({class:"apexcharts-datalabels","data:realIndex":_}),H=c.group({class:"apexcharts-bar-goals-markers"}),W=function(Z){var F=o.barHelpers.getStrokeWidth(b,Z,_),G=null,te={indexes:{i:b,j:Z,realIndex:_,translationsIndex:B},x:C,y:k,strokeWidth:F,elSeries:P};G=o.isHorizontal?o.drawHorizontalBoxPaths(ve(ve({},te),{},{yDivision:N,barHeight:R,zeroW:S})):o.drawVerticalBoxPaths(ve(ve({},te),{},{xDivision:w,barWidth:z,zeroH:A})),k=G.y,C=G.x;var K=o.barHelpers.drawGoalLine({barXPosition:G.barXPosition,barYPosition:G.barYPosition,goalX:G.goalX,goalY:G.goalY,barHeight:R,barWidth:z});K&&H.add(K),Z>0&&E.push(C+z/2),T.push(k),G.pathTo.forEach(function(U,re){var ae=!o.isBoxPlot&&o.candlestickOptions.wick.useFillColor?G.color[re]:l.globals.stroke.colors[b],we=h.fillPath({seriesNumber:_,dataPointIndex:Z,color:G.color[re],value:n[b][Z]});o.renderSeries({realIndex:_,pathFill:we,lineFill:ae,j:Z,i:b,pathFrom:G.pathFrom,pathTo:U,strokeWidth:F,elSeries:P,x:C,y:k,series:n,columnGroupIndex:L,barHeight:R,barWidth:z,elDataLabelsWrap:X,elGoalsMarkers:H,visibleSeries:o.visibleI,type:l.config.chart.type})})},V=0;V<l.globals.dataPoints;V++)W(V);l.globals.seriesXvalues[_]=E,l.globals.seriesYvalues[_]=T,m.add(P)},y=0;y<n.length;y++)x(y);return m}},{key:"drawVerticalBoxPaths",value:function(n){var a=n.indexes,s=n.x;n.y;var o=n.xDivision,l=n.barWidth,c=n.zeroH,u=n.strokeWidth,h=this.w,p=new ge(this.ctx),m=a.i,x=a.j,y=h.config.plotOptions.candlestick.colors,b=this.boxOptions.colors,w=a.realIndex,N=function(V){return Array.isArray(V)?V[w]:V},A=N(y.upward),S=N(y.downward),C=this.yRatio[a.translationsIndex],k=this.getOHLCValue(w,x),T=c,E=c,_=k.o<k.c?[A]:[S];this.isBoxPlot&&(_=[N(b.lower),N(b.upper)]);var L=Math.min(k.o,k.c),P=Math.max(k.o,k.c),R=k.m;h.globals.isXNumeric&&(s=(h.globals.seriesX[w][x]-h.globals.minX)/this.xRatio-l/2);var z=s+l*this.visibleI;this.series[m][x]===void 0||this.series[m][x]===null?(L=c,P=c):(L=c-L/C,P=c-P/C,T=c-k.h/C,E=c-k.l/C,R=c-k.m/C);var B=p.move(z,c),Y=p.move(z+l/2,L);if(h.globals.previousPaths.length>0&&(Y=this.getPreviousPath(w,x,!0)),this.isOHLC){var X=z+l/2,H=c-k.o/C,W=c-k.c/C;B=[p.move(X,T)+p.line(X,E)+p.move(X,H)+p.line(z,H)+p.move(X,W)+p.line(z+l,W)]}else B=this.isBoxPlot?[p.move(z,L)+p.line(z+l/2,L)+p.line(z+l/2,T)+p.line(z+l/4,T)+p.line(z+l-l/4,T)+p.line(z+l/2,T)+p.line(z+l/2,L)+p.line(z+l,L)+p.line(z+l,R)+p.line(z,R)+p.line(z,L+u/2),p.move(z,R)+p.line(z+l,R)+p.line(z+l,P)+p.line(z+l/2,P)+p.line(z+l/2,E)+p.line(z+l-l/4,E)+p.line(z+l/4,E)+p.line(z+l/2,E)+p.line(z+l/2,P)+p.line(z,P)+p.line(z,R)+"z"]:[p.move(z,P)+p.line(z+l/2,P)+p.line(z+l/2,T)+p.line(z+l/2,P)+p.line(z+l,P)+p.line(z+l,L)+p.line(z+l/2,L)+p.line(z+l/2,E)+p.line(z+l/2,L)+p.line(z,L)+p.line(z,P-u/2)];return Y+=p.move(z,L),h.globals.isXNumeric||(s+=o),{pathTo:B,pathFrom:Y,x:s,y:P,goalY:this.barHelpers.getGoalValues("y",null,c,m,x,a.translationsIndex),barXPosition:z,color:_}}},{key:"drawHorizontalBoxPaths",value:function(n){var a=n.indexes;n.x;var s=n.y,o=n.yDivision,l=n.barHeight,c=n.zeroW,u=n.strokeWidth,h=this.w,p=new ge(this.ctx),m=a.i,x=a.j,y=this.boxOptions.colors.lower;this.isBoxPlot&&(y=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var b=this.invertedYRatio,w=a.realIndex,N=this.getOHLCValue(w,x),A=c,S=c,C=Math.min(N.o,N.c),k=Math.max(N.o,N.c),T=N.m;h.globals.isXNumeric&&(s=(h.globals.seriesX[w][x]-h.globals.minX)/this.invertedXRatio-l/2);var E=s+l*this.visibleI;this.series[m][x]===void 0||this.series[m][x]===null?(C=c,k=c):(C=c+C/b,k=c+k/b,A=c+N.h/b,S=c+N.l/b,T=c+N.m/b);var _=p.move(c,E),L=p.move(C,E+l/2);return h.globals.previousPaths.length>0&&(L=this.getPreviousPath(w,x,!0)),_=[p.move(C,E)+p.line(C,E+l/2)+p.line(A,E+l/2)+p.line(A,E+l/2-l/4)+p.line(A,E+l/2+l/4)+p.line(A,E+l/2)+p.line(C,E+l/2)+p.line(C,E+l)+p.line(T,E+l)+p.line(T,E)+p.line(C+u/2,E),p.move(T,E)+p.line(T,E+l)+p.line(k,E+l)+p.line(k,E+l/2)+p.line(S,E+l/2)+p.line(S,E+l-l/4)+p.line(S,E+l/4)+p.line(S,E+l/2)+p.line(k,E+l/2)+p.line(k,E)+p.line(T,E)+"z"],L+=p.move(C,E),h.globals.isXNumeric||(s+=o),{pathTo:_,pathFrom:L,x:k,y:s,goalX:this.barHelpers.getGoalValues("x",c,null,m,x),barYPosition:E,color:y}}},{key:"getOHLCValue",value:function(n,a){var s=this.w,o=new ir(this.ctx,s),l=o.getLogValAtSeriesIndex(s.globals.seriesCandleH[n][a],n),c=o.getLogValAtSeriesIndex(s.globals.seriesCandleO[n][a],n),u=o.getLogValAtSeriesIndex(s.globals.seriesCandleM[n][a],n),h=o.getLogValAtSeriesIndex(s.globals.seriesCandleC[n][a],n),p=o.getLogValAtSeriesIndex(s.globals.seriesCandleL[n][a],n);return{o:this.isBoxPlot?l:c,h:this.isBoxPlot?c:l,m:u,l:this.isBoxPlot?h:p,c:this.isBoxPlot?p:h}}}]),r}(),hR=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w}return Ae(t,[{key:"checkColorRange",value:function(){var e=this.w,r=!1,n=e.config.plotOptions[e.config.chart.type];return n.colorScale.ranges.length>0&&n.colorScale.ranges.map(function(a,s){a.from<=0&&(r=!0)}),r}},{key:"getShadeColor",value:function(e,r,n,a){var s=this.w,o=1,l=s.config.plotOptions[e].shadeIntensity,c=this.determineColor(e,r,n);s.globals.hasNegs||a?o=s.config.plotOptions[e].reverseNegativeShade?c.percent<0?c.percent/100*(1.25*l):(1-c.percent/100)*(1.25*l):c.percent<=0?1-(1+c.percent/100)*l:(1-c.percent/100)*l:(o=1-c.percent/100,e==="treemap"&&(o=(1-c.percent/100)*(1.25*l)));var u=c.color,h=new J;if(s.config.plotOptions[e].enableShades)if(this.w.config.theme.mode==="dark"){var p=h.shadeColor(-1*o,c.color);u=J.hexToRgba(J.isColorHex(p)?p:J.rgb2hex(p),s.config.fill.opacity)}else{var m=h.shadeColor(o,c.color);u=J.hexToRgba(J.isColorHex(m)?m:J.rgb2hex(m),s.config.fill.opacity)}return{color:u,colorProps:c}}},{key:"determineColor",value:function(e,r,n){var a=this.w,s=a.globals.series[r][n],o=a.config.plotOptions[e],l=o.colorScale.inverse?n:r;o.distributed&&a.config.chart.type==="treemap"&&(l=n);var c=a.globals.colors[l],u=null,h=Math.min.apply(Math,Nr(a.globals.series[r])),p=Math.max.apply(Math,Nr(a.globals.series[r]));o.distributed||e!=="heatmap"||(h=a.globals.minY,p=a.globals.maxY),o.colorScale.min!==void 0&&(h=o.colorScale.min<a.globals.minY?o.colorScale.min:a.globals.minY,p=o.colorScale.max>a.globals.maxY?o.colorScale.max:a.globals.maxY);var m=Math.abs(p)+Math.abs(h),x=100*s/(m===0?m-1e-6:m);return o.colorScale.ranges.length>0&&o.colorScale.ranges.map(function(y,b){if(s>=y.from&&s<=y.to){c=y.color,u=y.foreColor?y.foreColor:null,h=y.from,p=y.to;var w=Math.abs(p)+Math.abs(h);x=100*s/(w===0?w-1e-6:w)}}),{color:c,foreColor:u,percent:x}}},{key:"calculateDataLabels",value:function(e){var r=e.text,n=e.x,a=e.y,s=e.i,o=e.j,l=e.colorProps,c=e.fontSize,u=this.w.config.dataLabels,h=new ge(this.ctx),p=new gd(this.ctx),m=null;if(u.enabled){m=h.group({class:"apexcharts-data-labels"});var x=u.offsetX,y=u.offsetY,b=n+x,w=a+parseFloat(u.style.fontSize)/3+y;p.plotDataLabelsText({x:b,y:w,text:r,i:s,j:o,color:l.foreColor,parent:m,fontSize:c,dataLabelsConfig:u})}return m}},{key:"addListeners",value:function(e){var r=new ge(this.ctx);e.node.addEventListener("mouseenter",r.pathMouseEnter.bind(this,e)),e.node.addEventListener("mouseleave",r.pathMouseLeave.bind(this,e)),e.node.addEventListener("mousedown",r.pathMouseDown.bind(this,e))}}]),t}(),mK=function(){function t(e,r){Se(this,t),this.ctx=e,this.w=e.w,this.xRatio=r.xRatio,this.yRatio=r.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new hR(e),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}return Ae(t,[{key:"draw",value:function(e){var r=this.w,n=new ge(this.ctx),a=n.group({class:"apexcharts-heatmap"});a.attr("clip-path","url(#gridRectMask".concat(r.globals.cuid,")"));var s=r.globals.gridWidth/r.globals.dataPoints,o=r.globals.gridHeight/r.globals.series.length,l=0,c=!1;this.negRange=this.helpers.checkColorRange();var u=e.slice();r.config.yaxis[0].reversed&&(c=!0,u.reverse());for(var h=c?0:u.length-1;c?h<u.length:h>=0;c?h++:h--){var p=n.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:J.escapeString(r.globals.seriesNames[h]),rel:h+1,"data:realIndex":h});if(this.ctx.series.addCollapsedClassToSeries(p,h),r.config.chart.dropShadow.enabled){var m=r.config.chart.dropShadow;new Gr(this.ctx).dropShadow(p,m,h)}for(var x=0,y=r.config.plotOptions.heatmap.shadeIntensity,b=0,w=0;w<r.globals.dataPoints;w++)if(r.globals.seriesX.length&&!r.globals.allSeriesHasEqualX&&r.globals.minX+r.globals.minXDiff*w<r.globals.seriesX[h][b])x+=s;else{if(b>=u[h].length)break;var N=this.helpers.getShadeColor(r.config.chart.type,h,b,this.negRange),A=N.color,S=N.colorProps;r.config.fill.type==="image"&&(A=new Ja(this.ctx).fillPath({seriesNumber:h,dataPointIndex:b,opacity:r.globals.hasNegs?S.percent<0?1-(1+S.percent/100):y+S.percent/100:S.percent/100,patternID:J.randomId(),width:r.config.fill.image.width?r.config.fill.image.width:s,height:r.config.fill.image.height?r.config.fill.image.height:o}));var C=this.rectRadius,k=n.drawRect(x,l,s,o,C);if(k.attr({cx:x,cy:l}),k.node.classList.add("apexcharts-heatmap-rect"),p.add(k),k.attr({fill:A,i:h,index:h,j:b,val:e[h][b],"stroke-width":this.strokeWidth,stroke:r.config.plotOptions.heatmap.useFillColorAsStroke?A:r.globals.stroke.colors[0],color:A}),this.helpers.addListeners(k),r.config.chart.animations.enabled&&!r.globals.dataChanged){var T=1;r.globals.resized||(T=r.config.chart.animations.speed),this.animateHeatMap(k,x,l,s,o,T)}if(r.globals.dataChanged){var E=1;if(this.dynamicAnim.enabled&&r.globals.shouldAnimate){E=this.dynamicAnim.speed;var _=r.globals.previousPaths[h]&&r.globals.previousPaths[h][b]&&r.globals.previousPaths[h][b].color;_||(_="rgba(255, 255, 255, 0)"),this.animateHeatColor(k,J.isColorHex(_)?_:J.rgb2hex(_),J.isColorHex(A)?A:J.rgb2hex(A),E)}}var L=(0,r.config.dataLabels.formatter)(r.globals.series[h][b],{value:r.globals.series[h][b],seriesIndex:h,dataPointIndex:b,w:r}),P=this.helpers.calculateDataLabels({text:L,x:x+s/2,y:l+o/2,i:h,j:b,colorProps:S,series:u});P!==null&&p.add(P),x+=s,b++}l+=o,a.add(p)}var R=r.globals.yAxisScale[0].result.slice();return r.config.yaxis[0].reversed?R.unshift(""):R.push(""),r.globals.yAxisScale[0].result=R,a}},{key:"animateHeatMap",value:function(e,r,n,a,s,o){var l=new Ld(this.ctx);l.animateRect(e,{x:r+a/2,y:n+s/2,width:0,height:0},{x:r,y:n,width:a,height:s},o,function(){l.animationCompleted(e)})}},{key:"animateHeatColor",value:function(e,r,n,a){e.attr({fill:r}).animate(a).attr({fill:n})}}]),t}(),fR=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w}return Ae(t,[{key:"drawYAxisTexts",value:function(e,r,n,a){var s=this.w,o=s.config.yaxis[0],l=s.globals.yLabelFormatters[0];return new ge(this.ctx).drawText({x:e+o.labels.offsetX,y:r+o.labels.offsetY,text:l(a,n),textAnchor:"middle",fontSize:o.labels.style.fontSize,fontFamily:o.labels.style.fontFamily,foreColor:Array.isArray(o.labels.style.colors)?o.labels.style.colors[n]:o.labels.style.colors})}}]),t}(),pR=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w;var r=this.w;this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animBeginArr=[0],this.animDur=0,this.donutDataLabels=this.w.config.plotOptions.pie.donut.labels,this.lineColorArr=r.globals.stroke.colors!==void 0?r.globals.stroke.colors:r.globals.colors,this.defaultSize=Math.min(r.globals.gridWidth,r.globals.gridHeight),this.centerY=this.defaultSize/2,this.centerX=r.globals.gridWidth/2,r.config.chart.type==="radialBar"?this.fullAngle=360:this.fullAngle=Math.abs(r.config.plotOptions.pie.endAngle-r.config.plotOptions.pie.startAngle),this.initialAngle=r.config.plotOptions.pie.startAngle%this.fullAngle,r.globals.radialSize=this.defaultSize/2.05-r.config.stroke.width-(r.config.chart.sparkline.enabled?0:r.config.chart.dropShadow.blur),this.donutSize=r.globals.radialSize*parseInt(r.config.plotOptions.pie.donut.size,10)/100;var n=r.config.plotOptions.pie.customScale,a=r.globals.gridWidth/2,s=r.globals.gridHeight/2;this.translateX=a-a*n,this.translateY=s-s*n,this.dataLabelsGroup=new ge(this.ctx).group({class:"apexcharts-datalabels-group",transform:"translate(".concat(this.translateX,", ").concat(this.translateY,") scale(").concat(n,")")}),this.maxY=0,this.sliceLabels=[],this.sliceSizes=[],this.prevSectorAngleArr=[]}return Ae(t,[{key:"draw",value:function(e){var r=this,n=this.w,a=new ge(this.ctx),s=a.group({class:"apexcharts-pie"});if(n.globals.noData)return s;for(var o=0,l=0;l<e.length;l++)o+=J.negToZero(e[l]);var c=[],u=a.group();o===0&&(o=1e-5),e.forEach(function(S){r.maxY=Math.max(r.maxY,S)}),n.config.yaxis[0].max&&(this.maxY=n.config.yaxis[0].max),n.config.grid.position==="back"&&this.chartType==="polarArea"&&this.drawPolarElements(s);for(var h=0;h<e.length;h++){var p=this.fullAngle*J.negToZero(e[h])/o;c.push(p),this.chartType==="polarArea"?(c[h]=this.fullAngle/e.length,this.sliceSizes.push(n.globals.radialSize*e[h]/this.maxY)):this.sliceSizes.push(n.globals.radialSize)}if(n.globals.dataChanged){for(var m,x=0,y=0;y<n.globals.previousPaths.length;y++)x+=J.negToZero(n.globals.previousPaths[y]);for(var b=0;b<n.globals.previousPaths.length;b++)m=this.fullAngle*J.negToZero(n.globals.previousPaths[b])/x,this.prevSectorAngleArr.push(m)}if(this.donutSize<0&&(this.donutSize=0),this.chartType==="donut"){var w=a.drawCircle(this.donutSize);w.attr({cx:this.centerX,cy:this.centerY,fill:n.config.plotOptions.pie.donut.background?n.config.plotOptions.pie.donut.background:"transparent"}),u.add(w)}var N=this.drawArcs(c,e);if(this.sliceLabels.forEach(function(S){N.add(S)}),u.attr({transform:"translate(".concat(this.translateX,", ").concat(this.translateY,") scale(").concat(n.config.plotOptions.pie.customScale,")")}),u.add(N),s.add(u),this.donutDataLabels.show){var A=this.renderInnerDataLabels(this.dataLabelsGroup,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:this.donutDataLabels.show});s.add(A)}return n.config.grid.position==="front"&&this.chartType==="polarArea"&&this.drawPolarElements(s),s}},{key:"drawArcs",value:function(e,r){var n=this.w,a=new Gr(this.ctx),s=new ge(this.ctx),o=new Ja(this.ctx),l=s.group({class:"apexcharts-slices"}),c=this.initialAngle,u=this.initialAngle,h=this.initialAngle,p=this.initialAngle;this.strokeWidth=n.config.stroke.show?n.config.stroke.width:0;for(var m=0;m<e.length;m++){var x=s.group({class:"apexcharts-series apexcharts-pie-series",seriesName:J.escapeString(n.globals.seriesNames[m]),rel:m+1,"data:realIndex":m});l.add(x),u=p,h=(c=h)+e[m],p=u+this.prevSectorAngleArr[m];var y=h<c?this.fullAngle+h-c:h-c,b=o.fillPath({seriesNumber:m,size:this.sliceSizes[m],value:r[m]}),w=this.getChangedPath(u,p),N=s.drawPath({d:w,stroke:Array.isArray(this.lineColorArr)?this.lineColorArr[m]:this.lineColorArr,strokeWidth:0,fill:b,fillOpacity:n.config.fill.opacity,classes:"apexcharts-pie-area apexcharts-".concat(this.chartType.toLowerCase(),"-slice-").concat(m)});if(N.attr({index:0,j:m}),a.setSelectionFilter(N,0,m),n.config.chart.dropShadow.enabled){var A=n.config.chart.dropShadow;a.dropShadow(N,A,m)}this.addListeners(N,this.donutDataLabels),ge.setAttrs(N.node,{"data:angle":y,"data:startAngle":c,"data:strokeWidth":this.strokeWidth,"data:value":r[m]});var S={x:0,y:0};this.chartType==="pie"||this.chartType==="polarArea"?S=J.polarToCartesian(this.centerX,this.centerY,n.globals.radialSize/1.25+n.config.plotOptions.pie.dataLabels.offset,(c+y/2)%this.fullAngle):this.chartType==="donut"&&(S=J.polarToCartesian(this.centerX,this.centerY,(n.globals.radialSize+this.donutSize)/2+n.config.plotOptions.pie.dataLabels.offset,(c+y/2)%this.fullAngle)),x.add(N);var C=0;if(!this.initialAnim||n.globals.resized||n.globals.dataChanged?this.animBeginArr.push(0):((C=y/this.fullAngle*n.config.chart.animations.speed)===0&&(C=1),this.animDur=C+this.animDur,this.animBeginArr.push(this.animDur)),this.dynamicAnim&&n.globals.dataChanged?this.animatePaths(N,{size:this.sliceSizes[m],endAngle:h,startAngle:c,prevStartAngle:u,prevEndAngle:p,animateStartingPos:!0,i:m,animBeginArr:this.animBeginArr,shouldSetPrevPaths:!0,dur:n.config.chart.animations.dynamicAnimation.speed}):this.animatePaths(N,{size:this.sliceSizes[m],endAngle:h,startAngle:c,i:m,totalItems:e.length-1,animBeginArr:this.animBeginArr,dur:C}),n.config.plotOptions.pie.expandOnClick&&this.chartType!=="polarArea"&&N.node.addEventListener("mouseup",this.pieClicked.bind(this,m)),n.globals.selectedDataPoints[0]!==void 0&&n.globals.selectedDataPoints[0].indexOf(m)>-1&&this.pieClicked(m),n.config.dataLabels.enabled){var k=S.x,T=S.y,E=100*y/this.fullAngle+"%";if(y!==0&&n.config.plotOptions.pie.dataLabels.minAngleToShowLabel<e[m]){var _=n.config.dataLabels.formatter;_!==void 0&&(E=_(n.globals.seriesPercent[m][0],{seriesIndex:m,w:n}));var L=n.globals.dataLabels.style.colors[m],P=s.group({class:"apexcharts-datalabels"}),R=s.drawText({x:k,y:T,text:E,textAnchor:"middle",fontSize:n.config.dataLabels.style.fontSize,fontFamily:n.config.dataLabels.style.fontFamily,fontWeight:n.config.dataLabels.style.fontWeight,foreColor:L});if(P.add(R),n.config.dataLabels.dropShadow.enabled){var z=n.config.dataLabels.dropShadow;a.dropShadow(R,z)}R.node.classList.add("apexcharts-pie-label"),n.config.chart.animations.animate&&n.globals.resized===!1&&(R.node.classList.add("apexcharts-pie-label-delay"),R.node.style.animationDelay=n.config.chart.animations.speed/940+"s"),this.sliceLabels.push(P)}}}return l}},{key:"addListeners",value:function(e,r){var n=new ge(this.ctx);e.node.addEventListener("mouseenter",n.pathMouseEnter.bind(this,e)),e.node.addEventListener("mouseleave",n.pathMouseLeave.bind(this,e)),e.node.addEventListener("mouseleave",this.revertDataLabelsInner.bind(this,e.node,r)),e.node.addEventListener("mousedown",n.pathMouseDown.bind(this,e)),this.donutDataLabels.total.showAlways||(e.node.addEventListener("mouseenter",this.printDataLabelsInner.bind(this,e.node,r)),e.node.addEventListener("mousedown",this.printDataLabelsInner.bind(this,e.node,r)))}},{key:"animatePaths",value:function(e,r){var n=this.w,a=r.endAngle<r.startAngle?this.fullAngle+r.endAngle-r.startAngle:r.endAngle-r.startAngle,s=a,o=r.startAngle,l=r.startAngle;r.prevStartAngle!==void 0&&r.prevEndAngle!==void 0&&(o=r.prevEndAngle,s=r.prevEndAngle<r.prevStartAngle?this.fullAngle+r.prevEndAngle-r.prevStartAngle:r.prevEndAngle-r.prevStartAngle),r.i===n.config.series.length-1&&(a+l>this.fullAngle?r.endAngle=r.endAngle-(a+l):a+l<this.fullAngle&&(r.endAngle=r.endAngle+(this.fullAngle-(a+l)))),a===this.fullAngle&&(a=this.fullAngle-.01),this.animateArc(e,o,l,a,s,r)}},{key:"animateArc",value:function(e,r,n,a,s,o){var l,c=this,u=this.w,h=new Ld(this.ctx),p=o.size;(isNaN(r)||isNaN(s))&&(r=n,s=a,o.dur=0);var m=a,x=n,y=r<n?this.fullAngle+r-n:r-n;u.globals.dataChanged&&o.shouldSetPrevPaths&&o.prevEndAngle&&(l=c.getPiePath({me:c,startAngle:o.prevStartAngle,angle:o.prevEndAngle<o.prevStartAngle?this.fullAngle+o.prevEndAngle-o.prevStartAngle:o.prevEndAngle-o.prevStartAngle,size:p}),e.attr({d:l})),o.dur!==0?e.animate(o.dur,o.animBeginArr[o.i]).after(function(){c.chartType!=="pie"&&c.chartType!=="donut"&&c.chartType!=="polarArea"||this.animate(u.config.chart.animations.dynamicAnimation.speed).attr({"stroke-width":c.strokeWidth}),o.i===u.config.series.length-1&&h.animationCompleted(e)}).during(function(b){m=y+(a-y)*b,o.animateStartingPos&&(m=s+(a-s)*b,x=r-s+(n-(r-s))*b),l=c.getPiePath({me:c,startAngle:x,angle:m,size:p}),e.node.setAttribute("data:pathOrig",l),e.attr({d:l})}):(l=c.getPiePath({me:c,startAngle:x,angle:a,size:p}),o.isTrack||(u.globals.animationEnded=!0),e.node.setAttribute("data:pathOrig",l),e.attr({d:l,"stroke-width":c.strokeWidth}))}},{key:"pieClicked",value:function(e){var r,n=this.w,a=this,s=a.sliceSizes[e]+(n.config.plotOptions.pie.expandOnClick?4:0),o=n.globals.dom.Paper.findOne(".apexcharts-".concat(a.chartType.toLowerCase(),"-slice-").concat(e));if(o.attr("data:pieClicked")!=="true"){var l=n.globals.dom.baseEl.getElementsByClassName("apexcharts-pie-area");Array.prototype.forEach.call(l,function(p){p.setAttribute("data:pieClicked","false");var m=p.getAttribute("data:pathOrig");m&&p.setAttribute("d",m)}),n.globals.capturedDataPointIndex=e,o.attr("data:pieClicked","true");var c=parseInt(o.attr("data:startAngle"),10),u=parseInt(o.attr("data:angle"),10);r=a.getPiePath({me:a,startAngle:c,angle:u,size:s}),u!==360&&o.plot(r)}else{o.attr({"data:pieClicked":"false"}),this.revertDataLabelsInner(o.node,this.donutDataLabels);var h=o.attr("data:pathOrig");o.attr({d:h})}}},{key:"getChangedPath",value:function(e,r){var n="";return this.dynamicAnim&&this.w.globals.dataChanged&&(n=this.getPiePath({me:this,startAngle:e,angle:r-e,size:this.size})),n}},{key:"getPiePath",value:function(e){var r,n=e.me,a=e.startAngle,s=e.angle,o=e.size,l=new ge(this.ctx),c=a,u=Math.PI*(c-90)/180,h=s+a;Math.ceil(h)>=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(h=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(h)>this.fullAngle&&(h-=this.fullAngle);var p=Math.PI*(h-90)/180,m=n.centerX+o*Math.cos(u),x=n.centerY+o*Math.sin(u),y=n.centerX+o*Math.cos(p),b=n.centerY+o*Math.sin(p),w=J.polarToCartesian(n.centerX,n.centerY,n.donutSize,h),N=J.polarToCartesian(n.centerX,n.centerY,n.donutSize,c),A=s>180?1:0,S=["M",m,x,"A",o,o,0,A,1,y,b];return r=n.chartType==="donut"?[].concat(S,["L",w.x,w.y,"A",n.donutSize,n.donutSize,0,A,0,N.x,N.y,"L",m,x,"z"]).join(" "):n.chartType==="pie"||n.chartType==="polarArea"?[].concat(S,["L",n.centerX,n.centerY,"L",m,x]).join(" "):[].concat(S).join(" "),l.roundPathCorners(r,2*this.strokeWidth)}},{key:"drawPolarElements",value:function(e){var r=this.w,n=new oR(this.ctx),a=new ge(this.ctx),s=new fR(this.ctx),o=a.group(),l=a.group(),c=n.niceScale(0,Math.ceil(this.maxY),0),u=c.result.reverse(),h=c.result.length;this.maxY=c.niceMax;for(var p=r.globals.radialSize,m=p/(h-1),x=0;x<h-1;x++){var y=a.drawCircle(p);if(y.attr({cx:this.centerX,cy:this.centerY,fill:"none","stroke-width":r.config.plotOptions.polarArea.rings.strokeWidth,stroke:r.config.plotOptions.polarArea.rings.strokeColor}),r.config.yaxis[0].show){var b=s.drawYAxisTexts(this.centerX,this.centerY-p+parseInt(r.config.yaxis[0].labels.style.fontSize,10)/2,x,u[x]);l.add(b)}o.add(y),p-=m}this.drawSpokes(e),e.add(o),e.add(l)}},{key:"renderInnerDataLabels",value:function(e,r,n){var a=this.w,s=new ge(this.ctx),o=r.total.show;e.node.innerHTML="",e.node.style.opacity=n.opacity;var l,c,u=n.centerX,h=this.donutDataLabels.total.label?n.centerY:n.centerY-n.centerY/6;l=r.name.color===void 0?a.globals.colors[0]:r.name.color;var p=r.name.fontSize,m=r.name.fontFamily,x=r.name.fontWeight;c=r.value.color===void 0?a.config.chart.foreColor:r.value.color;var y=r.value.formatter,b="",w="";if(o?(l=r.total.color,p=r.total.fontSize,m=r.total.fontFamily,x=r.total.fontWeight,w=this.donutDataLabels.total.label?r.total.label:"",b=r.total.formatter(a)):a.globals.series.length===1&&(b=y(a.globals.series[0],a),w=a.globals.seriesNames[0]),w&&(w=r.name.formatter(w,r.total.show,a)),r.name.show){var N=s.drawText({x:u,y:h+parseFloat(r.name.offsetY),text:w,textAnchor:"middle",foreColor:l,fontSize:p,fontWeight:x,fontFamily:m});N.node.classList.add("apexcharts-datalabel-label"),e.add(N)}if(r.value.show){var A=r.name.show?parseFloat(r.value.offsetY)+16:r.value.offsetY,S=s.drawText({x:u,y:h+A,text:b,textAnchor:"middle",foreColor:c,fontWeight:r.value.fontWeight,fontSize:r.value.fontSize,fontFamily:r.value.fontFamily});S.node.classList.add("apexcharts-datalabel-value"),e.add(S)}return e}},{key:"printInnerLabels",value:function(e,r,n,a){var s,o=this.w;a?s=e.name.color===void 0?o.globals.colors[parseInt(a.parentNode.getAttribute("rel"),10)-1]:e.name.color:o.globals.series.length>1&&e.total.show&&(s=e.total.color);var l=o.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"),c=o.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value");n=(0,e.value.formatter)(n,o),a||typeof e.total.formatter!="function"||(n=e.total.formatter(o));var u=r===e.total.label;r=this.donutDataLabels.total.label?e.name.formatter(r,u,o):"",l!==null&&(l.textContent=r),c!==null&&(c.textContent=n),l!==null&&(l.style.fill=s)}},{key:"printDataLabelsInner",value:function(e,r){var n=this.w,a=e.getAttribute("data:value"),s=n.globals.seriesNames[parseInt(e.parentNode.getAttribute("rel"),10)-1];n.globals.series.length>1&&this.printInnerLabels(r,s,a,e);var o=n.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");o!==null&&(o.style.opacity=1)}},{key:"drawSpokes",value:function(e){var r=this,n=this.w,a=new ge(this.ctx),s=n.config.plotOptions.polarArea.spokes;if(s.strokeWidth!==0){for(var o=[],l=360/n.globals.series.length,c=0;c<n.globals.series.length;c++)o.push(J.polarToCartesian(this.centerX,this.centerY,n.globals.radialSize,n.config.plotOptions.pie.startAngle+l*c));o.forEach(function(u,h){var p=a.drawLine(u.x,u.y,r.centerX,r.centerY,Array.isArray(s.connectorColors)?s.connectorColors[h]:s.connectorColors);e.add(p)})}}},{key:"revertDataLabelsInner",value:function(){var e=this.w;if(this.donutDataLabels.show){var r=e.globals.dom.Paper.findOne(".apexcharts-datalabels-group"),n=this.renderInnerDataLabels(r,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:this.donutDataLabels.show});e.globals.dom.Paper.findOne(".apexcharts-radialbar, .apexcharts-pie").add(n)}}}]),t}(),gK=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w,this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animDur=0;var r=this.w;this.graphics=new ge(this.ctx),this.lineColorArr=r.globals.stroke.colors!==void 0?r.globals.stroke.colors:r.globals.colors,this.defaultSize=r.globals.svgHeight<r.globals.svgWidth?r.globals.gridHeight:r.globals.gridWidth,this.isLog=r.config.yaxis[0].logarithmic,this.logBase=r.config.yaxis[0].logBase,this.coreUtils=new ir(this.ctx),this.maxValue=this.isLog?this.coreUtils.getLogVal(this.logBase,r.globals.maxY,0):r.globals.maxY,this.minValue=this.isLog?this.coreUtils.getLogVal(this.logBase,this.w.globals.minY,0):r.globals.minY,this.polygons=r.config.plotOptions.radar.polygons,this.strokeWidth=r.config.stroke.show?r.config.stroke.width:0,this.size=this.defaultSize/2.1-this.strokeWidth-r.config.chart.dropShadow.blur,r.config.xaxis.labels.show&&(this.size=this.size-r.globals.xAxisLabelsWidth/1.75),r.config.plotOptions.radar.size!==void 0&&(this.size=r.config.plotOptions.radar.size),this.dataRadiusOfPercent=[],this.dataRadius=[],this.angleArr=[],this.yaxisLabelsTextsPos=[]}return Ae(t,[{key:"draw",value:function(e){var r=this,n=this.w,a=new Ja(this.ctx),s=[],o=new gd(this.ctx);e.length&&(this.dataPointsLen=e[n.globals.maxValsInArrayIndex].length),this.disAngle=2*Math.PI/this.dataPointsLen;var l=n.globals.gridWidth/2,c=n.globals.gridHeight/2,u=l+n.config.plotOptions.radar.offsetX,h=c+n.config.plotOptions.radar.offsetY,p=this.graphics.group({class:"apexcharts-radar-series apexcharts-plot-series",transform:"translate(".concat(u||0,", ").concat(h||0,")")}),m=[],x=null,y=null;if(this.yaxisLabels=this.graphics.group({class:"apexcharts-yaxis"}),e.forEach(function(w,N){var A=w.length===n.globals.dataPoints,S=r.graphics.group().attr({class:"apexcharts-series","data:longestSeries":A,seriesName:J.escapeString(n.globals.seriesNames[N]),rel:N+1,"data:realIndex":N});r.dataRadiusOfPercent[N]=[],r.dataRadius[N]=[],r.angleArr[N]=[],w.forEach(function(B,Y){var X=Math.abs(r.maxValue-r.minValue);B-=r.minValue,r.isLog&&(B=r.coreUtils.getLogVal(r.logBase,B,0)),r.dataRadiusOfPercent[N][Y]=B/X,r.dataRadius[N][Y]=r.dataRadiusOfPercent[N][Y]*r.size,r.angleArr[N][Y]=Y*r.disAngle}),m=r.getDataPointsPos(r.dataRadius[N],r.angleArr[N]);var C=r.createPaths(m,{x:0,y:0});x=r.graphics.group({class:"apexcharts-series-markers-wrap apexcharts-element-hidden"}),y=r.graphics.group({class:"apexcharts-datalabels","data:realIndex":N}),n.globals.delayedElements.push({el:x.node,index:N});var k={i:N,realIndex:N,animationDelay:N,initialSpeed:n.config.chart.animations.speed,dataChangeSpeed:n.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-radar",shouldClipToGrid:!1,bindEventsOnPaths:!1,stroke:n.globals.stroke.colors[N],strokeLineCap:n.config.stroke.lineCap},T=null;n.globals.previousPaths.length>0&&(T=r.getPreviousPath(N));for(var E=0;E<C.linePathsTo.length;E++){var _=r.graphics.renderPaths(ve(ve({},k),{},{pathFrom:T===null?C.linePathsFrom[E]:T,pathTo:C.linePathsTo[E],strokeWidth:Array.isArray(r.strokeWidth)?r.strokeWidth[N]:r.strokeWidth,fill:"none",drawShadow:!1}));S.add(_);var L=a.fillPath({seriesNumber:N}),P=r.graphics.renderPaths(ve(ve({},k),{},{pathFrom:T===null?C.areaPathsFrom[E]:T,pathTo:C.areaPathsTo[E],strokeWidth:0,fill:L,drawShadow:!1}));if(n.config.chart.dropShadow.enabled){var R=new Gr(r.ctx),z=n.config.chart.dropShadow;R.dropShadow(P,Object.assign({},z,{noUserSpaceOnUse:!0}),N)}S.add(P)}w.forEach(function(B,Y){var X=new Fd(r.ctx).getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:N,dataPointIndex:Y}),H=r.graphics.drawMarker(m[Y].x,m[Y].y,X);H.attr("rel",Y),H.attr("j",Y),H.attr("index",N),H.node.setAttribute("default-marker-size",X.pSize);var W=r.graphics.group({class:"apexcharts-series-markers"});W&&W.add(H),x.add(W),S.add(x);var V=n.config.dataLabels;if(V.enabled){var Z=V.formatter(n.globals.series[N][Y],{seriesIndex:N,dataPointIndex:Y,w:n});o.plotDataLabelsText({x:m[Y].x,y:m[Y].y,text:Z,textAnchor:"middle",i:N,j:N,parent:y,offsetCorrection:!1,dataLabelsConfig:ve({},V)})}S.add(y)}),s.push(S)}),this.drawPolygons({parent:p}),n.config.xaxis.labels.show){var b=this.drawXAxisTexts();p.add(b)}return s.forEach(function(w){p.add(w)}),p.add(this.yaxisLabels),p}},{key:"drawPolygons",value:function(e){for(var r=this,n=this.w,a=e.parent,s=new fR(this.ctx),o=n.globals.yAxisScale[0].result.reverse(),l=o.length,c=[],u=this.size/(l-1),h=0;h<l;h++)c[h]=u*h;c.reverse();var p=[],m=[];c.forEach(function(x,y){var b=J.getPolygonPos(x,r.dataPointsLen),w="";b.forEach(function(N,A){if(y===0){var S=r.graphics.drawLine(N.x,N.y,0,0,Array.isArray(r.polygons.connectorColors)?r.polygons.connectorColors[A]:r.polygons.connectorColors);m.push(S)}A===0&&r.yaxisLabelsTextsPos.push({x:N.x,y:N.y}),w+=N.x+","+N.y+" "}),p.push(w)}),p.forEach(function(x,y){var b=r.polygons.strokeColors,w=r.polygons.strokeWidth,N=r.graphics.drawPolygon(x,Array.isArray(b)?b[y]:b,Array.isArray(w)?w[y]:w,n.globals.radarPolygons.fill.colors[y]);a.add(N)}),m.forEach(function(x){a.add(x)}),n.config.yaxis[0].show&&this.yaxisLabelsTextsPos.forEach(function(x,y){var b=s.drawYAxisTexts(x.x,x.y,y,o[y]);r.yaxisLabels.add(b)})}},{key:"drawXAxisTexts",value:function(){var e=this,r=this.w,n=r.config.xaxis.labels,a=this.graphics.group({class:"apexcharts-xaxis"}),s=J.getPolygonPos(this.size,this.dataPointsLen);return r.globals.labels.forEach(function(o,l){var c=r.config.xaxis.labels.formatter,u=new gd(e.ctx);if(s[l]){var h=e.getTextPos(s[l],e.size),p=c(o,{seriesIndex:-1,dataPointIndex:l,w:r});u.plotDataLabelsText({x:h.newX,y:h.newY,text:p,textAnchor:h.textAnchor,i:l,j:l,parent:a,className:"apexcharts-xaxis-label",color:Array.isArray(n.style.colors)&&n.style.colors[l]?n.style.colors[l]:"#a8a8a8",dataLabelsConfig:ve({textAnchor:h.textAnchor,dropShadow:{enabled:!1}},n),offsetCorrection:!1}).on("click",function(m){if(typeof r.config.chart.events.xAxisLabelClick=="function"){var x=Object.assign({},r,{labelIndex:l});r.config.chart.events.xAxisLabelClick(m,e.ctx,x)}})}}),a}},{key:"createPaths",value:function(e,r){var n=this,a=[],s=[],o=[],l=[];if(e.length){s=[this.graphics.move(r.x,r.y)],l=[this.graphics.move(r.x,r.y)];var c=this.graphics.move(e[0].x,e[0].y),u=this.graphics.move(e[0].x,e[0].y);e.forEach(function(h,p){c+=n.graphics.line(h.x,h.y),u+=n.graphics.line(h.x,h.y),p===e.length-1&&(c+="Z",u+="Z")}),a.push(c),o.push(u)}return{linePathsFrom:s,linePathsTo:a,areaPathsFrom:l,areaPathsTo:o}}},{key:"getTextPos",value:function(e,r){var n="middle",a=e.x,s=e.y;return Math.abs(e.x)>=10?e.x>0?(n="start",a+=10):e.x<0&&(n="end",a-=10):n="middle",Math.abs(e.y)>=r-10&&(e.y<0?s-=10:e.y>0&&(s+=10)),{textAnchor:n,newX:a,newY:s}}},{key:"getPreviousPath",value:function(e){for(var r=this.w,n=null,a=0;a<r.globals.previousPaths.length;a++){var s=r.globals.previousPaths[a];s.paths.length>0&&parseInt(s.realIndex,10)===parseInt(e,10)&&r.globals.previousPaths[a].paths[0]!==void 0&&(n=r.globals.previousPaths[a].paths[0].d)}return n}},{key:"getDataPointsPos",value:function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.dataPointsLen;e=e||[],r=r||[];for(var a=[],s=0;s<n;s++){var o={};o.x=e[s]*Math.sin(r[s]),o.y=-e[s]*Math.cos(r[s]),a.push(o)}return a}}]),t}(),xK=function(t){Uf(r,pR);var e=Yf(r);function r(n){var a;Se(this,r),(a=e.call(this,n)).ctx=n,a.w=n.w,a.animBeginArr=[0],a.animDur=0;var s=a.w;return a.startAngle=s.config.plotOptions.radialBar.startAngle,a.endAngle=s.config.plotOptions.radialBar.endAngle,a.totalAngle=Math.abs(s.config.plotOptions.radialBar.endAngle-s.config.plotOptions.radialBar.startAngle),a.trackStartAngle=s.config.plotOptions.radialBar.track.startAngle,a.trackEndAngle=s.config.plotOptions.radialBar.track.endAngle,a.barLabels=a.w.config.plotOptions.radialBar.barLabels,a.donutDataLabels=a.w.config.plotOptions.radialBar.dataLabels,a.radialDataLabels=a.donutDataLabels,a.trackStartAngle||(a.trackStartAngle=a.startAngle),a.trackEndAngle||(a.trackEndAngle=a.endAngle),a.endAngle===360&&(a.endAngle=359.99),a.margin=parseInt(s.config.plotOptions.radialBar.track.margin,10),a.onBarLabelClick=a.onBarLabelClick.bind(k_(a)),a}return Ae(r,[{key:"draw",value:function(n){var a=this.w,s=new ge(this.ctx),o=s.group({class:"apexcharts-radialbar"});if(a.globals.noData)return o;var l=s.group(),c=this.defaultSize/2,u=a.globals.gridWidth/2,h=this.defaultSize/2.05;a.config.chart.sparkline.enabled||(h=h-a.config.stroke.width-a.config.chart.dropShadow.blur);var p=a.globals.fill.colors;if(a.config.plotOptions.radialBar.track.show){var m=this.drawTracks({size:h,centerX:u,centerY:c,colorArr:p,series:n});l.add(m)}var x=this.drawArcs({size:h,centerX:u,centerY:c,colorArr:p,series:n}),y=360;a.config.plotOptions.radialBar.startAngle<0&&(y=this.totalAngle);var b=(360-y)/360;if(a.globals.radialSize=h-h*b,this.radialDataLabels.value.show){var w=Math.max(this.radialDataLabels.value.offsetY,this.radialDataLabels.name.offsetY);a.globals.radialSize+=w*b}return l.add(x.g),a.config.plotOptions.radialBar.hollow.position==="front"&&(x.g.add(x.elHollow),x.dataLabels&&x.g.add(x.dataLabels)),o.add(l),o}},{key:"drawTracks",value:function(n){var a=this.w,s=new ge(this.ctx),o=s.group({class:"apexcharts-tracks"}),l=new Gr(this.ctx),c=new Ja(this.ctx),u=this.getStrokeWidth(n);n.size=n.size-u/2;for(var h=0;h<n.series.length;h++){var p=s.group({class:"apexcharts-radialbar-track apexcharts-track"});o.add(p),p.attr({rel:h+1}),n.size=n.size-u-this.margin;var m=a.config.plotOptions.radialBar.track,x=c.fillPath({seriesNumber:0,size:n.size,fillColors:Array.isArray(m.background)?m.background[h]:m.background,solid:!0}),y=this.trackStartAngle,b=this.trackEndAngle;Math.abs(b)+Math.abs(y)>=360&&(b=360-Math.abs(this.startAngle)-.1);var w=s.drawPath({d:"",stroke:x,strokeWidth:u*parseInt(m.strokeWidth,10)/100,fill:"none",strokeOpacity:m.opacity,classes:"apexcharts-radialbar-area"});if(m.dropShadow.enabled){var N=m.dropShadow;l.dropShadow(w,N)}p.add(w),w.attr("id","apexcharts-radialbarTrack-"+h),this.animatePaths(w,{centerX:n.centerX,centerY:n.centerY,endAngle:b,startAngle:y,size:n.size,i:h,totalItems:2,animBeginArr:0,dur:0,isTrack:!0})}return o}},{key:"drawArcs",value:function(n){var a=this.w,s=new ge(this.ctx),o=new Ja(this.ctx),l=new Gr(this.ctx),c=s.group(),u=this.getStrokeWidth(n);n.size=n.size-u/2;var h=a.config.plotOptions.radialBar.hollow.background,p=n.size-u*n.series.length-this.margin*n.series.length-u*parseInt(a.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,m=p-a.config.plotOptions.radialBar.hollow.margin;a.config.plotOptions.radialBar.hollow.image!==void 0&&(h=this.drawHollowImage(n,c,p,h));var x=this.drawHollow({size:m,centerX:n.centerX,centerY:n.centerY,fill:h||"transparent"});if(a.config.plotOptions.radialBar.hollow.dropShadow.enabled){var y=a.config.plotOptions.radialBar.hollow.dropShadow;l.dropShadow(x,y)}var b=1;!this.radialDataLabels.total.show&&a.globals.series.length>1&&(b=0);var w=null;if(this.radialDataLabels.show){var N=a.globals.dom.Paper.findOne(".apexcharts-datalabels-group");w=this.renderInnerDataLabels(N,this.radialDataLabels,{hollowSize:p,centerX:n.centerX,centerY:n.centerY,opacity:b})}a.config.plotOptions.radialBar.hollow.position==="back"&&(c.add(x),w&&c.add(w));var A=!1;a.config.plotOptions.radialBar.inverseOrder&&(A=!0);for(var S=A?n.series.length-1:0;A?S>=0:S<n.series.length;A?S--:S++){var C=s.group({class:"apexcharts-series apexcharts-radial-series",seriesName:J.escapeString(a.globals.seriesNames[S])});c.add(C),C.attr({rel:S+1,"data:realIndex":S}),this.ctx.series.addCollapsedClassToSeries(C,S),n.size=n.size-u-this.margin;var k=o.fillPath({seriesNumber:S,size:n.size,value:n.series[S]}),T=this.startAngle,E=void 0,_=J.negToZero(n.series[S]>100?100:n.series[S])/100,L=Math.round(this.totalAngle*_)+this.startAngle,P=void 0;a.globals.dataChanged&&(E=this.startAngle,P=Math.round(this.totalAngle*J.negToZero(a.globals.previousPaths[S])/100)+E),Math.abs(L)+Math.abs(T)>360&&(L-=.01),Math.abs(P)+Math.abs(E)>360&&(P-=.01);var R=L-T,z=Array.isArray(a.config.stroke.dashArray)?a.config.stroke.dashArray[S]:a.config.stroke.dashArray,B=s.drawPath({d:"",stroke:k,strokeWidth:u,fill:"none",fillOpacity:a.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+S,strokeDashArray:z});if(ge.setAttrs(B.node,{"data:angle":R,"data:value":n.series[S]}),a.config.chart.dropShadow.enabled){var Y=a.config.chart.dropShadow;l.dropShadow(B,Y,S)}if(l.setSelectionFilter(B,0,S),this.addListeners(B,this.radialDataLabels),C.add(B),B.attr({index:0,j:S}),this.barLabels.enabled){var X=J.polarToCartesian(n.centerX,n.centerY,n.size,T),H=this.barLabels.formatter(a.globals.seriesNames[S],{seriesIndex:S,w:a}),W=["apexcharts-radialbar-label"];this.barLabels.onClick||W.push("apexcharts-no-click");var V=this.barLabels.useSeriesColors?a.globals.colors[S]:a.config.chart.foreColor;V||(V=a.config.chart.foreColor);var Z=X.x+this.barLabels.offsetX,F=X.y+this.barLabels.offsetY,G=s.drawText({x:Z,y:F,text:H,textAnchor:"end",dominantBaseline:"middle",fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:V,cssClass:W.join(" ")});G.on("click",this.onBarLabelClick),G.attr({rel:S+1}),T!==0&&G.attr({"transform-origin":"".concat(Z," ").concat(F),transform:"rotate(".concat(T," 0 0)")}),C.add(G)}var te=0;!this.initialAnim||a.globals.resized||a.globals.dataChanged||(te=a.config.chart.animations.speed),a.globals.dataChanged&&(te=a.config.chart.animations.dynamicAnimation.speed),this.animDur=te/(1.2*n.series.length)+this.animDur,this.animBeginArr.push(this.animDur),this.animatePaths(B,{centerX:n.centerX,centerY:n.centerY,endAngle:L,startAngle:T,prevEndAngle:P,prevStartAngle:E,size:n.size,i:S,totalItems:2,animBeginArr:this.animBeginArr,dur:te,shouldSetPrevPaths:!0})}return{g:c,elHollow:x,dataLabels:w}}},{key:"drawHollow",value:function(n){var a=new ge(this.ctx).drawCircle(2*n.size);return a.attr({class:"apexcharts-radialbar-hollow",cx:n.centerX,cy:n.centerY,r:n.size,fill:n.fill}),a}},{key:"drawHollowImage",value:function(n,a,s,o){var l=this.w,c=new Ja(this.ctx),u=J.randomId(),h=l.config.plotOptions.radialBar.hollow.image;if(l.config.plotOptions.radialBar.hollow.imageClipped)c.clippedImgArea({width:s,height:s,image:h,patternID:"pattern".concat(l.globals.cuid).concat(u)}),o="url(#pattern".concat(l.globals.cuid).concat(u,")");else{var p=l.config.plotOptions.radialBar.hollow.imageWidth,m=l.config.plotOptions.radialBar.hollow.imageHeight;if(p===void 0&&m===void 0){var x=l.globals.dom.Paper.image(h,function(b){this.move(n.centerX-b.width/2+l.config.plotOptions.radialBar.hollow.imageOffsetX,n.centerY-b.height/2+l.config.plotOptions.radialBar.hollow.imageOffsetY)});a.add(x)}else{var y=l.globals.dom.Paper.image(h,function(b){this.move(n.centerX-p/2+l.config.plotOptions.radialBar.hollow.imageOffsetX,n.centerY-m/2+l.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(p,m)});a.add(y)}}return o}},{key:"getStrokeWidth",value:function(n){var a=this.w;return n.size*(100-parseInt(a.config.plotOptions.radialBar.hollow.size,10))/100/(n.series.length+1)-this.margin}},{key:"onBarLabelClick",value:function(n){var a=parseInt(n.target.getAttribute("rel"),10)-1,s=this.barLabels.onClick,o=this.w;s&&s(o.globals.seriesNames[a],{w:o,seriesIndex:a})}}]),r}(),bK=function(t){Uf(r,xd);var e=Yf(r);function r(){return Se(this,r),e.apply(this,arguments)}return Ae(r,[{key:"draw",value:function(n,a){var s=this.w,o=new ge(this.ctx);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=n,this.seriesRangeStart=s.globals.seriesRangeStart,this.seriesRangeEnd=s.globals.seriesRangeEnd,this.barHelpers.initVariables(n);for(var l=o.group({class:"apexcharts-rangebar-series apexcharts-plot-series"}),c=0;c<n.length;c++){var u,h,p,m,x=void 0,y=void 0,b=s.globals.comboCharts?a[c]:c,w=this.barHelpers.getGroupIndex(b).columnGroupIndex,N=o.group({class:"apexcharts-series",seriesName:J.escapeString(s.globals.seriesNames[b]),rel:c+1,"data:realIndex":b});this.ctx.series.addCollapsedClassToSeries(N,b),n[c].length>0&&(this.visibleI=this.visibleI+1);var A=0,S=0,C=0;this.yRatio.length>1&&(this.yaxisIndex=s.globals.seriesYAxisReverseMap[b][0],C=b);var k=this.barHelpers.initialPositions(b);y=k.y,m=k.zeroW,x=k.x,S=k.barWidth,A=k.barHeight,u=k.xDivision,h=k.yDivision,p=k.zeroH;for(var T=o.group({class:"apexcharts-datalabels","data:realIndex":b}),E=o.group({class:"apexcharts-rangebar-goals-markers"}),_=0;_<s.globals.dataPoints;_++){var L=this.barHelpers.getStrokeWidth(c,_,b),P=this.seriesRangeStart[c][_],R=this.seriesRangeEnd[c][_],z=null,B=null,Y=null,X={x,y,strokeWidth:L,elSeries:N},H=this.seriesLen;if(s.config.plotOptions.bar.rangeBarGroupRows&&(H=1),s.config.series[c].data[_]===void 0)break;if(this.isHorizontal){Y=y+A*this.visibleI;var W=(h-A*H)/2;if(s.config.series[c].data[_].x){var V=this.detectOverlappingBars({i:c,j:_,barYPosition:Y,srty:W,barHeight:A,yDivision:h,initPositions:k});A=V.barHeight,Y=V.barYPosition}S=(z=this.drawRangeBarPaths(ve({indexes:{i:c,j:_,realIndex:b},barHeight:A,barYPosition:Y,zeroW:m,yDivision:h,y1:P,y2:R},X))).barWidth}else{s.globals.isXNumeric&&(x=(s.globals.seriesX[c][_]-s.globals.minX)/this.xRatio-S/2),B=x+S*this.visibleI;var Z=(u-S*H)/2;if(s.config.series[c].data[_].x){var F=this.detectOverlappingBars({i:c,j:_,barXPosition:B,srtx:Z,barWidth:S,xDivision:u,initPositions:k});S=F.barWidth,B=F.barXPosition}A=(z=this.drawRangeColumnPaths(ve({indexes:{i:c,j:_,realIndex:b,translationsIndex:C},barWidth:S,barXPosition:B,zeroH:p,xDivision:u},X))).barHeight}var G=this.barHelpers.drawGoalLine({barXPosition:z.barXPosition,barYPosition:Y,goalX:z.goalX,goalY:z.goalY,barHeight:A,barWidth:S});G&&E.add(G),y=z.y,x=z.x;var te=this.barHelpers.getPathFillColor(n,c,_,b);this.renderSeries({realIndex:b,pathFill:te.color,lineFill:te.useRangeColor?te.color:s.globals.stroke.colors[b],j:_,i:c,x,y,y1:P,y2:R,pathFrom:z.pathFrom,pathTo:z.pathTo,strokeWidth:L,elSeries:N,series:n,barHeight:A,barWidth:S,barXPosition:B,barYPosition:Y,columnGroupIndex:w,elDataLabelsWrap:T,elGoalsMarkers:E,visibleSeries:this.visibleI,type:"rangebar"})}l.add(N)}return l}},{key:"detectOverlappingBars",value:function(n){var a=n.i,s=n.j,o=n.barYPosition,l=n.barXPosition,c=n.srty,u=n.srtx,h=n.barHeight,p=n.barWidth,m=n.yDivision,x=n.xDivision,y=n.initPositions,b=this.w,w=[],N=b.config.series[a].data[s].rangeName,A=b.config.series[a].data[s].x,S=Array.isArray(A)?A.join(" "):A,C=b.globals.labels.map(function(T){return Array.isArray(T)?T.join(" "):T}).indexOf(S),k=b.globals.seriesRange[a].findIndex(function(T){return T.x===S&&T.overlaps.length>0});return this.isHorizontal?(o=b.config.plotOptions.bar.rangeBarGroupRows?c+m*C:c+h*this.visibleI+m*C,k>-1&&!b.config.plotOptions.bar.rangeBarOverlap&&(w=b.globals.seriesRange[a][k].overlaps).indexOf(N)>-1&&(o=(h=y.barHeight/w.length)*this.visibleI+m*(100-parseInt(this.barOptions.barHeight,10))/100/2+h*(this.visibleI+w.indexOf(N))+m*C)):(C>-1&&!b.globals.timescaleLabels.length&&(l=b.config.plotOptions.bar.rangeBarGroupRows?u+x*C:u+p*this.visibleI+x*C),k>-1&&!b.config.plotOptions.bar.rangeBarOverlap&&(w=b.globals.seriesRange[a][k].overlaps).indexOf(N)>-1&&(l=(p=y.barWidth/w.length)*this.visibleI+x*(100-parseInt(this.barOptions.barWidth,10))/100/2+p*(this.visibleI+w.indexOf(N))+x*C)),{barYPosition:o,barXPosition:l,barHeight:h,barWidth:p}}},{key:"drawRangeColumnPaths",value:function(n){var a=n.indexes,s=n.x,o=n.xDivision,l=n.barWidth,c=n.barXPosition,u=n.zeroH,h=this.w,p=a.i,m=a.j,x=a.realIndex,y=a.translationsIndex,b=this.yRatio[y],w=this.getRangeValue(x,m),N=Math.min(w.start,w.end),A=Math.max(w.start,w.end);this.series[p][m]===void 0||this.series[p][m]===null?N=u:(N=u-N/b,A=u-A/b);var S=Math.abs(A-N),C=this.barHelpers.getColumnPaths({barXPosition:c,barWidth:l,y1:N,y2:A,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:x,i:x,j:m,w:h});if(h.globals.isXNumeric){var k=this.getBarXForNumericXAxis({x:s,j:m,realIndex:x,barWidth:l});s=k.x,c=k.barXPosition}else s+=o;return{pathTo:C.pathTo,pathFrom:C.pathFrom,barHeight:S,x:s,y:w.start<0&&w.end<0?N:A,goalY:this.barHelpers.getGoalValues("y",null,u,p,m,y),barXPosition:c}}},{key:"preventBarOverflow",value:function(n){var a=this.w;return n<0&&(n=0),n>a.globals.gridWidth&&(n=a.globals.gridWidth),n}},{key:"drawRangeBarPaths",value:function(n){var a=n.indexes,s=n.y,o=n.y1,l=n.y2,c=n.yDivision,u=n.barHeight,h=n.barYPosition,p=n.zeroW,m=this.w,x=a.realIndex,y=a.j,b=this.preventBarOverflow(p+o/this.invertedYRatio),w=this.preventBarOverflow(p+l/this.invertedYRatio),N=this.getRangeValue(x,y),A=Math.abs(w-b),S=this.barHelpers.getBarpaths({barYPosition:h,barHeight:u,x1:b,x2:w,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:x,realIndex:x,j:y,w:m});return m.globals.isXNumeric||(s+=c),{pathTo:S.pathTo,pathFrom:S.pathFrom,barWidth:A,x:N.start<0&&N.end<0?b:w,goalX:this.barHelpers.getGoalValues("x",p,null,x,y),y:s}}},{key:"getRangeValue",value:function(n,a){var s=this.w;return{start:s.globals.seriesRangeStart[n][a],end:s.globals.seriesRangeEnd[n][a]}}}]),r}(),yK=function(){function t(e){Se(this,t),this.w=e.w,this.lineCtx=e}return Ae(t,[{key:"sameValueSeriesFix",value:function(e,r){var n=this.w;if((n.config.fill.type==="gradient"||n.config.fill.type[e]==="gradient")&&new ir(this.lineCtx.ctx,n).seriesHaveSameValues(e)){var a=r[e].slice();a[a.length-1]=a[a.length-1]+1e-6,r[e]=a}return r}},{key:"calculatePoints",value:function(e){var r=e.series,n=e.realIndex,a=e.x,s=e.y,o=e.i,l=e.j,c=e.prevY,u=this.w,h=[],p=[],m=this.lineCtx.categoryAxisCorrection+u.config.markers.offsetX;return u.globals.isXNumeric&&(m=(u.globals.seriesX[n][0]-u.globals.minX)/this.lineCtx.xRatio+u.config.markers.offsetX),l===0&&(h.push(m),p.push(J.isNumber(r[o][0])?c+u.config.markers.offsetY:null)),h.push(a+u.config.markers.offsetX),p.push(J.isNumber(r[o][l+1])?s+u.config.markers.offsetY:null),{x:h,y:p}}},{key:"checkPreviousPaths",value:function(e){for(var r=e.pathFromLine,n=e.pathFromArea,a=e.realIndex,s=this.w,o=0;o<s.globals.previousPaths.length;o++){var l=s.globals.previousPaths[o];(l.type==="line"||l.type==="area")&&l.paths.length>0&&parseInt(l.realIndex,10)===parseInt(a,10)&&(l.type==="line"?(this.lineCtx.appendPathFrom=!1,r=s.globals.previousPaths[o].paths[0].d):l.type==="area"&&(this.lineCtx.appendPathFrom=!1,n=s.globals.previousPaths[o].paths[0].d,s.config.stroke.show&&s.globals.previousPaths[o].paths[1]&&(r=s.globals.previousPaths[o].paths[1].d)))}return{pathFromLine:r,pathFromArea:n}}},{key:"determineFirstPrevY",value:function(e){var r,n,a,s=e.i,o=e.realIndex,l=e.series,c=e.prevY,u=e.lineYPosition,h=e.translationsIndex,p=this.w,m=p.config.chart.stacked&&!p.globals.comboCharts||p.config.chart.stacked&&p.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||((r=this.w.config.series[o])===null||r===void 0?void 0:r.type)==="bar"||((n=this.w.config.series[o])===null||n===void 0?void 0:n.type)==="column");if(((a=l[s])===null||a===void 0?void 0:a[0])!==void 0)c=(u=m&&s>0?this.lineCtx.prevSeriesY[s-1][0]:this.lineCtx.zeroY)-l[s][0]/this.lineCtx.yRatio[h]+2*(this.lineCtx.isReversed?l[s][0]/this.lineCtx.yRatio[h]:0);else if(m&&s>0&&l[s][0]===void 0){for(var x=s-1;x>=0;x--)if(l[x][0]!==null&&l[x][0]!==void 0){c=u=this.lineCtx.prevSeriesY[x][0];break}}return{prevY:c,lineYPosition:u}}}]),t}(),vK=function(t){for(var e,r,n,a,s=function(h){for(var p=[],m=h[0],x=h[1],y=p[0]=w1(m,x),b=1,w=h.length-1;b<w;b++)m=x,x=h[b+1],p[b]=.5*(y+(y=w1(m,x)));return p[b]=y,p}(t),o=t.length-1,l=[],c=0;c<o;c++)n=w1(t[c],t[c+1]),Math.abs(n)<1e-6?s[c]=s[c+1]=0:(a=(e=s[c]/n)*e+(r=s[c+1]/n)*r)>9&&(a=3*n/Math.sqrt(a),s[c]=a*e,s[c+1]=a*r);for(var u=0;u<=o;u++)a=(t[Math.min(o,u+1)][0]-t[Math.max(0,u-1)][0])/(6*(1+s[u]*s[u])),l.push([a||0,s[u]*a||0]);return l},wK=function(t){var e=vK(t),r=t[1],n=t[0],a=[],s=e[1],o=e[0];a.push(n,[n[0]+o[0],n[1]+o[1],r[0]-s[0],r[1]-s[1],r[0],r[1]]);for(var l=2,c=e.length;l<c;l++){var u=t[l],h=e[l];a.push([u[0]-h[0],u[1]-h[1],u[0],u[1]])}return a},jK=function(t,e,r){var n=t.slice(e,r);if(e){if(r-e>1&&n[1].length<6){var a=n[0].length;n[1]=[2*n[0][a-2]-n[0][a-4],2*n[0][a-1]-n[0][a-3]].concat(n[1])}n[0]=n[0].slice(-2)}return n};function w1(t,e){return(e[1]-t[1])/(e[0]-t[0])}var j1=function(){function t(e,r,n){Se(this,t),this.ctx=e,this.w=e.w,this.xyRatios=r,this.pointsChart=!(this.w.config.chart.type!=="bubble"&&this.w.config.chart.type!=="scatter")||n,this.scatter=new sR(this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new yK(this),this.markers=new Fd(this.ctx),this.prevSeriesY=[],this.categoryAxisCorrection=0,this.yaxisIndex=0}return Ae(t,[{key:"draw",value:function(e,r,n,a){var s,o=this.w,l=new ge(this.ctx),c=o.globals.comboCharts?r:o.config.chart.type,u=l.group({class:"apexcharts-".concat(c,"-series apexcharts-plot-series")}),h=new ir(this.ctx,o);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,e=h.getLogSeries(e),this.yRatio=h.getLogYRatios(this.yRatio),this.prevSeriesY=[];for(var p=[],m=0;m<e.length;m++){e=this.lineHelpers.sameValueSeriesFix(m,e);var x=o.globals.comboCharts?n[m]:m,y=this.yRatio.length>1?x:0;this._initSerieVariables(e,m,x);var b=[],w=[],N=[],A=o.globals.padHorizontal+this.categoryAxisCorrection;this.ctx.series.addCollapsedClassToSeries(this.elSeries,x),o.globals.isXNumeric&&o.globals.seriesX.length>0&&(A=(o.globals.seriesX[x][0]-o.globals.minX)/this.xRatio),N.push(A);var S,C=A,k=void 0,T=C,E=this.zeroY,_=this.zeroY;E=this.lineHelpers.determineFirstPrevY({i:m,realIndex:x,series:e,prevY:E,lineYPosition:0,translationsIndex:y}).prevY,o.config.stroke.curve==="monotoneCubic"&&e[m][0]===null?b.push(null):b.push(E),S=E,c==="rangeArea"&&(k=_=this.lineHelpers.determineFirstPrevY({i:m,realIndex:x,series:a,prevY:_,lineYPosition:0,translationsIndex:y}).prevY,w.push(b[0]!==null?_:null));var L=this._calculatePathsFrom({type:c,series:e,i:m,realIndex:x,translationsIndex:y,prevX:T,prevY:E,prevY2:_}),P=[b[0]],R=[w[0]],z={type:c,series:e,realIndex:x,translationsIndex:y,i:m,x:A,y:1,pX:C,pY:S,pathsFrom:L,linePaths:[],areaPaths:[],seriesIndex:n,lineYPosition:0,xArrj:N,yArrj:b,y2Arrj:w,seriesRangeEnd:a},B=this._iterateOverDataPoints(ve(ve({},z),{},{iterations:c==="rangeArea"?e[m].length-1:void 0,isRangeStart:!0}));if(c==="rangeArea"){for(var Y=this._calculatePathsFrom({series:a,i:m,realIndex:x,prevX:T,prevY:_}),X=this._iterateOverDataPoints(ve(ve({},z),{},{series:a,xArrj:[A],yArrj:P,y2Arrj:R,pY:k,areaPaths:B.areaPaths,pathsFrom:Y,iterations:a[m].length-1,isRangeStart:!1})),H=B.linePaths.length/2,W=0;W<H;W++)B.linePaths[W]=X.linePaths[W+H]+B.linePaths[W];B.linePaths.splice(H),B.pathFromLine=X.pathFromLine+B.pathFromLine}else B.pathFromArea+="z";this._handlePaths({type:c,realIndex:x,i:m,paths:B}),this.elSeries.add(this.elPointsMain),this.elSeries.add(this.elDataLabelsWrap),p.push(this.elSeries)}if(((s=o.config.series[0])===null||s===void 0?void 0:s.zIndex)!==void 0&&p.sort(function(F,G){return Number(F.node.getAttribute("zIndex"))-Number(G.node.getAttribute("zIndex"))}),o.config.chart.stacked)for(var V=p.length-1;V>=0;V--)u.add(p[V]);else for(var Z=0;Z<p.length;Z++)u.add(p[Z]);return u}},{key:"_initSerieVariables",value:function(e,r,n){var a=this.w,s=new ge(this.ctx);this.xDivision=a.globals.gridWidth/(a.globals.dataPoints-(a.config.xaxis.tickPlacement==="on"?1:0)),this.strokeWidth=Array.isArray(a.config.stroke.width)?a.config.stroke.width[n]:a.config.stroke.width;var o=0;if(this.yRatio.length>1&&(this.yaxisIndex=a.globals.seriesYAxisReverseMap[n],o=n),this.isReversed=a.config.yaxis[this.yaxisIndex]&&a.config.yaxis[this.yaxisIndex].reversed,this.zeroY=a.globals.gridHeight-this.baseLineY[o]-(this.isReversed?a.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[o]:0),this.areaBottomY=this.zeroY,(this.zeroY>a.globals.gridHeight||a.config.plotOptions.area.fillTo==="end")&&(this.areaBottomY=a.globals.gridHeight),this.categoryAxisCorrection=this.xDivision/2,this.elSeries=s.group({class:"apexcharts-series",zIndex:a.config.series[n].zIndex!==void 0?a.config.series[n].zIndex:n,seriesName:J.escapeString(a.globals.seriesNames[n])}),this.elPointsMain=s.group({class:"apexcharts-series-markers-wrap","data:realIndex":n}),a.globals.hasNullValues){var l=this.markers.plotChartMarkers({pointsPos:{x:[0],y:[a.globals.gridHeight+a.globals.markers.largestSize]},seriesIndex:r,j:0,pSize:.1,alwaysDrawMarker:!0,isVirtualPoint:!0});l!==null&&this.elPointsMain.add(l)}this.elDataLabelsWrap=s.group({class:"apexcharts-datalabels","data:realIndex":n});var c=e[r].length===a.globals.dataPoints;this.elSeries.attr({"data:longestSeries":c,rel:r+1,"data:realIndex":n}),this.appendPathFrom=!0}},{key:"_calculatePathsFrom",value:function(e){var r,n,a,s,o=e.type,l=e.series,c=e.i,u=e.realIndex,h=e.translationsIndex,p=e.prevX,m=e.prevY,x=e.prevY2,y=this.w,b=new ge(this.ctx);if(l[c][0]===null){for(var w=0;w<l[c].length;w++)if(l[c][w]!==null){p=this.xDivision*w,m=this.zeroY-l[c][w]/this.yRatio[h],r=b.move(p,m),n=b.move(p,this.areaBottomY);break}}else r=b.move(p,m),o==="rangeArea"&&(r=b.move(p,x)+b.line(p,m)),n=b.move(p,this.areaBottomY)+b.line(p,m);if(a=b.move(0,this.areaBottomY)+b.line(0,this.areaBottomY),s=b.move(0,this.areaBottomY)+b.line(0,this.areaBottomY),y.globals.previousPaths.length>0){var N=this.lineHelpers.checkPreviousPaths({pathFromLine:a,pathFromArea:s,realIndex:u});a=N.pathFromLine,s=N.pathFromArea}return{prevX:p,prevY:m,linePath:r,areaPath:n,pathFromLine:a,pathFromArea:s}}},{key:"_handlePaths",value:function(e){var r=e.type,n=e.realIndex,a=e.i,s=e.paths,o=this.w,l=new ge(this.ctx),c=new Ja(this.ctx);this.prevSeriesY.push(s.yArrj),o.globals.seriesXvalues[n]=s.xArrj,o.globals.seriesYvalues[n]=s.yArrj;var u=o.config.forecastDataPoints;if(u.count>0&&r!=="rangeArea"){var h=o.globals.seriesXvalues[n][o.globals.seriesXvalues[n].length-u.count-1],p=l.drawRect(h,0,o.globals.gridWidth,o.globals.gridHeight,0);o.globals.dom.elForecastMask.appendChild(p.node);var m=l.drawRect(0,0,h,o.globals.gridHeight,0);o.globals.dom.elNonForecastMask.appendChild(m.node)}this.pointsChart||o.globals.delayedElements.push({el:this.elPointsMain.node,index:n});var x={i:a,realIndex:n,animationDelay:a,initialSpeed:o.config.chart.animations.speed,dataChangeSpeed:o.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(r)};if(r==="area")for(var y=c.fillPath({seriesNumber:n}),b=0;b<s.areaPaths.length;b++){var w=l.renderPaths(ve(ve({},x),{},{pathFrom:s.pathFromArea,pathTo:s.areaPaths[b],stroke:"none",strokeWidth:0,strokeLineCap:null,fill:y}));this.elSeries.add(w)}if(o.config.stroke.show&&!this.pointsChart){var N=null;if(r==="line")N=c.fillPath({seriesNumber:n,i:a});else if(o.config.stroke.fill.type==="solid")N=o.globals.stroke.colors[n];else{var A=o.config.fill;o.config.fill=o.config.stroke.fill,N=c.fillPath({seriesNumber:n,i:a}),o.config.fill=A}for(var S=0;S<s.linePaths.length;S++){var C=N;r==="rangeArea"&&(C=c.fillPath({seriesNumber:n}));var k=ve(ve({},x),{},{pathFrom:s.pathFromLine,pathTo:s.linePaths[S],stroke:N,strokeWidth:this.strokeWidth,strokeLineCap:o.config.stroke.lineCap,fill:r==="rangeArea"?C:"none"}),T=l.renderPaths(k);if(this.elSeries.add(T),T.attr("fill-rule","evenodd"),u.count>0&&r!=="rangeArea"){var E=l.renderPaths(k);E.node.setAttribute("stroke-dasharray",u.dashArray),u.strokeWidth&&E.node.setAttribute("stroke-width",u.strokeWidth),this.elSeries.add(E),E.attr("clip-path","url(#forecastMask".concat(o.globals.cuid,")")),T.attr("clip-path","url(#nonForecastMask".concat(o.globals.cuid,")"))}}}}},{key:"_iterateOverDataPoints",value:function(e){var r,n,a=this,s=e.type,o=e.series,l=e.iterations,c=e.realIndex,u=e.translationsIndex,h=e.i,p=e.x,m=e.y,x=e.pX,y=e.pY,b=e.pathsFrom,w=e.linePaths,N=e.areaPaths,A=e.seriesIndex,S=e.lineYPosition,C=e.xArrj,k=e.yArrj,T=e.y2Arrj,E=e.isRangeStart,_=e.seriesRangeEnd,L=this.w,P=new ge(this.ctx),R=this.yRatio,z=b.prevY,B=b.linePath,Y=b.areaPath,X=b.pathFromLine,H=b.pathFromArea,W=J.isNumber(L.globals.minYArr[c])?L.globals.minYArr[c]:L.globals.minY;l||(l=L.globals.dataPoints>1?L.globals.dataPoints-1:L.globals.dataPoints);var V=function(ue,je){return je-ue/R[u]+2*(a.isReversed?ue/R[u]:0)},Z=m,F=L.config.chart.stacked&&!L.globals.comboCharts||L.config.chart.stacked&&L.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||((r=this.w.config.series[c])===null||r===void 0?void 0:r.type)==="bar"||((n=this.w.config.series[c])===null||n===void 0?void 0:n.type)==="column"),G=L.config.stroke.curve;Array.isArray(G)&&(G=Array.isArray(A)?G[A[h]]:G[h]);for(var te,K=0,U=0;U<l&&o[h].length!==0;U++){var re=o[h][U+1]===void 0||o[h][U+1]===null;if(L.globals.isXNumeric){var ae=L.globals.seriesX[c][U+1];L.globals.seriesX[c][U+1]===void 0&&(ae=L.globals.seriesX[c][l-1]),p=(ae-L.globals.minX)/this.xRatio}else p+=this.xDivision;F?h>0&&L.globals.collapsedSeries.length<L.config.series.length-1?S=this.prevSeriesY[function(ue){for(var je=ue;je>0;je--){if(!(L.globals.collapsedSeriesIndices.indexOf(A?.[je]||je)>-1))return je;je--}return 0}(h-1)][U+1]:S=this.zeroY:S=this.zeroY,re?m=V(W,S):(m=V(o[h][U+1],S),s==="rangeArea"&&(Z=V(_[h][U+1],S))),C.push(o[h][U+1]===null?null:p),!re||L.config.stroke.curve!=="smooth"&&L.config.stroke.curve!=="monotoneCubic"?(k.push(m),T.push(Z)):(k.push(null),T.push(null));var we=this.lineHelpers.calculatePoints({series:o,x:p,y:m,realIndex:c,i:h,j:U,prevY:z}),ye=this._createPaths({type:s,series:o,i:h,realIndex:c,j:U,x:p,y:m,y2:Z,xArrj:C,yArrj:k,y2Arrj:T,pX:x,pY:y,pathState:K,segmentStartX:te,linePath:B,areaPath:Y,linePaths:w,areaPaths:N,curve:G,isRangeStart:E});N=ye.areaPaths,w=ye.linePaths,x=ye.pX,y=ye.pY,K=ye.pathState,te=ye.segmentStartX,Y=ye.areaPath,B=ye.linePath,!this.appendPathFrom||L.globals.hasNullValues||G==="monotoneCubic"&&s==="rangeArea"||(X+=P.line(p,this.areaBottomY),H+=P.line(p,this.areaBottomY)),this.handleNullDataPoints(o,we,h,U,c),this._handleMarkersAndLabels({type:s,pointsPos:we,i:h,j:U,realIndex:c,isRangeStart:E})}return{yArrj:k,xArrj:C,pathFromArea:H,areaPaths:N,pathFromLine:X,linePaths:w,linePath:B,areaPath:Y}}},{key:"_handleMarkersAndLabels",value:function(e){var r=e.type,n=e.pointsPos,a=e.isRangeStart,s=e.i,o=e.j,l=e.realIndex,c=this.w,u=new gd(this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,o,{realIndex:l,pointsPos:n,zRatio:this.zRatio,elParent:this.elPointsMain});else{c.globals.series[s].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");var h=this.markers.plotChartMarkers({pointsPos:n,seriesIndex:l,j:o+1});h!==null&&this.elPointsMain.add(h)}var p=u.drawDataLabel({type:r,isRangeStart:a,pos:n,i:l,j:o+1});p!==null&&this.elDataLabelsWrap.add(p)}},{key:"_createPaths",value:function(e){var r=e.type,n=e.series,a=e.i;e.realIndex;var s,o=e.j,l=e.x,c=e.y,u=e.xArrj,h=e.yArrj,p=e.y2,m=e.y2Arrj,x=e.pX,y=e.pY,b=e.pathState,w=e.segmentStartX,N=e.linePath,A=e.areaPath,S=e.linePaths,C=e.areaPaths,k=e.curve,T=e.isRangeStart,E=new ge(this.ctx),_=this.areaBottomY,L=r==="rangeArea",P=r==="rangeArea"&&T;switch(k){case"monotoneCubic":var R=T?h:m;switch(b){case 0:if(R[o+1]===null)break;b=1;case 1:if(!(L?u.length===n[a].length:o===n[a].length-2))break;case 2:var z=T?u:u.slice().reverse(),B=T?R:R.slice().reverse(),Y=(s=B,z.map(function(ae,we){return[ae,s[we]]}).filter(function(ae){return ae[1]!==null})),X=Y.length>1?wK(Y):Y,H=[];L&&(P?C=Y:H=C.reverse());var W=0,V=0;if(function(ae,we){for(var ye=function(pe){var Ye=[],Re=0;return pe.forEach(function(gt){gt!==null?Re++:Re>0&&(Ye.push(Re),Re=0)}),Re>0&&Ye.push(Re),Ye}(ae),ue=[],je=0,Ce=0;je<ye.length;Ce+=ye[je++])ue[je]=jK(we,Ce,Ce+ye[je]);return ue}(B,X).forEach(function(ae){W++;var we=function(je){for(var Ce="",pe=0;pe<je.length;pe++){var Ye=je[pe],Re=Ye.length;Re>4?(Ce+="C".concat(Ye[0],", ").concat(Ye[1]),Ce+=", ".concat(Ye[2],", ").concat(Ye[3]),Ce+=", ".concat(Ye[4],", ").concat(Ye[5])):Re>2&&(Ce+="S".concat(Ye[0],", ").concat(Ye[1]),Ce+=", ".concat(Ye[2],", ").concat(Ye[3]))}return Ce}(ae),ye=V,ue=(V+=ae.length)-1;P?N=E.move(Y[ye][0],Y[ye][1])+we:L?N=E.move(H[ye][0],H[ye][1])+E.line(Y[ye][0],Y[ye][1])+we+E.line(H[ue][0],H[ue][1]):(N=E.move(Y[ye][0],Y[ye][1])+we,A=N+E.line(Y[ue][0],_)+E.line(Y[ye][0],_)+"z",C.push(A)),S.push(N)}),L&&W>1&&!P){var Z=S.slice(W).reverse();S.splice(W),Z.forEach(function(ae){return S.push(ae)})}b=0}break;case"smooth":var F=.35*(l-x);if(n[a][o]===null)b=0;else switch(b){case 0:if(w=x,N=P?E.move(x,m[o])+E.line(x,y):E.move(x,y),A=E.move(x,y),n[a][o+1]===null||n[a][o+1]===void 0){S.push(N),C.push(A);break}if(b=1,o<n[a].length-2){var G=E.curve(x+F,y,l-F,c,l,c);N+=G,A+=G;break}case 1:if(n[a][o+1]===null)N+=P?E.line(x,p):E.move(x,y),A+=E.line(x,_)+E.line(w,_)+"z",S.push(N),C.push(A),b=-1;else{var te=E.curve(x+F,y,l-F,c,l,c);N+=te,A+=te,o>=n[a].length-2&&(P&&(N+=E.curve(l,c,l,c,l,p)+E.move(l,p)),A+=E.curve(l,c,l,c,l,_)+E.line(w,_)+"z",S.push(N),C.push(A),b=-1)}}x=l,y=c;break;default:var K=function(ae,we,ye){var ue=[];switch(ae){case"stepline":ue=E.line(we,null,"H")+E.line(null,ye,"V");break;case"linestep":ue=E.line(null,ye,"V")+E.line(we,null,"H");break;case"straight":ue=E.line(we,ye)}return ue};if(n[a][o]===null)b=0;else switch(b){case 0:if(w=x,N=P?E.move(x,m[o])+E.line(x,y):E.move(x,y),A=E.move(x,y),n[a][o+1]===null||n[a][o+1]===void 0){S.push(N),C.push(A);break}if(b=1,o<n[a].length-2){var U=K(k,l,c);N+=U,A+=U;break}case 1:if(n[a][o+1]===null)N+=P?E.line(x,p):E.move(x,y),A+=E.line(x,_)+E.line(w,_)+"z",S.push(N),C.push(A),b=-1;else{var re=K(k,l,c);N+=re,A+=re,o>=n[a].length-2&&(P&&(N+=E.line(l,p)),A+=E.line(l,_)+E.line(w,_)+"z",S.push(N),C.push(A),b=-1)}}x=l,y=c}return{linePaths:S,areaPaths:C,pX:x,pY:y,pathState:b,segmentStartX:w,linePath:N,areaPath:A}}},{key:"handleNullDataPoints",value:function(e,r,n,a,s){var o=this.w;if(e[n][a]===null&&o.config.markers.showNullDataPoints||e[n].length===1){var l=this.strokeWidth-o.config.markers.strokeWidth/2;l>0||(l=0);var c=this.markers.plotChartMarkers({pointsPos:r,seriesIndex:s,j:a+1,pSize:l,alwaysDrawMarker:!0});c!==null&&this.elPointsMain.add(c)}}}]),t}();window.TreemapSquared={},window.TreemapSquared.generate=function(){function t(l,c,u,h){this.xoffset=l,this.yoffset=c,this.height=h,this.width=u,this.shortestEdge=function(){return Math.min(this.height,this.width)},this.getCoordinates=function(p){var m,x=[],y=this.xoffset,b=this.yoffset,w=s(p)/this.height,N=s(p)/this.width;if(this.width>=this.height)for(m=0;m<p.length;m++)x.push([y,b,y+w,b+p[m]/w]),b+=p[m]/w;else for(m=0;m<p.length;m++)x.push([y,b,y+p[m]/N,b+N]),y+=p[m]/N;return x},this.cutArea=function(p){var m;if(this.width>=this.height){var x=p/this.height,y=this.width-x;m=new t(this.xoffset+x,this.yoffset,y,this.height)}else{var b=p/this.width,w=this.height-b;m=new t(this.xoffset,this.yoffset+b,this.width,w)}return m}}function e(l,c,u,h,p){h=h===void 0?0:h,p=p===void 0?0:p;var m=r(function(x,y){var b,w=[],N=y/s(x);for(b=0;b<x.length;b++)w[b]=x[b]*N;return w}(l,c*u),[],new t(h,p,c,u),[]);return function(x){var y,b,w=[];for(y=0;y<x.length;y++)for(b=0;b<x[y].length;b++)w.push(x[y][b]);return w}(m)}function r(l,c,u,h){var p,m,x;if(l.length!==0)return p=u.shortestEdge(),function(y,b,w){var N;if(y.length===0)return!0;(N=y.slice()).push(b);var A=n(y,w),S=n(N,w);return A>=S}(c,m=l[0],p)?(c.push(m),r(l.slice(1),c,u,h)):(x=u.cutArea(s(c),h),h.push(u.getCoordinates(c)),r(l,[],x,h)),h;h.push(u.getCoordinates(c))}function n(l,c){var u=Math.min.apply(Math,l),h=Math.max.apply(Math,l),p=s(l);return Math.max(Math.pow(c,2)*h/Math.pow(p,2),Math.pow(p,2)/(Math.pow(c,2)*u))}function a(l){return l&&l.constructor===Array}function s(l){var c,u=0;for(c=0;c<l.length;c++)u+=l[c];return u}function o(l){var c,u=0;if(a(l[0]))for(c=0;c<l.length;c++)u+=o(l[c]);else u=s(l);return u}return function l(c,u,h,p,m){p=p===void 0?0:p,m=m===void 0?0:m;var x,y,b=[],w=[];if(a(c[0])){for(y=0;y<c.length;y++)b[y]=o(c[y]);for(x=e(b,u,h,p,m),y=0;y<c.length;y++)w.push(l(c[y],x[y][2]-x[y][0],x[y][3]-x[y][1],x[y][0],x[y][1]))}else w=e(c,u,h,p,m);return w}}();var NK=function(){function t(e,r){Se(this,t),this.ctx=e,this.w=e.w,this.strokeWidth=this.w.config.stroke.width,this.helpers=new hR(e),this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.labels=[]}return Ae(t,[{key:"draw",value:function(e){var r=this,n=this.w,a=new ge(this.ctx),s=new Ja(this.ctx),o=a.group({class:"apexcharts-treemap"});if(n.globals.noData)return o;var l=[];return e.forEach(function(c){var u=c.map(function(h){return Math.abs(h)});l.push(u)}),this.negRange=this.helpers.checkColorRange(),n.config.series.forEach(function(c,u){c.data.forEach(function(h){Array.isArray(r.labels[u])||(r.labels[u]=[]),r.labels[u].push(h.x)})}),window.TreemapSquared.generate(l,n.globals.gridWidth,n.globals.gridHeight).forEach(function(c,u){var h=a.group({class:"apexcharts-series apexcharts-treemap-series",seriesName:J.escapeString(n.globals.seriesNames[u]),rel:u+1,"data:realIndex":u});if(n.config.chart.dropShadow.enabled){var p=n.config.chart.dropShadow;new Gr(r.ctx).dropShadow(o,p,u)}var m=a.group({class:"apexcharts-data-labels"}),x={xMin:1/0,yMin:1/0,xMax:-1/0,yMax:-1/0};c.forEach(function(X,H){var W=X[0],V=X[1],Z=X[2],F=X[3];x.xMin=Math.min(x.xMin,W),x.yMin=Math.min(x.yMin,V),x.xMax=Math.max(x.xMax,Z),x.yMax=Math.max(x.yMax,F);var G=r.helpers.getShadeColor(n.config.chart.type,u,H,r.negRange),te=G.color,K=s.fillPath({color:te,seriesNumber:u,dataPointIndex:H}),U=a.drawRect(W,V,Z-W,F-V,n.config.plotOptions.treemap.borderRadius,"#fff",1,r.strokeWidth,n.config.plotOptions.treemap.useFillColorAsStroke?te:n.globals.stroke.colors[u]);U.attr({cx:W,cy:V,index:u,i:u,j:H,width:Z-W,height:F-V,fill:K}),U.node.classList.add("apexcharts-treemap-rect"),r.helpers.addListeners(U);var re={x:W+(Z-W)/2,y:V+(F-V)/2,width:0,height:0},ae={x:W,y:V,width:Z-W,height:F-V};if(n.config.chart.animations.enabled&&!n.globals.dataChanged){var we=1;n.globals.resized||(we=n.config.chart.animations.speed),r.animateTreemap(U,re,ae,we)}if(n.globals.dataChanged){var ye=1;r.dynamicAnim.enabled&&n.globals.shouldAnimate&&(ye=r.dynamicAnim.speed,n.globals.previousPaths[u]&&n.globals.previousPaths[u][H]&&n.globals.previousPaths[u][H].rect&&(re=n.globals.previousPaths[u][H].rect),r.animateTreemap(U,re,ae,ye))}var ue=r.getFontSize(X),je=n.config.dataLabels.formatter(r.labels[u][H],{value:n.globals.series[u][H],seriesIndex:u,dataPointIndex:H,w:n});n.config.plotOptions.treemap.dataLabels.format==="truncate"&&(ue=parseInt(n.config.dataLabels.style.fontSize,10),je=r.truncateLabels(je,ue,W,V,Z,F));var Ce=null;n.globals.series[u][H]&&(Ce=r.helpers.calculateDataLabels({text:je,x:(W+Z)/2,y:(V+F)/2+r.strokeWidth/2+ue/3,i:u,j:H,colorProps:G,fontSize:ue,series:e})),n.config.dataLabels.enabled&&Ce&&r.rotateToFitLabel(Ce,ue,je,W,V,Z,F),h.add(U),Ce!==null&&h.add(Ce)});var y=n.config.plotOptions.treemap.seriesTitle;if(n.config.series.length>1&&y&&y.show){var b=n.config.series[u].name||"";if(b&&x.xMin<1/0&&x.yMin<1/0){var w=y.offsetX,N=y.offsetY,A=y.borderColor,S=y.borderWidth,C=y.borderRadius,k=y.style,T=k.color||n.config.chart.foreColor,E={left:k.padding.left,right:k.padding.right,top:k.padding.top,bottom:k.padding.bottom},_=a.getTextRects(b,k.fontSize,k.fontFamily),L=_.width+E.left+E.right,P=_.height+E.top+E.bottom,R=x.xMin+(w||0),z=x.yMin+(N||0),B=a.drawRect(R,z,L,P,C,k.background,1,S,A),Y=a.drawText({x:R+E.left,y:z+E.top+.75*_.height,text:b,fontSize:k.fontSize,fontFamily:k.fontFamily,fontWeight:k.fontWeight,foreColor:T,cssClass:k.cssClass||""});h.add(B),h.add(Y)}}h.add(m),o.add(h)}),o}},{key:"getFontSize",value:function(e){var r=this.w,n=function a(s){var o,l=0;if(Array.isArray(s[0]))for(o=0;o<s.length;o++)l+=a(s[o]);else for(o=0;o<s.length;o++)l+=s[o].length;return l}(this.labels)/function a(s){var o,l=0;if(Array.isArray(s[0]))for(o=0;o<s.length;o++)l+=a(s[o]);else for(o=0;o<s.length;o++)l+=1;return l}(this.labels);return function(a,s){var o=a*s,l=Math.pow(o,.5);return Math.min(l/n,parseInt(r.config.dataLabels.style.fontSize,10))}(e[2]-e[0],e[3]-e[1])}},{key:"rotateToFitLabel",value:function(e,r,n,a,s,o,l){var c=new ge(this.ctx),u=c.getTextRects(n,r);if(u.width+this.w.config.stroke.width+5>o-a&&u.width<=l-s){var h=c.rotateAroundCenter(e.node);e.node.setAttribute("transform","rotate(-90 ".concat(h.x," ").concat(h.y,") translate(").concat(u.height/3,")"))}}},{key:"truncateLabels",value:function(e,r,n,a,s,o){var l=new ge(this.ctx),c=l.getTextRects(e,r).width+this.w.config.stroke.width+5>s-n&&o-a>s-n?o-a:s-n,u=l.getTextBasedOnMaxWidth({text:e,maxWidth:c,fontSize:r});return e.length!==u.length&&c/r<5?"":u}},{key:"animateTreemap",value:function(e,r,n,a){var s=new Ld(this.ctx);s.animateRect(e,r,n,a,function(){s.animationCompleted(e)})}}]),t}(),mR=86400,SK=10/mR,AK=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w,this.timeScaleArray=[],this.utc=this.w.config.xaxis.labels.datetimeUTC}return Ae(t,[{key:"calculateTimeScaleTicks",value:function(e,r){var n=this,a=this.w;if(a.globals.allSeriesCollapsed)return a.globals.labels=[],a.globals.timescaleLabels=[],[];var s=new Vr(this.ctx),o=(r-e)/864e5;this.determineInterval(o),a.globals.disableZoomIn=!1,a.globals.disableZoomOut=!1,o<SK?a.globals.disableZoomIn=!0:o>5e4&&(a.globals.disableZoomOut=!0);var l=s.getTimeUnitsfromTimestamp(e,r,this.utc),c=a.globals.gridWidth/o,u=c/24,h=u/60,p=h/60,m=Math.floor(24*o),x=Math.floor(1440*o),y=Math.floor(o*mR),b=Math.floor(o),w=Math.floor(o/30),N=Math.floor(o/365),A={minMillisecond:l.minMillisecond,minSecond:l.minSecond,minMinute:l.minMinute,minHour:l.minHour,minDate:l.minDate,minMonth:l.minMonth,minYear:l.minYear},S={firstVal:A,currentMillisecond:A.minMillisecond,currentSecond:A.minSecond,currentMinute:A.minMinute,currentHour:A.minHour,currentMonthDate:A.minDate,currentDate:A.minDate,currentMonth:A.minMonth,currentYear:A.minYear,daysWidthOnXAxis:c,hoursWidthOnXAxis:u,minutesWidthOnXAxis:h,secondsWidthOnXAxis:p,numberOfSeconds:y,numberOfMinutes:x,numberOfHours:m,numberOfDays:b,numberOfMonths:w,numberOfYears:N};switch(this.tickInterval){case"years":this.generateYearScale(S);break;case"months":case"half_year":this.generateMonthScale(S);break;case"months_days":case"months_fortnight":case"days":case"week_days":this.generateDayScale(S);break;case"hours":this.generateHourScale(S);break;case"minutes_fives":case"minutes":this.generateMinuteScale(S);break;case"seconds_tens":case"seconds_fives":case"seconds":this.generateSecondScale(S)}var C=this.timeScaleArray.map(function(k){var T={position:k.position,unit:k.unit,year:k.year,day:k.day?k.day:1,hour:k.hour?k.hour:0,month:k.month+1};return k.unit==="month"?ve(ve({},T),{},{day:1,value:k.value+1}):k.unit==="day"||k.unit==="hour"?ve(ve({},T),{},{value:k.value}):k.unit==="minute"?ve(ve({},T),{},{value:k.value,minute:k.value}):k.unit==="second"?ve(ve({},T),{},{value:k.value,minute:k.minute,second:k.second}):k});return C.filter(function(k){var T=1,E=Math.ceil(a.globals.gridWidth/120),_=k.value;a.config.xaxis.tickAmount!==void 0&&(E=a.config.xaxis.tickAmount),C.length>E&&(T=Math.floor(C.length/E));var L=!1,P=!1;switch(n.tickInterval){case"years":k.unit==="year"&&(L=!0);break;case"half_year":T=7,k.unit==="year"&&(L=!0);break;case"months":T=1,k.unit==="year"&&(L=!0);break;case"months_fortnight":T=15,k.unit!=="year"&&k.unit!=="month"||(L=!0),_===30&&(P=!0);break;case"months_days":T=10,k.unit==="month"&&(L=!0),_===30&&(P=!0);break;case"week_days":T=8,k.unit==="month"&&(L=!0);break;case"days":T=1,k.unit==="month"&&(L=!0);break;case"hours":k.unit==="day"&&(L=!0);break;case"minutes_fives":case"seconds_fives":_%5!=0&&(P=!0);break;case"seconds_tens":_%10!=0&&(P=!0)}if(n.tickInterval==="hours"||n.tickInterval==="minutes_fives"||n.tickInterval==="seconds_tens"||n.tickInterval==="seconds_fives"){if(!P)return!0}else if((_%T==0||L)&&!P)return!0})}},{key:"recalcDimensionsBasedOnFormat",value:function(e,r){var n=this.w,a=this.formatDates(e),s=this.removeOverlappingTS(a);n.globals.timescaleLabels=s.slice(),new xx(this.ctx).plotCoords()}},{key:"determineInterval",value:function(e){var r=24*e,n=60*r;switch(!0){case e/365>5:this.tickInterval="years";break;case e>800:this.tickInterval="half_year";break;case e>180:this.tickInterval="months";break;case e>90:this.tickInterval="months_fortnight";break;case e>60:this.tickInterval="months_days";break;case e>30:this.tickInterval="week_days";break;case e>2:this.tickInterval="days";break;case r>2.4:this.tickInterval="hours";break;case n>15:this.tickInterval="minutes_fives";break;case n>5:this.tickInterval="minutes";break;case n>1:this.tickInterval="seconds_tens";break;case 60*n>20:this.tickInterval="seconds_fives";break;default:this.tickInterval="seconds"}}},{key:"generateYearScale",value:function(e){var r=e.firstVal,n=e.currentMonth,a=e.currentYear,s=e.daysWidthOnXAxis,o=e.numberOfYears,l=r.minYear,c=0,u=new Vr(this.ctx),h="year";if(r.minDate>1||r.minMonth>0){var p=u.determineRemainingDaysOfYear(r.minYear,r.minMonth,r.minDate);c=(u.determineDaysOfYear(r.minYear)-p+1)*s,l=r.minYear+1,this.timeScaleArray.push({position:c,value:l,unit:h,year:l,month:J.monthMod(n+1)})}else r.minDate===1&&r.minMonth===0&&this.timeScaleArray.push({position:c,value:l,unit:h,year:a,month:J.monthMod(n+1)});for(var m=l,x=c,y=0;y<o;y++)m++,x=u.determineDaysOfYear(m-1)*s+x,this.timeScaleArray.push({position:x,value:m,unit:h,year:m,month:1})}},{key:"generateMonthScale",value:function(e){var r=e.firstVal,n=e.currentMonthDate,a=e.currentMonth,s=e.currentYear,o=e.daysWidthOnXAxis,l=e.numberOfMonths,c=a,u=0,h=new Vr(this.ctx),p="month",m=0;if(r.minDate>1){u=(h.determineDaysOfMonths(a+1,r.minYear)-n+1)*o,c=J.monthMod(a+1);var x=s+m,y=J.monthMod(c),b=c;c===0&&(p="year",b=x,y=1,x+=m+=1),this.timeScaleArray.push({position:u,value:b,unit:p,year:x,month:y})}else this.timeScaleArray.push({position:u,value:c,unit:p,year:s,month:J.monthMod(a)});for(var w=c+1,N=u,A=0,S=1;A<l;A++,S++){(w=J.monthMod(w))===0?(p="year",m+=1):p="month";var C=this._getYear(s,w,m);N=h.determineDaysOfMonths(w,C)*o+N;var k=w===0?C:w;this.timeScaleArray.push({position:N,value:k,unit:p,year:C,month:w===0?1:w}),w++}}},{key:"generateDayScale",value:function(e){var r=e.firstVal,n=e.currentMonth,a=e.currentYear,s=e.hoursWidthOnXAxis,o=e.numberOfDays,l=new Vr(this.ctx),c="day",u=r.minDate+1,h=u,p=function(S,C,k){return S>l.determineDaysOfMonths(C+1,k)&&(h=1,c="month",x=C+=1),C},m=(24-r.minHour)*s,x=u,y=p(h,n,a);r.minHour===0&&r.minDate===1?(m=0,x=J.monthMod(r.minMonth),c="month",h=r.minDate):r.minDate!==1&&r.minHour===0&&r.minMinute===0&&(m=0,u=r.minDate,x=u,y=p(h=u,n,a),x!==1&&(c="day")),this.timeScaleArray.push({position:m,value:x,unit:c,year:this._getYear(a,y,0),month:J.monthMod(y),day:h});for(var b=m,w=0;w<o;w++){c="day",y=p(h+=1,y,this._getYear(a,y,0));var N=this._getYear(a,y,0);b=24*s+b;var A=h===1?J.monthMod(y):h;this.timeScaleArray.push({position:b,value:A,unit:c,year:N,month:J.monthMod(y),day:A})}}},{key:"generateHourScale",value:function(e){var r=e.firstVal,n=e.currentDate,a=e.currentMonth,s=e.currentYear,o=e.minutesWidthOnXAxis,l=e.numberOfHours,c=new Vr(this.ctx),u="hour",h=function(T,E){return T>c.determineDaysOfMonths(E+1,s)&&(w=1,E+=1),{month:E,date:w}},p=function(T,E){return T>c.determineDaysOfMonths(E+1,s)?E+=1:E},m=60-(r.minMinute+r.minSecond/60),x=m*o,y=r.minHour+1,b=y;m===60&&(x=0,b=y=r.minHour);var w=n;b>=24&&(b=0,u="day",y=w+=1);var N=h(w,a).month;N=p(w,N),y>31&&(y=w=1),this.timeScaleArray.push({position:x,value:y,unit:u,day:w,hour:b,year:s,month:J.monthMod(N)}),b++;for(var A=x,S=0;S<l;S++){u="hour",b>=24&&(b=0,u="day",N=h(w+=1,N).month,N=p(w,N));var C=this._getYear(s,N,0);A=60*o+A;var k=b===0?w:b;this.timeScaleArray.push({position:A,value:k,unit:u,hour:b,day:w,year:C,month:J.monthMod(N)}),b++}}},{key:"generateMinuteScale",value:function(e){for(var r=e.currentMillisecond,n=e.currentSecond,a=e.currentMinute,s=e.currentHour,o=e.currentDate,l=e.currentMonth,c=e.currentYear,u=e.minutesWidthOnXAxis,h=e.secondsWidthOnXAxis,p=e.numberOfMinutes,m=a+1,x=o,y=l,b=c,w=s,N=(60-n-r/1e3)*h,A=0;A<p;A++)m>=60&&(m=0,(w+=1)===24&&(w=0)),this.timeScaleArray.push({position:N,value:m,unit:"minute",hour:w,minute:m,day:x,year:this._getYear(b,y,0),month:J.monthMod(y)}),N+=u,m++}},{key:"generateSecondScale",value:function(e){for(var r=e.currentMillisecond,n=e.currentSecond,a=e.currentMinute,s=e.currentHour,o=e.currentDate,l=e.currentMonth,c=e.currentYear,u=e.secondsWidthOnXAxis,h=e.numberOfSeconds,p=n+1,m=a,x=o,y=l,b=c,w=s,N=(1e3-r)/1e3*u,A=0;A<h;A++)p>=60&&(p=0,++m>=60&&(m=0,++w===24&&(w=0))),this.timeScaleArray.push({position:N,value:p,unit:"second",hour:w,minute:m,second:p,day:x,year:this._getYear(b,y,0),month:J.monthMod(y)}),N+=u,p++}},{key:"createRawDateString",value:function(e,r){var n=e.year;return e.month===0&&(e.month=1),n+="-"+("0"+e.month.toString()).slice(-2),e.unit==="day"?n+=e.unit==="day"?"-"+("0"+r).slice(-2):"-01":n+="-"+("0"+(e.day?e.day:"1")).slice(-2),e.unit==="hour"?n+=e.unit==="hour"?"T"+("0"+r).slice(-2):"T00":n+="T"+("0"+(e.hour?e.hour:"0")).slice(-2),e.unit==="minute"?n+=":"+("0"+r).slice(-2):n+=":"+(e.minute?("0"+e.minute).slice(-2):"00"),e.unit==="second"?n+=":"+("0"+r).slice(-2):n+=":00",this.utc&&(n+=".000Z"),n}},{key:"formatDates",value:function(e){var r=this,n=this.w;return e.map(function(a){var s=a.value.toString(),o=new Vr(r.ctx),l=r.createRawDateString(a,s),c=o.getDate(o.parseDate(l));if(r.utc||(c=o.getDate(o.parseDateWithTimezone(l))),n.config.xaxis.labels.format===void 0){var u="dd MMM",h=n.config.xaxis.labels.datetimeFormatter;a.unit==="year"&&(u=h.year),a.unit==="month"&&(u=h.month),a.unit==="day"&&(u=h.day),a.unit==="hour"&&(u=h.hour),a.unit==="minute"&&(u=h.minute),a.unit==="second"&&(u=h.second),s=o.formatDate(c,u)}else s=o.formatDate(c,n.config.xaxis.labels.format);return{dateString:l,position:a.position,value:s,unit:a.unit,year:a.year,month:a.month}})}},{key:"removeOverlappingTS",value:function(e){var r,n=this,a=new ge(this.ctx),s=!1;e.length>0&&e[0].value&&e.every(function(c){return c.value.length===e[0].value.length})&&(s=!0,r=a.getTextRects(e[0].value).width);var o=0,l=e.map(function(c,u){if(u>0&&n.w.config.xaxis.labels.hideOverlappingLabels){var h=s?r:a.getTextRects(e[o].value).width,p=e[o].position;return c.position>p+h+10?(o=u,c):null}return c});return l=l.filter(function(c){return c!==null})}},{key:"_getYear",value:function(e,r,n){return e+Math.floor(r/12)+n}}]),t}(),CK=function(){function t(e,r){Se(this,t),this.ctx=r,this.w=r.w,this.el=e}return Ae(t,[{key:"setupElements",value:function(){var e=this.w,r=e.globals,n=e.config,a=n.chart.type;r.axisCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble","radar","heatmap","treemap"].includes(a),r.xyCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble"].includes(a),r.isBarHorizontal=["bar","rangeBar","boxPlot"].includes(a)&&n.plotOptions.bar.horizontal,r.chartClass=".apexcharts".concat(r.chartID),r.dom.baseEl=this.el,r.dom.elWrap=document.createElement("div"),ge.setAttrs(r.dom.elWrap,{id:r.chartClass.substring(1),class:"apexcharts-canvas ".concat(r.chartClass.substring(1))}),this.el.appendChild(r.dom.elWrap),r.dom.Paper=window.SVG().addTo(r.dom.elWrap),r.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:"translate(".concat(n.chart.offsetX,", ").concat(n.chart.offsetY,")")}),r.dom.Paper.node.style.background=n.theme.mode!=="dark"||n.chart.background?n.theme.mode!=="light"||n.chart.background?n.chart.background:"#fff":"#343A3F",this.setSVGDimensions(),r.dom.elLegendForeign=document.createElementNS(r.SVGNS,"foreignObject"),ge.setAttrs(r.dom.elLegendForeign,{x:0,y:0,width:r.svgWidth,height:r.svgHeight}),r.dom.elLegendWrap=document.createElement("div"),r.dom.elLegendWrap.classList.add("apexcharts-legend"),r.dom.elWrap.appendChild(r.dom.elLegendWrap),r.dom.Paper.node.appendChild(r.dom.elLegendForeign),r.dom.elGraphical=r.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}),r.dom.elDefs=r.dom.Paper.defs(),r.dom.Paper.add(r.dom.elGraphical),r.dom.elGraphical.add(r.dom.elDefs)}},{key:"plotChartType",value:function(e,r){var n=this.w,a=this.ctx,s=n.config,o=n.globals,l={line:{series:[],i:[]},area:{series:[],i:[]},scatter:{series:[],i:[]},bubble:{series:[],i:[]},bar:{series:[],i:[]},candlestick:{series:[],i:[]},boxPlot:{series:[],i:[]},rangeBar:{series:[],i:[]},rangeArea:{series:[],seriesRangeEnd:[],i:[]}},c=s.chart.type||"line",u=null,h=0;o.series.forEach(function(T,E){var _,L,P=((_=e[E])===null||_===void 0?void 0:_.type)==="column"?"bar":((L=e[E])===null||L===void 0?void 0:L.type)||(c==="column"?"bar":c);l[P]?(P==="rangeArea"?(l[P].series.push(o.seriesRangeStart[E]),l[P].seriesRangeEnd.push(o.seriesRangeEnd[E])):l[P].series.push(T),l[P].i.push(E),P==="bar"&&(n.globals.columnSeries=l.bar)):["heatmap","treemap","pie","donut","polarArea","radialBar","radar"].includes(P)?u=P:console.warn("You have specified an unrecognized series type (".concat(P,").")),c!==P&&P!=="scatter"&&h++}),h>0&&(u&&console.warn("Chart or series type ".concat(u," cannot appear with other chart or series types.")),l.bar.series.length>0&&s.plotOptions.bar.horizontal&&(h-=l.bar.series.length,l.bar={series:[],i:[]},n.globals.columnSeries={series:[],i:[]},console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"))),o.comboCharts||(o.comboCharts=h>0);var p=new j1(a,r),m=new v1(a,r);a.pie=new pR(a);var x=new xK(a);a.rangeBar=new bK(a,r);var y=new gK(a),b=[];if(o.comboCharts){var w,N,A=new ir(a);if(l.area.series.length>0&&(w=b).push.apply(w,Nr(A.drawSeriesByGroup(l.area,o.areaGroups,"area",p))),l.bar.series.length>0)if(s.chart.stacked){var S=new E6(a,r);b.push(S.draw(l.bar.series,l.bar.i))}else a.bar=new xd(a,r),b.push(a.bar.draw(l.bar.series,l.bar.i));if(l.rangeArea.series.length>0&&b.push(p.draw(l.rangeArea.series,"rangeArea",l.rangeArea.i,l.rangeArea.seriesRangeEnd)),l.line.series.length>0&&(N=b).push.apply(N,Nr(A.drawSeriesByGroup(l.line,o.lineGroups,"line",p))),l.candlestick.series.length>0&&b.push(m.draw(l.candlestick.series,"candlestick",l.candlestick.i)),l.boxPlot.series.length>0&&b.push(m.draw(l.boxPlot.series,"boxPlot",l.boxPlot.i)),l.rangeBar.series.length>0&&b.push(a.rangeBar.draw(l.rangeBar.series,l.rangeBar.i)),l.scatter.series.length>0){var C=new j1(a,r,!0);b.push(C.draw(l.scatter.series,"scatter",l.scatter.i))}if(l.bubble.series.length>0){var k=new j1(a,r,!0);b.push(k.draw(l.bubble.series,"bubble",l.bubble.i))}}else switch(s.chart.type){case"line":b=p.draw(o.series,"line");break;case"area":b=p.draw(o.series,"area");break;case"bar":s.chart.stacked?b=new E6(a,r).draw(o.series):(a.bar=new xd(a,r),b=a.bar.draw(o.series));break;case"candlestick":b=new v1(a,r).draw(o.series,"candlestick");break;case"boxPlot":b=new v1(a,r).draw(o.series,s.chart.type);break;case"rangeBar":b=a.rangeBar.draw(o.series);break;case"rangeArea":b=p.draw(o.seriesRangeStart,"rangeArea",void 0,o.seriesRangeEnd);break;case"heatmap":b=new mK(a,r).draw(o.series);break;case"treemap":b=new NK(a,r).draw(o.series);break;case"pie":case"donut":case"polarArea":b=a.pie.draw(o.series);break;case"radialBar":b=x.draw(o.series);break;case"radar":b=y.draw(o.series);break;default:b=p.draw(o.series)}return b}},{key:"setSVGDimensions",value:function(){var e=this.w,r=e.globals,n=e.config;n.chart.width=n.chart.width||"100%",n.chart.height=n.chart.height||"auto",r.svgWidth=n.chart.width,r.svgHeight=n.chart.height;var a=J.getDimensions(this.el),s=n.chart.width.toString().split(/[0-9]+/g).pop();s==="%"?J.isNumber(a[0])&&(a[0].width===0&&(a=J.getDimensions(this.el.parentNode)),r.svgWidth=a[0]*parseInt(n.chart.width,10)/100):s!=="px"&&s!==""||(r.svgWidth=parseInt(n.chart.width,10));var o=String(n.chart.height).toString().split(/[0-9]+/g).pop();if(r.svgHeight!=="auto"&&r.svgHeight!=="")if(o==="%"){var l=J.getDimensions(this.el.parentNode);r.svgHeight=l[1]*parseInt(n.chart.height,10)/100}else r.svgHeight=parseInt(n.chart.height,10);else r.svgHeight=r.axisCharts?r.svgWidth/1.61:r.svgWidth/1.2;if(r.svgWidth=Math.max(r.svgWidth,0),r.svgHeight=Math.max(r.svgHeight,0),ge.setAttrs(r.dom.Paper.node,{width:r.svgWidth,height:r.svgHeight}),o!=="%"){var c=n.chart.sparkline.enabled?0:r.axisCharts?n.chart.parentHeightOffset:0;r.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(r.svgHeight+c,"px")}r.dom.elWrap.style.width="".concat(r.svgWidth,"px"),r.dom.elWrap.style.height="".concat(r.svgHeight,"px")}},{key:"shiftGraphPosition",value:function(){var e=this.w.globals,r=e.translateY,n=e.translateX;ge.setAttrs(e.dom.elGraphical.node,{transform:"translate(".concat(n,", ").concat(r,")")})}},{key:"resizeNonAxisCharts",value:function(){var e=this.w,r=e.globals,n=0,a=e.config.chart.sparkline.enabled?1:15;a+=e.config.grid.padding.bottom,["top","bottom"].includes(e.config.legend.position)&&e.config.legend.show&&!e.config.legend.floating&&(n=new lR(this.ctx).legendHelpers.getLegendDimensions().clwh+7);var s=e.globals.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),o=2.05*e.globals.radialSize;if(s&&!e.config.chart.sparkline.enabled&&e.config.plotOptions.radialBar.startAngle!==0){var l=J.getBoundingClientRect(s);o=l.bottom;var c=l.bottom-l.top;o=Math.max(2.05*e.globals.radialSize,c)}var u=Math.ceil(o+r.translateY+n+a);r.dom.elLegendForeign&&r.dom.elLegendForeign.setAttribute("height",u),e.config.chart.height&&String(e.config.chart.height).includes("%")||(r.dom.elWrap.style.height="".concat(u,"px"),ge.setAttrs(r.dom.Paper.node,{height:u}),r.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(u,"px"))}},{key:"coreCalculations",value:function(){new dj(this.ctx).init()}},{key:"resetGlobals",value:function(){var e=this,r=function(){return e.w.config.series.map(function(){return[]})},n=new aR,a=this.w.globals,s={dataWasParsed:a.dataWasParsed,originalSeries:a.originalSeries};n.initGlobalVars(a),a.seriesXvalues=r(),a.seriesYvalues=r(),s.dataWasParsed&&(a.dataWasParsed=s.dataWasParsed,a.originalSeries=s.originalSeries)}},{key:"isMultipleY",value:function(){return!!(Array.isArray(this.w.config.yaxis)&&this.w.config.yaxis.length>1)&&(this.w.globals.isMultipleYAxis=!0,!0)}},{key:"xySettings",value:function(){var e=this.w,r=null;if(e.globals.axisCharts){if(e.config.xaxis.crosshairs.position==="back"&&new uj(this.ctx).drawXCrosshairs(),e.config.yaxis[0].crosshairs.position==="back"&&new uj(this.ctx).drawYCrosshairs(),e.config.xaxis.type==="datetime"&&e.config.xaxis.labels.formatter===void 0){this.ctx.timeScale=new AK(this.ctx);var n=[];isFinite(e.globals.minX)&&isFinite(e.globals.maxX)&&!e.globals.isBarHorizontal?n=this.ctx.timeScale.calculateTimeScaleTicks(e.globals.minX,e.globals.maxX):e.globals.isBarHorizontal&&(n=this.ctx.timeScale.calculateTimeScaleTicks(e.globals.minY,e.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(n)}r=new ir(this.ctx).getCalculatedRatios()}return r}},{key:"updateSourceChart",value:function(e){this.ctx.w.globals.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:e.w.globals.minX,max:e.w.globals.maxX}}}},!1,!1)}},{key:"setupBrushHandler",value:function(){var e=this,r=this.ctx,n=this.w;if(n.config.chart.brush.enabled&&typeof n.config.chart.events.selection!="function"){var a=Array.isArray(n.config.chart.brush.targets)?n.config.chart.brush.targets:[n.config.chart.brush.target];a.forEach(function(s){var o=r.constructor.getChartByID(s);o.w.globals.brushSource=e.ctx,typeof o.w.config.chart.events.zoomed!="function"&&(o.w.config.chart.events.zoomed=function(){return e.updateSourceChart(o)}),typeof o.w.config.chart.events.scrolled!="function"&&(o.w.config.chart.events.scrolled=function(){return e.updateSourceChart(o)})}),n.config.chart.events.selection=function(s,o){a.forEach(function(l){r.constructor.getChartByID(l).ctx.updateHelpers._updateOptions({xaxis:{min:o.xaxis.min,max:o.xaxis.max}},!1,!1,!1,!1)})}}}}]),t}(),kK=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w}return Ae(t,[{key:"_updateOptions",value:function(e){var r=this,n=arguments.length>1&&arguments[1]!==void 0&&arguments[1],a=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],s=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],o=arguments.length>4&&arguments[4]!==void 0&&arguments[4];return new Promise(function(l){var c=[r.ctx];s&&(c=r.ctx.getSyncedCharts()),r.ctx.w.globals.isExecCalled&&(c=[r.ctx],r.ctx.w.globals.isExecCalled=!1),c.forEach(function(u,h){var p=u.w;if(p.globals.shouldAnimate=a,n||(p.globals.resized=!0,p.globals.dataChanged=!0,a&&u.series.getPreviousPaths()),e&&fn(e)==="object"&&(u.config=new hf(e),e=ir.extendArrayProps(u.config,e,p),u.w.globals.chartID!==r.ctx.w.globals.chartID&&delete e.series,p.config=J.extend(p.config,e),o&&(p.globals.lastXAxis=e.xaxis?J.clone(e.xaxis):[],p.globals.lastYAxis=e.yaxis?J.clone(e.yaxis):[],p.globals.initialConfig=J.extend({},p.config),p.globals.initialSeries=J.clone(p.config.series),e.series))){for(var m=0;m<p.globals.collapsedSeriesIndices.length;m++){var x=p.config.series[p.globals.collapsedSeriesIndices[m]];p.globals.collapsedSeries[m].data=p.globals.axisCharts?x.data.slice():x}for(var y=0;y<p.globals.ancillaryCollapsedSeriesIndices.length;y++){var b=p.config.series[p.globals.ancillaryCollapsedSeriesIndices[y]];p.globals.ancillaryCollapsedSeries[y].data=p.globals.axisCharts?b.data.slice():b}u.series.emptyCollapsedSeries(p.config.series)}return u.update(e).then(function(){h===c.length-1&&l(u)})})})}},{key:"_updateSeries",value:function(e,r){var n=this,a=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return new Promise(function(s){var o,l=n.w;return l.globals.shouldAnimate=r,l.globals.dataChanged=!0,r&&n.ctx.series.getPreviousPaths(),l.globals.axisCharts?((o=e.map(function(c,u){return n._extendSeries(c,u)})).length===0&&(o=[{data:[]}]),l.config.series=o):l.config.series=e.slice(),a&&(l.globals.initialConfig.series=J.clone(l.config.series),l.globals.initialSeries=J.clone(l.config.series)),n.ctx.update().then(function(){s(n.ctx)})})}},{key:"_extendSeries",value:function(e,r){var n=this.w,a=n.config.series[r];return ve(ve({},n.config.series[r]),{},{name:e.name?e.name:a?.name,color:e.color?e.color:a?.color,type:e.type?e.type:a?.type,group:e.group?e.group:a?.group,hidden:e.hidden!==void 0?e.hidden:a?.hidden,data:e.data?e.data:a?.data,zIndex:e.zIndex!==void 0?e.zIndex:r})}},{key:"toggleDataPointSelection",value:function(e,r){var n=this.w,a=null,s=".apexcharts-series[data\\:realIndex='".concat(e,"']");return n.globals.axisCharts?a=n.globals.dom.Paper.findOne("".concat(s," path[j='").concat(r,"'], ").concat(s," circle[j='").concat(r,"'], ").concat(s," rect[j='").concat(r,"']")):r===void 0&&(a=n.globals.dom.Paper.findOne("".concat(s," path[j='").concat(e,"']")),n.config.chart.type!=="pie"&&n.config.chart.type!=="polarArea"&&n.config.chart.type!=="donut"||this.ctx.pie.pieClicked(e)),a?(new ge(this.ctx).pathMouseDown(a,null),a.node?a.node:null):(console.warn("toggleDataPointSelection: Element not found"),null)}},{key:"forceXAxisUpdate",value:function(e){var r=this.w;if(["min","max"].forEach(function(a){e.xaxis[a]!==void 0&&(r.config.xaxis[a]=e.xaxis[a],r.globals.lastXAxis[a]=e.xaxis[a])}),e.xaxis.categories&&e.xaxis.categories.length&&(r.config.xaxis.categories=e.xaxis.categories),r.config.xaxis.convertedCatToNumeric){var n=new uf(e);e=n.convertCatToNumericXaxis(e,this.ctx)}return e}},{key:"forceYAxisUpdate",value:function(e){return e.chart&&e.chart.stacked&&e.chart.stackType==="100%"&&(Array.isArray(e.yaxis)?e.yaxis.forEach(function(r,n){e.yaxis[n].min=0,e.yaxis[n].max=100}):(e.yaxis.min=0,e.yaxis.max=100)),e}},{key:"resetParsingFlags",value:function(){var e=this.w.globals;e.dataWasParsed=!1,e.originalSeries=null,this.w.config.series&&this.w.config.series.forEach(function(r){r.__apexParsed&&delete r.__apexParsed})}},{key:"revertDefaultAxisMinMax",value:function(e){var r=this,n=this.w,a=n.globals.lastXAxis,s=n.globals.lastYAxis;e&&e.xaxis&&(a=e.xaxis),e&&e.yaxis&&(s=e.yaxis),n.config.xaxis.min=a.min,n.config.xaxis.max=a.max;var o=function(l){s[l]!==void 0&&(n.config.yaxis[l].min=s[l].min,n.config.yaxis[l].max=s[l].max)};n.config.yaxis.map(function(l,c){n.globals.zoomed||s[c]!==void 0?o(c):r.ctx.opts.yaxis[c]!==void 0&&(l.min=r.ctx.opts.yaxis[c].min,l.max=r.ctx.opts.yaxis[c].max)})}}]),t}();(function(){function t(){for(var s=arguments.length>0&&arguments[0]!==p?arguments[0]:[],o=arguments.length>1?arguments[1]:p,l=arguments.length>2?arguments[2]:p,c=arguments.length>3?arguments[3]:p,u=arguments.length>4?arguments[4]:p,h=arguments.length>5?arguments[5]:p,p=arguments.length>6?arguments[6]:p,m=s.slice(o,l||p),x=c.slice(u,h||p),y=0,b={pos:[0,0],start:[0,0]},w={pos:[0,0],start:[0,0]};m[y]=e.call(b,m[y]),x[y]=e.call(w,x[y]),m[y][0]!=x[y][0]||m[y][0]=="M"||m[y][0]=="A"&&(m[y][4]!=x[y][4]||m[y][5]!=x[y][5])?(Array.prototype.splice.apply(m,[y,1].concat(n.call(b,m[y]))),Array.prototype.splice.apply(x,[y,1].concat(n.call(w,x[y])))):(m[y]=r.call(b,m[y]),x[y]=r.call(w,x[y])),!(++y==m.length&&y==x.length);)y==m.length&&m.push(["C",b.pos[0],b.pos[1],b.pos[0],b.pos[1],b.pos[0],b.pos[1]]),y==x.length&&x.push(["C",w.pos[0],w.pos[1],w.pos[0],w.pos[1],w.pos[0],w.pos[1]]);return{start:m,dest:x}}function e(s){switch(s[0]){case"z":case"Z":s[0]="L",s[1]=this.start[0],s[2]=this.start[1];break;case"H":s[0]="L",s[2]=this.pos[1];break;case"V":s[0]="L",s[2]=s[1],s[1]=this.pos[0];break;case"T":s[0]="Q",s[3]=s[1],s[4]=s[2],s[1]=this.reflection[1],s[2]=this.reflection[0];break;case"S":s[0]="C",s[6]=s[4],s[5]=s[3],s[4]=s[2],s[3]=s[1],s[2]=this.reflection[1],s[1]=this.reflection[0]}return s}function r(s){var o=s.length;return this.pos=[s[o-2],s[o-1]],"SCQT".indexOf(s[0])!=-1&&(this.reflection=[2*this.pos[0]-s[o-4],2*this.pos[1]-s[o-3]]),s}function n(s){var o=[s];switch(s[0]){case"M":return this.pos=this.start=[s[1],s[2]],o;case"L":s[5]=s[3]=s[1],s[6]=s[4]=s[2],s[1]=this.pos[0],s[2]=this.pos[1];break;case"Q":s[6]=s[4],s[5]=s[3],s[4]=1*s[4]/3+2*s[2]/3,s[3]=1*s[3]/3+2*s[1]/3,s[2]=1*this.pos[1]/3+2*s[2]/3,s[1]=1*this.pos[0]/3+2*s[1]/3;break;case"A":o=function(l,c){var u,h,p,m,x,y,b,w,N,A,S,C,k,T,E,_,L,P,R,z,B,Y,X,H,W,V,Z=Math.abs(c[1]),F=Math.abs(c[2]),G=c[3]%360,te=c[4],K=c[5],U=c[6],re=c[7],ae=new mt(l),we=new mt(U,re),ye=[];if(Z===0||F===0||ae.x===we.x&&ae.y===we.y)return[["C",ae.x,ae.y,we.x,we.y,we.x,we.y]];for(u=new mt((ae.x-we.x)/2,(ae.y-we.y)/2).transform(new ze().rotate(G)),h=u.x*u.x/(Z*Z)+u.y*u.y/(F*F),h>1&&(Z*=h=Math.sqrt(h),F*=h),p=new ze().rotate(G).scale(1/Z,1/F).rotate(-G),ae=ae.transform(p),we=we.transform(p),m=[we.x-ae.x,we.y-ae.y],y=m[0]*m[0]+m[1]*m[1],x=Math.sqrt(y),m[0]/=x,m[1]/=x,b=y<4?Math.sqrt(1-y/4):0,te===K&&(b*=-1),w=new mt((we.x+ae.x)/2+b*-m[1],(we.y+ae.y)/2+b*m[0]),N=new mt(ae.x-w.x,ae.y-w.y),A=new mt(we.x-w.x,we.y-w.y),S=Math.acos(N.x/Math.sqrt(N.x*N.x+N.y*N.y)),N.y<0&&(S*=-1),C=Math.acos(A.x/Math.sqrt(A.x*A.x+A.y*A.y)),A.y<0&&(C*=-1),K&&S>C&&(C+=2*Math.PI),!K&&S<C&&(C-=2*Math.PI),T=Math.ceil(2*Math.abs(S-C)/Math.PI),_=[],L=S,k=(C-S)/T,E=4*Math.tan(k/4)/3,B=0;B<=T;B++)R=Math.cos(L),P=Math.sin(L),z=new mt(w.x+R,w.y+P),_[B]=[new mt(z.x+E*P,z.y-E*R),z,new mt(z.x-E*P,z.y+E*R)],L+=k;for(_[0][0]=_[0][1].clone(),_[_.length-1][2]=_[_.length-1][1].clone(),p=new ze().rotate(G).scale(Z,F).rotate(-G),B=0,Y=_.length;B<Y;B++)_[B][0]=_[B][0].transform(p),_[B][1]=_[B][1].transform(p),_[B][2]=_[B][2].transform(p);for(B=1,Y=_.length;B<Y;B++)X=(z=_[B-1][2]).x,H=z.y,W=(z=_[B][0]).x,V=z.y,U=(z=_[B][1]).x,re=z.y,ye.push(["C",X,H,W,V,U,re]);return ye}(this.pos,s),s=o[0]}return s[0]="C",this.pos=[s[5],s[6]],this.reflection=[2*s[5]-s[3],2*s[6]-s[4]],o}function a(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],o=arguments.length>1?arguments[1]:void 0;if(o===!1)return!1;for(var l=o,c=s.length;l<c;++l)if(s[l][0]=="M")return l;return!1}Ie(Za,{morph:function(s,o,l,c,u){for(var h=this.parse(s),p=this.parse(o),m=0,x=0,y=!1,b=!1;m!==!1||x!==!1;){var w;y=a(h,m!==!1&&m+1),b=a(p,x!==!1&&x+1),m===!1&&(m=(w=new Za(N.start).bbox()).height==0||w.width==0?h.push(h[0])-1:h.push(["M",w.x+w.width/2,w.y+w.height/2])-1),x===!1&&(x=(w=new Za(N.dest).bbox()).height==0||w.width==0?p.push(p[0])-1:p.push(["M",w.x+w.width/2,w.y+w.height/2])-1);var N=t(h,m,y,p,x,b);h=h.slice(0,m).concat(N.start,y===!1?[]:h.slice(y)),p=p.slice(0,x).concat(N.dest,b===!1?[]:p.slice(b)),m=y!==!1&&m+N.start.length,x=b!==!1&&x+N.dest.length}this._array=h,this.destination=new Za,this.destination._array=p;var A=this.fromArray(h.map(function(S,C){var k=p[C].map(function(T,E){return E===0?T:c.step(S[E],p[C][E],l,u[C],u)});return k}));return A}})})();const O6=t=>(t.changedTouches&&(t=t.changedTouches[0]),{x:t.clientX,y:t.clientY});class DK{constructor(e){e.remember("_draggable",this),this.el=e,this.drag=this.drag.bind(this),this.startDrag=this.startDrag.bind(this),this.endDrag=this.endDrag.bind(this)}init(e){e?(this.el.on("mousedown.drag",this.startDrag),this.el.on("touchstart.drag",this.startDrag,{passive:!1})):(this.el.off("mousedown.drag"),this.el.off("touchstart.drag"))}startDrag(e){const r=!e.type.indexOf("mouse");if(r&&e.which!==1&&e.buttons!==0||this.el.dispatch("beforedrag",{event:e,handler:this}).defaultPrevented)return;e.preventDefault(),e.stopPropagation(),this.init(!1),this.box=this.el.bbox(),this.lastClick=this.el.point(O6(e));const n=(r?"mouseup":"touchend")+".drag";li(window,(r?"mousemove":"touchmove")+".drag",this.drag,this,{passive:!1}),li(window,n,this.endDrag,this,{passive:!1}),this.el.fire("dragstart",{event:e,handler:this,box:this.box})}drag(e){const{box:r,lastClick:n}=this,a=this.el.point(O6(e)),s=a.x-n.x,o=a.y-n.y;if(!s&&!o)return r;const l=r.x+s,c=r.y+o;this.box=new ar(l,c,r.w,r.h),this.lastClick=a,this.el.dispatch("dragmove",{event:e,handler:this,box:this.box}).defaultPrevented||this.move(l,c)}move(e,r){this.el.type==="svg"?ho.prototype.move.call(this.el,e,r):this.el.move(e,r)}endDrag(e){this.drag(e),this.el.fire("dragend",{event:e,handler:this,box:this.box}),Pa(window,"mousemove.drag"),Pa(window,"touchmove.drag"),Pa(window,"mouseup.drag"),Pa(window,"touchend.drag"),this.init(!0)}}/*!
* @svgdotjs/svg.select.js - An extension of svg.js which allows to select elements with mouse
* @version 4.0.1
* https://github.com/svgdotjs/svg.select.js
*
* @copyright Ulrich-Matthias Schäfer
* @license MIT
*
* BUILT: Mon Jul 01 2024 15:04:42 GMT+0200 (Central European Summer Time)
*/function hj(t,e,r,n=null){return function(a){a.preventDefault(),a.stopPropagation();var s=a.pageX||a.touches[0].pageX,o=a.pageY||a.touches[0].pageY;e.fire(t,{x:s,y:o,event:a,index:n,points:r})}}function fj([t,e],{a:r,b:n,c:a,d:s,e:o,f:l}){return[t*r+e*a+o,t*n+e*s+l]}Ie(Zr,{draggable(t=!0){return(this.remember("_draggable")||new DK(this)).init(t),this}});let gR=class{constructor(t){this.el=t,t.remember("_selectHandler",this),this.selection=new ho,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=Wf();this.observer=new e.MutationObserver(this.mutationHandler)}init(t){this.createHandle=t.createHandle||this.createHandleFn,this.createRot=t.createRot||this.createRotFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.updateRot=t.updateRot||this.updateRotFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createResizeHandles(),this.updateResizeHandles(),this.createRotationHandle(),this.updateRotationHandle(),this.observer.observe(this.el.node,{attributes:!0})}active(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.handlePoints).addClass("svg_select_shape")}updateSelection(){this.selection.get(0).plot(this.handlePoints)}createResizeHandles(){this.handlePoints.forEach((t,e,r)=>{const n=this.order[e];this.createHandle.call(this,this.selection,t,e,r,n),this.selection.get(e+1).addClass("svg_select_handle svg_select_handle_"+n).on("mousedown.selection touchstart.selection",hj(n,this.el,this.handlePoints,e))})}createHandleFn(t){t.polyline()}updateHandleFn(t,e,r,n){const a=n.at(r-1),s=n[(r+1)%n.length],o=e,l=[o[0]-a[0],o[1]-a[1]],c=[o[0]-s[0],o[1]-s[1]],u=Math.sqrt(l[0]*l[0]+l[1]*l[1]),h=Math.sqrt(c[0]*c[0]+c[1]*c[1]),p=[l[0]/u,l[1]/u],m=[c[0]/h,c[1]/h],x=[o[0]-10*p[0],o[1]-10*p[1]],y=[o[0]-10*m[0],o[1]-10*m[1]];t.plot([x,o,y])}updateResizeHandles(){this.handlePoints.forEach((t,e,r)=>{const n=this.order[e];this.updateHandle.call(this,this.selection.get(e+1),t,e,r,n)})}createRotFn(t){t.line(),t.circle(5)}getPoint(t){return this.handlePoints[this.order.indexOf(t)]}getPointHandle(t){return this.selection.get(this.order.indexOf(t)+1)}updateRotFn(t,e){const r=this.getPoint("t");t.get(0).plot(r[0],r[1],e[0],e[1]),t.get(1).center(e[0],e[1])}createRotationHandle(){const t=this.selection.group().addClass("svg_select_handle_rot").on("mousedown.selection touchstart.selection",hj("rot",this.el,this.handlePoints));this.createRot.call(this,t)}updateRotationHandle(){const t=this.selection.findOne("g.svg_select_handle_rot");this.updateRot(t,this.rotationPoint,this.handlePoints)}updatePoints(){const t=this.el.bbox(),e=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.handlePoints=this.getHandlePoints(t).map(r=>fj(r,e)),this.rotationPoint=fj(this.getRotationPoint(t),e)}getHandlePoints({x:t,x2:e,y:r,y2:n,cx:a,cy:s}=this.el.bbox()){return[[t,r],[a,r],[e,r],[e,s],[e,n],[a,n],[t,n],[t,s]]}getRotationPoint({y:t,cx:e}=this.el.bbox()){return[e,t-20]}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updateResizeHandles(),this.updateRotationHandle()}};const P6=t=>function(e=!0,r={}){typeof e=="object"&&(r=e,e=!0);let n=this.remember("_"+t.name);return n||(e.prototype instanceof gR?(n=new e(this),e=!0):n=new t(this),this.remember("_"+t.name,n)),n.active(e,r),this};/*!
* @svgdotjs/svg.resize.js - An extension for svg.js which allows to resize elements which are selected
* @version 2.0.4
* https://github.com/svgdotjs/svg.resize.js
*
* @copyright [object Object]
* @license MIT
*
* BUILT: Fri Sep 13 2024 12:43:14 GMT+0200 (Central European Summer Time)
*//*!
* @svgdotjs/svg.select.js - An extension of svg.js which allows to select elements with mouse
* @version 4.0.1
* https://github.com/svgdotjs/svg.select.js
*
* @copyright Ulrich-Matthias Schäfer
* @license MIT
*
* BUILT: Mon Jul 01 2024 15:04:42 GMT+0200 (Central European Summer Time)
*/function pj(t,e,r,n=null){return function(a){a.preventDefault(),a.stopPropagation();var s=a.pageX||a.touches[0].pageX,o=a.pageY||a.touches[0].pageY;e.fire(t,{x:s,y:o,event:a,index:n,points:r})}}function mj([t,e],{a:r,b:n,c:a,d:s,e:o,f:l}){return[t*r+e*a+o,t*n+e*s+l]}Ie(Zr,{select:P6(gR)}),Ie([bl,yl,xl],{pointSelect:P6(class{constructor(t){this.el=t,t.remember("_pointSelectHandler",this),this.selection=new ho,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=Wf();this.observer=new e.MutationObserver(this.mutationHandler)}init(t){this.createHandle=t.createHandle||this.createHandleFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createPointHandles(),this.updatePointHandles(),this.observer.observe(this.el.node,{attributes:!0})}active(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.points).addClass("svg_select_shape_pointSelect")}updateSelection(){this.selection.get(0).plot(this.points)}createPointHandles(){this.points.forEach((t,e,r)=>{this.createHandle.call(this,this.selection,t,e,r),this.selection.get(e+1).addClass("svg_select_handle_point").on("mousedown.selection touchstart.selection",hj("point",this.el,this.points,e))})}createHandleFn(t){t.circle(5)}updateHandleFn(t,e){t.center(e[0],e[1])}updatePointHandles(){this.points.forEach((t,e,r)=>{this.updateHandle.call(this,this.selection.get(e+1),t,e,r)})}updatePoints(){const t=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.points=this.el.array().map(e=>fj(e,t))}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}})});class xR{constructor(e){this.el=e,e.remember("_selectHandler",this),this.selection=new ho,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const r=Wf();this.observer=new r.MutationObserver(this.mutationHandler)}init(e){this.createHandle=e.createHandle||this.createHandleFn,this.createRot=e.createRot||this.createRotFn,this.updateHandle=e.updateHandle||this.updateHandleFn,this.updateRot=e.updateRot||this.updateRotFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createResizeHandles(),this.updateResizeHandles(),this.createRotationHandle(),this.updateRotationHandle(),this.observer.observe(this.el.node,{attributes:!0})}active(e,r){if(!e)return this.selection.clear().remove(),void this.observer.disconnect();this.init(r)}createSelection(){this.selection.polygon(this.handlePoints).addClass("svg_select_shape")}updateSelection(){this.selection.get(0).plot(this.handlePoints)}createResizeHandles(){this.handlePoints.forEach((e,r,n)=>{const a=this.order[r];this.createHandle.call(this,this.selection,e,r,n,a),this.selection.get(r+1).addClass("svg_select_handle svg_select_handle_"+a).on("mousedown.selection touchstart.selection",pj(a,this.el,this.handlePoints,r))})}createHandleFn(e){e.polyline()}updateHandleFn(e,r,n,a){const s=a.at(n-1),o=a[(n+1)%a.length],l=r,c=[l[0]-s[0],l[1]-s[1]],u=[l[0]-o[0],l[1]-o[1]],h=Math.sqrt(c[0]*c[0]+c[1]*c[1]),p=Math.sqrt(u[0]*u[0]+u[1]*u[1]),m=[c[0]/h,c[1]/h],x=[u[0]/p,u[1]/p],y=[l[0]-10*m[0],l[1]-10*m[1]],b=[l[0]-10*x[0],l[1]-10*x[1]];e.plot([y,l,b])}updateResizeHandles(){this.handlePoints.forEach((e,r,n)=>{const a=this.order[r];this.updateHandle.call(this,this.selection.get(r+1),e,r,n,a)})}createRotFn(e){e.line(),e.circle(5)}getPoint(e){return this.handlePoints[this.order.indexOf(e)]}getPointHandle(e){return this.selection.get(this.order.indexOf(e)+1)}updateRotFn(e,r){const n=this.getPoint("t");e.get(0).plot(n[0],n[1],r[0],r[1]),e.get(1).center(r[0],r[1])}createRotationHandle(){const e=this.selection.group().addClass("svg_select_handle_rot").on("mousedown.selection touchstart.selection",pj("rot",this.el,this.handlePoints));this.createRot.call(this,e)}updateRotationHandle(){const e=this.selection.findOne("g.svg_select_handle_rot");this.updateRot(e,this.rotationPoint,this.handlePoints)}updatePoints(){const e=this.el.bbox(),r=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.handlePoints=this.getHandlePoints(e).map(n=>mj(n,r)),this.rotationPoint=mj(this.getRotationPoint(e),r)}getHandlePoints({x:e,x2:r,y:n,y2:a,cx:s,cy:o}=this.el.bbox()){return[[e,n],[s,n],[r,n],[r,o],[r,a],[s,a],[e,a],[e,o]]}getRotationPoint({y:e,cx:r}=this.el.bbox()){return[r,e-20]}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updateResizeHandles(),this.updateRotationHandle()}}const _6=t=>function(e=!0,r={}){typeof e=="object"&&(r=e,e=!0);let n=this.remember("_"+t.name);return n||(e.prototype instanceof xR?(n=new e(this),e=!0):n=new t(this),this.remember("_"+t.name,n)),n.active(e,r),this};Ie(Zr,{select:_6(xR)}),Ie([bl,yl,xl],{pointSelect:_6(class{constructor(t){this.el=t,t.remember("_pointSelectHandler",this),this.selection=new ho,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=Wf();this.observer=new e.MutationObserver(this.mutationHandler)}init(t){this.createHandle=t.createHandle||this.createHandleFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createPointHandles(),this.updatePointHandles(),this.observer.observe(this.el.node,{attributes:!0})}active(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.points).addClass("svg_select_shape_pointSelect")}updateSelection(){this.selection.get(0).plot(this.points)}createPointHandles(){this.points.forEach((t,e,r)=>{this.createHandle.call(this,this.selection,t,e,r),this.selection.get(e+1).addClass("svg_select_handle_point").on("mousedown.selection touchstart.selection",pj("point",this.el,this.points,e))})}createHandleFn(t){t.circle(5)}updateHandleFn(t,e){t.center(e[0],e[1])}updatePointHandles(){this.points.forEach((t,e,r)=>{this.updateHandle.call(this,this.selection.get(e+1),t,e,r)})}updatePoints(){const t=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.points=this.el.array().map(e=>mj(e,t))}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}})});const Ym=t=>(t.changedTouches&&(t=t.changedTouches[0]),{x:t.clientX,y:t.clientY}),R6=t=>{let e=1/0,r=1/0,n=-1/0,a=-1/0;for(let s=0;s<t.length;s++){const o=t[s];e=Math.min(e,o[0]),r=Math.min(r,o[1]),n=Math.max(n,o[0]),a=Math.max(a,o[1])}return new ar(e,r,n-e,a-r)};class L6{constructor(e){this.el=e,e.remember("_ResizeHandler",this),this.lastCoordinates=null,this.eventType="",this.lastEvent=null,this.handleResize=this.handleResize.bind(this),this.resize=this.resize.bind(this),this.endResize=this.endResize.bind(this),this.rotate=this.rotate.bind(this),this.movePoint=this.movePoint.bind(this)}active(e,r){this.preserveAspectRatio=r.preserveAspectRatio??!1,this.aroundCenter=r.aroundCenter??!1,this.grid=r.grid??0,this.degree=r.degree??0,this.el.off(".resize"),e&&(this.el.on(["lt.resize","rt.resize","rb.resize","lb.resize","t.resize","r.resize","b.resize","l.resize","rot.resize","point.resize"],this.handleResize),this.lastEvent&&(this.eventType==="rot"?this.rotate(this.lastEvent):this.eventType==="point"?this.movePoint(this.lastEvent):this.resize(this.lastEvent)))}handleResize(e){this.eventType=e.type;const{event:r,index:n,points:a}=e.detail,s=!r.type.indexOf("mouse");if(s&&(r.which||r.buttons)!==1||this.el.dispatch("beforeresize",{event:e,handler:this}).defaultPrevented)return;this.box=this.el.bbox(),this.startPoint=this.el.point(Ym(r)),this.index=n,this.points=a.slice();const o=(s?"mousemove":"touchmove")+".resize",l=(s?"mouseup":"touchcancel.resize touchend")+".resize";e.type==="point"?li(window,o,this.movePoint):e.type==="rot"?li(window,o,this.rotate):li(window,o,this.resize),li(window,l,this.endResize)}resize(e){this.lastEvent=e;const r=this.snapToGrid(this.el.point(Ym(e)));let n=r.x-this.startPoint.x,a=r.y-this.startPoint.y;this.preserveAspectRatio&&this.aroundCenter&&(n*=2,a*=2);const s=this.box.x+n,o=this.box.y+a,l=this.box.x2+n,c=this.box.y2+a;let u=new ar(this.box);if(this.eventType.includes("l")&&(u.x=Math.min(s,this.box.x2),u.x2=Math.max(s,this.box.x2)),this.eventType.includes("r")&&(u.x=Math.min(l,this.box.x),u.x2=Math.max(l,this.box.x)),this.eventType.includes("t")&&(u.y=Math.min(o,this.box.y2),u.y2=Math.max(o,this.box.y2)),this.eventType.includes("b")&&(u.y=Math.min(c,this.box.y),u.y2=Math.max(c,this.box.y)),u.width=u.x2-u.x,u.height=u.y2-u.y,this.preserveAspectRatio){const h=u.width/this.box.width,p=u.height/this.box.height,m=["lt","t","rt","r","rb","b","lb","l"],x=(m.indexOf(this.eventType)+4)%m.length,y=this.aroundCenter?[this.box.cx,this.box.cy]:this.points[x];let b=this.eventType.includes("t")||this.eventType.includes("b")?p:h;b=this.eventType.length===2?Math.max(h,p):b,u=function(w,N,A){const S=[[w.x,w.y],[w.x+w.width,w.y],[w.x+w.width,w.y+w.height],[w.x,w.y+w.height]].map(([C,k])=>{const T=C-N[0],E=(k-N[1])*A;return[T*A+N[0],E+N[1]]});return R6(S)}(this.box,y,b)}this.el.dispatch("resize",{box:new ar(u),angle:0,eventType:this.eventType,event:e,handler:this}).defaultPrevented||this.el.size(u.width,u.height).move(u.x,u.y)}movePoint(e){this.lastEvent=e;const{x:r,y:n}=this.snapToGrid(this.el.point(Ym(e))),a=this.el.array().slice();a[this.index]=[r,n],this.el.dispatch("resize",{box:R6(a),angle:0,eventType:this.eventType,event:e,handler:this}).defaultPrevented||this.el.plot(a)}rotate(e){this.lastEvent=e;const r=this.startPoint,n=this.el.point(Ym(e)),{cx:a,cy:s}=this.box,o=r.x-a,l=r.y-s,c=n.x-a,u=n.y-s,h=Math.sqrt(o*o+l*l)*Math.sqrt(c*c+u*u);if(h===0)return;let p=Math.acos((o*c+l*u)/h)/Math.PI*180;if(!p)return;n.x<r.x&&(p=-p);const m=new ze(this.el),{x,y}=new mt(a,s).transformO(m),{rotate:b}=m.decompose(),w=this.snapToAngle(b+p)-b;this.el.dispatch("resize",{box:this.box,angle:w,eventType:this.eventType,event:e,handler:this}).defaultPrevented||this.el.transform(m.rotateO(w,x,y))}endResize(e){this.eventType!=="rot"&&this.eventType!=="point"&&this.resize(e),this.lastEvent=null,this.eventType="",Pa(window,"mousemove.resize touchmove.resize"),Pa(window,"mouseup.resize touchend.resize")}snapToGrid(e){return this.grid&&(e.x=Math.round(e.x/this.grid)*this.grid,e.y=Math.round(e.y/this.grid)*this.grid),e}snapToAngle(e){return this.degree&&(e=Math.round(e/this.degree)*this.degree),e}}Ie(Zr,{resize:function(t=!0,e={}){typeof t=="object"&&(e=t,t=!0);let r=this.remember("_ResizeHandler");return r||(t.prototype instanceof L6?(r=new t(this),t=!0):r=new L6(this),this.remember("_resizeHandler",r)),r.active(t,e),this}}),window.SVG===void 0&&(window.SVG=YG),window.Apex===void 0&&(window.Apex={});var z6=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w}return Ae(t,[{key:"initModules",value:function(){this.ctx.publicMethods=["updateOptions","updateSeries","appendData","appendSeries","isSeriesHidden","highlightSeries","toggleSeries","showSeries","hideSeries","setLocale","resetSeries","zoomX","toggleDataPointSelection","dataURI","exportToCSV","addXaxisAnnotation","addYaxisAnnotation","addPointAnnotation","clearAnnotations","removeAnnotation","paper","destroy"],this.ctx.eventList=["click","mousedown","mousemove","mouseleave","touchstart","touchmove","touchleave","mouseup","touchend"],this.ctx.animations=new Ld(this.ctx),this.ctx.axes=new JG(this.ctx),this.ctx.core=new CK(this.ctx.el,this.ctx),this.ctx.config=new hf({}),this.ctx.data=new nN(this.ctx),this.ctx.grid=new iR(this.ctx),this.ctx.graphics=new ge(this.ctx),this.ctx.coreUtils=new ir(this.ctx),this.ctx.crosshairs=new uj(this.ctx),this.ctx.events=new ZG(this.ctx),this.ctx.exports=new $h(this.ctx),this.ctx.fill=new Ja(this.ctx),this.ctx.localization=new QG(this.ctx),this.ctx.options=new ml,this.ctx.responsive=new eK(this.ctx),this.ctx.series=new Ra(this.ctx),this.ctx.theme=new tK(this.ctx),this.ctx.formatters=new qf(this.ctx),this.ctx.titleSubtitle=new rK(this.ctx),this.ctx.legend=new lR(this.ctx),this.ctx.toolbar=new cR(this.ctx),this.ctx.tooltip=new M6(this.ctx),this.ctx.dimensions=new xx(this.ctx),this.ctx.updateHelpers=new kK(this.ctx),this.ctx.zoomPanSelection=new lK(this.ctx),this.ctx.w.globals.tooltip=new M6(this.ctx)}}]),t}(),I6=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w}return Ae(t,[{key:"clear",value:function(e){var r=e.isUpdating;this.ctx.zoomPanSelection&&this.ctx.zoomPanSelection.destroy(),this.ctx.toolbar&&this.ctx.toolbar.destroy(),this.ctx.animations=null,this.ctx.axes=null,this.ctx.annotations=null,this.ctx.core=null,this.ctx.data=null,this.ctx.grid=null,this.ctx.series=null,this.ctx.responsive=null,this.ctx.theme=null,this.ctx.formatters=null,this.ctx.titleSubtitle=null,this.ctx.legend=null,this.ctx.dimensions=null,this.ctx.options=null,this.ctx.crosshairs=null,this.ctx.zoomPanSelection=null,this.ctx.updateHelpers=null,this.ctx.toolbar=null,this.ctx.localization=null,this.ctx.w.globals.tooltip=null,this.clearDomElements({isUpdating:r})}},{key:"killSVG",value:function(e){e.each(function(){this.removeClass("*"),this.off()},!0),e.clear()}},{key:"clearDomElements",value:function(e){var r=this,n=e.isUpdating,a=this.w.globals.dom.Paper.node;a.parentNode&&a.parentNode.parentNode&&!n&&(a.parentNode.parentNode.style.minHeight="unset");var s=this.w.globals.dom.baseEl;s&&this.ctx.eventList.forEach(function(l){s.removeEventListener(l,r.ctx.events.documentEvent)});var o=this.w.globals.dom;if(this.ctx.el!==null)for(;this.ctx.el.firstChild;)this.ctx.el.removeChild(this.ctx.el.firstChild);this.killSVG(o.Paper),o.Paper.remove(),o.elWrap=null,o.elGraphical=null,o.elLegendWrap=null,o.elLegendForeign=null,o.baseEl=null,o.elGridRect=null,o.elGridRectMask=null,o.elGridRectBarMask=null,o.elGridRectMarkerMask=null,o.elForecastMask=null,o.elNonForecastMask=null,o.elDefs=null}}]),t}(),N1=new WeakMap,TK=function(){function t(e,r){Se(this,t),this.opts=r,this.ctx=this,this.w=new KG(r).init(),this.el=e,this.w.globals.cuid=J.randomId(),this.w.globals.chartID=this.w.config.chart.id?J.escapeString(this.w.config.chart.id):this.w.globals.cuid,new z6(this).initModules(),this.lastUpdateOptions=null,this.create=J.bind(this.create,this),this.windowResizeHandler=this._windowResizeHandler.bind(this),this.parentResizeHandler=this._parentResizeCallback.bind(this)}return Ae(t,[{key:"render",value:function(){var e=this;return new Promise(function(r,n){if(J.elementExists(e.el)){Apex._chartInstances===void 0&&(Apex._chartInstances=[]),e.w.config.chart.id&&Apex._chartInstances.push({id:e.w.globals.chartID,group:e.w.config.chart.group,chart:e}),e.setLocale(e.w.config.chart.defaultLocale);var a=e.w.config.chart.events.beforeMount;typeof a=="function"&&a(e,e.w),e.events.fireEvent("beforeMount",[e,e.w]),window.addEventListener("resize",e.windowResizeHandler),function(m,x){var y=!1;if(m.nodeType!==Node.DOCUMENT_FRAGMENT_NODE){var b=m.getBoundingClientRect();m.style.display!=="none"&&b.width!==0||(y=!0)}var w=new ResizeObserver(function(N){y&&x.call(m,N),y=!0});m.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Array.from(m.children).forEach(function(N){return w.observe(N)}):w.observe(m),N1.set(x,w)}(e.el.parentNode,e.parentResizeHandler);var s=e.el.getRootNode&&e.el.getRootNode(),o=J.is("ShadowRoot",s),l=e.el.ownerDocument,c=o?s.getElementById("apexcharts-css"):l.getElementById("apexcharts-css");if(!c){var u;(c=document.createElement("style")).id="apexcharts-css",c.textContent=`@keyframes opaque {
0% {
opacity: 0
}
to {
opacity: 1
}
}
@keyframes resizeanim {
0%,
to {
opacity: 0
}
}
.apexcharts-canvas {
position: relative;
direction: ltr !important;
user-select: none
}
.apexcharts-canvas ::-webkit-scrollbar {
-webkit-appearance: none;
width: 6px
}
.apexcharts-canvas ::-webkit-scrollbar-thumb {
border-radius: 4px;
background-color: rgba(0, 0, 0, .5);
box-shadow: 0 0 1px rgba(255, 255, 255, .5);
-webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5)
}
.apexcharts-inner {
position: relative
}
.apexcharts-text tspan {
font-family: inherit
}
rect.legend-mouseover-inactive,
.legend-mouseover-inactive rect,
.legend-mouseover-inactive path,
.legend-mouseover-inactive circle,
.legend-mouseover-inactive line,
.legend-mouseover-inactive text.apexcharts-yaxis-title-text,
.legend-mouseover-inactive text.apexcharts-yaxis-label {
transition: .15s ease all;
opacity: .2
}
.apexcharts-legend-text {
padding-left: 15px;
margin-left: -15px;
}
.apexcharts-series-collapsed {
opacity: 0
}
.apexcharts-tooltip {
border-radius: 5px;
box-shadow: 2px 2px 6px -4px #999;
cursor: default;
font-size: 14px;
left: 62px;
opacity: 0;
pointer-events: none;
position: absolute;
top: 20px;
display: flex;
flex-direction: column;
overflow: hidden;
white-space: nowrap;
z-index: 12;
transition: .15s ease all
}
.apexcharts-tooltip.apexcharts-active {
opacity: 1;
transition: .15s ease all
}
.apexcharts-tooltip.apexcharts-theme-light {
border: 1px solid #e3e3e3;
background: rgba(255, 255, 255, .96)
}
.apexcharts-tooltip.apexcharts-theme-dark {
color: #fff;
background: rgba(30, 30, 30, .8)
}
.apexcharts-tooltip * {
font-family: inherit
}
.apexcharts-tooltip-title {
padding: 6px;
font-size: 15px;
margin-bottom: 4px
}
.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title {
background: #eceff1;
border-bottom: 1px solid #ddd
}
.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title {
background: rgba(0, 0, 0, .7);
border-bottom: 1px solid #333
}
.apexcharts-tooltip-text-goals-value,
.apexcharts-tooltip-text-y-value,
.apexcharts-tooltip-text-z-value {
display: inline-block;
margin-left: 5px;
font-weight: 600
}
.apexcharts-tooltip-text-goals-label:empty,
.apexcharts-tooltip-text-goals-value:empty,
.apexcharts-tooltip-text-y-label:empty,
.apexcharts-tooltip-text-y-value:empty,
.apexcharts-tooltip-text-z-value:empty,
.apexcharts-tooltip-title:empty {
display: none
}
.apexcharts-tooltip-text-goals-label,
.apexcharts-tooltip-text-goals-value {
padding: 6px 0 5px
}
.apexcharts-tooltip-goals-group,
.apexcharts-tooltip-text-goals-label,
.apexcharts-tooltip-text-goals-value {
display: flex
}
.apexcharts-tooltip-text-goals-label:not(:empty),
.apexcharts-tooltip-text-goals-value:not(:empty) {
margin-top: -6px
}
.apexcharts-tooltip-marker {
display: inline-block;
position: relative;
width: 16px;
height: 16px;
font-size: 16px;
line-height: 16px;
margin-right: 4px;
text-align: center;
vertical-align: middle;
color: inherit;
}
.apexcharts-tooltip-marker::before {
content: "";
display: inline-block;
width: 100%;
text-align: center;
color: currentcolor;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
font-size: 26px;
font-family: Arial, Helvetica, sans-serif;
line-height: 14px;
font-weight: 900;
}
.apexcharts-tooltip-marker[shape="circle"]::before {
content: "\\25CF";
}
.apexcharts-tooltip-marker[shape="square"]::before,
.apexcharts-tooltip-marker[shape="rect"]::before {
content: "\\25A0";
transform: translate(-1px, -2px);
}
.apexcharts-tooltip-marker[shape="line"]::before {
content: "\\2500";
}
.apexcharts-tooltip-marker[shape="diamond"]::before {
content: "\\25C6";
font-size: 28px;
}
.apexcharts-tooltip-marker[shape="triangle"]::before {
content: "\\25B2";
font-size: 22px;
}
.apexcharts-tooltip-marker[shape="cross"]::before {
content: "\\2715";
font-size: 18px;
}
.apexcharts-tooltip-marker[shape="plus"]::before {
content: "\\2715";
transform: rotate(45deg) translate(-1px, -1px);
font-size: 18px;
}
.apexcharts-tooltip-marker[shape="star"]::before {
content: "\\2605";
font-size: 18px;
}
.apexcharts-tooltip-marker[shape="sparkle"]::before {
content: "\\2726";
font-size: 20px;
}
.apexcharts-tooltip-series-group {
padding: 0 10px;
display: none;
text-align: left;
justify-content: left;
align-items: center
}
.apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker {
opacity: 1
}
.apexcharts-tooltip-series-group.apexcharts-active,
.apexcharts-tooltip-series-group:last-child {
padding-bottom: 4px
}
.apexcharts-tooltip-y-group {
padding: 6px 0 5px
}
.apexcharts-custom-tooltip,
.apexcharts-tooltip-box {
padding: 4px 8px
}
.apexcharts-tooltip-boxPlot {
display: flex;
flex-direction: column-reverse
}
.apexcharts-tooltip-box>div {
margin: 4px 0
}
.apexcharts-tooltip-box span.value {
font-weight: 700
}
.apexcharts-tooltip-rangebar {
padding: 5px 8px
}
.apexcharts-tooltip-rangebar .category {
font-weight: 600;
color: #777
}
.apexcharts-tooltip-rangebar .series-name {
font-weight: 700;
display: block;
margin-bottom: 5px
}
.apexcharts-xaxistooltip,
.apexcharts-yaxistooltip {
opacity: 0;
pointer-events: none;
color: #373d3f;
font-size: 13px;
text-align: center;
border-radius: 2px;
position: absolute;
z-index: 10;
background: #eceff1;
border: 1px solid #90a4ae
}
.apexcharts-xaxistooltip {
padding: 9px 10px;
transition: .15s ease all
}
.apexcharts-xaxistooltip.apexcharts-theme-dark {
background: rgba(0, 0, 0, .7);
border: 1px solid rgba(0, 0, 0, .5);
color: #fff
}
.apexcharts-xaxistooltip:after,
.apexcharts-xaxistooltip:before {
left: 50%;
border: solid transparent;
content: " ";
height: 0;
width: 0;
position: absolute;
pointer-events: none
}
.apexcharts-xaxistooltip:after {
border-color: transparent;
border-width: 6px;
margin-left: -6px
}
.apexcharts-xaxistooltip:before {
border-color: transparent;
border-width: 7px;
margin-left: -7px
}
.apexcharts-xaxistooltip-bottom:after,
.apexcharts-xaxistooltip-bottom:before {
bottom: 100%
}
.apexcharts-xaxistooltip-top:after,
.apexcharts-xaxistooltip-top:before {
top: 100%
}
.apexcharts-xaxistooltip-bottom:after {
border-bottom-color: #eceff1
}
.apexcharts-xaxistooltip-bottom:before {
border-bottom-color: #90a4ae
}
.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:after,
.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:before {
border-bottom-color: rgba(0, 0, 0, .5)
}
.apexcharts-xaxistooltip-top:after {
border-top-color: #eceff1
}
.apexcharts-xaxistooltip-top:before {
border-top-color: #90a4ae
}
.apexcharts-xaxistooltip-top.apexcharts-theme-dark:after,
.apexcharts-xaxistooltip-top.apexcharts-theme-dark:before {
border-top-color: rgba(0, 0, 0, .5)
}
.apexcharts-xaxistooltip.apexcharts-active {
opacity: 1;
transition: .15s ease all
}
.apexcharts-yaxistooltip {
padding: 4px 10px
}
.apexcharts-yaxistooltip.apexcharts-theme-dark {
background: rgba(0, 0, 0, .7);
border: 1px solid rgba(0, 0, 0, .5);
color: #fff
}
.apexcharts-yaxistooltip:after,
.apexcharts-yaxistooltip:before {
top: 50%;
border: solid transparent;
content: " ";
height: 0;
width: 0;
position: absolute;
pointer-events: none
}
.apexcharts-yaxistooltip:after {
border-color: transparent;
border-width: 6px;
margin-top: -6px
}
.apexcharts-yaxistooltip:before {
border-color: transparent;
border-width: 7px;
margin-top: -7px
}
.apexcharts-yaxistooltip-left:after,
.apexcharts-yaxistooltip-left:before {
left: 100%
}
.apexcharts-yaxistooltip-right:after,
.apexcharts-yaxistooltip-right:before {
right: 100%
}
.apexcharts-yaxistooltip-left:after {
border-left-color: #eceff1
}
.apexcharts-yaxistooltip-left:before {
border-left-color: #90a4ae
}
.apexcharts-yaxistooltip-left.apexcharts-theme-dark:after,
.apexcharts-yaxistooltip-left.apexcharts-theme-dark:before {
border-left-color: rgba(0, 0, 0, .5)
}
.apexcharts-yaxistooltip-right:after {
border-right-color: #eceff1
}
.apexcharts-yaxistooltip-right:before {
border-right-color: #90a4ae
}
.apexcharts-yaxistooltip-right.apexcharts-theme-dark:after,
.apexcharts-yaxistooltip-right.apexcharts-theme-dark:before {
border-right-color: rgba(0, 0, 0, .5)
}
.apexcharts-yaxistooltip.apexcharts-active {
opacity: 1
}
.apexcharts-yaxistooltip-hidden {
display: none
}
.apexcharts-xcrosshairs,
.apexcharts-ycrosshairs {
pointer-events: none;
opacity: 0;
transition: .15s ease all
}
.apexcharts-xcrosshairs.apexcharts-active,
.apexcharts-ycrosshairs.apexcharts-active {
opacity: 1;
transition: .15s ease all
}
.apexcharts-ycrosshairs-hidden {
opacity: 0
}
.apexcharts-selection-rect {
cursor: move
}
.svg_select_shape {
stroke-width: 1;
stroke-dasharray: 10 10;
stroke: black;
stroke-opacity: 0.1;
pointer-events: none;
fill: none;
}
.svg_select_handle {
stroke-width: 3;
stroke: black;
fill: none;
}
.svg_select_handle_r {
cursor: e-resize;
}
.svg_select_handle_l {
cursor: w-resize;
}
.apexcharts-svg.apexcharts-zoomable.hovering-zoom {
cursor: crosshair
}
.apexcharts-svg.apexcharts-zoomable.hovering-pan {
cursor: move
}
.apexcharts-menu-icon,
.apexcharts-pan-icon,
.apexcharts-reset-icon,
.apexcharts-selection-icon,
.apexcharts-toolbar-custom-icon,
.apexcharts-zoom-icon,
.apexcharts-zoomin-icon,
.apexcharts-zoomout-icon {
cursor: pointer;
width: 20px;
height: 20px;
line-height: 24px;
color: #6e8192;
text-align: center
}
.apexcharts-menu-icon svg,
.apexcharts-reset-icon svg,
.apexcharts-zoom-icon svg,
.apexcharts-zoomin-icon svg,
.apexcharts-zoomout-icon svg {
fill: #6e8192
}
.apexcharts-selection-icon svg {
fill: #444;
transform: scale(.76)
}
.apexcharts-theme-dark .apexcharts-menu-icon svg,
.apexcharts-theme-dark .apexcharts-pan-icon svg,
.apexcharts-theme-dark .apexcharts-reset-icon svg,
.apexcharts-theme-dark .apexcharts-selection-icon svg,
.apexcharts-theme-dark .apexcharts-toolbar-custom-icon svg,
.apexcharts-theme-dark .apexcharts-zoom-icon svg,
.apexcharts-theme-dark .apexcharts-zoomin-icon svg,
.apexcharts-theme-dark .apexcharts-zoomout-icon svg {
fill: #f3f4f5
}
.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected svg,
.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected svg,
.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected svg {
fill: #008ffb
}
.apexcharts-theme-light .apexcharts-menu-icon:hover svg,
.apexcharts-theme-light .apexcharts-reset-icon:hover svg,
.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover svg,
.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover svg,
.apexcharts-theme-light .apexcharts-zoomin-icon:hover svg,
.apexcharts-theme-light .apexcharts-zoomout-icon:hover svg {
fill: #333
}
.apexcharts-menu-icon,
.apexcharts-selection-icon {
position: relative
}
.apexcharts-reset-icon {
margin-left: 5px
}
.apexcharts-menu-icon,
.apexcharts-reset-icon,
.apexcharts-zoom-icon {
transform: scale(.85)
}
.apexcharts-zoomin-icon,
.apexcharts-zoomout-icon {
transform: scale(.7)
}
.apexcharts-zoomout-icon {
margin-right: 3px
}
.apexcharts-pan-icon {
transform: scale(.62);
position: relative;
left: 1px;
top: 0
}
.apexcharts-pan-icon svg {
fill: #fff;
stroke: #6e8192;
stroke-width: 2
}
.apexcharts-pan-icon.apexcharts-selected svg {
stroke: #008ffb
}
.apexcharts-pan-icon:not(.apexcharts-selected):hover svg {
stroke: #333
}
.apexcharts-toolbar {
position: absolute;
z-index: 11;
max-width: 176px;
text-align: right;
border-radius: 3px;
padding: 0 6px 2px;
display: flex;
justify-content: space-between;
align-items: center
}
.apexcharts-menu {
background: #fff;
position: absolute;
top: 100%;
border: 1px solid #ddd;
border-radius: 3px;
padding: 3px;
right: 10px;
opacity: 0;
min-width: 110px;
transition: .15s ease all;
pointer-events: none
}
.apexcharts-menu.apexcharts-menu-open {
opacity: 1;
pointer-events: all;
transition: .15s ease all
}
.apexcharts-menu-item {
padding: 6px 7px;
font-size: 12px;
cursor: pointer
}
.apexcharts-theme-light .apexcharts-menu-item:hover {
background: #eee
}
.apexcharts-theme-dark .apexcharts-menu {
background: rgba(0, 0, 0, .7);
color: #fff
}
@media screen and (min-width:768px) {
.apexcharts-canvas:hover .apexcharts-toolbar {
opacity: 1
}
}
.apexcharts-canvas .apexcharts-element-hidden,
.apexcharts-datalabel.apexcharts-element-hidden,
.apexcharts-hide .apexcharts-series-points {
opacity: 0;
}
.apexcharts-hidden-element-shown {
opacity: 1;
transition: 0.25s ease all;
}
.apexcharts-datalabel,
.apexcharts-datalabel-label,
.apexcharts-datalabel-value,
.apexcharts-datalabels,
.apexcharts-pie-label {
cursor: default;
pointer-events: none
}
.apexcharts-pie-label-delay {
opacity: 0;
animation-name: opaque;
animation-duration: .3s;
animation-fill-mode: forwards;
animation-timing-function: ease
}
.apexcharts-radialbar-label {
cursor: pointer;
}
.apexcharts-annotation-rect,
.apexcharts-area-series .apexcharts-area,
.apexcharts-gridline,
.apexcharts-line,
.apexcharts-point-annotation-label,
.apexcharts-radar-series path:not(.apexcharts-marker),
.apexcharts-radar-series polygon,
.apexcharts-toolbar svg,
.apexcharts-tooltip .apexcharts-marker,
.apexcharts-xaxis-annotation-label,
.apexcharts-yaxis-annotation-label,
.apexcharts-zoom-rect,
.no-pointer-events {
pointer-events: none
}
.apexcharts-tooltip-active .apexcharts-marker {
transition: .15s ease all
}
.apexcharts-radar-series .apexcharts-yaxis {
pointer-events: none;
}
.resize-triggers {
animation: 1ms resizeanim;
visibility: hidden;
opacity: 0;
height: 100%;
width: 100%;
overflow: hidden
}
.contract-trigger:before,
.resize-triggers,
.resize-triggers>div {
content: " ";
display: block;
position: absolute;
top: 0;
left: 0
}
.resize-triggers>div {
height: 100%;
width: 100%;
background: #eee;
overflow: auto
}
.contract-trigger:before {
overflow: hidden;
width: 200%;
height: 200%
}
.apexcharts-bar-goals-markers {
pointer-events: none
}
.apexcharts-bar-shadows {
pointer-events: none
}
.apexcharts-rangebar-goals-markers {
pointer-events: none
}
.apexcharts-disable-transitions * {
transition: none !important;
}`;var h=((u=e.opts.chart)===null||u===void 0?void 0:u.nonce)||e.w.config.chart.nonce;h&&c.setAttribute("nonce",h),o?s.prepend(c):l.head.appendChild(c)}var p=e.create(e.w.config.series,{});if(!p)return r(e);e.mount(p).then(function(){typeof e.w.config.chart.events.mounted=="function"&&e.w.config.chart.events.mounted(e,e.w),e.events.fireEvent("mounted",[e,e.w]),r(p)}).catch(function(m){n(m)})}else n(new Error("Element not found"))})}},{key:"create",value:function(e,r){var n=this,a=this.w;new z6(this).initModules();var s=this.w.globals;if(s.noData=!1,s.animationEnded=!1,!J.elementExists(this.el)||(this.responsive.checkResponsiveConfig(r),a.config.xaxis.convertedCatToNumeric&&new uf(a.config).convertCatToNumericXaxis(a.config,this.ctx),this.core.setupElements(),a.config.chart.type==="treemap"&&(a.config.grid.show=!1,a.config.yaxis[0].show=!1),s.svgWidth===0))return s.animationEnded=!0,null;var o=e;e.forEach(function(m,x){m.hidden&&(o=n.legend.legendHelpers.getSeriesAfterCollapsing({realIndex:x}))});var l=ir.checkComboSeries(o,a.config.chart.type);s.comboCharts=l.comboCharts,s.comboBarCount=l.comboBarCount;var c=o.every(function(m){return m.data&&m.data.length===0});(o.length===0||c&&s.collapsedSeries.length<1)&&this.series.handleNoData(),this.events.setupEventHandlers(),this.data.parseData(o),this.theme.init(),new Fd(this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),s.noData&&s.collapsedSeries.length!==s.series.length&&!a.config.legend.showForSingleSeries||this.legend.init(),this.series.hasAllSeriesEqualX(),s.axisCharts&&(this.core.coreCalculations(),a.config.xaxis.type!=="category"&&this.formatters.setLabelFormatters(),this.ctx.toolbar.minX=a.globals.minX,this.ctx.toolbar.maxX=a.globals.maxX),this.formatters.heatmapLabelFormatters(),new ir(this).getLargestMarkerSize(),this.dimensions.plotCoords();var u=this.core.xySettings();this.grid.createGridMask();var h=this.core.plotChartType(o,u),p=new gd(this);return p.bringForward(),a.config.dataLabels.background.enabled&&p.dataLabelsBackground(),this.core.shiftGraphPosition(),a.globals.dataPoints>50&&a.globals.dom.elWrap.classList.add("apexcharts-disable-transitions"),{elGraph:h,xyRatios:u,dimensions:{plot:{left:a.globals.translateX,top:a.globals.translateY,width:a.globals.gridWidth,height:a.globals.gridHeight}}}}},{key:"mount",value:function(){var e=this,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,n=this,a=n.w;return new Promise(function(s,o){if(n.el===null)return o(new Error("Not enough data to display or target element not found"));(r===null||a.globals.allSeriesCollapsed)&&n.series.handleNoData(),n.grid=new iR(n);var l,c,u=n.grid.drawGrid();if(n.annotations=new GG(n),n.annotations.drawImageAnnos(),n.annotations.drawTextAnnos(),a.config.grid.position==="back"&&(u&&a.globals.dom.elGraphical.add(u.el),u!=null&&(l=u.elGridBorders)!==null&&l!==void 0&&l.node&&a.globals.dom.elGraphical.add(u.elGridBorders)),Array.isArray(r.elGraph))for(var h=0;h<r.elGraph.length;h++)a.globals.dom.elGraphical.add(r.elGraph[h]);else a.globals.dom.elGraphical.add(r.elGraph);a.config.grid.position==="front"&&(u&&a.globals.dom.elGraphical.add(u.el),u!=null&&(c=u.elGridBorders)!==null&&c!==void 0&&c.node&&a.globals.dom.elGraphical.add(u.elGridBorders)),a.config.xaxis.crosshairs.position==="front"&&n.crosshairs.drawXCrosshairs(),a.config.yaxis[0].crosshairs.position==="front"&&n.crosshairs.drawYCrosshairs(),a.config.chart.type!=="treemap"&&n.axes.drawAxis(a.config.chart.type,u);var p=new ff(e.ctx,u),m=new aN(e.ctx,u);if(u!==null&&(p.xAxisLabelCorrections(u.xAxisTickWidth),m.setYAxisTextAlignments(),a.config.yaxis.map(function(y,b){a.globals.ignoreYAxisIndexes.indexOf(b)===-1&&m.yAxisTitleRotate(b,y.opposite)})),n.annotations.drawAxesAnnotations(),!a.globals.noData){if(a.config.tooltip.enabled&&!a.globals.noData&&n.w.globals.tooltip.drawTooltip(r.xyRatios),a.globals.axisCharts&&(a.globals.isXNumeric||a.config.xaxis.convertedCatToNumeric||a.globals.isRangeBar))(a.config.chart.zoom.enabled||a.config.chart.selection&&a.config.chart.selection.enabled||a.config.chart.pan&&a.config.chart.pan.enabled)&&n.zoomPanSelection.init({xyRatios:r.xyRatios});else{var x=a.config.chart.toolbar.tools;["zoom","zoomin","zoomout","selection","pan","reset"].forEach(function(y){x[y]=!1})}a.config.chart.toolbar.show&&!a.globals.allSeriesCollapsed&&n.toolbar.createToolbar()}a.globals.memory.methodsToExec.length>0&&a.globals.memory.methodsToExec.forEach(function(y){y.method(y.params,!1,y.context)}),a.globals.axisCharts||a.globals.noData||n.core.resizeNonAxisCharts(),s(n)})}},{key:"destroy",value:function(){window.removeEventListener("resize",this.windowResizeHandler),function(r,n){var a=N1.get(n);a&&(a.disconnect(),N1.delete(n))}(this.el.parentNode,this.parentResizeHandler);var e=this.w.config.chart.id;e&&Apex._chartInstances.forEach(function(r,n){r.id===J.escapeString(e)&&Apex._chartInstances.splice(n,1)}),new I6(this.ctx).clear({isUpdating:!1})}},{key:"updateOptions",value:function(e){var r=this,n=arguments.length>1&&arguments[1]!==void 0&&arguments[1],a=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],s=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],o=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4],l=this.w;return l.globals.selection=void 0,this.lastUpdateOptions&&JSON.stringify(this.lastUpdateOptions)===JSON.stringify(e)?this:(e.series&&(this.updateHelpers.resetParsingFlags(),this.series.resetSeries(!1,!0,!1),e.series.length&&e.series[0].data&&(e.series=e.series.map(function(c,u){return r.updateHelpers._extendSeries(c,u)})),this.updateHelpers.revertDefaultAxisMinMax()),e.xaxis&&(e=this.updateHelpers.forceXAxisUpdate(e)),e.yaxis&&(e=this.updateHelpers.forceYAxisUpdate(e)),l.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),e.theme&&(e=this.theme.updateThemeOptions(e)),this.updateHelpers._updateOptions(e,n,a,s,o))}},{key:"updateSeries",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],n=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2];return this.updateHelpers.resetParsingFlags(),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(e,r,n)}},{key:"appendSeries",value:function(e){var r=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],n=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],a=this.w.config.series.slice();return a.push(e),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(a,r,n)}},{key:"appendData",value:function(e){var r=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],n=this;n.w.globals.dataChanged=!0,n.series.getPreviousPaths();for(var a=n.w.config.series.slice(),s=0;s<a.length;s++)if(e[s]!==null&&e[s]!==void 0)for(var o=0;o<e[s].data.length;o++)a[s].data.push(e[s].data[o]);return n.w.config.series=a,r&&(n.w.globals.initialSeries=J.clone(n.w.config.series)),this.update()}},{key:"update",value:function(e){var r=this;return new Promise(function(n,a){if(r.lastUpdateOptions&&JSON.stringify(r.lastUpdateOptions)===JSON.stringify(e))return n(r);r.lastUpdateOptions=J.clone(e),new I6(r.ctx).clear({isUpdating:!0});var s=r.create(r.w.config.series,e);if(!s)return n(r);r.mount(s).then(function(){typeof r.w.config.chart.events.updated=="function"&&r.w.config.chart.events.updated(r,r.w),r.events.fireEvent("updated",[r,r.w]),r.w.globals.isDirty=!0,n(r)}).catch(function(o){a(o)})})}},{key:"getSyncedCharts",value:function(){var e=this.getGroupedCharts(),r=[this];return e.length&&(r=[],e.forEach(function(n){r.push(n)})),r}},{key:"getGroupedCharts",value:function(){var e=this;return Apex._chartInstances.filter(function(r){if(r.group)return!0}).map(function(r){return e.w.config.chart.group===r.group?r.chart:e})}},{key:"toggleSeries",value:function(e){return this.series.toggleSeries(e)}},{key:"highlightSeriesOnLegendHover",value:function(e,r){return this.series.toggleSeriesOnHover(e,r)}},{key:"showSeries",value:function(e){this.series.showSeries(e)}},{key:"hideSeries",value:function(e){this.series.hideSeries(e)}},{key:"highlightSeries",value:function(e){this.series.highlightSeries(e)}},{key:"isSeriesHidden",value:function(e){this.series.isSeriesHidden(e)}},{key:"resetSeries",value:function(){var e=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],r=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this.series.resetSeries(e,r)}},{key:"addEventListener",value:function(e,r){this.events.addEventListener(e,r)}},{key:"removeEventListener",value:function(e,r){this.events.removeEventListener(e,r)}},{key:"addXaxisAnnotation",value:function(e){var r=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,a=this;n&&(a=n),a.annotations.addXaxisAnnotationExternal(e,r,a)}},{key:"addYaxisAnnotation",value:function(e){var r=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,a=this;n&&(a=n),a.annotations.addYaxisAnnotationExternal(e,r,a)}},{key:"addPointAnnotation",value:function(e){var r=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,a=this;n&&(a=n),a.annotations.addPointAnnotationExternal(e,r,a)}},{key:"clearAnnotations",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0,r=this;e&&(r=e),r.annotations.clearAnnotations(r)}},{key:"removeAnnotation",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,n=this;r&&(n=r),n.annotations.removeAnnotation(n,e)}},{key:"getChartArea",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner")}},{key:"getSeriesTotalXRange",value:function(e,r){return this.coreUtils.getSeriesTotalsXRange(e,r)}},{key:"getHighestValueInSeries",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return new dj(this.ctx).getMinYMaxY(e).highestY}},{key:"getLowestValueInSeries",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return new dj(this.ctx).getMinYMaxY(e).lowestY}},{key:"getSeriesTotal",value:function(){return this.w.globals.seriesTotals}},{key:"toggleDataPointSelection",value:function(e,r){return this.updateHelpers.toggleDataPointSelection(e,r)}},{key:"zoomX",value:function(e,r){this.ctx.toolbar.zoomUpdateOptions(e,r)}},{key:"setLocale",value:function(e){this.localization.setCurrentLocaleValues(e)}},{key:"dataURI",value:function(e){return new $h(this.ctx).dataURI(e)}},{key:"getSvgString",value:function(e){return new $h(this.ctx).getSvgString(e)}},{key:"exportToCSV",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new $h(this.ctx).exportToCSV(e)}},{key:"paper",value:function(){return this.w.globals.dom.Paper}},{key:"_parentResizeCallback",value:function(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}},{key:"_windowResize",value:function(){var e=this;clearTimeout(this.w.globals.resizeTimer),this.w.globals.resizeTimer=window.setTimeout(function(){e.w.globals.resized=!0,e.w.globals.dataChanged=!1,e.ctx.update()},150)}},{key:"_windowResizeHandler",value:function(){var e=this.w.config.chart.redrawOnWindowResize;typeof e=="function"&&(e=e()),e&&this._windowResize()}}],[{key:"getChartByID",value:function(e){var r=J.escapeString(e);if(Apex._chartInstances){var n=Apex._chartInstances.filter(function(a){return a.id===r})[0];return n&&n.chart}}},{key:"initOnLoad",value:function(){for(var e=document.querySelectorAll("[data-apexcharts]"),r=0;r<e.length;r++)new t(e[r],JSON.parse(e[r].getAttribute("data-options"))).render()}},{key:"exec",value:function(e,r){var n=this.getChartByID(e);if(n){n.w.globals.isExecCalled=!0;var a=null;if(n.publicMethods.indexOf(r)!==-1){for(var s=arguments.length,o=new Array(s>2?s-2:0),l=2;l<s;l++)o[l-2]=arguments[l];a=n[r].apply(n,o)}return a}}},{key:"merge",value:function(e,r){return J.extend(e,r)}},{key:"getThemePalettes",value:function(){return{palette1:["#008FFB","#00E396","#FEB019","#FF4560","#775DD0"],palette2:["#3F51B5","#03A9F4","#4CAF50","#F9CE1D","#FF9800"],palette3:["#33B2DF","#546E7A","#D4526E","#13D8AA","#A5978B"],palette4:["#4ECDC4","#C7F464","#81D4FA","#FD6A6A","#546E7A"],palette5:["#2B908F","#F9A3A4","#90EE7E","#FA4443","#69D2E7"],palette6:["#449DD1","#F86624","#EA3546","#662E9B","#C5D86D"],palette7:["#D7263D","#1B998B","#2E294E","#F46036","#E2C044"],palette8:["#662E9B","#F86624","#F9C80E","#EA3546","#43BCCD"],palette9:["#5C4742","#A5978B","#8D5B4C","#5A2A27","#C4BBAF"],palette10:["#A300D6","#7D02EB","#5653FE","#2983FF","#00B1F2"]}}}]),t}();const MK=Object.freeze(Object.defineProperty({__proto__:null,default:TK},Symbol.toStringTag,{value:"Module"})),EK=aH(MK);var S1={exports:{}},A1,B6;function OK(){if(B6)return A1;B6=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return A1=t,A1}var C1,F6;function PK(){if(F6)return C1;F6=1;var t=OK();function e(){}function r(){}return r.resetWarningCache=e,C1=function(){function n(o,l,c,u,h,p){if(p!==t){var m=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 m.name="Invariant Violation",m}}n.isRequired=n;function a(){return n}var s={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:a,element:n,elementType:n,instanceOf:a,node:n,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:r,resetWarningCache:e};return s.PropTypes=s,s},C1}var H6;function _K(){return H6||(H6=1,S1.exports=PK()()),S1.exports}var $6;function RK(){return $6||($6=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=S;var e=l(Gl()),r=s(EK),n=s(_K()),a=["type","width","height","series","options"];function s(C){return C&&C.__esModule?C:{default:C}}function o(C){var k,T;return typeof WeakMap!="function"?null:(k=new WeakMap,T=new WeakMap,(o=function(E){return E?T:k})(C))}function l(C,k){if(!k&&C&&C.__esModule)return C;if(C===null||p(C)!="object"&&typeof C!="function")return{default:C};if(k=o(k),k&&k.has(C))return k.get(C);var T,E,_={__proto__:null},L=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(T in C)T!=="default"&&{}.hasOwnProperty.call(C,T)&&((E=L?Object.getOwnPropertyDescriptor(C,T):null)&&(E.get||E.set)?Object.defineProperty(_,T,E):_[T]=C[T]);return _.default=C,k&&k.set(C,_),_}function c(){return(c=Object.assign?Object.assign.bind():function(C){for(var k=1;k<arguments.length;k++){var T,E=arguments[k];for(T in E)!{}.hasOwnProperty.call(E,T)||(C[T]=E[T])}return C}).apply(null,arguments)}function u(C,k){if(C==null)return{};var T,E=h(C,k);if(Object.getOwnPropertySymbols)for(var _=Object.getOwnPropertySymbols(C),L=0;L<_.length;L++)T=_[L],k.includes(T)||{}.propertyIsEnumerable.call(C,T)&&(E[T]=C[T]);return E}function h(C,k){if(C==null)return{};var T,E={};for(T in C)if({}.hasOwnProperty.call(C,T)){if(k.includes(T))continue;E[T]=C[T]}return E}function p(C){return(p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(k){return typeof k}:function(k){return k&&typeof Symbol=="function"&&k.constructor===Symbol&&k!==Symbol.prototype?"symbol":typeof k})(C)}function m(C,k){var T,E=Object.keys(C);return Object.getOwnPropertySymbols&&(T=Object.getOwnPropertySymbols(C),k&&(T=T.filter(function(_){return Object.getOwnPropertyDescriptor(C,_).enumerable})),E.push.apply(E,T)),E}function x(C){for(var k=1;k<arguments.length;k++){var T=arguments[k]!=null?arguments[k]:{};k%2?m(Object(T),!0).forEach(function(E){y(C,E,T[E])}):Object.getOwnPropertyDescriptors?Object.defineProperties(C,Object.getOwnPropertyDescriptors(T)):m(Object(T)).forEach(function(E){Object.defineProperty(C,E,Object.getOwnPropertyDescriptor(T,E))})}return C}function y(C,k,T){return(k=b(k))in C?Object.defineProperty(C,k,{value:T,enumerable:!0,configurable:!0,writable:!0}):C[k]=T,C}function b(C){return C=w(C,"string"),p(C)=="symbol"?C:C+""}function w(C,k){if(p(C)!="object"||!C)return C;var T=C[Symbol.toPrimitive];if(T===void 0)return(k==="string"?String:Number)(C);if(T=T.call(C,k),p(T)!="object")return T;throw new TypeError("@@toPrimitive must return a primitive value.")}function N(C,k){var T=x({},C);return k.forEach(function(E){delete T[E]}),T}function A(C,k){var T=2<arguments.length&&arguments[2]!==void 0?arguments[2]:new WeakSet;if(C!==k){if(p(C)!=="object"||C===null||p(k)!=="object"||k===null)return!1;if(!T.has(C)&&!T.has(k)){T.add(C),T.add(k);var E=Object.keys(C),_=Object.keys(k);if(E.length!==_.length)return!1;for(var L=0,P=E;L<P.length;L++){var R=P[L];if(!_.includes(R)||!A(C[R],k[R],T))return!1}}}return!0}function S(W){function k(V){return V&&p(V)==="object"&&!Array.isArray(V)}var R=W.type,T=R===void 0?"line":R,R=W.width,E=R===void 0?"100%":R,R=W.height,_=R===void 0?"auto":R,L=W.series,P=W.options,R=u(W,a),z=(0,e.useRef)(null),B=(0,e.useRef)(null),Y=(0,e.useRef)(),X=((0,e.useEffect)(function(){Y.current=P;var V=z.current;return B.current=new r.default(V,X()),B.current.render(),function(){B.current&&typeof B.current.destroy=="function"&&B.current.destroy()}},[]),(0,e.useEffect)(function(){var V=!A(B.current.w.config.series,L),Z=!A(Y.current,P)||_!==B.current.opts.chart.height||E!==B.current.opts.chart.width;(V||Z)&&(!V||Z?B.current.updateOptions(X()):B.current.updateSeries(L)),Y.current=P},[P,L,_,E]),function(){return H(P,{chart:{type:T,height:_,width:E},series:L})}),H=function(V,Z){var F=x({},V);return k(V)&&k(Z)&&Object.keys(Z).forEach(function(G){k(Z[G])&&G in V?F[G]=H(V[G],Z[G]):Object.assign(F,y({},G,Z[G]))}),F},W=N(R,Object.keys(S.propTypes));return e.default.createElement("div",c({ref:z},W))}S.propTypes={type:n.default.string.isRequired,series:n.default.array.isRequired,options:n.default.object.isRequired,width:n.default.oneOfType([n.default.string,n.default.number]),height:n.default.oneOfType([n.default.string,n.default.number])}}(s1)),s1}var LK=RK();const Qr=ns(LK),bR=({data:t})=>{const e={chart:{type:"area",sparkline:{enabled:!0}},stroke:{curve:"smooth"},fill:{type:"gradient",gradient:{opacityFrom:.5,opacityTo:.1}},colors:["#FFD700"],tooltip:{enabled:!1}},r=[{name:"Trend",data:t}];return i.jsx(Qr,{options:e,series:r,type:"area",height:60,width:"100%"})},zK=[{title:"Total Deposit",money:"$1000",chartData:[20,40,86,60,90]},{title:"Total Withdrawal",money:"$1000",chartData:[10,22,34,25,15]},{title:"Total Rides",money:"100+",chartData:[5,15,25,20,30]}],IK=[{heading:"KYC Document:",image1:"https://www.citizencard.com/images/sample-cards/uk-id-card-for-over-18s-2025.png",title:"Front Side",image2:"https://www.citizencard.com/images/sample-cards/uk-id-card-for-over-18s-2025.png",title2:"Back Side"}],BK=()=>i.jsxs("div",{className:"",children:[i.jsx("div",{children:i.jsx(Zl,{})}),i.jsxs("div",{className:"mt-8 flex items-center justify-around w-[80%] mx-auto",children:[i.jsxs("div",{className:"grid grid-cols-3 gap-8 w-[70%]",children:[zK.map((t,e)=>i.jsxs("div",{className:"shadow-xl p-4 rounded shadow-black outline outline-black/20 bg-gradient-to-b from-[#038A59] to-[#013723] text-[#DDC104]",children:[i.jsx("p",{className:"font-semibold",children:t.title}),i.jsx("h2",{className:"text-xl font-bold",children:t.money}),i.jsx(bR,{data:t.chartData})," "]},e)),i.jsxs("div",{className:"text-sm flex flex-col gap-4 items-start ",children:[i.jsxs("p",{children:[i.jsx("span",{className:"font-bold",children:"ID:"})," 12345"]}),i.jsxs("p",{children:[i.jsx("span",{className:"font-bold",children:"Name:"})," Lorem Ipsum"]}),i.jsxs("p",{children:[i.jsx("span",{className:"font-bold",children:"Contact:"})," +1233456478"]}),i.jsxs("p",{children:[i.jsx("span",{className:"font-bold",children:"Status:"})," pending"]})]})]}),i.jsx("div",{className:"w-[20%] flex justify-center bg-yellow-200 pt-0 rounded p-1",children:i.jsx("img",{src:"https://randomuser.me/api/portraits/men/75.jpg",alt:"Profile",className:"w-full h-60 rounded shadow object-cover"})})]}),i.jsx("div",{className:"flex justify-center mt-6 p-4",children:i.jsx("div",{className:"border border-yellow-300 rounded-xl px-8 pt-4 w-[80%]",children:IK.map((t,e)=>i.jsxs("div",{className:"mb-10",children:[i.jsx("h2",{className:"text-xl font-bold mb-4",children:t.heading}),i.jsxs("div",{className:"flex justify-center items-center ",children:[i.jsxs("div",{className:"flex flex-col items-center",children:[i.jsx("img",{src:t.image1,alt:"id card",className:"w-[70%] mb-2"}),i.jsx("h2",{className:"font-bold",children:t.title})]}),i.jsxs("div",{className:"flex flex-col items-center",children:[i.jsx("img",{src:t.image2,alt:"id card",className:"w-[70%] mb-2"}),i.jsx("h2",{className:"font-bold",children:t.title2})]})]}),i.jsxs("div",{className:"flex justify-center gap-4 mt-4",children:[i.jsx("button",{className:"px-6 font-semibold py-1 text-sm rounded-full text-[#013220] bg-yellow-400",children:"Accept"}),i.jsx("button",{className:"px-6 font-semibold py-1 text-sm rounded-full text-[#013220] bg-yellow-400",children:"Reject"})]})]},e))})})]}),FK=[{id:1,date:"21/July/2025",pick:"Dubai",dropoff:"Sharjah",drivername:"Allice Smith",status:"Completed",fare:100},{id:1,date:"21/July/2025",pick:"Dubai",dropoff:"Sharjah",drivername:"Allice Smith",status:"Completed",fare:100},{id:1,date:"21/July/2025",pick:"Dubai",dropoff:"Sharjah",drivername:"Allice Smith",status:"Completed",fare:100}],HK=()=>i.jsx(i.Fragment,{children:i.jsxs("div",{children:[i.jsxs("div",{className:"flex justify-end items-center gap-4",children:[i.jsxs("div",{className:"text-sm font-bold flex items-center gap-2",children:[i.jsx(Sq,{}),i.jsx("label",{htmlFor:"",children:"Date:"}),i.jsx("input",{type:"date",name:"",id:"",className:"bg-[#013220]"})]}),i.jsxs("div",{className:"flex justify-end pt-2 text-sm font-semibold",children:[i.jsx("label",{htmlFor:"",children:"Sort By:"}),i.jsxs("select",{name:"",id:"",className:"bg-[#013220]",children:[i.jsx("option",{value:"Month",children:"Completed"}),i.jsx("option",{value:"year",children:"Un-Completed"})]})]})]}),i.jsx(Zl,{}),i.jsx("div",{className:" pt-4",children:i.jsxs("table",{className:"w-full text-sm text-left",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-yellow-200",children:[i.jsx("th",{className:"px-3 py-3",children:"ID"}),i.jsx("th",{className:"px-4 py-3",children:"Date"}),i.jsx("th",{className:"px-4 py-3 text-cente",children:"Pick/Drop-off"}),i.jsx("th",{className:"px-4 py-3",children:"Driver Name"}),i.jsx("th",{className:"px-4 py-3",children:"Status"}),i.jsx("th",{className:"px-4 py-3",children:"Fare"}),i.jsx("th",{className:"px-4 py-3 text-center align-middle",children:"Action"})]})}),i.jsx("tbody",{children:FK.map((t,e)=>i.jsxs("tr",{children:[i.jsxs("td",{className:"px-3 py-3",children:["00",t.id]}),i.jsx("td",{className:"px-4 py-3",children:t.date}),i.jsx("td",{className:"px-4 py-3",children:i.jsxs("div",{children:[i.jsxs("p",{children:["Pick-up: ",t.pick]}),i.jsxs("p",{children:["Drop-off: ",t.dropoff]})]})}),i.jsx("td",{className:"px-4 py-3",children:t.drivername}),i.jsx("td",{className:"px-4 py-3",children:t.status}),i.jsxs("td",{className:"px-4 py-3",children:["$",t.fare]}),i.jsx("td",{className:"px-4 py-3",children:i.jsx("div",{className:"flex items-center gap-3 justify-center",children:i.jsx("button",{className:"bg-yellow-400 text-[#013220] px-4 py-1.5 cursor-pointer rounded-full text-xs font-medium",children:"View"})})})]},e))})]})})]})}),$K=[{date:"21/July/2025",time:"11:00 Pm",amount:100,payment:"Bank: ABM Bank Abu Dhabi"},{date:"21/July/2025",time:"11:00 Pm",amount:100,payment:"Bank: ABM Bank Abu Dhabi"},{date:"21/July/2025",time:"11:00 Pm",amount:100,payment:"Bank: ABM Bank Abu Dhabi"}],YK=[{title:"Total Deposit",money:1e3,chartData:[20,40,86,60,90]},{title:"Total Withdraw",money:1e3,chartData:[10,22,34,25,15]}],UK=({sortBy:t,setSortBy:e,options:r})=>{const[n,a]=O.useState(!1);return i.jsxs("div",{className:"relative text-sm",children:[i.jsxs("button",{onClick:()=>a(!n),className:"flex items-center gap-2 px-3 ",children:["Sort By: ",t,i.jsx(U4,{className:`transition-transform duration-200 ${n?"rotate-180":""}`})]}),n&&i.jsx("ul",{className:"absolute right-0 mt-2 w-20 bg-green-900 border border-yellow-400 rounded-md shadow-lg z-10",children:r.map((s,o)=>i.jsx("li",{className:"px-2 py-2 hover:bg-yellow-500 hover:text-black cursor-pointer",onClick:()=>{e(s),a(!1)},children:s},o))})]})},WK=()=>{const[t,e]=O.useState("Earn"),r=["Earn","Rating","Complaints"];return i.jsxs("div",{className:"text-yellow-400 w-full pt-2 px-2",children:[i.jsxs("div",{className:"flex items-center justify-end flex-wrap gap-4 mb-4",children:[i.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[i.jsxs("label",{className:"flex items-center space-x-2",children:[i.jsxs("div",{className:"text-sm flex items-center gap-1",children:[i.jsx(m6,{})," ",i.jsx("span",{children:"Date:"})]}),i.jsx("input",{type:"date",className:"bg-transparent text-yellow-300 focus:outline-none text-sm"})]}),i.jsx("span",{className:"text-sm pr-3",children:"To"}),i.jsxs("label",{className:"flex items-center space-x-2",children:[i.jsxs("div",{className:"text-sm flex items-center gap-1",children:[i.jsx(m6,{})," ",i.jsx("span",{children:"Date:"})]}),i.jsx("input",{type:"date",className:"bg-transparent text-yellow-300 focus:outline-none text-sm"})]})]}),i.jsx(UK,{sortBy:t,setSortBy:e,options:r})]}),i.jsx(Zl,{}),i.jsxs("div",{className:"pt-4",children:[i.jsx("div",{className:"flex justify-center gap-10 my-4 flex-wrap",children:YK.map((n,a)=>i.jsxs("div",{className:"rounded-xl shadow-lg px-6 py-4 bg-gradient-to-b from-[#038A59] to-[#013723] shadow-black space-y-2 min-w-[200px]",children:[i.jsx("p",{className:"font-semibold text-xl",children:n.title}),i.jsxs("h3",{className:"font-bold text-2xl",children:["$",n.money]}),i.jsx(bR,{data:n.chartData})," "]},a))}),i.jsxs("table",{className:"w-full text-sm text-left table-fixed",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-yellow-200",children:[i.jsx("th",{className:"w-[20%] px-6 py-3",children:"Date"}),i.jsx("th",{className:"w-[20%] px-4 py-3",children:"Time"}),i.jsx("th",{className:"w-[20%] px-4 py-3",children:"Amount"}),i.jsx("th",{className:"w-[20%] px-4 py-3 text-center",children:"Payment Method"}),i.jsx("th",{className:"w-[20%] px-4 py-3 text-center",children:"Action"})]})}),i.jsx("tbody",{children:$K.map((n,a)=>i.jsxs("tr",{children:[i.jsx("td",{className:"w-[20%] px-6 py-3",children:n.date}),i.jsx("td",{className:"w-[20%] px-4 py-3",children:n.time}),i.jsxs("td",{className:"w-[20%] px-4 py-3",children:["$",n.amount]}),i.jsx("td",{className:"w-[20%] px-4 py-3 text-center",children:n.payment}),i.jsx("td",{className:"w-[20%] px-4 py-3",children:i.jsx("div",{className:"flex items-center gap-3 justify-center",children:i.jsx("button",{className:"bg-yellow-400 text-[#013220] px-4 py-1.5 cursor-pointer rounded-full text-xs font-medium",children:"View"})})})]},a))})]})]})]})},XK=[{image:"",title:"Renee Watson",rating:"4.5 ⭐",date:"April 12,2024",desc:"Always punctual and reliable, ensuring timely pickups and drop-offs Maintains a clean and comfortable vehicle at all times Demonstrates excellent road safety and defensive driving skills Friendly, respectful, and communicates clearly with passengers Consistently receives positive feedback from clients and dispatch teams"},{image:"",title:"Renee Watson",rating:"4.5 ⭐",date:"April 12,2024",desc:"Always punctual and reliable, ensuring timely pickups and drop-offs Maintains a clean and comfortable vehicle at all times Demonstrates excellent road safety and defensive driving skills Friendly, respectful, and communicates clearly with passengers Consistently receives positive feedback from clients and dispatch teams"}],VK=()=>i.jsxs("div",{className:"text-yellow-400 w-full pt-2 px-2",children:[i.jsx(Zl,{}),i.jsxs("div",{className:"px-8 py-6",children:[i.jsx("div",{className:" flex justify-between w-[95%] mx-auto pb-4",children:i.jsxs("h2",{className:"font-semibold",children:["Ratings Given By Client to ",i.jsx("br",{})," Drivers"]})}),i.jsxs("div",{className:" w-[95%] mx-auto",children:[i.jsx("h4",{className:"font-semibold",children:"Reviews"}),XK.map((t,e)=>i.jsxs("div",{className:"border border-yellow-300 rounded-lg mb-6 px-4 pb-4 pt-2 ",children:[i.jsxs("div",{className:"flex justify-between",children:[i.jsxs("div",{className:"flex gap-8 ",children:[i.jsx("div",{children:i.jsx("img",{src:"https://plus.unsplash.com/premium_photo-1689568126014-06fea9d5d341?fm=jpg&q=60&w=3000&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxzZWFyY2h8MXx8cHJvZmlsZXxlbnwwfHwwfHx8MA%3D%3D",className:"rounded-full w-10 h-10 object-cover",alt:""})}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-semibold",children:t.title}),i.jsx("span",{children:t.rating})]})]}),i.jsx("span",{children:t.date})]}),i.jsx("div",{children:t.desc})]}))]})]})]}),qK=({data:t})=>{const e={chart:{type:"area",sparkline:{enabled:!0}},stroke:{curve:"smooth"},fill:{type:"gradient",gradient:{opacityFrom:.5,opacityTo:.1}},colors:["#FFD700"],tooltip:{enabled:!1}},r=[{name:"Trend",data:t}];return i.jsx(Qr,{options:e,series:r,type:"area",height:60,width:"100%"})},GK=[{total:"Total Earning",percent:"$100000",chartData:[20,40,86,60,90]},{total:"Team Members",percent:"10000",chartData:[20,40,86,60,90]}],KK=()=>i.jsx("div",{className:" text-[#DDC104] mr-10 py-8",children:i.jsx("div",{className:" flex justify-center gap-24 items-center ",children:GK.map((t,e)=>i.jsxs("div",{className:"flex flex-col gap-4 shadow-lg bg-gradient-to-b from-[#038A59] to-[#013723] rounded-lg pr-20 outline outline-black/20 pl-5 pt-5 bg-[#013220] shadow-black/80 ",children:[i.jsx("p",{className:"text-lg font-semibold tracking-wide",children:t.total}),i.jsx("h2",{className:"text-3xl font-bold",children:t.percent}),i.jsx(qK,{data:t.chartData})," "]},e))})}),ZK=[{id:1,name:"Smith Joy",amount:1e3,date:"4/July/25",source:"Driver",action:"View Detail"},{id:2,name:"John Doe",amount:1500,date:"5/July/25",source:"Rider",action:"View Detail"}],QK=()=>i.jsx(i.Fragment,{children:i.jsx("div",{className:"border mx-auto border-yellow-400 w-[95%] px-8 py-2 rounded",children:i.jsxs("table",{className:"w-full border-collapse table-fixed",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-yellow-400 text-left",children:[i.jsx("th",{className:"px-4 py-2",children:"ID"}),i.jsx("th",{className:"px-4 py-2",children:"Full Name"}),i.jsx("th",{className:"px-4 py-2",children:"Amount"}),i.jsx("th",{className:"px-4 py-2",children:"Date"}),i.jsx("th",{className:"px-4 py-2",children:"Source"}),i.jsx("th",{className:"px-4 py-2",children:"Action"})]})}),i.jsx("tbody",{children:ZK.map((t,e)=>i.jsxs("tr",{className:"text-left",children:[i.jsxs("td",{className:"px-4 py-2",children:["00",t.id]}),i.jsx("td",{className:"px-4 py-2",children:t.name}),i.jsxs("td",{className:"px-4 py-2",children:["$",t.amount]}),i.jsx("td",{className:"px-4 py-2",children:t.date}),i.jsx("td",{className:"px-4 py-2",children:t.source}),i.jsx("td",{className:"px-4 py-2",children:i.jsx("button",{onClick:()=>setShowPopup(!0),className:"bg-yellow-400 px-4 py-2 text-[11px] font-semibold hover:bg-yellow-200 text-black rounded-full",children:t.action})})]},e))})]})})}),JK=[{id:1,name:"Smith Joy",amount:1e3,date:"4/July/25",source:"Driver",action:"View Detail"},{id:2,name:"John Doe",amount:1500,date:"5/July/25",source:"Rider",action:"View Detail"}],eZ=()=>i.jsx(i.Fragment,{children:i.jsx("div",{className:"border mx-auto border-yellow-400 w-[95%] px-8 py-2 rounded",children:i.jsxs("table",{className:"w-full border-collapse table-fixed",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-yellow-400 text-left",children:[i.jsx("th",{className:"px-4 py-2",children:"ID"}),i.jsx("th",{className:"px-4 py-2",children:"Full Name"}),i.jsx("th",{className:"px-4 py-2",children:"Amount"}),i.jsx("th",{className:"px-4 py-2",children:"Date"}),i.jsx("th",{className:"px-4 py-2",children:"Source"}),i.jsx("th",{className:"px-4 py-2",children:"Action"})]})}),i.jsx("tbody",{children:JK.map((t,e)=>i.jsxs("tr",{className:"text-left",children:[i.jsxs("td",{className:"px-4 py-2",children:["00",t.id]}),i.jsx("td",{className:"px-4 py-2",children:t.name}),i.jsxs("td",{className:"px-4 py-2",children:["$",t.amount]}),i.jsx("td",{className:"px-4 py-2",children:t.date}),i.jsx("td",{className:"px-4 py-2",children:t.source}),i.jsx("td",{className:"px-4 py-2",children:i.jsx("button",{onClick:()=>setShowPopup(!0),className:"bg-yellow-400 px-4 py-2 text-[11px] font-semibold hover:bg-yellow-200 text-black rounded-full",children:t.action})})]},e))})]})})}),tZ=[{id:1,name:"Smith Joy",amount:1e3,date:"4/July/25",source:"Driver",action:"View Detail"},{id:2,name:"John Doe",amount:1500,date:"5/July/25",source:"Rider",action:"View Detail"}],rZ=()=>i.jsx(i.Fragment,{children:i.jsx("div",{className:"border mx-auto border-yellow-400 w-[95%] px-8 py-2 rounded",children:i.jsxs("table",{className:"w-full border-collapse table-fixed",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-yellow-400 text-left",children:[i.jsx("th",{className:"px-4 py-2",children:"ID"}),i.jsx("th",{className:"px-4 py-2",children:"Full Name"}),i.jsx("th",{className:"px-4 py-2",children:"Amount"}),i.jsx("th",{className:"px-4 py-2",children:"Date"}),i.jsx("th",{className:"px-4 py-2",children:"Source"}),i.jsx("th",{className:"px-4 py-2",children:"Action"})]})}),i.jsx("tbody",{children:tZ.map((t,e)=>i.jsxs("tr",{className:"text-left",children:[i.jsxs("td",{className:"px-4 py-2",children:["00",t.id]}),i.jsx("td",{className:"px-4 py-2",children:t.name}),i.jsxs("td",{className:"px-4 py-2",children:["$",t.amount]}),i.jsx("td",{className:"px-4 py-2",children:t.date}),i.jsx("td",{className:"px-4 py-2",children:t.source}),i.jsx("td",{className:"px-4 py-2",children:i.jsx("button",{onClick:()=>setShowPopup(!0),className:"bg-yellow-400 px-4 py-2 text-[11px] font-semibold hover:bg-yellow-200 text-black rounded-full",children:t.action})})]},e))})]})})}),nZ=[{id:1,name:"Smith Joy",amount:1e3,date:"4/July/25",source:"Driver",action:"View Detail"},{id:2,name:"John Doe",amount:1500,date:"5/July/25",source:"Rider",action:"View Detail"}],aZ=()=>i.jsx(i.Fragment,{children:i.jsx("div",{className:"border mx-auto border-yellow-400 w-[95%] px-8 py-2 rounded",children:i.jsxs("table",{className:"w-full table-fixed",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-yellow-400 text-left",children:[i.jsx("th",{className:"px-4 py-2",children:"ID"}),i.jsx("th",{className:"px-4 py-2",children:"Full Name"}),i.jsx("th",{className:"px-4 py-2",children:"Amount"}),i.jsx("th",{className:"px-4 py-2",children:"Date"}),i.jsx("th",{className:"px-4 py-2",children:"Source"}),i.jsx("th",{className:"px-4 py-2",children:"Action"})]})}),i.jsx("tbody",{children:nZ.map((t,e)=>i.jsxs("tr",{className:"text-left",children:[i.jsxs("td",{className:"px-4 py-2",children:["00",t.id]}),i.jsx("td",{className:"px-4 py-2",children:t.name}),i.jsxs("td",{className:"px-4 py-2",children:["$",t.amount]}),i.jsx("td",{className:"px-4 py-2",children:t.date}),i.jsx("td",{className:"px-4 py-2",children:t.source}),i.jsx("td",{className:"px-4 py-2",children:i.jsx("button",{onClick:()=>setShowPopup(!0),className:"bg-yellow-400 px-4 py-2 text-[11px] font-semibold hover:bg-yellow-200 text-black rounded-full",children:t.action})})]},e))})]})})}),sZ=()=>{const[t,e]=O.useState(1),r=()=>{switch(t){case 1:return i.jsx(QK,{});case 2:return i.jsx(eZ,{});case 3:return i.jsx(rZ,{});case 4:return i.jsx(aZ,{});default:return null}};return i.jsxs("div",{className:"w-[85%] mx-auto",children:[i.jsx("h2",{className:"text-lg font-semibold m-6",children:"DDR Balance: $1000"}),i.jsx("div",{className:"flex gap-20 ml-6 my-3",children:[1,2,3,4].map(n=>i.jsxs("button",{onClick:()=>e(n),className:`p-2 rounded border border-yellow-300
${t===n?"bg-yellow-400 text-black":"hover:bg-yellow-200"}`,children:["Level ",n]},n))}),i.jsx("div",{className:" w-[95%] mx-auto px-8 py-2 ",children:r()})]})},iZ=()=>{const t=["DDR","CCR","BBR","HLR","AMBESSADOR","Day"],[e,r]=O.useState("DDR");return i.jsxs("div",{className:"pl-5",children:[i.jsx("div",{className:"flex items-center border-b border-yellow-400 justify-between font-semibold text-yellow-400 flex-nowrap",children:t.map((n,a)=>i.jsxs(Lr.Fragment,{children:[i.jsxs("div",{onClick:()=>r(n),className:`pr-2 cursor-pointer text-sm flex items-center gap-2
${e===n?"border-b-2 border-yellow-400 pb-1":""}
${n==="Day"?"border border-b-0 border-yellow-400 px-4 py-2":""}`,children:[n,n==="Day"&&i.jsx(m_,{className:"text-lg"})]}),a!==t.length-2&&a!==t.length-1&&i.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"})]},a))}),i.jsx(sZ,{activeTitle:e})]})},oZ=({sortBy:t,setSortBy:e,options:r})=>{const[n,a]=O.useState(!1);return i.jsxs("div",{className:"relative text-sm flex justify-end",children:[i.jsxs("button",{onClick:()=>a(!n),className:"flex items-center gap-2 px-3 ",children:["Sort By: ",t,i.jsx(U4,{className:`transition-transform duration-200 ${n?"rotate-180":""}`})]}),n&&i.jsx("ul",{className:"absolute right-0 mt-2 w-20 bg-green-900 border border-yellow-400 rounded-md shadow-lg z-10",children:r.map((s,o)=>i.jsx("li",{className:"px-2 py-2 hover:bg-yellow-500 hover:text-black cursor-pointer",onClick:()=>{e(s),a(!1)},children:s},o))})]})},lZ=()=>{const[t,e]=O.useState("Earn"),r=["Earn","Rating","Complaints"];return i.jsxs("div",{children:[i.jsx(oZ,{sortBy:t,setSortBy:e,options:r}),i.jsx(Zl,{}),i.jsx(KK,{}),i.jsx(iZ,{})]})},cZ=({sortBy:t,setSortBy:e,options:r})=>{const[n,a]=O.useState(!1);return i.jsxs("div",{className:"relative text-sm ",children:[i.jsxs("button",{onClick:()=>a(!n),className:"flex items-center gap-2 px-3 ",children:["Sort By: ",t,i.jsx(U4,{className:`transition-transform duration-200 ${n?"rotate-180":""}`})]}),n&&i.jsx("ul",{className:"absolute right-0 mt-2 w-20 bg-green-900 border border-yellow-400 rounded-md shadow-lg z-10",children:r.map((s,o)=>i.jsx("li",{className:"px-2 py-2 hover:bg-yellow-500 hover:text-black cursor-pointer",onClick:()=>{e(s),a(!1)},children:s},o))})]})},dZ=()=>{const[t,e]=O.useState("Earn"),r=["Earn","Rating","Complaints"];return i.jsxs("div",{className:"flex items-center justify-end flex-wrap gap-4 m-4",children:[i.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[i.jsxs("label",{className:"flex items-center space-x-2",children:[i.jsx("div",{className:"text-sm flex items-center gap-1",children:i.jsx("span",{children:"Date Range:"})}),i.jsx("input",{type:"date",className:"bg-transparent rounded border py-1 border-yellow-300 text-yellow-300 focus:outline-none text-sm"})]}),i.jsx("span",{className:"text-sm pr-3",children:"To"}),i.jsxs("label",{className:"flex items-center space-x-2",children:[i.jsxs("div",{className:"text-sm flex items-center gap-1",children:[" ",i.jsx("span",{children:"Date:"})]}),i.jsx("input",{type:"date",className:"bg-transparent rounded py-1 border border-yellow-300 text-yellow-300 focus:outline-none text-sm"})]})]}),i.jsx(cZ,{sortBy:t,setSortBy:e,options:r})]})},uZ=({onClose:t})=>i.jsx("div",{className:"fixed inset-0 z-10 flex justify-center items-center pt-16 bg-[#013220] bg-opacity-90",children:i.jsxs("div",{style:{background:"linear-gradient(to bottom, #012C1C, #005536)"},className:"rounded-xl border border-yellow-300 w-full max-w-md mx-4 pb-10",children:[i.jsxs("div",{className:"flex justify-end py-2 px-3",children:[i.jsx($f,{onClick:t,cursor:"pointer",size:25})," "]}),i.jsxs("div",{className:"flex flex-col gap-4 text-sm px-12 pt-6",children:[i.jsxs("div",{className:"flex justify-between",children:[i.jsx("span",{className:"font-semibold",children:"Ticket ID:"}),i.jsx("span",{children:"TCK 1124"})]}),i.jsxs("div",{className:"flex justify-between",children:[i.jsx("span",{className:"font-semibold",children:"User:"}),i.jsx("span",{children:"Areeba Shah"})]}),i.jsxs("div",{className:"flex justify-between",children:[i.jsx("span",{className:"font-semibold",children:"Issue Type:"}),i.jsx("span",{children:"Driver Late"})]}),i.jsxs("div",{children:[i.jsxs("div",{className:"font-semibold block mb-2",children:[" ",i.jsx("span",{children:"Remarks:"})]}),i.jsx("div",{className:" h-36 px-4 py-3 rounded-xl bg-yellow-400 text-black w-full",children:"The Driver are so late . They after 1 hour.I have got late at office. i was going to join a meeting "})]}),i.jsxs("div",{className:"flex justify-between",children:[i.jsx("span",{className:"font-semibold",children:"Assigned To:"}),i.jsx("span",{children:"Admin A"})]}),i.jsxs("div",{className:"flex justify-between",children:[i.jsx("span",{className:"font-semibold",children:"Status:"}),i.jsx("span",{children:"Open"})]})]}),i.jsxs("div",{className:"flex justify-center gap-4 mt-10",children:[i.jsx("button",{className:"rounded-full bg-yellow-400 text-black px-4 py-2 hover:bg-yellow-300 transition",children:"Resolved"}),i.jsx("button",{className:"rounded-full bg-yellow-400 text-black px-4 py-1 hover:bg-yellow-300 transition",children:"Escalate"}),i.jsx("button",{onClick:t,className:"rounded-full bg-yellow-400 text-black px-4 py-1 hover:bg-yellow-300 transition",children:"Close"})]})]})}),hZ=[{id:1,date:"24/July/2025",issuesummary:"Driver was late",status:"Open",assignedto:"Admin A"},{id:1,date:"24/July/2025",issuesummary:"Driver was late",status:"Open",assignedto:"Admin A"},{id:1,date:"24/July/2025",issuesummary:"Driver was late",status:"Open",assignedto:"Admin A"}],fZ=()=>{const[t,e]=O.useState(!1);return i.jsx(i.Fragment,{children:i.jsxs("div",{children:[i.jsx(Zl,{}),i.jsx(dZ,{}),i.jsx("div",{className:" p-8",children:i.jsxs("table",{className:"w-full text-sm text-left",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border border-yellow-300 ",children:[i.jsx("th",{className:"px-4 py-3",children:"Date"}),i.jsx("th",{className:"px-4 py-3 text-cente",children:"Issue Summary"}),i.jsx("th",{className:"px-4 py-3",children:"Status"}),i.jsx("th",{className:"px-4 py-3",children:"Assigned To"}),i.jsx("th",{className:"px-4 py-3 text-center ",children:"Action"})]})}),i.jsx("tbody",{children:hZ.map((r,n)=>i.jsxs("tr",{children:[i.jsx("td",{className:"px-4 py-2",children:r.date}),i.jsx("td",{className:"px-4 py-2 ",children:r.issuesummary}),i.jsx("td",{className:"px-4 py-2",children:r.status}),i.jsx("td",{className:"px-4 py-2",children:r.assignedto}),i.jsx("td",{className:"px-4 py-2",children:i.jsx("div",{className:"flex items-center gap-3 justify-center",children:i.jsx("button",{onClick:()=>e(!0),className:"bg-yellow-400 text-[#013220] px-4 py-1.5 cursor-pointer rounded-full text-xs font-medium",children:"View"})})})]},n))})]})}),t&&i.jsx(uZ,{onClose:()=>e(!1)})]})})},pZ=()=>{const[t,e]=O.useState([]),[r,n]=O.useState(!1),[a,s]=O.useState(null),[o,l]=O.useState(!1),[c,u]=O.useState(null),[h,p]=O.useState({currentPage:1,totalPages:1,totalUsers:0,usersPerPage:10,hasNextPage:!1,hasPrevPage:!1,nextPage:null,prevPage:null}),m=async(N=1)=>{try{n(!0),s(null);const S=await _e.get(`https://aaaogo.xyz/api/user/without-kyc?page=${N}&limit=10`,{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}});S.data.success&&(e(S.data.users),p(S.data.pagination),l(!0),setTimeout(()=>l(!1),3e3))}catch(A){console.error("Error fetching users without KYC:",A),s(A.response?.data?.message||"Failed to fetch users without KYC"),setTimeout(()=>s(null),5e3)}finally{n(!1)}};O.useEffect(()=>{m()},[]);const x=N=>{u(N)},y=()=>{u(null)},b=N=>{N>=1&&N<=h.totalPages&&m(N)},w=N=>new Date(N).toLocaleString();return i.jsxs("div",{className:"flex bg-[#013220] text-yellow-400 min-h-screen",children:[i.jsx(Ue,{}),i.jsx("div",{className:"flex-1 p-3 md:p-6 min-w-0",children:i.jsxs("div",{className:"max-w-7xl mx-auto",children:[i.jsxs("div",{className:"mb-6 bg-gradient-to-r from-[#1a4a2e] to-[#2d5a3d] p-6 rounded-xl border border-yellow-400/20 shadow-lg",children:[i.jsx("h1",{className:"text-3xl font-bold text-yellow-400 mb-2",children:"Customer Support"}),i.jsx("p",{className:"text-gray-400",children:"Manage website users without KYC verification"})]}),r&&i.jsx("div",{className:"text-center py-8",children:i.jsx("div",{className:"animate-spin inline-block w-8 h-8 border-4 border-yellow-400 border-t-transparent rounded-full",role:"status",children:i.jsx("span",{className:"sr-only",children:"Loading..."})})}),a&&i.jsxs("div",{className:"bg-red-600/20 border border-red-500/50 text-red-400 p-4 rounded-lg mb-6 shadow-lg flex items-center",children:[i.jsx("svg",{className:"w-6 h-6 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),i.jsx("span",{children:a})]}),o&&i.jsxs("div",{className:"bg-green-600/20 border border-green-500/50 text-green-400 p-4 rounded-lg mb-6 shadow-lg flex items-center",children:[i.jsx("svg",{className:"w-6 h-6 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M5 13l4 4L19 7"})}),i.jsxs("span",{children:["Users fetched successfully! Total: ",h.totalUsers]})]}),!r&&!a&&t.length>0&&i.jsxs("div",{className:"bg-[#1a4a2e] rounded-xl border border-yellow-400/20 shadow-lg p-6",children:[i.jsxs("div",{className:"flex justify-between items-center mb-6",children:[i.jsx("h2",{className:"text-2xl font-semibold text-yellow-400",children:"Users Without KYC"}),i.jsxs("div",{className:"text-sm text-gray-400",children:["Page ",h.currentPage," of ",h.totalPages," | Total: ",h.totalUsers," users"]})]}),i.jsx("div",{className:"overflow-x-auto",children:i.jsxs("table",{className:"w-full text-sm text-left bg-[#013220] rounded-lg shadow border border-yellow-400/10",children:[i.jsx("thead",{className:"text-xs uppercase bg-gradient-to-r from-yellow-400 to-yellow-300 text-[#013220]",children:i.jsxs("tr",{children:[i.jsx("th",{className:"px-4 py-3 font-medium text-center",children:"User ID"}),i.jsx("th",{className:"px-4 py-3 font-medium text-center",children:"Username"}),i.jsx("th",{className:"px-4 py-3 font-medium text-center",children:"Name"}),i.jsx("th",{className:"px-4 py-3 font-medium text-center",children:"Email"}),i.jsx("th",{className:"px-4 py-3 font-medium text-center",children:"Phone"}),i.jsx("th",{className:"px-4 py-3 font-medium text-center",children:"Gender"}),i.jsx("th",{className:"px-4 py-3 font-medium text-center",children:"KYC Level"}),i.jsx("th",{className:"px-4 py-3 font-medium text-center",children:"Created At"}),i.jsx("th",{className:"px-4 py-3 font-medium text-center",children:"Action"})]})}),i.jsx("tbody",{children:t.map(N=>i.jsxs("tr",{className:"border-b border-yellow-400/10 hover:bg-yellow-400/5 text-yellow-400",children:[i.jsx("td",{className:"px-4 py-3 text-center",children:N.userId.slice(-6)}),i.jsx("td",{className:"px-4 py-3 text-center",children:N.username}),i.jsxs("td",{className:"px-4 py-3 text-center",children:[N.firstName," ",N.lastName]}),i.jsx("td",{className:"px-4 py-3 text-center",children:N.email}),i.jsx("td",{className:"px-4 py-3 text-center",children:N.phoneNumber}),i.jsx("td",{className:"px-4 py-3 text-center",children:N.gender||"N/A"}),i.jsx("td",{className:"px-4 py-3 text-center",children:N.kycLevel}),i.jsx("td",{className:"px-4 py-3 text-center",children:w(N.createdAt)}),i.jsx("td",{className:"px-4 py-3",children:i.jsx("div",{className:"flex items-center gap-3 justify-center",children:i.jsx("button",{onClick:()=>x(N),className:"bg-gradient-to-r from-yellow-400 to-yellow-300 text-[#013220] px-3 py-1 rounded-md hover:from-yellow-300 hover:to-yellow-200 transition-all duration-200 text-xs font-medium shadow-lg hover:shadow-xl transform hover:scale-105",children:"View"})})})]},N.userId))})]})}),h.totalPages>1&&i.jsxs("div",{className:"flex justify-center items-center mt-6 gap-2",children:[i.jsx("button",{onClick:()=>b(h.currentPage-1),disabled:!h.hasPrevPage,className:`px-3 py-2 rounded-md text-sm font-medium transition-all duration-200 ${h.hasPrevPage?"bg-gradient-to-r from-yellow-400 to-yellow-300 text-[#013220] hover:from-yellow-300 hover:to-yellow-200 shadow-lg hover:shadow-xl transform hover:scale-105":"bg-gray-600/50 text-gray-400 cursor-not-allowed border border-gray-600/50"}`,children:"Previous"}),i.jsxs("span",{className:"px-4 py-2 text-sm text-yellow-400",children:["Page ",h.currentPage," of ",h.totalPages]}),i.jsx("button",{onClick:()=>b(h.currentPage+1),disabled:!h.hasNextPage,className:`px-3 py-2 rounded-md text-sm font-medium transition-all duration-200 ${h.hasNextPage?"bg-gradient-to-r from-yellow-400 to-yellow-300 text-[#013220] hover:from-yellow-300 hover:to-yellow-200 shadow-lg hover:shadow-xl transform hover:scale-105":"bg-gray-600/50 text-gray-400 cursor-not-allowed border border-gray-600/50"}`,children:"Next"})]})]}),!r&&!a&&t.length===0&&i.jsxs("div",{className:"bg-yellow-400/10 border border-yellow-400/30 text-yellow-400 p-4 rounded-lg mb-6 shadow-lg flex items-center",children:[i.jsx("svg",{className:"w-6 h-6 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),i.jsx("span",{children:"No users without KYC found"})]}),c&&i.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",role:"dialog","aria-modal":"true",tabIndex:"-1",children:i.jsxs("div",{className:"bg-gradient-to-b from-[#013220] to-[#001a0f] border border-yellow-400/30 rounded-lg shadow-2xl p-6 w-full max-w-4xl text-yellow-400 font-sans transform transition-all duration-300 overflow-y-auto max-h-[90vh]",children:[i.jsx("h2",{className:"text-2xl font-semibold tracking-wide mb-4 text-yellow-400",children:"User Details"}),i.jsxs("div",{className:"mb-6",children:[i.jsx("h3",{className:"text-xl font-medium tracking-wide mb-2 text-yellow-400",children:"User Information"}),i.jsx("table",{className:"w-full text-sm text-left bg-[#013220]/50 border border-yellow-400/20 rounded-lg shadow-lg",children:i.jsxs("tbody",{children:[i.jsxs("tr",{className:"border-b border-yellow-400/20 hover:bg-yellow-400/5 transition-colors duration-200",children:[i.jsx("td",{className:"px-4 py-2 font-medium text-yellow-400",children:"User ID"}),i.jsx("td",{className:"px-4 py-2 text-gray-300",children:c.userId})]}),i.jsxs("tr",{className:"border-b border-yellow-400/20 hover:bg-yellow-400/5 transition-colors duration-200",children:[i.jsx("td",{className:"px-4 py-2 font-medium text-yellow-400",children:"Username"}),i.jsx("td",{className:"px-4 py-2 text-gray-300",children:c.username})]}),i.jsxs("tr",{className:"border-b border-yellow-400/20 hover:bg-yellow-400/5 transition-colors duration-200",children:[i.jsx("td",{className:"px-4 py-2 font-medium text-yellow-400",children:"Full Name"}),i.jsxs("td",{className:"px-4 py-2 text-gray-300",children:[c.firstName," ",c.lastName]})]}),i.jsxs("tr",{className:"border-b border-yellow-400/20 hover:bg-yellow-400/5 transition-colors duration-200",children:[i.jsx("td",{className:"px-4 py-2 font-medium text-yellow-400",children:"Email"}),i.jsx("td",{className:"px-4 py-2 text-gray-300",children:c.email})]}),i.jsxs("tr",{className:"border-b border-yellow-400/20 hover:bg-yellow-400/5 transition-colors duration-200",children:[i.jsx("td",{className:"px-4 py-2 font-medium text-yellow-400",children:"Phone Number"}),i.jsx("td",{className:"px-4 py-2 text-gray-300",children:c.phoneNumber})]}),i.jsxs("tr",{className:"border-b border-yellow-400/20 hover:bg-yellow-400/5 transition-colors duration-200",children:[i.jsx("td",{className:"px-4 py-2 font-medium text-yellow-400",children:"Gender"}),i.jsx("td",{className:"px-4 py-2 text-gray-300",children:c.gender||"N/A"})]}),i.jsxs("tr",{className:"border-b border-yellow-400/20 hover:bg-yellow-400/5 transition-colors duration-200",children:[i.jsx("td",{className:"px-4 py-2 font-medium text-yellow-400",children:"KYC Level"}),i.jsx("td",{className:"px-4 py-2 text-gray-300",children:c.kycLevel})]}),i.jsxs("tr",{className:"border-b border-yellow-400/20 hover:bg-yellow-400/5 transition-colors duration-200",children:[i.jsx("td",{className:"px-4 py-2 font-medium text-yellow-400",children:"KYC Status"}),i.jsx("td",{className:"px-4 py-2 text-gray-300",children:c.kycStatus||"Not Started"})]}),i.jsxs("tr",{className:"border-b border-yellow-400/20 hover:bg-yellow-400/5 transition-colors duration-200",children:[i.jsx("td",{className:"px-4 py-2 font-medium text-yellow-400",children:"Created At"}),i.jsx("td",{className:"px-4 py-2 text-gray-300",children:w(c.createdAt)})]})]})})]}),i.jsx("div",{className:"flex justify-end gap-3",children:i.jsx("button",{onClick:y,className:"bg-gradient-to-r from-yellow-400 to-yellow-300 text-[#013220] px-4 py-2 rounded-md hover:from-yellow-300 hover:to-yellow-200 transition-all duration-200 font-medium shadow-lg hover:shadow-xl transform hover:scale-105",children:"Close"})})]})})]})})]})},sN=()=>{const t=Cr(),e=r=>`menu-tab ${t.pathname===r?"active":""}`;return i.jsx("div",{className:"border-b border-yellow-300",children:i.jsxs("div",{className:"flex justify-between w-2/3 p-2",children:[i.jsx(Pe,{to:"/proposalmanagement",className:e("/proposalmanagement"),children:"Proposal Management"}),i.jsx(Pe,{to:"/agreementrecord",className:e("/agreementrecord"),children:"Agreement Generation & Record"}),i.jsx(Pe,{to:"/marketplacecontrol",className:e("/marketplacecontrol"),children:"Marketplace Control"})]})})},mZ=[{id:1,driver:"Allice Smith",owner:"Smith",vehicle:"Control",type:"Rental",date:"18/July/25",status:"Active"},{id:1,driver:"Allice Smith",owner:"Smith",vehicle:"Control",type:"Rental",date:"18/July/25",status:"Active"}],gZ=()=>i.jsxs("div",{className:"flex",children:[i.jsx(Ue,{}),i.jsxs("div",{className:"flex-1 flex flex-col",children:[i.jsx("div",{className:" border-b border-yellow-300",children:i.jsx(sN,{})}),i.jsxs("div",{className:"flex items-center justify-end gap-2 flex-wrap py-2",children:[i.jsxs("label",{className:"flex items-center space-x-2",children:[i.jsx("div",{className:"text-xs flex items-center gap-1",children:i.jsx("span",{children:"Date Range:"})}),i.jsx("input",{type:"date",className:"bg-transparent rounded border py-1 border-yellow-300 text-yellow-300 focus:outline-none text-xs"})]}),i.jsx("span",{className:"text-xs pr-3",children:"To"}),i.jsxs("label",{className:"flex items-center space-x-2",children:[i.jsxs("div",{className:"text-xs flex items-center gap-1",children:[" ",i.jsx("span",{children:"Date:"})]}),i.jsx("input",{type:"date",className:"bg-transparent rounded py-1 text-xs border border-yellow-300 text-yellow-300 focus:outline-none"})]}),i.jsx("label",{htmlFor:"",className:"text-xs ",children:"Sort By"}),i.jsxs("select",{name:"",id:"",className:"bg-[#013220] text-xs focus:outline-none",children:[i.jsx("option",{value:"pending",children:"Pending"}),i.jsx("option",{value:"pending",children:"accepted"})]})]}),i.jsxs("table",{className:"w-full text-sm text-left border-collapse",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-yellow-200 ",children:[i.jsx("th",{className:"px-3 py-3",children:"ID"}),i.jsx("th",{className:"px-4 py-3",children:"Driver"}),i.jsx("th",{className:"px-4 py-3",children:"Owner"}),i.jsx("th",{className:"px-4 py-3",children:"Vehicle"}),i.jsxs("th",{className:"px-4 py-3",children:["Type",i.jsxs("select",{className:"bg-[#013220] text-xs focus:outline-none",children:[i.jsx("option",{value:"",children:"Rental"}),i.jsx("option",{value:"",children:"Salaried"}),i.jsx("option",{value:"",children:"%"})]})]}),i.jsx("th",{className:"px-4 py-3",children:"Date"}),i.jsxs("th",{className:"px-4 py-3",children:["Status",i.jsxs("select",{className:" bg-[#013220] text-xs focus:outline-none",children:[i.jsx("option",{value:"active",children:"Active"}),i.jsx("option",{value:"non-active",children:"pending"})]})]}),i.jsx("th",{className:"px-4 py-3 text-center",children:"Actions"})]})}),i.jsx("tbody",{children:mZ.map((t,e)=>i.jsxs("tr",{children:[i.jsxs("td",{className:"px-3 py-3",children:["00",t.id]}),i.jsx("td",{className:"px-4 py-3",children:t.driver}),i.jsx("td",{className:"px-4 py-3",children:t.owner}),i.jsx("td",{className:"px-4 py-3",children:t.vehicle}),i.jsx("td",{className:"px-4 py-3",children:t.type}),i.jsx("td",{className:"px-4 py-3",children:t.date}),i.jsx("td",{className:"px-4 py-3",children:t.status}),i.jsx("td",{className:"px-4 py-3",children:i.jsxs("div",{className:"flex gap-2 justify-center items-center",children:[i.jsx("button",{className:"text-yellow-400 border rounded-full px-1 py-1 border-yellow-400 hover:text-yellow-300",children:i.jsx(p_,{size:15})}),i.jsx("button",{className:"bg-yellow-400 text-black px-3 py-1 rounded-full text-xs font-medium hover:bg-yellow-300",children:"Approve"}),i.jsx("button",{className:"bg-yellow-400 px-3 py-1 rounded-full text-xs font-medium hover:bg-yellow-300 text-black",children:"Reject"})]})})]},e))})]})]})]}),xZ=[{id:1,proposalId:"PR-001",parties:`Smith Jey &
Joy Stick`,type:"Rental",date:"18/July/25",status:"Pending",download:"Download",cancel:"Cancel"},{id:2,proposalId:"PR-002",parties:`Smith Jey &
Joy Stick`,type:"Rental",date:"18/July/25",status:"Pending"}],bZ=()=>i.jsxs("div",{className:"flex min-h-screen",children:[i.jsx(Ue,{}),i.jsxs("div",{className:"flex-1 flex flex-col",children:[i.jsx(sN,{}),i.jsxs("div",{className:"flex items-center justify-end gap-2 flex-wrap py-2",children:[i.jsxs("label",{className:"flex items-center space-x-2",children:[i.jsx("span",{className:"text-xs",children:"Date Range:"}),i.jsx("input",{type:"date",className:"bg-transparent rounded border py-1 border-yellow-300 text-yellow-300 focus:outline-none text-xs"})]}),i.jsx("span",{className:"text-xs",children:"To"}),i.jsxs("label",{className:"flex items-center space-x-2",children:[i.jsx("span",{className:"text-xs",children:"Date:"}),i.jsx("input",{type:"date",className:"bg-transparent rounded py-1 text-xs border border-yellow-300 text-yellow-300 focus:outline-none"})]}),i.jsx("label",{className:"text-xs",children:"Sort By"}),i.jsxs("select",{className:"bg-[#013220] text-xs focus:outline-none border border-yellow-300 text-yellow-300",children:[i.jsx("option",{value:"pending",children:"Pending"}),i.jsx("option",{value:"accepted",children:"Accepted"})]})]}),i.jsx("div",{className:"overflow-x-auto",children:i.jsxs("table",{className:"w-full text-sm text-left border-collapse",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-yellow-300",children:[i.jsx("th",{className:"px-3 py-3",children:"ID"}),i.jsx("th",{className:"px-4 py-3",children:"Proposal ID"}),i.jsx("th",{className:"px-4 py-3",children:"Parties"}),i.jsxs("th",{className:"px-4 py-3",children:["Type",i.jsxs("select",{className:"bg-[#013220] text-xs focus:outline-none ml-1",children:[i.jsx("option",{value:"",children:"Rental"}),i.jsx("option",{value:"",children:"Salaried"}),i.jsx("option",{value:"",children:"%"})]})]}),i.jsx("th",{className:"px-4 py-3",children:"Date"}),i.jsxs("th",{className:"px-4 py-3",children:["Status",i.jsxs("select",{className:"bg-[#013220] text-xs focus:outline-none ml-1",children:[i.jsx("option",{value:"pending",children:"Pending"}),i.jsx("option",{value:"active",children:"Active"})]})]}),i.jsx("th",{className:"px-4 py-3 text-center",children:"Actions"})]})}),i.jsx("tbody",{children:xZ.map((t,e)=>i.jsxs("tr",{className:"",children:[i.jsxs("td",{className:"px-3 py-3",children:["00",t.id]}),i.jsx("td",{className:"px-4 py-3",children:t.proposalId}),i.jsx("td",{className:"px-4 py-3 whitespace-pre-line",children:t.parties}),i.jsx("td",{className:"px-4 py-3",children:t.type}),i.jsx("td",{className:"px-4 py-3",children:t.date}),i.jsx("td",{className:"px-4 py-3",children:t.status}),i.jsx("td",{className:"px-4 py-3",children:i.jsxs("div",{className:"flex gap-2 justify-center items-center",children:[i.jsx("button",{className:"text-yellow-400 border rounded-full px-1 py-1 border-yellow-400 hover:text-yellow-300",children:i.jsx(p_,{size:15})}),i.jsx("button",{className:"bg-yellow-400 text-black px-3 py-1 rounded-full text-xs font-medium hover:bg-yellow-300",children:"Download"}),i.jsx("button",{className:"bg-yellow-400 px-3 py-1 rounded-full text-xs font-medium hover:bg-yellow-300 text-black",children:"Cancel"}),i.jsx("button",{className:"text-yellow-400 border rounded-full px-1 py-1 border-yellow-400 hover:text-yellow-300",children:i.jsx(Bq,{size:15})})]})})]},e))})]})})]})]}),yZ=[{image:"https://www.shutterstock.com/image-photo/close-headshot-portrait-serious-caucasian-260nw-1531440581.jpg",name:"Smith",rating:4.8,category:"Lorem Ipsum"},{image:"https://www.shutterstock.com/image-photo/close-headshot-portrait-serious-caucasian-260nw-1531440581.jpg",name:"Smith",rating:4.8,category:"Lorem Ipsum"},{image:"https://www.shutterstock.com/image-photo/close-headshot-portrait-serious-caucasian-260nw-1531440581.jpg",name:"Smith",rating:4.8,category:"Lorem Ipsum"}],vZ=[{vendorname:"Smith Joy",category:"Auto",status:"Active"},{vendorname:"Smith Joy",category:"Auto",status:"Active"},{vendorname:"Smith Joy",category:"Auto",status:"Active"}],wZ=[{proposalid:"PR-001",title:"Free Oil Change",flagReason:"Inappropriate",submittedby:"User123"}],jZ=()=>i.jsxs("div",{className:"flex min-h-screen",children:[i.jsx(Ue,{}),i.jsxs("div",{className:"flex-1 overflow-y-auto",children:[i.jsx(sN,{}),i.jsx("div",{className:" px-1 flex py-8 justify-around items-center flex-wrap ",children:yZ.map((t,e)=>i.jsxs("div",{className:"rounded-xl bg-gradient-to-r from-[#03915D] to-[#013924] border border-yellow-200 px-6 py-6 flex gap-4 items-center min-w-[300px]",children:[i.jsx("div",{className:"h-24 w-24 rounded-full border border-dashed border-yellow-400 overflow-hidden flex items-center justify-center",children:i.jsx("img",{className:"h-full w-full object-cover",src:t.image,alt:""})}),i.jsxs("div",{className:"flex flex-col gap-3",children:[i.jsxs("div",{className:"flex items-center gap-8",children:[i.jsx("span",{className:"font-semibold",children:"Name:"}),i.jsx("span",{className:"text-sm",children:t.name})]}),i.jsxs("div",{className:"flex items-center gap-8",children:[i.jsx("span",{className:"font-semibold",children:"Rating:"}),i.jsxs("span",{className:"text-sm",children:["⭐",t.rating]})]}),i.jsxs("div",{className:"flex items-center gap-6",children:[i.jsx("span",{className:"font-semibold",children:"Category:"}),i.jsx("span",{className:"text-sm",children:t.category})]})]})]},e))}),i.jsx("div",{className:"px-8",children:i.jsx("form",{children:i.jsxs("div",{className:"flex flex-col gap-8",children:[i.jsxs("div",{className:"flex gap-2 items-center",children:[i.jsx("input",{type:"checkbox",id:"market-toggle",className:"accent-yellow-400"}),i.jsx("label",{htmlFor:"market-toggle",className:"text-sm",children:"Turns entire marketplace visibility for all users"})]}),i.jsxs("div",{className:"flex justify-center gap-6",children:[i.jsx("button",{type:"button",className:"bg-yellow-400 px-6 py-1 outline outline-yellow-500 rounded-full text-[#013220] font-semibold text-sm",children:"Add Vendor"}),i.jsx("button",{type:"button",className:"bg-yellow-400 px-4 py-2 outline outline-yellow-500 rounded-full text-[#013220] font-semibold text-sm",children:"Remove Vendor"})]})]})})}),i.jsxs("div",{className:"mt-10 px-8",children:[i.jsx("h3",{className:"text-lg font-bold mb-1",children:"Vendor List:"}),i.jsx("span",{className:"text-sm flex justify-end w-2/3 underline",children:"Add Trusted Vendors"}),i.jsx("div",{className:"flex justify-center items-center mt-4",children:i.jsx("div",{className:"border border-yellow-300 rounded-md w-full max-w-3xl overflow-x-auto",children:i.jsxs("table",{className:"min-w-full text-sm",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-yellow-300",children:[i.jsx("th",{className:"px-4 py-2 text-left",children:"Vendor Name"}),i.jsx("th",{className:"px-4 py-2 text-left",children:"Category"}),i.jsxs("th",{className:"px-4 py-2 text-left",children:["Status",i.jsxs("select",{className:"ml-2 bg-[#013220] text-yellow-300 rounded text-xs px-1 py-0.5 focus:outline-none",children:[i.jsx("option",{value:"active",children:"Active"}),i.jsx("option",{value:"pending",children:"Pending"})]})]}),i.jsx("th",{className:"px-4 py-2 text-left",children:"Action"})]})}),i.jsx("tbody",{children:vZ.map((t,e)=>i.jsxs("tr",{children:[i.jsx("td",{className:"px-4 py-2",children:t.vendorname}),i.jsx("td",{className:"px-4 py-2",children:t.category}),i.jsx("td",{className:"px-4 py-2",children:t.status}),i.jsx("td",{className:"px-4 py-2",children:i.jsx("button",{className:"text-sm bg-yellow-400 rounded-full px-2 py-1 text-black",children:"Remove"})})]},e))})]})})})]}),i.jsxs("div",{className:"mt-4 px-8",children:[i.jsx("h3",{className:"text-lg font-bold mb-1",children:"Proposal Moderation Queue:"}),i.jsxs("span",{className:"text-sm flex justify-end w-2/3",children:["Sorted By:",i.jsx("select",{name:"",id:"",className:"bg-[#013220] focus:outline-none ml-2",children:i.jsx("option",{value:"",children:"Flagged Only"})})]}),i.jsx("div",{className:"flex justify-center items-center mt-4",children:i.jsx("div",{className:"border border-yellow-300 rounded-md w-full max-w-3xl overflow-x-auto",children:i.jsxs("table",{className:"min-w-full text-sm",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-yellow-300",children:[i.jsx("th",{className:"px-4 py-2 text-left",children:"Proposal ID"}),i.jsx("th",{className:"px-4 py-2 text-left",children:"Title"}),i.jsx("th",{className:"px-4 py-2 text-left",children:"Flag Reason"}),i.jsx("th",{className:"px-4 py-2 text-left",children:"Submitted By"}),i.jsx("th",{className:"px-4 py-2 text-left",children:"Action"})]})}),i.jsx("tbody",{children:wZ.map((t,e)=>i.jsxs("tr",{children:[i.jsx("td",{className:"px-4 py-2",children:t.proposalid}),i.jsx("td",{className:"px-4 py-2",children:t.title}),i.jsx("td",{className:"px-4 py-2",children:t.flagReason}),i.jsx("td",{className:"px-4 py-2",children:t.submittedby}),i.jsx("td",{className:"px-4 py-2",children:i.jsx("button",{className:"text-sm bg-yellow-400 rounded-full px-4 py-1 text-black",children:"Edit"})})]},e))})]})})}),i.jsxs("div",{className:"flex justify-center gap-6 mt-6",children:[i.jsx("button",{type:"button",className:"bg-yellow-400 px-6 py-1 outline outline-yellow-500 rounded-full text-[#013220] font-semibold text-sm",children:"Accept All"}),i.jsx("button",{type:"button",className:"bg-yellow-400 px-4 py-2 outline outline-yellow-500 rounded-full text-[#013220] font-semibold text-sm",children:"Remove Selected"})]})]})]})]}),Gf=()=>{const t=Cr(),e=r=>`menu-tab ${t.pathname===r?"active":""}`;return i.jsx("div",{className:" border-b border-yellow-300",children:i.jsxs("div",{className:"flex justify-between items-center w-2/3 p-2 ",children:[i.jsx(Pe,{to:"/overview",className:e("/overview"),children:i.jsx("span",{className:"font-semibold",children:"OverView"})}),i.jsx("div",{className:"h-3 w-[2px] bg-yellow-400 "}),i.jsx(Pe,{to:"/autolockRulesPanel",className:e("/autolockRulesPanel"),children:i.jsx("span",{className:"font-semibold",children:"Auto-Lock Rules Panel"})}),i.jsx("div",{className:"h-3 w-[2px] bg-yellow-400 "}),i.jsx(Pe,{to:"/ruleeditorpanel",className:e("/ruleeditorpanel"),children:i.jsx("span",{className:"font-semibold",children:"Rule Editor Panel"})}),i.jsx("div",{className:"h-3 w-[2px] bg-yellow-400 "}),i.jsx(Pe,{to:"/analytics",className:e("/analytics"),children:i.jsx("span",{className:"font-semibold",children:"Analytics"})})]})})},NZ=[{id:"U-001",name:"Alice-Smith",role:"Driver",flagtype:`Multiple
Cancels`,Score:"72",LastActivity:"18/July/25/9:AM",status:"Auto Locked"},{id:"U-001",name:"Alice-Smith",role:"Driver",flagtype:`Multiple
Cancels`,Score:"72",LastActivity:"18/July/25/9:AM",status:"Auto Locked"}],SZ=()=>i.jsxs("div",{className:"flex min-h-screen ",children:[i.jsx(Ue,{}),i.jsxs("div",{className:"flex-1",children:[i.jsx(Gf,{}),i.jsxs("div",{className:"flex items-center justify-end gap-2 flex-wrap py-2",children:[i.jsxs("label",{className:"flex items-center space-x-2",children:[i.jsx("div",{className:"text-xs flex items-center gap-1",children:i.jsx("span",{children:"Date Range:"})}),i.jsx("input",{type:"date",className:"bg-transparent rounded border py-1 border-yellow-300 text-yellow-300 focus:outline-none text-xs"})]}),i.jsx("span",{className:"text-xs pr-3",children:"To"}),i.jsxs("label",{className:"flex items-center space-x-2",children:[i.jsxs("div",{className:"text-xs flex items-center gap-1",children:[" ",i.jsx("span",{children:"Date:"})]}),i.jsx("input",{type:"date",className:"bg-transparent rounded py-1 text-xs border border-yellow-300 text-yellow-300 focus:outline-none"})]}),i.jsx("label",{htmlFor:"",className:"text-xs ",children:"Sort By"}),i.jsxs("select",{name:"",id:"",className:"bg-[#013220] text-xs focus:outline-none",children:[i.jsx("option",{value:"pending",children:"Pending"}),i.jsx("option",{value:"pending",children:"accepted"})]})]}),i.jsxs("table",{className:"w-full text-sm text-left border-collapse",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-yellow-200 ",children:[i.jsx("th",{className:"px-3 py-3",children:"ID"}),i.jsx("th",{className:"px-4 py-3",children:"Name"}),i.jsxs("th",{className:"px-4 py-3",children:["Role",i.jsxs("select",{className:"bg-[#013220] text-xs focus:outline-none",children:[i.jsx("option",{value:"",children:"User"}),i.jsx("option",{value:"",children:"Driver"}),i.jsx("option",{value:"",children:"Both"})]})]}),i.jsxs("th",{className:"px-4 py-3",children:["Flag Type",i.jsxs("select",{className:"bg-[#013220] text-xs focus:outline-none",children:[i.jsx("option",{value:"multiple",children:"Booking"}),i.jsx("option",{value:"cancel",children:"Financial"}),i.jsx("option",{value:"cancel",children:"KYC"}),i.jsx("option",{value:"cancel",children:"Driver"}),i.jsx("option",{value:"cancel",children:"Referral"}),i.jsx("option",{value:"cancel",children:"Geo"})]})]}),i.jsx("th",{className:"px-4 py-3",children:"Score"}),i.jsx("th",{className:"px-4 py-3",children:"Last Activity"}),i.jsxs("th",{className:"px-4 py-3",children:["Status",i.jsxs("select",{className:" bg-[#013220] text-xs focus:outline-none",children:[i.jsx("option",{value:"active",children:"Auto Locked"}),i.jsx("option",{value:"non-active",children:"Locked"})]})]}),i.jsx("th",{className:"px-4 py-3 text-center",children:"Action"})]})}),i.jsx("tbody",{children:NZ.map((t,e)=>i.jsxs("tr",{children:[i.jsx("td",{className:"px-3 py-3",children:t.id}),i.jsx("td",{className:"px-4 py-3",children:t.name}),i.jsx("td",{className:"px-4 py-3 ",children:t.role}),i.jsx("td",{className:"px-4 py-3 whitespace-pre-line",children:t.flagtype}),i.jsx("td",{className:"px-4 py-3",children:t.Score}),i.jsx("td",{className:"px-4 py-3",children:t.LastActivity}),i.jsx("td",{className:"px-4 py-3",children:t.status}),i.jsx("td",{className:"px-4 py-3",children:i.jsx("div",{className:"flex gap-2 justify-center items-center",children:i.jsx(Pe,{to:`/fraudprofile/${t.id}`,className:"bg-yellow-400 text-black px-3 py-1 rounded-full text-xs font-medium hover:bg-yellow-300",children:"View Detail"})})})]},e))})]})]})]}),AZ=[{rule:"Cancel in 24H",currentThreshold:3,lastTriggered:"25 Jul, 11:30 AM"},{rule:"Cancel in 24H",currentThreshold:3,lastTriggered:"25 Jul, 11:30 AM"},{rule:"Cancel in 24H",currentThreshold:3,lastTriggered:"25 Jul, 11:30 AM"},{rule:"Cancel in 24H",currentThreshold:3,lastTriggered:"25 Jul, 11:30 AM"},{rule:"Cancel in 24H",currentThreshold:3,lastTriggered:"25 Jul, 11:30 AM"},{rule:"Cancel in 24H",currentThreshold:3,lastTriggered:"25 Jul, 11:30 AM"},{rule:"Cancel in 24H",currentThreshold:3,lastTriggered:"25 Jul, 11:30 AM"}],CZ=()=>i.jsxs("div",{className:"flex min-h-screen ",children:[i.jsx(Ue,{}),i.jsxs("div",{className:"flex-1",children:[i.jsx(Gf,{}),i.jsxs("div",{className:" flex justify-end pt-2 pb-6 px-4 gap-4 items-center border-b border-yellow-200 text-xs",children:[i.jsxs("label",{className:"flex items-center space-x-2",children:[i.jsx("span",{children:"Date Range:"}),i.jsx("input",{type:"date",className:"bg-transparent border border-yellow-300 rounded px-2 py-1 text-yellow-300 focus:outline-none"})]}),i.jsx("span",{className:"text-sm",children:"To"}),i.jsxs("label",{className:"flex items-center space-x-2",children:[i.jsx("span",{children:"Date:"}),i.jsx("input",{type:"date",className:"bg-transparent border border-yellow-300 rounded px-2 py-1 text-yellow-300 focus:outline-none"})]})]}),i.jsxs("div",{className:"w-[90%] px-10 py-4 flex justify-between items-center",children:[i.jsx("h2",{className:"text-lg font-semibold",children:"Auto-Lock Rules Panel"}),i.jsx("button",{className:"text-sm px-4 py-1 underline",children:"Edit"})]}),i.jsx("div",{className:"flex justify-center items-center px-4",children:i.jsxs("div",{className:"w-full max-w-3xl",children:[i.jsx("div",{className:"overflow-x-auto border border-yellow-300 rounded-lg",children:i.jsxs("table",{className:"w-full text-sm text-left",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-yellow-300",children:[i.jsx("th",{className:"px-4 py-2 border-r border-yellow-300",children:"Rules"}),i.jsx("th",{className:"px-4 py-2 border-r border-yellow-300",children:"Threshold"}),i.jsx("th",{className:"px-4 py-2",children:"Status"})]})}),i.jsxs("tbody",{children:[i.jsxs("tr",{children:[i.jsx("td",{className:"px-4 py-4 border-r border-yellow-300",children:"Fraud Score"}),i.jsx("td",{className:"px-4 py-4 border-r border-yellow-300",children:">= 70"}),i.jsx("td",{className:"px-4 py-4",children:"Active"})]}),i.jsxs("tr",{children:[i.jsx("td",{className:"px-4 py-2 border-r border-yellow-300",children:"High-Risk Flags"}),i.jsx("td",{className:"px-4 py-2 border-r border-yellow-300",children:">= 3 in 7 days"}),i.jsx("td",{className:"px-4 py-2",children:"Active"})]}),i.jsxs("tr",{children:[i.jsx("td",{className:"px-4 py-2 border-r border-yellow-300",children:"Financial Abuse"}),i.jsx("td",{className:"px-4 py-2 border-r border-yellow-300",children:"Triggered once"}),i.jsx("td",{className:"px-4 py-2",children:"Active"})]})]})]})}),i.jsxs("div",{className:"flex gap-2 py-4 text-sm",children:[i.jsx("input",{type:"checkbox",className:"accent-yellow-300"}),i.jsx("label",{children:"If a user crosses any of these limits, automation triggers below will apply."})]})]})}),i.jsx("div",{className:"w-[90%] px-10 py-4 flex justify-between items-center",children:i.jsxs("h2",{className:"text-lg font-semibold",children:["Toggle Controls ",i.jsx("span",{className:"text-yellow-400 text-xs",children:"(Automation Setting)"})]})}),i.jsx("div",{className:"flex justify-center items-center px-4",children:i.jsx("div",{className:"w-full max-w-3xl",children:i.jsxs("div",{className:"border border-yellow-300 rounded-lg p-4 space-y-4 text-sm",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("input",{type:"checkbox",className:"accent-yellow-300"}),i.jsx("label",{children:"Auto-Freeze Wallet"})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("input",{type:"checkbox",className:"accent-yellow-300"}),i.jsx("label",{children:"Notify User of Suspension via App + Email"})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("input",{type:"checkbox",className:"accent-yellow-300"}),i.jsx("label",{children:"Required Manual Unflag by Admin to Reinstate Account"})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("input",{type:"checkbox",className:"accent-yellow-300"}),i.jsx("label",{children:"Auto-Escalate to Fraud Dept if wallet frozen twice in 30 days"})]})]})})}),i.jsxs("div",{className:"w-[90%] px-10 py-4 flex justify-between items-center",children:[i.jsx("h2",{className:"text-lg font-semibold",children:"Rule Monitoring & History"}),i.jsxs("div",{children:[i.jsx("label",{className:"text-sm font-semibold",children:"Sort By"}),i.jsxs("select",{className:"bg-[#013220] focus:outline-none text-sm py-1 rounded",children:[i.jsx("option",{value:"today",children:"Today"}),i.jsx("option",{value:"weekly",children:"Weekly"}),i.jsx("option",{value:"monthly",children:"Monthly"})]})]})]}),i.jsx("div",{className:"flex justify-center items-center px-4",children:i.jsx("div",{className:"w-full max-w-3xl",children:i.jsx("div",{className:"border border-yellow-300 rounded-lg overflow-hidden",children:i.jsxs("div",{className:"w-full",children:[i.jsx("table",{className:"w-full text-sm text-left table-fixed",children:i.jsx("thead",{className:"",children:i.jsxs("tr",{className:"border-b border-yellow-300",children:[i.jsx("th",{className:"px-4 py-2 w-1/4",children:"Rule"}),i.jsx("th",{className:"px-4 py-2 w-1/4",children:"Current Threshold"}),i.jsx("th",{className:"px-4 py-2 w-1/4",children:"Last Triggered"}),i.jsx("th",{className:"px-4 py-2 w-1/4",children:"Action"})]})})}),i.jsx("div",{className:"max-h-[240px] overflow-y-auto scrollbar scrollbar-thumb-yellow-400 scrollbar-track-yellow-100",children:i.jsx("table",{className:"w-full text-sm text-left table-fixed",children:i.jsx("tbody",{children:AZ.map((t,e)=>i.jsxs("tr",{className:"border-b border-yellow-200",children:[i.jsx("td",{className:"px-4 py-4 w-1/4",children:t.rule}),i.jsx("td",{className:"px-4 py-4 w-1/4",children:t.currentThreshold}),i.jsx("td",{className:"px-4 py-4 w-1/4",children:t.lastTriggered}),i.jsx("td",{className:"px-4 py-4 w-1/4",children:i.jsx("button",{children:i.jsx($q,{size:20})})})]},e))})})})]})})})})]})]}),kZ=[{date:"24-Jul",type:"Top-up",method:"Credit Card",amount:1e3},{date:"24-Jul",type:"Top-up",method:"Credit Card",amount:1e3},{date:"24-Jul",type:"Top-up",method:"Credit Card",amount:1e3},{date:"24-Jul",type:"Top-up",method:"Credit Card",amount:1e3},{date:"24-Jul",type:"Top-up",method:"Credit Card",amount:1e3},{date:"24-Jul",type:"Top-up",method:"Credit Card",amount:1e3}],DZ=()=>i.jsx("div",{children:i.jsx("div",{className:"flex justify-center items-center px-4",children:i.jsx("div",{className:"w-full max-w-3xl",children:i.jsx("div",{className:"border border-yellow-300 rounded-lg overflow-hidden",children:i.jsxs("div",{className:"w-full",children:[i.jsx("table",{className:"w-full text-sm text-left table-fixed",children:i.jsx("thead",{className:"",children:i.jsxs("tr",{className:"border-b border-yellow-300",children:[i.jsx("th",{className:"px-4 py-2 w-1/4",children:"Date"}),i.jsx("th",{className:"px-4 py-2 w-1/4",children:"Type"}),i.jsx("th",{className:"px-4 py-2 w-1/4",children:"Method"}),i.jsx("th",{className:"px-4 py-2 w-1/4",children:"Amount"}),i.jsx("th",{className:"px-4 py-2 w-1/4",children:"Flag"})]})})}),i.jsx("div",{className:"max-h-[240px] overflow-y-auto scrollbar scrollbar-thumb-yellow-400 scrollbar-track-yellow-100",children:i.jsx("table",{className:"w-full text-sm text-left table-fixed",children:i.jsx("tbody",{children:kZ.map((t,e)=>i.jsxs("tr",{className:"border-b border-yellow-200",children:[i.jsx("td",{className:"px-4 py-4 w-1/4",children:t.date}),i.jsx("td",{className:"px-4 py-4 w-1/4",children:t.type}),i.jsx("td",{className:"px-4 py-4 w-1/4",children:t.method}),i.jsx("td",{className:"px-4 py-4 w-1/4",children:t.amount}),i.jsx("td",{className:"px-4 py-4 w-1/4",children:i.jsx("button",{children:i.jsx(Ff,{size:20})})})]},e))})})})]})})})})}),TZ=()=>i.jsx("div",{children:i.jsx("div",{className:"flex justify-center items-center px-4 py-8",children:i.jsxs("div",{className:"w-full max-w-3xl",children:[i.jsxs("div",{className:"space-y-4",children:[i.jsx("h2",{className:"text-lg font-bold text-yellow-400",children:"Geo Analysis:"}),i.jsxs("div",{className:"flex gap-6",children:[i.jsx("div",{className:"w-full h-[300px]",children:i.jsx("iframe",{src:"https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3321.642362785302!2d73.07320327479479!3d33.64051393936022!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x11a4d1a8d62fd41%3A0x1feebab68518189!2sCodesVista!5e0!3m2!1sen!2s!4v1753904744706!5m2!1sen!2s",width:"100%",height:"100%",style:{border:0},allowFullScreen:"",loading:"lazy",referrerPolicy:"no-referrer-when-downgrade"})}),i.jsxs("div",{className:"self-start bg-gradient-to-br from-green-900 to-green-500 p-4 rounded-lg w-full md:w-2/5 shadow-lg",children:[i.jsx("h3",{className:"text-red-500 font-bold text-xl mb-2 text-center",children:"Alert"}),i.jsxs("div",{className:"flex items-start gap-2 mb-2",children:[i.jsx(Fh,{size:25,className:"text-yellow-300 mt-1"}),i.jsx("p",{className:"text-md",children:"Region Mismatched Detected"})]}),i.jsxs("div",{className:"flex items-start gap-2",children:[i.jsx(Fh,{size:25,className:"text-yellow-300 mt-1"}),i.jsx("p",{className:"text-md",children:"Distance anomaly: 800km deviation in 10 mins"})]})]})]})]}),i.jsxs("div",{className:" pt-6",children:[i.jsx("h3",{className:"text-yellow-400 font-semibold mb-4",children:"KYC Document:"}),i.jsxs("div",{className:"flex items-center gap-4 mb-6",children:[i.jsx("img",{src:"https://media.istockphoto.com/id/1682296067/photo/happy-studio-portrait-or-professional-man-real-estate-agent-or-asian-businessman-smile-for.jpg?s=612x612&w=0&k=20&c=9zbG2-9fl741fbTWw5fNgcEEe4ll-JegrGlQQ6m54rg=",alt:"Profile",className:"w-16 h-16 object-cover rounded-xl border border-yellow-400"}),i.jsx("p",{className:"text-sm text-red-800 font-medium",children:"Mismatched With System Record"})]}),i.jsxs("div",{className:"flex justify-between gap-2 pb-6",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx("img",{src:"/card1.jpg",alt:"Front Side",className:"w-56 h-auto rounded shadow-md"}),i.jsx("p",{className:"text-sm text-yellow-300 text-center text-semibold",children:"Front Side"})]}),i.jsxs("div",{className:"flex gap-4 space-y-2",children:[i.jsxs("div",{children:[i.jsx("img",{src:"/card2.jpg",alt:"Back Side",className:"w-56 h-auto rounded shadow-md"}),i.jsx("p",{className:"text-sm text-yellow-300 text-center text-semibold pt-2",children:"Back Side"})]}),i.jsxs("div",{className:"self-start bg-gradient-to-br from-green-900 to-green-500 px-2 py-4 rounded-md shadow-lg",children:[i.jsx("h4",{className:"text-red-800 font-bold text-lg mb-1 text-center",children:"Alert"}),i.jsxs("div",{className:"flex justify-center gap-4",children:[i.jsx("div",{className:"",children:i.jsx(Fh,{size:30,className:"text-yellow-300 mt-1"})}),i.jsxs("div",{children:[i.jsx("p",{className:"text-xs text-yellow-200",children:"Duplicate CNIC detected in 2 accounts:"}),i.jsxs("ul",{className:"text-xs pl-4 text-yellow-100 list-disc",children:[i.jsx("li",{children:"CUST-7834 (this user)"}),i.jsx("li",{children:"CUST-7921 (flagged last week)"})]})]})]})]})]})]})]}),i.jsxs("div",{className:"flex justify-center gap-10 border-t pt-6 border-yellow-300",children:[i.jsx("button",{className:"bg-yellow-400 px-4 py-2 rounded-full font-semibold text-base text-black outline outline-yellow-500",children:"Marked Save"}),i.jsx("button",{className:"bg-yellow-400 px-4 py-2 rounded-full font-semibold text-base text-black outline outline-yellow-500",children:"Temporary Ban"}),i.jsx("button",{className:"bg-yellow-400 px-4 py-2 rounded-full font-semibold text-base text-black outline outline-yellow-500",children:"Permanent Ban"}),i.jsx("button",{className:"bg-yellow-400 px-4 py-2 rounded-full font-semibold text-base text-black outline outline-yellow-500",children:"Freeze Wallet"})]})]})})}),MZ=()=>i.jsxs("div",{className:"min-h-screen",children:[i.jsx(Gf,{}),i.jsx("div",{children:i.jsx("div",{className:"flex items-center gap-2 py-4 px-6",children:i.jsxs(Pe,{to:"/overview",className:"flex items-center gap-2",children:[i.jsx(Hf,{size:30,className:"cursor-pointer text-lg"}),i.jsx("span",{className:"text-lg font-semibold",children:"Back"})]})})}),i.jsxs("div",{className:" flex flex-col md:flex-row gap-8 justify-center items-start p-6 font-sans",children:[i.jsxs("div",{className:"bg-[#006C45] rounded-xl px-6 py-10 w-full md:w-[500px] shadow-lg",children:[i.jsx("div",{className:"flex justify-center -mt-1",children:i.jsx("img",{src:"https://randomuser.me/api/portraits/men/75.jpg",alt:"Profile",className:"w-26 h-26 rounded-full border-4 border-[#00281E] object-cover"})}),i.jsxs("div",{className:"mt-4 text-base space-y-3",children:[i.jsxs("div",{className:"flex justify-between",children:[i.jsx("span",{className:"font-semibold text-xl",children:"Name:"}),i.jsx("span",{className:"text-xl",children:"Farhan Ali"})]}),i.jsxs("div",{className:"flex justify-between",children:[i.jsx("span",{className:"font-semibold text-xl",children:"User ID:"}),i.jsx("span",{className:"text-xl",children:"CUST-7834"})]}),i.jsxs("div",{className:"flex justify-between",children:[i.jsx("span",{className:"font-semibold text-xl",children:"Phone:"}),i.jsx("span",{className:"text-xl",children:"+92xxxxxxxxx"})]}),i.jsxs("div",{className:"flex justify-between items-center",children:[i.jsx("span",{className:"font-semibold text-xl",children:"KYC Status:"}),i.jsxs("span",{className:"flex items-center gap-1 text-xl text-green-300",children:[i.jsx(dq,{})," Verified"]})]})]}),i.jsxs("div",{className:"mt-6",children:[i.jsx("span",{className:"font-semibold block mb-2 text-base",children:"Fraud Score Meter:"}),i.jsxs("div",{className:"w-full h-3 bg-gray-300 rounded-full relative",children:[i.jsx("div",{className:"h-3 bg-gradient-to-r from-yellow-400 via-yellow-500 to-green-400 rounded-full",style:{width:"70%"}}),i.jsx("div",{className:"absolute text-[10px] left-0 ",children:"10"}),i.jsx("div",{className:"absolute text-[10px] left-[70%] ",children:"60"}),i.jsx("div",{className:"absolute text-[10px] right-0",children:"100"})]})]}),i.jsxs("div",{className:"mt-6",children:[i.jsx("span",{className:"font-semibold block mb-2 text-xl",children:"Flag History:"}),i.jsxs("ul",{className:"list-disc list-inside space-y-1 text-lg",children:[i.jsx("li",{children:"3 ride cancellations in 1 day (24-Jul)"}),i.jsx("li",{children:"Logged in from 2 devices simultaneously"}),i.jsx("li",{children:"Duplicate payment attempts (same card ID)"})]})]})]}),i.jsxs("div",{className:"bg-[#004431] rounded-xl px-4 py-4 w-full md:w-[400px] shadow-lg relative",children:[i.jsxs("div",{className:"flex justify-between items-start mb-3",children:[i.jsx("h2",{className:" text-base font-semibold",children:"Booking Pattern"}),i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsxs("div",{className:"flex items-center space-x-1",children:[i.jsx("label",{className:"text-[7px] ",children:"Date Range:"}),i.jsx("input",{type:"date",className:"bg-transparent border border-yellow-300 rounded px-1 py-[2px] text-[9px] text-yellow-300 focus:outline-none"})]}),i.jsxs("div",{className:"flex items-center space-x-1",children:[i.jsx("label",{className:"text-[7px] ",children:"To"}),i.jsx("input",{type:"date",className:"bg-transparent border border-yellow-300 rounded px-1 py-[2px] text-[9px] focus:outline-none"})]})]})]}),i.jsxs("div",{className:"text-[15px] space-y-2",children:[i.jsx("h2",{className:"font-semibold text-xl",children:"Time Line"}),i.jsxs("ul",{className:"list-disc space-y-1 text-sm px-6",children:[i.jsx("li",{children:"24 Jul, 2:00 PM: Cancelled ride (same driver as before)"}),i.jsx("li",{children:"24 Jul, 2:00 PM: Cancelled ride again (same pickup point)"}),i.jsx("li",{children:"24 Jul, 2:00 PM: No-show"})]})]}),i.jsxs("ul",{className:"mt-4 text-sm list-disc list-inside space-y-2",children:[i.jsxs("li",{className:"flex items-center gap-2",children:[i.jsx(f_,{size:25})," ",i.jsx("span",{className:"underline text-lg font-semibold",children:"Repeated behavior"})]}),i.jsxs("li",{className:"flex items-center gap-2",children:[i.jsx(Hq,{size:25})," ",i.jsx("span",{className:"underline text-lg font-semibold",children:"Same pickup/drop location flagged"})]})]})]})]}),i.jsx(DZ,{}),i.jsx(TZ,{})]}),EZ=()=>i.jsxs("div",{className:"flex min-h-screen ",children:[i.jsx(Ue,{}),i.jsxs("div",{className:"flex-1",children:[i.jsx(Gf,{}),i.jsxs("div",{className:"py-8 font-sans px-6 mt-10",children:[i.jsx("h3",{className:"text-yellow-400 mb-4 text-xl font-semibold px-2",children:"Rule List:"}),i.jsx("div",{className:"flex justify-center",children:i.jsx("div",{className:"rounded-xl border w-full max-w-3xl border-yellow-500 p-4 mb-10 space-y-6",children:[{label:"Frequent Cancellations",value:"if cancels ≥ 3 in 24 hrs"},{label:"GPS Spoof Detected",value:"Emulator or spoofing logs"},{label:"Fake Referral Pattern",value:"Same IP/referral loops"}].map((t,e)=>i.jsxs("div",{className:"flex justify-between items-center gap-4 py-2",children:[i.jsx("span",{className:"w-1/3",children:t.label}),i.jsx("input",{type:"text",defaultValue:t.value,className:"bg-transparent focus:outline-none rounded-full border border-yellow-400 px-2 py-1 w-1/2"}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx("button",{className:"bg-yellow-400 text-[#013220] px-4 py-1 rounded-full",children:"Save"}),i.jsx(jh,{size:25,className:"px-1 py-1 rounded-full bg-yellow-300 text-[#013220] cursor-pointer"})]})]},e))})}),i.jsx("h3",{className:"text-yellow-400 mb-4 mt-10 text-xl font-semibold px-2",children:"Editable Inputs:"}),i.jsx("div",{className:"flex justify-center",children:i.jsx("div",{className:"overflow-x-auto w-full max-w-3xl rounded-xl border border-yellow-500",children:i.jsx("table",{className:"w-full border-collapse text-sm text-left",children:i.jsxs("tbody",{children:[i.jsxs("tr",{children:[i.jsx("td",{className:"border border-yellow-500 px-4 py-6 font-medium",children:"Threshold values"}),i.jsx("td",{className:"border border-yellow-500 px-4 py-4",children:i.jsx("input",{type:"number",defaultValue:3,className:"bg-transparent border border-yellow-400 rounded-full px-1 py-1 w-16 text-center"})}),i.jsx("td",{className:"border border-yellow-500 px-4 py-4",children:i.jsxs("div",{className:"flex gap-2 items-center",children:[i.jsx("button",{className:"bg-yellow-400 text-[#013220] px-4 py-1 rounded-full",children:"Save"}),i.jsx(jh,{size:25,className:"p-1 rounded-full text-[#013220] bg-yellow-400 cursor-pointer"})]})})]}),i.jsxs("tr",{children:[i.jsx("td",{className:"border border-yellow-500 px-4 py-6 font-medium",children:"Rule severity level"}),i.jsx("td",{className:"border border-yellow-500 px-4 py-4",children:i.jsxs("div",{className:"flex justify-center gap-6",children:[i.jsxs("label",{className:"flex items-center gap-1",children:[i.jsx("input",{type:"radio",name:"severity"})," Low"]}),i.jsxs("label",{className:"flex items-center gap-1",children:[i.jsx("input",{type:"radio",name:"severity"})," Medium"]}),i.jsxs("label",{className:"flex items-center gap-1",children:[i.jsx("input",{type:"radio",name:"severity"})," High"]})]})}),i.jsx("td",{className:"border border-yellow-500 px-4 py-4",children:i.jsxs("div",{className:"flex gap-2 items-center",children:[i.jsx("button",{className:"bg-yellow-400 text-[#013220] px-4 py-1 rounded-full",children:"Save"}),i.jsx(jh,{size:25,className:"p-1 rounded-full text-[#013220] bg-yellow-400 cursor-pointer"})]})})]}),i.jsxs("tr",{children:[i.jsx("td",{className:"border border-yellow-500 px-4 py-6 font-medium",children:"Fake Referral Pattern"}),i.jsx("td",{className:"border border-yellow-500 px-4 py-4",children:i.jsxs("div",{className:"flex gap-4",children:[i.jsxs("label",{className:"flex items-center gap-1",children:[i.jsx("input",{type:"checkbox",className:"accent-[#013220] focus:right-0",defaultChecked:!0})," Warn User"]}),i.jsxs("label",{className:"flex items-center gap-1",children:[i.jsx("input",{type:"checkbox",className:"accent-[#013220] focus:right-0",defaultChecked:!0})," Flag for Review"]}),i.jsxs("label",{className:"flex items-center gap-1",children:[i.jsx("input",{type:"checkbox",className:"accent-[#013220] focus:right-0",defaultChecked:!0})," Auto Lock Account"]})]})}),i.jsx("td",{className:"border border-yellow-500 px-4 py-4",children:i.jsxs("div",{className:"flex gap-2 items-center",children:[i.jsx("button",{className:"bg-yellow-400 text-[#013220] px-4 py-1 rounded-full",children:"Save"}),i.jsx(jh,{size:25,className:"p-1 rounded-full text-[#013220] bg-yellow-400 cursor-pointer"})]})})]})]})})})}),i.jsxs("div",{className:"flex justify-center gap-6 mt-10",children:[i.jsx("button",{className:"bg-yellow-400 text-[#013220] font-bold px-8 py-2 rounded-full shadow-md",children:"Save Rules"}),i.jsx("button",{className:"bg-yellow-400 text-[#013220] font-bold px-8 py-2 rounded-full shadow-md",children:"Cancel"})]})]})]})]}),OZ=()=>{const[t,e]=O.useState("Recovery"),r=["Recovery","Delivery","Car Services","Movers"];return i.jsxs("div",{className:"p-6",children:[i.jsxs("div",{className:"flex justify-between mx-4 mb-4",children:[i.jsx("div",{className:"flex gap-4",children:r.map(n=>i.jsx("button",{onClick:()=>e(n),className:`px-4 py-2 rounded transition ${t===n?"bg-yellow-400 text-black":"border border-yellow-400"}`,children:n},n))}),i.jsxs("div",{className:"bg-yellow-400 text-black rounded-full flex items-center font-semibold px-4 text-sm",children:[i.jsx("label",{htmlFor:"",children:"Sort By:"}),i.jsx("select",{className:"bg-transparent",children:i.jsx("option",{value:"",children:"Region"})})]})]}),i.jsx("div",{className:"w-full flex justify-center items-center p-4 rounded",children:i.jsx("iframe",{src:"https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3321.64236278531!2d73.07320327479474!3d33.64051393936022!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x11a4d1a8d62fd41%3A0x1feebab68518189!2sCodesVista!5e0!3m2!1sen!2s!4v1753251776780!5m2!1sen!2s",width:"100%",height:"400",className:"rounded-2xl",style:{border:0},allowFullScreen:!0,loading:"lazy",referrerPolicy:"no-referrer-when-downgrade"})}),i.jsxs("p",{className:"mt-4 text-center",children:["Selected Service: ",i.jsx("span",{className:"font-bold",children:t})]})]})},PZ=({data:t})=>{const e={chart:{type:"area",sparkline:{enabled:!0}},stroke:{curve:"smooth"},fill:{type:"gradient",gradient:{shadeIntensity:1,opacityFrom:.6,opacityTo:.1,stops:[0,90,100]}},colors:["#FFD700"],tooltip:{enabled:!1}},r=[{name:"Trend",data:t||[10,20,15,30,25,40]}];return i.jsx(Qr,{options:e,series:r,type:"area",height:50,width:"100%"})};function _Z(t){return be({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M80.08 82.66L60.24 102.5 192.9 242.7v58.6h78v-50.9zm-25.4 40.14v80.3l4.01 2.7c10.56 7 14.74 14.1 15.93 19.8 1.18 5.8-.43 10.8-3.85 14.9-6.86 8.3-19.91 12.3-32.73-.6l-12.72 12.8c19.18 19.1 46.13 15.1 59.27-.6 6.58-7.9 9.97-18.9 7.65-30.1-2.05-10-8.72-19.7-19.56-28v-52.2zm258.02 52.5v144h-185c22.6 5.8 40.6 23.5 46.7 46H337c7.5-27.6 32.8-48 62.7-48 29.9 0 55.2 20.4 62.7 48h24.3v-84.6l-60.2-105.4zm36 14h62.1l54.7 92H348.7v-83zm-321.49 130l11.5 46h10.25c6.12-22.5 24.09-40.2 46.74-46zm84.49 16c-26.08 0-47.02 20.9-47.02 47s20.94 47 47.02 47c26.1 0 47-20.9 47-47s-20.9-47-47-47zm288 0c-26.1 0-47 20.9-47 47s20.9 47 47 47 47-20.9 47-47-20.9-47-47-47z"},child:[]}]})(t)}const RZ=[{total:"Total Booking",percent:"0",icon:_Z,chartData:[5,10,8,12,15]},{total:"Active Driver",percent:"0",icon:eG,chartData:[2,6,4,8,10]},{total:"Total Revenue",percent:0,icon:mq,chartData:[20,25,22,30,28]},{total:"Pending Approvals",percent:"Loading...",icon:S_,chartData:[1,3,2,4,5]}],LZ=()=>{const{user:t,isAuthenticated:e}=ua(o=>o.auth),{data:r,isLoading:n,error:a}=PX(void 0,{skip:!e}),s=RZ.map(o=>o.total==="Pending Approvals"?{...o,percent:n?"Loading...":a?`Error: ${a?.message||"Unknown"}`:r?.pendingApprovals?.serviceProviderApprovals?.totalPending||r?.pendingApprovals?.totalPendingRequests||"0"}:o.total==="Total Revenue"?(console.log("Total Revenue Data:",r?.systemTotalEarnings),{...o,percent:n?"Loading...":a?`Error: ${a?.message||"Unknown"}`:r?.systemTotalEarnings?.totalMLMAmount||"0"}):o);return i.jsxs("div",{className:"text-[#DDC104] mr-10 px-10 py-8",children:[i.jsxs("div",{className:"flex justify-end pb-1",children:[i.jsx("label",{className:"text-sm text-[#DDC104] mr-2",children:"Sort By:"}),i.jsxs("select",{className:"bg-transparent text-[#DDC104] text-sm focus:outline-none",children:[i.jsx("option",{value:"monthly",className:"bg-yellow-400 text-black",children:"Monthly"}),i.jsx("option",{value:"weekly",className:"bg-yellow-400 text-black",children:"Weekly"}),i.jsx("option",{value:"yearly",className:"bg-yellow-400 text-black",children:"Yearly"})]})]}),i.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-12",children:s.map((o,l)=>{const c=o.icon;return i.jsxs("div",{className:"flex flex-col gap-4 shadow-lg rounded-lg outline outline-black/20 pl-5 pt-5 bg-gradient-to-b from-[#038A59] to-[#013723] shadow-black/80",children:[i.jsxs("div",{className:"flex gap-2 items-center",children:[i.jsx(c,{className:"text-4xl"}),i.jsx("p",{className:"text-xl font-bold m-0 tracking-wide",children:o.total})]}),i.jsx("h2",{className:"text-3xl font-bold",children:o.percent}),i.jsx("div",{className:"w-full pr-5 pb-5",children:i.jsx(PZ,{data:o.chartData})})]},l)})})]})},zZ=()=>i.jsxs("div",{className:"flex min-h-screen",children:[i.jsx(Ue,{}),i.jsxs("div",{className:"flex-1",children:[i.jsx(LZ,{}),i.jsx(OZ,{})]})]}),IZ=()=>{const t=Ba(),{dashboardData:e,leaderboard:r,loading:n,error:a}=ua(o=>o.mlm);if(O.useEffect(()=>{t(Eg()),t(Og())},[t]),n)return i.jsx("div",{className:"flex justify-center items-center h-64",children:i.jsx("div",{className:"text-lg",children:"Loading MLM data..."})});if(a)return i.jsx("div",{className:"flex justify-center items-center h-64",children:i.jsxs("div",{className:"text-lg text-red-500",children:["Error: ",a]})});const s=e?.currentBalances?.ddr||0;return i.jsxs("div",{className:"w-[85%] mx-auto",children:[i.jsxs("div",{className:"flex justify-between items-center m-6",children:[i.jsxs("h2",{className:"text-lg font-semibold",children:["DDR Balance: $",s.toFixed(2)]}),r&&i.jsxs("div",{className:"text-sm text-gray-600",children:["Leaderboard Updated: ",new Date(r.leaderboard?.lastUpdated).toLocaleDateString()]})]}),i.jsxs("div",{className:"border mx-auto border-yellow-400 w-[95%] px-8 py-4 rounded",children:[i.jsxs("div",{className:"flex justify-between items-center mb-4",children:[i.jsx("h2",{className:"text-xl font-bold text-yellow-600",children:"DDR Leaderboard"}),i.jsxs("div",{className:"text-sm text-gray-600",children:["Last updated: ",r?.lastUpdated?new Date(r.lastUpdated).toLocaleString():"Just now"]})]}),i.jsxs("table",{className:"w-full border-collapse table-fixed",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-yellow-400 text-left",children:[i.jsx("th",{className:"px-4 py-2",children:"Rank"}),i.jsx("th",{className:"px-4 py-2",children:"Full Name"}),i.jsx("th",{className:"px-4 py-2",children:"Total Earnings"}),i.jsx("th",{className:"px-4 py-2",children:"Level 1"}),i.jsx("th",{className:"px-4 py-2",children:"Level 2"}),i.jsx("th",{className:"px-4 py-2",children:"Level 3"}),i.jsx("th",{className:"px-4 py-2",children:"Level 4"})]})}),i.jsx("tbody",{children:r?.leaderboard?.topEarners?.length>0?r.leaderboard.topEarners.map((o,l)=>i.jsxs("tr",{className:"text-left hover:bg-gray-50",children:[i.jsx("td",{className:"px-4 py-2",children:i.jsxs("span",{className:"font-bold text-yellow-600",children:["#",o.rank]})}),i.jsx("td",{className:"px-4 py-2",children:i.jsxs("div",{children:[i.jsx("div",{className:"font-semibold",children:o.name}),o.username&&i.jsxs("div",{className:"text-sm text-gray-600",children:["@",o.username]})]})}),i.jsxs("td",{className:"px-4 py-2 font-bold text-green-600",children:["$",o.earnings]}),i.jsxs("td",{className:"px-4 py-2 font-semibold",children:["$",o.levelBreakdown?.level1||0]}),i.jsxs("td",{className:"px-4 py-2 font-semibold",children:["$",o.levelBreakdown?.level2||0]}),i.jsxs("td",{className:"px-4 py-2 font-semibold",children:["$",o.levelBreakdown?.level3||0]}),i.jsxs("td",{className:"px-4 py-2 font-semibold",children:["$",o.levelBreakdown?.level4||0]})]},l)):i.jsx("tr",{children:i.jsx("td",{colSpan:"7",className:"px-4 py-8 text-center text-gray-500",children:"No leaderboard data available"})})})]}),i.jsxs("div",{className:"mt-4 text-center",children:[i.jsxs("div",{className:"text-sm text-gray-600",children:["Total Participants: ",r?.leaderboard?.totalParticipants||0]}),i.jsx("div",{className:"text-xs text-gray-500 mt-2",children:"💡 Tip: Rankings are updated in real-time based on DDR earnings across all levels"})]})]})]})},BZ=()=>{const[t,e]=O.useState([]),[r,n]=O.useState(null),[a,s]=O.useState(null),[o,l]=O.useState(null),[c,u]=O.useState(!0),[h,p]=O.useState(null),[m,x]=O.useState(!1),[y,b]=O.useState({name:"",requirement:"",duration:"",reward:"",type:"solo",newbieRidesOnly:!1,description:""});O.useEffect(()=>{(async()=>{try{u(!0);const k=await fetch("https://aaaogo.xyz/api/mlm/bbr/campaign");if(!k.ok)throw new Error(`Failed to fetch campaign data: ${k.status} ${k.statusText}`);const T=await k.json();if(console.log("Campaign API Response:",T),!T.success)throw new Error(T.message||"Campaign API returned an error");n(T.data?.currentCampaign||null);const E=await fetch("https://aaaogo.xyz/api/mlm/bbr/leaderboard");if(!E.ok)throw new Error(`Failed to fetch leaderboard data: ${E.status} ${E.statusText}`);const _=await E.json();if(console.log("Leaderboard API Response:",_),!_.success||!_.data)throw new Error("Invalid leaderboard API response format");e(_.data.leaderboard||[]),s(_.data.userPosition||null),l(_.data.pagination||null),u(!1)}catch(k){console.error("Fetch error:",k),p(k.message),u(!1),Ne.error(k.message)}})()},[]);const w=C=>{const{name:k,value:T,type:E,checked:_}=C.target;b(L=>({...L,[k]:E==="checkbox"?_:T}))},N=async C=>{if(C.preventDefault(),!y.name||!y.requirement||!y.duration||!y.reward){Ne.error("All fields except newbieRidesOnly and description are required.");return}try{const E=await fetch("https://aaaogo.xyz/api/mlm/admin/bbr/campaign",{method:m?"PUT":"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:y.name,requirement:Number(y.requirement),duration:Number(y.duration),reward:Number(y.reward),type:y.type,newbieRidesOnly:y.newbieRidesOnly,description:y.description})});if(!E.ok)throw new Error(`Failed to ${m?"update":"create"} campaign: ${E.status} ${E.statusText}`);const _=await E.json();if(!_.success)throw new Error(_.message||`Failed to ${m?"update":"create"} campaign`);Ne.success(_.message||`Campaign ${m?"updated":"created"} successfully`),b({name:"",requirement:"",duration:"",reward:"",type:"solo",newbieRidesOnly:!1,description:""}),x(!1);const L=await fetch("https://aaaogo.xyz/api/mlm/bbr/campaign");if(L.ok){const P=await L.json();console.log("Refetched Campaign Data:",P),n(P.data?.currentCampaign||null)}else Ne.error("Failed to refresh campaign data")}catch(k){console.error(`${m?"Update":"Create"} campaign error:`,k),Ne.error(k.message)}},A=()=>{r&&(b({name:r.name||"",requirement:r.requirement||"",duration:r.duration||"",reward:r.reward?.amount||"",type:r.type||"solo",newbieRidesOnly:r.newbieRidesOnly||!1,description:r.description||""}),x(!0))},S=async()=>{if(r)try{const C=await fetch("https://aaaogo.xyz/api/mlm/admin/bbr/campaign",{method:"DELETE",headers:{"Content-Type":"application/json"}});if(!C.ok)throw new Error(`Failed to delete campaign: ${C.status} ${C.statusText}`);const k=await C.json();if(!k.success)throw new Error(k.message||"Failed to delete campaign");Ne.success(k.message||"Campaign deleted successfully"),n(null),b({name:"",requirement:"",duration:"",reward:"",type:"solo",newbieRidesOnly:!1,description:""}),x(!1)}catch(C){console.error("Delete campaign error:",C),Ne.error(C.message)}};return i.jsxs("div",{className:"p-4 rounded-lg text-yellow-400",children:[i.jsx("h2",{className:"text-lg font-bold mb-4",children:"Bonus Booster Rewards (BBR)"}),i.jsxs("div",{className:"mb-6 p-4 border border-yellow-400 rounded-lg",children:[i.jsx("h3",{className:"text-md font-semibold mb-2",children:m?"Update Campaign":"Create New Campaign"}),i.jsxs("form",{onSubmit:N,className:"space-y-4",children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm",children:"Campaign Name"}),i.jsx("input",{type:"text",name:"name",value:y.name,onChange:w,className:"w-full p-2 border border-yellow-400 rounded bg-transparent text-yellow-400",placeholder:"e.g., Weekly Turbo Booster"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm",children:"Requirement (Rides)"}),i.jsx("input",{type:"number",name:"requirement",value:y.requirement,onChange:w,className:"w-full p-2 border border-yellow-400 rounded bg-transparent text-yellow-400",placeholder:"e.g., 100"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm",children:"Duration (Days)"}),i.jsx("input",{type:"number",name:"duration",value:y.duration,onChange:w,className:"w-full p-2 border border-yellow-400 rounded bg-transparent text-yellow-400",placeholder:"e.g., 7"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm",children:"Reward (AED)"}),i.jsx("input",{type:"number",name:"reward",value:y.reward,onChange:w,className:"w-full p-2 border border-yellow-400 rounded bg-transparent text-yellow-400",placeholder:"e.g., 550"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm",children:"Type"}),i.jsxs("select",{name:"type",value:y.type,onChange:w,className:"w-full p-2 border border-yellow-400 rounded bg-transparent text-yellow-400",children:[i.jsx("option",{value:"solo",children:"Solo"}),i.jsx("option",{value:"team",children:"Team"})]})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm",children:"Description"}),i.jsx("textarea",{name:"description",value:y.description,onChange:w,className:"w-full p-2 border border-yellow-400 rounded bg-transparent text-yellow-400",placeholder:"e.g., Complete rides to earn rewards!"})]}),i.jsx("div",{children:i.jsxs("label",{className:"flex items-center text-sm",children:[i.jsx("input",{type:"checkbox",name:"newbieRidesOnly",checked:y.newbieRidesOnly,onChange:w,className:"mr-2"}),"Newbie Rides Only"]})}),i.jsxs("div",{className:"flex gap-4",children:[i.jsx("button",{type:"submit",className:"px-4 py-2 bg-yellow-400 text-black rounded hover:bg-yellow-500",children:m?"Update Campaign":"Create Campaign"}),m&&i.jsx("button",{type:"button",onClick:()=>{x(!1),b({name:"",requirement:"",duration:"",reward:"",type:"solo",newbieRidesOnly:!1,description:""})},className:"px-4 py-2 bg-gray-600 text-white rounded hover:bg-gray-700",children:"Cancel"})]})]})]}),c&&i.jsx("p",{className:"text-center",children:"Loading data..."}),h&&i.jsxs("p",{className:"text-red-500 text-center",children:["Error: ",h]}),r&&!c&&!h?i.jsxs("div",{className:"mb-6 p-4 border border-yellow-400 rounded-lg",children:[i.jsxs("div",{className:"flex justify-between items-center",children:[i.jsx("h3",{className:"text-md font-semibold",children:r.name}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx("button",{onClick:A,className:"px-3 py-1 bg-yellow-400 text-black rounded hover:bg-yellow-500",children:"Edit"}),i.jsx("button",{onClick:S,className:"px-3 py-1 bg-red-600 text-white rounded hover:bg-red-700",children:"Delete"})]})]}),i.jsxs("p",{children:[i.jsx("strong",{children:"Requirement:"})," ",r.requirement," rides"]}),i.jsxs("p",{children:[i.jsx("strong",{children:"Reward:"})," AED ",r.reward?.amount||"N/A"]}),i.jsxs("p",{children:[i.jsx("strong",{children:"Duration:"})," ",r.duration," days"]}),i.jsxs("p",{children:[i.jsx("strong",{children:"Period:"})," ",r.startDate&&r.endDate?`${new Date(r.startDate).toLocaleDateString()} - ${new Date(r.endDate).toLocaleDateString()}`:"N/A"]}),i.jsxs("p",{children:[i.jsx("strong",{children:"Time Left:"})," ",r.timeLeft?`${r.timeLeft.days||0} days, ${r.timeLeft.hours||0} hours`:"N/A"]}),i.jsxs("p",{children:[i.jsx("strong",{children:"Type:"})," ",r.type]}),i.jsxs("p",{children:[i.jsx("strong",{children:"Newbie Rides Only:"})," ",r.newbieRidesOnly?"Yes":"No"]}),i.jsxs("p",{children:[i.jsx("strong",{children:"Description:"})," ",r.description||"N/A"]}),i.jsxs("p",{children:[i.jsx("strong",{children:"Total Participants:"})," ",r.totalParticipants||0]}),i.jsxs("p",{children:[i.jsx("strong",{children:"Total Winners:"})," ",r.totalWinners||0]}),i.jsxs("p",{children:[i.jsx("strong",{children:"Total Reward Distributed:"})," AED ",r.totalRewardDistributed||0]})]}):!c&&!h?i.jsx("p",{className:"text-center",children:"No active campaign available"}):null,a&&!c&&!h&&i.jsxs("div",{className:"mb-6 p-4 border border-yellow-400 rounded-lg",children:[i.jsx("h3",{className:"text-md font-semibold mb-2",children:"Your Position"}),i.jsxs("p",{children:[i.jsx("strong",{children:"Rank:"})," ",a.rank||"Not ranked"]}),i.jsxs("p",{children:[i.jsx("strong",{children:"Rides:"})," ",a.rides||0]})]}),!c&&!h&&i.jsxs("div",{className:"mb-6",children:[i.jsx("h3",{className:"text-md font-semibold mb-2",children:"Leaderboard"}),t.length>0?i.jsx("div",{className:"overflow-x-auto",children:i.jsxs("table",{className:"w-full border border-yellow-400 text-sm",children:[i.jsx("thead",{className:"border-b border-yellow-400",children:i.jsxs("tr",{children:[i.jsx("th",{className:"px-3 py-2",children:"Rank"}),i.jsx("th",{className:"px-3 py-2",children:"Name"}),i.jsx("th",{className:"px-3 py-2",children:"Role"}),i.jsx("th",{className:"px-3 py-2",children:"Rides"}),i.jsx("th",{className:"px-3 py-2",children:"Ride Type"}),i.jsx("th",{className:"px-3 py-2",children:"Status"}),i.jsx("th",{className:"px-3 py-2",children:"Reward"})]})}),i.jsx("tbody",{children:t.map((C,k)=>i.jsxs("tr",{className:"text-center hover:bg-[#014b38]",children:[i.jsx("td",{className:"px-3 py-2",children:C.rank}),i.jsx("td",{className:"px-3 py-2",children:C.name.trim()}),i.jsx("td",{className:"px-3 py-2",children:C.role}),i.jsx("td",{className:"px-3 py-2",children:C.rides}),i.jsx("td",{className:"px-3 py-2",children:C.rideType}),i.jsx("td",{className:"px-3 py-2",children:C.status}),i.jsxs("td",{className:"px-3 py-2",children:["AED ",C.reward]})]},k))})]})}):i.jsx("p",{className:"text-center",children:"No leaderboard data available"})]}),o&&!c&&!h&&i.jsxs("div",{className:"mb-6 text-sm",children:[i.jsxs("p",{children:["Page: ",o.page," of ",o.hasMore?"multiple":"1"]}),i.jsxs("p",{children:["Items per page: ",o.limit]})]})]})},FZ=()=>{const[t,e]=O.useState(null),[r,n]=O.useState(!0),[a,s]=O.useState(null),[o,l]=O.useState({requiredPGP:"",requiredTGP:"",retirementAge:"",rewardAmount:""}),[c,u]=O.useState(!1),h={accumulatedPGP:"Min 25%",accumulatedTGP:"Min 25%",active:"Active at least once in each 6 months",timeLimit:"No time limitations"},p=async()=>{try{const y=await fetch("https://aaaogo.xyz/api/mlm/admin/hlr/config");if(y.ok){const b=await y.json();b.success&&b.data&&l({requiredPGP:b.data.requiredPGP||"",requiredTGP:b.data.requiredTGP||"",retirementAge:b.data.retirementAge||"",rewardAmount:b.data.rewardAmount||""})}}catch(y){console.error("Failed to fetch HLR config:",y)}},m=y=>{const{name:b,value:w}=y.target;l(N=>({...N,[b]:w}))},x=async y=>{y.preventDefault(),u(!0);try{const b={};if(o.requiredPGP&&o.requiredPGP.trim()!==""&&(b.requiredPGP=Number(o.requiredPGP)),o.requiredTGP&&o.requiredTGP.trim()!==""&&(b.requiredTGP=Number(o.requiredTGP)),o.retirementAge&&o.retirementAge.trim()!==""&&(b.retirementAge=Number(o.retirementAge)),o.rewardAmount&&o.rewardAmount.trim()!==""&&(b.rewardAmount=Number(o.rewardAmount)),Object.keys(b).length===0){Ne.error("Please fill at least one field to update");return}const w=await fetch("https://aaaogo.xyz/api/mlm/admin/hlr/config",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(b)});if(!w.ok)throw new Error(`Failed to update HLR config: ${w.status} ${w.statusText}`);const N=await w.json();if(!N.success)throw new Error(N.message||"Failed to update HLR configuration");Ne.success(N.message||"HLR configuration updated successfully"),p()}catch(b){console.error("Update HLR config error:",b),Ne.error(b.message)}finally{u(!1)}};return O.useEffect(()=>{(async()=>{try{const b=await fetch("https://aaaogo.xyz/api/mlm/hlr/leaderboard?page=1&limit=20");if(!b.ok)throw new Error("Failed to fetch leaderboard data");const w=await b.json();e(w.data)}catch(b){s(b.message)}finally{n(!1)}})(),p()},[]),r?i.jsx("div",{className:"p-4 text-yellow-400",children:"Loading..."}):a?i.jsxs("div",{className:"p-4 text-red-500",children:["Error: ",a]}):i.jsxs("div",{className:"p-4 rounded-lg text-yellow-400",children:[i.jsx("h2",{className:"text-lg font-bold mb-4",children:"Honorpay Loyalty Reward (HLR)"}),i.jsxs("div",{className:"mb-6 p-4 border border-yellow-400 rounded-lg",children:[i.jsx("h3",{className:"text-md font-semibold mb-2 text-yellow-400",children:"HLR Configuration"}),i.jsxs("form",{onSubmit:x,className:"space-y-4",children:[i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm text-yellow-400",children:"Required PGP"}),i.jsx("input",{type:"number",name:"requiredPGP",value:o.requiredPGP,onChange:m,className:"w-full p-2 border border-yellow-400 rounded bg-transparent text-yellow-400",placeholder:"e.g., 250000"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm text-yellow-400",children:"Required TGP"}),i.jsx("input",{type:"number",name:"requiredTGP",value:o.requiredTGP,onChange:m,className:"w-full p-2 border border-yellow-400 rounded bg-transparent text-yellow-400",placeholder:"e.g., 7000000"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm text-yellow-400",children:"Retirement Age"}),i.jsx("input",{type:"number",name:"retirementAge",value:o.retirementAge,onChange:m,className:"w-full p-2 border border-yellow-400 rounded bg-transparent text-yellow-400",placeholder:"e.g., 60"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm text-yellow-400",children:"Reward Amount (AED)"}),i.jsx("input",{type:"number",name:"rewardAmount",value:o.rewardAmount,onChange:m,className:"w-full p-2 border border-yellow-400 rounded bg-transparent text-yellow-400",placeholder:"e.g., 75000"})]})]}),i.jsx("button",{type:"submit",disabled:c,className:"px-4 py-2 bg-yellow-400 text-black rounded hover:bg-yellow-500 disabled:opacity-50",children:c?"Updating...":"Update HLR Configuration"})]})]}),i.jsx("div",{className:"overflow-x-auto mb-8",children:i.jsxs("table",{className:"w-full border border-yellow-400 text-sm",children:[i.jsx("thead",{className:"border-b border-yellow-400",children:i.jsxs("tr",{children:[i.jsx("th",{className:"px-3 py-2",children:"Accumulated PGP"}),i.jsx("th",{className:"px-3 py-2",children:"Accumulated TGP"}),i.jsx("th",{className:"px-3 py-2",children:"Activity Requirement"}),i.jsx("th",{className:"px-3 py-2",children:"Time Limitation"})]})}),i.jsx("tbody",{children:i.jsxs("tr",{className:"text-center hover:bg-[#014b38]",children:[i.jsx("td",{className:"px-3 py-2",children:h.accumulatedPGP}),i.jsx("td",{className:"px-3 py-2",children:h.accumulatedTGP}),i.jsx("td",{className:"px-3 py-2",children:h.active}),i.jsx("td",{className:"px-3 py-2",children:h.timeLimit})]})})]})}),t?.requirements&&i.jsxs("div",{className:"mb-8",children:[i.jsx("h3",{className:"text-md font-semibold mb-2",children:"Requirements"}),i.jsxs("ul",{className:"list-disc list-inside",children:[i.jsxs("li",{children:["Required PGP: ",t.requirements.requiredPGP.toLocaleString()]}),i.jsxs("li",{children:["Required TGP: ",t.requirements.requiredTGP.toLocaleString()]}),i.jsxs("li",{children:["Retirement Age: ",t.requirements.retirementAge]}),i.jsxs("li",{children:["Reward Amount: $",t.requirements.rewardAmount.toLocaleString()]})]})]}),t?.statistics&&i.jsxs("div",{className:"mb-8",children:[i.jsx("h3",{className:"text-md font-semibold mb-2",children:"Statistics"}),i.jsxs("ul",{className:"list-disc list-inside",children:[i.jsxs("li",{children:["Total Participating: ",t.statistics.totalParticipating]}),i.jsxs("li",{children:["Total Qualified: ",t.statistics.totalQualified]}),i.jsxs("li",{children:["Qualification Rate: ",t.statistics.qualificationRate,"%"]})]})]}),t?.leaderboard&&i.jsxs("div",{className:"overflow-x-auto",children:[i.jsx("h3",{className:"text-md font-semibold mb-2",children:"Leaderboard"}),i.jsxs("table",{className:"w-full border border-yellow-400 text-sm",children:[i.jsx("thead",{className:"border-b border-yellow-400",children:i.jsxs("tr",{children:[i.jsx("th",{className:"px-3 py-2",children:"Rank"}),i.jsx("th",{className:"px-3 py-2",children:"Name"}),i.jsx("th",{className:"px-3 py-2",children:"Country"}),i.jsx("th",{className:"px-3 py-2",children:"PGP"}),i.jsx("th",{className:"px-3 py-2",children:"TGP"}),i.jsx("th",{className:"px-3 py-2",children:"Total Points"}),i.jsx("th",{className:"px-3 py-2",children:"Status"}),i.jsx("th",{className:"px-3 py-2",children:"Qualified"})]})}),i.jsx("tbody",{children:t.leaderboard.map(y=>i.jsxs("tr",{className:"text-center hover:bg-[#014b38]",children:[i.jsx("td",{className:"px-3 py-2",children:y.rank}),i.jsx("td",{className:"px-3 py-2",children:y.name}),i.jsxs("td",{className:"px-3 py-2",children:[y.flag," ",y.country.toUpperCase()]}),i.jsx("td",{className:"px-3 py-2",children:y.pgp.toLocaleString()}),i.jsx("td",{className:"px-3 py-2",children:y.tgp.toLocaleString()}),i.jsx("td",{className:"px-3 py-2",children:y.totalPoints.toLocaleString()}),i.jsx("td",{className:"px-3 py-2",children:y.status}),i.jsx("td",{className:"px-3 py-2",children:y.isQualified?"Yes":"No"})]},y.rank))})]})]}),t?.pagination&&i.jsxs("div",{className:"mt-4 text-sm",children:["Page ",t.pagination.page," of ",Math.ceil(t.pagination.total/t.pagination.limit)," | Total Entries: ",t.pagination.total]})]})},k1=({label:t,percentage:e,isEditing:r,onPercentageChange:n})=>{const l=148*Math.PI,c=l-e/100*l;return i.jsxs("div",{className:"relative flex flex-col items-center",children:[i.jsxs("svg",{height:160,width:160,children:[i.jsx("defs",{children:i.jsxs("linearGradient",{id:"goldGradient",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[i.jsx("stop",{offset:"0%",stopColor:"#FFD700"}),i.jsx("stop",{offset:"100%",stopColor:"#FFA500"})]})}),i.jsx("circle",{stroke:"#2E4437",fill:"transparent",strokeWidth:12,r:74,cx:80,cy:80}),i.jsx("circle",{stroke:"url(#goldGradient)",fill:"transparent",strokeWidth:12,strokeLinecap:"round",strokeDasharray:l,strokeDashoffset:c,r:74,cx:80,cy:80,style:{transform:"rotate(90deg)",transformOrigin:"50% 50%"}})]}),i.jsxs("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 text-center",children:[i.jsx("div",{className:"font-semibold text-sm",children:t}),r?i.jsx("input",{type:"number",value:e,onChange:u=>n(parseInt(u.target.value)||0),className:"w-12 bg-transparent border border-yellow-400 rounded text-center text-sm font-semibold",min:"0",max:"100"}):i.jsxs("div",{className:"font-semibold text-sm",children:[e,"%"]})]})]})},HZ=()=>{const[t,e]=O.useState({legA:40,legB:30,legC:30}),[r,n]=O.useState(!1),[a,s]=O.useState(!0),[o,l]=O.useState(null);O.useEffect(()=>{c()},[]);const c=async()=>{try{const m=await la.get("/mlm/admin/crr/leg-percentages");m.data.success&&(e(m.data.data.legPercentages),l(m.data.data.lastUpdated))}catch(m){console.error("Error fetching leg percentages:",m),Ne.error("Failed to fetch leg percentages")}finally{s(!1)}},u=async()=>{try{const m=await la.put("/mlm/admin/crr/global-leg-percentages",{legPercentages:t});m.data.success&&(l(m.data.data.lastUpdated),n(!1),Ne.success("Leg percentages updated successfully"))}catch(m){console.error("Error updating leg percentages:",m),Ne.error("Failed to update leg percentages")}},h=(m,x)=>{e(y=>({...y,[m]:x}))},p=()=>{n(!1),c()};return a?i.jsx("div",{className:"text-yellow-400",children:"Loading team structure..."}):i.jsxs("div",{children:[i.jsxs("div",{className:"flex justify-between items-center mb-4",children:[i.jsx("h2",{className:"text-xl font-bold",children:"Team Structure Compliance"}),i.jsx("div",{className:"flex gap-2",children:r?i.jsxs(i.Fragment,{children:[i.jsx("button",{onClick:u,className:"px-3 py-1 bg-green-600 text-white rounded text-sm font-semibold hover:bg-green-500",children:"Save"}),i.jsx("button",{onClick:p,className:"px-3 py-1 bg-red-600 text-white rounded text-sm font-semibold hover:bg-red-500",children:"Cancel"})]}):i.jsx("button",{onClick:()=>n(!0),className:"px-3 py-1 bg-yellow-600 text-black rounded text-sm font-semibold hover:bg-yellow-500",children:"Edit"})})]}),i.jsxs("div",{className:"py-10 flex justify-around gap-16 w-2/3",children:[i.jsx(k1,{label:"Leg A",percentage:t.legA,isEditing:r,onPercentageChange:m=>h("legA",m)}),i.jsx(k1,{label:"Leg B",percentage:t.legB,isEditing:r,onPercentageChange:m=>h("legB",m)}),i.jsx(k1,{label:"Leg C",percentage:t.legC,isEditing:r,onPercentageChange:m=>h("legC",m)})]}),o&&i.jsxs("div",{className:"text-sm text-gray-400 mt-2",children:["Last updated: ",new Date(o).toLocaleString()]})]})},$Z=()=>{const[t,e]=O.useState(null),[r,n]=O.useState(null),[a,s]=O.useState(!0),[o,l]=O.useState(null),[c,u]=O.useState(null),[h,p]=O.useState(!1);O.useEffect(()=>{(async()=>{try{const N=await(await fetch("https://aaaogo.xyz/api/mlm/crr/leaderboard")).json();N.success?e(N.data.leaderboard):l("Failed to load leaderboard data")}catch{l("Error fetching leaderboard data")}finally{s(!1)}})()},[]),O.useEffect(()=>{(async()=>{try{const N=await(await fetch("https://aaaogo.xyz/api/mlm/admin/crr/config")).json();N.success?(n(N.data),u(N.data)):l("Failed to load CRR configuration")}catch{l("Error fetching CRR configuration")}})()},[]);const m=(b,w,N,A)=>{u(S=>{const C={...S};return A?C.crrRanks[w].requirements[A]=Number(b.target.value):N==="crrConfig"?C.crrConfig[b.target.name]=b.target.type==="checkbox"?b.target.checked:Number(b.target.value):C.crrRanks[w][N]=N==="reward"?Number(b.target.value):b.target.value,C})},x=async b=>{b.preventDefault();try{const N=await(await fetch("https://aaaogo.xyz/api/mlm/admin/crr/config",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)})).json();N.success?(n(N.data),p(!1),Ne.success("CRR configuration updated successfully!")):l("Failed to update CRR configuration")}catch{l("Error updating CRR configuration")}};if(a)return i.jsx("div",{className:"p-4 text-center text-yellow-400",children:"Loading..."});if(o)return i.jsx("div",{className:"p-4 text-center text-red-500",children:o});const y=t?.topEarners[0]||{};return i.jsxs("div",{className:"p-4 space-y-6 w-full text-yellow-400",children:[i.jsxs("div",{className:"flex flex-col gap-4",children:[i.jsx("h2",{className:"text-lg font-bold",children:t?.title||"🥇 CRR Leaderboard – Top Earners:"}),i.jsxs("h3",{className:"text-base font-semibold",children:["Estimated AED Earned: ",i.jsxs("span",{children:[y.earnings||0," AED"]})]}),i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("label",{className:"font-medium",children:"Auto Reset:"}),i.jsx("input",{type:"date",className:"bg-transparent border border-yellow-400 rounded px-2 py-1 text-sm focus:outline-none focus:ring focus:ring-yellow-400"}),i.jsx("span",{className:"font-medium",children:"To"}),i.jsx("input",{type:"date",className:"bg-transparent border border-yellow-400 rounded px-2 py-1 text-sm focus:outline-none focus:ring focus:ring-yellow-400"}),i.jsxs("span",{className:"ml-4 text-sm font-medium",children:["Days Until Reset: ",r?.crrConfig?.resetDay||"N/A"]})]})]}),i.jsxs("div",{className:"rounded-lg",children:[i.jsx("h3",{className:"text-base font-semibold mb-4",children:"CRR Rank Configuration"}),h?i.jsxs("form",{onSubmit:x,className:"space-y-4",children:[c?.crrRanks&&Object.keys(c.crrRanks).map(b=>i.jsxs("div",{className:"border border-yellow-400 p-4 rounded-lg",children:[i.jsxs("h4",{className:"text-sm font-semibold",children:[c.crrRanks[b].name," ",c.crrRanks[b].icon]}),i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{children:[i.jsx("label",{className:"text-sm",children:"Name"}),i.jsx("input",{type:"text",value:c.crrRanks[b].name,onChange:w=>m(w,b,"name"),className:"bg-transparent border border-yellow-400 rounded px-2 py-1 text-sm w-full"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"text-sm",children:"Icon"}),i.jsx("input",{type:"text",value:c.crrRanks[b].icon,onChange:w=>m(w,b,"icon"),className:"bg-transparent border border-yellow-400 rounded px-2 py-1 text-sm w-full"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"text-sm",children:"Reward"}),i.jsx("input",{type:"number",value:c.crrRanks[b].reward,onChange:w=>m(w,b,"reward"),className:"bg-transparent border border-yellow-400 rounded px-2 py-1 text-sm w-full"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"text-sm",children:"Status"}),i.jsxs("select",{value:c.crrRanks[b].status,onChange:w=>m(w,b,"status"),className:"bg-transparent border border-yellow-400 rounded px-2 py-1 text-sm w-full",children:[i.jsx("option",{value:"Achieved",children:"Achieved"}),i.jsx("option",{value:"Locked",children:"Locked"})]})]}),i.jsxs("div",{children:[i.jsx("label",{className:"text-sm",children:"PGP Requirement"}),i.jsx("input",{type:"number",value:c.crrRanks[b].requirements.pgp,onChange:w=>m(w,b,"requirements","pgp"),className:"bg-transparent border border-yellow-400 rounded px-2 py-1 text-sm w-full"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"text-sm",children:"TGP Requirement"}),i.jsx("input",{type:"number",value:c.crrRanks[b].requirements.tgp,onChange:w=>m(w,b,"requirements","tgp"),className:"bg-transparent border border-yellow-400 rounded px-2 py-1 text-sm w-full"})]})]})]},b)),i.jsxs("div",{className:"border border-yellow-400 p-4 rounded-lg",children:[i.jsx("h4",{className:"text-sm font-semibold",children:"General Configuration"}),i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{children:[i.jsx("label",{className:"text-sm",children:"Monthly Reset"}),i.jsx("input",{type:"checkbox",name:"monthlyReset",checked:c?.crrConfig.monthlyReset,onChange:b=>m(b,null,"crrConfig"),className:"ml-2"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"text-sm",children:"Reset Day"}),i.jsx("input",{type:"number",name:"resetDay",value:c?.crrConfig.resetDay,onChange:b=>m(b,null,"crrConfig"),className:"bg-transparent border border-yellow-400 rounded px-2 py-1 text-sm w-full"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"text-sm",children:"Point Value"}),i.jsx("input",{type:"number",name:"pointValue",value:c?.crrConfig.pointValue,onChange:b=>m(b,null,"crrConfig"),className:"bg-transparent border border-yellow-400 rounded px-2 py-1 text-sm w-full"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"text-sm",children:"Leaderboard Update Interval (ms)"}),i.jsx("input",{type:"number",name:"leaderboardUpdateInterval",value:c?.crrConfig.leaderboardUpdateInterval,onChange:b=>m(b,null,"crrConfig"),className:"bg-transparent border border-yellow-400 rounded px-2 py-1 text-sm w-full"})]})]})]}),i.jsxs("div",{className:"flex gap-4",children:[i.jsx("button",{type:"submit",className:"bg-yellow-400 text-black px-4 py-2 rounded hover:bg-yellow-500",children:"Save Changes"}),i.jsx("button",{type:"button",onClick:()=>p(!1),className:"bg-gray-600 text-white px-4 py-2 rounded hover:bg-gray-700",children:"Cancel"})]})]}):i.jsxs("div",{children:[i.jsx("button",{onClick:()=>p(!0),className:"bg-yellow-400 text-black px-4 py-2 rounded mb-4 hover:bg-yellow-500",children:"Edit Configuration"}),i.jsx("div",{className:"grid grid-cols-2 gap-4",children:r?.crrRanks&&Object.keys(r.crrRanks).map(b=>i.jsxs("div",{className:"border border-yellow-400 p-4 rounded-lg",children:[i.jsxs("h4",{className:"text-sm font-semibold",children:[r.crrRanks[b].name," ",r.crrRanks[b].icon]}),i.jsxs("p",{children:["Reward: ",r.crrRanks[b].reward," AED"]}),i.jsxs("p",{children:["Status: ",r.crrRanks[b].status]}),i.jsxs("p",{children:["PGP Requirement: ",r.crrRanks[b].requirements.pgp]}),i.jsxs("p",{children:["TGP Requirement: ",r.crrRanks[b].requirements.tgp]})]},b))}),i.jsxs("div",{className:"border border-yellow-400 p-4 rounded-lg mt-4",children:[i.jsx("h4",{className:"text-sm font-semibold",children:"General Configuration"}),i.jsxs("p",{children:["Monthly Reset: ",r?.crrConfig.monthlyReset?"Enabled":"Disabled"]}),i.jsxs("p",{children:["Reset Day: ",r?.crrConfig.resetDay]}),i.jsxs("p",{children:["Point Value: ",r?.crrConfig.pointValue]}),i.jsxs("p",{children:["Leaderboard Update Interval: ",r?.crrConfig.leaderboardUpdateInterval," ms"]}),i.jsxs("p",{children:["Last Updated:"," ",r?.lastUpdated?new Date(r.lastUpdated).toLocaleString("en-US",{timeZone:"Asia/Karachi"}):"N/A"]})]})]})]}),i.jsxs("div",{className:"rounded-lg",children:[i.jsx("h3",{className:"text-base font-semibold mb-4",children:"Top Earners"}),i.jsx("div",{className:"overflow-x-auto",children:i.jsxs("table",{className:"w-full border border-yellow-400 text-sm",children:[i.jsx("thead",{className:"border-b border-yellow-400 bg-[#013723]",children:i.jsxs("tr",{children:[i.jsx("th",{className:"px-3 py-2",children:"Position"}),i.jsx("th",{className:"px-3 py-2",children:"Name"}),i.jsx("th",{className:"px-3 py-2",children:"Username"}),i.jsx("th",{className:"px-3 py-2",children:"Rank"}),i.jsx("th",{className:"px-3 py-2",children:"Earnings"}),i.jsx("th",{className:"px-3 py-2",children:"PGP"}),i.jsx("th",{className:"px-3 py-2",children:"TGP"}),i.jsx("th",{className:"px-3 py-2",children:"Total Points"}),i.jsx("th",{className:"px-3 py-2",children:"Progress (PGP/TGP/Overall)"})]})}),i.jsx("tbody",{children:t?.topEarners.length>0?t.topEarners.map(b=>i.jsxs("tr",{className:"text-center hover:bg-[#014b38]",children:[i.jsx("td",{className:"px-3 py-2",children:b.position}),i.jsxs("td",{className:"px-3 py-2",children:[b.name," ",b.rankIcon]}),i.jsx("td",{className:"px-3 py-2",children:b.username}),i.jsx("td",{className:"px-3 py-2",children:b.rank}),i.jsxs("td",{className:"px-3 py-2",children:[b.earnings," AED"]}),i.jsx("td",{className:"px-3 py-2",children:b.qualificationPoints.pgp}),i.jsx("td",{className:"px-3 py-2",children:b.qualificationPoints.tgp}),i.jsx("td",{className:"px-3 py-2",children:b.qualificationPoints.total}),i.jsxs("td",{className:"px-3 py-2",children:[b.progress.pgp,"% / ",b.progress.tgp,"% /"," ",b.progress.overall,"%"]})]},b.position)):i.jsx("tr",{children:i.jsx("td",{colSpan:"9",className:"px-3 py-2 text-gray-400",children:"No top earners available."})})})]})})]}),i.jsxs("div",{className:"flex justify-between text-sm",children:[i.jsxs("p",{children:["Total Participants: ",t?.totalParticipants||0]}),i.jsxs("p",{children:["Last Updated:"," ",t?.lastUpdated?new Date(t.lastUpdated).toLocaleString("en-US",{timeZone:"Asia/Karachi"}):"N/A"]})]}),t?.tip&&i.jsx("div",{className:"p-4 bg-[#013723] rounded-lg text-center text-sm",children:i.jsx("p",{children:t.tip})}),i.jsxs("div",{className:"p-4 rounded-lg shadow-lg",children:[i.jsx("h3",{className:"text-base font-semibold mb-4",children:"Team Structure"}),i.jsx(HZ,{})]})]})},YZ=()=>{const[t,e]=O.useState(null),[r,n]=O.useState(null),[a,s]=O.useState(!0),[o,l]=O.useState(null);return O.useEffect(()=>{(async()=>{try{s(!0);const h=await(await fetch("https://aaaogo.xyz/api/mlm/regional/leaderboard")).json(),m=await(await fetch("https://aaaogo.xyz/api/mlm/regional/global-ambassadors?page=1&limit=20")).json();e(h.data),n(m.data)}catch(u){l("Failed to fetch data"),console.error(u)}finally{s(!1)}})()},[]),a?i.jsx("div",{className:"text-center py-10 text-yellow-400",children:"Loading..."}):o?i.jsx("div",{className:"text-center py-10 text-red-500",children:o}):i.jsxs("div",{className:"container mx-auto p-4 text-yellow-400",children:[i.jsxs("div",{className:"mb-8",children:[i.jsx("h2",{className:"text-2xl font-bold mb-4",children:"Pakistan Leaderboard"}),i.jsx("div",{className:"grid gap-4",children:t?.leaderboard?.map(c=>i.jsxs("div",{className:"flex items-center p-4 border border-yellow-400 rounded-lg hover:bg-[#014b38]",children:[i.jsx("span",{className:"w-12 text-lg font-bold",children:c.rank}),i.jsx("span",{className:"w-8 text-2xl",children:c.flag}),i.jsxs("div",{className:"flex-1",children:[i.jsx("p",{className:"font-semibold",children:c.name}),i.jsxs("p",{className:"text-yellow-400",children:["@",c.username]})]}),i.jsxs("div",{className:"text-right",children:[i.jsxs("p",{className:"text-yellow-400",children:["Points: ",c.totalPoints]}),i.jsxs("p",{className:"text-sm text-yellow-400",children:["Achieved: ",new Date(c.achievedAt).toLocaleDateString()]})]})]},c.username))})]}),i.jsxs("div",{children:[i.jsx("h2",{className:"text-2xl font-bold mb-4",children:"Global Ambassadors"}),i.jsx("div",{className:"grid gap-4",children:r?.ambassadors?.map(c=>i.jsxs("div",{className:"flex items-center p-4 border border-yellow-400 rounded-lg hover:bg-[#014b38]",children:[i.jsx("span",{className:"w-8 text-2xl",children:c.flag}),i.jsxs("div",{className:"flex-1",children:[i.jsx("p",{className:"font-semibold",children:c.name}),i.jsxs("p",{className:"text-yellow-400",children:["@",c.username]}),i.jsxs("p",{className:"text-sm text-yellow-400",children:["Country: ",c.country||"N/A"]})]}),i.jsxs("div",{className:"text-right",children:[i.jsxs("p",{className:"text-yellow-400",children:["Earnings: ",c.totalEarnings]}),i.jsxs("p",{className:"text-sm text-yellow-400",children:["Achieved: ",new Date(c.achievedAt).toLocaleDateString()]})]})]},c.id))}),i.jsxs("p",{className:"mt-4 text-yellow-400",children:["Total Ambassadors: ",r?.totalAmbassadors," | Total Countries: ",r?.totalCountries]})]})]})};/*!
* @kurkle/color v0.3.4
* https://github.com/kurkle/color#readme
* (c) 2024 Jukka Kurkela
* Released under the MIT License
*/function Kf(t){return t+.5|0}const oo=(t,e,r)=>Math.max(Math.min(t,r),e);function Sh(t){return oo(Kf(t*2.55),0,255)}function fo(t){return oo(Kf(t*255),0,255)}function si(t){return oo(Kf(t/2.55)/100,0,1)}function Y6(t){return oo(Kf(t*100),0,100)}const Aa={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},gj=[..."0123456789ABCDEF"],UZ=t=>gj[t&15],WZ=t=>gj[(t&240)>>4]+gj[t&15],Um=t=>(t&240)>>4===(t&15),XZ=t=>Um(t.r)&&Um(t.g)&&Um(t.b)&&Um(t.a);function VZ(t){var e=t.length,r;return t[0]==="#"&&(e===4||e===5?r={r:255&Aa[t[1]]*17,g:255&Aa[t[2]]*17,b:255&Aa[t[3]]*17,a:e===5?Aa[t[4]]*17:255}:(e===7||e===9)&&(r={r:Aa[t[1]]<<4|Aa[t[2]],g:Aa[t[3]]<<4|Aa[t[4]],b:Aa[t[5]]<<4|Aa[t[6]],a:e===9?Aa[t[7]]<<4|Aa[t[8]]:255})),r}const qZ=(t,e)=>t<255?e(t):"";function GZ(t){var e=XZ(t)?UZ:WZ;return t?"#"+e(t.r)+e(t.g)+e(t.b)+qZ(t.a,e):void 0}const KZ=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function yR(t,e,r){const n=e*Math.min(r,1-r),a=(s,o=(s+t/30)%12)=>r-n*Math.max(Math.min(o-3,9-o,1),-1);return[a(0),a(8),a(4)]}function ZZ(t,e,r){const n=(a,s=(a+t/60)%6)=>r-r*e*Math.max(Math.min(s,4-s,1),0);return[n(5),n(3),n(1)]}function QZ(t,e,r){const n=yR(t,1,.5);let a;for(e+r>1&&(a=1/(e+r),e*=a,r*=a),a=0;a<3;a++)n[a]*=1-e-r,n[a]+=e;return n}function JZ(t,e,r,n,a){return t===a?(e-r)/n+(e<r?6:0):e===a?(r-t)/n+2:(t-e)/n+4}function iN(t){const r=t.r/255,n=t.g/255,a=t.b/255,s=Math.max(r,n,a),o=Math.min(r,n,a),l=(s+o)/2;let c,u,h;return s!==o&&(h=s-o,u=l>.5?h/(2-s-o):h/(s+o),c=JZ(r,n,a,h,s),c=c*60+.5),[c|0,u||0,l]}function oN(t,e,r,n){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,r,n)).map(fo)}function lN(t,e,r){return oN(yR,t,e,r)}function eQ(t,e,r){return oN(QZ,t,e,r)}function tQ(t,e,r){return oN(ZZ,t,e,r)}function vR(t){return(t%360+360)%360}function rQ(t){const e=KZ.exec(t);let r=255,n;if(!e)return;e[5]!==n&&(r=e[6]?Sh(+e[5]):fo(+e[5]));const a=vR(+e[2]),s=+e[3]/100,o=+e[4]/100;return e[1]==="hwb"?n=eQ(a,s,o):e[1]==="hsv"?n=tQ(a,s,o):n=lN(a,s,o),{r:n[0],g:n[1],b:n[2],a:r}}function nQ(t,e){var r=iN(t);r[0]=vR(r[0]+e),r=lN(r),t.r=r[0],t.g=r[1],t.b=r[2]}function aQ(t){if(!t)return;const e=iN(t),r=e[0],n=Y6(e[1]),a=Y6(e[2]);return t.a<255?`hsla(${r}, ${n}%, ${a}%, ${si(t.a)})`:`hsl(${r}, ${n}%, ${a}%)`}const U6={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},W6={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function sQ(){const t={},e=Object.keys(W6),r=Object.keys(U6);let n,a,s,o,l;for(n=0;n<e.length;n++){for(o=l=e[n],a=0;a<r.length;a++)s=r[a],l=l.replace(s,U6[s]);s=parseInt(W6[o],16),t[l]=[s>>16&255,s>>8&255,s&255]}return t}let Wm;function iQ(t){Wm||(Wm=sQ(),Wm.transparent=[0,0,0,0]);const e=Wm[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const oQ=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function lQ(t){const e=oQ.exec(t);let r=255,n,a,s;if(e){if(e[7]!==n){const o=+e[7];r=e[8]?Sh(o):oo(o*255,0,255)}return n=+e[1],a=+e[3],s=+e[5],n=255&(e[2]?Sh(n):oo(n,0,255)),a=255&(e[4]?Sh(a):oo(a,0,255)),s=255&(e[6]?Sh(s):oo(s,0,255)),{r:n,g:a,b:s,a:r}}}function cQ(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${si(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const D1=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,Wc=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function dQ(t,e,r){const n=Wc(si(t.r)),a=Wc(si(t.g)),s=Wc(si(t.b));return{r:fo(D1(n+r*(Wc(si(e.r))-n))),g:fo(D1(a+r*(Wc(si(e.g))-a))),b:fo(D1(s+r*(Wc(si(e.b))-s))),a:t.a+r*(e.a-t.a)}}function Xm(t,e,r){if(t){let n=iN(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*r,e===0?360:1)),n=lN(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function wR(t,e){return t&&Object.assign(e||{},t)}function X6(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=fo(t[3]))):(e=wR(t,{r:0,g:0,b:0,a:1}),e.a=fo(e.a)),e}function uQ(t){return t.charAt(0)==="r"?lQ(t):rQ(t)}let jR=class xj{constructor(e){if(e instanceof xj)return e;const r=typeof e;let n;r==="object"?n=X6(e):r==="string"&&(n=VZ(e)||iQ(e)||uQ(e)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var e=wR(this._rgb);return e&&(e.a=si(e.a)),e}set rgb(e){this._rgb=X6(e)}rgbString(){return this._valid?cQ(this._rgb):void 0}hexString(){return this._valid?GZ(this._rgb):void 0}hslString(){return this._valid?aQ(this._rgb):void 0}mix(e,r){if(e){const n=this.rgb,a=e.rgb;let s;const o=r===s?.5:r,l=2*o-1,c=n.a-a.a,u=((l*c===-1?l:(l+c)/(1+l*c))+1)/2;s=1-u,n.r=255&u*n.r+s*a.r+.5,n.g=255&u*n.g+s*a.g+.5,n.b=255&u*n.b+s*a.b+.5,n.a=o*n.a+(1-o)*a.a,this.rgb=n}return this}interpolate(e,r){return e&&(this._rgb=dQ(this._rgb,e._rgb,r)),this}clone(){return new xj(this.rgb)}alpha(e){return this._rgb.a=fo(e),this}clearer(e){const r=this._rgb;return r.a*=1-e,this}greyscale(){const e=this._rgb,r=Kf(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=r,this}opaquer(e){const r=this._rgb;return r.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return Xm(this._rgb,2,e),this}darken(e){return Xm(this._rgb,2,-e),this}saturate(e){return Xm(this._rgb,1,e),this}desaturate(e){return Xm(this._rgb,1,-e),this}rotate(e){return nQ(this._rgb,e),this}};/*!
* Chart.js v4.5.0
* https://www.chartjs.org
* (c) 2025 Chart.js Contributors
* Released under the MIT License
*/function ei(){}const hQ=(()=>{let t=0;return()=>t++})();function dt(t){return t==null}function jr(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function ot(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function La(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function xs(t,e){return La(t)?t:e}function st(t,e){return typeof t>"u"?e:t}const fQ=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/e,NR=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function Rt(t,e,r){if(t&&typeof t.call=="function")return t.apply(r,e)}function vt(t,e,r,n){let a,s,o;if(jr(t))for(s=t.length,a=0;a<s;a++)e.call(r,t[a],a);else if(ot(t))for(o=Object.keys(t),s=o.length,a=0;a<s;a++)e.call(r,t[o[a]],o[a])}function bx(t,e){let r,n,a,s;if(!t||!e||t.length!==e.length)return!1;for(r=0,n=t.length;r<n;++r)if(a=t[r],s=e[r],a.datasetIndex!==s.datasetIndex||a.index!==s.index)return!1;return!0}function yx(t){if(jr(t))return t.map(yx);if(ot(t)){const e=Object.create(null),r=Object.keys(t),n=r.length;let a=0;for(;a<n;++a)e[r[a]]=yx(t[r[a]]);return e}return t}function SR(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}function pQ(t,e,r,n){if(!SR(t))return;const a=e[t],s=r[t];ot(a)&&ot(s)?Ms(a,s,n):e[t]=yx(s)}function Ms(t,e,r){const n=jr(e)?e:[e],a=n.length;if(!ot(t))return t;r=r||{};const s=r.merger||pQ;let o;for(let l=0;l<a;++l){if(o=n[l],!ot(o))continue;const c=Object.keys(o);for(let u=0,h=c.length;u<h;++u)s(c[u],t,o,r)}return t}function Yh(t,e){return Ms(t,e,{merger:mQ})}function mQ(t,e,r){if(!SR(t))return;const n=e[t],a=r[t];ot(n)&&ot(a)?Yh(n,a):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=yx(a))}const V6={"":t=>t,x:t=>t.x,y:t=>t.y};function gQ(t){const e=t.split("."),r=[];let n="";for(const a of e)n+=a,n.endsWith("\\")?n=n.slice(0,-1)+".":(r.push(n),n="");return r}function xQ(t){const e=gQ(t);return r=>{for(const n of e){if(n==="")break;r=r&&r[n]}return r}}function Yl(t,e){return(V6[e]||(V6[e]=xQ(e)))(t)}function cN(t){return t.charAt(0).toUpperCase()+t.slice(1)}const pf=t=>typeof t<"u",jo=t=>typeof t=="function",q6=(t,e)=>{if(t.size!==e.size)return!1;for(const r of t)if(!e.has(r))return!1;return!0};function bQ(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const Yt=Math.PI,mr=2*Yt,vx=Number.POSITIVE_INFINITY,yQ=Yt/180,Sr=Yt/2,il=Yt/4,G6=Yt*2/3,AR=Math.log10,po=Math.sign;function $g(t,e,r){return Math.abs(t-e)<r}function K6(t){const e=Math.round(t);t=$g(t,e,t/1e3)?e:t;const r=Math.pow(10,Math.floor(AR(t))),n=t/r;return(n<=1?1:n<=2?2:n<=5?5:10)*r}function vQ(t){const e=[],r=Math.sqrt(t);let n;for(n=1;n<r;n++)t%n===0&&(e.push(n),e.push(t/n));return r===(r|0)&&e.push(r),e.sort((a,s)=>a-s).pop(),e}function wQ(t){return typeof t=="symbol"||typeof t=="object"&&t!==null&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}function wx(t){return!wQ(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function jQ(t,e){const r=Math.round(t);return r-e<=t&&r+e>=t}function NQ(t,e,r){let n,a,s;for(n=0,a=t.length;n<a;n++)s=t[n][r],isNaN(s)||(e.min=Math.min(e.min,s),e.max=Math.max(e.max,s))}function ci(t){return t*(Yt/180)}function SQ(t){return t*(180/Yt)}function Z6(t){if(!La(t))return;let e=1,r=0;for(;Math.round(t*e)/e!==t;)e*=10,r++;return r}function CR(t,e){const r=e.x-t.x,n=e.y-t.y,a=Math.sqrt(r*r+n*n);let s=Math.atan2(n,r);return s<-.5*Yt&&(s+=mr),{angle:s,distance:a}}function AQ(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function ws(t){return(t%mr+mr)%mr}function jx(t,e,r,n){const a=ws(t),s=ws(e),o=ws(r),l=ws(s-a),c=ws(o-a),u=ws(a-s),h=ws(a-o);return a===s||a===o||n&&s===o||l>c&&u<h}function On(t,e,r){return Math.max(e,Math.min(r,t))}function CQ(t){return On(t,-32768,32767)}function vl(t,e,r,n=1e-6){return t>=Math.min(e,r)-n&&t<=Math.max(e,r)+n}function dN(t,e,r){r=r||(o=>t[o]<e);let n=t.length-1,a=0,s;for(;n-a>1;)s=a+n>>1,r(s)?a=s:n=s;return{lo:a,hi:n}}const bj=(t,e,r,n)=>dN(t,r,n?a=>{const s=t[a][e];return s<r||s===r&&t[a+1][e]===r}:a=>t[a][e]<r),kQ=(t,e,r)=>dN(t,r,n=>t[n][e]>=r);function DQ(t,e,r){let n=0,a=t.length;for(;n<a&&t[n]<e;)n++;for(;a>n&&t[a-1]>r;)a--;return n>0||a<t.length?t.slice(n,a):t}const kR=["push","pop","shift","splice","unshift"];function TQ(t,e){if(t._chartjs){t._chartjs.listeners.push(e);return}Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),kR.forEach(r=>{const n="_onData"+cN(r),a=t[r];Object.defineProperty(t,r,{configurable:!0,enumerable:!1,value(...s){const o=a.apply(this,s);return t._chartjs.listeners.forEach(l=>{typeof l[n]=="function"&&l[n](...s)}),o}})})}function Q6(t,e){const r=t._chartjs;if(!r)return;const n=r.listeners,a=n.indexOf(e);a!==-1&&n.splice(a,1),!(n.length>0)&&(kR.forEach(s=>{delete t[s]}),delete t._chartjs)}function DR(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const TR=function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame}();function MR(t,e){let r=[],n=!1;return function(...a){r=a,n||(n=!0,TR.call(window,()=>{n=!1,t.apply(e,r)}))}}function MQ(t,e){let r;return function(...n){return e?(clearTimeout(r),r=setTimeout(t,e,n)):t.apply(this,n),e}}const ER=t=>t==="start"?"left":t==="end"?"right":"center",Kn=(t,e,r)=>t==="start"?e:t==="end"?r:(e+r)/2,EQ=(t,e,r,n)=>t===(n?"left":"right")?r:t==="center"?(e+r)/2:e,Vm=t=>t===0||t===1,J6=(t,e,r)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*mr/r)),eD=(t,e,r)=>Math.pow(2,-10*t)*Math.sin((t-e)*mr/r)+1,Uh={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*Sr)+1,easeOutSine:t=>Math.sin(t*Sr),easeInOutSine:t=>-.5*(Math.cos(Yt*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>Vm(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>Vm(t)?t:J6(t,.075,.3),easeOutElastic:t=>Vm(t)?t:eD(t,.075,.3),easeInOutElastic(t){return Vm(t)?t:t<.5?.5*J6(t*2,.1125,.45):.5+.5*eD(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return(t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-Uh.easeOutBounce(1-t),easeOutBounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:t=>t<.5?Uh.easeInBounce(t*2)*.5:Uh.easeOutBounce(t*2-1)*.5+.5};function OR(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function tD(t){return OR(t)?t:new jR(t)}function T1(t){return OR(t)?t:new jR(t).saturate(.5).darken(.1).hexString()}const OQ=["x","y","borderWidth","radius","tension"],PQ=["color","borderColor","backgroundColor"];function _Q(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),t.set("animations",{colors:{type:"color",properties:PQ},numbers:{type:"number",properties:OQ}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>e|0}}}})}function RQ(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const rD=new Map;function LQ(t,e){e=e||{};const r=t+JSON.stringify(e);let n=rD.get(r);return n||(n=new Intl.NumberFormat(t,e),rD.set(r,n)),n}function uN(t,e,r){return LQ(e,r).format(t)}const zQ={values(t){return jr(t)?t:""+t},numeric(t,e,r){if(t===0)return"0";const n=this.chart.options.locale;let a,s=t;if(r.length>1){const u=Math.max(Math.abs(r[0].value),Math.abs(r[r.length-1].value));(u<1e-4||u>1e15)&&(a="scientific"),s=IQ(t,r)}const o=AR(Math.abs(s)),l=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),c={notation:a,minimumFractionDigits:l,maximumFractionDigits:l};return Object.assign(c,this.options.ticks.format),uN(t,n,c)}};function IQ(t,e){let r=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(r)>=1&&t!==Math.floor(t)&&(r=t-Math.floor(t)),r}var PR={formatters:zQ};function BQ(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,r)=>r.lineWidth,tickColor:(e,r)=>r.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:PR.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const Ul=Object.create(null),yj=Object.create(null);function Wh(t,e){if(!e)return t;const r=e.split(".");for(let n=0,a=r.length;n<a;++n){const s=r[n];t=t[s]||(t[s]=Object.create(null))}return t}function M1(t,e,r){return typeof e=="string"?Ms(Wh(t,e),r):Ms(Wh(t,""),e)}class FQ{constructor(e,r){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=n=>n.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(n,a)=>T1(a.backgroundColor),this.hoverBorderColor=(n,a)=>T1(a.borderColor),this.hoverColor=(n,a)=>T1(a.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(r)}set(e,r){return M1(this,e,r)}get(e){return Wh(this,e)}describe(e,r){return M1(yj,e,r)}override(e,r){return M1(Ul,e,r)}route(e,r,n,a){const s=Wh(this,e),o=Wh(this,n),l="_"+r;Object.defineProperties(s,{[l]:{value:s[r],writable:!0},[r]:{enumerable:!0,get(){const c=this[l],u=o[a];return ot(c)?Object.assign({},u,c):st(c,u)},set(c){this[l]=c}}})}apply(e){e.forEach(r=>r(this))}}var sr=new FQ({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[_Q,RQ,BQ]);function HQ(t){return!t||dt(t.size)||dt(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function nD(t,e,r,n,a){let s=e[a];return s||(s=e[a]=t.measureText(a).width,r.push(a)),s>n&&(n=s),n}function ol(t,e,r){const n=t.currentDevicePixelRatio,a=r!==0?Math.max(r/2,.5):0;return Math.round((e-a)*n)/n+a}function aD(t,e){!e&&!t||(e=e||t.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function vj(t,e,r,n){_R(t,e,r,n,null)}function _R(t,e,r,n,a){let s,o,l,c,u,h,p,m;const x=e.pointStyle,y=e.rotation,b=e.radius;let w=(y||0)*yQ;if(x&&typeof x=="object"&&(s=x.toString(),s==="[object HTMLImageElement]"||s==="[object HTMLCanvasElement]")){t.save(),t.translate(r,n),t.rotate(w),t.drawImage(x,-x.width/2,-x.height/2,x.width,x.height),t.restore();return}if(!(isNaN(b)||b<=0)){switch(t.beginPath(),x){default:a?t.ellipse(r,n,a/2,b,0,0,mr):t.arc(r,n,b,0,mr),t.closePath();break;case"triangle":h=a?a/2:b,t.moveTo(r+Math.sin(w)*h,n-Math.cos(w)*b),w+=G6,t.lineTo(r+Math.sin(w)*h,n-Math.cos(w)*b),w+=G6,t.lineTo(r+Math.sin(w)*h,n-Math.cos(w)*b),t.closePath();break;case"rectRounded":u=b*.516,c=b-u,o=Math.cos(w+il)*c,p=Math.cos(w+il)*(a?a/2-u:c),l=Math.sin(w+il)*c,m=Math.sin(w+il)*(a?a/2-u:c),t.arc(r-p,n-l,u,w-Yt,w-Sr),t.arc(r+m,n-o,u,w-Sr,w),t.arc(r+p,n+l,u,w,w+Sr),t.arc(r-m,n+o,u,w+Sr,w+Yt),t.closePath();break;case"rect":if(!y){c=Math.SQRT1_2*b,h=a?a/2:c,t.rect(r-h,n-c,2*h,2*c);break}w+=il;case"rectRot":p=Math.cos(w)*(a?a/2:b),o=Math.cos(w)*b,l=Math.sin(w)*b,m=Math.sin(w)*(a?a/2:b),t.moveTo(r-p,n-l),t.lineTo(r+m,n-o),t.lineTo(r+p,n+l),t.lineTo(r-m,n+o),t.closePath();break;case"crossRot":w+=il;case"cross":p=Math.cos(w)*(a?a/2:b),o=Math.cos(w)*b,l=Math.sin(w)*b,m=Math.sin(w)*(a?a/2:b),t.moveTo(r-p,n-l),t.lineTo(r+p,n+l),t.moveTo(r+m,n-o),t.lineTo(r-m,n+o);break;case"star":p=Math.cos(w)*(a?a/2:b),o=Math.cos(w)*b,l=Math.sin(w)*b,m=Math.sin(w)*(a?a/2:b),t.moveTo(r-p,n-l),t.lineTo(r+p,n+l),t.moveTo(r+m,n-o),t.lineTo(r-m,n+o),w+=il,p=Math.cos(w)*(a?a/2:b),o=Math.cos(w)*b,l=Math.sin(w)*b,m=Math.sin(w)*(a?a/2:b),t.moveTo(r-p,n-l),t.lineTo(r+p,n+l),t.moveTo(r+m,n-o),t.lineTo(r-m,n+o);break;case"line":o=a?a/2:Math.cos(w)*b,l=Math.sin(w)*b,t.moveTo(r-o,n-l),t.lineTo(r+o,n+l);break;case"dash":t.moveTo(r,n),t.lineTo(r+Math.cos(w)*(a?a/2:b),n+Math.sin(w)*b);break;case!1:t.closePath();break}t.fill(),e.borderWidth>0&&t.stroke()}}function hN(t,e,r){return r=r||.5,!e||t&&t.x>e.left-r&&t.x<e.right+r&&t.y>e.top-r&&t.y<e.bottom+r}function fN(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function pN(t){t.restore()}function $Q(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),dt(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}function YQ(t,e,r,n,a){if(a.strikethrough||a.underline){const s=t.measureText(n),o=e-s.actualBoundingBoxLeft,l=e+s.actualBoundingBoxRight,c=r-s.actualBoundingBoxAscent,u=r+s.actualBoundingBoxDescent,h=a.strikethrough?(c+u)/2:u;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=a.decorationWidth||2,t.moveTo(o,h),t.lineTo(l,h),t.stroke()}}function UQ(t,e){const r=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=r}function Nx(t,e,r,n,a,s={}){const o=jr(e)?e:[e],l=s.strokeWidth>0&&s.strokeColor!=="";let c,u;for(t.save(),t.font=a.string,$Q(t,s),c=0;c<o.length;++c)u=o[c],s.backdrop&&UQ(t,s.backdrop),l&&(s.strokeColor&&(t.strokeStyle=s.strokeColor),dt(s.strokeWidth)||(t.lineWidth=s.strokeWidth),t.strokeText(u,r,n,s.maxWidth)),t.fillText(u,r,n,s.maxWidth),YQ(t,r,n,u,s),n+=Number(a.lineHeight);t.restore()}function Sx(t,e){const{x:r,y:n,w:a,h:s,radius:o}=e;t.arc(r+o.topLeft,n+o.topLeft,o.topLeft,1.5*Yt,Yt,!0),t.lineTo(r,n+s-o.bottomLeft),t.arc(r+o.bottomLeft,n+s-o.bottomLeft,o.bottomLeft,Yt,Sr,!0),t.lineTo(r+a-o.bottomRight,n+s),t.arc(r+a-o.bottomRight,n+s-o.bottomRight,o.bottomRight,Sr,0,!0),t.lineTo(r+a,n+o.topRight),t.arc(r+a-o.topRight,n+o.topRight,o.topRight,0,-Sr,!0),t.lineTo(r+o.topLeft,n)}const WQ=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,XQ=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function VQ(t,e){const r=(""+t).match(WQ);if(!r||r[1]==="normal")return e*1.2;switch(t=+r[2],r[3]){case"px":return t;case"%":t/=100;break}return e*t}const qQ=t=>+t||0;function mN(t,e){const r={},n=ot(e),a=n?Object.keys(e):e,s=ot(t)?n?o=>st(t[o],t[e[o]]):o=>t[o]:()=>t;for(const o of a)r[o]=qQ(s(o));return r}function RR(t){return mN(t,{top:"y",right:"x",bottom:"y",left:"x"})}function od(t){return mN(t,["topLeft","topRight","bottomLeft","bottomRight"])}function za(t){const e=RR(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function mn(t,e){t=t||{},e=e||sr.font;let r=st(t.size,e.size);typeof r=="string"&&(r=parseInt(r,10));let n=st(t.style,e.style);n&&!(""+n).match(XQ)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);const a={family:st(t.family,e.family),lineHeight:VQ(st(t.lineHeight,e.lineHeight),r),size:r,style:n,weight:st(t.weight,e.weight),string:""};return a.string=HQ(a),a}function Vt(t,e,r,n){let a,s,o;for(a=0,s=t.length;a<s;++a)if(o=t[a],o!==void 0&&(e!==void 0&&typeof o=="function"&&(o=o(e)),r!==void 0&&jr(o)&&(o=o[r%o.length]),o!==void 0))return o}function GQ(t,e,r){const{min:n,max:a}=t,s=NR(e,(a-n)/2),o=(l,c)=>r&&l===0?0:l+c;return{min:o(n,-Math.abs(s)),max:o(a,s)}}function Hd(t,e){return Object.assign(Object.create(t),e)}function gN(t,e=[""],r,n,a=()=>t[0]){const s=r||t;typeof n>"u"&&(n=BR("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:s,_fallback:n,_getTarget:a,override:l=>gN([l,...t],e,s,n)};return new Proxy(o,{deleteProperty(l,c){return delete l[c],delete l._keys,delete t[0][c],!0},get(l,c){return zR(l,c,()=>nJ(c,e,t,l))},getOwnPropertyDescriptor(l,c){return Reflect.getOwnPropertyDescriptor(l._scopes[0],c)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(l,c){return iD(l).includes(c)},ownKeys(l){return iD(l)},set(l,c,u){const h=l._storage||(l._storage=a());return l[c]=h[c]=u,delete l._keys,!0}})}function bd(t,e,r,n){const a={_cacheable:!1,_proxy:t,_context:e,_subProxy:r,_stack:new Set,_descriptors:LR(t,n),setContext:s=>bd(t,s,r,n),override:s=>bd(t.override(s),e,r,n)};return new Proxy(a,{deleteProperty(s,o){return delete s[o],delete t[o],!0},get(s,o,l){return zR(s,o,()=>ZQ(s,o,l))},getOwnPropertyDescriptor(s,o){return s._descriptors.allKeys?Reflect.has(t,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,o)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(s,o){return Reflect.has(t,o)},ownKeys(){return Reflect.ownKeys(t)},set(s,o,l){return t[o]=l,delete s[o],!0}})}function LR(t,e={scriptable:!0,indexable:!0}){const{_scriptable:r=e.scriptable,_indexable:n=e.indexable,_allKeys:a=e.allKeys}=t;return{allKeys:a,scriptable:r,indexable:n,isScriptable:jo(r)?r:()=>r,isIndexable:jo(n)?n:()=>n}}const KQ=(t,e)=>t?t+cN(e):e,xN=(t,e)=>ot(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function zR(t,e,r){if(Object.prototype.hasOwnProperty.call(t,e)||e==="constructor")return t[e];const n=r();return t[e]=n,n}function ZQ(t,e,r){const{_proxy:n,_context:a,_subProxy:s,_descriptors:o}=t;let l=n[e];return jo(l)&&o.isScriptable(e)&&(l=QQ(e,l,t,r)),jr(l)&&l.length&&(l=JQ(e,l,t,o.isIndexable)),xN(e,l)&&(l=bd(l,a,s&&s[e],o)),l}function QQ(t,e,r,n){const{_proxy:a,_context:s,_subProxy:o,_stack:l}=r;if(l.has(t))throw new Error("Recursion detected: "+Array.from(l).join("->")+"->"+t);l.add(t);let c=e(s,o||n);return l.delete(t),xN(t,c)&&(c=bN(a._scopes,a,t,c)),c}function JQ(t,e,r,n){const{_proxy:a,_context:s,_subProxy:o,_descriptors:l}=r;if(typeof s.index<"u"&&n(t))return e[s.index%e.length];if(ot(e[0])){const c=e,u=a._scopes.filter(h=>h!==c);e=[];for(const h of c){const p=bN(u,a,t,h);e.push(bd(p,s,o&&o[t],l))}}return e}function IR(t,e,r){return jo(t)?t(e,r):t}const eJ=(t,e)=>t===!0?e:typeof t=="string"?Yl(e,t):void 0;function tJ(t,e,r,n,a){for(const s of e){const o=eJ(r,s);if(o){t.add(o);const l=IR(o._fallback,r,a);if(typeof l<"u"&&l!==r&&l!==n)return l}else if(o===!1&&typeof n<"u"&&r!==n)return null}return!1}function bN(t,e,r,n){const a=e._rootScopes,s=IR(e._fallback,r,n),o=[...t,...a],l=new Set;l.add(n);let c=sD(l,o,r,s||r,n);return c===null||typeof s<"u"&&s!==r&&(c=sD(l,o,s,c,n),c===null)?!1:gN(Array.from(l),[""],a,s,()=>rJ(e,r,n))}function sD(t,e,r,n,a){for(;r;)r=tJ(t,e,r,n,a);return r}function rJ(t,e,r){const n=t._getTarget();e in n||(n[e]={});const a=n[e];return jr(a)&&ot(r)?r:a||{}}function nJ(t,e,r,n){let a;for(const s of e)if(a=BR(KQ(s,t),r),typeof a<"u")return xN(t,a)?bN(r,n,t,a):a}function BR(t,e){for(const r of e){if(!r)continue;const n=r[t];if(typeof n<"u")return n}}function iD(t){let e=t._keys;return e||(e=t._keys=aJ(t._scopes)),e}function aJ(t){const e=new Set;for(const r of t)for(const n of Object.keys(r).filter(a=>!a.startsWith("_")))e.add(n);return Array.from(e)}function yN(){return typeof window<"u"&&typeof document<"u"}function vN(t){let e=t.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function Ax(t,e,r){let n;return typeof t=="string"?(n=parseInt(t,10),t.indexOf("%")!==-1&&(n=n/100*e.parentNode[r])):n=t,n}const P0=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function sJ(t,e){return P0(t).getPropertyValue(e)}const iJ=["top","right","bottom","left"];function Ol(t,e,r){const n={};r=r?"-"+r:"";for(let a=0;a<4;a++){const s=iJ[a];n[s]=parseFloat(t[e+"-"+s+r])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}const oJ=(t,e,r)=>(t>0||e>0)&&(!r||!r.shadowRoot);function lJ(t,e){const r=t.touches,n=r&&r.length?r[0]:t,{offsetX:a,offsetY:s}=n;let o=!1,l,c;if(oJ(a,s,t.target))l=a,c=s;else{const u=e.getBoundingClientRect();l=n.clientX-u.left,c=n.clientY-u.top,o=!0}return{x:l,y:c,box:o}}function hl(t,e){if("native"in t)return t;const{canvas:r,currentDevicePixelRatio:n}=e,a=P0(r),s=a.boxSizing==="border-box",o=Ol(a,"padding"),l=Ol(a,"border","width"),{x:c,y:u,box:h}=lJ(t,r),p=o.left+(h&&l.left),m=o.top+(h&&l.top);let{width:x,height:y}=e;return s&&(x-=o.width+l.width,y-=o.height+l.height),{x:Math.round((c-p)/x*r.width/n),y:Math.round((u-m)/y*r.height/n)}}function cJ(t,e,r){let n,a;if(e===void 0||r===void 0){const s=t&&vN(t);if(!s)e=t.clientWidth,r=t.clientHeight;else{const o=s.getBoundingClientRect(),l=P0(s),c=Ol(l,"border","width"),u=Ol(l,"padding");e=o.width-u.width-c.width,r=o.height-u.height-c.height,n=Ax(l.maxWidth,s,"clientWidth"),a=Ax(l.maxHeight,s,"clientHeight")}}return{width:e,height:r,maxWidth:n||vx,maxHeight:a||vx}}const qm=t=>Math.round(t*10)/10;function dJ(t,e,r,n){const a=P0(t),s=Ol(a,"margin"),o=Ax(a.maxWidth,t,"clientWidth")||vx,l=Ax(a.maxHeight,t,"clientHeight")||vx,c=cJ(t,e,r);let{width:u,height:h}=c;if(a.boxSizing==="content-box"){const m=Ol(a,"border","width"),x=Ol(a,"padding");u-=x.width+m.width,h-=x.height+m.height}return u=Math.max(0,u-s.width),h=Math.max(0,n?u/n:h-s.height),u=qm(Math.min(u,o,c.maxWidth)),h=qm(Math.min(h,l,c.maxHeight)),u&&!h&&(h=qm(u/2)),(e!==void 0||r!==void 0)&&n&&c.height&&h>c.height&&(h=c.height,u=qm(Math.floor(h*n))),{width:u,height:h}}function oD(t,e,r){const n=e||1,a=Math.floor(t.height*n),s=Math.floor(t.width*n);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const o=t.canvas;return o.style&&(r||!o.style.height&&!o.style.width)&&(o.style.height=`${t.height}px`,o.style.width=`${t.width}px`),t.currentDevicePixelRatio!==n||o.height!==a||o.width!==s?(t.currentDevicePixelRatio=n,o.height=a,o.width=s,t.ctx.setTransform(n,0,0,n,0,0),!0):!1}const uJ=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};yN()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return t}();function lD(t,e){const r=sJ(t,e),n=r&&r.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}const hJ=function(t,e){return{x(r){return t+t+e-r},setWidth(r){e=r},textAlign(r){return r==="center"?r:r==="right"?"left":"right"},xPlus(r,n){return r-n},leftForLtr(r,n){return r-n}}},fJ=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function ld(t,e,r){return t?hJ(e,r):fJ()}function FR(t,e){let r,n;(e==="ltr"||e==="rtl")&&(r=t.canvas.style,n=[r.getPropertyValue("direction"),r.getPropertyPriority("direction")],r.setProperty("direction",e,"important"),t.prevTextDirection=n)}function HR(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function Gm(t,e,r){return t.options.clip?t[r]:e[r]}function pJ(t,e){const{xScale:r,yScale:n}=t;return r&&n?{left:Gm(r,e,"left"),right:Gm(r,e,"right"),top:Gm(n,e,"top"),bottom:Gm(n,e,"bottom")}:e}function mJ(t,e){const r=e._clip;if(r.disabled)return!1;const n=pJ(e,t.chartArea);return{left:r.left===!1?0:n.left-(r.left===!0?0:r.left),right:r.right===!1?t.width:n.right+(r.right===!0?0:r.right),top:r.top===!1?0:n.top-(r.top===!0?0:r.top),bottom:r.bottom===!1?t.height:n.bottom+(r.bottom===!0?0:r.bottom)}}/*!
* Chart.js v4.5.0
* https://www.chartjs.org
* (c) 2025 Chart.js Contributors
* Released under the MIT License
*/class gJ{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,r,n,a){const s=r.listeners[a],o=r.duration;s.forEach(l=>l({chart:e,initial:r.initial,numSteps:o,currentStep:Math.min(n-r.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=TR.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let r=0;this._charts.forEach((n,a)=>{if(!n.running||!n.items.length)return;const s=n.items;let o=s.length-1,l=!1,c;for(;o>=0;--o)c=s[o],c._active?(c._total>n.duration&&(n.duration=c._total),c.tick(e),l=!0):(s[o]=s[s.length-1],s.pop());l&&(a.draw(),this._notify(a,n,e,"progress")),s.length||(n.running=!1,this._notify(a,n,e,"complete"),n.initial=!1),r+=s.length}),this._lastDate=e,r===0&&(this._running=!1)}_getAnims(e){const r=this._charts;let n=r.get(e);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},r.set(e,n)),n}listen(e,r,n){this._getAnims(e).listeners[r].push(n)}add(e,r){!r||!r.length||this._getAnims(e).items.push(...r)}has(e){return this._getAnims(e).items.length>0}start(e){const r=this._charts.get(e);r&&(r.running=!0,r.start=Date.now(),r.duration=r.items.reduce((n,a)=>Math.max(n,a._duration),0),this._refresh())}running(e){if(!this._running)return!1;const r=this._charts.get(e);return!(!r||!r.running||!r.items.length)}stop(e){const r=this._charts.get(e);if(!r||!r.items.length)return;const n=r.items;let a=n.length-1;for(;a>=0;--a)n[a].cancel();r.items=[],this._notify(e,r,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var ni=new gJ;const cD="transparent",xJ={boolean(t,e,r){return r>.5?e:t},color(t,e,r){const n=tD(t||cD),a=n.valid&&tD(e||cD);return a&&a.valid?a.mix(n,r).hexString():e},number(t,e,r){return t+(e-t)*r}};class bJ{constructor(e,r,n,a){const s=r[n];a=Vt([e.to,a,s,e.from]);const o=Vt([e.from,s,a]);this._active=!0,this._fn=e.fn||xJ[e.type||typeof o],this._easing=Uh[e.easing]||Uh.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=r,this._prop=n,this._from=o,this._to=a,this._promises=void 0}active(){return this._active}update(e,r,n){if(this._active){this._notify(!1);const a=this._target[this._prop],s=n-this._start,o=this._duration-s;this._start=n,this._duration=Math.floor(Math.max(o,e.duration)),this._total+=s,this._loop=!!e.loop,this._to=Vt([e.to,r,a,e.from]),this._from=Vt([e.from,a,r])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const r=e-this._start,n=this._duration,a=this._prop,s=this._from,o=this._loop,l=this._to;let c;if(this._active=s!==l&&(o||r<n),!this._active){this._target[a]=l,this._notify(!0);return}if(r<0){this._target[a]=s;return}c=r/n%2,c=o&&c>1?2-c:c,c=this._easing(Math.min(1,Math.max(0,c))),this._target[a]=this._fn(s,l,c)}wait(){const e=this._promises||(this._promises=[]);return new Promise((r,n)=>{e.push({res:r,rej:n})})}_notify(e){const r=e?"res":"rej",n=this._promises||[];for(let a=0;a<n.length;a++)n[a][r]()}}class $R{constructor(e,r){this._chart=e,this._properties=new Map,this.configure(r)}configure(e){if(!ot(e))return;const r=Object.keys(sr.animation),n=this._properties;Object.getOwnPropertyNames(e).forEach(a=>{const s=e[a];if(!ot(s))return;const o={};for(const l of r)o[l]=s[l];(jr(s.properties)&&s.properties||[a]).forEach(l=>{(l===a||!n.has(l))&&n.set(l,o)})})}_animateOptions(e,r){const n=r.options,a=vJ(e,n);if(!a)return[];const s=this._createAnimations(a,n);return n.$shared&&yJ(e.options.$animations,n).then(()=>{e.options=n},()=>{}),s}_createAnimations(e,r){const n=this._properties,a=[],s=e.$animations||(e.$animations={}),o=Object.keys(r),l=Date.now();let c;for(c=o.length-1;c>=0;--c){const u=o[c];if(u.charAt(0)==="$")continue;if(u==="options"){a.push(...this._animateOptions(e,r));continue}const h=r[u];let p=s[u];const m=n.get(u);if(p)if(m&&p.active()){p.update(m,h,l);continue}else p.cancel();if(!m||!m.duration){e[u]=h;continue}s[u]=p=new bJ(m,e,u,h),a.push(p)}return a}update(e,r){if(this._properties.size===0){Object.assign(e,r);return}const n=this._createAnimations(e,r);if(n.length)return ni.add(this._chart,n),!0}}function yJ(t,e){const r=[],n=Object.keys(e);for(let a=0;a<n.length;a++){const s=t[n[a]];s&&s.active()&&r.push(s.wait())}return Promise.all(r)}function vJ(t,e){if(!e)return;let r=t.options;if(!r){t.options=e;return}return r.$shared&&(t.options=r=Object.assign({},r,{$shared:!1,$animations:{}})),r}function dD(t,e){const r=t&&t.options||{},n=r.reverse,a=r.min===void 0?e:0,s=r.max===void 0?e:0;return{start:n?s:a,end:n?a:s}}function wJ(t,e,r){if(r===!1)return!1;const n=dD(t,r),a=dD(e,r);return{top:a.end,right:n.end,bottom:a.start,left:n.start}}function jJ(t){let e,r,n,a;return ot(t)?(e=t.top,r=t.right,n=t.bottom,a=t.left):e=r=n=a=t,{top:e,right:r,bottom:n,left:a,disabled:t===!1}}function YR(t,e){const r=[],n=t._getSortedDatasetMetas(e);let a,s;for(a=0,s=n.length;a<s;++a)r.push(n[a].index);return r}function uD(t,e,r,n={}){const a=t.keys,s=n.mode==="single";let o,l,c,u;if(e===null)return;let h=!1;for(o=0,l=a.length;o<l;++o){if(c=+a[o],c===r){if(h=!0,n.all)continue;break}u=t.values[c],La(u)&&(s||e===0||po(e)===po(u))&&(e+=u)}return!h&&!n.all?0:e}function NJ(t,e){const{iScale:r,vScale:n}=e,a=r.axis==="x"?"x":"y",s=n.axis==="x"?"x":"y",o=Object.keys(t),l=new Array(o.length);let c,u,h;for(c=0,u=o.length;c<u;++c)h=o[c],l[c]={[a]:h,[s]:t[h]};return l}function E1(t,e){const r=t&&t.options.stacked;return r||r===void 0&&e.stack!==void 0}function SJ(t,e,r){return`${t.id}.${e.id}.${r.stack||r.type}`}function AJ(t){const{min:e,max:r,minDefined:n,maxDefined:a}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:a?r:Number.POSITIVE_INFINITY}}function CJ(t,e,r){const n=t[e]||(t[e]={});return n[r]||(n[r]={})}function hD(t,e,r,n){for(const a of e.getMatchingVisibleMetas(n).reverse()){const s=t[a.index];if(r&&s>0||!r&&s<0)return a.index}return null}function fD(t,e){const{chart:r,_cachedMeta:n}=t,a=r._stacks||(r._stacks={}),{iScale:s,vScale:o,index:l}=n,c=s.axis,u=o.axis,h=SJ(s,o,n),p=e.length;let m;for(let x=0;x<p;++x){const y=e[x],{[c]:b,[u]:w}=y,N=y._stacks||(y._stacks={});m=N[u]=CJ(a,h,b),m[l]=w,m._top=hD(m,o,!0,n.type),m._bottom=hD(m,o,!1,n.type);const A=m._visualValues||(m._visualValues={});A[l]=w}}function O1(t,e){const r=t.scales;return Object.keys(r).filter(n=>r[n].axis===e).shift()}function kJ(t,e){return Hd(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function DJ(t,e,r){return Hd(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:r,index:e,mode:"default",type:"data"})}function sh(t,e){const r=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;for(const a of e){const s=a._stacks;if(!s||s[n]===void 0||s[n][r]===void 0)return;delete s[n][r],s[n]._visualValues!==void 0&&s[n]._visualValues[r]!==void 0&&delete s[n]._visualValues[r]}}}const P1=t=>t==="reset"||t==="none",pD=(t,e)=>e?t:Object.assign({},t),TJ=(t,e,r)=>t&&!e.hidden&&e._stacked&&{keys:YR(r,!0),values:null};class wN{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(e,r){this.chart=e,this._ctx=e.ctx,this.index=r,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=E1(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&sh(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,r=this._cachedMeta,n=this.getDataset(),a=(p,m,x,y)=>p==="x"?m:p==="r"?y:x,s=r.xAxisID=st(n.xAxisID,O1(e,"x")),o=r.yAxisID=st(n.yAxisID,O1(e,"y")),l=r.rAxisID=st(n.rAxisID,O1(e,"r")),c=r.indexAxis,u=r.iAxisID=a(c,s,o,l),h=r.vAxisID=a(c,o,s,l);r.xScale=this.getScaleForId(s),r.yScale=this.getScaleForId(o),r.rScale=this.getScaleForId(l),r.iScale=this.getScaleForId(u),r.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const r=this._cachedMeta;return e===r.iScale?r.vScale:r.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&Q6(this._data,this),e._stacked&&sh(e)}_dataCheck(){const e=this.getDataset(),r=e.data||(e.data=[]),n=this._data;if(ot(r)){const a=this._cachedMeta;this._data=NJ(r,a)}else if(n!==r){if(n){Q6(n,this);const a=this._cachedMeta;sh(a),a._parsed=[]}r&&Object.isExtensible(r)&&TQ(r,this),this._syncList=[],this._data=r}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const r=this._cachedMeta,n=this.getDataset();let a=!1;this._dataCheck();const s=r._stacked;r._stacked=E1(r.vScale,r),r.stack!==n.stack&&(a=!0,sh(r),r.stack=n.stack),this._resyncElements(e),(a||s!==r._stacked)&&(fD(this,r._parsed),r._stacked=E1(r.vScale,r))}configure(){const e=this.chart.config,r=e.datasetScopeKeys(this._type),n=e.getOptionScopes(this.getDataset(),r,!0);this.options=e.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,r){const{_cachedMeta:n,_data:a}=this,{iScale:s,_stacked:o}=n,l=s.axis;let c=e===0&&r===a.length?!0:n._sorted,u=e>0&&n._parsed[e-1],h,p,m;if(this._parsing===!1)n._parsed=a,n._sorted=!0,m=a;else{jr(a[e])?m=this.parseArrayData(n,a,e,r):ot(a[e])?m=this.parseObjectData(n,a,e,r):m=this.parsePrimitiveData(n,a,e,r);const x=()=>p[l]===null||u&&p[l]<u[l];for(h=0;h<r;++h)n._parsed[h+e]=p=m[h],c&&(x()&&(c=!1),u=p);n._sorted=c}o&&fD(this,m)}parsePrimitiveData(e,r,n,a){const{iScale:s,vScale:o}=e,l=s.axis,c=o.axis,u=s.getLabels(),h=s===o,p=new Array(a);let m,x,y;for(m=0,x=a;m<x;++m)y=m+n,p[m]={[l]:h||s.parse(u[y],y),[c]:o.parse(r[y],y)};return p}parseArrayData(e,r,n,a){const{xScale:s,yScale:o}=e,l=new Array(a);let c,u,h,p;for(c=0,u=a;c<u;++c)h=c+n,p=r[h],l[c]={x:s.parse(p[0],h),y:o.parse(p[1],h)};return l}parseObjectData(e,r,n,a){const{xScale:s,yScale:o}=e,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,u=new Array(a);let h,p,m,x;for(h=0,p=a;h<p;++h)m=h+n,x=r[m],u[h]={x:s.parse(Yl(x,l),m),y:o.parse(Yl(x,c),m)};return u}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,r,n){const a=this.chart,s=this._cachedMeta,o=r[e.axis],l={keys:YR(a,!0),values:r._stacks[e.axis]._visualValues};return uD(l,o,s.index,{mode:n})}updateRangeFromParsed(e,r,n,a){const s=n[r.axis];let o=s===null?NaN:s;const l=a&&n._stacks[r.axis];a&&l&&(a.values=l,o=uD(a,s,this._cachedMeta.index)),e.min=Math.min(e.min,o),e.max=Math.max(e.max,o)}getMinMax(e,r){const n=this._cachedMeta,a=n._parsed,s=n._sorted&&e===n.iScale,o=a.length,l=this._getOtherScale(e),c=TJ(r,n,this.chart),u={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:p}=AJ(l);let m,x;function y(){x=a[m];const b=x[l.axis];return!La(x[e.axis])||h>b||p<b}for(m=0;m<o&&!(!y()&&(this.updateRangeFromParsed(u,e,x,c),s));++m);if(s){for(m=o-1;m>=0;--m)if(!y()){this.updateRangeFromParsed(u,e,x,c);break}}return u}getAllParsedValues(e){const r=this._cachedMeta._parsed,n=[];let a,s,o;for(a=0,s=r.length;a<s;++a)o=r[a][e.axis],La(o)&&n.push(o);return n}getMaxOverflow(){return!1}getLabelAndValue(e){const r=this._cachedMeta,n=r.iScale,a=r.vScale,s=this.getParsed(e);return{label:n?""+n.getLabelForValue(s[n.axis]):"",value:a?""+a.getLabelForValue(s[a.axis]):""}}_update(e){const r=this._cachedMeta;this.update(e||"default"),r._clip=jJ(st(this.options.clip,wJ(r.xScale,r.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,r=this.chart,n=this._cachedMeta,a=n.data||[],s=r.chartArea,o=[],l=this._drawStart||0,c=this._drawCount||a.length-l,u=this.options.drawActiveElementsOnTop;let h;for(n.dataset&&n.dataset.draw(e,s,l,c),h=l;h<l+c;++h){const p=a[h];p.hidden||(p.active&&u?o.push(p):p.draw(e,s))}for(h=0;h<o.length;++h)o[h].draw(e,s)}getStyle(e,r){const n=r?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(n):this.resolveDataElementOptions(e||0,n)}getContext(e,r,n){const a=this.getDataset();let s;if(e>=0&&e<this._cachedMeta.data.length){const o=this._cachedMeta.data[e];s=o.$context||(o.$context=DJ(this.getContext(),e,o)),s.parsed=this.getParsed(e),s.raw=a.data[e],s.index=s.dataIndex=e}else s=this.$context||(this.$context=kJ(this.chart.getContext(),this.index)),s.dataset=a,s.index=s.datasetIndex=this.index;return s.active=!!r,s.mode=n,s}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,r){return this._resolveElementOptions(this.dataElementType.id,r,e)}_resolveElementOptions(e,r="default",n){const a=r==="active",s=this._cachedDataOpts,o=e+"-"+r,l=s[o],c=this.enableOptionSharing&&pf(n);if(l)return pD(l,c);const u=this.chart.config,h=u.datasetElementScopeKeys(this._type,e),p=a?[`${e}Hover`,"hover",e,""]:[e,""],m=u.getOptionScopes(this.getDataset(),h),x=Object.keys(sr.elements[e]),y=()=>this.getContext(n,a,r),b=u.resolveNamedOptions(m,x,y,p);return b.$shared&&(b.$shared=c,s[o]=Object.freeze(pD(b,c))),b}_resolveAnimations(e,r,n){const a=this.chart,s=this._cachedDataOpts,o=`animation-${r}`,l=s[o];if(l)return l;let c;if(a.options.animation!==!1){const h=this.chart.config,p=h.datasetAnimationScopeKeys(this._type,r),m=h.getOptionScopes(this.getDataset(),p);c=h.createResolver(m,this.getContext(e,n,r))}const u=new $R(a,c&&c.animations);return c&&c._cacheable&&(s[o]=Object.freeze(u)),u}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,r){return!r||P1(e)||this.chart._animationsDisabled}_getSharedOptions(e,r){const n=this.resolveDataElementOptions(e,r),a=this._sharedOptions,s=this.getSharedOptions(n),o=this.includeOptions(r,s)||s!==a;return this.updateSharedOptions(s,r,n),{sharedOptions:s,includeOptions:o}}updateElement(e,r,n,a){P1(a)?Object.assign(e,n):this._resolveAnimations(r,a).update(e,n)}updateSharedOptions(e,r,n){e&&!P1(r)&&this._resolveAnimations(void 0,r).update(e,n)}_setStyle(e,r,n,a){e.active=a;const s=this.getStyle(r,a);this._resolveAnimations(r,n,a).update(e,{options:!a&&this.getSharedOptions(s)||s})}removeHoverStyle(e,r,n){this._setStyle(e,n,"active",!1)}setHoverStyle(e,r,n){this._setStyle(e,n,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const r=this._data,n=this._cachedMeta.data;for(const[l,c,u]of this._syncList)this[l](c,u);this._syncList=[];const a=n.length,s=r.length,o=Math.min(s,a);o&&this.parse(0,o),s>a?this._insertElements(a,s-a,e):s<a&&this._removeElements(s,a-s)}_insertElements(e,r,n=!0){const a=this._cachedMeta,s=a.data,o=e+r;let l;const c=u=>{for(u.length+=r,l=u.length-1;l>=o;l--)u[l]=u[l-r]};for(c(s),l=e;l<o;++l)s[l]=new this.dataElementType;this._parsing&&c(a._parsed),this.parse(e,r),n&&this.updateElements(s,e,r,"reset")}updateElements(e,r,n,a){}_removeElements(e,r){const n=this._cachedMeta;if(this._parsing){const a=n._parsed.splice(e,r);n._stacked&&sh(n,a)}n.data.splice(e,r)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[r,n,a]=e;this[r](n,a)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,r){r&&this._sync(["_removeElements",e,r]);const n=arguments.length-2;n&&this._sync(["_insertElements",e,n])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function MJ(t,e){if(!t._cache.$bar){const r=t.getMatchingVisibleMetas(e);let n=[];for(let a=0,s=r.length;a<s;a++)n=n.concat(r[a].controller.getAllParsedValues(t));t._cache.$bar=DR(n.sort((a,s)=>a-s))}return t._cache.$bar}function EJ(t){const e=t.iScale,r=MJ(e,t.type);let n=e._length,a,s,o,l;const c=()=>{o===32767||o===-32768||(pf(l)&&(n=Math.min(n,Math.abs(o-l)||n)),l=o)};for(a=0,s=r.length;a<s;++a)o=e.getPixelForValue(r[a]),c();for(l=void 0,a=0,s=e.ticks.length;a<s;++a)o=e.getPixelForTick(a),c();return n}function OJ(t,e,r,n){const a=r.barThickness;let s,o;return dt(a)?(s=e.min*r.categoryPercentage,o=r.barPercentage):(s=a*n,o=1),{chunk:s/n,ratio:o,start:e.pixels[t]-s/2}}function PJ(t,e,r,n){const a=e.pixels,s=a[t];let o=t>0?a[t-1]:null,l=t<a.length-1?a[t+1]:null;const c=r.categoryPercentage;o===null&&(o=s-(l===null?e.end-e.start:l-s)),l===null&&(l=s+s-o);const u=s-(s-Math.min(o,l))/2*c;return{chunk:Math.abs(l-o)/2*c/n,ratio:r.barPercentage,start:u}}function _J(t,e,r,n){const a=r.parse(t[0],n),s=r.parse(t[1],n),o=Math.min(a,s),l=Math.max(a,s);let c=o,u=l;Math.abs(o)>Math.abs(l)&&(c=l,u=o),e[r.axis]=u,e._custom={barStart:c,barEnd:u,start:a,end:s,min:o,max:l}}function UR(t,e,r,n){return jr(t)?_J(t,e,r,n):e[r.axis]=r.parse(t,n),e}function mD(t,e,r,n){const a=t.iScale,s=t.vScale,o=a.getLabels(),l=a===s,c=[];let u,h,p,m;for(u=r,h=r+n;u<h;++u)m=e[u],p={},p[a.axis]=l||a.parse(o[u],u),c.push(UR(m,p,s,u));return c}function _1(t){return t&&t.barStart!==void 0&&t.barEnd!==void 0}function RJ(t,e,r){return t!==0?po(t):(e.isHorizontal()?1:-1)*(e.min>=r?1:-1)}function LJ(t){let e,r,n,a,s;return t.horizontal?(e=t.base>t.x,r="left",n="right"):(e=t.base<t.y,r="bottom",n="top"),e?(a="end",s="start"):(a="start",s="end"),{start:r,end:n,reverse:e,top:a,bottom:s}}function zJ(t,e,r,n){let a=e.borderSkipped;const s={};if(!a){t.borderSkipped=s;return}if(a===!0){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:o,end:l,reverse:c,top:u,bottom:h}=LJ(t);a==="middle"&&r&&(t.enableBorderRadius=!0,(r._top||0)===n?a=u:(r._bottom||0)===n?a=h:(s[gD(h,o,l,c)]=!0,a=u)),s[gD(a,o,l,c)]=!0,t.borderSkipped=s}function gD(t,e,r,n){return n?(t=IJ(t,e,r),t=xD(t,r,e)):t=xD(t,e,r),t}function IJ(t,e,r){return t===e?r:t===r?e:t}function xD(t,e,r){return t==="start"?e:t==="end"?r:t}function BJ(t,{inflateAmount:e},r){t.inflateAmount=e==="auto"?r===1?.33:0:e}class FJ extends wN{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(e,r,n,a){return mD(e,r,n,a)}parseArrayData(e,r,n,a){return mD(e,r,n,a)}parseObjectData(e,r,n,a){const{iScale:s,vScale:o}=e,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,u=s.axis==="x"?l:c,h=o.axis==="x"?l:c,p=[];let m,x,y,b;for(m=n,x=n+a;m<x;++m)b=r[m],y={},y[s.axis]=s.parse(Yl(b,u),m),p.push(UR(Yl(b,h),y,o,m));return p}updateRangeFromParsed(e,r,n,a){super.updateRangeFromParsed(e,r,n,a);const s=n._custom;s&&r===this._cachedMeta.vScale&&(e.min=Math.min(e.min,s.min),e.max=Math.max(e.max,s.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const r=this._cachedMeta,{iScale:n,vScale:a}=r,s=this.getParsed(e),o=s._custom,l=_1(o)?"["+o.start+", "+o.end+"]":""+a.getLabelForValue(s[a.axis]);return{label:""+n.getLabelForValue(s[n.axis]),value:l}}initialize(){this.enableOptionSharing=!0,super.initialize();const e=this._cachedMeta;e.stack=this.getDataset().stack}update(e){const r=this._cachedMeta;this.updateElements(r.data,0,r.data.length,e)}updateElements(e,r,n,a){const s=a==="reset",{index:o,_cachedMeta:{vScale:l}}=this,c=l.getBasePixel(),u=l.isHorizontal(),h=this._getRuler(),{sharedOptions:p,includeOptions:m}=this._getSharedOptions(r,a);for(let x=r;x<r+n;x++){const y=this.getParsed(x),b=s||dt(y[l.axis])?{base:c,head:c}:this._calculateBarValuePixels(x),w=this._calculateBarIndexPixels(x,h),N=(y._stacks||{})[l.axis],A={horizontal:u,base:b.base,enableBorderRadius:!N||_1(y._custom)||o===N._top||o===N._bottom,x:u?b.head:w.center,y:u?w.center:b.head,height:u?w.size:Math.abs(b.size),width:u?Math.abs(b.size):w.size};m&&(A.options=p||this.resolveDataElementOptions(x,e[x].active?"active":a));const S=A.options||e[x].options;zJ(A,S,N,o),BJ(A,S,h.ratio),this.updateElement(e[x],x,A,a)}}_getStacks(e,r){const{iScale:n}=this._cachedMeta,a=n.getMatchingVisibleMetas(this._type).filter(h=>h.controller.options.grouped),s=n.options.stacked,o=[],l=this._cachedMeta.controller.getParsed(r),c=l&&l[n.axis],u=h=>{const p=h._parsed.find(x=>x[n.axis]===c),m=p&&p[h.vScale.axis];if(dt(m)||isNaN(m))return!0};for(const h of a)if(!(r!==void 0&&u(h))&&((s===!1||o.indexOf(h.stack)===-1||s===void 0&&h.stack===void 0)&&o.push(h.stack),h.index===e))break;return o.length||o.push(void 0),o}_getStackCount(e){return this._getStacks(void 0,e).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const e=this.chart.scales,r=this.chart.options.indexAxis;return Object.keys(e).filter(n=>e[n].axis===r).shift()}_getAxis(){const e={},r=this.getFirstScaleIdForIndexAxis();for(const n of this.chart.data.datasets)e[st(this.chart.options.indexAxis==="x"?n.xAxisID:n.yAxisID,r)]=!0;return Object.keys(e)}_getStackIndex(e,r,n){const a=this._getStacks(e,n),s=r!==void 0?a.indexOf(r):-1;return s===-1?a.length-1:s}_getRuler(){const e=this.options,r=this._cachedMeta,n=r.iScale,a=[];let s,o;for(s=0,o=r.data.length;s<o;++s)a.push(n.getPixelForValue(this.getParsed(s)[n.axis],s));const l=e.barThickness;return{min:l||EJ(r),pixels:a,start:n._startPixel,end:n._endPixel,stackCount:this._getStackCount(),scale:n,grouped:e.grouped,ratio:l?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:r,_stacked:n,index:a},options:{base:s,minBarLength:o}}=this,l=s||0,c=this.getParsed(e),u=c._custom,h=_1(u);let p=c[r.axis],m=0,x=n?this.applyStack(r,c,n):p,y,b;x!==p&&(m=x-p,x=p),h&&(p=u.barStart,x=u.barEnd-u.barStart,p!==0&&po(p)!==po(u.barEnd)&&(m=0),m+=p);const w=!dt(s)&&!h?s:m;let N=r.getPixelForValue(w);if(this.chart.getDataVisibility(e)?y=r.getPixelForValue(m+x):y=N,b=y-N,Math.abs(b)<o){b=RJ(b,r,l)*o,p===l&&(N-=b/2);const A=r.getPixelForDecimal(0),S=r.getPixelForDecimal(1),C=Math.min(A,S),k=Math.max(A,S);N=Math.max(Math.min(N,k),C),y=N+b,n&&!h&&(c._stacks[r.axis]._visualValues[a]=r.getValueForPixel(y)-r.getValueForPixel(N))}if(N===r.getPixelForValue(l)){const A=po(b)*r.getLineWidthForValue(l)/2;N+=A,b-=A}return{size:b,base:N,head:y,center:y+b/2}}_calculateBarIndexPixels(e,r){const n=r.scale,a=this.options,s=a.skipNull,o=st(a.maxBarThickness,1/0);let l,c;const u=this._getAxisCount();if(r.grouped){const h=s?this._getStackCount(e):r.stackCount,p=a.barThickness==="flex"?PJ(e,r,a,h*u):OJ(e,r,a,h*u),m=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,x=this._getAxis().indexOf(st(m,this.getFirstScaleIdForIndexAxis())),y=this._getStackIndex(this.index,this._cachedMeta.stack,s?e:void 0)+x;l=p.start+p.chunk*y+p.chunk/2,c=Math.min(o,p.chunk*p.ratio)}else l=n.getPixelForValue(this.getParsed(e)[n.axis],e),c=Math.min(o,r.min*r.ratio);return{base:l-c/2,head:l+c/2,center:l,size:c}}draw(){const e=this._cachedMeta,r=e.vScale,n=e.data,a=n.length;let s=0;for(;s<a;++s)this.getParsed(s)[r.axis]!==null&&!n[s].hidden&&n[s].draw(this._ctx)}}function HJ(t,e,r){let n=1,a=1,s=0,o=0;if(e<mr){const l=t,c=l+e,u=Math.cos(l),h=Math.sin(l),p=Math.cos(c),m=Math.sin(c),x=(S,C,k)=>jx(S,l,c,!0)?1:Math.max(C,C*r,k,k*r),y=(S,C,k)=>jx(S,l,c,!0)?-1:Math.min(C,C*r,k,k*r),b=x(0,u,p),w=x(Sr,h,m),N=y(Yt,u,p),A=y(Yt+Sr,h,m);n=(b-N)/2,a=(w-A)/2,s=-(b+N)/2,o=-(w+A)/2}return{ratioX:n,ratioY:a,offsetX:s,offsetY:o}}class WR extends wN{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const r=e.data;if(r.labels.length&&r.datasets.length){const{labels:{pointStyle:n,color:a}}=e.legend.options;return r.labels.map((s,o)=>{const c=e.getDatasetMeta(0).controller.getStyle(o);return{text:s,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,fontColor:a,lineWidth:c.borderWidth,pointStyle:n,hidden:!e.getDataVisibility(o),index:o}})}return[]}},onClick(e,r,n){n.chart.toggleDataVisibility(r.index),n.chart.update()}}}};constructor(e,r){super(e,r),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,r){const n=this.getDataset().data,a=this._cachedMeta;if(this._parsing===!1)a._parsed=n;else{let s=c=>+n[c];if(ot(n[e])){const{key:c="value"}=this._parsing;s=u=>+Yl(n[u],c)}let o,l;for(o=e,l=e+r;o<l;++o)a._parsed[o]=s(o)}}_getRotation(){return ci(this.options.rotation-90)}_getCircumference(){return ci(this.options.circumference)}_getRotationExtents(){let e=mr,r=-mr;for(let n=0;n<this.chart.data.datasets.length;++n)if(this.chart.isDatasetVisible(n)&&this.chart.getDatasetMeta(n).type===this._type){const a=this.chart.getDatasetMeta(n).controller,s=a._getRotation(),o=a._getCircumference();e=Math.min(e,s),r=Math.max(r,s+o)}return{rotation:e,circumference:r-e}}update(e){const r=this.chart,{chartArea:n}=r,a=this._cachedMeta,s=a.data,o=this.getMaxBorderWidth()+this.getMaxOffset(s)+this.options.spacing,l=Math.max((Math.min(n.width,n.height)-o)/2,0),c=Math.min(fQ(this.options.cutout,l),1),u=this._getRingWeight(this.index),{circumference:h,rotation:p}=this._getRotationExtents(),{ratioX:m,ratioY:x,offsetX:y,offsetY:b}=HJ(p,h,c),w=(n.width-o)/m,N=(n.height-o)/x,A=Math.max(Math.min(w,N)/2,0),S=NR(this.options.radius,A),C=Math.max(S*c,0),k=(S-C)/this._getVisibleDatasetWeightTotal();this.offsetX=y*S,this.offsetY=b*S,a.total=this.calculateTotal(),this.outerRadius=S-k*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-k*u,0),this.updateElements(s,0,s.length,e)}_circumference(e,r){const n=this.options,a=this._cachedMeta,s=this._getCircumference();return r&&n.animation.animateRotate||!this.chart.getDataVisibility(e)||a._parsed[e]===null||a.data[e].hidden?0:this.calculateCircumference(a._parsed[e]*s/mr)}updateElements(e,r,n,a){const s=a==="reset",o=this.chart,l=o.chartArea,u=o.options.animation,h=(l.left+l.right)/2,p=(l.top+l.bottom)/2,m=s&&u.animateScale,x=m?0:this.innerRadius,y=m?0:this.outerRadius,{sharedOptions:b,includeOptions:w}=this._getSharedOptions(r,a);let N=this._getRotation(),A;for(A=0;A<r;++A)N+=this._circumference(A,s);for(A=r;A<r+n;++A){const S=this._circumference(A,s),C=e[A],k={x:h+this.offsetX,y:p+this.offsetY,startAngle:N,endAngle:N+S,circumference:S,outerRadius:y,innerRadius:x};w&&(k.options=b||this.resolveDataElementOptions(A,C.active?"active":a)),N+=S,this.updateElement(C,A,k,a)}}calculateTotal(){const e=this._cachedMeta,r=e.data;let n=0,a;for(a=0;a<r.length;a++){const s=e._parsed[a];s!==null&&!isNaN(s)&&this.chart.getDataVisibility(a)&&!r[a].hidden&&(n+=Math.abs(s))}return n}calculateCircumference(e){const r=this._cachedMeta.total;return r>0&&!isNaN(e)?mr*(Math.abs(e)/r):0}getLabelAndValue(e){const r=this._cachedMeta,n=this.chart,a=n.data.labels||[],s=uN(r._parsed[e],n.options.locale);return{label:a[e]||"",value:s}}getMaxBorderWidth(e){let r=0;const n=this.chart;let a,s,o,l,c;if(!e){for(a=0,s=n.data.datasets.length;a<s;++a)if(n.isDatasetVisible(a)){o=n.getDatasetMeta(a),e=o.data,l=o.controller;break}}if(!e)return 0;for(a=0,s=e.length;a<s;++a)c=l.resolveDataElementOptions(a),c.borderAlign!=="inner"&&(r=Math.max(r,c.borderWidth||0,c.hoverBorderWidth||0));return r}getMaxOffset(e){let r=0;for(let n=0,a=e.length;n<a;++n){const s=this.resolveDataElementOptions(n);r=Math.max(r,s.offset||0,s.hoverOffset||0)}return r}_getRingWeightOffset(e){let r=0;for(let n=0;n<e;++n)this.chart.isDatasetVisible(n)&&(r+=this._getRingWeight(n));return r}_getRingWeight(e){return Math.max(st(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class $J extends WR{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}function ll(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class jN{static override(e){Object.assign(jN.prototype,e)}options;constructor(e){this.options=e||{}}init(){}formats(){return ll()}parse(){return ll()}format(){return ll()}add(){return ll()}diff(){return ll()}startOf(){return ll()}endOf(){return ll()}}var YJ={_date:jN};function UJ(t,e,r,n){const{controller:a,data:s,_sorted:o}=t,l=a._cachedMeta.iScale,c=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(l&&e===l.axis&&e!=="r"&&o&&s.length){const u=l._reversePixels?kQ:bj;if(n){if(a._sharedOptions){const h=s[0],p=typeof h.getRange=="function"&&h.getRange(e);if(p){const m=u(s,e,r-p),x=u(s,e,r+p);return{lo:m.lo,hi:x.hi}}}}else{const h=u(s,e,r);if(c){const{vScale:p}=a._cachedMeta,{_parsed:m}=t,x=m.slice(0,h.lo+1).reverse().findIndex(b=>!dt(b[p.axis]));h.lo-=Math.max(0,x);const y=m.slice(h.hi).findIndex(b=>!dt(b[p.axis]));h.hi+=Math.max(0,y)}return h}}return{lo:0,hi:s.length-1}}function _0(t,e,r,n,a){const s=t.getSortedVisibleDatasetMetas(),o=r[e];for(let l=0,c=s.length;l<c;++l){const{index:u,data:h}=s[l],{lo:p,hi:m}=UJ(s[l],e,o,a);for(let x=p;x<=m;++x){const y=h[x];y.skip||n(y,u,x)}}}function WJ(t){const e=t.indexOf("x")!==-1,r=t.indexOf("y")!==-1;return function(n,a){const s=e?Math.abs(n.x-a.x):0,o=r?Math.abs(n.y-a.y):0;return Math.sqrt(Math.pow(s,2)+Math.pow(o,2))}}function R1(t,e,r,n,a){const s=[];return!a&&!t.isPointInArea(e)||_0(t,r,e,function(l,c,u){!a&&!hN(l,t.chartArea,0)||l.inRange(e.x,e.y,n)&&s.push({element:l,datasetIndex:c,index:u})},!0),s}function XJ(t,e,r,n){let a=[];function s(o,l,c){const{startAngle:u,endAngle:h}=o.getProps(["startAngle","endAngle"],n),{angle:p}=CR(o,{x:e.x,y:e.y});jx(p,u,h)&&a.push({element:o,datasetIndex:l,index:c})}return _0(t,r,e,s),a}function VJ(t,e,r,n,a,s){let o=[];const l=WJ(r);let c=Number.POSITIVE_INFINITY;function u(h,p,m){const x=h.inRange(e.x,e.y,a);if(n&&!x)return;const y=h.getCenterPoint(a);if(!(!!s||t.isPointInArea(y))&&!x)return;const w=l(e,y);w<c?(o=[{element:h,datasetIndex:p,index:m}],c=w):w===c&&o.push({element:h,datasetIndex:p,index:m})}return _0(t,r,e,u),o}function L1(t,e,r,n,a,s){return!s&&!t.isPointInArea(e)?[]:r==="r"&&!n?XJ(t,e,r,a):VJ(t,e,r,n,a,s)}function bD(t,e,r,n,a){const s=[],o=r==="x"?"inXRange":"inYRange";let l=!1;return _0(t,r,e,(c,u,h)=>{c[o]&&c[o](e[r],a)&&(s.push({element:c,datasetIndex:u,index:h}),l=l||c.inRange(e.x,e.y,a))}),n&&!l?[]:s}var qJ={modes:{index(t,e,r,n){const a=hl(e,t),s=r.axis||"x",o=r.includeInvisible||!1,l=r.intersect?R1(t,a,s,n,o):L1(t,a,s,!1,n,o),c=[];return l.length?(t.getSortedVisibleDatasetMetas().forEach(u=>{const h=l[0].index,p=u.data[h];p&&!p.skip&&c.push({element:p,datasetIndex:u.index,index:h})}),c):[]},dataset(t,e,r,n){const a=hl(e,t),s=r.axis||"xy",o=r.includeInvisible||!1;let l=r.intersect?R1(t,a,s,n,o):L1(t,a,s,!1,n,o);if(l.length>0){const c=l[0].datasetIndex,u=t.getDatasetMeta(c).data;l=[];for(let h=0;h<u.length;++h)l.push({element:u[h],datasetIndex:c,index:h})}return l},point(t,e,r,n){const a=hl(e,t),s=r.axis||"xy",o=r.includeInvisible||!1;return R1(t,a,s,n,o)},nearest(t,e,r,n){const a=hl(e,t),s=r.axis||"xy",o=r.includeInvisible||!1;return L1(t,a,s,r.intersect,n,o)},x(t,e,r,n){const a=hl(e,t);return bD(t,a,"x",r.intersect,n)},y(t,e,r,n){const a=hl(e,t);return bD(t,a,"y",r.intersect,n)}}};const XR=["left","top","right","bottom"];function ih(t,e){return t.filter(r=>r.pos===e)}function yD(t,e){return t.filter(r=>XR.indexOf(r.pos)===-1&&r.box.axis===e)}function oh(t,e){return t.sort((r,n)=>{const a=e?n:r,s=e?r:n;return a.weight===s.weight?a.index-s.index:a.weight-s.weight})}function GJ(t){const e=[];let r,n,a,s,o,l;for(r=0,n=(t||[]).length;r<n;++r)a=t[r],{position:s,options:{stack:o,stackWeight:l=1}}=a,e.push({index:r,box:a,pos:s,horizontal:a.isHorizontal(),weight:a.weight,stack:o&&s+o,stackWeight:l});return e}function KJ(t){const e={};for(const r of t){const{stack:n,pos:a,stackWeight:s}=r;if(!n||!XR.includes(a))continue;const o=e[n]||(e[n]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=s}return e}function ZJ(t,e){const r=KJ(t),{vBoxMaxWidth:n,hBoxMaxHeight:a}=e;let s,o,l;for(s=0,o=t.length;s<o;++s){l=t[s];const{fullSize:c}=l.box,u=r[l.stack],h=u&&l.stackWeight/u.weight;l.horizontal?(l.width=h?h*n:c&&e.availableWidth,l.height=a):(l.width=n,l.height=h?h*a:c&&e.availableHeight)}return r}function QJ(t){const e=GJ(t),r=oh(e.filter(u=>u.box.fullSize),!0),n=oh(ih(e,"left"),!0),a=oh(ih(e,"right")),s=oh(ih(e,"top"),!0),o=oh(ih(e,"bottom")),l=yD(e,"x"),c=yD(e,"y");return{fullSize:r,leftAndTop:n.concat(s),rightAndBottom:a.concat(c).concat(o).concat(l),chartArea:ih(e,"chartArea"),vertical:n.concat(a).concat(c),horizontal:s.concat(o).concat(l)}}function vD(t,e,r,n){return Math.max(t[r],e[r])+Math.max(t[n],e[n])}function VR(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function JJ(t,e,r,n){const{pos:a,box:s}=r,o=t.maxPadding;if(!ot(a)){r.size&&(t[a]-=r.size);const p=n[r.stack]||{size:0,count:1};p.size=Math.max(p.size,r.horizontal?s.height:s.width),r.size=p.size/p.count,t[a]+=r.size}s.getPadding&&VR(o,s.getPadding());const l=Math.max(0,e.outerWidth-vD(o,t,"left","right")),c=Math.max(0,e.outerHeight-vD(o,t,"top","bottom")),u=l!==t.w,h=c!==t.h;return t.w=l,t.h=c,r.horizontal?{same:u,other:h}:{same:h,other:u}}function eee(t){const e=t.maxPadding;function r(n){const a=Math.max(e[n]-t[n],0);return t[n]+=a,a}t.y+=r("top"),t.x+=r("left"),r("right"),r("bottom")}function tee(t,e){const r=e.maxPadding;function n(a){const s={left:0,top:0,right:0,bottom:0};return a.forEach(o=>{s[o]=Math.max(e[o],r[o])}),s}return n(t?["left","right"]:["top","bottom"])}function Ah(t,e,r,n){const a=[];let s,o,l,c,u,h;for(s=0,o=t.length,u=0;s<o;++s){l=t[s],c=l.box,c.update(l.width||e.w,l.height||e.h,tee(l.horizontal,e));const{same:p,other:m}=JJ(e,r,l,n);u|=p&&a.length,h=h||m,c.fullSize||a.push(l)}return u&&Ah(a,e,r,n)||h}function Km(t,e,r,n,a){t.top=r,t.left=e,t.right=e+n,t.bottom=r+a,t.width=n,t.height=a}function wD(t,e,r,n){const a=r.padding;let{x:s,y:o}=e;for(const l of t){const c=l.box,u=n[l.stack]||{placed:0,weight:1},h=l.stackWeight/u.weight||1;if(l.horizontal){const p=e.w*h,m=u.size||c.height;pf(u.start)&&(o=u.start),c.fullSize?Km(c,a.left,o,r.outerWidth-a.right-a.left,m):Km(c,e.left+u.placed,o,p,m),u.start=o,u.placed+=p,o=c.bottom}else{const p=e.h*h,m=u.size||c.width;pf(u.start)&&(s=u.start),c.fullSize?Km(c,s,a.top,m,r.outerHeight-a.bottom-a.top):Km(c,s,e.top+u.placed,m,p),u.start=s,u.placed+=p,s=c.right}}e.x=s,e.y=o}var lo={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(r){e.draw(r)}}]},t.boxes.push(e)},removeBox(t,e){const r=t.boxes?t.boxes.indexOf(e):-1;r!==-1&&t.boxes.splice(r,1)},configure(t,e,r){e.fullSize=r.fullSize,e.position=r.position,e.weight=r.weight},update(t,e,r,n){if(!t)return;const a=za(t.options.layout.padding),s=Math.max(e-a.width,0),o=Math.max(r-a.height,0),l=QJ(t.boxes),c=l.vertical,u=l.horizontal;vt(t.boxes,b=>{typeof b.beforeLayout=="function"&&b.beforeLayout()});const h=c.reduce((b,w)=>w.box.options&&w.box.options.display===!1?b:b+1,0)||1,p=Object.freeze({outerWidth:e,outerHeight:r,padding:a,availableWidth:s,availableHeight:o,vBoxMaxWidth:s/2/h,hBoxMaxHeight:o/2}),m=Object.assign({},a);VR(m,za(n));const x=Object.assign({maxPadding:m,w:s,h:o,x:a.left,y:a.top},a),y=ZJ(c.concat(u),p);Ah(l.fullSize,x,p,y),Ah(c,x,p,y),Ah(u,x,p,y)&&Ah(c,x,p,y),eee(x),wD(l.leftAndTop,x,p,y),x.x+=x.w,x.y+=x.h,wD(l.rightAndBottom,x,p,y),t.chartArea={left:x.left,top:x.top,right:x.left+x.w,bottom:x.top+x.h,height:x.h,width:x.w},vt(l.chartArea,b=>{const w=b.box;Object.assign(w,t.chartArea),w.update(x.w,x.h,{left:0,top:0,right:0,bottom:0})})}};class qR{acquireContext(e,r){}releaseContext(e){return!1}addEventListener(e,r,n){}removeEventListener(e,r,n){}getDevicePixelRatio(){return 1}getMaximumSize(e,r,n,a){return r=Math.max(0,r||e.width),n=n||e.height,{width:r,height:Math.max(0,a?Math.floor(r/a):n)}}isAttached(e){return!0}updateConfig(e){}}class ree extends qR{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const Yg="$chartjs",nee={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},jD=t=>t===null||t==="";function aee(t,e){const r=t.style,n=t.getAttribute("height"),a=t.getAttribute("width");if(t[Yg]={initial:{height:n,width:a,style:{display:r.display,height:r.height,width:r.width}}},r.display=r.display||"block",r.boxSizing=r.boxSizing||"border-box",jD(a)){const s=lD(t,"width");s!==void 0&&(t.width=s)}if(jD(n))if(t.style.height==="")t.height=t.width/(e||2);else{const s=lD(t,"height");s!==void 0&&(t.height=s)}return t}const GR=uJ?{passive:!0}:!1;function see(t,e,r){t&&t.addEventListener(e,r,GR)}function iee(t,e,r){t&&t.canvas&&t.canvas.removeEventListener(e,r,GR)}function oee(t,e){const r=nee[t.type]||t.type,{x:n,y:a}=hl(t,e);return{type:r,chart:e,native:t,x:n!==void 0?n:null,y:a!==void 0?a:null}}function Cx(t,e){for(const r of t)if(r===e||r.contains(e))return!0}function lee(t,e,r){const n=t.canvas,a=new MutationObserver(s=>{let o=!1;for(const l of s)o=o||Cx(l.addedNodes,n),o=o&&!Cx(l.removedNodes,n);o&&r()});return a.observe(document,{childList:!0,subtree:!0}),a}function cee(t,e,r){const n=t.canvas,a=new MutationObserver(s=>{let o=!1;for(const l of s)o=o||Cx(l.removedNodes,n),o=o&&!Cx(l.addedNodes,n);o&&r()});return a.observe(document,{childList:!0,subtree:!0}),a}const mf=new Map;let ND=0;function KR(){const t=window.devicePixelRatio;t!==ND&&(ND=t,mf.forEach((e,r)=>{r.currentDevicePixelRatio!==t&&e()}))}function dee(t,e){mf.size||window.addEventListener("resize",KR),mf.set(t,e)}function uee(t){mf.delete(t),mf.size||window.removeEventListener("resize",KR)}function hee(t,e,r){const n=t.canvas,a=n&&vN(n);if(!a)return;const s=MR((l,c)=>{const u=a.clientWidth;r(l,c),u<a.clientWidth&&r()},window),o=new ResizeObserver(l=>{const c=l[0],u=c.contentRect.width,h=c.contentRect.height;u===0&&h===0||s(u,h)});return o.observe(a),dee(t,s),o}function z1(t,e,r){r&&r.disconnect(),e==="resize"&&uee(t)}function fee(t,e,r){const n=t.canvas,a=MR(s=>{t.ctx!==null&&r(oee(s,t))},t);return see(n,e,a),a}class pee extends qR{acquireContext(e,r){const n=e&&e.getContext&&e.getContext("2d");return n&&n.canvas===e?(aee(e,r),n):null}releaseContext(e){const r=e.canvas;if(!r[Yg])return!1;const n=r[Yg].initial;["height","width"].forEach(s=>{const o=n[s];dt(o)?r.removeAttribute(s):r.setAttribute(s,o)});const a=n.style||{};return Object.keys(a).forEach(s=>{r.style[s]=a[s]}),r.width=r.width,delete r[Yg],!0}addEventListener(e,r,n){this.removeEventListener(e,r);const a=e.$proxies||(e.$proxies={}),o={attach:lee,detach:cee,resize:hee}[r]||fee;a[r]=o(e,r,n)}removeEventListener(e,r){const n=e.$proxies||(e.$proxies={}),a=n[r];if(!a)return;({attach:z1,detach:z1,resize:z1}[r]||iee)(e,r,a),n[r]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,r,n,a){return dJ(e,r,n,a)}isAttached(e){const r=e&&vN(e);return!!(r&&r.isConnected)}}function mee(t){return!yN()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?ree:pee}let Jl=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(e){const{x:r,y:n}=this.getProps(["x","y"],e);return{x:r,y:n}}hasValue(){return wx(this.x)&&wx(this.y)}getProps(e,r){const n=this.$animations;if(!r||!n)return this;const a={};return e.forEach(s=>{a[s]=n[s]&&n[s].active()?n[s]._to:this[s]}),a}};function gee(t,e){const r=t.options.ticks,n=xee(t),a=Math.min(r.maxTicksLimit||n,n),s=r.major.enabled?yee(e):[],o=s.length,l=s[0],c=s[o-1],u=[];if(o>a)return vee(e,u,s,o/a),u;const h=bee(s,e,a);if(o>0){let p,m;const x=o>1?Math.round((c-l)/(o-1)):null;for(Zm(e,u,h,dt(x)?0:l-x,l),p=0,m=o-1;p<m;p++)Zm(e,u,h,s[p],s[p+1]);return Zm(e,u,h,c,dt(x)?e.length:c+x),u}return Zm(e,u,h),u}function xee(t){const e=t.options.offset,r=t._tickSize(),n=t._length/r+(e?0:1),a=t._maxLength/r;return Math.floor(Math.min(n,a))}function bee(t,e,r){const n=wee(t),a=e.length/r;if(!n)return Math.max(a,1);const s=vQ(n);for(let o=0,l=s.length-1;o<l;o++){const c=s[o];if(c>a)return c}return Math.max(a,1)}function yee(t){const e=[];let r,n;for(r=0,n=t.length;r<n;r++)t[r].major&&e.push(r);return e}function vee(t,e,r,n){let a=0,s=r[0],o;for(n=Math.ceil(n),o=0;o<t.length;o++)o===s&&(e.push(t[o]),a++,s=r[a*n])}function Zm(t,e,r,n,a){const s=st(n,0),o=Math.min(st(a,t.length),t.length);let l=0,c,u,h;for(r=Math.ceil(r),a&&(c=a-n,r=c/Math.floor(c/r)),h=s;h<0;)l++,h=Math.round(s+l*r);for(u=Math.max(s,0);u<o;u++)u===h&&(e.push(t[u]),l++,h=Math.round(s+l*r))}function wee(t){const e=t.length;let r,n;if(e<2)return!1;for(n=t[0],r=1;r<e;++r)if(t[r]-t[r-1]!==n)return!1;return n}const jee=t=>t==="left"?"right":t==="right"?"left":t,SD=(t,e,r)=>e==="top"||e==="left"?t[e]+r:t[e]-r,AD=(t,e)=>Math.min(e||t,t);function CD(t,e){const r=[],n=t.length/e,a=t.length;let s=0;for(;s<a;s+=n)r.push(t[Math.floor(s)]);return r}function Nee(t,e,r){const n=t.ticks.length,a=Math.min(e,n-1),s=t._startPixel,o=t._endPixel,l=1e-6;let c=t.getPixelForTick(a),u;if(!(r&&(n===1?u=Math.max(c-s,o-c):e===0?u=(t.getPixelForTick(1)-c)/2:u=(c-t.getPixelForTick(a-1))/2,c+=a<e?u:-u,c<s-l||c>o+l)))return c}function See(t,e){vt(t,r=>{const n=r.gc,a=n.length/2;let s;if(a>e){for(s=0;s<a;++s)delete r.data[n[s]];n.splice(0,a)}})}function lh(t){return t.drawTicks?t.tickLength:0}function kD(t,e){if(!t.display)return 0;const r=mn(t.font,e),n=za(t.padding);return(jr(t.text)?t.text.length:1)*r.lineHeight+n.height}function Aee(t,e){return Hd(t,{scale:e,type:"scale"})}function Cee(t,e,r){return Hd(t,{tick:r,index:e,type:"tick"})}function kee(t,e,r){let n=ER(t);return(r&&e!=="right"||!r&&e==="right")&&(n=jee(n)),n}function Dee(t,e,r,n){const{top:a,left:s,bottom:o,right:l,chart:c}=t,{chartArea:u,scales:h}=c;let p=0,m,x,y;const b=o-a,w=l-s;if(t.isHorizontal()){if(x=Kn(n,s,l),ot(r)){const N=Object.keys(r)[0],A=r[N];y=h[N].getPixelForValue(A)+b-e}else r==="center"?y=(u.bottom+u.top)/2+b-e:y=SD(t,r,e);m=l-s}else{if(ot(r)){const N=Object.keys(r)[0],A=r[N];x=h[N].getPixelForValue(A)-w+e}else r==="center"?x=(u.left+u.right)/2-w+e:x=SD(t,r,e);y=Kn(n,o,a),p=r==="left"?-Sr:Sr}return{titleX:x,titleY:y,maxWidth:m,rotation:p}}class $d extends Jl{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,r){return e}getUserBounds(){let{_userMin:e,_userMax:r,_suggestedMin:n,_suggestedMax:a}=this;return e=xs(e,Number.POSITIVE_INFINITY),r=xs(r,Number.NEGATIVE_INFINITY),n=xs(n,Number.POSITIVE_INFINITY),a=xs(a,Number.NEGATIVE_INFINITY),{min:xs(e,n),max:xs(r,a),minDefined:La(e),maxDefined:La(r)}}getMinMax(e){let{min:r,max:n,minDefined:a,maxDefined:s}=this.getUserBounds(),o;if(a&&s)return{min:r,max:n};const l=this.getMatchingVisibleMetas();for(let c=0,u=l.length;c<u;++c)o=l[c].controller.getMinMax(this,e),a||(r=Math.min(r,o.min)),s||(n=Math.max(n,o.max));return r=s&&r>n?n:r,n=a&&r>n?r:n,{min:xs(r,xs(n,r)),max:xs(n,xs(r,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Rt(this.options.beforeUpdate,[this])}update(e,r,n){const{beginAtZero:a,grace:s,ticks:o}=this.options,l=o.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=r,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=GQ(this,s,a),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const c=l<this.ticks.length;this._convertTicksToLabels(c?CD(this.ticks,l):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=gee(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),c&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,r,n;this.isHorizontal()?(r=this.left,n=this.right):(r=this.top,n=this.bottom,e=!e),this._startPixel=r,this._endPixel=n,this._reversePixels=e,this._length=n-r,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Rt(this.options.afterUpdate,[this])}beforeSetDimensions(){Rt(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){Rt(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),Rt(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Rt(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const r=this.options.ticks;let n,a,s;for(n=0,a=e.length;n<a;n++)s=e[n],s.label=Rt(r.callback,[s.value,n,e],this)}afterTickToLabelConversion(){Rt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Rt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,r=e.ticks,n=AD(this.ticks.length,e.ticks.maxTicksLimit),a=r.minRotation||0,s=r.maxRotation;let o=a,l,c,u;if(!this._isVisible()||!r.display||a>=s||n<=1||!this.isHorizontal()){this.labelRotation=a;return}const h=this._getLabelSizes(),p=h.widest.width,m=h.highest.height,x=On(this.chart.width-p,0,this.maxWidth);l=e.offset?this.maxWidth/n:x/(n-1),p+6>l&&(l=x/(n-(e.offset?.5:1)),c=this.maxHeight-lh(e.grid)-r.padding-kD(e.title,this.chart.options.font),u=Math.sqrt(p*p+m*m),o=SQ(Math.min(Math.asin(On((h.highest.height+6)/l,-1,1)),Math.asin(On(c/u,-1,1))-Math.asin(On(m/u,-1,1)))),o=Math.max(a,Math.min(s,o))),this.labelRotation=o}afterCalculateLabelRotation(){Rt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Rt(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:r,options:{ticks:n,title:a,grid:s}}=this,o=this._isVisible(),l=this.isHorizontal();if(o){const c=kD(a,r.options.font);if(l?(e.width=this.maxWidth,e.height=lh(s)+c):(e.height=this.maxHeight,e.width=lh(s)+c),n.display&&this.ticks.length){const{first:u,last:h,widest:p,highest:m}=this._getLabelSizes(),x=n.padding*2,y=ci(this.labelRotation),b=Math.cos(y),w=Math.sin(y);if(l){const N=n.mirror?0:w*p.width+b*m.height;e.height=Math.min(this.maxHeight,e.height+N+x)}else{const N=n.mirror?0:b*p.width+w*m.height;e.width=Math.min(this.maxWidth,e.width+N+x)}this._calculatePadding(u,h,w,b)}}this._handleMargins(),l?(this.width=this._length=r.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=r.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,r,n,a){const{ticks:{align:s,padding:o},position:l}=this.options,c=this.labelRotation!==0,u=l!=="top"&&this.axis==="x";if(this.isHorizontal()){const h=this.getPixelForTick(0)-this.left,p=this.right-this.getPixelForTick(this.ticks.length-1);let m=0,x=0;c?u?(m=a*e.width,x=n*r.height):(m=n*e.height,x=a*r.width):s==="start"?x=r.width:s==="end"?m=e.width:s!=="inner"&&(m=e.width/2,x=r.width/2),this.paddingLeft=Math.max((m-h+o)*this.width/(this.width-h),0),this.paddingRight=Math.max((x-p+o)*this.width/(this.width-p),0)}else{let h=r.height/2,p=e.height/2;s==="start"?(h=0,p=e.height):s==="end"&&(h=r.height,p=0),this.paddingTop=h+o,this.paddingBottom=p+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Rt(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:r}=this.options;return r==="top"||r==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let r,n;for(r=0,n=e.length;r<n;r++)dt(e[r].label)&&(e.splice(r,1),n--,r--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const r=this.options.ticks.sampleSize;let n=this.ticks;r<n.length&&(n=CD(n,r)),this._labelSizes=e=this._computeLabelSizes(n,n.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,r,n){const{ctx:a,_longestTextCache:s}=this,o=[],l=[],c=Math.floor(r/AD(r,n));let u=0,h=0,p,m,x,y,b,w,N,A,S,C,k;for(p=0;p<r;p+=c){if(y=e[p].label,b=this._resolveTickFontOptions(p),a.font=w=b.string,N=s[w]=s[w]||{data:{},gc:[]},A=b.lineHeight,S=C=0,!dt(y)&&!jr(y))S=nD(a,N.data,N.gc,S,y),C=A;else if(jr(y))for(m=0,x=y.length;m<x;++m)k=y[m],!dt(k)&&!jr(k)&&(S=nD(a,N.data,N.gc,S,k),C+=A);o.push(S),l.push(C),u=Math.max(S,u),h=Math.max(C,h)}See(s,r);const T=o.indexOf(u),E=l.indexOf(h),_=L=>({width:o[L]||0,height:l[L]||0});return{first:_(0),last:_(r-1),widest:_(T),highest:_(E),widths:o,heights:l}}getLabelForValue(e){return e}getPixelForValue(e,r){return NaN}getValueForPixel(e){}getPixelForTick(e){const r=this.ticks;return e<0||e>r.length-1?null:this.getPixelForValue(r[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const r=this._startPixel+e*this._length;return CQ(this._alignToPixels?ol(this.chart,r,0):r)}getDecimalForPixel(e){const r=(e-this._startPixel)/this._length;return this._reversePixels?1-r:r}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:r}=this;return e<0&&r<0?r:e>0&&r>0?e:0}getContext(e){const r=this.ticks||[];if(e>=0&&e<r.length){const n=r[e];return n.$context||(n.$context=Cee(this.getContext(),e,n))}return this.$context||(this.$context=Aee(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,r=ci(this.labelRotation),n=Math.abs(Math.cos(r)),a=Math.abs(Math.sin(r)),s=this._getLabelSizes(),o=e.autoSkipPadding||0,l=s?s.widest.width+o:0,c=s?s.highest.height+o:0;return this.isHorizontal()?c*n>l*a?l/n:c/a:c*a<l*n?c/n:l/a}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const r=this.axis,n=this.chart,a=this.options,{grid:s,position:o,border:l}=a,c=s.offset,u=this.isHorizontal(),p=this.ticks.length+(c?1:0),m=lh(s),x=[],y=l.setContext(this.getContext()),b=y.display?y.width:0,w=b/2,N=function(H){return ol(n,H,b)};let A,S,C,k,T,E,_,L,P,R,z,B;if(o==="top")A=N(this.bottom),E=this.bottom-m,L=A-w,R=N(e.top)+w,B=e.bottom;else if(o==="bottom")A=N(this.top),R=e.top,B=N(e.bottom)-w,E=A+w,L=this.top+m;else if(o==="left")A=N(this.right),T=this.right-m,_=A-w,P=N(e.left)+w,z=e.right;else if(o==="right")A=N(this.left),P=e.left,z=N(e.right)-w,T=A+w,_=this.left+m;else if(r==="x"){if(o==="center")A=N((e.top+e.bottom)/2+.5);else if(ot(o)){const H=Object.keys(o)[0],W=o[H];A=N(this.chart.scales[H].getPixelForValue(W))}R=e.top,B=e.bottom,E=A+w,L=E+m}else if(r==="y"){if(o==="center")A=N((e.left+e.right)/2);else if(ot(o)){const H=Object.keys(o)[0],W=o[H];A=N(this.chart.scales[H].getPixelForValue(W))}T=A-w,_=T-m,P=e.left,z=e.right}const Y=st(a.ticks.maxTicksLimit,p),X=Math.max(1,Math.ceil(p/Y));for(S=0;S<p;S+=X){const H=this.getContext(S),W=s.setContext(H),V=l.setContext(H),Z=W.lineWidth,F=W.color,G=V.dash||[],te=V.dashOffset,K=W.tickWidth,U=W.tickColor,re=W.tickBorderDash||[],ae=W.tickBorderDashOffset;C=Nee(this,S,c),C!==void 0&&(k=ol(n,C,Z),u?T=_=P=z=k:E=L=R=B=k,x.push({tx1:T,ty1:E,tx2:_,ty2:L,x1:P,y1:R,x2:z,y2:B,width:Z,color:F,borderDash:G,borderDashOffset:te,tickWidth:K,tickColor:U,tickBorderDash:re,tickBorderDashOffset:ae}))}return this._ticksLength=p,this._borderValue=A,x}_computeLabelItems(e){const r=this.axis,n=this.options,{position:a,ticks:s}=n,o=this.isHorizontal(),l=this.ticks,{align:c,crossAlign:u,padding:h,mirror:p}=s,m=lh(n.grid),x=m+h,y=p?-h:x,b=-ci(this.labelRotation),w=[];let N,A,S,C,k,T,E,_,L,P,R,z,B="middle";if(a==="top")T=this.bottom-y,E=this._getXAxisLabelAlignment();else if(a==="bottom")T=this.top+y,E=this._getXAxisLabelAlignment();else if(a==="left"){const X=this._getYAxisLabelAlignment(m);E=X.textAlign,k=X.x}else if(a==="right"){const X=this._getYAxisLabelAlignment(m);E=X.textAlign,k=X.x}else if(r==="x"){if(a==="center")T=(e.top+e.bottom)/2+x;else if(ot(a)){const X=Object.keys(a)[0],H=a[X];T=this.chart.scales[X].getPixelForValue(H)+x}E=this._getXAxisLabelAlignment()}else if(r==="y"){if(a==="center")k=(e.left+e.right)/2-x;else if(ot(a)){const X=Object.keys(a)[0],H=a[X];k=this.chart.scales[X].getPixelForValue(H)}E=this._getYAxisLabelAlignment(m).textAlign}r==="y"&&(c==="start"?B="top":c==="end"&&(B="bottom"));const Y=this._getLabelSizes();for(N=0,A=l.length;N<A;++N){S=l[N],C=S.label;const X=s.setContext(this.getContext(N));_=this.getPixelForTick(N)+s.labelOffset,L=this._resolveTickFontOptions(N),P=L.lineHeight,R=jr(C)?C.length:1;const H=R/2,W=X.color,V=X.textStrokeColor,Z=X.textStrokeWidth;let F=E;o?(k=_,E==="inner"&&(N===A-1?F=this.options.reverse?"left":"right":N===0?F=this.options.reverse?"right":"left":F="center"),a==="top"?u==="near"||b!==0?z=-R*P+P/2:u==="center"?z=-Y.highest.height/2-H*P+P:z=-Y.highest.height+P/2:u==="near"||b!==0?z=P/2:u==="center"?z=Y.highest.height/2-H*P:z=Y.highest.height-R*P,p&&(z*=-1),b!==0&&!X.showLabelBackdrop&&(k+=P/2*Math.sin(b))):(T=_,z=(1-R)*P/2);let G;if(X.showLabelBackdrop){const te=za(X.backdropPadding),K=Y.heights[N],U=Y.widths[N];let re=z-te.top,ae=0-te.left;switch(B){case"middle":re-=K/2;break;case"bottom":re-=K;break}switch(E){case"center":ae-=U/2;break;case"right":ae-=U;break;case"inner":N===A-1?ae-=U:N>0&&(ae-=U/2);break}G={left:ae,top:re,width:U+te.width,height:K+te.height,color:X.backdropColor}}w.push({label:C,font:L,textOffset:z,options:{rotation:b,color:W,strokeColor:V,strokeWidth:Z,textAlign:F,textBaseline:B,translation:[k,T],backdrop:G}})}return w}_getXAxisLabelAlignment(){const{position:e,ticks:r}=this.options;if(-ci(this.labelRotation))return e==="top"?"left":"right";let a="center";return r.align==="start"?a="left":r.align==="end"?a="right":r.align==="inner"&&(a="inner"),a}_getYAxisLabelAlignment(e){const{position:r,ticks:{crossAlign:n,mirror:a,padding:s}}=this.options,o=this._getLabelSizes(),l=e+s,c=o.widest.width;let u,h;return r==="left"?a?(h=this.right+s,n==="near"?u="left":n==="center"?(u="center",h+=c/2):(u="right",h+=c)):(h=this.right-l,n==="near"?u="right":n==="center"?(u="center",h-=c/2):(u="left",h=this.left)):r==="right"?a?(h=this.left+s,n==="near"?u="right":n==="center"?(u="center",h-=c/2):(u="left",h-=c)):(h=this.left+l,n==="near"?u="left":n==="center"?(u="center",h+=c/2):(u="right",h=this.right)):u="right",{textAlign:u,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,r=this.options.position;if(r==="left"||r==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(r==="top"||r==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:r},left:n,top:a,width:s,height:o}=this;r&&(e.save(),e.fillStyle=r,e.fillRect(n,a,s,o),e.restore())}getLineWidthForValue(e){const r=this.options.grid;if(!this._isVisible()||!r.display)return 0;const a=this.ticks.findIndex(s=>s.value===e);return a>=0?r.setContext(this.getContext(a)).lineWidth:0}drawGrid(e){const r=this.options.grid,n=this.ctx,a=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let s,o;const l=(c,u,h)=>{!h.width||!h.color||(n.save(),n.lineWidth=h.width,n.strokeStyle=h.color,n.setLineDash(h.borderDash||[]),n.lineDashOffset=h.borderDashOffset,n.beginPath(),n.moveTo(c.x,c.y),n.lineTo(u.x,u.y),n.stroke(),n.restore())};if(r.display)for(s=0,o=a.length;s<o;++s){const c=a[s];r.drawOnChartArea&&l({x:c.x1,y:c.y1},{x:c.x2,y:c.y2},c),r.drawTicks&&l({x:c.tx1,y:c.ty1},{x:c.tx2,y:c.ty2},{color:c.tickColor,width:c.tickWidth,borderDash:c.tickBorderDash,borderDashOffset:c.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:r,options:{border:n,grid:a}}=this,s=n.setContext(this.getContext()),o=n.display?s.width:0;if(!o)return;const l=a.setContext(this.getContext(0)).lineWidth,c=this._borderValue;let u,h,p,m;this.isHorizontal()?(u=ol(e,this.left,o)-o/2,h=ol(e,this.right,l)+l/2,p=m=c):(p=ol(e,this.top,o)-o/2,m=ol(e,this.bottom,l)+l/2,u=h=c),r.save(),r.lineWidth=s.width,r.strokeStyle=s.color,r.beginPath(),r.moveTo(u,p),r.lineTo(h,m),r.stroke(),r.restore()}drawLabels(e){if(!this.options.ticks.display)return;const n=this.ctx,a=this._computeLabelArea();a&&fN(n,a);const s=this.getLabelItems(e);for(const o of s){const l=o.options,c=o.font,u=o.label,h=o.textOffset;Nx(n,u,0,h,c,l)}a&&pN(n)}drawTitle(){const{ctx:e,options:{position:r,title:n,reverse:a}}=this;if(!n.display)return;const s=mn(n.font),o=za(n.padding),l=n.align;let c=s.lineHeight/2;r==="bottom"||r==="center"||ot(r)?(c+=o.bottom,jr(n.text)&&(c+=s.lineHeight*(n.text.length-1))):c+=o.top;const{titleX:u,titleY:h,maxWidth:p,rotation:m}=Dee(this,c,r,l);Nx(e,n.text,0,0,s,{color:n.color,maxWidth:p,rotation:m,textAlign:kee(l,r,a),textBaseline:"middle",translation:[u,h]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,r=e.ticks&&e.ticks.z||0,n=st(e.grid&&e.grid.z,-1),a=st(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==$d.prototype.draw?[{z:r,draw:s=>{this.draw(s)}}]:[{z:n,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:a,draw:()=>{this.drawBorder()}},{z:r,draw:s=>{this.drawLabels(s)}}]}getMatchingVisibleMetas(e){const r=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",a=[];let s,o;for(s=0,o=r.length;s<o;++s){const l=r[s];l[n]===this.id&&(!e||l.type===e)&&a.push(l)}return a}_resolveTickFontOptions(e){const r=this.options.ticks.setContext(this.getContext(e));return mn(r.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class Qm{constructor(e,r,n){this.type=e,this.scope=r,this.override=n,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const r=Object.getPrototypeOf(e);let n;Eee(r)&&(n=this.register(r));const a=this.items,s=e.id,o=this.scope+"."+s;if(!s)throw new Error("class does not have id: "+e);return s in a||(a[s]=e,Tee(e,o,n),this.override&&sr.override(e.id,e.overrides)),o}get(e){return this.items[e]}unregister(e){const r=this.items,n=e.id,a=this.scope;n in r&&delete r[n],a&&n in sr[a]&&(delete sr[a][n],this.override&&delete Ul[n])}}function Tee(t,e,r){const n=Ms(Object.create(null),[r?sr.get(r):{},sr.get(e),t.defaults]);sr.set(e,n),t.defaultRoutes&&Mee(e,t.defaultRoutes),t.descriptors&&sr.describe(e,t.descriptors)}function Mee(t,e){Object.keys(e).forEach(r=>{const n=r.split("."),a=n.pop(),s=[t].concat(n).join("."),o=e[r].split("."),l=o.pop(),c=o.join(".");sr.route(s,a,c,l)})}function Eee(t){return"id"in t&&"defaults"in t}class Oee{constructor(){this.controllers=new Qm(wN,"datasets",!0),this.elements=new Qm(Jl,"elements"),this.plugins=new Qm(Object,"plugins"),this.scales=new Qm($d,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,r,n){[...r].forEach(a=>{const s=n||this._getRegistryForType(a);n||s.isForType(a)||s===this.plugins&&a.id?this._exec(e,s,a):vt(a,o=>{const l=n||this._getRegistryForType(o);this._exec(e,l,o)})})}_exec(e,r,n){const a=cN(e);Rt(n["before"+a],[],n),r[e](n),Rt(n["after"+a],[],n)}_getRegistryForType(e){for(let r=0;r<this._typedRegistries.length;r++){const n=this._typedRegistries[r];if(n.isForType(e))return n}return this.plugins}_get(e,r,n){const a=r.get(e);if(a===void 0)throw new Error('"'+e+'" is not a registered '+n+".");return a}}var vs=new Oee;class Pee{constructor(){this._init=[]}notify(e,r,n,a){r==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const s=a?this._descriptors(e).filter(a):this._descriptors(e),o=this._notify(s,e,r,n);return r==="afterDestroy"&&(this._notify(s,e,"stop"),this._notify(this._init,e,"uninstall")),o}_notify(e,r,n,a){a=a||{};for(const s of e){const o=s.plugin,l=o[n],c=[r,a,s.options];if(Rt(l,c,o)===!1&&a.cancelable)return!1}return!0}invalidate(){dt(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const r=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),r}_createDescriptors(e,r){const n=e&&e.config,a=st(n.options&&n.options.plugins,{}),s=_ee(n);return a===!1&&!r?[]:Lee(e,s,a,r)}_notifyStateChanges(e){const r=this._oldCache||[],n=this._cache,a=(s,o)=>s.filter(l=>!o.some(c=>l.plugin.id===c.plugin.id));this._notify(a(r,n),e,"stop"),this._notify(a(n,r),e,"start")}}function _ee(t){const e={},r=[],n=Object.keys(vs.plugins.items);for(let s=0;s<n.length;s++)r.push(vs.getPlugin(n[s]));const a=t.plugins||[];for(let s=0;s<a.length;s++){const o=a[s];r.indexOf(o)===-1&&(r.push(o),e[o.id]=!0)}return{plugins:r,localIds:e}}function Ree(t,e){return!e&&t===!1?null:t===!0?{}:t}function Lee(t,{plugins:e,localIds:r},n,a){const s=[],o=t.getContext();for(const l of e){const c=l.id,u=Ree(n[c],a);u!==null&&s.push({plugin:l,options:zee(t.config,{plugin:l,local:r[c]},u,o)})}return s}function zee(t,{plugin:e,local:r},n,a){const s=t.pluginScopeKeys(e),o=t.getOptionScopes(n,s);return r&&e.defaults&&o.push(e.defaults),t.createResolver(o,a,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function wj(t,e){const r=sr.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||r.indexAxis||"x"}function Iee(t,e){let r=t;return t==="_index_"?r=e:t==="_value_"&&(r=e==="x"?"y":"x"),r}function Bee(t,e){return t===e?"_index_":"_value_"}function DD(t){if(t==="x"||t==="y"||t==="r")return t}function Fee(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function jj(t,...e){if(DD(t))return t;for(const r of e){const n=r.axis||Fee(r.position)||t.length>1&&DD(t[0].toLowerCase());if(n)return n}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function TD(t,e,r){if(r[e+"AxisID"]===t)return{axis:e}}function Hee(t,e){if(e.data&&e.data.datasets){const r=e.data.datasets.filter(n=>n.xAxisID===t||n.yAxisID===t);if(r.length)return TD(t,"x",r[0])||TD(t,"y",r[0])}return{}}function $ee(t,e){const r=Ul[t.type]||{scales:{}},n=e.scales||{},a=wj(t.type,e),s=Object.create(null);return Object.keys(n).forEach(o=>{const l=n[o];if(!ot(l))return console.error(`Invalid scale configuration for scale: ${o}`);if(l._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);const c=jj(o,l,Hee(o,t),sr.scales[l.type]),u=Bee(c,a),h=r.scales||{};s[o]=Yh(Object.create(null),[{axis:c},l,h[c],h[u]])}),t.data.datasets.forEach(o=>{const l=o.type||t.type,c=o.indexAxis||wj(l,e),h=(Ul[l]||{}).scales||{};Object.keys(h).forEach(p=>{const m=Iee(p,c),x=o[m+"AxisID"]||m;s[x]=s[x]||Object.create(null),Yh(s[x],[{axis:m},n[x],h[p]])})}),Object.keys(s).forEach(o=>{const l=s[o];Yh(l,[sr.scales[l.type],sr.scale])}),s}function ZR(t){const e=t.options||(t.options={});e.plugins=st(e.plugins,{}),e.scales=$ee(t,e)}function QR(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function Yee(t){return t=t||{},t.data=QR(t.data),ZR(t),t}const MD=new Map,JR=new Set;function Jm(t,e){let r=MD.get(t);return r||(r=e(),MD.set(t,r),JR.add(r)),r}const ch=(t,e,r)=>{const n=Yl(e,r);n!==void 0&&t.add(n)};class Uee{constructor(e){this._config=Yee(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=QR(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),ZR(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Jm(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,r){return Jm(`${e}.transition.${r}`,()=>[[`datasets.${e}.transitions.${r}`,`transitions.${r}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,r){return Jm(`${e}-${r}`,()=>[[`datasets.${e}.elements.${r}`,`datasets.${e}`,`elements.${r}`,""]])}pluginScopeKeys(e){const r=e.id,n=this.type;return Jm(`${n}-plugin-${r}`,()=>[[`plugins.${r}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,r){const n=this._scopeCache;let a=n.get(e);return(!a||r)&&(a=new Map,n.set(e,a)),a}getOptionScopes(e,r,n){const{options:a,type:s}=this,o=this._cachedScopes(e,n),l=o.get(r);if(l)return l;const c=new Set;r.forEach(h=>{e&&(c.add(e),h.forEach(p=>ch(c,e,p))),h.forEach(p=>ch(c,a,p)),h.forEach(p=>ch(c,Ul[s]||{},p)),h.forEach(p=>ch(c,sr,p)),h.forEach(p=>ch(c,yj,p))});const u=Array.from(c);return u.length===0&&u.push(Object.create(null)),JR.has(r)&&o.set(r,u),u}chartOptionScopes(){const{options:e,type:r}=this;return[e,Ul[r]||{},sr.datasets[r]||{},{type:r},sr,yj]}resolveNamedOptions(e,r,n,a=[""]){const s={$shared:!0},{resolver:o,subPrefixes:l}=ED(this._resolverCache,e,a);let c=o;if(Xee(o,r)){s.$shared=!1,n=jo(n)?n():n;const u=this.createResolver(e,n,l);c=bd(o,n,u)}for(const u of r)s[u]=c[u];return s}createResolver(e,r,n=[""],a){const{resolver:s}=ED(this._resolverCache,e,n);return ot(r)?bd(s,r,void 0,a):s}}function ED(t,e,r){let n=t.get(e);n||(n=new Map,t.set(e,n));const a=r.join();let s=n.get(a);return s||(s={resolver:gN(e,r),subPrefixes:r.filter(l=>!l.toLowerCase().includes("hover"))},n.set(a,s)),s}const Wee=t=>ot(t)&&Object.getOwnPropertyNames(t).some(e=>jo(t[e]));function Xee(t,e){const{isScriptable:r,isIndexable:n}=LR(t);for(const a of e){const s=r(a),o=n(a),l=(o||s)&&t[a];if(s&&(jo(l)||Wee(l))||o&&jr(l))return!0}return!1}var Vee="4.5.0";const qee=["top","bottom","left","right","chartArea"];function OD(t,e){return t==="top"||t==="bottom"||qee.indexOf(t)===-1&&e==="x"}function PD(t,e){return function(r,n){return r[t]===n[t]?r[e]-n[e]:r[t]-n[t]}}function _D(t){const e=t.chart,r=e.options.animation;e.notifyPlugins("afterRender"),Rt(r&&r.onComplete,[t],e)}function Gee(t){const e=t.chart,r=e.options.animation;Rt(r&&r.onProgress,[t],e)}function eL(t){return yN()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Ug={},RD=t=>{const e=eL(t);return Object.values(Ug).filter(r=>r.canvas===e).pop()};function Kee(t,e,r){const n=Object.keys(t);for(const a of n){const s=+a;if(s>=e){const o=t[a];delete t[a],(r>0||s>e)&&(t[s+r]=o)}}}function Zee(t,e,r,n){return!r||t.type==="mouseout"?null:n?e:t}let Ps=class{static defaults=sr;static instances=Ug;static overrides=Ul;static registry=vs;static version=Vee;static getChart=RD;static register(...e){vs.add(...e),LD()}static unregister(...e){vs.remove(...e),LD()}constructor(e,r){const n=this.config=new Uee(r),a=eL(e),s=RD(a);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");const o=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||mee(a)),this.platform.updateConfig(n);const l=this.platform.acquireContext(a,o.aspectRatio),c=l&&l.canvas,u=c&&c.height,h=c&&c.width;if(this.id=hQ(),this.ctx=l,this.canvas=c,this.width=h,this.height=u,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Pee,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=MQ(p=>this.update(p),o.resizeDelay||0),this._dataChanges=[],Ug[this.id]=this,!l||!c){console.error("Failed to create chart: can't acquire context from the given item");return}ni.listen(this,"complete",_D),ni.listen(this,"progress",Gee),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:r},width:n,height:a,_aspectRatio:s}=this;return dt(e)?r&&s?s:a?n/a:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return vs}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():oD(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return aD(this.canvas,this.ctx),this}stop(){return ni.stop(this),this}resize(e,r){ni.running(this)?this._resizeBeforeDraw={width:e,height:r}:this._resize(e,r)}_resize(e,r){const n=this.options,a=this.canvas,s=n.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(a,e,r,s),l=n.devicePixelRatio||this.platform.getDevicePixelRatio(),c=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,oD(this,l,!0)&&(this.notifyPlugins("resize",{size:o}),Rt(n.onResize,[this,o],this),this.attached&&this._doResize(c)&&this.render())}ensureScalesHaveIDs(){const r=this.options.scales||{};vt(r,(n,a)=>{n.id=a})}buildOrUpdateScales(){const e=this.options,r=e.scales,n=this.scales,a=Object.keys(n).reduce((o,l)=>(o[l]=!1,o),{});let s=[];r&&(s=s.concat(Object.keys(r).map(o=>{const l=r[o],c=jj(o,l),u=c==="r",h=c==="x";return{options:l,dposition:u?"chartArea":h?"bottom":"left",dtype:u?"radialLinear":h?"category":"linear"}}))),vt(s,o=>{const l=o.options,c=l.id,u=jj(c,l),h=st(l.type,o.dtype);(l.position===void 0||OD(l.position,u)!==OD(o.dposition))&&(l.position=o.dposition),a[c]=!0;let p=null;if(c in n&&n[c].type===h)p=n[c];else{const m=vs.getScale(h);p=new m({id:c,type:h,ctx:this.ctx,chart:this}),n[p.id]=p}p.init(l,e)}),vt(a,(o,l)=>{o||delete n[l]}),vt(n,o=>{lo.configure(this,o,o.options),lo.addBox(this,o)})}_updateMetasets(){const e=this._metasets,r=this.data.datasets.length,n=e.length;if(e.sort((a,s)=>a.index-s.index),n>r){for(let a=r;a<n;++a)this._destroyDatasetMeta(a);e.splice(r,n-r)}this._sortedMetasets=e.slice(0).sort(PD("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:r}}=this;e.length>r.length&&delete this._stacks,e.forEach((n,a)=>{r.filter(s=>s===n._dataset).length===0&&this._destroyDatasetMeta(a)})}buildOrUpdateControllers(){const e=[],r=this.data.datasets;let n,a;for(this._removeUnreferencedMetasets(),n=0,a=r.length;n<a;n++){const s=r[n];let o=this.getDatasetMeta(n);const l=s.type||this.config.type;if(o.type&&o.type!==l&&(this._destroyDatasetMeta(n),o=this.getDatasetMeta(n)),o.type=l,o.indexAxis=s.indexAxis||wj(l,this.options),o.order=s.order||0,o.index=n,o.label=""+s.label,o.visible=this.isDatasetVisible(n),o.controller)o.controller.updateIndex(n),o.controller.linkScales();else{const c=vs.getController(l),{datasetElementType:u,dataElementType:h}=sr.datasets[l];Object.assign(c,{dataElementType:vs.getElement(h),datasetElementType:u&&vs.getElement(u)}),o.controller=new c(this,n),e.push(o.controller)}}return this._updateMetasets(),e}_resetElements(){vt(this.data.datasets,(e,r)=>{this.getDatasetMeta(r).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const r=this.config;r.update();const n=this._options=r.createResolver(r.chartOptionScopes(),this.getContext()),a=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let u=0,h=this.data.datasets.length;u<h;u++){const{controller:p}=this.getDatasetMeta(u),m=!a&&s.indexOf(p)===-1;p.buildOrUpdateElements(m),o=Math.max(+p.getMaxOverflow(),o)}o=this._minPadding=n.layout.autoPadding?o:0,this._updateLayout(o),a||vt(s,u=>{u.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(PD("z","_idx"));const{_active:l,_lastEvent:c}=this;c?this._eventHandler(c,!0):l.length&&this._updateHoverStyles(l,l,!0),this.render()}_updateScales(){vt(this.scales,e=>{lo.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,r=new Set(Object.keys(this._listeners)),n=new Set(e.events);(!q6(r,n)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,r=this._getUniformDataChanges()||[];for(const{method:n,start:a,count:s}of r){const o=n==="_removeElements"?-s:s;Kee(e,a,o)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const r=this.data.datasets.length,n=s=>new Set(e.filter(o=>o[0]===s).map((o,l)=>l+","+o.splice(1).join(","))),a=n(0);for(let s=1;s<r;s++)if(!q6(a,n(s)))return;return Array.from(a).map(s=>s.split(",")).map(s=>({method:s[1],start:+s[2],count:+s[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;lo.update(this,this.width,this.height,e);const r=this.chartArea,n=r.width<=0||r.height<=0;this._layers=[],vt(this.boxes,a=>{n&&a.position==="chartArea"||(a.configure&&a.configure(),this._layers.push(...a._layers()))},this),this._layers.forEach((a,s)=>{a._idx=s}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let r=0,n=this.data.datasets.length;r<n;++r)this.getDatasetMeta(r).controller.configure();for(let r=0,n=this.data.datasets.length;r<n;++r)this._updateDataset(r,jo(e)?e({datasetIndex:r}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,r){const n=this.getDatasetMeta(e),a={meta:n,index:e,mode:r,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",a)!==!1&&(n.controller._update(r),a.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",a))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(ni.has(this)?this.attached&&!ni.running(this)&&ni.start(this):(this.draw(),_D({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:n,height:a}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(n,a)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const r=this._layers;for(e=0;e<r.length&&r[e].z<=0;++e)r[e].draw(this.chartArea);for(this._drawDatasets();e<r.length;++e)r[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const r=this._sortedMetasets,n=[];let a,s;for(a=0,s=r.length;a<s;++a){const o=r[a];(!e||o.visible)&&n.push(o)}return n}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let r=e.length-1;r>=0;--r)this._drawDataset(e[r]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const r=this.ctx,n={meta:e,index:e.index,cancelable:!0},a=mJ(this,e);this.notifyPlugins("beforeDatasetDraw",n)!==!1&&(a&&fN(r,a),e.controller.draw(),a&&pN(r),n.cancelable=!1,this.notifyPlugins("afterDatasetDraw",n))}isPointInArea(e){return hN(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,r,n,a){const s=qJ.modes[r];return typeof s=="function"?s(this,e,n,a):[]}getDatasetMeta(e){const r=this.data.datasets[e],n=this._metasets;let a=n.filter(s=>s&&s._dataset===r).pop();return a||(a={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:r&&r.order||0,index:e,_dataset:r,_parsed:[],_sorted:!1},n.push(a)),a}getContext(){return this.$context||(this.$context=Hd(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const r=this.data.datasets[e];if(!r)return!1;const n=this.getDatasetMeta(e);return typeof n.hidden=="boolean"?!n.hidden:!r.hidden}setDatasetVisibility(e,r){const n=this.getDatasetMeta(e);n.hidden=!r}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,r,n){const a=n?"show":"hide",s=this.getDatasetMeta(e),o=s.controller._resolveAnimations(void 0,a);pf(r)?(s.data[r].hidden=!n,this.update()):(this.setDatasetVisibility(e,n),o.update(s,{visible:n}),this.update(l=>l.datasetIndex===e?a:void 0))}hide(e,r){this._updateVisibility(e,r,!1)}show(e,r){this._updateVisibility(e,r,!0)}_destroyDatasetMeta(e){const r=this._metasets[e];r&&r.controller&&r.controller._destroy(),delete this._metasets[e]}_stop(){let e,r;for(this.stop(),ni.remove(this),e=0,r=this.data.datasets.length;e<r;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:r}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),aD(e,r),this.platform.releaseContext(r),this.canvas=null,this.ctx=null),delete Ug[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,r=this.platform,n=(s,o)=>{r.addEventListener(this,s,o),e[s]=o},a=(s,o,l)=>{s.offsetX=o,s.offsetY=l,this._eventHandler(s)};vt(this.options.events,s=>n(s,a))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,r=this.platform,n=(c,u)=>{r.addEventListener(this,c,u),e[c]=u},a=(c,u)=>{e[c]&&(r.removeEventListener(this,c,u),delete e[c])},s=(c,u)=>{this.canvas&&this.resize(c,u)};let o;const l=()=>{a("attach",l),this.attached=!0,this.resize(),n("resize",s),n("detach",o)};o=()=>{this.attached=!1,a("resize",s),this._stop(),this._resize(0,0),n("attach",l)},r.isAttached(this.canvas)?l():o()}unbindEvents(){vt(this._listeners,(e,r)=>{this.platform.removeEventListener(this,r,e)}),this._listeners={},vt(this._responsiveListeners,(e,r)=>{this.platform.removeEventListener(this,r,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,r,n){const a=n?"set":"remove";let s,o,l,c;for(r==="dataset"&&(s=this.getDatasetMeta(e[0].datasetIndex),s.controller["_"+a+"DatasetHoverStyle"]()),l=0,c=e.length;l<c;++l){o=e[l];const u=o&&this.getDatasetMeta(o.datasetIndex).controller;u&&u[a+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const r=this._active||[],n=e.map(({datasetIndex:s,index:o})=>{const l=this.getDatasetMeta(s);if(!l)throw new Error("No dataset found at index "+s);return{datasetIndex:s,element:l.data[o],index:o}});!bx(n,r)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,r))}notifyPlugins(e,r,n){return this._plugins.notify(this,e,r,n)}isPluginEnabled(e){return this._plugins._cache.filter(r=>r.plugin.id===e).length===1}_updateHoverStyles(e,r,n){const a=this.options.hover,s=(c,u)=>c.filter(h=>!u.some(p=>h.datasetIndex===p.datasetIndex&&h.index===p.index)),o=s(r,e),l=n?e:s(e,r);o.length&&this.updateHoverStyle(o,a.mode,!1),l.length&&a.mode&&this.updateHoverStyle(l,a.mode,!0)}_eventHandler(e,r){const n={event:e,replay:r,cancelable:!0,inChartArea:this.isPointInArea(e)},a=o=>(o.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",n,a)===!1)return;const s=this._handleEvent(e,r,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,a),(s||n.changed)&&this.render(),this}_handleEvent(e,r,n){const{_active:a=[],options:s}=this,o=r,l=this._getActiveElements(e,a,n,o),c=bQ(e),u=Zee(e,this._lastEvent,n,c);n&&(this._lastEvent=null,Rt(s.onHover,[e,l,this],this),c&&Rt(s.onClick,[e,l,this],this));const h=!bx(l,a);return(h||r)&&(this._active=l,this._updateHoverStyles(l,a,r)),this._lastEvent=u,h}_getActiveElements(e,r,n,a){if(e.type==="mouseout")return[];if(!n)return r;const s=this.options.hover;return this.getElementsAtEventForMode(e,s.mode,s,a)}};function LD(){return vt(Ps.instances,t=>t._plugins.invalidate())}function Qee(t,e,r){const{startAngle:n,x:a,y:s,outerRadius:o,innerRadius:l,options:c}=e,{borderWidth:u,borderJoinStyle:h}=c,p=Math.min(u/o,ws(n-r));if(t.beginPath(),t.arc(a,s,o-u/2,n+p/2,r-p/2),l>0){const m=Math.min(u/l,ws(n-r));t.arc(a,s,l+u/2,r-m/2,n+m/2,!0)}else{const m=Math.min(u/2,o*ws(n-r));if(h==="round")t.arc(a,s,m,r-Yt/2,n+Yt/2,!0);else if(h==="bevel"){const x=2*m*m,y=-x*Math.cos(r+Yt/2)+a,b=-x*Math.sin(r+Yt/2)+s,w=x*Math.cos(n+Yt/2)+a,N=x*Math.sin(n+Yt/2)+s;t.lineTo(y,b),t.lineTo(w,N)}}t.closePath(),t.moveTo(0,0),t.rect(0,0,t.canvas.width,t.canvas.height),t.clip("evenodd")}function Jee(t,e,r){const{startAngle:n,pixelMargin:a,x:s,y:o,outerRadius:l,innerRadius:c}=e;let u=a/l;t.beginPath(),t.arc(s,o,l,n-u,r+u),c>a?(u=a/c,t.arc(s,o,c,r+u,n-u,!0)):t.arc(s,o,a,r+Sr,n-Sr),t.closePath(),t.clip()}function ete(t){return mN(t,["outerStart","outerEnd","innerStart","innerEnd"])}function tte(t,e,r,n){const a=ete(t.options.borderRadius),s=(r-e)/2,o=Math.min(s,n*e/2),l=c=>{const u=(r-Math.min(s,c))*n/2;return On(c,0,Math.min(s,u))};return{outerStart:l(a.outerStart),outerEnd:l(a.outerEnd),innerStart:On(a.innerStart,0,o),innerEnd:On(a.innerEnd,0,o)}}function Xc(t,e,r,n){return{x:r+t*Math.cos(e),y:n+t*Math.sin(e)}}function kx(t,e,r,n,a,s){const{x:o,y:l,startAngle:c,pixelMargin:u,innerRadius:h}=e,p=Math.max(e.outerRadius+n+r-u,0),m=h>0?h+n+r+u:0;let x=0;const y=a-c;if(n){const X=h>0?h-n:0,H=p>0?p-n:0,W=(X+H)/2,V=W!==0?y*W/(W+n):y;x=(y-V)/2}const b=Math.max(.001,y*p-r/Yt)/p,w=(y-b)/2,N=c+w+x,A=a-w-x,{outerStart:S,outerEnd:C,innerStart:k,innerEnd:T}=tte(e,m,p,A-N),E=p-S,_=p-C,L=N+S/E,P=A-C/_,R=m+k,z=m+T,B=N+k/R,Y=A-T/z;if(t.beginPath(),s){const X=(L+P)/2;if(t.arc(o,l,p,L,X),t.arc(o,l,p,X,P),C>0){const Z=Xc(_,P,o,l);t.arc(Z.x,Z.y,C,P,A+Sr)}const H=Xc(z,A,o,l);if(t.lineTo(H.x,H.y),T>0){const Z=Xc(z,Y,o,l);t.arc(Z.x,Z.y,T,A+Sr,Y+Math.PI)}const W=(A-T/m+(N+k/m))/2;if(t.arc(o,l,m,A-T/m,W,!0),t.arc(o,l,m,W,N+k/m,!0),k>0){const Z=Xc(R,B,o,l);t.arc(Z.x,Z.y,k,B+Math.PI,N-Sr)}const V=Xc(E,N,o,l);if(t.lineTo(V.x,V.y),S>0){const Z=Xc(E,L,o,l);t.arc(Z.x,Z.y,S,N-Sr,L)}}else{t.moveTo(o,l);const X=Math.cos(L)*p+o,H=Math.sin(L)*p+l;t.lineTo(X,H);const W=Math.cos(P)*p+o,V=Math.sin(P)*p+l;t.lineTo(W,V)}t.closePath()}function rte(t,e,r,n,a){const{fullCircles:s,startAngle:o,circumference:l}=e;let c=e.endAngle;if(s){kx(t,e,r,n,c,a);for(let u=0;u<s;++u)t.fill();isNaN(l)||(c=o+(l%mr||mr))}return kx(t,e,r,n,c,a),t.fill(),c}function nte(t,e,r,n,a){const{fullCircles:s,startAngle:o,circumference:l,options:c}=e,{borderWidth:u,borderJoinStyle:h,borderDash:p,borderDashOffset:m,borderRadius:x}=c,y=c.borderAlign==="inner";if(!u)return;t.setLineDash(p||[]),t.lineDashOffset=m,y?(t.lineWidth=u*2,t.lineJoin=h||"round"):(t.lineWidth=u,t.lineJoin=h||"bevel");let b=e.endAngle;if(s){kx(t,e,r,n,b,a);for(let w=0;w<s;++w)t.stroke();isNaN(l)||(b=o+(l%mr||mr))}y&&Jee(t,e,b),c.selfJoin&&b-o>=Yt&&x===0&&h!=="miter"&&Qee(t,e,b),s||(kx(t,e,r,n,b,a),t.stroke())}class Do extends Jl{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:e=>e!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(e){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,r,n){const a=this.getProps(["x","y"],n),{angle:s,distance:o}=CR(a,{x:e,y:r}),{startAngle:l,endAngle:c,innerRadius:u,outerRadius:h,circumference:p}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),m=(this.options.spacing+this.options.borderWidth)/2,x=st(p,c-l),y=jx(s,l,c)&&l!==c,b=x>=mr||y,w=vl(o,u+m,h+m);return b&&w}getCenterPoint(e){const{x:r,y:n,startAngle:a,endAngle:s,innerRadius:o,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:c,spacing:u}=this.options,h=(a+s)/2,p=(o+l+u+c)/2;return{x:r+Math.cos(h)*p,y:n+Math.sin(h)*p}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:r,circumference:n}=this,a=(r.offset||0)/4,s=(r.spacing||0)/2,o=r.circular;if(this.pixelMargin=r.borderAlign==="inner"?.33:0,this.fullCircles=n>mr?Math.floor(n/mr):0,n===0||this.innerRadius<0||this.outerRadius<0)return;e.save();const l=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(l)*a,Math.sin(l)*a);const c=1-Math.sin(Math.min(Yt,n||0)),u=a*c;e.fillStyle=r.backgroundColor,e.strokeStyle=r.borderColor,rte(e,this,u,s,o),nte(e,this,u,s,o),e.restore()}}function zD(t,e,r,n){const a=t.options,{[r]:s}=t.getProps([r],n);return Math.abs(e-s)<a.radius+a.hitRadius}class ate extends Jl{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(e){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,r,n){const a=this.options,{x:s,y:o}=this.getProps(["x","y"],n);return Math.pow(e-s,2)+Math.pow(r-o,2)<Math.pow(a.hitRadius+a.radius,2)}inXRange(e,r){return zD(this,e,"x",r)}inYRange(e,r){return zD(this,e,"y",r)}getCenterPoint(e){const{x:r,y:n}=this.getProps(["x","y"],e);return{x:r,y:n}}size(e){e=e||this.options||{};let r=e.radius||0;r=Math.max(r,r&&e.hoverRadius||0);const n=r&&e.borderWidth||0;return(r+n)*2}draw(e,r){const n=this.options;this.skip||n.radius<.1||!hN(this,r,this.size(n)/2)||(e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.fillStyle=n.backgroundColor,vj(e,n,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}function tL(t,e){const{x:r,y:n,base:a,width:s,height:o}=t.getProps(["x","y","base","width","height"],e);let l,c,u,h,p;return t.horizontal?(p=o/2,l=Math.min(r,a),c=Math.max(r,a),u=n-p,h=n+p):(p=s/2,l=r-p,c=r+p,u=Math.min(n,a),h=Math.max(n,a)),{left:l,top:u,right:c,bottom:h}}function co(t,e,r,n){return t?0:On(e,r,n)}function ste(t,e,r){const n=t.options.borderWidth,a=t.borderSkipped,s=RR(n);return{t:co(a.top,s.top,0,r),r:co(a.right,s.right,0,e),b:co(a.bottom,s.bottom,0,r),l:co(a.left,s.left,0,e)}}function ite(t,e,r){const{enableBorderRadius:n}=t.getProps(["enableBorderRadius"]),a=t.options.borderRadius,s=od(a),o=Math.min(e,r),l=t.borderSkipped,c=n||ot(a);return{topLeft:co(!c||l.top||l.left,s.topLeft,0,o),topRight:co(!c||l.top||l.right,s.topRight,0,o),bottomLeft:co(!c||l.bottom||l.left,s.bottomLeft,0,o),bottomRight:co(!c||l.bottom||l.right,s.bottomRight,0,o)}}function ote(t){const e=tL(t),r=e.right-e.left,n=e.bottom-e.top,a=ste(t,r/2,n/2),s=ite(t,r/2,n/2);return{outer:{x:e.left,y:e.top,w:r,h:n,radius:s},inner:{x:e.left+a.l,y:e.top+a.t,w:r-a.l-a.r,h:n-a.t-a.b,radius:{topLeft:Math.max(0,s.topLeft-Math.max(a.t,a.l)),topRight:Math.max(0,s.topRight-Math.max(a.t,a.r)),bottomLeft:Math.max(0,s.bottomLeft-Math.max(a.b,a.l)),bottomRight:Math.max(0,s.bottomRight-Math.max(a.b,a.r))}}}}function I1(t,e,r,n){const a=e===null,s=r===null,l=t&&!(a&&s)&&tL(t,n);return l&&(a||vl(e,l.left,l.right))&&(s||vl(r,l.top,l.bottom))}function lte(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function cte(t,e){t.rect(e.x,e.y,e.w,e.h)}function B1(t,e,r={}){const n=t.x!==r.x?-e:0,a=t.y!==r.y?-e:0,s=(t.x+t.w!==r.x+r.w?e:0)-n,o=(t.y+t.h!==r.y+r.h?e:0)-a;return{x:t.x+n,y:t.y+a,w:t.w+s,h:t.h+o,radius:t.radius}}class rL extends Jl{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(e){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,e&&Object.assign(this,e)}draw(e){const{inflateAmount:r,options:{borderColor:n,backgroundColor:a}}=this,{inner:s,outer:o}=ote(this),l=lte(o.radius)?Sx:cte;e.save(),(o.w!==s.w||o.h!==s.h)&&(e.beginPath(),l(e,B1(o,r,s)),e.clip(),l(e,B1(s,-r,o)),e.fillStyle=n,e.fill("evenodd")),e.beginPath(),l(e,B1(s,r)),e.fillStyle=a,e.fill(),e.restore()}inRange(e,r,n){return I1(this,e,r,n)}inXRange(e,r){return I1(this,e,null,r)}inYRange(e,r){return I1(this,null,e,r)}getCenterPoint(e){const{x:r,y:n,base:a,horizontal:s}=this.getProps(["x","y","base","horizontal"],e);return{x:s?(r+a)/2:r,y:s?n:(n+a)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}const ID=(t,e)=>{let{boxHeight:r=e,boxWidth:n=e}=t;return t.usePointStyle&&(r=Math.min(r,e),n=t.pointStyleWidth||Math.min(n,e)),{boxWidth:n,boxHeight:r,itemHeight:Math.max(e,r)}},dte=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class BD extends Jl{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,r,n){this.maxWidth=e,this.maxHeight=r,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let r=Rt(e.generateLabels,[this.chart],this)||[];e.filter&&(r=r.filter(n=>e.filter(n,this.chart.data))),e.sort&&(r=r.sort((n,a)=>e.sort(n,a,this.chart.data))),this.options.reverse&&r.reverse(),this.legendItems=r}fit(){const{options:e,ctx:r}=this;if(!e.display){this.width=this.height=0;return}const n=e.labels,a=mn(n.font),s=a.size,o=this._computeTitleHeight(),{boxWidth:l,itemHeight:c}=ID(n,s);let u,h;r.font=a.string,this.isHorizontal()?(u=this.maxWidth,h=this._fitRows(o,s,l,c)+10):(h=this.maxHeight,u=this._fitCols(o,a,l,c)+10),this.width=Math.min(u,e.maxWidth||this.maxWidth),this.height=Math.min(h,e.maxHeight||this.maxHeight)}_fitRows(e,r,n,a){const{ctx:s,maxWidth:o,options:{labels:{padding:l}}}=this,c=this.legendHitBoxes=[],u=this.lineWidths=[0],h=a+l;let p=e;s.textAlign="left",s.textBaseline="middle";let m=-1,x=-h;return this.legendItems.forEach((y,b)=>{const w=n+r/2+s.measureText(y.text).width;(b===0||u[u.length-1]+w+2*l>o)&&(p+=h,u[u.length-(b>0?0:1)]=0,x+=h,m++),c[b]={left:0,top:x,row:m,width:w,height:a},u[u.length-1]+=w+l}),p}_fitCols(e,r,n,a){const{ctx:s,maxHeight:o,options:{labels:{padding:l}}}=this,c=this.legendHitBoxes=[],u=this.columnSizes=[],h=o-e;let p=l,m=0,x=0,y=0,b=0;return this.legendItems.forEach((w,N)=>{const{itemWidth:A,itemHeight:S}=ute(n,r,s,w,a);N>0&&x+S+2*l>h&&(p+=m+l,u.push({width:m,height:x}),y+=m+l,b++,m=x=0),c[N]={left:y,top:x,col:b,width:A,height:S},m=Math.max(m,A),x+=S+l}),p+=m,u.push({width:m,height:x}),p}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:r,options:{align:n,labels:{padding:a},rtl:s}}=this,o=ld(s,this.left,this.width);if(this.isHorizontal()){let l=0,c=Kn(n,this.left+a,this.right-this.lineWidths[l]);for(const u of r)l!==u.row&&(l=u.row,c=Kn(n,this.left+a,this.right-this.lineWidths[l])),u.top+=this.top+e+a,u.left=o.leftForLtr(o.x(c),u.width),c+=u.width+a}else{let l=0,c=Kn(n,this.top+e+a,this.bottom-this.columnSizes[l].height);for(const u of r)u.col!==l&&(l=u.col,c=Kn(n,this.top+e+a,this.bottom-this.columnSizes[l].height)),u.top=c,u.left+=this.left+a,u.left=o.leftForLtr(o.x(u.left),u.width),c+=u.height+a}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;fN(e,this),this._draw(),pN(e)}}_draw(){const{options:e,columnSizes:r,lineWidths:n,ctx:a}=this,{align:s,labels:o}=e,l=sr.color,c=ld(e.rtl,this.left,this.width),u=mn(o.font),{padding:h}=o,p=u.size,m=p/2;let x;this.drawTitle(),a.textAlign=c.textAlign("left"),a.textBaseline="middle",a.lineWidth=.5,a.font=u.string;const{boxWidth:y,boxHeight:b,itemHeight:w}=ID(o,p),N=function(T,E,_){if(isNaN(y)||y<=0||isNaN(b)||b<0)return;a.save();const L=st(_.lineWidth,1);if(a.fillStyle=st(_.fillStyle,l),a.lineCap=st(_.lineCap,"butt"),a.lineDashOffset=st(_.lineDashOffset,0),a.lineJoin=st(_.lineJoin,"miter"),a.lineWidth=L,a.strokeStyle=st(_.strokeStyle,l),a.setLineDash(st(_.lineDash,[])),o.usePointStyle){const P={radius:b*Math.SQRT2/2,pointStyle:_.pointStyle,rotation:_.rotation,borderWidth:L},R=c.xPlus(T,y/2),z=E+m;_R(a,P,R,z,o.pointStyleWidth&&y)}else{const P=E+Math.max((p-b)/2,0),R=c.leftForLtr(T,y),z=od(_.borderRadius);a.beginPath(),Object.values(z).some(B=>B!==0)?Sx(a,{x:R,y:P,w:y,h:b,radius:z}):a.rect(R,P,y,b),a.fill(),L!==0&&a.stroke()}a.restore()},A=function(T,E,_){Nx(a,_.text,T,E+w/2,u,{strikethrough:_.hidden,textAlign:c.textAlign(_.textAlign)})},S=this.isHorizontal(),C=this._computeTitleHeight();S?x={x:Kn(s,this.left+h,this.right-n[0]),y:this.top+h+C,line:0}:x={x:this.left+h,y:Kn(s,this.top+C+h,this.bottom-r[0].height),line:0},FR(this.ctx,e.textDirection);const k=w+h;this.legendItems.forEach((T,E)=>{a.strokeStyle=T.fontColor,a.fillStyle=T.fontColor;const _=a.measureText(T.text).width,L=c.textAlign(T.textAlign||(T.textAlign=o.textAlign)),P=y+m+_;let R=x.x,z=x.y;c.setWidth(this.width),S?E>0&&R+P+h>this.right&&(z=x.y+=k,x.line++,R=x.x=Kn(s,this.left+h,this.right-n[x.line])):E>0&&z+k>this.bottom&&(R=x.x=R+r[x.line].width+h,x.line++,z=x.y=Kn(s,this.top+C+h,this.bottom-r[x.line].height));const B=c.x(R);if(N(B,z,T),R=EQ(L,R+y+m,S?R+P:this.right,e.rtl),A(c.x(R),z,T),S)x.x+=P+h;else if(typeof T.text!="string"){const Y=u.lineHeight;x.y+=nL(T,Y)+h}else x.y+=k}),HR(this.ctx,e.textDirection)}drawTitle(){const e=this.options,r=e.title,n=mn(r.font),a=za(r.padding);if(!r.display)return;const s=ld(e.rtl,this.left,this.width),o=this.ctx,l=r.position,c=n.size/2,u=a.top+c;let h,p=this.left,m=this.width;if(this.isHorizontal())m=Math.max(...this.lineWidths),h=this.top+u,p=Kn(e.align,p,this.right-m);else{const y=this.columnSizes.reduce((b,w)=>Math.max(b,w.height),0);h=u+Kn(e.align,this.top,this.bottom-y-e.labels.padding-this._computeTitleHeight())}const x=Kn(l,p,p+m);o.textAlign=s.textAlign(ER(l)),o.textBaseline="middle",o.strokeStyle=r.color,o.fillStyle=r.color,o.font=n.string,Nx(o,r.text,x,h,n)}_computeTitleHeight(){const e=this.options.title,r=mn(e.font),n=za(e.padding);return e.display?r.lineHeight+n.height:0}_getLegendItemAt(e,r){let n,a,s;if(vl(e,this.left,this.right)&&vl(r,this.top,this.bottom)){for(s=this.legendHitBoxes,n=0;n<s.length;++n)if(a=s[n],vl(e,a.left,a.left+a.width)&&vl(r,a.top,a.top+a.height))return this.legendItems[n]}return null}handleEvent(e){const r=this.options;if(!pte(e.type,r))return;const n=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const a=this._hoveredItem,s=dte(a,n);a&&!s&&Rt(r.onLeave,[e,a,this],this),this._hoveredItem=n,n&&!s&&Rt(r.onHover,[e,n,this],this)}else n&&Rt(r.onClick,[e,n,this],this)}}function ute(t,e,r,n,a){const s=hte(n,t,e,r),o=fte(a,n,e.lineHeight);return{itemWidth:s,itemHeight:o}}function hte(t,e,r,n){let a=t.text;return a&&typeof a!="string"&&(a=a.reduce((s,o)=>s.length>o.length?s:o)),e+r.size/2+n.measureText(a).width}function fte(t,e,r){let n=t;return typeof e.text!="string"&&(n=nL(e,r)),n}function nL(t,e){const r=t.text?t.text.length:0;return e*r}function pte(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var ec={id:"legend",_element:BD,start(t,e,r){const n=t.legend=new BD({ctx:t.ctx,options:r,chart:t});lo.configure(t,n,r),lo.addBox(t,n)},stop(t){lo.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,r){const n=t.legend;lo.configure(t,n,r),n.options=r},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,r){const n=e.datasetIndex,a=r.chart;a.isDatasetVisible(n)?(a.hide(n),e.hidden=!0):(a.show(n),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:r,pointStyle:n,textAlign:a,color:s,useBorderRadius:o,borderRadius:l}}=t.legend.options;return t._getSortedDatasetMetas().map(c=>{const u=c.controller.getStyle(r?0:void 0),h=za(u.borderWidth);return{text:e[c.index].label,fillStyle:u.backgroundColor,fontColor:s,hidden:!c.visible,lineCap:u.borderCapStyle,lineDash:u.borderDash,lineDashOffset:u.borderDashOffset,lineJoin:u.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:u.borderColor,pointStyle:n||u.pointStyle,rotation:u.rotation,textAlign:a||u.textAlign,borderRadius:o&&(l||u.borderRadius),datasetIndex:c.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};const Ch={average(t){if(!t.length)return!1;let e,r,n=new Set,a=0,s=0;for(e=0,r=t.length;e<r;++e){const l=t[e].element;if(l&&l.hasValue()){const c=l.tooltipPosition();n.add(c.x),a+=c.y,++s}}return s===0||n.size===0?!1:{x:[...n].reduce((l,c)=>l+c)/n.size,y:a/s}},nearest(t,e){if(!t.length)return!1;let r=e.x,n=e.y,a=Number.POSITIVE_INFINITY,s,o,l;for(s=0,o=t.length;s<o;++s){const c=t[s].element;if(c&&c.hasValue()){const u=c.getCenterPoint(),h=AQ(e,u);h<a&&(a=h,l=c)}}if(l){const c=l.tooltipPosition();r=c.x,n=c.y}return{x:r,y:n}}};function ys(t,e){return e&&(jr(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function ai(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(`
`)>-1?t.split(`
`):t}function mte(t,e){const{element:r,datasetIndex:n,index:a}=e,s=t.getDatasetMeta(n).controller,{label:o,value:l}=s.getLabelAndValue(a);return{chart:t,label:o,parsed:s.getParsed(a),raw:t.data.datasets[n].data[a],formattedValue:l,dataset:s.getDataset(),dataIndex:a,datasetIndex:n,element:r}}function FD(t,e){const r=t.chart.ctx,{body:n,footer:a,title:s}=t,{boxWidth:o,boxHeight:l}=e,c=mn(e.bodyFont),u=mn(e.titleFont),h=mn(e.footerFont),p=s.length,m=a.length,x=n.length,y=za(e.padding);let b=y.height,w=0,N=n.reduce((C,k)=>C+k.before.length+k.lines.length+k.after.length,0);if(N+=t.beforeBody.length+t.afterBody.length,p&&(b+=p*u.lineHeight+(p-1)*e.titleSpacing+e.titleMarginBottom),N){const C=e.displayColors?Math.max(l,c.lineHeight):c.lineHeight;b+=x*C+(N-x)*c.lineHeight+(N-1)*e.bodySpacing}m&&(b+=e.footerMarginTop+m*h.lineHeight+(m-1)*e.footerSpacing);let A=0;const S=function(C){w=Math.max(w,r.measureText(C).width+A)};return r.save(),r.font=u.string,vt(t.title,S),r.font=c.string,vt(t.beforeBody.concat(t.afterBody),S),A=e.displayColors?o+2+e.boxPadding:0,vt(n,C=>{vt(C.before,S),vt(C.lines,S),vt(C.after,S)}),A=0,r.font=h.string,vt(t.footer,S),r.restore(),w+=y.width,{width:w,height:b}}function gte(t,e){const{y:r,height:n}=e;return r<n/2?"top":r>t.height-n/2?"bottom":"center"}function xte(t,e,r,n){const{x:a,width:s}=n,o=r.caretSize+r.caretPadding;if(t==="left"&&a+s+o>e.width||t==="right"&&a-s-o<0)return!0}function bte(t,e,r,n){const{x:a,width:s}=r,{width:o,chartArea:{left:l,right:c}}=t;let u="center";return n==="center"?u=a<=(l+c)/2?"left":"right":a<=s/2?u="left":a>=o-s/2&&(u="right"),xte(u,t,e,r)&&(u="center"),u}function HD(t,e,r){const n=r.yAlign||e.yAlign||gte(t,r);return{xAlign:r.xAlign||e.xAlign||bte(t,e,r,n),yAlign:n}}function yte(t,e){let{x:r,width:n}=t;return e==="right"?r-=n:e==="center"&&(r-=n/2),r}function vte(t,e,r){let{y:n,height:a}=t;return e==="top"?n+=r:e==="bottom"?n-=a+r:n-=a/2,n}function $D(t,e,r,n){const{caretSize:a,caretPadding:s,cornerRadius:o}=t,{xAlign:l,yAlign:c}=r,u=a+s,{topLeft:h,topRight:p,bottomLeft:m,bottomRight:x}=od(o);let y=yte(e,l);const b=vte(e,c,u);return c==="center"?l==="left"?y+=u:l==="right"&&(y-=u):l==="left"?y-=Math.max(h,m)+a:l==="right"&&(y+=Math.max(p,x)+a),{x:On(y,0,n.width-e.width),y:On(b,0,n.height-e.height)}}function eg(t,e,r){const n=za(r.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-n.right:t.x+n.left}function YD(t){return ys([],ai(t))}function wte(t,e,r){return Hd(t,{tooltip:e,tooltipItems:r,type:"tooltip"})}function UD(t,e){const r=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return r?t.override(r):t}const aL={beforeTitle:ei,title(t){if(t.length>0){const e=t[0],r=e.chart.data.labels,n=r?r.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex<n)return r[e.dataIndex]}return""},afterTitle:ei,beforeBody:ei,beforeLabel:ei,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const r=t.formattedValue;return dt(r)||(e+=r),e},labelColor(t){const r=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:r.borderColor,backgroundColor:r.backgroundColor,borderWidth:r.borderWidth,borderDash:r.borderDash,borderDashOffset:r.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const r=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:r.pointStyle,rotation:r.rotation}},afterLabel:ei,afterBody:ei,beforeFooter:ei,footer:ei,afterFooter:ei};function kn(t,e,r,n){const a=t[e].call(r,n);return typeof a>"u"?aL[e].call(r,n):a}let WD=class extends Jl{static positioners=Ch;constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const r=this.chart,n=this.options.setContext(this.getContext()),a=n.enabled&&r.options.animation&&n.animations,s=new $R(this.chart,a);return a._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=wte(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,r){const{callbacks:n}=r,a=kn(n,"beforeTitle",this,e),s=kn(n,"title",this,e),o=kn(n,"afterTitle",this,e);let l=[];return l=ys(l,ai(a)),l=ys(l,ai(s)),l=ys(l,ai(o)),l}getBeforeBody(e,r){return YD(kn(r.callbacks,"beforeBody",this,e))}getBody(e,r){const{callbacks:n}=r,a=[];return vt(e,s=>{const o={before:[],lines:[],after:[]},l=UD(n,s);ys(o.before,ai(kn(l,"beforeLabel",this,s))),ys(o.lines,kn(l,"label",this,s)),ys(o.after,ai(kn(l,"afterLabel",this,s))),a.push(o)}),a}getAfterBody(e,r){return YD(kn(r.callbacks,"afterBody",this,e))}getFooter(e,r){const{callbacks:n}=r,a=kn(n,"beforeFooter",this,e),s=kn(n,"footer",this,e),o=kn(n,"afterFooter",this,e);let l=[];return l=ys(l,ai(a)),l=ys(l,ai(s)),l=ys(l,ai(o)),l}_createItems(e){const r=this._active,n=this.chart.data,a=[],s=[],o=[];let l=[],c,u;for(c=0,u=r.length;c<u;++c)l.push(mte(this.chart,r[c]));return e.filter&&(l=l.filter((h,p,m)=>e.filter(h,p,m,n))),e.itemSort&&(l=l.sort((h,p)=>e.itemSort(h,p,n))),vt(l,h=>{const p=UD(e.callbacks,h);a.push(kn(p,"labelColor",this,h)),s.push(kn(p,"labelPointStyle",this,h)),o.push(kn(p,"labelTextColor",this,h))}),this.labelColors=a,this.labelPointStyles=s,this.labelTextColors=o,this.dataPoints=l,l}update(e,r){const n=this.options.setContext(this.getContext()),a=this._active;let s,o=[];if(!a.length)this.opacity!==0&&(s={opacity:0});else{const l=Ch[n.position].call(this,a,this._eventPosition);o=this._createItems(n),this.title=this.getTitle(o,n),this.beforeBody=this.getBeforeBody(o,n),this.body=this.getBody(o,n),this.afterBody=this.getAfterBody(o,n),this.footer=this.getFooter(o,n);const c=this._size=FD(this,n),u=Object.assign({},l,c),h=HD(this.chart,n,u),p=$D(n,u,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,s={opacity:1,x:p.x,y:p.y,width:c.width,height:c.height,caretX:l.x,caretY:l.y}}this._tooltipItems=o,this.$context=void 0,s&&this._resolveAnimations().update(this,s),e&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:r})}drawCaret(e,r,n,a){const s=this.getCaretPosition(e,n,a);r.lineTo(s.x1,s.y1),r.lineTo(s.x2,s.y2),r.lineTo(s.x3,s.y3)}getCaretPosition(e,r,n){const{xAlign:a,yAlign:s}=this,{caretSize:o,cornerRadius:l}=n,{topLeft:c,topRight:u,bottomLeft:h,bottomRight:p}=od(l),{x:m,y:x}=e,{width:y,height:b}=r;let w,N,A,S,C,k;return s==="center"?(C=x+b/2,a==="left"?(w=m,N=w-o,S=C+o,k=C-o):(w=m+y,N=w+o,S=C-o,k=C+o),A=w):(a==="left"?N=m+Math.max(c,h)+o:a==="right"?N=m+y-Math.max(u,p)-o:N=this.caretX,s==="top"?(S=x,C=S-o,w=N-o,A=N+o):(S=x+b,C=S+o,w=N+o,A=N-o),k=S),{x1:w,x2:N,x3:A,y1:S,y2:C,y3:k}}drawTitle(e,r,n){const a=this.title,s=a.length;let o,l,c;if(s){const u=ld(n.rtl,this.x,this.width);for(e.x=eg(this,n.titleAlign,n),r.textAlign=u.textAlign(n.titleAlign),r.textBaseline="middle",o=mn(n.titleFont),l=n.titleSpacing,r.fillStyle=n.titleColor,r.font=o.string,c=0;c<s;++c)r.fillText(a[c],u.x(e.x),e.y+o.lineHeight/2),e.y+=o.lineHeight+l,c+1===s&&(e.y+=n.titleMarginBottom-l)}}_drawColorBox(e,r,n,a,s){const o=this.labelColors[n],l=this.labelPointStyles[n],{boxHeight:c,boxWidth:u}=s,h=mn(s.bodyFont),p=eg(this,"left",s),m=a.x(p),x=c<h.lineHeight?(h.lineHeight-c)/2:0,y=r.y+x;if(s.usePointStyle){const b={radius:Math.min(u,c)/2,pointStyle:l.pointStyle,rotation:l.rotation,borderWidth:1},w=a.leftForLtr(m,u)+u/2,N=y+c/2;e.strokeStyle=s.multiKeyBackground,e.fillStyle=s.multiKeyBackground,vj(e,b,w,N),e.strokeStyle=o.borderColor,e.fillStyle=o.backgroundColor,vj(e,b,w,N)}else{e.lineWidth=ot(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,e.strokeStyle=o.borderColor,e.setLineDash(o.borderDash||[]),e.lineDashOffset=o.borderDashOffset||0;const b=a.leftForLtr(m,u),w=a.leftForLtr(a.xPlus(m,1),u-2),N=od(o.borderRadius);Object.values(N).some(A=>A!==0)?(e.beginPath(),e.fillStyle=s.multiKeyBackground,Sx(e,{x:b,y,w:u,h:c,radius:N}),e.fill(),e.stroke(),e.fillStyle=o.backgroundColor,e.beginPath(),Sx(e,{x:w,y:y+1,w:u-2,h:c-2,radius:N}),e.fill()):(e.fillStyle=s.multiKeyBackground,e.fillRect(b,y,u,c),e.strokeRect(b,y,u,c),e.fillStyle=o.backgroundColor,e.fillRect(w,y+1,u-2,c-2))}e.fillStyle=this.labelTextColors[n]}drawBody(e,r,n){const{body:a}=this,{bodySpacing:s,bodyAlign:o,displayColors:l,boxHeight:c,boxWidth:u,boxPadding:h}=n,p=mn(n.bodyFont);let m=p.lineHeight,x=0;const y=ld(n.rtl,this.x,this.width),b=function(_){r.fillText(_,y.x(e.x+x),e.y+m/2),e.y+=m+s},w=y.textAlign(o);let N,A,S,C,k,T,E;for(r.textAlign=o,r.textBaseline="middle",r.font=p.string,e.x=eg(this,w,n),r.fillStyle=n.bodyColor,vt(this.beforeBody,b),x=l&&w!=="right"?o==="center"?u/2+h:u+2+h:0,C=0,T=a.length;C<T;++C){for(N=a[C],A=this.labelTextColors[C],r.fillStyle=A,vt(N.before,b),S=N.lines,l&&S.length&&(this._drawColorBox(r,e,C,y,n),m=Math.max(p.lineHeight,c)),k=0,E=S.length;k<E;++k)b(S[k]),m=p.lineHeight;vt(N.after,b)}x=0,m=p.lineHeight,vt(this.afterBody,b),e.y-=s}drawFooter(e,r,n){const a=this.footer,s=a.length;let o,l;if(s){const c=ld(n.rtl,this.x,this.width);for(e.x=eg(this,n.footerAlign,n),e.y+=n.footerMarginTop,r.textAlign=c.textAlign(n.footerAlign),r.textBaseline="middle",o=mn(n.footerFont),r.fillStyle=n.footerColor,r.font=o.string,l=0;l<s;++l)r.fillText(a[l],c.x(e.x),e.y+o.lineHeight/2),e.y+=o.lineHeight+n.footerSpacing}}drawBackground(e,r,n,a){const{xAlign:s,yAlign:o}=this,{x:l,y:c}=e,{width:u,height:h}=n,{topLeft:p,topRight:m,bottomLeft:x,bottomRight:y}=od(a.cornerRadius);r.fillStyle=a.backgroundColor,r.strokeStyle=a.borderColor,r.lineWidth=a.borderWidth,r.beginPath(),r.moveTo(l+p,c),o==="top"&&this.drawCaret(e,r,n,a),r.lineTo(l+u-m,c),r.quadraticCurveTo(l+u,c,l+u,c+m),o==="center"&&s==="right"&&this.drawCaret(e,r,n,a),r.lineTo(l+u,c+h-y),r.quadraticCurveTo(l+u,c+h,l+u-y,c+h),o==="bottom"&&this.drawCaret(e,r,n,a),r.lineTo(l+x,c+h),r.quadraticCurveTo(l,c+h,l,c+h-x),o==="center"&&s==="left"&&this.drawCaret(e,r,n,a),r.lineTo(l,c+p),r.quadraticCurveTo(l,c,l+p,c),r.closePath(),r.fill(),a.borderWidth>0&&r.stroke()}_updateAnimationTarget(e){const r=this.chart,n=this.$animations,a=n&&n.x,s=n&&n.y;if(a||s){const o=Ch[e.position].call(this,this._active,this._eventPosition);if(!o)return;const l=this._size=FD(this,e),c=Object.assign({},o,this._size),u=HD(r,e,c),h=$D(e,c,u,r);(a._to!==h.x||s._to!==h.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=l.width,this.height=l.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(e){const r=this.options.setContext(this.getContext());let n=this.opacity;if(!n)return;this._updateAnimationTarget(r);const a={width:this.width,height:this.height},s={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;const o=za(r.padding),l=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;r.enabled&&l&&(e.save(),e.globalAlpha=n,this.drawBackground(s,e,a,r),FR(e,r.textDirection),s.y+=o.top,this.drawTitle(s,e,r),this.drawBody(s,e,r),this.drawFooter(s,e,r),HR(e,r.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,r){const n=this._active,a=e.map(({datasetIndex:l,index:c})=>{const u=this.chart.getDatasetMeta(l);if(!u)throw new Error("Cannot find a dataset at index "+l);return{datasetIndex:l,element:u.data[c],index:c}}),s=!bx(n,a),o=this._positionChanged(a,r);(s||o)&&(this._active=a,this._eventPosition=r,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,r,n=!0){if(r&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const a=this.options,s=this._active||[],o=this._getActiveElements(e,s,r,n),l=this._positionChanged(o,e),c=r||!bx(o,s)||l;return c&&(this._active=o,(a.enabled||a.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,r))),c}_getActiveElements(e,r,n,a){const s=this.options;if(e.type==="mouseout")return[];if(!a)return r.filter(l=>this.chart.data.datasets[l.datasetIndex]&&this.chart.getDatasetMeta(l.datasetIndex).controller.getParsed(l.index)!==void 0);const o=this.chart.getElementsAtEventForMode(e,s.mode,s,n);return s.reverse&&o.reverse(),o}_positionChanged(e,r){const{caretX:n,caretY:a,options:s}=this,o=Ch[s.position].call(this,e,r);return o!==!1&&(n!==o.x||a!==o.y)}};var tc={id:"tooltip",_element:WD,positioners:Ch,afterInit(t,e,r){r&&(t.tooltip=new WD({chart:t,options:r}))},beforeUpdate(t,e,r){t.tooltip&&t.tooltip.initialize(r)},reset(t,e,r){t.tooltip&&t.tooltip.initialize(r)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const r={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...r,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",r)}},afterEvent(t,e){if(t.tooltip){const r=e.replay;t.tooltip.handleEvent(e.event,r,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:aL},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const jte=(t,e,r,n)=>(typeof e=="string"?(r=t.push(e)-1,n.unshift({index:r,label:e})):isNaN(e)&&(r=null),r);function Nte(t,e,r,n){const a=t.indexOf(e);if(a===-1)return jte(t,e,r,n);const s=t.lastIndexOf(e);return a!==s?r:a}const Ste=(t,e)=>t===null?null:On(Math.round(t),0,e);function XD(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class Ate extends $d{static id="category";static defaults={ticks:{callback:XD}};constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const r=this._addedLabels;if(r.length){const n=this.getLabels();for(const{index:a,label:s}of r)n[a]===s&&n.splice(a,1);this._addedLabels=[]}super.init(e)}parse(e,r){if(dt(e))return null;const n=this.getLabels();return r=isFinite(r)&&n[r]===e?r:Nte(n,e,st(r,e),this._addedLabels),Ste(r,n.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:r}=this.getUserBounds();let{min:n,max:a}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(n=0),r||(a=this.getLabels().length-1)),this.min=n,this.max=a}buildTicks(){const e=this.min,r=this.max,n=this.options.offset,a=[];let s=this.getLabels();s=e===0&&r===s.length-1?s:s.slice(e,r+1),this._valueRange=Math.max(s.length-(n?0:1),1),this._startValue=this.min-(n?.5:0);for(let o=e;o<=r;o++)a.push({value:o});return a}getLabelForValue(e){return XD.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const r=this.ticks;return e<0||e>r.length-1?null:this.getPixelForValue(r[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}function Cte(t,e){const r=[],{bounds:a,step:s,min:o,max:l,precision:c,count:u,maxTicks:h,maxDigits:p,includeBounds:m}=t,x=s||1,y=h-1,{min:b,max:w}=e,N=!dt(o),A=!dt(l),S=!dt(u),C=(w-b)/(p+1);let k=K6((w-b)/y/x)*x,T,E,_,L;if(k<1e-14&&!N&&!A)return[{value:b},{value:w}];L=Math.ceil(w/k)-Math.floor(b/k),L>y&&(k=K6(L*k/y/x)*x),dt(c)||(T=Math.pow(10,c),k=Math.ceil(k*T)/T),a==="ticks"?(E=Math.floor(b/k)*k,_=Math.ceil(w/k)*k):(E=b,_=w),N&&A&&s&&jQ((l-o)/s,k/1e3)?(L=Math.round(Math.min((l-o)/k,h)),k=(l-o)/L,E=o,_=l):S?(E=N?o:E,_=A?l:_,L=u-1,k=(_-E)/L):(L=(_-E)/k,$g(L,Math.round(L),k/1e3)?L=Math.round(L):L=Math.ceil(L));const P=Math.max(Z6(k),Z6(E));T=Math.pow(10,dt(c)?P:c),E=Math.round(E*T)/T,_=Math.round(_*T)/T;let R=0;for(N&&(m&&E!==o?(r.push({value:o}),E<o&&R++,$g(Math.round((E+R*k)*T)/T,o,VD(o,C,t))&&R++):E<o&&R++);R<L;++R){const z=Math.round((E+R*k)*T)/T;if(A&&z>l)break;r.push({value:z})}return A&&m&&_!==l?r.length&&$g(r[r.length-1].value,l,VD(l,C,t))?r[r.length-1].value=l:r.push({value:l}):(!A||_===l)&&r.push({value:_}),r}function VD(t,e,{horizontal:r,minRotation:n}){const a=ci(n),s=(r?Math.sin(a):Math.cos(a))||.001,o=.75*e*(""+t).length;return Math.min(e/s,o)}class kte extends $d{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,r){return dt(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:r,maxDefined:n}=this.getUserBounds();let{min:a,max:s}=this;const o=c=>a=r?a:c,l=c=>s=n?s:c;if(e){const c=po(a),u=po(s);c<0&&u<0?l(0):c>0&&u>0&&o(0)}if(a===s){let c=s===0?1:Math.abs(s*.05);l(s+c),e||o(a-c)}this.min=a,this.max=s}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:r,stepSize:n}=e,a;return n?(a=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,a>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${a} ticks. Limiting to 1000.`),a=1e3)):(a=this.computeTickLimit(),r=r||11),r&&(a=Math.min(r,a)),a}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,r=e.ticks;let n=this.getTickLimit();n=Math.max(2,n);const a={maxTicks:n,bounds:e.bounds,min:e.min,max:e.max,precision:r.precision,step:r.stepSize,count:r.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:r.minRotation||0,includeBounds:r.includeBounds!==!1},s=this._range||this,o=Cte(a,s);return e.bounds==="ticks"&&NQ(o,this,"value"),e.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const e=this.ticks;let r=this.min,n=this.max;if(super.configure(),this.options.offset&&e.length){const a=(n-r)/Math.max(e.length-1,1)/2;r-=a,n+=a}this._startValue=r,this._endValue=n,this._valueRange=n-r}getLabelForValue(e){return uN(e,this.chart.options.locale,this.options.ticks.format)}}class Dte extends kte{static id="linear";static defaults={ticks:{callback:PR.formatters.numeric}};determineDataLimits(){const{min:e,max:r}=this.getMinMax(!0);this.min=La(e)?e:0,this.max=La(r)?r:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),r=e?this.width:this.height,n=ci(this.options.ticks.minRotation),a=(e?Math.sin(n):Math.cos(n))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(r/Math.min(40,s.lineHeight/a))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}const R0={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},En=Object.keys(R0);function qD(t,e){return t-e}function GD(t,e){if(dt(e))return null;const r=t._adapter,{parser:n,round:a,isoWeekday:s}=t._parseOpts;let o=e;return typeof n=="function"&&(o=n(o)),La(o)||(o=typeof n=="string"?r.parse(o,n):r.parse(o)),o===null?null:(a&&(o=a==="week"&&(wx(s)||s===!0)?r.startOf(o,"isoWeek",s):r.startOf(o,a)),+o)}function KD(t,e,r,n){const a=En.length;for(let s=En.indexOf(t);s<a-1;++s){const o=R0[En[s]],l=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((r-e)/(l*o.size))<=n)return En[s]}return En[a-1]}function Tte(t,e,r,n,a){for(let s=En.length-1;s>=En.indexOf(r);s--){const o=En[s];if(R0[o].common&&t._adapter.diff(a,n,o)>=e-1)return o}return En[r?En.indexOf(r):0]}function Mte(t){for(let e=En.indexOf(t)+1,r=En.length;e<r;++e)if(R0[En[e]].common)return En[e]}function ZD(t,e,r){if(!r)t[e]=!0;else if(r.length){const{lo:n,hi:a}=dN(r,e),s=r[n]>=e?r[n]:r[a];t[s]=!0}}function Ete(t,e,r,n){const a=t._adapter,s=+a.startOf(e[0].value,n),o=e[e.length-1].value;let l,c;for(l=s;l<=o;l=+a.add(l,1,n))c=r[l],c>=0&&(e[c].major=!0);return e}function QD(t,e,r){const n=[],a={},s=e.length;let o,l;for(o=0;o<s;++o)l=e[o],a[l]=o,n.push({value:l,major:!1});return s===0||!r?n:Ete(t,n,a,r)}class JD extends $d{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,r={}){const n=e.time||(e.time={}),a=this._adapter=new YJ._date(e.adapters.date);a.init(r),Yh(n.displayFormats,a.formats()),this._parseOpts={parser:n.parser,round:n.round,isoWeekday:n.isoWeekday},super.init(e),this._normalized=r.normalized}parse(e,r){return e===void 0?null:GD(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,r=this._adapter,n=e.time.unit||"day";let{min:a,max:s,minDefined:o,maxDefined:l}=this.getUserBounds();function c(u){!o&&!isNaN(u.min)&&(a=Math.min(a,u.min)),!l&&!isNaN(u.max)&&(s=Math.max(s,u.max))}(!o||!l)&&(c(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&c(this.getMinMax(!1))),a=La(a)&&!isNaN(a)?a:+r.startOf(Date.now(),n),s=La(s)&&!isNaN(s)?s:+r.endOf(Date.now(),n)+1,this.min=Math.min(a,s-1),this.max=Math.max(a+1,s)}_getLabelBounds(){const e=this.getLabelTimestamps();let r=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;return e.length&&(r=e[0],n=e[e.length-1]),{min:r,max:n}}buildTicks(){const e=this.options,r=e.time,n=e.ticks,a=n.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&a.length&&(this.min=this._userMin||a[0],this.max=this._userMax||a[a.length-1]);const s=this.min,o=this.max,l=DQ(a,s,o);return this._unit=r.unit||(n.autoSkip?KD(r.minUnit,this.min,this.max,this._getLabelCapacity(s)):Tte(this,l.length,r.minUnit,this.min,this.max)),this._majorUnit=!n.major.enabled||this._unit==="year"?void 0:Mte(this._unit),this.initOffsets(a),e.reverse&&l.reverse(),QD(this,l,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let r=0,n=0,a,s;this.options.offset&&e.length&&(a=this.getDecimalForValue(e[0]),e.length===1?r=1-a:r=(this.getDecimalForValue(e[1])-a)/2,s=this.getDecimalForValue(e[e.length-1]),e.length===1?n=s:n=(s-this.getDecimalForValue(e[e.length-2]))/2);const o=e.length<3?.5:.25;r=On(r,0,o),n=On(n,0,o),this._offsets={start:r,end:n,factor:1/(r+1+n)}}_generate(){const e=this._adapter,r=this.min,n=this.max,a=this.options,s=a.time,o=s.unit||KD(s.minUnit,r,n,this._getLabelCapacity(r)),l=st(a.ticks.stepSize,1),c=o==="week"?s.isoWeekday:!1,u=wx(c)||c===!0,h={};let p=r,m,x;if(u&&(p=+e.startOf(p,"isoWeek",c)),p=+e.startOf(p,u?"day":o),e.diff(n,r,o)>1e5*l)throw new Error(r+" and "+n+" are too far apart with stepSize of "+l+" "+o);const y=a.ticks.source==="data"&&this.getDataTimestamps();for(m=p,x=0;m<n;m=+e.add(m,l,o),x++)ZD(h,m,y);return(m===n||a.bounds==="ticks"||x===1)&&ZD(h,m,y),Object.keys(h).sort(qD).map(b=>+b)}getLabelForValue(e){const r=this._adapter,n=this.options.time;return n.tooltipFormat?r.format(e,n.tooltipFormat):r.format(e,n.displayFormats.datetime)}format(e,r){const a=this.options.time.displayFormats,s=this._unit,o=r||a[s];return this._adapter.format(e,o)}_tickFormatFunction(e,r,n,a){const s=this.options,o=s.ticks.callback;if(o)return Rt(o,[e,r,n],this);const l=s.time.displayFormats,c=this._unit,u=this._majorUnit,h=c&&l[c],p=u&&l[u],m=n[r],x=u&&p&&m&&m.major;return this._adapter.format(e,a||(x?p:h))}generateTickLabels(e){let r,n,a;for(r=0,n=e.length;r<n;++r)a=e[r],a.label=this._tickFormatFunction(a.value,r,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const r=this._offsets,n=this.getDecimalForValue(e);return this.getPixelForDecimal((r.start+n)*r.factor)}getValueForPixel(e){const r=this._offsets,n=this.getDecimalForPixel(e)/r.factor-r.end;return this.min+n*(this.max-this.min)}_getLabelSize(e){const r=this.options.ticks,n=this.ctx.measureText(e).width,a=ci(this.isHorizontal()?r.maxRotation:r.minRotation),s=Math.cos(a),o=Math.sin(a),l=this._resolveTickFontOptions(0).size;return{w:n*s+l*o,h:n*o+l*s}}_getLabelCapacity(e){const r=this.options.time,n=r.displayFormats,a=n[r.unit]||n.millisecond,s=this._tickFormatFunction(e,0,QD(this,[e],this._majorUnit),a),o=this._getLabelSize(s),l=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return l>0?l:1}getDataTimestamps(){let e=this._cache.data||[],r,n;if(e.length)return e;const a=this.getMatchingVisibleMetas();if(this._normalized&&a.length)return this._cache.data=a[0].controller.getAllParsedValues(this);for(r=0,n=a.length;r<n;++r)e=e.concat(a[r].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let r,n;if(e.length)return e;const a=this.getLabels();for(r=0,n=a.length;r<n;++r)e.push(GD(this,a[r]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return DR(e.sort(qD))}}function tg(t,e,r){let n=0,a=t.length-1,s,o,l,c;r?(e>=t[n].pos&&e<=t[a].pos&&({lo:n,hi:a}=bj(t,"pos",e)),{pos:s,time:l}=t[n],{pos:o,time:c}=t[a]):(e>=t[n].time&&e<=t[a].time&&({lo:n,hi:a}=bj(t,"time",e)),{time:s,pos:l}=t[n],{time:o,pos:c}=t[a]);const u=o-s;return u?l+(c-l)*(e-s)/u:l}class Swe extends JD{static id="timeseries";static defaults=JD.defaults;constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),r=this._table=this.buildLookupTable(e);this._minPos=tg(r,this.min),this._tableRange=tg(r,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:r,max:n}=this,a=[],s=[];let o,l,c,u,h;for(o=0,l=e.length;o<l;++o)u=e[o],u>=r&&u<=n&&a.push(u);if(a.length<2)return[{time:r,pos:0},{time:n,pos:1}];for(o=0,l=a.length;o<l;++o)h=a[o+1],c=a[o-1],u=a[o],Math.round((h+c)/2)!==u&&s.push({time:u,pos:o/(l-1)});return s}_generate(){const e=this.min,r=this.max;let n=super.getDataTimestamps();return(!n.includes(e)||!n.length)&&n.splice(0,0,e),(!n.includes(r)||n.length===1)&&n.push(r),n.sort((a,s)=>a-s)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const r=this.getDataTimestamps(),n=this.getLabelTimestamps();return r.length&&n.length?e=this.normalize(r.concat(n)):e=r.length?r:n,e=this._cache.all=e,e}getDecimalForValue(e){return(tg(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const r=this._offsets,n=this.getDecimalForPixel(e)/r.factor-r.end;return tg(this._table,n*this._tableRange+this._minPos,!0)}}const sL="label";function eT(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function Ote(t,e){const r=t.options;r&&e&&Object.assign(r,e)}function iL(t,e){t.labels=e}function oL(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:sL;const n=[];t.datasets=e.map(a=>{const s=t.datasets.find(o=>o[r]===a[r]);return!s||!a.data||n.includes(s)?{...a}:(n.push(s),Object.assign(s,a),s)})}function Pte(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:sL;const r={labels:[],datasets:[]};return iL(r,t.labels),oL(r,t.datasets,e),r}function _te(t,e){const{height:r=150,width:n=300,redraw:a=!1,datasetIdKey:s,type:o,data:l,options:c,plugins:u=[],fallbackContent:h,updateMode:p,...m}=t,x=O.useRef(null),y=O.useRef(null),b=()=>{x.current&&(y.current=new Ps(x.current,{type:o,data:Pte(l,s),options:c&&{...c},plugins:u}),eT(e,y.current))},w=()=>{eT(e,null),y.current&&(y.current.destroy(),y.current=null)};return O.useEffect(()=>{!a&&y.current&&c&&Ote(y.current,c)},[a,c]),O.useEffect(()=>{!a&&y.current&&iL(y.current.config.data,l.labels)},[a,l.labels]),O.useEffect(()=>{!a&&y.current&&l.datasets&&oL(y.current.config.data,l.datasets,s)},[a,l.datasets]),O.useEffect(()=>{y.current&&(a?(w(),setTimeout(b)):y.current.update(p))},[a,c,l.labels,l.datasets,p]),O.useEffect(()=>{y.current&&(w(),setTimeout(b))},[o]),O.useEffect(()=>(b(),()=>w()),[]),Lr.createElement("canvas",{ref:x,role:"img",height:r,width:n,...m},h)}const Rte=O.forwardRef(_te);function NN(t,e){return Ps.register(e),O.forwardRef((r,n)=>Lr.createElement(Rte,{...r,ref:n,type:t}))}const Lte=NN("bar",FJ),Nj=NN("doughnut",WR),Zf=NN("pie",$J);/*!
* chartjs-plugin-datalabels v2.2.0
* https://chartjs-plugin-datalabels.netlify.app
* (c) 2017-2022 chartjs-plugin-datalabels contributors
* Released under the MIT license
*/var tT=function(){if(typeof window<"u"){if(window.devicePixelRatio)return window.devicePixelRatio;var t=window.screen;if(t)return(t.deviceXDPI||1)/(t.logicalXDPI||1)}return 1}(),Xh={toTextLines:function(t){var e=[],r;for(t=[].concat(t);t.length;)r=t.pop(),typeof r=="string"?e.unshift.apply(e,r.split(`
`)):Array.isArray(r)?t.push.apply(t,r):dt(t)||e.unshift(""+r);return e},textSize:function(t,e,r){var n=[].concat(e),a=n.length,s=t.font,o=0,l;for(t.font=r.string,l=0;l<a;++l)o=Math.max(t.measureText(n[l]).width,o);return t.font=s,{height:a*r.lineHeight,width:o}},bound:function(t,e,r){return Math.max(t,Math.min(e,r))},arrayDiff:function(t,e){var r=t.slice(),n=[],a,s,o,l;for(a=0,o=e.length;a<o;++a)l=e[a],s=r.indexOf(l),s===-1?n.push([l,1]):r.splice(s,1);for(a=0,o=r.length;a<o;++a)n.push([r[a],-1]);return n},rasterize:function(t){return Math.round(t*tT)/tT}};function F1(t,e){var r=e.x,n=e.y;if(r===null)return{x:0,y:-1};if(n===null)return{x:1,y:0};var a=t.x-r,s=t.y-n,o=Math.sqrt(a*a+s*s);return{x:o?a/o:0,y:o?s/o:-1}}function zte(t,e,r,n,a){switch(a){case"center":r=n=0;break;case"bottom":r=0,n=1;break;case"right":r=1,n=0;break;case"left":r=-1,n=0;break;case"top":r=0,n=-1;break;case"start":r=-r,n=-n;break;case"end":break;default:a*=Math.PI/180,r=Math.cos(a),n=Math.sin(a);break}return{x:t,y:e,vx:r,vy:n}}var Ite=0,lL=1,cL=2,dL=4,uL=8;function rg(t,e,r){var n=Ite;return t<r.left?n|=lL:t>r.right&&(n|=cL),e<r.top?n|=uL:e>r.bottom&&(n|=dL),n}function Bte(t,e){for(var r=t.x0,n=t.y0,a=t.x1,s=t.y1,o=rg(r,n,e),l=rg(a,s,e),c,u,h;!(!(o|l)||o&l);)c=o||l,c&uL?(u=r+(a-r)*(e.top-n)/(s-n),h=e.top):c&dL?(u=r+(a-r)*(e.bottom-n)/(s-n),h=e.bottom):c&cL?(h=n+(s-n)*(e.right-r)/(a-r),u=e.right):c&lL&&(h=n+(s-n)*(e.left-r)/(a-r),u=e.left),c===o?(r=u,n=h,o=rg(r,n,e)):(a=u,s=h,l=rg(a,s,e));return{x0:r,x1:a,y0:n,y1:s}}function ng(t,e){var r=e.anchor,n=t,a,s;return e.clamp&&(n=Bte(n,e.area)),r==="start"?(a=n.x0,s=n.y0):r==="end"?(a=n.x1,s=n.y1):(a=(n.x0+n.x1)/2,s=(n.y0+n.y1)/2),zte(a,s,t.vx,t.vy,e.align)}var ag={arc:function(t,e){var r=(t.startAngle+t.endAngle)/2,n=Math.cos(r),a=Math.sin(r),s=t.innerRadius,o=t.outerRadius;return ng({x0:t.x+n*s,y0:t.y+a*s,x1:t.x+n*o,y1:t.y+a*o,vx:n,vy:a},e)},point:function(t,e){var r=F1(t,e.origin),n=r.x*t.options.radius,a=r.y*t.options.radius;return ng({x0:t.x-n,y0:t.y-a,x1:t.x+n,y1:t.y+a,vx:r.x,vy:r.y},e)},bar:function(t,e){var r=F1(t,e.origin),n=t.x,a=t.y,s=0,o=0;return t.horizontal?(n=Math.min(t.x,t.base),s=Math.abs(t.base-t.x)):(a=Math.min(t.y,t.base),o=Math.abs(t.base-t.y)),ng({x0:n,y0:a+o,x1:n+s,y1:a,vx:r.x,vy:r.y},e)},fallback:function(t,e){var r=F1(t,e.origin);return ng({x0:t.x,y0:t.y,x1:t.x+(t.width||0),y1:t.y+(t.height||0),vx:r.x,vy:r.y},e)}},di=Xh.rasterize;function Fte(t){var e=t.borderWidth||0,r=t.padding,n=t.size.height,a=t.size.width,s=-a/2,o=-n/2;return{frame:{x:s-r.left-e,y:o-r.top-e,w:a+r.width+e*2,h:n+r.height+e*2},text:{x:s,y:o,w:a,h:n}}}function Hte(t,e){var r=e.chart.getDatasetMeta(e.datasetIndex).vScale;if(!r)return null;if(r.xCenter!==void 0&&r.yCenter!==void 0)return{x:r.xCenter,y:r.yCenter};var n=r.getBasePixel();return t.horizontal?{x:n,y:null}:{x:null,y:n}}function $te(t){return t instanceof Do?ag.arc:t instanceof ate?ag.point:t instanceof rL?ag.bar:ag.fallback}function Yte(t,e,r,n,a,s){var o=Math.PI/2;if(s){var l=Math.min(s,a/2,n/2),c=e+l,u=r+l,h=e+n-l,p=r+a-l;t.moveTo(e,u),c<h&&u<p?(t.arc(c,u,l,-Math.PI,-o),t.arc(h,u,l,-o,0),t.arc(h,p,l,0,o),t.arc(c,p,l,o,Math.PI)):c<h?(t.moveTo(c,r),t.arc(h,u,l,-o,o),t.arc(c,u,l,o,Math.PI+o)):u<p?(t.arc(c,u,l,-Math.PI,0),t.arc(c,p,l,0,Math.PI)):t.arc(c,u,l,-Math.PI,Math.PI),t.closePath(),t.moveTo(e,r)}else t.rect(e,r,n,a)}function Ute(t,e,r){var n=r.backgroundColor,a=r.borderColor,s=r.borderWidth;!n&&(!a||!s)||(t.beginPath(),Yte(t,di(e.x)+s/2,di(e.y)+s/2,di(e.w)-s,di(e.h)-s,r.borderRadius),t.closePath(),n&&(t.fillStyle=n,t.fill()),a&&s&&(t.strokeStyle=a,t.lineWidth=s,t.lineJoin="miter",t.stroke()))}function Wte(t,e,r){var n=r.lineHeight,a=t.w,s=t.x,o=t.y+n/2;return e==="center"?s+=a/2:(e==="end"||e==="right")&&(s+=a),{h:n,w:a,x:s,y:o}}function Xte(t,e,r){var n=t.shadowBlur,a=r.stroked,s=di(r.x),o=di(r.y),l=di(r.w);a&&t.strokeText(e,s,o,l),r.filled&&(n&&a&&(t.shadowBlur=0),t.fillText(e,s,o,l),n&&a&&(t.shadowBlur=n))}function Vte(t,e,r,n){var a=n.textAlign,s=n.color,o=!!s,l=n.font,c=e.length,u=n.textStrokeColor,h=n.textStrokeWidth,p=u&&h,m;if(!(!c||!o&&!p))for(r=Wte(r,a,l),t.font=l.string,t.textAlign=a,t.textBaseline="middle",t.shadowBlur=n.textShadowBlur,t.shadowColor=n.textShadowColor,o&&(t.fillStyle=s),p&&(t.lineJoin="round",t.lineWidth=h,t.strokeStyle=u),m=0,c=e.length;m<c;++m)Xte(t,e[m],{stroked:p,filled:o,w:r.w,x:r.x,y:r.y+r.h*m})}var hL=function(t,e,r,n){var a=this;a._config=t,a._index=n,a._model=null,a._rects=null,a._ctx=e,a._el=r};Ms(hL.prototype,{_modelize:function(t,e,r,n){var a=this,s=a._index,o=mn(Vt([r.font,{}],n,s)),l=Vt([r.color,sr.color],n,s);return{align:Vt([r.align,"center"],n,s),anchor:Vt([r.anchor,"center"],n,s),area:n.chart.chartArea,backgroundColor:Vt([r.backgroundColor,null],n,s),borderColor:Vt([r.borderColor,null],n,s),borderRadius:Vt([r.borderRadius,0],n,s),borderWidth:Vt([r.borderWidth,0],n,s),clamp:Vt([r.clamp,!1],n,s),clip:Vt([r.clip,!1],n,s),color:l,display:t,font:o,lines:e,offset:Vt([r.offset,4],n,s),opacity:Vt([r.opacity,1],n,s),origin:Hte(a._el,n),padding:za(Vt([r.padding,4],n,s)),positioner:$te(a._el),rotation:Vt([r.rotation,0],n,s)*(Math.PI/180),size:Xh.textSize(a._ctx,e,o),textAlign:Vt([r.textAlign,"start"],n,s),textShadowBlur:Vt([r.textShadowBlur,0],n,s),textShadowColor:Vt([r.textShadowColor,l],n,s),textStrokeColor:Vt([r.textStrokeColor,l],n,s),textStrokeWidth:Vt([r.textStrokeWidth,0],n,s)}},update:function(t){var e=this,r=null,n=null,a=e._index,s=e._config,o,l,c,u=Vt([s.display,!0],t,a);u&&(o=t.dataset.data[a],l=st(Rt(s.formatter,[o,t]),o),c=dt(l)?[]:Xh.toTextLines(l),c.length&&(r=e._modelize(u,c,s,t),n=Fte(r))),e._model=r,e._rects=n},geometry:function(){return this._rects?this._rects.frame:{}},rotation:function(){return this._model?this._model.rotation:0},visible:function(){return this._model&&this._model.opacity},model:function(){return this._model},draw:function(t,e){var r=this,n=t.ctx,a=r._model,s=r._rects,o;this.visible()&&(n.save(),a.clip&&(o=a.area,n.beginPath(),n.rect(o.left,o.top,o.right-o.left,o.bottom-o.top),n.clip()),n.globalAlpha=Xh.bound(0,a.opacity,1),n.translate(di(e.x),di(e.y)),n.rotate(a.rotation),Ute(n,s.frame,a),Vte(n,a.lines,s.text,a),n.restore())}});var qte=Number.MIN_SAFE_INTEGER||-9007199254740991,Gte=Number.MAX_SAFE_INTEGER||9007199254740991;function dh(t,e,r){var n=Math.cos(r),a=Math.sin(r),s=e.x,o=e.y;return{x:s+n*(t.x-s)-a*(t.y-o),y:o+a*(t.x-s)+n*(t.y-o)}}function rT(t,e){var r=Gte,n=qte,a=e.origin,s,o,l,c,u;for(s=0;s<t.length;++s)o=t[s],l=o.x-a.x,c=o.y-a.y,u=e.vx*l+e.vy*c,r=Math.min(r,u),n=Math.max(n,u);return{min:r,max:n}}function sg(t,e){var r=e.x-t.x,n=e.y-t.y,a=Math.sqrt(r*r+n*n);return{vx:(e.x-t.x)/a,vy:(e.y-t.y)/a,origin:t,ln:a}}var fL=function(){this._rotation=0,this._rect={x:0,y:0,w:0,h:0}};Ms(fL.prototype,{center:function(){var t=this._rect;return{x:t.x+t.w/2,y:t.y+t.h/2}},update:function(t,e,r){this._rotation=r,this._rect={x:e.x+t.x,y:e.y+t.y,w:e.w,h:e.h}},contains:function(t){var e=this,r=1,n=e._rect;return t=dh(t,e.center(),-e._rotation),!(t.x<n.x-r||t.y<n.y-r||t.x>n.x+n.w+r*2||t.y>n.y+n.h+r*2)},intersects:function(t){var e=this._points(),r=t._points(),n=[sg(e[0],e[1]),sg(e[0],e[3])],a,s,o;for(this._rotation!==t._rotation&&n.push(sg(r[0],r[1]),sg(r[0],r[3])),a=0;a<n.length;++a)if(s=rT(e,n[a]),o=rT(r,n[a]),s.max<o.min||o.max<s.min)return!1;return!0},_points:function(){var t=this,e=t._rect,r=t._rotation,n=t.center();return[dh({x:e.x,y:e.y},n,r),dh({x:e.x+e.w,y:e.y},n,r),dh({x:e.x+e.w,y:e.y+e.h},n,r),dh({x:e.x,y:e.y+e.h},n,r)]}});function pL(t,e,r){var n=e.positioner(t,e),a=n.vx,s=n.vy;if(!a&&!s)return{x:n.x,y:n.y};var o=r.w,l=r.h,c=e.rotation,u=Math.abs(o/2*Math.cos(c))+Math.abs(l/2*Math.sin(c)),h=Math.abs(o/2*Math.sin(c))+Math.abs(l/2*Math.cos(c)),p=1/Math.max(Math.abs(a),Math.abs(s));return u*=a*p,h*=s*p,u+=e.offset*a,h+=e.offset*s,{x:n.x+u,y:n.y+h}}function Kte(t,e){var r,n,a,s;for(r=t.length-1;r>=0;--r)for(a=t[r].$layout,n=r-1;n>=0&&a._visible;--n)s=t[n].$layout,s._visible&&a._box.intersects(s._box)&&e(a,s);return t}function Zte(t){var e,r,n,a,s,o,l;for(e=0,r=t.length;e<r;++e)n=t[e],a=n.$layout,a._visible&&(l=new Proxy(n._el,{get:(c,u)=>c.getProps([u],!0)[u]}),s=n.geometry(),o=pL(l,n.model(),s),a._box.update(o,s,n.rotation()));return Kte(t,function(c,u){var h=c._hidable,p=u._hidable;h&&p||p?u._visible=!1:h&&(c._visible=!1)})}var Vh={prepare:function(t){var e=[],r,n,a,s,o;for(r=0,a=t.length;r<a;++r)for(n=0,s=t[r].length;n<s;++n)o=t[r][n],e.push(o),o.$layout={_box:new fL,_hidable:!1,_visible:!0,_set:r,_idx:o._index};return e.sort(function(l,c){var u=l.$layout,h=c.$layout;return u._idx===h._idx?h._set-u._set:h._idx-u._idx}),this.update(e),e},update:function(t){var e=!1,r,n,a,s,o;for(r=0,n=t.length;r<n;++r)a=t[r],s=a.model(),o=a.$layout,o._hidable=s&&s.display==="auto",o._visible=a.visible(),e|=o._hidable;e&&Zte(t)},lookup:function(t,e){var r,n;for(r=t.length-1;r>=0;--r)if(n=t[r].$layout,n&&n._visible&&n._box.contains(e))return t[r];return null},draw:function(t,e){var r,n,a,s,o,l;for(r=0,n=e.length;r<n;++r)a=e[r],s=a.$layout,s._visible&&(o=a.geometry(),l=pL(a._el,a.model(),o),s._box.update(l,o,a.rotation()),a.draw(t,l))}},Qte=function(t){if(dt(t))return null;var e=t,r,n,a;if(ot(t))if(!dt(t.label))e=t.label;else if(!dt(t.r))e=t.r;else for(e="",r=Object.keys(t),a=0,n=r.length;a<n;++a)e+=(a!==0?", ":"")+r[a]+": "+t[r[a]];return""+e},Jte={align:"center",anchor:"center",backgroundColor:null,borderColor:null,borderRadius:0,borderWidth:0,clamp:!1,clip:!1,color:void 0,display:!0,font:{family:void 0,lineHeight:1.2,size:void 0,style:void 0,weight:null},formatter:Qte,labels:void 0,listeners:{},offset:4,opacity:1,padding:{top:4,right:4,bottom:4,left:4},rotation:0,textAlign:"start",textStrokeColor:void 0,textStrokeWidth:0,textShadowBlur:0,textShadowColor:void 0},Tn="$datalabels",mL="$default";function ere(t,e){var r=t.datalabels,n={},a=[],s,o;return r===!1?null:(r===!0&&(r={}),e=Ms({},[e,r]),s=e.labels||{},o=Object.keys(s),delete e.labels,o.length?o.forEach(function(l){s[l]&&a.push(Ms({},[e,s[l],{_key:l}]))}):a.push(e),n=a.reduce(function(l,c){return vt(c.listeners||{},function(u,h){l[h]=l[h]||{},l[h][c._key||mL]=u}),delete c.listeners,l},{}),{labels:a,listeners:n})}function Sj(t,e,r,n){if(e){var a=r.$context,s=r.$groups,o;e[s._set]&&(o=e[s._set][s._key],o&&Rt(o,[a,n])===!0&&(t[Tn]._dirty=!0,r.update(a)))}}function tre(t,e,r,n,a){var s,o;!r&&!n||(r?n?r!==n&&(o=s=!0):o=!0:s=!0,o&&Sj(t,e.leave,r,a),s&&Sj(t,e.enter,n,a))}function rre(t,e){var r=t[Tn],n=r._listeners,a,s;if(!(!n.enter&&!n.leave)){if(e.type==="mousemove")s=Vh.lookup(r._labels,e);else if(e.type!=="mouseout")return;a=r._hovered,r._hovered=s,tre(t,n,a,s,e)}}function nre(t,e){var r=t[Tn],n=r._listeners.click,a=n&&Vh.lookup(r._labels,e);a&&Sj(t,n,a,e)}var Qf={id:"datalabels",defaults:Jte,beforeInit:function(t){t[Tn]={_actives:[]}},beforeUpdate:function(t){var e=t[Tn];e._listened=!1,e._listeners={},e._datasets=[],e._labels=[]},afterDatasetUpdate:function(t,e,r){var n=e.index,a=t[Tn],s=a._datasets[n]=[],o=t.isDatasetVisible(n),l=t.data.datasets[n],c=ere(l,r),u=e.meta.data||[],h=t.ctx,p,m,x,y,b,w,N,A;for(h.save(),p=0,x=u.length;p<x;++p)if(N=u[p],N[Tn]=[],o&&N&&t.getDataVisibility(p)&&!N.skip)for(m=0,y=c.labels.length;m<y;++m)b=c.labels[m],w=b._key,A=new hL(b,h,N,p),A.$groups={_set:n,_key:w||mL},A.$context={active:!1,chart:t,dataIndex:p,dataset:l,datasetIndex:n},A.update(A.$context),N[Tn].push(A),s.push(A);h.restore(),Ms(a._listeners,c.listeners,{merger:function(S,C,k){C[S]=C[S]||{},C[S][e.index]=k[S],a._listened=!0}})},afterUpdate:function(t){t[Tn]._labels=Vh.prepare(t[Tn]._datasets)},afterDatasetsDraw:function(t){Vh.draw(t,t[Tn]._labels)},beforeEvent:function(t,e){if(t[Tn]._listened){var r=e.event;switch(r.type){case"mousemove":case"mouseout":rre(t,r);break;case"click":nre(t,r);break}}},afterEvent:function(t){var e=t[Tn],r=e._actives,n=e._actives=t.getActiveElements(),a=Xh.arrayDiff(r,n),s,o,l,c,u,h,p;for(s=0,o=a.length;s<o;++s)if(u=a[s],u[1])for(p=u[0].element[Tn]||[],l=0,c=p.length;l<c;++l)h=p[l],h.$context.active=u[1]===1,h.update(h.$context);(e._dirty||a.length)&&(Vh.update(e._labels),t.render()),delete e._dirty}};Ps.register(Ate,Dte,rL,Do,tc,ec,Qf);const are=()=>{const t=Ba(),{dashboard:e,loading:r,error:n,success:a}=ua(A=>A.mlm),[s,o]=O.useState(null),[l,c]=O.useState("All"),[u,h]=O.useState({ddr:"",crr:"",bbr:"",hlr:"",regionalAmbassador:"",porparleTeam:"",rop:"",companyOperations:"",technologyPool:"",foundationPool:"",publicShare:"",netProfit:"",ddrLevel1:"",ddrLevel2:"",ddrLevel3:"",ddrLevel4:"",gc:"",la:"",ceo:"",coo:"",cmo:"",cfo:"",cto:"",chro:"",topTeamPerform:"",winner:"",fighter:"",operationExpense:"",organizationEvent:"",chairmanFounder:"",shareholder1:"",shareholder2:"",shareholder3:""});O.useEffect(()=>{t(zh())},[t]),O.useEffect(()=>{if(e&&e.percentageConfiguration){const A={ddr:e.percentageConfiguration.ddr||"",crr:e.percentageConfiguration.crr||"",bbr:e.percentageConfiguration.bbr||"",hlr:e.percentageConfiguration.hlr||"",regionalAmbassador:e.percentageConfiguration.regionalAmbassador||"",porparleTeam:e.percentageConfiguration.porparleTeam||"",rop:e.percentageConfiguration.rop||"",companyOperations:e.percentageConfiguration.companyOperations||"",technologyPool:e.percentageConfiguration.technologyPool||"",foundationPool:e.percentageConfiguration.foundationPool||"",publicShare:e.percentageConfiguration.publicShare||"",netProfit:e.percentageConfiguration.netProfit||"",ddrLevel1:e.percentageConfiguration.ddrSubDistribution?.level1||"",ddrLevel2:e.percentageConfiguration.ddrSubDistribution?.level2||"",ddrLevel3:e.percentageConfiguration.ddrSubDistribution?.level3||"",ddrLevel4:e.percentageConfiguration.ddrSubDistribution?.level4||"",gc:e.percentageConfiguration.porparleTeamSubDistribution?.gc||"",la:e.percentageConfiguration.porparleTeamSubDistribution?.la||"",ceo:e.percentageConfiguration.porparleTeamSubDistribution?.ceo||"",coo:e.percentageConfiguration.porparleTeamSubDistribution?.coo||"",cmo:e.percentageConfiguration.porparleTeamSubDistribution?.cmo||"",cfo:e.percentageConfiguration.porparleTeamSubDistribution?.cfo||"",cto:e.percentageConfiguration.porparleTeamSubDistribution?.cto||"",chro:e.percentageConfiguration.porparleTeamSubDistribution?.chro||"",topTeamPerform:e.percentageConfiguration.porparleTeamSubDistribution?.topTeamPerform||"",winner:e.percentageConfiguration.topTeamPerformSubDistribution?.winner||"",fighter:e.percentageConfiguration.topTeamPerformSubDistribution?.fighter||"",operationExpense:e.percentageConfiguration.companyOperationsSubDistribution?.operationExpense||"",organizationEvent:e.percentageConfiguration.companyOperationsSubDistribution?.organizationEvent||"",chairmanFounder:e.percentageConfiguration.publicShareSubDistribution?.chairmanFounder||"",shareholder1:e.percentageConfiguration.publicShareSubDistribution?.shareholder1||"",shareholder2:e.percentageConfiguration.publicShareSubDistribution?.shareholder2||"",shareholder3:e.percentageConfiguration.publicShareSubDistribution?.shareholder3||""};h(A),console.log("Initialized formData:",A)}},[e]),O.useEffect(()=>{if(a&&(Ne.success("Distributions updated successfully!"),t(zh()),t(r6())),s||n){Ne.error(s||n);const A=setTimeout(()=>{o(null),t(r6())},5e3);return()=>clearTimeout(A)}},[a,s,n,t]);const p=A=>{const S=A.target.value===""?"":Number(parseFloat(A.target.value).toFixed(2));h({...u,[A.target.name]:S}),o(null),console.log("Form data changed:",{[A.target.name]:S})},m=()=>{const A=["ddr","crr","bbr","hlr","regionalAmbassador","porparleTeam","rop","companyOperations","technologyPool","foundationPool","publicShare","netProfit"],S=["ddrLevel1","ddrLevel2","ddrLevel3","ddrLevel4"],C=["gc","la","ceo","coo","cmo","cfo","cto","chro","topTeamPerform"],k=["winner","fighter"],T=["operationExpense","organizationEvent"],E=["chairmanFounder","shareholder1","shareholder2","shareholder3"],_=Object.fromEntries(Object.entries(u).map(([P,R])=>[P,R===""?e?.percentageConfiguration[P]||e?.percentageConfiguration.ddrSubDistribution?.[`level${P.match(/\d+/)}`]||e?.percentageConfiguration.porparleTeamSubDistribution?.[P]||e?.percentageConfiguration.topTeamPerformSubDistribution?.[P]||e?.percentageConfiguration.companyOperationsSubDistribution?.[P]||e?.percentageConfiguration.publicShareSubDistribution?.[P]||0:Number(R)]));for(const[P,R]of Object.entries(_))if(isNaN(R)||R<0)return`Invalid value for ${P.toUpperCase()}: must be a non-negative number`;const L=A.reduce((P,R)=>P+(_[R]||0),0);if(Math.abs(L-100)>.01)return`Main distribution percentages must sum to 100% (current: ${L.toFixed(2)}%)`;if(_.ddr>0){const P=S.reduce((R,z)=>R+(_[z]||0),0);if(Math.abs(P-_.ddr)>.01)return`DDR sub-distributions must sum to DDR total (${_.ddr}%): current ${P.toFixed(2)}%`}if(_.porparleTeam>0){const P=C.reduce((R,z)=>R+(_[z]||0),0);if(Math.abs(P-_.porparleTeam)>.01)return`Porparle Team sub-distributions must sum to porparleTeam total (${_.porparleTeam}%): current ${P.toFixed(2)}%`}if(_.topTeamPerform>0){const P=k.reduce((R,z)=>R+(_[z]||0),0);if(Math.abs(P-_.topTeamPerform)>.01)return`Top Team Performance sub-distributions must sum to topTeamPerform total (${_.topTeamPerform}%): current ${P.toFixed(2)}%`}if(_.companyOperations>0){const P=T.reduce((R,z)=>R+(_[z]||0),0);if(Math.abs(P-_.companyOperations)>.01)return`Company Operations sub-distributions must sum to companyOperations total (${_.companyOperations}%): current ${P.toFixed(2)}%`}if(_.publicShare>0){const P=E.reduce((R,z)=>R+(_[z]||0),0);if(Math.abs(P-_.publicShare)>.01)return`Public Share sub-distributions must sum to publicShare total (${_.publicShare}%): current ${P.toFixed(2)}%`}return null},x=A=>{A.preventDefault();const S=m();if(S){o(S),console.log("Validation error:",S);return}const C=Object.fromEntries(Object.entries(u).map(([k,T])=>[k,T===""?0:Number(T)]));console.log("Submitting payload:",C),t(Mg(C))},y=A=>{c(A.target.value)},b={labels:["DDR","CRR","BBR","HLR","Reg. Ambassador","Porparle Team","ROP","Comp. Operations","Tech. Pool","Found. Pool","Public Share","Net Profit"],datasets:[{label:"Main Distribution (%)",data:[e?.percentageConfiguration?.ddr||0,e?.percentageConfiguration?.crr||0,e?.percentageConfiguration?.bbr||0,e?.percentageConfiguration?.hlr||0,e?.percentageConfiguration?.regionalAmbassador||0,e?.percentageConfiguration?.porparleTeam||0,e?.percentageConfiguration?.rop||0,e?.percentageConfiguration?.companyOperations||0,e?.percentageConfiguration?.technologyPool||0,e?.percentageConfiguration?.foundationPool||0,e?.percentageConfiguration?.publicShare||0,e?.percentageConfiguration?.netProfit||0],backgroundColor:"#038A59",borderColor:"#013723",borderWidth:1}]},w={labels:["Level 1","Level 2","Level 3","Level 4"],datasets:[{label:"DDR Sub-Distribution (%)",data:[e?.percentageConfiguration?.ddrSubDistribution?.level1||0,e?.percentageConfiguration?.ddrSubDistribution?.level2||0,e?.percentageConfiguration?.ddrSubDistribution?.level3||0,e?.percentageConfiguration?.ddrSubDistribution?.level4||0],backgroundColor:["#038A59","#04A66A","#06C27B","#08DE8C"],borderColor:"#013723",borderWidth:1}]},N={labels:["DDR","CRR","BBR","HLR","Reg. Ambassador","Porparle Team","ROP","Comp. Operations","Tech. Pool","Found. Pool","Public Share","Net Profit"],datasets:[{label:"Section Totals (AED)",data:[e?.sectionTotals?.ddr||0,e?.sectionTotals?.crr||0,e?.sectionTotals?.bbr||0,e?.sectionTotals?.hlr||0,e?.sectionTotals?.regionalAmbassador||0,e?.sectionTotals?.porparleTeam||0,e?.sectionTotals?.rop||0,e?.sectionTotals?.companyOperations||0,e?.sectionTotals?.technologyPool||0,e?.sectionTotals?.foundationPool||0,e?.sectionTotals?.publicShare||0,e?.sectionTotals?.netProfit||0],backgroundColor:"#DDC104",borderColor:"#013723",borderWidth:1}]};return i.jsx("div",{className:"min-h-screen bg-[#013220] text-[#DDC104] p-8 font-sans",children:i.jsxs("div",{className:"max-w-7xl mx-auto",children:[i.jsx("h1",{className:"text-4xl font-bold mb-8 text-center tracking-wide",children:"MLM Payment Management Dashboard"}),r&&i.jsx("div",{className:"text-center py-8",children:i.jsx("div",{className:"animate-spin inline-block w-8 h-8 border-4 border-[#DDC104] border-t-transparent rounded-full",role:"status",children:i.jsx("span",{className:"sr-only",children:"Loading..."})})}),!r&&!n&&e&&i.jsxs("div",{className:"space-y-8",children:[i.jsxs("div",{className:"bg-gradient-to-b from-[#038A59] to-[#013723] rounded-lg shadow-lg outline outline-black/20 shadow-black/80 p-6 transform hover:scale-105 transition duration-300",children:[i.jsx("h2",{className:"text-2xl font-semibold mb-6 tracking-wide",children:"Financial Overview"}),i.jsxs("div",{className:"flex justify-around items-center flex-wrap gap-6",children:[i.jsxs("div",{className:"bg-[#013723] p-4 rounded-lg shadow w-60 overflow-hidden",children:[i.jsx("p",{className:"text-lg font-semibold tracking-wide",children:"Total MLM Amount"}),i.jsxs("p",{className:"text-2xl font-bold text-[#DDC104] truncate",children:[e.totalMLMAmount," AED"]})]}),i.jsxs("div",{className:"bg-[#013723] p-4 rounded-lg shadow w-60 overflow-hidden",children:[i.jsx("p",{className:"text-lg font-semibold tracking-wide",children:"Total Earnings"}),i.jsxs("p",{className:"text-2xl font-bold text-[#DDC104] truncate",children:[e.totalEarnings," AED"]})]}),i.jsxs("div",{className:"bg-[#013723] p-4 rounded-lg shadow w-60 overflow-hidden",children:[i.jsx("p",{className:"text-lg font-semibold tracking-wide",children:"Total Transactions"}),i.jsx("p",{className:"text-2xl font-bold text-[#DDC104] truncate",children:e.totalTransactions})]})]}),i.jsxs("div",{className:"mt-8",children:[i.jsx("h3",{className:"text-xl font-semibold mb-4 tracking-wide",children:"Section Totals (AED)"}),i.jsx("div",{className:"bg-[#013723] p-4 rounded-lg",children:i.jsx(Lte,{data:N,options:{responsive:!0,plugins:{legend:{display:!1},tooltip:{backgroundColor:"#013723",titleFont:{size:14},bodyFont:{size:12}},datalabels:{display:!0,color:"#013723",font:{weight:"bold",size:12},formatter:(A,S)=>`${(A/e.totalMLMAmount*100).toFixed(2)}%`,anchor:"center",align:"center"}},scales:{y:{beginAtZero:!0,title:{display:!0,text:"Amount (AED)",color:"#DDC104",font:{size:14}}},x:{title:{display:!0,text:"Category",color:"#DDC104",font:{size:14}}}}}})})]})]}),i.jsxs("div",{className:"bg-gradient-to-b from-[#038A59] to-[#013723] rounded-lg shadow-lg outline outline-black/20 shadow-black/80 p-6 transform hover:scale-105 transition duration-300",children:[i.jsx("h2",{className:"text-2xl font-semibold mb-6 tracking-wide",children:"Distribution Breakdown"}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"text-xl font-semibold mb-4 tracking-wide",children:"Main Distributions (%)"}),i.jsx(Nj,{data:b,options:{responsive:!0,plugins:{legend:{position:"right",labels:{color:"#DDC104",font:{size:12}}},tooltip:{backgroundColor:"#013723",titleFont:{size:14},bodyFont:{size:12}},datalabels:{display:!0,color:"#DDC104",font:{weight:"bold",size:12},formatter:A=>`${A.toFixed(2)}%`,anchor:"center",align:"center"}}}})]}),i.jsxs("div",{children:[i.jsx("h3",{className:"text-xl font-semibold mb-4 tracking-wide",children:"DDR Sub-Distributions (%)"}),i.jsx(Nj,{data:w,options:{responsive:!0,plugins:{legend:{position:"right",labels:{color:"#DDC104",font:{size:12}}},tooltip:{backgroundColor:"#013723",titleFont:{size:14},bodyFont:{size:12}},datalabels:{display:!0,color:"#DDC104",font:{weight:"bold",size:12},formatter:A=>`${A.toFixed(2)}%`,anchor:"center",align:"center"}}}})]})]})]}),i.jsxs("div",{className:"bg-gradient-to-b from-[#038A59] to-[#013723] rounded-lg shadow-lg outline outline-black/20 shadow-black/80 p-6 transform hover:scale-105 transition duration-300",children:[i.jsxs("div",{className:"flex justify-between items-center mb-6",children:[i.jsx("h2",{className:"text-2xl font-semibold tracking-wide",children:"Recent Transactions"}),i.jsxs("div",{className:"flex items-center",children:[i.jsx("label",{htmlFor:"sortBy",className:"text-sm mr-2",children:"Sort by:"}),i.jsxs("div",{className:"relative",children:[i.jsxs("select",{id:"sortBy",value:l,onChange:y,className:"bg-transparent text-sm text-[#DDC104] focus:outline-none appearance-none pr-8",children:[i.jsx("option",{className:"bg-yellow-300 text-black",value:"All",children:"All"}),i.jsx("option",{className:"bg-yellow-300 text-black",value:"Daily",children:"Daily"}),i.jsx("option",{className:"bg-yellow-300 text-black",value:"Weekly",children:"Weekly"}),i.jsx("option",{className:"bg-yellow-300 text-black",value:"Monthly",children:"Monthly"})]}),i.jsx(H4,{className:"absolute right-2 top-1/2 transform -translate-y-1/2 text-[#DDC104]"})]})]})]}),i.jsx("div",{className:"overflow-x-auto",children:i.jsxs("table",{className:"min-w-full table-auto bg-[#013723] rounded-lg shadow",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"bg-[#038A59]",children:[i.jsx("th",{className:"px-6 py-3 text-left text-sm font-medium tracking-wide",children:"User"}),i.jsx("th",{className:"px-6 py-3 text-left text-sm font-medium tracking-wide",children:"Amount"}),i.jsx("th",{className:"px-6 py-3 text-left text-sm font-medium tracking-wide",children:"Ride ID"}),i.jsx("th",{className:"px-6 py-3 text-left text-sm font-medium tracking-wide",children:"Timestamp"})]})}),i.jsx("tbody",{children:e.recentTransactions.map((A,S)=>i.jsxs("tr",{className:"border-b border-[#013723] hover:bg-[#038A59]/50",children:[i.jsx("td",{className:"px-6 py-4",children:A.userId?.firstName&&A.userId?.lastName?`${A.userId.firstName} ${A.userId.lastName}`:A.userId?._id||"Unknown User"}),i.jsxs("td",{className:"px-6 py-4",children:[A.amount," AED"]}),i.jsx("td",{className:"px-6 py-3",children:A.rideId}),i.jsx("td",{className:"px-6 py-4",children:new Date(A.timestamp).toLocaleString()})]},S))})]})})]}),i.jsxs("div",{className:"bg-gradient-to-b from-[#038A59] to-[#013723] rounded-lg shadow-lg outline outline-black/20 shadow-black/80 p-6 transform hover:scale-105 transition duration-300",children:[i.jsx("h2",{className:"text-2xl font-semibold mb-6 tracking-wide",children:"Update MLM Distributions"}),i.jsxs("form",{onSubmit:x,className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"text-xl font-semibold mb-4 tracking-wide",children:"Main Distributions (%)"}),["ddr","crr","bbr","hlr","regionalAmbassador","porparleTeam","rop","companyOperations","technologyPool","foundationPool","publicShare","netProfit"].map(A=>i.jsxs("div",{className:"mb-4",children:[i.jsx("label",{htmlFor:A,className:"block text-sm font-medium mb-1 tracking-wide",children:A.toUpperCase()}),i.jsx("input",{id:A,type:"number",name:A,value:u[A],onChange:p,className:"w-full p-2 border border-[#013723] rounded-lg bg-[#013723] text-[#DDC104] focus:outline-none focus:ring-2 focus:ring-[#DDC104] transition duration-200",step:"0.01",min:"0",max:"100",placeholder:"Enter percentage","aria-required":"true"})]},A))]}),i.jsxs("div",{children:[i.jsx("h3",{className:"text-xl font-semibold mb-4 tracking-wide",children:"Sub-Distributions (%)"}),["ddrLevel1","ddrLevel2","ddrLevel3","ddrLevel4","gc","la","ceo","coo","cmo","cfo","cto","chro","topTeamPerform","winner","fighter"].map(A=>i.jsxs("div",{className:"mb-4",children:[i.jsx("label",{htmlFor:A,className:"block text-sm font-medium mb-1 tracking-wide",children:A.toUpperCase()}),i.jsx("input",{id:A,type:"number",name:A,value:u[A],onChange:p,className:"w-full p-2 border border-[#013723] rounded-lg bg-[#013723] text-[#DDC104] focus:outline-none focus:ring-2 focus:ring-[#DDC104] transition duration-200",step:"0.01",min:"0",placeholder:"Enter percentage","aria-required":"true"})]},A))]}),i.jsxs("div",{children:[i.jsx("h3",{className:"text-xl font-semibold mb-4 tracking-wide",children:"Other Configurations"}),["operationExpense","organizationEvent","chairmanFounder","shareholder1","shareholder2","shareholder3"].map(A=>i.jsxs("div",{className:"mb-4",children:[i.jsx("label",{htmlFor:A,className:"block text-sm font-medium mb-1 tracking-wide",children:A.toUpperCase()}),i.jsx("input",{id:A,type:"number",name:A,value:u[A],onChange:p,className:"w-full p-2 border border-[#013723] rounded-lg bg-[#013723] text-[#DDC104] focus:outline-none focus:ring-2 focus:ring-[#DDC104] transition duration-200",step:"0.01",min:"0",placeholder:"Enter percentage","aria-required":"true"})]},A))]}),i.jsx("div",{className:"col-span-1 md:col-span-3",children:i.jsx("button",{type:"submit",className:"w-full bg-[#DDC104] text-[#013723] px-6 py-3 rounded-lg font-semibold tracking-wide hover:bg-[#e8d34a] focus:outline-none focus:ring-2 focus:ring-[#DDC104] transition duration-200 disabled:opacity-50",disabled:r,children:r?"Updating...":"Update Distributions"})})]})]})]})]})})},sre=()=>{const t=["DDR","CCR","BBR","HLR","AMBESSDOR","MLM MANAGEMENT","Day"],[e,r]=O.useState("DDR"),n=()=>{switch(e){case"CCR":return i.jsx($Z,{});case"BBR":return i.jsx(BZ,{});case"HLR":return i.jsx(FZ,{});case"AMBESSDOR":return i.jsx(YZ,{});case"MLM MANAGEMENT":return i.jsx(are,{});default:return i.jsx(IZ,{activeTab:e})}};return i.jsxs("div",{className:"p-5",children:[i.jsx("div",{className:"flex border-b border-yellow-400 overflow-x-auto",children:i.jsx("div",{className:"flex flex-nowrap",children:t.map((a,s)=>i.jsxs("div",{className:"flex items-center",children:[i.jsxs("button",{onClick:()=>r(a),className:`px-4 py-2 text-sm font-semibold flex items-center gap-2 transition-colors duration-200
${e===a?"border-b-2 border-yellow-400 text-yellow-400":"text-gray-300 hover:text-yellow-300"}
${a==="Day"?"border border-yellow-400 border-b-0 rounded-t-md":""}`,children:[a,a==="Day"&&i.jsx(m_,{className:"text-lg"})]}),s<t.length-1&&i.jsx("div",{className:"w-[1px] h-6 bg-yellow-400/50"})]},s))})}),i.jsx("div",{className:"mt-4",children:n()})]})},ire=()=>i.jsxs("div",{className:"flex min-h-screen",children:[i.jsx(Ue,{}),i.jsx("div",{className:"flex-1",children:i.jsx(sre,{})})]}),ore=()=>{const t=Ba(),e=ua(U=>U.user||{}),{drivers:r=[],loading:n=!1,error:a=null,success:s=!1,editSuccess:o=!1,deleteSuccess:l=!1,totalDrivers:c=0,updateKey:u=0}=e,[h,p]=O.useState("All"),[m,x]=O.useState(null),[y,b]=O.useState(null),[w,N]=O.useState(null),[A,S]=O.useState({username:"",firstName:"",lastName:"",email:"",phoneNumber:"",gender:"",country:"",kycLevel:"",kycStatus:"",hasVehicle:"",vehicleOwnerName:"",companyName:"",vehiclePlateNumber:"",vehicleMakeModel:"",chassisNumber:"",vehicleColor:"",registrationExpiryDate:"",vehicleType:"",serviceType:"",serviceCategory:"",wheelchair:"",packingHelper:"",loadingUnloadingHelper:"",fixingHelper:"",driverSettings:{autoAccept:{enabled:!1},ridePreferences:{pinkCaptainMode:!1}}}),[C,k]=O.useState({}),[T,E]=O.useState({licenseImage:null,vehicleRegistrationCard:null,roadAuthorityCertificate:null,insuranceCertificate:null,vehicleImages:[]}),[_,L]=O.useState(!1),[P,R]=O.useState(null);O.useEffect(()=>{console.log("Fetching all drivers"),t(sd())},[t]),O.useEffect(()=>{if(a||o||l){console.log("Resetting state due to:",{error:a,editSuccess:o,deleteSuccess:l});const U=setTimeout(()=>{t(Q8()),N(null),k({})},5e3);return()=>clearTimeout(U)}},[a,o,l,t]);const z=U=>{console.log("Sort changed to:",U.target.value),p(U.target.value)},B=U=>{console.log("Viewing driver:",U._id,"Driver data:",U),x(U)},Y=U=>{console.log("Editing driver:",U._id,"Driver data:",U),b(U),S({username:U.username||"",firstName:U.firstName||"",lastName:U.lastName||"",email:U.email||"",phoneNumber:U.phoneNumber||"",gender:U.gender||"",country:U.country||"",kycLevel:U.kycLevel!==void 0?String(U.kycLevel):"",kycStatus:U.kycStatus||"",hasVehicle:U.hasVehicle?"yes":"no",vehicleOwnerName:U.pendingVehicleData?.vehicleOwnerName||U.vehicle?.vehicleOwnerName||"",companyName:U.pendingVehicleData?.companyName||U.vehicle?.companyName||"",vehiclePlateNumber:U.pendingVehicleData?.vehiclePlateNumber||U.vehicle?.vehiclePlateNumber||"",vehicleMakeModel:U.pendingVehicleData?.vehicleMakeModel||U.vehicle?.vehicleMakeModel||"",chassisNumber:U.pendingVehicleData?.chassisNumber||U.vehicle?.chassisNumber||"",vehicleColor:U.pendingVehicleData?.vehicleColor||U.vehicle?.vehicleColor||"",registrationExpiryDate:U.pendingVehicleData?.registrationExpiryDate||U.vehicle?.registrationExpiryDate?new Date(U.pendingVehicleData?.registrationExpiryDate||U.vehicle?.registrationExpiryDate).toISOString().split("T")[0]:"",vehicleType:U.pendingVehicleData?.vehicleType||U.vehicle?.vehicleType||"",serviceType:U.pendingVehicleData?.serviceType||U.vehicle?.serviceType||"",serviceCategory:U.pendingVehicleData?.serviceCategory||U.vehicle?.serviceCategory||"",wheelchair:U.pendingVehicleData?.wheelchair!==void 0?String(U.pendingVehicleData.wheelchair):U.vehicle?.wheelchair!==void 0?String(U.vehicle.wheelchair):"",packingHelper:U.pendingVehicleData?.packingHelper!==void 0?String(U.pendingVehicleData.packingHelper):U.vehicle?.packingHelper!==void 0?String(U.vehicle.packingHelper):"",loadingUnloadingHelper:U.pendingVehicleData?.loadingUnloadingHelper!==void 0?String(U.pendingVehicleData.loadingUnloadingHelper):U.vehicle?.loadingUnloadingHelper!==void 0?String(U.vehicle.loadingUnloadingHelper):"",fixingHelper:U.pendingVehicleData?.fixingHelper!==void 0?String(U.pendingVehicleData.fixingHelper):U.vehicle?.fixingHelper!==void 0?String(U.vehicle.fixingHelper):"",driverSettings:{autoAccept:U.driverSettings?.autoAccept||{enabled:!1},ridePreferences:U.driverSettings?.ridePreferences||{pinkCaptainMode:!1}}}),E({licenseImage:null,vehicleRegistrationCard:null,roadAuthorityCertificate:null,insuranceCertificate:null,vehicleImages:[]}),k({})},X=()=>{console.log("Closing popup:",m?"View":"Edit"),x(null),b(null),k({}),E({licenseImage:null,vehicleRegistrationCard:null,roadAuthorityCertificate:null,insuranceCertificate:null,vehicleImages:[]})},H=U=>{const{name:re,value:ae}=U.target;if(re.includes("driverSettings.")){const[we,ye,ue]=re.split(".");S(je=>({...je,driverSettings:{...je.driverSettings,[ye]:{...je.driverSettings[ye],[ue]:ae==="true"?!0:ae==="false"?!1:ae}}}))}else S(we=>({...we,[re]:ae}));k(we=>({...we,[re]:""}))},W=U=>{const{name:re,files:ae}=U.target;E(re==="vehicleImages"?we=>({...we,[re]:Array.from(ae)}):we=>({...we,[re]:ae[0]}))},V=async U=>{U.preventDefault(),console.log("Submitting edit for userId:",y._id,"Data:",A,"Files:",T);try{const re=new FormData;Object.entries(A).forEach(([ae,we])=>{ae==="driverSettings"?re.append(ae,JSON.stringify(we)):we!==""&&re.append(ae,we)}),T.licenseImage&&re.append("licenseImage",T.licenseImage),T.vehicleRegistrationCard&&re.append("vehicleRegistrationCard",T.vehicleRegistrationCard),T.roadAuthorityCertificate&&re.append("roadAuthorityCertificate",T.roadAuthorityCertificate),T.insuranceCertificate&&re.append("insuranceCertificate",T.insuranceCertificate),T.vehicleImages.forEach(ae=>re.append("vehicleImages",ae)),await t(_g({userId:y._id,userData:re})).unwrap(),console.log("Edit driver successful:",y._id),b(null),S({username:"",firstName:"",lastName:"",email:"",phoneNumber:"",gender:"",country:"",kycLevel:"",kycStatus:"",hasVehicle:"",vehicleOwnerName:"",companyName:"",vehiclePlateNumber:"",vehicleMakeModel:"",chassisNumber:"",vehicleColor:"",registrationExpiryDate:"",vehicleType:"",serviceType:"",serviceCategory:"",wheelchair:"",packingHelper:"",loadingUnloadingHelper:"",fixingHelper:"",driverSettings:{autoAccept:{enabled:!1},ridePreferences:{pinkCaptainMode:!1}}}),E({licenseImage:null,vehicleRegistrationCard:null,roadAuthorityCertificate:null,insuranceCertificate:null,vehicleImages:[]})}catch(re){console.error("Edit driver failed:",re);try{const ae=typeof re=="string"?JSON.parse(re):re;k(typeof ae=="object"&&ae!==null?ae:{general:ae||"Failed to edit driver"})}catch{k({general:re||"Failed to edit driver"})}}},Z=U=>{R(U),L(!0)},F=async()=>{if(P){console.log("Initiating delete for userId:",P),N(P);try{await t(Bh(P)).unwrap(),console.log("Delete driver successful:",P)}catch(U){console.error("Delete driver failed:",U),N(null)}}L(!1),R(null)},G=()=>{L(!1),R(null)},te=r.filter(U=>h==="All"?!0:h==="Pending"||h==="Approved"?U.kycStatus===h.toLowerCase()||!U.kycStatus&&h==="Pending":!1);console.log("Rendering with drivers:",te.map(U=>U._id),"updateKey:",u);const K="https://aaaogo.xyz/";return i.jsxs("div",{className:"flex min-h-screen bg-[#013220] text-[#DDC104] font-sans",children:[i.jsx(Ue,{}),i.jsx("div",{className:"flex-1 p-8",children:i.jsxs("div",{className:"max-w-7xl mx-auto",children:[i.jsx("h1",{className:"text-4xl font-bold mb-8 text-center tracking-wide",children:"Driver Management Dashboard"}),n&&!w&&!y&&!m&&i.jsx("div",{className:"text-center py-8",children:i.jsx("div",{className:"animate-spin inline-block w-8 h-8 border-4 border-[#DDC104] border-t-transparent rounded-full",role:"status",children:i.jsx("span",{className:"sr-only",children:"Loading..."})})}),a&&i.jsxs("div",{className:"bg-red-600 text-white p-4 rounded-lg mb-6 shadow-lg outline outline-black/20 shadow-black/80 flex items-center",children:[i.jsx("svg",{className:"w-6 h-6 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),i.jsx("span",{children:typeof a=="string"&&a==="canceled"?"Request timed out. Please try again.":typeof a=="string"?a:a.general||"An error occurred"})]}),s&&i.jsxs("div",{className:"bg-[#038A59] text-white p-4 rounded-lg mb-6 shadow-lg outline outline-black/20 shadow-black/80 flex items-center",children:[i.jsx("svg",{className:"w-6 h-6 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M5 13l4 4L19 7"})}),i.jsxs("span",{children:["Drivers fetched successfully! Total: ",c]})]}),o&&i.jsxs("div",{className:"bg-[#038A59] text-white p-4 rounded-lg mb-6 shadow-lg outline outline-black/20 shadow-black/80 flex items-center",children:[i.jsx("svg",{className:"w-6 h-6 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M5 13l4 4L19 7"})}),i.jsx("span",{children:"Driver updated successfully!"})]}),l&&i.jsxs("div",{className:"bg-[#038A59] text-white p-4 rounded-lg mb-6 shadow-lg outline outline-black/20 shadow-black/80 flex items-center",children:[i.jsx("svg",{className:"w-6 h-6 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M5 13l4 4L19 7"})}),i.jsx("span",{children:"Driver deleted successfully!"})]}),!n&&!a&&r.length>0&&i.jsxs("div",{className:"bg-gradient-to-b from-[#038A59] to-[#013723] rounded-lg shadow-lg outline outline-black/20 shadow-black/80 p-6 transform hover:scale-105 transition duration-300",children:[i.jsxs("div",{className:"flex justify-between items-center mb-6",children:[i.jsx("h2",{className:"text-2xl font-semibold tracking-wide",children:"Driver List"}),i.jsxs("div",{className:"flex items-center",children:[i.jsx("label",{htmlFor:"sortBy",className:"text-sm mr-2 tracking-wide",children:"Sort by:"}),i.jsxs("div",{className:"relative",children:[i.jsxs("select",{id:"sortBy",value:h,onChange:z,className:"bg-transparent text-sm text-[#DDC104] focus:outline-none appearance-none pr-8",children:[i.jsx("option",{className:"bg-yellow-300 text-black",value:"All",children:"All"}),i.jsx("option",{className:"bg-yellow-300 text-black",value:"Pending",children:"Pending KYC"}),i.jsx("option",{className:"bg-yellow-300 text-black",value:"Approved",children:"Approved KYC"})]}),i.jsx(H4,{className:"absolute right-2 top-1/2 transform -translate-y-1/2 text-[#DDC104]"})]})]})]}),i.jsx("div",{className:"overflow-x-auto",children:i.jsxs("table",{className:"w-full text-sm text-left bg-[#013723] rounded-lg shadow",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-[#038A59] bg-[#038A59]",children:[i.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"ID"}),i.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"Username"}),i.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"Email"}),i.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"Phone"}),i.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"Vehicle Type"}),i.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"KYC Status"}),i.jsx("th",{className:"px-4 py-3 font-medium tracking-wide text-center",children:"Action"})]})}),i.jsx("tbody",{children:te.map(U=>i.jsxs("tr",{className:"border-b border-[#013723] hover:bg-[#038A59]/50",children:[i.jsx("td",{className:"px-4 py-3",children:U._id.slice(-6)}),i.jsx("td",{className:"px-4 py-3",children:U.username}),i.jsx("td",{className:"px-4 py-3",children:U.email}),i.jsx("td",{className:"px-4 py-3",children:U.phoneNumber}),i.jsx("td",{className:"px-4 py-3",children:U.vehicle?.vehicleType||"N/A"}),i.jsx("td",{className:"px-4 py-3",children:U.kycStatus||"Pending"}),i.jsx("td",{className:"px-4 py-3",children:i.jsxs("div",{className:"flex items-center gap-3 justify-center",children:[i.jsx("button",{onClick:()=>Y(U),className:"border border-[#DDC104] p-2 rounded-full text-[#DDC104] hover:bg-[#DDC104] hover:text-[#013723] transition duration-200",disabled:w===U._id,children:i.jsx(w_,{size:16})}),i.jsx("button",{onClick:()=>B(U),className:"bg-[#DDC104] text-[#013723] px-4 py-1.5 rounded-full text-xs font-medium hover:bg-[#e8d34a] transition duration-200",children:"View"}),i.jsx("button",{onClick:()=>Z(U._id),className:"border border-[#DDC104] p-2 rounded-full text-[#DDC104] hover:bg-[#DDC104] hover:text-[#013723] transition duration-200",disabled:w===U._id,children:w===U._id?i.jsx("div",{className:"animate-spin inline-block w-4 h-4 border-2 border-[#DDC104] border-t-transparent rounded-full"}):i.jsx(A_,{size:16})})]})})]},U._id))})]})})]}),!n&&!a&&r.length===0&&i.jsxs("div",{className:"bg-[#038A59] text-white p-4 rounded-lg mb-6 shadow-lg outline outline-black/20 shadow-black/80 flex items-center",children:[i.jsx("svg",{className:"w-6 h-6 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),i.jsx("span",{children:"No drivers found"})]}),m&&i.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",role:"dialog","aria-modal":"true",tabIndex:"-1",children:i.jsxs("div",{className:"bg-gradient-to-b from-[#038A59] to-[#013723] rounded-lg shadow-lg outline outline-black/20 shadow-black/80 p-6 w-full max-w-4xl text-[#DDC104] font-sans transform transition-all duration-300 overflow-y-auto max-h-[90vh]",children:[i.jsx("h2",{className:"text-2xl font-semibold tracking-wide mb-4",children:"Driver Details"}),i.jsxs("div",{className:"mb-6",children:[i.jsx("h3",{className:"text-xl font-medium tracking-wide mb-2",children:"Driver Information"}),i.jsx("table",{className:"w-full text-sm text-left bg-[#013723] rounded-lg shadow no-scrollbar",children:i.jsxs("tbody",{children:[i.jsxs("tr",{className:"border-b border-[#038A59]",children:[i.jsx("td",{className:"px-4 py-2 font-medium",children:"ID"}),i.jsx("td",{className:"px-4 py-2",children:m._id?.slice(-6)||"N/A"})]}),i.jsxs("tr",{className:"border-b border-[#038A59]",children:[i.jsx("td",{className:"px-4 py-2 font-medium",children:"Username"}),i.jsx("td",{className:"px-4 py-2",children:m.username||"N/A"})]}),i.jsxs("tr",{className:"border-b border-[#038A59]",children:[i.jsx("td",{className:"px-4 py-2 font-medium",children:"Full Name"}),i.jsxs("td",{className:"px-4 py-2",children:[m.firstName||""," ",m.lastName||""]})]}),i.jsxs("tr",{className:"border-b border-[#038A59]",children:[i.jsx("td",{className:"px-4 py-2 font-medium",children:"Email"}),i.jsx("td",{className:"px-4 py-2",children:m.email||"N/A"})]}),i.jsxs("tr",{className:"border-b border-[#038A59]",children:[i.jsx("td",{className:"px-4 py-2 font-medium",children:"Phone Number"}),i.jsx("td",{className:"px-4 py-2",children:m.phoneNumber||"N/A"})]}),i.jsxs("tr",{className:"border-b border-[#038A59]",children:[i.jsx("td",{className:"px-4 py-2 font-medium",children:"Gender"}),i.jsx("td",{className:"px-4 py-2",children:m.gender||"N/A"})]}),i.jsxs("tr",{className:"border-b border-[#038A59]",children:[i.jsx("td",{className:"px-4 py-2 font-medium",children:"Country"}),i.jsx("td",{className:"px-4 py-2",children:m.country||"N/A"})]}),i.jsxs("tr",{className:"border-b border-[#038A59]",children:[i.jsx("td",{className:"px-4 py-2 font-medium",children:"KYC Status"}),i.jsx("td",{className:"px-4 py-2",children:m.kycStatus||"Pending"})]}),i.jsxs("tr",{className:"border-b border-[#038A59]",children:[i.jsx("td",{className:"px-4 py-2 font-medium",children:"KYC Level"}),i.jsx("td",{className:"px-4 py-2",children:m.kycLevel!==void 0?m.kycLevel:"N/A"})]}),i.jsxs("tr",{className:"border-b border-[#038A59]",children:[i.jsx("td",{className:"px-4 py-2 font-medium",children:"Has Vehicle"}),i.jsx("td",{className:"px-4 py-2",children:m.hasVehicle?"Yes":"No"})]}),i.jsxs("tr",{className:"border-b border-[#038A59]",children:[i.jsx("td",{className:"px-4 py-2 font-medium",children:"Created At"}),i.jsx("td",{className:"px-4 py-2",children:m.createdAt?new Date(m.createdAt).toLocaleString():"N/A"})]})]})})]}),m.vehicle&&i.jsxs("div",{className:"mb-6",children:[i.jsx("h3",{className:"text-xl font-medium tracking-wide mb-2",children:"Vehicle Information"}),i.jsx("table",{className:"w-full text-sm text-left bg-[#013723] rounded-lg shadow no-scrollbar",children:i.jsxs("tbody",{children:[i.jsxs("tr",{className:"border-b border-[#038A59]",children:[i.jsx("td",{className:"px-4 py-2 font-medium",children:"Vehicle Owner"}),i.jsx("td",{className:"px-4 py-2",children:m.vehicle.vehicleOwnerName||"N/A"})]}),i.jsxs("tr",{className:"border-b border-[#038A59]",children:[i.jsx("td",{className:"px-4 py-2 font-medium",children:"Company Name"}),i.jsx("td",{className:"px-4 py-2",children:m.vehicle.companyName||"N/A"})]}),i.jsxs("tr",{className:"border-b border-[#038A59]",children:[i.jsx("td",{className:"px-4 py-2 font-medium",children:"Vehicle Plate"}),i.jsx("td",{className:"px-4 py-2",children:m.vehicle.vehiclePlateNumber||"N/A"})]}),i.jsxs("tr",{className:"border-b border-[#038A59]",children:[i.jsx("td",{className:"px-4 py-2 font-medium",children:"Vehicle Model"}),i.jsx("td",{className:"px-4 py-2",children:m.vehicle.vehicleMakeModel||"N/A"})]}),i.jsxs("tr",{className:"border-b border-[#038A59]",children:[i.jsx("td",{className:"px-4 py-2 font-medium",children:"Chassis Number"}),i.jsx("td",{className:"px-4 py-2",children:m.vehicle.chassisNumber||"N/A"})]}),i.jsxs("tr",{className:"border-b border-[#038A59]",children:[i.jsx("td",{className:"px-4 py-2 font-medium",children:"Vehicle Color"}),i.jsx("td",{className:"px-4 py-2",children:m.vehicle.vehicleColor||"N/A"})]}),i.jsxs("tr",{className:"border-b border-[#038A59]",children:[i.jsx("td",{className:"px-4 py-2 font-medium",children:"Registration Expiry"}),i.jsx("td",{className:"px-4 py-2",children:m.vehicle.registrationExpiryDate?new Date(m.vehicle.registrationExpiryDate).toLocaleDateString():"N/A"})]}),i.jsxs("tr",{className:"border-b border-[#038A59]",children:[i.jsx("td",{className:"px-4 py-2 font-medium",children:"Service Type"}),i.jsx("td",{className:"px-4 py-2",children:m.vehicle.serviceType||"N/A"})]}),i.jsxs("tr",{className:"border-b border-[#038A59]",children:[i.jsx("td",{className:"px-4 py-2 font-medium",children:"Vehicle Type"}),i.jsx("td",{className:"px-4 py-2",children:m.vehicle.vehicleType||"N/A"})]}),i.jsxs("tr",{className:"border-b border-[#038A59]",children:[i.jsx("td",{className:"px-4 py-2 font-medium",children:"Wheelchair Accessible"}),i.jsx("td",{className:"px-4 py-2",children:m.vehicle.wheelchair?"Yes":"No"})]}),i.jsxs("tr",{className:"border-b border-[#038A59]",children:[i.jsx("td",{className:"px-4 py-2 font-medium",children:"Packing Helper"}),i.jsx("td",{className:"px-4 py-2",children:m.vehicle.packingHelper?"Yes":"No"})]}),i.jsxs("tr",{className:"border-b border-[#038A59]",children:[i.jsx("td",{className:"px-4 py-2 font-medium",children:"Loading/Unloading Helper"}),i.jsx("td",{className:"px-4 py-2",children:m.vehicle.loadingUnloadingHelper?"Yes":"No"})]}),i.jsxs("tr",{className:"border-b border-[#038A59]",children:[i.jsx("td",{className:"px-4 py-2 font-medium",children:"Fixing Helper"}),i.jsx("td",{className:"px-4 py-2",children:m.vehicle.fixingHelper?"Yes":"No"})]})]})})]}),m.pendingVehicleData&&i.jsxs("div",{className:"mb-6",children:[i.jsx("h3",{className:"text-xl font-medium tracking-wide mb-2",children:"Pending Vehicle Information"}),i.jsx("table",{className:"w-full text-sm text-left bg-[#013723] rounded-lg shadow no-scrollbar",children:i.jsxs("tbody",{children:[i.jsxs("tr",{className:"border-b border-[#038A59]",children:[i.jsx("td",{className:"px-4 py-2 font-medium",children:"Vehicle Owner"}),i.jsx("td",{className:"px-4 py-2",children:m.pendingVehicleData.vehicleOwnerName||"N/A"})]}),i.jsxs("tr",{className:"border-b border-[#038A59]",children:[i.jsx("td",{className:"px-4 py-2 font-medium",children:"Company Name"}),i.jsx("td",{className:"px-4 py-2",children:m.pendingVehicleData.companyName||"N/A"})]}),i.jsxs("tr",{className:"border-b border-[#038A59]",children:[i.jsx("td",{className:"px-4 py-2 font-medium",children:"Vehicle Plate"}),i.jsx("td",{className:"px-4 py-2",children:m.pendingVehicleData.vehiclePlateNumber||"N/A"})]}),i.jsxs("tr",{className:"border-b border-[#038A59]",children:[i.jsx("td",{className:"px-4 py-2 font-medium",children:"Vehicle Model"}),i.jsx("td",{className:"px-4 py-2",children:m.pendingVehicleData.vehicleMakeModel||"N/A"})]}),i.jsxs("tr",{className:"border-b border-[#038A59]",children:[i.jsx("td",{className:"px-4 py-2 font-medium",children:"Chassis Number"}),i.jsx("td",{className:"px-4 py-2",children:m.pendingVehicleData.chassisNumber||"N/A"})]}),i.jsxs("tr",{className:"border-b border-[#038A59]",children:[i.jsx("td",{className:"px-4 py-2 font-medium",children:"Vehicle Color"}),i.jsx("td",{className:"px-4 py-2",children:m.pendingVehicleData.vehicleColor||"N/A"})]}),i.jsxs("tr",{className:"border-b border-[#038A59]",children:[i.jsx("td",{className:"px-4 py-2 font-medium",children:"Registration Expiry"}),i.jsx("td",{className:"px-4 py-2",children:m.pendingVehicleData.registrationExpiryDate?new Date(m.pendingVehicleData.registrationExpiryDate).toLocaleDateString():"N/A"})]}),i.jsxs("tr",{className:"border-b border-[#038A59]",children:[i.jsx("td",{className:"px-4 py-2 font-medium",children:"Service Type"}),i.jsx("td",{className:"px-4 py-2",children:m.pendingVehicleData.serviceType||"N/A"})]}),i.jsxs("tr",{className:"border-b border-[#038A59]",children:[i.jsx("td",{className:"px-4 py-2 font-medium",children:"Vehicle Type"}),i.jsx("td",{className:"px-4 py-2",children:m.pendingVehicleData.vehicleType||"N/A"})]}),i.jsxs("tr",{className:"border-b border-[#038A59]",children:[i.jsx("td",{className:"px-4 py-2 font-medium",children:"Wheelchair Accessible"}),i.jsx("td",{className:"px-4 py-2",children:m.pendingVehicleData.wheelchair?"Yes":"No"})]}),i.jsxs("tr",{className:"border-b border-[#038A59]",children:[i.jsx("td",{className:"px-4 py-2 font-medium",children:"Packing Helper"}),i.jsx("td",{className:"px-4 py-2",children:m.pendingVehicleData.packingHelper?"Yes":"No"})]}),i.jsxs("tr",{className:"border-b border-[#038A59]",children:[i.jsx("td",{className:"px-4 py-2 font-medium",children:"Loading/Unloading Helper"}),i.jsx("td",{className:"px-4 py-2",children:m.pendingVehicleData.loadingUnloadingHelper?"Yes":"No"})]}),i.jsxs("tr",{className:"border-b border-[#038A59]",children:[i.jsx("td",{className:"px-4 py-2 font-medium",children:"Fixing Helper"}),i.jsx("td",{className:"px-4 py-2",children:m.pendingVehicleData.fixingHelper?"Yes":"No"})]})]})})]}),(m.vehicle||m.pendingVehicleData)&&i.jsxs("div",{className:"mb-6",children:[i.jsx("h3",{className:"text-xl font-medium tracking-wide mb-2",children:"Vehicle Images"}),i.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[m.vehicle?.vehicleRegistrationCard?.front&&i.jsxs("div",{children:[i.jsx("p",{className:"font-medium",children:"Registration Card (Front)"}),i.jsx("img",{src:`${K}${m.vehicle.vehicleRegistrationCard.front}`,alt:"Registration Card Front",className:"w-full h-48 object-contain rounded-lg",onError:U=>{U.target.src="https://via.placeholder.com/150?text=Image+Not+Found"}})]}),m.vehicle?.vehicleRegistrationCard?.back&&i.jsxs("div",{children:[i.jsx("p",{className:"font-medium",children:"Registration Card (Back)"}),i.jsx("img",{src:`${K}${m.vehicle.vehicleRegistrationCard.back}`,alt:"Registration Card Back",className:"w-full h-48 object-contain rounded-lg",onError:U=>{U.target.src="https://via.placeholder.com/150?text=Image+Not+Found"}})]}),m.vehicle?.roadAuthorityCertificate&&i.jsxs("div",{children:[i.jsx("p",{className:"font-medium",children:"Road Authority Certificate"}),i.jsx("img",{src:`${K}${m.vehicle.roadAuthorityCertificate}`,alt:"Road Authority Certificate",className:"w-full h-48 object-contain rounded-lg",onError:U=>{U.target.src="https://via.placeholder.com/150?text=Image+Not+Found"}})]}),m.vehicle?.insuranceCertificate&&i.jsxs("div",{children:[i.jsx("p",{className:"font-medium",children:"Insurance Certificate"}),i.jsx("img",{src:`${K}${m.vehicle.insuranceCertificate}`,alt:"Insurance Certificate",className:"w-full h-48 object-contain rounded-lg",onError:U=>{U.target.src="https://via.placeholder.com/150?text=Image+Not+Found"}})]}),m.vehicle?.vehicleImages?.map((U,re)=>i.jsxs("div",{children:[i.jsxs("p",{className:"font-medium",children:["Vehicle Image ",re+1]}),i.jsx("img",{src:`${K}${U}`,alt:`Vehicle Image ${re+1}`,className:"w-full h-48 object-contain rounded-lg",onError:ae=>{ae.target.src="https://via.placeholder.com/150?text=Image+Not+Found"}})]},re)),m.pendingVehicleData?.vehicleRegistrationCard?.front&&i.jsxs("div",{children:[i.jsx("p",{className:"font-medium",children:"Pending Registration Card (Front)"}),i.jsx("img",{src:`${K}${m.pendingVehicleData.vehicleRegistrationCard.front}`,alt:"Pending Registration Card Front",className:"w-full h-48 object-contain rounded-lg",onError:U=>{U.target.src="https://via.placeholder.com/150?text=Image+Not+Found"}})]}),m.pendingVehicleData?.vehicleRegistrationCard?.back&&i.jsxs("div",{children:[i.jsx("p",{className:"font-medium",children:"Pending Registration Card (Back)"}),i.jsx("img",{src:`${K}${m.pendingVehicleData.vehicleRegistrationCard.back}`,alt:"Pending Registration Card Back",className:"w-full h-48 object-contain rounded-lg",onError:U=>{U.target.src="https://via.placeholder.com/150?text=Image+Not+Found"}})]}),m.pendingVehicleData?.roadAuthorityCertificate&&i.jsxs("div",{children:[i.jsx("p",{className:"font-medium",children:"Pending Road Authority Certificate"}),i.jsx("img",{src:`${K}${m.pendingVehicleData.roadAuthorityCertificate}`,alt:"Pending Road Authority Certificate",className:"w-full h-48 object-contain rounded-lg",onError:U=>{U.target.src="https://via.placeholder.com/150?text=Image+Not+Found"}})]}),m.pendingVehicleData?.insuranceCertificate&&i.jsxs("div",{children:[i.jsx("p",{className:"font-medium",children:"Pending Insurance Certificate"}),i.jsx("img",{src:`${K}${m.pendingVehicleData.insuranceCertificate}`,alt:"Pending Insurance Certificate",className:"w-full h-48 object-contain rounded-lg",onError:U=>{U.target.src="https://via.placeholder.com/150?text=Image+Not+Found"}})]}),m.pendingVehicleData?.vehicleImages?.map((U,re)=>i.jsxs("div",{children:[i.jsxs("p",{className:"font-medium",children:["Pending Vehicle Image ",re+1]}),i.jsx("img",{src:`${K}${U}`,alt:`Pending Vehicle Image ${re+1}`,className:"w-full h-48 object-contain rounded-lg",onError:ae=>{ae.target.src="https://via.placeholder.com/150?text=Image+Not+Found"}})]},re))]})]}),i.jsx("div",{className:"mt-6 flex justify-end",children:i.jsx("button",{onClick:X,className:"bg-[#DDC104] text-[#013723] px-4 py-2 rounded-full text-sm font-medium hover:bg-[#e8d34a] transition duration-200",autoFocus:!0,children:"Close"})})]})}),y&&i.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",role:"dialog","aria-modal":"true",tabIndex:"-1",children:i.jsxs("div",{className:"bg-gradient-to-b from-[#038A59] to-[#013723] rounded-lg shadow-lg outline outline-black/20 shadow-black/80 p-4 w-full max-w-sm sm:max-w-lg text-[#DDC104] font-sans transform transition-all duration-300 overflow-y-auto max-h-[80vh]",children:[i.jsx("h2",{className:"text-xl font-semibold tracking-wide mb-3",children:"Edit Driver"}),i.jsxs("form",{onSubmit:V,className:"space-y-3",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"text-base font-medium tracking-wide mb-2",children:"Driver Information"}),i.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium",children:"Username"}),i.jsx("input",{type:"text",name:"username",value:A.username,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm"}),C.username&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:C.username})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium",children:"First Name"}),i.jsx("input",{type:"text",name:"firstName",value:A.firstName,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm"}),C.firstName&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:C.firstName})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium",children:"Last Name"}),i.jsx("input",{type:"text",name:"lastName",value:A.lastName,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm"}),C.lastName&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:C.lastName})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium",children:"Email"}),i.jsx("input",{type:"email",name:"email",value:A.email,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm"}),C.email&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:C.email})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium",children:"Phone Number"}),i.jsx("input",{type:"text",name:"phoneNumber",value:A.phoneNumber,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm"}),C.phoneNumber&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:C.phoneNumber})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium",children:"Gender"}),i.jsxs("select",{name:"gender",value:A.gender,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm",children:[i.jsx("option",{value:"",children:"Select Gender"}),i.jsx("option",{value:"Male",children:"Male"}),i.jsx("option",{value:"Female",children:"Female"}),i.jsx("option",{value:"Other",children:"Other"})]}),C.gender&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:C.gender})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium",children:"Country"}),i.jsx("input",{type:"text",name:"country",value:A.country,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm"}),C.country&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:C.country})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium",children:"KYC Level"}),i.jsxs("select",{name:"kycLevel",value:A.kycLevel,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm",children:[i.jsx("option",{value:"",children:"Select KYC Level"}),i.jsx("option",{value:"0",children:"0"}),i.jsx("option",{value:"1",children:"1"}),i.jsx("option",{value:"2",children:"2"})]}),C.kycLevel&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:C.kycLevel})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium",children:"KYC Status"}),i.jsxs("select",{name:"kycStatus",value:A.kycStatus,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm",children:[i.jsx("option",{value:"",children:"Select KYC Status"}),i.jsx("option",{value:"pending",children:"Pending"}),i.jsx("option",{value:"approved",children:"Approved"}),i.jsx("option",{value:"rejected",children:"Rejected"})]}),C.kycStatus&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:C.kycStatus})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium",children:"Has Vehicle"}),i.jsxs("select",{name:"hasVehicle",value:A.hasVehicle,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm",children:[i.jsx("option",{value:"",children:"Select Vehicle Status"}),i.jsx("option",{value:"yes",children:"Yes"}),i.jsx("option",{value:"no",children:"No"})]}),C.hasVehicle&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:C.hasVehicle})]})]})]}),i.jsxs("div",{children:[i.jsx("h3",{className:"text-base font-medium tracking-wide mb-2",children:"Vehicle Information"}),i.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium",children:"Vehicle Owner Name"}),i.jsx("input",{type:"text",name:"vehicleOwnerName",value:A.vehicleOwnerName,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm"}),C.vehicleOwnerName&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:C.vehicleOwnerName})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium",children:"Company Name"}),i.jsx("input",{type:"text",name:"companyName",value:A.companyName,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm"}),C.companyName&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:C.companyName})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium",children:"Vehicle Plate Number"}),i.jsx("input",{type:"text",name:"vehiclePlateNumber",value:A.vehiclePlateNumber,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm"}),C.vehiclePlateNumber&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:C.vehiclePlateNumber})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium",children:"Vehicle Make/Model"}),i.jsx("input",{type:"text",name:"vehicleMakeModel",value:A.vehicleMakeModel,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm"}),C.vehicleMakeModel&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:C.vehicleMakeModel})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium",children:"Chassis Number"}),i.jsx("input",{type:"text",name:"chassisNumber",value:A.chassisNumber,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm"}),C.chassisNumber&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:C.chassisNumber})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium",children:"Vehicle Color"}),i.jsx("input",{type:"text",name:"vehicleColor",value:A.vehicleColor,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm"}),C.vehicleColor&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:C.vehicleColor})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium",children:"Registration Expiry Date"}),i.jsx("input",{type:"date",name:"registrationExpiryDate",value:A.registrationExpiryDate,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm"}),C.registrationExpiryDate&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:C.registrationExpiryDate})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium",children:"Vehicle Type"}),i.jsx("input",{type:"text",name:"vehicleType",value:A.vehicleType,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm"}),C.vehicleType&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:C.vehicleType})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium",children:"Service Type"}),i.jsx("input",{type:"text",name:"serviceType",value:A.serviceType,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm"}),C.serviceType&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:C.serviceType})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium",children:"Service Category"}),i.jsx("input",{type:"text",name:"serviceCategory",value:A.serviceCategory,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm"}),C.serviceCategory&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:C.serviceCategory})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium",children:"Wheelchair Accessible"}),i.jsxs("select",{name:"wheelchair",value:A.wheelchair,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm",children:[i.jsx("option",{value:"",children:"Select Option"}),i.jsx("option",{value:"true",children:"Yes"}),i.jsx("option",{value:"false",children:"No"})]}),C.wheelchair&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:C.wheelchair})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium",children:"Packing Helper"}),i.jsxs("select",{name:"packingHelper",value:A.packingHelper,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm",children:[i.jsx("option",{value:"",children:"Select Option"}),i.jsx("option",{value:"true",children:"Yes"}),i.jsx("option",{value:"false",children:"No"})]}),C.packingHelper&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:C.packingHelper})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium",children:"Loading/Unloading Helper"}),i.jsxs("select",{name:"loadingUnloadingHelper",value:A.loadingUnloadingHelper,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm",children:[i.jsx("option",{value:"",children:"Select Option"}),i.jsx("option",{value:"true",children:"Yes"}),i.jsx("option",{value:"false",children:"No"})]}),C.loadingUnloadingHelper&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:C.loadingUnloadingHelper})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium",children:"Fixing Helper"}),i.jsxs("select",{name:"fixingHelper",value:A.fixingHelper,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm",children:[i.jsx("option",{value:"",children:"Select Option"}),i.jsx("option",{value:"true",children:"Yes"}),i.jsx("option",{value:"false",children:"No"})]}),C.fixingHelper&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:C.fixingHelper})]})]})]}),i.jsxs("div",{children:[i.jsx("h3",{className:"text-base font-medium tracking-wide mb-2",children:"Driver Settings"}),i.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium",children:"Auto Accept Enabled"}),i.jsxs("select",{name:"driverSettings.autoAccept.enabled",value:A.driverSettings.autoAccept.enabled,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm",children:[i.jsx("option",{value:"false",children:"No"}),i.jsx("option",{value:"true",children:"Yes"})]}),C.autoAcceptEnabled&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:C.autoAcceptEnabled})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium",children:"Pink Captain Mode"}),i.jsxs("select",{name:"driverSettings.ridePreferences.pinkCaptainMode",value:A.driverSettings.ridePreferences.pinkCaptainMode,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm",children:[i.jsx("option",{value:"false",children:"No"}),i.jsx("option",{value:"true",children:"Yes"})]}),C.pinkCaptainMode&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:C.pinkCaptainMode})]})]})]}),i.jsxs("div",{children:[i.jsx("h3",{className:"text-base font-medium tracking-wide mb-2",children:"Documents"}),i.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium",children:"License Image"}),i.jsx("input",{type:"file",name:"licenseImage",onChange:W,accept:"image/*",className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm"}),C.licenseImage&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:C.licenseImage})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium",children:"Vehicle Registration Card"}),i.jsx("input",{type:"file",name:"vehicleRegistrationCard",onChange:W,accept:"image/*",className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm"}),C.vehicleRegistrationCard&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:C.vehicleRegistrationCard})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium",children:"Road Authority Certificate"}),i.jsx("input",{type:"file",name:"roadAuthorityCertificate",onChange:W,accept:"image/*",className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm"}),C.roadAuthorityCertificate&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:C.roadAuthorityCertificate})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs font-medium",children:"Insurance Certificate"}),i.jsx("input",{type:"file",name:"insuranceCertificate",onChange:W,accept:"image/*",className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm"}),C.insuranceCertificate&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:C.insuranceCertificate})]}),i.jsxs("div",{className:"sm:col-span-2",children:[i.jsx("label",{className:"block text-xs font-medium",children:"Vehicle Images (up to 10)"}),i.jsx("input",{type:"file",name:"vehicleImages",onChange:W,accept:"image/*",multiple:!0,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm"}),C.vehicleImages&&i.jsx("p",{className:"text-red-500 text-xs mt-1",children:C.vehicleImages})]})]})]}),C.general&&i.jsx("div",{className:"text-red-500 text-xs mt-1",children:C.general}),i.jsxs("div",{className:"flex justify-end gap-2 mt-4",children:[i.jsx("button",{type:"button",onClick:X,className:"bg-gray-500 text-white px-3 py-1.5 rounded-full text-xs font-medium hover:bg-gray-600 transition duration-200",children:"Cancel"}),i.jsx("button",{type:"submit",className:"bg-[#DDC104] text-[#013723] px-3 py-1.5 rounded-full text-xs font-medium hover:bg-[#e8d34a] transition duration-200",disabled:n,children:n?i.jsx("div",{className:"animate-spin inline-block w-4 h-4 border-2 border-[#013723] border-t-transparent rounded-full"}):"Save"})]})]})]})})]})}),i.jsx(md,{isOpen:_,title:"Delete Driver",message:"Are you sure you want to delete this driver? This action cannot be undone.",onConfirm:F,onClose:G})]})},lre=({data:t})=>{const e={chart:{type:"area",sparkline:{enabled:!0}},stroke:{curve:"smooth"},fill:{type:"gradient",gradient:{opacityFrom:.5,opacityTo:.1}},colors:["#FFD700"],tooltip:{enabled:!1}},r=[{name:"Trend",data:t}];return i.jsx(Qr,{options:e,series:r,type:"area",height:60,width:"100%"})},cre=[{title:"Total Deposit",money:"$1000",chartData:[20,40,86,60,90]},{title:"Total Withdrawal",money:"$1000",chartData:[10,22,34,25,15]},{title:"Total Rides",money:"100+",chartData:[5,15,25,20,30]}],dre=[{heading:"KYC Document:",image1:"https://www.citizencard.com/images/sample-cards/uk-id-card-for-over-18s-2025.png",title:"Front Side",image2:"https://www.citizencard.com/images/sample-cards/uk-id-card-for-over-18s-2025.png",title2:"Back Side"},{heading:"Driving License:",image1:"driving.jpg",title:"Front Side",image2:"driving2.jpg",title2:"Back Side"},{heading:"Vehicle Registration:",image1:"vehicle.jpg",title:"Front Side",image2:"vehicle.jpg",title2:"Back Side"}],ure=()=>i.jsxs("div",{children:[i.jsx(ko,{}),i.jsxs("div",{className:"flex justify-end w-2/3 pt-8",children:[i.jsx("label",{children:"Sort By:"}),i.jsxs("select",{className:"bg-[#013220] focus:outline-none",children:[i.jsx("option",{value:"Month",children:"Month"}),i.jsx("option",{value:"year",children:"Year"})]})]}),i.jsxs("div",{className:"flex items-center justify-around w-[90%] mx-auto",children:[i.jsxs("div",{className:"grid grid-cols-3 gap-10 w-[70%]",children:[cre.map((t,e)=>i.jsxs("div",{className:"shadow-xl p-4 rounded shadow-black outline outline-black/20 bg-gradient-to-b from-[#038A59] to-[#013723] text-[#DDC104]",children:[i.jsx("p",{className:"font-semibold",children:t.title}),i.jsx("h2",{className:"text-xl font-bold",children:t.money}),i.jsx(lre,{data:t.chartData})," "]},e)),i.jsxs("div",{className:"text-sm flex flex-col gap-4 items-start ",children:[i.jsxs("p",{children:[i.jsx("span",{className:"font-bold",children:"ID:"})," 12345"]}),i.jsxs("p",{children:[i.jsx("span",{className:"font-bold",children:"Name:"})," Lorem Ipsum"]}),i.jsxs("p",{children:[i.jsx("span",{className:"font-bold",children:"Contact:"})," +1233456478"]})]})]}),i.jsx("div",{className:"w-[20%] flex justify-center bg-yellow-200 rounded p-1",children:i.jsx("img",{src:"https://randomuser.me/api/portraits/men/75.jpg",alt:"Profile",className:"w-full h-60 rounded shadow object-cover"})})]}),i.jsx("div",{className:"flex justify-center mt-6",children:i.jsx("div",{className:"border border-yellow-300 rounded-xl px-8 w-[80%]",children:dre.map((t,e)=>i.jsxs("div",{className:"mb-10",children:[i.jsx("h2",{className:"text-xl font-bold mb-4",children:t.heading}),i.jsxs("div",{className:"flex justify-center items-center",children:[i.jsxs("div",{className:"flex flex-col items-center",children:[i.jsx("img",{src:t.image1,alt:"id card",className:"w-[70%] mb-2"}),i.jsx("h2",{className:"font-bold",children:t.title})]}),i.jsxs("div",{className:"flex flex-col items-center",children:[i.jsx("img",{src:t.image2,alt:"id card",className:"w-[70%] mb-2"}),i.jsx("h2",{className:"font-bold",children:t.title2})]})]}),i.jsxs("div",{className:"flex justify-center gap-4 mt-4",children:[i.jsx("button",{className:"px-6 font-semibold py-1 text-sm rounded-full text-[#013220] bg-yellow-400",children:"Accept"}),i.jsx("button",{className:"px-6 font-semibold py-1 text-sm rounded-full text-[#013220] bg-yellow-400",children:"Reject"})]})]},e))})}),i.jsxs("div",{className:"flex justify-center gap-8 p-8",children:[i.jsx("button",{className:"rounded-full bg-yellow-400 px-4 py-1.5 font-semibold text-[#013220]",children:"Accept All"}),i.jsx("button",{className:"rounded-full bg-yellow-400 px-6 py-1.5 text-[#013220] font-semibold",children:"Reject"})]})]});function hre(t){return be({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",strokeWidth:"2",d:"M6,9 C7.65685425,9 9,7.65685425 9,6 C9,4.34314575 7.65685425,3 6,3 C4.34314575,3 3,4.34314575 3,6 C3,7.65685425 4.34314575,9 6,9 Z M6,3 L6,0 M6,12 L6,9 M0,6 L3,6 M9,6 L12,6 M2,2 L4,4 M8,8 L10,10 M10,2 L8,4 M4,8 L2,10 M18,12 C19.6568542,12 21,10.6568542 21,9 C21,7.34314575 19.6568542,6 18,6 C16.3431458,6 15,7.34314575 15,9 C15,10.6568542 16.3431458,12 18,12 Z M18,6 L18,3 M18,15 L18,12 M12,9 L15,9 M21,9 L24,9 M14,5 L16,7 M20,11 L22,13 M22,5 L20,7 M16,11 L14,13 M9,21 C10.6568542,21 12,19.6568542 12,18 C12,16.3431458 10.6568542,15 9,15 C7.34314575,15 6,16.3431458 6,18 C6,19.6568542 7.34314575,21 9,21 Z M9,15 L9,12 M9,24 L9,21 M3,18 L6,18 M12,18 L15,18 M5,14 L7,16 M11,20 L13,22 M13,14 L11,16 M7,20 L5,22"},child:[]}]})(t)}function fre(t){return be({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",strokeWidth:"2",d:"M12,22 C17.5228475,22 22,17.5228475 22,12 C22,6.4771525 17.5228475,2 12,2 C6.4771525,2 2,6.4771525 2,12 C2,17.5228475 6.4771525,22 12,22 Z M7,12 L11,15 L16,8"},child:[]}]})(t)}const pre=()=>i.jsxs("div",{className:"",children:[i.jsx("div",{children:i.jsx(ko,{})}),i.jsxs("div",{className:"w-full mt-8 relative",children:[i.jsxs("div",{className:"flex flex-col px-4 py-2 gap-4 rounded-xl z-50 top-0 right-0 bg-white absolute",children:[i.jsx("div",{className:"flex justify-center",children:i.jsx("img",{className:"rounded-full w-20 h-20 object-cover",src:"https://media.istockphoto.com/id/1682296067/photo/happy-studio-portrait-or-professional-man-real-estate-agent-or-asian-businessman-smile-for.jpg?s=612x612&w=0&k=20&c=9zbG2-9fl741fbTWw5fNgcEEe4ll-JegrGlQQ6m54rg=",alt:""})}),i.jsxs("div",{className:"pb-4 flex flex-col gap-2",children:[i.jsxs("div",{className:"flex gap-2 text-black items-center",children:[i.jsxs("div",{className:"flex items-center gap-1",children:[" ",i.jsx(M0,{size:15})," ",i.jsx("h3",{className:"font-semibold",children:"Driver:"})]}),i.jsx("p",{className:"text-xs",children:"Ethel Lanon"})]}),i.jsxs("div",{className:"flex gap-2 text-black items-center",children:[i.jsxs("div",{className:"flex items-center gap-1",children:[" ",i.jsx(fre,{size:15})," ",i.jsx("h3",{className:"font-semibold",children:"Status:"})]}),i.jsx("p",{className:"text-xs",children:"Active"})]}),i.jsxs("div",{className:"flex gap-2 text-black items-center",children:[i.jsxs("div",{className:"flex items-center gap-1",children:[" ",i.jsx(i6,{size:15})," ",i.jsx("h3",{className:"font-semibold",children:"Vehicle:"})]}),i.jsx("p",{className:"text-xs",children:"Bike"})]}),i.jsxs("div",{className:"flex gap-2 text-black items-center",children:[i.jsxs("div",{className:"flex items-center gap-1",children:[" ",i.jsx(i6,{size:15})," ",i.jsx("h3",{className:"font-semibold",children:"Location:"})]}),i.jsx("p",{className:"text-xs",children:"Christophemouts"})]})]})]}),i.jsx("iframe",{src:"https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3321.64236278531!2d73.07320327479474!3d33.64051393936022!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x11a4d1a8d62fd41%3A0x1feebab68518189!2sCodesVista!5e0!3m2!1sen!2s!4v1753349575704!5m2!1sen!2s",width:"100%",height:"500",style:{border:0},allowFullScreen:"",loading:"lazy",referrerPolicy:"no-referrer-when-downgrade",title:"CodesVista Location",className:"rounded-lg"})]})]}),mre=[{date:"21/July/2025",time:"11:00",amount:100,payment:"Bank:ABM Bank Abu dhabi"},{date:"21/July/2025",time:"11:00",amount:100,payment:"Bank:ABM Bank Abu dhabi"},{date:"21/July/2025",time:"11:00",amount:100,payment:"Bank:ABM Bank Abu dhabi"}],gre=()=>i.jsx(i.Fragment,{children:i.jsxs("div",{children:[i.jsx(ko,{}),i.jsx("div",{className:"pt-4",children:i.jsxs("table",{className:"w-full text-sm text-left table-fixed",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-yellow-200",children:[i.jsx("th",{className:"w-[20%] px-6 py-3",children:"Date"}),i.jsx("th",{className:"w-[20%] px-4 py-3",children:"Time"}),i.jsx("th",{className:"w-[20%] px-4 py-3",children:"Amount"}),i.jsx("th",{className:"w-[20%] px-4 py-3 text-center",children:"Payment Method"}),i.jsx("th",{className:"w-[20%] px-4 py-3 text-center",children:"Action"})]})}),i.jsx("tbody",{children:mre.map((t,e)=>i.jsxs("tr",{children:[i.jsx("td",{className:"w-[20%] px-6 py-3",children:t.date}),i.jsx("td",{className:"w-[20%] px-4 py-3",children:t.time}),i.jsxs("td",{className:"w-[20%] px-4 py-3",children:["$",t.amount]}),i.jsx("td",{className:"w-[20%] px-4 py-3 text-center",children:t.payment}),i.jsx("td",{className:"w-[20%] px-4 py-3",children:i.jsx("div",{className:"flex items-center gap-3 justify-center",children:i.jsx("button",{className:"bg-yellow-400 text-black px-4 py-1.5 cursor-pointer rounded-full text-xs font-medium",children:"View"})})})]},e))})]})})]})}),xre=[{image:"",title:"Renee Watson",rating:"4.5 ⭐",date:"April 12,2024",desc:"Always punctual and reliable, ensuring timely pickups and drop-offs Maintains a clean and comfortable vehicle at all times Demonstrates excellent road safety and defensive driving skills Friendly, respectful, and communicates clearly with passengers Consistently receives positive feedback from clients and dispatch teams"},{image:"",title:"Renee Watson",rating:"4.5 ⭐",date:"April 12,2024",desc:"Always punctual and reliable, ensuring timely pickups and drop-offs Maintains a clean and comfortable vehicle at all times Demonstrates excellent road safety and defensive driving skills Friendly, respectful, and communicates clearly with passengers Consistently receives positive feedback from clients and dispatch teams"}],bre=()=>i.jsxs("div",{children:[i.jsxs("div",{className:"flex text-sm font-semibold justify-end pr-4 ",children:[i.jsx("label",{htmlFor:"",children:"Sort By:"}),i.jsxs("select",{name:"",id:"",className:"bg-[#013220]",children:[i.jsx("option",{value:"high",children:"High"}),i.jsx("option",{value:"low",children:"Low"})]})]}),i.jsx(ko,{}),i.jsxs("div",{className:"px-8 py-6",children:[i.jsxs("div",{className:"",children:[i.jsx("h2",{className:"font-semibold",children:"Ratings"}),i.jsx("span",{children:"⭐⭐⭐⭐⭐"})]}),i.jsxs("div",{children:[i.jsx("h4",{className:"font-semibold",children:"Reviews"}),xre.map((t,e)=>i.jsxs("div",{className:"border border-yellow-300 rounded-lg mb-6 px-4 pb-4 pt-2 ",children:[i.jsxs("div",{className:"flex justify-between",children:[i.jsxs("div",{className:"flex gap-8 ",children:[i.jsx("div",{children:i.jsx("img",{src:"https://plus.unsplash.com/premium_photo-1689568126014-06fea9d5d341?fm=jpg&q=60&w=3000&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxzZWFyY2h8MXx8cHJvZmlsZXxlbnwwfHwwfHx8MA%3D%3D",className:"rounded-full w-10 h-10 object-cover",alt:""})}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-semibold",children:t.title}),i.jsx("span",{children:t.rating})]})]}),i.jsx("span",{children:t.date})]}),i.jsx("div",{children:t.desc})]}))]})]})]}),yre=()=>i.jsx("div",{children:i.jsx("div",{className:"py-6 flex flex-col items-center ",children:i.jsxs("form",{action:"",className:"max-w-6xl w-full mx-auto space-y-2",children:[i.jsx("textarea",{name:"",className:"bg-[#01432B] shadow-lg border-y border-black w-full px-4 placeholder-yellow-400 focus:outline-none py-4 rounded-xl ",placeholder:"Describe Reason Here....",rows:8,cols:100,id:""}),i.jsxs("div",{className:"flex relative mb-4",children:[i.jsxs("label",{htmlFor:"upload",className:"block border-y shadow-lg border-black w-full bg-[#01432B] text-yellow-400 px-4 text-sm py-4 rounded cursor-pointer",children:["Upload File or Photo",i.jsx("input",{type:"file",id:"upload",className:"hidden"})]}),i.jsx("button",{type:"submit",className:"bg-yellow-400 px-10 py-3.5 absolute rounded-tr-md rounded-br-md top-0 text-black right-0 font-semibold ",children:"Upload"})]}),i.jsx("button",{type:"submit",className:"bg-yellow-400 outline outline-yellow-500 block mx-auto px-8 text-sm font-semibold py-3 mt-4 rounded-full text-black",children:"Sending Warning"})]})})}),vre=()=>i.jsx("div",{className:"py-6 flex flex-col items-center",children:i.jsxs("form",{action:"",className:"max-w-6xl w-full mx-auto space-y-2",children:[i.jsxs("select",{className:"bg-[#01432B] shadow-lg border-y border-black w-full px-4 py-4 rounded-xl text-yellow-400 focus:outline-none",defaultValue:"",children:[i.jsx("option",{value:"",disabled:!0,children:" Duration"}),i.jsx("option",{value:"1day",children:"1 Day"}),i.jsx("option",{value:"3days",children:"3 Days"}),i.jsx("option",{value:"1week",children:"1 Week"}),i.jsx("option",{value:"1month",children:"1 Month"}),i.jsx("option",{value:"custom",children:"Custom"})]}),i.jsx("textarea",{name:"",id:"",className:"bg-[#01432B] shadow-lg border-y border-black w-full px-4 placeholder-yellow-400 focus:outline-none py-4 rounded-xl",placeholder:"Describe Reason Here....",rows:8,cols:100}),i.jsxs("div",{className:"flex relative mb-4",children:[i.jsxs("label",{htmlFor:"upload",className:"block border-y shadow-lg border-black w-full bg-[#01432B] text-yellow-400 px-4 text-sm py-4 rounded cursor-pointer",children:["Upload File or Photo",i.jsx("input",{type:"file",id:"upload",className:"hidden"})]}),i.jsx("button",{type:"submit",className:"bg-yellow-400 px-10 py-3.5 absolute rounded-tr-md rounded-br-md top-0 text-black right-0 font-semibold",children:"Upload"})]}),i.jsx("button",{type:"submit",className:"bg-yellow-400 outline outline-yellow-500 block mx-auto px-8 text-sm font-semibold py-3 mt-4 rounded-full text-black",children:"Sending Warning"})]})}),wre=()=>i.jsx("div",{className:"py-6 flex flex-col items-center ",children:i.jsxs("form",{action:"",className:"max-w-6xl w-full mx-auto space-y-4",children:[i.jsxs("div",{className:"flex justify-between",children:[i.jsx("div",{children:i.jsx("label",{htmlFor:"",children:"Are you Sure you want to Ban this Driver"})}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx("input",{type:"checkbox",className:"bg-[#01432B] accent-[#01432B] ",name:"",id:""}),i.jsx("label",{htmlFor:"",children:"Yes"}),i.jsx("input",{type:"checkbox",className:"bg-[#01432B] accent-[#01432B] ",name:"",id:""}),i.jsx("label",{htmlFor:"",children:"No"})]})]}),i.jsx("textarea",{name:"",className:"bg-[#01432B] shadow-lg border-y border-black w-full px-4 placeholder-yellow-400 focus:outline-none py-4 rounded-xl ",placeholder:"Describe Reason Here....",rows:8,cols:100,id:""}),i.jsx("button",{type:"submit",className:"bg-yellow-400 outline outline-yellow-500 block mx-auto px-8 text-sm font-semibold py-3 mt-4 rounded-full text-black",children:"Enforce Ban"})]})}),jre=[{date:"24-July-25",reason:"Warning",admin:"admin",notes:"2nd Strike",action:"Warning"},{date:"24-July-25",reason:"Mis Conduct",admin:"admin",notes:"Resolved",action:"Temp-Ban"}],Nre=()=>{const[t,e]=O.useState("issuewarn");return i.jsxs("div",{children:[i.jsxs("div",{className:"flex text-sm font-semibold justify-end pr-4 ",children:[i.jsx("label",{htmlFor:"",children:"Sort By:"}),i.jsxs("select",{name:"",id:"",className:"bg-[#013220]",children:[i.jsx("option",{value:"high",children:"High"}),i.jsx("option",{value:"low",children:"Low"})]})]}),i.jsx(ko,{}),i.jsxs("div",{className:"flex justify-center items-center gap-32 mt-8",children:[i.jsxs("div",{className:"flex flex-col gap-2 text-sm w-[25%] max-w-md",children:[i.jsxs("div",{className:"grid grid-cols-2 gap-x-0",children:[i.jsx("span",{className:"font-medium text-lg",children:"ID:"}),i.jsx("span",{className:"",children:"001"})]}),i.jsxs("div",{className:"grid grid-cols-2",children:[i.jsx("span",{className:"font-medium text-lg",children:"Name:"}),i.jsx("span",{className:"",children:"Smith Joy"})]}),i.jsxs("div",{className:"grid grid-cols-2",children:[i.jsx("span",{className:"font-medium text-lg",children:"Phone Number:"}),i.jsx("span",{className:"",children:"+97122222221"})]}),i.jsxs("div",{className:"grid grid-cols-2",children:[i.jsx("span",{className:"font-semibold text-lg ",children:"Status:"}),i.jsx("span",{className:"",children:"Active"})]}),i.jsxs("div",{className:"grid grid-cols-2",children:[i.jsx("span",{className:"font-medium text-lg",children:"Warning:"}),i.jsx("span",{className:"",children:"02"})]})]}),i.jsx("div",{className:"w-[200px] h-[240px] flex justify-center items-center bg-black rounded-lg p-1 shadow",children:i.jsx("img",{src:"https://randomuser.me/api/portraits/men/75.jpg",alt:"Profile",className:"w-full h-full rounded-lg object-cover"})})]}),i.jsx("div",{className:"border px-10 py-4 border-yellow-300 border-l-0 border-r-0",children:i.jsxs("div",{className:"flex gap-10",children:[i.jsx("button",{onClick:()=>e("issuewarn"),className:`${t=="issuewarn"?"btn-active":"btn-inactive"} `,children:"Issue Warning"}),i.jsx("button",{onClick:()=>e("tempban"),className:`${t=="tempban"?"btn-active":"btn-inactive"} `,children:"Temporary Ban"}),i.jsx("button",{onClick:()=>e("permanentban"),className:`${t=="permanentban"?"btn-active":"btn-inactive"} `,children:"Permanent Ban"})]})}),t==="issuewarn"&&i.jsx(yre,{}),t==="tempban"&&i.jsx(vre,{}),t==="permanentban"&&i.jsx(wre,{}),i.jsx("div",{className:"flex justify-center py-10",children:i.jsx("div",{className:"w-full max-w-7xl rounded-xl overflow-hidden border border-yellow-300",children:i.jsxs("table",{className:"w-full table-fixed border-collapse",children:[i.jsx("thead",{className:" text-yellow-400",children:i.jsxs("tr",{className:"text-left border-b border-yellow-300",children:[i.jsx("th",{className:"w-1/5 px-4 py-2",children:"Date"}),i.jsx("th",{className:"w-1/5 px-4 py-2",children:"Reason"}),i.jsx("th",{className:"w-1/5 px-4 py-2",children:"Admin"}),i.jsx("th",{className:"w-1/5 px-4 py-2",children:"Notes"}),i.jsx("th",{className:"w-1/5 px-4 py-2",children:"Action"})]})}),i.jsx("tbody",{children:jre.map((r,n)=>i.jsxs("tr",{children:[i.jsx("td",{className:"px-4 py-2",children:r.date}),i.jsx("td",{className:"px-4 py-2",children:r.reason}),i.jsx("td",{className:"px-4 py-2",children:r.admin}),i.jsx("td",{className:"px-4 py-2",children:r.notes}),i.jsx("td",{className:"px-4 py-2",children:r.action})]},n))})]})})})]})};function Sre(t){return be({attr:{version:"1",viewBox:"0 0 48 48",enableBackground:"new 0 0 48 48"},child:[{tag:"path",attr:{fill:"#D50000",d:"M24,6C14.1,6,6,14.1,6,24s8.1,18,18,18s18-8.1,18-18S33.9,6,24,6z M24,10c3.1,0,6,1.1,8.4,2.8L12.8,32.4 C11.1,30,10,27.1,10,24C10,16.3,16.3,10,24,10z M24,38c-3.1,0-6-1.1-8.4-2.8l19.6-19.6C36.9,18,38,20.9,38,24C38,31.7,31.7,38,24,38 z"},child:[]}]})(t)}const Are=[{date:"24-July-25",rides:"15",distance:"180KM",earning:1200,latestart:1},{date:"24-July-25",rides:"15",distance:"180KM",earning:1200,latestart:1}],Cre=()=>{const t={chart:{type:"bar",stacked:!0,toolbar:{show:!1},background:"#013220"},plotOptions:{bar:{columnWidth:"25%",borderRadius:8,borderRadiusApplication:"end",borderRadiusWhenStacked:"last",endingShape:"flat"}},grid:{show:!1},xaxis:{categories:["18/Jul/25","19/Jul/25","20/Jul/25","21/Jul/25","22/Jul/25","23/Jul/25","24/Jul/25"],labels:{style:{colors:"#FFD700",fontSize:"12px"}},axisBorder:{show:!0,color:"#FFD700"},axisTicks:{show:!0,color:"#FFD700"},title:{text:"Date",style:{color:"#FFD700",fontSize:"14px"}}},yaxis:{labels:{style:{colors:"#FFD700",fontSize:"12px"}},axisBorder:{show:!0,color:"#FFD700"},axisTicks:{show:!0,color:"#FFD700"},title:{text:"Rides",style:{color:"#FFD700",fontSize:"14px"}}},colors:["#FFD700","#15803D"],dataLabels:{enabled:!1},tooltip:{theme:"dark"},legend:{show:!1}},e=[{name:"Completed",data:[8,14,10,18,9,5,22]},{name:"Remaining",data:[10,8,15,12,16,20,5]}];return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"flex text-sm font-semibold justify-end pr-4 ",children:[i.jsx("label",{htmlFor:"",children:"Sort By:"}),i.jsxs("select",{name:"",id:"",className:"bg-[#013220]",children:[i.jsx("option",{value:"high",children:"Today"}),i.jsx("option",{value:"low",children:"Yesterday"}),i.jsx("option",{value:"low",children:"One Week"})]})]}),i.jsx(ko,{}),i.jsxs("div",{className:"text-yellow-400 px-8 py-12 min-h-screen space-y-10",children:[i.jsxs("div",{className:"border max-w-4xl mx-auto w-full border-yellow-400 rounded-xl",children:[i.jsxs("div",{className:"flex justify-between px-6 py-4 items-center mb-4 border-b border-yellow-300",children:[i.jsx("h2",{className:"text-lg font-bold text-yellow-400",children:"Ride Per Day"}),i.jsxs("div",{className:"flex items-center gap-2 text-yellow-400 text-sm",children:[i.jsx("span",{children:"Date Range :"}),i.jsx("span",{className:"border border-yellow-400 px-2 py-1 rounded",children:i.jsx("input",{type:"date",className:"bg-[#013220]"})}),i.jsx("span",{children:"To"}),i.jsx("span",{className:"border border-yellow-400 px-2 py-1 rounded",children:i.jsx("input",{type:"date",className:"bg-[#013220]"})})]})]}),i.jsx(Qr,{options:t,series:e,type:"bar",height:300})]}),i.jsx("div",{className:"flex justify-center items-center",children:i.jsxs("div",{className:"w-full max-w-4xl",children:[i.jsx("h3",{className:"font-semibold pb-2 text-lg",children:"KPT Card"}),i.jsx("div",{className:" rounded-xl border border-yellow-300 px-12 py-4",children:i.jsxs("div",{className:"flex flex-col gap-4",children:[i.jsxs("div",{className:"flex justify-between ",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(tq,{}),i.jsx("p",{children:"Total Distance Coverd:"})]}),i.jsx("span",{children:"1,240km"})]}),i.jsxs("div",{className:"flex justify-between",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(x_,{}),i.jsx("p",{children:"Total Rides Completed:"})]}),i.jsx("span",{children:"512"})]}),i.jsxs("div",{className:"flex justify-between text-red-600",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Sre,{}),i.jsx("p",{children:"Rides Cancelled:"})]}),i.jsx("span",{children:"15"})]}),i.jsxs("div",{className:"flex justify-between",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Pq,{}),i.jsx("p",{children:"Late Starts:"})]}),i.jsx("span",{children:"6"})]}),i.jsxs("div",{className:"flex justify-between",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(N_,{}),i.jsx("p",{children:"Total Earnings:"})]}),i.jsx("span",{children:"425,000"})]})]})})]})}),i.jsx("div",{className:"flex justify-center py-6",children:i.jsxs("div",{className:" w-full max-w-6xl",children:[i.jsx("h3",{className:"font-semibold pb-2 text-lg",children:"Summay"}),i.jsx("div",{className:" rounded-xl overflow-hidden border border-yellow-300",children:i.jsxs("table",{className:"w-full table-fixed border-collapse",children:[i.jsx("thead",{className:" text-yellow-400",children:i.jsxs("tr",{className:"text-left border-b border-yellow-300",children:[i.jsx("th",{className:"w-1/5 px-4 py-2",children:"Date"}),i.jsx("th",{className:"w-1/5 px-4 py-2",children:"Rides"}),i.jsx("th",{className:"w-1/5 px-4 py-2",children:"Distance"}),i.jsx("th",{className:"w-1/5 px-4 py-2",children:"Earning"}),i.jsx("th",{className:"w-1/5 px-4 py-2",children:"Late Start"})]})}),i.jsx("tbody",{children:Are.map((r,n)=>i.jsxs("tr",{children:[i.jsx("td",{className:"px-4 py-2",children:r.date}),i.jsx("td",{className:"px-4 py-2",children:r.rides}),i.jsx("td",{className:"px-4 py-2",children:r.distance}),i.jsx("td",{className:"px-4 py-2",children:r.earning}),i.jsx("td",{className:"px-4 py-2",children:r.latestart})]},n))})]})})]})})]})]})},kre=()=>{const[t,e]=O.useState("Dubai"),r={chart:{type:"pie",toolbar:{show:!1}},labels:["Safe","Medium risk","High fraud"],colors:["#D9D9D9","#FFD700","#FF0000"],legend:{show:!1},dataLabels:{enabled:!0,style:{fontSize:"14px",fontWeight:"bold",colors:["#000000"]}}},n=[60,20,20];return i.jsxs("div",{className:"min-h-screen bg-[#013220] text-yellow-300 font-sans p-8",children:[i.jsxs("div",{className:"flex justify-between items-center flex-wrap mb-6",children:[i.jsx("h2",{className:"text-xl font-bold",children:"Pie Chart :"}),i.jsxs("div",{className:"flex items-center gap-2 text-sm mt-2 md:mt-0",children:[i.jsx("span",{children:"Date Range:"}),i.jsx("input",{type:"date",className:"bg-transparent border border-yellow-400 text-yellow-300 px-2 py-1 rounded",defaultValue:"2025-07-18"}),i.jsx("span",{children:"to"}),i.jsx("input",{type:"date",className:"bg-transparent border border-yellow-400 text-yellow-300 px-2 py-1 rounded",defaultValue:"2025-07-21"})]})]}),i.jsxs("div",{className:"flex mt-12 items-start gap-8",children:[i.jsx("div",{className:"w-full md:w-1/2 flex justify-center",children:i.jsx(Qr,{options:r,series:n,type:"pie",width:"320"})}),i.jsxs("div",{className:"border border-yellow-300 rounded-xl p-4 w-full md:w-[200px] text-sm",children:[i.jsxs("div",{className:"mb-6",children:[i.jsx("label",{className:"block mb-4",children:"Select Region"}),i.jsxs("select",{value:t,onChange:a=>e(a.target.value),className:"w-full bg-[#013220] text-yellow-300 rounded-full border border-yellow-300 px-2 py-1 focus:outline-none",children:[i.jsx("option",{value:"Dubai",children:"Dubai"}),i.jsx("option",{value:"Karachi",children:"Karachi"}),i.jsx("option",{value:"Lahore",children:"Lahore"}),i.jsx("option",{value:"Riyadh",children:"Riyadh"})]})]}),i.jsxs("div",{className:"space-y-8",children:[i.jsx("div",{children:"12 GPS Spoofs"}),i.jsx("div",{children:"4 Referral Flags"}),i.jsx("div",{children:"Last Trigger: 2 hours ago"})]})]})]})]})},Dre=({data:t})=>{const e={chart:{type:"area",sparkline:{enabled:!0}},stroke:{curve:"smooth"},fill:{type:"gradient",gradient:{opacityFrom:.5,opacityTo:.1}},colors:["#FFD700"],tooltip:{enabled:!1}},r=[{name:"Trend",data:t}];return i.jsx(Qr,{options:e,series:r,type:"area",height:60,width:"100%"})},Tre=[{rank:1,fullname:"Smith Joy",userid:"US-001",fraudScore:94,lastAction:"Wallet Frozen"}],Mre=[{title:"Total Flags",value:"100+",chartData:[20,40,86,60,90]},{title:"Suspensions",value:"200+",chartData:[20,40,86,60,90]},{title:"Financial Abuse Cases",value:"50+",chartData:[20,40,86,60,90]}],Ere=()=>i.jsxs("div",{className:"flex min-h-screen",children:[i.jsx(Ue,{}),i.jsxs("div",{className:" flex-1",children:[i.jsx(Gf,{}),i.jsxs("div",{className:" bg-[#013220] text-yellow-300 p-8 font-sans",children:[i.jsxs("div",{className:"flex justify-center text-sm text-yellow-300 mb-2",children:["Sort By:",i.jsxs("select",{name:"",id:"",className:"bg-[#013220]",children:[i.jsx("option",{value:"today",children:"Today"}),i.jsx("option",{value:"weekly",children:"Weekly"}),i.jsx("option",{value:"monthly",children:"Monthly"})]})]}),i.jsx("div",{className:"flex justify-around mb-10",children:Mre.map((t,e)=>i.jsxs("div",{className:" shadow-md w-1/4 p-4 shadow-black/70 rounded-xl",children:[i.jsx("div",{className:"text-xl font-bold",children:t.title}),i.jsx("div",{className:"text-3xl font-bold text-yellow-400 my-2",children:t.value}),i.jsx("div",{}),i.jsx(Dre,{data:t.chartData})]},e))}),i.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Top 5 Flagged Users (by Score)"}),i.jsx("div",{className:"border border-yellow-400 rounded-xl p-4",children:i.jsxs("table",{className:"w-full text-left table-auto border-separate border-spacing-y-2",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-yellow-300",children:[i.jsx("th",{children:"Rank"}),i.jsx("th",{children:"Full Name"}),i.jsx("th",{children:"User ID"}),i.jsx("th",{children:"Fraud Score"}),i.jsx("th",{className:"text-center",children:"Last Action"})]})}),i.jsx("tbody",{children:Tre.map((t,e)=>i.jsxs("tr",{className:"rounded",children:[i.jsx("td",{className:"py-2 px-3",children:t.rank}),i.jsx("td",{className:"py-2 px-3",children:t.fullname}),i.jsx("td",{className:"py-2 px-3",children:t.userid}),i.jsx("td",{className:"py-2 px-3",children:t.fraudScore}),i.jsx("td",{className:"text-center py-2 px-3 text-yellow-400 font-medium",children:t.lastAction})]},e))})]})}),i.jsx("div",{children:i.jsx(kre,{})})]})]})]}),Ore={image:"/images/top-user.jpg",children:[{name:"User A",image:"https://images.unsplash.com/photo-1494790108377-be9c29b29330?fm=jpg&q=60&w=3000&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxzZWFyY2h8Mnx8cHJvZmlsZXxlbnwwfHwwfHx8MA%3D%3D",children:[{name:"User A1",image:"https://www.perfocal.com/blog/content/images/size/w960/2021/01/Perfocal_17-11-2019_TYWFAQ_100_standard-3.jpg"},{name:"User A2",image:"https://www.perfocal.com/blog/content/images/size/w960/2021/01/Perfocal_17-11-2019_TYWFAQ_100_standard-3.jpg"},{name:"User A2",image:"https://www.perfocal.com/blog/content/images/size/w960/2021/01/Perfocal_17-11-2019_TYWFAQ_100_standard-3.jpg"}]},{name:"User B",image:"/images/user-b.jpg",children:[{name:"User B1",image:"/images/user-b1.jpg"},{name:"User B2",image:"/images/user-b2.jpg",children:[{name:"User B3a",image:"https://www.perfocal.com/blog/content/images/size/w960/2021/01/Perfocal_17-11-2019_TYWFAQ_100_standard-3.jpg"},{name:"User B3b",image:"https://www.perfocal.com/blog/content/images/size/w960/2021/01/Perfocal_17-11-2019_TYWFAQ_100_standard-3.jpg",children:[{name:"User B3a",image:"/images/user-b3a.jpg"},{name:"User B3b",image:"/images/user-b3b.jpg"},{name:"User B3b",image:"/images/user-b3b.jpg"}]},{name:"User B3b",image:"/images/user-b3b.jpg"}]},{name:"User B3",image:"/images/user-b3.jpg"}]},{name:"User C",image:"/images/user-c.jpg",children:[{name:"User C1",image:"/images/user-c1.jpg"},{name:"User C2",image:"/images/user-c2.jpg"},{name:"User C2",image:"/images/user-c2.jpg"}]}]},Pre=({image:t})=>i.jsx("div",{className:"flex flex-col items-center relative z-10",children:i.jsx("img",{src:t,alt:"",className:"w-16 h-16 rounded-full border-4 border-yellow-400 shadow-lg bg-white"})}),gL=t=>i.jsxs("div",{className:"flex flex-col items-center relative ",children:[i.jsx(Pre,{image:t.image}),t.children&&i.jsxs("div",{className:"relative flex flex-col items-center mt-",children:[i.jsx("div",{className:"h-8 w-0.5 bg-yellow-400"}),i.jsxs("div",{className:"flex justify-center items-start relative mt-0",children:[i.jsx("div",{className:"absolute top-0 left-0 right-0 h-0.5 bg-yellow-400 z-0"}),t.children.map((e,r)=>i.jsxs("div",{className:"flex flex-col items-center mx-4 relative",children:[i.jsx("div",{className:"h-6 w-0.5 bg-yellow-400 z-0"}),i.jsx("div",{className:"mt-",children:gL(e)})]},r))]})]})]}),_re=()=>i.jsxs(i.Fragment,{children:[i.jsx(ko,{}),i.jsx("div",{className:"min-h-screen bg-[#013220] py-10 px-4 overflow-x-auto",children:i.jsx("div",{className:"flex justify-center",children:gL(Ore)})})]});Ps.register(Do,tc,ec,Qf);const Rre=()=>{const t={labels:["CRR","Ambassador","Platinum",""],datasets:[{data:[20,40,15,60],backgroundColor:["#FFD700","#00FF00","#FF0000","#174332"],borderWidth:0,borderColor:["rgba(255, 215, 0, 1)","rgba(255, 215, 0, 1)","rgba(255, 215, 0, 1)"],hoverOffset:10}]},e={responsive:!0,plugins:{legend:{display:!1},tooltip:{enabled:!0},datalabels:{color:"#000",font:{size:10,weight:"bold"},formatter:(r,n)=>n.chart.data.labels[n.dataIndex]}},layout:{padding:20}};return i.jsx("div",{style:{padding:"20px",borderRadius:"10px",display:"flex",justifyContent:"center"},children:i.jsx("div",{style:{width:"300px"},children:i.jsx(Zf,{data:t,options:e})})})},rc=()=>{const t=Cr(),e=O.useRef(null),r=s=>`menu-tab ${t.pathname===s?"active":""}`,n=()=>{e.current.scrollBy({left:-150,behavior:"smooth"})},a=()=>{e.current.scrollBy({left:150,behavior:"smooth"})};return i.jsxs("div",{className:"relative border-b border-yellow-400 px-6 py-2",children:[i.jsx("button",{onClick:n,className:"absolute left-0 top-1/2 -translate-y-1/2 z-10 px-1",children:i.jsx(F4,{size:20})}),i.jsxs("div",{ref:e,className:"mx-6 flex gap-x-4 overflow-x-auto whitespace-nowrap scrollbar-hide",children:[i.jsx(Pe,{to:"/paymentoverview",className:r("/paymentoverview"),children:"Overview"}),i.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),i.jsx(Pe,{to:"/walletadjustment",className:r("/walletadjustment"),children:"Wallet Adjustment"}),i.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),i.jsx(Pe,{to:"/transactions",className:r("/transactions"),children:"Withdrawal Management"}),i.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),i.jsx(Pe,{to:"/walletfreezingrules",className:r("/walletfreezingrules"),children:"Wallet Freezing Rules"}),i.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),i.jsx(Pe,{to:"/transactionlog",className:r("/transactionlog"),children:"Transaction Logs"}),i.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),i.jsx(Pe,{to:"/alertnotification",className:r("/alertnotification"),children:"Alert & Smart Notification"}),i.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),i.jsx(Pe,{to:"/unachievedpool",className:r("/unachievedpool"),children:"Unachieved Pool Management"})]}),i.jsx("button",{onClick:a,className:"absolute right-0 top-1/2 -translate-y-1/2 z-10 px-1",children:i.jsx($4,{size:20})})]})},Lre=({data:t})=>{const e={chart:{type:"area",sparkline:{enabled:!0}},stroke:{curve:"smooth",width:2},colors:["#FACC15"],fill:{type:"gradient",gradient:{shadeIntensity:1,opacityFrom:.4,opacityTo:.05,stops:[0,90,100],colorStops:[{offset:0,color:"#FACC15",opacity:.4},{offset:100,color:"#FACC15",opacity:.05}]}},markers:{size:0},tooltip:{enabled:!1}},r=[{name:"Trend",data:t||[10,20,15,25,20,30]}];return i.jsx("div",{className:"w-full",children:i.jsx(Qr,{options:e,series:r,type:"area",height:40})})},zre=[{total:"Total Wallets",percent:"1,250",chartData:[12,18,15,22,28,35]},{total:"Total Balance",percent:"AED 1,650,000",chartData:[150,200,170,300,280,320]},{total:"Pending Withdrawals",percent:"AED 82,500",chartData:[20,25,18,30,26,40]},{total:"Frozen Wallets",percent:"27 Accounts",chartData:[5,10,8,14,12,15]}],Ire=()=>i.jsxs("div",{className:"flex min-h-screen",children:[i.jsx(Ue,{}),i.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[i.jsx(rc,{}),i.jsxs("div",{className:"text-[#DDC104] p-6 overflow-y-auto",children:[i.jsxs("div",{className:"flex justify-end pb-4",children:[i.jsx("label",{className:"text-sm text-[#DDC104] mr-2",children:"Sort By:"}),i.jsxs("select",{className:"bg-transparent text-[#DDC104] text-sm focus:outline-none",children:[i.jsx("option",{value:"monthly",className:"bg-yellow-400 text-black",children:"Monthly"}),i.jsx("option",{value:"weekly",className:"bg-yellow-400 text-black",children:"Weekly"}),i.jsx("option",{value:"yearly",className:"bg-yellow-400 text-black",children:"Yearly"})]})]}),i.jsx("div",{className:"w-full max-w-2xl mx-auto grid grid-cols-1 sm:grid-cols-2 gap-6",children:zre.map((t,e)=>i.jsxs("div",{className:"flex flex-col gap-4 shadow-lg rounded-lg outline outline-black/20 px-5 py-5 bg-gradient-to-b from-[#038A59] to-[#013723] shadow-black/80",children:[i.jsx("div",{className:"flex flex-col w-full",children:i.jsx("p",{className:"text-lg font-semibold tracking-wide mt-2",children:t.total})}),i.jsx("h2",{className:"text-3xl font-bold",children:t.percent}),i.jsx(Lre,{data:t.chartData})]},e))}),i.jsxs("div",{className:"mt-8 flex justify-center items-center",children:[i.jsx(Rre,{}),i.jsxs("div",{className:"py-4 border border-yellow-300 rounded-xl ",children:[i.jsx("div",{className:"border-b border-yellow-300",children:i.jsx("h3",{className:"text-center px-4",children:"CRR"})}),i.jsxs("div",{className:"flex flex-col gap-6 px-6 py-4",children:[i.jsxs("div",{className:"flex justify-between gap-4",children:[i.jsx("p",{children:"Amount:"}),i.jsx("span",{children:"AED 45,000"})]}),i.jsxs("div",{className:"flex gap-8",children:[i.jsx("p",{children:"%age:"}),i.jsx("span",{children:"12%"})]})]})]})]})]})]})]}),nT=[{date:"24-Jul-25",userName:"Asad Raza",type:"Bonus",amount:"+500",reason:"July contest winner",admin:"Admin A"},{date:"24-Jul-25",userName:"Asad Raza",type:"Bonus",amount:"+500",reason:"July contest winner",admin:"Admin A"},{date:"24-Jul-25",userName:"Asad Raza",type:"Bonus",amount:"+500",reason:"July contest winner",admin:"Admin A"},{date:"24-Jul-25",userName:"Asad Raza",type:"Bonus",amount:"+500",reason:"July contest winner",admin:"Admin A"},{date:"24-Jul-25",userName:"Asad Raza",type:"Bonus",amount:"+500",reason:"July contest winner",admin:"Admin A"},{date:"24-Jul-25",userName:"Asad Raza",type:"Bonus",amount:"+500",reason:"July contest winner",admin:"Admin A"},{date:"24-Jul-25",userName:"Asad Raza",type:"Bonus",amount:"+500",reason:"July contest winner",admin:"Admin A"},{date:"24-Jul-25",userName:"Asad Raza",type:"Bonus",amount:"+500",reason:"July contest winner",admin:"Admin A"},{date:"24-Jul-25",userName:"Asad Raza",type:"Bonus",amount:"+500",reason:"July contest winner",admin:"Admin A"},{date:"24-Jul-25",userName:"Asad Raza",type:"Bonus",amount:"+500",reason:"July contest winner",admin:"Admin A"},{date:"24-Jul-25",userName:"Asad Raza",type:"Bonus",amount:"+500",reason:"July contest winner",admin:"Admin A"},{date:"24-Jul-25",userName:"Asad Raza",type:"Bonus",amount:"+500",reason:"July contest winner",admin:"Admin A"},{date:"24-Jul-25",userName:"Asad Raza",type:"Bonus",amount:"+500",reason:"July contest winner",admin:"Admin A"},{date:"24-Jul-25",userName:"Asad Raza",type:"Bonus",amount:"+500",reason:"July contest winner",admin:"Admin A"}],Bre=()=>{const[t,e]=O.useState(1),r=8,n=Math.ceil(nT.length/r),a=nT.slice((t-1)*r,t*r);return i.jsx("div",{className:"min-h-screen px-8 py-10 text-yellow-300 font-sans",children:i.jsxs("div",{className:"max-w-5xl mx-auto space-y-6",children:[i.jsxs("div",{className:"flex items-center border border-yellow-400 rounded-full px-4 py-2",children:[i.jsxs("select",{className:"bg-transparent w-full focus:outline-none bg-[#013220]",children:[i.jsx("option",{children:"Select User/Driver"}),i.jsx("option",{children:"User"}),i.jsx("option",{children:"Driver"})]}),i.jsx(Wq,{className:"text-yellow-300"})]}),i.jsx("div",{className:"text-center",children:i.jsx("button",{className:"bg-yellow-400 text-black px-6 py-2 rounded-full font-semibold",children:"Apply Adjustment"})}),i.jsxs("div",{className:"overflow-x-auto",children:[i.jsx("p",{className:"mb-2 font-semibold",children:"Paginated Table View:"}),i.jsxs("table",{className:"min-w-full text-left border border-yellow-400",children:[i.jsx("thead",{className:" text-yellow-300",children:i.jsxs("tr",{children:[i.jsx("th",{className:"py-2 px-4 border-b border-yellow-400",children:"Date"}),i.jsx("th",{className:"py-2 px-4 border-b border-yellow-400",children:"User Name"}),i.jsx("th",{className:"py-2 px-4 border-b border-yellow-400",children:"Type"}),i.jsx("th",{className:"py-2 px-4 border-b border-yellow-400",children:"Amount"}),i.jsx("th",{className:"py-2 px-4 border-b border-yellow-400",children:"Reason"}),i.jsx("th",{className:"py-2 px-4 border-b border-yellow-400",children:"Admin"})]})}),i.jsx("tbody",{children:a.map((s,o)=>i.jsxs("tr",{className:"",children:[i.jsx("td",{className:"py-2 px-4 border-b border-yellow-400",children:s.date}),i.jsx("td",{className:"py-2 px-4 border-b border-yellow-400",children:s.userName}),i.jsx("td",{className:"py-2 px-4 border-b border-yellow-400",children:s.type}),i.jsx("td",{className:"py-2 px-4 border-b border-yellow-400",children:s.amount}),i.jsx("td",{className:"py-2 px-4 border-b border-yellow-400",children:s.reason}),i.jsx("td",{className:"py-2 px-4 border-b border-yellow-400",children:s.admin})]},o))})]})]}),i.jsxs("div",{className:"flex justify-center items-center mt-4 gap-2 text-yellow-300",children:[i.jsx("button",{onClick:()=>e(s=>Math.max(s-1,1)),className:"hover:underline disabled:opacity-50",disabled:t===1,children:"Previous"}),Array.from({length:n}).map((s,o)=>i.jsx("button",{onClick:()=>e(o+1),className:`w-8 h-8 rounded-full border border-yellow-400 text-center text-sm font-semibold ${t===o+1?"bg-yellow-400 text-black":""}`,children:o+1},o)),i.jsx("button",{onClick:()=>e(s=>Math.min(s+1,n)),className:"hover:underline disabled:opacity-50",disabled:t===n,children:"Next"})]})]})})},Fre=()=>i.jsxs("div",{className:"flex min-h-screen",children:[i.jsx(Ue,{}),i.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[i.jsx(rc,{}),i.jsx("div",{className:"flex-1 overflow-y-auto text-yellow-400 px-8 py-6 space-y-6",children:i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[i.jsxs("div",{className:"col-span-2 flex items-center gap-4",children:[i.jsx("input",{type:"text",placeholder:"Amount Input",className:"flex-1 rounded-full placeholder:text-yellow-300 border border-yellow-400 bg-transparent px-4 py-2 focus:outline-none"}),i.jsx(Yq,{size:32,className:"text-yellow-400 cursor-pointer"}),i.jsx(Uq,{size:32,className:"text-yellow-400 cursor-pointer"})]}),i.jsx("div",{className:"w-full border border-yellow-400 rounded-full overflow-hidden",children:i.jsxs("select",{className:"w-full block bg-transparent px-4 py-2 focus:outline-none appearance-none text-yellow-300",children:[i.jsx("option",{className:"bg-yellow-400 text-black",children:"Bonus"}),i.jsx("option",{className:"bg-yellow-400 text-black",children:"Penalty"}),i.jsx("option",{className:"bg-yellow-400 text-black",children:"Refund"})]})}),i.jsx("textarea",{placeholder:"Type Reason Here....",className:"w-full h-32 rounded-lg placeholder:text-yellow-300 border border-yellow-400 bg-transparent px-4 py-2 focus:outline-none col-span-2"})]})}),i.jsx(Bre,{})]})]});function Hre(t){return be({attr:{viewBox:"0 0 15 15",fill:"none"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor"},child:[]}]})(t)}const $re=()=>i.jsxs("div",{className:" text-yellow-400 p-6 rounded-md w-full max-w-5xl mx-auto border border-yellow-500 mt-10",children:[i.jsx("h2",{className:"text-xl font-bold mb-4",children:"Withdrawal Settings :"}),i.jsxs("div",{className:"mb-4",children:[i.jsx("label",{className:"block mb-1 font-medium",htmlFor:"withdrawal-frequency",children:"Withdrawal Frequency:"}),i.jsxs("select",{id:"withdrawal-frequency",name:"withdrawalFrequency",className:"w-full p-2 rounded-full text-yellow-300 border border-yellow-400 focus:outline-none bg-[#013220]",children:[i.jsx("option",{value:"",children:"Select Frequency"}),i.jsx("option",{value:"daily",children:"Daily"}),i.jsx("option",{value:"weekly",children:"Weekly"}),i.jsx("option",{value:"monthly",children:"Monthly"})]})]}),i.jsxs("div",{className:"mb-4",children:[i.jsx("label",{className:"block mb-1 font-medium",htmlFor:"daily-limit",children:"Daily Limit Per User"}),i.jsx("input",{type:"number",id:"daily-limit",name:"dailyLimit",className:"w-full p-2 placeholder:text-yellow-400 bg-[#013220] focus:outline-none rounded-full text-yellow-300 border border-yellow-400",placeholder:"Enter amount"})]}),i.jsxs("div",{className:"mb-6",children:[i.jsx("label",{className:"block mb-1 font-medium",htmlFor:"weekly-limit",children:"Weekly Limit"}),i.jsx("input",{type:"number",id:"weekly-limit",name:"weeklyLimit",className:"w-full p-2 rounded-full bg-[#013220] focus:outline-none placeholder:text-yellow-400 border border-yellow-400",placeholder:"Enter amount"})]}),i.jsxs("div",{className:"mb-6",children:[i.jsx("h3",{className:"font-bold mb-4",children:"Freeze Rules:"}),i.jsxs("label",{className:"flex items-center mb-4",children:[i.jsx("input",{type:"checkbox",name:"blockIfFlagged",className:"mr-2 accent-yellow-400",defaultChecked:!0}),"Block if user flagged"]}),i.jsxs("label",{className:"flex items-center mb-4",children:[i.jsx("input",{type:"checkbox",name:"blockIfKYCIncomplete",className:"mr-2 accent-yellow-400",defaultChecked:!0}),"Block if KYC incomplete"]}),i.jsxs("label",{className:"flex items-center",children:[i.jsx("input",{type:"checkbox",name:"blockIfShared",className:"mr-2 accent-yellow-400",defaultChecked:!0}),"Block if same account used by 2+ users"]})]}),i.jsx("button",{type:"submit",className:"bg-yellow-400 text-black font-bold px-6 py-2 rounded-full block mx-auto hover:bg-yellow-300",children:"Apply Adjustment"})]}),Yre=()=>{const t=[{userName:"Asad Raza",amount:"+500",date:"24-Jul-25",accountType:"Bank Transfer"},{userName:"Asad Raza",amount:"+500",date:"24-Jul-25",accountType:"Bank Transfer"}];return i.jsxs("div",{className:"flex min-h-screen",children:[i.jsx(Ue,{}),i.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[i.jsx(rc,{}),i.jsxs("div",{className:"w-[95%] mx-auto py-12 ",children:[i.jsx("h2",{className:"py-4",children:"Paginated Table View"}),i.jsx("div",{className:"w-full max-w-7xl border border-yellow-400 rounded-xl overflow-hidden",children:i.jsxs("table",{className:"w-full max-w-5xl text-sm text-yellow-300",children:[i.jsx("thead",{className:"border-b border-yellow-400",children:i.jsxs("tr",{children:[i.jsx("th",{className:"text-left px-4 py-3",children:"Date"}),i.jsx("th",{className:"text-left px-4 py-3",children:"User Name"}),i.jsx("th",{className:"text-left px-4 py-3",children:"KYC"}),i.jsx("th",{className:"text-left px-4 py-3",children:"Amount"}),i.jsx("th",{className:"text-left px-4 py-3",children:"Date"}),i.jsx("th",{className:"text-left px-4 py-3",children:"Account Type"}),i.jsx("th",{className:"text-center px-4 py-3",children:"Action"})]})}),i.jsx("tbody",{className:"bg-transparent",children:t.map((e,r)=>i.jsxs("tr",{className:" ",children:[i.jsx("td",{className:"px-4 py-3",children:e.date}),i.jsx("td",{className:"px-4 py-3",children:e.userName}),i.jsx("td",{className:"px-4 py-3",children:i.jsx(p6,{size:25})}),i.jsx("td",{className:"px-4 py-3",children:e.amount}),i.jsx("td",{className:"px-4 py-3",children:e.date}),i.jsx("td",{className:"px-4 py-3",children:e.accountType}),i.jsx("td",{className:"px-4 py-3",children:i.jsxs("div",{className:"flex gap-2 justify-center",children:[i.jsx("div",{className:"rounded-full p-1 border border-yellow-300",children:i.jsx(p6,{size:20})}),i.jsx("div",{className:"rounded-full p-1 border border-yellow-300",children:i.jsx(Hre,{size:20})}),i.jsx("div",{className:" rounded-full p-1 border border-yellow-300",children:i.jsx(xq,{size:20})})]})})]}))})]})}),i.jsx($re,{})]})]})]})};function Wl(t,...e){const r=new URL(`https://mui.com/production-error/?code=${t}`);return e.forEach(n=>r.searchParams.append("args[]",n)),`Minified MUI error #${t}; visit ${r} for the full message.`}const Ure="$$material";function Dx(){return Dx=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Dx.apply(null,arguments)}function Wre(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function Xre(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var Vre=function(){function t(r){var n=this;this._insertTag=function(a){var s;n.tags.length===0?n.insertionPoint?s=n.insertionPoint.nextSibling:n.prepend?s=n.container.firstChild:s=n.before:s=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(a,s),n.tags.push(a)},this.isSpeedy=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(n){n.forEach(this._insertTag)},e.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(Xre(this));var a=this.tags[this.tags.length-1];if(this.isSpeedy){var s=Wre(a);try{s.insertRule(n,s.cssRules.length)}catch{}}else a.appendChild(document.createTextNode(n));this.ctr++},e.flush=function(){this.tags.forEach(function(n){var a;return(a=n.parentNode)==null?void 0:a.removeChild(n)}),this.tags=[],this.ctr=0},t}(),an="-ms-",Tx="-moz-",ft="-webkit-",xL="comm",SN="rule",AN="decl",qre="@import",bL="@keyframes",Gre="@layer",Kre=Math.abs,L0=String.fromCharCode,Zre=Object.assign;function Qre(t,e){return Xr(t,0)^45?(((e<<2^Xr(t,0))<<2^Xr(t,1))<<2^Xr(t,2))<<2^Xr(t,3):0}function yL(t){return t.trim()}function Jre(t,e){return(t=e.exec(t))?t[0]:t}function pt(t,e,r){return t.replace(e,r)}function Aj(t,e){return t.indexOf(e)}function Xr(t,e){return t.charCodeAt(e)|0}function gf(t,e,r){return t.slice(e,r)}function js(t){return t.length}function CN(t){return t.length}function ig(t,e){return e.push(t),t}function ene(t,e){return t.map(e).join("")}var z0=1,yd=1,vL=0,Bn=0,pr=0,Yd="";function I0(t,e,r,n,a,s,o){return{value:t,root:e,parent:r,type:n,props:a,children:s,line:z0,column:yd,length:o,return:""}}function uh(t,e){return Zre(I0("",null,null,"",null,null,0),t,{length:-t.length},e)}function tne(){return pr}function rne(){return pr=Bn>0?Xr(Yd,--Bn):0,yd--,pr===10&&(yd=1,z0--),pr}function sa(){return pr=Bn<vL?Xr(Yd,Bn++):0,yd++,pr===10&&(yd=1,z0++),pr}function ks(){return Xr(Yd,Bn)}function Wg(){return Bn}function Jf(t,e){return gf(Yd,t,e)}function xf(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function wL(t){return z0=yd=1,vL=js(Yd=t),Bn=0,[]}function jL(t){return Yd="",t}function Xg(t){return yL(Jf(Bn-1,Cj(t===91?t+2:t===40?t+1:t)))}function nne(t){for(;(pr=ks())&&pr<33;)sa();return xf(t)>2||xf(pr)>3?"":" "}function ane(t,e){for(;--e&&sa()&&!(pr<48||pr>102||pr>57&&pr<65||pr>70&&pr<97););return Jf(t,Wg()+(e<6&&ks()==32&&sa()==32))}function Cj(t){for(;sa();)switch(pr){case t:return Bn;case 34:case 39:t!==34&&t!==39&&Cj(pr);break;case 40:t===41&&Cj(t);break;case 92:sa();break}return Bn}function sne(t,e){for(;sa()&&t+pr!==57;)if(t+pr===84&&ks()===47)break;return"/*"+Jf(e,Bn-1)+"*"+L0(t===47?t:sa())}function ine(t){for(;!xf(ks());)sa();return Jf(t,Bn)}function one(t){return jL(Vg("",null,null,null,[""],t=wL(t),0,[0],t))}function Vg(t,e,r,n,a,s,o,l,c){for(var u=0,h=0,p=o,m=0,x=0,y=0,b=1,w=1,N=1,A=0,S="",C=a,k=s,T=n,E=S;w;)switch(y=A,A=sa()){case 40:if(y!=108&&Xr(E,p-1)==58){Aj(E+=pt(Xg(A),"&","&\f"),"&\f")!=-1&&(N=-1);break}case 34:case 39:case 91:E+=Xg(A);break;case 9:case 10:case 13:case 32:E+=nne(y);break;case 92:E+=ane(Wg()-1,7);continue;case 47:switch(ks()){case 42:case 47:ig(lne(sne(sa(),Wg()),e,r),c);break;default:E+="/"}break;case 123*b:l[u++]=js(E)*N;case 125*b:case 59:case 0:switch(A){case 0:case 125:w=0;case 59+h:N==-1&&(E=pt(E,/\f/g,"")),x>0&&js(E)-p&&ig(x>32?sT(E+";",n,r,p-1):sT(pt(E," ","")+";",n,r,p-2),c);break;case 59:E+=";";default:if(ig(T=aT(E,e,r,u,h,a,l,S,C=[],k=[],p),s),A===123)if(h===0)Vg(E,e,T,T,C,s,p,l,k);else switch(m===99&&Xr(E,3)===110?100:m){case 100:case 108:case 109:case 115:Vg(t,T,T,n&&ig(aT(t,T,T,0,0,a,l,S,a,C=[],p),k),a,k,p,l,n?C:k);break;default:Vg(E,T,T,T,[""],k,0,l,k)}}u=h=x=0,b=N=1,S=E="",p=o;break;case 58:p=1+js(E),x=y;default:if(b<1){if(A==123)--b;else if(A==125&&b++==0&&rne()==125)continue}switch(E+=L0(A),A*b){case 38:N=h>0?1:(E+="\f",-1);break;case 44:l[u++]=(js(E)-1)*N,N=1;break;case 64:ks()===45&&(E+=Xg(sa())),m=ks(),h=p=js(S=E+=ine(Wg())),A++;break;case 45:y===45&&js(E)==2&&(b=0)}}return s}function aT(t,e,r,n,a,s,o,l,c,u,h){for(var p=a-1,m=a===0?s:[""],x=CN(m),y=0,b=0,w=0;y<n;++y)for(var N=0,A=gf(t,p+1,p=Kre(b=o[y])),S=t;N<x;++N)(S=yL(b>0?m[N]+" "+A:pt(A,/&\f/g,m[N])))&&(c[w++]=S);return I0(t,e,r,a===0?SN:l,c,u,h)}function lne(t,e,r){return I0(t,e,r,xL,L0(tne()),gf(t,2,-2),0)}function sT(t,e,r,n){return I0(t,e,r,AN,gf(t,0,n),gf(t,n+1,-1),n)}function cd(t,e){for(var r="",n=CN(t),a=0;a<n;a++)r+=e(t[a],a,t,e)||"";return r}function cne(t,e,r,n){switch(t.type){case Gre:if(t.children.length)break;case qre:case AN:return t.return=t.return||t.value;case xL:return"";case bL:return t.return=t.value+"{"+cd(t.children,n)+"}";case SN:t.value=t.props.join(",")}return js(r=cd(t.children,n))?t.return=t.value+"{"+r+"}":""}function dne(t){var e=CN(t);return function(r,n,a,s){for(var o="",l=0;l<e;l++)o+=t[l](r,n,a,s)||"";return o}}function une(t){return function(e){e.root||(e=e.return)&&t(e)}}function NL(t){var e=Object.create(null);return function(r){return e[r]===void 0&&(e[r]=t(r)),e[r]}}var hne=function(e,r,n){for(var a=0,s=0;a=s,s=ks(),a===38&&s===12&&(r[n]=1),!xf(s);)sa();return Jf(e,Bn)},fne=function(e,r){var n=-1,a=44;do switch(xf(a)){case 0:a===38&&ks()===12&&(r[n]=1),e[n]+=hne(Bn-1,r,n);break;case 2:e[n]+=Xg(a);break;case 4:if(a===44){e[++n]=ks()===58?"&\f":"",r[n]=e[n].length;break}default:e[n]+=L0(a)}while(a=sa());return e},pne=function(e,r){return jL(fne(wL(e),r))},iT=new WeakMap,mne=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var r=e.value,n=e.parent,a=e.column===n.column&&e.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(e.props.length===1&&r.charCodeAt(0)!==58&&!iT.get(n))&&!a){iT.set(e,!0);for(var s=[],o=pne(r,s),l=n.props,c=0,u=0;c<o.length;c++)for(var h=0;h<l.length;h++,u++)e.props[u]=s[c]?o[c].replace(/&\f/g,l[h]):l[h]+" "+o[c]}}},gne=function(e){if(e.type==="decl"){var r=e.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(e.return="",e.value="")}};function SL(t,e){switch(Qre(t,e)){case 5103:return ft+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ft+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return ft+t+Tx+t+an+t+t;case 6828:case 4268:return ft+t+an+t+t;case 6165:return ft+t+an+"flex-"+t+t;case 5187:return ft+t+pt(t,/(\w+).+(:[^]+)/,ft+"box-$1$2"+an+"flex-$1$2")+t;case 5443:return ft+t+an+"flex-item-"+pt(t,/flex-|-self/,"")+t;case 4675:return ft+t+an+"flex-line-pack"+pt(t,/align-content|flex-|-self/,"")+t;case 5548:return ft+t+an+pt(t,"shrink","negative")+t;case 5292:return ft+t+an+pt(t,"basis","preferred-size")+t;case 6060:return ft+"box-"+pt(t,"-grow","")+ft+t+an+pt(t,"grow","positive")+t;case 4554:return ft+pt(t,/([^-])(transform)/g,"$1"+ft+"$2")+t;case 6187:return pt(pt(pt(t,/(zoom-|grab)/,ft+"$1"),/(image-set)/,ft+"$1"),t,"")+t;case 5495:case 3959:return pt(t,/(image-set\([^]*)/,ft+"$1$`$1");case 4968:return pt(pt(t,/(.+:)(flex-)?(.*)/,ft+"box-pack:$3"+an+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ft+t+t;case 4095:case 3583:case 4068:case 2532:return pt(t,/(.+)-inline(.+)/,ft+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(js(t)-1-e>6)switch(Xr(t,e+1)){case 109:if(Xr(t,e+4)!==45)break;case 102:return pt(t,/(.+:)(.+)-([^]+)/,"$1"+ft+"$2-$3$1"+Tx+(Xr(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~Aj(t,"stretch")?SL(pt(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(Xr(t,e+1)!==115)break;case 6444:switch(Xr(t,js(t)-3-(~Aj(t,"!important")&&10))){case 107:return pt(t,":",":"+ft)+t;case 101:return pt(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ft+(Xr(t,14)===45?"inline-":"")+"box$3$1"+ft+"$2$3$1"+an+"$2box$3")+t}break;case 5936:switch(Xr(t,e+11)){case 114:return ft+t+an+pt(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return ft+t+an+pt(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return ft+t+an+pt(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return ft+t+an+t+t}return t}var xne=function(e,r,n,a){if(e.length>-1&&!e.return)switch(e.type){case AN:e.return=SL(e.value,e.length);break;case bL:return cd([uh(e,{value:pt(e.value,"@","@"+ft)})],a);case SN:if(e.length)return ene(e.props,function(s){switch(Jre(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return cd([uh(e,{props:[pt(s,/:(read-\w+)/,":"+Tx+"$1")]})],a);case"::placeholder":return cd([uh(e,{props:[pt(s,/:(plac\w+)/,":"+ft+"input-$1")]}),uh(e,{props:[pt(s,/:(plac\w+)/,":"+Tx+"$1")]}),uh(e,{props:[pt(s,/:(plac\w+)/,an+"input-$1")]})],a)}return""})}},bne=[xne],yne=function(e){var r=e.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(b){var w=b.getAttribute("data-emotion");w.indexOf(" ")!==-1&&(document.head.appendChild(b),b.setAttribute("data-s",""))})}var a=e.stylisPlugins||bne,s={},o,l=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(b){for(var w=b.getAttribute("data-emotion").split(" "),N=1;N<w.length;N++)s[w[N]]=!0;l.push(b)});var c,u=[mne,gne];{var h,p=[cne,une(function(b){h.insert(b)})],m=dne(u.concat(a,p)),x=function(w){return cd(one(w),m)};c=function(w,N,A,S){h=A,x(w?w+"{"+N.styles+"}":N.styles),S&&(y.inserted[N.name]=!0)}}var y={key:r,sheet:new Vre({key:r,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:c};return y.sheet.hydrate(l),y},H1={exports:{}},bt={};/** @license React v16.13.1
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var oT;function vne(){if(oT)return bt;oT=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,a=t?Symbol.for("react.strict_mode"):60108,s=t?Symbol.for("react.profiler"):60114,o=t?Symbol.for("react.provider"):60109,l=t?Symbol.for("react.context"):60110,c=t?Symbol.for("react.async_mode"):60111,u=t?Symbol.for("react.concurrent_mode"):60111,h=t?Symbol.for("react.forward_ref"):60112,p=t?Symbol.for("react.suspense"):60113,m=t?Symbol.for("react.suspense_list"):60120,x=t?Symbol.for("react.memo"):60115,y=t?Symbol.for("react.lazy"):60116,b=t?Symbol.for("react.block"):60121,w=t?Symbol.for("react.fundamental"):60117,N=t?Symbol.for("react.responder"):60118,A=t?Symbol.for("react.scope"):60119;function S(k){if(typeof k=="object"&&k!==null){var T=k.$$typeof;switch(T){case e:switch(k=k.type,k){case c:case u:case n:case s:case a:case p:return k;default:switch(k=k&&k.$$typeof,k){case l:case h:case y:case x:case o:return k;default:return T}}case r:return T}}}function C(k){return S(k)===u}return bt.AsyncMode=c,bt.ConcurrentMode=u,bt.ContextConsumer=l,bt.ContextProvider=o,bt.Element=e,bt.ForwardRef=h,bt.Fragment=n,bt.Lazy=y,bt.Memo=x,bt.Portal=r,bt.Profiler=s,bt.StrictMode=a,bt.Suspense=p,bt.isAsyncMode=function(k){return C(k)||S(k)===c},bt.isConcurrentMode=C,bt.isContextConsumer=function(k){return S(k)===l},bt.isContextProvider=function(k){return S(k)===o},bt.isElement=function(k){return typeof k=="object"&&k!==null&&k.$$typeof===e},bt.isForwardRef=function(k){return S(k)===h},bt.isFragment=function(k){return S(k)===n},bt.isLazy=function(k){return S(k)===y},bt.isMemo=function(k){return S(k)===x},bt.isPortal=function(k){return S(k)===r},bt.isProfiler=function(k){return S(k)===s},bt.isStrictMode=function(k){return S(k)===a},bt.isSuspense=function(k){return S(k)===p},bt.isValidElementType=function(k){return typeof k=="string"||typeof k=="function"||k===n||k===u||k===s||k===a||k===p||k===m||typeof k=="object"&&k!==null&&(k.$$typeof===y||k.$$typeof===x||k.$$typeof===o||k.$$typeof===l||k.$$typeof===h||k.$$typeof===w||k.$$typeof===N||k.$$typeof===A||k.$$typeof===b)},bt.typeOf=S,bt}var lT;function AL(){return lT||(lT=1,H1.exports=vne()),H1.exports}var $1,cT;function wne(){if(cT)return $1;cT=1;var t=AL(),e={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},n={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};s[t.ForwardRef]=n,s[t.Memo]=a;function o(y){return t.isMemo(y)?a:s[y.$$typeof]||e}var l=Object.defineProperty,c=Object.getOwnPropertyNames,u=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,m=Object.prototype;function x(y,b,w){if(typeof b!="string"){if(m){var N=p(b);N&&N!==m&&x(y,N,w)}var A=c(b);u&&(A=A.concat(u(b)));for(var S=o(y),C=o(b),k=0;k<A.length;++k){var T=A[k];if(!r[T]&&!(w&&w[T])&&!(C&&C[T])&&!(S&&S[T])){var E=h(b,T);try{l(y,T,E)}catch{}}}}return y}return $1=x,$1}wne();var jne=!0;function CL(t,e,r){var n="";return r.split(" ").forEach(function(a){t[a]!==void 0?e.push(t[a]+";"):a&&(n+=a+" ")}),n}var kN=function(e,r,n){var a=e.key+"-"+r.name;(n===!1||jne===!1)&&e.registered[a]===void 0&&(e.registered[a]=r.styles)},kL=function(e,r,n){kN(e,r,n);var a=e.key+"-"+r.name;if(e.inserted[r.name]===void 0){var s=r;do e.insert(r===s?"."+a:"",s,e.sheet,!0),s=s.next;while(s!==void 0)}};function Nne(t){for(var e=0,r,n=0,a=t.length;a>=4;++n,a-=4)r=t.charCodeAt(n)&255|(t.charCodeAt(++n)&255)<<8|(t.charCodeAt(++n)&255)<<16|(t.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,e=(r&65535)*1540483477+((r>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(a){case 3:e^=(t.charCodeAt(n+2)&255)<<16;case 2:e^=(t.charCodeAt(n+1)&255)<<8;case 1:e^=t.charCodeAt(n)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var Sne={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Ane=/[A-Z]|^ms/g,Cne=/_EMO_([^_]+?)_([^]*?)_EMO_/g,DL=function(e){return e.charCodeAt(1)===45},dT=function(e){return e!=null&&typeof e!="boolean"},Y1=NL(function(t){return DL(t)?t:t.replace(Ane,"-$&").toLowerCase()}),uT=function(e,r){switch(e){case"animation":case"animationName":if(typeof r=="string")return r.replace(Cne,function(n,a,s){return Ns={name:a,styles:s,next:Ns},a})}return Sne[e]!==1&&!DL(e)&&typeof r=="number"&&r!==0?r+"px":r};function bf(t,e,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var a=r;if(a.anim===1)return Ns={name:a.name,styles:a.styles,next:Ns},a.name;var s=r;if(s.styles!==void 0){var o=s.next;if(o!==void 0)for(;o!==void 0;)Ns={name:o.name,styles:o.styles,next:Ns},o=o.next;var l=s.styles+";";return l}return kne(t,e,r)}case"function":{if(t!==void 0){var c=Ns,u=r(t);return Ns=c,bf(t,e,u)}break}}var h=r;if(e==null)return h;var p=e[h];return p!==void 0?p:h}function kne(t,e,r){var n="";if(Array.isArray(r))for(var a=0;a<r.length;a++)n+=bf(t,e,r[a])+";";else for(var s in r){var o=r[s];if(typeof o!="object"){var l=o;e!=null&&e[l]!==void 0?n+=s+"{"+e[l]+"}":dT(l)&&(n+=Y1(s)+":"+uT(s,l)+";")}else if(Array.isArray(o)&&typeof o[0]=="string"&&(e==null||e[o[0]]===void 0))for(var c=0;c<o.length;c++)dT(o[c])&&(n+=Y1(s)+":"+uT(s,o[c])+";");else{var u=bf(t,e,o);switch(s){case"animation":case"animationName":{n+=Y1(s)+":"+u+";";break}default:n+=s+"{"+u+"}"}}}return n}var hT=/label:\s*([^\s;{]+)\s*(;|$)/g,Ns;function B0(t,e,r){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var n=!0,a="";Ns=void 0;var s=t[0];if(s==null||s.raw===void 0)n=!1,a+=bf(r,e,s);else{var o=s;a+=o[0]}for(var l=1;l<t.length;l++)if(a+=bf(r,e,t[l]),n){var c=s;a+=c[l]}hT.lastIndex=0;for(var u="",h;(h=hT.exec(a))!==null;)u+="-"+h[1];var p=Nne(a)+u;return{name:p,styles:a,next:Ns}}var Dne=function(e){return e()},Tne=A2.useInsertionEffect?A2.useInsertionEffect:!1,TL=Tne||Dne,ML=O.createContext(typeof HTMLElement<"u"?yne({key:"css"}):null);ML.Provider;var EL=function(e){return O.forwardRef(function(r,n){var a=O.useContext(ML);return e(r,a,n)})},OL=O.createContext({}),DN={}.hasOwnProperty,kj="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Mne=function(e,r){var n={};for(var a in r)DN.call(r,a)&&(n[a]=r[a]);return n[kj]=e,n},Ene=function(e){var r=e.cache,n=e.serialized,a=e.isStringTag;return kN(r,n,a),TL(function(){return kL(r,n,a)}),null},One=EL(function(t,e,r){var n=t.css;typeof n=="string"&&e.registered[n]!==void 0&&(n=e.registered[n]);var a=t[kj],s=[n],o="";typeof t.className=="string"?o=CL(e.registered,s,t.className):t.className!=null&&(o=t.className+" ");var l=B0(s,void 0,O.useContext(OL));o+=e.key+"-"+l.name;var c={};for(var u in t)DN.call(t,u)&&u!=="css"&&u!==kj&&(c[u]=t[u]);return c.className=o,r&&(c.ref=r),O.createElement(O.Fragment,null,O.createElement(Ene,{cache:e,serialized:l,isStringTag:typeof a=="string"}),O.createElement(a,c))}),Pne=One,fT=function(e,r){var n=arguments;if(r==null||!DN.call(r,"css"))return O.createElement.apply(void 0,n);var a=n.length,s=new Array(a);s[0]=Pne,s[1]=Mne(e,r);for(var o=2;o<a;o++)s[o]=n[o];return O.createElement.apply(null,s)};(function(t){var e;e||(e=t.JSX||(t.JSX={}))})(fT||(fT={}));function _ne(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return B0(e)}function TN(){var t=_ne.apply(void 0,arguments),e="animation-"+t.name;return{name:e,styles:"@keyframes "+e+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}var Rne=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Lne=NL(function(t){return Rne.test(t)||t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)<91}),zne=Lne,Ine=function(e){return e!=="theme"},pT=function(e){return typeof e=="string"&&e.charCodeAt(0)>96?zne:Ine},mT=function(e,r,n){var a;if(r){var s=r.shouldForwardProp;a=e.__emotion_forwardProp&&s?function(o){return e.__emotion_forwardProp(o)&&s(o)}:s}return typeof a!="function"&&n&&(a=e.__emotion_forwardProp),a},Bne=function(e){var r=e.cache,n=e.serialized,a=e.isStringTag;return kN(r,n,a),TL(function(){return kL(r,n,a)}),null},Fne=function t(e,r){var n=e.__emotion_real===e,a=n&&e.__emotion_base||e,s,o;r!==void 0&&(s=r.label,o=r.target);var l=mT(e,r,n),c=l||pT(a),u=!c("as");return function(){var h=arguments,p=n&&e.__emotion_styles!==void 0?e.__emotion_styles.slice(0):[];if(s!==void 0&&p.push("label:"+s+";"),h[0]==null||h[0].raw===void 0)p.push.apply(p,h);else{var m=h[0];p.push(m[0]);for(var x=h.length,y=1;y<x;y++)p.push(h[y],m[y])}var b=EL(function(w,N,A){var S=u&&w.as||a,C="",k=[],T=w;if(w.theme==null){T={};for(var E in w)T[E]=w[E];T.theme=O.useContext(OL)}typeof w.className=="string"?C=CL(N.registered,k,w.className):w.className!=null&&(C=w.className+" ");var _=B0(p.concat(k),N.registered,T);C+=N.key+"-"+_.name,o!==void 0&&(C+=" "+o);var L=u&&l===void 0?pT(S):c,P={};for(var R in w)u&&R==="as"||L(R)&&(P[R]=w[R]);return P.className=C,A&&(P.ref=A),O.createElement(O.Fragment,null,O.createElement(Bne,{cache:N,serialized:_,isStringTag:typeof S=="string"}),O.createElement(S,P))});return b.displayName=s!==void 0?s:"Styled("+(typeof a=="string"?a:a.displayName||a.name||"Component")+")",b.defaultProps=e.defaultProps,b.__emotion_real=b,b.__emotion_base=a,b.__emotion_styles=p,b.__emotion_forwardProp=l,Object.defineProperty(b,"toString",{value:function(){return"."+o}}),b.withComponent=function(w,N){var A=t(w,Dx({},r,N,{shouldForwardProp:mT(b,N,!0)}));return A.apply(void 0,p)},b}},Hne=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],Dj=Fne.bind(null);Hne.forEach(function(t){Dj[t]=Dj(t)});function $ne(t,e){return Dj(t,e)}function Yne(t,e){Array.isArray(t.__emotion_styles)&&(t.__emotion_styles=e(t.__emotion_styles))}const gT=[];function Pl(t){return gT[0]=t,B0(gT)}var U1={exports:{}},Tt={};/**
* @license React
* react-is.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var xT;function Une(){if(xT)return Tt;xT=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.for("react.view_transition"),x=Symbol.for("react.client.reference");function y(b){if(typeof b=="object"&&b!==null){var w=b.$$typeof;switch(w){case t:switch(b=b.type,b){case r:case a:case n:case c:case u:case m:return b;default:switch(b=b&&b.$$typeof,b){case o:case l:case p:case h:return b;case s:return b;default:return w}}case e:return w}}}return Tt.ContextConsumer=s,Tt.ContextProvider=o,Tt.Element=t,Tt.ForwardRef=l,Tt.Fragment=r,Tt.Lazy=p,Tt.Memo=h,Tt.Portal=e,Tt.Profiler=a,Tt.StrictMode=n,Tt.Suspense=c,Tt.SuspenseList=u,Tt.isContextConsumer=function(b){return y(b)===s},Tt.isContextProvider=function(b){return y(b)===o},Tt.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===t},Tt.isForwardRef=function(b){return y(b)===l},Tt.isFragment=function(b){return y(b)===r},Tt.isLazy=function(b){return y(b)===p},Tt.isMemo=function(b){return y(b)===h},Tt.isPortal=function(b){return y(b)===e},Tt.isProfiler=function(b){return y(b)===a},Tt.isStrictMode=function(b){return y(b)===n},Tt.isSuspense=function(b){return y(b)===c},Tt.isSuspenseList=function(b){return y(b)===u},Tt.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===r||b===a||b===n||b===c||b===u||typeof b=="object"&&b!==null&&(b.$$typeof===p||b.$$typeof===h||b.$$typeof===o||b.$$typeof===s||b.$$typeof===l||b.$$typeof===x||b.getModuleId!==void 0)},Tt.typeOf=y,Tt}var bT;function Wne(){return bT||(bT=1,U1.exports=Une()),U1.exports}var PL=Wne();function Ss(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)}function _L(t){if(O.isValidElement(t)||PL.isValidElementType(t)||!Ss(t))return t;const e={};return Object.keys(t).forEach(r=>{e[r]=_L(t[r])}),e}function ia(t,e,r={clone:!0}){const n=r.clone?{...t}:t;return Ss(t)&&Ss(e)&&Object.keys(e).forEach(a=>{O.isValidElement(e[a])||PL.isValidElementType(e[a])?n[a]=e[a]:Ss(e[a])&&Object.prototype.hasOwnProperty.call(t,a)&&Ss(t[a])?n[a]=ia(t[a],e[a],r):r.clone?n[a]=Ss(e[a])?_L(e[a]):e[a]:n[a]=e[a]}),n}const Xne=t=>{const e=Object.keys(t).map(r=>({key:r,val:t[r]}))||[];return e.sort((r,n)=>r.val-n.val),e.reduce((r,n)=>({...r,[n.key]:n.val}),{})};function Vne(t){const{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5,...a}=t,s=Xne(e),o=Object.keys(s);function l(m){return`@media (min-width:${typeof e[m]=="number"?e[m]:m}${r})`}function c(m){return`@media (max-width:${(typeof e[m]=="number"?e[m]:m)-n/100}${r})`}function u(m,x){const y=o.indexOf(x);return`@media (min-width:${typeof e[m]=="number"?e[m]:m}${r}) and (max-width:${(y!==-1&&typeof e[o[y]]=="number"?e[o[y]]:x)-n/100}${r})`}function h(m){return o.indexOf(m)+1<o.length?u(m,o[o.indexOf(m)+1]):l(m)}function p(m){const x=o.indexOf(m);return x===0?l(o[1]):x===o.length-1?c(o[x]):u(m,o[o.indexOf(m)+1]).replace("@media","@media not all and")}return{keys:o,values:s,up:l,down:c,between:u,only:h,not:p,unit:r,...a}}function yT(t,e){if(!t.containerQueries)return e;const r=Object.keys(e).filter(n=>n.startsWith("@container")).sort((n,a)=>{const s=/min-width:\s*([0-9.]+)/;return+(n.match(s)?.[1]||0)-+(a.match(s)?.[1]||0)});return r.length?r.reduce((n,a)=>{const s=e[a];return delete n[a],n[a]=s,n},{...e}):e}function qne(t,e){return e==="@"||e.startsWith("@")&&(t.some(r=>e.startsWith(`@${r}`))||!!e.match(/^@\d/))}function Gne(t,e){const r=e.match(/^@([^/]+)?\/?(.+)?$/);if(!r)return null;const[,n,a]=r,s=Number.isNaN(+n)?n||0:+n;return t.containerQueries(a).up(s)}function Kne(t){const e=(s,o)=>s.replace("@media",o?`@container ${o}`:"@container");function r(s,o){s.up=(...l)=>e(t.breakpoints.up(...l),o),s.down=(...l)=>e(t.breakpoints.down(...l),o),s.between=(...l)=>e(t.breakpoints.between(...l),o),s.only=(...l)=>e(t.breakpoints.only(...l),o),s.not=(...l)=>{const c=e(t.breakpoints.not(...l),o);return c.includes("not all and")?c.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):c}}const n={},a=s=>(r(n,s),n);return r(a),{...t,containerQueries:a}}const Zne={borderRadius:4};function qh(t,e){return e?ia(t,e,{clone:!1}):t}const F0={xs:0,sm:600,md:900,lg:1200,xl:1536},vT={keys:["xs","sm","md","lg","xl"],up:t=>`@media (min-width:${F0[t]}px)`},Qne={containerQueries:t=>({up:e=>{let r=typeof e=="number"?e:F0[e]||e;return typeof r=="number"&&(r=`${r}px`),t?`@container ${t} (min-width:${r})`:`@container (min-width:${r})`}})};function vi(t,e,r){const n=t.theme||{};if(Array.isArray(e)){const s=n.breakpoints||vT;return e.reduce((o,l,c)=>(o[s.up(s.keys[c])]=r(e[c]),o),{})}if(typeof e=="object"){const s=n.breakpoints||vT;return Object.keys(e).reduce((o,l)=>{if(qne(s.keys,l)){const c=Gne(n.containerQueries?n:Qne,l);c&&(o[c]=r(e[l],l))}else if(Object.keys(s.values||F0).includes(l)){const c=s.up(l);o[c]=r(e[l],l)}else{const c=l;o[c]=e[c]}return o},{})}return r(e)}function Jne(t={}){return t.keys?.reduce((r,n)=>{const a=t.up(n);return r[a]={},r},{})||{}}function wT(t,e){return t.reduce((r,n)=>{const a=r[n];return(!a||Object.keys(a).length===0)&&delete r[n],r},e)}function zn(t){if(typeof t!="string")throw new Error(Wl(7));return t.charAt(0).toUpperCase()+t.slice(1)}function H0(t,e,r=!0){if(!e||typeof e!="string")return null;if(t&&t.vars&&r){const n=`vars.${e}`.split(".").reduce((a,s)=>a&&a[s]?a[s]:null,t);if(n!=null)return n}return e.split(".").reduce((n,a)=>n&&n[a]!=null?n[a]:null,t)}function Mx(t,e,r,n=r){let a;return typeof t=="function"?a=t(r):Array.isArray(t)?a=t[r]||n:a=H0(t,r)||n,e&&(a=e(a,n,t)),a}function dr(t){const{prop:e,cssProperty:r=t.prop,themeKey:n,transform:a}=t,s=o=>{if(o[e]==null)return null;const l=o[e],c=o.theme,u=H0(c,n)||{};return vi(o,l,p=>{let m=Mx(u,a,p);return p===m&&typeof p=="string"&&(m=Mx(u,a,`${e}${p==="default"?"":zn(p)}`,p)),r===!1?m:{[r]:m}})};return s.propTypes={},s.filterProps=[e],s}function eae(t){const e={};return r=>(e[r]===void 0&&(e[r]=t(r)),e[r])}const tae={m:"margin",p:"padding"},rae={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},jT={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},nae=eae(t=>{if(t.length>2)if(jT[t])t=jT[t];else return[t];const[e,r]=t.split(""),n=tae[e],a=rae[r]||"";return Array.isArray(a)?a.map(s=>n+s):[n+a]}),MN=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],EN=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...MN,...EN];function ep(t,e,r,n){const a=H0(t,e,!0)??r;return typeof a=="number"||typeof a=="string"?s=>typeof s=="string"?s:typeof a=="string"?a.startsWith("var(")&&s===0?0:a.startsWith("var(")&&s===1?a:`calc(${s} * ${a})`:a*s:Array.isArray(a)?s=>{if(typeof s=="string")return s;const o=Math.abs(s),l=a[o];return s>=0?l:typeof l=="number"?-l:typeof l=="string"&&l.startsWith("var(")?`calc(-1 * ${l})`:`-${l}`}:typeof a=="function"?a:()=>{}}function ON(t){return ep(t,"spacing",8)}function tp(t,e){return typeof e=="string"||e==null?e:t(e)}function aae(t,e){return r=>t.reduce((n,a)=>(n[a]=tp(e,r),n),{})}function sae(t,e,r,n){if(!e.includes(r))return null;const a=nae(r),s=aae(a,n),o=t[r];return vi(t,o,s)}function RL(t,e){const r=ON(t.theme);return Object.keys(t).map(n=>sae(t,e,n,r)).reduce(qh,{})}function tr(t){return RL(t,MN)}tr.propTypes={};tr.filterProps=MN;function rr(t){return RL(t,EN)}rr.propTypes={};rr.filterProps=EN;function LL(t=8,e=ON({spacing:t})){if(t.mui)return t;const r=(...n)=>(n.length===0?[1]:n).map(s=>{const o=e(s);return typeof o=="number"?`${o}px`:o}).join(" ");return r.mui=!0,r}function $0(...t){const e=t.reduce((n,a)=>(a.filterProps.forEach(s=>{n[s]=a}),n),{}),r=n=>Object.keys(n).reduce((a,s)=>e[s]?qh(a,e[s](n)):a,{});return r.propTypes={},r.filterProps=t.reduce((n,a)=>n.concat(a.filterProps),[]),r}function Ea(t){return typeof t!="number"?t:`${t}px solid`}function Fa(t,e){return dr({prop:t,themeKey:"borders",transform:e})}const iae=Fa("border",Ea),oae=Fa("borderTop",Ea),lae=Fa("borderRight",Ea),cae=Fa("borderBottom",Ea),dae=Fa("borderLeft",Ea),uae=Fa("borderColor"),hae=Fa("borderTopColor"),fae=Fa("borderRightColor"),pae=Fa("borderBottomColor"),mae=Fa("borderLeftColor"),gae=Fa("outline",Ea),xae=Fa("outlineColor"),Y0=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){const e=ep(t.theme,"shape.borderRadius",4),r=n=>({borderRadius:tp(e,n)});return vi(t,t.borderRadius,r)}return null};Y0.propTypes={};Y0.filterProps=["borderRadius"];$0(iae,oae,lae,cae,dae,uae,hae,fae,pae,mae,Y0,gae,xae);const U0=t=>{if(t.gap!==void 0&&t.gap!==null){const e=ep(t.theme,"spacing",8),r=n=>({gap:tp(e,n)});return vi(t,t.gap,r)}return null};U0.propTypes={};U0.filterProps=["gap"];const W0=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){const e=ep(t.theme,"spacing",8),r=n=>({columnGap:tp(e,n)});return vi(t,t.columnGap,r)}return null};W0.propTypes={};W0.filterProps=["columnGap"];const X0=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){const e=ep(t.theme,"spacing",8),r=n=>({rowGap:tp(e,n)});return vi(t,t.rowGap,r)}return null};X0.propTypes={};X0.filterProps=["rowGap"];const bae=dr({prop:"gridColumn"}),yae=dr({prop:"gridRow"}),vae=dr({prop:"gridAutoFlow"}),wae=dr({prop:"gridAutoColumns"}),jae=dr({prop:"gridAutoRows"}),Nae=dr({prop:"gridTemplateColumns"}),Sae=dr({prop:"gridTemplateRows"}),Aae=dr({prop:"gridTemplateAreas"}),Cae=dr({prop:"gridArea"});$0(U0,W0,X0,bae,yae,vae,wae,jae,Nae,Sae,Aae,Cae);function dd(t,e){return e==="grey"?e:t}const kae=dr({prop:"color",themeKey:"palette",transform:dd}),Dae=dr({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:dd}),Tae=dr({prop:"backgroundColor",themeKey:"palette",transform:dd});$0(kae,Dae,Tae);function ra(t){return t<=1&&t!==0?`${t*100}%`:t}const Mae=dr({prop:"width",transform:ra}),PN=t=>{if(t.maxWidth!==void 0&&t.maxWidth!==null){const e=r=>{const n=t.theme?.breakpoints?.values?.[r]||F0[r];return n?t.theme?.breakpoints?.unit!=="px"?{maxWidth:`${n}${t.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:ra(r)}};return vi(t,t.maxWidth,e)}return null};PN.filterProps=["maxWidth"];const Eae=dr({prop:"minWidth",transform:ra}),Oae=dr({prop:"height",transform:ra}),Pae=dr({prop:"maxHeight",transform:ra}),_ae=dr({prop:"minHeight",transform:ra});dr({prop:"size",cssProperty:"width",transform:ra});dr({prop:"size",cssProperty:"height",transform:ra});const Rae=dr({prop:"boxSizing"});$0(Mae,PN,Eae,Oae,Pae,_ae,Rae);const rp={border:{themeKey:"borders",transform:Ea},borderTop:{themeKey:"borders",transform:Ea},borderRight:{themeKey:"borders",transform:Ea},borderBottom:{themeKey:"borders",transform:Ea},borderLeft:{themeKey:"borders",transform:Ea},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Ea},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Y0},color:{themeKey:"palette",transform:dd},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:dd},backgroundColor:{themeKey:"palette",transform:dd},p:{style:rr},pt:{style:rr},pr:{style:rr},pb:{style:rr},pl:{style:rr},px:{style:rr},py:{style:rr},padding:{style:rr},paddingTop:{style:rr},paddingRight:{style:rr},paddingBottom:{style:rr},paddingLeft:{style:rr},paddingX:{style:rr},paddingY:{style:rr},paddingInline:{style:rr},paddingInlineStart:{style:rr},paddingInlineEnd:{style:rr},paddingBlock:{style:rr},paddingBlockStart:{style:rr},paddingBlockEnd:{style:rr},m:{style:tr},mt:{style:tr},mr:{style:tr},mb:{style:tr},ml:{style:tr},mx:{style:tr},my:{style:tr},margin:{style:tr},marginTop:{style:tr},marginRight:{style:tr},marginBottom:{style:tr},marginLeft:{style:tr},marginX:{style:tr},marginY:{style:tr},marginInline:{style:tr},marginInlineStart:{style:tr},marginInlineEnd:{style:tr},marginBlock:{style:tr},marginBlockStart:{style:tr},marginBlockEnd:{style:tr},displayPrint:{cssProperty:!1,transform:t=>({"@media print":{display:t}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:U0},rowGap:{style:X0},columnGap:{style:W0},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:ra},maxWidth:{style:PN},minWidth:{transform:ra},height:{transform:ra},maxHeight:{transform:ra},minHeight:{transform:ra},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function Lae(...t){const e=t.reduce((n,a)=>n.concat(Object.keys(a)),[]),r=new Set(e);return t.every(n=>r.size===Object.keys(n).length)}function zae(t,e){return typeof t=="function"?t(e):t}function Iae(){function t(r,n,a,s){const o={[r]:n,theme:a},l=s[r];if(!l)return{[r]:n};const{cssProperty:c=r,themeKey:u,transform:h,style:p}=l;if(n==null)return null;if(u==="typography"&&n==="inherit")return{[r]:n};const m=H0(a,u)||{};return p?p(o):vi(o,n,y=>{let b=Mx(m,h,y);return y===b&&typeof y=="string"&&(b=Mx(m,h,`${r}${y==="default"?"":zn(y)}`,y)),c===!1?b:{[c]:b}})}function e(r){const{sx:n,theme:a={},nested:s}=r||{};if(!n)return null;const o=a.unstable_sxConfig??rp;function l(c){let u=c;if(typeof c=="function")u=c(a);else if(typeof c!="object")return c;if(!u)return null;const h=Jne(a.breakpoints),p=Object.keys(h);let m=h;return Object.keys(u).forEach(x=>{const y=zae(u[x],a);if(y!=null)if(typeof y=="object")if(o[x])m=qh(m,t(x,y,a,o));else{const b=vi({theme:a},y,w=>({[x]:w}));Lae(b,y)?m[x]=e({sx:y,theme:a,nested:!0}):m=qh(m,b)}else m=qh(m,t(x,y,a,o))}),!s&&a.modularCssLayers?{"@layer sx":yT(a,wT(p,m))}:yT(a,wT(p,m))}return Array.isArray(n)?n.map(l):l(n)}return e}const vd=Iae();vd.filterProps=["sx"];function Bae(t,e){const r=this;if(r.vars){if(!r.colorSchemes?.[t]||typeof r.getColorSchemeSelector!="function")return{};let n=r.getColorSchemeSelector(t);return n==="&"?e:((n.includes("data-")||n.includes("."))&&(n=`*:where(${n.replace(/\s*&$/,"")}) &`),{[n]:e})}return r.palette.mode===t?e:{}}function zL(t={},...e){const{breakpoints:r={},palette:n={},spacing:a,shape:s={},...o}=t,l=Vne(r),c=LL(a);let u=ia({breakpoints:l,direction:"ltr",components:{},palette:{mode:"light",...n},spacing:c,shape:{...Zne,...s}},o);return u=Kne(u),u.applyStyles=Bae,u=e.reduce((h,p)=>ia(h,p),u),u.unstable_sxConfig={...rp,...o?.unstable_sxConfig},u.unstable_sx=function(p){return vd({sx:p,theme:this})},u}const Fae=t=>{const e={systemProps:{},otherProps:{}},r=t?.theme?.unstable_sxConfig??rp;return Object.keys(t).forEach(n=>{r[n]?e.systemProps[n]=t[n]:e.otherProps[n]=t[n]}),e};function Hae(t){const{sx:e,...r}=t,{systemProps:n,otherProps:a}=Fae(r);let s;return Array.isArray(e)?s=[n,...e]:typeof e=="function"?s=(...o)=>{const l=e(...o);return Ss(l)?{...n,...l}:n}:s={...n,...e},{...a,sx:s}}const NT=t=>t,$ae=()=>{let t=NT;return{configure(e){t=e},generate(e){return t(e)},reset(){t=NT}}},Yae=$ae();function IL(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var a=t.length;for(e=0;e<a;e++)t[e]&&(r=IL(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function Ge(){for(var t,e,r=0,n="",a=arguments.length;r<a;r++)(t=arguments[r])&&(e=IL(t))&&(n&&(n+=" "),n+=e);return n}const Uae={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Ud(t,e,r="Mui"){const n=Uae[e];return n?`${r}-${n}`:`${Yae.generate(t)}-${e}`}function Wd(t,e,r="Mui"){const n={};return e.forEach(a=>{n[a]=Ud(t,a,r)}),n}function BL(t){const{variants:e,...r}=t,n={variants:e,style:Pl(r),isProcessed:!0};return n.style===r||e&&e.forEach(a=>{typeof a.style!="function"&&(a.style=Pl(a.style))}),n}const Wae=zL();function W1(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}function wl(t,e){return e&&t&&typeof t=="object"&&t.styles&&!t.styles.startsWith("@layer")&&(t.styles=`@layer ${e}{${String(t.styles)}}`),t}function Xae(t){return t?(e,r)=>r[t]:null}function Vae(t,e,r){t.theme=Kae(t.theme)?r:t.theme[e]||t.theme}function qg(t,e,r){const n=typeof e=="function"?e(t):e;if(Array.isArray(n))return n.flatMap(a=>qg(t,a,r));if(Array.isArray(n?.variants)){let a;if(n.isProcessed)a=r?wl(n.style,r):n.style;else{const{variants:s,...o}=n;a=r?wl(Pl(o),r):o}return FL(t,n.variants,[a],r)}return n?.isProcessed?r?wl(Pl(n.style),r):n.style:r?wl(Pl(n),r):n}function FL(t,e,r=[],n=void 0){let a;e:for(let s=0;s<e.length;s+=1){const o=e[s];if(typeof o.props=="function"){if(a??={...t,...t.ownerState,ownerState:t.ownerState},!o.props(a))continue}else for(const l in o.props)if(t[l]!==o.props[l]&&t.ownerState?.[l]!==o.props[l])continue e;typeof o.style=="function"?(a??={...t,...t.ownerState,ownerState:t.ownerState},r.push(n?wl(Pl(o.style(a)),n):o.style(a))):r.push(n?wl(Pl(o.style),n):o.style)}return r}function qae(t={}){const{themeId:e,defaultTheme:r=Wae,rootShouldForwardProp:n=W1,slotShouldForwardProp:a=W1}=t;function s(l){Vae(l,e,r)}return(l,c={})=>{Yne(l,T=>T.filter(E=>E!==vd));const{name:u,slot:h,skipVariantsResolver:p,skipSx:m,overridesResolver:x=Xae(Qae(h)),...y}=c,b=u&&u.startsWith("Mui")||h?"components":"custom",w=p!==void 0?p:h&&h!=="Root"&&h!=="root"||!1,N=m||!1;let A=W1;h==="Root"||h==="root"?A=n:h?A=a:Zae(l)&&(A=void 0);const S=$ne(l,{shouldForwardProp:A,label:Gae(),...y}),C=T=>{if(T.__emotion_real===T)return T;if(typeof T=="function")return function(_){return qg(_,T,_.theme.modularCssLayers?b:void 0)};if(Ss(T)){const E=BL(T);return function(L){return E.variants?qg(L,E,L.theme.modularCssLayers?b:void 0):L.theme.modularCssLayers?wl(E.style,b):E.style}}return T},k=(...T)=>{const E=[],_=T.map(C),L=[];if(E.push(s),u&&x&&L.push(function(B){const X=B.theme.components?.[u]?.styleOverrides;if(!X)return null;const H={};for(const W in X)H[W]=qg(B,X[W],B.theme.modularCssLayers?"theme":void 0);return x(B,H)}),u&&!w&&L.push(function(B){const X=B.theme?.components?.[u]?.variants;return X?FL(B,X,[],B.theme.modularCssLayers?"theme":void 0):null}),N||L.push(vd),Array.isArray(_[0])){const z=_.shift(),B=new Array(E.length).fill(""),Y=new Array(L.length).fill("");let X;X=[...B,...z,...Y],X.raw=[...B,...z.raw,...Y],E.unshift(X)}const P=[...E,..._,...L],R=S(...P);return l.muiName&&(R.muiName=l.muiName),R};return S.withConfig&&(k.withConfig=S.withConfig),k}}function Gae(t,e){return void 0}function Kae(t){for(const e in t)return!1;return!0}function Zae(t){return typeof t=="string"&&t.charCodeAt(0)>96}function Qae(t){return t&&t.charAt(0).toLowerCase()+t.slice(1)}function Tj(t,e,r=!1){const n={...e};for(const a in t)if(Object.prototype.hasOwnProperty.call(t,a)){const s=a;if(s==="components"||s==="slots")n[s]={...t[s],...n[s]};else if(s==="componentsProps"||s==="slotProps"){const o=t[s],l=e[s];if(!l)n[s]=o||{};else if(!o)n[s]=l;else{n[s]={...l};for(const c in o)if(Object.prototype.hasOwnProperty.call(o,c)){const u=c;n[s][u]=Tj(o[u],l[u],r)}}}else s==="className"&&r&&e.className?n.className=Ge(t?.className,e?.className):s==="style"&&r&&e.style?n.style={...t?.style,...e?.style}:n[s]===void 0&&(n[s]=t[s])}return n}const Jae=typeof window<"u"?O.useLayoutEffect:O.useEffect;function ese(t,e=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(e,Math.min(t,r))}function _N(t,e=0,r=1){return ese(t,e,r)}function tse(t){t=t.slice(1);const e=new RegExp(`.{1,${t.length>=6?2:1}}`,"g");let r=t.match(e);return r&&r[0].length===1&&(r=r.map(n=>n+n)),r?`rgb${r.length===4?"a":""}(${r.map((n,a)=>a<3?parseInt(n,16):Math.round(parseInt(n,16)/255*1e3)/1e3).join(", ")})`:""}function No(t){if(t.type)return t;if(t.charAt(0)==="#")return No(tse(t));const e=t.indexOf("("),r=t.substring(0,e);if(!["rgb","rgba","hsl","hsla","color"].includes(r))throw new Error(Wl(9,t));let n=t.substring(e+1,t.length-1),a;if(r==="color"){if(n=n.split(" "),a=n.shift(),n.length===4&&n[3].charAt(0)==="/"&&(n[3]=n[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(a))throw new Error(Wl(10,a))}else n=n.split(",");return n=n.map(s=>parseFloat(s)),{type:r,values:n,colorSpace:a}}const rse=t=>{const e=No(t);return e.values.slice(0,3).map((r,n)=>e.type.includes("hsl")&&n!==0?`${r}%`:r).join(" ")},kh=(t,e)=>{try{return rse(t)}catch{return t}};function V0(t){const{type:e,colorSpace:r}=t;let{values:n}=t;return e.includes("rgb")?n=n.map((a,s)=>s<3?parseInt(a,10):a):e.includes("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),e.includes("color")?n=`${r} ${n.join(" ")}`:n=`${n.join(", ")}`,`${e}(${n})`}function HL(t){t=No(t);const{values:e}=t,r=e[0],n=e[1]/100,a=e[2]/100,s=n*Math.min(a,1-a),o=(u,h=(u+r/30)%12)=>a-s*Math.max(Math.min(h-3,9-h,1),-1);let l="rgb";const c=[Math.round(o(0)*255),Math.round(o(8)*255),Math.round(o(4)*255)];return t.type==="hsla"&&(l+="a",c.push(e[3])),V0({type:l,values:c})}function Mj(t){t=No(t);let e=t.type==="hsl"||t.type==="hsla"?No(HL(t)).values:t.values;return e=e.map(r=>(t.type!=="color"&&(r/=255),r<=.03928?r/12.92:((r+.055)/1.055)**2.4)),Number((.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3))}function nse(t,e){const r=Mj(t),n=Mj(e);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function Ej(t,e){return t=No(t),e=_N(e),(t.type==="rgb"||t.type==="hsl")&&(t.type+="a"),t.type==="color"?t.values[3]=`/${e}`:t.values[3]=e,V0(t)}function og(t,e,r){try{return Ej(t,e)}catch{return t}}function q0(t,e){if(t=No(t),e=_N(e),t.type.includes("hsl"))t.values[2]*=1-e;else if(t.type.includes("rgb")||t.type.includes("color"))for(let r=0;r<3;r+=1)t.values[r]*=1-e;return V0(t)}function Pt(t,e,r){try{return q0(t,e)}catch{return t}}function G0(t,e){if(t=No(t),e=_N(e),t.type.includes("hsl"))t.values[2]+=(100-t.values[2])*e;else if(t.type.includes("rgb"))for(let r=0;r<3;r+=1)t.values[r]+=(255-t.values[r])*e;else if(t.type.includes("color"))for(let r=0;r<3;r+=1)t.values[r]+=(1-t.values[r])*e;return V0(t)}function _t(t,e,r){try{return G0(t,e)}catch{return t}}function ase(t,e=.15){return Mj(t)>.5?q0(t,e):G0(t,e)}function lg(t,e,r){try{return ase(t,e)}catch{return t}}const sse=O.createContext(void 0);function ise(t){const{theme:e,name:r,props:n}=t;if(!e||!e.components||!e.components[r])return n;const a=e.components[r];return a.defaultProps?Tj(a.defaultProps,n,e.components.mergeClassNameAndStyle):!a.styleOverrides&&!a.variants?Tj(a,n,e.components.mergeClassNameAndStyle):n}function ose({props:t,name:e}){const r=O.useContext(sse);return ise({props:t,name:e,theme:{components:r}})}const ST={theme:void 0};function lse(t){let e,r;return function(a){let s=e;return(s===void 0||a.theme!==r)&&(ST.theme=a.theme,s=BL(t(ST)),e=s,r=a.theme),s}}function cse(t=""){function e(...n){if(!n.length)return"";const a=n[0];return typeof a=="string"&&!a.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${t?`${t}-`:""}${a}${e(...n.slice(1))})`:`, ${a}`}return(n,...a)=>`var(--${t?`${t}-`:""}${n}${e(...a)})`}const AT=(t,e,r,n=[])=>{let a=t;e.forEach((s,o)=>{o===e.length-1?Array.isArray(a)?a[Number(s)]=r:a&&typeof a=="object"&&(a[s]=r):a&&typeof a=="object"&&(a[s]||(a[s]=n.includes(s)?[]:{}),a=a[s])})},dse=(t,e,r)=>{function n(a,s=[],o=[]){Object.entries(a).forEach(([l,c])=>{(!r||r&&!r([...s,l]))&&c!=null&&(typeof c=="object"&&Object.keys(c).length>0?n(c,[...s,l],Array.isArray(c)?[...o,l]:o):e([...s,l],c,o))})}n(t)},use=(t,e)=>typeof e=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(n=>t.includes(n))||t[t.length-1].toLowerCase().includes("opacity")?e:`${e}px`:e;function X1(t,e){const{prefix:r,shouldSkipGeneratingVar:n}=e||{},a={},s={},o={};return dse(t,(l,c,u)=>{if((typeof c=="string"||typeof c=="number")&&(!n||!n(l,c))){const h=`--${r?`${r}-`:""}${l.join("-")}`,p=use(l,c);Object.assign(a,{[h]:p}),AT(s,l,`var(${h})`,u),AT(o,l,`var(${h}, ${p})`,u)}},l=>l[0]==="vars"),{css:a,vars:s,varsWithDefaults:o}}function hse(t,e={}){const{getSelector:r=w,disableCssColorScheme:n,colorSchemeSelector:a}=e,{colorSchemes:s={},components:o,defaultColorScheme:l="light",...c}=t,{vars:u,css:h,varsWithDefaults:p}=X1(c,e);let m=p;const x={},{[l]:y,...b}=s;if(Object.entries(b||{}).forEach(([S,C])=>{const{vars:k,css:T,varsWithDefaults:E}=X1(C,e);m=ia(m,E),x[S]={css:T,vars:k}}),y){const{css:S,vars:C,varsWithDefaults:k}=X1(y,e);m=ia(m,k),x[l]={css:S,vars:C}}function w(S,C){let k=a;if(a==="class"&&(k=".%s"),a==="data"&&(k="[data-%s]"),a?.startsWith("data-")&&!a.includes("%s")&&(k=`[${a}="%s"]`),S){if(k==="media")return t.defaultColorScheme===S?":root":{[`@media (prefers-color-scheme: ${s[S]?.palette?.mode||S})`]:{":root":C}};if(k)return t.defaultColorScheme===S?`:root, ${k.replace("%s",String(S))}`:k.replace("%s",String(S))}return":root"}return{vars:m,generateThemeVars:()=>{let S={...u};return Object.entries(x).forEach(([,{vars:C}])=>{S=ia(S,C)}),S},generateStyleSheets:()=>{const S=[],C=t.defaultColorScheme||"light";function k(_,L){Object.keys(L).length&&S.push(typeof _=="string"?{[_]:{...L}}:_)}k(r(void 0,{...h}),h);const{[C]:T,...E}=x;if(T){const{css:_}=T,L=s[C]?.palette?.mode,P=!n&&L?{colorScheme:L,..._}:{..._};k(r(C,{...P}),P)}return Object.entries(E).forEach(([_,{css:L}])=>{const P=s[_]?.palette?.mode,R=!n&&P?{colorScheme:P,...L}:{...L};k(r(_,{...R}),R)}),S}}}function fse(t){return function(r){return t==="media"?`@media (prefers-color-scheme: ${r})`:t?t.startsWith("data-")&&!t.includes("%s")?`[${t}="${r}"] &`:t==="class"?`.${r} &`:t==="data"?`[data-${r}] &`:`${t.replace("%s",r)} &`:"&"}}function np(t,e,r=void 0){const n={};for(const a in t){const s=t[a];let o="",l=!0;for(let c=0;c<s.length;c+=1){const u=s[c];u&&(o+=(l===!0?"":" ")+e(u),l=!1,r&&r[u]&&(o+=" "+r[u]))}n[a]=o}return n}const yf={black:"#000",white:"#fff"},pse={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Vc={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},qc={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},hh={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},Gc={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Kc={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Zc={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function $L(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:yf.white,default:yf.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const mse=$L();function YL(){return{text:{primary:yf.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:yf.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const CT=YL();function kT(t,e,r,n){const a=n.light||n,s=n.dark||n*1.5;t[e]||(t.hasOwnProperty(r)?t[e]=t[r]:e==="light"?t.light=G0(t.main,a):e==="dark"&&(t.dark=q0(t.main,s)))}function gse(t="light"){return t==="dark"?{main:Gc[200],light:Gc[50],dark:Gc[400]}:{main:Gc[700],light:Gc[400],dark:Gc[800]}}function xse(t="light"){return t==="dark"?{main:Vc[200],light:Vc[50],dark:Vc[400]}:{main:Vc[500],light:Vc[300],dark:Vc[700]}}function bse(t="light"){return t==="dark"?{main:qc[500],light:qc[300],dark:qc[700]}:{main:qc[700],light:qc[400],dark:qc[800]}}function yse(t="light"){return t==="dark"?{main:Kc[400],light:Kc[300],dark:Kc[700]}:{main:Kc[700],light:Kc[500],dark:Kc[900]}}function vse(t="light"){return t==="dark"?{main:Zc[400],light:Zc[300],dark:Zc[700]}:{main:Zc[800],light:Zc[500],dark:Zc[900]}}function wse(t="light"){return t==="dark"?{main:hh[400],light:hh[300],dark:hh[700]}:{main:"#ed6c02",light:hh[500],dark:hh[900]}}function RN(t){const{mode:e="light",contrastThreshold:r=3,tonalOffset:n=.2,...a}=t,s=t.primary||gse(e),o=t.secondary||xse(e),l=t.error||bse(e),c=t.info||yse(e),u=t.success||vse(e),h=t.warning||wse(e);function p(b){return nse(b,CT.text.primary)>=r?CT.text.primary:mse.text.primary}const m=({color:b,name:w,mainShade:N=500,lightShade:A=300,darkShade:S=700})=>{if(b={...b},!b.main&&b[N]&&(b.main=b[N]),!b.hasOwnProperty("main"))throw new Error(Wl(11,w?` (${w})`:"",N));if(typeof b.main!="string")throw new Error(Wl(12,w?` (${w})`:"",JSON.stringify(b.main)));return kT(b,"light",A,n),kT(b,"dark",S,n),b.contrastText||(b.contrastText=p(b.main)),b};let x;return e==="light"?x=$L():e==="dark"&&(x=YL()),ia({common:{...yf},mode:e,primary:m({color:s,name:"primary"}),secondary:m({color:o,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:m({color:l,name:"error"}),warning:m({color:h,name:"warning"}),info:m({color:c,name:"info"}),success:m({color:u,name:"success"}),grey:pse,contrastThreshold:r,getContrastText:p,augmentColor:m,tonalOffset:n,...x},a)}function jse(t){const e={};return Object.entries(t).forEach(n=>{const[a,s]=n;typeof s=="object"&&(e[a]=`${s.fontStyle?`${s.fontStyle} `:""}${s.fontVariant?`${s.fontVariant} `:""}${s.fontWeight?`${s.fontWeight} `:""}${s.fontStretch?`${s.fontStretch} `:""}${s.fontSize||""}${s.lineHeight?`/${s.lineHeight} `:""}${s.fontFamily||""}`)}),e}function Nse(t,e){return{toolbar:{minHeight:56,[t.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[t.up("sm")]:{minHeight:64}},...e}}function Sse(t){return Math.round(t*1e5)/1e5}const DT={textTransform:"uppercase"},TT='"Roboto", "Helvetica", "Arial", sans-serif';function Ase(t,e){const{fontFamily:r=TT,fontSize:n=14,fontWeightLight:a=300,fontWeightRegular:s=400,fontWeightMedium:o=500,fontWeightBold:l=700,htmlFontSize:c=16,allVariants:u,pxToRem:h,...p}=typeof e=="function"?e(t):e,m=n/14,x=h||(w=>`${w/c*m}rem`),y=(w,N,A,S,C)=>({fontFamily:r,fontWeight:w,fontSize:x(N),lineHeight:A,...r===TT?{letterSpacing:`${Sse(S/N)}em`}:{},...C,...u}),b={h1:y(a,96,1.167,-1.5),h2:y(a,60,1.2,-.5),h3:y(s,48,1.167,0),h4:y(s,34,1.235,.25),h5:y(s,24,1.334,0),h6:y(o,20,1.6,.15),subtitle1:y(s,16,1.75,.15),subtitle2:y(o,14,1.57,.1),body1:y(s,16,1.5,.15),body2:y(s,14,1.43,.15),button:y(o,14,1.75,.4,DT),caption:y(s,12,1.66,.4),overline:y(s,12,2.66,1,DT),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return ia({htmlFontSize:c,pxToRem:x,fontFamily:r,fontSize:n,fontWeightLight:a,fontWeightRegular:s,fontWeightMedium:o,fontWeightBold:l,...b},p,{clone:!1})}const Cse=.2,kse=.14,Dse=.12;function Xt(...t){return[`${t[0]}px ${t[1]}px ${t[2]}px ${t[3]}px rgba(0,0,0,${Cse})`,`${t[4]}px ${t[5]}px ${t[6]}px ${t[7]}px rgba(0,0,0,${kse})`,`${t[8]}px ${t[9]}px ${t[10]}px ${t[11]}px rgba(0,0,0,${Dse})`].join(",")}const Tse=["none",Xt(0,2,1,-1,0,1,1,0,0,1,3,0),Xt(0,3,1,-2,0,2,2,0,0,1,5,0),Xt(0,3,3,-2,0,3,4,0,0,1,8,0),Xt(0,2,4,-1,0,4,5,0,0,1,10,0),Xt(0,3,5,-1,0,5,8,0,0,1,14,0),Xt(0,3,5,-1,0,6,10,0,0,1,18,0),Xt(0,4,5,-2,0,7,10,1,0,2,16,1),Xt(0,5,5,-3,0,8,10,1,0,3,14,2),Xt(0,5,6,-3,0,9,12,1,0,3,16,2),Xt(0,6,6,-3,0,10,14,1,0,4,18,3),Xt(0,6,7,-4,0,11,15,1,0,4,20,3),Xt(0,7,8,-4,0,12,17,2,0,5,22,4),Xt(0,7,8,-4,0,13,19,2,0,5,24,4),Xt(0,7,9,-4,0,14,21,2,0,5,26,4),Xt(0,8,9,-5,0,15,22,2,0,6,28,5),Xt(0,8,10,-5,0,16,24,2,0,6,30,5),Xt(0,8,11,-5,0,17,26,2,0,6,32,5),Xt(0,9,11,-5,0,18,28,2,0,7,34,6),Xt(0,9,12,-6,0,19,29,2,0,7,36,6),Xt(0,10,13,-6,0,20,31,3,0,8,38,7),Xt(0,10,13,-6,0,21,33,3,0,8,40,7),Xt(0,10,14,-6,0,22,35,3,0,8,42,7),Xt(0,11,14,-7,0,23,36,3,0,9,44,8),Xt(0,11,15,-7,0,24,38,3,0,9,46,8)],Mse={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Ese={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function MT(t){return`${Math.round(t)}ms`}function Ose(t){if(!t)return 0;const e=t/36;return Math.min(Math.round((4+15*e**.25+e/5)*10),3e3)}function Pse(t){const e={...Mse,...t.easing},r={...Ese,...t.duration};return{getAutoHeightDuration:Ose,create:(a=["all"],s={})=>{const{duration:o=r.standard,easing:l=e.easeInOut,delay:c=0,...u}=s;return(Array.isArray(a)?a:[a]).map(h=>`${h} ${typeof o=="string"?o:MT(o)} ${l} ${typeof c=="string"?c:MT(c)}`).join(",")},...t,easing:e,duration:r}}const _se={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Rse(t){return Ss(t)||typeof t>"u"||typeof t=="string"||typeof t=="boolean"||typeof t=="number"||Array.isArray(t)}function UL(t={}){const e={...t};function r(n){const a=Object.entries(n);for(let s=0;s<a.length;s++){const[o,l]=a[s];!Rse(l)||o.startsWith("unstable_")?delete n[o]:Ss(l)&&(n[o]={...l},r(n[o]))}}return r(e),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
const theme = ${JSON.stringify(e,null,2)};
theme.breakpoints = createBreakpoints(theme.breakpoints || {});
theme.transitions = createTransitions(theme.transitions || {});
export default theme;`}function Oj(t={},...e){const{breakpoints:r,mixins:n={},spacing:a,palette:s={},transitions:o={},typography:l={},shape:c,...u}=t;if(t.vars&&t.generateThemeVars===void 0)throw new Error(Wl(20));const h=RN(s),p=zL(t);let m=ia(p,{mixins:Nse(p.breakpoints,n),palette:h,shadows:Tse.slice(),typography:Ase(h,l),transitions:Pse(o),zIndex:{..._se}});return m=ia(m,u),m=e.reduce((x,y)=>ia(x,y),m),m.unstable_sxConfig={...rp,...u?.unstable_sxConfig},m.unstable_sx=function(y){return vd({sx:y,theme:this})},m.toRuntimeSource=UL,m}function Lse(t){let e;return t<1?e=5.11916*t**2:e=4.5*Math.log(t+1)+2,Math.round(e*10)/1e3}const zse=[...Array(25)].map((t,e)=>{if(e===0)return"none";const r=Lse(e);return`linear-gradient(rgba(255 255 255 / ${r}), rgba(255 255 255 / ${r}))`});function WL(t){return{inputPlaceholder:t==="dark"?.5:.42,inputUnderline:t==="dark"?.7:.42,switchTrackDisabled:t==="dark"?.2:.12,switchTrack:t==="dark"?.3:.38}}function XL(t){return t==="dark"?zse:[]}function Ise(t){const{palette:e={mode:"light"},opacity:r,overlays:n,...a}=t,s=RN(e);return{palette:s,opacity:{...WL(s.mode),...r},overlays:n||XL(s.mode),...a}}function Bse(t){return!!t[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!t[0].match(/sxConfig$/)||t[0]==="palette"&&!!t[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}const Fse=t=>[...[...Array(25)].map((e,r)=>`--${t?`${t}-`:""}overlays-${r}`),`--${t?`${t}-`:""}palette-AppBar-darkBg`,`--${t?`${t}-`:""}palette-AppBar-darkColor`],Hse=t=>(e,r)=>{const n=t.rootSelector||":root",a=t.colorSchemeSelector;let s=a;if(a==="class"&&(s=".%s"),a==="data"&&(s="[data-%s]"),a?.startsWith("data-")&&!a.includes("%s")&&(s=`[${a}="%s"]`),t.defaultColorScheme===e){if(e==="dark"){const o={};return Fse(t.cssVarPrefix).forEach(l=>{o[l]=r[l],delete r[l]}),s==="media"?{[n]:r,"@media (prefers-color-scheme: dark)":{[n]:o}}:s?{[s.replace("%s",e)]:o,[`${n}, ${s.replace("%s",e)}`]:r}:{[n]:{...r,...o}}}if(s&&s!=="media")return`${n}, ${s.replace("%s",String(e))}`}else if(e){if(s==="media")return{[`@media (prefers-color-scheme: ${String(e)})`]:{[n]:r}};if(s)return s.replace("%s",String(e))}return n};function $se(t,e){e.forEach(r=>{t[r]||(t[r]={})})}function he(t,e,r){!t[e]&&r&&(t[e]=r)}function Dh(t){return typeof t!="string"||!t.startsWith("hsl")?t:HL(t)}function ti(t,e){`${e}Channel`in t||(t[`${e}Channel`]=kh(Dh(t[e])))}function Yse(t){return typeof t=="number"?`${t}px`:typeof t=="string"||typeof t=="function"||Array.isArray(t)?t:"8px"}const bs=t=>{try{return t()}catch{}},Use=(t="mui")=>cse(t);function V1(t,e,r,n){if(!e)return;e=e===!0?{}:e;const a=n==="dark"?"dark":"light";if(!r){t[n]=Ise({...e,palette:{mode:a,...e?.palette}});return}const{palette:s,...o}=Oj({...r,palette:{mode:a,...e?.palette}});return t[n]={...e,palette:s,opacity:{...WL(a),...e?.opacity},overlays:e?.overlays||XL(a)},o}function Wse(t={},...e){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:a=!1,cssVarPrefix:s="mui",shouldSkipGeneratingVar:o=Bse,colorSchemeSelector:l=r.light&&r.dark?"media":void 0,rootSelector:c=":root",...u}=t,h=Object.keys(r)[0],p=n||(r.light&&h!=="light"?"light":h),m=Use(s),{[p]:x,light:y,dark:b,...w}=r,N={...w};let A=x;if((p==="dark"&&!("dark"in r)||p==="light"&&!("light"in r))&&(A=!0),!A)throw new Error(Wl(21,p));const S=V1(N,A,u,p);y&&!N.light&&V1(N,y,void 0,"light"),b&&!N.dark&&V1(N,b,void 0,"dark");let C={defaultColorScheme:p,...S,cssVarPrefix:s,colorSchemeSelector:l,rootSelector:c,getCssVar:m,colorSchemes:N,font:{...jse(S.typography),...S.font},spacing:Yse(u.spacing)};Object.keys(C.colorSchemes).forEach(L=>{const P=C.colorSchemes[L].palette,R=z=>{const B=z.split("-"),Y=B[1],X=B[2];return m(z,P[Y][X])};if(P.mode==="light"&&(he(P.common,"background","#fff"),he(P.common,"onBackground","#000")),P.mode==="dark"&&(he(P.common,"background","#000"),he(P.common,"onBackground","#fff")),$se(P,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),P.mode==="light"){he(P.Alert,"errorColor",Pt(P.error.light,.6)),he(P.Alert,"infoColor",Pt(P.info.light,.6)),he(P.Alert,"successColor",Pt(P.success.light,.6)),he(P.Alert,"warningColor",Pt(P.warning.light,.6)),he(P.Alert,"errorFilledBg",R("palette-error-main")),he(P.Alert,"infoFilledBg",R("palette-info-main")),he(P.Alert,"successFilledBg",R("palette-success-main")),he(P.Alert,"warningFilledBg",R("palette-warning-main")),he(P.Alert,"errorFilledColor",bs(()=>P.getContrastText(P.error.main))),he(P.Alert,"infoFilledColor",bs(()=>P.getContrastText(P.info.main))),he(P.Alert,"successFilledColor",bs(()=>P.getContrastText(P.success.main))),he(P.Alert,"warningFilledColor",bs(()=>P.getContrastText(P.warning.main))),he(P.Alert,"errorStandardBg",_t(P.error.light,.9)),he(P.Alert,"infoStandardBg",_t(P.info.light,.9)),he(P.Alert,"successStandardBg",_t(P.success.light,.9)),he(P.Alert,"warningStandardBg",_t(P.warning.light,.9)),he(P.Alert,"errorIconColor",R("palette-error-main")),he(P.Alert,"infoIconColor",R("palette-info-main")),he(P.Alert,"successIconColor",R("palette-success-main")),he(P.Alert,"warningIconColor",R("palette-warning-main")),he(P.AppBar,"defaultBg",R("palette-grey-100")),he(P.Avatar,"defaultBg",R("palette-grey-400")),he(P.Button,"inheritContainedBg",R("palette-grey-300")),he(P.Button,"inheritContainedHoverBg",R("palette-grey-A100")),he(P.Chip,"defaultBorder",R("palette-grey-400")),he(P.Chip,"defaultAvatarColor",R("palette-grey-700")),he(P.Chip,"defaultIconColor",R("palette-grey-700")),he(P.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),he(P.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),he(P.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),he(P.LinearProgress,"primaryBg",_t(P.primary.main,.62)),he(P.LinearProgress,"secondaryBg",_t(P.secondary.main,.62)),he(P.LinearProgress,"errorBg",_t(P.error.main,.62)),he(P.LinearProgress,"infoBg",_t(P.info.main,.62)),he(P.LinearProgress,"successBg",_t(P.success.main,.62)),he(P.LinearProgress,"warningBg",_t(P.warning.main,.62)),he(P.Skeleton,"bg",`rgba(${R("palette-text-primaryChannel")} / 0.11)`),he(P.Slider,"primaryTrack",_t(P.primary.main,.62)),he(P.Slider,"secondaryTrack",_t(P.secondary.main,.62)),he(P.Slider,"errorTrack",_t(P.error.main,.62)),he(P.Slider,"infoTrack",_t(P.info.main,.62)),he(P.Slider,"successTrack",_t(P.success.main,.62)),he(P.Slider,"warningTrack",_t(P.warning.main,.62));const z=lg(P.background.default,.8);he(P.SnackbarContent,"bg",z),he(P.SnackbarContent,"color",bs(()=>P.getContrastText(z))),he(P.SpeedDialAction,"fabHoverBg",lg(P.background.paper,.15)),he(P.StepConnector,"border",R("palette-grey-400")),he(P.StepContent,"border",R("palette-grey-400")),he(P.Switch,"defaultColor",R("palette-common-white")),he(P.Switch,"defaultDisabledColor",R("palette-grey-100")),he(P.Switch,"primaryDisabledColor",_t(P.primary.main,.62)),he(P.Switch,"secondaryDisabledColor",_t(P.secondary.main,.62)),he(P.Switch,"errorDisabledColor",_t(P.error.main,.62)),he(P.Switch,"infoDisabledColor",_t(P.info.main,.62)),he(P.Switch,"successDisabledColor",_t(P.success.main,.62)),he(P.Switch,"warningDisabledColor",_t(P.warning.main,.62)),he(P.TableCell,"border",_t(og(P.divider,1),.88)),he(P.Tooltip,"bg",og(P.grey[700],.92))}if(P.mode==="dark"){he(P.Alert,"errorColor",_t(P.error.light,.6)),he(P.Alert,"infoColor",_t(P.info.light,.6)),he(P.Alert,"successColor",_t(P.success.light,.6)),he(P.Alert,"warningColor",_t(P.warning.light,.6)),he(P.Alert,"errorFilledBg",R("palette-error-dark")),he(P.Alert,"infoFilledBg",R("palette-info-dark")),he(P.Alert,"successFilledBg",R("palette-success-dark")),he(P.Alert,"warningFilledBg",R("palette-warning-dark")),he(P.Alert,"errorFilledColor",bs(()=>P.getContrastText(P.error.dark))),he(P.Alert,"infoFilledColor",bs(()=>P.getContrastText(P.info.dark))),he(P.Alert,"successFilledColor",bs(()=>P.getContrastText(P.success.dark))),he(P.Alert,"warningFilledColor",bs(()=>P.getContrastText(P.warning.dark))),he(P.Alert,"errorStandardBg",Pt(P.error.light,.9)),he(P.Alert,"infoStandardBg",Pt(P.info.light,.9)),he(P.Alert,"successStandardBg",Pt(P.success.light,.9)),he(P.Alert,"warningStandardBg",Pt(P.warning.light,.9)),he(P.Alert,"errorIconColor",R("palette-error-main")),he(P.Alert,"infoIconColor",R("palette-info-main")),he(P.Alert,"successIconColor",R("palette-success-main")),he(P.Alert,"warningIconColor",R("palette-warning-main")),he(P.AppBar,"defaultBg",R("palette-grey-900")),he(P.AppBar,"darkBg",R("palette-background-paper")),he(P.AppBar,"darkColor",R("palette-text-primary")),he(P.Avatar,"defaultBg",R("palette-grey-600")),he(P.Button,"inheritContainedBg",R("palette-grey-800")),he(P.Button,"inheritContainedHoverBg",R("palette-grey-700")),he(P.Chip,"defaultBorder",R("palette-grey-700")),he(P.Chip,"defaultAvatarColor",R("palette-grey-300")),he(P.Chip,"defaultIconColor",R("palette-grey-300")),he(P.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),he(P.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),he(P.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),he(P.LinearProgress,"primaryBg",Pt(P.primary.main,.5)),he(P.LinearProgress,"secondaryBg",Pt(P.secondary.main,.5)),he(P.LinearProgress,"errorBg",Pt(P.error.main,.5)),he(P.LinearProgress,"infoBg",Pt(P.info.main,.5)),he(P.LinearProgress,"successBg",Pt(P.success.main,.5)),he(P.LinearProgress,"warningBg",Pt(P.warning.main,.5)),he(P.Skeleton,"bg",`rgba(${R("palette-text-primaryChannel")} / 0.13)`),he(P.Slider,"primaryTrack",Pt(P.primary.main,.5)),he(P.Slider,"secondaryTrack",Pt(P.secondary.main,.5)),he(P.Slider,"errorTrack",Pt(P.error.main,.5)),he(P.Slider,"infoTrack",Pt(P.info.main,.5)),he(P.Slider,"successTrack",Pt(P.success.main,.5)),he(P.Slider,"warningTrack",Pt(P.warning.main,.5));const z=lg(P.background.default,.98);he(P.SnackbarContent,"bg",z),he(P.SnackbarContent,"color",bs(()=>P.getContrastText(z))),he(P.SpeedDialAction,"fabHoverBg",lg(P.background.paper,.15)),he(P.StepConnector,"border",R("palette-grey-600")),he(P.StepContent,"border",R("palette-grey-600")),he(P.Switch,"defaultColor",R("palette-grey-300")),he(P.Switch,"defaultDisabledColor",R("palette-grey-600")),he(P.Switch,"primaryDisabledColor",Pt(P.primary.main,.55)),he(P.Switch,"secondaryDisabledColor",Pt(P.secondary.main,.55)),he(P.Switch,"errorDisabledColor",Pt(P.error.main,.55)),he(P.Switch,"infoDisabledColor",Pt(P.info.main,.55)),he(P.Switch,"successDisabledColor",Pt(P.success.main,.55)),he(P.Switch,"warningDisabledColor",Pt(P.warning.main,.55)),he(P.TableCell,"border",Pt(og(P.divider,1),.68)),he(P.Tooltip,"bg",og(P.grey[700],.92))}ti(P.background,"default"),ti(P.background,"paper"),ti(P.common,"background"),ti(P.common,"onBackground"),ti(P,"divider"),Object.keys(P).forEach(z=>{const B=P[z];z!=="tonalOffset"&&B&&typeof B=="object"&&(B.main&&he(P[z],"mainChannel",kh(Dh(B.main))),B.light&&he(P[z],"lightChannel",kh(Dh(B.light))),B.dark&&he(P[z],"darkChannel",kh(Dh(B.dark))),B.contrastText&&he(P[z],"contrastTextChannel",kh(Dh(B.contrastText))),z==="text"&&(ti(P[z],"primary"),ti(P[z],"secondary")),z==="action"&&(B.active&&ti(P[z],"active"),B.selected&&ti(P[z],"selected")))})}),C=e.reduce((L,P)=>ia(L,P),C);const k={prefix:s,disableCssColorScheme:a,shouldSkipGeneratingVar:o,getSelector:Hse(C)},{vars:T,generateThemeVars:E,generateStyleSheets:_}=hse(C,k);return C.vars=T,Object.entries(C.colorSchemes[C.defaultColorScheme]).forEach(([L,P])=>{C[L]=P}),C.generateThemeVars=E,C.generateStyleSheets=_,C.generateSpacing=function(){return LL(u.spacing,ON(this))},C.getColorSchemeSelector=fse(l),C.spacing=C.generateSpacing(),C.shouldSkipGeneratingVar=o,C.unstable_sxConfig={...rp,...u?.unstable_sxConfig},C.unstable_sx=function(P){return vd({sx:P,theme:this})},C.toRuntimeSource=UL,C}function ET(t,e,r){t.colorSchemes&&r&&(t.colorSchemes[e]={...r!==!0&&r,palette:RN({...r===!0?{}:r.palette,mode:e})})}function Xse(t={},...e){const{palette:r,cssVariables:n=!1,colorSchemes:a=r?void 0:{light:!0},defaultColorScheme:s=r?.mode,...o}=t,l=s||"light",c=a?.[l],u={...a,...r?{[l]:{...typeof c!="boolean"&&c,palette:r}}:void 0};if(n===!1){if(!("colorSchemes"in t))return Oj(t,...e);let h=r;"palette"in t||u[l]&&(u[l]!==!0?h=u[l].palette:l==="dark"&&(h={mode:"dark"}));const p=Oj({...t,palette:h},...e);return p.defaultColorScheme=l,p.colorSchemes=u,p.palette.mode==="light"&&(p.colorSchemes.light={...u.light!==!0&&u.light,palette:p.palette},ET(p,"dark",u.dark)),p.palette.mode==="dark"&&(p.colorSchemes.dark={...u.dark!==!0&&u.dark,palette:p.palette},ET(p,"light",u.light)),p}return!r&&!("light"in u)&&l==="light"&&(u.light=!0),Wse({...o,colorSchemes:u,defaultColorScheme:l,...typeof n!="boolean"&&n},...e)}const Vse=Xse();function qse(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const VL=t=>qse(t)&&t!=="classes",fa=qae({themeId:Ure,defaultTheme:Vse,rootShouldForwardProp:VL});function Gse(t){return typeof t.main=="string"}function Kse(t,e=[]){if(!Gse(t))return!1;for(const r of e)if(!t.hasOwnProperty(r)||typeof t[r]!="string")return!1;return!0}function qL(t=[]){return([,e])=>e&&Kse(e,t)}function Zse(){return Hae}function Qse(t){const{controlled:e,default:r}=t,{current:n}=O.useRef(e!==void 0),[a,s]=O.useState(r),o=n?e:a,l=O.useCallback(c=>{n||s(c)},[]);return[o,l]}const Jse=O.createContext(void 0);function GL(){return O.useContext(Jse)}function OT(t){try{return t.matches(":focus-visible")}catch{}return!1}function ap(t){return ose(t)}function Pj(...t){const e=O.useRef(void 0),r=O.useCallback(n=>{const a=t.map(s=>{if(s==null)return null;if(typeof s=="function"){const o=s,l=o(n);return typeof l=="function"?l:()=>{o(null)}}return s.current=n,()=>{s.current=null}});return()=>{a.forEach(s=>s?.())}},t);return O.useMemo(()=>t.every(n=>n==null)?null:n=>{e.current&&(e.current(),e.current=void 0),n!=null&&(e.current=r(n))},t)}function Gg(t){const e=O.useRef(t);return Jae(()=>{e.current=t}),O.useRef((...r)=>(0,e.current)(...r)).current}const PT={};function KL(t,e){const r=O.useRef(PT);return r.current===PT&&(r.current=t(e)),r}class Ex{static create(){return new Ex}static use(){const e=KL(Ex.create).current,[r,n]=O.useState(!1);return e.shouldMount=r,e.setShouldMount=n,O.useEffect(e.mountEffect,[r]),e}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=tie(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())};start(...e){this.mount().then(()=>this.ref.current?.start(...e))}stop(...e){this.mount().then(()=>this.ref.current?.stop(...e))}pulsate(...e){this.mount().then(()=>this.ref.current?.pulsate(...e))}}function eie(){return Ex.use()}function tie(){let t,e;const r=new Promise((n,a)=>{t=n,e=a});return r.resolve=t,r.reject=e,r}function rie(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.indexOf(n)!==-1)continue;r[n]=t[n]}return r}function _j(t,e){return _j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},_j(t,e)}function nie(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,_j(t,e)}const _T=Lr.createContext(null);function aie(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function LN(t,e){var r=function(s){return e&&O.isValidElement(s)?e(s):s},n=Object.create(null);return t&&O.Children.map(t,function(a){return a}).forEach(function(a){n[a.key]=r(a)}),n}function sie(t,e){t=t||{},e=e||{};function r(h){return h in e?e[h]:t[h]}var n=Object.create(null),a=[];for(var s in t)s in e?a.length&&(n[s]=a,a=[]):a.push(s);var o,l={};for(var c in e){if(n[c])for(o=0;o<n[c].length;o++){var u=n[c][o];l[n[c][o]]=r(u)}l[c]=r(c)}for(o=0;o<a.length;o++)l[a[o]]=r(a[o]);return l}function jl(t,e,r){return r[e]!=null?r[e]:t.props[e]}function iie(t,e){return LN(t.children,function(r){return O.cloneElement(r,{onExited:e.bind(null,r),in:!0,appear:jl(r,"appear",t),enter:jl(r,"enter",t),exit:jl(r,"exit",t)})})}function oie(t,e,r){var n=LN(t.children),a=sie(e,n);return Object.keys(a).forEach(function(s){var o=a[s];if(O.isValidElement(o)){var l=s in e,c=s in n,u=e[s],h=O.isValidElement(u)&&!u.props.in;c&&(!l||h)?a[s]=O.cloneElement(o,{onExited:r.bind(null,o),in:!0,exit:jl(o,"exit",t),enter:jl(o,"enter",t)}):!c&&l&&!h?a[s]=O.cloneElement(o,{in:!1}):c&&l&&O.isValidElement(u)&&(a[s]=O.cloneElement(o,{onExited:r.bind(null,o),in:u.props.in,exit:jl(o,"exit",t),enter:jl(o,"enter",t)}))}}),a}var lie=Object.values||function(t){return Object.keys(t).map(function(e){return t[e]})},cie={component:"div",childFactory:function(e){return e}},zN=function(t){nie(e,t);function e(n,a){var s;s=t.call(this,n,a)||this;var o=s.handleExited.bind(aie(s));return s.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},s}var r=e.prototype;return r.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},r.componentWillUnmount=function(){this.mounted=!1},e.getDerivedStateFromProps=function(a,s){var o=s.children,l=s.handleExited,c=s.firstRender;return{children:c?iie(a,l):oie(a,o,l),firstRender:!1}},r.handleExited=function(a,s){var o=LN(this.props.children);a.key in o||(a.props.onExited&&a.props.onExited(s),this.mounted&&this.setState(function(l){var c=Dx({},l.children);return delete c[a.key],{children:c}}))},r.render=function(){var a=this.props,s=a.component,o=a.childFactory,l=rie(a,["component","childFactory"]),c=this.state.contextValue,u=lie(this.state.children).map(o);return delete l.appear,delete l.enter,delete l.exit,s===null?Lr.createElement(_T.Provider,{value:c},u):Lr.createElement(_T.Provider,{value:c},Lr.createElement(s,l,u))},e}(Lr.Component);zN.propTypes={};zN.defaultProps=cie;const die=[];function uie(t){O.useEffect(t,die)}class IN{static create(){return new IN}currentId=null;start(e,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,r()},e)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear}function hie(){const t=KL(IN.create).current;return uie(t.disposeEffect),t}function fie(t){const{className:e,classes:r,pulsate:n=!1,rippleX:a,rippleY:s,rippleSize:o,in:l,onExited:c,timeout:u}=t,[h,p]=O.useState(!1),m=Ge(e,r.ripple,r.rippleVisible,n&&r.ripplePulsate),x={width:o,height:o,top:-(o/2)+s,left:-(o/2)+a},y=Ge(r.child,h&&r.childLeaving,n&&r.childPulsate);return!l&&!h&&p(!0),O.useEffect(()=>{if(!l&&c!=null){const b=setTimeout(c,u);return()=>{clearTimeout(b)}}},[c,l,u]),i.jsx("span",{className:m,style:x,children:i.jsx("span",{className:y})})}const Ma=Wd("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Rj=550,pie=80,mie=TN`
0% {
transform: scale(0);
opacity: 0.1;
}
100% {
transform: scale(1);
opacity: 0.3;
}
`,gie=TN`
0% {
opacity: 1;
}
100% {
opacity: 0;
}
`,xie=TN`
0% {
transform: scale(1);
}
50% {
transform: scale(0.92);
}
100% {
transform: scale(1);
}
`,bie=fa("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),yie=fa(fie,{name:"MuiTouchRipple",slot:"Ripple"})`
opacity: 0;
position: absolute;
&.${Ma.rippleVisible} {
opacity: 0.3;
transform: scale(1);
animation-name: ${mie};
animation-duration: ${Rj}ms;
animation-timing-function: ${({theme:t})=>t.transitions.easing.easeInOut};
}
&.${Ma.ripplePulsate} {
animation-duration: ${({theme:t})=>t.transitions.duration.shorter}ms;
}
& .${Ma.child} {
opacity: 1;
display: block;
width: 100%;
height: 100%;
border-radius: 50%;
background-color: currentColor;
}
& .${Ma.childLeaving} {
opacity: 0;
animation-name: ${gie};
animation-duration: ${Rj}ms;
animation-timing-function: ${({theme:t})=>t.transitions.easing.easeInOut};
}
& .${Ma.childPulsate} {
position: absolute;
/* @noflip */
left: 0px;
top: 0;
animation-name: ${xie};
animation-duration: 2500ms;
animation-timing-function: ${({theme:t})=>t.transitions.easing.easeInOut};
animation-iteration-count: infinite;
animation-delay: 200ms;
}
`,vie=O.forwardRef(function(e,r){const n=ap({props:e,name:"MuiTouchRipple"}),{center:a=!1,classes:s={},className:o,...l}=n,[c,u]=O.useState([]),h=O.useRef(0),p=O.useRef(null);O.useEffect(()=>{p.current&&(p.current(),p.current=null)},[c]);const m=O.useRef(!1),x=hie(),y=O.useRef(null),b=O.useRef(null),w=O.useCallback(C=>{const{pulsate:k,rippleX:T,rippleY:E,rippleSize:_,cb:L}=C;u(P=>[...P,i.jsx(yie,{classes:{ripple:Ge(s.ripple,Ma.ripple),rippleVisible:Ge(s.rippleVisible,Ma.rippleVisible),ripplePulsate:Ge(s.ripplePulsate,Ma.ripplePulsate),child:Ge(s.child,Ma.child),childLeaving:Ge(s.childLeaving,Ma.childLeaving),childPulsate:Ge(s.childPulsate,Ma.childPulsate)},timeout:Rj,pulsate:k,rippleX:T,rippleY:E,rippleSize:_},h.current)]),h.current+=1,p.current=L},[s]),N=O.useCallback((C={},k={},T=()=>{})=>{const{pulsate:E=!1,center:_=a||k.pulsate,fakeElement:L=!1}=k;if(C?.type==="mousedown"&&m.current){m.current=!1;return}C?.type==="touchstart"&&(m.current=!0);const P=L?null:b.current,R=P?P.getBoundingClientRect():{width:0,height:0,left:0,top:0};let z,B,Y;if(_||C===void 0||C.clientX===0&&C.clientY===0||!C.clientX&&!C.touches)z=Math.round(R.width/2),B=Math.round(R.height/2);else{const{clientX:X,clientY:H}=C.touches&&C.touches.length>0?C.touches[0]:C;z=Math.round(X-R.left),B=Math.round(H-R.top)}if(_)Y=Math.sqrt((2*R.width**2+R.height**2)/3),Y%2===0&&(Y+=1);else{const X=Math.max(Math.abs((P?P.clientWidth:0)-z),z)*2+2,H=Math.max(Math.abs((P?P.clientHeight:0)-B),B)*2+2;Y=Math.sqrt(X**2+H**2)}C?.touches?y.current===null&&(y.current=()=>{w({pulsate:E,rippleX:z,rippleY:B,rippleSize:Y,cb:T})},x.start(pie,()=>{y.current&&(y.current(),y.current=null)})):w({pulsate:E,rippleX:z,rippleY:B,rippleSize:Y,cb:T})},[a,w,x]),A=O.useCallback(()=>{N({},{pulsate:!0})},[N]),S=O.useCallback((C,k)=>{if(x.clear(),C?.type==="touchend"&&y.current){y.current(),y.current=null,x.start(0,()=>{S(C,k)});return}y.current=null,u(T=>T.length>0?T.slice(1):T),p.current=k},[x]);return O.useImperativeHandle(r,()=>({pulsate:A,start:N,stop:S}),[A,N,S]),i.jsx(bie,{className:Ge(Ma.root,s.root,o),ref:b,...l,children:i.jsx(zN,{component:null,exit:!0,children:c})})});function wie(t){return Ud("MuiButtonBase",t)}const jie=Wd("MuiButtonBase",["root","disabled","focusVisible"]),Nie=t=>{const{disabled:e,focusVisible:r,focusVisibleClassName:n,classes:a}=t,o=np({root:["root",e&&"disabled",r&&"focusVisible"]},wie,a);return r&&n&&(o.root+=` ${n}`),o},Sie=fa("button",{name:"MuiButtonBase",slot:"Root"})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${jie.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Aie=O.forwardRef(function(e,r){const n=ap({props:e,name:"MuiButtonBase"}),{action:a,centerRipple:s=!1,children:o,className:l,component:c="button",disabled:u=!1,disableRipple:h=!1,disableTouchRipple:p=!1,focusRipple:m=!1,focusVisibleClassName:x,LinkComponent:y="a",onBlur:b,onClick:w,onContextMenu:N,onDragLeave:A,onFocus:S,onFocusVisible:C,onKeyDown:k,onKeyUp:T,onMouseDown:E,onMouseLeave:_,onMouseUp:L,onTouchEnd:P,onTouchMove:R,onTouchStart:z,tabIndex:B=0,TouchRippleProps:Y,touchRippleRef:X,type:H,...W}=n,V=O.useRef(null),Z=eie(),F=Pj(Z.ref,X),[G,te]=O.useState(!1);u&&G&&te(!1),O.useImperativeHandle(a,()=>({focusVisible:()=>{te(!0),V.current.focus()}}),[]);const K=Z.shouldMount&&!h&&!u;O.useEffect(()=>{G&&m&&!h&&Z.pulsate()},[h,m,G,Z]);const U=ri(Z,"start",E,p),re=ri(Z,"stop",N,p),ae=ri(Z,"stop",A,p),we=ri(Z,"stop",L,p),ye=ri(Z,"stop",Xe=>{G&&Xe.preventDefault(),_&&_(Xe)},p),ue=ri(Z,"start",z,p),je=ri(Z,"stop",P,p),Ce=ri(Z,"stop",R,p),pe=ri(Z,"stop",Xe=>{OT(Xe.target)||te(!1),b&&b(Xe)},!1),Ye=Gg(Xe=>{V.current||(V.current=Xe.currentTarget),OT(Xe.target)&&(te(!0),C&&C(Xe)),S&&S(Xe)}),Re=()=>{const Xe=V.current;return c&&c!=="button"&&!(Xe.tagName==="A"&&Xe.href)},gt=Gg(Xe=>{m&&!Xe.repeat&&G&&Xe.key===" "&&Z.stop(Xe,()=>{Z.start(Xe)}),Xe.target===Xe.currentTarget&&Re()&&Xe.key===" "&&Xe.preventDefault(),k&&k(Xe),Xe.target===Xe.currentTarget&&Re()&&Xe.key==="Enter"&&!u&&(Xe.preventDefault(),w&&w(Xe))}),Ut=Gg(Xe=>{m&&Xe.key===" "&&G&&!Xe.defaultPrevented&&Z.stop(Xe,()=>{Z.pulsate(Xe)}),T&&T(Xe),w&&Xe.target===Xe.currentTarget&&Re()&&Xe.key===" "&&!Xe.defaultPrevented&&w(Xe)});let xt=c;xt==="button"&&(W.href||W.to)&&(xt=y);const vn={};xt==="button"?(vn.type=H===void 0?"button":H,vn.disabled=u):(!W.href&&!W.to&&(vn.role="button"),u&&(vn["aria-disabled"]=u));const pa=Pj(r,V),Ft={...n,centerRipple:s,component:c,disabled:u,disableRipple:h,disableTouchRipple:p,focusRipple:m,tabIndex:B,focusVisible:G},Hn=Nie(Ft);return i.jsxs(Sie,{as:xt,className:Ge(Hn.root,l),ownerState:Ft,onBlur:pe,onClick:w,onContextMenu:re,onFocus:Ye,onKeyDown:gt,onKeyUp:Ut,onMouseDown:U,onMouseLeave:ye,onMouseUp:we,onDragLeave:ae,onTouchEnd:je,onTouchMove:Ce,onTouchStart:ue,ref:pa,tabIndex:u?-1:B,type:H,...vn,...W,children:[o,K?i.jsx(vie,{ref:F,center:s,...Y}):null]})});function ri(t,e,r,n=!1){return Gg(a=>(r&&r(a),n||t[e](a),!0))}function Cie(t){return Ud("PrivateSwitchBase",t)}Wd("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);function kie(t){return typeof t=="string"}function Die(t,e,r){return t===void 0||kie(t)?e:{...e,ownerState:{...e.ownerState,...r}}}function Tie(t,e,r){return typeof t=="function"?t(e,r):t}function Mie(t,e=[]){if(t===void 0)return{};const r={};return Object.keys(t).filter(n=>n.match(/^on[A-Z]/)&&typeof t[n]=="function"&&!e.includes(n)).forEach(n=>{r[n]=t[n]}),r}function RT(t){if(t===void 0)return{};const e={};return Object.keys(t).filter(r=>!(r.match(/^on[A-Z]/)&&typeof t[r]=="function")).forEach(r=>{e[r]=t[r]}),e}function Eie(t){const{getSlotProps:e,additionalProps:r,externalSlotProps:n,externalForwardedProps:a,className:s}=t;if(!e){const x=Ge(r?.className,s,a?.className,n?.className),y={...r?.style,...a?.style,...n?.style},b={...r,...a,...n};return x.length>0&&(b.className=x),Object.keys(y).length>0&&(b.style=y),{props:b,internalRef:void 0}}const o=Mie({...a,...n}),l=RT(n),c=RT(a),u=e(o),h=Ge(u?.className,r?.className,s,a?.className,n?.className),p={...u?.style,...r?.style,...a?.style,...n?.style},m={...u,...r,...c,...l};return h.length>0&&(m.className=h),Object.keys(p).length>0&&(m.style=p),{props:m,internalRef:u.ref}}function ud(t,e){const{className:r,elementType:n,ownerState:a,externalForwardedProps:s,internalForwardedProps:o,shouldForwardComponentProp:l=!1,...c}=e,{component:u,slots:h={[t]:void 0},slotProps:p={[t]:void 0},...m}=s,x=h[t]||n,y=Tie(p[t],a),{props:{component:b,...w},internalRef:N}=Eie({className:r,...c,externalForwardedProps:t==="root"?m:void 0,externalSlotProps:y}),A=Pj(N,y?.ref,e.ref),S=t==="root"?b||u:b,C=Die(x,{...t==="root"&&!u&&!h[t]&&o,...t!=="root"&&!h[t]&&o,...w,...S&&!l&&{as:S},...S&&l&&{component:S},ref:A},a);return[x,C]}const Oie=t=>{const{classes:e,checked:r,disabled:n,edge:a}=t,s={root:["root",r&&"checked",n&&"disabled",a&&`edge${zn(a)}`],input:["input"]};return np(s,Cie,e)},Pie=fa(Aie,{name:"MuiSwitchBase"})({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:t,ownerState:e})=>t==="start"&&e.size!=="small",style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:t,ownerState:e})=>t==="end"&&e.size!=="small",style:{marginRight:-12}}]}),_ie=fa("input",{name:"MuiSwitchBase",shouldForwardProp:VL})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),Rie=O.forwardRef(function(e,r){const{autoFocus:n,checked:a,checkedIcon:s,defaultChecked:o,disabled:l,disableFocusRipple:c=!1,edge:u=!1,icon:h,id:p,inputProps:m,inputRef:x,name:y,onBlur:b,onChange:w,onFocus:N,readOnly:A,required:S=!1,tabIndex:C,type:k,value:T,slots:E={},slotProps:_={},...L}=e,[P,R]=Qse({controlled:a,default:!!o}),z=GL(),B=re=>{N&&N(re),z&&z.onFocus&&z.onFocus(re)},Y=re=>{b&&b(re),z&&z.onBlur&&z.onBlur(re)},X=re=>{if(re.nativeEvent.defaultPrevented)return;const ae=re.target.checked;R(ae),w&&w(re,ae)};let H=l;z&&typeof H>"u"&&(H=z.disabled);const W=k==="checkbox"||k==="radio",V={...e,checked:P,disabled:H,disableFocusRipple:c,edge:u},Z=Oie(V),F={slots:E,slotProps:{input:m,..._}},[G,te]=ud("root",{ref:r,elementType:Pie,className:Z.root,shouldForwardComponentProp:!0,externalForwardedProps:{...F,component:"span",...L},getSlotProps:re=>({...re,onFocus:ae=>{re.onFocus?.(ae),B(ae)},onBlur:ae=>{re.onBlur?.(ae),Y(ae)}}),ownerState:V,additionalProps:{centerRipple:!0,focusRipple:!c,disabled:H,role:void 0,tabIndex:null}}),[K,U]=ud("input",{ref:x,elementType:_ie,className:Z.input,externalForwardedProps:F,getSlotProps:re=>({...re,onChange:ae=>{re.onChange?.(ae),X(ae)}}),ownerState:V,additionalProps:{autoFocus:n,checked:a,defaultChecked:o,disabled:H,id:W?p:void 0,name:y,readOnly:A,required:S,tabIndex:C,type:k,...k==="checkbox"&&T===void 0?{}:{value:T}}});return i.jsxs(G,{...te,children:[i.jsx(K,{...U}),P?s:h]})}),Xl=lse;function Lie(t){return Ud("MuiSwitch",t)}const hn=Wd("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),zie=t=>{const{classes:e,edge:r,size:n,color:a,checked:s,disabled:o}=t,l={root:["root",r&&`edge${zn(r)}`,`size${zn(n)}`],switchBase:["switchBase",`color${zn(a)}`,s&&"checked",o&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},c=np(l,Lie,e);return{...e,...c}},Iie=fa("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.edge&&e[`edge${zn(r.edge)}`],e[`size${zn(r.size)}`]]}})({display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${hn.thumb}`]:{width:16,height:16},[`& .${hn.switchBase}`]:{padding:4,[`&.${hn.checked}`]:{transform:"translateX(16px)"}}}}]}),Bie=fa(Rie,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.switchBase,{[`& .${hn.input}`]:e.input},r.color!=="default"&&e[`color${zn(r.color)}`]]}})(Xl(({theme:t})=>({position:"absolute",top:0,left:0,zIndex:1,color:t.vars?t.vars.palette.Switch.defaultColor:`${t.palette.mode==="light"?t.palette.common.white:t.palette.grey[300]}`,transition:t.transitions.create(["left","transform"],{duration:t.transitions.duration.shortest}),[`&.${hn.checked}`]:{transform:"translateX(20px)"},[`&.${hn.disabled}`]:{color:t.vars?t.vars.palette.Switch.defaultDisabledColor:`${t.palette.mode==="light"?t.palette.grey[100]:t.palette.grey[600]}`},[`&.${hn.checked} + .${hn.track}`]:{opacity:.5},[`&.${hn.disabled} + .${hn.track}`]:{opacity:t.vars?t.vars.opacity.switchTrackDisabled:`${t.palette.mode==="light"?.12:.2}`},[`& .${hn.input}`]:{left:"-100%",width:"300%"}})),Xl(({theme:t})=>({"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:Ej(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(t.palette).filter(qL(["light"])).map(([e])=>({props:{color:e},style:{[`&.${hn.checked}`]:{color:(t.vars||t).palette[e].main,"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette[e].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Ej(t.palette[e].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${hn.disabled}`]:{color:t.vars?t.vars.palette.Switch[`${e}DisabledColor`]:`${t.palette.mode==="light"?G0(t.palette[e].main,.62):q0(t.palette[e].main,.55)}`}},[`&.${hn.checked} + .${hn.track}`]:{backgroundColor:(t.vars||t).palette[e].main}}}))]}))),Fie=fa("span",{name:"MuiSwitch",slot:"Track"})(Xl(({theme:t})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:t.transitions.create(["opacity","background-color"],{duration:t.transitions.duration.shortest}),backgroundColor:t.vars?t.vars.palette.common.onBackground:`${t.palette.mode==="light"?t.palette.common.black:t.palette.common.white}`,opacity:t.vars?t.vars.opacity.switchTrack:`${t.palette.mode==="light"?.38:.3}`}))),Hie=fa("span",{name:"MuiSwitch",slot:"Thumb"})(Xl(({theme:t})=>({boxShadow:(t.vars||t).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}))),$ie=O.forwardRef(function(e,r){const n=ap({props:e,name:"MuiSwitch"}),{className:a,color:s="primary",edge:o=!1,size:l="medium",sx:c,slots:u={},slotProps:h={},...p}=n,m={...n,color:s,edge:o,size:l},x=zie(m),y={slots:u,slotProps:h},[b,w]=ud("root",{className:Ge(x.root,a),elementType:Iie,externalForwardedProps:y,ownerState:m,additionalProps:{sx:c}}),[N,A]=ud("thumb",{className:x.thumb,elementType:Hie,externalForwardedProps:y,ownerState:m}),S=i.jsx(N,{...A}),[C,k]=ud("track",{className:x.track,elementType:Fie,externalForwardedProps:y,ownerState:m});return i.jsxs(b,{...w,children:[i.jsx(Bie,{type:"checkbox",icon:S,checkedIcon:S,ref:r,ownerState:m,...p,classes:{...x,root:x.switchBase},slots:{...u.switchBase&&{root:u.switchBase},...u.input&&{input:u.input}},slotProps:{...h.switchBase&&{root:typeof h.switchBase=="function"?h.switchBase(m):h.switchBase},...h.input&&{input:typeof h.input=="function"?h.input(m):h.input}}}),i.jsx(C,{...k})]})});function Yie(t){return Ud("MuiTypography",t)}Wd("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Uie={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},Wie=Zse(),Xie=t=>{const{align:e,gutterBottom:r,noWrap:n,paragraph:a,variant:s,classes:o}=t,l={root:["root",s,t.align!=="inherit"&&`align${zn(e)}`,r&&"gutterBottom",n&&"noWrap",a&&"paragraph"]};return np(l,Yie,o)},Vie=fa("span",{name:"MuiTypography",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.variant&&e[r.variant],r.align!=="inherit"&&e[`align${zn(r.align)}`],r.noWrap&&e.noWrap,r.gutterBottom&&e.gutterBottom,r.paragraph&&e.paragraph]}})(Xl(({theme:t})=>({margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(t.typography).filter(([e,r])=>e!=="inherit"&&r&&typeof r=="object").map(([e,r])=>({props:{variant:e},style:r})),...Object.entries(t.palette).filter(qL()).map(([e])=>({props:{color:e},style:{color:(t.vars||t).palette[e].main}})),...Object.entries(t.palette?.text||{}).filter(([,e])=>typeof e=="string").map(([e])=>({props:{color:`text${zn(e)}`},style:{color:(t.vars||t).palette.text[e]}})),{props:({ownerState:e})=>e.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:e})=>e.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:e})=>e.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:e})=>e.paragraph,style:{marginBottom:16}}]}))),LT={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},zT=O.forwardRef(function(e,r){const{color:n,...a}=ap({props:e,name:"MuiTypography"}),s=!Uie[n],o=Wie({...a,...s&&{color:n}}),{align:l="inherit",className:c,component:u,gutterBottom:h=!1,noWrap:p=!1,paragraph:m=!1,variant:x="body1",variantMapping:y=LT,...b}=o,w={...o,align:l,color:n,className:c,component:u,gutterBottom:h,noWrap:p,paragraph:m,variant:x,variantMapping:y},N=u||(m?"p":y[x]||LT[x])||"span",A=Xie(w);return i.jsx(Vie,{as:N,ref:r,className:Ge(A.root,c),...b,ownerState:w,style:{...l!=="inherit"&&{"--Typography-textAlign":l},...b.style}})});function qie({props:t,states:e,muiFormControl:r}){return e.reduce((n,a)=>(n[a]=t[a],r&&typeof t[a]>"u"&&(n[a]=r[a]),n),{})}function Gie(t){return Ud("MuiFormControlLabel",t)}const Th=Wd("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),Kie=t=>{const{classes:e,disabled:r,labelPlacement:n,error:a,required:s}=t,o={root:["root",r&&"disabled",`labelPlacement${zn(n)}`,a&&"error",s&&"required"],label:["label",r&&"disabled"],asterisk:["asterisk",a&&"error"]};return np(o,Gie,e)},Zie=fa("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[{[`& .${Th.label}`]:e.label},e.root,e[`labelPlacement${zn(r.labelPlacement)}`]]}})(Xl(({theme:t})=>({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${Th.disabled}`]:{cursor:"default"},[`& .${Th.label}`]:{[`&.${Th.disabled}`]:{color:(t.vars||t).palette.text.disabled}},variants:[{props:{labelPlacement:"start"},style:{flexDirection:"row-reverse",marginRight:-11}},{props:{labelPlacement:"top"},style:{flexDirection:"column-reverse"}},{props:{labelPlacement:"bottom"},style:{flexDirection:"column"}},{props:({labelPlacement:e})=>e==="start"||e==="top"||e==="bottom",style:{marginLeft:16}}]}))),Qie=fa("span",{name:"MuiFormControlLabel",slot:"Asterisk"})(Xl(({theme:t})=>({[`&.${Th.error}`]:{color:(t.vars||t).palette.error.main}}))),IT=O.forwardRef(function(e,r){const n=ap({props:e,name:"MuiFormControlLabel"}),{checked:a,className:s,componentsProps:o={},control:l,disabled:c,disableTypography:u,inputRef:h,label:p,labelPlacement:m="end",name:x,onChange:y,required:b,slots:w={},slotProps:N={},value:A,...S}=n,C=GL(),k=c??l.props.disabled??C?.disabled,T=b??l.props.required,E={disabled:k,required:T};["checked","name","onChange","value","inputRef"].forEach(X=>{typeof l.props[X]>"u"&&typeof n[X]<"u"&&(E[X]=n[X])});const _=qie({props:n,muiFormControl:C,states:["error"]}),L={...n,disabled:k,labelPlacement:m,required:T,error:_.error},P=Kie(L),R={slots:w,slotProps:{...o,...N}},[z,B]=ud("typography",{elementType:zT,externalForwardedProps:R,ownerState:L});let Y=p;return Y!=null&&Y.type!==zT&&!u&&(Y=i.jsx(z,{component:"span",...B,className:Ge(P.label,B?.className),children:Y})),i.jsxs(Zie,{className:Ge(P.root,s),ownerState:L,ref:r,...S,children:[O.cloneElement(l,E),T?i.jsxs("div",{children:[Y,i.jsxs(Qie,{ownerState:L,"aria-hidden":!0,className:P.asterisk,children:[" ","*"]})]}):Y]})}),BT=fa($ie)(({theme:t})=>({width:44,height:24,padding:0,display:"flex","&:active .MuiSwitch-thumb":{width:18},"& .MuiSwitch-switchBase":{padding:3,"&.Mui-checked":{transform:"translateX(20px)",color:"#FFD700","& + .MuiSwitch-track":{backgroundColor:"green",opacity:1}}},"& .MuiSwitch-thumb":{backgroundColor:"#FFD700",width:18,height:18,borderRadius:"50%",transition:t.transitions.create(["width"],{duration:200})},"& .MuiSwitch-track":{borderRadius:24,opacity:1,backgroundColor:"#777",boxSizing:"border-box"}})),Jie=()=>{const t=[{username:"Asad Raza",status:"Frozen",triggerReason:"4 Cancels in 24h",reverifyneeded:"yes"},{username:"Asad Raza",status:"Frozen",triggerReason:"4 Cancels in 24h",reverifyneeded:"no"}];return i.jsxs("div",{className:"flex min-h-screen",children:[i.jsx(Ue,{}),i.jsxs("div",{className:"flex-1 overflow-hidden",children:[i.jsx(rc,{}),i.jsx("div",{className:"flex justify-end items-center pt-6 w-2/3",children:i.jsx("span",{className:"underline text-yellow-400 cursor-pointer",children:"Edit"})}),i.jsx("div",{className:"w-full max-w-7xl flex justify-center px-6 mb-8 relative",children:i.jsx("div",{className:"border border-yellow-500 rounded-xl w-full max-w-3xl p-6 mb-8 ",children:i.jsxs("div",{className:"",children:[i.jsx("span",{children:i.jsx("strong",{children:"Cancellation Abuse :"})}),i.jsxs("div",{className:"flex justify-between ",children:[i.jsxs("label",{className:"flex items-center gap-4 py-6",children:[i.jsx("input",{type:"checkbox",defaultChecked:!0,className:"accent-yellow-400",name:"cancelAbuse"}),"Freeze if cancels >3 in 24 hrs"]}),i.jsx(IT,{control:i.jsx(BT,{}),label:"On",className:"text-yellow-400"})]}),i.jsx("span",{className:"py-6",children:i.jsx("strong",{className:"py-6",children:"Suspicious Top-ups :"})}),i.jsxs("div",{className:"flex justify-between",children:[i.jsxs("label",{className:"flex items-center gap-4 py-6",children:[i.jsx("input",{type:"checkbox",defaultChecked:!0,className:"accent-yellow-400",name:"cancelAbuse"}),"Freeze if same card used 3+ times in 1 day"]}),i.jsx(IT,{control:i.jsx(BT,{}),label:"On",className:"text-yellow-400"})]})]})})}),i.jsxs("div",{className:"mb-2 font-bold self-start flex justify-between gap-12",children:[i.jsx("h2",{className:"px-4 text-xl",children:" Auto-Frozen Accounts Table:"}),i.jsxs("div",{className:"flex gap-2 items-center mr-4",children:[i.jsxs("span",{className:"float-right text-sm font-normal",children:["Sort By:",i.jsx("select",{name:"",id:"",className:"bg-[#013220] focus:outline-none bg-transparent",children:i.jsx("option",{value:"",children:" Reverification Needed Only Date"})})]}),i.jsx(Y4,{}),i.jsx("span",{children:"Date"})]})]}),i.jsx("div",{className:"overflow-x-auto w-full max-w-5xl mx-auto",children:i.jsxs("table",{className:"min-w-full border border-yellow-400 rounded text-left",children:[i.jsx("thead",{className:" text-yellow-300",children:i.jsxs("tr",{className:"border-b border-yellow-300 text-left",children:[i.jsx("th",{className:"p-3",children:"User Name"}),i.jsx("th",{className:"p-3",children:"Status"}),i.jsx("th",{className:"p-3",children:"Trigger Reason"}),i.jsx("th",{className:"p-3",children:"Reverify Needed"}),i.jsx("th",{className:"p-3",children:"Action"})]})}),i.jsx("tbody",{children:t.map((e,r)=>i.jsxs("tr",{className:"",children:[i.jsx("td",{className:"p-3",children:e.username}),i.jsx("td",{className:"p-3",children:e.status}),i.jsx("td",{className:"p-3",children:r%2===0?"4 Cancels in 24h":"Reused Card ID across 2 accts"}),i.jsx("td",{className:"p-3",children:e.reverifyneeded}),i.jsx("td",{className:"p-3",children:i.jsx("button",{className:"bg-yellow-400 text-black px-4 py-1 rounded font-semibold hover:bg-yellow-300",onClick:()=>console.log(`Unlock clicked for row ${r+1}`),children:"Unlock"})})]},r))})]})})]})]})},FT=[{type:"Top-up",Userid:"CUST-7861",amount:"AED 1,000",timestamp:`29 July, 09:15
AM`,notes:`JazzCash via
app`,tags:"Bonus"},{type:"Top-up",Userid:"CUST-7861",amount:"AED 1,000",timestamp:`29 July, 09:15
AM`,notes:`JazzCash via
app`,tags:"Bonus"}],eoe=()=>{const[t,e]=O.useState(1),r=8,n=Math.ceil(FT.length/r),a=FT.slice((t-1)*r,t*r);return i.jsxs("div",{className:"flex min-h-screen",children:[i.jsx(Ue,{}),i.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[i.jsx(rc,{}),i.jsx("div",{className:"min-h-screen px-8 py-10 font-sans",children:i.jsxs("div",{className:"max-w-6xl mx-auto space-y-6",children:[i.jsxs("div",{className:"flex justify-between items-center mb-6 flex-wrap gap-4",children:[i.jsx("p",{className:"font-semibold text-lg",children:"Main Table Layout:"}),i.jsxs("div",{className:"flex gap-4 items-center flex-wrap",children:[i.jsxs("label",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"text-sm font-medium",children:"Amount Range"}),i.jsx("input",{type:"number",className:"w-20 px-2 border bg-transparent border-yellow-300 rounded focus:outline-none focus:ring-1 focus:ring-yellow-400"})]}),i.jsxs("label",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"text-sm font-medium",children:"To"}),i.jsx("input",{type:"number",className:"w-20 px-2 bg-transparent border border-yellow-300 rounded focus:outline-none focus:ring-1 focus:ring-yellow-400"})]}),i.jsxs("label",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"text-sm font-medium",children:"Date"}),i.jsx("input",{type:"date",className:"px-2 bg-transparent border border-yellow-300 rounded focus:outline-none focus:ring-1 focus:ring-yellow-400"})]})]})]}),i.jsx("div",{className:"overflow-x-auto rounded border border-yellow-400",children:i.jsxs("table",{className:"min-w-full text-left",children:[i.jsx("thead",{className:"",children:i.jsxs("tr",{children:[i.jsx("th",{className:"py-2 px-4 border-b border-yellow-400",children:"Type"}),i.jsx("th",{className:"py-2 px-4 border-b border-yellow-400",children:"User ID"}),i.jsx("th",{className:"py-2 px-4 border-b border-yellow-400",children:"Amount"}),i.jsx("th",{className:"py-2 px-4 border-b border-yellow-400",children:"Timestamp"}),i.jsx("th",{className:"py-2 px-4 border-b border-yellow-400",children:"Notes"}),i.jsx("th",{className:"py-2 px-4 border-b border-yellow-400",children:"Tags"}),i.jsx("th",{className:"py-2 px-4 border-b border-yellow-400",children:"Action"})]})}),i.jsx("tbody",{children:a.map((s,o)=>i.jsxs("tr",{children:[i.jsx("td",{className:"py-2 px-4 border-b border-yellow-400",children:s.type}),i.jsx("td",{className:"py-2 px-4 border-b border-yellow-400",children:s.Userid}),i.jsx("td",{className:"py-2 px-4 border-b border-yellow-400",children:s.amount}),i.jsx("td",{className:"py-2 px-4 border-b border-yellow-400 whitespace-pre-line",children:s.timestamp}),i.jsx("td",{className:"py-2 px-4 border-b border-yellow-400 whitespace-pre-line",children:s.notes}),i.jsx("td",{className:"py-2 px-4 border-b border-yellow-400",children:s.tags}),i.jsx("td",{className:"py-2 px-4 border-b border-yellow-400",children:i.jsx("button",{className:"bg-yellow-300 px-6 py-1 rounded-full text-black hover:bg-yellow-200",children:"Note"})})]},o))})]})}),i.jsxs("div",{className:"flex justify-center items-center mt-4 gap-2 text-yellow-300",children:[i.jsx("button",{onClick:()=>e(s=>Math.max(s-1,1)),className:"hover:underline disabled:opacity-50",disabled:t===1,children:"Previous"}),Array.from({length:n}).map((s,o)=>i.jsx("button",{onClick:()=>e(o+1),className:`w-8 h-8 rounded-full border border-yellow-400 text-center text-sm font-semibold ${t===o+1?"bg-yellow-400 text-black":""}`,children:o+1},o)),i.jsx("button",{onClick:()=>e(s=>Math.min(s+1,n)),className:"hover:underline disabled:opacity-50",disabled:t===n,children:"Next"})]})]})})]})]})},toe=()=>{const[t,e]=O.useState("general"),n={general:[{id:1,message:"Suspicious Cross-Account Activity(Shared Card ID)",detail:"General: Lorem Ipsum Dolor Sit Amet Consectetur. Augue Dolor Proin Nulla Eu Mi Tincidunt.",time:"Just Now"}],booking:[{id:2,message:"Suspicious Cross-Account Activity(Shared Card ID)",detail:"Booking: Your appointment has been confirmed for tomorrow at 10AM.",time:"5 min ago"}],important:[{id:3,message:"Suspicious Cross-Account Activity(Shared Card ID)",detail:"Important: Please review the new wallet freezing policy effective next week.",time:"2 hrs ago"}]}[t];return i.jsxs("div",{className:"flex bg-[#13220] min-h-screen",children:[i.jsx(Ue,{}),i.jsxs("div",{className:"flex-1 overflow-hidden",children:[i.jsx(rc,{}),i.jsx("div",{className:"py-10",children:i.jsxs("h1",{className:"flex gap-2 items-center text-xl font-semibold pb-1 px-4",children:[i.jsx(aq,{})," ",n.length," Notifications"]})}),i.jsx("div",{className:"mb-6 px-4",children:i.jsxs("div",{className:"flex gap-8 text-sm font-semibold items-center border-b border-yellow-300 pb-2",children:[i.jsx("button",{onClick:()=>e("general"),className:`${t==="general"?"bg-yellow-400 text-black px-4 py-1 rounded":"hover:text-yellow-200"}`,children:"Critical"}),i.jsx("button",{onClick:()=>e("booking"),className:`${t==="booking"?"bg-yellow-400 text-black px-4 py-1 rounded":"hover:text-yellow-200"}`,children:"Warning"}),i.jsx("button",{onClick:()=>e("important"),className:`${t==="important"?"bg-yellow-400 text-black px-4 py-1 rounded":"hover:text-yellow-200"}`,children:"Info"})]})}),i.jsx("div",{className:"flex flex-col gap-4 px-6",children:n.length===0?i.jsx("div",{className:"text-sm text-center py-10",children:"No notifications found."}):n.map(a=>i.jsxs("div",{className:"bg-[#0A3A26] border border-[#3A4F3A] p-4 rounded-xl flex justify-between items-start",children:[i.jsxs("div",{className:"flex gap-4",children:[i.jsx("div",{className:"rounded-full border self-start p-1 border-yellow-400 ",children:i.jsx(Dq,{size:30})}),i.jsxs("div",{className:"max-w-full",children:[i.jsx("p",{className:"font-semibold text-sm mb-1",children:a.message}),i.jsx("p",{className:"text-xs",children:a.detail}),i.jsxs("div",{className:"flex items-center text-xs mt-1",children:[i.jsx(b_,{className:"mr-1"}),a.time]})]})]}),i.jsx("button",{className:"text-yellow-400 relative text-sm whitespace-nowrap hover:underline",children:"Investigate"})]},a.id))})]})]})},cg=({title:t,amount:e,claimed:r,unclaimed:n})=>{const s=Math.round(r/100*10),o=10-s;return i.jsxs("div",{className:`w-full max-w-2xl mx-auto rounded-2xl border-2 border-green-300 p-6 bg-gradient-to-br from-[#003e27] to-[#004d2c]
text-yellow-400 shadow-md`,children:[i.jsx("h2",{className:"text-2xl font-bold mb-2",children:t}),i.jsxs("div",{className:"flex justify-between",children:[i.jsxs("p",{className:"text-lg font-semibold mb-4",children:["Amount: AED ",e.toLocaleString()]}),i.jsxs("div",{className:"flex flex-col text-medium mr-20",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"w-3 h-3 bg-green-400 rounded-full"}),i.jsx("span",{children:"Claimed"})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"w-3 h-3 bg-yellow-400 rounded-full"}),i.jsx("span",{children:"Unclaimed"})]})]})]}),i.jsxs("div",{className:"space-y-1 font-semibold",children:[i.jsx("p",{className:"font-bold text-lg",children:"Status:"}),i.jsxs("div",{className:"flex justify-between text-medium mr-20",children:[i.jsxs("div",{children:[i.jsxs("p",{className:"text-green-400",children:[r,"% Claimed"]}),i.jsxs("p",{className:"text-yellow-400",children:[n,"% Unclaimed"]})]}),i.jsxs("div",{className:"mt-4",children:[i.jsx("p",{className:"text-sm font-semibold mb-1",children:"Progress Bar"}),i.jsxs("div",{className:"flex gap-1",children:[[...Array(s)].map((l,c)=>i.jsx("div",{className:"w-2 h-5 bg-green-400 rounded-sm"},`c-${c}`)),[...Array(o)].map((l,c)=>i.jsx("div",{className:"w-2 h-5 bg-yellow-400 rounded-sm"},`u-${c}`))]})]})]})]})]})},roe=()=>i.jsxs("div",{className:" min-h-screen py-10 space-y-10 px-4",children:[i.jsx("div",{className:"flex justify-end pr-8",children:i.jsxs("label",{className:"flex items-center text-yellow-400 font-medium",children:[i.jsx("span",{children:"Time:"}),i.jsxs("select",{className:"bg-transparent rounded focus:outline-none",children:[i.jsx("option",{children:"7 days"}),i.jsx("option",{children:"30 days"})]})]})}),i.jsx(cg,{title:"CRR Pool",amount:45e3,claimed:60,unclaimed:40}),i.jsx(cg,{title:"BBR Pool",amount:32750,claimed:75,unclaimed:25}),i.jsx(cg,{title:"Referral Pool",amount:32750,claimed:75,unclaimed:25}),i.jsx(cg,{title:"Loyalty Pool",amount:32750,claimed:30,unclaimed:75}),i.jsx("button",{className:"font-semibold block mx-auto bg-yellow-400 px-4 py-2 text-black rounded-full",children:"Explore Summary"})]}),noe=()=>{const t=[{date:'29 Jul "25"',admin:"Admin_01",from:"CRR",to:"Loyalty",amount:"AED 5,000",reason:`Balance shift for
rewards`},{date:'29 Jul "25"',admin:"Admin_02",from:"Loyalty",to:"CRR",amount:"AED 3,000",reason:`Manual adjustment
on error`}];return i.jsxs("div",{className:"overflow-x-auto max-w-6xl mx-auto mt-8 ",children:[i.jsxs("div",{className:"flex flex-wrap justify-between items-center mb-4",children:[i.jsx("h2",{className:"text-xl font-semibold text-yellow-400",children:"Transfer History:"}),i.jsxs("div",{className:"flex items-center",children:[i.jsx("span",{className:"text-sm font-medium",children:"Sort By:"}),i.jsxs("select",{className:"bg-transparent text-sm focus:outline-none",children:[i.jsx("option",{children:"Admin"}),i.jsx("option",{children:"User"})]})]})]}),i.jsx("div",{className:"border border-yellow-400",children:i.jsxs("table",{className:"w-full text-left ",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-yellow-400",children:[i.jsx("th",{className:"text-sm px-4 py-2",children:"Date"}),i.jsx("th",{className:"text-sm px-4 py-2",children:"Admin"}),i.jsxs("th",{className:"text-sm px-4 py-2",children:["From ",i.jsx(o6,{className:"inline"})," To"]}),i.jsx("th",{className:"text-sm px-4 py-2",children:"Amount"}),i.jsx("th",{className:"text-sm px-4 py-2 text-center",children:"Reason"})]})}),i.jsx("tbody",{children:t.map((e,r)=>i.jsxs("tr",{className:"",children:[i.jsx("td",{className:"text-sm px-4 py-2",children:e.date}),i.jsx("td",{className:"text-sm px-4 py-2",children:e.admin}),i.jsx("td",{className:"text-sm px-4 py-2",children:i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx("span",{children:e.from}),i.jsx(o6,{}),i.jsx("span",{children:e.to})]})}),i.jsx("td",{className:"text-sm px-4 py-2",children:e.amount}),i.jsx("td",{className:"text-sm px-4 py-2 whitespace-pre-line text-center",children:e.reason})]},r))})]})})]})},aoe=()=>{const t=e=>{e.preventDefault()};return i.jsxs("div",{children:[i.jsxs("form",{onSubmit:t,className:"max-w-5xl mx-auto space-y-10 mt-12",children:[i.jsxs("div",{className:"flex flex-wrap gap-6 items-center max-w-4xl mx-auto",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"font-medium",children:"From:"}),i.jsxs("select",{className:"bg-transparent border border-yellow-400 rounded-full px-4 py-1 focus:outline-none",children:[i.jsx("option",{children:"Select Source Pool"}),i.jsx("option",{children:"CRR Pool"}),i.jsx("option",{children:"BBR Pool"})]})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"font-medium",children:"To:"}),i.jsxs("select",{className:"bg-transparent border border-yellow-400 rounded-full px-4 py-1 focus:outline-none",children:[i.jsx("option",{children:"Select Target Pool"}),i.jsx("option",{children:"CRR Pool"}),i.jsx("option",{children:"BBR Pool"})]})]})]}),i.jsx("div",{children:i.jsx("input",{type:"text",className:"w-full bg-transparent placeholder:text-yellow-300 border border-yellow-400 rounded-full px-4 py-2 focus:outline-none",placeholder:"Amount (AED)"})}),i.jsx("div",{children:i.jsx("textarea",{rows:6,className:"w-full bg-transparent placeholder:text-yellow-300 border border-yellow-400 rounded px-4 py-2 focus:outline-none",placeholder:"Type reason here..."})}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("input",{type:"checkbox",id:"2fa",className:"accent-yellow-400 w-4 h-4"}),i.jsx("label",{htmlFor:"2fa",className:"text-sm",children:"Triggers 2FA + logs the transfer with timestamp & admin name"})]}),i.jsx("div",{className:"flex justify-center",children:i.jsx("button",{type:"submit",className:"bg-yellow-400 block mx-auto hover:bg-yellow-300 text-black font-semibold px-6 py-2 rounded-full transition",children:"Confirm Transfer"})})]}),i.jsx(noe,{})]})},soe=()=>{const t=[{compain:"New User Bonus",amount:"1,500",expirydate:"25 Jul 2025"},{compain:"New User Bonus",amount:"1,500",expirydate:"25 Jul 2025"}];return i.jsxs("div",{className:"overflow-x-auto max-w-6xl mx-auto mt-8 ",children:[i.jsxs("div",{className:" flex flex-wrap justify-between items-center mb-4",children:[i.jsx("h2",{className:"text-xl font-semibold text-yellow-400",children:"Transfer View:"}),i.jsxs("div",{className:"flex items-center",children:[i.jsx("span",{className:"text-sm font-medium",children:"Sort By:"}),i.jsx(Y4,{})]})]}),i.jsx("div",{className:"border border-yellow-400",children:i.jsxs("table",{className:"w-full text-left ",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-yellow-400",children:[i.jsx("th",{className:"text-sm px-4 py-2",children:"Compain"}),i.jsx("th",{className:"text-sm px-4 py-2",children:"Amount(AED)"}),i.jsx("th",{className:"text-sm px-4 py-2",children:"Expiry Date"}),i.jsx("th",{className:"text-sm px-4 py-2",children:"Action"})]})}),i.jsx("tbody",{children:t.map((e,r)=>i.jsxs("tr",{className:"",children:[i.jsx("td",{className:"text-sm px-4 py-2",children:e.compain}),i.jsx("td",{className:"text-sm px-4 py-2",children:e.amount}),i.jsx("td",{className:"text-sm px-4 py-2",children:e.expirydate}),i.jsx("td",{children:i.jsx("button",{className:"text-sm px-4 py-1 bg-yellow-400 rounded-full text-black",children:"Recall Fund"})})]},r))})]})}),i.jsxs("div",{className:"flex flex-col gap-6 mt-5",children:[i.jsxs("form",{action:"",children:[i.jsx("input",{type:"checkbox"}),i.jsx("label",{htmlFor:"",children:"Auto-flag bonuses if user inactive > 90 days"})]}),i.jsx("button",{className:"self-center font-semibold text-sm bg-yellow-400 px-4 py-2 rounded-full text-black",children:"Export CSV/PDF"})]})]})};function ioe(t){return be({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M18.25 8.5a.75.75 0 0 1 .75.75v9a.75.75 0 0 1-.75.75h-9a.75.75 0 0 1 0-1.5h7.19L6.22 7.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L17.5 16.44V9.25a.75.75 0 0 1 .75-.75Z"},child:[]}]})(t)}function ooe(t){return be({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M11.75 4.5a.75.75 0 0 1 .75.75V11h5.75a.75.75 0 0 1 0 1.5H12.5v5.75a.75.75 0 0 1-1.5 0V12.5H5.25a.75.75 0 0 1 0-1.5H11V5.25a.75.75 0 0 1 .75-.75Z"},child:[]}]})(t)}function q1(t){return be({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8"},child:[]}]})(t)}const loe=()=>{const t=[{date:"28 Jul 25",frompool:"Loyalty",tousecase:"Wallet Boost",amount:4e3,status:"Scheduled",admin:"Admin A"},{date:"28 Jul 25",frompool:"Loyalty",tousecase:"Wallet Boost",amount:4e3,status:"Scheduled",admin:"Admin A"}];return i.jsxs("div",{className:"overflow-x-auto max-w-6xl mx-auto mt-8 ",children:[i.jsxs("div",{className:" flex flex-wrap justify-between items-center mb-4",children:[i.jsx("h2",{className:"text-xl font-semibold text-yellow-400",children:"History Table:"}),i.jsxs("div",{className:"flex items-center",children:[i.jsx("span",{className:"text-sm font-medium",children:"Sort By:"}),i.jsx("select",{name:"",id:"",className:"bg-transparent focus:outline-none",children:i.jsx("option",{value:"",children:"Pool"})})]})]}),i.jsx("div",{className:"border border-yellow-400 rounded-lg",children:i.jsxs("table",{className:"w-full text-left ",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-yellow-400",children:[i.jsx("th",{className:"text-sm px-4 py-2",children:"Date"}),i.jsx("th",{className:"text-sm px-4 py-2",children:"From Pool"}),i.jsx("th",{className:"text-sm px-4 py-2",children:"To Use Case"}),i.jsx("th",{className:"text-sm px-4 py-2",children:"Amount"}),i.jsx("th",{className:"text-sm px-4 py-2",children:"Status"}),i.jsx("th",{className:"text-sm px-4 py-2",children:"Admin"})]})}),i.jsx("tbody",{children:t.map((e,r)=>i.jsxs("tr",{className:"",children:[i.jsx("td",{className:"text-sm px-4 py-2",children:e.date}),i.jsx("td",{className:"text-sm px-4 py-2",children:e.frompool}),i.jsx("td",{className:"text-sm px-4 py-2",children:e.tousecase}),i.jsx("td",{className:"text-sm px-4 py-2",children:e.amount}),i.jsx("td",{className:"text-sm px-4 py-2",children:e.status}),i.jsx("td",{className:"text-sm px-4 py-2",children:e.admin})]},r))})]})})]})},coe=()=>i.jsxs("div",{className:"w-full max-w-4xl mx-auto min-h-screen py-8",children:[i.jsxs("form",{className:"space-y-8 ",children:[i.jsxs("div",{className:"flex justify-between gap-2",children:[i.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[i.jsx("label",{className:"whitespace-nowrap text-sm font-medium",children:"Source Pool:"}),i.jsx("div",{className:"w-1/2 border border-yellow-400 rounded-full px-4 py-2",children:i.jsx("select",{className:"w-full bg-transparent outline-none",children:i.jsx("option",{value:"",children:"CRR Pool"})})})]}),i.jsxs("div",{className:"flex items-center gap-4 flex-1",children:[i.jsx("label",{className:"whitespace-nowrap text-sm font-medium",children:"Available Balance:"}),i.jsx("div",{className:"w-1/2 border border-yellow-400 rounded-full px-4 py-2",children:i.jsx("p",{children:"AED 20,000"})})]})]}),i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsx("label",{className:"whitespace-nowrap text-sm font-medium",children:"Target Use Case:"}),i.jsx("div",{className:"flex-1 border border-yellow-400 rounded-full px-4 py-2",children:i.jsx("select",{className:"w-full bg-transparent outline-none",children:i.jsx("option",{value:"",children:"Crisis Aid"})})})]}),i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsx("label",{className:"whitespace-nowrap text-sm font-medium",children:"Amount:"}),i.jsx("div",{className:"flex-1 border border-yellow-400 rounded-full px-4 py-2",children:i.jsx("input",{type:"number",className:"w-full bg-transparent outline-none placeholder:text-yellow-400",placeholder:"Enter amount"})})]}),i.jsxs("div",{children:[i.jsx("label",{className:" text-sm font-medium",children:"optional"}),i.jsx("div",{className:"flex",children:i.jsx("textarea",{rows:4,placeholder:"Type note here...",className:"flex-1 bg-transparent placeholder:text-yellow-400 border border-yellow-400 rounded-xl px-4 py-2 outline-none resize-none"})})]}),i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx("div",{className:"border border-yellow-300",children:i.jsx(ooe,{})}),i.jsx("label",{htmlFor:"addAnother",className:"text-sm",children:"Add Another Reassignment (dynamic row support)"})]}),i.jsxs("div",{className:"flex items-center justify-between py-2 px-4 border border-yellow-400 rounded-full",children:[i.jsx("label",{htmlFor:"effectiveDate",className:"text-sm",children:"Effective Date"}),i.jsx("div",{className:"flex items-center gap-2 px-4 py-2",children:i.jsx(Y4,{})})]})]}),i.jsxs("div",{className:"mt-8 w-full max-w-3xl mx-auto bg-gradient-to-r from-[#013321] to-[#027047] border border-yellow-200 rounded-xl p-6 shadow-lg space-y-4",children:[i.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Reassignment Preview Card"}),i.jsxs("div",{className:"flex items-center ",children:[i.jsx("p",{children:"CRR Pool"}),i.jsx(q1,{size:20}),i.jsxs("p",{children:["Crisis Aid: ",i.jsx("span",{className:"font-semibold",children:"AED 5,000"})]})]}),i.jsxs("div",{className:"flex items-center ",children:[i.jsx("p",{children:"Referral Pool"}),i.jsx(q1,{size:20}),i.jsxs("p",{children:["Wallet Boost: ",i.jsx("span",{className:"font-semibold",children:"AED 3,000"})]})]}),i.jsxs("div",{className:"flex items-center",children:[i.jsx("p",{children:"Scheduled for:"}),i.jsx(q1,{size:20}),i.jsx("p",{children:"02 Aug 2025"})]})]}),i.jsxs("div",{className:"flex justify-center gap-4 mt-6",children:[i.jsx("button",{className:"bg-yellow-400 px-4 py-2 font-semibold text-sm text-black rounded-full",children:"Download Summary"}),i.jsx("button",{className:"bg-yellow-400 px-4 py-2 font-semibold text-sm text-black rounded-full",children:"Confirm & Submit"})]}),i.jsx(loe,{})]}),doe=()=>{const[t,e]=O.useState("summary"),r=[{key:"summary",label:"Pool Summary View"},{key:"transfer",label:"Transfer Pool Funds Panel View"},{key:"recovery",label:"Manual Fund Recovery"},{key:"reassignment",label:"Future Reassignment Dashboard"}];let n;return t==="summary"?n=i.jsx(roe,{}):t==="transfer"?n=i.jsx(aoe,{}):t==="recovery"?n=i.jsx(soe,{}):t==="reassignment"&&(n=i.jsx(coe,{})),i.jsxs("div",{className:"flex bg-[#13220] min-h-screen",children:[i.jsx(Ue,{}),i.jsxs("div",{className:"flex-1 overflow-hidden",children:[i.jsx(rc,{}),i.jsxs("div",{className:"p-6 space-y-6",children:[i.jsx("div",{className:"flex flex-wrap gap-4",children:r.map(a=>i.jsx("button",{onClick:()=>e(a.key),className:`px-4 py-2 rounded font-semibold transition duration-150 ${t===a.key?"bg-yellow-400 text-black":"border border-yellow-400 text-yellow-300 hover:bg-yellow-300 hover:text-black"}`,children:a.label},a.key))}),i.jsx("div",{children:n})]})]})]})},Ha=()=>{const t=Cr(),e=O.useRef(null),r=s=>`menu-tab ${t.pathname===s?"active":""}`,n=()=>{e.current.scrollBy({left:-150,behavior:"smooth"})},a=()=>{e.current.scrollBy({left:150,behavior:"smooth"})};return i.jsxs("div",{className:"relative border-b border-yellow-400 px-6 py-2",children:[i.jsx("button",{onClick:n,className:"absolute left-0 top-1/2 -translate-y-1/2 z-10 px-1",children:i.jsx(F4,{size:20})}),i.jsxs("div",{ref:e,className:"mx-6 flex gap-x-4 overflow-x-auto whitespace-nowrap scrollbar-hide",children:[i.jsx(Pe,{to:"/kycverification",className:r("/kycverification"),children:"KYC Verifications"}),i.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),i.jsx(Pe,{to:"/serviceProvider",className:r("/serviceProvider"),children:"Service Provider"}),i.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),i.jsx(Pe,{to:"/driverhiring",className:r("/driverhiring"),children:"Driver Hiring/Career Proposals"}),i.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),i.jsx(Pe,{to:"/vendorreq",className:r("/vendorreq"),children:"Vendor Onboarding Requests"}),i.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),i.jsx(Pe,{to:"/drawalRequest",className:r("/drawalRequest"),children:"Withdrawal Requests"}),i.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),i.jsx(Pe,{to:"/complainresolve",className:r("/complainresolve"),children:"Complain Resolutions"}),i.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),i.jsx(Pe,{to:"/accountedit",className:r("/accountedit"),children:"Manual Account Edits"}),i.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),i.jsx(Pe,{to:"/promocode",className:r("/promocode"),children:"Promo Code or Offer Aprovals"})]}),i.jsx("button",{onClick:a,className:"absolute right-0 top-1/2 -translate-y-1/2 z-10 px-1",children:i.jsx($4,{size:20})})]})},Dn="https://aaaogo.xyz",uoe=()=>{const t=Ba();ua(_=>_.auth.token);const[e,r]=O.useState({start:"",end:""}),[n,a]=O.useState("Pending"),[s,o]=O.useState("All"),[l,c]=O.useState(null),[u,h]=O.useState(!1),[p,m]=O.useState(null),{data:x,isLoading:y,isError:b,error:w}=EX(),N=x?.kycDetails||[],A=async(_,L)=>{try{await t(uo.endpoints.approveKyc.initiate({userId:_})).unwrap(),Ne.success(`KYC Level ${L} approved successfully`)}catch(P){Ne.error(P.data?.message||"Failed to approve KYC")}},S=_=>{m(_),h(!0)},C=async _=>{try{await t(uo.endpoints.rejectKyc.initiate({userId:p,reason:_})).unwrap(),Ne.success("KYC rejected successfully")}catch(L){Ne.error(L.data?.message||"Failed to reject KYC")}},k=_=>{c(_)},T=()=>{c(null)},E=(Array.isArray(N)?N:[]).filter(_=>s==="All"?!0:_.kycLevel===(s==="User"?0:1)).filter(_=>{if(!e.start||!e.end)return!0;const L=new Date(_.createdAt);return L>=new Date(e.start)&&L<=new Date(e.end)}).sort((_,L)=>n==="Pending"||n==="Approved"||n==="Rejected"?0:new Date(L.createdAt)-new Date(_.createdAt));return y?i.jsx("div",{className:"text-yellow-400 text-center py-8",children:"Loading..."}):b?i.jsx("div",{className:"text-red-500 text-center py-8",children:w.data?.message||"Failed to fetch KYC data"}):i.jsxs("div",{className:"flex text-yellow-400 min-h-screen overflow-hidden bg-[#013220] font-sans",children:[i.jsx(Ue,{}),i.jsxs("div",{className:"flex-1 overflow-hidden",children:[i.jsx(Ha,{}),i.jsxs("div",{className:"flex justify-end items-center mb-6 gap-4 px-4",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{children:"Date Range:"}),i.jsx("input",{type:"date",value:e.start,onChange:_=>r({...e,start:_.target.value}),className:"bg-[#013A2A] border border-yellow-400 text-yellow-400 px-2 py-1 rounded-md w-28"}),i.jsx("span",{children:"To"}),i.jsx("input",{type:"date",value:e.end,onChange:_=>r({...e,end:_.target.value}),className:"bg-[#013A2A] border border-yellow-400 text-yellow-400 px-2 py-1 rounded-md w-28"})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{children:"Sort By:"}),i.jsxs("select",{value:n,onChange:_=>a(_.target.value),className:"bg-transparent border border-yellow-400 text-yellow-400 px-2 py-1 rounded-md",children:[i.jsx("option",{value:"Pending",children:"Pending"}),i.jsx("option",{value:"Date",children:"Date"})]})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{children:"Role:"}),i.jsxs("select",{value:s,onChange:_=>o(_.target.value),className:"bg-transparent border border-yellow-400 text-yellow-400 px-2 py-1 rounded-md",children:[i.jsx("option",{value:"All",children:"All"}),i.jsx("option",{value:"User",children:"User (Level 1)"}),i.jsx("option",{value:"Driver",children:"Driver (Level 2)"})]})]})]}),i.jsx("div",{className:"overflow-x-auto border border-yellow-400 rounded-xl mx-4 bg-gradient-to-b from-[#038A59] to-[#013723] shadow-lg",children:i.jsxs("table",{className:"w-full text-left",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-yellow-400 bg-[#038A59]",children:[i.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"User ID"}),i.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"Name"}),i.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"Role"}),i.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"Documents"}),i.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"Selfie Match"}),i.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"Status"}),i.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"Date"}),i.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"Action"})]})}),i.jsx("tbody",{children:E.length===0?i.jsx("tr",{children:i.jsx("td",{colSpan:"8",className:"text-center py-8 text-yellow-400",children:"No users to approve KYC levels"})}):E.map(_=>i.jsxs("tr",{className:"text-sm border-b border-[#013723] hover:bg-[#038A59]/50",children:[i.jsx("td",{className:"px-4 py-3",children:_.userId}),i.jsx("td",{className:"px-4 py-3",children:_.name}),i.jsx("td",{className:"px-4 py-3",children:_.kycLevel===0?"User":"Driver"}),i.jsx("td",{className:"px-4 py-3",children:i.jsxs("div",{className:"flex flex-col gap-1",children:[_.cnicImages?.front&&typeof _.cnicImages.front=="string"&&i.jsx("a",{href:`${Dn}/Uploads/${_.cnicImages.front.replace(/^\/?uploads\//,"")}`,target:"_blank",rel:"noopener noreferrer",className:"underline text-yellow-400 hover:text-yellow-300",children:"CNIC Front"}),_.cnicImages?.back&&typeof _.cnicImages.back=="string"&&i.jsx("a",{href:`${Dn}/Uploads/${_.cnicImages.back.replace(/^\/?uploads\//,"")}`,target:"_blank",rel:"noopener noreferrer",className:"underline text-yellow-400 hover:text-yellow-300",children:"CNIC Back"}),_.selfieImage&&typeof _.selfieImage=="string"&&i.jsx("a",{href:`${Dn}/Uploads/${_.selfieImage.replace(/^\/?uploads\//,"")}`,target:"_blank",rel:"noopener noreferrer",className:"underline text-yellow-400 hover:text-yellow-300",children:"Selfie"}),_.kycLevel===1&&_.licenseImage&&typeof _.licenseImage=="string"&&i.jsx("a",{href:`${Dn}/Uploads/${_.licenseImage.replace(/^\/?uploads\//,"")}`,target:"_blank",rel:"noopener noreferrer",className:"underline text-yellow-400 hover:text-yellow-300",children:"License"}),_.vehicleData&&i.jsxs("div",{children:[_.vehicleData.vehicleRegistrationCard&&typeof _.vehicleData.vehicleRegistrationCard=="string"&&i.jsx("a",{href:`${Dn}/Uploads/${_.vehicleData.vehicleRegistrationCard.replace(/^\/?uploads\//,"")}`,target:"_blank",rel:"noopener noreferrer",className:"underline text-yellow-400 hover:text-yellow-300",children:"Vehicle Registration"}),_.vehicleData.roadAuthorityCertificate&&typeof _.vehicleData.roadAuthorityCertificate=="string"&&i.jsx("a",{href:`${Dn}/Uploads/${_.vehicleData.roadAuthorityCertificate.replace(/^\/?uploads\//,"")}`,target:"_blank",rel:"noopener noreferrer",className:"underline text-yellow-400 hover:text-yellow-300 ml-2",children:"Road Certificate"}),_.vehicleData.insuranceCertificate&&typeof _.vehicleData.insuranceCertificate=="string"&&i.jsx("a",{href:`${Dn}/Uploads/${_.vehicleData.insuranceCertificate.replace(/^\/?uploads\//,"")}`,target:"_blank",rel:"noopener noreferrer",className:"underline text-yellow-400 hover:text-yellow-300 ml-2",children:"Insurance"})]})]})}),i.jsxs("td",{className:"px-4 py-3 flex items-center gap-2",children:[i.jsx("svg",{className:"w-4 h-4 text-green-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M5 13l4 4L19 7"})}),"Match"]}),i.jsx("td",{className:"px-4 py-3",children:_.kycStatus}),i.jsx("td",{className:"px-4 py-3",children:new Date(_.createdAt).toLocaleDateString()}),i.jsx("td",{className:"px-4 py-3",children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("button",{className:"bg-red-800 text-white px-4 py-1 rounded-full text-sm hover:bg-red-900",onClick:()=>S(_.userId),children:"Reject"}),i.jsx("button",{className:"bg-green-500 text-white px-4 py-1 rounded-full text-sm hover:bg-green-600",onClick:()=>A(_.userId,_.kycLevel+1),children:"Approve"}),i.jsx("button",{className:"bg-yellow-400 text-[#013220] px-4 py-1 rounded-full text-sm font-medium hover:bg-yellow-300 transition duration-200",onClick:()=>k(_),children:"View"})]})})]},_.userId))})]})}),l&&i.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",role:"dialog","aria-modal":"true",tabIndex:"-1",children:i.jsxs("div",{className:"bg-gradient-to-b from-[#038A59] to-[#013723] rounded-lg shadow-lg outline outline-black/20 shadow-black/80 p-6 w-full max-w-md text-yellow-400 font-sans transform transition-all duration-300",children:[i.jsx("h2",{className:"text-2xl font-semibold tracking-wide mb-4",children:"KYC Details"}),i.jsxs("div",{className:"space-y-3",children:[i.jsxs("p",{children:[i.jsx("span",{className:"font-medium",children:"User ID:"})," ",l.userId]}),i.jsxs("p",{children:[i.jsx("span",{className:"font-medium",children:"Name:"})," ",l.name]}),i.jsxs("p",{children:[i.jsx("span",{className:"font-medium",children:"Role:"})," ",l.kycLevel===0?"User":"Driver"]}),i.jsxs("p",{children:[i.jsx("span",{className:"font-medium",children:"KYC Status:"})," ",l.kycStatus||"Pending"]}),i.jsxs("p",{children:[i.jsx("span",{className:"font-medium",children:"Date:"})," ",new Date(l.createdAt).toLocaleString()]}),i.jsx("p",{children:i.jsx("span",{className:"font-medium",children:"Documents:"})}),i.jsxs("div",{className:"pl-4",children:[l.cnicImages?.front&&typeof l.cnicImages.front=="string"&&i.jsx("p",{children:i.jsx("a",{href:`${Dn}/Uploads/${l.cnicImages.front.replace(/^\/?uploads\//,"")}`,target:"_blank",rel:"noopener noreferrer",className:"underline text-yellow-400 hover:text-yellow-300",children:"CNIC Front"})}),l.cnicImages?.back&&typeof l.cnicImages.back=="string"&&i.jsx("p",{children:i.jsx("a",{href:`${Dn}/Uploads/${l.cnicImages.back.replace(/^\/?uploads\//,"")}`,target:"_blank",rel:"noopener noreferrer",className:"underline text-yellow-400 hover:text-yellow-300",children:"CNIC Back"})}),l.selfieImage&&typeof l.selfieImage=="string"&&i.jsx("p",{children:i.jsx("a",{href:`${Dn}/Uploads/${l.selfieImage.replace(/^\/?uploads\//,"")}`,target:"_blank",rel:"noopener noreferrer",className:"underline text-yellow-400 hover:text-yellow-300",children:"Selfie"})}),l.kycLevel===1&&l.licenseImage&&typeof l.licenseImage=="string"&&i.jsx("p",{children:i.jsx("a",{href:`${Dn}/Uploads/${l.licenseImage.replace(/^\/?uploads\//,"")}`,target:"_blank",rel:"noopener noreferrer",className:"underline text-yellow-400 hover:text-yellow-300",children:"License"})}),l.vehicleData&&i.jsxs("div",{children:[l.vehicleData.vehicleRegistrationCard&&typeof l.vehicleData.vehicleRegistrationCard=="string"&&i.jsx("p",{children:i.jsx("a",{href:`${Dn}/Uploads/${l.vehicleData.vehicleRegistrationCard.replace(/^\/?uploads\//,"")}`,target:"_blank",rel:"noopener noreferrer",className:"underline text-yellow-400 hover:text-yellow-300",children:"Vehicle Registration"})}),l.vehicleData.roadAuthorityCertificate&&typeof l.vehicleData.roadAuthorityCertificate=="string"&&i.jsx("p",{children:i.jsx("a",{href:`${Dn}/Uploads/${l.vehicleData.roadAuthorityCertificate.replace(/^\/?uploads\//,"")}`,target:"_blank",rel:"noopener noreferrer",className:"underline text-yellow-400 hover:text-yellow-300",children:"Road Certificate"})}),l.vehicleData.insuranceCertificate&&typeof l.vehicleData.insuranceCertificate=="string"&&i.jsx("p",{children:i.jsx("a",{href:`${Dn}/Uploads/${l.vehicleData.insuranceCertificate.replace(/^\/?uploads\//,"")}`,target:"_blank",rel:"noopener noreferrer",className:"underline text-yellow-400 hover:text-yellow-300",children:"Insurance"})})]})]})]}),i.jsx("div",{className:"mt-6 flex justify-end",children:i.jsx("button",{onClick:T,className:"bg-yellow-400 text-[#013220] px-4 py-2 rounded-full text-sm font-medium hover:bg-yellow-300 transition duration-200",autoFocus:!0,children:"Close"})})]})}),i.jsx(md,{isOpen:u,onClose:()=>h(!1),onConfirm:C,title:"Reject KYC",message:"Please provide a reason for rejecting this KYC:",showInput:!0,inputPlaceholder:"Enter reason for rejection..."})]})]})},hoe="https://aaaogo.xyz",foe=t=>{let e="";switch(t){case"approved":e="bg-green-500";break;case"rejected":e="bg-red-800";break;case"pending":e="bg-yellow-600";break;default:e="bg-gray-500"}return i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("div",{className:`w-3 h-3 rounded-full ${e}`}),i.jsx("span",{children:t.charAt(0).toUpperCase()+t.slice(1)})]})},poe=()=>{const t=Ba(),{services:e,loading:r,error:n}=ua(y=>y.services),[a,s]=O.useState(""),[o,l]=O.useState(null),[c,u]=O.useState("");O.useEffect(()=>{t(Rg())},[t]);const h=async y=>{try{await t(e_(y)).unwrap(),Ne.success("Service approved successfully")}catch(b){Ne.error(b.message||"Failed to approve service")}},p=async y=>{try{if(!c){Ne.error("Please provide a rejection reason");return}await t(t_({serviceId:y,reason:c})).unwrap(),Ne.success("Service rejected successfully"),u(""),l(null)}catch(b){Ne.error(b.message||"Failed to reject service")}},m=y=>{const b=y.replace(/^\/?uploads\/services\//,"");return`${hoe}/${b}`},x=a?e.filter(y=>y.status===a):e;return r?i.jsx("div",{className:"text-yellow-400 text-center py-8",children:"Loading..."}):n?i.jsx("div",{className:"text-red-500 text-center py-8",children:n.message||"Failed to fetch services"}):i.jsxs("div",{className:"flex text-yellow-400 min-h-screen overflow-hidden bg-[#013220] font-sans",children:[i.jsx(Ue,{}),i.jsxs("div",{className:"flex-1 overflow-hidden",children:[i.jsx(Ha,{}),i.jsx("div",{className:"flex justify-end items-center mb-6 gap-4 px-4",children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{children:"Sort By:"}),i.jsxs("select",{className:"bg-transparent border border-yellow-400 rounded px-2 py-1 text-yellow-400",value:a,onChange:y=>s(y.target.value),children:[i.jsx("option",{value:"",children:"All"}),i.jsx("option",{value:"pending",children:"Pending"}),i.jsx("option",{value:"approved",children:"Approved"}),i.jsx("option",{value:"rejected",children:"Rejected"})]})]})}),i.jsx("div",{className:"overflow-x-auto border border-yellow-400 rounded-xl mx-4 bg-gradient-to-b from-[#038A59] to-[#013723] shadow-lg",children:i.jsxs("table",{className:"w-full text-left",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-yellow-400 bg-[#038A59]",children:[i.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"Business Name"}),i.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"Owner Name"}),i.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"Area"}),i.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"Service Offered"}),i.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"Status"}),i.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"Action"})]})}),i.jsxs("tbody",{children:[x.map(y=>i.jsxs("tr",{className:"text-sm border-b border-[#013723] hover:bg-[#038A59]/50",children:[i.jsx("td",{className:"px-4 py-3",children:y.businessCompanyName}),i.jsx("td",{className:"px-4 py-3",children:y.ownerIdentification.fullName}),i.jsx("td",{className:"px-4 py-3",children:y.serviceArea}),i.jsx("td",{className:"px-4 py-3",children:y.serviceType}),i.jsx("td",{className:"px-4 py-3",children:foe(y.status)}),i.jsx("td",{className:"px-4 py-3",children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("button",{onClick:()=>l(y),className:"bg-yellow-400 text-[#013220] px-4 py-1 rounded-full text-sm font-medium hover:bg-yellow-300 transition duration-200",children:"View"}),y.status==="pending"&&i.jsxs(i.Fragment,{children:[i.jsx("button",{onClick:()=>h(y._id),className:"bg-green-500 text-white px-4 py-1 rounded-full text-sm hover:bg-green-600",children:"Approve"}),i.jsx("button",{onClick:()=>l(y),className:"bg-red-800 text-white px-4 py-1 rounded-full text-sm hover:bg-red-900",children:"Reject"})]})]})})]},y._id)),x.length===0&&i.jsx("tr",{children:i.jsx("td",{colSpan:"6",className:"text-center py-8 text-yellow-400",children:"No services to approve"})})]})]})}),o&&i.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",role:"dialog","aria-modal":"true",tabIndex:"-1",children:i.jsxs("div",{className:"bg-gradient-to-b from-[#038A59] to-[#013723] rounded-lg shadow-lg outline outline-black/20 shadow-black/80 p-6 w-full max-w-2xl max-h-[80vh] overflow-y-auto text-yellow-400 font-sans transform transition-all duration-300",children:[i.jsx("h2",{className:"text-2xl font-semibold tracking-wide mb-4",children:o.businessCompanyName}),i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{children:[i.jsxs("p",{children:[i.jsx("span",{className:"font-medium",children:"Owner:"})," ",o.ownerIdentification.fullName]}),i.jsxs("p",{children:[i.jsx("span",{className:"font-medium",children:"Emirates ID:"})," ",o.ownerIdentification.emiratesId]}),i.jsxs("p",{children:[i.jsx("span",{className:"font-medium",children:"Trade License:"})," ",o.tradeLicenseNumber]}),i.jsxs("p",{children:[i.jsx("span",{className:"font-medium",children:"Company Type:"})," ",o.companyType]}),i.jsxs("p",{children:[i.jsx("span",{className:"font-medium",children:"Service Type:"})," ",o.serviceType]}),i.jsxs("p",{children:[i.jsx("span",{className:"font-medium",children:"Service Area:"})," ",o.serviceArea]}),i.jsxs("p",{children:[i.jsx("span",{className:"font-medium",children:"Business Phone:"})," ",o.businessPhoneNumber]}),i.jsxs("p",{children:[i.jsx("span",{className:"font-medium",children:"Contact Person:"})," ",o.managerOwnerReceptionName]}),i.jsxs("p",{children:[i.jsx("span",{className:"font-medium",children:"Contact Mobile:"})," ",o.contactPersonMobile]})]}),i.jsxs("div",{children:[i.jsxs("p",{children:[i.jsx("span",{className:"font-medium",children:"Address:"})," ",o.businessAddress]}),i.jsxs("p",{children:[i.jsx("span",{className:"font-medium",children:"Opening Time:"})," ",o.openingTime]}),i.jsxs("p",{children:[i.jsx("span",{className:"font-medium",children:"Closing Time:"})," ",o.closingTime]}),i.jsxs("p",{children:[i.jsx("span",{className:"font-medium",children:"Staff Count:"})," ",o.numberOfStaff]}),i.jsxs("p",{children:[i.jsx("span",{className:"font-medium",children:"Services:"})," ",o.listOfServices]}),i.jsxs("p",{children:[i.jsx("span",{className:"font-medium",children:"Status:"})," ",o.status.charAt(0).toUpperCase()+o.status.slice(1)]}),o.rejectionReason&&i.jsxs("p",{children:[i.jsx("span",{className:"font-medium",children:"Rejection Reason:"})," ",o.rejectionReason]})]})]}),i.jsxs("div",{className:"mt-4",children:[i.jsx("h3",{className:"text-lg font-semibold tracking-wide",children:"Documents"}),i.jsxs("div",{className:"grid grid-cols-2 gap-2 pl-4",children:[o.tradeLicenseCopy&&i.jsx("p",{children:i.jsx("a",{href:m(o.tradeLicenseCopy),target:"_blank",rel:"noopener noreferrer",className:"underline text-yellow-400 hover:text-yellow-300",children:"Trade License"})}),o.shopImages?.map((y,b)=>i.jsx("p",{children:i.jsxs("a",{href:m(y),target:"_blank",rel:"noopener noreferrer",className:"underline text-yellow-400 hover:text-yellow-300",children:["Shop Image ",b+1]})},b)),o.passportCopy?.map((y,b)=>i.jsx("p",{children:i.jsxs("a",{href:m(y),target:"_blank",rel:"noopener noreferrer",className:"underline text-yellow-400 hover:text-yellow-300",children:["Passport Copy ",b+1]})},b)),o.uploadedPriceList&&i.jsx("p",{children:i.jsx("a",{href:m(o.uploadedPriceList),target:"_blank",rel:"noopener noreferrer",className:"underline text-yellow-400 hover:text-yellow-300",children:"Price List"})}),o.uploadedPortfolio&&i.jsx("p",{children:i.jsx("a",{href:m(o.uploadedPortfolio),target:"_blank",rel:"noopener noreferrer",className:"underline text-yellow-400 hover:text-yellow-300",children:"Portfolio"})})]})]}),o.status==="pending"&&i.jsx("div",{className:"mt-4",children:i.jsx("textarea",{className:"w-full p-2 bg-[#013A2A] border border-yellow-400 text-yellow-400 rounded",placeholder:"Enter rejection reason (if rejecting)",value:c,onChange:y=>u(y.target.value)})}),i.jsxs("div",{className:"mt-6 flex justify-end gap-2",children:[i.jsx("button",{onClick:()=>{l(null),u("")},className:"bg-yellow-400 text-[#013220] px-4 py-2 rounded-full text-sm font-medium hover:bg-yellow-300 transition duration-200",autoFocus:!0,children:"Close"}),o.status==="pending"&&i.jsxs(i.Fragment,{children:[i.jsx("button",{onClick:()=>h(o._id),className:"bg-green-500 text-white px-4 py-2 rounded-full text-sm hover:bg-green-600",children:"Approve"}),i.jsx("button",{onClick:()=>p(o._id),className:"bg-red-800 text-white px-4 py-2 rounded-full text-sm hover:bg-red-900",disabled:!c,children:"Reject"})]})]})]})})]})]})},moe=[{type:"Rapid Recovery Hub",status:"Valid"},{type:"Service Permit",status:"Pending Validation"},{type:"Optional Docs",status:"Missing"},{type:"Rapid Recovery Hub",status:"Valid"},{type:"Service Permit",status:"Pending Validation"},{type:"Optional Docs",status:"Missing"},{type:"Rapid Recovery Hub",status:"Pending Validation"}],goe=t=>{let e="";switch(t){case"Valid":e="bg-green-500";break;case"Pending Validation":e="bg-red-500";break;case"Missing":e="bg-yellow-400";break;default:e="bg-gray-500"}return i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("div",{className:`w-3 h-3 rounded-full ${e}`}),i.jsx("span",{children:t})]})},xoe=()=>{const{id:t}=DP(),e=Ao();return i.jsxs("div",{className:"flex min-h-screen",children:[i.jsx(Ue,{}),i.jsxs("div",{className:"flex-1 overflow-y-auto",children:[i.jsx(Ha,{}),i.jsxs("div",{className:"flex items-center gap-2 mb-4 m-4",children:[i.jsx(T0,{size:25,className:"text-yellow-400 text-lg"}),i.jsx("button",{onClick:()=>e(-1),className:"text-yellow-400 hover:underline",children:"Back"})]}),i.jsxs("div",{className:"bg-gradient-to-r from-[#013321] to-[#026D46] mx-auto border border-yellow-400 rounded-md p-6 mb-6 w-full max-w-3xl",children:[i.jsx("h2",{className:"text-2xl font-semibold mb-4 text-yellow-300",children:"Detail View"}),i.jsxs("div",{className:"space-y-3",children:[i.jsxs("div",{className:"flex items-center justify-between px-12",children:[i.jsx("strong",{className:"w-36",children:"Business Name:"}),i.jsx("span",{children:"Rapid Recovery Hub"})]}),i.jsxs("div",{className:"flex items-center justify-between px-12",children:[i.jsx("strong",{className:"w-36",children:"Owner Name:"}),i.jsx("span",{children:"Usman Raza"})]}),i.jsxs("div",{className:"flex items-center justify-between px-12",children:[i.jsx("strong",{className:"w-36",children:"Status Badge:"}),i.jsxs("div",{className:"flex items-center justify-between px-12 gap-2",children:[i.jsx("div",{className:"w-3 h-3 rounded-full bg-red-500 "}),i.jsx("span",{children:"Pending"})]})]}),i.jsxs("div",{className:"flex items-center justify-between px-12",children:[i.jsx("strong",{className:"w-36",children:"Date Submitted:"}),i.jsx("span",{children:"Jul 29, 2025"})]}),i.jsxs("div",{className:"flex items-center justify-between px-12",children:[i.jsx("strong",{className:"w-36",children:"Area of Operation:"}),i.jsx("span",{children:"Lahore – DHA"})]}),i.jsxs("div",{className:"flex items-center justify-between px-12",children:[i.jsx("strong",{className:"w-36",children:"Services Offered:"}),i.jsx("span",{children:"Recovery • Workshop"})]})]})]}),i.jsxs("div",{className:"mx-auto border border-yellow-400 rounded-md overflow-hidden w-full max-w-4xl",children:[i.jsxs("div",{className:"grid grid-cols-3 border-b border-yellow-300 py-2 px-4 font-semibold text-yellow-400 w-full",children:[i.jsx("span",{children:"Document Type"}),i.jsx("span",{children:"Status"}),i.jsx("span",{className:"text-center",children:"Action"})]}),moe.map((r,n)=>i.jsxs("div",{className:"grid grid-cols-3 items-center py-2 px-4",children:[i.jsx("span",{children:r.type}),i.jsx("span",{children:goe(r.status)}),i.jsx("span",{children:r.status==="Missing"?i.jsx("button",{className:"text-xs block mx-auto bg-yellow-400 text-black px-1 py-1 rounded-md",children:"Request Upload"}):i.jsx("button",{className:"text-xs block mx-auto bg-yellow-400 text-black px-4 py-1 rounded-md",children:"View Detail"})})]},n))]}),i.jsxs("div",{className:"flex justify-center items-center pt-10 gap-6",children:[i.jsx("button",{className:"bg-yellow-400 px-4 py-2 rounded-full text-black text-sm font-semibold",children:"Approve Provider"}),i.jsx("button",{className:"bg-yellow-400 px-4 py-2 rounded-full text-black text-sm font-semibold",children:"Reject Application"}),i.jsx("button",{className:"bg-yellow-400 px-4 py-2 rounded-full text-black text-sm font-semibold",children:"Request More Info"})]})]})]})},boe=t=>{let e="";switch(t){case"approved":e="bg-green-500";break;case"rejected":e="bg-red-800";break;case"pending":e="bg-yellow-500";break;case"Under-review":e="bg-blue-800";break;default:e="bg-gray-500"}return i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("div",{className:`w-3 h-3 rounded-full ${e}`}),i.jsx("span",{children:t.charAt(0).toUpperCase()+t.slice(1)})]})},yoe=()=>{const t=Ba(),{pendingHirings:e,totalPending:r,loading:n,error:a,success:s}=ua(S=>S.driverHiring),[o,l]=O.useState(""),[c,u]=O.useState(null),[h,p]=O.useState(""),[m,x]=O.useState(null),y=localStorage.getItem("token");O.useEffect(()=>{t(Cg(y))},[t,y]),O.useEffect(()=>{if(s||a){const S=setTimeout(()=>{t(G8())},5e3);return()=>clearTimeout(S)}},[s,a,t]);const b=S=>{t(Rh({driverHiringId:S,token:y}))},w=S=>{h.trim()?(t(Lh({driverHiringId:S,reason:h,token:y})),p(""),u(null)):Ne.error("Please provide a reason for rejection")},N=S=>{x(m===S?null:S)},A=o?e.filter(S=>S.approvalStatus===o):e;return i.jsxs("div",{className:"flex text-yellow-400 min-h-screen overflow-hidden",children:[i.jsx(Ue,{}),i.jsxs("div",{className:"flex-1 overflow-hidden",children:[i.jsx(Ha,{}),i.jsx("div",{className:"flex justify-end items-center mb-6 gap-4 mx-2",children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{children:"Sort By:"}),i.jsxs("select",{className:"bg-transparent focus:outline-none text-yellow-400 border border-yellow-400 rounded px-2 py-1",value:o,onChange:S=>l(S.target.value),children:[i.jsx("option",{value:"",children:"All"}),i.jsx("option",{value:"pending",children:"Pending"}),i.jsx("option",{value:"approved",children:"Approved"}),i.jsx("option",{value:"rejected",children:"Rejected"}),i.jsx("option",{value:"Under-review",children:"Under-review"})]})]})}),n&&i.jsx("p",{className:"text-blue-500 mx-2",children:"Loading..."}),a&&i.jsx("p",{className:"text-red-500 mx-2",children:a}),s&&i.jsx("p",{className:"text-green-500 mx-2",children:s}),i.jsx("div",{className:"mx-2 mt-6 max-h-[calc(100vh-200px)] overflow-y-auto overflow-x-auto border border-yellow-400 rounded-xl scrollbar-hide",children:i.jsxs("table",{className:"w-full text-left min-w-[800px]",children:[i.jsx("thead",{className:"sticky top-0 bg-gray-800",children:i.jsxs("tr",{className:"border-b border-yellow-400",children:[i.jsx("th",{className:"px-4 py-3 w-[150px]",children:"Driver Name"}),i.jsx("th",{className:"px-4 py-3 w-[150px]",children:"Owner Name"}),i.jsx("th",{className:"px-4 py-3 w-[150px]",children:"Engagement"}),i.jsx("th",{className:"px-4 py-3 w-[150px]",children:"Terms"}),i.jsx("th",{className:"px-4 py-3 w-[120px]",children:"Submitted On"}),i.jsx("th",{className:"px-4 py-3 w-[100px]",children:"Status"}),i.jsx("th",{className:"px-4 py-3 w-[250px]",children:"Action"})]})}),i.jsxs("tbody",{children:[A.map(S=>i.jsxs(Lr.Fragment,{children:[i.jsxs("tr",{className:"text-sm",children:[i.jsxs("td",{className:"px-4 py-3",children:[S.userId?.firstName," ",S.userId?.lastName||""]}),i.jsx("td",{className:"px-4 py-3",children:S.vehicleOwnerName}),i.jsx("td",{className:"px-4 py-3",children:S.engagementType}),i.jsx("td",{className:"px-4 py-3",children:S.engagementType==="Salary Based"?`PKR ${S.salaryOffered}`:S.engagementType}),i.jsx("td",{className:"px-4 py-3",children:new Date(S.createdAt).toLocaleDateString()}),i.jsx("td",{className:"px-4 py-3",children:boe(S.approvalStatus)}),i.jsx("td",{className:"px-4 py-3",children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("button",{onClick:()=>N(S._id),className:"bg-yellow-400 text-[#013220] px-4 py-1 rounded-full text-sm hover:bg-yellow-300",children:m===S._id?"Hide Details":"Show Details"}),S.approvalStatus==="pending"&&i.jsxs(i.Fragment,{children:[i.jsx("button",{onClick:()=>b(S._id),className:"bg-green-500 text-white px-4 py-1 rounded-full text-sm hover:bg-green-600",children:"Approve"}),i.jsx("button",{onClick:()=>u(S._id),className:"bg-red-800 text-white px-4 py-1 rounded-full text-sm hover:bg-red-900",children:"Reject"})]})]})})]}),m===S._id&&i.jsx("tr",{className:"bg-gray-800",children:i.jsx("td",{colSpan:"7",className:"px-4 py-4",children:i.jsx("div",{className:"max-h-[300px] overflow-y-auto pr-4 scrollbar-hide",children:i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"text-lg font-semibold mb-2",children:"User Information"}),i.jsxs("p",{children:[i.jsx("strong",{children:"Username:"})," ",S.userId?.username]}),i.jsxs("p",{children:[i.jsx("strong",{children:"Email:"})," ",S.userId?.email]}),i.jsxs("p",{children:[i.jsx("strong",{children:"Phone:"})," ",S.userId?.phoneNumber]})]}),i.jsxs("div",{children:[i.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Vehicle Information"}),i.jsxs("p",{children:[i.jsx("strong",{children:"Vehicle Type:"})," ",S.vehicleType]}),i.jsxs("p",{children:[i.jsx("strong",{children:"Plate Number:"})," ",S.vehiclePlateNumber]}),i.jsxs("p",{children:[i.jsx("strong",{children:"Make & Model:"})," ",S.vehicleMakeModel]}),i.jsxs("p",{children:[i.jsx("strong",{children:"Company Name:"})," ",S.companyName||"N/A"]}),i.jsxs("p",{children:[i.jsx("strong",{children:"Company Emirate:"})," ",S.companyEmirate||"N/A"]}),i.jsx("p",{children:i.jsx("strong",{children:"Registration Card:"})}),i.jsxs("div",{className:"flex gap-4",children:[i.jsx("a",{href:`https://aaaogo.xyz/${S.registrationCard.front}`,target:"_blank",rel:"noopener noreferrer",className:"text-yellow-400 hover:underline",children:"Front"}),i.jsx("a",{href:`https://aaaogo.xyz/${S.registrationCard.back}`,target:"_blank",rel:"noopener noreferrer",className:"text-yellow-400 hover:underline",children:"Back"})]}),i.jsx("p",{children:i.jsx("strong",{children:"Vehicle Images:"})}),i.jsx("div",{className:"flex gap-4 flex-wrap",children:S.vehicleImages.map((C,k)=>i.jsxs("a",{href:`https://aaaogo.xyz/${C}`,target:"_blank",rel:"noopener noreferrer",className:"text-yellow-400 hover:underline",children:["Image ",k+1]},k))})]}),i.jsxs("div",{children:[i.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Hiring Details"}),i.jsxs("p",{children:[i.jsx("strong",{children:"Driver Can Offer Counter Rent:"})," ",S.driverCanOfferCounterRent?"Yes":"No"]}),i.jsxs("p",{children:[i.jsx("strong",{children:"Agreement Duration:"})," ",S.agreementDuration]}),S.customDurationAmount&&i.jsxs("p",{children:[i.jsx("strong",{children:"Custom Duration:"})," ",S.customDurationAmount," months"]}),i.jsxs("p",{children:[i.jsx("strong",{children:"Work Schedule:"})," ",S.workSchedule]}),i.jsxs("p",{children:[i.jsx("strong",{children:"Shift Timing:"})," ",S.shiftTimingOrDutyHours]}),i.jsxs("p",{children:[i.jsx("strong",{children:"Preferred Start Date:"})," ",new Date(S.preferredStartDate).toLocaleDateString()]}),i.jsxs("p",{children:[i.jsx("strong",{children:"Information Confirmed:"})," ",S.informationConfirmed?"Yes":"No"]}),i.jsxs("p",{children:[i.jsx("strong",{children:"Auto-Generated Agreement:"})," ",S.autoGeneratedAgreement?"Yes":"No"]}),i.jsxs("p",{children:[i.jsx("strong",{children:"Mutual Approval:"})," ",S.mutualApproval?"Yes":"No"]}),i.jsxs("p",{children:[i.jsx("strong",{children:"Terms Agreed:"})," ",S.termsAgreed?"Yes":"No"]}),i.jsxs("p",{children:[i.jsx("strong",{children:"Digital Signature:"})," ",S.digitalSignature]}),i.jsxs("p",{children:[i.jsx("strong",{children:"Admin Comments:"})," ",S.adminComments||"None"]}),i.jsxs("p",{children:[i.jsx("strong",{children:"Created At:"})," ",new Date(S.createdAt).toLocaleDateString()]}),i.jsxs("p",{children:[i.jsx("strong",{children:"Updated At:"})," ",new Date(S.updatedAt).toLocaleDateString()]}),i.jsxs("p",{children:[i.jsx("strong",{children:"Total Applications:"})," ",S.driverApplications.length]}),S.selectedDriverId&&i.jsxs("p",{children:[i.jsx("strong",{children:"Selected Driver ID:"})," ",S.selectedDriverId]})]}),i.jsxs("div",{children:[i.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Maintenance Responsibilities"}),i.jsx("p",{children:i.jsx("strong",{children:"Minor Maintenance:"})}),i.jsxs("ul",{className:"list-disc pl-5",children:[i.jsxs("li",{children:["Daily Fuel: Owner: ",S.maintenanceResponsibilities.minor.dailyFuel.owner?"Yes":"No",", Driver: ",S.maintenanceResponsibilities.minor.dailyFuel.driver?"Yes":"No"]}),i.jsxs("li",{children:["Car Wash: Owner: ",S.maintenanceResponsibilities.minor.carWash.owner?"Yes":"No",", Driver: ",S.maintenanceResponsibilities.minor.carWash.driver?"Yes":"No"]}),i.jsxs("li",{children:["Oil Change: Owner: ",S.maintenanceResponsibilities.minor.oilChange.owner?"Yes":"No",", Driver: ",S.maintenanceResponsibilities.minor.oilChange.driver?"Yes":"No"]}),i.jsxs("li",{children:["Tyre Pressure Check: Owner: ",S.maintenanceResponsibilities.minor.tyrePressureCheck.owner?"Yes":"No",", Driver: ",S.maintenanceResponsibilities.minor.tyrePressureCheck.driver?"Yes":"No"]})]}),i.jsx("p",{children:i.jsx("strong",{children:"Major Maintenance:"})}),i.jsxs("ul",{className:"list-disc pl-5",children:[i.jsxs("li",{children:["Engine Repairs: Owner: ",S.maintenanceResponsibilities.major.engineRepairs.owner?"Yes":"No",", Driver: ",S.maintenanceResponsibilities.major.engineRepairs.driver?"Yes":"No"]}),i.jsxs("li",{children:["Transmission System: Owner: ",S.maintenanceResponsibilities.major.transmissionSystem.owner?"Yes":"No",", Driver: ",S.maintenanceResponsibilities.major.transmissionSystem.driver?"Yes":"No"]}),i.jsxs("li",{children:["AC System: Owner: ",S.maintenanceResponsibilities.major.acSystem.owner?"Yes":"No",", Driver: ",S.maintenanceResponsibilities.major.acSystem.driver?"Yes":"No"]})]}),S.maintenanceResponsibilities.custom.length>0&&i.jsxs(i.Fragment,{children:[i.jsx("p",{children:i.jsx("strong",{children:"Custom Maintenance:"})}),i.jsx("ul",{className:"list-disc pl-5",children:S.maintenanceResponsibilities.custom.map((C,k)=>i.jsxs("li",{children:[C.name,": Owner: ",C.owner?"Yes":"No",", Driver: ",C.driver?"Yes":"No"]},k))})]})]})]})})})})]},S._id)),A.length===0&&i.jsx("tr",{children:i.jsx("td",{colSpan:"7",className:"text-center py-4 text-yellow-400",children:"No matching data found."})})]})]})}),c&&i.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center",children:i.jsxs("div",{className:"bg-gray-800 p-6 rounded-lg max-w-md w-full",children:[i.jsx("h2",{className:"text-xl text-yellow-400 mb-4",children:"Reject Driver Hiring"}),i.jsx("textarea",{className:"w-full bg-transparent border border-yellow-400 text-yellow-400 p-2 rounded mb-4",value:h,onChange:S=>p(S.target.value),placeholder:"Enter reason for rejection",rows:"4"}),i.jsxs("div",{className:"flex justify-end gap-2",children:[i.jsx("button",{onClick:()=>u(null),className:"bg-gray-500 text-white px-4 py-1 rounded-full hover:bg-gray-600",children:"Cancel"}),i.jsx("button",{onClick:()=>w(c),className:"bg-red-800 text-white px-4 py-1 rounded-full hover:bg-red-900",children:"Submit"})]})]})}),i.jsx("style",{children:`
.scrollbar-hide::-webkit-scrollbar {
display: none;
}
.scrollbar-hide {
-ms-overflow-style: none; /* Internet Explorer 10+ */
scrollbar-width: none; /* Firefox */
}
`})]})]})},voe=t=>{let e="";switch(t){case"Valid":e="bg-green-500";break;case"Pending Validation":e="bg-red-500";break;case"Missing":e="bg-yellow-400";break;default:e="bg-gray-500"}return i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("div",{className:`w-3 h-3 rounded-full ${e}`}),i.jsx("span",{children:t})]})},woe=()=>{const t=Ao(),{driverHiringId:e}=DP(),r=Ba(),{currentHiring:n,loading:a,error:s,success:o}=ua(_=>_.driverHiring),l=localStorage.getItem("token"),[c,u]=O.useState(null),[h,p]=O.useState(""),[m,x]=O.useState(!1),[y,b]=O.useState(""),[w,N]=O.useState(!1),[A,S]=O.useState("");O.useEffect(()=>{if(!l){console.error("No token found in localStorage");return}e&&(console.log("Fetching driver hiring details for ID:",e),r(kg({driverHiringId:e,token:l})))},[r,e,l]),O.useEffect(()=>{if(o||s){console.log("Status update:",{success:o,error:s});const _=setTimeout(()=>{r(G8())},5e3);return()=>clearTimeout(_)}},[o,s,r]);const C=()=>{if(!l||!e){console.error("Missing token or driverHiringId:",{token:l,driverHiringId:e}),Ne.error("Authentication or hiring ID missing");return}console.log("Approving hiring:",e),r(Rh({driverHiringId:e,token:l})).unwrap().then(()=>console.log("Approve successful")).catch(_=>console.error("Approve failed:",_))},k=()=>{if(!h.trim()){Ne.error("Please provide a reason for rejection");return}if(!l||!e){console.error("Missing token or driverHiringId:",{token:l,driverHiringId:e}),Ne.error("Authentication or hiring ID missing");return}console.log("Rejecting hiring:",e,"Reason:",h),r(Lh({driverHiringId:e,reason:h,token:l})).unwrap().then(()=>{console.log("Reject successful"),p(""),u(null)}).catch(_=>console.error("Reject failed:",_))},T=()=>{if(!y.trim()){Ne.error("Please provide new terms");return}if(!l||!e){console.error("Missing token or driverHiringId:",{token:l,driverHiringId:e}),Ne.error("Authentication or hiring ID missing");return}console.log("Updating terms for hiring:",e,"Terms:",y),r(Dg({driverHiringId:e,terms:y,token:l})).unwrap().then(()=>{console.log("Update terms successful"),b(""),x(!1)}).catch(_=>console.error("Update terms failed:",_))},E=()=>{if(!A.trim()){Ne.error("Please provide a note");return}if(!l||!e){console.error("Missing token or driverHiringId:",{token:l,driverHiringId:e}),Ne.error("Authentication or hiring ID missing");return}console.log("Adding note for hiring:",e,"Note:",A),r(Tg({driverHiringId:e,note:A,token:l})).unwrap().then(()=>{console.log("Add note successful"),S(""),N(!1)}).catch(_=>console.error("Add note failed:",_))};return a&&!n?i.jsx("p",{className:"text-blue-500 text-center",children:"Loading..."}):s&&!n?i.jsx("p",{className:"text-red-500 text-center",children:s}):n?i.jsxs("div",{className:"flex min-h-screen text-yellow-400",children:[i.jsx(Ue,{}),i.jsxs("div",{className:"flex-1 overflow-y-auto",children:[i.jsx(Ha,{}),a&&i.jsx("p",{className:"text-blue-500 mx-2",children:"Loading..."}),s&&i.jsx("p",{className:"text-red-500 mx-2",children:s}),o&&i.jsx("p",{className:"text-green-500 mx-2",children:o}),i.jsxs("div",{className:"flex items-center gap-2 mb-4 m-4",children:[i.jsx(T0,{size:25,className:"text-yellow-400"}),i.jsx("button",{onClick:()=>t(-1),className:"text-yellow-400 hover:underline",children:"Back"})]}),i.jsx("h2",{className:"text-xl font-semibold text-center mb-4",children:"Agreement Summary:"}),i.jsx("div",{className:"flex justify-center items-center mb-6",children:i.jsx("div",{className:"max-w-2xl w-full border border-yellow-300 rounded-md overflow-hidden",children:i.jsxs("table",{className:"w-full table-fixed border border-yellow-300 text-left",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"text-yellow-500 text-center",children:[i.jsx("th",{className:"border-r border-yellow-300 px-4 py-2 w-1/2",children:"Field"}),i.jsx("th",{className:"px-4 py-2",children:"Value"})]})}),i.jsxs("tbody",{className:"text-center",children:[i.jsxs("tr",{className:"border-t border-yellow-300",children:[i.jsx("td",{className:"border-r border-yellow-300 px-4 py-2",children:"Driver Name"}),i.jsx("td",{className:"px-4 py-2",children:n.userId?.firstName||"N/A"})]}),i.jsxs("tr",{className:"border-t border-yellow-300",children:[i.jsx("td",{className:"border-r border-yellow-300 px-4 py-2",children:"Owner Name"}),i.jsx("td",{className:"px-4 py-2",children:n.vehicleOwnerName||"N/A"})]}),i.jsxs("tr",{className:"border-t border-yellow-300",children:[i.jsx("td",{className:"border-r border-yellow-300 px-4 py-2",children:"Engagement Type"}),i.jsx("td",{className:"px-4 py-2",children:n.engagementType||"N/A"})]}),i.jsxs("tr",{className:"border-t border-yellow-300",children:[i.jsx("td",{className:"border-r border-yellow-300 px-4 py-2",children:"Terms"}),i.jsx("td",{className:"px-4 py-2",children:n.engagementType==="Salary Based"?`Salary: PKR ${n.salaryOffered||"N/A"}`:n.terms||"N/A"})]}),i.jsxs("tr",{className:"border-t border-yellow-300",children:[i.jsx("td",{className:"border-r border-yellow-300 px-4 py-2",children:"Start Date"}),i.jsx("td",{className:"px-4 py-2",children:n.startDate?new Date(n.startDate).toLocaleDateString():"N/A"})]}),i.jsxs("tr",{className:"border-t border-yellow-300",children:[i.jsx("td",{className:"border-r border-yellow-300 px-4 py-2",children:"Proposed Duration"}),i.jsx("td",{className:"px-4 py-2",children:n.proposedDuration||"N/A"})]}),i.jsxs("tr",{className:"border-t border-yellow-300",children:[i.jsx("td",{className:"border-r border-yellow-300 px-4 py-2",children:"Assigned Vehicle"}),i.jsx("td",{className:"px-4 py-2",children:n.assignedVehicle||"N/A"})]})]})]})})}),i.jsxs("div",{className:"mx-auto border border-yellow-400 rounded-md overflow-hidden w-full max-w-4xl mb-8",children:[i.jsxs("div",{className:"grid grid-cols-3 border-b border-yellow-300 py-2 px-4 font-semibold text-yellow-400",children:[i.jsx("span",{className:"pr-2",children:"Document Type"}),i.jsx("span",{className:"px-2",children:"Status"}),i.jsx("span",{className:"text-center pl-2",children:"Action"})]}),(n.documents||[]).map((_,L)=>i.jsxs("div",{className:"grid grid-cols-3 items-center py-2 px-4",children:[i.jsx("span",{className:"pr-2",children:_.type||"N/A"}),i.jsx("span",{className:"px-2",children:voe(_.status)}),i.jsx("span",{className:"pl-2",children:_.status==="Missing"?i.jsx("button",{className:"text-xs block mx-auto bg-yellow-400 text-black px-2 py-1 rounded-md",onClick:()=>console.log("Request upload for:",_.type),children:"Request Upload"}):i.jsx("button",{className:"text-xs block mx-auto bg-yellow-400 text-black px-4 py-1 rounded-md",onClick:()=>console.log("View details for:",_.type),children:"View Detail"})})]},L)),(!n.documents||n.documents.length===0)&&i.jsx("div",{className:"text-center py-4 text-yellow-400",children:"No documents available"})]}),n.approvalStatus==="Pending"?i.jsxs("div",{className:"flex justify-center items-center pt-10 gap-6",children:[i.jsx("button",{onClick:C,className:"bg-yellow-400 px-8 py-2 rounded-full text-[#013220] text-sm font-semibold hover:bg-yellow-300",disabled:a,children:"Approve"}),i.jsx("button",{onClick:()=>u(e),className:"bg-yellow-400 px-12 py-2 rounded-full text-[#013220] text-sm font-semibold hover:bg-yellow-300",disabled:a,children:"Reject"}),i.jsx("button",{onClick:()=>x(!0),className:"bg-yellow-400 px-6 py-2 rounded-full text-[#013220] text-sm font-semibold hover:bg-yellow-300",disabled:a,children:"Modify Terms"}),i.jsx("button",{onClick:()=>N(!0),className:"bg-yellow-400 px-4 py-2 rounded-full text-[#013220] text-sm font-semibold hover:bg-yellow-300",disabled:a,children:"Add Internal Note"})]}):i.jsxs("p",{className:"text-center text-yellow-400",children:["This hiring is ",n.approvalStatus,". No further actions are available."]}),c&&i.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center",children:i.jsxs("div",{className:"bg-gray-800 p-6 rounded-lg max-w-md w-full",children:[i.jsx("h2",{className:"text-xl text-yellow-400 mb-4",children:"Reject Driver Hiring"}),i.jsx("textarea",{className:"w-full bg-transparent border border-yellow-400 text-yellow-400 p-2 rounded mb-4",value:h,onChange:_=>p(_.target.value),placeholder:"Enter reason for rejection",rows:"4"}),i.jsxs("div",{className:"flex justify-end gap-2",children:[i.jsx("button",{onClick:()=>{console.log("Cancel reject modal"),p(""),u(null)},className:"bg-gray-500 text-white px-4 py-1 rounded-full hover:bg-gray-600",children:"Cancel"}),i.jsx("button",{onClick:k,className:"bg-red-800 text-white px-4 py-1 rounded-full hover:bg-red-900",disabled:a,children:"Submit"})]})]})}),m&&i.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center",children:i.jsxs("div",{className:"bg-gray-800 p-6 rounded-lg max-w-md w-full",children:[i.jsx("h2",{className:"text-xl text-yellow-400 mb-4",children:"Modify Terms"}),i.jsx("textarea",{className:"w-full bg-transparent border border-yellow-400 text-yellow-400 p-2 rounded mb-4",value:y,onChange:_=>b(_.target.value),placeholder:"Enter new terms",rows:"4"}),i.jsxs("div",{className:"flex justify-end gap-2",children:[i.jsx("button",{onClick:()=>{console.log("Cancel terms modal"),b(""),x(!1)},className:"bg-gray-500 text-white px-4 py-1 rounded-full hover:bg-gray-600",children:"Cancel"}),i.jsx("button",{onClick:T,className:"bg-yellow-400 text-[#013220] px-4 py-1 rounded-full hover:bg-yellow-300",disabled:a,children:"Submit"})]})]})}),w&&i.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center",children:i.jsxs("div",{className:"bg-gray-800 p-6 rounded-lg max-w-md w-full",children:[i.jsx("h2",{className:"text-xl text-yellow-400 mb-4",children:"Add Internal Note"}),i.jsx("textarea",{className:"w-full bg-transparent border border-yellow-400 text-yellow-400 p-2 rounded mb-4",value:A,onChange:_=>S(_.target.value),placeholder:"Enter internal note",rows:"4"}),i.jsxs("div",{className:"flex justify-end gap-2",children:[i.jsx("button",{onClick:()=>{console.log("Cancel note modal"),S(""),N(!1)},className:"bg-gray-500 text-white px-4 py-1 rounded-full hover:bg-gray-600",children:"Cancel"}),i.jsx("button",{onClick:E,className:"bg-yellow-400 text-[#013220] px-4 py-1 rounded-full hover:bg-yellow-300",disabled:a,children:"Submit"})]})]})})]})]}):i.jsx("p",{className:"text-yellow-400 text-center",children:"No data available"})},joe=Array(9).fill({businessname:"Al Noor Garage",contact:"+971-500123456",servicesOffered:"Recovery, Tuning",businessdoc:"view Document",location:"View Map"}),Noe=()=>i.jsxs("div",{className:"flex text-yellow-400 min-h-screen overflow-hidden",children:[i.jsx(Ue,{}),i.jsxs("div",{className:"flex-1 overflow-hidden",children:[i.jsx(Ha,{}),i.jsx("div",{className:"flex justify-end items-center mb-6 gap-4 ",children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{children:"Sort By:"}),i.jsxs("select",{className:"bg-transparent focus:outline",children:[i.jsx("option",{value:"",children:"Pending"}),i.jsx("option",{value:"",children:"Verified"}),i.jsx("option",{value:"",children:"Scheduled"})]})]})}),i.jsx("div",{className:"mx-4 overflow-x-auto border border-yellow-400 rounded-xl",children:i.jsxs("table",{className:"w-full text-left",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-yellow-400",children:[i.jsx("th",{className:"px-4 py-3",children:"Business' Name"}),i.jsx("th",{className:"px-4 py-3",children:"Contact Info"}),i.jsx("th",{className:"px-4 py-3",children:"Services Offered"}),i.jsx("th",{className:"px-4 py-3",children:"BusinessReg.Doc"}),i.jsx("th",{className:"px-4 py-3",children:"Location"}),i.jsx("th",{className:"px-4 py-3",children:"Action"})]})}),i.jsx("tbody",{children:joe.map((t,e)=>i.jsxs("tr",{className:"text-sm",children:[i.jsx("td",{className:"px-4 py-3",children:t.businessname}),i.jsx("td",{className:"px-4 py-3",children:t.contact}),i.jsx("td",{className:"px-4 py-3",children:t.servicesOffered}),i.jsx("td",{className:"px-4 py-3",children:i.jsx("a",{href:"#",className:"underline text-yellow-400",children:t.businessdoc})}),i.jsx("td",{className:"px-4 py-3 underline",children:t.location}),i.jsx("td",{className:"px-4 py-3",children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx($f,{className:"cursor-pointer hover:text-red-500",size:20}),i.jsx(Ff,{className:"cursor-pointer hover:text-green-500",size:16}),i.jsx("button",{className:"bg-yellow-400 text-black px-4 py-1 rounded-full text-sm hover:bg-yellow-300",children:"Scheduled"})]})})]},e))})]})})]})]}),Soe=Array(9).fill({userName:"Ahmed Raza",amount:"AED 1,500",method:"Bank Transfer",kycstatus:"Verified",datereq:"28-Aug-25",riskflag:"Normal"}),Aoe=()=>i.jsxs("div",{className:"flex text-yellow-400 min-h-screen overflow-hidden",children:[i.jsx(Ue,{}),i.jsxs("div",{className:"flex-1 overflow-hidden",children:[i.jsx(Ha,{}),i.jsxs("div",{className:"flex justify-end items-center mb-6 gap-4 ",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{children:"Date Range :"}),i.jsx("input",{type:"date",value:"",readOnly:!0,className:"bg-[#013A2A] border border-yellow-400 text-yellow-400 px-2 py-1 rounded-md w-28"}),i.jsx("span",{children:"To"}),i.jsx("input",{type:"date",value:"",readOnly:!0,className:"bg-[#013A2A] border border-yellow-400 text-yellow-400 px-2 py-1 rounded-md w-28"})]}),i.jsx("div",{children:i.jsxs("span",{children:["Risk Level:",i.jsxs("select",{name:"",id:"",className:"bg-transparent focus:outline-none",children:[i.jsx("option",{value:"",children:"High"}),i.jsx("option",{value:"",children:"Normal"})]})]})}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{children:"KYC Level:"}),i.jsxs("select",{className:"bg-transparent focus:outline",children:[i.jsx("option",{value:"",children:"Verified"}),i.jsx("option",{value:"",children:"Rejected"})]})]})]}),i.jsx("div",{className:"mx-4 overflow-x-auto border border-yellow-400 rounded-xl",children:i.jsxs("table",{className:"w-full text-left",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-yellow-400",children:[i.jsx("th",{className:"px-4 py-3",children:"User Name"}),i.jsx("th",{className:"px-4 py-3",children:"Amount"}),i.jsx("th",{className:"px-4 py-3",children:"Method"}),i.jsx("th",{className:"px-4 py-3",children:"KYC Status"}),i.jsx("th",{className:"px-4 py-3",children:"Date Requested"}),i.jsx("th",{className:"px-4 py-3",children:"Risk Flag"}),i.jsx("th",{className:"px-4 py-3",children:"Action"})]})}),i.jsx("tbody",{children:Soe.map((t,e)=>i.jsxs("tr",{className:"text-sm",children:[i.jsx("td",{className:"px-4 py-3",children:t.userName}),i.jsx("td",{className:"px-4 py-3",children:t.amount}),i.jsx("td",{className:"px-4 py-3 flex items-center gap-2",children:t.method}),i.jsx("td",{className:"px-4 py-3",children:t.kycstatus}),i.jsx("td",{className:"px-4 py-3",children:t.datereq}),i.jsx("td",{className:"px-4 py-3",children:t.riskflag}),i.jsx("td",{className:"px-4 py-3",children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx($f,{className:"cursor-pointer hover:text-red-500",size:20}),i.jsx(Ff,{className:"cursor-pointer hover:text-green-500",size:16}),i.jsx("button",{className:"bg-yellow-400 text-black px-4 py-1 rounded-full text-sm hover:bg-yellow-300",children:"Hold"})]})})]},e))})]})})]})]}),Coe=Array(9).fill({id:1,userName:"Ahmed Raza",status:"Bank Transfer",lastUpdate:"28-Aug-25",assignedto:"Normal"}),koe=()=>i.jsxs("div",{className:"flex text-yellow-400 min-h-screen overflow-hidden",children:[i.jsx(Ue,{}),i.jsxs("div",{className:"flex-1 overflow-hidden",children:[i.jsx(Ha,{}),i.jsx("div",{className:"flex justify-end items-center mb-6 gap-4 ",children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{children:"Date Range :"}),i.jsx("input",{type:"date",value:"",readOnly:!0,className:"bg-[#013A2A] border border-yellow-400 text-yellow-400 px-2 py-1 rounded-md w-28"}),i.jsx("span",{children:"To"}),i.jsx("input",{type:"date",value:"",readOnly:!0,className:"bg-[#013A2A] border border-yellow-400 text-yellow-400 px-2 py-1 rounded-md w-28"})]})}),i.jsx("div",{className:"mx-4 overflow-x-auto border border-yellow-400 rounded-xl",children:i.jsxs("table",{className:"w-full text-left",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-yellow-400",children:[i.jsx("th",{className:"px-4 py-3",children:"User Name"}),i.jsx("th",{className:"px-4 py-3",children:"Status"}),i.jsx("th",{className:"px-4 py-3",children:"Last Updated"}),i.jsx("th",{className:"px-4 py-3",children:"Assigned To"}),i.jsx("th",{className:"px-4 py-3",children:"Action"})]})}),i.jsx("tbody",{children:Coe.map((t,e)=>i.jsxs("tr",{className:"text-sm",children:[i.jsx("td",{className:"px-4 py-3",children:t.userName}),i.jsx("td",{className:"px-4 py-3",children:t.status}),i.jsx("td",{className:"px-4 py-3",children:t.lastUpdate}),i.jsx("td",{className:"px-4 py-3 flex items-center gap-2",children:t.assignedto}),i.jsx("td",{className:"px-4 py-3",children:i.jsx("div",{className:"flex items-center gap-2",children:i.jsx(Pe,{to:`/complaindetail/${t.id}`,className:"bg-yellow-400 text-[#013220] px-4 py-1 rounded-full text-sm hover:bg-yellow-300",children:"View"})})})]},e))})]})})]})]}),Doe=()=>i.jsxs("div",{className:"flex text-yellow-400 min-h-screen overflow-hidden",children:[i.jsx(Ue,{}),i.jsxs("div",{className:"flex-1 overflow-hidden",children:[i.jsx(Ha,{}),i.jsxs("div",{className:"flex items-center gap-2 mb-4 m-4",children:[i.jsx(T0,{size:25,className:"text-yellow-400"}),i.jsx(Pe,{to:"/complainresolve",className:"text-yellow-400 hover:underline",children:"Back"})]}),i.jsxs("div",{className:"p-6",children:[i.jsx("h2",{className:"text-2xl font-bold mb-6",children:"Complaint Details:"}),i.jsxs("div",{className:"space-y-8 mx-auto w-full max-w-xl",children:[i.jsxs("div",{className:"flex",children:[i.jsx("span",{className:"w-32 font-semibold",children:"Title:"}),i.jsx("span",{children:"Refund not received"})]}),i.jsxs("div",{children:[i.jsx("div",{className:"font-semibold mb-1",children:"Content:"}),i.jsx("div",{className:"border border-yellow-400 rounded-xl p-4 max-w-3xl",children:"I canceled the ride but haven’t received the refund in my wallet. Please resolve this ASAP"})]}),i.jsxs("div",{className:"flex",children:[i.jsx("span",{className:"w-32 font-semibold",children:"Attachments:"}),i.jsx("a",{href:"#",className:"text-yellow-300 underline",children:"View Image"})]}),i.jsxs("div",{className:"flex",children:[i.jsx("span",{className:"w-32 font-semibold",children:"Submitted On:"}),i.jsx("span",{children:"01–Aug–2025"})]}),i.jsxs("div",{children:[i.jsx("div",{className:"font-semibold mb-1",children:"Admin Notes:"}),i.jsx("div",{className:"border border-yellow-400 rounded-xl p-4 max-w-3xl",children:"Checked wallet history – refund not issued due to system error."})]}),i.jsxs("div",{children:[i.jsx("div",{className:"font-semibold mb-1",children:"Previous Actions:"}),i.jsx("div",{className:"text-sm text-yellow-300",children:"• Logged by Sarah @ 01–Aug–2025: Refund re-initiated"})]}),i.jsxs("div",{className:"flex",children:[i.jsx("span",{className:"w-32 font-semibold",children:"Status:"}),i.jsx("span",{children:"In Progress"})]}),i.jsx("div",{className:"rounded-full",children:i.jsxs("select",{className:"focus:outline-none w-full bg-transparent text-yellow-400 border border-yellow-400 rounded-xl py-2 px-4",children:[i.jsx("option",{children:"Assign To"}),i.jsx("option",{children:"Admin A"}),i.jsx("option",{children:"Admin B"})]})}),i.jsxs("div",{className:"flex gap-4 mt-6",children:[i.jsx("button",{className:"bg-yellow-400 text-green-900 font-semibold py-2 px-6 rounded-full",children:"Mark as Resolved"}),i.jsx("button",{className:"bg-yellow-400 text-green-900 font-semibold py-2 px-12 rounded-full",children:"Escalate"}),i.jsx("button",{className:"bg-yellow-400 text-green-900 font-semibold py-2 px-12 rounded-full",children:"Reopen"})]})]})]})]})]}),Toe=Array(9).fill({id:1,code:"AAO15",Discounttype:"15% off fare",validperiod:"01-15 Aug 2025",campaignowner:"Marketing Team",currentstatus:"Pending Review"}),Moe=()=>i.jsxs("div",{className:"flex text-yellow-400 min-h-screen overflow-hidden",children:[i.jsx(Ue,{}),i.jsxs("div",{className:"flex-1 overflow-hidden",children:[i.jsx(Ha,{}),i.jsx("div",{className:"flex justify-end items-center mb-6 gap-4 ",children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{children:"Sort By:"}),i.jsxs("select",{className:"bg-transparent focus:outline",children:[i.jsx("option",{value:"",children:"Pending"}),i.jsx("option",{value:"",children:"Approved"}),i.jsx("option",{value:"",children:"Rejected"}),i.jsx("option",{value:"",children:"Under Review"})]})]})}),i.jsx("div",{className:"mx-4 overflow-x-auto border border-yellow-400 rounded-xl",children:i.jsxs("table",{className:"w-full text-left",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-yellow-400",children:[i.jsx("th",{className:"px-4 py-3",children:"Code"}),i.jsx("th",{className:"px-4 py-3",children:"Discount Type"}),i.jsx("th",{className:"px-4 py-3",children:"Validity Period"}),i.jsx("th",{className:"px-4 py-3",children:"Campaign Owner"}),i.jsx("th",{className:"px-4 py-3",children:"Current Status"}),i.jsx("th",{className:"px-4 py-3 text-center",children:"Action"})]})}),i.jsx("tbody",{children:Toe.map((t,e)=>i.jsxs("tr",{className:"text-sm",children:[i.jsx("td",{className:"px-4 py-3",children:t.code}),i.jsx("td",{className:"px-4 py-3",children:t.Discounttype}),i.jsx("td",{className:"px-4 py-3 flex items-center gap-2",children:t.validperiod}),i.jsx("td",{className:"px-4 py-3",children:t.campaignowner}),i.jsx("td",{className:"px-4 py-3",children:t.currentstatus}),i.jsx("td",{className:"px-4 py-3",children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx($f,{className:"cursor-pointer hover:text-red-500",size:20}),i.jsx(Ff,{className:"cursor-pointer hover:text-green-500",size:16}),i.jsx("button",{className:"bg-yellow-400 text-black px-2 py-1 rounded-full hover:bg-yellow-300",children:"Suggest Changes"}),i.jsx(Pe,{to:`/promocodedetail/${t.id}`,className:"bg-yellow-400 text-black px-2 py-1 rounded-full text-xs font-semibold hover:bg-yellow-300",children:"View Details"})]})})]},e))})]})})]})]}),Eoe=()=>i.jsxs("div",{className:"flex text-yellow-400 min-h-screen overflow-hidden",children:[i.jsx(Ue,{}),i.jsxs("div",{className:"flex-1 overflow-hidden",children:[i.jsx(Ha,{}),i.jsxs("div",{children:[i.jsx("h2",{className:"text-2xl font-semibold px-4 py-4",children:"Change Request Summary:"}),i.jsx("div",{className:"flex items-center justify-center font-sans",children:i.jsxs("div",{className:"w-full max-w-4xl border border-yellow-400 rounded-xl p-10",children:[i.jsxs("div",{children:[i.jsx("p",{className:"font-semibold mb-6",children:"Requested Change:"}),i.jsxs("div",{className:"flex items-center justify-around mb-8 w-full max-w-md mx-auto",children:[i.jsx("div",{className:"inline-block border border-yellow-300 px-4 py-2 rounded-full",children:"+971-500123456"}),i.jsx("div",{className:"px-4 font-semibold",children:"To"}),i.jsx("div",{className:"inline-block border border-yellow-300 px-4 py-2 rounded-full",children:"+971-585678910"})]})]}),i.jsxs("div",{children:[i.jsx("p",{className:"font-semibold mb-6",children:"Requested Change:"}),i.jsxs("div",{className:"grid grid-cols-2 gap-y-4 text-sm mb-10 w-full max-w-md mx-auto",children:[i.jsx("p",{className:"font-semibold",children:"User:"}),i.jsx("p",{className:"",children:"Ahmed Raza"}),i.jsx("p",{className:"font-semibold",children:"User ID:"}),i.jsx("p",{className:"",children:"U-2025-01984"}),i.jsx("p",{className:"font-semibold",children:"Date of Request:"}),i.jsx("p",{className:"",children:"01 Aug 2025"})]})]}),i.jsxs("div",{className:"mb-8 w-full max-w-md mx-auto",children:[i.jsx("p",{className:"font-semibold mb-2",children:"Reason Submitted:"}),i.jsx("div",{className:"border border-yellow-400 bg-[#014733] rounded-xl p-4 text-sm",children:"I lost my old number and now use this new one. Need it updated for verification purposes."})]}),i.jsxs("div",{children:[i.jsx("p",{className:"font-semibold mb-2",children:"Supporting Document(s):"}),i.jsxs("div",{className:"space-y-2 text-sm w-full max-w-xl mx-auto",children:[i.jsxs("div",{className:" hover:text-yellow-200 cursor-pointer flex items-center",children:[i.jsx(f6,{size:20})," ",i.jsx("span",{className:"ml-2",children:"View Uploaded ID"})]}),i.jsxs("div",{className:" hover:text-yellow-200 cursor-pointer flex items-center",children:[i.jsx(f6,{size:20}),i.jsx("span",{className:"ml-2",children:"View Selfie with Document"})]})]})]})]})})]}),i.jsxs("div",{className:"mt-10 flex justify-center gap-10",children:[i.jsx("button",{className:"px-6 py-2 rounded-full text-green-900 bg-yellow-400 text-sm font-semibold",children:"Approve Request"}),i.jsx("button",{className:"px-8 py-2 rounded-full text-green-900 bg-yellow-400 text-sm font-semibold",children:"Reject Request"}),i.jsx("button",{className:"px-4 py-2 rounded-full text-green-900 bg-yellow-400 text-sm font-semibold",children:"Flag for Audit Review"})]})]})]}),Ooe=()=>i.jsxs("div",{className:"flex text-yellow-400 min-h-screen overflow-hidden",children:[i.jsx(Ue,{}),i.jsxs("div",{className:"flex-1 overflow-hidden",children:[i.jsx(Ha,{}),i.jsxs("div",{className:"flex items-center gap-2 mb-4 m-4",children:[i.jsx(T0,{size:25,className:"text-yellow-400"}),i.jsx(Pe,{to:"/promocode",className:"text-yellow-400 hover:underline",children:"Back"})]}),i.jsxs("div",{className:"p-8",children:[i.jsx("h2",{className:"text-2xl font-bold mb-6",children:"Promo Code Details:"}),i.jsxs("div",{className:"w-full text-yellow-400 flex flex-col items-center font-sans",children:[i.jsxs("div",{className:"w-full max-w-2xl border border-yellow-400 rounded-xl p-8",children:[i.jsxs("div",{className:"grid grid-cols-2 gap-y-4 text-sm mb-8",children:[i.jsx("p",{className:"font-semibold",children:"Code:"}),i.jsx("p",{className:"",children:"AAA015"}),i.jsx("p",{className:"font-semibold",children:"Discount Structure:"}),i.jsx("p",{className:"",children:"15% off on total ride fare"}),i.jsx("p",{className:"font-semibold",children:"Redemption Limit:"}),i.jsx("p",{className:"",children:"1 per user, max 2,000 redemptions"}),i.jsx("p",{className:"font-semibold",children:"Eligible Users:"}),i.jsx("p",{className:"",children:"All UAE users"}),i.jsx("p",{className:"font-semibold",children:"Distribution Channel:"}),i.jsx("p",{className:"",children:"In-app banner + push notifications"}),i.jsx("p",{className:"col-span-2 font-bold mt-4",children:"Budget & Performance Impact"}),i.jsx("p",{className:"font-semibold",children:"Estimated Cost to Platform:"}),i.jsx("p",{className:"",children:"AED 60,000"}),i.jsx("p",{className:"font-semibold",children:"Projected Revenue Influence:"}),i.jsx("p",{className:"",children:"AED 60,000"}),i.jsx("p",{className:"font-semibold",children:"Forecasted ROI:"}),i.jsx("p",{className:"",children:"AED 60,000"}),i.jsx("p",{className:"font-semibold",children:"Break-even Target:"}),i.jsx("p",{className:"",children:"900 redemptions"})]}),i.jsxs("div",{children:[i.jsx("p",{className:"font-semibold mb-2",children:"Team Submission Notes"}),i.jsx("div",{className:"border border-yellow-400 rounded-md p-4 text-sm",children:i.jsx("p",{children:" Proposed as part of our UAE National Day awareness campaign. Targeting increased engagement in key metro areas."})})]})]}),i.jsxs("div",{className:"mt-6 flex gap-10",children:[i.jsx("button",{className:"bg-yellow-400 text-green-900 font-sm font-semibold px-10 py-2 rounded-full shadow hover:bg-yellow-300 transition-all",children:"Approve Offer"}),i.jsx("button",{className:"bg-yellow-400 text-green-900 font-sm font-semibold px-10 py-2 rounded-full shadow hover:bg-yellow-300 transition-all",children:"Reject Proposal"}),i.jsx("button",{className:"bg-yellow-400 text-green-900 font-sm font-semibold px-6 py-2 rounded-full shadow hover:bg-yellow-300 transition-all",children:"Suggest Modifications"})]})]})]})]})]});Ps.register(Do,tc,ec,Qf);const Poe=()=>{const t={labels:["⭐ 1-Star: 2%","⭐ 2-Star: 3%","⭐ 3-Star: 5%","⭐ 4-Star: 20%","⭐ 5-Star: 70%"],datasets:[{data:[10,10,10,20,10],backgroundColor:["#99ff66","#0000cc","#003340","#ff0000","#ffcc00"],borderWidth:0}]},e={responsive:!0,plugins:{legend:{display:!1},tooltip:{enabled:!0},datalabels:{color:"#fff",font:{size:10},textStrokeColor:"#000",textStrokeWidth:3,formatter:(r,n)=>n.chart.data.labels[n.dataIndex]}}};return i.jsxs("div",{className:"p-4 rounded-lg",children:[i.jsx("h2",{className:"text-xl font-bold text-yellow-400 mb-4",children:"PieChart"}),i.jsx("div",{style:{width:"300px",margin:"auto"},children:i.jsx(Zf,{data:t,options:e})})]})},_oe=()=>{const t=[{reviewer:"Ahmed Ali",role:"Customer",rating:4,Reviewtext:"Great ride",target:"Driver: Asif Khan",date:"Aug 2/25"},{reviewer:"Sana",role:"Driver",rating:5,Reviewtext:"Very cooperative rider",target:"Customer: Ahmed Ali",date:"Aug 2/25"},{reviewer:"Zeeshan",role:"Customer",rating:3,Reviewtext:"Average experience",target:"Driver: Bilal",date:"Aug 1/25"}];return i.jsxs("div",{className:"flex text-yellow-400 min-h-screen overflow-hidden",children:[i.jsx(Ue,{}),i.jsxs("div",{className:"font-sans w-full max-w-5xl mx-auto px-6 py-10 flex flex-col items-center space-y-10",children:[i.jsx("div",{className:"w-full max-w-2xl mx-auto border border-yellow-400 text-sm",children:i.jsxs("div",{className:"text-center",children:[i.jsxs("div",{className:"px-4 py-2 border-b border-yellow-300 font-semibold flex justify-between items-center",children:[i.jsx("p",{children:"Average Rating (All Time):"}),i.jsx("span",{className:"flex justify-center items-center gap-1 mt-1",children:"⭐ 4.3 / 5"})]}),i.jsxs("div",{className:"px-4 py-2 border-b border-yellow-300 font-semibold flex justify-between items-center",children:[i.jsx("p",{children:"Total Reviews Received"}),i.jsx("p",{children:"12,340"})]}),i.jsxs("div",{className:"px-4 py-2 border-b border-yellow-300 font-semibold flex justify-between items-center",children:[i.jsx("p",{children:"Reviews This Month"}),i.jsx("span",{className:"mt-1 block",children:"892"})]}),i.jsxs("div",{className:"px-4 py-2 border-b border-yellow-300 font-semibold flex justify-between items-center",children:[i.jsx("p",{children:"Flagged Reviews"}),i.jsx("span",{className:"mt-1 block",children:"36"})]})]})}),i.jsx("div",{className:"w-full max-w-5xl",children:i.jsx(Poe,{})}),i.jsxs("div",{className:"w-full max-w-5xl flex flex-col md:flex-row md:items-center justify-end gap-4 text-sm",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("label",{htmlFor:"from",className:"font-medium",children:"Date Range:"}),i.jsx("input",{type:"date",id:"from",className:"bg-transparent border border-yellow-300 p-1 rounded",defaultValue:"2025-07-18"}),i.jsx("span",{children:"To"}),i.jsx("input",{type:"date",id:"to",className:"border border-yellow-300 bg-transparent p-1 rounded",defaultValue:"2025-07-21"})]}),i.jsxs("div",{className:"flex items-center",children:[i.jsx("label",{htmlFor:"role",className:"font-medium mr-2",children:"Role:"}),i.jsxs("select",{id:"role",className:"bg-transparent bg-[#013220] focus:outline-none border border-yellow-300 p-1 rounded text-yellow-400",children:[i.jsx("option",{children:"Driver"}),i.jsx("option",{children:"Customer"})]})]})]}),i.jsx("div",{className:"w-full max-w-5xl border border-yellow-400 rounded-xl overflow-x-auto text-sm",children:i.jsxs("table",{className:"min-w-full text-left",children:[i.jsx("thead",{className:"text-yellow-300",children:i.jsxs("tr",{children:[i.jsx("th",{className:"p-3",children:"Reviewer"}),i.jsx("th",{className:"p-3",children:"Role"}),i.jsx("th",{className:"p-3",children:"Rating"}),i.jsx("th",{className:"p-3",children:"Review Text"}),i.jsx("th",{className:"p-3",children:"Target"}),i.jsx("th",{className:"p-3",children:"Date"}),i.jsx("th",{className:"p-3",children:"Action"})]})}),i.jsx("tbody",{children:t.map((e,r)=>i.jsxs("tr",{className:"border-t border-yellow-400",children:[i.jsx("td",{className:"p-3",children:e.reviewer}),i.jsx("td",{className:"p-3",children:e.role}),i.jsx("td",{className:"p-3",children:"⭐".repeat(e.rating)}),i.jsx("td",{className:"p-3",children:e.Reviewtext}),i.jsx("td",{className:"p-3",children:e.target}),i.jsx("td",{className:"p-3",children:e.date}),i.jsx("td",{className:"p-3",children:i.jsxs("div",{className:"flex gap-2 items-center",children:[e.role=="Customer"?i.jsx(f_,{size:25,className:"border border-yellow-300 rounded-full p-1 text-yellow-300"}):i.jsx(g_,{size:25,className:"text-yellow-300 border border-yellow-300 rounded-full p-1"}),i.jsx("button",{className:"bg-yellow-400 text-black px-3 py-1 rounded hover:bg-yellow-300 text-xs",children:"View"}),i.jsx(G2,{size:25,className:"border border-yellow-300 rounded-full p-1 cursor-pointer"})]})})]},r))})]})})]})]})},Roe=()=>{const t=[{name:"Total Signups",data:[60,50,90,40,60,30,20]},{name:"KYC Verifications",data:[45,20,80,35,50,70,60]},{name:"Active Conversions",data:[35,75,25,45,40,60,30]}],e={chart:{type:"line",height:350,background:"#013220",toolbar:{show:!1}},stroke:{curve:"straight",width:3},colors:["#DDC104","#00FF66","#3B3BFF"],xaxis:{categories:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],axisBorder:{show:!0,color:"#DDC104"},axisTicks:{show:!0,color:"#DDC104"},labels:{style:{colors:"#FFFFFF"}}},yaxis:{axisBorder:{show:!0,color:"#DDC104"},axisTicks:{show:!0,color:"#DDC104"},labels:{style:{colors:"#FFFFFF"}}},grid:{borderColor:"#DDC104",strokeDashArray:0},legend:{position:"right",labels:{colors:"#FFFFFF"},markers:{radius:12}},markers:{size:5},tooltip:{theme:"dark"}};return i.jsxs("div",{className:"w-full max-w-5xl border-2 border-yellow-400 p-4 rounded",style:{backgroundColor:"#013220"},children:[i.jsxs("div",{className:"flex justify-between items-center border-b border-[#DDC104] pb-2 mb-4",children:[i.jsx("h2",{className:"text-xl font-bold text-[#DDC104]",children:"Chart Type:"}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx("p",{className:"text-sm text-[#DDC104]",children:"Day"}),i.jsx(of,{className:"text-xl text-[#DDC104] cursor-pointer"})]})]}),i.jsx(Qr,{options:e,series:t,type:"line",height:350})]})},HT=({data:t})=>{const e={chart:{type:"area",sparkline:{enabled:!0}},colors:["#FFD700"],stroke:{curve:"smooth",width:2},fill:{type:"gradient",gradient:{shadeIntensity:1,opacityFrom:.3,opacityTo:.05,stops:[0,90,100],colorStops:[{offset:0,color:"#FFD700",opacity:.4},{offset:100,color:"#FFD700",opacity:.05}]}},markers:{size:0},tooltip:{enabled:!1}},r=[{name:"Trend",data:t||[10,15,12,18,20,17,25]}];return i.jsx("div",{className:"w-full",children:i.jsx(Qr,{options:e,series:r,type:"area",height:40})})},_s=()=>{const t=Cr(),e=O.useRef(null),r=s=>`menu-tab ${t.pathname===s?"active":""}`,n=()=>{e.current.scrollBy({left:-150,behavior:"smooth"})},a=()=>{e.current.scrollBy({left:150,behavior:"smooth"})};return i.jsxs("div",{className:"relative border-b border-yellow-400 px-6 py-2",children:[i.jsx("button",{onClick:n,className:"absolute left-0 top-1/2 -translate-y-1/2 z-10 px-1",children:i.jsx(F4,{size:20})}),i.jsxs("div",{ref:e,className:"mx-6 flex gap-x-4 overflow-x-auto whitespace-nowrap scrollbar-hide",children:[i.jsx(Pe,{to:"/reportanalytics",className:r("/reportanalytics"),children:"Analytics"}),i.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),i.jsx(Pe,{to:"/driverreport",className:r("/driverreport"),children:"Driver Reports"}),i.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),i.jsx(Pe,{to:"/rideservicereport",className:r("/rideservicereport"),children:"Ride & Service Reports"}),i.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),i.jsx(Pe,{to:"/earningandcommission",className:r("/earningandcommission"),children:"Earning & Commissions"}),i.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),i.jsx(Pe,{to:"/supportreport",className:r("/supportreport"),children:"Support Reports"}),i.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),i.jsx(Pe,{to:"/approvalactivities",className:r("/approvalactivities"),children:"Approved Activities"}),i.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),i.jsx(Pe,{to:"/teammlmreport",className:r("/teammlmreport"),children:"Team MLM Reports"}),i.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),i.jsx(Pe,{to:"/withdrawalandtransaction",className:r("/withdrawalandtransaction"),children:"Withdrawal & Transaction Logs"}),i.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),i.jsx(Pe,{to:"/customreportgenerator",className:r("/customreportgenerator"),children:"Custom Report Generator"})]}),i.jsx("button",{onClick:a,className:"absolute right-0 top-1/2 -translate-y-1/2 z-10 px-1",children:i.jsx($4,{size:20})})]})},$T=[{total:"Total User",percent:"1,250",chartData:[10,20,15,30,25,35],Icon:M0},{total:"Active Users",percent:"1,250",chartData:[5,10,8,12,14,18],Icon:C_},{total:"Inactive Users",percent:"1,250",chartData:[20,18,16,14,12,10],Icon:j_},{total:"Verified KYC",percent:"1,250",chartData:[5,15,25,35,30,40],Icon:Gq},{total:"Unverified KYC",percent:"1,250",chartData:[40,35,30,25,20,15],Icon:Iq}],Loe=()=>i.jsxs("div",{className:"flex min-h-screen",children:[i.jsx(Ue,{}),i.jsxs("div",{className:"flex-1 overflow-hidden",children:[i.jsx(_s,{}),i.jsxs("div",{className:" mr-10 px-10 py-10 overflow-hidden",children:[i.jsx("div",{className:"flex items-center gap-4 py-2 justify-end ",children:i.jsxs("div",{className:"flex items-center gap-2 text-yellow-400 text-sm",children:[i.jsx("label",{htmlFor:"from",children:"From:"}),i.jsx("input",{type:"date",id:"from",className:"bg-transparent border border-yellow-400 text-yellow-400 px-2 py-1 rounded text-sm focus:outline-none"}),i.jsx("label",{htmlFor:"to",children:"To:"}),i.jsx("input",{type:"date",id:"to",className:"bg-transparent border border-yellow-400 text-yellow-400 px-2 py-1 rounded text-sm focus:outline-none"})]})}),i.jsx("div",{className:"grid grid-cols-1 mb-6",children:$T.slice(0,1).map((t,e)=>{const r=t.Icon;return i.jsxs("div",{className:"flex flex-col gap-4 shadow-lg rounded-lg outline outline-black/20 px-5 py-5 bg-gradient-to-b from-[#038A59] to-[#013723] shadow-black/80",children:[i.jsxs("div",{className:"flex gap-2 items-center",children:[i.jsx(r,{size:30}),i.jsx("p",{className:"text-lg font-semibold m-0 tracking-wide",children:t.total})]}),i.jsx("h2",{className:"text-3xl font-bold",children:t.percent}),i.jsx(HT,{data:t.chartData})]},e)})}),i.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6",children:$T.slice(1).map((t,e)=>{const r=t.Icon;return i.jsxs("div",{className:"flex flex-col gap-4 shadow-lg rounded-lg outline outline-black/20 px-5 py-5 bg-gradient-to-b from-[#038A59] to-[#013723] shadow-black/80",children:[i.jsxs("div",{className:"flex gap-2 items-center",children:[i.jsx(r,{size:30}),i.jsx("p",{className:"text-lg font-semibold m-0 tracking-wide",children:t.total})]}),i.jsx("h2",{className:"text-3xl font-bold",children:t.percent}),i.jsx(HT,{data:t.chartData})]},e)})}),i.jsx("div",{className:"pt-12",children:i.jsx(Roe,{})})]})]})]}),zoe=({data:t})=>{const e={chart:{type:"area",sparkline:{enabled:!0}},colors:["#FFD700"],stroke:{curve:"smooth",width:2},fill:{type:"gradient",gradient:{shadeIntensity:1,opacityFrom:.3,opacityTo:.05,stops:[0,90,100],colorStops:[{offset:0,color:"#FFD700",opacity:.4},{offset:100,color:"#FFD700",opacity:.05}]}},markers:{size:0},tooltip:{enabled:!1}},r=[{name:"Trend",data:t||[10,15,12,18,20,17,25]}];return i.jsx("div",{className:"w-full",children:i.jsx(Qr,{options:e,series:r,type:"area",height:40})})},Ioe=()=>{const t=[{name:"New Driver Signup",data:[60,50,90,40,60,30,20]},{name:"Active Drivers",data:[45,20,80,35,50,70,60]}],e={chart:{type:"line",height:350,background:"#013220",toolbar:{show:!1}},stroke:{curve:"straight",width:3},colors:["#DDC104","#00FF66"],xaxis:{categories:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],axisBorder:{show:!0,color:"#DDC104"},axisTicks:{show:!0,color:"#DDC104"},labels:{style:{colors:"#FFFFFF"}}},yaxis:{axisBorder:{show:!0,color:"#DDC104"},axisTicks:{show:!0,color:"#DDC104"},labels:{style:{colors:"#FFFFFF"}}},grid:{borderColor:"#DDC104",strokeDashArray:0},legend:{position:"right",labels:{colors:"#FFFFFF"},markers:{radius:12}},markers:{size:5},tooltip:{theme:"dark"}};return i.jsxs("div",{className:"w-full max-w-5xl border-2 border-yellow-400 p-4 rounded",style:{backgroundColor:"#013220"},children:[i.jsxs("div",{className:"flex justify-between items-center border-b border-[#DDC104] pb-2 mb-4",children:[i.jsx("h2",{className:"text-xl font-bold text-[#DDC104]",children:"Chart Type:"}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx("p",{className:"text-sm text-[#DDC104]",children:"Day"}),i.jsx(of,{className:"text-xl text-[#DDC104] cursor-pointer"})]})]}),i.jsx(Qr,{options:e,series:t,type:"line",height:350})]})},Boe=[{total:"Total Driver",percent:"1,250",desc:"Last updated Aug 3, 2025",chartData:[20,18,16,14,12,10],Icon:j_},{total:"Online Drivers",percent:"1,250",desc:"Currently active & available for booking",chartData:[5,15,25,35,30,40],Icon:C_},{total:"Unverified KYC",percent:"1,250",desc:"Driver inactive, logged out, or unavailable",chartData:[40,35,30,25,20,15],Icon:Xq}],Foe=()=>i.jsxs("div",{className:"flex min-h-screen",children:[i.jsx(Ue,{}),i.jsxs("div",{className:"flex-1 overflow-hidden",children:[i.jsx(_s,{}),i.jsxs("div",{className:"mr-10 px-10 py-10 overflow-hidden",children:[i.jsxs("div",{className:"flex flex-wrap justify-between items-center gap-4 py-2",children:[i.jsxs("div",{className:"flex items-center gap-2 text-yellow-400 text-sm",children:[i.jsx("label",{htmlFor:"from",children:"Date Range:"}),i.jsx("input",{type:"date",id:"from",className:"bg-transparent border border-yellow-400 text-yellow-400 px-2 py-1 rounded text-sm focus:outline-none"}),i.jsx("label",{htmlFor:"to",children:"To:"}),i.jsx("input",{type:"date",id:"to",className:"bg-transparent border border-yellow-400 text-yellow-400 px-2 py-1 rounded text-sm focus:outline-none"})]}),i.jsx("div",{className:"flex text-yellow-400 text-sm",children:i.jsxs("div",{className:"flex items-center",children:[i.jsx("label",{htmlFor:"service",children:"Service Type:"}),i.jsxs("select",{id:"service",className:"bg-transparent text-yellow-400 rounded focus:outline-none text-sm",children:[i.jsx("option",{className:"bg-black text-yellow-400",children:"All"}),i.jsx("option",{className:"bg-black text-yellow-400",children:"Recovery"}),i.jsx("option",{className:"bg-black text-yellow-400",children:"Workshop"})]})]})}),i.jsxs("div",{className:"flex items-center",children:[i.jsx("label",{htmlFor:"city",children:"City:"}),i.jsxs("select",{id:"city",className:"bg-transparent text-yellow-400 rounded focus:outline-none text-sm",children:[i.jsx("option",{className:"bg-black text-yellow-400",children:"All"}),i.jsx("option",{className:"bg-black text-yellow-400",children:"Dubai"}),i.jsx("option",{className:"bg-black text-yellow-400",children:"Sharjah"}),i.jsx("option",{className:"bg-black text-yellow-400",children:"Abu Dhabi"})]})]}),i.jsxs("div",{className:"flex items-center",children:[i.jsx("label",{htmlFor:"day",children:"Day:"}),i.jsxs("select",{id:"day",className:"bg-transparent text-yellow-400 rounded focus:outline-none text-sm",children:[i.jsx("option",{className:"bg-black text-yellow-400",children:"All"}),i.jsx("option",{className:"bg-black text-yellow-400",children:"Today"}),i.jsx("option",{className:"bg-black text-yellow-400",children:"Last 7 Days"}),i.jsx("option",{className:"bg-black text-yellow-400",children:"Last 30 Days"})]})]})]}),i.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6 mt-6",children:Boe.map((t,e)=>{const r=t.Icon;return i.jsxs("div",{className:"flex flex-col gap-4 shadow-lg rounded-lg outline outline-black/20 px-5 py-5 bg-gradient-to-b from-[#038A59] to-[#013723] shadow-black/80",children:[i.jsxs("div",{className:"flex gap-2 items-center",children:[i.jsx(r,{size:30}),i.jsx("p",{className:"text-lg font-semibold m-0 tracking-wide",children:t.total})]}),i.jsx("h2",{className:"text-3xl font-bold",children:t.percent}),i.jsx("p",{className:"text-sm",children:t.desc}),i.jsx(zoe,{data:t.chartData})]},e)})}),i.jsx("div",{className:"pt-12",children:i.jsx(Ioe,{})})]})]})]}),Hoe=()=>{const t=[{name:"New Bookings",data:[60,50,90,40,60,30,20]},{name:"Completed Rides",data:[45,20,80,35,50,70,60]},{name:"Cancellations",data:[35,75,25,45,40,60,30]}],e={chart:{type:"line",height:350,background:"#013220",toolbar:{show:!1}},stroke:{curve:"straight",width:3},colors:["#DDC104","#00FF66","#FF0000"],xaxis:{categories:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],axisBorder:{show:!0,color:"#DDC104"},axisTicks:{show:!0,color:"#DDC104"},labels:{style:{colors:"#FFFFFF"}}},yaxis:{axisBorder:{show:!0,color:"#DDC104"},axisTicks:{show:!0,color:"#DDC104"},labels:{style:{colors:"#FFFFFF"}}},grid:{borderColor:"#DDC104",strokeDashArray:0},legend:{position:"right",labels:{colors:"#FFFFFF"},markers:{radius:12}},markers:{size:5},tooltip:{theme:"dark"}};return i.jsxs("div",{className:"w-full max-w-5xl",children:[i.jsxs("div",{className:"flex flex-wrap justify-between items-center gap-4 pb-1",children:[i.jsxs("div",{className:"flex flex-wrap items-center gap-4 text-yellow-400 text-sm",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{children:"Date Range:"}),i.jsx("input",{type:"date",className:"bg-transparent border border-yellow-400 text-yellow-400 px-2 py-1 rounded"}),i.jsx("span",{children:"To"}),i.jsx("input",{type:"date",className:"bg-transparent border border-yellow-400 text-yellow-400 px-2 py-1 rounded"})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{children:"Platform"}),i.jsxs("select",{className:"bg-transparent border border-yellow-400 text-yellow-400 px-2 py-1 rounded",children:[i.jsx("option",{className:"bg-black text-yellow-400",children:"All"}),i.jsx("option",{className:"bg-black text-yellow-400",children:"App"}),i.jsx("option",{className:"bg-black text-yellow-400",children:"Web"})]})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{children:"City"}),i.jsxs("select",{className:"bg-transparent border border-yellow-400 text-yellow-400 px-2 py-1 rounded",children:[i.jsx("option",{className:"bg-black text-yellow-400",children:"All"}),i.jsx("option",{className:"bg-black text-yellow-400",children:"Dubai"}),i.jsx("option",{className:"bg-black text-yellow-400",children:"Abu Dhabi"})]})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{children:"Day"}),i.jsxs("select",{className:"bg-transparent border border-yellow-400 text-yellow-400 px-2 py-1 rounded",children:[i.jsx("option",{className:"bg-black text-yellow-400",children:"All"}),i.jsx("option",{className:"bg-black text-yellow-400",children:"Weekdays"}),i.jsx("option",{className:"bg-black text-yellow-400",children:"Weekends"})]})]})]}),i.jsxs("div",{className:"flex items-center gap-2 text-yellow-400",children:[i.jsx("span",{children:"Day"}),i.jsx(of,{size:20})]})]}),i.jsxs("div",{className:"w-full max-w-5xl border-2 border-yellow-400 p-4 rounded",style:{backgroundColor:"#013220"},children:[i.jsxs("div",{className:"flex justify-between items-center border-b border-[#DDC104] pb-2 mb-4",children:[i.jsx("h2",{className:"text-xl font-bold text-[#DDC104]",children:"Chart Type:"}),i.jsxs("div",{className:"flex gap-2 items-center",children:[i.jsx("p",{className:"text-sm text-[#DDC104]",children:"Day"}),i.jsx(of,{className:"text-xl text-[#DDC104] cursor-pointer"})]})]}),i.jsx(Qr,{options:e,series:t,type:"line",height:350})]})]})},YT=({data:t})=>{const e={chart:{type:"area",sparkline:{enabled:!0}},colors:["#FFD700"],stroke:{curve:"smooth",width:2},fill:{type:"gradient",gradient:{shadeIntensity:1,opacityFrom:.3,opacityTo:.05,stops:[0,90,100],colorStops:[{offset:0,color:"#FFD700",opacity:.4},{offset:100,color:"#FFD700",opacity:.05}]}},markers:{size:0},tooltip:{enabled:!1}},r=[{name:"Trend",data:t||[10,15,12,18,20,17,25]}];return i.jsx("div",{className:"w-full",children:i.jsx(Qr,{options:e,series:r,type:"area",height:40})})},$oe=()=>{const t=[{data:[85,70,45,90,40]}],e={chart:{type:"bar",height:350,background:"#013220",toolbar:{show:!1}},plotOptions:{bar:{horizontal:!0,barHeight:"50%",distributed:!0}},colors:["#DDC104","#0000FF","#2ECC71","#FF0000","#00CFFF"],dataLabels:{enabled:!1,style:{colors:["#FFFFFF"]}},xaxis:{categories:["Ride","Recovery","Shifting & Movers","Delivery","Tourism"],labels:{style:{colors:"#FFD700"}},axisBorder:{show:!0,color:"#DDC104"},axisTicks:{show:!0,color:"#DDC104"}},yaxis:{labels:{style:{colors:"#FFD700"}}},grid:{borderColor:"#DDC104"},tooltip:{theme:"dark"},legend:{show:!1}};return i.jsxs("div",{className:"w-full max-w-5xl p-4 rounded",style:{backgroundColor:"#013220"},children:[i.jsx("h2",{className:"text-lg font-bold mb-4",children:"Service-Wise Success Rate:"}),i.jsx(Qr,{options:e,series:t,type:"bar",height:350})]})};Ps.register(Do,tc,ec);const Yoe={id:"rotatedLabels",afterDraw(t){const{ctx:e,chartArea:{width:r,height:n}}=t,a=t.getDatasetMeta(0),s=t.data.datasets[0],o=t.data.labels,l=s.data.reduce((c,u)=>c+u,0);e.save(),e.font=" 2px sans-serif",e.fillStyle="yellow",e.textAlign="center",e.textBaseline="middle",a.data.forEach((c,u)=>{const{startAngle:h,endAngle:p,innerRadius:m,outerRadius:x}=c,y=(h+p)/2,b=(m+x)/2,w=r/2+Math.cos(y)*b,N=n/2+Math.sin(y)*b;e.translate(w,N),e.rotate(y);const A=Math.round(s.data[u]/l*100);e.fillText(`${o[u]} ${A}%`,0,0),e.rotate(-y),e.translate(-w,-N)}),e.restore()}},Uoe=()=>{const t={labels:["Ride","Recovery","Shifting&Movers","Delivery","Tourism"],datasets:[{data:[68,40,30,20,20],backgroundColor:["#FFD700","#FF0000","#004d26","#0000CC","#66FF66"],borderWidth:0}]},e={responsive:!0,plugins:{legend:{display:!1},tooltip:{enabled:!0}}};return i.jsx("div",{style:{width:"80px",margin:"auto"},children:i.jsx(Zf,{data:t,options:e,plugins:[Yoe]})})},UT=[{total:"Total Bookings",percent:"1,832",desc:"Date Range: July 1-Aug 3",chartData:[10,20,15,30,25,35],Icon:x_},{total:"Completed Rides",percent:"1,702(93%)",chartData:[5,10,8,12,14,18],Icon:Lq},{total:"Cancelled Rides",percent:"130(7%)",chartData:[20,18,16,14,12,10],Icon:_q},{total:"Top Service Type",percent:"Ride (68%)",chartData:[5,15,25,35,30,40],Icon:hre},{total:"Peak Usage Time",percent:"5–7 PM, Mon–Fri",chartData:[40,35,30,25,20,15],Icon:Aq}],Woe=()=>i.jsxs("div",{className:"flex min-h-screen",children:[i.jsx(Ue,{}),i.jsxs("div",{className:"flex-1 overflow-hidden",children:[i.jsx(_s,{}),i.jsxs("div",{className:"mr-10 px-10 pb-6 pt-12 overflow-hidden",children:[i.jsxs("div",{className:"flex flex-wrap justify-between items-center gap-4 pb-6 ",children:[i.jsx("div",{className:"flex flex-wrap items-center gap-4 text-yellow-400 text-sm",children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{children:"Date Range:"}),i.jsx("input",{type:"date",className:"bg-transparent border border-yellow-400 text-yellow-400 px-2 py-1 rounded"}),i.jsx("span",{children:"To"}),i.jsx("input",{type:"date",className:"bg-transparent border border-yellow-400 text-yellow-400 px-2 py-1 rounded"})]})}),i.jsxs("div",{className:"flex items-center gap-2 text-yellow-400",children:[i.jsx("span",{children:"Day"}),i.jsx(of,{size:20})]})]}),i.jsx("div",{className:"grid grid-cols-1 mb-6",children:UT.slice(0,1).map((t,e)=>{const r=t.Icon;return i.jsxs("div",{className:"flex flex-col gap-4 shadow-lg rounded-lg px-5 py-5 bg-gradient-to-b from-[#038A59] to-[#013723]",children:[i.jsxs("div",{className:"flex gap-2 items-center",children:[i.jsx(r,{size:30,className:"text-yellow-400"}),i.jsx("p",{className:"text-xl font-semibold",children:t.total})]}),i.jsx("h2",{className:"text-3xl font-bold",children:t.percent}),i.jsx("p",{className:"text-sm text-yellow-400",children:t.desc}),i.jsx(YT,{data:t.chartData})]},e)})}),i.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:UT.slice(1).map((t,e)=>{const r=t.Icon;return i.jsxs("div",{className:"flex flex-col gap-4 shadow-lg rounded-lg px-2 py-5 bg-gradient-to-b from-[#038A59] to-[#013723]",children:[i.jsxs("div",{className:"flex gap-2 items-center",children:[i.jsx(r,{size:30,className:"text-yellow-400"}),i.jsx("p",{className:"text-md font-bold",children:t.total})]}),e===2?i.jsxs("div",{className:"flex items-center justify-center ",children:[i.jsx("h2",{className:"text-md ",children:t.percent}),i.jsx("div",{className:"flex-1",children:i.jsx(Uoe,{})})]}):i.jsxs("div",{children:[i.jsx("h2",{className:"text-md font-bold",children:t.percent}),i.jsx(YT,{data:t.chartData})]})]},e)})}),i.jsx("div",{className:"pt-12",children:i.jsx(Hoe,{})}),i.jsx("div",{className:"pt-6",children:i.jsx($oe,{})})]})]})]});var G1={},K1={},WT;function Xoe(){return WT||(WT=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r){return r==="__proto__"}t.isUnsafeProperty=e}(K1)),K1}var Z1={},XT;function ZL(){return XT||(XT=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r){switch(typeof r){case"number":case"symbol":return!1;case"string":return r.includes(".")||r.includes("[")||r.includes("]")}}t.isDeepKey=e}(Z1)),Z1}var Q1={},VT;function QL(){return VT||(VT=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r){return typeof r=="string"||typeof r=="symbol"?r:Object.is(r?.valueOf?.(),-0)?"-0":String(r)}t.toKey=e}(Q1)),Q1}var J1={},qT;function BN(){return qT||(qT=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r){const n=[],a=r.length;if(a===0)return n;let s=0,o="",l="",c=!1;for(r.charCodeAt(0)===46&&(n.push(""),s++);s<a;){const u=r[s];l?u==="\\"&&s+1<a?(s++,o+=r[s]):u===l?l="":o+=u:c?u==='"'||u==="'"?l=u:u==="]"?(c=!1,n.push(o),o=""):o+=u:u==="["?(c=!0,o&&(n.push(o),o="")):u==="."?o&&(n.push(o),o=""):o+=u,s++}return o&&n.push(o),n}t.toPath=e}(J1)),J1}var GT;function FN(){return GT||(GT=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=Xoe(),r=ZL(),n=QL(),a=BN();function s(l,c,u){if(l==null)return u;switch(typeof c){case"string":{if(e.isUnsafeProperty(c))return u;const h=l[c];return h===void 0?r.isDeepKey(c)?s(l,a.toPath(c),u):u:h}case"number":case"symbol":{typeof c=="number"&&(c=n.toKey(c));const h=l[c];return h===void 0?u:h}default:{if(Array.isArray(c))return o(l,c,u);if(Object.is(c?.valueOf(),-0)?c="-0":c=String(c),e.isUnsafeProperty(c))return u;const h=l[c];return h===void 0?u:h}}}function o(l,c,u){if(c.length===0)return u;let h=l;for(let p=0;p<c.length;p++){if(h==null||e.isUnsafeProperty(c[p]))return u;h=h[c[p]]}return h===void 0?u:h}t.get=s}(G1)),G1}var ew,KT;function Voe(){return KT||(KT=1,ew=FN().get),ew}var qoe=Voe();const Vl=ns(qoe);var Goe=AL(),Pn=t=>t===0?0:t>0?1:-1,ca=t=>typeof t=="number"&&t!=+t,Nl=t=>typeof t=="string"&&t.indexOf("%")===t.length-1,Oe=t=>(typeof t=="number"||t instanceof Number)&&!ca(t),Es=t=>Oe(t)||typeof t=="string",Koe=0,vf=t=>{var e=++Koe;return"".concat(t||"").concat(e)},rs=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Oe(e)&&typeof e!="string")return n;var s;if(Nl(e)){if(r==null)return n;var o=e.indexOf("%");s=r*parseFloat(e.slice(0,o))/100}else s=+e;return ca(s)&&(s=n),a&&r!=null&&s>r&&(s=r),s},JL=t=>{if(!Array.isArray(t))return!1;for(var e=t.length,r={},n=0;n<e;n++)if(!r[t[n]])r[t[n]]=!0;else return!0;return!1};function Qc(t,e,r){return Oe(t)&&Oe(e)?t+r*(e-t):e}function Zoe(t,e,r){if(!(!t||!t.length))return t.find(n=>n&&(typeof e=="function"?e(n):Vl(n,e))===r)}var Ar=t=>t===null||typeof t>"u",sp=t=>Ar(t)?t:"".concat(t.charAt(0).toUpperCase()).concat(t.slice(1)),Qoe=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function HN(t){if(typeof t!="string")return!1;var e=Qoe;return e.includes(t)}var Joe=["viewBox","children"],ZT=["points","pathLength"],tw={svg:Joe,polygon:ZT,polyline:ZT},ele=(t,e)=>{if(!t||typeof t=="function"||typeof t=="boolean")return null;var r=t;if(O.isValidElement(t)&&(r=t.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(a=>{HN(a)&&(n[a]=s=>r[a](r,s))}),n},tle=(t,e,r)=>n=>(t(e,r,n),null),$N=(t,e,r)=>{if(t===null||typeof t!="object"&&typeof t!="function")return null;var n=null;return Object.keys(t).forEach(a=>{var s=t[a];HN(a)&&typeof s=="function"&&(n||(n={}),n[a]=tle(s,e,r))}),n},rle=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"];function e9(t){if(typeof t!="string")return!1;var e=rle;return e.includes(t)}function ip(t){var e=Object.entries(t).filter(r=>{var[n]=r;return e9(n)});return Object.fromEntries(e)}var QT=t=>typeof t=="string"?t:t?t.displayName||t.name||"Component":"",JT=null,rw=null,t9=t=>{if(t===JT&&Array.isArray(rw))return rw;var e=[];return O.Children.forEach(t,r=>{Ar(r)||(Goe.isFragment(r)?e=e.concat(t9(r.props.children)):e.push(r))}),rw=e,JT=t,e};function YN(t,e){var r=[],n=[];return Array.isArray(e)?n=e.map(a=>QT(a)):n=[QT(e)],t9(t).forEach(a=>{var s=Vl(a,"type.displayName")||Vl(a,"type.name");n.indexOf(s)!==-1&&r.push(a)}),r}var nle=(t,e,r,n)=>{var a;if(typeof e=="symbol"||typeof e=="number")return!0;var s=(a=n&&tw?.[n])!==null&&a!==void 0?a:[],o=e.startsWith("data-"),l=typeof t!="function"&&(!!n&&s.includes(e)||e9(e)),c=!!r&&HN(e);return o||l||c},zr=(t,e,r)=>{if(!t||typeof t=="function"||typeof t=="boolean")return null;var n=t;if(O.isValidElement(t)&&(n=t.props),typeof n!="object"&&typeof n!="function")return null;var a={};return Object.keys(n).forEach(s=>{var o;nle((o=n)===null||o===void 0?void 0:o[s],s,e,r)&&(a[s]=n[s])}),a},ale=["children","width","height","viewBox","className","style","title","desc"];function Lj(){return Lj=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Lj.apply(null,arguments)}function sle(t,e){if(t==null)return{};var r,n,a=ile(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(n=0;n<s.length;n++)r=s[n],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(a[r]=t[r])}return a}function ile(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.indexOf(n)!==-1)continue;r[n]=t[n]}return r}var r9=O.forwardRef((t,e)=>{var{children:r,width:n,height:a,viewBox:s,className:o,style:l,title:c,desc:u}=t,h=sle(t,ale),p=s||{width:n,height:a,x:0,y:0},m=Ge("recharts-surface",o);return O.createElement("svg",Lj({},zr(h,!0,"svg"),{className:m,width:n,height:a,style:l,viewBox:"".concat(p.x," ").concat(p.y," ").concat(p.width," ").concat(p.height),ref:e}),O.createElement("title",null,c),O.createElement("desc",null,u),r)}),ole=["children","className"];function zj(){return zj=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},zj.apply(null,arguments)}function lle(t,e){if(t==null)return{};var r,n,a=cle(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(n=0;n<s.length;n++)r=s[n],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(a[r]=t[r])}return a}function cle(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.indexOf(n)!==-1)continue;r[n]=t[n]}return r}var So=O.forwardRef((t,e)=>{var{children:r,className:n}=t,a=lle(t,ole),s=Ge("recharts-layer",n);return O.createElement("g",zj({className:s},zr(a,!0),{ref:e}),r)}),dle=O.createContext(null);function It(t){return function(){return t}}const n9=Math.cos,Ox=Math.sin,os=Math.sqrt,Px=Math.PI,K0=2*Px,Ij=Math.PI,Bj=2*Ij,fl=1e-6,ule=Bj-fl;function a9(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=arguments[e]+t[e]}function hle(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return a9;const r=10**e;return function(n){this._+=n[0];for(let a=1,s=n.length;a<s;++a)this._+=Math.round(arguments[a]*r)/r+n[a]}}class fle{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?a9:hle(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,a){this._append`Q${+e},${+r},${this._x1=+n},${this._y1=+a}`}bezierCurveTo(e,r,n,a,s,o){this._append`C${+e},${+r},${+n},${+a},${this._x1=+s},${this._y1=+o}`}arcTo(e,r,n,a,s){if(e=+e,r=+r,n=+n,a=+a,s=+s,s<0)throw new Error(`negative radius: ${s}`);let o=this._x1,l=this._y1,c=n-e,u=a-r,h=o-e,p=l-r,m=h*h+p*p;if(this._x1===null)this._append`M${this._x1=e},${this._y1=r}`;else if(m>fl)if(!(Math.abs(p*c-u*h)>fl)||!s)this._append`L${this._x1=e},${this._y1=r}`;else{let x=n-o,y=a-l,b=c*c+u*u,w=x*x+y*y,N=Math.sqrt(b),A=Math.sqrt(m),S=s*Math.tan((Ij-Math.acos((b+m-w)/(2*N*A)))/2),C=S/A,k=S/N;Math.abs(C-1)>fl&&this._append`L${e+C*h},${r+C*p}`,this._append`A${s},${s},0,0,${+(p*x>h*y)},${this._x1=e+k*c},${this._y1=r+k*u}`}}arc(e,r,n,a,s,o){if(e=+e,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let l=n*Math.cos(a),c=n*Math.sin(a),u=e+l,h=r+c,p=1^o,m=o?a-s:s-a;this._x1===null?this._append`M${u},${h}`:(Math.abs(this._x1-u)>fl||Math.abs(this._y1-h)>fl)&&this._append`L${u},${h}`,n&&(m<0&&(m=m%Bj+Bj),m>ule?this._append`A${n},${n},0,1,${p},${e-l},${r-c}A${n},${n},0,1,${p},${this._x1=u},${this._y1=h}`:m>fl&&this._append`A${n},${n},0,${+(m>=Ij)},${p},${this._x1=e+n*Math.cos(s)},${this._y1=r+n*Math.sin(s)}`)}rect(e,r,n,a){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}h${n=+n}v${+a}h${-n}Z`}toString(){return this._}}function UN(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 fle(e)}function WN(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function s9(t){this._context=t}s9.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 Z0(t){return new s9(t)}function i9(t){return t[0]}function o9(t){return t[1]}function l9(t,e){var r=It(!0),n=null,a=Z0,s=null,o=UN(l);t=typeof t=="function"?t:t===void 0?i9:It(t),e=typeof e=="function"?e:e===void 0?o9:It(e);function l(c){var u,h=(c=WN(c)).length,p,m=!1,x;for(n==null&&(s=a(x=o())),u=0;u<=h;++u)!(u<h&&r(p=c[u],u,c))===m&&((m=!m)?s.lineStart():s.lineEnd()),m&&s.point(+t(p,u,c),+e(p,u,c));if(x)return s=null,x+""||null}return l.x=function(c){return arguments.length?(t=typeof c=="function"?c:It(+c),l):t},l.y=function(c){return arguments.length?(e=typeof c=="function"?c:It(+c),l):e},l.defined=function(c){return arguments.length?(r=typeof c=="function"?c:It(!!c),l):r},l.curve=function(c){return arguments.length?(a=c,n!=null&&(s=a(n)),l):a},l.context=function(c){return arguments.length?(c==null?n=s=null:s=a(n=c),l):n},l}function dg(t,e,r){var n=null,a=It(!0),s=null,o=Z0,l=null,c=UN(u);t=typeof t=="function"?t:t===void 0?i9:It(+t),e=typeof e=="function"?e:It(e===void 0?0:+e),r=typeof r=="function"?r:r===void 0?o9:It(+r);function u(p){var m,x,y,b=(p=WN(p)).length,w,N=!1,A,S=new Array(b),C=new Array(b);for(s==null&&(l=o(A=c())),m=0;m<=b;++m){if(!(m<b&&a(w=p[m],m,p))===N)if(N=!N)x=m,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),y=m-1;y>=x;--y)l.point(S[y],C[y]);l.lineEnd(),l.areaEnd()}N&&(S[m]=+t(w,m,p),C[m]=+e(w,m,p),l.point(n?+n(w,m,p):S[m],r?+r(w,m,p):C[m]))}if(A)return l=null,A+""||null}function h(){return l9().defined(a).curve(o).context(s)}return u.x=function(p){return arguments.length?(t=typeof p=="function"?p:It(+p),n=null,u):t},u.x0=function(p){return arguments.length?(t=typeof p=="function"?p:It(+p),u):t},u.x1=function(p){return arguments.length?(n=p==null?null:typeof p=="function"?p:It(+p),u):n},u.y=function(p){return arguments.length?(e=typeof p=="function"?p:It(+p),r=null,u):e},u.y0=function(p){return arguments.length?(e=typeof p=="function"?p:It(+p),u):e},u.y1=function(p){return arguments.length?(r=p==null?null:typeof p=="function"?p:It(+p),u):r},u.lineX0=u.lineY0=function(){return h().x(t).y(e)},u.lineY1=function(){return h().x(t).y(r)},u.lineX1=function(){return h().x(n).y(e)},u.defined=function(p){return arguments.length?(a=typeof p=="function"?p:It(!!p),u):a},u.curve=function(p){return arguments.length?(o=p,s!=null&&(l=o(s)),u):o},u.context=function(p){return arguments.length?(p==null?s=l=null:l=o(s=p),u):s},u}class c9{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 ple(t){return new c9(t,!0)}function mle(t){return new c9(t,!1)}const XN={draw(t,e){const r=os(e/Px);t.moveTo(r,0),t.arc(0,0,r,0,K0)}},gle={draw(t,e){const r=os(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()}},d9=os(1/3),xle=d9*2,ble={draw(t,e){const r=os(e/xle),n=r*d9;t.moveTo(0,-r),t.lineTo(n,0),t.lineTo(0,r),t.lineTo(-n,0),t.closePath()}},yle={draw(t,e){const r=os(e),n=-r/2;t.rect(n,n,r,r)}},vle=.8908130915292852,u9=Ox(Px/10)/Ox(7*Px/10),wle=Ox(K0/10)*u9,jle=-n9(K0/10)*u9,Nle={draw(t,e){const r=os(e*vle),n=wle*r,a=jle*r;t.moveTo(0,-r),t.lineTo(n,a);for(let s=1;s<5;++s){const o=K0*s/5,l=n9(o),c=Ox(o);t.lineTo(c*r,-l*r),t.lineTo(l*n-c*a,c*n+l*a)}t.closePath()}},nw=os(3),Sle={draw(t,e){const r=-os(e/(nw*3));t.moveTo(0,r*2),t.lineTo(-nw*r,-r),t.lineTo(nw*r,-r),t.closePath()}},Ca=-.5,ka=os(3)/2,Fj=1/os(12),Ale=(Fj/2+1)*3,Cle={draw(t,e){const r=os(e/Ale),n=r/2,a=r*Fj,s=n,o=r*Fj+r,l=-s,c=o;t.moveTo(n,a),t.lineTo(s,o),t.lineTo(l,c),t.lineTo(Ca*n-ka*a,ka*n+Ca*a),t.lineTo(Ca*s-ka*o,ka*s+Ca*o),t.lineTo(Ca*l-ka*c,ka*l+Ca*c),t.lineTo(Ca*n+ka*a,Ca*a-ka*n),t.lineTo(Ca*s+ka*o,Ca*o-ka*s),t.lineTo(Ca*l+ka*c,Ca*c-ka*l),t.closePath()}};function kle(t,e){let r=null,n=UN(a);t=typeof t=="function"?t:It(t||XN),e=typeof e=="function"?e:It(e===void 0?64:+e);function a(){let s;if(r||(r=s=n()),t.apply(this,arguments).draw(r,+e.apply(this,arguments)),s)return r=null,s+""||null}return a.type=function(s){return arguments.length?(t=typeof s=="function"?s:It(s),a):t},a.size=function(s){return arguments.length?(e=typeof s=="function"?s:It(+s),a):e},a.context=function(s){return arguments.length?(r=s??null,a):r},a}function _x(){}function Rx(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 h9(t){this._context=t}h9.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:Rx(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:Rx(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Dle(t){return new h9(t)}function f9(t){this._context=t}f9.prototype={areaStart:_x,areaEnd:_x,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:Rx(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Tle(t){return new f9(t)}function p9(t){this._context=t}p9.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:Rx(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Mle(t){return new p9(t)}function m9(t){this._context=t}m9.prototype={areaStart:_x,areaEnd:_x,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 Ele(t){return new m9(t)}function eM(t){return t<0?-1:1}function tM(t,e,r){var n=t._x1-t._x0,a=e-t._x1,s=(t._y1-t._y0)/(n||a<0&&-0),o=(r-t._y1)/(a||n<0&&-0),l=(s*a+o*n)/(n+a);return(eM(s)+eM(o))*Math.min(Math.abs(s),Math.abs(o),.5*Math.abs(l))||0}function rM(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function aw(t,e,r){var n=t._x0,a=t._y0,s=t._x1,o=t._y1,l=(s-n)/3;t._context.bezierCurveTo(n+l,a+l*e,s-l,o-l*r,s,o)}function Lx(t){this._context=t}Lx.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:aw(this,this._t0,rM(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,aw(this,rM(this,r=tM(this,t,e)),r);break;default:aw(this,this._t0,r=tM(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}};function g9(t){this._context=new x9(t)}(g9.prototype=Object.create(Lx.prototype)).point=function(t,e){Lx.prototype.point.call(this,e,t)};function x9(t){this._context=t}x9.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,a,s){this._context.bezierCurveTo(e,t,n,r,s,a)}};function Ole(t){return new Lx(t)}function Ple(t){return new g9(t)}function b9(t){this._context=t}b9.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=nM(t),a=nM(e),s=0,o=1;o<r;++s,++o)this._context.bezierCurveTo(n[0][s],a[0][s],n[1][s],a[1][s],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 nM(t){var e,r=t.length-1,n,a=new Array(r),s=new Array(r),o=new Array(r);for(a[0]=0,s[0]=2,o[0]=t[0]+2*t[1],e=1;e<r-1;++e)a[e]=1,s[e]=4,o[e]=4*t[e]+2*t[e+1];for(a[r-1]=2,s[r-1]=7,o[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=a[e]/s[e-1],s[e]-=n,o[e]-=n*o[e-1];for(a[r-1]=o[r-1]/s[r-1],e=r-2;e>=0;--e)a[e]=(o[e]-a[e+1])/s[e];for(s[r-1]=(t[r]+a[r-1])/2,e=0;e<r-1;++e)s[e]=2*t[e+1]-a[e+1];return[a,s]}function _le(t){return new b9(t)}function Q0(t,e){this._context=t,this._t=e}Q0.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 Rle(t){return new Q0(t,.5)}function Lle(t){return new Q0(t,0)}function zle(t){return new Q0(t,1)}function wd(t,e){if((o=t.length)>1)for(var r=1,n,a,s=t[e[0]],o,l=s.length;r<o;++r)for(a=s,s=t[e[r]],n=0;n<l;++n)s[n][1]+=s[n][0]=isNaN(a[n][1])?a[n][0]:a[n][1]}function Hj(t){for(var e=t.length,r=new Array(e);--e>=0;)r[e]=e;return r}function Ile(t,e){return t[e]}function Ble(t){const e=[];return e.key=t,e}function Fle(){var t=It([]),e=Hj,r=wd,n=Ile;function a(s){var o=Array.from(t.apply(this,arguments),Ble),l,c=o.length,u=-1,h;for(const p of s)for(l=0,++u;l<c;++l)(o[l][u]=[0,+n(p,o[l].key,u,s)]).data=p;for(l=0,h=WN(e(o));l<c;++l)o[h[l]].index=l;return r(o,h),o}return a.keys=function(s){return arguments.length?(t=typeof s=="function"?s:It(Array.from(s)),a):t},a.value=function(s){return arguments.length?(n=typeof s=="function"?s:It(+s),a):n},a.order=function(s){return arguments.length?(e=s==null?Hj:typeof s=="function"?s:It(Array.from(s)),a):e},a.offset=function(s){return arguments.length?(r=s??wd,a):r},a}function Hle(t,e){if((n=t.length)>0){for(var r,n,a=0,s=t[0].length,o;a<s;++a){for(o=r=0;r<n;++r)o+=t[r][a][1]||0;if(o)for(r=0;r<n;++r)t[r][a][1]/=o}wd(t,e)}}function $le(t,e){if((a=t.length)>0){for(var r=0,n=t[e[0]],a,s=n.length;r<s;++r){for(var o=0,l=0;o<a;++o)l+=t[o][r][1]||0;n[r][1]+=n[r][0]=-l/2}wd(t,e)}}function Yle(t,e){if(!(!((o=t.length)>0)||!((s=(a=t[e[0]]).length)>0))){for(var r=0,n=1,a,s,o;n<s;++n){for(var l=0,c=0,u=0;l<o;++l){for(var h=t[e[l]],p=h[n][1]||0,m=h[n-1][1]||0,x=(p-m)/2,y=0;y<l;++y){var b=t[e[y]],w=b[n][1]||0,N=b[n-1][1]||0;x+=w-N}c+=p,u+=x*p}a[n-1][1]+=a[n-1][0]=r,c&&(r-=u/c)}a[n-1][1]+=a[n-1][0]=r,wd(t,e)}}var Ule=["type","size","sizeType"];function $j(){return $j=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},$j.apply(null,arguments)}function aM(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function sM(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?aM(Object(r),!0).forEach(function(n){Wle(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):aM(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Wle(t,e,r){return(e=Xle(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Xle(t){var e=Vle(t,"string");return typeof e=="symbol"?e:e+""}function Vle(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function qle(t,e){if(t==null)return{};var r,n,a=Gle(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(n=0;n<s.length;n++)r=s[n],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(a[r]=t[r])}return a}function Gle(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.indexOf(n)!==-1)continue;r[n]=t[n]}return r}var y9={symbolCircle:XN,symbolCross:gle,symbolDiamond:ble,symbolSquare:yle,symbolStar:Nle,symbolTriangle:Sle,symbolWye:Cle},Kle=Math.PI/180,Zle=t=>{var e="symbol".concat(sp(t));return y9[e]||XN},Qle=(t,e,r)=>{if(e==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var n=18*Kle;return 1.25*t*t*(Math.tan(n)-Math.tan(n*2)*Math.tan(n)**2)}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},Jle=(t,e)=>{y9["symbol".concat(sp(t))]=e},v9=t=>{var{type:e="circle",size:r=64,sizeType:n="area"}=t,a=qle(t,Ule),s=sM(sM({},a),{},{type:e,size:r,sizeType:n}),o=()=>{var p=Zle(e),m=kle().type(p).size(Qle(r,n,e));return m()},{className:l,cx:c,cy:u}=s,h=zr(s,!0);return c===+c&&u===+u&&r===+r?O.createElement("path",$j({},h,{className:Ge("recharts-symbols",l),transform:"translate(".concat(c,", ").concat(u,")"),d:o()})):null};v9.registerSymbol=Jle;var sw={},iw={},iM;function ece(){return iM||(iM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r,n){const a=new Map;for(let s=0;s<r.length;s++){const o=r[s],l=n(o);a.has(l)||a.set(l,o)}return Array.from(a.values())}t.uniqBy=e}(iw)),iw}var ow={},oM;function w9(){return oM||(oM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r){return r}t.identity=e}(ow)),ow}var lw={},cw={},dw={},lM;function tce(){return lM||(lM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r){return Number.isSafeInteger(r)&&r>=0}t.isLength=e}(dw)),dw}var cM;function VN(){return cM||(cM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=tce();function r(n){return n!=null&&typeof n!="function"&&e.isLength(n.length)}t.isArrayLike=r}(cw)),cw}var uw={},dM;function rce(){return dM||(dM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r){return typeof r=="object"&&r!==null}t.isObjectLike=e}(uw)),uw}var uM;function nce(){return uM||(uM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=VN(),r=rce();function n(a){return r.isObjectLike(a)&&e.isArrayLike(a)}t.isArrayLikeObject=n}(lw)),lw}var hw={},fw={},hM;function ace(){return hM||(hM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=FN();function r(n){return function(a){return e.get(a,n)}}t.property=r}(fw)),fw}var pw={},mw={},gw={},xw={},fM;function j9(){return fM||(fM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r){return r!==null&&(typeof r=="object"||typeof r=="function")}t.isObject=e}(xw)),xw}var bw={},pM;function N9(){return pM||(pM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r){return r==null||typeof r!="object"&&typeof r!="function"}t.isPrimitive=e}(bw)),bw}var yw={},mM;function qN(){return mM||(mM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r,n){return r===n||Number.isNaN(r)&&Number.isNaN(n)}t.eq=e}(yw)),yw}var gM;function sce(){return gM||(gM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=GN(),r=j9(),n=N9(),a=qN();function s(p,m,x){return typeof x!="function"?e.isMatch(p,m):o(p,m,function y(b,w,N,A,S,C){const k=x(b,w,N,A,S,C);return k!==void 0?!!k:o(b,w,y,C)},new Map)}function o(p,m,x,y){if(m===p)return!0;switch(typeof m){case"object":return l(p,m,x,y);case"function":return Object.keys(m).length>0?o(p,{...m},x,y):a.eq(p,m);default:return r.isObject(p)?typeof m=="string"?m==="":!0:a.eq(p,m)}}function l(p,m,x,y){if(m==null)return!0;if(Array.isArray(m))return u(p,m,x,y);if(m instanceof Map)return c(p,m,x,y);if(m instanceof Set)return h(p,m,x,y);const b=Object.keys(m);if(p==null)return b.length===0;if(b.length===0)return!0;if(y&&y.has(m))return y.get(m)===p;y&&y.set(m,p);try{for(let w=0;w<b.length;w++){const N=b[w];if(!n.isPrimitive(p)&&!(N in p)||m[N]===void 0&&p[N]!==void 0||m[N]===null&&p[N]!==null||!x(p[N],m[N],N,p,m,y))return!1}return!0}finally{y&&y.delete(m)}}function c(p,m,x,y){if(m.size===0)return!0;if(!(p instanceof Map))return!1;for(const[b,w]of m.entries()){const N=p.get(b);if(x(N,w,b,p,m,y)===!1)return!1}return!0}function u(p,m,x,y){if(m.length===0)return!0;if(!Array.isArray(p))return!1;const b=new Set;for(let w=0;w<m.length;w++){const N=m[w];let A=!1;for(let S=0;S<p.length;S++){if(b.has(S))continue;const C=p[S];let k=!1;if(x(C,N,w,p,m,y)&&(k=!0),k){b.add(S),A=!0;break}}if(!A)return!1}return!0}function h(p,m,x,y){return m.size===0?!0:p instanceof Set?u([...p],[...m],x,y):!1}t.isMatchWith=s,t.isSetMatch=h}(gw)),gw}var xM;function GN(){return xM||(xM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=sce();function r(n,a){return e.isMatchWith(n,a,()=>{})}t.isMatch=r}(mw)),mw}var vw={},ww={},jw={},bM;function S9(){return bM||(bM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r){return Object.getOwnPropertySymbols(r).filter(n=>Object.prototype.propertyIsEnumerable.call(r,n))}t.getSymbols=e}(jw)),jw}var Nw={},yM;function KN(){return yM||(yM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r){return r==null?r===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(r)}t.getTag=e}(Nw)),Nw}var Sw={},vM;function ZN(){return vM||(vM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e="[object RegExp]",r="[object String]",n="[object Number]",a="[object Boolean]",s="[object Arguments]",o="[object Symbol]",l="[object Date]",c="[object Map]",u="[object Set]",h="[object Array]",p="[object Function]",m="[object ArrayBuffer]",x="[object Object]",y="[object Error]",b="[object DataView]",w="[object Uint8Array]",N="[object Uint8ClampedArray]",A="[object Uint16Array]",S="[object Uint32Array]",C="[object BigUint64Array]",k="[object Int8Array]",T="[object Int16Array]",E="[object Int32Array]",_="[object BigInt64Array]",L="[object Float32Array]",P="[object Float64Array]";t.argumentsTag=s,t.arrayBufferTag=m,t.arrayTag=h,t.bigInt64ArrayTag=_,t.bigUint64ArrayTag=C,t.booleanTag=a,t.dataViewTag=b,t.dateTag=l,t.errorTag=y,t.float32ArrayTag=L,t.float64ArrayTag=P,t.functionTag=p,t.int16ArrayTag=T,t.int32ArrayTag=E,t.int8ArrayTag=k,t.mapTag=c,t.numberTag=n,t.objectTag=x,t.regexpTag=e,t.setTag=u,t.stringTag=r,t.symbolTag=o,t.uint16ArrayTag=A,t.uint32ArrayTag=S,t.uint8ArrayTag=w,t.uint8ClampedArrayTag=N}(Sw)),Sw}var Aw={},wM;function ice(){return wM||(wM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}t.isTypedArray=e}(Aw)),Aw}var jM;function A9(){return jM||(jM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=S9(),r=KN(),n=ZN(),a=N9(),s=ice();function o(h,p){return l(h,void 0,h,new Map,p)}function l(h,p,m,x=new Map,y=void 0){const b=y?.(h,p,m,x);if(b!=null)return b;if(a.isPrimitive(h))return h;if(x.has(h))return x.get(h);if(Array.isArray(h)){const w=new Array(h.length);x.set(h,w);for(let N=0;N<h.length;N++)w[N]=l(h[N],N,m,x,y);return Object.hasOwn(h,"index")&&(w.index=h.index),Object.hasOwn(h,"input")&&(w.input=h.input),w}if(h instanceof Date)return new Date(h.getTime());if(h instanceof RegExp){const w=new RegExp(h.source,h.flags);return w.lastIndex=h.lastIndex,w}if(h instanceof Map){const w=new Map;x.set(h,w);for(const[N,A]of h)w.set(N,l(A,N,m,x,y));return w}if(h instanceof Set){const w=new Set;x.set(h,w);for(const N of h)w.add(l(N,void 0,m,x,y));return w}if(typeof Buffer<"u"&&Buffer.isBuffer(h))return h.subarray();if(s.isTypedArray(h)){const w=new(Object.getPrototypeOf(h)).constructor(h.length);x.set(h,w);for(let N=0;N<h.length;N++)w[N]=l(h[N],N,m,x,y);return w}if(h instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&h instanceof SharedArrayBuffer)return h.slice(0);if(h instanceof DataView){const w=new DataView(h.buffer.slice(0),h.byteOffset,h.byteLength);return x.set(h,w),c(w,h,m,x,y),w}if(typeof File<"u"&&h instanceof File){const w=new File([h],h.name,{type:h.type});return x.set(h,w),c(w,h,m,x,y),w}if(h instanceof Blob){const w=new Blob([h],{type:h.type});return x.set(h,w),c(w,h,m,x,y),w}if(h instanceof Error){const w=new h.constructor;return x.set(h,w),w.message=h.message,w.name=h.name,w.stack=h.stack,w.cause=h.cause,c(w,h,m,x,y),w}if(typeof h=="object"&&u(h)){const w=Object.create(Object.getPrototypeOf(h));return x.set(h,w),c(w,h,m,x,y),w}return h}function c(h,p,m=h,x,y){const b=[...Object.keys(p),...e.getSymbols(p)];for(let w=0;w<b.length;w++){const N=b[w],A=Object.getOwnPropertyDescriptor(h,N);(A==null||A.writable)&&(h[N]=l(p[N],N,m,x,y))}}function u(h){switch(r.getTag(h)){case n.argumentsTag:case n.arrayTag:case n.arrayBufferTag:case n.dataViewTag:case n.booleanTag:case n.dateTag:case n.float32ArrayTag:case n.float64ArrayTag:case n.int8ArrayTag:case n.int16ArrayTag:case n.int32ArrayTag:case n.mapTag:case n.numberTag:case n.objectTag:case n.regexpTag:case n.setTag:case n.stringTag:case n.symbolTag:case n.uint8ArrayTag:case n.uint8ClampedArrayTag:case n.uint16ArrayTag:case n.uint32ArrayTag:return!0;default:return!1}}t.cloneDeepWith=o,t.cloneDeepWithImpl=l,t.copyProperties=c}(ww)),ww}var NM;function oce(){return NM||(NM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=A9();function r(n){return e.cloneDeepWithImpl(n,void 0,n,new Map,void 0)}t.cloneDeep=r}(vw)),vw}var SM;function lce(){return SM||(SM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=GN(),r=oce();function n(a){return a=r.cloneDeep(a),s=>e.isMatch(s,a)}t.matches=n}(pw)),pw}var Cw={},kw={},Dw={},AM;function cce(){return AM||(AM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=A9(),r=ZN();function n(a,s){return e.cloneDeepWith(a,(o,l,c,u)=>{const h=s?.(o,l,c,u);if(h!=null)return h;if(typeof a=="object")switch(Object.prototype.toString.call(a)){case r.numberTag:case r.stringTag:case r.booleanTag:{const p=new a.constructor(a?.valueOf());return e.copyProperties(p,a),p}case r.argumentsTag:{const p={};return e.copyProperties(p,a),p.length=a.length,p[Symbol.iterator]=a[Symbol.iterator],p}default:return}})}t.cloneDeepWith=n}(Dw)),Dw}var CM;function dce(){return CM||(CM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=cce();function r(n){return e.cloneDeepWith(n)}t.cloneDeep=r}(kw)),kw}var Tw={},Mw={},kM;function C9(){return kM||(kM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=/^(?:0|[1-9]\d*)$/;function r(n,a=Number.MAX_SAFE_INTEGER){switch(typeof n){case"number":return Number.isInteger(n)&&n>=0&&n<a;case"symbol":return!1;case"string":return e.test(n)}}t.isIndex=r}(Mw)),Mw}var Ew={},DM;function uce(){return DM||(DM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=KN();function r(n){return n!==null&&typeof n=="object"&&e.getTag(n)==="[object Arguments]"}t.isArguments=r}(Ew)),Ew}var TM;function hce(){return TM||(TM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=ZL(),r=C9(),n=uce(),a=BN();function s(o,l){let c;if(Array.isArray(l)?c=l:typeof l=="string"&&e.isDeepKey(l)&&o?.[l]==null?c=a.toPath(l):c=[l],c.length===0)return!1;let u=o;for(let h=0;h<c.length;h++){const p=c[h];if((u==null||!Object.hasOwn(u,p))&&!((Array.isArray(u)||n.isArguments(u))&&r.isIndex(p)&&p<u.length))return!1;u=u[p]}return!0}t.has=s}(Tw)),Tw}var MM;function fce(){return MM||(MM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=GN(),r=QL(),n=dce(),a=FN(),s=hce();function o(l,c){switch(typeof l){case"object":{Object.is(l?.valueOf(),-0)&&(l="-0");break}case"number":{l=r.toKey(l);break}}return c=n.cloneDeep(c),function(u){const h=a.get(u,l);return h===void 0?s.has(u,l):c===void 0?h===void 0:e.isMatch(h,c)}}t.matchesProperty=o}(Cw)),Cw}var EM;function pce(){return EM||(EM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=w9(),r=ace(),n=lce(),a=fce();function s(o){if(o==null)return e.identity;switch(typeof o){case"function":return o;case"object":return Array.isArray(o)&&o.length===2?a.matchesProperty(o[0],o[1]):n.matches(o);case"string":case"symbol":case"number":return r.property(o)}}t.iteratee=s}(hw)),hw}var OM;function mce(){return OM||(OM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=ece(),r=w9(),n=nce(),a=pce();function s(o,l=r.identity){return n.isArrayLikeObject(o)?e.uniqBy(Array.from(o),a.iteratee(l)):[]}t.uniqBy=s}(sw)),sw}var Ow,PM;function gce(){return PM||(PM=1,Ow=mce().uniqBy),Ow}var xce=gce();const _M=ns(xce);function bce(t,e,r){return e===!0?_M(t,r):typeof e=="function"?_M(t,e):t}var Pw={exports:{}},_w={},Rw={exports:{}},Lw={};/**
* @license React
* use-sync-external-store-shim.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var RM;function yce(){if(RM)return Lw;RM=1;var t=Gl();function e(p,m){return p===m&&(p!==0||1/p===1/m)||p!==p&&m!==m}var r=typeof Object.is=="function"?Object.is:e,n=t.useState,a=t.useEffect,s=t.useLayoutEffect,o=t.useDebugValue;function l(p,m){var x=m(),y=n({inst:{value:x,getSnapshot:m}}),b=y[0].inst,w=y[1];return s(function(){b.value=x,b.getSnapshot=m,c(b)&&w({inst:b})},[p,x,m]),a(function(){return c(b)&&w({inst:b}),p(function(){c(b)&&w({inst:b})})},[p]),o(x),x}function c(p){var m=p.getSnapshot;p=p.value;try{var x=m();return!r(p,x)}catch{return!0}}function u(p,m){return m()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:l;return Lw.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:h,Lw}var LM;function vce(){return LM||(LM=1,Rw.exports=yce()),Rw.exports}/**
* @license React
* use-sync-external-store-shim/with-selector.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var zM;function wce(){if(zM)return _w;zM=1;var t=Gl(),e=vce();function r(u,h){return u===h&&(u!==0||1/u===1/h)||u!==u&&h!==h}var n=typeof Object.is=="function"?Object.is:r,a=e.useSyncExternalStore,s=t.useRef,o=t.useEffect,l=t.useMemo,c=t.useDebugValue;return _w.useSyncExternalStoreWithSelector=function(u,h,p,m,x){var y=s(null);if(y.current===null){var b={hasValue:!1,value:null};y.current=b}else b=y.current;y=l(function(){function N(T){if(!A){if(A=!0,S=T,T=m(T),x!==void 0&&b.hasValue){var E=b.value;if(x(E,T))return C=E}return C=T}if(E=C,n(S,T))return E;var _=m(T);return x!==void 0&&x(E,_)?(S=T,E):(S=T,C=_)}var A=!1,S,C,k=p===void 0?null:p;return[function(){return N(h())},k===null?void 0:function(){return N(k())}]},[h,p,m,x]);var w=a(u,y[0],y[1]);return o(function(){b.hasValue=!0,b.value=w},[w]),c(w),w},_w}var IM;function jce(){return IM||(IM=1,Pw.exports=wce()),Pw.exports}var Nce=jce(),QN=O.createContext(null),Sce=t=>t,Ir=()=>{var t=O.useContext(QN);return t?t.store.dispatch:Sce},Kg=()=>{},Ace=()=>Kg,Cce=(t,e)=>t===e;function Be(t){var e=O.useContext(QN);return Nce.useSyncExternalStoreWithSelector(e?e.subscription.addNestedSub:Ace,e?e.store.getState:Kg,e?e.store.getState:Kg,e?t:Kg,Cce)}var zw={},Iw={},Bw={},BM;function kce(){return BM||(BM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(n){return typeof n=="symbol"?1:n===null?2:n===void 0?3:n!==n?4:0}const r=(n,a,s)=>{if(n!==a){const o=e(n),l=e(a);if(o===l&&o===0){if(n<a)return s==="desc"?1:-1;if(n>a)return s==="desc"?-1:1}return s==="desc"?l-o:o-l}return 0};t.compareValues=r}(Bw)),Bw}var Fw={},Hw={},FM;function k9(){return FM||(FM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r){return typeof r=="symbol"||r instanceof Symbol}t.isSymbol=e}(Hw)),Hw}var HM;function Dce(){return HM||(HM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=k9(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function a(s,o){return Array.isArray(s)?!1:typeof s=="number"||typeof s=="boolean"||s==null||e.isSymbol(s)?!0:typeof s=="string"&&(n.test(s)||!r.test(s))||o!=null&&Object.hasOwn(o,s)}t.isKey=a}(Fw)),Fw}var $M;function Tce(){return $M||($M=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=kce(),r=Dce(),n=BN();function a(s,o,l,c){if(s==null)return[];l=c?void 0:l,Array.isArray(s)||(s=Object.values(s)),Array.isArray(o)||(o=o==null?[null]:[o]),o.length===0&&(o=[null]),Array.isArray(l)||(l=l==null?[]:[l]),l=l.map(x=>String(x));const u=(x,y)=>{let b=x;for(let w=0;w<y.length&&b!=null;++w)b=b[y[w]];return b},h=(x,y)=>y==null||x==null?y:typeof x=="object"&&"key"in x?Object.hasOwn(y,x.key)?y[x.key]:u(y,x.path):typeof x=="function"?x(y):Array.isArray(x)?u(y,x):typeof y=="object"?y[x]:y,p=o.map(x=>(Array.isArray(x)&&x.length===1&&(x=x[0]),x==null||typeof x=="function"||Array.isArray(x)||r.isKey(x)?x:{key:x,path:n.toPath(x)}));return s.map(x=>({original:x,criteria:p.map(y=>h(y,x))})).slice().sort((x,y)=>{for(let b=0;b<p.length;b++){const w=e.compareValues(x.criteria[b],y.criteria[b],l[b]);if(w!==0)return w}return 0}).map(x=>x.original)}t.orderBy=a}(Iw)),Iw}var $w={},YM;function Mce(){return YM||(YM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r,n=1){const a=[],s=Math.floor(n),o=(l,c)=>{for(let u=0;u<l.length;u++){const h=l[u];Array.isArray(h)&&c<s?o(h,c+1):a.push(h)}};return o(r,0),a}t.flatten=e}($w)),$w}var Yw={},UM;function D9(){return UM||(UM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=C9(),r=VN(),n=j9(),a=qN();function s(o,l,c){return n.isObject(c)&&(typeof l=="number"&&r.isArrayLike(c)&&e.isIndex(l)&&l<c.length||typeof l=="string"&&l in c)?a.eq(c[l],o):!1}t.isIterateeCall=s}(Yw)),Yw}var WM;function Ece(){return WM||(WM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=Tce(),r=Mce(),n=D9();function a(s,...o){const l=o.length;return l>1&&n.isIterateeCall(s,o[0],o[1])?o=[]:l>2&&n.isIterateeCall(o[0],o[1],o[2])&&(o=[o[0]]),e.orderBy(s,r.flatten(o),["asc"])}t.sortBy=a}(zw)),zw}var Uw,XM;function Oce(){return XM||(XM=1,Uw=Ece().sortBy),Uw}var Pce=Oce();const J0=ns(Pce);var T9=t=>t.legend.settings,_ce=t=>t.legend.size,Rce=t=>t.legend.payload;de([Rce,T9],(t,e)=>{var{itemSorter:r}=e,n=t.flat(1);return r?J0(n,r):n});var ug=1;function Lce(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[e,r]=O.useState({height:0,left:0,top:0,width:0}),n=O.useCallback(a=>{if(a!=null){var s=a.getBoundingClientRect(),o={height:s.height,left:s.left,top:s.top,width:s.width};(Math.abs(o.height-e.height)>ug||Math.abs(o.left-e.left)>ug||Math.abs(o.top-e.top)>ug||Math.abs(o.width-e.width)>ug)&&r({height:o.height,left:o.left,top:o.top,width:o.width})}},[e.width,e.height,e.top,e.left,...t]);return[e,n]}var zce={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},M9=$t({name:"chartLayout",initialState:zce,reducers:{setLayout(t,e){t.layoutType=e.payload},setChartSize(t,e){t.width=e.payload.width,t.height=e.payload.height},setMargin(t,e){t.margin.top=e.payload.top,t.margin.right=e.payload.right,t.margin.bottom=e.payload.bottom,t.margin.left=e.payload.left},setScale(t,e){t.scale=e.payload}}}),{setMargin:Ice,setLayout:Bce,setChartSize:Fce,setScale:Hce}=M9.actions,$ce=M9.reducer;function VM(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function qM(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?VM(Object(r),!0).forEach(function(n){Yce(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):VM(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Yce(t,e,r){return(e=Uce(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Uce(t){var e=Wce(t,"string");return typeof e=="symbol"?e:e+""}function Wce(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var zx=Math.PI/180,Xce=t=>t*180/Math.PI,Kr=(t,e,r,n)=>({x:t+Math.cos(-zx*n)*r,y:e+Math.sin(-zx*n)*r}),Vce=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},qce=(t,e)=>{var{x:r,y:n}=t,{x:a,y:s}=e;return Math.sqrt((r-a)**2+(n-s)**2)},Gce=(t,e)=>{var{x:r,y:n}=t,{cx:a,cy:s}=e,o=qce({x:r,y:n},{x:a,y:s});if(o<=0)return{radius:o,angle:0};var l=(r-a)/o,c=Math.acos(l);return n>s&&(c=2*Math.PI-c),{radius:o,angle:Xce(c),angleInRadian:c}},Kce=t=>{var{startAngle:e,endAngle:r}=t,n=Math.floor(e/360),a=Math.floor(r/360),s=Math.min(n,a);return{startAngle:e-s*360,endAngle:r-s*360}},Zce=(t,e)=>{var{startAngle:r,endAngle:n}=e,a=Math.floor(r/360),s=Math.floor(n/360),o=Math.min(a,s);return t+o*360},Qce=(t,e)=>{var{x:r,y:n}=t,{radius:a,angle:s}=Gce({x:r,y:n},e),{innerRadius:o,outerRadius:l}=e;if(a<o||a>l||a===0)return null;var{startAngle:c,endAngle:u}=Kce(e),h=s,p;if(c<=u){for(;h>u;)h-=360;for(;h<c;)h+=360;p=h>=c&&h<=u}else{for(;h>c;)h-=360;for(;h<u;)h+=360;p=h>=u&&h<=c}return p?qM(qM({},e),{},{radius:a,angle:Zce(h,e)}):null};function E9(t,e,r){return Array.isArray(t)&&t&&e+r!==0?t.slice(e,r+1):t}function GM(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Oa(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?GM(Object(r),!0).forEach(function(n){Jce(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):GM(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Jce(t,e,r){return(e=ede(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ede(t){var e=tde(t,"string");return typeof e=="symbol"?e:e+""}function tde(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function bn(t,e,r){return Ar(t)||Ar(e)?r:Es(e)?Vl(t,e,r):typeof e=="function"?e(t):r}var rde=(t,e,r,n,a)=>{var s,o=-1,l=(s=e?.length)!==null&&s!==void 0?s:0;if(l<=1||t==null)return 0;if(n==="angleAxis"&&a!=null&&Math.abs(Math.abs(a[1]-a[0])-360)<=1e-6)for(var c=0;c<l;c++){var u=c>0?r[c-1].coordinate:r[l-1].coordinate,h=r[c].coordinate,p=c>=l-1?r[0].coordinate:r[c+1].coordinate,m=void 0;if(Pn(h-u)!==Pn(p-h)){var x=[];if(Pn(p-h)===Pn(a[1]-a[0])){m=p;var y=h+a[1]-a[0];x[0]=Math.min(y,(y+u)/2),x[1]=Math.max(y,(y+u)/2)}else{m=u;var b=p+a[1]-a[0];x[0]=Math.min(h,(b+h)/2),x[1]=Math.max(h,(b+h)/2)}var w=[Math.min(h,(m+h)/2),Math.max(h,(m+h)/2)];if(t>w[0]&&t<=w[1]||t>=x[0]&&t<=x[1]){({index:o}=r[c]);break}}else{var N=Math.min(u,p),A=Math.max(u,p);if(t>(N+h)/2&&t<=(A+h)/2){({index:o}=r[c]);break}}}else if(e){for(var S=0;S<l;S++)if(S===0&&t<=(e[S].coordinate+e[S+1].coordinate)/2||S>0&&S<l-1&&t>(e[S].coordinate+e[S-1].coordinate)/2&&t<=(e[S].coordinate+e[S+1].coordinate)/2||S===l-1&&t>(e[S].coordinate+e[S-1].coordinate)/2){({index:o}=e[S]);break}}return o},nde=(t,e,r)=>{if(e&&r){var{width:n,height:a}=r,{align:s,verticalAlign:o,layout:l}=e;if((l==="vertical"||l==="horizontal"&&o==="middle")&&s!=="center"&&Oe(t[s]))return Oa(Oa({},t),{},{[s]:t[s]+(n||0)});if((l==="horizontal"||l==="vertical"&&s==="center")&&o!=="middle"&&Oe(t[o]))return Oa(Oa({},t),{},{[o]:t[o]+(a||0)})}return t},nc=(t,e)=>t==="horizontal"&&e==="xAxis"||t==="vertical"&&e==="yAxis"||t==="centric"&&e==="angleAxis"||t==="radial"&&e==="radiusAxis",O9=(t,e,r,n)=>{if(n)return t.map(l=>l.coordinate);var a,s,o=t.map(l=>(l.coordinate===e&&(a=!0),l.coordinate===r&&(s=!0),l.coordinate));return a||o.push(e),s||o.push(r),o},P9=(t,e,r)=>{if(!t)return null;var{duplicateDomain:n,type:a,range:s,scale:o,realScaleType:l,isCategorical:c,categoricalDomain:u,tickCount:h,ticks:p,niceTicks:m,axisType:x}=t;if(!o)return null;var y=l==="scaleBand"&&o.bandwidth?o.bandwidth()/2:2,b=a==="category"&&o.bandwidth?o.bandwidth()/y:0;if(b=x==="angleAxis"&&s&&s.length>=2?Pn(s[0]-s[1])*2*b:b,p||m){var w=(p||m||[]).map((N,A)=>{var S=n?n.indexOf(N):N;return{coordinate:o(S)+b,value:N,offset:b,index:A}});return w.filter(N=>!ca(N.coordinate))}return c&&u?u.map((N,A)=>({coordinate:o(N)+b,value:N,index:A,offset:b})):o.ticks&&h!=null?o.ticks(h).map((N,A)=>({coordinate:o(N)+b,value:N,offset:b,index:A})):o.domain().map((N,A)=>({coordinate:o(N)+b,value:n?n[N]:N,index:A,offset:b}))},KM=1e-4,ade=t=>{var e=t.domain();if(!(!e||e.length<=2)){var r=e.length,n=t.range(),a=Math.min(n[0],n[1])-KM,s=Math.max(n[0],n[1])+KM,o=t(e[0]),l=t(e[r-1]);(o<a||o>s||l<a||l>s)&&t.domain([e[0],e[r-1]])}},sde=(t,e)=>{if(!e||e.length!==2||!Oe(e[0])||!Oe(e[1]))return t;var r=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]),a=[t[0],t[1]];return(!Oe(t[0])||t[0]<r)&&(a[0]=r),(!Oe(t[1])||t[1]>n)&&(a[1]=n),a[0]>n&&(a[0]=n),a[1]<r&&(a[1]=r),a},ide=t=>{var e=t.length;if(!(e<=0))for(var r=0,n=t[0].length;r<n;++r)for(var a=0,s=0,o=0;o<e;++o){var l=ca(t[o][r][1])?t[o][r][0]:t[o][r][1];l>=0?(t[o][r][0]=a,t[o][r][1]=a+l,a=t[o][r][1]):(t[o][r][0]=s,t[o][r][1]=s+l,s=t[o][r][1])}},ode=t=>{var e=t.length;if(!(e<=0))for(var r=0,n=t[0].length;r<n;++r)for(var a=0,s=0;s<e;++s){var o=ca(t[s][r][1])?t[s][r][0]:t[s][r][1];o>=0?(t[s][r][0]=a,t[s][r][1]=a+o,a=t[s][r][1]):(t[s][r][0]=0,t[s][r][1]=0)}},lde={sign:ide,expand:Hle,none:wd,silhouette:$le,wiggle:Yle,positive:ode},cde=(t,e,r)=>{var n=lde[r],a=Fle().keys(e).value((s,o)=>+bn(s,o,0)).order(Hj).offset(n);return a(t)};function dde(t){return t==null?void 0:String(t)}var ZM=t=>{var{axis:e,ticks:r,offset:n,bandSize:a,entry:s,index:o}=t;if(e.type==="category")return r[o]?r[o].coordinate+n:null;var l=bn(s,e.dataKey,e.scale.domain()[o]);return Ar(l)?null:e.scale(l)-a/2+n},ude=t=>{var{numericAxis:e}=t,r=e.scale.domain();if(e.type==="number"){var n=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]);return n<=0&&a>=0?0:a<0?a:n}return r[0]},hde=t=>{var e=t.flat(2).filter(Oe);return[Math.min(...e),Math.max(...e)]},fde=t=>[t[0]===1/0?0:t[0],t[1]===-1/0?0:t[1]],pde=(t,e,r)=>{if(t!=null)return fde(Object.keys(t).reduce((n,a)=>{var s=t[a],{stackedData:o}=s,l=o.reduce((c,u)=>{var h=E9(u,e,r),p=hde(h);return[Math.min(c[0],p[0]),Math.max(c[1],p[1])]},[1/0,-1/0]);return[Math.min(l[0],n[0]),Math.max(l[1],n[1])]},[1/0,-1/0]))},QM=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,JM=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,JN=(t,e,r)=>{if(t&&t.scale&&t.scale.bandwidth){var n=t.scale.bandwidth();if(!r||n>0)return n}if(t&&e&&e.length>=2){for(var a=J0(e,h=>h.coordinate),s=1/0,o=1,l=a.length;o<l;o++){var c=a[o],u=a[o-1];s=Math.min((c.coordinate||0)-(u.coordinate||0),s)}return s===1/0?0:s}return r?void 0:0};function eE(t){var{tooltipEntrySettings:e,dataKey:r,payload:n,value:a,name:s}=t;return Oa(Oa({},e),{},{dataKey:r,payload:n,value:a,name:s})}function _9(t,e){if(t)return String(t);if(typeof e=="string")return e}function mde(t,e,r,n,a){if(r==="horizontal"||r==="vertical"){var s=t>=a.left&&t<=a.left+a.width&&e>=a.top&&e<=a.top+a.height;return s?{x:t,y:e}:null}return n?Qce({x:t,y:e},n):null}var gde=(t,e,r,n)=>{var a=e.find(u=>u&&u.index===r);if(a){if(t==="horizontal")return{x:a.coordinate,y:n.y};if(t==="vertical")return{x:n.x,y:a.coordinate};if(t==="centric"){var s=a.coordinate,{radius:o}=n;return Oa(Oa(Oa({},n),Kr(n.cx,n.cy,o,s)),{},{angle:s,radius:o})}var l=a.coordinate,{angle:c}=n;return Oa(Oa(Oa({},n),Kr(n.cx,n.cy,l,c)),{},{angle:c,radius:l})}return{x:0,y:0}},xde=(t,e)=>e==="horizontal"?t.x:e==="vertical"?t.y:e==="centric"?t.angle:t.radius,Ai=t=>t.layout.width,Ci=t=>t.layout.height,bde=t=>t.layout.scale,R9=t=>t.layout.margin,eS=de(t=>t.cartesianAxis.xAxis,t=>Object.values(t)),tS=de(t=>t.cartesianAxis.yAxis,t=>Object.values(t)),yde="data-recharts-item-index",vde="data-recharts-item-data-key",eb=60;function tE(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function to(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?tE(Object(r),!0).forEach(function(n){wde(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):tE(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function wde(t,e,r){return(e=jde(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function jde(t){var e=Nde(t,"string");return typeof e=="symbol"?e:e+""}function Nde(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Sde=t=>t.brush.height,Br=de([Ai,Ci,R9,Sde,eS,tS,T9,_ce],(t,e,r,n,a,s,o,l)=>{var c=s.reduce((y,b)=>{var{orientation:w}=b;if(!b.mirror&&!b.hide){var N=typeof b.width=="number"?b.width:eb;return to(to({},y),{},{[w]:y[w]+N})}return y},{left:r.left||0,right:r.right||0}),u=a.reduce((y,b)=>{var{orientation:w}=b;return!b.mirror&&!b.hide?to(to({},y),{},{[w]:Vl(y,"".concat(w))+b.height}):y},{top:r.top||0,bottom:r.bottom||0}),h=to(to({},u),c),p=h.bottom;h.bottom+=n,h=nde(h,o,l);var m=t-h.left-h.right,x=e-h.top-h.bottom;return to(to({brushBottom:p},h),{},{width:Math.max(m,0),height:Math.max(x,0)})}),Ade=de(Br,t=>({x:t.left,y:t.top,width:t.width,height:t.height})),L9=de(Ai,Ci,(t,e)=>({x:0,y:0,width:t,height:e})),Cde=O.createContext(null),$a=()=>O.useContext(Cde)!=null,tb=t=>t.brush,rb=de([tb,Br,R9],(t,e,r)=>({height:t.height,x:Oe(t.x)?t.x:e.left,y:Oe(t.y)?t.y:e.top+e.height+e.brushBottom-(r?.bottom||0),width:Oe(t.width)?t.width:e.width})),rS=()=>{var t,e=$a(),r=Be(Ade),n=Be(rb),a=(t=Be(tb))===null||t===void 0?void 0:t.padding;return!e||!n||!a?r:{width:n.width-a.left-a.right,height:n.height-a.top-a.bottom,x:a.left,y:a.top}},kde={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},z9=()=>{var t;return(t=Be(Br))!==null&&t!==void 0?t:kde},I9=()=>Be(Ai),B9=()=>Be(Ci),At=t=>t.layout.layoutType,nS=()=>Be(At),Dde={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},F9=$t({name:"legend",initialState:Dde,reducers:{setLegendSize(t,e){t.size.width=e.payload.width,t.size.height=e.payload.height},setLegendSettings(t,e){t.settings.align=e.payload.align,t.settings.layout=e.payload.layout,t.settings.verticalAlign=e.payload.verticalAlign,t.settings.itemSorter=e.payload.itemSorter},addLegendPayload(t,e){t.payload.push(e.payload)},removeLegendPayload(t,e){var r=pi(t).payload.indexOf(e.payload);r>-1&&t.payload.splice(r,1)}}}),{setLegendSize:Awe,setLegendSettings:Cwe,addLegendPayload:Tde,removeLegendPayload:Mde}=F9.actions,Ede=F9.reducer;function Yj(){return Yj=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Yj.apply(null,arguments)}function rE(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Ww(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?rE(Object(r),!0).forEach(function(n){Ode(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):rE(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Ode(t,e,r){return(e=Pde(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Pde(t){var e=_de(t,"string");return typeof e=="symbol"?e:e+""}function _de(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Rde(t){return Array.isArray(t)&&Es(t[0])&&Es(t[1])?t.join(" ~ "):t}var Lde=t=>{var{separator:e=" : ",contentStyle:r={},itemStyle:n={},labelStyle:a={},payload:s,formatter:o,itemSorter:l,wrapperClassName:c,labelClassName:u,label:h,labelFormatter:p,accessibilityLayer:m=!1}=t,x=()=>{if(s&&s.length){var k={padding:0,margin:0},T=(l?J0(s,l):s).map((E,_)=>{if(E.type==="none")return null;var L=E.formatter||o||Rde,{value:P,name:R}=E,z=P,B=R;if(L){var Y=L(P,R,E,_,s);if(Array.isArray(Y))[z,B]=Y;else if(Y!=null)z=Y;else return null}var X=Ww({display:"block",paddingTop:4,paddingBottom:4,color:E.color||"#000"},n);return O.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(_),style:X},Es(B)?O.createElement("span",{className:"recharts-tooltip-item-name"},B):null,Es(B)?O.createElement("span",{className:"recharts-tooltip-item-separator"},e):null,O.createElement("span",{className:"recharts-tooltip-item-value"},z),O.createElement("span",{className:"recharts-tooltip-item-unit"},E.unit||""))});return O.createElement("ul",{className:"recharts-tooltip-item-list",style:k},T)}return null},y=Ww({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},r),b=Ww({margin:0},a),w=!Ar(h),N=w?h:"",A=Ge("recharts-default-tooltip",c),S=Ge("recharts-tooltip-label",u);w&&p&&s!==void 0&&s!==null&&(N=p(h,s));var C=m?{role:"status","aria-live":"assertive"}:{};return O.createElement("div",Yj({className:A,style:y},C),O.createElement("p",{className:S,style:b},O.isValidElement(N)?N:"".concat(N)),x())},fh="recharts-tooltip-wrapper",zde={visibility:"hidden"};function Ide(t){var{coordinate:e,translateX:r,translateY:n}=t;return Ge(fh,{["".concat(fh,"-right")]:Oe(r)&&e&&Oe(e.x)&&r>=e.x,["".concat(fh,"-left")]:Oe(r)&&e&&Oe(e.x)&&r<e.x,["".concat(fh,"-bottom")]:Oe(n)&&e&&Oe(e.y)&&n>=e.y,["".concat(fh,"-top")]:Oe(n)&&e&&Oe(e.y)&&n<e.y})}function nE(t){var{allowEscapeViewBox:e,coordinate:r,key:n,offsetTopLeft:a,position:s,reverseDirection:o,tooltipDimension:l,viewBox:c,viewBoxDimension:u}=t;if(s&&Oe(s[n]))return s[n];var h=r[n]-l-(a>0?a:0),p=r[n]+a;if(e[n])return o[n]?h:p;var m=c[n];if(m==null)return 0;if(o[n]){var x=h,y=m;return x<y?Math.max(p,m):Math.max(h,m)}if(u==null)return 0;var b=p+l,w=m+u;return b>w?Math.max(h,m):Math.max(p,m)}function Bde(t){var{translateX:e,translateY:r,useTranslate3d:n}=t;return{transform:n?"translate3d(".concat(e,"px, ").concat(r,"px, 0)"):"translate(".concat(e,"px, ").concat(r,"px)")}}function Fde(t){var{allowEscapeViewBox:e,coordinate:r,offsetTopLeft:n,position:a,reverseDirection:s,tooltipBox:o,useTranslate3d:l,viewBox:c}=t,u,h,p;return o.height>0&&o.width>0&&r?(h=nE({allowEscapeViewBox:e,coordinate:r,key:"x",offsetTopLeft:n,position:a,reverseDirection:s,tooltipDimension:o.width,viewBox:c,viewBoxDimension:c.width}),p=nE({allowEscapeViewBox:e,coordinate:r,key:"y",offsetTopLeft:n,position:a,reverseDirection:s,tooltipDimension:o.height,viewBox:c,viewBoxDimension:c.height}),u=Bde({translateX:h,translateY:p,useTranslate3d:l})):u=zde,{cssProperties:u,cssClasses:Ide({translateX:h,translateY:p,coordinate:r})}}function aE(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).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?aE(Object(r),!0).forEach(function(n){Uj(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):aE(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Uj(t,e,r){return(e=Hde(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Hde(t){var e=$de(t,"string");return typeof e=="symbol"?e:e+""}function $de(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class Yde extends O.PureComponent{constructor(){super(...arguments),Uj(this,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}),Uj(this,"handleKeyDown",e=>{if(e.key==="Escape"){var r,n,a,s;this.setState({dismissed:!0,dismissedAtCoordinate:{x:(r=(n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==null&&r!==void 0?r:0,y:(a=(s=this.props.coordinate)===null||s===void 0?void 0:s.y)!==null&&a!==void 0?a:0}})}})}componentDidMount(){document.addEventListener("keydown",this.handleKeyDown)}componentWillUnmount(){document.removeEventListener("keydown",this.handleKeyDown)}componentDidUpdate(){var e,r;this.state.dismissed&&(((e=this.props.coordinate)===null||e===void 0?void 0:e.x)!==this.state.dismissedAtCoordinate.x||((r=this.props.coordinate)===null||r===void 0?void 0:r.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}render(){var{active:e,allowEscapeViewBox:r,animationDuration:n,animationEasing:a,children:s,coordinate:o,hasPayload:l,isAnimationActive:c,offset:u,position:h,reverseDirection:p,useTranslate3d:m,viewBox:x,wrapperStyle:y,lastBoundingBox:b,innerRef:w,hasPortalFromProps:N}=this.props,{cssClasses:A,cssProperties:S}=Fde({allowEscapeViewBox:r,coordinate:o,offsetTopLeft:u,position:h,reverseDirection:p,tooltipBox:{height:b.height,width:b.width},useTranslate3d:m,viewBox:x}),C=N?{}:hg(hg({transition:c&&e?"transform ".concat(n,"ms ").concat(a):void 0},S),{},{pointerEvents:"none",visibility:!this.state.dismissed&&e&&l?"visible":"hidden",position:"absolute",top:0,left:0}),k=hg(hg({},C),{},{visibility:!this.state.dismissed&&e&&l?"visible":"hidden"},y);return O.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:A,style:k,ref:w},s)}}var Ude=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),op={isSsr:Ude()},H9=()=>Be(t=>t.rootProps.accessibilityLayer);function da(t){return Number.isFinite(t)}function Ix(t){return typeof t=="number"&&t>0&&Number.isFinite(t)}function Wj(){return Wj=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Wj.apply(null,arguments)}function sE(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function iE(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?sE(Object(r),!0).forEach(function(n){Wde(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):sE(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Wde(t,e,r){return(e=Xde(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Xde(t){var e=Vde(t,"string");return typeof e=="symbol"?e:e+""}function Vde(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var oE={curveBasisClosed:Tle,curveBasisOpen:Mle,curveBasis:Dle,curveBumpX:ple,curveBumpY:mle,curveLinearClosed:Ele,curveLinear:Z0,curveMonotoneX:Ole,curveMonotoneY:Ple,curveNatural:_le,curveStep:Rle,curveStepAfter:zle,curveStepBefore:Lle},fg=t=>da(t.x)&&da(t.y),ph=t=>t.x,mh=t=>t.y,qde=(t,e)=>{if(typeof t=="function")return t;var r="curve".concat(sp(t));return(r==="curveMonotone"||r==="curveBump")&&e?oE["".concat(r).concat(e==="vertical"?"Y":"X")]:oE[r]||Z0},Gde=t=>{var{type:e="linear",points:r=[],baseLine:n,layout:a,connectNulls:s=!1}=t,o=qde(e,a),l=s?r.filter(fg):r,c;if(Array.isArray(n)){var u=s?n.filter(p=>fg(p)):n,h=l.map((p,m)=>iE(iE({},p),{},{base:u[m]}));return a==="vertical"?c=dg().y(mh).x1(ph).x0(p=>p.base.x):c=dg().x(ph).y1(mh).y0(p=>p.base.y),c.defined(fg).curve(o),c(h)}return a==="vertical"&&Oe(n)?c=dg().y(mh).x1(ph).x0(n):Oe(n)?c=dg().x(ph).y1(mh).y0(n):c=l9().x(ph).y(mh),c.defined(fg).curve(o),c(l)},Kde=t=>{var{className:e,points:r,path:n,pathRef:a}=t;if((!r||!r.length)&&!n)return null;var s=r&&r.length?Gde(t):n;return O.createElement("path",Wj({},ip(t),ele(t),{className:Ge("recharts-curve",e),d:s===null?void 0:s,ref:a}))},Zde=["x","y","top","left","width","height","className"];function Xj(){return Xj=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Xj.apply(null,arguments)}function lE(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Qde(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?lE(Object(r),!0).forEach(function(n){Jde(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):lE(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Jde(t,e,r){return(e=eue(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function eue(t){var e=tue(t,"string");return typeof e=="symbol"?e:e+""}function tue(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function rue(t,e){if(t==null)return{};var r,n,a=nue(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(n=0;n<s.length;n++)r=s[n],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(a[r]=t[r])}return a}function nue(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.indexOf(n)!==-1)continue;r[n]=t[n]}return r}var aue=(t,e,r,n,a,s)=>"M".concat(t,",").concat(a,"v").concat(n,"M").concat(s,",").concat(e,"h").concat(r),sue=t=>{var{x:e=0,y:r=0,top:n=0,left:a=0,width:s=0,height:o=0,className:l}=t,c=rue(t,Zde),u=Qde({x:e,y:r,top:n,left:a,width:s,height:o},c);return!Oe(e)||!Oe(r)||!Oe(s)||!Oe(o)||!Oe(n)||!Oe(a)?null:O.createElement("path",Xj({},zr(u,!0),{className:Ge("recharts-cross",l),d:aue(e,r,s,o,n,a)}))};function iue(t,e,r,n){var a=n/2;return{stroke:"none",fill:"#ccc",x:t==="horizontal"?e.x-a:r.left+.5,y:t==="horizontal"?r.top+.5:e.y-a,width:t==="horizontal"?n:r.width-1,height:t==="horizontal"?r.height-1:n}}function cE(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function oue(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?cE(Object(r),!0).forEach(function(n){lue(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):cE(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function lue(t,e,r){return(e=cue(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function cue(t){var e=due(t,"string");return typeof e=="symbol"?e:e+""}function due(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function To(t,e){var r=oue({},t),n=e,a=Object.keys(e),s=a.reduce((o,l)=>(o[l]===void 0&&n[l]!==void 0&&(o[l]=n[l]),o),r);return s}var Xw={},Vw={},qw={},dE;function uue(){return dE||(dE=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r){if(!r||typeof r!="object")return!1;const n=Object.getPrototypeOf(r);return n===null||n===Object.prototype||Object.getPrototypeOf(n)===null?Object.prototype.toString.call(r)==="[object Object]":!1}t.isPlainObject=e}(qw)),qw}var uE;function hue(){return uE||(uE=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=uue(),r=S9(),n=KN(),a=ZN(),s=qN();function o(u,h,p){return l(u,h,void 0,void 0,void 0,void 0,p)}function l(u,h,p,m,x,y,b){const w=b(u,h,p,m,x,y);if(w!==void 0)return w;if(typeof u==typeof h)switch(typeof u){case"bigint":case"string":case"boolean":case"symbol":case"undefined":return u===h;case"number":return u===h||Object.is(u,h);case"function":return u===h;case"object":return c(u,h,y,b)}return c(u,h,y,b)}function c(u,h,p,m){if(Object.is(u,h))return!0;let x=n.getTag(u),y=n.getTag(h);if(x===a.argumentsTag&&(x=a.objectTag),y===a.argumentsTag&&(y=a.objectTag),x!==y)return!1;switch(x){case a.stringTag:return u.toString()===h.toString();case a.numberTag:{const N=u.valueOf(),A=h.valueOf();return s.eq(N,A)}case a.booleanTag:case a.dateTag:case a.symbolTag:return Object.is(u.valueOf(),h.valueOf());case a.regexpTag:return u.source===h.source&&u.flags===h.flags;case a.functionTag:return u===h}p=p??new Map;const b=p.get(u),w=p.get(h);if(b!=null&&w!=null)return b===h;p.set(u,h),p.set(h,u);try{switch(x){case a.mapTag:{if(u.size!==h.size)return!1;for(const[N,A]of u.entries())if(!h.has(N)||!l(A,h.get(N),N,u,h,p,m))return!1;return!0}case a.setTag:{if(u.size!==h.size)return!1;const N=Array.from(u.values()),A=Array.from(h.values());for(let S=0;S<N.length;S++){const C=N[S],k=A.findIndex(T=>l(C,T,void 0,u,h,p,m));if(k===-1)return!1;A.splice(k,1)}return!0}case a.arrayTag:case a.uint8ArrayTag:case a.uint8ClampedArrayTag:case a.uint16ArrayTag:case a.uint32ArrayTag:case a.bigUint64ArrayTag:case a.int8ArrayTag:case a.int16ArrayTag:case a.int32ArrayTag:case a.bigInt64ArrayTag:case a.float32ArrayTag:case a.float64ArrayTag:{if(typeof Buffer<"u"&&Buffer.isBuffer(u)!==Buffer.isBuffer(h)||u.length!==h.length)return!1;for(let N=0;N<u.length;N++)if(!l(u[N],h[N],N,u,h,p,m))return!1;return!0}case a.arrayBufferTag:return u.byteLength!==h.byteLength?!1:c(new Uint8Array(u),new Uint8Array(h),p,m);case a.dataViewTag:return u.byteLength!==h.byteLength||u.byteOffset!==h.byteOffset?!1:c(new Uint8Array(u),new Uint8Array(h),p,m);case a.errorTag:return u.name===h.name&&u.message===h.message;case a.objectTag:{if(!(c(u.constructor,h.constructor,p,m)||e.isPlainObject(u)&&e.isPlainObject(h)))return!1;const A=[...Object.keys(u),...r.getSymbols(u)],S=[...Object.keys(h),...r.getSymbols(h)];if(A.length!==S.length)return!1;for(let C=0;C<A.length;C++){const k=A[C],T=u[k];if(!Object.hasOwn(h,k))return!1;const E=h[k];if(!l(T,E,k,u,h,p,m))return!1}return!0}default:return!1}}finally{p.delete(u),p.delete(h)}}t.isEqualWith=o}(Vw)),Vw}var Gw={},hE;function fue(){return hE||(hE=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(){}t.noop=e}(Gw)),Gw}var fE;function pue(){return fE||(fE=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=hue(),r=fue();function n(a,s){return e.isEqualWith(a,s,r.noop)}t.isEqual=n}(Xw)),Xw}var Kw,pE;function mue(){return pE||(pE=1,Kw=pue().isEqual),Kw}var gue=mue();const xue=ns(gue);var Bx=1e-4,$9=(t,e)=>[0,3*t,3*e-6*t,3*t-3*e+1],Y9=(t,e)=>t.map((r,n)=>r*e**n).reduce((r,n)=>r+n),mE=(t,e)=>r=>{var n=$9(t,e);return Y9(n,r)},bue=(t,e)=>r=>{var n=$9(t,e),a=[...n.map((s,o)=>s*o).slice(1),0];return Y9(a,r)},gE=function(){for(var e,r,n,a,s=arguments.length,o=new Array(s),l=0;l<s;l++)o[l]=arguments[l];if(o.length===1)switch(o[0]){case"linear":[e,n,r,a]=[0,0,1,1];break;case"ease":[e,n,r,a]=[.25,.1,.25,1];break;case"ease-in":[e,n,r,a]=[.42,0,1,1];break;case"ease-out":[e,n,r,a]=[.42,0,.58,1];break;case"ease-in-out":[e,n,r,a]=[0,0,.58,1];break;default:{var c=o[0].split("(");c[0]==="cubic-bezier"&&c[1].split(")")[0].split(",").length===4&&([e,n,r,a]=c[1].split(")")[0].split(",").map(y=>parseFloat(y)))}}else o.length===4&&([e,n,r,a]=o);var u=mE(e,r),h=mE(n,a),p=bue(e,r),m=y=>y>1?1:y<0?0:y,x=y=>{for(var b=y>1?1:y,w=b,N=0;N<8;++N){var A=u(w)-b,S=p(w);if(Math.abs(A-b)<Bx||S<Bx)return h(w);w=m(w-A/S)}return h(w)};return x.isStepper=!1,x},yue=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:r=100,damping:n=8,dt:a=17}=e,s=(o,l,c)=>{var u=-(o-l)*r,h=c*n,p=c+(u-h)*a/1e3,m=c*a/1e3+o;return Math.abs(m-l)<Bx&&Math.abs(p)<Bx?[l,0]:[m,p]};return s.isStepper=!0,s.dt=a,s},U9=t=>{if(typeof t=="string")switch(t){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return gE(t);case"spring":return yue();default:if(t.split("(")[0]==="cubic-bezier")return gE(t)}return typeof t=="function"?t:null};function xE(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function bE(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?xE(Object(r),!0).forEach(function(n){vue(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):xE(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function vue(t,e,r){return(e=wue(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function wue(t){var e=jue(t,"string");return typeof e=="symbol"?e:e+""}function jue(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Nue=t=>t.replace(/([A-Z])/g,e=>"-".concat(e.toLowerCase())),Sue=(t,e,r)=>t.map(n=>"".concat(Nue(n)," ").concat(e,"ms ").concat(r)).join(","),Aue=(t,e)=>[Object.keys(t),Object.keys(e)].reduce((r,n)=>r.filter(a=>n.includes(a))),wf=(t,e)=>Object.keys(e).reduce((r,n)=>bE(bE({},r),{},{[n]:t(n,e[n])}),{});function yE(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).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?yE(Object(r),!0).forEach(function(n){Cue(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):yE(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Cue(t,e,r){return(e=kue(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function kue(t){var e=Due(t,"string");return typeof e=="symbol"?e:e+""}function Due(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Fx=(t,e,r)=>t+(e-t)*r,Vj=t=>{var{from:e,to:r}=t;return e!==r},W9=(t,e,r)=>{var n=wf((a,s)=>{if(Vj(s)){var[o,l]=t(s.from,s.to,s.velocity);return Wr(Wr({},s),{},{from:o,velocity:l})}return s},e);return r<1?wf((a,s)=>Vj(s)?Wr(Wr({},s),{},{velocity:Fx(s.velocity,n[a].velocity,r),from:Fx(s.from,n[a].from,r)}):s,e):W9(t,n,r-1)};function Tue(t,e,r,n,a,s){var o,l=n.reduce((m,x)=>Wr(Wr({},m),{},{[x]:{from:t[x],velocity:0,to:e[x]}}),{}),c=()=>wf((m,x)=>x.from,l),u=()=>!Object.values(l).filter(Vj).length,h=null,p=m=>{o||(o=m);var x=m-o,y=x/r.dt;l=W9(r,l,y),a(Wr(Wr(Wr({},t),e),c())),o=m,u()||(h=s.setTimeout(p))};return()=>(h=s.setTimeout(p),()=>{h()})}function Mue(t,e,r,n,a,s,o){var l=null,c=a.reduce((p,m)=>Wr(Wr({},p),{},{[m]:[t[m],e[m]]}),{}),u,h=p=>{u||(u=p);var m=(p-u)/n,x=wf((b,w)=>Fx(...w,r(m)),c);if(s(Wr(Wr(Wr({},t),e),x)),m<1)l=o.setTimeout(h);else{var y=wf((b,w)=>Fx(...w,r(1)),c);s(Wr(Wr(Wr({},t),e),y))}};return()=>(l=o.setTimeout(h),()=>{l()})}const X9=(t,e,r,n,a,s)=>{var o=Aue(t,e);return r.isStepper===!0?Tue(t,e,r,o,a,s):Mue(t,e,r,n,o,a,s)};function Eue(t){var e,r=()=>null,n=!1,a=null,s=o=>{if(!n){if(Array.isArray(o)){if(!o.length)return;var l=o,[c,...u]=l;if(typeof c=="number"){a=t.setTimeout(s.bind(null,u),c);return}s(c),a=t.setTimeout(s.bind(null,u));return}typeof o=="string"&&(e=o,r(e)),typeof o=="object"&&(e=o,r(e)),typeof o=="function"&&o()}};return{stop:()=>{n=!0},start:o=>{n=!1,a&&(a(),a=null),s(o)},subscribe:o=>(r=o,()=>{r=()=>null}),getTimeoutController:()=>t}}class Oue{setTimeout(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=performance.now(),a=null,s=o=>{o-n>=r?e(o):typeof requestAnimationFrame=="function"&&(a=requestAnimationFrame(s))};return a=requestAnimationFrame(s),()=>{cancelAnimationFrame(a)}}}function Pue(){return Eue(new Oue)}var _ue=O.createContext(Pue);function V9(t,e){var r=O.useContext(_ue);return O.useMemo(()=>e??r(t),[t,e,r])}var Rue=["children","begin","duration","attributeName","easing","isActive","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart","animationManager"];function qj(){return qj=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},qj.apply(null,arguments)}function Lue(t,e){if(t==null)return{};var r,n,a=zue(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(n=0;n<s.length;n++)r=s[n],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(a[r]=t[r])}return a}function zue(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.indexOf(n)!==-1)continue;r[n]=t[n]}return r}function vE(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function ro(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?vE(Object(r),!0).forEach(function(n){Sl(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):vE(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Sl(t,e,r){return(e=Iue(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Iue(t){var e=Bue(t,"string");return typeof e=="symbol"?e:e+""}function Bue(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class aS extends O.PureComponent{constructor(e,r){super(e,r),Sl(this,"mounted",!1),Sl(this,"manager",void 0),Sl(this,"stopJSAnimation",null),Sl(this,"unSubscribe",null);var{isActive:n,attributeName:a,from:s,to:o,children:l,duration:c,animationManager:u}=this.props;if(this.manager=u,this.handleStyleChange=this.handleStyleChange.bind(this),this.changeStyle=this.changeStyle.bind(this),!n||c<=0){this.state={style:{}},typeof l=="function"&&(this.state={style:o});return}if(s){if(typeof l=="function"){this.state={style:s};return}this.state={style:a?{[a]:s}:s}}else this.state={style:{}}}componentDidMount(){var{isActive:e,canBegin:r}=this.props;this.mounted=!0,!(!e||!r)&&this.runAnimation(this.props)}componentDidUpdate(e){var{isActive:r,canBegin:n,attributeName:a,shouldReAnimate:s,to:o,from:l}=this.props,{style:c}=this.state;if(n){if(!r){var u={style:a?{[a]:o}:o};this.state&&c&&(a&&c[a]!==o||!a&&c!==o)&&this.setState(u);return}if(!(xue(e.to,o)&&e.canBegin&&e.isActive)){var h=!e.canBegin||!e.isActive;this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var p=h||s?l:e.to;if(this.state&&c){var m={style:a?{[a]:p}:p};(a&&c[a]!==p||!a&&c!==p)&&this.setState(m)}this.runAnimation(ro(ro({},this.props),{},{from:p,begin:0}))}}}componentWillUnmount(){this.mounted=!1;var{onAnimationEnd:e}=this.props;this.unSubscribe&&this.unSubscribe(),this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation(),e&&e()}handleStyleChange(e){this.changeStyle(e)}changeStyle(e){this.mounted&&this.setState({style:e})}runJSAnimation(e){var{from:r,to:n,duration:a,easing:s,begin:o,onAnimationEnd:l,onAnimationStart:c}=e,u=X9(r,n,U9(s),a,this.changeStyle,this.manager.getTimeoutController()),h=()=>{this.stopJSAnimation=u()};this.manager.start([c,o,h,a,l])}runAnimation(e){var{begin:r,duration:n,attributeName:a,to:s,easing:o,onAnimationStart:l,onAnimationEnd:c,children:u}=e;if(this.unSubscribe=this.manager.subscribe(this.handleStyleChange),typeof o=="function"||typeof u=="function"||o==="spring"){this.runJSAnimation(e);return}var h=a?{[a]:s}:s,p=Sue(Object.keys(h),n,o);this.manager.start([l,r,ro(ro({},h),{},{transition:p}),n,c])}render(){var e=this.props,{children:r,begin:n,duration:a,attributeName:s,easing:o,isActive:l,from:c,to:u,canBegin:h,onAnimationEnd:p,shouldReAnimate:m,onAnimationReStart:x,animationManager:y}=e,b=Lue(e,Rue),w=O.Children.count(r),N=this.state.style;if(typeof r=="function")return r(N);if(!l||w===0||a<=0)return r;var A=S=>{var{style:C={},className:k}=S.props,T=O.cloneElement(S,ro(ro({},b),{},{style:ro(ro({},C),N),className:k}));return T};return w===1?A(O.Children.only(r)):O.createElement("div",null,O.Children.map(r,S=>A(S)))}}Sl(aS,"displayName","Animate");Sl(aS,"defaultProps",{begin:0,duration:1e3,attributeName:"",easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}});function Hx(t){var e,r=V9((e=t.attributeName)!==null&&e!==void 0?e:Object.keys(t.to).join(","),t.animationManager);return O.createElement(aS,qj({},t,{animationManager:r}))}function $x(){return $x=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},$x.apply(null,arguments)}var wE=(t,e,r,n,a)=>{var s=Math.min(Math.abs(r)/2,Math.abs(n)/2),o=n>=0?1:-1,l=r>=0?1:-1,c=n>=0&&r>=0||n<0&&r<0?1:0,u;if(s>0&&a instanceof Array){for(var h=[0,0,0,0],p=0,m=4;p<m;p++)h[p]=a[p]>s?s:a[p];u="M".concat(t,",").concat(e+o*h[0]),h[0]>0&&(u+="A ".concat(h[0],",").concat(h[0],",0,0,").concat(c,",").concat(t+l*h[0],",").concat(e)),u+="L ".concat(t+r-l*h[1],",").concat(e),h[1]>0&&(u+="A ".concat(h[1],",").concat(h[1],",0,0,").concat(c,`,
`).concat(t+r,",").concat(e+o*h[1])),u+="L ".concat(t+r,",").concat(e+n-o*h[2]),h[2]>0&&(u+="A ".concat(h[2],",").concat(h[2],",0,0,").concat(c,`,
`).concat(t+r-l*h[2],",").concat(e+n)),u+="L ".concat(t+l*h[3],",").concat(e+n),h[3]>0&&(u+="A ".concat(h[3],",").concat(h[3],",0,0,").concat(c,`,
`).concat(t,",").concat(e+n-o*h[3])),u+="Z"}else if(s>0&&a===+a&&a>0){var x=Math.min(s,a);u="M ".concat(t,",").concat(e+o*x,`
A `).concat(x,",").concat(x,",0,0,").concat(c,",").concat(t+l*x,",").concat(e,`
L `).concat(t+r-l*x,",").concat(e,`
A `).concat(x,",").concat(x,",0,0,").concat(c,",").concat(t+r,",").concat(e+o*x,`
L `).concat(t+r,",").concat(e+n-o*x,`
A `).concat(x,",").concat(x,",0,0,").concat(c,",").concat(t+r-l*x,",").concat(e+n,`
L `).concat(t+l*x,",").concat(e+n,`
A `).concat(x,",").concat(x,",0,0,").concat(c,",").concat(t,",").concat(e+n-o*x," Z")}else u="M ".concat(t,",").concat(e," h ").concat(r," v ").concat(n," h ").concat(-r," Z");return u},Fue={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},q9=t=>{var e=To(t,Fue),r=O.useRef(null),[n,a]=O.useState(-1);O.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var N=r.current.getTotalLength();N&&a(N)}catch{}},[]);var{x:s,y:o,width:l,height:c,radius:u,className:h}=e,{animationEasing:p,animationDuration:m,animationBegin:x,isAnimationActive:y,isUpdateAnimationActive:b}=e;if(s!==+s||o!==+o||l!==+l||c!==+c||l===0||c===0)return null;var w=Ge("recharts-rectangle",h);return b?O.createElement(Hx,{canBegin:n>0,from:{width:l,height:c,x:s,y:o},to:{width:l,height:c,x:s,y:o},duration:m,animationEasing:p,isActive:b},N=>{var{width:A,height:S,x:C,y:k}=N;return O.createElement(Hx,{canBegin:n>0,from:"0px ".concat(n===-1?1:n,"px"),to:"".concat(n,"px 0px"),attributeName:"strokeDasharray",begin:x,duration:m,isActive:y,easing:p},O.createElement("path",$x({},zr(e,!0),{className:w,d:wE(C,k,A,S,u),ref:r})))}):O.createElement("path",$x({},zr(e,!0),{className:w,d:wE(s,o,l,c,u)}))};function G9(t){var{cx:e,cy:r,radius:n,startAngle:a,endAngle:s}=t,o=Kr(e,r,n,a),l=Kr(e,r,n,s);return{points:[o,l],cx:e,cy:r,radius:n,startAngle:a,endAngle:s}}function Gj(){return Gj=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Gj.apply(null,arguments)}var Hue=(t,e)=>{var r=Pn(e-t),n=Math.min(Math.abs(e-t),359.999);return r*n},pg=t=>{var{cx:e,cy:r,radius:n,angle:a,sign:s,isExternal:o,cornerRadius:l,cornerIsExternal:c}=t,u=l*(o?1:-1)+n,h=Math.asin(l/u)/zx,p=c?a:a+s*h,m=Kr(e,r,u,p),x=Kr(e,r,n,p),y=c?a-s*h:a,b=Kr(e,r,u*Math.cos(h*zx),y);return{center:m,circleTangency:x,lineTangency:b,theta:h}},K9=t=>{var{cx:e,cy:r,innerRadius:n,outerRadius:a,startAngle:s,endAngle:o}=t,l=Hue(s,o),c=s+l,u=Kr(e,r,a,s),h=Kr(e,r,a,c),p="M ".concat(u.x,",").concat(u.y,`
A `).concat(a,",").concat(a,`,0,
`).concat(+(Math.abs(l)>180),",").concat(+(s>c),`,
`).concat(h.x,",").concat(h.y,`
`);if(n>0){var m=Kr(e,r,n,s),x=Kr(e,r,n,c);p+="L ".concat(x.x,",").concat(x.y,`
A `).concat(n,",").concat(n,`,0,
`).concat(+(Math.abs(l)>180),",").concat(+(s<=c),`,
`).concat(m.x,",").concat(m.y," Z")}else p+="L ".concat(e,",").concat(r," Z");return p},$ue=t=>{var{cx:e,cy:r,innerRadius:n,outerRadius:a,cornerRadius:s,forceCornerRadius:o,cornerIsExternal:l,startAngle:c,endAngle:u}=t,h=Pn(u-c),{circleTangency:p,lineTangency:m,theta:x}=pg({cx:e,cy:r,radius:a,angle:c,sign:h,cornerRadius:s,cornerIsExternal:l}),{circleTangency:y,lineTangency:b,theta:w}=pg({cx:e,cy:r,radius:a,angle:u,sign:-h,cornerRadius:s,cornerIsExternal:l}),N=l?Math.abs(c-u):Math.abs(c-u)-x-w;if(N<0)return o?"M ".concat(m.x,",").concat(m.y,`
a`).concat(s,",").concat(s,",0,0,1,").concat(s*2,`,0
a`).concat(s,",").concat(s,",0,0,1,").concat(-s*2,`,0
`):K9({cx:e,cy:r,innerRadius:n,outerRadius:a,startAngle:c,endAngle:u});var A="M ".concat(m.x,",").concat(m.y,`
A`).concat(s,",").concat(s,",0,0,").concat(+(h<0),",").concat(p.x,",").concat(p.y,`
A`).concat(a,",").concat(a,",0,").concat(+(N>180),",").concat(+(h<0),",").concat(y.x,",").concat(y.y,`
A`).concat(s,",").concat(s,",0,0,").concat(+(h<0),",").concat(b.x,",").concat(b.y,`
`);if(n>0){var{circleTangency:S,lineTangency:C,theta:k}=pg({cx:e,cy:r,radius:n,angle:c,sign:h,isExternal:!0,cornerRadius:s,cornerIsExternal:l}),{circleTangency:T,lineTangency:E,theta:_}=pg({cx:e,cy:r,radius:n,angle:u,sign:-h,isExternal:!0,cornerRadius:s,cornerIsExternal:l}),L=l?Math.abs(c-u):Math.abs(c-u)-k-_;if(L<0&&s===0)return"".concat(A,"L").concat(e,",").concat(r,"Z");A+="L".concat(E.x,",").concat(E.y,`
A`).concat(s,",").concat(s,",0,0,").concat(+(h<0),",").concat(T.x,",").concat(T.y,`
A`).concat(n,",").concat(n,",0,").concat(+(L>180),",").concat(+(h>0),",").concat(S.x,",").concat(S.y,`
A`).concat(s,",").concat(s,",0,0,").concat(+(h<0),",").concat(C.x,",").concat(C.y,"Z")}else A+="L".concat(e,",").concat(r,"Z");return A},Yue={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},Z9=t=>{var e=To(t,Yue),{cx:r,cy:n,innerRadius:a,outerRadius:s,cornerRadius:o,forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:h,className:p}=e;if(s<a||u===h)return null;var m=Ge("recharts-sector",p),x=s-a,y=rs(o,x,0,!0),b;return y>0&&Math.abs(u-h)<360?b=$ue({cx:r,cy:n,innerRadius:a,outerRadius:s,cornerRadius:Math.min(y,x/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:h}):b=K9({cx:r,cy:n,innerRadius:a,outerRadius:s,startAngle:u,endAngle:h}),O.createElement("path",Gj({},zr(e,!0),{className:m,d:b}))};function Uue(t,e,r){var n,a,s,o;if(t==="horizontal")n=e.x,s=n,a=r.top,o=r.top+r.height;else if(t==="vertical")a=e.y,o=a,n=r.left,s=r.left+r.width;else if(e.cx!=null&&e.cy!=null)if(t==="centric"){var{cx:l,cy:c,innerRadius:u,outerRadius:h,angle:p}=e,m=Kr(l,c,u,p),x=Kr(l,c,h,p);n=m.x,a=m.y,s=x.x,o=x.y}else return G9(e);return[{x:n,y:a},{x:s,y:o}]}var Zw={},Qw={},Jw={},jE;function Wue(){return jE||(jE=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=k9();function r(n){return e.isSymbol(n)?NaN:Number(n)}t.toNumber=r}(Jw)),Jw}var NE;function Xue(){return NE||(NE=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=Wue();function r(n){return n?(n=e.toNumber(n),n===1/0||n===-1/0?(n<0?-1:1)*Number.MAX_VALUE:n===n?n:0):n===0?n:0}t.toFinite=r}(Qw)),Qw}var SE;function Vue(){return SE||(SE=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=D9(),r=Xue();function n(a,s,o){o&&typeof o!="number"&&e.isIterateeCall(a,s,o)&&(s=o=void 0),a=r.toFinite(a),s===void 0?(s=a,a=0):s=r.toFinite(s),o=o===void 0?a<s?1:-1:r.toFinite(o);const l=Math.max(Math.ceil((s-a)/(o||1)),0),c=new Array(l);for(let u=0;u<l;u++)c[u]=a,a+=o;return c}t.range=n}(Zw)),Zw}var e2,AE;function que(){return AE||(AE=1,e2=Vue().range),e2}var Gue=que();const Q9=ns(Gue);function mo(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Kue(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function sS(t){let e,r,n;t.length!==2?(e=mo,r=(l,c)=>mo(t(l),c),n=(l,c)=>t(l)-c):(e=t===mo||t===Kue?t:Zue,r=t,n=t);function a(l,c,u=0,h=l.length){if(u<h){if(e(c,c)!==0)return h;do{const p=u+h>>>1;r(l[p],c)<0?u=p+1:h=p}while(u<h)}return u}function s(l,c,u=0,h=l.length){if(u<h){if(e(c,c)!==0)return h;do{const p=u+h>>>1;r(l[p],c)<=0?u=p+1:h=p}while(u<h)}return u}function o(l,c,u=0,h=l.length){const p=a(l,c,u,h-1);return p>u&&n(l[p-1],c)>-n(l[p],c)?p-1:p}return{left:a,center:o,right:s}}function Zue(){return 0}function J9(t){return t===null?NaN:+t}function*Que(t,e){for(let r of t)r!=null&&(r=+r)>=r&&(yield r)}const Jue=sS(mo),lp=Jue.right;sS(J9).center;class CE extends Map{constructor(e,r=rhe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),e!=null)for(const[n,a]of e)this.set(n,a)}get(e){return super.get(kE(this,e))}has(e){return super.has(kE(this,e))}set(e,r){return super.set(ehe(this,e),r)}delete(e){return super.delete(the(this,e))}}function kE({_intern:t,_key:e},r){const n=e(r);return t.has(n)?t.get(n):r}function ehe({_intern:t,_key:e},r){const n=e(r);return t.has(n)?t.get(n):(t.set(n,r),r)}function the({_intern:t,_key:e},r){const n=e(r);return t.has(n)&&(r=t.get(n),t.delete(n)),r}function rhe(t){return t!==null&&typeof t=="object"?t.valueOf():t}function nhe(t=mo){if(t===mo)return e7;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 e7(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}const ahe=Math.sqrt(50),she=Math.sqrt(10),ihe=Math.sqrt(2);function Yx(t,e,r){const n=(e-t)/Math.max(0,r),a=Math.floor(Math.log10(n)),s=n/Math.pow(10,a),o=s>=ahe?10:s>=she?5:s>=ihe?2:1;let l,c,u;return a<0?(u=Math.pow(10,-a)/o,l=Math.round(t*u),c=Math.round(e*u),l/u<t&&++l,c/u>e&&--c,u=-u):(u=Math.pow(10,a)*o,l=Math.round(t/u),c=Math.round(e/u),l*u<t&&++l,c*u>e&&--c),c<l&&.5<=r&&r<2?Yx(t,e,r*2):[l,c,u]}function Kj(t,e,r){if(e=+e,t=+t,r=+r,!(r>0))return[];if(t===e)return[t];const n=e<t,[a,s,o]=n?Yx(e,t,r):Yx(t,e,r);if(!(s>=a))return[];const l=s-a+1,c=new Array(l);if(n)if(o<0)for(let u=0;u<l;++u)c[u]=(s-u)/-o;else for(let u=0;u<l;++u)c[u]=(s-u)*o;else if(o<0)for(let u=0;u<l;++u)c[u]=(a+u)/-o;else for(let u=0;u<l;++u)c[u]=(a+u)*o;return c}function Zj(t,e,r){return e=+e,t=+t,r=+r,Yx(t,e,r)[2]}function Qj(t,e,r){e=+e,t=+t,r=+r;const n=e<t,a=n?Zj(e,t,r):Zj(t,e,r);return(n?-1:1)*(a<0?1/-a:a)}function DE(t,e){let r;for(const n of t)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function TE(t,e){let r;for(const n of t)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function t7(t,e,r=0,n=1/0,a){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(a=a===void 0?e7:nhe(a);n>r;){if(n-r>600){const c=n-r+1,u=e-r+1,h=Math.log(c),p=.5*Math.exp(2*h/3),m=.5*Math.sqrt(h*p*(c-p)/c)*(u-c/2<0?-1:1),x=Math.max(r,Math.floor(e-u*p/c+m)),y=Math.min(n,Math.floor(e+(c-u)*p/c+m));t7(t,e,x,y,a)}const s=t[e];let o=r,l=n;for(gh(t,r,e),a(t[n],s)>0&&gh(t,r,n);o<l;){for(gh(t,o,l),++o,--l;a(t[o],s)<0;)++o;for(;a(t[l],s)>0;)--l}a(t[r],s)===0?gh(t,r,l):(++l,gh(t,l,n)),l<=e&&(r=l+1),e<=l&&(n=l-1)}return t}function gh(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function ohe(t,e,r){if(t=Float64Array.from(Que(t)),!(!(n=t.length)||isNaN(e=+e))){if(e<=0||n<2)return TE(t);if(e>=1)return DE(t);var n,a=(n-1)*e,s=Math.floor(a),o=DE(t7(t,s).subarray(0,s+1)),l=TE(t.subarray(s+1));return o+(l-o)*(a-s)}}function lhe(t,e,r=J9){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,a=(n-1)*e,s=Math.floor(a),o=+r(t[s],s,t),l=+r(t[s+1],s+1,t);return o+(l-o)*(a-s)}}function che(t,e,r){t=+t,e=+e,r=(a=arguments.length)<2?(e=t,t=0,1):a<3?1:+r;for(var n=-1,a=Math.max(0,Math.ceil((e-t)/r))|0,s=new Array(a);++n<a;)s[n]=t+n*r;return s}function Ya(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function ki(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 Jj=Symbol("implicit");function iS(){var t=new CE,e=[],r=[],n=Jj;function a(s){let o=t.get(s);if(o===void 0){if(n!==Jj)return n;t.set(s,o=e.push(s)-1)}return r[o%r.length]}return a.domain=function(s){if(!arguments.length)return e.slice();e=[],t=new CE;for(const o of s)t.has(o)||t.set(o,e.push(o)-1);return a},a.range=function(s){return arguments.length?(r=Array.from(s),a):r.slice()},a.unknown=function(s){return arguments.length?(n=s,a):n},a.copy=function(){return iS(e,r).unknown(n)},Ya.apply(a,arguments),a}function oS(){var t=iS().unknown(void 0),e=t.domain,r=t.range,n=0,a=1,s,o,l=!1,c=0,u=0,h=.5;delete t.unknown;function p(){var m=e().length,x=a<n,y=x?a:n,b=x?n:a;s=(b-y)/Math.max(1,m-c+u*2),l&&(s=Math.floor(s)),y+=(b-y-s*(m-c))*h,o=s*(1-c),l&&(y=Math.round(y),o=Math.round(o));var w=che(m).map(function(N){return y+s*N});return r(x?w.reverse():w)}return t.domain=function(m){return arguments.length?(e(m),p()):e()},t.range=function(m){return arguments.length?([n,a]=m,n=+n,a=+a,p()):[n,a]},t.rangeRound=function(m){return[n,a]=m,n=+n,a=+a,l=!0,p()},t.bandwidth=function(){return o},t.step=function(){return s},t.round=function(m){return arguments.length?(l=!!m,p()):l},t.padding=function(m){return arguments.length?(c=Math.min(1,u=+m),p()):c},t.paddingInner=function(m){return arguments.length?(c=Math.min(1,m),p()):c},t.paddingOuter=function(m){return arguments.length?(u=+m,p()):u},t.align=function(m){return arguments.length?(h=Math.max(0,Math.min(1,m)),p()):h},t.copy=function(){return oS(e(),[n,a]).round(l).paddingInner(c).paddingOuter(u).align(h)},Ya.apply(p(),arguments)}function r7(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return r7(e())},t}function dhe(){return r7(oS.apply(null,arguments).paddingInner(1))}function lS(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function n7(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}function cp(){}var jf=.7,Ux=1/jf,hd="\\s*([+-]?\\d+)\\s*",Nf="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ds="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",uhe=/^#([0-9a-f]{3,8})$/,hhe=new RegExp(`^rgb\\(${hd},${hd},${hd}\\)$`),fhe=new RegExp(`^rgb\\(${Ds},${Ds},${Ds}\\)$`),phe=new RegExp(`^rgba\\(${hd},${hd},${hd},${Nf}\\)$`),mhe=new RegExp(`^rgba\\(${Ds},${Ds},${Ds},${Nf}\\)$`),ghe=new RegExp(`^hsl\\(${Nf},${Ds},${Ds}\\)$`),xhe=new RegExp(`^hsla\\(${Nf},${Ds},${Ds},${Nf}\\)$`),ME={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};lS(cp,Sf,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:EE,formatHex:EE,formatHex8:bhe,formatHsl:yhe,formatRgb:OE,toString:OE});function EE(){return this.rgb().formatHex()}function bhe(){return this.rgb().formatHex8()}function yhe(){return a7(this).formatHsl()}function OE(){return this.rgb().formatRgb()}function Sf(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=uhe.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?PE(e):r===3?new _n(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?mg(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?mg(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=hhe.exec(t))?new _n(e[1],e[2],e[3],1):(e=fhe.exec(t))?new _n(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=phe.exec(t))?mg(e[1],e[2],e[3],e[4]):(e=mhe.exec(t))?mg(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=ghe.exec(t))?LE(e[1],e[2]/100,e[3]/100,1):(e=xhe.exec(t))?LE(e[1],e[2]/100,e[3]/100,e[4]):ME.hasOwnProperty(t)?PE(ME[t]):t==="transparent"?new _n(NaN,NaN,NaN,0):null}function PE(t){return new _n(t>>16&255,t>>8&255,t&255,1)}function mg(t,e,r,n){return n<=0&&(t=e=r=NaN),new _n(t,e,r,n)}function vhe(t){return t instanceof cp||(t=Sf(t)),t?(t=t.rgb(),new _n(t.r,t.g,t.b,t.opacity)):new _n}function e4(t,e,r,n){return arguments.length===1?vhe(t):new _n(t,e,r,n??1)}function _n(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}lS(_n,e4,n7(cp,{brighter(t){return t=t==null?Ux:Math.pow(Ux,t),new _n(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?jf:Math.pow(jf,t),new _n(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new _n(_l(this.r),_l(this.g),_l(this.b),Wx(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:_E,formatHex:_E,formatHex8:whe,formatRgb:RE,toString:RE}));function _E(){return`#${Al(this.r)}${Al(this.g)}${Al(this.b)}`}function whe(){return`#${Al(this.r)}${Al(this.g)}${Al(this.b)}${Al((isNaN(this.opacity)?1:this.opacity)*255)}`}function RE(){const t=Wx(this.opacity);return`${t===1?"rgb(":"rgba("}${_l(this.r)}, ${_l(this.g)}, ${_l(this.b)}${t===1?")":`, ${t})`}`}function Wx(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function _l(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Al(t){return t=_l(t),(t<16?"0":"")+t.toString(16)}function LE(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new Ka(t,e,r,n)}function a7(t){if(t instanceof Ka)return new Ka(t.h,t.s,t.l,t.opacity);if(t instanceof cp||(t=Sf(t)),!t)return new Ka;if(t instanceof Ka)return t;t=t.rgb();var e=t.r/255,r=t.g/255,n=t.b/255,a=Math.min(e,r,n),s=Math.max(e,r,n),o=NaN,l=s-a,c=(s+a)/2;return l?(e===s?o=(r-n)/l+(r<n)*6:r===s?o=(n-e)/l+2:o=(e-r)/l+4,l/=c<.5?s+a:2-s-a,o*=60):l=c>0&&c<1?0:o,new Ka(o,l,c,t.opacity)}function jhe(t,e,r,n){return arguments.length===1?a7(t):new Ka(t,e,r,n??1)}function Ka(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}lS(Ka,jhe,n7(cp,{brighter(t){return t=t==null?Ux:Math.pow(Ux,t),new Ka(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?jf:Math.pow(jf,t),new Ka(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,a=2*r-n;return new _n(t2(t>=240?t-240:t+120,a,n),t2(t,a,n),t2(t<120?t+240:t-120,a,n),this.opacity)},clamp(){return new Ka(zE(this.h),gg(this.s),gg(this.l),Wx(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=Wx(this.opacity);return`${t===1?"hsl(":"hsla("}${zE(this.h)}, ${gg(this.s)*100}%, ${gg(this.l)*100}%${t===1?")":`, ${t})`}`}}));function zE(t){return t=(t||0)%360,t<0?t+360:t}function gg(t){return Math.max(0,Math.min(1,t||0))}function t2(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 cS=t=>()=>t;function Nhe(t,e){return function(r){return t+r*e}}function She(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 Ahe(t){return(t=+t)==1?s7:function(e,r){return r-e?She(e,r,t):cS(isNaN(e)?r:e)}}function s7(t,e){var r=e-t;return r?Nhe(t,r):cS(isNaN(t)?e:t)}const IE=function t(e){var r=Ahe(e);function n(a,s){var o=r((a=e4(a)).r,(s=e4(s)).r),l=r(a.g,s.g),c=r(a.b,s.b),u=s7(a.opacity,s.opacity);return function(h){return a.r=o(h),a.g=l(h),a.b=c(h),a.opacity=u(h),a+""}}return n.gamma=t,n}(1);function Che(t,e){e||(e=[]);var r=t?Math.min(e.length,t.length):0,n=e.slice(),a;return function(s){for(a=0;a<r;++a)n[a]=t[a]*(1-s)+e[a]*s;return n}}function khe(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Dhe(t,e){var r=e?e.length:0,n=t?Math.min(r,t.length):0,a=new Array(n),s=new Array(r),o;for(o=0;o<n;++o)a[o]=Xd(t[o],e[o]);for(;o<r;++o)s[o]=e[o];return function(l){for(o=0;o<n;++o)s[o]=a[o](l);return s}}function The(t,e){var r=new Date;return t=+t,e=+e,function(n){return r.setTime(t*(1-n)+e*n),r}}function Xx(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}function Mhe(t,e){var r={},n={},a;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(a in e)a in t?r[a]=Xd(t[a],e[a]):n[a]=e[a];return function(s){for(a in r)n[a]=r[a](s);return n}}var t4=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,r2=new RegExp(t4.source,"g");function Ehe(t){return function(){return t}}function Ohe(t){return function(e){return t(e)+""}}function Phe(t,e){var r=t4.lastIndex=r2.lastIndex=0,n,a,s,o=-1,l=[],c=[];for(t=t+"",e=e+"";(n=t4.exec(t))&&(a=r2.exec(e));)(s=a.index)>r&&(s=e.slice(r,s),l[o]?l[o]+=s:l[++o]=s),(n=n[0])===(a=a[0])?l[o]?l[o]+=a:l[++o]=a:(l[++o]=null,c.push({i:o,x:Xx(n,a)})),r=r2.lastIndex;return r<e.length&&(s=e.slice(r),l[o]?l[o]+=s:l[++o]=s),l.length<2?c[0]?Ohe(c[0].x):Ehe(e):(e=c.length,function(u){for(var h=0,p;h<e;++h)l[(p=c[h]).i]=p.x(u);return l.join("")})}function Xd(t,e){var r=typeof e,n;return e==null||r==="boolean"?cS(e):(r==="number"?Xx:r==="string"?(n=Sf(e))?(e=n,IE):Phe:e instanceof Sf?IE:e instanceof Date?The:khe(e)?Che:Array.isArray(e)?Dhe:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?Mhe:Xx)(t,e)}function dS(t,e){return t=+t,e=+e,function(r){return Math.round(t*(1-r)+e*r)}}function _he(t,e){e===void 0&&(e=t,t=Xd);for(var r=0,n=e.length-1,a=e[0],s=new Array(n<0?0:n);r<n;)s[r]=t(a,a=e[++r]);return function(o){var l=Math.max(0,Math.min(n-1,Math.floor(o*=n)));return s[l](o-l)}}function Rhe(t){return function(){return t}}function Vx(t){return+t}var BE=[0,1];function gn(t){return t}function r4(t,e){return(e-=t=+t)?function(r){return(r-t)/e}:Rhe(isNaN(e)?NaN:.5)}function Lhe(t,e){var r;return t>e&&(r=t,t=e,e=r),function(n){return Math.max(t,Math.min(e,n))}}function zhe(t,e,r){var n=t[0],a=t[1],s=e[0],o=e[1];return a<n?(n=r4(a,n),s=r(o,s)):(n=r4(n,a),s=r(s,o)),function(l){return s(n(l))}}function Ihe(t,e,r){var n=Math.min(t.length,e.length)-1,a=new Array(n),s=new Array(n),o=-1;for(t[n]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<n;)a[o]=r4(t[o],t[o+1]),s[o]=r(e[o],e[o+1]);return function(l){var c=lp(t,l,1,n)-1;return s[c](a[c](l))}}function dp(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function nb(){var t=BE,e=BE,r=Xd,n,a,s,o=gn,l,c,u;function h(){var m=Math.min(t.length,e.length);return o!==gn&&(o=Lhe(t[0],t[m-1])),l=m>2?Ihe:zhe,c=u=null,p}function p(m){return m==null||isNaN(m=+m)?s:(c||(c=l(t.map(n),e,r)))(n(o(m)))}return p.invert=function(m){return o(a((u||(u=l(e,t.map(n),Xx)))(m)))},p.domain=function(m){return arguments.length?(t=Array.from(m,Vx),h()):t.slice()},p.range=function(m){return arguments.length?(e=Array.from(m),h()):e.slice()},p.rangeRound=function(m){return e=Array.from(m),r=dS,h()},p.clamp=function(m){return arguments.length?(o=m?!0:gn,h()):o!==gn},p.interpolate=function(m){return arguments.length?(r=m,h()):r},p.unknown=function(m){return arguments.length?(s=m,p):s},function(m,x){return n=m,a=x,h()}}function uS(){return nb()(gn,gn)}function Bhe(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function qx(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 jd(t){return t=qx(Math.abs(t)),t?t[1]:NaN}function Fhe(t,e){return function(r,n){for(var a=r.length,s=[],o=0,l=t[0],c=0;a>0&&l>0&&(c+l+1>n&&(l=Math.max(1,n-c)),s.push(r.substring(a-=l,a+l)),!((c+=l+1)>n));)l=t[o=(o+1)%t.length];return s.reverse().join(e)}}function Hhe(t){return function(e){return e.replace(/[0-9]/g,function(r){return t[+r]})}}var $he=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Af(t){if(!(e=$he.exec(t)))throw new Error("invalid format: "+t);var e;return new hS({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]})}Af.prototype=hS.prototype;function hS(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+""}hS.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 Yhe(t){e:for(var e=t.length,r=1,n=-1,a;r<e;++r)switch(t[r]){case".":n=a=r;break;case"0":n===0&&(n=r),a=r;break;default:if(!+t[r])break e;n>0&&(n=0);break}return n>0?t.slice(0,n)+t.slice(a+1):t}var i7;function Uhe(t,e){var r=qx(t,e);if(!r)return t+"";var n=r[0],a=r[1],s=a-(i7=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,o=n.length;return s===o?n:s>o?n+new Array(s-o+1).join("0"):s>0?n.slice(0,s)+"."+n.slice(s):"0."+new Array(1-s).join("0")+qx(t,Math.max(0,e+s-1))[0]}function FE(t,e){var r=qx(t,e);if(!r)return t+"";var n=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+n:n.length>a+1?n.slice(0,a+1)+"."+n.slice(a+1):n+new Array(a-n.length+2).join("0")}const HE={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:Bhe,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)=>FE(t*100,e),r:FE,s:Uhe,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function $E(t){return t}var YE=Array.prototype.map,UE=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Whe(t){var e=t.grouping===void 0||t.thousands===void 0?$E:Fhe(YE.call(t.grouping,Number),t.thousands+""),r=t.currency===void 0?"":t.currency[0]+"",n=t.currency===void 0?"":t.currency[1]+"",a=t.decimal===void 0?".":t.decimal+"",s=t.numerals===void 0?$E:Hhe(YE.call(t.numerals,String)),o=t.percent===void 0?"%":t.percent+"",l=t.minus===void 0?"−":t.minus+"",c=t.nan===void 0?"NaN":t.nan+"";function u(p){p=Af(p);var m=p.fill,x=p.align,y=p.sign,b=p.symbol,w=p.zero,N=p.width,A=p.comma,S=p.precision,C=p.trim,k=p.type;k==="n"?(A=!0,k="g"):HE[k]||(S===void 0&&(S=12),C=!0,k="g"),(w||m==="0"&&x==="=")&&(w=!0,m="0",x="=");var T=b==="$"?r:b==="#"&&/[boxX]/.test(k)?"0"+k.toLowerCase():"",E=b==="$"?n:/[%p]/.test(k)?o:"",_=HE[k],L=/[defgprs%]/.test(k);S=S===void 0?6:/[gprs]/.test(k)?Math.max(1,Math.min(21,S)):Math.max(0,Math.min(20,S));function P(R){var z=T,B=E,Y,X,H;if(k==="c")B=_(R)+B,R="";else{R=+R;var W=R<0||1/R<0;if(R=isNaN(R)?c:_(Math.abs(R),S),C&&(R=Yhe(R)),W&&+R==0&&y!=="+"&&(W=!1),z=(W?y==="("?y:l:y==="-"||y==="("?"":y)+z,B=(k==="s"?UE[8+i7/3]:"")+B+(W&&y==="("?")":""),L){for(Y=-1,X=R.length;++Y<X;)if(H=R.charCodeAt(Y),48>H||H>57){B=(H===46?a+R.slice(Y+1):R.slice(Y))+B,R=R.slice(0,Y);break}}}A&&!w&&(R=e(R,1/0));var V=z.length+R.length+B.length,Z=V<N?new Array(N-V+1).join(m):"";switch(A&&w&&(R=e(Z+R,Z.length?N-B.length:1/0),Z=""),x){case"<":R=z+R+B+Z;break;case"=":R=z+Z+R+B;break;case"^":R=Z.slice(0,V=Z.length>>1)+z+R+B+Z.slice(V);break;default:R=Z+z+R+B;break}return s(R)}return P.toString=function(){return p+""},P}function h(p,m){var x=u((p=Af(p),p.type="f",p)),y=Math.max(-8,Math.min(8,Math.floor(jd(m)/3)))*3,b=Math.pow(10,-y),w=UE[8+y/3];return function(N){return x(b*N)+w}}return{format:u,formatPrefix:h}}var xg,fS,o7;Xhe({thousands:",",grouping:[3],currency:["$",""]});function Xhe(t){return xg=Whe(t),fS=xg.format,o7=xg.formatPrefix,xg}function Vhe(t){return Math.max(0,-jd(Math.abs(t)))}function qhe(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(jd(e)/3)))*3-jd(Math.abs(t)))}function Ghe(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,jd(e)-jd(t))+1}function l7(t,e,r,n){var a=Qj(t,e,r),s;switch(n=Af(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(t),Math.abs(e));return n.precision==null&&!isNaN(s=qhe(a,o))&&(n.precision=s),o7(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(s=Ghe(a,Math.max(Math.abs(t),Math.abs(e))))&&(n.precision=s-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(s=Vhe(a))&&(n.precision=s-(n.type==="%")*2);break}}return fS(n)}function Mo(t){var e=t.domain;return t.ticks=function(r){var n=e();return Kj(n[0],n[n.length-1],r??10)},t.tickFormat=function(r,n){var a=e();return l7(a[0],a[a.length-1],r??10,n)},t.nice=function(r){r==null&&(r=10);var n=e(),a=0,s=n.length-1,o=n[a],l=n[s],c,u,h=10;for(l<o&&(u=o,o=l,l=u,u=a,a=s,s=u);h-- >0;){if(u=Zj(o,l,r),u===c)return n[a]=o,n[s]=l,e(n);if(u>0)o=Math.floor(o/u)*u,l=Math.ceil(l/u)*u;else if(u<0)o=Math.ceil(o*u)/u,l=Math.floor(l*u)/u;else break;c=u}return t},t}function c7(){var t=uS();return t.copy=function(){return dp(t,c7())},Ya.apply(t,arguments),Mo(t)}function d7(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,Vx),r):t.slice()},r.unknown=function(n){return arguments.length?(e=n,r):e},r.copy=function(){return d7(t).unknown(e)},t=arguments.length?Array.from(t,Vx):[0,1],Mo(r)}function u7(t,e){t=t.slice();var r=0,n=t.length-1,a=t[r],s=t[n],o;return s<a&&(o=r,r=n,n=o,o=a,a=s,s=o),t[r]=e.floor(a),t[n]=e.ceil(s),t}function WE(t){return Math.log(t)}function XE(t){return Math.exp(t)}function Khe(t){return-Math.log(-t)}function Zhe(t){return-Math.exp(-t)}function Qhe(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Jhe(t){return t===10?Qhe:t===Math.E?Math.exp:e=>Math.pow(t,e)}function efe(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 VE(t){return(e,r)=>-t(-e,r)}function pS(t){const e=t(WE,XE),r=e.domain;let n=10,a,s;function o(){return a=efe(n),s=Jhe(n),r()[0]<0?(a=VE(a),s=VE(s),t(Khe,Zhe)):t(WE,XE),e}return e.base=function(l){return arguments.length?(n=+l,o()):n},e.domain=function(l){return arguments.length?(r(l),o()):r()},e.ticks=l=>{const c=r();let u=c[0],h=c[c.length-1];const p=h<u;p&&([u,h]=[h,u]);let m=a(u),x=a(h),y,b;const w=l==null?10:+l;let N=[];if(!(n%1)&&x-m<w){if(m=Math.floor(m),x=Math.ceil(x),u>0){for(;m<=x;++m)for(y=1;y<n;++y)if(b=m<0?y/s(-m):y*s(m),!(b<u)){if(b>h)break;N.push(b)}}else for(;m<=x;++m)for(y=n-1;y>=1;--y)if(b=m>0?y/s(-m):y*s(m),!(b<u)){if(b>h)break;N.push(b)}N.length*2<w&&(N=Kj(u,h,w))}else N=Kj(m,x,Math.min(x-m,w)).map(s);return p?N.reverse():N},e.tickFormat=(l,c)=>{if(l==null&&(l=10),c==null&&(c=n===10?"s":","),typeof c!="function"&&(!(n%1)&&(c=Af(c)).precision==null&&(c.trim=!0),c=fS(c)),l===1/0)return c;const u=Math.max(1,n*l/e.ticks().length);return h=>{let p=h/s(Math.round(a(h)));return p*n<n-.5&&(p*=n),p<=u?c(h):""}},e.nice=()=>r(u7(r(),{floor:l=>s(Math.floor(a(l))),ceil:l=>s(Math.ceil(a(l)))})),e}function h7(){const t=pS(nb()).domain([1,10]);return t.copy=()=>dp(t,h7()).base(t.base()),Ya.apply(t,arguments),t}function qE(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function GE(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function mS(t){var e=1,r=t(qE(e),GE(e));return r.constant=function(n){return arguments.length?t(qE(e=+n),GE(e)):e},Mo(r)}function f7(){var t=mS(nb());return t.copy=function(){return dp(t,f7()).constant(t.constant())},Ya.apply(t,arguments)}function KE(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function tfe(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function rfe(t){return t<0?-t*t:t*t}function gS(t){var e=t(gn,gn),r=1;function n(){return r===1?t(gn,gn):r===.5?t(tfe,rfe):t(KE(r),KE(1/r))}return e.exponent=function(a){return arguments.length?(r=+a,n()):r},Mo(e)}function xS(){var t=gS(nb());return t.copy=function(){return dp(t,xS()).exponent(t.exponent())},Ya.apply(t,arguments),t}function nfe(){return xS.apply(null,arguments).exponent(.5)}function ZE(t){return Math.sign(t)*t*t}function afe(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}function p7(){var t=uS(),e=[0,1],r=!1,n;function a(s){var o=afe(t(s));return isNaN(o)?n:r?Math.round(o):o}return a.invert=function(s){return t.invert(ZE(s))},a.domain=function(s){return arguments.length?(t.domain(s),a):t.domain()},a.range=function(s){return arguments.length?(t.range((e=Array.from(s,Vx)).map(ZE)),a):e.slice()},a.rangeRound=function(s){return a.range(s).round(!0)},a.round=function(s){return arguments.length?(r=!!s,a):r},a.clamp=function(s){return arguments.length?(t.clamp(s),a):t.clamp()},a.unknown=function(s){return arguments.length?(n=s,a):n},a.copy=function(){return p7(t.domain(),e).round(r).clamp(t.clamp()).unknown(n)},Ya.apply(a,arguments),Mo(a)}function m7(){var t=[],e=[],r=[],n;function a(){var o=0,l=Math.max(1,e.length);for(r=new Array(l-1);++o<l;)r[o-1]=lhe(t,o/l);return s}function s(o){return o==null||isNaN(o=+o)?n:e[lp(r,o)]}return s.invertExtent=function(o){var l=e.indexOf(o);return l<0?[NaN,NaN]:[l>0?r[l-1]:t[0],l<r.length?r[l]:t[t.length-1]]},s.domain=function(o){if(!arguments.length)return t.slice();t=[];for(let l of o)l!=null&&!isNaN(l=+l)&&t.push(l);return t.sort(mo),a()},s.range=function(o){return arguments.length?(e=Array.from(o),a()):e.slice()},s.unknown=function(o){return arguments.length?(n=o,s):n},s.quantiles=function(){return r.slice()},s.copy=function(){return m7().domain(t).range(e).unknown(n)},Ya.apply(s,arguments)}function g7(){var t=0,e=1,r=1,n=[.5],a=[0,1],s;function o(c){return c!=null&&c<=c?a[lp(n,c,0,r)]:s}function l(){var c=-1;for(n=new Array(r);++c<r;)n[c]=((c+1)*e-(c-r)*t)/(r+1);return o}return o.domain=function(c){return arguments.length?([t,e]=c,t=+t,e=+e,l()):[t,e]},o.range=function(c){return arguments.length?(r=(a=Array.from(c)).length-1,l()):a.slice()},o.invertExtent=function(c){var u=a.indexOf(c);return u<0?[NaN,NaN]:u<1?[t,n[0]]:u>=r?[n[r-1],e]:[n[u-1],n[u]]},o.unknown=function(c){return arguments.length&&(s=c),o},o.thresholds=function(){return n.slice()},o.copy=function(){return g7().domain([t,e]).range(a).unknown(s)},Ya.apply(Mo(o),arguments)}function x7(){var t=[.5],e=[0,1],r,n=1;function a(s){return s!=null&&s<=s?e[lp(t,s,0,n)]:r}return a.domain=function(s){return arguments.length?(t=Array.from(s),n=Math.min(t.length,e.length-1),a):t.slice()},a.range=function(s){return arguments.length?(e=Array.from(s),n=Math.min(t.length,e.length-1),a):e.slice()},a.invertExtent=function(s){var o=e.indexOf(s);return[t[o-1],t[o]]},a.unknown=function(s){return arguments.length?(r=s,a):r},a.copy=function(){return x7().domain(t).range(e).unknown(r)},Ya.apply(a,arguments)}const n2=new Date,a2=new Date;function kr(t,e,r,n){function a(s){return t(s=arguments.length===0?new Date:new Date(+s)),s}return a.floor=s=>(t(s=new Date(+s)),s),a.ceil=s=>(t(s=new Date(s-1)),e(s,1),t(s),s),a.round=s=>{const o=a(s),l=a.ceil(s);return s-o<l-s?o:l},a.offset=(s,o)=>(e(s=new Date(+s),o==null?1:Math.floor(o)),s),a.range=(s,o,l)=>{const c=[];if(s=a.ceil(s),l=l==null?1:Math.floor(l),!(s<o)||!(l>0))return c;let u;do c.push(u=new Date(+s)),e(s,l),t(s);while(u<s&&s<o);return c},a.filter=s=>kr(o=>{if(o>=o)for(;t(o),!s(o);)o.setTime(o-1)},(o,l)=>{if(o>=o)if(l<0)for(;++l<=0;)for(;e(o,-1),!s(o););else for(;--l>=0;)for(;e(o,1),!s(o););}),r&&(a.count=(s,o)=>(n2.setTime(+s),a2.setTime(+o),t(n2),t(a2),Math.floor(r(n2,a2))),a.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?a.filter(n?o=>n(o)%s===0:o=>a.count(0,o)%s===0):a)),a}const Gx=kr(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Gx.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?kr(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):Gx);Gx.range;const ui=1e3,_a=ui*60,hi=_a*60,wi=hi*24,bS=wi*7,QE=wi*30,s2=wi*365,Cl=kr(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*ui)},(t,e)=>(e-t)/ui,t=>t.getUTCSeconds());Cl.range;const yS=kr(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*ui)},(t,e)=>{t.setTime(+t+e*_a)},(t,e)=>(e-t)/_a,t=>t.getMinutes());yS.range;const vS=kr(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*_a)},(t,e)=>(e-t)/_a,t=>t.getUTCMinutes());vS.range;const wS=kr(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*ui-t.getMinutes()*_a)},(t,e)=>{t.setTime(+t+e*hi)},(t,e)=>(e-t)/hi,t=>t.getHours());wS.range;const jS=kr(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*hi)},(t,e)=>(e-t)/hi,t=>t.getUTCHours());jS.range;const up=kr(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*_a)/wi,t=>t.getDate()-1);up.range;const ab=kr(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/wi,t=>t.getUTCDate()-1);ab.range;const b7=kr(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/wi,t=>Math.floor(t/wi));b7.range;function ac(t){return kr(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())*_a)/bS)}const sb=ac(0),Kx=ac(1),sfe=ac(2),ife=ac(3),Nd=ac(4),ofe=ac(5),lfe=ac(6);sb.range;Kx.range;sfe.range;ife.range;Nd.range;ofe.range;lfe.range;function sc(t){return kr(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)/bS)}const ib=sc(0),Zx=sc(1),cfe=sc(2),dfe=sc(3),Sd=sc(4),ufe=sc(5),hfe=sc(6);ib.range;Zx.range;cfe.range;dfe.range;Sd.range;ufe.range;hfe.range;const NS=kr(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());NS.range;const SS=kr(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());SS.range;const ji=kr(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());ji.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:kr(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)});ji.range;const Ni=kr(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());Ni.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:kr(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)});Ni.range;function y7(t,e,r,n,a,s){const o=[[Cl,1,ui],[Cl,5,5*ui],[Cl,15,15*ui],[Cl,30,30*ui],[s,1,_a],[s,5,5*_a],[s,15,15*_a],[s,30,30*_a],[a,1,hi],[a,3,3*hi],[a,6,6*hi],[a,12,12*hi],[n,1,wi],[n,2,2*wi],[r,1,bS],[e,1,QE],[e,3,3*QE],[t,1,s2]];function l(u,h,p){const m=h<u;m&&([u,h]=[h,u]);const x=p&&typeof p.range=="function"?p:c(u,h,p),y=x?x.range(u,+h+1):[];return m?y.reverse():y}function c(u,h,p){const m=Math.abs(h-u)/p,x=sS(([,,w])=>w).right(o,m);if(x===o.length)return t.every(Qj(u/s2,h/s2,p));if(x===0)return Gx.every(Math.max(Qj(u,h,p),1));const[y,b]=o[m/o[x-1][2]<o[x][2]/m?x-1:x];return y.every(b)}return[l,c]}const[ffe,pfe]=y7(Ni,SS,ib,b7,jS,vS),[mfe,gfe]=y7(ji,NS,sb,up,wS,yS);function i2(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 o2(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 xh(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function xfe(t){var e=t.dateTime,r=t.date,n=t.time,a=t.periods,s=t.days,o=t.shortDays,l=t.months,c=t.shortMonths,u=bh(a),h=yh(a),p=bh(s),m=yh(s),x=bh(o),y=yh(o),b=bh(l),w=yh(l),N=bh(c),A=yh(c),S={a:W,A:V,b:Z,B:F,c:null,d:aO,e:aO,f:Ffe,g:Kfe,G:Qfe,H:zfe,I:Ife,j:Bfe,L:v7,m:Hfe,M:$fe,p:G,q:te,Q:oO,s:lO,S:Yfe,u:Ufe,U:Wfe,V:Xfe,w:Vfe,W:qfe,x:null,X:null,y:Gfe,Y:Zfe,Z:Jfe,"%":iO},C={a:K,A:U,b:re,B:ae,c:null,d:sO,e:sO,f:npe,g:fpe,G:mpe,H:epe,I:tpe,j:rpe,L:j7,m:ape,M:spe,p:we,q:ye,Q:oO,s:lO,S:ipe,u:ope,U:lpe,V:cpe,w:dpe,W:upe,x:null,X:null,y:hpe,Y:ppe,Z:gpe,"%":iO},k={a:P,A:R,b:z,B,c:Y,d:rO,e:rO,f:Pfe,g:tO,G:eO,H:nO,I:nO,j:Tfe,L:Ofe,m:Dfe,M:Mfe,p:L,q:kfe,Q:Rfe,s:Lfe,S:Efe,u:jfe,U:Nfe,V:Sfe,w:wfe,W:Afe,x:X,X:H,y:tO,Y:eO,Z:Cfe,"%":_fe};S.x=T(r,S),S.X=T(n,S),S.c=T(e,S),C.x=T(r,C),C.X=T(n,C),C.c=T(e,C);function T(ue,je){return function(Ce){var pe=[],Ye=-1,Re=0,gt=ue.length,Ut,xt,vn;for(Ce instanceof Date||(Ce=new Date(+Ce));++Ye<gt;)ue.charCodeAt(Ye)===37&&(pe.push(ue.slice(Re,Ye)),(xt=JE[Ut=ue.charAt(++Ye)])!=null?Ut=ue.charAt(++Ye):xt=Ut==="e"?" ":"0",(vn=je[Ut])&&(Ut=vn(Ce,xt)),pe.push(Ut),Re=Ye+1);return pe.push(ue.slice(Re,Ye)),pe.join("")}}function E(ue,je){return function(Ce){var pe=xh(1900,void 0,1),Ye=_(pe,ue,Ce+="",0),Re,gt;if(Ye!=Ce.length)return null;if("Q"in pe)return new Date(pe.Q);if("s"in pe)return new Date(pe.s*1e3+("L"in pe?pe.L:0));if(je&&!("Z"in pe)&&(pe.Z=0),"p"in pe&&(pe.H=pe.H%12+pe.p*12),pe.m===void 0&&(pe.m="q"in pe?pe.q:0),"V"in pe){if(pe.V<1||pe.V>53)return null;"w"in pe||(pe.w=1),"Z"in pe?(Re=o2(xh(pe.y,0,1)),gt=Re.getUTCDay(),Re=gt>4||gt===0?Zx.ceil(Re):Zx(Re),Re=ab.offset(Re,(pe.V-1)*7),pe.y=Re.getUTCFullYear(),pe.m=Re.getUTCMonth(),pe.d=Re.getUTCDate()+(pe.w+6)%7):(Re=i2(xh(pe.y,0,1)),gt=Re.getDay(),Re=gt>4||gt===0?Kx.ceil(Re):Kx(Re),Re=up.offset(Re,(pe.V-1)*7),pe.y=Re.getFullYear(),pe.m=Re.getMonth(),pe.d=Re.getDate()+(pe.w+6)%7)}else("W"in pe||"U"in pe)&&("w"in pe||(pe.w="u"in pe?pe.u%7:"W"in pe?1:0),gt="Z"in pe?o2(xh(pe.y,0,1)).getUTCDay():i2(xh(pe.y,0,1)).getDay(),pe.m=0,pe.d="W"in pe?(pe.w+6)%7+pe.W*7-(gt+5)%7:pe.w+pe.U*7-(gt+6)%7);return"Z"in pe?(pe.H+=pe.Z/100|0,pe.M+=pe.Z%100,o2(pe)):i2(pe)}}function _(ue,je,Ce,pe){for(var Ye=0,Re=je.length,gt=Ce.length,Ut,xt;Ye<Re;){if(pe>=gt)return-1;if(Ut=je.charCodeAt(Ye++),Ut===37){if(Ut=je.charAt(Ye++),xt=k[Ut in JE?je.charAt(Ye++):Ut],!xt||(pe=xt(ue,Ce,pe))<0)return-1}else if(Ut!=Ce.charCodeAt(pe++))return-1}return pe}function L(ue,je,Ce){var pe=u.exec(je.slice(Ce));return pe?(ue.p=h.get(pe[0].toLowerCase()),Ce+pe[0].length):-1}function P(ue,je,Ce){var pe=x.exec(je.slice(Ce));return pe?(ue.w=y.get(pe[0].toLowerCase()),Ce+pe[0].length):-1}function R(ue,je,Ce){var pe=p.exec(je.slice(Ce));return pe?(ue.w=m.get(pe[0].toLowerCase()),Ce+pe[0].length):-1}function z(ue,je,Ce){var pe=N.exec(je.slice(Ce));return pe?(ue.m=A.get(pe[0].toLowerCase()),Ce+pe[0].length):-1}function B(ue,je,Ce){var pe=b.exec(je.slice(Ce));return pe?(ue.m=w.get(pe[0].toLowerCase()),Ce+pe[0].length):-1}function Y(ue,je,Ce){return _(ue,e,je,Ce)}function X(ue,je,Ce){return _(ue,r,je,Ce)}function H(ue,je,Ce){return _(ue,n,je,Ce)}function W(ue){return o[ue.getDay()]}function V(ue){return s[ue.getDay()]}function Z(ue){return c[ue.getMonth()]}function F(ue){return l[ue.getMonth()]}function G(ue){return a[+(ue.getHours()>=12)]}function te(ue){return 1+~~(ue.getMonth()/3)}function K(ue){return o[ue.getUTCDay()]}function U(ue){return s[ue.getUTCDay()]}function re(ue){return c[ue.getUTCMonth()]}function ae(ue){return l[ue.getUTCMonth()]}function we(ue){return a[+(ue.getUTCHours()>=12)]}function ye(ue){return 1+~~(ue.getUTCMonth()/3)}return{format:function(ue){var je=T(ue+="",S);return je.toString=function(){return ue},je},parse:function(ue){var je=E(ue+="",!1);return je.toString=function(){return ue},je},utcFormat:function(ue){var je=T(ue+="",C);return je.toString=function(){return ue},je},utcParse:function(ue){var je=E(ue+="",!0);return je.toString=function(){return ue},je}}}var JE={"-":"",_:" ",0:"0"},Fr=/^\s*\d+/,bfe=/^%/,yfe=/[\\^$*+?|[\]().{}]/g;function ut(t,e,r){var n=t<0?"-":"",a=(n?-t:t)+"",s=a.length;return n+(s<r?new Array(r-s+1).join(e)+a:a)}function vfe(t){return t.replace(yfe,"\\$&")}function bh(t){return new RegExp("^(?:"+t.map(vfe).join("|")+")","i")}function yh(t){return new Map(t.map((e,r)=>[e.toLowerCase(),r]))}function wfe(t,e,r){var n=Fr.exec(e.slice(r,r+1));return n?(t.w=+n[0],r+n[0].length):-1}function jfe(t,e,r){var n=Fr.exec(e.slice(r,r+1));return n?(t.u=+n[0],r+n[0].length):-1}function Nfe(t,e,r){var n=Fr.exec(e.slice(r,r+2));return n?(t.U=+n[0],r+n[0].length):-1}function Sfe(t,e,r){var n=Fr.exec(e.slice(r,r+2));return n?(t.V=+n[0],r+n[0].length):-1}function Afe(t,e,r){var n=Fr.exec(e.slice(r,r+2));return n?(t.W=+n[0],r+n[0].length):-1}function eO(t,e,r){var n=Fr.exec(e.slice(r,r+4));return n?(t.y=+n[0],r+n[0].length):-1}function tO(t,e,r){var n=Fr.exec(e.slice(r,r+2));return n?(t.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function Cfe(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 kfe(t,e,r){var n=Fr.exec(e.slice(r,r+1));return n?(t.q=n[0]*3-3,r+n[0].length):-1}function Dfe(t,e,r){var n=Fr.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function rO(t,e,r){var n=Fr.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function Tfe(t,e,r){var n=Fr.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function nO(t,e,r){var n=Fr.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function Mfe(t,e,r){var n=Fr.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function Efe(t,e,r){var n=Fr.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function Ofe(t,e,r){var n=Fr.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function Pfe(t,e,r){var n=Fr.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function _fe(t,e,r){var n=bfe.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function Rfe(t,e,r){var n=Fr.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function Lfe(t,e,r){var n=Fr.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function aO(t,e){return ut(t.getDate(),e,2)}function zfe(t,e){return ut(t.getHours(),e,2)}function Ife(t,e){return ut(t.getHours()%12||12,e,2)}function Bfe(t,e){return ut(1+up.count(ji(t),t),e,3)}function v7(t,e){return ut(t.getMilliseconds(),e,3)}function Ffe(t,e){return v7(t,e)+"000"}function Hfe(t,e){return ut(t.getMonth()+1,e,2)}function $fe(t,e){return ut(t.getMinutes(),e,2)}function Yfe(t,e){return ut(t.getSeconds(),e,2)}function Ufe(t){var e=t.getDay();return e===0?7:e}function Wfe(t,e){return ut(sb.count(ji(t)-1,t),e,2)}function w7(t){var e=t.getDay();return e>=4||e===0?Nd(t):Nd.ceil(t)}function Xfe(t,e){return t=w7(t),ut(Nd.count(ji(t),t)+(ji(t).getDay()===4),e,2)}function Vfe(t){return t.getDay()}function qfe(t,e){return ut(Kx.count(ji(t)-1,t),e,2)}function Gfe(t,e){return ut(t.getFullYear()%100,e,2)}function Kfe(t,e){return t=w7(t),ut(t.getFullYear()%100,e,2)}function Zfe(t,e){return ut(t.getFullYear()%1e4,e,4)}function Qfe(t,e){var r=t.getDay();return t=r>=4||r===0?Nd(t):Nd.ceil(t),ut(t.getFullYear()%1e4,e,4)}function Jfe(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+ut(e/60|0,"0",2)+ut(e%60,"0",2)}function sO(t,e){return ut(t.getUTCDate(),e,2)}function epe(t,e){return ut(t.getUTCHours(),e,2)}function tpe(t,e){return ut(t.getUTCHours()%12||12,e,2)}function rpe(t,e){return ut(1+ab.count(Ni(t),t),e,3)}function j7(t,e){return ut(t.getUTCMilliseconds(),e,3)}function npe(t,e){return j7(t,e)+"000"}function ape(t,e){return ut(t.getUTCMonth()+1,e,2)}function spe(t,e){return ut(t.getUTCMinutes(),e,2)}function ipe(t,e){return ut(t.getUTCSeconds(),e,2)}function ope(t){var e=t.getUTCDay();return e===0?7:e}function lpe(t,e){return ut(ib.count(Ni(t)-1,t),e,2)}function N7(t){var e=t.getUTCDay();return e>=4||e===0?Sd(t):Sd.ceil(t)}function cpe(t,e){return t=N7(t),ut(Sd.count(Ni(t),t)+(Ni(t).getUTCDay()===4),e,2)}function dpe(t){return t.getUTCDay()}function upe(t,e){return ut(Zx.count(Ni(t)-1,t),e,2)}function hpe(t,e){return ut(t.getUTCFullYear()%100,e,2)}function fpe(t,e){return t=N7(t),ut(t.getUTCFullYear()%100,e,2)}function ppe(t,e){return ut(t.getUTCFullYear()%1e4,e,4)}function mpe(t,e){var r=t.getUTCDay();return t=r>=4||r===0?Sd(t):Sd.ceil(t),ut(t.getUTCFullYear()%1e4,e,4)}function gpe(){return"+0000"}function iO(){return"%"}function oO(t){return+t}function lO(t){return Math.floor(+t/1e3)}var Jc,S7,A7;xpe({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 xpe(t){return Jc=xfe(t),S7=Jc.format,Jc.parse,A7=Jc.utcFormat,Jc.utcParse,Jc}function bpe(t){return new Date(t)}function ype(t){return t instanceof Date?+t:+new Date(+t)}function AS(t,e,r,n,a,s,o,l,c,u){var h=uS(),p=h.invert,m=h.domain,x=u(".%L"),y=u(":%S"),b=u("%I:%M"),w=u("%I %p"),N=u("%a %d"),A=u("%b %d"),S=u("%B"),C=u("%Y");function k(T){return(c(T)<T?x:l(T)<T?y:o(T)<T?b:s(T)<T?w:n(T)<T?a(T)<T?N:A:r(T)<T?S:C)(T)}return h.invert=function(T){return new Date(p(T))},h.domain=function(T){return arguments.length?m(Array.from(T,ype)):m().map(bpe)},h.ticks=function(T){var E=m();return t(E[0],E[E.length-1],T??10)},h.tickFormat=function(T,E){return E==null?k:u(E)},h.nice=function(T){var E=m();return(!T||typeof T.range!="function")&&(T=e(E[0],E[E.length-1],T??10)),T?m(u7(E,T)):h},h.copy=function(){return dp(h,AS(t,e,r,n,a,s,o,l,c,u))},h}function vpe(){return Ya.apply(AS(mfe,gfe,ji,NS,sb,up,wS,yS,Cl,S7).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function wpe(){return Ya.apply(AS(ffe,pfe,Ni,SS,ib,ab,jS,vS,Cl,A7).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function ob(){var t=0,e=1,r,n,a,s,o=gn,l=!1,c;function u(p){return p==null||isNaN(p=+p)?c:o(a===0?.5:(p=(s(p)-r)*a,l?Math.max(0,Math.min(1,p)):p))}u.domain=function(p){return arguments.length?([t,e]=p,r=s(t=+t),n=s(e=+e),a=r===n?0:1/(n-r),u):[t,e]},u.clamp=function(p){return arguments.length?(l=!!p,u):l},u.interpolator=function(p){return arguments.length?(o=p,u):o};function h(p){return function(m){var x,y;return arguments.length?([x,y]=m,o=p(x,y),u):[o(0),o(1)]}}return u.range=h(Xd),u.rangeRound=h(dS),u.unknown=function(p){return arguments.length?(c=p,u):c},function(p){return s=p,r=p(t),n=p(e),a=r===n?0:1/(n-r),u}}function Eo(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function C7(){var t=Mo(ob()(gn));return t.copy=function(){return Eo(t,C7())},ki.apply(t,arguments)}function k7(){var t=pS(ob()).domain([1,10]);return t.copy=function(){return Eo(t,k7()).base(t.base())},ki.apply(t,arguments)}function D7(){var t=mS(ob());return t.copy=function(){return Eo(t,D7()).constant(t.constant())},ki.apply(t,arguments)}function CS(){var t=gS(ob());return t.copy=function(){return Eo(t,CS()).exponent(t.exponent())},ki.apply(t,arguments)}function jpe(){return CS.apply(null,arguments).exponent(.5)}function T7(){var t=[],e=gn;function r(n){if(n!=null&&!isNaN(n=+n))return e((lp(t,n,1)-1)/(t.length-1))}return r.domain=function(n){if(!arguments.length)return t.slice();t=[];for(let a of n)a!=null&&!isNaN(a=+a)&&t.push(a);return t.sort(mo),r},r.interpolator=function(n){return arguments.length?(e=n,r):e},r.range=function(){return t.map((n,a)=>e(a/(t.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(a,s)=>ohe(t,s/n))},r.copy=function(){return T7(e).domain(t)},ki.apply(r,arguments)}function lb(){var t=0,e=.5,r=1,n=1,a,s,o,l,c,u=gn,h,p=!1,m;function x(b){return isNaN(b=+b)?m:(b=.5+((b=+h(b))-s)*(n*b<n*s?l:c),u(p?Math.max(0,Math.min(1,b)):b))}x.domain=function(b){return arguments.length?([t,e,r]=b,a=h(t=+t),s=h(e=+e),o=h(r=+r),l=a===s?0:.5/(s-a),c=s===o?0:.5/(o-s),n=s<a?-1:1,x):[t,e,r]},x.clamp=function(b){return arguments.length?(p=!!b,x):p},x.interpolator=function(b){return arguments.length?(u=b,x):u};function y(b){return function(w){var N,A,S;return arguments.length?([N,A,S]=w,u=_he(b,[N,A,S]),x):[u(0),u(.5),u(1)]}}return x.range=y(Xd),x.rangeRound=y(dS),x.unknown=function(b){return arguments.length?(m=b,x):m},function(b){return h=b,a=b(t),s=b(e),o=b(r),l=a===s?0:.5/(s-a),c=s===o?0:.5/(o-s),n=s<a?-1:1,x}}function M7(){var t=Mo(lb()(gn));return t.copy=function(){return Eo(t,M7())},ki.apply(t,arguments)}function E7(){var t=pS(lb()).domain([.1,1,10]);return t.copy=function(){return Eo(t,E7()).base(t.base())},ki.apply(t,arguments)}function O7(){var t=mS(lb());return t.copy=function(){return Eo(t,O7()).constant(t.constant())},ki.apply(t,arguments)}function kS(){var t=gS(lb());return t.copy=function(){return Eo(t,kS()).exponent(t.exponent())},ki.apply(t,arguments)}function Npe(){return kS.apply(null,arguments).exponent(.5)}const Mh=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:oS,scaleDiverging:M7,scaleDivergingLog:E7,scaleDivergingPow:kS,scaleDivergingSqrt:Npe,scaleDivergingSymlog:O7,scaleIdentity:d7,scaleImplicit:Jj,scaleLinear:c7,scaleLog:h7,scaleOrdinal:iS,scalePoint:dhe,scalePow:xS,scaleQuantile:m7,scaleQuantize:g7,scaleRadial:p7,scaleSequential:C7,scaleSequentialLog:k7,scaleSequentialPow:CS,scaleSequentialQuantile:T7,scaleSequentialSqrt:jpe,scaleSequentialSymlog:D7,scaleSqrt:nfe,scaleSymlog:f7,scaleThreshold:x7,scaleTime:vpe,scaleUtc:wpe,tickFormat:l7},Symbol.toStringTag,{value:"Module"}));var Oo=t=>t.chartData,Spe=de([Oo],t=>{var e=t.chartData!=null?t.chartData.length-1:0;return{chartData:t.chartData,computedData:t.computedData,dataEndIndex:e,dataStartIndex:0}}),DS=(t,e,r,n)=>n?Spe(t):Oo(t);function Ad(t){if(Array.isArray(t)&&t.length===2){var[e,r]=t;if(da(e)&&da(r))return!0}return!1}function cO(t,e,r){return r?t:[Math.min(t[0],e[0]),Math.max(t[1],e[1])]}function Ape(t,e){if(e&&typeof t!="function"&&Array.isArray(t)&&t.length===2){var[r,n]=t,a,s;if(da(r))a=r;else if(typeof r=="function")return;if(da(n))s=n;else if(typeof n=="function")return;var o=[a,s];if(Ad(o))return o}}function Cpe(t,e,r){if(!(!r&&e==null)){if(typeof t=="function"&&e!=null)try{var n=t(e,r);if(Ad(n))return cO(n,e,r)}catch{}if(Array.isArray(t)&&t.length===2){var[a,s]=t,o,l;if(a==="auto")e!=null&&(o=Math.min(...e));else if(Oe(a))o=a;else if(typeof a=="function")try{e!=null&&(o=a(e?.[0]))}catch{}else if(typeof a=="string"&&QM.test(a)){var c=QM.exec(a);if(c==null||e==null)o=void 0;else{var u=+c[1];o=e[0]-u}}else o=e?.[0];if(s==="auto")e!=null&&(l=Math.max(...e));else if(Oe(s))l=s;else if(typeof s=="function")try{e!=null&&(l=s(e?.[1]))}catch{}else if(typeof s=="string"&&JM.test(s)){var h=JM.exec(s);if(h==null||e==null)l=void 0;else{var p=+h[1];l=e[1]+p}}else l=e?.[1];var m=[o,l];if(Ad(m))return e==null?m:cO(m,e,r)}}}var Vd=1e9,kpe={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},MS,qt=!0,Ia="[DecimalError] ",Rl=Ia+"Invalid argument: ",TS=Ia+"Exponent out of range: ",qd=Math.floor,pl=Math.pow,Dpe=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,na,Rr=1e7,Ht=7,P7=9007199254740991,Qx=qd(P7/Ht),De={};De.absoluteValue=De.abs=function(){var t=new this.constructor(this);return t.s&&(t.s=1),t};De.comparedTo=De.cmp=function(t){var e,r,n,a,s=this;if(t=new s.constructor(t),s.s!==t.s)return s.s||-t.s;if(s.e!==t.e)return s.e>t.e^s.s<0?1:-1;for(n=s.d.length,a=t.d.length,e=0,r=n<a?n:a;e<r;++e)if(s.d[e]!==t.d[e])return s.d[e]>t.d[e]^s.s<0?1:-1;return n===a?0:n>a^s.s<0?1:-1};De.decimalPlaces=De.dp=function(){var t=this,e=t.d.length-1,r=(e-t.e)*Ht;if(e=t.d[e],e)for(;e%10==0;e/=10)r--;return r<0?0:r};De.dividedBy=De.div=function(t){return mi(this,new this.constructor(t))};De.dividedToIntegerBy=De.idiv=function(t){var e=this,r=e.constructor;return Lt(mi(e,new r(t),0,1),r.precision)};De.equals=De.eq=function(t){return!this.cmp(t)};De.exponent=function(){return gr(this)};De.greaterThan=De.gt=function(t){return this.cmp(t)>0};De.greaterThanOrEqualTo=De.gte=function(t){return this.cmp(t)>=0};De.isInteger=De.isint=function(){return this.e>this.d.length-2};De.isNegative=De.isneg=function(){return this.s<0};De.isPositive=De.ispos=function(){return this.s>0};De.isZero=function(){return this.s===0};De.lessThan=De.lt=function(t){return this.cmp(t)<0};De.lessThanOrEqualTo=De.lte=function(t){return this.cmp(t)<1};De.logarithm=De.log=function(t){var e,r=this,n=r.constructor,a=n.precision,s=a+5;if(t===void 0)t=new n(10);else if(t=new n(t),t.s<1||t.eq(na))throw Error(Ia+"NaN");if(r.s<1)throw Error(Ia+(r.s?"NaN":"-Infinity"));return r.eq(na)?new n(0):(qt=!1,e=mi(Cf(r,s),Cf(t,s),s),qt=!0,Lt(e,a))};De.minus=De.sub=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?L7(e,t):_7(e,(t.s=-t.s,t))};De.modulo=De.mod=function(t){var e,r=this,n=r.constructor,a=n.precision;if(t=new n(t),!t.s)throw Error(Ia+"NaN");return r.s?(qt=!1,e=mi(r,t,0,1).times(t),qt=!0,r.minus(e)):Lt(new n(r),a)};De.naturalExponential=De.exp=function(){return R7(this)};De.naturalLogarithm=De.ln=function(){return Cf(this)};De.negated=De.neg=function(){var t=new this.constructor(this);return t.s=-t.s||0,t};De.plus=De.add=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?_7(e,t):L7(e,(t.s=-t.s,t))};De.precision=De.sd=function(t){var e,r,n,a=this;if(t!==void 0&&t!==!!t&&t!==1&&t!==0)throw Error(Rl+t);if(e=gr(a)+1,n=a.d.length-1,r=n*Ht+1,n=a.d[n],n){for(;n%10==0;n/=10)r--;for(n=a.d[0];n>=10;n/=10)r++}return t&&e>r?e:r};De.squareRoot=De.sqrt=function(){var t,e,r,n,a,s,o,l=this,c=l.constructor;if(l.s<1){if(!l.s)return new c(0);throw Error(Ia+"NaN")}for(t=gr(l),qt=!1,a=Math.sqrt(+l),a==0||a==1/0?(e=Cs(l.d),(e.length+t)%2==0&&(e+="0"),a=Math.sqrt(e),t=qd((t+1)/2)-(t<0||t%2),a==1/0?e="5e"+t:(e=a.toExponential(),e=e.slice(0,e.indexOf("e")+1)+t),n=new c(e)):n=new c(a.toString()),r=c.precision,a=o=r+3;;)if(s=n,n=s.plus(mi(l,s,o+2)).times(.5),Cs(s.d).slice(0,o)===(e=Cs(n.d)).slice(0,o)){if(e=e.slice(o-3,o+1),a==o&&e=="4999"){if(Lt(s,r+1,0),s.times(s).eq(l)){n=s;break}}else if(e!="9999")break;o+=4}return qt=!0,Lt(n,r)};De.times=De.mul=function(t){var e,r,n,a,s,o,l,c,u,h=this,p=h.constructor,m=h.d,x=(t=new p(t)).d;if(!h.s||!t.s)return new p(0);for(t.s*=h.s,r=h.e+t.e,c=m.length,u=x.length,c<u&&(s=m,m=x,x=s,o=c,c=u,u=o),s=[],o=c+u,n=o;n--;)s.push(0);for(n=u;--n>=0;){for(e=0,a=c+n;a>n;)l=s[a]+x[n]*m[a-n-1]+e,s[a--]=l%Rr|0,e=l/Rr|0;s[a]=(s[a]+e)%Rr|0}for(;!s[--o];)s.pop();return e?++r:s.shift(),t.d=s,t.e=r,qt?Lt(t,p.precision):t};De.toDecimalPlaces=De.todp=function(t,e){var r=this,n=r.constructor;return r=new n(r),t===void 0?r:(Os(t,0,Vd),e===void 0?e=n.rounding:Os(e,0,8),Lt(r,t+gr(r)+1,e))};De.toExponential=function(t,e){var r,n=this,a=n.constructor;return t===void 0?r=ql(n,!0):(Os(t,0,Vd),e===void 0?e=a.rounding:Os(e,0,8),n=Lt(new a(n),t+1,e),r=ql(n,!0,t+1)),r};De.toFixed=function(t,e){var r,n,a=this,s=a.constructor;return t===void 0?ql(a):(Os(t,0,Vd),e===void 0?e=s.rounding:Os(e,0,8),n=Lt(new s(a),t+gr(a)+1,e),r=ql(n.abs(),!1,t+gr(n)+1),a.isneg()&&!a.isZero()?"-"+r:r)};De.toInteger=De.toint=function(){var t=this,e=t.constructor;return Lt(new e(t),gr(t)+1,e.rounding)};De.toNumber=function(){return+this};De.toPower=De.pow=function(t){var e,r,n,a,s,o,l=this,c=l.constructor,u=12,h=+(t=new c(t));if(!t.s)return new c(na);if(l=new c(l),!l.s){if(t.s<1)throw Error(Ia+"Infinity");return l}if(l.eq(na))return l;if(n=c.precision,t.eq(na))return Lt(l,n);if(e=t.e,r=t.d.length-1,o=e>=r,s=l.s,o){if((r=h<0?-h:h)<=P7){for(a=new c(na),e=Math.ceil(n/Ht+4),qt=!1;r%2&&(a=a.times(l),uO(a.d,e)),r=qd(r/2),r!==0;)l=l.times(l),uO(l.d,e);return qt=!0,t.s<0?new c(na).div(a):Lt(a,n)}}else if(s<0)throw Error(Ia+"NaN");return s=s<0&&t.d[Math.max(e,r)]&1?-1:1,l.s=1,qt=!1,a=t.times(Cf(l,n+u)),qt=!0,a=R7(a),a.s=s,a};De.toPrecision=function(t,e){var r,n,a=this,s=a.constructor;return t===void 0?(r=gr(a),n=ql(a,r<=s.toExpNeg||r>=s.toExpPos)):(Os(t,1,Vd),e===void 0?e=s.rounding:Os(e,0,8),a=Lt(new s(a),t,e),r=gr(a),n=ql(a,t<=r||r<=s.toExpNeg,t)),n};De.toSignificantDigits=De.tosd=function(t,e){var r=this,n=r.constructor;return t===void 0?(t=n.precision,e=n.rounding):(Os(t,1,Vd),e===void 0?e=n.rounding:Os(e,0,8)),Lt(new n(r),t,e)};De.toString=De.valueOf=De.val=De.toJSON=De[Symbol.for("nodejs.util.inspect.custom")]=function(){var t=this,e=gr(t),r=t.constructor;return ql(t,e<=r.toExpNeg||e>=r.toExpPos)};function _7(t,e){var r,n,a,s,o,l,c,u,h=t.constructor,p=h.precision;if(!t.s||!e.s)return e.s||(e=new h(t)),qt?Lt(e,p):e;if(c=t.d,u=e.d,o=t.e,a=e.e,c=c.slice(),s=o-a,s){for(s<0?(n=c,s=-s,l=u.length):(n=u,a=o,l=c.length),o=Math.ceil(p/Ht),l=o>l?o+1:l+1,s>l&&(s=l,n.length=1),n.reverse();s--;)n.push(0);n.reverse()}for(l=c.length,s=u.length,l-s<0&&(s=l,n=u,u=c,c=n),r=0;s;)r=(c[--s]=c[s]+u[s]+r)/Rr|0,c[s]%=Rr;for(r&&(c.unshift(r),++a),l=c.length;c[--l]==0;)c.pop();return e.d=c,e.e=a,qt?Lt(e,p):e}function Os(t,e,r){if(t!==~~t||t<e||t>r)throw Error(Rl+t)}function Cs(t){var e,r,n,a=t.length-1,s="",o=t[0];if(a>0){for(s+=o,e=1;e<a;e++)n=t[e]+"",r=Ht-n.length,r&&(s+=no(r)),s+=n;o=t[e],n=o+"",r=Ht-n.length,r&&(s+=no(r))}else if(o===0)return"0";for(;o%10===0;)o/=10;return s+o}var mi=function(){function t(n,a){var s,o=0,l=n.length;for(n=n.slice();l--;)s=n[l]*a+o,n[l]=s%Rr|0,o=s/Rr|0;return o&&n.unshift(o),n}function e(n,a,s,o){var l,c;if(s!=o)c=s>o?1:-1;else for(l=c=0;l<s;l++)if(n[l]!=a[l]){c=n[l]>a[l]?1:-1;break}return c}function r(n,a,s){for(var o=0;s--;)n[s]-=o,o=n[s]<a[s]?1:0,n[s]=o*Rr+n[s]-a[s];for(;!n[0]&&n.length>1;)n.shift()}return function(n,a,s,o){var l,c,u,h,p,m,x,y,b,w,N,A,S,C,k,T,E,_,L=n.constructor,P=n.s==a.s?1:-1,R=n.d,z=a.d;if(!n.s)return new L(n);if(!a.s)throw Error(Ia+"Division by zero");for(c=n.e-a.e,E=z.length,k=R.length,x=new L(P),y=x.d=[],u=0;z[u]==(R[u]||0);)++u;if(z[u]>(R[u]||0)&&--c,s==null?A=s=L.precision:o?A=s+(gr(n)-gr(a))+1:A=s,A<0)return new L(0);if(A=A/Ht+2|0,u=0,E==1)for(h=0,z=z[0],A++;(u<k||h)&&A--;u++)S=h*Rr+(R[u]||0),y[u]=S/z|0,h=S%z|0;else{for(h=Rr/(z[0]+1)|0,h>1&&(z=t(z,h),R=t(R,h),E=z.length,k=R.length),C=E,b=R.slice(0,E),w=b.length;w<E;)b[w++]=0;_=z.slice(),_.unshift(0),T=z[0],z[1]>=Rr/2&&++T;do h=0,l=e(z,b,E,w),l<0?(N=b[0],E!=w&&(N=N*Rr+(b[1]||0)),h=N/T|0,h>1?(h>=Rr&&(h=Rr-1),p=t(z,h),m=p.length,w=b.length,l=e(p,b,m,w),l==1&&(h--,r(p,E<m?_:z,m))):(h==0&&(l=h=1),p=z.slice()),m=p.length,m<w&&p.unshift(0),r(b,p,w),l==-1&&(w=b.length,l=e(z,b,E,w),l<1&&(h++,r(b,E<w?_:z,w))),w=b.length):l===0&&(h++,b=[0]),y[u++]=h,l&&b[0]?b[w++]=R[C]||0:(b=[R[C]],w=1);while((C++<k||b[0]!==void 0)&&A--)}return y[0]||y.shift(),x.e=c,Lt(x,o?s+gr(x)+1:s)}}();function R7(t,e){var r,n,a,s,o,l,c=0,u=0,h=t.constructor,p=h.precision;if(gr(t)>16)throw Error(TS+gr(t));if(!t.s)return new h(na);for(qt=!1,l=p,o=new h(.03125);t.abs().gte(.1);)t=t.times(o),u+=5;for(n=Math.log(pl(2,u))/Math.LN10*2+5|0,l+=n,r=a=s=new h(na),h.precision=l;;){if(a=Lt(a.times(t),l),r=r.times(++c),o=s.plus(mi(a,r,l)),Cs(o.d).slice(0,l)===Cs(s.d).slice(0,l)){for(;u--;)s=Lt(s.times(s),l);return h.precision=p,e==null?(qt=!0,Lt(s,p)):s}s=o}}function gr(t){for(var e=t.e*Ht,r=t.d[0];r>=10;r/=10)e++;return e}function l2(t,e,r){if(e>t.LN10.sd())throw qt=!0,r&&(t.precision=r),Error(Ia+"LN10 precision limit exceeded");return Lt(new t(t.LN10),e)}function no(t){for(var e="";t--;)e+="0";return e}function Cf(t,e){var r,n,a,s,o,l,c,u,h,p=1,m=10,x=t,y=x.d,b=x.constructor,w=b.precision;if(x.s<1)throw Error(Ia+(x.s?"NaN":"-Infinity"));if(x.eq(na))return new b(0);if(e==null?(qt=!1,u=w):u=e,x.eq(10))return e==null&&(qt=!0),l2(b,u);if(u+=m,b.precision=u,r=Cs(y),n=r.charAt(0),s=gr(x),Math.abs(s)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)x=x.times(t),r=Cs(x.d),n=r.charAt(0),p++;s=gr(x),n>1?(x=new b("0."+r),s++):x=new b(n+"."+r.slice(1))}else return c=l2(b,u+2,w).times(s+""),x=Cf(new b(n+"."+r.slice(1)),u-m).plus(c),b.precision=w,e==null?(qt=!0,Lt(x,w)):x;for(l=o=x=mi(x.minus(na),x.plus(na),u),h=Lt(x.times(x),u),a=3;;){if(o=Lt(o.times(h),u),c=l.plus(mi(o,new b(a),u)),Cs(c.d).slice(0,u)===Cs(l.d).slice(0,u))return l=l.times(2),s!==0&&(l=l.plus(l2(b,u+2,w).times(s+""))),l=mi(l,new b(p),u),b.precision=w,e==null?(qt=!0,Lt(l,w)):l;l=c,a+=2}}function dO(t,e){var r,n,a;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(a=e.length;e.charCodeAt(a-1)===48;)--a;if(e=e.slice(n,a),e){if(a-=n,r=r-n-1,t.e=qd(r/Ht),t.d=[],n=(r+1)%Ht,r<0&&(n+=Ht),n<a){for(n&&t.d.push(+e.slice(0,n)),a-=Ht;n<a;)t.d.push(+e.slice(n,n+=Ht));e=e.slice(n),n=Ht-e.length}else n-=a;for(;n--;)e+="0";if(t.d.push(+e),qt&&(t.e>Qx||t.e<-Qx))throw Error(TS+r)}else t.s=0,t.e=0,t.d=[0];return t}function Lt(t,e,r){var n,a,s,o,l,c,u,h,p=t.d;for(o=1,s=p[0];s>=10;s/=10)o++;if(n=e-o,n<0)n+=Ht,a=e,u=p[h=0];else{if(h=Math.ceil((n+1)/Ht),s=p.length,h>=s)return t;for(u=s=p[h],o=1;s>=10;s/=10)o++;n%=Ht,a=n-Ht+o}if(r!==void 0&&(s=pl(10,o-a-1),l=u/s%10|0,c=e<0||p[h+1]!==void 0||u%s,c=r<4?(l||c)&&(r==0||r==(t.s<0?3:2)):l>5||l==5&&(r==4||c||r==6&&(n>0?a>0?u/pl(10,o-a):0:p[h-1])%10&1||r==(t.s<0?8:7))),e<1||!p[0])return c?(s=gr(t),p.length=1,e=e-s-1,p[0]=pl(10,(Ht-e%Ht)%Ht),t.e=qd(-e/Ht)||0):(p.length=1,p[0]=t.e=t.s=0),t;if(n==0?(p.length=h,s=1,h--):(p.length=h+1,s=pl(10,Ht-n),p[h]=a>0?(u/pl(10,o-a)%pl(10,a)|0)*s:0),c)for(;;)if(h==0){(p[0]+=s)==Rr&&(p[0]=1,++t.e);break}else{if(p[h]+=s,p[h]!=Rr)break;p[h--]=0,s=1}for(n=p.length;p[--n]===0;)p.pop();if(qt&&(t.e>Qx||t.e<-Qx))throw Error(TS+gr(t));return t}function L7(t,e){var r,n,a,s,o,l,c,u,h,p,m=t.constructor,x=m.precision;if(!t.s||!e.s)return e.s?e.s=-e.s:e=new m(t),qt?Lt(e,x):e;if(c=t.d,p=e.d,n=e.e,u=t.e,c=c.slice(),o=u-n,o){for(h=o<0,h?(r=c,o=-o,l=p.length):(r=p,n=u,l=c.length),a=Math.max(Math.ceil(x/Ht),l)+2,o>a&&(o=a,r.length=1),r.reverse(),a=o;a--;)r.push(0);r.reverse()}else{for(a=c.length,l=p.length,h=a<l,h&&(l=a),a=0;a<l;a++)if(c[a]!=p[a]){h=c[a]<p[a];break}o=0}for(h&&(r=c,c=p,p=r,e.s=-e.s),l=c.length,a=p.length-l;a>0;--a)c[l++]=0;for(a=p.length;a>o;){if(c[--a]<p[a]){for(s=a;s&&c[--s]===0;)c[s]=Rr-1;--c[s],c[a]+=Rr}c[a]-=p[a]}for(;c[--l]===0;)c.pop();for(;c[0]===0;c.shift())--n;return c[0]?(e.d=c,e.e=n,qt?Lt(e,x):e):new m(0)}function ql(t,e,r){var n,a=gr(t),s=Cs(t.d),o=s.length;return e?(r&&(n=r-o)>0?s=s.charAt(0)+"."+s.slice(1)+no(n):o>1&&(s=s.charAt(0)+"."+s.slice(1)),s=s+(a<0?"e":"e+")+a):a<0?(s="0."+no(-a-1)+s,r&&(n=r-o)>0&&(s+=no(n))):a>=o?(s+=no(a+1-o),r&&(n=r-a-1)>0&&(s=s+"."+no(n))):((n=a+1)<o&&(s=s.slice(0,n)+"."+s.slice(n)),r&&(n=r-o)>0&&(a+1===o&&(s+="."),s+=no(n))),t.s<0?"-"+s:s}function uO(t,e){if(t.length>e)return t.length=e,!0}function z7(t){var e,r,n;function a(s){var o=this;if(!(o instanceof a))return new a(s);if(o.constructor=a,s instanceof a){o.s=s.s,o.e=s.e,o.d=(s=s.d)?s.slice():s;return}if(typeof s=="number"){if(s*0!==0)throw Error(Rl+s);if(s>0)o.s=1;else if(s<0)s=-s,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(s===~~s&&s<1e7){o.e=0,o.d=[s];return}return dO(o,s.toString())}else if(typeof s!="string")throw Error(Rl+s);if(s.charCodeAt(0)===45?(s=s.slice(1),o.s=-1):o.s=1,Dpe.test(s))dO(o,s);else throw Error(Rl+s)}if(a.prototype=De,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=z7,a.config=a.set=Tpe,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 a.config(t),a}function Tpe(t){if(!t||typeof t!="object")throw Error(Ia+"Object expected");var e,r,n,a=["precision",1,Vd,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(e=0;e<a.length;e+=3)if((n=t[r=a[e]])!==void 0)if(qd(n)===n&&n>=a[e+1]&&n<=a[e+2])this[r]=n;else throw Error(Rl+r+": "+n);if((n=t[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Rl+r+": "+n);return this}var MS=z7(kpe);na=new MS(1);const St=MS;var Mpe=t=>t,I7={},B7=t=>t===I7,hO=t=>function e(){return arguments.length===0||arguments.length===1&&B7(arguments.length<=0?void 0:arguments[0])?e:t(...arguments)},F7=(t,e)=>t===1?e:hO(function(){for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];var s=n.filter(o=>o!==I7).length;return s>=t?e(...n):F7(t-s,hO(function(){for(var o=arguments.length,l=new Array(o),c=0;c<o;c++)l[c]=arguments[c];var u=n.map(h=>B7(h)?l.shift():h);return e(...u,...l)}))}),cb=t=>F7(t.length,t),n4=(t,e)=>{for(var r=[],n=t;n<e;++n)r[n-t]=n;return r},Epe=cb((t,e)=>Array.isArray(e)?e.map(t):Object.keys(e).map(r=>e[r]).map(t)),Ope=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];if(!r.length)return Mpe;var a=r.reverse(),s=a[0],o=a.slice(1);return function(){return o.reduce((l,c)=>c(l),s(...arguments))}},a4=t=>Array.isArray(t)?t.reverse():t.split("").reverse().join(""),H7=t=>{var e=null,r=null;return function(){for(var n=arguments.length,a=new Array(n),s=0;s<n;s++)a[s]=arguments[s];return e&&a.every((o,l)=>{var c;return o===((c=e)===null||c===void 0?void 0:c[l])})||(e=a,r=t(...a)),r}};function $7(t){var e;return t===0?e=1:e=Math.floor(new St(t).abs().log(10).toNumber())+1,e}function Y7(t,e,r){for(var n=new St(t),a=0,s=[];n.lt(e)&&a<1e5;)s.push(n.toNumber()),n=n.add(r),a++;return s}cb((t,e,r)=>{var n=+t,a=+e;return n+r*(a-n)});cb((t,e,r)=>{var n=e-+t;return n=n||1/0,(r-t)/n});cb((t,e,r)=>{var n=e-+t;return n=n||1/0,Math.max(0,Math.min(1,(r-t)/n))});var U7=t=>{var[e,r]=t,[n,a]=[e,r];return e>r&&([n,a]=[r,e]),[n,a]},W7=(t,e,r)=>{if(t.lte(0))return new St(0);var n=$7(t.toNumber()),a=new St(10).pow(n),s=t.div(a),o=n!==1?.05:.1,l=new St(Math.ceil(s.div(o).toNumber())).add(r).mul(o),c=l.mul(a);return e?new St(c.toNumber()):new St(Math.ceil(c.toNumber()))},Ppe=(t,e,r)=>{var n=new St(1),a=new St(t);if(!a.isint()&&r){var s=Math.abs(t);s<1?(n=new St(10).pow($7(t)-1),a=new St(Math.floor(a.div(n).toNumber())).mul(n)):s>1&&(a=new St(Math.floor(t)))}else t===0?a=new St(Math.floor((e-1)/2)):r||(a=new St(Math.floor(t)));var o=Math.floor((e-1)/2),l=Ope(Epe(c=>a.add(new St(c-o).mul(n)).toNumber()),n4);return l(0,e)},X7=function(e,r,n,a){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((r-e)/(n-1)))return{step:new St(0),tickMin:new St(0),tickMax:new St(0)};var o=W7(new St(r).sub(e).div(n-1),a,s),l;e<=0&&r>=0?l=new St(0):(l=new St(e).add(r).div(2),l=l.sub(new St(l).mod(o)));var c=Math.ceil(l.sub(e).div(o).toNumber()),u=Math.ceil(new St(r).sub(l).div(o).toNumber()),h=c+u+1;return h>n?X7(e,r,n,a,s+1):(h<n&&(u=r>0?u+(n-h):u,c=r>0?c:c+(n-h)),{step:o,tickMin:l.sub(new St(c).mul(o)),tickMax:l.add(new St(u).mul(o))})};function _pe(t){var[e,r]=t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=Math.max(n,2),[o,l]=U7([e,r]);if(o===-1/0||l===1/0){var c=l===1/0?[o,...n4(0,n-1).map(()=>1/0)]:[...n4(0,n-1).map(()=>-1/0),l];return e>r?a4(c):c}if(o===l)return Ppe(o,n,a);var{step:u,tickMin:h,tickMax:p}=X7(o,l,s,a,0),m=Y7(h,p.add(new St(.1).mul(u)),u);return e>r?a4(m):m}function Rpe(t,e){var[r,n]=t,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,[s,o]=U7([r,n]);if(s===-1/0||o===1/0)return[r,n];if(s===o)return[s];var l=Math.max(e,2),c=W7(new St(o).sub(s).div(l-1),a,0),u=[...Y7(new St(s),new St(o),c),o];return a===!1&&(u=u.map(h=>Math.round(h))),r>n?a4(u):u}var Lpe=H7(_pe),zpe=H7(Rpe),V7=t=>t.rootProps.maxBarSize,Ipe=t=>t.rootProps.barGap,q7=t=>t.rootProps.barCategoryGap,Bpe=t=>t.rootProps.barSize,db=t=>t.rootProps.stackOffset,ES=t=>t.options.chartName,OS=t=>t.rootProps.syncId,G7=t=>t.rootProps.syncMethod,PS=t=>t.options.eventEmitter,ii={allowDuplicatedCategory:!0,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"category"},Jn={allowDataOverflow:!1,allowDuplicatedCategory:!0,radiusAxisId:0,scale:"auto",tick:!0,tickCount:5,type:"number"},ub=(t,e)=>{if(!(!t||!e))return t!=null&&t.reversed?[e[1],e[0]]:e},Fpe={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:ii.angleAxisId,includeHidden:!1,name:void 0,reversed:ii.reversed,scale:ii.scale,tick:ii.tick,tickCount:void 0,ticks:void 0,type:ii.type,unit:void 0},Hpe={allowDataOverflow:Jn.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:Jn.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Jn.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:Jn.scale,tick:Jn.tick,tickCount:Jn.tickCount,ticks:void 0,type:Jn.type,unit:void 0},$pe={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:ii.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:ii.angleAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:ii.scale,tick:ii.tick,tickCount:void 0,ticks:void 0,type:"number",unit:void 0},Ype={allowDataOverflow:Jn.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:Jn.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Jn.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:Jn.scale,tick:Jn.tick,tickCount:Jn.tickCount,ticks:void 0,type:"category",unit:void 0},_S=(t,e)=>t.polarAxis.angleAxis[e]!=null?t.polarAxis.angleAxis[e]:t.layout.layoutType==="radial"?$pe:Fpe,RS=(t,e)=>t.polarAxis.radiusAxis[e]!=null?t.polarAxis.radiusAxis[e]:t.layout.layoutType==="radial"?Ype:Hpe,hb=t=>t.polarOptions,LS=de([Ai,Ci,Br],Vce),K7=de([hb,LS],(t,e)=>{if(t!=null)return rs(t.innerRadius,e,0)}),Z7=de([hb,LS],(t,e)=>{if(t!=null)return rs(t.outerRadius,e,e*.8)}),Upe=t=>{if(t==null)return[0,0];var{startAngle:e,endAngle:r}=t;return[e,r]},Q7=de([hb],Upe);de([_S,Q7],ub);var J7=de([LS,K7,Z7],(t,e,r)=>{if(!(t==null||e==null||r==null))return[e,r]});de([RS,J7],ub);var ez=de([At,hb,K7,Z7,Ai,Ci],(t,e,r,n,a,s)=>{if(!(t!=="centric"&&t!=="radial"||e==null||r==null||n==null)){var{cx:o,cy:l,startAngle:c,endAngle:u}=e;return{cx:rs(o,a,a/2),cy:rs(l,s,s/2),innerRadius:r,outerRadius:n,startAngle:c,endAngle:u,clockWise:!1}}}),xr=(t,e)=>e,fb=(t,e,r)=>r;function zS(t){return t?.id}var Dr=t=>{var e=At(t);return e==="horizontal"?"xAxis":e==="vertical"?"yAxis":e==="centric"?"angleAxis":"radiusAxis"},Gd=t=>t.tooltip.settings.axisId,Tr=t=>{var e=Dr(t),r=Gd(t);return hp(t,e,r)};function tz(t,e,r){var{chartData:n=[]}=e,a=r?.dataKey,s=new Map;return t.forEach(o=>{var l,c=(l=o.data)!==null&&l!==void 0?l:n;if(!(c==null||c.length===0)){var u=zS(o);c.forEach((h,p)=>{var m=a==null?p:String(bn(h,a,null)),x=bn(h,o.dataKey,0),y;s.has(m)?y=s.get(m):y={},Object.assign(y,{[u]:x}),s.set(m,y)})}}),Array.from(s.values())}function pb(t){return t.stackId!=null&&t.dataKey!=null}function fO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Jx(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?fO(Object(r),!0).forEach(function(n){Wpe(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):fO(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Wpe(t,e,r){return(e=Xpe(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Xpe(t){var e=Vpe(t,"string");return typeof e=="symbol"?e:e+""}function Vpe(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var s4=[0,"auto"],Zn={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0},Di=(t,e)=>{var r=t.cartesianAxis.xAxis[e];return r??Zn},Qn={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:s4,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,width:eb},Po=(t,e)=>{var r=t.cartesianAxis.yAxis[e];return r??Qn},qpe={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},IS=(t,e)=>{var r=t.cartesianAxis.zAxis[e];return r??qpe},Fn=(t,e,r)=>{switch(e){case"xAxis":return Di(t,r);case"yAxis":return Po(t,r);case"zAxis":return IS(t,r);case"angleAxis":return _S(t,r);case"radiusAxis":return RS(t,r);default:throw new Error("Unexpected axis type: ".concat(e))}},Gpe=(t,e,r)=>{switch(e){case"xAxis":return Di(t,r);case"yAxis":return Po(t,r);default:throw new Error("Unexpected axis type: ".concat(e))}},hp=(t,e,r)=>{switch(e){case"xAxis":return Di(t,r);case"yAxis":return Po(t,r);case"angleAxis":return _S(t,r);case"radiusAxis":return RS(t,r);default:throw new Error("Unexpected axis type: ".concat(e))}},rz=t=>t.graphicalItems.cartesianItems.some(e=>e.type==="bar")||t.graphicalItems.polarItems.some(e=>e.type==="radialBar");function nz(t,e){return r=>{switch(t){case"xAxis":return"xAxisId"in r&&r.xAxisId===e;case"yAxis":return"yAxisId"in r&&r.yAxisId===e;case"zAxis":return"zAxisId"in r&&r.zAxisId===e;case"angleAxis":return"angleAxisId"in r&&r.angleAxisId===e;case"radiusAxis":return"radiusAxisId"in r&&r.radiusAxisId===e;default:return!1}}}var BS=t=>t.graphicalItems.cartesianItems,Kpe=de([xr,fb],nz),az=(t,e,r)=>t.filter(r).filter(n=>e?.includeHidden===!0?!0:!n.hide),fp=de([BS,Fn,Kpe],az),sz=de([fp],t=>t.filter(e=>e.type==="area"||e.type==="bar").filter(pb)),iz=t=>t.filter(e=>!("stackId"in e)||e.stackId===void 0),oz=de([fp],iz),lz=t=>t.map(e=>e.data).filter(Boolean).flat(1),Zpe=de([fp],lz),cz=(t,e)=>{var{chartData:r=[],dataStartIndex:n,dataEndIndex:a}=e;return t.length>0?t:r.slice(n,a+1)},FS=de([Zpe,DS],cz),dz=(t,e,r)=>e?.dataKey!=null?t.map(n=>({value:bn(n,e.dataKey)})):r.length>0?r.map(n=>n.dataKey).flatMap(n=>t.map(a=>({value:bn(a,n)}))):t.map(n=>({value:n})),mb=de([FS,Fn,fp],dz);function uz(t,e){switch(t){case"xAxis":return e.direction==="x";case"yAxis":return e.direction==="y";default:return!1}}function ic(t){return t.filter(e=>Es(e)||e instanceof Date).map(Number).filter(e=>ca(e)===!1)}function Qpe(t,e,r){return!r||typeof e!="number"||ca(e)?[]:r.length?ic(r.flatMap(n=>{var a=bn(t,n.dataKey),s,o;if(Array.isArray(a)?[s,o]=a:s=o=a,!(!da(s)||!da(o)))return[e-s,e+o]})):[]}var Jpe=de([sz,DS,Tr],tz),hz=(t,e,r)=>{var n={},a=e.reduce((s,o)=>(o.stackId==null||(s[o.stackId]==null&&(s[o.stackId]=[]),s[o.stackId].push(o)),s),n);return Object.fromEntries(Object.entries(a).map(s=>{var[o,l]=s,c=l.map(zS);return[o,{stackedData:cde(t,c,r),graphicalItems:l}]}))},i4=de([Jpe,sz,db],hz),fz=(t,e,r)=>{var{dataStartIndex:n,dataEndIndex:a}=e;if(r!=="zAxis"){var s=pde(t,n,a);if(!(s!=null&&s[0]===0&&s[1]===0))return s}},eme=de([i4,Oo,xr],fz),pz=(t,e,r,n,a)=>r.length>0?t.flatMap(s=>r.flatMap(o=>{var l,c,u=(l=n[o.id])===null||l===void 0?void 0:l.filter(p=>uz(a,p)),h=bn(s,(c=e.dataKey)!==null&&c!==void 0?c:o.dataKey);return{value:h,errorDomain:Qpe(s,h,u)}})).filter(Boolean):e?.dataKey!=null?t.map(s=>({value:bn(s,e.dataKey),errorDomain:[]})):t.map(s=>({value:s,errorDomain:[]})),gb=t=>t.errorBars,mz=(t,e,r)=>t.flatMap(n=>e[n.id]).filter(Boolean).filter(n=>uz(r,n));de([oz,gb,xr],mz);var tme=de([FS,Fn,oz,gb,xr],pz);function rme(t){var{value:e}=t;if(Es(e)||e instanceof Date)return e}var pO=t=>{var e=t.flatMap(n=>[n.value,n.errorDomain]).flat(1),r=ic(e);if(r.length!==0)return[Math.min(...r),Math.max(...r)]},nme=(t,e,r)=>{var n=t.map(rme).filter(a=>a!=null);return r&&(e.dataKey==null||e.allowDuplicatedCategory&&JL(n))?Q9(0,t.length):e.allowDuplicatedCategory?n:Array.from(new Set(n))},HS=t=>{var e;if(t==null||!("domain"in t))return s4;if(t.domain!=null)return t.domain;if(t.ticks!=null){if(t.type==="number"){var r=ic(t.ticks);return[Math.min(...r),Math.max(...r)]}if(t.type==="category")return t.ticks.map(String)}return(e=t?.domain)!==null&&e!==void 0?e:s4},e0=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];var a=r.filter(Boolean);if(a.length!==0){var s=a.flat(),o=Math.min(...s),l=Math.max(...s);return[o,l]}},gz=t=>t.referenceElements.dots,Kd=(t,e,r)=>t.filter(n=>n.ifOverflow==="extendDomain").filter(n=>e==="xAxis"?n.xAxisId===r:n.yAxisId===r),ame=de([gz,xr,fb],Kd),xz=t=>t.referenceElements.areas,sme=de([xz,xr,fb],Kd),bz=t=>t.referenceElements.lines,ime=de([bz,xr,fb],Kd),yz=(t,e)=>{var r=ic(t.map(n=>e==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]},ome=de(ame,xr,yz),vz=(t,e)=>{var r=ic(t.flatMap(n=>[e==="xAxis"?n.x1:n.y1,e==="xAxis"?n.x2:n.y2]));if(r.length!==0)return[Math.min(...r),Math.max(...r)]},lme=de([sme,xr],vz),wz=(t,e)=>{var r=ic(t.map(n=>e==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]},cme=de(ime,xr,wz),dme=de(ome,cme,lme,(t,e,r)=>e0(t,r,e)),ume=de([Fn],HS),jz=(t,e,r,n,a,s,o)=>{var l=Ape(e,t.allowDataOverflow);if(l!=null)return l;var c=s==="vertical"&&o==="xAxis"||s==="horizontal"&&o==="yAxis",u=c?e0(r,a,pO(n)):e0(a,pO(n));return Cpe(e,u,t.allowDataOverflow)},hme=de([Fn,ume,eme,tme,dme,At,xr],jz),fme=[0,1],Nz=(t,e,r,n,a,s,o)=>{if(!((t==null||r==null||r.length===0)&&o===void 0)){var{dataKey:l,type:c}=t,u=nc(e,s);return u&&l==null?Q9(0,r.length):c==="category"?nme(n,t,u):a==="expand"?fme:o}},$S=de([Fn,At,FS,mb,db,xr,hme],Nz),Sz=(t,e,r,n,a)=>{if(t!=null){var{scale:s,type:o}=t;if(s==="auto")return e==="radial"&&a==="radiusAxis"?"band":e==="radial"&&a==="angleAxis"?"linear":o==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?"point":o==="category"?"band":"linear";if(typeof s=="string"){var l="scale".concat(sp(s));return l in Mh?l:"point"}}},pp=de([Fn,At,rz,ES,xr],Sz);function pme(t){if(t!=null){if(t in Mh)return Mh[t]();var e="scale".concat(sp(t));if(e in Mh)return Mh[e]()}}function YS(t,e,r,n){if(!(r==null||n==null)){if(typeof t.scale=="function")return t.scale.copy().domain(r).range(n);var a=pme(e);if(a!=null){var s=a.domain(r).range(n);return ade(s),s}}}var Az=(t,e,r)=>{var n=HS(e);if(!(r!=="auto"&&r!=="linear")){if(e!=null&&e.tickCount&&Array.isArray(n)&&(n[0]==="auto"||n[1]==="auto")&&Ad(t))return Lpe(t,e.tickCount,e.allowDecimals);if(e!=null&&e.tickCount&&e.type==="number"&&Ad(t))return zpe(t,e.tickCount,e.allowDecimals)}},US=de([$S,hp,pp],Az),Cz=(t,e,r,n)=>{if(n!=="angleAxis"&&t?.type==="number"&&Ad(e)&&Array.isArray(r)&&r.length>0){var a=e[0],s=r[0],o=e[1],l=r[r.length-1];return[Math.min(a,s),Math.max(o,l)]}return e},mme=de([Fn,$S,US,xr],Cz),gme=de(mb,Fn,(t,e)=>{if(!(!e||e.type!=="number")){var r=1/0,n=Array.from(ic(t.map(l=>l.value))).sort((l,c)=>l-c);if(n.length<2)return 1/0;var a=n[n.length-1]-n[0];if(a===0)return 1/0;for(var s=0;s<n.length-1;s++){var o=n[s+1]-n[s];r=Math.min(r,o)}return r/a}}),kz=de(gme,At,q7,Br,(t,e,r,n)=>n,(t,e,r,n,a)=>{if(!da(t))return 0;var s=e==="vertical"?n.height:n.width;if(a==="gap")return t*s/2;if(a==="no-gap"){var o=rs(r,t*s),l=t*s/2;return l-o-(l-o)/s*o}return 0}),xme=(t,e)=>{var r=Di(t,e);return r==null||typeof r.padding!="string"?0:kz(t,"xAxis",e,r.padding)},bme=(t,e)=>{var r=Po(t,e);return r==null||typeof r.padding!="string"?0:kz(t,"yAxis",e,r.padding)},yme=de(Di,xme,(t,e)=>{var r,n;if(t==null)return{left:0,right:0};var{padding:a}=t;return typeof a=="string"?{left:e,right:e}:{left:((r=a.left)!==null&&r!==void 0?r:0)+e,right:((n=a.right)!==null&&n!==void 0?n:0)+e}}),vme=de(Po,bme,(t,e)=>{var r,n;if(t==null)return{top:0,bottom:0};var{padding:a}=t;return typeof a=="string"?{top:e,bottom:e}:{top:((r=a.top)!==null&&r!==void 0?r:0)+e,bottom:((n=a.bottom)!==null&&n!==void 0?n:0)+e}}),wme=de([Br,yme,rb,tb,(t,e,r)=>r],(t,e,r,n,a)=>{var{padding:s}=n;return a?[s.left,r.width-s.right]:[t.left+e.left,t.left+t.width-e.right]}),jme=de([Br,At,vme,rb,tb,(t,e,r)=>r],(t,e,r,n,a,s)=>{var{padding:o}=a;return s?[n.height-o.bottom,o.top]:e==="horizontal"?[t.top+t.height-r.bottom,t.top+r.top]:[t.top+r.top,t.top+t.height-r.bottom]}),mp=(t,e,r,n)=>{var a;switch(e){case"xAxis":return wme(t,r,n);case"yAxis":return jme(t,r,n);case"zAxis":return(a=IS(t,r))===null||a===void 0?void 0:a.range;case"angleAxis":return Q7(t);case"radiusAxis":return J7(t,r);default:return}},Dz=de([Fn,mp],ub),Zd=de([Fn,pp,mme,Dz],YS);de([fp,gb,xr],mz);function Tz(t,e){return t.id<e.id?-1:t.id>e.id?1:0}var xb=(t,e)=>e,bb=(t,e,r)=>r,Nme=de(eS,xb,bb,(t,e,r)=>t.filter(n=>n.orientation===e).filter(n=>n.mirror===r).sort(Tz)),Sme=de(tS,xb,bb,(t,e,r)=>t.filter(n=>n.orientation===e).filter(n=>n.mirror===r).sort(Tz)),Mz=(t,e)=>({width:t.width,height:e.height}),Ame=(t,e)=>{var r=typeof e.width=="number"?e.width:eb;return{width:r,height:t.height}},Ez=de(Br,Di,Mz),Cme=(t,e,r)=>{switch(e){case"top":return t.top;case"bottom":return r-t.bottom;default:return 0}},kme=(t,e,r)=>{switch(e){case"left":return t.left;case"right":return r-t.right;default:return 0}},Dme=de(Ci,Br,Nme,xb,bb,(t,e,r,n,a)=>{var s={},o;return r.forEach(l=>{var c=Mz(e,l);o==null&&(o=Cme(e,n,t));var u=n==="top"&&!a||n==="bottom"&&a;s[l.id]=o-Number(u)*c.height,o+=(u?-1:1)*c.height}),s}),Tme=de(Ai,Br,Sme,xb,bb,(t,e,r,n,a)=>{var s={},o;return r.forEach(l=>{var c=Ame(e,l);o==null&&(o=kme(e,n,t));var u=n==="left"&&!a||n==="right"&&a;s[l.id]=o-Number(u)*c.width,o+=(u?-1:1)*c.width}),s}),Mme=(t,e)=>{var r=Br(t),n=Di(t,e);if(n!=null){var a=Dme(t,n.orientation,n.mirror),s=a[e];return s==null?{x:r.left,y:0}:{x:r.left,y:s}}},Eme=(t,e)=>{var r=Br(t),n=Po(t,e);if(n!=null){var a=Tme(t,n.orientation,n.mirror),s=a[e];return s==null?{x:0,y:r.top}:{x:s,y:r.top}}},Oz=de(Br,Po,(t,e)=>{var r=typeof e.width=="number"?e.width:eb;return{width:r,height:t.height}}),mO=(t,e,r)=>{switch(e){case"xAxis":return Ez(t,r).width;case"yAxis":return Oz(t,r).height;default:return}},Pz=(t,e,r,n)=>{if(r!=null){var{allowDuplicatedCategory:a,type:s,dataKey:o}=r,l=nc(t,n),c=e.map(u=>u.value);if(o&&l&&s==="category"&&a&&JL(c))return c}},WS=de([At,mb,Fn,xr],Pz),_z=(t,e,r,n)=>{if(!(r==null||r.dataKey==null)){var{type:a,scale:s}=r,o=nc(t,n);if(o&&(a==="number"||s!=="auto"))return e.map(l=>l.value)}},XS=de([At,mb,hp,xr],_z),gO=de([At,Gpe,pp,Zd,WS,XS,mp,US,xr],(t,e,r,n,a,s,o,l,c)=>{if(e==null)return null;var u=nc(t,c);return{angle:e.angle,interval:e.interval,minTickGap:e.minTickGap,orientation:e.orientation,tick:e.tick,tickCount:e.tickCount,tickFormatter:e.tickFormatter,ticks:e.ticks,type:e.type,unit:e.unit,axisType:c,categoricalDomain:s,duplicateDomain:a,isCategorical:u,niceTicks:l,range:o,realScaleType:r,scale:n}}),Ome=(t,e,r,n,a,s,o,l,c)=>{if(!(e==null||n==null)){var u=nc(t,c),{type:h,ticks:p,tickCount:m}=e,x=r==="scaleBand"&&typeof n.bandwidth=="function"?n.bandwidth()/2:2,y=h==="category"&&n.bandwidth?n.bandwidth()/x:0;y=c==="angleAxis"&&s!=null&&s.length>=2?Pn(s[0]-s[1])*2*y:y;var b=p||a;if(b){var w=b.map((N,A)=>{var S=o?o.indexOf(N):N;return{index:A,coordinate:n(S)+y,value:N,offset:y}});return w.filter(N=>!ca(N.coordinate))}return u&&l?l.map((N,A)=>({coordinate:n(N)+y,value:N,index:A,offset:y})):n.ticks?n.ticks(m).map(N=>({coordinate:n(N)+y,value:N,offset:y})):n.domain().map((N,A)=>({coordinate:n(N)+y,value:o?o[N]:N,index:A,offset:y}))}},Rz=de([At,hp,pp,Zd,US,mp,WS,XS,xr],Ome),Pme=(t,e,r,n,a,s,o)=>{if(!(e==null||r==null||n==null||n[0]===n[1])){var l=nc(t,o),{tickCount:c}=e,u=0;return u=o==="angleAxis"&&n?.length>=2?Pn(n[0]-n[1])*2*u:u,l&&s?s.map((h,p)=>({coordinate:r(h)+u,value:h,index:p,offset:u})):r.ticks?r.ticks(c).map(h=>({coordinate:r(h)+u,value:h,offset:u})):r.domain().map((h,p)=>({coordinate:r(h)+u,value:a?a[h]:h,index:p,offset:u}))}},Cd=de([At,hp,Zd,mp,WS,XS,xr],Pme),kd=de(Fn,Zd,(t,e)=>{if(!(t==null||e==null))return Jx(Jx({},t),{},{scale:e})}),_me=de([Fn,pp,$S,Dz],YS);de((t,e,r)=>IS(t,r),_me,(t,e)=>{if(!(t==null||e==null))return Jx(Jx({},t),{},{scale:e})});var Rme=de([At,eS,tS],(t,e,r)=>{switch(t){case"horizontal":return e.some(n=>n.reversed)?"right-to-left":"left-to-right";case"vertical":return r.some(n=>n.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),Lz=t=>t.options.defaultTooltipEventType,zz=t=>t.options.validateTooltipEventTypes;function Iz(t,e,r){if(t==null)return e;var n=t?"axis":"item";return r==null?e:r.includes(n)?n:e}function VS(t,e){var r=Lz(t),n=zz(t);return Iz(e,r,n)}function Lme(t){return Be(e=>VS(e,t))}var Bz=(t,e)=>{var r,n=Number(e);if(!(ca(n)||e==null))return n>=0?t==null||(r=t[n])===null||r===void 0?void 0:r.value:void 0},zme=t=>t.tooltip.settings,io={active:!1,index:null,dataKey:void 0,coordinate:void 0},Ime={itemInteraction:{click:io,hover:io},axisInteraction:{click:io,hover:io},keyboardInteraction:io,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},Fz=$t({name:"tooltip",initialState:Ime,reducers:{addTooltipEntrySettings(t,e){t.tooltipItemPayloads.push(e.payload)},removeTooltipEntrySettings(t,e){var r=pi(t).tooltipItemPayloads.indexOf(e.payload);r>-1&&t.tooltipItemPayloads.splice(r,1)},setTooltipSettingsState(t,e){t.settings=e.payload},setActiveMouseOverItemIndex(t,e){t.syncInteraction.active=!1,t.keyboardInteraction.active=!1,t.itemInteraction.hover.active=!0,t.itemInteraction.hover.index=e.payload.activeIndex,t.itemInteraction.hover.dataKey=e.payload.activeDataKey,t.itemInteraction.hover.coordinate=e.payload.activeCoordinate},mouseLeaveChart(t){t.itemInteraction.hover.active=!1,t.axisInteraction.hover.active=!1},mouseLeaveItem(t){t.itemInteraction.hover.active=!1},setActiveClickItemIndex(t,e){t.syncInteraction.active=!1,t.itemInteraction.click.active=!0,t.keyboardInteraction.active=!1,t.itemInteraction.click.index=e.payload.activeIndex,t.itemInteraction.click.dataKey=e.payload.activeDataKey,t.itemInteraction.click.coordinate=e.payload.activeCoordinate},setMouseOverAxisIndex(t,e){t.syncInteraction.active=!1,t.axisInteraction.hover.active=!0,t.keyboardInteraction.active=!1,t.axisInteraction.hover.index=e.payload.activeIndex,t.axisInteraction.hover.dataKey=e.payload.activeDataKey,t.axisInteraction.hover.coordinate=e.payload.activeCoordinate},setMouseClickAxisIndex(t,e){t.syncInteraction.active=!1,t.keyboardInteraction.active=!1,t.axisInteraction.click.active=!0,t.axisInteraction.click.index=e.payload.activeIndex,t.axisInteraction.click.dataKey=e.payload.activeDataKey,t.axisInteraction.click.coordinate=e.payload.activeCoordinate},setSyncInteraction(t,e){t.syncInteraction=e.payload},setKeyboardInteraction(t,e){t.keyboardInteraction.active=e.payload.active,t.keyboardInteraction.index=e.payload.activeIndex,t.keyboardInteraction.coordinate=e.payload.activeCoordinate,t.keyboardInteraction.dataKey=e.payload.activeDataKey}}}),{addTooltipEntrySettings:Bme,removeTooltipEntrySettings:Fme,setTooltipSettingsState:Hme,setActiveMouseOverItemIndex:Hz,mouseLeaveItem:$me,mouseLeaveChart:$z,setActiveClickItemIndex:Yme,setMouseOverAxisIndex:Yz,setMouseClickAxisIndex:Ume,setSyncInteraction:o4,setKeyboardInteraction:l4}=Fz.actions,Wme=Fz.reducer;function xO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).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?xO(Object(r),!0).forEach(function(n){Xme(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):xO(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Xme(t,e,r){return(e=Vme(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Vme(t){var e=qme(t,"string");return typeof e=="symbol"?e:e+""}function qme(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Gme(t,e,r){return e==="axis"?r==="click"?t.axisInteraction.click:t.axisInteraction.hover:r==="click"?t.itemInteraction.click:t.itemInteraction.hover}function Kme(t){return t.index!=null}var Uz=(t,e,r,n)=>{if(e==null)return io;var a=Gme(t,e,r);if(a==null)return io;if(a.active)return a;if(t.keyboardInteraction.active)return t.keyboardInteraction;if(t.syncInteraction.active&&t.syncInteraction.index!=null)return t.syncInteraction;var s=t.settings.active===!0;if(Kme(a)){if(s)return bg(bg({},a),{},{active:!0})}else if(n!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:n};return bg(bg({},io),{},{coordinate:a.coordinate})},qS=(t,e)=>{var r=t?.index;if(r==null)return null;var n=Number(r);if(!da(n))return r;var a=0,s=1/0;return e.length>0&&(s=e.length-1),String(Math.max(a,Math.min(n,s)))},Wz=(t,e,r,n,a,s,o,l)=>{if(!(s==null||l==null)){var c=o[0],u=c==null?void 0:l(c.positions,s);if(u!=null)return u;var h=a?.[Number(s)];if(h)switch(r){case"horizontal":return{x:h.coordinate,y:(n.top+e)/2};default:return{x:(n.left+t)/2,y:h.coordinate}}}},Xz=(t,e,r,n)=>{if(e==="axis")return t.tooltipItemPayloads;if(t.tooltipItemPayloads.length===0)return[];var a;return r==="hover"?a=t.itemInteraction.hover.dataKey:a=t.itemInteraction.click.dataKey,a==null&&n!=null?[t.tooltipItemPayloads[0]]:t.tooltipItemPayloads.filter(s=>{var o;return((o=s.settings)===null||o===void 0?void 0:o.dataKey)===a})},gp=t=>t.options.tooltipPayloadSearcher,Qd=t=>t.tooltip;function bO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function yO(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?bO(Object(r),!0).forEach(function(n){Zme(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):bO(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Zme(t,e,r){return(e=Qme(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Qme(t){var e=Jme(t,"string");return typeof e=="symbol"?e:e+""}function Jme(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ege(t,e){return t??e}var Vz=(t,e,r,n,a,s,o)=>{if(!(e==null||s==null)){var{chartData:l,computedData:c,dataStartIndex:u,dataEndIndex:h}=r,p=[];return t.reduce((m,x)=>{var y,{dataDefinedOnItem:b,settings:w}=x,N=ege(b,l),A=Array.isArray(N)?E9(N,u,h):N,S=(y=w?.dataKey)!==null&&y!==void 0?y:n?.dataKey,C=w?.nameKey,k;if(n!=null&&n.dataKey&&Array.isArray(A)&&!Array.isArray(A[0])&&o==="axis"?k=Zoe(A,n.dataKey,a):k=s(A,e,c,C),Array.isArray(k))k.forEach(E=>{var _=yO(yO({},w),{},{name:E.name,unit:E.unit,color:void 0,fill:void 0});m.push(eE({tooltipEntrySettings:_,dataKey:E.dataKey,payload:E.payload,value:bn(E.payload,E.dataKey),name:E.name}))});else{var T;m.push(eE({tooltipEntrySettings:w,dataKey:S,payload:k,value:bn(k,S),name:(T=bn(k,C))!==null&&T!==void 0?T:w?.name}))}return m},p)}},GS=de([Tr,At,rz,ES,Dr],Sz),tge=de([t=>t.graphicalItems.cartesianItems,t=>t.graphicalItems.polarItems],(t,e)=>[...t,...e]),rge=de([Dr,Gd],nz),xp=de([tge,Tr,rge],az),nge=de([xp],t=>t.filter(pb)),age=de([xp],lz),Jd=de([age,Oo],cz),sge=de([nge,Oo,Tr],tz),KS=de([Jd,Tr,xp],dz),ige=de([Tr],HS),oge=de([xp],t=>t.filter(pb)),lge=de([sge,oge,db],hz),cge=de([lge,Oo,Dr],fz),dge=de([xp],iz),uge=de([Jd,Tr,dge,gb,Dr],pz),hge=de([gz,Dr,Gd],Kd),fge=de([hge,Dr],yz),pge=de([xz,Dr,Gd],Kd),mge=de([pge,Dr],vz),gge=de([bz,Dr,Gd],Kd),xge=de([gge,Dr],wz),bge=de([fge,xge,mge],e0),yge=de([Tr,ige,cge,uge,bge,At,Dr],jz),qz=de([Tr,At,Jd,KS,db,Dr,yge],Nz),vge=de([qz,Tr,GS],Az),wge=de([Tr,qz,vge,Dr],Cz),Gz=t=>{var e=Dr(t),r=Gd(t),n=!1;return mp(t,e,r,n)},Kz=de([Tr,Gz],ub),Zz=de([Tr,GS,wge,Kz],YS),jge=de([At,KS,Tr,Dr],Pz),Nge=de([At,KS,Tr,Dr],_z),Sge=(t,e,r,n,a,s,o,l)=>{if(e){var{type:c}=e,u=nc(t,l);if(n){var h=r==="scaleBand"&&n.bandwidth?n.bandwidth()/2:2,p=c==="category"&&n.bandwidth?n.bandwidth()/h:0;return p=l==="angleAxis"&&a!=null&&a?.length>=2?Pn(a[0]-a[1])*2*p:p,u&&o?o.map((m,x)=>({coordinate:n(m)+p,value:m,index:x,offset:p})):n.domain().map((m,x)=>({coordinate:n(m)+p,value:s?s[m]:m,index:x,offset:p}))}}},Ti=de([At,Tr,GS,Zz,Gz,jge,Nge,Dr],Sge),ZS=de([Lz,zz,zme],(t,e,r)=>Iz(r.shared,t,e)),Qz=t=>t.tooltip.settings.trigger,QS=t=>t.tooltip.settings.defaultIndex,yb=de([Qd,ZS,Qz,QS],Uz),Dd=de([yb,Jd],qS),Jz=de([Ti,Dd],Bz),eI=de([yb],t=>{if(t)return t.dataKey}),tI=de([Qd,ZS,Qz,QS],Xz),Age=de([Ai,Ci,At,Br,Ti,QS,tI,gp],Wz),Cge=de([yb,Age],(t,e)=>t!=null&&t.coordinate?t.coordinate:e),kge=de([yb],t=>t.active),Dge=de([tI,Dd,Oo,Tr,Jz,gp,ZS],Vz);de([Dge],t=>{if(t!=null){var e=t.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(e))}});function vO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function wO(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?vO(Object(r),!0).forEach(function(n){Tge(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):vO(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Tge(t,e,r){return(e=Mge(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Mge(t){var e=Ege(t,"string");return typeof e=="symbol"?e:e+""}function Ege(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Oge=()=>Be(Tr),Pge=()=>{var t=Oge(),e=Be(Ti),r=Be(Zz);return JN(wO(wO({},t),{},{scale:r}),e)},_ge=()=>Be(ES),JS=(t,e)=>e,rI=(t,e,r)=>r,e3=(t,e,r,n)=>n,Rge=de(Ti,t=>J0(t,e=>e.coordinate)),t3=de([Qd,JS,rI,e3],Uz),nI=de([t3,Jd],qS),Lge=(t,e,r)=>{if(e!=null){var n=Qd(t);return e==="axis"?r==="hover"?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:r==="hover"?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},aI=de([Qd,JS,rI,e3],Xz),t0=de([Ai,Ci,At,Br,Ti,e3,aI,gp],Wz),zge=de([t3,t0],(t,e)=>{var r;return(r=t.coordinate)!==null&&r!==void 0?r:e}),sI=de(Ti,nI,Bz),Ige=de([aI,nI,Oo,Tr,sI,gp,JS],Vz),Bge=de([t3],t=>({isActive:t.active,activeIndex:t.index})),Fge=(t,e,r,n,a,s,o,l)=>{if(!(!t||!e||!n||!a||!s)){var c=mde(t.chartX,t.chartY,e,r,l);if(c){var u=xde(c,e),h=rde(u,o,s,n,a),p=gde(e,s,h,c);return{activeIndex:String(h),activeCoordinate:p}}}};function c4(){return c4=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},c4.apply(null,arguments)}function jO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function yg(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?jO(Object(r),!0).forEach(function(n){Hge(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):jO(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Hge(t,e,r){return(e=$ge(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function $ge(t){var e=Yge(t,"string");return typeof e=="symbol"?e:e+""}function Yge(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Uge(t){var{coordinate:e,payload:r,index:n,offset:a,tooltipAxisBandSize:s,layout:o,cursor:l,tooltipEventType:c,chartName:u}=t,h=e,p=r,m=n;if(!l||!h||u!=="ScatterChart"&&c!=="axis")return null;var x,y;if(u==="ScatterChart")x=h,y=sue;else if(u==="BarChart")x=iue(o,h,a,s),y=q9;else if(o==="radial"){var{cx:b,cy:w,radius:N,startAngle:A,endAngle:S}=G9(h);x={cx:b,cy:w,startAngle:A,endAngle:S,innerRadius:N,outerRadius:N},y=Z9}else x={points:Uue(o,h,a)},y=Kde;var C=typeof l=="object"&&"className"in l?l.className:void 0,k=yg(yg(yg(yg({stroke:"#ccc",pointerEvents:"none"},a),x),zr(l,!1)),{},{payload:p,payloadIndex:m,className:Ge("recharts-tooltip-cursor",C)});return O.isValidElement(l)?O.cloneElement(l,k):O.createElement(y,k)}function Wge(t){var e=Pge(),r=z9(),n=nS(),a=_ge();return O.createElement(Uge,c4({},t,{coordinate:t.coordinate,index:t.index,payload:t.payload,offset:r,layout:n,tooltipAxisBandSize:e,chartName:a}))}var iI=O.createContext(null),Xge=()=>O.useContext(iI),c2={exports:{}},NO;function Vge(){return NO||(NO=1,function(t){var e=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function a(c,u,h){this.fn=c,this.context=u,this.once=h||!1}function s(c,u,h,p,m){if(typeof h!="function")throw new TypeError("The listener must be a function");var x=new a(h,p||c,m),y=r?r+u:u;return c._events[y]?c._events[y].fn?c._events[y]=[c._events[y],x]:c._events[y].push(x):(c._events[y]=x,c._eventsCount++),c}function o(c,u){--c._eventsCount===0?c._events=new n:delete c._events[u]}function l(){this._events=new n,this._eventsCount=0}l.prototype.eventNames=function(){var u=[],h,p;if(this._eventsCount===0)return u;for(p in h=this._events)e.call(h,p)&&u.push(r?p.slice(1):p);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(h)):u},l.prototype.listeners=function(u){var h=r?r+u:u,p=this._events[h];if(!p)return[];if(p.fn)return[p.fn];for(var m=0,x=p.length,y=new Array(x);m<x;m++)y[m]=p[m].fn;return y},l.prototype.listenerCount=function(u){var h=r?r+u:u,p=this._events[h];return p?p.fn?1:p.length:0},l.prototype.emit=function(u,h,p,m,x,y){var b=r?r+u:u;if(!this._events[b])return!1;var w=this._events[b],N=arguments.length,A,S;if(w.fn){switch(w.once&&this.removeListener(u,w.fn,void 0,!0),N){case 1:return w.fn.call(w.context),!0;case 2:return w.fn.call(w.context,h),!0;case 3:return w.fn.call(w.context,h,p),!0;case 4:return w.fn.call(w.context,h,p,m),!0;case 5:return w.fn.call(w.context,h,p,m,x),!0;case 6:return w.fn.call(w.context,h,p,m,x,y),!0}for(S=1,A=new Array(N-1);S<N;S++)A[S-1]=arguments[S];w.fn.apply(w.context,A)}else{var C=w.length,k;for(S=0;S<C;S++)switch(w[S].once&&this.removeListener(u,w[S].fn,void 0,!0),N){case 1:w[S].fn.call(w[S].context);break;case 2:w[S].fn.call(w[S].context,h);break;case 3:w[S].fn.call(w[S].context,h,p);break;case 4:w[S].fn.call(w[S].context,h,p,m);break;default:if(!A)for(k=1,A=new Array(N-1);k<N;k++)A[k-1]=arguments[k];w[S].fn.apply(w[S].context,A)}}return!0},l.prototype.on=function(u,h,p){return s(this,u,h,p,!1)},l.prototype.once=function(u,h,p){return s(this,u,h,p,!0)},l.prototype.removeListener=function(u,h,p,m){var x=r?r+u:u;if(!this._events[x])return this;if(!h)return o(this,x),this;var y=this._events[x];if(y.fn)y.fn===h&&(!m||y.once)&&(!p||y.context===p)&&o(this,x);else{for(var b=0,w=[],N=y.length;b<N;b++)(y[b].fn!==h||m&&!y[b].once||p&&y[b].context!==p)&&w.push(y[b]);w.length?this._events[x]=w.length===1?w[0]:w:o(this,x)}return this},l.prototype.removeAllListeners=function(u){var h;return u?(h=r?r+u:u,this._events[h]&&o(this,h)):(this._events=new n,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=r,l.EventEmitter=l,t.exports=l}(c2)),c2.exports}var qge=Vge();const Gge=ns(qge);var kf=new Gge,d4="recharts.syncEvent.tooltip",SO="recharts.syncEvent.brush";function Kge(t,e){if(e){var r=Number.parseInt(e,10);if(!ca(r))return t?.[r]}}var Zge={chartName:"",tooltipPayloadSearcher:void 0,eventEmitter:void 0,defaultTooltipEventType:"axis"},oI=$t({name:"options",initialState:Zge,reducers:{createEventEmitter:t=>{t.eventEmitter==null&&(t.eventEmitter=Symbol("rechartsEventEmitter"))}}}),Qge=oI.reducer,{createEventEmitter:Jge}=oI.actions;function exe(t){return t.tooltip.syncInteraction}var txe={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},lI=$t({name:"chartData",initialState:txe,reducers:{setChartData(t,e){if(t.chartData=e.payload,e.payload==null){t.dataStartIndex=0,t.dataEndIndex=0;return}e.payload.length>0&&t.dataEndIndex!==e.payload.length-1&&(t.dataEndIndex=e.payload.length-1)},setComputedData(t,e){t.computedData=e.payload},setDataStartEndIndexes(t,e){var{startIndex:r,endIndex:n}=e.payload;r!=null&&(t.dataStartIndex=r),n!=null&&(t.dataEndIndex=n)}}}),{setChartData:AO,setDataStartEndIndexes:rxe,setComputedData:kwe}=lI.actions,nxe=lI.reducer,cI=()=>{};function axe(){var t=Be(OS),e=Be(PS),r=Ir(),n=Be(G7),a=Be(Ti),s=nS(),o=rS(),l=Be(c=>c.rootProps.className);O.useEffect(()=>{if(t==null)return cI;var c=(u,h,p)=>{if(e!==p&&t===u){if(n==="index"){r(h);return}if(a!=null){var m;if(typeof n=="function"){var x={activeTooltipIndex:h.payload.index==null?void 0:Number(h.payload.index),isTooltipActive:h.payload.active,activeIndex:h.payload.index==null?void 0:Number(h.payload.index),activeLabel:h.payload.label,activeDataKey:h.payload.dataKey,activeCoordinate:h.payload.coordinate},y=n(a,x);m=a[y]}else n==="value"&&(m=a.find(T=>String(T.value)===h.payload.label));var{coordinate:b}=h.payload;if(m==null||h.payload.active===!1||b==null||o==null){r(o4({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0}));return}var{x:w,y:N}=b,A=Math.min(w,o.x+o.width),S=Math.min(N,o.y+o.height),C={x:s==="horizontal"?m.coordinate:A,y:s==="horizontal"?S:m.coordinate},k=o4({active:h.payload.active,coordinate:C,dataKey:h.payload.dataKey,index:String(m.index),label:h.payload.label});r(k)}}};return kf.on(d4,c),()=>{kf.off(d4,c)}},[l,r,e,t,n,a,s,o])}function sxe(){var t=Be(OS),e=Be(PS),r=Ir();O.useEffect(()=>{if(t==null)return cI;var n=(a,s,o)=>{e!==o&&t===a&&r(rxe(s))};return kf.on(SO,n),()=>{kf.off(SO,n)}},[r,e,t])}function ixe(){var t=Ir();O.useEffect(()=>{t(Jge())},[t]),axe(),sxe()}function oxe(t,e,r,n,a,s){var o=Be(m=>Lge(m,t,e)),l=Be(PS),c=Be(OS),u=Be(G7),h=Be(exe),p=h?.active;O.useEffect(()=>{if(!p&&c!=null&&l!=null){var m=o4({active:s,coordinate:r,dataKey:o,index:a,label:typeof n=="number"?String(n):n});kf.emit(d4,c,m,l)}},[p,r,o,a,n,l,c,u,s])}function CO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function kO(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?CO(Object(r),!0).forEach(function(n){lxe(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):CO(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function lxe(t,e,r){return(e=cxe(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function cxe(t){var e=dxe(t,"string");return typeof e=="symbol"?e:e+""}function dxe(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function uxe(t){return t.dataKey}function hxe(t,e){return O.isValidElement(t)?O.cloneElement(t,e):typeof t=="function"?O.createElement(t,e):O.createElement(Lde,e)}var DO=[],fxe={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,isAnimationActive:!op.isSsr,itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function pxe(t){var e=To(t,fxe),{active:r,allowEscapeViewBox:n,animationDuration:a,animationEasing:s,content:o,filterNull:l,isAnimationActive:c,offset:u,payloadUniqBy:h,position:p,reverseDirection:m,useTranslate3d:x,wrapperStyle:y,cursor:b,shared:w,trigger:N,defaultIndex:A,portal:S,axisId:C}=e,k=Ir(),T=typeof A=="number"?String(A):A;O.useEffect(()=>{k(Hme({shared:w,trigger:N,axisId:C,active:r,defaultIndex:T}))},[k,w,N,C,r,T]);var E=rS(),_=H9(),L=Lme(w),{activeIndex:P,isActive:R}=Be(re=>Bge(re,L,N,T)),z=Be(re=>Ige(re,L,N,T)),B=Be(re=>sI(re,L,N,T)),Y=Be(re=>zge(re,L,N,T)),X=z,H=Xge(),W=r??R,[V,Z]=Lce([X,W]),F=L==="axis"?B:void 0;oxe(L,N,Y,F,P,W);var G=S??H;if(G==null)return null;var te=X??DO;W||(te=DO),l&&te.length&&(te=bce(X.filter(re=>re.value!=null&&(re.hide!==!0||e.includeHidden)),h,uxe));var K=te.length>0,U=O.createElement(Yde,{allowEscapeViewBox:n,animationDuration:a,animationEasing:s,isAnimationActive:c,active:W,coordinate:Y,hasPayload:K,offset:u,position:p,reverseDirection:m,useTranslate3d:x,viewBox:E,wrapperStyle:y,lastBoundingBox:V,innerRef:Z,hasPortalFromProps:!!S},hxe(o,kO(kO({},e),{},{payload:te,label:F,active:W,coordinate:Y,accessibilityLayer:_})));return O.createElement(O.Fragment,null,R$.createPortal(U,G),W&&O.createElement(Wge,{cursor:b,tooltipEventType:L,coordinate:Y,payload:X,index:P}))}var d2={},u2={},h2={},TO;function mxe(){return TO||(TO=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r,n,{signal:a,edges:s}={}){let o,l=null;const c=s!=null&&s.includes("leading"),u=s==null||s.includes("trailing"),h=()=>{l!==null&&(r.apply(o,l),o=void 0,l=null)},p=()=>{u&&h(),b()};let m=null;const x=()=>{m!=null&&clearTimeout(m),m=setTimeout(()=>{m=null,p()},n)},y=()=>{m!==null&&(clearTimeout(m),m=null)},b=()=>{y(),o=void 0,l=null},w=()=>{h()},N=function(...A){if(a?.aborted)return;o=this,l=A;const S=m==null;x(),c&&S&&h()};return N.schedule=x,N.cancel=b,N.flush=w,a?.addEventListener("abort",b,{once:!0}),N}t.debounce=e}(h2)),h2}var MO;function gxe(){return MO||(MO=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=mxe();function r(n,a=0,s={}){typeof s!="object"&&(s={});const{leading:o=!1,trailing:l=!0,maxWait:c}=s,u=Array(2);o&&(u[0]="leading"),l&&(u[1]="trailing");let h,p=null;const m=e.debounce(function(...b){h=n.apply(this,b),p=null},a,{edges:u}),x=function(...b){return c!=null&&(p===null&&(p=Date.now()),Date.now()-p>=c)?(h=n.apply(this,b),p=Date.now(),m.cancel(),m.schedule(),h):(m.apply(this,b),h)},y=()=>(m.flush(),h);return x.cancel=m.cancel,x.flush=y,x}t.debounce=r}(u2)),u2}var EO;function xxe(){return EO||(EO=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=gxe();function r(n,a=0,s={}){const{leading:o=!0,trailing:l=!0}=s;return e.debounce(n,a,{leading:o,maxWait:a,trailing:l})}t.throttle=r}(d2)),d2}var f2,OO;function bxe(){return OO||(OO=1,f2=xxe().throttle),f2}var yxe=bxe();const vxe=ns(yxe);var Gh=function(e,r){for(var n=arguments.length,a=new Array(n>2?n-2:0),s=2;s<n;s++)a[s-2]=arguments[s]};function PO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function p2(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?PO(Object(r),!0).forEach(function(n){wxe(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):PO(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function wxe(t,e,r){return(e=jxe(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function jxe(t){var e=Nxe(t,"string");return typeof e=="symbol"?e:e+""}function Nxe(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Sxe=O.forwardRef((t,e)=>{var{aspect:r,initialDimension:n={width:-1,height:-1},width:a="100%",height:s="100%",minWidth:o=0,minHeight:l,maxHeight:c,children:u,debounce:h=0,id:p,className:m,onResize:x,style:y={}}=t,b=O.useRef(null),w=O.useRef();w.current=x,O.useImperativeHandle(e,()=>b.current);var[N,A]=O.useState({containerWidth:n.width,containerHeight:n.height}),S=O.useCallback((k,T)=>{A(E=>{var _=Math.round(k),L=Math.round(T);return E.containerWidth===_&&E.containerHeight===L?E:{containerWidth:_,containerHeight:L}})},[]);O.useEffect(()=>{var k=L=>{var P,{width:R,height:z}=L[0].contentRect;S(R,z),(P=w.current)===null||P===void 0||P.call(w,R,z)};h>0&&(k=vxe(k,h,{trailing:!0,leading:!1}));var T=new ResizeObserver(k),{width:E,height:_}=b.current.getBoundingClientRect();return S(E,_),T.observe(b.current),()=>{T.disconnect()}},[S,h]);var C=O.useMemo(()=>{var{containerWidth:k,containerHeight:T}=N;if(k<0||T<0)return null;Gh(Nl(a)||Nl(s),`The width(%s) and height(%s) are both fixed numbers,
maybe you don't need to use a ResponsiveContainer.`,a,s),Gh(!r||r>0,"The aspect(%s) must be greater than zero.",r);var E=Nl(a)?k:a,_=Nl(s)?T:s;return r&&r>0&&(E?_=E/r:_&&(E=_*r),c&&_>c&&(_=c)),Gh(E>0||_>0,`The width(%s) and height(%s) of chart should be greater than 0,
please check the style of container, or the props width(%s) and height(%s),
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
height and width.`,E,_,a,s,o,l,r),O.Children.map(u,L=>O.cloneElement(L,{width:E,height:_,style:p2({width:E,height:_},L.props.style)}))},[r,u,s,c,l,o,N,a]);return O.createElement("div",{id:p?"".concat(p):void 0,className:Ge("recharts-responsive-container",m),style:p2(p2({},y),{},{width:a,height:s,minWidth:o,minHeight:l,maxHeight:c}),ref:b},O.createElement("div",{style:{width:0,height:0,overflow:"visible"}},C))}),dI=t=>null;dI.displayName="Cell";function Axe(t,e,r){return(e=Cxe(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Cxe(t){var e=kxe(t,"string");return typeof e=="symbol"?e:e+""}function kxe(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class Dxe{constructor(e){Axe(this,"cache",new Map),this.maxSize=e}get(e){var r=this.cache.get(e);return r!==void 0&&(this.cache.delete(e),this.cache.set(e,r)),r}set(e,r){if(this.cache.has(e))this.cache.delete(e);else if(this.cache.size>=this.maxSize){var n=this.cache.keys().next().value;this.cache.delete(n)}this.cache.set(e,r)}clear(){this.cache.clear()}size(){return this.cache.size}}function _O(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Txe(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){Mxe(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 Mxe(t,e,r){return(e=Exe(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Exe(t){var e=Oxe(t,"string");return typeof e=="symbol"?e:e+""}function Oxe(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Pxe={cacheSize:2e3,enableCache:!0},uI=Txe({},Pxe),RO=new Dxe(uI.cacheSize),_xe={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},LO="recharts_measurement_span";function Rxe(t,e){var r=e.fontSize||"",n=e.fontFamily||"",a=e.fontWeight||"",s=e.fontStyle||"",o=e.letterSpacing||"",l=e.textTransform||"";return"".concat(t,"|").concat(r,"|").concat(n,"|").concat(a,"|").concat(s,"|").concat(o,"|").concat(l)}var zO=(t,e)=>{try{var r=document.getElementById(LO);r||(r=document.createElement("span"),r.setAttribute("id",LO),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,_xe,e),r.textContent="".concat(t);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch{return{width:0,height:0}}},Kh=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e==null||op.isSsr)return{width:0,height:0};if(!uI.enableCache)return zO(e,r);var n=Rxe(e,r),a=RO.get(n);if(a)return a;var s=zO(e,r);return RO.set(n,s),s},IO=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,BO=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Lxe=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,zxe=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,hI={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},Ixe=Object.keys(hI),td="NaN";function Bxe(t,e){return t*hI[e]}class Mn{static parse(e){var r,[,n,a]=(r=zxe.exec(e))!==null&&r!==void 0?r:[];return new Mn(parseFloat(n),a??"")}constructor(e,r){this.num=e,this.unit=r,this.num=e,this.unit=r,ca(e)&&(this.unit=""),r!==""&&!Lxe.test(r)&&(this.num=NaN,this.unit=""),Ixe.includes(r)&&(this.num=Bxe(e,r),this.unit="px")}add(e){return this.unit!==e.unit?new Mn(NaN,""):new Mn(this.num+e.num,this.unit)}subtract(e){return this.unit!==e.unit?new Mn(NaN,""):new Mn(this.num-e.num,this.unit)}multiply(e){return this.unit!==""&&e.unit!==""&&this.unit!==e.unit?new Mn(NaN,""):new Mn(this.num*e.num,this.unit||e.unit)}divide(e){return this.unit!==""&&e.unit!==""&&this.unit!==e.unit?new Mn(NaN,""):new Mn(this.num/e.num,this.unit||e.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return ca(this.num)}}function fI(t){if(t.includes(td))return td;for(var e=t;e.includes("*")||e.includes("/");){var r,[,n,a,s]=(r=IO.exec(e))!==null&&r!==void 0?r:[],o=Mn.parse(n??""),l=Mn.parse(s??""),c=a==="*"?o.multiply(l):o.divide(l);if(c.isNaN())return td;e=e.replace(IO,c.toString())}for(;e.includes("+")||/.-\d+(?:\.\d+)?/.test(e);){var u,[,h,p,m]=(u=BO.exec(e))!==null&&u!==void 0?u:[],x=Mn.parse(h??""),y=Mn.parse(m??""),b=p==="+"?x.add(y):x.subtract(y);if(b.isNaN())return td;e=e.replace(BO,b.toString())}return e}var FO=/\(([^()]*)\)/;function Fxe(t){for(var e=t,r;(r=FO.exec(e))!=null;){var[,n]=r;e=e.replace(FO,fI(n))}return e}function Hxe(t){var e=t.replace(/\s+/g,"");return e=Fxe(e),e=fI(e),e}function $xe(t){try{return Hxe(t)}catch{return td}}function m2(t){var e=$xe(t.slice(5,-1));return e===td?"":e}var Yxe=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],Uxe=["dx","dy","angle","className","breakAll"];function u4(){return u4=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},u4.apply(null,arguments)}function HO(t,e){if(t==null)return{};var r,n,a=Wxe(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(n=0;n<s.length;n++)r=s[n],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(a[r]=t[r])}return a}function Wxe(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.indexOf(n)!==-1)continue;r[n]=t[n]}return r}var pI=/[ \f\n\r\t\v\u2028\u2029]+/,mI=t=>{var{children:e,breakAll:r,style:n}=t;try{var a=[];Ar(e)||(r?a=e.toString().split(""):a=e.toString().split(pI));var s=a.map(l=>({word:l,width:Kh(l,n).width})),o=r?0:Kh(" ",n).width;return{wordsWithComputedWidth:s,spaceWidth:o}}catch{return null}},Xxe=(t,e,r,n,a)=>{var{maxLines:s,children:o,style:l,breakAll:c}=t,u=Oe(s),h=o,p=function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return R.reduce((z,B)=>{var{word:Y,width:X}=B,H=z[z.length-1];if(H&&(n==null||a||H.width+X+r<Number(n)))H.words.push(Y),H.width+=X+r;else{var W={words:[Y],width:X};z.push(W)}return z},[])},m=p(e),x=P=>P.reduce((R,z)=>R.width>z.width?R:z);if(!u||a)return m;var y=m.length>s||x(m).width>Number(n);if(!y)return m;for(var b="…",w=P=>{var R=h.slice(0,P),z=mI({breakAll:c,style:l,children:R+b}).wordsWithComputedWidth,B=p(z),Y=B.length>s||x(B).width>Number(n);return[Y,B]},N=0,A=h.length-1,S=0,C;N<=A&&S<=h.length-1;){var k=Math.floor((N+A)/2),T=k-1,[E,_]=w(T),[L]=w(k);if(!E&&!L&&(N=k+1),E&&L&&(A=k-1),!E&&L){C=_;break}S++}return C||m},$O=t=>{var e=Ar(t)?[]:t.toString().split(pI);return[{words:e}]},Vxe=t=>{var{width:e,scaleToFit:r,children:n,style:a,breakAll:s,maxLines:o}=t;if((e||r)&&!op.isSsr){var l,c,u=mI({breakAll:s,children:n,style:a});if(u){var{wordsWithComputedWidth:h,spaceWidth:p}=u;l=h,c=p}else return $O(n);return Xxe({breakAll:s,children:n,maxLines:o,style:a},l,c,e,r)}return $O(n)},YO="#808080",r3=O.forwardRef((t,e)=>{var{x:r=0,y:n=0,lineHeight:a="1em",capHeight:s="0.71em",scaleToFit:o=!1,textAnchor:l="start",verticalAnchor:c="end",fill:u=YO}=t,h=HO(t,Yxe),p=O.useMemo(()=>Vxe({breakAll:h.breakAll,children:h.children,maxLines:h.maxLines,scaleToFit:o,style:h.style,width:h.width}),[h.breakAll,h.children,h.maxLines,o,h.style,h.width]),{dx:m,dy:x,angle:y,className:b,breakAll:w}=h,N=HO(h,Uxe);if(!Es(r)||!Es(n))return null;var A=r+(Oe(m)?m:0),S=n+(Oe(x)?x:0),C;switch(c){case"start":C=m2("calc(".concat(s,")"));break;case"middle":C=m2("calc(".concat((p.length-1)/2," * -").concat(a," + (").concat(s," / 2))"));break;default:C=m2("calc(".concat(p.length-1," * -").concat(a,")"));break}var k=[];if(o){var T=p[0].width,{width:E}=h;k.push("scale(".concat(Oe(E)?E/T:1,")"))}return y&&k.push("rotate(".concat(y,", ").concat(A,", ").concat(S,")")),k.length&&(N.transform=k.join(" ")),O.createElement("text",u4({},zr(N,!0),{ref:e,x:A,y:S,className:Ge("recharts-text",b),textAnchor:l,fill:u.includes("url")?YO:u}),p.map((_,L)=>{var P=_.words.join(w?"":" ");return O.createElement("tspan",{x:A,dy:L===0?C:a,key:"".concat(P,"-").concat(L)},P)}))});r3.displayName="Text";var qxe=["offset"],Gxe=["labelRef"];function UO(t,e){if(t==null)return{};var r,n,a=Kxe(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(n=0;n<s.length;n++)r=s[n],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(a[r]=t[r])}return a}function Kxe(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.indexOf(n)!==-1)continue;r[n]=t[n]}return r}function WO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function nr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?WO(Object(r),!0).forEach(function(n){Zxe(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):WO(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Zxe(t,e,r){return(e=Qxe(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Qxe(t){var e=Jxe(t,"string");return typeof e=="symbol"?e:e+""}function Jxe(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function oi(){return oi=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},oi.apply(null,arguments)}var e0e=t=>{var{value:e,formatter:r}=t,n=Ar(t.children)?e:t.children;return typeof r=="function"?r(n):n},n3=t=>t!=null&&typeof t=="function",t0e=(t,e)=>{var r=Pn(e-t),n=Math.min(Math.abs(e-t),360);return r*n},r0e=(t,e,r,n)=>{var{position:a,offset:s,className:o}=t,{cx:l,cy:c,innerRadius:u,outerRadius:h,startAngle:p,endAngle:m,clockWise:x}=n,y=(u+h)/2,b=t0e(p,m),w=b>=0?1:-1,N,A;a==="insideStart"?(N=p+w*s,A=x):a==="insideEnd"?(N=m-w*s,A=!x):a==="end"&&(N=m+w*s,A=x),A=b<=0?A:!A;var S=Kr(l,c,y,N),C=Kr(l,c,y,N+(A?1:-1)*359),k="M".concat(S.x,",").concat(S.y,`
A`).concat(y,",").concat(y,",0,1,").concat(A?0:1,`,
`).concat(C.x,",").concat(C.y),T=Ar(t.id)?vf("recharts-radial-line-"):t.id;return O.createElement("text",oi({},r,{dominantBaseline:"central",className:Ge("recharts-radial-bar-label",o)}),O.createElement("defs",null,O.createElement("path",{id:T,d:k})),O.createElement("textPath",{xlinkHref:"#".concat(T)},e))},n0e=(t,e,r)=>{var{cx:n,cy:a,innerRadius:s,outerRadius:o,startAngle:l,endAngle:c}=t,u=(l+c)/2;if(r==="outside"){var{x:h,y:p}=Kr(n,a,o+e,u);return{x:h,y:p,textAnchor:h>=n?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:n,y:a,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:n,y:a,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:n,y:a,textAnchor:"middle",verticalAnchor:"end"};var m=(s+o)/2,{x,y}=Kr(n,a,m,u);return{x,y,textAnchor:"middle",verticalAnchor:"middle"}},a0e=(t,e)=>{var{parentViewBox:r,offset:n,position:a}=t,{x:s,y:o,width:l,height:c}=e,u=c>=0?1:-1,h=u*n,p=u>0?"end":"start",m=u>0?"start":"end",x=l>=0?1:-1,y=x*n,b=x>0?"end":"start",w=x>0?"start":"end";if(a==="top"){var N={x:s+l/2,y:o-u*n,textAnchor:"middle",verticalAnchor:p};return nr(nr({},N),r?{height:Math.max(o-r.y,0),width:l}:{})}if(a==="bottom"){var A={x:s+l/2,y:o+c+h,textAnchor:"middle",verticalAnchor:m};return nr(nr({},A),r?{height:Math.max(r.y+r.height-(o+c),0),width:l}:{})}if(a==="left"){var S={x:s-y,y:o+c/2,textAnchor:b,verticalAnchor:"middle"};return nr(nr({},S),r?{width:Math.max(S.x-r.x,0),height:c}:{})}if(a==="right"){var C={x:s+l+y,y:o+c/2,textAnchor:w,verticalAnchor:"middle"};return nr(nr({},C),r?{width:Math.max(r.x+r.width-C.x,0),height:c}:{})}var k=r?{width:l,height:c}:{};return a==="insideLeft"?nr({x:s+y,y:o+c/2,textAnchor:w,verticalAnchor:"middle"},k):a==="insideRight"?nr({x:s+l-y,y:o+c/2,textAnchor:b,verticalAnchor:"middle"},k):a==="insideTop"?nr({x:s+l/2,y:o+h,textAnchor:"middle",verticalAnchor:m},k):a==="insideBottom"?nr({x:s+l/2,y:o+c-h,textAnchor:"middle",verticalAnchor:p},k):a==="insideTopLeft"?nr({x:s+y,y:o+h,textAnchor:w,verticalAnchor:m},k):a==="insideTopRight"?nr({x:s+l-y,y:o+h,textAnchor:b,verticalAnchor:m},k):a==="insideBottomLeft"?nr({x:s+y,y:o+c-h,textAnchor:w,verticalAnchor:p},k):a==="insideBottomRight"?nr({x:s+l-y,y:o+c-h,textAnchor:b,verticalAnchor:p},k):a&&typeof a=="object"&&(Oe(a.x)||Nl(a.x))&&(Oe(a.y)||Nl(a.y))?nr({x:s+rs(a.x,l),y:o+rs(a.y,c),textAnchor:"end",verticalAnchor:"end"},k):nr({x:s+l/2,y:o+c/2,textAnchor:"middle",verticalAnchor:"middle"},k)},s0e=t=>"cx"in t&&Oe(t.cx);function ea(t){var{offset:e=5}=t,r=UO(t,qxe),n=nr({offset:e},r),{viewBox:a,position:s,value:o,children:l,content:c,className:u="",textBreakAll:h,labelRef:p}=n,m=Be(ez),x=rS(),y=s==="center"?x:m??x,b=a||y;if(!b||Ar(o)&&Ar(l)&&!O.isValidElement(c)&&typeof c!="function")return null;var w=nr(nr({},n),{},{viewBox:b});if(O.isValidElement(c)){var{labelRef:N}=w,A=UO(w,Gxe);return O.cloneElement(c,A)}var S;if(typeof c=="function"){if(S=O.createElement(c,w),O.isValidElement(S))return S}else S=e0e(n);var C=s0e(b),k=zr(n,!0);if(C&&(s==="insideStart"||s==="insideEnd"||s==="end"))return r0e(n,S,k,b);var T=C?n0e(b,n.offset,n.position):a0e(n,b);return O.createElement(r3,oi({ref:p,className:Ge("recharts-label",u)},k,T,{breakAll:h}),S)}ea.displayName="Label";var gI=t=>{var{cx:e,cy:r,angle:n,startAngle:a,endAngle:s,r:o,radius:l,innerRadius:c,outerRadius:u,x:h,y:p,top:m,left:x,width:y,height:b,clockWise:w,labelViewBox:N}=t;if(N)return N;if(Oe(y)&&Oe(b)){if(Oe(h)&&Oe(p))return{x:h,y:p,width:y,height:b};if(Oe(m)&&Oe(x))return{x:m,y:x,width:y,height:b}}if(Oe(h)&&Oe(p))return{x:h,y:p,width:0,height:0};if(Oe(e)&&Oe(r))return{cx:e,cy:r,startAngle:a||n||0,endAngle:s||n||0,innerRadius:c||0,outerRadius:u||l||o||0,clockWise:w};if(t.viewBox)return t.viewBox},i0e=(t,e,r)=>{if(!t)return null;var n={viewBox:e,labelRef:r};return t===!0?O.createElement(ea,oi({key:"label-implicit"},n)):Es(t)?O.createElement(ea,oi({key:"label-implicit",value:t},n)):O.isValidElement(t)?t.type===ea?O.cloneElement(t,nr({key:"label-implicit"},n)):O.createElement(ea,oi({key:"label-implicit",content:t},n)):n3(t)?O.createElement(ea,oi({key:"label-implicit",content:t},n)):t&&typeof t=="object"?O.createElement(ea,oi({},t,{key:"label-implicit"},n)):null},o0e=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{children:a,labelRef:s}=e,o=gI(e),l=YN(a,ea).map((u,h)=>O.cloneElement(u,{viewBox:r||o,key:"label-".concat(h)}));if(!n)return l;var c=i0e(e.label,r||o,s);return[c,...l]};ea.parseViewBox=gI;ea.renderCallByParent=o0e;var g2={},x2={},XO;function l0e(){return XO||(XO=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r){return r[r.length-1]}t.last=e}(x2)),x2}var b2={},VO;function c0e(){return VO||(VO=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r){return Array.isArray(r)?r:Array.from(r)}t.toArray=e}(b2)),b2}var qO;function d0e(){return qO||(qO=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=l0e(),r=c0e(),n=VN();function a(s){if(n.isArrayLike(s))return e.last(r.toArray(s))}t.last=a}(g2)),g2}var y2,GO;function u0e(){return GO||(GO=1,y2=d0e().last),y2}var h0e=u0e();const f0e=ns(h0e);var p0e=["valueAccessor"],m0e=["data","dataKey","clockWise","id","textBreakAll"];function r0(){return r0=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},r0.apply(null,arguments)}function KO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function ZO(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?KO(Object(r),!0).forEach(function(n){g0e(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):KO(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function g0e(t,e,r){return(e=x0e(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function x0e(t){var e=b0e(t,"string");return typeof e=="symbol"?e:e+""}function b0e(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function QO(t,e){if(t==null)return{};var r,n,a=y0e(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(n=0;n<s.length;n++)r=s[n],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(a[r]=t[r])}return a}function y0e(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.indexOf(n)!==-1)continue;r[n]=t[n]}return r}var v0e=t=>Array.isArray(t.value)?f0e(t.value):t.value;function Ll(t){var{valueAccessor:e=v0e}=t,r=QO(t,p0e),{data:n,dataKey:a,clockWise:s,id:o,textBreakAll:l}=r,c=QO(r,m0e);return!n||!n.length?null:O.createElement(So,{className:"recharts-label-list"},n.map((u,h)=>{var p=Ar(a)?e(u,h):bn(u&&u.payload,a),m=Ar(o)?{}:{id:"".concat(o,"-").concat(h)};return O.createElement(ea,r0({},zr(u,!0),c,m,{parentViewBox:u.parentViewBox,value:p,textBreakAll:l,viewBox:ea.parseViewBox(Ar(s)?u:ZO(ZO({},u),{},{clockWise:s})),key:"label-".concat(h),index:h}))}))}Ll.displayName="LabelList";function w0e(t,e){return t?t===!0?O.createElement(Ll,{key:"labelList-implicit",data:e}):O.isValidElement(t)||n3(t)?O.createElement(Ll,{key:"labelList-implicit",data:e,content:t}):typeof t=="object"?O.createElement(Ll,r0({data:e},t,{key:"labelList-implicit"})):null:null}function j0e(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var{children:n}=t,a=YN(n,Ll).map((o,l)=>O.cloneElement(o,{data:e,key:"labelList-".concat(l)}));if(!r)return a;var s=w0e(t.label,e);return[s,...a]}Ll.renderCallByParent=j0e;var N0e={radiusAxis:{},angleAxis:{}},xI=$t({name:"polarAxis",initialState:N0e,reducers:{addRadiusAxis(t,e){t.radiusAxis[e.payload.id]=e.payload},removeRadiusAxis(t,e){delete t.radiusAxis[e.payload.id]},addAngleAxis(t,e){t.angleAxis[e.payload.id]=e.payload},removeAngleAxis(t,e){delete t.angleAxis[e.payload.id]}}}),{addRadiusAxis:Dwe,removeRadiusAxis:Twe,addAngleAxis:Mwe,removeAngleAxis:Ewe}=xI.actions,S0e=xI.reducer,v2={},JO;function A0e(){return JO||(JO=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r){if(typeof r!="object"||r==null)return!1;if(Object.getPrototypeOf(r)===null)return!0;if(Object.prototype.toString.call(r)!=="[object Object]"){const a=r[Symbol.toStringTag];return a==null||!Object.getOwnPropertyDescriptor(r,Symbol.toStringTag)?.writable?!1:r.toString()===`[object ${a}]`}let n=r;for(;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(r)===n}t.isPlainObject=e}(v2)),v2}var w2,eP;function C0e(){return eP||(eP=1,w2=A0e().isPlainObject),w2}var k0e=C0e();const D0e=ns(k0e);function n0(){return n0=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},n0.apply(null,arguments)}var tP=(t,e,r,n,a)=>{var s=r-n,o;return o="M ".concat(t,",").concat(e),o+="L ".concat(t+r,",").concat(e),o+="L ".concat(t+r-s/2,",").concat(e+a),o+="L ".concat(t+r-s/2-n,",").concat(e+a),o+="L ".concat(t,",").concat(e," Z"),o},T0e={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},M0e=t=>{var e=To(t,T0e),r=O.useRef(),[n,a]=O.useState(-1);O.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var w=r.current.getTotalLength();w&&a(w)}catch{}},[]);var{x:s,y:o,upperWidth:l,lowerWidth:c,height:u,className:h}=e,{animationEasing:p,animationDuration:m,animationBegin:x,isUpdateAnimationActive:y}=e;if(s!==+s||o!==+o||l!==+l||c!==+c||u!==+u||l===0&&c===0||u===0)return null;var b=Ge("recharts-trapezoid",h);return y?O.createElement(Hx,{canBegin:n>0,from:{upperWidth:0,lowerWidth:0,height:u,x:s,y:o},to:{upperWidth:l,lowerWidth:c,height:u,x:s,y:o},duration:m,animationEasing:p,isActive:y},w=>{var{upperWidth:N,lowerWidth:A,height:S,x:C,y:k}=w;return O.createElement(Hx,{canBegin:n>0,from:"0px ".concat(n===-1?1:n,"px"),to:"".concat(n,"px 0px"),attributeName:"strokeDasharray",begin:x,duration:m,easing:p},O.createElement("path",n0({},zr(e,!0),{className:b,d:tP(C,k,N,A,S),ref:r})))}):O.createElement("g",null,O.createElement("path",n0({},zr(e,!0),{className:b,d:tP(s,o,l,c,u)})))},E0e=["option","shapeType","propTransformer","activeClassName","isActive"];function O0e(t,e){if(t==null)return{};var r,n,a=P0e(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(n=0;n<s.length;n++)r=s[n],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(a[r]=t[r])}return a}function P0e(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.indexOf(n)!==-1)continue;r[n]=t[n]}return r}function rP(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function a0(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?rP(Object(r),!0).forEach(function(n){_0e(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):rP(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function _0e(t,e,r){return(e=R0e(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function R0e(t){var e=L0e(t,"string");return typeof e=="symbol"?e:e+""}function L0e(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function z0e(t,e){return a0(a0({},e),t)}function I0e(t,e){return t==="symbols"}function nP(t){var{shapeType:e,elementProps:r}=t;switch(e){case"rectangle":return O.createElement(q9,r);case"trapezoid":return O.createElement(M0e,r);case"sector":return O.createElement(Z9,r);case"symbols":if(I0e(e))return O.createElement(v9,r);break;default:return null}}function B0e(t){return O.isValidElement(t)?t.props:t}function F0e(t){var{option:e,shapeType:r,propTransformer:n=z0e,activeClassName:a="recharts-active-shape",isActive:s}=t,o=O0e(t,E0e),l;if(O.isValidElement(e))l=O.cloneElement(e,a0(a0({},o),B0e(e)));else if(typeof e=="function")l=e(o);else if(D0e(e)&&typeof e!="boolean"){var c=n(e,o);l=O.createElement(nP,{shapeType:r,elementProps:c})}else{var u=o;l=O.createElement(nP,{shapeType:r,elementProps:u})}return s?O.createElement(So,{className:a},l):l}var bI=(t,e)=>{var r=Ir();return(n,a)=>s=>{t?.(n,a,s),r(Hz({activeIndex:String(a),activeDataKey:e,activeCoordinate:n.tooltipPosition}))}},yI=t=>{var e=Ir();return(r,n)=>a=>{t?.(r,n,a),e($me())}},vI=(t,e)=>{var r=Ir();return(n,a)=>s=>{t?.(n,a,s),r(Yme({activeIndex:String(a),activeDataKey:e,activeCoordinate:n.tooltipPosition}))}};function H0e(t){var{fn:e,args:r}=t,n=Ir(),a=$a();return O.useEffect(()=>{if(!a){var s=e(r);return n(Bme(s)),()=>{n(Fme(s))}}},[e,r,n,a]),null}var $0e=()=>{};function Y0e(t){var{legendPayload:e}=t,r=Ir(),n=$a();return O.useEffect(()=>n?$0e:(r(Tde(e)),()=>{r(Mde(e))}),[r,n,e]),null}function U0e(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=O.useRef(vf(e)),n=O.useRef(t);return n.current!==t&&(r.current=vf(e),n.current=t),r.current}var j2,W0e=()=>{var[t]=O.useState(()=>vf("uid-"));return t},X0e=(j2=A2.useId)!==null&&j2!==void 0?j2:W0e;function V0e(t,e){var r=X0e();return e||(t?"".concat(t,"-").concat(r):r)}var q0e=O.createContext(void 0),G0e=t=>{var{id:e,type:r,children:n}=t,a=V0e("recharts-".concat(r),e);return O.createElement(q0e.Provider,{value:a},n(a))},K0e={cartesianItems:[],polarItems:[]},wI=$t({name:"graphicalItems",initialState:K0e,reducers:{addCartesianGraphicalItem(t,e){t.cartesianItems.push(e.payload)},replaceCartesianGraphicalItem(t,e){var{prev:r,next:n}=e.payload,a=pi(t).cartesianItems.indexOf(r);a>-1&&(t.cartesianItems[a]=n)},removeCartesianGraphicalItem(t,e){var r=pi(t).cartesianItems.indexOf(e.payload);r>-1&&t.cartesianItems.splice(r,1)},addPolarGraphicalItem(t,e){t.polarItems.push(e.payload)},removePolarGraphicalItem(t,e){var r=pi(t).polarItems.indexOf(e.payload);r>-1&&t.polarItems.splice(r,1)}}}),{addCartesianGraphicalItem:Z0e,replaceCartesianGraphicalItem:Q0e,removeCartesianGraphicalItem:J0e,addPolarGraphicalItem:Owe,removePolarGraphicalItem:Pwe}=wI.actions,ebe=wI.reducer;function tbe(t){var e=Ir(),r=O.useRef(null);return O.useEffect(()=>{r.current===null?e(Z0e(t)):r.current!==t&&e(Q0e({prev:r.current,next:t})),r.current=t},[e,t]),O.useEffect(()=>()=>{r.current&&(e(J0e(r.current)),r.current=null)},[e]),null}function rbe(){}var nbe={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},aP={t:0},N2={t:1};function abe(t){var e=To(t,nbe),{isActive:r,canBegin:n,duration:a,easing:s,begin:o,onAnimationEnd:l,onAnimationStart:c,children:u}=e,h=V9("JavascriptAnimate",e.animationManager),[p,m]=O.useState(r?aP:N2),x=O.useRef(null);return O.useEffect(()=>{r||m(N2)},[r]),O.useEffect(()=>{if(!r||!n)return rbe;var y=X9(aP,N2,U9(s),a,m,h.getTimeoutController()),b=()=>{x.current=y()};return h.start([c,o,b,a,l]),()=>{h.stop(),x.current&&x.current(),l()}},[r,n,a,s,o,c,l,h]),u(p.t)}var sbe=de([Br],t=>{if(t)return{top:t.top,bottom:t.bottom,left:t.left,right:t.right}}),ibe=de([sbe,Ai,Ci],(t,e,r)=>{if(!(!t||e==null||r==null))return{x:t.left,y:t.top,width:Math.max(0,e-t.left-t.right),height:Math.max(0,r-t.top-t.bottom)}}),jI=()=>Be(ibe),obe="Invariant failed";function lbe(t,e){throw new Error(obe)}var cbe=["x","y"];function h4(){return h4=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},h4.apply(null,arguments)}function sP(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function vh(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?sP(Object(r),!0).forEach(function(n){dbe(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):sP(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function dbe(t,e,r){return(e=ube(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ube(t){var e=hbe(t,"string");return typeof e=="symbol"?e:e+""}function hbe(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function fbe(t,e){if(t==null)return{};var r,n,a=pbe(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(n=0;n<s.length;n++)r=s[n],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(a[r]=t[r])}return a}function pbe(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.indexOf(n)!==-1)continue;r[n]=t[n]}return r}function mbe(t,e){var{x:r,y:n}=t,a=fbe(t,cbe),s="".concat(r),o=parseInt(s,10),l="".concat(n),c=parseInt(l,10),u="".concat(e.height||a.height),h=parseInt(u,10),p="".concat(e.width||a.width),m=parseInt(p,10);return vh(vh(vh(vh(vh({},e),a),o?{x:o}:{}),c?{y:c}:{}),{},{height:h,width:m,name:e.name,radius:e.radius})}function NI(t){return O.createElement(F0e,h4({shapeType:"rectangle",propTransformer:mbe,activeClassName:"recharts-active-bar"},t))}var gbe=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(n,a)=>{if(Oe(e))return e;var s=Oe(n)||Ar(n);return s?e(n,a):(s||lbe(),r)}},xbe={},SI=$t({name:"errorBars",initialState:xbe,reducers:{addErrorBar:(t,e)=>{var{itemId:r,errorBar:n}=e.payload;t[r]||(t[r]=[]),t[r].push(n)},removeErrorBar:(t,e)=>{var{itemId:r,errorBar:n}=e.payload;t[r]&&(t[r]=t[r].filter(a=>a.dataKey!==n.dataKey||a.direction!==n.direction))}}}),{addErrorBar:_we,removeErrorBar:Rwe}=SI.actions,bbe=SI.reducer,ybe=["children"];function vbe(t,e){if(t==null)return{};var r,n,a=wbe(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(n=0;n<s.length;n++)r=s[n],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(a[r]=t[r])}return a}function wbe(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.indexOf(n)!==-1)continue;r[n]=t[n]}return r}var jbe={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},Nbe=O.createContext(jbe);function Sbe(t){var{children:e}=t,r=vbe(t,ybe);return O.createElement(Nbe.Provider,{value:r},e)}function AI(t,e){var r,n,a=Be(u=>Di(u,t)),s=Be(u=>Po(u,e)),o=(r=a?.allowDataOverflow)!==null&&r!==void 0?r:Zn.allowDataOverflow,l=(n=s?.allowDataOverflow)!==null&&n!==void 0?n:Qn.allowDataOverflow,c=o||l;return{needClip:c,needClipX:o,needClipY:l}}function Abe(t){var{xAxisId:e,yAxisId:r,clipPathId:n}=t,a=jI(),{needClipX:s,needClipY:o,needClip:l}=AI(e,r);if(!l)return null;var{x:c,y:u,width:h,height:p}=a;return O.createElement("clipPath",{id:"clipPath-".concat(n)},O.createElement("rect",{x:s?c:c-h/2,y:o?u:u-p/2,width:s?h:h*2,height:o?p:p*2}))}var Cbe=["onMouseEnter","onMouseLeave","onClick"],kbe=["value","background","tooltipPosition"],Dbe=["id"],Tbe=["onMouseEnter","onClick","onMouseLeave"];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)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Td.apply(null,arguments)}function iP(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function on(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?iP(Object(r),!0).forEach(function(n){Mbe(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):iP(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Mbe(t,e,r){return(e=Ebe(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ebe(t){var e=Obe(t,"string");return typeof e=="symbol"?e:e+""}function Obe(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function s0(t,e){if(t==null)return{};var r,n,a=Pbe(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(n=0;n<s.length;n++)r=s[n],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(a[r]=t[r])}return a}function Pbe(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.indexOf(n)!==-1)continue;r[n]=t[n]}return r}var _be=t=>{var{dataKey:e,name:r,fill:n,legendType:a,hide:s}=t;return[{inactive:s,dataKey:e,type:a,color:n,value:_9(r,e),payload:t}]};function Rbe(t){var{dataKey:e,stroke:r,strokeWidth:n,fill:a,name:s,hide:o,unit:l}=t;return{dataDefinedOnItem:void 0,positions:void 0,settings:{stroke:r,strokeWidth:n,fill:a,dataKey:e,nameKey:void 0,name:_9(s,e),hide:o,type:t.tooltipType,color:t.fill,unit:l}}}function Lbe(t){var e=Be(Dd),{data:r,dataKey:n,background:a,allOtherBarProps:s}=t,{onMouseEnter:o,onMouseLeave:l,onClick:c}=s,u=s0(s,Cbe),h=bI(o,n),p=yI(l),m=vI(c,n);if(!a||r==null)return null;var x=zr(a,!1);return O.createElement(O.Fragment,null,r.map((y,b)=>{var{value:w,background:N,tooltipPosition:A}=y,S=s0(y,kbe);if(!N)return null;var C=h(y,b),k=p(y,b),T=m(y,b),E=on(on(on(on(on({option:a,isActive:String(b)===e},S),{},{fill:"#eee"},N),x),$N(u,y,b)),{},{onMouseEnter:C,onMouseLeave:k,onClick:T,dataKey:n,index:b,className:"recharts-bar-background-rectangle"});return O.createElement(NI,Td({key:"background-bar-".concat(b)},E))}))}function CI(t){var{data:e,props:r,showLabels:n}=t,a=ip(r),{id:s}=a,o=s0(a,Dbe),{shape:l,dataKey:c,activeBar:u}=r,h=Be(Dd),p=Be(eI),{onMouseEnter:m,onClick:x,onMouseLeave:y}=r,b=s0(r,Tbe),w=bI(m,c),N=yI(y),A=vI(x,c);return e?O.createElement(O.Fragment,null,e.map((S,C)=>{var k=u&&String(C)===h&&(p==null||c===p),T=k?u:l,E=on(on(on({},o),S),{},{isActive:k,option:T,index:C,dataKey:c});return O.createElement(So,Td({className:"recharts-bar-rectangle"},$N(b,S,C),{onMouseEnter:w(S,C),onMouseLeave:N(S,C),onClick:A(S,C),key:"rectangle-".concat(S?.x,"-").concat(S?.y,"-").concat(S?.value,"-").concat(C)}),O.createElement(NI,E))}),n&&Ll.renderCallByParent(r,e)):null}function zbe(t){var{props:e,previousRectanglesRef:r}=t,{data:n,layout:a,isAnimationActive:s,animationBegin:o,animationDuration:l,animationEasing:c,onAnimationEnd:u,onAnimationStart:h}=e,p=r.current,m=U0e(e,"recharts-bar-"),[x,y]=O.useState(!1),b=O.useCallback(()=>{typeof u=="function"&&u(),y(!1)},[u]),w=O.useCallback(()=>{typeof h=="function"&&h(),y(!0)},[h]);return O.createElement(abe,{begin:o,duration:l,isActive:s,easing:c,onAnimationEnd:b,onAnimationStart:w,key:m},N=>{var A=N===1?n:n?.map((S,C)=>{var k=p&&p[C];if(k)return on(on({},S),{},{x:Qc(k.x,S.x,N),y:Qc(k.y,S.y,N),width:Qc(k.width,S.width,N),height:Qc(k.height,S.height,N)});if(a==="horizontal"){var T=Qc(0,S.height,N);return on(on({},S),{},{y:S.y+S.height-T,height:T})}var E=Qc(0,S.width,N);return on(on({},S),{},{width:E})});return N>0&&(r.current=A??null),A==null?null:O.createElement(So,null,O.createElement(CI,{props:e,data:A,showLabels:!x}))})}function Ibe(t){var{data:e,isAnimationActive:r}=t,n=O.useRef(null);return r&&e&&e.length&&(n.current==null||n.current!==e)?O.createElement(zbe,{previousRectanglesRef:n,props:t}):O.createElement(CI,{props:t,data:e,showLabels:!0})}var kI=0,Bbe=(t,e)=>{var r=Array.isArray(t.value)?t.value[1]:t.value;return{x:t.x,y:t.y,value:r,errorVal:bn(t,e)}};class Fbe extends O.PureComponent{render(){var{hide:e,data:r,dataKey:n,className:a,xAxisId:s,yAxisId:o,needClip:l,background:c,id:u}=this.props;if(e)return null;var h=Ge("recharts-bar",a),p=u;return O.createElement(So,{className:h,id:u},l&&O.createElement("defs",null,O.createElement(Abe,{clipPathId:p,xAxisId:s,yAxisId:o})),O.createElement(So,{className:"recharts-bar-rectangles",clipPath:l?"url(#clipPath-".concat(p,")"):void 0},O.createElement(Lbe,{data:r,dataKey:n,background:c,allOtherBarProps:this.props}),O.createElement(Ibe,this.props)),this.props.children)}}var Hbe={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",hide:!1,isAnimationActive:!op.isSsr,legendType:"rect",minPointSize:kI,xAxisId:0,yAxisId:0};function $be(t){var{xAxisId:e,yAxisId:r,hide:n,legendType:a,minPointSize:s,activeBar:o,animationBegin:l,animationDuration:c,animationEasing:u,isAnimationActive:h}=t,{needClip:p}=AI(e,r),m=nS(),x=$a(),y=YN(t.children,dI),b=Be(A=>mye(A,e,r,x,t.id,y));if(m!=="vertical"&&m!=="horizontal")return null;var w,N=b?.[0];return N==null||N.height==null||N.width==null?w=0:w=m==="vertical"?N.height/2:N.width/2,O.createElement(Sbe,{xAxisId:e,yAxisId:r,data:b,dataPointFormatter:Bbe,errorBarOffset:w},O.createElement(Fbe,Td({},t,{layout:m,needClip:p,data:b,xAxisId:e,yAxisId:r,hide:n,legendType:a,minPointSize:s,activeBar:o,animationBegin:l,animationDuration:c,animationEasing:u,isAnimationActive:h})))}function Ybe(t){var{layout:e,barSettings:{dataKey:r,minPointSize:n},pos:a,bandSize:s,xAxis:o,yAxis:l,xAxisTicks:c,yAxisTicks:u,stackedData:h,displayedData:p,offset:m,cells:x}=t,y=e==="horizontal"?l:o,b=h?y.scale.domain():null,w=ude({numericAxis:y});return p.map((N,A)=>{var S,C,k,T,E,_;h?S=sde(h[A],b):(S=bn(N,r),Array.isArray(S)||(S=[w,S]));var L=gbe(n,kI)(S[1],A);if(e==="horizontal"){var P,[R,z]=[l.scale(S[0]),l.scale(S[1])];C=ZM({axis:o,ticks:c,bandSize:s,offset:a.offset,entry:N,index:A}),k=(P=z??R)!==null&&P!==void 0?P:void 0,T=a.size;var B=R-z;if(E=ca(B)?0:B,_={x:C,y:m.top,width:T,height:m.height},Math.abs(L)>0&&Math.abs(E)<Math.abs(L)){var Y=Pn(E||L)*(Math.abs(L)-Math.abs(E));k-=Y,E+=Y}}else{var[X,H]=[o.scale(S[0]),o.scale(S[1])];if(C=X,k=ZM({axis:l,ticks:u,bandSize:s,offset:a.offset,entry:N,index:A}),T=H-X,E=a.size,_={x:m.left,y:k,width:m.width,height:E},Math.abs(L)>0&&Math.abs(T)<Math.abs(L)){var W=Pn(T||L)*(Math.abs(L)-Math.abs(T));T+=W}}if(C==null||k==null||T==null||E==null)return null;var V=on(on({},N),{},{x:C,y:k,width:T,height:E,value:h?S:S[1],payload:N,background:_,tooltipPosition:{x:C+T/2,y:k+E/2}},x&&x[A]&&x[A].props);return V}).filter(Boolean)}function DI(t){var e=To(t,Hbe),r=$a();return O.createElement(G0e,{id:e.id,type:"bar"},n=>O.createElement(O.Fragment,null,O.createElement(Y0e,{legendPayload:_be(e)}),O.createElement(H0e,{fn:Rbe,args:e}),O.createElement(tbe,{type:"bar",id:n,data:void 0,xAxisId:e.xAxisId,yAxisId:e.yAxisId,zAxisId:0,dataKey:e.dataKey,stackId:dde(e.stackId),hide:e.hide,barSize:e.barSize,minPointSize:e.minPointSize,maxBarSize:e.maxBarSize,isPanorama:r}),O.createElement($be,Td({},e,{id:n}))))}DI.displayName="Bar";function oP(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function vg(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?oP(Object(r),!0).forEach(function(n){Ube(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):oP(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Ube(t,e,r){return(e=Wbe(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Wbe(t){var e=Xbe(t,"string");return typeof e=="symbol"?e:e+""}function Xbe(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Vbe=(t,e)=>e,qbe=(t,e,r)=>r,Gbe=(t,e,r,n)=>n,Kbe=(t,e,r,n,a)=>a,bp=de([BS,Kbe],(t,e)=>t.filter(r=>r.type==="bar").find(r=>r.id===e)),Zbe=de([bp],t=>t?.maxBarSize),Qbe=(t,e,r,n,a,s)=>s,lP=(t,e,r)=>{var n=r??t;if(!Ar(n))return rs(n,e,0)},Jbe=de([At,BS,Vbe,qbe,Gbe],(t,e,r,n,a)=>e.filter(s=>t==="horizontal"?s.xAxisId===r:s.yAxisId===n).filter(s=>s.isPanorama===a).filter(s=>s.hide===!1).filter(s=>s.type==="bar")),eye=(t,e,r,n)=>{var a=At(t);return a==="horizontal"?i4(t,"yAxis",r,n):i4(t,"xAxis",e,n)},tye=(t,e,r)=>{var n=At(t);return n==="horizontal"?mO(t,"xAxis",e):mO(t,"yAxis",r)},rye=(t,e,r)=>{var n={},a=t.filter(pb),s=t.filter(u=>u.stackId==null),o=a.reduce((u,h)=>(u[h.stackId]||(u[h.stackId]=[]),u[h.stackId].push(h),u),n),l=Object.entries(o).map(u=>{var[h,p]=u,m=p.map(y=>y.dataKey),x=lP(e,r,p[0].barSize);return{stackId:h,dataKeys:m,barSize:x}}),c=s.map(u=>{var h=[u.dataKey].filter(m=>m!=null),p=lP(e,r,u.barSize);return{stackId:void 0,dataKeys:h,barSize:p}});return[...l,...c]},nye=de([Jbe,Bpe,tye],rye),aye=(t,e,r,n,a)=>{var s,o,l=bp(t,e,r,n,a);if(l!=null){var c=At(t),u=V7(t),{maxBarSize:h}=l,p=Ar(h)?u:h,m,x;return c==="horizontal"?(m=kd(t,"xAxis",e,n),x=Cd(t,"xAxis",e,n)):(m=kd(t,"yAxis",r,n),x=Cd(t,"yAxis",r,n)),(s=(o=JN(m,x,!0))!==null&&o!==void 0?o:p)!==null&&s!==void 0?s:0}},TI=(t,e,r,n)=>{var a=At(t),s,o;return a==="horizontal"?(s=kd(t,"xAxis",e,n),o=Cd(t,"xAxis",e,n)):(s=kd(t,"yAxis",r,n),o=Cd(t,"yAxis",r,n)),JN(s,o)};function sye(t,e,r,n,a){var s=n.length;if(!(s<1)){var o=rs(t,r,0,!0),l,c=[];if(da(n[0].barSize)){var u=!1,h=r/s,p=n.reduce((N,A)=>N+(A.barSize||0),0);p+=(s-1)*o,p>=r&&(p-=(s-1)*o,o=0),p>=r&&h>0&&(u=!0,h*=.9,p=s*h);var m=(r-p)/2>>0,x={offset:m-o,size:0};l=n.reduce((N,A)=>{var S,C={stackId:A.stackId,dataKeys:A.dataKeys,position:{offset:x.offset+x.size+o,size:u?h:(S=A.barSize)!==null&&S!==void 0?S:0}},k=[...N,C];return x=k[k.length-1].position,k},c)}else{var y=rs(e,r,0,!0);r-2*y-(s-1)*o<=0&&(o=0);var b=(r-2*y-(s-1)*o)/s;b>1&&(b>>=0);var w=da(a)?Math.min(b,a):b;l=n.reduce((N,A,S)=>[...N,{stackId:A.stackId,dataKeys:A.dataKeys,position:{offset:y+(b+o)*S+(b-w)/2,size:w}}],c)}return l}}var iye=(t,e,r,n,a,s,o)=>{var l=Ar(o)?e:o,c=sye(r,n,a!==s?a:s,t,l);return a!==s&&c!=null&&(c=c.map(u=>vg(vg({},u),{},{position:vg(vg({},u.position),{},{offset:u.position.offset-a/2})}))),c},oye=de([nye,V7,Ipe,q7,aye,TI,Zbe],iye),lye=(t,e,r,n)=>kd(t,"xAxis",e,n),cye=(t,e,r,n)=>kd(t,"yAxis",r,n),dye=(t,e,r,n)=>Cd(t,"xAxis",e,n),uye=(t,e,r,n)=>Cd(t,"yAxis",r,n),hye=de([oye,bp],(t,e)=>{if(!(t==null||e==null)){var r=t.find(n=>n.stackId===e.stackId&&e.dataKey!=null&&n.dataKeys.includes(e.dataKey));if(r!=null)return r.position}}),fye=(t,e)=>{var r=zS(e);if(!(!t||r==null||e==null)){var{stackId:n}=e;if(n!=null){var a=t[n];if(a){var{stackedData:s}=a;if(s)return s.find(o=>o.key===r)}}}},pye=de([eye,bp],fye),mye=de([Br,lye,cye,dye,uye,hye,At,DS,TI,pye,bp,Qbe],(t,e,r,n,a,s,o,l,c,u,h,p)=>{var{chartData:m,dataStartIndex:x,dataEndIndex:y}=l;if(!(h==null||s==null||o!=="horizontal"&&o!=="vertical"||e==null||r==null||n==null||a==null||c==null)){var{data:b}=h,w;if(b!=null&&b.length>0?w=b:w=m?.slice(x,y+1),w!=null)return Ybe({layout:o,barSettings:h,pos:s,bandSize:c,xAxis:e,yAxis:r,xAxisTicks:n,yAxisTicks:a,stackedData:u,displayedData:w,offset:t,cells:p})}}),gye=t=>{var{chartData:e}=t,r=Ir(),n=$a();return O.useEffect(()=>n?()=>{}:(r(AO(e)),()=>{r(AO(void 0))}),[e,r,n]),null},cP={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},MI=$t({name:"brush",initialState:cP,reducers:{setBrushSettings(t,e){return e.payload==null?cP:e.payload}}}),{setBrushSettings:Lwe}=MI.actions,xye=MI.reducer;function bye(t,e,r){return(e=yye(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function yye(t){var e=vye(t,"string");return typeof e=="symbol"?e:e+""}function vye(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class a3{static create(e){return new a3(e)}constructor(e){this.scale=e}get domain(){return this.scale.domain}get range(){return this.scale.range}get rangeMin(){return this.range()[0]}get rangeMax(){return this.range()[1]}get bandwidth(){return this.scale.bandwidth}apply(e){var{bandAware:r,position:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e!==void 0){if(n)switch(n){case"start":return this.scale(e);case"middle":{var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+a}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(e)+s}default:return this.scale(e)}if(r){var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+o}return this.scale(e)}}isInRange(e){var r=this.range(),n=r[0],a=r[r.length-1];return n<=a?e>=n&&e<=a:e>=a&&e<=n}}bye(a3,"EPS",1e-4);function wye(t){return(t%180+180)%180}var jye=function(e){var{width:r,height:n}=e,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=wye(a),o=s*Math.PI/180,l=Math.atan(n/r),c=o>l&&o<Math.PI-l?n/Math.sin(o):r/Math.cos(o);return Math.abs(c)},Nye={dots:[],areas:[],lines:[]},EI=$t({name:"referenceElements",initialState:Nye,reducers:{addDot:(t,e)=>{t.dots.push(e.payload)},removeDot:(t,e)=>{var r=pi(t).dots.findIndex(n=>n===e.payload);r!==-1&&t.dots.splice(r,1)},addArea:(t,e)=>{t.areas.push(e.payload)},removeArea:(t,e)=>{var r=pi(t).areas.findIndex(n=>n===e.payload);r!==-1&&t.areas.splice(r,1)},addLine:(t,e)=>{t.lines.push(e.payload)},removeLine:(t,e)=>{var r=pi(t).lines.findIndex(n=>n===e.payload);r!==-1&&t.lines.splice(r,1)}}}),{addDot:zwe,removeDot:Iwe,addArea:Bwe,removeArea:Fwe,addLine:Hwe,removeLine:$we}=EI.actions,Sye=EI.reducer,Aye=O.createContext(void 0),Cye=t=>{var{children:e}=t,[r]=O.useState("".concat(vf("recharts"),"-clip")),n=jI();if(n==null)return null;var{x:a,y:s,width:o,height:l}=n;return O.createElement(Aye.Provider,{value:r},O.createElement("defs",null,O.createElement("clipPath",{id:r},O.createElement("rect",{x:a,y:s,height:l,width:o}))),e)};function S2(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 OI(t,e,r){if(e<1)return[];if(e===1&&r===void 0)return t;for(var n=[],a=0;a<t.length;a+=e)n.push(t[a]);return n}function kye(t,e,r){var n={width:t.width+e.width,height:t.height+e.height};return jye(n,r)}function Dye(t,e,r){var n=r==="width",{x:a,y:s,width:o,height:l}=t;return e===1?{start:n?a:s,end:n?a+o:s+l}:{start:n?a+o:s+l,end:n?a:s}}function i0(t,e,r,n,a){if(t*e<t*n||t*e>t*a)return!1;var s=r();return t*(e-t*s/2-n)>=0&&t*(e+t*s/2-a)<=0}function Tye(t,e){return OI(t,e+1)}function Mye(t,e,r,n,a){for(var s=(n||[]).slice(),{start:o,end:l}=e,c=0,u=1,h=o,p=function(){var y=n?.[c];if(y===void 0)return{v:OI(n,u)};var b=c,w,N=()=>(w===void 0&&(w=r(y,b)),w),A=y.coordinate,S=c===0||i0(t,A,N,h,l);S||(c=0,h=o,u+=1),S&&(h=A+t*(N()/2+a),c+=u)},m;u<=s.length;)if(m=p(),m)return m.v;return[]}function dP(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).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?dP(Object(r),!0).forEach(function(n){Eye(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):dP(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Eye(t,e,r){return(e=Oye(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Oye(t){var e=Pye(t,"string");return typeof e=="symbol"?e:e+""}function Pye(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function _ye(t,e,r,n,a){for(var s=(n||[]).slice(),o=s.length,{start:l}=e,{end:c}=e,u=function(m){var x=s[m],y,b=()=>(y===void 0&&(y=r(x,m)),y);if(m===o-1){var w=t*(x.coordinate+t*b()/2-c);s[m]=x=sn(sn({},x),{},{tickCoord:w>0?x.coordinate-w*t:x.coordinate})}else s[m]=x=sn(sn({},x),{},{tickCoord:x.coordinate});var N=i0(t,x.tickCoord,b,l,c);N&&(c=x.tickCoord-t*(b()/2+a),s[m]=sn(sn({},x),{},{isShow:!0}))},h=o-1;h>=0;h--)u(h);return s}function Rye(t,e,r,n,a,s){var o=(n||[]).slice(),l=o.length,{start:c,end:u}=e;if(s){var h=n[l-1],p=r(h,l-1),m=t*(h.coordinate+t*p/2-u);o[l-1]=h=sn(sn({},h),{},{tickCoord:m>0?h.coordinate-m*t:h.coordinate});var x=i0(t,h.tickCoord,()=>p,c,u);x&&(u=h.tickCoord-t*(p/2+a),o[l-1]=sn(sn({},h),{},{isShow:!0}))}for(var y=s?l-1:l,b=function(A){var S=o[A],C,k=()=>(C===void 0&&(C=r(S,A)),C);if(A===0){var T=t*(S.coordinate-t*k()/2-c);o[A]=S=sn(sn({},S),{},{tickCoord:T<0?S.coordinate-T*t:S.coordinate})}else o[A]=S=sn(sn({},S),{},{tickCoord:S.coordinate});var E=i0(t,S.tickCoord,k,c,u);E&&(c=S.tickCoord+t*(k()/2+a),o[A]=sn(sn({},S),{},{isShow:!0}))},w=0;w<y;w++)b(w);return o}function s3(t,e,r){var{tick:n,ticks:a,viewBox:s,minTickGap:o,orientation:l,interval:c,tickFormatter:u,unit:h,angle:p}=t;if(!a||!a.length||!n)return[];if(Oe(c)||op.isSsr){var m;return(m=Tye(a,Oe(c)?c:0))!==null&&m!==void 0?m:[]}var x=[],y=l==="top"||l==="bottom"?"width":"height",b=h&&y==="width"?Kh(h,{fontSize:e,letterSpacing:r}):{width:0,height:0},w=(S,C)=>{var k=typeof u=="function"?u(S.value,C):S.value;return y==="width"?kye(Kh(k,{fontSize:e,letterSpacing:r}),b,p):Kh(k,{fontSize:e,letterSpacing:r})[y]},N=a.length>=2?Pn(a[1].coordinate-a[0].coordinate):1,A=Dye(s,N,y);return c==="equidistantPreserveStart"?Mye(N,A,w,a,o):(c==="preserveStart"||c==="preserveStartEnd"?x=Rye(N,A,w,a,o,c==="preserveStartEnd"):x=_ye(N,A,w,a,o),x.filter(S=>S.isShow))}var Lye=["viewBox"],zye=["viewBox"];function rd(){return rd=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},rd.apply(null,arguments)}function uP(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function vr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?uP(Object(r),!0).forEach(function(n){i3(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):uP(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function hP(t,e){if(t==null)return{};var r,n,a=Iye(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(n=0;n<s.length;n++)r=s[n],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(a[r]=t[r])}return a}function Iye(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.indexOf(n)!==-1)continue;r[n]=t[n]}return r}function i3(t,e,r){return(e=Bye(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Bye(t){var e=Fye(t,"string");return typeof e=="symbol"?e:e+""}function Fye(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class _o extends O.Component{constructor(e){super(e),this.tickRefs=O.createRef(),this.tickRefs.current=[],this.state={fontSize:"",letterSpacing:""}}shouldComponentUpdate(e,r){var{viewBox:n}=e,a=hP(e,Lye),s=this.props,{viewBox:o}=s,l=hP(s,zye);return!S2(n,o)||!S2(a,l)||!S2(r,this.state)}getTickLineCoord(e){var{x:r,y:n,width:a,height:s,orientation:o,tickSize:l,mirror:c,tickMargin:u}=this.props,h,p,m,x,y,b,w=c?-1:1,N=e.tickSize||l,A=Oe(e.tickCoord)?e.tickCoord:e.coordinate;switch(o){case"top":h=p=e.coordinate,x=n+ +!c*s,m=x-w*N,b=m-w*u,y=A;break;case"left":m=x=e.coordinate,p=r+ +!c*a,h=p-w*N,y=h-w*u,b=A;break;case"right":m=x=e.coordinate,p=r+ +c*a,h=p+w*N,y=h+w*u,b=A;break;default:h=p=e.coordinate,x=n+ +c*s,m=x+w*N,b=m+w*u,y=A;break}return{line:{x1:h,y1:m,x2:p,y2:x},tick:{x:y,y:b}}}getTickTextAnchor(){var{orientation:e,mirror:r}=this.props,n;switch(e){case"left":n=r?"start":"end";break;case"right":n=r?"end":"start";break;default:n="middle";break}return n}getTickVerticalAnchor(){var{orientation:e,mirror:r}=this.props;switch(e){case"left":case"right":return"middle";case"top":return r?"start":"end";default:return r?"end":"start"}}renderAxisLine(){var{x:e,y:r,width:n,height:a,orientation:s,mirror:o,axisLine:l}=this.props,c=vr(vr(vr({},zr(this.props,!1)),zr(l,!1)),{},{fill:"none"});if(s==="top"||s==="bottom"){var u=+(s==="top"&&!o||s==="bottom"&&o);c=vr(vr({},c),{},{x1:e,y1:r+u*a,x2:e+n,y2:r+u*a})}else{var h=+(s==="left"&&!o||s==="right"&&o);c=vr(vr({},c),{},{x1:e+h*n,y1:r,x2:e+h*n,y2:r+a})}return O.createElement("line",rd({},c,{className:Ge("recharts-cartesian-axis-line",Vl(l,"className"))}))}static renderTickItem(e,r,n){var a,s=Ge(r.className,"recharts-cartesian-axis-tick-value");if(O.isValidElement(e))a=O.cloneElement(e,vr(vr({},r),{},{className:s}));else if(typeof e=="function")a=e(vr(vr({},r),{},{className:s}));else{var o="recharts-cartesian-axis-tick-value";typeof e!="boolean"&&(o=Ge(o,e.className)),a=O.createElement(r3,rd({},r,{className:o}),n)}return a}renderTicks(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],{tickLine:a,stroke:s,tick:o,tickFormatter:l,unit:c,padding:u}=this.props,h=s3(vr(vr({},this.props),{},{ticks:n}),e,r),p=this.getTickTextAnchor(),m=this.getTickVerticalAnchor(),x=ip(this.props),y=zr(o,!1),b=vr(vr({},x),{},{fill:"none"},zr(a,!1)),w=h.map((N,A)=>{var{line:S,tick:C}=this.getTickLineCoord(N),k=vr(vr(vr(vr({textAnchor:p,verticalAnchor:m},x),{},{stroke:"none",fill:s},y),C),{},{index:A,payload:N,visibleTicksCount:h.length,tickFormatter:l,padding:u});return O.createElement(So,rd({className:"recharts-cartesian-axis-tick",key:"tick-".concat(N.value,"-").concat(N.coordinate,"-").concat(N.tickCoord)},$N(this.props,N,A)),a&&O.createElement("line",rd({},b,S,{className:Ge("recharts-cartesian-axis-tick-line",Vl(a,"className"))})),o&&_o.renderTickItem(o,k,"".concat(typeof l=="function"?l(N.value,A):N.value).concat(c||"")))});return w.length>0?O.createElement("g",{className:"recharts-cartesian-axis-ticks"},w):null}render(){var{axisLine:e,width:r,height:n,className:a,hide:s}=this.props;if(s)return null;var{ticks:o}=this.props;return r!=null&&r<=0||n!=null&&n<=0?null:O.createElement(So,{className:Ge("recharts-cartesian-axis",a),ref:l=>{if(l){var c=l.getElementsByClassName("recharts-cartesian-axis-tick-value");this.tickRefs.current=Array.from(c);var u=c[0];if(u){var h=window.getComputedStyle(u).fontSize,p=window.getComputedStyle(u).letterSpacing;(h!==this.state.fontSize||p!==this.state.letterSpacing)&&this.setState({fontSize:window.getComputedStyle(u).fontSize,letterSpacing:window.getComputedStyle(u).letterSpacing})}}}},e&&this.renderAxisLine(),this.renderTicks(this.state.fontSize,this.state.letterSpacing,o),ea.renderCallByParent(this.props))}}i3(_o,"displayName","CartesianAxis");i3(_o,"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 Hye=["x1","y1","x2","y2","key"],$ye=["offset"],Yye=["xAxisId","yAxisId"],Uye=["xAxisId","yAxisId"];function fP(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function ln(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?fP(Object(r),!0).forEach(function(n){Wye(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):fP(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Wye(t,e,r){return(e=Xye(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Xye(t){var e=Vye(t,"string");return typeof e=="symbol"?e:e+""}function Vye(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function kl(){return kl=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},kl.apply(null,arguments)}function o0(t,e){if(t==null)return{};var r,n,a=qye(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(n=0;n<s.length;n++)r=s[n],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(a[r]=t[r])}return a}function qye(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.indexOf(n)!==-1)continue;r[n]=t[n]}return r}var Gye=t=>{var{fill:e}=t;if(!e||e==="none")return null;var{fillOpacity:r,x:n,y:a,width:s,height:o,ry:l}=t;return O.createElement("rect",{x:n,y:a,ry:l,width:s,height:o,stroke:"none",fill:e,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function PI(t,e){var r;if(O.isValidElement(t))r=O.cloneElement(t,e);else if(typeof t=="function")r=t(e);else{var{x1:n,y1:a,x2:s,y2:o,key:l}=e,c=o0(e,Hye),u=ip(c),{offset:h}=u,p=o0(u,$ye);r=O.createElement("line",kl({},p,{x1:n,y1:a,x2:s,y2:o,fill:"none",key:l}))}return r}function Kye(t){var{x:e,width:r,horizontal:n=!0,horizontalPoints:a}=t;if(!n||!a||!a.length)return null;var{xAxisId:s,yAxisId:o}=t,l=o0(t,Yye),c=a.map((u,h)=>{var p=ln(ln({},l),{},{x1:e,y1:u,x2:e+r,y2:u,key:"line-".concat(h),index:h});return PI(n,p)});return O.createElement("g",{className:"recharts-cartesian-grid-horizontal"},c)}function Zye(t){var{y:e,height:r,vertical:n=!0,verticalPoints:a}=t;if(!n||!a||!a.length)return null;var{xAxisId:s,yAxisId:o}=t,l=o0(t,Uye),c=a.map((u,h)=>{var p=ln(ln({},l),{},{x1:u,y1:e,x2:u,y2:e+r,key:"line-".concat(h),index:h});return PI(n,p)});return O.createElement("g",{className:"recharts-cartesian-grid-vertical"},c)}function Qye(t){var{horizontalFill:e,fillOpacity:r,x:n,y:a,width:s,height:o,horizontalPoints:l,horizontal:c=!0}=t;if(!c||!e||!e.length)return null;var u=l.map(p=>Math.round(p+a-a)).sort((p,m)=>p-m);a!==u[0]&&u.unshift(0);var h=u.map((p,m)=>{var x=!u[m+1],y=x?a+o-p:u[m+1]-p;if(y<=0)return null;var b=m%e.length;return O.createElement("rect",{key:"react-".concat(m),y:p,x:n,height:y,width:s,stroke:"none",fill:e[b],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return O.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},h)}function Jye(t){var{vertical:e=!0,verticalFill:r,fillOpacity:n,x:a,y:s,width:o,height:l,verticalPoints:c}=t;if(!e||!r||!r.length)return null;var u=c.map(p=>Math.round(p+a-a)).sort((p,m)=>p-m);a!==u[0]&&u.unshift(0);var h=u.map((p,m)=>{var x=!u[m+1],y=x?a+o-p:u[m+1]-p;if(y<=0)return null;var b=m%r.length;return O.createElement("rect",{key:"react-".concat(m),x:p,y:s,width:y,height:l,stroke:"none",fill:r[b],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return O.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},h)}var eve=(t,e)=>{var{xAxis:r,width:n,height:a,offset:s}=t;return O9(s3(ln(ln(ln({},_o.defaultProps),r),{},{ticks:P9(r),viewBox:{x:0,y:0,width:n,height:a}})),s.left,s.left+s.width,e)},tve=(t,e)=>{var{yAxis:r,width:n,height:a,offset:s}=t;return O9(s3(ln(ln(ln({},_o.defaultProps),r),{},{ticks:P9(r),viewBox:{x:0,y:0,width:n,height:a}})),s.top,s.top+s.height,e)},rve={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0};function _I(t){var e=I9(),r=B9(),n=z9(),a=ln(ln({},To(t,rve)),{},{x:Oe(t.x)?t.x:n.left,y:Oe(t.y)?t.y:n.top,width:Oe(t.width)?t.width:n.width,height:Oe(t.height)?t.height:n.height}),{xAxisId:s,yAxisId:o,x:l,y:c,width:u,height:h,syncWithTicks:p,horizontalValues:m,verticalValues:x}=a,y=$a(),b=Be(L=>gO(L,"xAxis",s,y)),w=Be(L=>gO(L,"yAxis",o,y));if(!Oe(u)||u<=0||!Oe(h)||h<=0||!Oe(l)||l!==+l||!Oe(c)||c!==+c)return null;var N=a.verticalCoordinatesGenerator||eve,A=a.horizontalCoordinatesGenerator||tve,{horizontalPoints:S,verticalPoints:C}=a;if((!S||!S.length)&&typeof A=="function"){var k=m&&m.length,T=A({yAxis:w?ln(ln({},w),{},{ticks:k?m:w.ticks}):void 0,width:e,height:r,offset:n},k?!0:p);Gh(Array.isArray(T),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof T,"]")),Array.isArray(T)&&(S=T)}if((!C||!C.length)&&typeof N=="function"){var E=x&&x.length,_=N({xAxis:b?ln(ln({},b),{},{ticks:E?x:b.ticks}):void 0,width:e,height:r,offset:n},E?!0:p);Gh(Array.isArray(_),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof _,"]")),Array.isArray(_)&&(C=_)}return O.createElement("g",{className:"recharts-cartesian-grid"},O.createElement(Gye,{fill:a.fill,fillOpacity:a.fillOpacity,x:a.x,y:a.y,width:a.width,height:a.height,ry:a.ry}),O.createElement(Qye,kl({},a,{horizontalPoints:S})),O.createElement(Jye,kl({},a,{verticalPoints:C})),O.createElement(Kye,kl({},a,{offset:n,horizontalPoints:S,xAxis:b,yAxis:w})),O.createElement(Zye,kl({},a,{offset:n,verticalPoints:C,xAxis:b,yAxis:w})))}_I.displayName="CartesianGrid";function pP(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function mP(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?pP(Object(r),!0).forEach(function(n){nve(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):pP(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function nve(t,e,r){return(e=ave(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ave(t){var e=sve(t,"string");return typeof e=="symbol"?e:e+""}function sve(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var ive={xAxis:{},yAxis:{},zAxis:{}},RI=$t({name:"cartesianAxis",initialState:ive,reducers:{addXAxis(t,e){t.xAxis[e.payload.id]=e.payload},removeXAxis(t,e){delete t.xAxis[e.payload.id]},addYAxis(t,e){t.yAxis[e.payload.id]=e.payload},removeYAxis(t,e){delete t.yAxis[e.payload.id]},addZAxis(t,e){t.zAxis[e.payload.id]=e.payload},removeZAxis(t,e){delete t.zAxis[e.payload.id]},updateYAxisWidth(t,e){var{id:r,width:n}=e.payload;t.yAxis[r]&&(t.yAxis[r]=mP(mP({},t.yAxis[r]),{},{width:n}))}}}),{addXAxis:ove,removeXAxis:lve,addYAxis:cve,removeYAxis:dve,addZAxis:Ywe,removeZAxis:Uwe,updateYAxisWidth:uve}=RI.actions,hve=RI.reducer,fve=["children"],pve=["dangerouslySetInnerHTML","ticks"];function LI(t,e,r){return(e=mve(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function mve(t){var e=gve(t,"string");return typeof e=="symbol"?e:e+""}function gve(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function f4(){return f4=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},f4.apply(null,arguments)}function zI(t,e){if(t==null)return{};var r,n,a=xve(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(n=0;n<s.length;n++)r=s[n],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(a[r]=t[r])}return a}function xve(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.indexOf(n)!==-1)continue;r[n]=t[n]}return r}function bve(t){var e=Ir(),r=O.useMemo(()=>{var{children:s}=t,o=zI(t,fve);return o},[t]),n=Be(s=>Di(s,r.id)),a=r===n;return O.useEffect(()=>(e(ove(r)),()=>{e(lve(r))}),[r,e]),a?t.children:null}var yve=t=>{var{xAxisId:e,className:r}=t,n=Be(L9),a=$a(),s="xAxis",o=Be(x=>Zd(x,s,e,a)),l=Be(x=>Rz(x,s,e,a)),c=Be(x=>Ez(x,e)),u=Be(x=>Mme(x,e));if(c==null||u==null)return null;var{dangerouslySetInnerHTML:h,ticks:p}=t,m=zI(t,pve);return O.createElement(_o,f4({},m,{scale:o,x:u.x,y:u.y,width:c.width,height:c.height,className:Ge("recharts-".concat(s," ").concat(s),r),viewBox:n,ticks:l}))},vve=t=>{var e,r,n,a,s;return O.createElement(bve,{interval:(e=t.interval)!==null&&e!==void 0?e:"preserveEnd",id:t.xAxisId,scale:t.scale,type:t.type,padding:t.padding,allowDataOverflow:t.allowDataOverflow,domain:t.domain,dataKey:t.dataKey,allowDuplicatedCategory:t.allowDuplicatedCategory,allowDecimals:t.allowDecimals,tickCount:t.tickCount,includeHidden:(r=t.includeHidden)!==null&&r!==void 0?r:!1,reversed:t.reversed,ticks:t.ticks,height:t.height,orientation:t.orientation,mirror:t.mirror,hide:t.hide,unit:t.unit,name:t.name,angle:(n=t.angle)!==null&&n!==void 0?n:0,minTickGap:(a=t.minTickGap)!==null&&a!==void 0?a:5,tick:(s=t.tick)!==null&&s!==void 0?s:!0,tickFormatter:t.tickFormatter},O.createElement(yve,t))};class o3 extends O.Component{render(){return O.createElement(vve,this.props)}}LI(o3,"displayName","XAxis");LI(o3,"defaultProps",{allowDataOverflow:Zn.allowDataOverflow,allowDecimals:Zn.allowDecimals,allowDuplicatedCategory:Zn.allowDuplicatedCategory,height:Zn.height,hide:!1,mirror:Zn.mirror,orientation:Zn.orientation,padding:Zn.padding,reversed:Zn.reversed,scale:Zn.scale,tickCount:Zn.tickCount,type:Zn.type,xAxisId:0});var wve=t=>{var{ticks:e,label:r,labelGapWithTick:n=5,tickSize:a=0,tickMargin:s=0}=t,o=0;if(e){e.forEach(h=>{if(h){var p=h.getBoundingClientRect();p.width>o&&(o=p.width)}});var l=r?r.getBoundingClientRect().width:0,c=a+s,u=o+c+l+(r?n:0);return Math.round(u)}return 0},jve=["dangerouslySetInnerHTML","ticks"];function II(t,e,r){return(e=Nve(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Nve(t){var e=Sve(t,"string");return typeof e=="symbol"?e:e+""}function Sve(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function p4(){return p4=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},p4.apply(null,arguments)}function Ave(t,e){if(t==null)return{};var r,n,a=Cve(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(n=0;n<s.length;n++)r=s[n],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(a[r]=t[r])}return a}function Cve(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.indexOf(n)!==-1)continue;r[n]=t[n]}return r}function kve(t){var e=Ir();return O.useEffect(()=>(e(cve(t)),()=>{e(dve(t))}),[t,e]),null}var Dve=t=>{var e,{yAxisId:r,className:n,width:a,label:s}=t,o=O.useRef(null),l=O.useRef(null),c=Be(L9),u=$a(),h=Ir(),p="yAxis",m=Be(S=>Zd(S,p,r,u)),x=Be(S=>Oz(S,r)),y=Be(S=>Eme(S,r)),b=Be(S=>Rz(S,p,r,u));if(O.useLayoutEffect(()=>{var S;if(!(a!=="auto"||!x||n3(s)||O.isValidElement(s))){var C=o.current,k=C==null||(S=C.tickRefs)===null||S===void 0?void 0:S.current,{tickSize:T,tickMargin:E}=C.props,_=wve({ticks:k,label:l.current,labelGapWithTick:5,tickSize:T,tickMargin:E});Math.round(x.width)!==Math.round(_)&&h(uve({id:r,width:_}))}},[o,o==null||(e=o.current)===null||e===void 0||(e=e.tickRefs)===null||e===void 0?void 0:e.current,x?.width,x,h,s,r,a]),x==null||y==null)return null;var{dangerouslySetInnerHTML:w,ticks:N}=t,A=Ave(t,jve);return O.createElement(_o,p4({},A,{ref:o,labelRef:l,scale:m,x:y.x,y:y.y,width:x.width,height:x.height,className:Ge("recharts-".concat(p," ").concat(p),n),viewBox:c,ticks:b}))},Tve=t=>{var e,r,n,a,s;return O.createElement(O.Fragment,null,O.createElement(kve,{interval:(e=t.interval)!==null&&e!==void 0?e:"preserveEnd",id:t.yAxisId,scale:t.scale,type:t.type,domain:t.domain,allowDataOverflow:t.allowDataOverflow,dataKey:t.dataKey,allowDuplicatedCategory:t.allowDuplicatedCategory,allowDecimals:t.allowDecimals,tickCount:t.tickCount,padding:t.padding,includeHidden:(r=t.includeHidden)!==null&&r!==void 0?r:!1,reversed:t.reversed,ticks:t.ticks,width:t.width,orientation:t.orientation,mirror:t.mirror,hide:t.hide,unit:t.unit,name:t.name,angle:(n=t.angle)!==null&&n!==void 0?n:0,minTickGap:(a=t.minTickGap)!==null&&a!==void 0?a:5,tick:(s=t.tick)!==null&&s!==void 0?s:!0,tickFormatter:t.tickFormatter}),O.createElement(Dve,t))},Mve={allowDataOverflow:Qn.allowDataOverflow,allowDecimals:Qn.allowDecimals,allowDuplicatedCategory:Qn.allowDuplicatedCategory,hide:!1,mirror:Qn.mirror,orientation:Qn.orientation,padding:Qn.padding,reversed:Qn.reversed,scale:Qn.scale,tickCount:Qn.tickCount,type:Qn.type,width:Qn.width,yAxisId:0};class l3 extends O.Component{render(){return O.createElement(Tve,this.props)}}II(l3,"displayName","YAxis");II(l3,"defaultProps",Mve);var Eve=(t,e)=>e,c3=de([Eve,At,ez,Dr,Kz,Ti,Rge,Br],Fge),d3=t=>{var e=t.currentTarget.getBoundingClientRect(),r=e.width/t.currentTarget.offsetWidth,n=e.height/t.currentTarget.offsetHeight;return{chartX:Math.round((t.clientX-e.left)/r),chartY:Math.round((t.clientY-e.top)/n)}},BI=cr("mouseClick"),FI=_f();FI.startListening({actionCreator:BI,effect:(t,e)=>{var r=t.payload,n=c3(e.getState(),d3(r));n?.activeIndex!=null&&e.dispatch(Ume({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var m4=cr("mouseMove"),HI=_f();HI.startListening({actionCreator:m4,effect:(t,e)=>{var r=t.payload,n=e.getState(),a=VS(n,n.tooltip.settings.shared),s=c3(n,d3(r));a==="axis"&&(s?.activeIndex!=null?e.dispatch(Yz({activeIndex:s.activeIndex,activeDataKey:void 0,activeCoordinate:s.activeCoordinate})):e.dispatch($z()))}});function Ove(t,e){return e instanceof HTMLElement?"HTMLElement <".concat(e.tagName,' class="').concat(e.className,'">'):e===window?"global.window":e}var gP={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index"},$I=$t({name:"rootProps",initialState:gP,reducers:{updateOptions:(t,e)=>{var r;t.accessibilityLayer=e.payload.accessibilityLayer,t.barCategoryGap=e.payload.barCategoryGap,t.barGap=(r=e.payload.barGap)!==null&&r!==void 0?r:gP.barGap,t.barSize=e.payload.barSize,t.maxBarSize=e.payload.maxBarSize,t.stackOffset=e.payload.stackOffset,t.syncId=e.payload.syncId,t.syncMethod=e.payload.syncMethod,t.className=e.payload.className}}}),Pve=$I.reducer,{updateOptions:_ve}=$I.actions,YI=$t({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(t,e)=>e.payload}}),{updatePolarOptions:Wwe}=YI.actions,Rve=YI.reducer,UI=cr("keyDown"),WI=cr("focus"),u3=_f();u3.startListening({actionCreator:UI,effect:(t,e)=>{var r=e.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:a}=r.tooltip,s=t.payload;if(!(s!=="ArrowRight"&&s!=="ArrowLeft"&&s!=="Enter")){var o=Number(qS(a,Jd(r))),l=Ti(r);if(s==="Enter"){var c=t0(r,"axis","hover",String(a.index));e.dispatch(l4({active:!a.active,activeIndex:a.index,activeDataKey:a.dataKey,activeCoordinate:c}));return}var u=Rme(r),h=u==="left-to-right"?1:-1,p=s==="ArrowRight"?1:-1,m=o+p*h;if(!(l==null||m>=l.length||m<0)){var x=t0(r,"axis","hover",String(m));e.dispatch(l4({active:!0,activeIndex:m.toString(),activeDataKey:void 0,activeCoordinate:x}))}}}}});u3.startListening({actionCreator:WI,effect:(t,e)=>{var r=e.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:a}=r.tooltip;if(!a.active&&a.index==null){var s="0",o=t0(r,"axis","hover",String(s));e.dispatch(l4({activeDataKey:void 0,active:!0,activeIndex:s,activeCoordinate:o}))}}}});var Da=cr("externalEvent"),XI=_f();XI.startListening({actionCreator:Da,effect:(t,e)=>{if(t.payload.handler!=null){var r=e.getState(),n={activeCoordinate:Cge(r),activeDataKey:eI(r),activeIndex:Dd(r),activeLabel:Jz(r),activeTooltipIndex:Dd(r),isTooltipActive:kge(r)};t.payload.handler(n,t.payload.reactEvent)}}});var Lve=de([Qd],t=>t.tooltipItemPayloads),zve=de([Lve,gp,(t,e,r)=>e,(t,e,r)=>r],(t,e,r,n)=>{var a=t.find(l=>l.settings.dataKey===n);if(a!=null){var{positions:s}=a;if(s!=null){var o=e(s,r);return o}}}),VI=cr("touchMove"),qI=_f();qI.startListening({actionCreator:VI,effect:(t,e)=>{var r=t.payload,n=e.getState(),a=VS(n,n.tooltip.settings.shared);if(a==="axis"){var s=c3(n,d3({clientX:r.touches[0].clientX,clientY:r.touches[0].clientY,currentTarget:r.currentTarget}));s?.activeIndex!=null&&e.dispatch(Yz({activeIndex:s.activeIndex,activeDataKey:void 0,activeCoordinate:s.activeCoordinate}))}else if(a==="item"){var o,l=r.touches[0],c=document.elementFromPoint(l.clientX,l.clientY);if(!c||!c.getAttribute)return;var u=c.getAttribute(yde),h=(o=c.getAttribute(vde))!==null&&o!==void 0?o:void 0,p=zve(e.getState(),u,h);e.dispatch(Hz({activeDataKey:h,activeIndex:u,activeCoordinate:p}))}}});var Ive=A4({brush:xye,cartesianAxis:hve,chartData:nxe,errorBars:bbe,graphicalItems:ebe,layout:$ce,legend:Ede,options:Qge,polarAxis:S0e,polarOptions:Rve,referenceElements:Sye,rootProps:Pve,tooltip:Wme}),Bve=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return ZP({reducer:Ive,preloadedState:e,middleware:n=>n({serializableCheck:!1}).concat([FI.middleware,HI.middleware,u3.middleware,XI.middleware,qI.middleware]),devTools:{serialize:{replacer:Ove},name:"recharts-".concat(r)}})};function Fve(t){var{preloadedState:e,children:r,reduxStoreName:n}=t,a=$a(),s=O.useRef(null);if(a)return r;s.current==null&&(s.current=Bve(e,n));var o=QN;return O.createElement(IP,{context:o,store:s.current},r)}function Hve(t){var{layout:e,width:r,height:n,margin:a}=t,s=Ir(),o=$a();return O.useEffect(()=>{o||(s(Bce(e)),s(Fce({width:r,height:n})),s(Ice(a)))},[s,o,e,r,n,a]),null}function $ve(t){var e=Ir();return O.useEffect(()=>{e(_ve(t))},[e,t]),null}var Yve=["children"];function Uve(t,e){if(t==null)return{};var r,n,a=Wve(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(n=0;n<s.length;n++)r=s[n],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(a[r]=t[r])}return a}function Wve(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.indexOf(n)!==-1)continue;r[n]=t[n]}return r}function l0(){return l0=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},l0.apply(null,arguments)}var Xve={width:"100%",height:"100%"},Vve=O.forwardRef((t,e)=>{var r=I9(),n=B9(),a=H9();if(!Ix(r)||!Ix(n))return null;var{children:s,otherAttributes:o,title:l,desc:c}=t,u,h;return typeof o.tabIndex=="number"?u=o.tabIndex:u=a?0:void 0,typeof o.role=="string"?h=o.role:h=a?"application":void 0,O.createElement(r9,l0({},o,{title:l,desc:c,role:h,tabIndex:u,width:r,height:n,style:Xve,ref:e}),s)}),qve=t=>{var{children:e}=t,r=Be(rb);if(!r)return null;var{width:n,height:a,y:s,x:o}=r;return O.createElement(r9,{width:n,height:a,x:o,y:s},e)},xP=O.forwardRef((t,e)=>{var{children:r}=t,n=Uve(t,Yve),a=$a();return a?O.createElement(qve,null,r):O.createElement(Vve,l0({ref:e},n),r)});function Gve(){var t=Ir(),[e,r]=O.useState(null),n=Be(bde);return O.useEffect(()=>{if(e!=null){var a=e.getBoundingClientRect(),s=a.width/e.offsetWidth;da(s)&&s!==n&&t(Hce(s))}},[e,t,n]),r}function bP(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Kve(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?bP(Object(r),!0).forEach(function(n){Zve(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):bP(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Zve(t,e,r){return(e=Qve(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Qve(t){var e=Jve(t,"string");return typeof e=="symbol"?e:e+""}function Jve(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var e1e=O.forwardRef((t,e)=>{var{children:r,className:n,height:a,onClick:s,onContextMenu:o,onDoubleClick:l,onMouseDown:c,onMouseEnter:u,onMouseLeave:h,onMouseMove:p,onMouseUp:m,onTouchEnd:x,onTouchMove:y,onTouchStart:b,style:w,width:N}=t,A=Ir(),[S,C]=O.useState(null),[k,T]=O.useState(null);ixe();var E=Gve(),_=O.useCallback(te=>{E(te),typeof e=="function"&&e(te),C(te),T(te)},[E,e,C,T]),L=O.useCallback(te=>{A(BI(te)),A(Da({handler:s,reactEvent:te}))},[A,s]),P=O.useCallback(te=>{A(m4(te)),A(Da({handler:u,reactEvent:te}))},[A,u]),R=O.useCallback(te=>{A($z()),A(Da({handler:h,reactEvent:te}))},[A,h]),z=O.useCallback(te=>{A(m4(te)),A(Da({handler:p,reactEvent:te}))},[A,p]),B=O.useCallback(()=>{A(WI())},[A]),Y=O.useCallback(te=>{A(UI(te.key))},[A]),X=O.useCallback(te=>{A(Da({handler:o,reactEvent:te}))},[A,o]),H=O.useCallback(te=>{A(Da({handler:l,reactEvent:te}))},[A,l]),W=O.useCallback(te=>{A(Da({handler:c,reactEvent:te}))},[A,c]),V=O.useCallback(te=>{A(Da({handler:m,reactEvent:te}))},[A,m]),Z=O.useCallback(te=>{A(Da({handler:b,reactEvent:te}))},[A,b]),F=O.useCallback(te=>{A(VI(te)),A(Da({handler:y,reactEvent:te}))},[A,y]),G=O.useCallback(te=>{A(Da({handler:x,reactEvent:te}))},[A,x]);return O.createElement(iI.Provider,{value:S},O.createElement(dle.Provider,{value:k},O.createElement("div",{className:Ge("recharts-wrapper",n),style:Kve({position:"relative",cursor:"default",width:N,height:a},w),onClick:L,onContextMenu:X,onDoubleClick:H,onFocus:B,onKeyDown:Y,onMouseDown:W,onMouseEnter:P,onMouseLeave:R,onMouseMove:z,onMouseUp:V,onTouchEnd:G,onTouchMove:F,onTouchStart:Z,ref:_},r)))}),t1e=["children","className","width","height","style","compact","title","desc"];function r1e(t,e){if(t==null)return{};var r,n,a=n1e(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(n=0;n<s.length;n++)r=s[n],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(a[r]=t[r])}return a}function n1e(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.indexOf(n)!==-1)continue;r[n]=t[n]}return r}var a1e=O.forwardRef((t,e)=>{var{children:r,className:n,width:a,height:s,style:o,compact:l,title:c,desc:u}=t,h=r1e(t,t1e),p=ip(h);return l?O.createElement(xP,{otherAttributes:p,title:c,desc:u},r):O.createElement(e1e,{className:n,style:o,width:a,height:s,onClick:t.onClick,onMouseLeave:t.onMouseLeave,onMouseEnter:t.onMouseEnter,onMouseMove:t.onMouseMove,onMouseDown:t.onMouseDown,onMouseUp:t.onMouseUp,onContextMenu:t.onContextMenu,onDoubleClick:t.onDoubleClick,onTouchStart:t.onTouchStart,onTouchMove:t.onTouchMove,onTouchEnd:t.onTouchEnd},O.createElement(xP,{otherAttributes:p,title:c,desc:u,ref:e},O.createElement(Cye,null,r)))}),s1e=["width","height"];function g4(){return g4=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},g4.apply(null,arguments)}function i1e(t,e){if(t==null)return{};var r,n,a=o1e(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(n=0;n<s.length;n++)r=s[n],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(a[r]=t[r])}return a}function o1e(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.indexOf(n)!==-1)continue;r[n]=t[n]}return r}var l1e={top:5,right:5,bottom:5,left:5},c1e={accessibilityLayer:!0,layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:l1e,reverseStackOrder:!1,syncMethod:"index"},d1e=O.forwardRef(function(e,r){var n,a=To(e.categoricalChartProps,c1e),{width:s,height:o}=a,l=i1e(a,s1e);if(!Ix(s)||!Ix(o))return null;var{chartName:c,defaultTooltipEventType:u,validateTooltipEventTypes:h,tooltipPayloadSearcher:p,categoricalChartProps:m}=e,x={chartName:c,defaultTooltipEventType:u,validateTooltipEventTypes:h,tooltipPayloadSearcher:p,eventEmitter:void 0};return O.createElement(Fve,{preloadedState:{options:x},reduxStoreName:(n=m.id)!==null&&n!==void 0?n:c},O.createElement(gye,{chartData:m.data}),O.createElement(Hve,{width:s,height:o,layout:a.layout,margin:a.margin}),O.createElement($ve,{accessibilityLayer:a.accessibilityLayer,barCategoryGap:a.barCategoryGap,maxBarSize:a.maxBarSize,stackOffset:a.stackOffset,barGap:a.barGap,barSize:a.barSize,syncId:a.syncId,syncMethod:a.syncMethod,className:a.className}),O.createElement(a1e,g4({},l,{width:s,height:o,ref:r})))}),u1e=["axis","item"],h1e=O.forwardRef((t,e)=>O.createElement(d1e,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:u1e,tooltipPayloadSearcher:Kge,categoricalChartProps:t,ref:e}));const f1e=()=>{const[t,e]=O.useState("18/July/25"),[r,n]=O.useState("21/July/25"),[a,s]=O.useState("Day"),o=Array(6).fill({title:"Payment Failures",count:124,percent:"26%"}),l=[{name:"Login Issues",value:45},{name:"Account Issues",value:25},{name:"Payment Issues",value:55},{name:"Technical Issues",value:15}];return i.jsxs("div",{className:"text-yellow-400 min-h-screen p-6",children:[i.jsx("div",{className:"border border-yellow-400 rounded-lg p-4 overflow-x-auto",children:i.jsxs("table",{className:"w-full border-collapse",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-yellow-400",children:[i.jsx("th",{className:"p-2 text-left",children:"Issue Category"}),i.jsx("th",{className:"p-2 text-left",children:"Ticket Count"}),i.jsx("th",{className:"p-2 text-left",children:"% of Total"}),i.jsx("th",{className:"p-2 text-left",children:"Action"})]})}),i.jsx("tbody",{children:o.map((c,u)=>i.jsxs("tr",{className:"border-b border-yellow-400 last:border-none",children:[i.jsx("td",{className:"p-2",children:c.title}),i.jsx("td",{className:"p-2",children:c.count}),i.jsx("td",{className:"p-2",children:c.percent}),i.jsx("td",{className:"p-2",children:i.jsx("button",{className:"bg-yellow-400 text-[#003d2d] px-3 py-1 rounded-full text-sm font-semibold",children:"View"})})]},u))})]})}),i.jsxs("div",{className:"flex items-center justify-center gap-4 mt-6 text-sm",children:[i.jsx("span",{children:"Date Range :"}),i.jsx("input",{type:"date",value:t,onChange:c=>e(c.target.value),className:"border border-yellow-400 bg-transparent px-2 py-1 rounded text-yellow-400"}),i.jsx("span",{children:"To"}),i.jsx("input",{type:"date",value:r,onChange:c=>n(c.target.value),className:"border border-yellow-400 bg-transparent px-2 py-1 rounded text-yellow-400"}),i.jsx("span",{children:"Sort:"}),i.jsxs("select",{value:a,onChange:c=>s(c.target.value),className:"border border-yellow-400 bg-transparent px-2 py-1 rounded text-yellow-400",children:[i.jsx("option",{value:"Day",children:"Day"}),i.jsx("option",{value:"Week",children:"Week"}),i.jsx("option",{value:"Month",children:"Month"})]})]}),i.jsxs("div",{className:"border border-yellow-400 rounded-lg p-4 mt-6",children:[i.jsx("h2",{className:"font-semibold mb-4",children:"Chart Type:"}),i.jsx(Sxe,{width:"100%",height:250,children:i.jsxs(h1e,{data:l,margin:{top:10,right:20,left:0,bottom:0},children:[i.jsx(_I,{strokeDasharray:"3 3",stroke:"#FFD700"}),i.jsx(o3,{dataKey:"name",stroke:"#FFD700"}),i.jsx(l3,{stroke:"#FFD700"}),i.jsx(pxe,{contentStyle:{backgroundColor:"#003d2d",borderColor:"#FFD700"},labelStyle:{color:"#FFD700"}}),i.jsx(DI,{dataKey:"value",fill:"#FFD700",barSize:40,radius:[8,8,0,0]})]})})]})]})};Ps.register(Do,tc,ec);const p1e=()=>{const t={labels:["Total Tickets Raised","Open Tickets","In Progress Tickets","Closed Tickets"],datasets:[{data:[12500,1e3,12500,1e3],backgroundColor:["#ffffff","#1E1EFF","#FFD700","#00FF00"],borderWidth:0}]},e={cutout:"70%",plugins:{legend:{display:!1},tooltip:{callbacks:{label:r=>{const n=t.labels[r.dataIndex],a=t.datasets[0].data[r.dataIndex];return`${n}: ${a}`}}}}};return i.jsxs("div",{className:"flex min-h-screen",children:[i.jsx(Ue,{}),i.jsxs("div",{className:"flex-1 overflow-hidden",children:[i.jsx(_s,{}),i.jsxs("div",{style:{color:"yellow",padding:"40px",textAlign:"center"},children:[i.jsx("h3",{style:{marginBottom:"20px"},children:"Complaint Tickets"}),i.jsxs("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:[i.jsxs("div",{style:{position:"relative",width:"300px",height:"300px"},children:[i.jsx(Nj,{data:t,options:e}),i.jsxs("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:"yellow",fontWeight:"bold",fontSize:"16px",textAlign:"center",pointerEvents:"none",lineHeight:"1.2"},children:["Complaint",i.jsx("br",{}),"Tickets"]})]}),i.jsxs("div",{style:{marginLeft:"30px",textAlign:"left",lineHeight:"1.8"},children:[i.jsxs("p",{children:[i.jsx("span",{style:{color:"#ffffff"},children:"●"})," Total Tickets Raised"]}),i.jsxs("p",{children:[i.jsx("span",{style:{color:"#1E1EFF"},children:"●"})," Open Tickets"]}),i.jsxs("p",{children:[i.jsx("span",{style:{color:"#FFD700"},children:"●"})," In Progress Tickets"]}),i.jsxs("p",{children:[i.jsx("span",{style:{color:"#00FF00"},children:"●"})," Closed Tickets"]})]})]})]}),i.jsx(f1e,{})]})]})};Ps.register(Do,tc,ec,Qf);const m1e=()=>{const t={labels:["Driver Incentives","System Maintenance","Marketing","Miscellaneous Ops"],datasets:[{data:[45,25,15,15],backgroundColor:["#FFD700","#FF0000","#004d26","#0000CC"],borderWidth:0}]},e={responsive:!0,plugins:{legend:{display:!1},tooltip:{enabled:!0},datalabels:{color:"#fff",font:{size:14,weight:"bold"},formatter:(r,n)=>n.chart.data.labels[n.dataIndex]}}};return i.jsxs("div",{className:"",children:[i.jsx("h2",{className:"text-xl font-bold",children:"Company Expenses Chart:"}),i.jsx("div",{style:{width:"400px",margin:"auto"},children:i.jsx(Zf,{data:t,options:e})})]})},g1e=[{name:"Ali",role:"Angel Investor",Share:"10%",lastAction:"Wallet Frozen",earning:"AED 15,000"}],x1e=()=>i.jsxs("div",{className:" bg-[#013220] text-yellow-300 p-8 font-sans",children:[i.jsx("h2",{className:"text-2xl font-semibold mb-4",children:"Stakeholder Panel:"}),i.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Shareholder Earnings:"}),i.jsx("div",{className:"border border-yellow-400 rounded-xl p-4",children:i.jsxs("table",{className:"w-full table-auto border-separate border-spacing-y-2",children:[i.jsx("thead",{className:" text-left border-b border-yellow-300",children:i.jsxs("tr",{className:"border-b border-yellow-300",children:[i.jsx("th",{className:"py-2 px-4",children:"Name"}),i.jsx("th",{className:"py-2 px-4",children:"Role"}),i.jsx("th",{className:"py-2 px-4",children:"Share %"}),i.jsx("th",{className:"py-2 px-4",children:"Earnings"})]})}),i.jsx("tbody",{children:g1e.map((t,e)=>i.jsxs("tr",{className:"rounded",children:[i.jsx("td",{className:"py-2 px-4",children:t.name}),i.jsx("td",{className:"py-2 px-4",children:t.role}),i.jsx("td",{className:"py-2 px-4",children:t.Share}),i.jsx("td",{className:"py-2 px-4",children:t.earning})]},e))})]})})]}),b1e=()=>{const t=[{name:"Total Revenue",value:"AED 1,500,000"},{name:"AAAO Earnings (15%)",value:"AED 225,000"},{name:"Driver Earnings (85%)",value:"AED 1,275,000"},{name:"Service Provider Commissions",value:"AED 95,000"}],e=[{name:"New Bookings",data:[60,50,90,40,60,30,20]}],r={chart:{type:"line",height:350,background:"#013220",toolbar:{show:!1}},stroke:{curve:"straight",width:3},colors:["#FF0000"],xaxis:{categories:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],axisBorder:{show:!0,color:"#DDC104"},axisTicks:{show:!0,color:"#DDC104"},labels:{style:{colors:"#FFFFFF"}}},yaxis:{axisBorder:{show:!0,color:"#DDC104"},axisTicks:{show:!0,color:"#DDC104"},labels:{style:{colors:"#FFFFFF"}}},grid:{borderColor:"#DDC104",strokeDashArray:0},legend:{show:!1},markers:{size:5},tooltip:{theme:"dark"}};return i.jsxs("div",{className:"flex min-h-screen",children:[i.jsx(Ue,{}),i.jsxs("div",{className:"flex-1 overflow-hidden",children:[i.jsx(_s,{}),i.jsxs("div",{className:"p-6 space-y-6",children:[i.jsx("div",{className:"w-full md:w-1/2 mx-auto rounded-lg overflow-hidden border border-yellow-300",children:i.jsxs("table",{className:"w-full",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-yellow-300",children:[i.jsx("th",{className:"text-left px-4 py-2",children:"KPI"}),i.jsx("th",{className:"text-left px-4 py-2",children:"Value"})]})}),i.jsx("tbody",{children:t.map((n,a)=>i.jsxs("tr",{className:"border-b border-yellow-300",children:[i.jsx("td",{className:"px-4 py-2",children:n.name}),i.jsx("td",{className:"px-4 py-2",children:n.value})]},a))})]})}),i.jsx("div",{className:"text-lg font-semibold text-yellow-300",children:"Team Earnings: AED 78,000"}),i.jsx("div",{className:"p-4 rounded-lg w-3/4 mx-auto border border-yellow-400",style:{backgroundColor:"#013220"},children:i.jsx(Qr,{options:r,series:e,type:"line",height:350})}),i.jsxs("div",{className:"shadow-xl shadow-black bg-gradient-to-r from-[#013526] to-[#008d67] py-6 px-8 rounded-xl w-full max-w-2xl mx-auto",children:[i.jsxs("h3",{className:"gap-3 text-3xl font-semibold mb-4 flex px-4",children:[i.jsx(N_,{size:30})," Withdrawals: Today vs Yesterday"]}),i.jsxs("div",{className:"space-y-4 mt-6",children:[i.jsxs("div",{className:"flex gap-6 px-10",children:[i.jsx("span",{className:"w-28 font-semibold",children:"Today:"}),i.jsx("p",{className:"font-semibold",children:"AED 18,000"})]}),i.jsxs("div",{className:"flex gap-6 px-10",children:[i.jsx("span",{className:"w-28 font-semibold",children:"Yesterday:"}),i.jsx("p",{className:"font-semibold",children:"AED 24,000"})]}),i.jsxs("div",{className:"flex gap-6 px-10 font-semibold",children:[i.jsx("span",{className:"w-28 font-semibold",children:"Change:"}),i.jsxs("span",{className:"text-red-500 flex items-center gap-1",children:[i.jsx(ioe,{})," -25%"]})]})]})]}),i.jsx(x1e,{}),i.jsx(m1e,{})]})]})]})},y1e=Array(9).fill({name:"Umair Khan",proposaltype:"Rental Driver",decisiondate:"28 Jul '25",status:"Pending"}),v1e=()=>i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"flex justify-end items-center my-6 gap-4",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{children:"Date Range :"}),i.jsx("input",{type:"date",value:"",readOnly:!0,className:"bg-[#013A2A] border border-yellow-400 text-yellow-400 px-2 py-1 rounded-md w-28"}),i.jsx("span",{children:"To"}),i.jsx("input",{type:"date",value:"",readOnly:!0,className:"bg-[#013A2A] border border-yellow-400 text-yellow-400 px-2 py-1 rounded-md w-28"})]}),i.jsx("div",{children:i.jsxs("span",{children:["Type:",i.jsxs("select",{className:"bg-transparent focus:outline-none ml-1",children:[i.jsx("option",{value:"",children:"Driver"}),i.jsx("option",{value:"",children:"Rental Driver"})]})]})}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{children:"Status:"}),i.jsxs("select",{className:"bg-transparent focus:outline-none",children:[i.jsx("option",{value:"",children:"Pending"}),i.jsx("option",{value:"",children:"Approved"})]})]})]}),i.jsx("div",{className:"mx-4 overflow-x-auto border border-yellow-400 rounded-xl",children:i.jsxs("table",{className:"w-full text-left",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-yellow-400 text-yellow-400",children:[i.jsx("th",{className:"px-4 py-3",children:"Name"}),i.jsx("th",{className:"px-4 py-3",children:"Proposal Type"}),i.jsx("th",{className:"px-4 py-3",children:"Decision Date"}),i.jsx("th",{className:"px-4 py-3",children:"Status"}),i.jsx("th",{className:"px-4 py-3",children:"Action"})]})}),i.jsx("tbody",{children:y1e.map((t,e)=>i.jsxs("tr",{className:"text-sm",children:[i.jsx("td",{className:"px-4 py-3",children:t.name}),i.jsx("td",{className:"px-4 py-3",children:t.proposaltype}),i.jsx("td",{className:"px-4 py-3",children:t.decisiondate}),i.jsx("td",{className:"px-4 py-3",children:t.status}),i.jsx("td",{className:"px-4 py-3",children:i.jsx("button",{className:"bg-yellow-400 text-black px-4 py-1 rounded-full text-sm hover:bg-yellow-300",children:"View"})})]},e))})]})})]}),w1e=[{editedby:"Admin Rehan",fieldchanged:"Phone Number",useraffected:"Driver: Sohail",timestamp:"Aug 3, 10:14 AM",notes:"Verified via call",audit:"Locked"},{editedby:"Admin Rehan",fieldchanged:"KYC Status",useraffected:"Provider: AutoPro",timestamp:"Aug 3, 10:14 AM",notes:`Uploaded missing
document`,audit:"Pending"}],j1e=()=>i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"flex justify-end items-center my-6 gap-4 flex-wrap",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{children:"Date Range :"}),i.jsx("input",{type:"date",value:"",readOnly:!0,className:"bg-[#013A2A] border border-yellow-400 text-yellow-400 px-2 py-1 rounded-md w-28"}),i.jsx("span",{children:"To"}),i.jsx("input",{type:"date",value:"",readOnly:!0,className:"bg-[#013A2A] border border-yellow-400 text-yellow-400 px-2 py-1 rounded-md w-28"})]}),i.jsx("div",{children:i.jsxs("span",{children:["Admin:",i.jsxs("select",{className:"bg-transparent focus:outline-none ml-1",children:[i.jsx("option",{value:"",children:"Admin Rehan"}),i.jsx("option",{value:""})]})]})}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{children:"User Role:"}),i.jsxs("select",{className:"bg-transparent focus:outline-none",children:[i.jsx("option",{value:"",children:"All"}),i.jsx("option",{value:""})]})]})]}),i.jsx("div",{className:"mx-4 overflow-x-auto border border-yellow-400 rounded-xl",children:i.jsxs("table",{className:"w-full text-left table-fixed",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-yellow-400 text-yellow-400",children:[i.jsx("th",{className:"px-4 py-3 w-1/6",children:"Edited By"}),i.jsx("th",{className:"px-4 py-3 w-1/6",children:"Field Changed"}),i.jsx("th",{className:"px-4 py-3 w-1/6",children:"User Affected"}),i.jsx("th",{className:"px-4 py-3 w-1/6",children:"Timestamp"}),i.jsx("th",{className:"px-4 py-3 w-1/4",children:"Notes"}),i.jsx("th",{className:"px-4 py-3 w-1/12",children:"Audit"})]})}),i.jsx("tbody",{children:w1e.map((t,e)=>i.jsxs("tr",{className:"text-sm",children:[i.jsx("td",{className:"px-4 py-3",children:t.editedby}),i.jsx("td",{className:"px-4 py-3",children:t.fieldchanged}),i.jsx("td",{className:"px-4 py-3",children:t.useraffected}),i.jsx("td",{className:"px-4 py-3",children:t.timestamp}),i.jsx("td",{className:"px-4 py-3 whitespace-pre-line",children:t.notes}),i.jsx("td",{className:"px-4 py-3",children:t.audit})]},e))})]})})]}),N1e=Array(9).fill({applicationid:"12345",type:"Driver",area:"Pending",submitted:"28 Jul '25",status:"Pending"}),S1e=()=>i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"flex justify-end items-center my-6 gap-4",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{children:"Date Range :"}),i.jsx("input",{type:"date",value:"",readOnly:!0,className:"bg-[#013A2A] border border-yellow-400 text-yellow-400 px-2 py-1 rounded-md w-28"}),i.jsx("span",{children:"To"}),i.jsx("input",{type:"date",value:"",readOnly:!0,className:"bg-[#013A2A] border border-yellow-400 text-yellow-400 px-2 py-1 rounded-md w-28"})]}),i.jsx("div",{children:i.jsxs("span",{children:["Type:",i.jsxs("select",{className:"bg-transparent focus:outline-none ml-1",children:[i.jsx("option",{value:"",children:"Driver"}),i.jsx("option",{value:"",children:"Rental Driver"})]})]})}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{children:"Status:"}),i.jsxs("select",{className:"bg-transparent focus:outline-none",children:[i.jsx("option",{value:"",children:"Pending"}),i.jsx("option",{value:"",children:"Approved"})]})]})]}),i.jsx("div",{className:"mx-4 overflow-x-auto border border-yellow-400 rounded-xl",children:i.jsxs("table",{className:"w-full text-left",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-yellow-400 text-yellow-400",children:[i.jsx("th",{className:"px-4 py-3",children:"Application ID"}),i.jsxs("th",{className:"px-4 py-3",children:["Type",i.jsxs("select",{name:"",id:"",className:"bg-transparent focus:outline-none ",children:[i.jsx("option",{value:"",children:"Driver"}),i.jsx("option",{value:"",children:"Rental Driver"})]})]}),i.jsx("th",{className:"px-4 py-3",children:"Area"}),i.jsx("th",{className:"px-4 py-3",children:"Submitted"}),i.jsx("th",{className:"px-4 py-3",children:"Status"}),i.jsx("th",{className:"px-4 py-3 text-center",children:"Action"})]})}),i.jsx("tbody",{children:N1e.map((t,e)=>i.jsxs("tr",{className:" text-sm",children:[i.jsx("td",{className:"px-4 py-3",children:t.applicationid}),i.jsx("td",{className:"px-4 py-3",children:t.type}),i.jsx("td",{className:"px-4 py-3",children:t.area}),i.jsx("td",{className:"px-4 py-3",children:t.submitted}),i.jsx("td",{className:"px-4 py-3",children:t.status}),i.jsx("td",{className:"px-4 py-3",children:i.jsxs("div",{className:"flex items-center justify-center gap-2",children:[i.jsx($f,{className:"cursor-pointer hover:text-red-500",size:20}),i.jsx(Ff,{className:"cursor-pointer hover:text-green-500",size:16}),i.jsx("button",{className:"bg-yellow-400 text-black px-4 py-1 rounded-full text-sm hover:bg-yellow-300",children:"View"})]})})]},e))})]})})]}),A1e=Array(9).fill({sentto:"Driver:Rizwan",type:"Rental Agreement",senton:"Aug 1",status:"Pending"}),C1e=()=>i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"flex justify-end items-center my-6 gap-4",children:[i.jsxs("div",{className:"flex items-center text-sm",children:[i.jsx("span",{children:"Date Range:"}),i.jsx("input",{type:"date",value:"",readOnly:!0,className:"bg-[#013A2A] border border-yellow-400 text-yellow-400 px-2 py-1 rounded-md w-28"}),i.jsx("span",{children:"To"}),i.jsx("input",{type:"date",value:"",readOnly:!0,className:"bg-[#013A2A] border border-yellow-400 text-yellow-400 px-2 py-1 rounded-md w-28"})]}),i.jsx("div",{className:"text-sm",children:i.jsxs("span",{children:["Type:",i.jsxs("select",{className:"bg-transparent focus:outline-none ml-1",children:[i.jsx("option",{value:"",children:"Driver"}),i.jsx("option",{value:"",children:"Rental Driver"})]})]})}),i.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[i.jsx("span",{children:"Status:"}),i.jsxs("select",{className:"bg-transparent focus:outline-none",children:[i.jsx("option",{value:"",children:"Pending"}),i.jsx("option",{value:"",children:"Approved"})]})]})]}),i.jsx("div",{className:"mx-4 overflow-x-auto border border-yellow-400 rounded-xl",children:i.jsxs("table",{className:"w-full text-left",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-yellow-400 text-yellow-400",children:[i.jsx("th",{className:"px-4 py-3",children:"Sent To"}),i.jsx("th",{className:"px-4 py-3",children:"Type"}),i.jsx("th",{className:"px-4 py-3",children:"Sent On"}),i.jsx("th",{className:"px-4 py-3",children:"Status"}),i.jsx("th",{className:"px-4 py-3",children:"Action"})]})}),i.jsx("tbody",{children:A1e.map((t,e)=>i.jsxs("tr",{className:"text-sm",children:[i.jsx("td",{className:"px-4 py-3",children:t.sentto}),i.jsx("td",{className:"px-4 py-3",children:t.type}),i.jsx("td",{className:"px-4 py-3",children:t.senton}),i.jsx("td",{className:"px-4 py-3",children:t.status}),i.jsx("td",{className:"px-4 py-3",children:i.jsx("button",{className:"bg-yellow-400 text-black px-4 py-1 rounded-full text-sm hover:bg-yellow-300",children:"Resend"})})]},e))})]})})]}),k1e=()=>{const[t,e]=O.useState("driver"),r=[{key:"driver",label:"New Driver/Service Provider Approvals"},{key:"career",label:"Career Proposals"},{key:"manual",label:"Manual Edits Log"},{key:"agreement",label:"Agreement Sent Log"}];let n;return t==="driver"?n=i.jsx(S1e,{}):t==="career"?n=i.jsx(v1e,{}):t==="manual"?n=i.jsx(j1e,{}):t==="agreement"&&(n=i.jsx(C1e,{})),i.jsxs("div",{className:"flex bg-[#13220] min-h-screen",children:[i.jsx(Ue,{}),i.jsxs("div",{className:"flex-1 overflow-hidden",children:[i.jsx(_s,{}),i.jsxs("div",{className:"p-6 space-y-6",children:[i.jsx("div",{className:"flex justify-between",children:r.map(a=>i.jsx("button",{onClick:()=>e(a.key),className:`px-8 py-2 rounded font-semibold transition duration-150 ${t===a.key?"bg-yellow-400 text-black":"border border-yellow-400 text-yellow-300 hover:bg-yellow-300 hover:text-black"}`,children:a.label},a.key))}),i.jsx("div",{children:n})]})]})]})},D1e={image:"https://i.pravatar.cc/100?img=1",children:[{image:"https://i.pravatar.cc/100?img=2",children:[{image:"https://i.pravatar.cc/100?img=5"},{image:"https://i.pravatar.cc/100?img=6"}]},{image:"https://i.pravatar.cc/100?img=3",children:[{image:"https://i.pravatar.cc/100?img=7"},{image:"https://i.pravatar.cc/100?img=8"},{image:"https://i.pravatar.cc/100?img=9",children:[{image:"https://i.pravatar.cc/100?img=13"},{image:"https://i.pravatar.cc/100?img=14"}]}]},{image:"https://i.pravatar.cc/100?img=4",children:[{image:"https://i.pravatar.cc/100?img=10"},{image:"https://i.pravatar.cc/100?img=11"},{image:"https://i.pravatar.cc/100?img=12"}]}]},GI=({node:t})=>i.jsxs("div",{className:"flex flex-col items-center relative",children:[i.jsx("div",{className:"w-16 h-16 rounded-full overflow-hidden border-4 border-yellow-300 bg-yellow-300 z-10",children:i.jsx("img",{src:t.image,alt:"",className:"w-full h-full object-cover"})}),t.children&&i.jsx("div",{className:"h-6 w-0.5 bg-yellow-300"}),t.children&&i.jsxs("div",{className:"flex justify-center items-start relative pt-6",children:[i.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-full max-w-fit flex justify-center",children:i.jsx("div",{className:"h-0.5 bg-yellow-300",style:{width:`${t.children.length*90}px`}})}),t.children.map((e,r)=>i.jsxs("div",{className:"flex flex-col items-center relative mx-2",children:[i.jsx("div",{className:"w-0.5 h-6 bg-white absolute top-0 left-1/2 transform -translate-x-1/2"}),i.jsx(GI,{node:e})]},r))]})]}),T1e=()=>i.jsxs("div",{className:"min-h-screen py-10 w-full overflow-x-auto",children:[i.jsx("h2",{className:"text-xl font-bold text-yellow-400 px-4 mb-10",children:"Tree View Growth"}),i.jsx("div",{className:"flex justify-center border border-yellow-300 w-full max-w-3xl py-10 mx-auto",children:i.jsx(GI,{node:D1e})})]}),M1e=[{Rank:"#1",username:"Usman Khan",totalincome:"AED 58,000",Ranktitle:"Gold",bbrstatus:"Archieved"},{Rank:"#2",username:"Usman Khan",totalincome:"AED 58,000",Ranktitle:"Gold",bbrstatus:"In Progress"}],E1e=()=>i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"flex justify-end items-center my-6 gap-4",children:[i.jsxs("div",{className:"flex items-center text-sm gap-2",children:[i.jsx("span",{children:"Date Range :"}),i.jsx("input",{type:"date",value:"",readOnly:!0,className:"bg-[#013A2A] border border-yellow-400 text-yellow-400 px-2 py-1 rounded-md w-28"}),i.jsx("span",{children:"To"}),i.jsx("input",{type:"date",value:"",readOnly:!0,className:"bg-[#013A2A] border border-yellow-400 text-yellow-400 px-2 py-1 rounded-md w-28"})]}),i.jsx("div",{children:i.jsxs("span",{children:["Type:",i.jsxs("select",{className:"bg-transparent focus:outline-none text-sm",children:[i.jsx("option",{value:"",children:"Driver"}),i.jsx("option",{value:"",children:"Rental Driver"})]})]})}),i.jsxs("div",{className:"flex items-center text-sm pr-6",children:[i.jsx("span",{children:"City:"}),i.jsxs("select",{className:"bg-transparent focus:outline-none",children:[i.jsx("option",{value:"",children:"Dubai"}),i.jsx("option",{value:"",children:"Dubai"})]})]})]}),i.jsx("div",{className:"mx-4 overflow-x-auto border border-yellow-400 rounded-xl",children:i.jsxs("table",{className:"w-full text-left",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-yellow-400 text-yellow-400",children:[i.jsx("th",{className:"px-4 py-3",children:"Rank"}),i.jsx("th",{className:"px-4 py-3",children:"User Name"}),i.jsx("th",{className:"px-4 py-3",children:"Total Income"}),i.jsx("th",{className:"px-4 py-3",children:"Rank Title"}),i.jsx("th",{className:"px-4 py-3",children:"BBR Status"})]})}),i.jsx("tbody",{children:M1e.map((t,e)=>i.jsxs("tr",{className:"text-sm",children:[i.jsx("td",{className:"px-4 py-3",children:t.Rank}),i.jsx("td",{className:"px-4 py-3",children:t.username}),i.jsx("td",{className:"px-4 py-3",children:t.totalincome}),i.jsx("td",{className:"px-4 py-3",children:t.Ranktitle}),i.jsx("td",{className:"px-4 py-3",children:t.bbrstatus})]},e))})]})})]}),O1e=[{total:"Total Downline Income",percent:"AED 754,000",desc:"Earnings generated from all levels",Icon:Qq},{total:"Total Team Size",percent:"1,250 Members",desc:"Users in direct + indirect downline",Icon:qq},{total:"Top Rank Achiever",percent:"Aku Zafar(Gold Rank)",desc:"Highest rank achieved in this period",Icon:Zq}],P1e=()=>i.jsxs("div",{className:"flex min-h-screen",children:[i.jsx(Ue,{}),i.jsxs("div",{className:"flex-1 overflow-hidden",children:[i.jsx(_s,{}),i.jsx("div",{className:"mr-10 px-10 py-10 overflow-hidden",children:i.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6 mt-6",children:O1e.map((t,e)=>{const r=t.Icon;return i.jsxs("div",{className:"flex flex-col gap-4 shadow-lg rounded-lg outline outline-black/20 px-5 py-5 bg-gradient-to-b from-[#038A59] to-[#013723] shadow-black/80",children:[i.jsxs("div",{className:"flex gap-2 items-center",children:[i.jsx(r,{size:30}),i.jsx("p",{className:"text-lg font-semibold m-0 tracking-wide",children:t.total})]}),i.jsx("h2",{className:"text-2xl font-bold",children:t.percent}),i.jsx("p",{className:"text-sm",children:t.desc})]},e)})})}),i.jsx(T1e,{}),i.jsx(E1e,{})]})]}),_1e=[{user:"Sara",transactionid:"TXN-9812",reason:"Insufficient balance",date:"Aug 4",status:"Failed"},{user:"Sara",transactionid:"TXN-9812",reason:"Insufficient balance",date:"Aug 4",status:"Failed"}],R1e=()=>i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"flex justify-end items-center my-6 gap-4",children:[i.jsxs("div",{className:"flex items-center text-sm gap-2",children:[i.jsx("span",{children:"Date Range :"}),i.jsx("input",{type:"date",value:"",readOnly:!0,className:"bg-[#013A2A] border border-yellow-400 text-yellow-400 px-2 py-1 rounded-md w-28"}),i.jsx("span",{children:"To"}),i.jsx("input",{type:"date",value:"",readOnly:!0,className:"bg-[#013A2A] border border-yellow-400 text-yellow-400 px-2 py-1 rounded-md w-28"})]}),i.jsx("div",{children:i.jsxs("span",{children:["Type:",i.jsxs("select",{className:"bg-transparent focus:outline-none text-sm",children:[i.jsx("option",{value:"",children:"Driver"}),i.jsx("option",{value:"",children:"Rental Driver"})]})]})}),i.jsxs("div",{className:"flex items-center text-sm pr-6",children:[i.jsx("span",{children:"Status:"}),i.jsxs("select",{className:"bg-transparent focus:outline-none",children:[i.jsx("option",{value:"",children:"Failed"}),i.jsx("option",{value:"",children:"Success"})]})]})]}),i.jsx("div",{className:"mx-4 overflow-x-auto border border-yellow-400 rounded-xl",children:i.jsxs("table",{className:"w-full text-left",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-yellow-400 text-yellow-400",children:[i.jsx("th",{className:"px-4 py-3",children:"User"}),i.jsx("th",{className:"px-4 py-3",children:"Transaction ID"}),i.jsx("th",{className:"px-4 py-3",children:"Reason"}),i.jsx("th",{className:"px-4 py-3",children:"Date"}),i.jsx("th",{className:"px-4 py-3",children:"Status"}),i.jsx("th",{className:"px-4 py-3",children:"Action"})]})}),i.jsx("tbody",{children:_1e.map((t,e)=>i.jsxs("tr",{className:"text-sm",children:[i.jsx("td",{className:"px-4 py-3",children:t.user}),i.jsx("td",{className:"px-4 py-3",children:t.transactionid}),i.jsx("td",{className:"px-4 py-3",children:t.reason}),i.jsx("td",{className:"px-4 py-3",children:t.date}),i.jsx("td",{className:"px-4 py-3",children:t.status}),i.jsx("td",{className:"px-4 py-3",children:i.jsxs("div",{className:"flex gap-2",children:[i.jsx("div",{className:"p-1 border border-yellow-300 rounded-full",children:i.jsx(lq,{size:20})}),i.jsx("div",{className:"p-1 border border-yellow-300 rounded-full flex justify-center ",children:i.jsx(g_,{size:20})})]})})]},e))})]})})]}),L1e=()=>{const t={chart:{type:"line",height:350,background:"#013220",toolbar:{show:!1}},stroke:{curve:"straight",width:3},colors:["#FF0000","#0000FF"],xaxis:{categories:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],axisBorder:{show:!0,color:"#DDC104"},axisTicks:{show:!0,color:"#DDC104"},labels:{style:{colors:"#DDC104"}}},yaxis:{min:500,max:2e3,tickAmount:3,axisBorder:{show:!0,color:"#DDC104"},axisTicks:{show:!0,color:"#DDC104"},labels:{style:{colors:"#DDC104"}}},grid:{borderColor:"#DDC104",strokeDashArray:0},legend:{position:"right",labels:{colors:"#FFFFFF"},markers:{radius:12}},markers:{size:5},tooltip:{theme:"dark"}},e=[{name:"Wallet Deductions",data:[800,1200,1500,1800,1e3,1600,500]},{name:"Wallet Top-Ups",data:[1500,1e3,1300,1700,900,1400,700]}];return i.jsxs("div",{className:"bg-[#013220] p-4 rounded-lg",children:[i.jsx("h2",{className:"mb-4 text-xl font-semibold",children:"Weekly Rides Overview"}),i.jsxs("div",{className:"flex justify-end",children:[i.jsxs("div",{className:"flex items-center text-sm gap-2",children:[i.jsx("span",{children:"Date Range :"}),i.jsx("input",{type:"date",value:"",readOnly:!0,className:"bg-[#013A2A] border border-yellow-400 text-yellow-400 px-2 py-1 rounded-md w-28"}),i.jsx("span",{children:"To"}),i.jsx("input",{type:"date",value:"",readOnly:!0,className:"bg-[#013A2A] border border-yellow-400 text-yellow-400 px-2 py-1 rounded-md w-28"})]}),i.jsxs("div",{className:"flex items-center text-sm pr-6",children:[i.jsx("span",{children:"Transaction Type:"}),i.jsxs("select",{className:"bg-transparent focus:outline-none",children:[i.jsx("option",{value:"",children:"Top-Ups"}),i.jsx("option",{value:"",children:"Deduction"})]})]})]}),i.jsxs("div",{className:"border border-yellow-300 rounded-xl ",children:[i.jsx("h2",{className:"border-b border-yellow-300 px-4 py-6 font-semibold text-lg",children:"Chart Type "}),i.jsx(Qr,{options:t,series:e,type:"line",height:350})]})]})};Ps.register(Do,tc,ec,Qf);const z1e=()=>{const t={labels:["Auto Payouts","Manual Payouts"],datasets:[{data:[82,18],backgroundColor:["#FFD700","#004d26"],borderWidth:0}]},e={responsive:!0,plugins:{legend:{display:!1},tooltip:{enabled:!0},datalabels:{color:"#fff",font:{size:12},formatter:(r,n)=>`${n.chart.data.labels[n.dataIndex]}
${r}%`,anchor:"center",align:"center"}}};return i.jsxs("div",{className:"flex min-h-screen",children:[i.jsx(Ue,{}),i.jsxs("div",{className:"flex-1 overflow-hidden",children:[i.jsx(_s,{}),i.jsxs("div",{className:"flex justify-between w-1/2 px-6 py-6",children:[i.jsx("h2",{className:"text-xl font-bold",children:"Payout Distribution"}),i.jsxs("div",{className:"flex gap-5",children:[i.jsxs("div",{children:[i.jsx("input",{type:"radio",name:"chartitem",id:""}),i.jsx("label",{htmlFor:"",children:"Pie Chart"})]}),i.jsx("input",{type:"radio",name:"chartitem",id:""}),i.jsx("label",{htmlFor:"",children:"Table"})]})]}),i.jsx("div",{style:{width:"300px",margin:"auto"},children:i.jsx(Zf,{data:t,options:e})}),i.jsx(R1e,{}),i.jsx(L1e,{})]})]})};function I1e(){return i.jsxs("div",{className:"flex bg-[#13220] min-h-screen",children:[i.jsx(Ue,{}),i.jsxs("div",{className:"flex-1 overflow-hidden",children:[i.jsx(_s,{}),i.jsx("div",{className:"flex items-center justify-center p-6",children:i.jsxs("div",{className:"w-full max-w-5xl space-y-6",children:[i.jsx("h2",{className:"text-yellow-400 font-medium",children:"Build Your Custom Report"}),i.jsxs("select",{className:"w-full border border-yellow-400 text-yellow-400 bg-transparent rounded-full px-4 py-3 outline-none",children:[i.jsx("option",{value:"",className:"bg-[#003328]",children:"User Type"}),i.jsx("option",{value:"admin",className:"bg-[#003328]",children:"Admin"}),i.jsx("option",{value:"customer",className:"bg-[#003328]",children:"Customer"})]}),i.jsxs("div",{className:"flex items-center gap-4 justify-center",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"text-yellow-400",children:"From"}),i.jsx("input",{type:"date",className:"border border-yellow-400 text-yellow-400 bg-transparent rounded-full px-6 py-2 outline-none w-40 text-center"})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"text-yellow-400",children:"To"}),i.jsx("input",{type:"date",className:"border border-yellow-400 text-yellow-400 bg-transparent rounded-full px-6 py-2 outline-none w-40 text-center"})]})]}),i.jsxs("select",{className:"w-full border border-yellow-400 text-yellow-400 bg-transparent rounded-full px-4 py-3 outline-none",children:[i.jsx("option",{value:"",className:"bg-[#003328]",children:"City"}),i.jsx("option",{value:"newyork",className:"bg-[#003328]",children:"New York"}),i.jsx("option",{value:"london",className:"bg-[#003328]",children:"London"})]}),i.jsxs("select",{className:"w-full border border-yellow-400 text-yellow-400 bg-transparent rounded-full px-4 py-3 outline-none",children:[i.jsx("option",{value:"",className:"bg-[#003328]",children:"Category"}),i.jsx("option",{value:"food",className:"bg-[#003328]",children:"Food"}),i.jsx("option",{value:"travel",className:"bg-[#003328]",children:"Travel"})]}),i.jsx("div",{className:"text-center",children:i.jsx(Pe,{to:"/customreporttable",className:"bg-yellow-400 text-[#003328] font-medium px-6 py-2 rounded-full hover:bg-yellow-500 transition",children:"Generate Report"})})]})})]})]})}const B1e=[{name:"Ali",servicetype:"Ride",Bookingid:"R-9872",date:"Aug 4, 2025",amount:"AED 15,000",status:"Completed"},{name:"Ali",servicetype:"Ride",Bookingid:"R-9872",date:"Aug 4, 2025",amount:"AED 15,000",status:"Cancelled"}],F1e=()=>i.jsx(i.Fragment,{children:i.jsxs("div",{className:"flex bg-[#13220] min-h-screen ",children:[i.jsx(Ue,{}),i.jsxs("div",{className:"flex-1 overflow-hidden",children:[i.jsx(_s,{}),i.jsx("div",{className:"p-4",children:i.jsx("h2",{className:"text-lg font-semibold pt-6",children:"Build your Custom Report"})}),i.jsx("div",{className:"mx-4 overflow-x-auto border border-yellow-400 rounded-xl my-6",children:i.jsxs("table",{className:"w-full text-left",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-yellow-400 text-yellow-400",children:[i.jsx("th",{className:"px-4 py-3",children:"Name"}),i.jsx("th",{className:"px-4 py-3",children:"Service Type"}),i.jsx("th",{className:"px-4 py-3",children:"Booking ID"}),i.jsx("th",{className:"px-4 py-3",children:"Date"}),i.jsx("th",{className:"px-4 py-3",children:"Amount"}),i.jsx("th",{className:"px-4 py-3",children:"Status"})]})}),i.jsx("tbody",{children:B1e.map((t,e)=>i.jsxs("tr",{className:"text-sm",children:[i.jsx("td",{className:"px-4 py-3",children:t.name}),i.jsx("td",{className:"px-4 py-3",children:t.servicetype}),i.jsx("td",{className:"px-4 py-3",children:t.Bookingid}),i.jsx("td",{className:"px-4 py-3",children:t.date}),i.jsx("td",{className:"px-4 py-3",children:t.amount}),i.jsx("td",{className:"px-4 py-3",children:t.status})]},e))})]})})]})]})}),H1e={image:"https://i.pravatar.cc/100?img=1",children:[{image:"https://i.pravatar.cc/100?img=2",children:[{image:"https://i.pravatar.cc/100?img=3"},{image:"https://i.pravatar.cc/100?img=6"},{image:"https://i.pravatar.cc/100?img=6"}]},{image:"https://i.pravatar.cc/100?img=7",children:[{image:"https://i.pravatar.cc/100?img=8"},{image:"https://i.pravatar.cc/100?img=9",children:[{image:"https://i.pravatar.cc/100?img=9"},{image:"https://i.pravatar.cc/100?img=9",children:[{image:"https://i.pravatar.cc/100?img=9"},{image:"https://i.pravatar.cc/100?img=9"},{image:"https://i.pravatar.cc/100?img=9"}]},{image:"https://i.pravatar.cc/100?img=9"}]},{image:"https://i.pravatar.cc/100?img=9"}]},{image:"https://i.pravatar.cc/100?img=9",children:[{image:"https://i.pravatar.cc/100?img=9"},{image:"https://i.pravatar.cc/100?img=9"},{image:"https://i.pravatar.cc/100?img=9"}]}]},KI=({node:t})=>i.jsxs("div",{className:"flex flex-col items-center",children:[i.jsxs("div",{className:"relative flex flex-col items-center",children:[i.jsx("img",{src:t.image,alt:"profile",className:"w-20 h-20 rounded-full border-4 border-yellow-500 object-cover z-10"}),t.children&&t.children.length>0&&i.jsx("div",{className:"w-0.5 bg-yellow-500 h-6"})]}),t.children&&t.children.length>0&&i.jsxs("div",{className:"relative flex justify-center mt-3",children:[i.jsx("div",{className:"absolute top-0 left-0 right-0 flex justify-center",children:i.jsx("div",{className:"bg-yellow-500 w-full h-0.5"})}),i.jsx("div",{className:"flex gap-16 pt-2",children:t.children.map((e,r)=>i.jsxs("div",{className:"relative flex flex-col items-center",children:[i.jsx("div",{className:"absolute -top-2 left-1/2 -translate-x-1/2 w-0.5 bg-yellow-500 h-2"}),i.jsx(KI,{node:e})]},r))})]})]});function $1e(){return i.jsxs(i.Fragment,{children:[i.jsx(Zl,{}),i.jsx("div",{children:i.jsxs("div",{className:"flex items-center gap-2 justify-end",children:[i.jsxs("div",{className:"flex items-center pt-2 ",children:[i.jsxs("label",{className:"flex items-center space-x-2",children:[i.jsx("div",{className:"text-sm flex items-center gap-1",children:i.jsx("span",{children:"Date Range:"})}),i.jsx("input",{type:"date",className:"bg-transparent rounded border py-1 border-yellow-300 text-yellow-300 focus:outline-none text-sm"})]}),i.jsx("span",{className:"text-sm pr-3",children:"To"}),i.jsxs("label",{className:"flex items-center space-x-2",children:[i.jsxs("div",{className:"text-sm flex items-center gap-1",children:[" ",i.jsx("span",{children:"Date:"})]}),i.jsx("input",{type:"date",className:"bg-transparent rounded py-1 border border-yellow-300 text-yellow-300 focus:outline-none text-sm"})]})]}),i.jsxs("div",{className:"pr-4 text-sm",children:[i.jsx("label",{htmlFor:"",children:"Sort By: "}),i.jsx("select",{name:"",id:"",className:"bg-transparent focus:outline-none",children:i.jsx("option",{value:"",children:"Name"})})]})]})}),i.jsx("div",{className:" min-h-screen pt-10 flex justify-center items-start w-full max-w-5xl mx-auto",children:i.jsx("div",{className:"relative flex flex-col items-center ",children:i.jsx(KI,{node:H1e})})})]})}const Y1e=({theme:t="light"})=>{const[e,r]=O.useState({identifier:"",password:""}),[n,a]=O.useState(!1),[s,o]=O.useState({}),l=Ba(),c=Ao(),{isAuthenticated:u,error:h,loading:p}=ua(N=>N.auth),[m,{isLoading:x}]=MX();O.useEffect(()=>{u&&c("/home")},[u,c]);const y=N=>{const{name:A,value:S}=N.target;r(C=>({...C,[A]:S})),o(C=>({...C,[A]:"",form:""})),l(C5(null))},b=()=>{const N={};return e.identifier.trim()||(N.identifier="Email or phone number is required"),e.password||(N.password="Password is required"),o(N),Object.keys(N).length===0},w=async N=>{if(N.preventDefault(),!!b()){l(k5(!0));try{const S={[e.identifier.includes("@")?"email":"phone"]:e.identifier,password:e.password},C=await m(S).unwrap();l(u8({user:C.user,token:C.token})),c("/home")}catch(A){l(C5(A?.data?.message||"Login failed. Please try again.")),o(S=>({...S,form:A?.data?.message||"Login failed"}))}finally{l(k5(!1))}}};return i.jsx("div",{className:`min-h-screen flex items-center justify-center px-4 py-8 transition-colors duration-300 ${t==="dark"?"bg-gradient-to-b from-gray-800 to-gray-900":"bg-gray-100"}`,children:i.jsx("div",{className:`shadow-lg rounded-2xl w-full max-w-md my-8 sm:my-12 overflow-hidden transition-colors duration-300 ${t==="dark"?"bg-gray-800":"bg-white"}`,children:i.jsxs("div",{className:"w-full flex flex-col justify-center items-center p-6 sm:p-10",children:[i.jsx("h2",{className:`text-2xl sm:text-3xl font-semibold mb-4 text-center ${t==="dark"?"text-yellow-400":"text-[#013220]"}`,children:"Log in to Your Account"}),(s.form||h)&&i.jsx("p",{className:`text-sm mb-4 text-center ${t==="dark"?"text-red-400":"text-red-600"}`,children:s.form||h}),i.jsxs("form",{onSubmit:w,className:"w-full max-w-sm space-y-4",children:[i.jsxs("div",{children:[s.identifier&&i.jsx("p",{className:`text-sm mb-1 ${t==="dark"?"text-red-400":"text-red-600"}`,children:s.identifier}),i.jsx("input",{type:"text",name:"identifier",value:e.identifier,onChange:y,placeholder:"Email or Phone Number",className:`w-full rounded-lg px-4 py-2 border focus:ring-2 focus:ring-yellow-500 outline-none transition-colors duration-300 ${t==="dark"?`bg-gray-600 border-gray-500 text-white placeholder-gray-300 ${s.identifier?"!border-red-500":""}`:`bg-white border-gray-300 text-gray-900 placeholder-gray-500 ${s.identifier?"!border-red-600":""}`}`,disabled:x||p})]}),i.jsxs("div",{children:[s.password&&i.jsx("p",{className:`text-sm mb-1 ${t==="dark"?"text-red-400":"text-red-600"}`,children:s.password}),i.jsxs("div",{className:"relative",children:[i.jsx("input",{type:n?"text":"password",name:"password",value:e.password,onChange:y,placeholder:"Password",className:`w-full rounded-lg px-4 py-2 border focus:ring-2 focus:ring-yellow-500 outline-none pr-10 transition-colors duration-300 ${t==="dark"?`bg-gray-600 border-gray-500 text-white placeholder-gray-300 ${s.password?"!border-red-500":""}`:`bg-white border-gray-300 text-gray-900 placeholder-gray-500 ${s.password?"!border-red-600":""}`}`,disabled:x||p}),i.jsx("div",{className:`absolute right-3 top-3 cursor-pointer ${t==="dark"?"text-gray-300":"text-gray-500"}`,onClick:()=>a(!n),children:n?i.jsx(uq,{}):i.jsx(y_,{})})]})]}),i.jsxs("div",{className:`flex justify-between items-center text-sm ${t==="dark"?"text-gray-300":"text-gray-600"}`,children:[i.jsxs("label",{className:"flex items-center gap-2",children:[i.jsx("input",{type:"checkbox",className:`w-4 h-4 ${t==="dark"?"text-yellow-400":"text-[#013220]"}`,disabled:x||p}),"Remember me"]}),i.jsx(Pe,{to:"/forgot-password",className:`hover:underline ${t==="dark"?"text-teal-400":"text-teal-600"}`,children:"Forgot password?"})]}),i.jsx("button",{type:"submit",className:`w-full p-3 font-semibold rounded-full transition-colors duration-300 ${t==="dark"?"bg-yellow-500 text-gray-900 hover:bg-yellow-400":"bg-yellow-500 text-[#013220] hover:bg-yellow-400"} ${x||p?"opacity-50 cursor-not-allowed":""}`,disabled:x||p,children:x||p?"Logging In...":"Log In"})]})]})})})},U1e=()=>{const[t,e]=O.useState([]),[r,n]=O.useState({username:"",firstName:"",email:"",phoneNumber:"",password:"",permissions:[]}),[a,s]=O.useState(null),[o,l]=O.useState({}),[c,u]=O.useState(!1),[h,p]=O.useState(null),m=["home","mlm","dispatch","drivermanagement","customermanagement","proposalmanagement","overview","paymentoverview","chatdetail","kycverification","reportanalytics","reviewandrating","adminmanagement"];O.useEffect(()=>{x()},[]);const x=async()=>{try{const T=await _e.get("https://aaaogo.xyz/api/user/admins",{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}});e(T.data.admins||[])}catch(T){Ne.error(T.response?.data?.message||"Failed to fetch admins")}},y=T=>{const{name:E,value:_}=T.target;a?s({...a,[E]:_}):n({...r,[E]:_}),l({...o,[E]:""})},b=T=>{a?s({...a,permissions:a.permissions.includes(T)?a.permissions.filter(E=>E!==T):[...a.permissions,T]}):n({...r,permissions:r.permissions.includes(T)?r.permissions.filter(E=>E!==T):[...r.permissions,T]})},w=T=>{const E={};return T.username||(E.username="Username is required"),T.firstName||(E.firstName="First name is required"),T.email||(E.email="Email is required"),T.phoneNumber||(E.phoneNumber="Phone number is required"),!a&&!T.password&&(E.password="Password is required"),T.permissions.length===0&&(E.permissions="At least one permission is required"),E},N=async T=>{T.preventDefault();const E=w(r);if(Object.keys(E).length>0){l(E),Object.values(E).forEach(_=>Ne.error(_));return}try{const _=await _e.post("https://aaaogo.xyz/api/user/admin/add-admin",r,{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}});Ne.success(_.data.message||"Admin added successfully"),n({username:"",firstName:"",email:"",phoneNumber:"",password:"",permissions:[]}),l({}),x()}catch(_){const L=_.response?.data?.errors||{};l(L),Ne.error(_.response?.data?.message||"Failed to add admin")}},A=async T=>{T.preventDefault();const E=w(a);if(Object.keys(E).length>0){l(E),Object.values(E).forEach(_=>Ne.error(_));return}try{await _e.put(`https://aaaogo.xyz/api/user/admin/edit-admin/${a._id}`,a,{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}}),Ne.success("Admin updated successfully"),s(null),l({}),x()}catch(_){const L=_.response?.data?.errors||{};l(L),Ne.error(_.response?.data?.message||"Failed to update admin")}},S=T=>{p(T),u(!0)},C=async()=>{if(h)try{await _e.delete(`https://aaaogo.xyz/api/user/admin/delete-admin/${h}`,{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}}),Ne.success("Admin deleted successfully"),x()}catch(T){Ne.error(T.response?.data?.message||"Failed to delete admin")}u(!1),p(null)},k=()=>{u(!1),p(null)};return i.jsxs("div",{className:"p-6 bg-[#013220] min-h-screen text-[#DDC104]",children:[i.jsx("h1",{className:"text-2xl font-bold mb-6",children:"Admin Management"}),i.jsxs("div",{className:"mb-8 p-6 bg-[#013220] border border-[#3A5719] rounded-lg shadow-md",children:[i.jsx("h2",{className:"text-xl font-semibold mb-4",children:a?"Edit Admin":"Add New Admin"}),i.jsxs("form",{onSubmit:a?A:N,children:[i.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[i.jsxs("div",{children:[i.jsx("input",{type:"text",name:"username",value:a?a.username:r.username,onChange:y,placeholder:"Username",className:"p-2 border border-[#DDC104] rounded w-full bg-[#013220] text-[#DDC104] placeholder-[#DDC104] focus:outline-none focus:border-yellow-400"}),o.username&&i.jsx("p",{className:"text-red-500 text-sm",children:o.username})]}),i.jsxs("div",{children:[i.jsx("input",{type:"text",name:"firstName",value:a?a.firstName:r.firstName,onChange:y,placeholder:"First Name",className:"p-2 border border-[#DDC104] rounded w-full bg-[#013220] text-[#DDC104] placeholder-[#DDC104] focus:outline-none focus:border-yellow-400"}),o.firstName&&i.jsx("p",{className:"text-red-500 text-sm",children:o.firstName})]}),i.jsxs("div",{children:[i.jsx("input",{type:"email",name:"email",value:a?a.email:r.email,onChange:y,placeholder:"Email",className:"p-2 border border-[#DDC104] rounded w-full bg-[#013220] text-[#DDC104] placeholder-[#DDC104] focus:outline-none focus:border-yellow-400"}),o.email&&i.jsx("p",{className:"text-red-500 text-sm",children:o.email})]}),i.jsxs("div",{children:[i.jsx("input",{type:"tel",name:"phoneNumber",value:a?a.phoneNumber:r.phoneNumber,onChange:y,placeholder:"Phone Number",className:"p-2 border border-[#DDC104] rounded w-full bg-[#013220] text-[#DDC104] placeholder-[#DDC104] focus:outline-none focus:border-yellow-400"}),o.phoneNumber&&i.jsx("p",{className:"text-red-500 text-sm",children:o.phoneNumber})]}),!a&&i.jsxs("div",{children:[i.jsx("input",{type:"password",name:"password",value:r.password,onChange:y,placeholder:"Password",className:"p-2 border border-[#DDC104] rounded w-full bg-[#013220] text-[#DDC104] placeholder-[#DDC104] focus:outline-none focus:border-yellow-400"}),o.password&&i.jsx("p",{className:"text-red-500 text-sm",children:o.password})]})]}),i.jsxs("div",{className:"mb-4",children:[i.jsx("h3",{className:"font-semibold mb-2",children:"Permissions"}),i.jsx("div",{className:"grid grid-cols-3 gap-2",children:m.map(T=>i.jsxs("label",{className:"flex items-center text-[#DDC104]",children:[i.jsx("input",{type:"checkbox",checked:a?a.permissions.includes(T):r.permissions.includes(T),onChange:()=>b(T),className:"mr-2 accent-[#DDC104]"}),T.charAt(0).toUpperCase()+T.slice(1)]},T))}),o.permissions&&i.jsx("p",{className:"text-red-500 text-sm",children:o.permissions})]}),i.jsx("button",{type:"submit",className:"bg-[#DDC104] text-[#013220] px-4 py-2 rounded hover:bg-yellow-400 hover:text-black transition",children:a?"Update Admin":"Add Admin"}),a&&i.jsx("button",{type:"button",onClick:()=>{s(null),l({})},className:"ml-2 bg-gray-300 text-[#013220] px-4 py-2 rounded hover:bg-gray-400 hover:text-black transition",children:"Cancel"})]})]}),i.jsxs("div",{className:"p-6 bg-[#013220] border border-[#3A5719] rounded-lg shadow-md",children:[i.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Current Admins"}),t.length===0?i.jsx("p",{children:"No admins found."}):i.jsx("div",{className:"grid gap-4",children:t.map(T=>i.jsxs("div",{className:"p-4 border border-[#DDC104] rounded-lg flex justify-between items-center",children:[i.jsxs("div",{children:[i.jsxs("p",{children:[i.jsx("strong",{children:"Username:"})," ",T.username]}),i.jsxs("p",{children:[i.jsx("strong",{children:"Name:"})," ",T.firstName," ",T.lastName||""]}),i.jsxs("p",{children:[i.jsx("strong",{children:"Email:"})," ",T.email]}),i.jsxs("p",{children:[i.jsx("strong",{children:"Phone:"})," ",T.phoneNumber]}),i.jsxs("p",{children:[i.jsx("strong",{children:"Permissions:"})," ",T.adminPermissions.join(", ")]})]}),i.jsxs("div",{children:[i.jsx("button",{onClick:()=>s({...T,permissions:T.adminPermissions}),className:"bg-[#DDC104] text-[#013220] px-3 py-1 rounded mr-2 hover:bg-yellow-400 hover:text-black transition",children:"Edit"}),i.jsx("button",{onClick:()=>S(T._id),className:"bg-red-500 text-white px-3 py-1 rounded hover:bg-red-600 transition",children:"Delete"})]})]},T._id))})]}),i.jsx(md,{isOpen:c,title:"Delete Admin",message:"Are you sure you want to delete this admin? This action cannot be undone.",onConfirm:C,onClose:k})]})},yP=["low","medium","high","urgent"],W1e=["technical","billing","account","booking","payment","driver","vehicle","mlm","general","other"],X1e=()=>{const[t,e]=O.useState([]),[r,n]=O.useState(!0),[a,s]=O.useState(!1),[o,l]=O.useState(null),[c,u]=O.useState(!1),[h,p]=O.useState({status:"all",priority:"all",category:"all",search:""}),[m,x]=O.useState({currentPage:1,totalPages:1,totalTickets:0,limit:10}),[y,b]=O.useState(!1),[w,N]=O.useState({ticketId:"",assignedTo:"",internalNote:""}),[A,S]=O.useState([]),[C,k]=O.useState(!1),[T,E]=O.useState({message:"",isInternal:!1}),[_,L]=O.useState(!1),[P,R]=O.useState([]),[z,B]=O.useState(null),[Y,X]=O.useState(!1),[H,W]=O.useState(!1),[V,Z]=O.useState("all"),[F,G]=O.useState([]),[te,K]=O.useState([]),[U,re]=O.useState([]),[ae,we]=O.useState(!1),[ye,ue]=O.useState({currentPage:1,totalPages:1,totalResponses:0}),[je,Ce]=O.useState(!1),[pe,Ye]=O.useState(null),[Re,gt]=O.useState([]),[Ut,xt]=O.useState({currentPage:1,totalPages:1,totalTickets:0}),[vn,pa]=O.useState(!1),[Ft,Hn]=O.useState({ticketId:"",escalateTo:"",reason:""}),[Xe,eu]=O.useState(!1),[vb,oc]=O.useState(!1),[Ro,dn]=O.useState([]),[ls,Mr]=O.useState(!1),[Lo,zo]=O.useState({ticketId:"",newStatus:"",note:""}),[wb,Rs]=O.useState(!1),[Jr,wn]=O.useState({ticketId:"",currentPriority:"",newPriority:"",reason:""}),en=async(Q=m.currentPage,Ee=!1)=>{try{n(!0);const Ke="https://aaaogo.xyz/api",We=Ee?1:Q,nt=new URLSearchParams({page:We.toString(),limit:10});V!=="all"&&(h.status!=="all"&&nt.append("status",h.status),h.priority!=="all"&&nt.append("priority",h.priority),h.category!=="all"&&nt.append("category",h.category));const $o=await _e.get(`${Ke}/support/tickets?${nt}`,{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}});$o.data.success&&(e($o.data.data.tickets),x({...$o.data.data.pagination,limit:10}))}catch(Ke){console.error("Error fetching tickets:",Ke),Ne.error("Failed to fetch tickets")}finally{n(!1)}},Io=async(Q,Ee,Ke)=>{try{const nt=await _e.patch(`https://aaaogo.xyz/api/support/tickets/${Q}/escalate`,{escalateTo:Ee,reason:Ke},{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}});if(nt.data.success)return nt.data}catch(We){throw console.error("Error escalating ticket:",We),We}},jb=async()=>{try{const Ee=await _e.get("https://aaaogo.xyz/api/user/admins-and-superadmins",{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}});if(Ee.data.success)return Ee.data.users}catch(Q){throw console.error("Error fetching admins and superadmins:",Q),Q}},Bo=(Q,Ee)=>{p(Ke=>({...Ke,[Q]:Ee})),Q!=="search"&&(s(!0),x(Ke=>({...Ke,currentPage:1})),setTimeout(()=>{en(1,!0),s(!1)},100))},yp=Q=>{s(!0),x(Ee=>({...Ee,limit:parseInt(Q),currentPage:1})),setTimeout(()=>{en(1,!0),s(!1)},100)},Fo=Q=>{n(!0),x(Ee=>({...Ee,currentPage:Q})),en(Q)},Ls=async(Q=1,Ee=10,Ke="",We="",nt="desc",$o=!1)=>{try{n(!0);const Ei="https://aaaogo.xyz/api",Oi=new URLSearchParams({page:Q.toString(),limit:Ee.toString(),sortOrder:nt});Ke&&Oi.append("priority",Ke),We&&Oi.append("category",We);const tn=await _e.get(`${Ei}/support/escalated-tickets?${Oi}`,{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}});tn.data.success&&(gt(tn.data.data.tickets),$o||V==="escalated"?(e(tn.data.data.tickets),xt(tn.data.data.pagination),x(tn.data.data.pagination)):xt(tn.data.data.pagination))}catch(Ei){console.error("Error fetching escalated tickets:",Ei),Ne.error("Failed to fetch escalated tickets. Please try again.")}finally{n(!1)}},vp=async Q=>{try{const Ke=await _e.get(`https://aaaogo.xyz/api/support/tickets/${Q}`,{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}});Ke.data.success&&(l(Ke.data.data.ticket),u(!0),$n(Q))}catch(Ee){console.error("Error fetching ticket details:",Ee)}},wp=async(Q,Ee,Ke="")=>{try{const nt=await _e.patch(`https://aaaogo.xyz/api/support/tickets/${Q}/status`,{status:Ee,internalNote:Ke},{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}});nt.data.success&&(en(m.currentPage),o&&o._id===Q&&l(nt.data.data.ticket),Ne.success("Ticket status updated successfully!"))}catch(We){console.error("Error updating ticket status:",We),Ne.error("Failed to update ticket status")}},jp=()=>{wp(Lo.ticketId,Lo.newStatus,Lo.note),Mr(!1),zo({ticketId:"",newStatus:"",note:""})},tu=async(Q,Ee,Ke="")=>{try{const nt=await _e.patch(`https://aaaogo.xyz/api/support/tickets/${Q}/priority`,{priority:Ee,reason:Ke},{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}});nt.data.success&&(en(m.currentPage),o&&o._id===Q&&l(nt.data.data.ticket),Ne.success("Ticket priority updated successfully!"))}catch(We){console.error("Error updating ticket priority:",We),Ne.error("Failed to update ticket priority")}},ru=()=>{tu(Jr.ticketId,Jr.newPriority,Jr.reason),Rs(!1),wn({ticketId:"",currentPriority:"",newPriority:"",reason:""})},Np=async(Q,Ee,Ke="")=>{try{const nt=await _e.patch(`https://aaaogo.xyz/api/support/tickets/${Q}/assign`,{agentId:Ee,internalNote:Ke},{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}});if(nt.data.success)return en(m.currentPage),o&&o._id===Q&&l(nt.data.data.ticket),nt.data}catch(We){throw console.error("Error assigning ticket:",We),We}},Nb=async(Q,Ee,Ke=!1)=>{try{const nt=await _e.post(`https://aaaogo.xyz/api/support/tickets/${Q}/responses`,{message:Ee,isInternal:Ke},{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}});if(nt.data.success)return o&&o._id===Q&&vp(Q),nt.data}catch(We){throw console.error("Error adding ticket response:",We),We}},cs=async()=>{try{const Ee=await _e.get("https://aaaogo.xyz/api/support/statistics",{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}});if(Ee.data.success)return Ee.data.data}catch(Q){throw console.error("Error fetching ticket statistics:",Q),Q}},ur=async(Q=1,Ee=!1)=>{try{n(!0);const We=await _e.get(`https://aaaogo.xyz/api/support/my-assigned-tickets?page=${Q}`,{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}});We.data.success&&(G(We.data.data.tickets),(Ee||V==="assigned")&&(e(We.data.data.tickets),x(We.data.data.pagination)))}catch(Ke){console.error("Error fetching assigned tickets:",Ke)}finally{n(!1)}},Er=async(Q=1,Ee=!1)=>{try{n(!0);const We=await _e.get(`https://aaaogo.xyz/api/support/unassigned-tickets?page=${Q}`,{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}});We.data.success&&(K(We.data.data.tickets),(Ee||V==="unassigned")&&(e(We.data.data.tickets),x(We.data.data.pagination)))}catch(Ke){console.error("Error fetching unassigned tickets:",Ke)}finally{n(!1)}},$n=async(Q,Ee=1)=>{try{we(!0);const We=await _e.get(`https://aaaogo.xyz/api/support/tickets/${Q}/responses?page=${Ee}`,{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}});We.data.success&&(re(We.data.data.responses),R(We.data.data.responses),ue(We.data.data.pagination))}catch(Ke){console.error("Error fetching ticket responses:",Ke),Ne.error("Failed to fetch ticket responses. Please try again.")}finally{we(!1)}},lc=async()=>{if(!w.assignedTo){Ne.error("Please select an agent");return}try{k(!0),await Np(w.ticketId,w.assignedTo,w.internalNote),oc(!1),N({ticketId:"",assignedTo:"",internalNote:""}),Ne.success("Ticket assigned successfully!"),zs()}catch{Ne.error("Failed to assign ticket. Please try again.")}finally{k(!1)}},Sb=async()=>{if(!T.message.trim()){Ne.error("Please enter a message");return}try{L(!0),await Nb(o._id,T.message,T.isInternal),E({message:"",isInternal:!1}),$n(o._id),Ne.success("Response added successfully!")}catch{Ne.error("Failed to add response. Please try again.")}finally{L(!1)}},Ab=async()=>{try{W(!0);const Q=await cs();B(Q),X(!0)}catch{Ne.error("Failed to fetch statistics. Please try again.")}finally{W(!1)}},Sp=async()=>{try{eu(!0),await Io(Ft.ticketId,Ft.escalateTo,Ft.reason),pa(!1),Hn({ticketId:"",escalateTo:"",reason:""}),Ne.success("Ticket escalated successfully!"),zs()}catch{Ne.error("Failed to escalate ticket. Please try again.")}finally{eu(!1)}},Ho=Q=>{Hn({...Ft,ticketId:Q}),pa(!0)},nu=(Q,Ee)=>{wn({...Jr,ticketId:Q,currentPriority:Ee}),Rs(!0)},Mi=async Q=>{try{const Ee=await jb();dn(Ee),N({...w,ticketId:Q}),oc(!0)}catch{Ne.error("Failed to load admins. Please try again.")}},Ua=Q=>{switch(Z(Q),e([]),n(!0),Q){case"all":en(1,!0);break;case"assigned":ur(1,!0);break;case"unassigned":Er(1,!0);break;case"escalated":Ls(1,10,"","","desc",!0);break;default:en(1,!0)}},zs=()=>{switch(V){case"assigned":ur();break;case"unassigned":Er();break;case"escalated":Ls();break;default:en()}};O.useEffect(()=>{en()},[]),O.useEffect(()=>{V==="all"?en():V==="assigned"?ur():V==="unassigned"?Er():V==="escalated"&&Ls()},[h.status,h.priority,h.category,m.currentPage,m.limit,V]);const Wa=Q=>{switch(Q){case"high":return i.jsx(u6,{className:"text-red-500",size:20});case"medium":return i.jsx(Fh,{className:"text-yellow-500",size:16});case"low":return i.jsx(h6,{className:"text-green-500",size:20});default:return i.jsx(h6,{className:"text-gray-500",size:20})}},Qt=Q=>{switch(Q){case"open":return"text-red-400 bg-red-900/20 border-red-400";case"in-progress":return"text-yellow-400 bg-yellow-900/20 border-yellow-400";case"resolved":return"text-green-400 bg-green-900/20 border-green-400";case"closed":return"text-gray-400 bg-gray-900/20 border-gray-400";default:return"text-gray-400 bg-gray-900/20 border-gray-400"}},ds=Q=>new Date(Q).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}),au=t.filter(Q=>{const Ee=h.status==="all"||Q.status===h.status,Ke=h.priority==="all"||Q.priority===h.priority,We=h.category==="all"||Q.category===h.category,nt=h.search===""||Q.subject.toLowerCase().includes(h.search.toLowerCase())||Q.ticketId.toLowerCase().includes(h.search.toLowerCase())||Q.user&&`${Q.user.firstName||""} ${Q.user.lastName||""}`.toLowerCase().includes(h.search.toLowerCase());return Ee&&Ke&&We&&nt});return i.jsxs("div",{className:"flex bg-[#013220] text-yellow-400 min-h-screen",children:[i.jsx(d_,{position:"top-right",toastOptions:{duration:4e3,style:{background:"#1f2937",color:"#f59e0b",border:"1px solid #059669"},success:{iconTheme:{primary:"#10b981",secondary:"#ffffff"}},error:{iconTheme:{primary:"#ef4444",secondary:"#ffffff"}}}}),i.jsx(Ue,{}),i.jsxs("div",{className:"flex-1 p-3 md:p-6 min-w-0",children:[i.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-start sm:items-center mb-6 md:mb-8 bg-gradient-to-r from-[#1a4a2e] to-[#2d5a3d] p-4 md:p-6 rounded-xl border border-yellow-400/20 shadow-lg",children:[i.jsxs("div",{className:"mb-4 sm:mb-0",children:[i.jsx("h1",{className:"text-2xl md:text-3xl font-bold text-yellow-400",children:"Customer Support"}),i.jsx("p",{className:"text-gray-400 mt-1 text-sm md:text-base",children:"Manage and track customer tickets efficiently"})]}),i.jsxs("div",{className:"flex gap-2 md:gap-3 flex-wrap",children:[i.jsxs("button",{onClick:Ab,disabled:H,className:"flex items-center gap-2 px-4 md:px-6 py-2 md:py-3 bg-gradient-to-r from-green-600 to-green-500 text-white rounded-lg hover:from-green-500 hover:to-green-400 transition-all duration-200 disabled:opacity-50 shadow-lg hover:shadow-xl transform hover:scale-105 text-sm md:text-base",children:[i.jsx(l6,{size:16,className:"md:w-5 md:h-5"}),H?"Loading...":"Statistics"]}),i.jsxs("button",{onClick:zs,className:"flex items-center gap-2 px-4 md:px-6 py-2 md:py-3 bg-gradient-to-r from-yellow-400 to-yellow-300 text-[#013220] rounded-lg hover:from-yellow-300 hover:to-yellow-200 transition-all duration-200 shadow-lg hover:shadow-xl transform hover:scale-105 font-medium text-sm md:text-base",children:[i.jsx(K2,{size:20}),"Refresh"]})]})]}),i.jsxs("div",{className:"flex gap-3 mb-8 bg-[#1a4a2e] p-2 rounded-xl border border-yellow-400/20",children:[i.jsx("button",{onClick:()=>Ua("all"),className:`px-6 py-3 rounded-lg font-medium transition-all duration-200 transform hover:scale-105 ${V==="all"?"bg-gradient-to-r from-yellow-400 to-yellow-300 text-[#013220] shadow-lg":"text-yellow-400 hover:bg-yellow-400/10 hover:text-yellow-300"}`,children:"All Tickets"}),i.jsxs("button",{onClick:()=>Ua("assigned"),className:`px-6 py-3 rounded-lg font-medium transition-all duration-200 transform hover:scale-105 ${V==="assigned"?"bg-gradient-to-r from-yellow-400 to-yellow-300 text-[#013220] shadow-lg":"text-yellow-400 hover:bg-yellow-400/10 hover:text-yellow-300"}`,children:["My Assigned ",i.jsx("span",{className:"bg-green-500 text-white px-2 py-1 rounded-full text-xs ml-2",children:F.length})]}),i.jsxs("button",{onClick:()=>Ua("unassigned"),className:`px-6 py-3 rounded-lg font-medium transition-all duration-200 transform hover:scale-105 ${V==="unassigned"?"bg-gradient-to-r from-yellow-400 to-yellow-300 text-[#013220] shadow-lg":"text-yellow-400 hover:bg-yellow-400/10 hover:text-yellow-300"}`,children:["Unassigned ",i.jsx("span",{className:"bg-red-500 text-white px-2 py-1 rounded-full text-xs ml-2",children:te.length})]}),i.jsxs("button",{onClick:()=>Ua("escalated"),className:`px-6 py-3 rounded-lg font-medium transition-all duration-200 transform hover:scale-105 ${V==="escalated"?"bg-gradient-to-r from-yellow-500 to-yellow-400 text-[#013220] shadow-lg":"text-yellow-400 hover:bg-yellow-400/10 hover:text-yellow-300"}`,children:["Escalated ",i.jsx("span",{className:"bg-orange-500 text-white px-2 py-1 rounded-full text-xs ml-2",children:Re.length})]})]}),i.jsxs("div",{className:"bg-gradient-to-r from-[#1a4a2e] to-[#2d5a3d] border border-yellow-400/30 rounded-xl p-6 mb-8 shadow-lg",children:[a&&i.jsxs("div",{className:"flex items-center gap-2 mb-4 text-yellow-300",children:[i.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-yellow-400"}),i.jsx("span",{className:"text-sm",children:"Applying filters..."})]}),i.jsxs("div",{className:"flex flex-wrap gap-6 items-center",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"p-2 bg-yellow-400/20 rounded-lg",children:i.jsx(l6,{size:20,className:"text-yellow-400"})}),i.jsx("span",{className:"font-semibold text-lg text-yellow-300",children:"Filters:"})]}),i.jsxs("div",{className:"flex items-center gap-3 bg-[#013220] border border-yellow-400/30 rounded-lg px-4 py-2 focus-within:border-yellow-400 transition-colors",children:[i.jsx(Tq,{size:20,className:"text-yellow-400"}),i.jsx("input",{type:"text",placeholder:"Search tickets by ID, subject, or user...",value:h.search,onChange:Q=>Bo("search",Q.target.value),className:"bg-transparent text-white placeholder-gray-400 focus:outline-none flex-1 min-w-[200px]"})]}),i.jsxs("select",{value:h.status,onChange:Q=>Bo("status",Q.target.value),className:"bg-[#013220] border border-yellow-400/30 rounded-lg px-4 py-2 text-white focus:outline-none focus:border-yellow-400 transition-colors hover:border-yellow-400/50 cursor-pointer",children:[i.jsx("option",{value:"all",className:"bg-[#013220]",children:"All Status"}),i.jsx("option",{value:"open",className:"bg-[#013220]",children:"Open"}),i.jsx("option",{value:"in-progress",className:"bg-[#013220]",children:"In Progress"}),i.jsx("option",{value:"resolved",className:"bg-[#013220]",children:"Resolved"}),i.jsx("option",{value:"closed",className:"bg-[#013220]",children:"Closed"})]}),i.jsxs("select",{value:h.priority,onChange:Q=>Bo("priority",Q.target.value),className:"bg-[#013220] border border-yellow-400/30 rounded-lg px-4 py-2 text-white focus:outline-none focus:border-yellow-400 transition-colors hover:border-yellow-400/50 cursor-pointer",children:[i.jsx("option",{value:"all",className:"bg-[#013220]",children:"All Priority"}),yP.map(Q=>i.jsx("option",{value:Q,className:"capitalize bg-[#013220]",children:Q.charAt(0).toUpperCase()+Q.slice(1)},Q))]}),i.jsxs("select",{value:h.category,onChange:Q=>Bo("category",Q.target.value),className:"bg-[#013220] border border-yellow-400/30 rounded-lg px-4 py-2 text-white focus:outline-none focus:border-yellow-400 transition-colors hover:border-yellow-400/50 cursor-pointer",children:[i.jsx("option",{value:"all",className:"bg-[#013220]",children:"All Categories"}),W1e.map(Q=>i.jsx("option",{value:Q,className:"capitalize bg-[#013220]",children:Q.charAt(0).toUpperCase()+Q.slice(1)},Q))]})]}),i.jsxs("div",{className:"flex flex-col",children:[i.jsx("label",{className:"text-yellow-300 text-sm font-medium mb-2",children:"Items per page"}),i.jsxs("select",{value:m.limit,onChange:Q=>yp(Q.target.value),className:"bg-[#013220] border border-yellow-400/30 rounded-lg px-4 py-2 text-white focus:outline-none focus:border-yellow-400 transition-colors hover:border-yellow-400/50 cursor-pointer",children:[i.jsx("option",{value:10,className:"bg-[#013220]",children:"10"}),i.jsx("option",{value:25,className:"bg-[#013220]",children:"25"}),i.jsx("option",{value:50,className:"bg-[#013220]",children:"50"}),i.jsx("option",{value:100,className:"bg-[#013220]",children:"100"})]})]})]}),i.jsx("div",{className:"bg-gradient-to-br from-[#1a4a2e] to-[#2d5a3d] border border-yellow-400/30 rounded-xl overflow-hidden shadow-2xl",children:r?i.jsxs("div",{className:"flex flex-col justify-center items-center py-16",children:[i.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-yellow-400 mb-4"}),i.jsx("p",{className:"text-yellow-300 font-medium",children:"Loading tickets..."})]}):i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"overflow-x-auto",children:i.jsxs("table",{className:"w-full",children:[i.jsx("thead",{className:"bg-gradient-to-r from-yellow-400 to-yellow-300 text-[#013220]",children:i.jsxs("tr",{children:[i.jsx("th",{className:"px-6 py-4 text-left font-bold tracking-wide",children:"Ticket ID"}),i.jsx("th",{className:"px-6 py-4 text-left font-bold tracking-wide",children:"Customer"}),i.jsx("th",{className:"px-6 py-4 text-left font-bold tracking-wide",children:"Subject"}),i.jsx("th",{className:"px-6 py-4 text-left font-bold tracking-wide",children:"Priority"}),i.jsx("th",{className:"px-6 py-4 text-left font-bold tracking-wide",children:"Status"}),i.jsx("th",{className:"px-6 py-4 text-left font-bold tracking-wide",children:"Category"}),i.jsx("th",{className:"px-6 py-4 text-left font-bold tracking-wide",children:"Created"}),i.jsx("th",{className:"px-6 py-4 text-left font-bold tracking-wide",children:"Actions"})]})}),i.jsx("tbody",{children:au.length===0?i.jsx("tr",{children:i.jsx("td",{colSpan:"8",className:"px-4 py-8 text-center text-gray-400",children:"No tickets found"})}):au.map(Q=>i.jsxs("tr",{className:"border-b border-yellow-400/20 hover:bg-gradient-to-r hover:from-yellow-400/5 hover:to-green-400/5 transition-all duration-200 group",children:[i.jsx("td",{className:"px-4 py-4 font-mono text-sm font-medium text-yellow-300",children:Q.ticketId}),i.jsx("td",{className:"px-4 py-4",children:i.jsxs("div",{children:[i.jsx("div",{className:"font-medium text-white group-hover:text-yellow-300 transition-colors",children:Q.user?`${Q.user.firstName||"N/A"} ${Q.user.lastName||""}`:"N/A"}),i.jsx("div",{className:"text-sm text-gray-400 group-hover:text-gray-300 transition-colors",children:Q.user&&Q.user.email||"N/A"})]})}),i.jsx("td",{className:"px-4 py-4",children:i.jsx("div",{className:"max-w-xs truncate font-medium",title:Q.subject,children:Q.subject})}),i.jsx("td",{className:"px-4 py-4",children:i.jsxs("div",{className:"flex items-center gap-2",children:[Wa(Q.priority),i.jsx("span",{className:"capitalize font-medium",children:Q.priority})]})}),i.jsx("td",{className:"px-4 py-4",children:i.jsx("span",{className:`px-3 py-1 rounded-full text-xs font-medium border whitespace-nowrap ${Qt(Q.status)}`,children:Q.status.replace("-"," ").toUpperCase()})}),i.jsx("td",{className:"px-4 py-4 capitalize font-medium",children:Q.category}),i.jsx("td",{className:"px-4 py-4 text-sm text-gray-300",children:ds(Q.createdAt)}),i.jsx("td",{className:"px-4 py-4",children:i.jsxs("div",{className:"flex gap-1",children:[i.jsx("button",{onClick:()=>vp(Q._id),className:"p-2 text-blue-400 hover:text-white hover:bg-blue-500 rounded-lg transition-all duration-200 hover:scale-105 hover:shadow-lg border border-blue-400/30 hover:border-blue-500",title:"View Details",children:i.jsx(y_,{size:14})}),i.jsx("button",{onClick:()=>{l(Q),u(!0),$n(Q._id)},className:"p-2 text-green-400 hover:text-white hover:bg-green-500 rounded-lg transition-all duration-200 hover:scale-105 hover:shadow-lg border border-green-400/30 hover:border-green-500",title:"Quick Edit",children:i.jsx(jh,{size:14})}),i.jsx("button",{onClick:()=>Mi(Q._id),className:"p-2 text-yellow-400 hover:text-black hover:bg-yellow-400 rounded-lg transition-all duration-200 hover:scale-105 hover:shadow-lg border border-yellow-400/30 hover:border-yellow-400",title:"Assign Ticket",children:i.jsx(n1,{size:14})}),i.jsx("button",{onClick:()=>{Ye(Q),Ce(!0),$n(Q._id)},className:"p-2 text-purple-400 hover:text-white hover:bg-purple-500 rounded-lg transition-all duration-200 hover:scale-105 hover:shadow-lg border border-purple-400/30 hover:border-purple-500",title:"View Responses",children:i.jsx(sq,{size:14})}),i.jsx("button",{onClick:()=>Ho(Q._id),className:"p-2 text-red-400 hover:text-white hover:bg-red-500 rounded-lg transition-all duration-200 hover:scale-105 hover:shadow-lg border border-red-400/30 hover:border-red-500",title:"Escalate Ticket",children:i.jsx(d6,{size:14})}),i.jsx("button",{onClick:()=>nu(Q._id,Q.priority),className:"p-2 text-orange-400 hover:text-white hover:bg-orange-500 rounded-lg transition-all duration-200 hover:scale-105 hover:shadow-lg border border-orange-400/30 hover:border-orange-500",title:"Change Priority",children:i.jsx(u6,{size:14})})]})})]},Q._id))})]})}),m.totalPages>1&&i.jsxs("div",{className:"flex justify-between items-center p-4 border-t border-yellow-400/20",children:[i.jsxs("div",{className:"text-sm text-gray-400",children:["Showing ",(m.currentPage-1)*m.limit+1," to ",Math.min(m.currentPage*m.limit,m.totalTickets)," of ",m.totalTickets," tickets"]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("button",{onClick:()=>Fo(m.currentPage-1),disabled:!m.hasPrevPage,className:"px-3 py-1 bg-yellow-400 text-[#013220] rounded disabled:opacity-50 disabled:cursor-not-allowed hover:bg-yellow-300 transition-colors",children:"Previous"}),i.jsx("div",{className:"flex gap-1",children:(()=>{const Q=[];let Ke=Math.max(1,m.currentPage-Math.floor(2.5)),We=Math.min(m.totalPages,Ke+5-1);We-Ke+1<5&&(Ke=Math.max(1,We-5+1));for(let nt=Ke;nt<=We;nt++)Q.push(i.jsx("button",{onClick:()=>Fo(nt),className:`px-3 py-1 rounded transition-colors ${nt===m.currentPage?"bg-yellow-400 text-[#013220] font-medium":"bg-[#013220] text-yellow-400 border border-yellow-400/30 hover:bg-yellow-400/10"}`,children:nt},nt));return Q})()}),i.jsx("button",{onClick:()=>Fo(m.currentPage+1),disabled:!m.hasNextPage,className:"px-3 py-1 bg-yellow-400 text-[#013220] rounded disabled:opacity-50 disabled:cursor-not-allowed hover:bg-yellow-300 transition-colors",children:"Next"})]})]})]})}),c&&o&&i.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:i.jsx("div",{className:"bg-[#013220] border border-yellow-400 rounded-lg max-w-4xl w-full mx-4 max-h-[90vh] overflow-y-auto",children:i.jsxs("div",{className:"p-6",children:[i.jsxs("div",{className:"flex justify-between items-center mb-6",children:[i.jsxs("h2",{className:"text-xl font-bold",children:["Ticket Details - ",o.ticketId]}),i.jsx("button",{onClick:()=>u(!1),className:"text-gray-400 hover:text-white text-2xl",children:"×"})]}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[i.jsxs("div",{className:"space-y-4",children:[i.jsx("h3",{className:"text-lg font-semibold border-b border-yellow-400/30 pb-2",children:"Customer Information"}),i.jsxs("div",{className:"space-y-2",children:[i.jsxs("p",{children:[i.jsx("span",{className:"font-medium",children:"Name:"})," ",o.user?`${o.user.firstName||"N/A"} ${o.user.lastName||""}`:"N/A"]}),i.jsxs("p",{children:[i.jsx("span",{className:"font-medium",children:"Email:"})," ",o.user&&o.user.email||"N/A"]}),i.jsxs("p",{children:[i.jsx("span",{className:"font-medium",children:"Phone:"})," ",o.user&&o.user.phoneNumber||"N/A"]})]})]}),i.jsxs("div",{className:"space-y-4",children:[i.jsx("h3",{className:"text-lg font-semibold border-b border-yellow-400/30 pb-2",children:"Ticket Information"}),i.jsxs("div",{className:"space-y-2",children:[i.jsxs("p",{children:[i.jsx("span",{className:"font-medium",children:"Subject:"})," ",o.subject]}),i.jsxs("p",{children:[i.jsx("span",{className:"font-medium",children:"Category:"})," ",o.category]}),i.jsxs("p",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"font-medium",children:"Priority:"}),Wa(o.priority),i.jsx("span",{className:"capitalize",children:o.priority})]}),i.jsxs("p",{children:[i.jsx("span",{className:"font-medium",children:"Created:"})," ",ds(o.createdAt)]}),i.jsxs("p",{children:[i.jsx("span",{className:"font-medium",children:"Last Updated:"})," ",ds(o.updatedAt)]})]})]})]}),i.jsxs("div",{className:"mt-6",children:[i.jsx("h3",{className:"text-lg font-semibold border-b border-yellow-400/30 pb-2 mb-4",children:"Description"}),i.jsx("p",{className:"bg-[#1a4a2e] p-4 rounded border border-yellow-400/20",children:o.description})]}),i.jsxs("div",{className:"mt-6",children:[i.jsx("h3",{className:"text-lg font-semibold border-b border-yellow-400/30 pb-2 mb-4",children:"Update Status"}),i.jsxs("div",{className:"flex gap-4 items-center",children:[i.jsxs("select",{value:o.status,onChange:Q=>{const Ee=Q.target.value;zo({ticketId:o._id,newStatus:Ee,note:""}),Mr(!0)},className:"bg-[#1a4a2e] border border-yellow-400/50 rounded px-3 py-2 focus:outline-none focus:border-yellow-400",children:[i.jsx("option",{value:"open",children:"Open"}),i.jsx("option",{value:"in-progress",children:"In Progress"}),i.jsx("option",{value:"resolved",children:"Resolved"}),i.jsx("option",{value:"closed",children:"Closed"})]}),i.jsxs("span",{className:`px-3 py-1 rounded-full text-sm border whitespace-nowrap ${Qt(o.status)}`,children:["Current: ",o.status.replace("-"," ").toUpperCase()]})]})]}),o.internalNotes&&o.internalNotes.length>0&&i.jsxs("div",{className:"mt-6",children:[i.jsx("h3",{className:"text-lg font-semibold border-b border-yellow-400/30 pb-2 mb-4",children:"Internal Notes"}),i.jsx("div",{className:"space-y-2",children:o.internalNotes.map((Q,Ee)=>i.jsxs("div",{className:"bg-[#1a4a2e] p-3 rounded border border-yellow-400/20",children:[i.jsx("p",{className:"text-sm",children:Q.note}),i.jsx("p",{className:"text-xs text-gray-400 mt-1",children:ds(Q.addedAt)})]},Ee))})]}),i.jsxs("div",{className:"mt-6",children:[i.jsx("h3",{className:"text-lg font-semibold border-b border-yellow-400/30 pb-2 mb-4",children:"Responses"}),i.jsx("div",{className:"space-y-3 mb-4 max-h-60 overflow-y-auto",children:P.length>0?P.map((Q,Ee)=>i.jsxs("div",{className:`p-3 rounded border ${Q.isInternal?"bg-[#1a4a2e] border-yellow-400/20":"bg-[#0f3a1f] border-green-400/20"}`,children:[i.jsxs("div",{className:"flex justify-between items-start mb-2",children:[i.jsxs("span",{className:"text-sm font-medium text-yellow-400",children:[Q.respondent?.firstName," ",Q.respondent?.lastName]}),i.jsxs("div",{className:"flex items-center gap-2",children:[Q.isInternal&&i.jsx("span",{className:"text-xs bg-yellow-400/20 text-yellow-400 px-2 py-1 rounded",children:"Internal"}),i.jsx("span",{className:"text-xs text-gray-400",children:ds(Q.createdAt)})]})]}),i.jsx("p",{className:"text-sm",children:Q.message})]},Ee)):i.jsx("p",{className:"text-gray-400 text-sm italic",children:"No responses yet"})}),i.jsxs("div",{className:"border-t border-yellow-400/30 pt-4",children:[i.jsx("h4",{className:"text-md font-medium text-yellow-400 mb-3",children:"Add Response"}),i.jsxs("div",{className:"space-y-3",children:[i.jsx("textarea",{value:T.message,onChange:Q=>E({...T,message:Q.target.value}),placeholder:"Type your response here...",className:"w-full bg-[#1a4a2e] border border-yellow-400/50 rounded px-3 py-2 focus:outline-none focus:border-yellow-400 text-yellow-400 resize-none",rows:3}),i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[i.jsx("input",{type:"checkbox",checked:T.isInternal,onChange:Q=>E({...T,isInternal:Q.target.checked}),className:"rounded border-yellow-400/50 bg-[#1a4a2e] text-yellow-400 focus:ring-yellow-400"}),i.jsx("span",{className:"text-yellow-400",children:"Internal response (not visible to customer)"})]}),i.jsx("button",{onClick:Sb,disabled:_||!T.message.trim(),className:"px-4 py-2 bg-yellow-400 text-[#013220] rounded hover:bg-yellow-300 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:_?"Adding...":"Add Response"})]})]})]})]})]})})}),y&&i.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:i.jsxs("div",{className:"bg-[#013220] border border-yellow-400 rounded-lg p-6 w-full max-w-md mx-4",children:[i.jsxs("div",{className:"flex justify-between items-center mb-4",children:[i.jsx("h2",{className:"text-xl font-bold text-yellow-400",children:"Assign Ticket"}),i.jsx("button",{onClick:()=>{b(!1),N({ticketId:"",assignedTo:"",internalNote:""})},className:"text-gray-400 hover:text-yellow-400 text-2xl",children:"×"})]}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm font-medium text-yellow-400 mb-2",children:"Select Agent"}),i.jsxs("select",{value:w.assignedTo,onChange:Q=>N({...w,assignedTo:Q.target.value}),className:"w-full bg-[#1a4a2e] border border-yellow-400/50 rounded px-3 py-2 focus:outline-none focus:border-yellow-400 text-yellow-400",required:!0,children:[i.jsx("option",{value:"",children:"Choose an agent..."}),A.map(Q=>i.jsxs("option",{value:Q._id,children:[Q.firstName," ",Q.lastName," (",Q.email,")"]},Q._id))]})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm font-medium text-yellow-400 mb-2",children:"Internal Note (Optional)"}),i.jsx("textarea",{value:w.internalNote,onChange:Q=>N({...w,internalNote:Q.target.value}),placeholder:"Add any internal notes about this assignment...",className:"w-full bg-[#1a4a2e] border border-yellow-400/50 rounded px-3 py-2 focus:outline-none focus:border-yellow-400 text-yellow-400 resize-none",rows:3})]}),i.jsxs("div",{className:"flex gap-3 pt-4",children:[i.jsx("button",{onClick:()=>{b(!1),N({ticketId:"",assignedTo:"",internalNote:""})},className:"flex-1 px-4 py-2 border border-gray-400 text-gray-400 rounded hover:bg-gray-400/10 transition-colors",disabled:C,children:"Cancel"}),i.jsx("button",{onClick:lc,disabled:C||!w.assignedTo,className:"flex-1 px-4 py-2 bg-yellow-400 text-[#013220] rounded hover:bg-yellow-300 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:C?"Assigning...":"Assign Ticket"})]})]})]})}),vn&&i.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:i.jsxs("div",{className:"bg-[#013220] border border-red-400 rounded-lg p-6 w-full max-w-md mx-4",children:[i.jsxs("div",{className:"flex justify-between items-center mb-4",children:[i.jsx("h2",{className:"text-xl font-bold text-red-400",children:"Escalate Ticket"}),i.jsx("button",{onClick:()=>{pa(!1),Hn({ticketId:"",escalateTo:"",reason:""})},className:"text-gray-400 hover:text-red-400 text-2xl",children:"×"})]}),i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"bg-red-900/20 border border-red-400/30 rounded-lg p-4",children:[i.jsxs("div",{className:"flex items-center gap-2 text-red-400",children:[i.jsx(Fh,{size:16}),i.jsx("span",{className:"text-sm font-medium",children:"Escalation Notice"})]}),i.jsx("p",{className:"text-sm text-red-300 mt-2",children:"This ticket will be escalated to a higher authority. Please provide clear reasoning for the escalation."})]}),i.jsxs("div",{children:[i.jsxs("label",{className:"block text-sm font-medium text-red-400 mb-2",children:["Escalate To (Agent ID) ",i.jsx("span",{className:"text-red-500",children:"*"})]}),i.jsx("input",{type:"text",value:Ft.escalateTo,onChange:Q=>Hn({...Ft,escalateTo:Q.target.value.trim()}),placeholder:"Enter agent ID to escalate to...",className:"w-full bg-[#1a4a2e] border border-red-400/50 rounded-lg px-4 py-3 focus:outline-none focus:border-red-400 focus:ring-2 focus:ring-red-400/20 text-red-400 transition-all duration-200",required:!0}),Ft.escalateTo&&Ft.escalateTo.length<3&&i.jsx("p",{className:"text-red-400 text-xs mt-1",children:"Agent ID must be at least 3 characters long"})]}),i.jsxs("div",{children:[i.jsxs("label",{className:"block text-sm font-medium text-red-400 mb-2",children:["Escalation Reason ",i.jsx("span",{className:"text-red-500",children:"*"})]}),i.jsx("textarea",{value:Ft.reason,onChange:Q=>Hn({...Ft,reason:Q.target.value}),placeholder:"Explain why this ticket needs to be escalated...\\n\\nExample reasons:\\n• Complex technical issue requiring specialist\\n• Customer complaint requiring management attention\\n• Urgent priority escalation\\n• Policy exception needed",className:"w-full bg-[#1a4a2e] border border-red-400/50 rounded-lg px-4 py-3 focus:outline-none focus:border-red-400 focus:ring-2 focus:ring-red-400/20 text-red-400 resize-none transition-all duration-200",rows:6,required:!0}),i.jsxs("div",{className:"flex justify-between items-center mt-1",children:[i.jsx("p",{className:"text-red-400 text-xs",children:Ft.reason.length<10&&Ft.reason.length>0?"Please provide more detailed reasoning":""}),i.jsxs("span",{className:"text-xs text-gray-400",children:[Ft.reason.length,"/500"]})]})]}),i.jsxs("div",{className:"flex gap-4 pt-6 border-t border-red-400/20",children:[i.jsx("button",{onClick:()=>{pa(!1),Hn({ticketId:"",escalateTo:"",reason:""})},className:"flex-1 px-6 py-3 border border-gray-400/50 text-gray-400 rounded-lg hover:bg-gray-400/10 hover:border-gray-400 transition-all duration-200 font-medium",disabled:Xe,children:"Cancel"}),i.jsx("button",{onClick:Sp,disabled:Xe||!Ft.escalateTo||Ft.escalateTo.length<3||!Ft.reason||Ft.reason.length<10,className:"flex-1 px-6 py-3 bg-gradient-to-r from-red-500 to-red-600 text-white rounded-lg hover:from-red-600 hover:to-red-700 transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed font-medium shadow-lg hover:shadow-red-500/25",children:Xe?i.jsxs("div",{className:"flex items-center justify-center gap-2",children:[i.jsx("div",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}),"Escalating..."]}):i.jsxs("div",{className:"flex items-center justify-center gap-2",children:[i.jsx(d6,{size:18}),"Escalate Ticket"]})})]})]})]})}),vb&&i.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:i.jsxs("div",{className:"bg-[#013220] border border-yellow-400 rounded-lg p-6 w-full max-w-md mx-4",children:[i.jsxs("div",{className:"flex justify-between items-center mb-4",children:[i.jsx("h2",{className:"text-xl font-bold text-yellow-400",children:"Assign Ticket"}),i.jsx("button",{onClick:()=>{oc(!1),N({ticketId:"",assignedTo:""})},className:"text-gray-400 hover:text-yellow-400 text-2xl",children:"×"})]}),i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"bg-yellow-900/20 border border-yellow-400/30 rounded-lg p-4",children:[i.jsxs("div",{className:"flex items-center gap-2 text-yellow-400",children:[i.jsx(n1,{size:16}),i.jsx("span",{className:"text-sm font-medium",children:"Ticket Assignment"})]}),i.jsx("p",{className:"text-sm text-yellow-300 mt-2",children:"Select an admin or superadmin to assign this ticket to."})]}),i.jsxs("div",{children:[i.jsxs("label",{className:"block text-sm font-medium text-yellow-400 mb-2",children:["Assign To ",i.jsx("span",{className:"text-red-500",children:"*"})]}),i.jsxs("select",{value:w.assignedTo,onChange:Q=>N({...w,assignedTo:Q.target.value}),className:"w-full bg-[#1a4a2e] border border-yellow-400/50 rounded-lg px-4 py-3 focus:outline-none focus:border-yellow-400 focus:ring-2 focus:ring-yellow-400/20 text-yellow-400 transition-all duration-200",required:!0,children:[i.jsx("option",{value:"",children:"Select admin or superadmin..."}),Ro.map(Q=>i.jsxs("option",{value:Q._id,children:[Q.firstName," ",Q.lastName," (",Q.username,") - ",Q.role.toUpperCase()]},Q._id))]})]}),i.jsxs("div",{className:"flex gap-4 pt-6 border-t border-yellow-400/20",children:[i.jsx("button",{onClick:()=>{oc(!1),N({ticketId:"",assignedTo:""})},className:"flex-1 px-6 py-3 border border-gray-400/50 text-gray-400 rounded-lg hover:bg-gray-400/10 hover:border-gray-400 transition-all duration-200 font-medium",disabled:C,children:"Cancel"}),i.jsx("button",{onClick:lc,disabled:C||!w.assignedTo,className:"flex-1 px-6 py-3 bg-gradient-to-r from-yellow-500 to-yellow-600 text-[#013220] rounded-lg hover:from-yellow-600 hover:to-yellow-700 transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed font-medium shadow-lg hover:shadow-yellow-500/25",children:C?i.jsxs("div",{className:"flex items-center justify-center gap-2",children:[i.jsx("div",{className:"w-4 h-4 border-2 border-[#013220]/30 border-t-[#013220] rounded-full animate-spin"}),"Assigning..."]}):i.jsxs("div",{className:"flex items-center justify-center gap-2",children:[i.jsx(n1,{size:18}),"Assign Ticket"]})})]})]})]})}),Y&&z&&i.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:i.jsxs("div",{className:"bg-[#013220] border border-yellow-400 rounded-lg p-6 w-full max-w-4xl mx-4 max-h-[90vh] overflow-y-auto",children:[i.jsxs("div",{className:"flex justify-between items-center mb-6",children:[i.jsx("h2",{className:"text-2xl font-bold text-yellow-400",children:"Ticket Statistics"}),i.jsx("button",{onClick:()=>X(!1),className:"text-gray-400 hover:text-yellow-400 text-2xl",children:"×"})]}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8",children:[i.jsxs("div",{className:"bg-[#1a4a2e] border border-yellow-400/30 rounded-lg p-4",children:[i.jsx("h3",{className:"text-lg font-semibold text-yellow-400 mb-2",children:"Total Tickets"}),i.jsx("p",{className:"text-3xl font-bold text-white",children:z.overview.totalTickets})]}),i.jsxs("div",{className:"bg-[#1a4a2e] border border-green-400/30 rounded-lg p-4",children:[i.jsx("h3",{className:"text-lg font-semibold text-green-400 mb-2",children:"Open Tickets"}),i.jsx("p",{className:"text-3xl font-bold text-white",children:z.overview.openTickets})]}),i.jsxs("div",{className:"bg-[#1a4a2e] border border-red-400/30 rounded-lg p-4",children:[i.jsx("h3",{className:"text-lg font-semibold text-red-400 mb-2",children:"Unassigned"}),i.jsx("p",{className:"text-3xl font-bold text-white",children:z.overview.unassignedTickets})]}),i.jsxs("div",{className:"bg-[#1a4a2e] border border-blue-400/30 rounded-lg p-4",children:[i.jsx("h3",{className:"text-lg font-semibold text-blue-400 mb-2",children:"Avg Resolution (hrs)"}),i.jsx("p",{className:"text-3xl font-bold text-white",children:z.overview.avgResolutionTimeHours})]})]}),i.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8",children:[i.jsxs("div",{className:"bg-[#1a4a2e] border border-yellow-400/30 rounded-lg p-4",children:[i.jsx("h3",{className:"text-xl font-semibold text-yellow-400 mb-4",children:"Status Distribution"}),i.jsx("div",{className:"space-y-3",children:z.statusStats.map((Q,Ee)=>i.jsxs("div",{className:"flex justify-between items-center",children:[i.jsx("span",{className:"capitalize text-gray-300",children:Q._id.replace("-"," ")}),i.jsx("span",{className:"font-bold text-yellow-400",children:Q.count})]},Ee))})]}),i.jsxs("div",{className:"bg-[#1a4a2e] border border-yellow-400/30 rounded-lg p-4",children:[i.jsx("h3",{className:"text-xl font-semibold text-yellow-400 mb-4",children:"Priority Distribution"}),i.jsx("div",{className:"space-y-3",children:z.priorityStats.map((Q,Ee)=>i.jsxs("div",{className:"flex justify-between items-center",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[Wa(Q._id),i.jsx("span",{className:"capitalize text-gray-300",children:Q._id})]}),i.jsx("span",{className:"font-bold text-yellow-400",children:Q.count})]},Ee))})]}),i.jsxs("div",{className:"bg-[#1a4a2e] border border-yellow-400/30 rounded-lg p-4",children:[i.jsx("h3",{className:"text-xl font-semibold text-yellow-400 mb-4",children:"Category Distribution"}),i.jsx("div",{className:"space-y-3",children:z.categoryStats.map((Q,Ee)=>i.jsxs("div",{className:"flex justify-between items-center",children:[i.jsx("span",{className:"capitalize text-gray-300",children:Q._id}),i.jsx("span",{className:"font-bold text-yellow-400",children:Q.count})]},Ee))})]}),i.jsxs("div",{className:"bg-[#1a4a2e] border border-yellow-400/30 rounded-lg p-4",children:[i.jsx("h3",{className:"text-xl font-semibold text-yellow-400 mb-4",children:"Agent Workload"}),i.jsx("div",{className:"space-y-3",children:z.agentWorkload.map((Q,Ee)=>i.jsxs("div",{className:"border-b border-yellow-400/20 pb-2",children:[i.jsxs("div",{className:"flex justify-between items-center mb-1",children:[i.jsx("span",{className:"font-medium text-gray-300",children:Q.agentName}),i.jsxs("span",{className:"font-bold text-yellow-400",children:[Q.ticketCount," tickets"]})]}),i.jsxs("div",{className:"flex justify-between items-center text-sm",children:[i.jsx("span",{className:"text-gray-400",children:Q.agentEmail}),i.jsxs("span",{className:"text-red-400",children:[Q.highPriorityCount," high priority"]})]})]},Ee))})]})]}),i.jsx("div",{className:"flex justify-center mt-6",children:i.jsx("button",{onClick:()=>X(!1),className:"px-6 py-2 bg-yellow-400 text-[#013220] rounded-lg hover:bg-yellow-300 transition-colors",children:"Close"})})]})}),je&&pe&&i.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:i.jsxs("div",{className:"bg-[#013220] border border-yellow-400 rounded-lg p-6 w-full max-w-4xl mx-4 max-h-[90vh] overflow-y-auto",children:[i.jsxs("div",{className:"flex justify-between items-center mb-6",children:[i.jsxs("h2",{className:"text-2xl font-bold text-yellow-400",children:["Responses for Ticket #",pe.ticketNumber]}),i.jsx("button",{onClick:()=>{Ce(!1),Ye(null),re([])},className:"text-gray-400 hover:text-yellow-400 text-2xl",children:"×"})]}),i.jsx("div",{className:"bg-[#1a4a2e] border border-yellow-400/30 rounded-lg p-4 mb-6",children:i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[i.jsxs("div",{children:[i.jsx("span",{className:"text-gray-400 text-sm",children:"Subject:"}),i.jsx("p",{className:"text-yellow-400 font-medium",children:pe.subject})]}),i.jsxs("div",{children:[i.jsx("span",{className:"text-gray-400 text-sm",children:"Status:"}),i.jsx("p",{className:`font-medium ${Qt(pe.status)}`,children:pe.status.replace("-"," ").toUpperCase()})]}),i.jsxs("div",{children:[i.jsx("span",{className:"text-gray-400 text-sm",children:"Priority:"}),i.jsxs("div",{className:"flex items-center gap-2",children:[Wa(pe.priority),i.jsx("span",{className:"text-white capitalize",children:pe.priority})]})]})]})}),i.jsx("div",{className:"space-y-4 mb-6",children:ae?i.jsx("div",{className:"flex justify-center py-8",children:i.jsx("div",{className:"text-yellow-400",children:"Loading responses..."})}):U.length===0?i.jsx("div",{className:"text-center py-8 text-gray-400",children:"No responses found for this ticket."}):U.map(Q=>i.jsxs("div",{className:`border rounded-lg p-4 ${Q.responseType==="system"?"bg-blue-900/20 border-blue-400/30":Q.responseType==="agent"?"bg-green-900/20 border-green-400/30":"bg-gray-900/20 border-gray-400/30"}`,children:[i.jsxs("div",{className:"flex justify-between items-start mb-3",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:`px-2 py-1 rounded text-xs font-medium ${Q.responseType==="system"?"bg-blue-600 text-white":Q.responseType==="agent"?"bg-green-600 text-white":"bg-gray-600 text-white"}`,children:Q.responseType.toUpperCase()}),Q.isAutomated&&i.jsx("div",{className:"px-2 py-1 rounded text-xs font-medium bg-purple-600 text-white",children:"AUTOMATED"}),Q.isInternal&&i.jsx("div",{className:"px-2 py-1 rounded text-xs font-medium bg-red-600 text-white",children:"INTERNAL"})]}),i.jsxs("div",{className:"text-right",children:[i.jsx("div",{className:"text-sm text-gray-400",children:ds(Q.createdAt)}),Q.respondent&&i.jsxs("div",{className:"text-xs text-yellow-400",children:[Q.respondent.firstName," ",Q.respondent.lastName]})]})]}),i.jsx("div",{className:"text-white",children:Q.message}),(Q.automationTrigger||Q.isEdited)&&i.jsxs("div",{className:"mt-3 pt-3 border-t border-gray-600 text-xs text-gray-400",children:[Q.automationTrigger&&i.jsxs("div",{children:["Trigger: ",Q.automationTrigger]}),Q.isEdited&&i.jsxs("div",{children:["Edited at: ",ds(Q.editedAt)]})]})]},Q._id))}),ye.totalPages>1&&i.jsxs("div",{className:"flex justify-center gap-2 mb-6",children:[i.jsx("button",{onClick:()=>$n(pe._id,ye.currentPage-1),disabled:!ye.hasPrevPage||ae,className:"px-3 py-1 bg-yellow-400 text-[#013220] rounded disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),i.jsxs("span",{className:"px-3 py-1 text-yellow-400",children:["Page ",ye.currentPage," of ",ye.totalPages]}),i.jsx("button",{onClick:()=>$n(pe._id,ye.currentPage+1),disabled:!ye.hasNextPage||ae,className:"px-3 py-1 bg-yellow-400 text-[#013220] rounded disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]}),i.jsx("div",{className:"flex justify-center",children:i.jsx("button",{onClick:()=>{Ce(!1),Ye(null),re([])},className:"px-6 py-2 bg-yellow-400 text-[#013220] rounded-lg hover:bg-yellow-300 transition-colors",children:"Close"})})]})}),ls&&i.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:i.jsxs("div",{className:"bg-[#013220] border border-yellow-400 rounded-lg p-6 w-full max-w-md mx-4",children:[i.jsxs("div",{className:"flex justify-between items-center mb-4",children:[i.jsx("h2",{className:"text-xl font-bold text-yellow-400",children:"Add Internal Note"}),i.jsx("button",{onClick:()=>{Mr(!1),zo({ticketId:"",newStatus:"",note:""})},className:"text-gray-400 hover:text-yellow-400 text-2xl",children:"×"})]}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-yellow-400 text-sm font-medium mb-2",children:"Internal Note (Optional)"}),i.jsx("textarea",{value:Lo.note,onChange:Q=>zo({...Lo,note:Q.target.value}),placeholder:"Add an internal note about this status change...",className:"w-full px-3 py-2 bg-[#1a4a2e] border border-yellow-400/30 rounded-lg text-white placeholder-gray-400 focus:outline-none focus:border-yellow-400 resize-none",rows:4})]}),i.jsxs("div",{className:"flex justify-end space-x-3",children:[i.jsx("button",{onClick:()=>{Mr(!1),zo({ticketId:"",newStatus:"",note:""})},className:"px-4 py-2 bg-gray-600 text-white rounded-lg hover:bg-gray-700 transition-colors",children:"Cancel"}),i.jsx("button",{onClick:jp,className:"px-4 py-2 bg-yellow-400 text-[#013220] rounded-lg hover:bg-yellow-300 transition-colors font-medium",children:"Update Status"})]})]})]})}),wb&&i.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:i.jsxs("div",{className:"bg-[#013220] border border-yellow-400 rounded-lg p-6 w-full max-w-md mx-4",children:[i.jsxs("div",{className:"flex justify-between items-center mb-4",children:[i.jsx("h2",{className:"text-xl font-bold text-yellow-400",children:"Change Ticket Priority"}),i.jsx("button",{onClick:()=>{Rs(!1),wn({ticketId:"",currentPriority:"",newPriority:"",reason:""})},className:"text-gray-400 hover:text-yellow-400 text-2xl",children:"×"})]}),i.jsxs("div",{className:"space-y-4",children:[i.jsx("div",{children:i.jsxs("label",{className:"block text-yellow-400 text-sm font-medium mb-2",children:["Current Priority: ",i.jsx("span",{className:"capitalize text-white",children:Jr.currentPriority})]})}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-yellow-400 text-sm font-medium mb-2",children:"New Priority"}),i.jsxs("select",{value:Jr.newPriority,onChange:Q=>wn({...Jr,newPriority:Q.target.value}),className:"w-full px-3 py-2 bg-[#1a4a2e] border border-yellow-400/30 rounded-lg text-white focus:outline-none focus:border-yellow-400",children:[i.jsx("option",{value:"",children:"Select new priority"}),yP.map(Q=>i.jsx("option",{value:Q,className:"capitalize",children:Q},Q))]})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-yellow-400 text-sm font-medium mb-2",children:"Reason for Priority Change"}),i.jsx("textarea",{value:Jr.reason,onChange:Q=>wn({...Jr,reason:Q.target.value}),placeholder:"Explain why the priority needs to be changed...",className:"w-full px-3 py-2 bg-[#1a4a2e] border border-yellow-400/30 rounded-lg text-white placeholder-gray-400 focus:outline-none focus:border-yellow-400 resize-none",rows:3,required:!0})]}),i.jsxs("div",{className:"flex justify-end space-x-3",children:[i.jsx("button",{onClick:()=>{Rs(!1),wn({ticketId:"",currentPriority:"",newPriority:"",reason:""})},className:"px-4 py-2 bg-gray-600 text-white rounded-lg hover:bg-gray-700 transition-colors",children:"Cancel"}),i.jsx("button",{onClick:ru,disabled:!Jr.newPriority||!Jr.reason.trim(),className:"px-4 py-2 bg-orange-500 text-white rounded-lg hover:bg-orange-600 transition-colors font-medium disabled:bg-gray-500 disabled:cursor-not-allowed",children:"Change Priority"})]})]})]})})]})]})},V1e=()=>{const[t,e]=O.useState("officials"),[r,n]=O.useState([]),[a,s]=O.useState([]),[o,l]=O.useState(!1),[c,u]=O.useState(!1),[h,p]=O.useState(!1),[m,x]=O.useState(null),[y,b]=O.useState({title:"",description:"",picture:null}),[w,N]=O.useState({currentPage:1,totalPages:1,totalPosts:0}),[A,S]=O.useState(!1),[C,k]=O.useState(null),[T,E]=O.useState(!1),[_,L]=O.useState(null),P="https://aaaogo.xyz/api",R="https://aaaogo.xyz",z=async()=>{try{l(!0);const K=await _e.get(`${P}/offers`,{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}});K.data.success&&n(K.data.offers)}catch(K){console.error("Error fetching officials:",K),Ne.error("Failed to fetch officials")}finally{l(!1)}},B=async(K=1)=>{try{l(!0);const U=await _e.get(`${P}/posts/feed?page=${K}&limit=10`,{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}});U.data.success&&(s(U.data.posts),N({currentPage:U.data.currentPage,totalPages:U.data.totalPages,totalPosts:U.data.totalPosts}))}catch(U){console.error("Error fetching feeds:",U),Ne.error("Failed to fetch feeds")}finally{l(!1)}},Y=async K=>{if(K.preventDefault(),!y.title||!y.description){Ne.error("Title and description are required");return}try{l(!0);const U=new FormData;U.append("title",y.title),U.append("description",y.description),y.picture&&U.append("picture",y.picture),(await _e.post(`${P}/offers`,U,{headers:{"Content-Type":"multipart/form-data",Authorization:`Bearer ${localStorage.getItem("token")}`}})).data.success&&(Ne.success("Official created successfully"),u(!1),b({title:"",description:"",picture:null}),z())}catch(U){console.error("Error creating official:",U),Ne.error("Failed to create official")}finally{l(!1)}},X=async K=>{if(K.preventDefault(),!y.title||!y.description){Ne.error("Title and description are required");return}try{l(!0);const U=new FormData;U.append("title",y.title),U.append("description",y.description),y.picture&&U.append("picture",y.picture),(await _e.put(`${P}/offers/${m._id}`,U,{headers:{"Content-Type":"multipart/form-data",Authorization:`Bearer ${localStorage.getItem("token")}`}})).data.success&&(Ne.success("Official updated successfully"),p(!1),x(null),b({title:"",description:"",picture:null}),z())}catch(U){console.error("Error updating official:",U),Ne.error("Failed to update official")}finally{l(!1)}},H=K=>{L(K),E(!0)},W=async()=>{if(_)try{l(!0),(await _e.delete(`${P}/offers/${_}`,{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}})).data.success&&(Ne.success("Official deleted successfully"),z())}catch(K){console.error("Error deleting official:",K),Ne.error("Failed to delete official")}finally{l(!1),E(!1),L(null)}},V=async K=>{k(K),S(!0)},Z=async()=>{if(C)try{l(!0),(await _e.delete(`${P}/posts/${C}`,{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}})).data.success&&(Ne.success("Post deleted successfully"),B(w.currentPage))}catch(K){console.error("Error deleting post:",K),Ne.error("Failed to delete post")}finally{l(!1),S(!1),k(null)}},F=K=>{const{name:U,value:re,files:ae}=K.target;b(U==="picture"?we=>({...we,picture:ae[0]}):we=>({...we,[U]:re}))},G=K=>{x(K),b({title:K.title,description:K.description,picture:null}),p(!0)},te=K=>new Date(K).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"});return O.useEffect(()=>{t==="officials"?z():t==="feed"&&B()},[t]),i.jsxs("div",{className:"flex bg-[#013220] text-yellow-400 min-h-screen",children:[i.jsx(Ue,{}),i.jsxs("div",{className:"flex-1 p-3 md:p-6 min-w-0",children:[i.jsxs("div",{className:"mb-6 bg-gradient-to-r from-[#1a4a2e] to-[#2d5a3d] p-6 rounded-xl border border-yellow-400/20 shadow-lg",children:[i.jsx("h1",{className:"text-3xl font-bold text-yellow-400 mb-2",children:"Officials and Feed"}),i.jsx("p",{className:"text-gray-400",children:"Manage officials and view community feeds"})]}),i.jsx("div",{className:"mb-6",children:i.jsx("div",{className:"bg-[#1a4a2e] p-2 rounded-xl border border-yellow-400/20",children:i.jsxs("nav",{className:"flex space-x-3",children:[i.jsx("button",{onClick:()=>e("officials"),className:`py-3 px-6 rounded-lg font-medium transition-all duration-200 transform hover:scale-105 ${t==="officials"?"bg-gradient-to-r from-yellow-400 to-yellow-300 text-[#013220] shadow-lg":"text-yellow-400 hover:bg-yellow-400/10 hover:text-yellow-300"}`,children:"Officials"}),i.jsx("button",{onClick:()=>e("feed"),className:`py-3 px-6 rounded-lg font-medium transition-all duration-200 transform hover:scale-105 ${t==="feed"?"bg-gradient-to-r from-yellow-400 to-yellow-300 text-[#013220] shadow-lg":"text-yellow-400 hover:bg-yellow-400/10 hover:text-yellow-300"}`,children:"Feed"})]})})}),t==="officials"&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"flex justify-between items-center mb-6",children:i.jsxs("div",{className:"flex space-x-3",children:[i.jsxs("button",{onClick:()=>u(!0),className:"bg-gradient-to-r from-yellow-400 to-yellow-300 hover:from-yellow-300 hover:to-yellow-200 text-[#013220] px-4 py-2 rounded-lg flex items-center space-x-2 transition-all duration-200 transform hover:scale-105 font-medium shadow-lg",children:[i.jsx(Eq,{size:20}),i.jsx("span",{children:"Add Official"})]}),i.jsxs("button",{onClick:z,className:"bg-[#1a4a2e] hover:bg-[#2d5a3d] text-yellow-400 border border-yellow-400/30 px-4 py-2 rounded-lg flex items-center space-x-2 transition-all duration-200 transform hover:scale-105",children:[i.jsx(K2,{size:20}),i.jsx("span",{children:"Refresh"})]})]})}),o?i.jsx("div",{className:"flex justify-center items-center h-64",children:i.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-green-600"})}):i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:r.map(K=>i.jsxs("div",{className:"bg-[#1a4a2e] rounded-xl shadow-lg overflow-hidden hover:shadow-2xl transition-all duration-300 transform hover:scale-105 border border-yellow-400/20",children:[i.jsxs("div",{className:"h-48 bg-[#013220] flex items-center justify-center border-b border-yellow-400/20",children:[K.picture?i.jsx("img",{src:`${R}/${K.picture.replace(/^\/?/,"")}`,alt:K.title,className:"w-full h-full object-cover",onError:U=>{U.target.style.display="none",U.target.nextSibling.style.display="flex"}}):i.jsx(a1,{size:48,className:"text-yellow-400/50"}),i.jsx("div",{className:"w-full h-full flex items-center justify-center",style:{display:"none"},children:i.jsx(a1,{size:48,className:"text-yellow-400/50"})})]}),i.jsxs("div",{className:"p-4",children:[i.jsx("h3",{className:"text-lg font-semibold text-yellow-400 mb-2",children:K.title}),i.jsx("p",{className:"text-gray-400 text-sm mb-3 line-clamp-3",children:K.description}),i.jsxs("div",{className:"flex justify-between items-center text-xs text-gray-500 mb-3",children:[i.jsxs("span",{children:["Created: ",te(K.createdAt)]}),i.jsxs("span",{className:"text-yellow-400",children:["❤️ ",K.likes?.length||0]})]}),i.jsxs("div",{className:"flex space-x-2",children:[i.jsxs("button",{onClick:()=>G(K),className:"flex-1 bg-gradient-to-r from-yellow-400 to-yellow-300 hover:from-yellow-300 hover:to-yellow-200 text-[#013220] px-3 py-2 rounded-lg text-sm flex items-center justify-center space-x-1 transition-all duration-200 font-medium",children:[i.jsx(Oq,{size:16}),i.jsx("span",{children:"Edit"})]}),i.jsxs("button",{onClick:()=>H(K._id),className:"flex-1 bg-red-600 hover:bg-red-700 text-white px-3 py-2 rounded-lg text-sm flex items-center justify-center space-x-1 transition-all duration-200",children:[i.jsx(G2,{size:16}),i.jsx("span",{children:"Delete"})]})]})]})]},K._id))}),r.length===0&&!o&&i.jsxs("div",{className:"text-center py-12 bg-[#1a4a2e] rounded-xl border border-yellow-400/20",children:[i.jsx(a1,{size:64,className:"mx-auto text-yellow-400/50 mb-4"}),i.jsx("h3",{className:"text-lg font-medium text-yellow-400 mb-2",children:"No officials found"}),i.jsx("p",{className:"text-gray-400",children:"Get started by creating your first official."})]})]}),t==="feed"&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"flex justify-between items-center mb-6 bg-[#1a4a2e] p-4 rounded-xl border border-yellow-400/20",children:[i.jsxs("div",{children:[i.jsx("h2",{className:"text-xl font-semibold text-yellow-400",children:"Community Feed"}),i.jsxs("p",{className:"text-gray-400 text-sm",children:["Total posts: ",w.totalPosts]})]}),i.jsxs("button",{onClick:()=>B(w.currentPage),className:"bg-gradient-to-r from-yellow-400 to-yellow-300 hover:from-yellow-300 hover:to-yellow-200 text-[#013220] px-4 py-2 rounded-lg flex items-center space-x-2 transition-all duration-200 transform hover:scale-105 font-medium shadow-lg",children:[i.jsx(K2,{size:20}),i.jsx("span",{children:"Refresh"})]})]}),o?i.jsx("div",{className:"flex justify-center items-center h-64",children:i.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-green-600"})}):i.jsx("div",{className:"space-y-6",children:a.map(K=>i.jsxs("div",{className:"bg-[#1a4a2e] rounded-xl shadow-lg p-6 border border-yellow-400/20 hover:shadow-2xl transition-all duration-300",children:[i.jsxs("div",{className:"flex items-center mb-4",children:[i.jsx("div",{className:"w-10 h-10 bg-gradient-to-r from-yellow-400 to-yellow-300 rounded-full flex items-center justify-center mr-3",children:i.jsx(M0,{className:"text-[#013220]"})}),i.jsxs("div",{children:[i.jsx("h4",{className:"font-semibold text-yellow-400",children:K.author.name}),i.jsxs("p",{className:"text-sm text-gray-400",children:["@",K.author.username]})]}),i.jsx("div",{className:"ml-auto text-sm text-gray-400",children:te(K.createdAt)})]}),i.jsx("div",{className:"mb-4",children:i.jsx("p",{className:"text-gray-300 leading-relaxed",children:K.content})}),K.media&&K.media.length>0&&i.jsx("div",{className:"mb-4 grid grid-cols-2 gap-2",children:K.media.map((U,re)=>i.jsx("img",{src:`${R}/${U.replace(/^\/?/,"")}`,alt:`Post media ${re+1}`,className:"rounded-lg object-cover h-48 w-full",onError:ae=>{ae.target.src="https://via.placeholder.com/300x200?text=Image+Not+Found"}},re))}),i.jsxs("div",{className:"flex items-center justify-between pt-4 border-t border-yellow-400/20",children:[i.jsxs("div",{className:"flex items-center space-x-6",children:[i.jsxs("div",{className:"flex items-center space-x-2 text-gray-400",children:[i.jsx(fq,{className:"text-red-400"}),i.jsxs("span",{className:"text-sm",children:[K.likes?.length||0," likes"]})]}),i.jsxs("div",{className:"flex items-center space-x-2 text-gray-400",children:[i.jsx(c6,{className:"text-yellow-400"}),i.jsxs("span",{className:"text-sm",children:[K.comments?.length||0," comments"]})]})]}),i.jsx("div",{className:"flex items-center space-x-2",children:i.jsxs("button",{onClick:()=>V(K._id),className:"bg-gradient-to-r from-red-600 to-red-500 hover:from-red-500 hover:to-red-400 text-white px-3 py-1.5 rounded-lg flex items-center space-x-1 transition-all duration-200 transform hover:scale-105 font-medium shadow-lg text-sm",disabled:o,children:[i.jsx(G2,{size:16}),i.jsx("span",{children:"Delete"})]})})]}),K.comments&&K.comments.length>0&&i.jsxs("div",{className:"mt-4 pt-4 border-t border-yellow-400/20",children:[i.jsx("h5",{className:"font-medium text-yellow-400 mb-2",children:"Comments:"}),K.comments.slice(0,2).map(U=>i.jsxs("div",{className:"mb-2 p-3 bg-[#013220] rounded-lg border border-yellow-400/10",children:[i.jsxs("div",{className:"flex items-center mb-1",children:[i.jsx("span",{className:"font-medium text-sm text-yellow-400",children:U.author.name}),i.jsx("span",{className:"text-xs text-gray-500 ml-2",children:te(U.createdAt)})]}),i.jsx("p",{className:"text-sm text-gray-300",children:U.content})]},U._id)),K.comments.length>2&&i.jsxs("p",{className:"text-sm text-gray-400",children:["... and ",K.comments.length-2," more comments"]})]})]},K._id))}),w.totalPages>1&&i.jsx("div",{className:"flex justify-center mt-8",children:i.jsx("div",{className:"flex space-x-2",children:Array.from({length:w.totalPages},(K,U)=>U+1).map(K=>i.jsx("button",{onClick:()=>B(K),className:`px-3 py-2 rounded-lg transition-all duration-200 ${K===w.currentPage?"bg-gradient-to-r from-yellow-400 to-yellow-300 text-[#013220] font-medium":"bg-[#1a4a2e] text-yellow-400 hover:bg-[#2d5a3d] border border-yellow-400/30"}`,children:K},K))})}),a.length===0&&!o&&i.jsxs("div",{className:"text-center py-12 bg-[#1a4a2e] rounded-xl border border-yellow-400/20",children:[i.jsx(c6,{size:64,className:"mx-auto text-yellow-400/50 mb-4"}),i.jsx("h3",{className:"text-lg font-medium text-yellow-400 mb-2",children:"No posts found"}),i.jsx("p",{className:"text-gray-400",children:"The community feed is empty."})]})]}),c&&i.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:i.jsxs("div",{className:"bg-[#1a4a2e] rounded-xl p-6 w-full max-w-md border border-yellow-400/30 shadow-2xl",children:[i.jsx("h2",{className:"text-xl font-bold mb-4 text-yellow-400",children:"Create New Official"}),i.jsxs("form",{onSubmit:Y,children:[i.jsxs("div",{className:"mb-4",children:[i.jsx("label",{className:"block text-sm font-medium text-yellow-400 mb-2",children:"Title"}),i.jsx("input",{type:"text",name:"title",value:y.title,onChange:F,className:"w-full px-3 py-2 bg-[#013220] border border-yellow-400/30 rounded-lg text-yellow-400 placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-yellow-400 focus:border-transparent",required:!0})]}),i.jsxs("div",{className:"mb-4",children:[i.jsx("label",{className:"block text-sm font-medium text-yellow-400 mb-2",children:"Description"}),i.jsx("textarea",{name:"description",value:y.description,onChange:F,rows:"4",className:"w-full px-3 py-2 bg-[#013220] border border-yellow-400/30 rounded-lg text-yellow-400 placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-yellow-400 focus:border-transparent",required:!0})]}),i.jsxs("div",{className:"mb-6",children:[i.jsx("label",{className:"block text-sm font-medium text-yellow-400 mb-2",children:"Picture"}),i.jsx("input",{type:"file",name:"picture",onChange:F,accept:"image/*",className:"w-full px-3 py-2 bg-[#013220] border border-yellow-400/30 rounded-lg text-yellow-400 file:mr-4 file:py-2 file:px-4 file:rounded-lg file:border-0 file:bg-yellow-400 file:text-[#013220] file:font-medium hover:file:bg-yellow-300 focus:outline-none focus:ring-2 focus:ring-yellow-400 focus:border-transparent"})]}),i.jsxs("div",{className:"flex space-x-3",children:[i.jsx("button",{type:"submit",disabled:o,className:"flex-1 bg-gradient-to-r from-yellow-400 to-yellow-300 hover:from-yellow-300 hover:to-yellow-200 text-[#013220] py-2 px-4 rounded-lg font-medium disabled:opacity-50 transition-all duration-200",children:o?"Creating...":"Create"}),i.jsx("button",{type:"button",onClick:()=>u(!1),className:"flex-1 bg-[#013220] hover:bg-[#024a2a] text-yellow-400 border border-yellow-400/30 py-2 px-4 rounded-lg transition-all duration-200",children:"Cancel"})]})]})]})}),h&&i.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:i.jsxs("div",{className:"bg-[#1a4a2e] rounded-xl p-6 w-full max-w-md border border-yellow-400/30 shadow-2xl",children:[i.jsx("h2",{className:"text-xl font-bold mb-4 text-yellow-400",children:"Edit Official"}),i.jsxs("form",{onSubmit:X,children:[i.jsxs("div",{className:"mb-4",children:[i.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Title"}),i.jsx("input",{type:"text",name:"title",value:y.title,onChange:F,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-green-500",required:!0})]}),i.jsxs("div",{className:"mb-4",children:[i.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Description"}),i.jsx("textarea",{name:"description",value:y.description,onChange:F,rows:"4",className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-green-500",required:!0})]}),i.jsxs("div",{className:"mb-6",children:[i.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Picture"}),i.jsx("input",{type:"file",name:"picture",onChange:F,accept:"image/*",className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-green-500"})]}),i.jsxs("div",{className:"flex space-x-3",children:[i.jsx("button",{type:"submit",disabled:o,className:"flex-1 bg-green-600 hover:bg-green-700 text-white py-2 px-4 rounded-md disabled:opacity-50",children:o?"Updating...":"Update"}),i.jsx("button",{type:"button",onClick:()=>p(!1),className:"flex-1 bg-gray-300 hover:bg-gray-400 text-gray-700 py-2 px-4 rounded-md",children:"Cancel"})]})]})]})}),i.jsx(md,{isOpen:A,onClose:()=>{S(!1),k(null)},onConfirm:Z,title:"Delete Post",message:"Are you sure you want to delete this post? This action cannot be undone."}),i.jsx(md,{isOpen:T,onClose:()=>{E(!1),L(null)},onConfirm:W,title:"Delete Official",message:"Are you sure you want to delete this official? This action cannot be undone."})]})]})},q1e=({children:t})=>{const e=Cr(),r=e.pathname==="/livelocation"||e.pathname==="/";return i.jsxs("div",{className:"bg-[#013220] text-[#DDC104] min-h-screen",children:[!r&&i.jsx(kq,{}),i.jsx("div",{className:"min-h-screen",children:t}),i.jsx(d_,{position:"top-center",toastOptions:{duration:5e3,style:{background:"#1f2937",color:"#ffffff",border:"1px solid #374151"},success:{style:{background:"#065f46",color:"#ffffff"}},error:{style:{background:"#7f1d1d",color:"#ffffff"}}}})]})},G1e=()=>{const t=Ba();return O.useEffect(()=>{t(D5()),X2.startTokenRefreshCheck();const e=setInterval(()=>{t(D5())},300*1e3);return()=>{clearInterval(e),X2.stopTokenRefreshCheck()}},[t]),i.jsx(q1e,{children:i.jsxs(n$,{children:[i.jsx(ke,{path:"/",element:i.jsx(Y1e,{})}),i.jsx(ke,{path:"/home",element:i.jsx(Te,{children:i.jsx(zZ,{})})}),i.jsx(ke,{path:"/mlm",element:i.jsx(Te,{children:i.jsx(ire,{})})}),i.jsx(ke,{path:"/notification",element:i.jsx(Te,{children:i.jsx(rG,{})})}),i.jsx(ke,{path:"/chatdetail",element:i.jsx(Te,{children:i.jsx(hG,{})})}),i.jsx(ke,{path:"/dispatch",element:i.jsx(Te,{children:i.jsx(lG,{})})}),i.jsx(ke,{path:"/livelocation",element:i.jsx(Te,{children:i.jsx(uG,{})})}),i.jsx(ke,{path:"/customersupport",element:i.jsx(Te,{children:i.jsx(X1e,{})})}),i.jsx(ke,{path:"/websiteuser",element:i.jsx(Te,{children:i.jsx(pZ,{})})}),i.jsx(ke,{path:"/adminmanagement",element:i.jsx(Te,{children:i.jsx(U1e,{})})}),i.jsx(ke,{path:"/drivermanagement",element:i.jsx(Te,{children:i.jsx(ore,{})})}),i.jsx(ke,{path:"/driverprofile",element:i.jsx(Te,{children:i.jsx(ure,{})})}),i.jsx(ke,{path:"/drivermonitoring",element:i.jsx(Te,{children:i.jsx(pre,{})})}),i.jsx(ke,{path:"/driverhistory",element:i.jsx(Te,{children:i.jsx(dG,{})})}),i.jsx(ke,{path:"/earningandpayouts",element:i.jsx(Te,{children:i.jsx(gre,{})})}),i.jsx(ke,{path:"/ratings",element:i.jsx(Te,{children:i.jsx(bre,{})})}),i.jsx(ke,{path:"/penalty",element:i.jsx(Te,{children:i.jsx(Nre,{})})}),i.jsx(ke,{path:"/report",element:i.jsx(Te,{children:i.jsx(Cre,{})})}),i.jsx(ke,{path:"/referraltree",element:i.jsx(Te,{children:i.jsx(_re,{})})}),i.jsx(ke,{path:"/customermanagement",element:i.jsx(Te,{children:i.jsx(fG,{})})}),i.jsx(ke,{path:"/customerprofile",element:i.jsx(Te,{children:i.jsx(BK,{})})}),i.jsx(ke,{path:"/customerhistory",element:i.jsx(Te,{children:i.jsx(HK,{})})}),i.jsx(ke,{path:"/customerearningpayout",element:i.jsx(Te,{children:i.jsx(WK,{})})}),i.jsx(ke,{path:"/customermlm",element:i.jsx(Te,{children:i.jsx(lZ,{})})}),i.jsx(ke,{path:"/customerrating",element:i.jsx(Te,{children:i.jsx(VK,{})})}),i.jsx(ke,{path:"/customercomplain",element:i.jsx(Te,{children:i.jsx(fZ,{})})}),i.jsx(ke,{path:"/customerreferraltree",element:i.jsx(Te,{children:i.jsx($1e,{})})}),i.jsx(ke,{path:"/proposalmanagement",element:i.jsx(Te,{children:i.jsx(gZ,{})})}),i.jsx(ke,{path:"/agreementrecord",element:i.jsx(Te,{children:i.jsx(bZ,{})})}),i.jsx(ke,{path:"/marketplacecontrol",element:i.jsx(Te,{children:i.jsx(jZ,{})})}),i.jsx(ke,{path:"/overview",element:i.jsx(Te,{children:i.jsx(SZ,{})})}),i.jsx(ke,{path:"/fraudprofile/:id",element:i.jsx(Te,{children:i.jsx(MZ,{})})}),i.jsx(ke,{path:"/autolockRulesPanel",element:i.jsx(Te,{children:i.jsx(CZ,{})})}),i.jsx(ke,{path:"/ruleeditorpanel",element:i.jsx(Te,{children:i.jsx(EZ,{})})}),i.jsx(ke,{path:"/analytics",element:i.jsx(Te,{children:i.jsx(Ere,{})})}),i.jsx(ke,{path:"/paymentoverview",element:i.jsx(Te,{children:i.jsx(Ire,{})})}),i.jsx(ke,{path:"/walletadjustment",element:i.jsx(Te,{children:i.jsx(Fre,{})})}),i.jsx(ke,{path:"/transactions",element:i.jsx(Te,{children:i.jsx(Yre,{})})}),i.jsx(ke,{path:"/walletfreezingrules",element:i.jsx(Te,{children:i.jsx(Jie,{})})}),i.jsx(ke,{path:"/transactionlog",element:i.jsx(Te,{children:i.jsx(eoe,{})})}),i.jsx(ke,{path:"/alertnotification",element:i.jsx(Te,{children:i.jsx(toe,{})})}),i.jsx(ke,{path:"/unachievedpool",element:i.jsx(Te,{children:i.jsx(doe,{})})}),i.jsx(ke,{path:"/kycverification",element:i.jsx(Te,{children:i.jsx(uoe,{})})}),i.jsx(ke,{path:"/serviceProvider",element:i.jsx(Te,{children:i.jsx(poe,{})})}),i.jsx(ke,{path:"/serviceProviderDetail/:id",element:i.jsx(Te,{children:i.jsx(xoe,{})})}),i.jsx(ke,{path:"/driverhiring",element:i.jsx(Te,{children:i.jsx(yoe,{})})}),i.jsx(ke,{path:"/driverhiringdetail/:id",element:i.jsx(Te,{children:i.jsx(woe,{})})}),i.jsx(ke,{path:"/vendorreq",element:i.jsx(Te,{children:i.jsx(Noe,{})})}),i.jsx(ke,{path:"/drawalRequest",element:i.jsx(Te,{children:i.jsx(Aoe,{})})}),i.jsx(ke,{path:"/complainresolve",element:i.jsx(Te,{children:i.jsx(koe,{})})}),i.jsx(ke,{path:"/complaindetail/:id",element:i.jsx(Te,{children:i.jsx(Doe,{})})}),i.jsx(ke,{path:"/promocode",element:i.jsx(Te,{children:i.jsx(Moe,{})})}),i.jsx(ke,{path:"/promocodedetail/:id",element:i.jsx(Te,{children:i.jsx(Ooe,{})})}),i.jsx(ke,{path:"/accountedit",element:i.jsx(Te,{children:i.jsx(Eoe,{})})}),i.jsx(ke,{path:"/reviewandrating",element:i.jsx(Te,{children:i.jsx(_oe,{})})}),i.jsx(ke,{path:"/officialsandfeed",element:i.jsx(Te,{children:i.jsx(V1e,{})})}),i.jsx(ke,{path:"/reportanalytics",element:i.jsx(Te,{children:i.jsx(Loe,{})})}),i.jsx(ke,{path:"/driverreport",element:i.jsx(Te,{children:i.jsx(Foe,{})})}),i.jsx(ke,{path:"/rideservicereport",element:i.jsx(Te,{children:i.jsx(Woe,{})})}),i.jsx(ke,{path:"/supportreport",element:i.jsx(Te,{children:i.jsx(p1e,{})})}),i.jsx(ke,{path:"/earningandcommission",element:i.jsx(Te,{children:i.jsx(b1e,{})})}),i.jsx(ke,{path:"/approvalactivities",element:i.jsx(Te,{children:i.jsx(k1e,{})})}),i.jsx(ke,{path:"/teammlmreport",element:i.jsx(Te,{children:i.jsx(P1e,{})})}),i.jsx(ke,{path:"/withdrawalandtransaction",element:i.jsx(Te,{children:i.jsx(z1e,{})})}),i.jsx(ke,{path:"/customreportgenerator",element:i.jsx(Te,{children:i.jsx(I1e,{})})}),i.jsx(ke,{path:"/customreporttable",element:i.jsx(Te,{children:i.jsx(F1e,{})})})]})})},K1e=()=>i.jsx(C$,{children:i.jsx(G1e,{})});fH.createRoot(document.getElementById("root")).render(i.jsx(O.StrictMode,{children:i.jsx(IP,{store:ta,children:i.jsx(K1e,{})})}));